Compare commits

..

9 Commits

Author SHA1 Message Date
Tristan Van Berkom 78c0b1da9f Added <mime-types> and <patterns> parsing support to GtkFileFilter. 2011-01-27 16:30:15 +09:00
Tristan Van Berkom e2dfd6296d Fixed GtkCellLayout to parse <cell-packing> property text accumulatively. 2011-01-26 22:19:41 +09:00
Tristan Van Berkom 0ee8c43f8f Fixed GtkContainer to parse <packing> property text accumulatively. 2011-01-26 22:10:33 +09:00
Tristan Van Berkom db55f2e16d Changed GtkComboBoxText <items> builder parser to use g_string_append_len(). 2011-01-26 21:56:43 +09:00
Tristan Van Berkom 2f3d2128ea Changed GtkRecentFilter builder parsing to use g_string_append_len 2011-01-26 21:53:45 +09:00
Tristan Van Berkom 0054bb6936 Fix GtkRecentFilter GtkBuildable parsing to handle incomming text accumulatively 2011-01-26 21:51:01 +09:00
Tristan Van Berkom d10c862acd Fix GtkComboBoxText GtkBuildable <items> parsing to handle incomming text accumulatively 2011-01-26 21:51:01 +09:00
Tristan Van Berkom 0640d95a11 Added a line to the documentation example of GtkRecentFilter 2011-01-26 21:51:01 +09:00
Tristan Van Berkom 542533a2a5 Added GtkBuildable support for adding rules to GtkRecentFilter
Also added documentation section for this. Since the GtkRecentFilter
documentation was still living in sgml, as a side-effect I migrated these
docs to the gtkrecentfilter.[ch] sources.
2011-01-26 21:51:01 +09:00
416 changed files with 77524 additions and 90689 deletions
+8 -8
View File
@@ -1,9 +1,9 @@
If you want to hack on the GTK+ project, you'll need to have
the following packages installed:
- GNU autoconf 2.62
- GNU automake 1.11
- GNU libtool 2.2
- GNU autoconf 2.54
- GNU automake 1.7
- GNU libtool 1.4
- indent (GNU indent 1.9.1 is known good)
- GNU gettext 10.40
@@ -19,10 +19,10 @@ Information about using git with GNOME can be found here:
http://live.gnome.org/Git
In order to get GIT GTK+ installed on your system, you need to have
the most recent GIT versions of GLib, Pango, and ATK installed as well.
The installation process of these libraries is similar to that of GTK+,
but needs to be fulfilled prior to installation of GTK+.
In order to get GIT gtk+ installed on your system, you need to have
the most recent GIT versions of glib, pango, and atk installed as well.
The installation process of these libraries is similar to that of gtk+, but
needs to be fulfilled prior to installation of gtk+.
If at all possible, please use GIT to get the latest development version of
gtk+ and glib. You can do the following to get glib and gtk+ from GIT:
@@ -37,7 +37,7 @@ have a gnome account, you want to use the following instead:
$ git clone ssh://<username>@git.gnome.org/git/gtk+
To compile the GIT version of GTK+ on your system, you will need to take
To compile the GIT version of gtk+ on your system, you will need to take
several steps to setup the tree for compilation. You can do all these
steps at once by running:
+7 -7
View File
@@ -9,23 +9,23 @@ GTK+ requires the following packages:
GdkPixbuf @GDK_PIXBUF_REQUIRED_VERSION@, ATK @ATK_REQUIRED_VERSION@
and cairo @CAIRO_REQUIRED_VERSION@.
- gobject-introspection @INTROSPECTION_REQUIRED_VERSION@ or newer.
- gobject-introspection 0.9.3 or newer.
Simple install procedure
========================
% gzip -cd gtk+-@GTK_VERSION@.tar.gz | tar xvf - # unpack the sources
% cd gtk+-@GTK_VERSION@ # change to the toplevel directory
% ./configure # run the `configure' script
% make # build GTK+
% cd gtk+-@GTK_VERSION@ # change to the toplevel directory
% ./configure # run the `configure' script
% make # build GTK+
[ Become root if necessary ]
% make install # install GTK+
% make install # install GTK+
The Details
===========
Complete information about installing GTK+ and related libraries
can be found in the file:
Complete information about installing GTK+ and related libraries can be found
in the file:
docs/reference/gtk/html/gtk-building.html
+1 -263
View File
@@ -1,265 +1,3 @@
Overview of Changes in GTK+ 3.0.2
=================================
* GtkSettings have been made multi-backend-safe
* Many improvements to themability and the default theme
- GtkScale slider theming can adjust to scale marks, using style classes
- A new style class for 'primary' toolbars
- Widget style classes can now be specified in GtkBuilder files
- Improved scrollbar drawing
- Improved combobox drawing
- Improved spinbutton drawing
- Improved switch drawing
- Improved checkbutton drawing
- Improved menu drawing
- Improved notebook tab drawing
* Bugs fixed:
643041 Gtk-CRITICAL **: gtk_render_slider: assertion `height > 0'...
643131 gtk_tray_icon_dispose
643170 gtk_file_chooser_set_filename does not work if "Show hidden...
643216 Extraneous emits of GdkScreen::monitors-changed
643321 Keypresses in window contextual menu go through to app
643347 consider allowing style data in builder data
643370 gtk_style_context_get_font return NULL
643440 gdkconfig.h included in tarball
643496 GtkDialog does not use separators any more. Description is...
643543 App Chooser classes abort if no content-type is given
643584 crash in gdk_event_free()
643630 Tabs disappear from notebook on scrolling back and resizing...
643685 Normalise marks positions internally in GtkScale
643911 Inactive tab content allocation should respect tab-overlap
643912 Tab allocation should respect tab-curvature
643925 Mouse wheel is following URLs
643967 Add a style property to flip rendering order
644089 treeview: propagate the selected state from the row
* Translation updates:
Esperanto
German
Latvian
Portuguese
Russian
Simplified Chinese
Slovenian
Spanish
Ukrainian
Overview of Changes in GTK+ 3.0.1
=================================
* A autoconf macro, GTK_CHECK_BACKEND, has been added
to allow easy checking for certain gdk backends
* A number of memory leaks and segfaults involving accessibility
have been fixed
* Bugs fixed:
586201 GtkLinkButton doesn't implement neither HyperLink nor...
599907 Gail implementation of atk_add_key_event_listener return...
626730 Check menu item does not set indeterminate state
630971 gailstatusbar attempts to cast a GtkHBox to a GtkBin
633291 Handle Shift-keys in X11 gdk_test_simulate_key()
642213 gtk_widget_render_icon_pixbuf fails with non-standard...
642263 undefined reference to "GTK_IS_SOCKET" and "GTK_IS_PLUG"
642541 Missing semi-colon in gtkseparatormenuitem.c
642677 "migrating" guide not in sync with GTK+ 3.0
642681 gtk_combo_box_text_get_active_text doesn't work as stated
642751 Typo in migrating-2to3.xml
642771 Fix tiny leak in tracker backend
642772 GTK does not correctly process input sent via SendInput...
642778 TextView broken for large files
642782 gail_misc_buffer_get_run_attributes doesn't set background-gdk...
642791 Fix a typo in gtk_socket_notify
* Translation updates:
Bengali India
British English
Bulgarian
Hebrew
Hungarian
Korean
Norwegian bokmål
Punjabi
Spanish
Uighur
Ukranian
Vietnamese
Overview of Changes in GTK+ 3.0.0
=================================
* Library sonames have been changed from libgdk-3.0 and libgtk-3.0
to libgdk-3 and libgtk-3.
* Bugs fixed:
632775 Back / Forward button's icons don't respect RTL settings
639846 GdkEventScroll events are sent twice
639945 Gtk.Widget does not have drag_* methods (but in pygtk it did)
640801 Crash gtk_tree_view_reset_header_styles at gtktreeview.c:11871
641196 Fix another GtkFixed regression, in gtk_fixed_forall()
641302 show something nicer than XF86AudioMute etc
641367 [region] gnome-applications ignore layout switching
641409 not chaining up in ::style-updated
641429 Errors creating a GtkWidget without a display
641431 Apply button goes grey after two mode switching
641517 "Migrating from libunique to GtkApplication" examples do not do...
641558 GtkCssProvider leaks path string
641621 Use faster new G_VALUE_COLLECT_INIT variant instead...
641640 Update autotools configuration
* Translation updates:
Arabic
English
Galician
Hebrew
Korean
Norwegian bokmål
Polish
Overview of Changes in GTK+ 2.99.3
==================================
* This release adds some forgotten padding to class structs,
and thus breaks ABI for a last time before 3.0
* Many Introspection annotation improvements
* We no longer build the gtk-update-icon-cache utility, and
use a preexisting one, if --enable-gtk2-dependency is passed
to configure
* GtkBuilder can now fill GtkComboBoxText and GtkMenToolButton
widgets with data, as well as GtkFileFilters and GtkTextTagTables
* GtkImage now has a ::use-fallback property to allow generic
fallback with GIcons and icon-names (e.g. for symbolic icons)
* There's a new gtk_text_view_get_cursor_locations() to enable
popup-at-cursor functionality
* The application chooser widgets can now set a custom
dialog heading
* The file chooser and application chooser widgets have received
minor visual improvements
* gtk-auto-mnemonics is now backed by an XSetting
* Defaults for GtkSettings, as well as theme-specific settings,
are now read from key files
* Key themes are now supported again, their syntax has been changed
to be CSS-like
* More objects use GtkStyleContext directly now:
GtkTreeView
GtkIconView
GtkCellArea
GtkCellRendererText
GtkCellRendererPixbuf
GtkCellRendererAccel
GtkCellRendererProgress
* GtkPlug and GtkSocket have been reduced to X11-specific API, and
using them requires including the <gtk/gtkx.h> header, and uses
of GdkNativeWindow in their APIs have been replaced by the X11
Window type.
A number of other API changes were necessary in GDK to ensure
that multiple GDK backends can coexist:
- GdkNativeWindow has been dropped
- The GdkEventOwnerChange owner field is a GdkWindow now
- The GdkEventSelection requestor field is a GdkWindow now
- The GtkWidget::client_event vfunc is gone
- GdkEventClient is gone, together with related API:
gdk_add_client_message_filter
gdk_display_add_client_message_filter
gdk_screen_broadcast_client_message
gdk_event_send_client_message
gdk_event_send_client_message_for_display
gdk_event_send_clientmessage_toall
- gdk_drag_get_protocol_for_display has been changed to
gdk_window_get_drag_protocol
* Migration guide and tutorial and other documentation improvements
* Bug fixes
322926 FileChooser: Alt-Shift-Down should work like Alt-Down
351755 GTK_RANGE (range) -> round_digits should be exposed...
586635 gtk_info_bar_add_button() should return GtkButton*
590459 Text is sometimes not pasted at the right location
598952 Implement object attribute to expose toolkit/source
626336 Warning when activating GtkButton outside of an event...
634677 assertion in finalize assuring that buffer is NULL...
635287 Specify packages when generating GIR
636691 Rendering icons with prelight state doesn't...
638920 gail should provide toolkit as an AtkAttribute
639139 Subclassing GtkIconView broken lately in master
639186 gtk_paper_size_new fails to recognize valid name
639325 Generated introspection broken
639380 Critical warnings when detaching tab
639455 accel cell renderer critical warning
639520 Update docs about colormap to use visual instead.
639531 No error is given when attempting to save to "nonexistent...
639625 Crashes on dereferencing a NULL GtkBorder.
639750 Support css3 colors
639754 Must widget class names begin with uppercase letter?
639767 password not accepted in gnome-screensaver dialog
639792 Regional panel: "Add" dialog: combos not sorted
639822 Synthesized button2/button3 does not transfer source_device
639845 insensitive and separator items in comboboxes not working...
639931 gtk_application_add_window() docs should mention window destr...
639949 pygobject leaks references on GtkWindows
640005 removable media dialog should use app names
640006 choose app dialog shows other apps by default
640011 Selects application on cancel
640105 Crash showing a offscreen window with a textview inside
640161 GtkFileChooserWidget 0xbbf6c0 is mapped but visible=1...
640188 gdk_pixbuf_get_from_drawable missing from migration guide
640195 gdk_cairo_create gets cairo context with badly clipped...
640282 insensitive, active check button becomes sensitive
640313 BadDevice X error when ungrabbing a SLAVE device
640391 Display lines between rows when window is focused
640487 crash on gtk_statusbar_remove_all()
640698 Incompatibility in 'matched-selected' signal invocation
640712 GtkAssistant fonts are too big
640744 mount-operation: don't show the dialog until the tree...
640902 X11 headers included by default in public headers
640965 XCompose does not work with GTK+ 2.99.x
640983 GtkSettings: Fix theme not updating for dark theme
640999 GtkSpinner Class check macro is invalid
641023 assertion `hash_table != NULL' failed in gtkplug.c
641039 Cannot expand/collapse nodes by mouse
641042 assertion `G_IS_OBJECT (object) in gdkevents.c
641059 Fix several bugs handling GtkTrayIcon symbolic colors
641073 Please be consistent with GtkEntryCompletion
641176 Fix crash in gtk_fixed_remove()
* Translation updates
Arabic
Basque
Catalan
Chinese
Esperanto
Estonian
Galician
German
Greek
Hebrew
Italian
Kazakh
Norwegian bokmål
Persian
Punjabi
Spanish
Uighur
Overview of Changes in GTK+ 2.99.2
==================================
@@ -309,7 +47,7 @@ Overview of Changes from GTK+ 2.99.0 to 2.99.1
639105 Port GtkTextDisplay to StyleContext.
639106 New CSS style misses distinction between "selected focused"...
639127 Misc Win32 GDK building problems
639157 GtkOrientable should add/remove "horizontal" and "vertical"...
639157 GtkOrientable should add/ remove "horizontal" and "vertical"...
* Translation updates:
British English
+425 -11
View File
@@ -27,20 +27,434 @@ Installation
See the file 'INSTALL'
Release notes for 3.0
Release notes for 2.20
======================
* GtkStatusbar now has a message area (see gtk_status_bar_get_message_area)
which makes it easy to place additional widgets inside the statusbar
frame or to replace the label widgets. Previously, this was only possible
by accessing the innards of the statusbar widget directly. Applications
which are doing so may need some adjustments, since the addition of the
message area changed the internal widget hierarchy.
* GtkBuilder no longer sets the "name" property of widgets to the ID
attribute of the <object>. Use gtk_buildable_get_name() instead of
gtk_widget_get_name() to obtain the ID.
* GTK+ now includes introspection data, as a consequence, it gained a
dependency on gobject-introspection. It is possible to build without
introspection by passing --disable-introspection to configure.
Release notes for 2.18
======================
* gtk_tooltip_set_custom now accept a NULL custom_widget to unset the
old custom_widget. Custom_widget does not get destroyed when the
tooltip goes away.
* JPEG2000 support is no longer enabled by default. It must be
explicitly turned on, by passing --with-libjasper to configure.
* GDK has been reworked to implement 'client-side windows'. This offers
exciting new possibilities, such as transformed, offscreen rendering,
but it breaks some long-standing assumptions that applications may
have about GDK windows. Setting the environment variable
GDK_NATIVE_WINDOWS makes GDK create a native X11 window for each
GDK window, which might make problematic applications work better.
* GTK+ calls signal (SIGPIPE, SIG_IGN) during initialization, to ignore
SIGPIPE signals, since these are almost never wanted in graphical
applications. If you do need to handle SIGPIPE for some reason, reset
the handler after gtk_init(), but notice that other libraries (e.g.
libdbus or gvfs) might do similar things.
Release notes for 2.16
======================
* Password entries now display a caps-lock warning. This can be turned off
with the caps-lock-warning property.
* Various orientation-related functions have been deprecated in favour
of the new GtkOrientable interface: gtk_scale_button_get_orientation,
gtk_scale_button_set_orientation, gtk_toolbar_set_orientation.
* The action-proxy interaction has been changed. Widgets that operate as
proxies have to implement the GtkActivatable interface now. GtkActivatable
implementation are responsible for syncing their appearance with the
action and for activating the action. All GTK+ widgets that are commonly
used as proxies implement the GtkActivatable interface.
* The handling of keyboard shortcuts has been changed, to help with a
longstanding complaint about the way GTK+ handles multiple layouts. GTK+
now only uses keys from groups other than the current group if they are
not present in the current group.
Release notes for 2.14
======================
* gtkitemfactory.h is now completely deprecated.
As gtkactiongroup.h and gtkstock.h no longer include the gtkitemfactory.h
header, this might break application using gtk_item_factory_* symbols
without including gtkitemfactory.h - even though this behaviour has never
been supported in the first place.
* The GtkFileSystem semi-private interface has been removed.
The GTK+ filechooser implementation now uses GIO directly, which has
rendered external filesystem implementations unnecessary. Consequently,
the GtkFileSystem interface is no longer available, nor the filechooser
will load any GtkFileSystem implementation.
* GtkComboBox now renders the popdown button insensitive when
the model is empty. Applications which want to populate the list
only before displaying it can set gtk_combo_box_set_button_sensitivity
to GTK_SENSITIVITY_ON, so that the button is always sensitive or
GTK_SENSITIVITY_OFF to make it insensitive respectively.
* GtkAdjustment now enforces that values are restricted to the
range [lower, upper - page_size]. This has always been the documented
behaviour, and the recommended practice is to set page_size to 0
when using adjustments for simple scalar values, like in a slider
or spin button.
* gdk-pixbuf will use GIO for mime type detection if possible. For
this to work, shared-mime-info needs to be installed and XDG_DATA_DIRS
set accordingly at configure time. Otherwise, gdk-pixbuf falls
back to its built-in sniffing implementation.
Release notes for 2.12
======================
* gtk_about_dialog_get/set_name() were deprecated in favour of
gtk_about_dialog_get/set_program_name(), the GtkAboutDialog now uses the
"program-name" property instead of the conflicting "name" property.
* The gdk-pixbuf tiff loader now requires libtiff 3.6.0 or later.
* Support for Windows 9x/ME has officially been removed. It hasn't worked
since 2.6 anyway.
* The GtkTextBufferTargetInfo enumeration values have been changed from
G_MAXUINT-0, G_MAXUINT-1, G_MAXUINT-2, etc, to -1, -2, -3 to stay within
ANSI C limits.
* A change in the handling of _NET_WM_USER_TIME properties on toplevel
windows can cause deadlock problems with window managers that are using
GDK for drawing decorations. In particular, metacity <= 2.18.0 is affected
by this. The problem has been fixed in metacity 2.18.1.
* Semi-private GtkTextLayout api has changed: new GtkTextLayout method
invalidate_cursors(), and new functions gtk_text_layout_invalidate_cursors()
and gtk_text_layout_cursors_changed(), which should be used in place of
gtk_text_layout_invalidate() and gtk_text_layout_changed() if invalidation
is due to marks moved or changed selection; new GtkTextLineDisplay structure
member. Source compatibility is preserved; binary compatibility may break
only if GtkTextLineDisplay structure was created on stack or as a part
of another structure (in particular GnomeCanvas and its clones do not need
recompiling).
* Another new signal has been added to GtkNotebook. The new signal
is called create-window, so this name can no longer be used for signals
in objects derived from GtkNotebook.
* The gtk_notebook_set/get_group_id() functions were found to be insufficient
and have been deprecated in favour of gtk_notebook_set/get_group().
* The move-focus signal has been moved to GtkWidget, to unify the
various implementations of this signal in specific widgets. Great care
has been taken to make sure that all code using this signal continues
to work.
* An unused and hardly visible GtkFrame has been removed from the menu
widget hierarchy when GtkComboBox::appears-as-list style property is
set. Any RC file applying a different style to any widget below the
widget path "gtk-combobox-popup-window.GtkFrame" should take into
account that the frame no longer exists.
* The external print preview application used by GtkPrintOperationPreview
is now passed the print settings on the command line with the
--print-settings parameter pointing to a temp file containing the
settings. The preview application assumes ownership of the file and
should delete it once it does not need it anymore. The --print-settings
commandline option is understood by Evince 0.9.0 and newer. To use a
different print preview application, change the gtk-print-preview-command
setting in your gtkrc file, e.g. gtk-print-preview-command = "ggv %f"
* GtkMenuShell is now defined as an abstract type. It was already
documented as an abstract class, and there is little reason to
instantiate it.
* The GtkTooltips struct (this is the old tooltips API) is now considered
private. Code that used to access this struct, in particular the
tips_data_list field, will need to change. All of the old tooltips
API has been deprecated in favour of a new implementation and
API. This affects all of the gtk_tooltips_ functions, and functions
which take a GtkTooltips argument, such as gtk_tool_item_set_tooltip()
and gtk_menu_tool_button_set_arrow_tooltip().
* The memory management of the GtkRecentManager object has been changed,
as using the screen didn't guarantee that the singleton instance was
correctly destroyed. The screen-related functions have been deprecated,
and should not be used anymore; the GtkRecentManager instance returned by
the gtk_recent_manager_get_default() function is guaranteed to be valid
for the entire lifetime of an application.
* A number of interfaces that have been superseded by newer interfaces for
a long time have finally been deprecated. This includes
gtk_widget_ref/unref(), gtk_rc_style_ref/unref() and the old file selector.
* The various coordinate systems in use in GtkTreeView widgets have
been clarified in the documentation, and in the cause of doing so,
the functions gtk_tree_view_widget_to_tree_coords() and
gtk_tree_view_tree_to_widget_coords() have been deprecated in
favour of a new family of gtk_tree_view_convert_ functions.
* gtk_menu_item_remove_submenu() has been deprecated in favour of
gtk_menu_item_set_submenu (..., NULL).
* gtk_default_draw_check() has been fixed to really decrease the
indicator size by one pixel to ensure an odd size instead of
accidentially increasing it.
Consequently, gtk_cell_renderer_toggle_render() could be fixed to
not subtract 1 from the size passed to gtk_paint_option(), which
was just a workaround for above off-by-two for even sizes (theme
engines now get the real indicator size passed).
The default toggle size of GtkCheckMenuItem and GtkCellRendererToggle
has been changed to 13 to be consistent with GtkCheckButton.
The only visible change with default settings is that the indicator in
GtkCellRendererToggle has changed its size from 11 to 13 and is now
consistent with menus and toggle buttons.
* GTK+ has always required that gtk_init() (or a variant thereof) is
called before any other GTK+ function. Some applications call functions
like gtk_clipboard_get() to check if they need to call gtk_init(),
anyway. A change in GLib 2.14 has recently broken this unsupported
practise. It is worth pointing out that calling gtk_init() twice
does no harm.
Release notes for 2.10
======================
* The hexadecimal Unicode input feature has been reworked. It no longer
blocks the use of the sixteen Ctrl-Shift-<hex digit> key sequences. Now
it only uses Ctrl-Shift-u.
* A memory leak in GtkStyle handling has been fixed. This may expose bugs
in third-party widgets which forget to call gtk_style_attach() in their
realize functions.
* Range widgets like GtkScrollbar now render their arrows insensitive
when the slider is at the end. Applications which react to arrow
clicks even if the slider is at the end may want to use the new
gtk_range_set_[upper/lower]_stepper_sensitivity() functions to
prevent the arrows from being rendered insensitive.
* GtkObject now uses the "floating reference" support in GObject.
GTK_OBJECT_IS_FLOATING() will still work, but direct checking
of the GTK_FLOATING flag will no longer detect the floating
reference. Details about floating references can be found in the docs:
http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#floating-ref
* Accelerators like (_F) are now stripped from labels when they are
displayed in toolbars. If this is not wanted, the feature can be
suppressed by inserting a Unicode control character, e.g ZWNJ.
* The pixbuf theme engine can now customize expanders (in GtkTreeView
and GtkExpander) and resize grips, using the new EXPANDER and
RESIZE_GRIP function values.
* Dialogs created by gtk_about_dialog_new() no longer hide automatically
when the user clicks close. It is the applications responsibility to
hide or destroy the dialog.
* Several new signals have been added to GtkNotebook. Care has been taken
to choose signal names which do not collide with signals added by well-known
derived classes. The names which can no longer be used for signals in
objects derived from GtkNotebook are page-reordered, page-removed and
page-added.
* Due to the interface changes in the file chooser backend interface,
the GTK+ ABI version has been bumped to 2.10.0. Third-party filesystem
backends have to be ported to the new interface, other modules, such as
theme engines, input method modules or pixbuf loaders have to be rebuilt
so that they are installed in the right place for GTK+ to find them.
Release notes for 2.8
=====================
* GTK+ 3 is a major new version of GTK+, which is parallel installable
with GTK+ 2.x. For information about porting applications from GTK+ 2.x
to GTK+ 3, see the file:
* GTK+ 2.8 and Pango 1.10 require the cairo library.
docs/reference/gtk/html/migrating.html
* The default theme has been renamed to "Raleigh". Existing configurations
specifying the "Default" theme name should still work.
Or online at:
* The GtkTreeView::enable-search property has been changed to control
only typeahead search, not the C-f keybinding to start an interactive
search. To turn off interactive searching completely, you have to
set GtkTreeView::search-column to -1.
http://library.gnome.org/devel/gtk/3.0/migrating.html
* The restriction on using the same cell renderer in multiple columns
of a GtkTreeView is now more strictly enforced.
* Note that the library sonames in this release have been changed from
libgtk-3.0 and libgdk-3.0 to libgtk-3 and libgdk-3, to prevent the
library versions from going backwards, compared to the 2.90/91/99
releases. Applications will have to be recompiled.
* In GTK+ 2.8, GtkCalendar uses nl_langinfo() (if available) to determine
the first day of the week. Thus, it is possible to select the first day
of the week independently from the language, by setting LC_TIME.
* In GTK+ 2.8, the gtk-update-icon-cache utility includes image data
in the icon caches, which will make the icon cache files larger than
the one produced by GTK+ 2.6. This change will reduce the memory
overhead of icon themes at runtime, since all GTK+ applications can
share the image data in memory.
* In 2.8, GDK emits GdkEventGrabBroken events when a keyboard or pointer
grab is broken. On X11, this can happen if the same application grabs
again, or if the window used for the grab becomes unviewable. It happens
more often on Win32. Applications which use grabs should pay attention
to these events and do the necessary cleanups when the grab is lost.
* The GIOChannel code for sockets on win32 has been rewritten.
Applications who make non-trivial use of GIOChannels on win32 should
be watched for possible problems.
* GLib 2.8 uses atomic operations to implement reference counting, thus
g_object_ref/unref, g_closure_ref/sink/unref and g_iochannel_ref/unref
can be used without locking in multithreaded applications. Note that
other modifications, like concurrent setting of properties still require
locking.
* g_convert() and related character set conversion functions have been
fixed to emit pending shift states and to not cache iconv descriptors
across multiple calls, since that is problematic for some encodings.
Note that these functions are not suitable for streaming conversions;
use g_iconv() to do streaming conversion.
Release notes for 2.6
=====================
* GTK+ 2.6 supports clipboard persistency. To make use of this feature,
a clipboard manager following the specification at
http://www.freedesktop.org/wiki/Standards/clipboard-manager-spec
must be running. A sample implementation of such a clipboard manager
is available at
http://people.imendio.com/andersca/archives/clipboard-manager-0.3.tar.gz
Applications can use the function gdk_display_supports_clipboard_persistence()
to find out if clipboard persistence is available.
* Notification on clipboard ownership changes via GdkOwnerChange events
requires the XFIXES X extension. Applications can use the function
gdk_display_supports_selection_notification() to find out if ownerchip
change notification is available.
* The icon theme code in GTK+ 2.6 follows the freedesktop.org icon theme
specification. Setting the XDG_DATA_DIRS environtment variable may be
necessary if your icons aren't installed in the default location
/usr/share/icons.
* The icon theme code in GTK+ 2.6 can make use of mmap()able cache files
to avoid a lot of disk searching overhead. GTK+ includes a utility named
gtk-update-icon-cache to generate these cache files. For further details,
see the gtk-update-icon-cache man page or the GTK+ documentation.
* To reduce code size and improve efficiency, GTK+, when compiled
with the GNU toolchain, has separate internal and external entry
points for exported functions. The internal names, which begin with
IA__, may be seen when debugging a GTK+ program.
* The following functions have been deprecated in GTK+ 2.6:
gdk_pango_context_set_colormap
gtk_cell_renderer_editing_canceled
* The new GtkFileChooser widget emphasizes simplicity and thus does
not provide a navigation entry by default when opening files.
Experienced command line users will likely want to make heavy use of
the location dialog brought up by the Control-L key shortcut.
* The GTK+ libraries use an '_' prefix to indicate private symbols that
must not be used by applications. On some platforms, symbols beginning
with prefixes such as _gtk, _gdk, and _pango will be exported
from the library, on others not. In no case can applications
use these private symbols. In addition to that, GTK+ 2.6 makes several
symbols private which were not in any installed header files and
were never intended to be exported.
* The gdk_pixbuf_xlib library included in the contrib/ directory
and the framebuffer GDK backend included in the gdk/linux-fb directory
of GTK+ are provided on an as-is basis and have not been tested at all.
No guarantees about the degree of workingness or about future
compatibility are provided.
* On Unix, the assumption of GLib and GTK+ by default is that filenames on
the filesystem are encoded in UTF-8 rather than the encoding of the locale;
the GTK+ developers consider that having filenames whose interpretation
depends on the current locale is fundamentally a bad idea.
If you have filenames encoded in the encoding of your locale, then you
may want to set the G_FILENAME_ENCODING environment variable:
G_FILENAME_ENCODING=@locale
export G_FILENAME_ENCODING
(Earlier versions of GLib 2.x required a different environment variable
setting; G_BROKEN_FILENAMES=1 to achieve the same effect; this
is still supported, but G_FILENAME_ENCODING is preferred.)
Best integration of GTK+ 2.6 with the environment is achieved by
using a UTF-8 locale.
On Windows, filenames passed to GTK+ should always be in UTF-8, as
in GLib 2.6. This is different than in previous versions of GTK+
where the system codepage was used. As in GLib, for DLL ABI
stability, applications built against previous versions of GTK+ will
use entry points providing the old semantics.
When compiling against GTK+ 2.6, applications intended to be
portable to Windows must take the UTF-8 file name encoding into
consideration, and use the gstdio wrappers to access files whose
names have been constructed from strings returned from GTK+ or GLib.
How to report bugs
==================
Bugs should be reported to the GNOME bug tracking system.
(http://bugzilla.gnome.org, product gtk+.) You will need to create an
account for yourself.
In the bug report please include:
* Information about your system. For instance:
- What operating system and version
- What version of X
- For Linux, what version of the C library
And anything else you think is relevant.
* How to reproduce the bug.
If you can reproduce it with one of the tests or demos built with GTK+,
such as demos/gtk-demo/gtk-demo, that would be most convenient. Otherwise,
please include a short test program that exhibits the behavior. As a
last resort, you can also provide a pointer to a larger piece of software
that can be downloaded.
* If the bug was a crash, the exact text that was printed out when the
crash occured.
* Further information such as stack traces may be useful, but is not
necessary. If you do send a stack trace, and the error is an X error,
it will be more useful if the stacktrace is produced running the test
program with the --sync command line option.
Patches
=======
Patches should also be submitted to bugzilla.gnome.org. If the patch
fixes an existing bug, add the patch as an attachment to that bug
report.
Otherwise, enter a new bug report that describes the patch, and attach
the patch to that bug report.
Patches should be in unified diff form. (The -up option to GNU diff.)
+1 -1
View File
@@ -139,7 +139,7 @@
<File RelativePath="..\..\..\gdk\win32\gdkselection-win32.c" />
<File RelativePath="..\..\..\gdk\win32\gdktestutils-win32.c" />
<File RelativePath="..\..\..\gdk\win32\gdkvisual-win32.c" />
<File RelativePath="..\..\..\gdk\win32\gdkdisplaymanager-win32.c" />
<File RelativePath="..\..\..\gdk\win32\gdkwin32displaymanager.c" />
<File RelativePath="..\..\..\gdk\win32\gdkwin32id.c" />
<File RelativePath="..\..\..\gdk\win32\gdkwindow-win32.c" />
</Filter>
+1
View File
@@ -316,6 +316,7 @@ copy ..\..\..\gtk\gtkwidget.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#
copy ..\..\..\gtk\gtkwidgetpath.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkwindow.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
mkdir $(OutDir)\lib\gtk-$(GtkApiVersion)\include&#x0D;&#x0A;
copy ..\..\..\gdk\gdkconfig.h $(OutDir)\include\gtk-3.0\gdk&#x0D;&#x0A;
copy $(ConfigurationName)\$(PlatformName)\bin\*-$(GtkApiVersion).lib $(OutDir)\lib&#x0D;&#x0A;
+150 -118
View File
@@ -8,10 +8,10 @@
# if backwards compatibility has been broken,
# set GTK_BINARY_AGE and GTK_INTERFACE_AGE to 0.
m4_define([gtk_major_version], [3])
m4_define([gtk_minor_version], [0])
m4_define([gtk_micro_version], [2])
m4_define([gtk_interface_age], [2])
m4_define([gtk_major_version], [2])
m4_define([gtk_minor_version], [99])
m4_define([gtk_micro_version], [3])
m4_define([gtk_interface_age], [0])
m4_define([gtk_binary_age],
[m4_eval(100 * gtk_minor_version + gtk_micro_version)])
m4_define([gtk_version],
@@ -38,25 +38,22 @@ AC_CONFIG_MACRO_DIR([m4])
m4_define([gtk_binary_version], [3.0.0])
# required versions of other packages
m4_define([glib_required_version], [2.28.0])
m4_define([pango_required_version], [1.24.0])
m4_define([atk_required_version], [1.30])
m4_define([glib_required_version], [2.27.5])
m4_define([pango_required_version], [1.20])
m4_define([atk_required_version], [1.29.2])
m4_define([cairo_required_version], [1.10.0])
m4_define([gdk_pixbuf_required_version], [2.22.0])
m4_define([introspection_required_version], [0.10.1])
m4_define([gdk_pixbuf_required_version], [2.21.0])
GLIB_REQUIRED_VERSION=glib_required_version
PANGO_REQUIRED_VERSION=pango_required_version
ATK_REQUIRED_VERSION=atk_required_version
CAIRO_REQUIRED_VERSION=cairo_required_version
GDK_PIXBUF_REQUIRED_VERSION=gdk_pixbuf_required_version
INTROSPECTION_REQUIRED_VERSION=introspection_required_version
AC_SUBST(GLIB_REQUIRED_VERSION)
AC_SUBST(PANGO_REQUIRED_VERSION)
AC_SUBST(ATK_REQUIRED_VERSION)
AC_SUBST(CAIRO_REQUIRED_VERSION)
AC_SUBST(GDK_PIXBUF_REQUIRED_VERSION)
AC_SUBST(INTROSPECTION_REQUIRED_VERSION)
# Save this value here, since automake will set cflags later
cflags_set=${CFLAGS+set}
@@ -173,16 +170,12 @@ dnl
AC_CHECK_TOOLS(CXX, [$CCC c++ g++ gcc CC cxx cc++ cl], gcc)
AC_LANG_PUSH([C++])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]],
[[class a { int b; } c;]])],
[],[CXX=])
AC_TRY_COMPILE(,[class a { int b; } c;], ,CXX=)
AM_CONDITIONAL(HAVE_CXX, test "$CXX" != "")
gtk_save_cxxflags="$CXXFLAGS"
CXXFLAGS="$CXXFLAGS -x objective-c++"
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@interface Foo @end]],
[[]])],
[OBJC=yes],[OBJC=no])
AC_TRY_COMPILE([@interface Foo @end],,OBJC=yes,OBJC=no)
AM_CONDITIONAL(HAVE_OBJC, test "$OBJC" = "yes")
CXXFLAGS="$gtk_save_cxxflags"
AC_LANG_POP([C++])
@@ -240,61 +233,61 @@ m4_define([debug_default],
dnl declare --enable-* args and collect ac_help strings
AC_ARG_ENABLE(debug,
[AS_HELP_STRING([--enable-debug=@<:@no/minimum/yes@:>@],
[turn on debugging @<:@default=debug_default@:>@])],,
[enable_debug=debug_default])
AC_HELP_STRING([--enable-debug=@<:@no/minimum/yes@:>@],
[turn on debugging @<:@default=debug_default@:>@]),,
enable_debug=debug_default)
AC_ARG_ENABLE(rebuilds,
[AS_HELP_STRING([--disable-rebuilds],
[AC_HELP_STRING([--disable-rebuilds],
[disable all source autogeneration rules])],,
[enable_rebuilds=yes])
AC_ARG_ENABLE(gtk2-dependency,
[AS_HELP_STRING([--enable-gtk2-dependency],
[Do not build gtk-update-icon-cache and other shared tools])],,
AC_HELP_STRING([--enable-gtk2-dependency],
[Do not build gtk-update-icon-cache and other shared tools]),,
[enable_gtk2_dependency=no])
AM_CONDITIONAL(BUILD_ICON_CACHE, [test "x$enable_gtk2_dependency" = xno])
AC_ARG_ENABLE(xkb,
[AS_HELP_STRING([--enable-xkb],
[AC_HELP_STRING([--enable-xkb],
[support XKB extension [default=maybe]])],,
[enable_xkb="maybe"])
AC_ARG_ENABLE(xinerama,
[AS_HELP_STRING([--enable-xinerama],
[AC_HELP_STRING([--enable-xinerama],
[support Xinerama extension if available [default=maybe]])],,
[enable_xinerama="maybe"])
AC_ARG_ENABLE(xinput,
[AS_HELP_STRING([--enable-xinput],
[AC_HELP_STRING([--enable-xinput],
[support XInput extension if available [default=yes]])],,
[enable_xinput="maybe"])
AC_ARG_ENABLE(xrandr,
[AS_HELP_STRING([--enable-xrandr],
[AC_HELP_STRING([--enable-xrandr],
[support XRandR extension if available [default=maybe]])],,
[enable_xrandr="maybe"])
AC_ARG_ENABLE(xfixes,
[AS_HELP_STRING([--enable-xfixes],
[AC_HELP_STRING([--enable-xfixes],
[support XFixes extension if available [default=maybe]])],,
[enable_xfixes="maybe"])
AC_ARG_ENABLE(xcomposite,
[AS_HELP_STRING([--enable-xcomposite],
[AC_HELP_STRING([--enable-xcomposite],
[support X Composite extension if available [default=maybe]])],,
[enable_xcomposite="maybe"])
AC_ARG_ENABLE(xdamage,
[AS_HELP_STRING([--enable-xdamage],
[AC_HELP_STRING([--enable-xdamage],
[support X Damage extension if available [default=maybe]])],,
[enable_xdamage="maybe"])
AC_ARG_ENABLE(x11-backend,
[AS_HELP_STRING([--enable-x11-backend],
[AC_HELP_STRING([--enable-x11-backend],
[enable the X11 gdk backend])],
[backend_set=yes])
AC_ARG_ENABLE(win32-backend,
[AS_HELP_STRING([--enable-win32-backend],
[AC_HELP_STRING([--enable-win32-backend],
[enable the Win32 gdk backend])],
[backend_set=yes])
AC_ARG_ENABLE(quartz-backend,
[AS_HELP_STRING([--enable-quartz-backend],
[AC_HELP_STRING([--enable-quartz-backend],
[enable the quartz gdk backend])],
[backend_set=yes])
@@ -333,6 +326,7 @@ if test "x$enable_win32_backend" == xyes; then
GDK_BACKENDS="$GDK_BACKENDS win32"
backend_immodules="$backend_immodules,ime"
GDK_WINDOWING="$GDK_WINDOWING
#define GDK_NATIVE_WINDOW_POINTER
#define GDK_WINDOWING_WIN32"
GDK_EXTRA_LIBS="$GDK_EXTRA_LIBS -lgdi32 -limm32 -lshell32 -lole32 -Wl,-luuid"
AM_CONDITIONAL(USE_WIN32, true)
@@ -469,7 +463,7 @@ dnl * See whether to include shared library dependencies *
dnl ******************************************************
AC_ARG_ENABLE(explicit-deps,
[AS_HELP_STRING([--enable-explicit-deps=@<:@yes/no/auto@:>@],
[AC_HELP_STRING([--enable-explicit-deps=@<:@yes/no/auto@:>@],
[use explicit dependencies in .pc files [default=auto]])],,
[enable_explicit_deps=auto])
@@ -514,10 +508,10 @@ AC_CHECK_FUNCS(localtime_r)
# _NL_TIME_FIRST_WEEKDAY is an enum and not a define
AC_MSG_CHECKING([for _NL_TIME_FIRST_WEEKDAY])
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <langinfo.h>]],
[[char c;
c = *((unsigned char *) nl_langinfo(_NL_TIME_FIRST_WEEKDAY));]])],
[gtk_ok=yes], [gtk_ok=no])
AC_TRY_LINK([#include <langinfo.h>], [
char c;
c = *((unsigned char *) nl_langinfo(_NL_TIME_FIRST_WEEKDAY));
], gtk_ok=yes, gtk_ok=no)
AC_MSG_RESULT($gtk_ok)
if test "$gtk_ok" = "yes"; then
AC_DEFINE([HAVE__NL_TIME_FIRST_WEEKDAY], [1],
@@ -526,10 +520,10 @@ fi
# _NL_MEASUREMENT_MEASUREMENT is an enum and not a define
AC_MSG_CHECKING([for _NL_MEASUREMENT_MEASUREMENT])
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <langinfo.h>]],
[[char c;
c = *((unsigned char *) nl_langinfo(_NL_MEASUREMENT_MEASUREMENT));]])],
[gtk_ok=yes], [gtk_ok=no])
AC_TRY_LINK([#include <langinfo.h>], [
char c;
c = *((unsigned char *) nl_langinfo(_NL_MEASUREMENT_MEASUREMENT));
], gtk_ok=yes, gtk_ok=no)
AC_MSG_RESULT($gtk_ok)
if test "$gtk_ok" = "yes"; then
AC_DEFINE([HAVE__NL_MEASUREMENT_MEASUREMENT], [1],
@@ -538,10 +532,10 @@ fi
# _NL_PAPER_HEIGHT is an enum and not a define
AC_MSG_CHECKING([for _NL_PAPER_HEIGHT])
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <langinfo.h>]],
[[char c;
c = *((unsigned char *) nl_langinfo(_NL_PAPER_HEIGHT));]])],
[gtk_ok=yes], [gtk_ok=no])
AC_TRY_LINK([#include <langinfo.h>], [
char c;
c = *((unsigned char *) nl_langinfo(_NL_PAPER_HEIGHT));
], gtk_ok=yes, gtk_ok=no)
AC_MSG_RESULT($gtk_ok)
if test "$gtk_ok" = "yes"; then
AC_DEFINE([HAVE__NL_PAPER_HEIGHT], [1],
@@ -550,10 +544,10 @@ fi
# _NL_PAPER_WIDTH is an enum and not a define
AC_MSG_CHECKING([for _NL_PAPER_WIDTH])
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <langinfo.h>]],
[[char c;
c = *((unsigned char *) nl_langinfo(_NL_PAPER_WIDTH));]])],
[gtk_ok=yes], [gtk_ok=no])
AC_TRY_LINK([#include <langinfo.h>], [
char c;
c = *((unsigned char *) nl_langinfo(_NL_PAPER_WIDTH));
], gtk_ok=yes, gtk_ok=no)
AC_MSG_RESULT($gtk_ok)
if test "$gtk_ok" = "yes"; then
AC_DEFINE([HAVE__NL_PAPER_WIDTH], [1],
@@ -564,11 +558,9 @@ fi
ALL_LINGUAS="`grep -v '^#' "$srcdir/po/LINGUAS" | tr '\n' ' '`"
AM_GLIB_GNU_GETTEXT
LIBS="$LIBS $INTLLIBS"
AC_CONFIG_COMMANDS([po-properties],
[[case "$CONFIG_FILES" in *po-properties/Makefile.in*)
sed -e "/POTFILES =/r po-properties/POTFILES" po-properties/Makefile.in > po-properties/Makefile
esac]],
[[]])
AC_OUTPUT_COMMANDS([case "$CONFIG_FILES" in *po-properties/Makefile.in*)
sed -e "/POTFILES =/r po-properties/POTFILES" po-properties/Makefile.in > po-properties/Makefile
esac])
dnl Snippet below is copied from AM_GLIB_GNU_GETTEXT to generate a first
dnl po-properties/POTFILES during configure; see GNOME #573515.
@@ -598,20 +590,22 @@ AC_MSG_CHECKING([for extra flags to get ANSI library prototypes])
gtk_save_LIBS=$LIBS
LIBS="$LIBS -lm"
AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <math.h>
int main (void) { return (log(1) != log(1.)); }]])],
[AC_MSG_RESULT(none needed)],
[gtk_save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -std1"
AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <math.h>
int main (void) { return (log(1) != log(1.)); }]])],
[AC_MSG_RESULT(-std1)],
[AC_MSG_RESULT()
CFLAGS="$gtk_save_CFLAGS"
AC_MSG_WARN([No ANSI prototypes found in library. (-std1 did not work.)])],
[true])],
[AC_MSG_RESULT(none needed)])
AC_TRY_RUN([#include <math.h>
int main (void) { return (log(1) != log(1.)); }],
AC_MSG_RESULT(none needed),
gtk_save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -std1"
AC_TRY_RUN([#include <math.h>
int main (void) { return (log(1) != log(1.)); }],
AC_MSG_RESULT(-std1),
AC_MSG_RESULT()
CFLAGS="$gtk_save_CFLAGS"
AC_MSG_WARN(
[No ANSI prototypes found in library. (-std1 didn't work.)]),
true
),
AC_MSG_RESULT(none needed)
)
LIBS=$gtk_save_LIBS
AC_MSG_CHECKING(for the BeOS)
@@ -640,6 +634,18 @@ case $host_os in
;;
esac
dnl NeXTStep cc seems to need this
AC_MSG_CHECKING([for extra flags for POSIX compliance])
AC_TRY_COMPILE([#include <dirent.h>], [DIR *dir;],
AC_MSG_RESULT(none needed),
gtk_save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -posix"
AC_TRY_COMPILE([#include <dirent.h>], [DIR *dir;],
AC_MSG_RESULT(-posix),
AC_MSG_RESULT()
CFLAGS="$gtk_save_CFLAGS"
AC_MSG_WARN([Could not determine POSIX flag. (-posix didn't work.)])))
#
# Run AM_PATH_GLIB_2_0 to make sure that GLib is installed and working
#
@@ -684,11 +690,9 @@ AC_CHECK_HEADERS(ftw.h,
[Define to 1 if ftw.h is available]))
AC_MSG_CHECKING([for GNU ftw extensions])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#define _XOPEN_SOURCE 500
#define _GNU_SOURCE
#include <ftw.h>]],
[[int flags = FTW_ACTIONRETVAL;]])],
[gtk_ok=yes],[gtk_ok=no])
AC_TRY_COMPILE([#define _XOPEN_SOURCE 500
#define _GNU_SOURCE
#include <ftw.h>], [int flags = FTW_ACTIONRETVAL;], gtk_ok=yes, gtk_ok=no)
if test $gtk_ok = yes; then
AC_MSG_RESULT([yes])
AC_DEFINE(HAVE_GNU_FTW, 1, [Have GNU ftw])
@@ -700,17 +704,42 @@ saved_cflags="$CFLAGS"
saved_ldflags="$LDFLAGS"
# Checks for header files.
AC_HEADER_STDC
# Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
# Checks for library functions.
AC_TYPE_SIGNAL
AC_FUNC_MMAP
AC_CHECK_FUNCS(mallinfo)
AC_CHECK_FUNCS(getresuid)
AC_TYPE_UID_T
# Check if <sys/select.h> needs to be included for fd_set
AC_MSG_CHECKING([for fd_set])
AC_TRY_COMPILE([#include <sys/types.h>],
[fd_set readMask, writeMask;], gtk_ok=yes, gtk_ok=no)
if test $gtk_ok = yes; then
AC_MSG_RESULT([yes, found in sys/types.h])
else
AC_HEADER_EGREP(fd_mask, sys/select.h, gtk_ok=yes)
if test $gtk_ok = yes; then
AC_DEFINE(HAVE_SYS_SELECT_H, 1,
[Define to 1 if sys/select.h is available])
AC_MSG_RESULT([yes, found in sys/select.h])
else
AC_DEFINE(NO_FD_SET, 1,
[Define to 1 if fd_set is not available])
AC_MSG_RESULT(no)
fi
fi
# Check for uxtheme.h (for MS-Windows Engine)
AC_MSG_CHECKING(for uxtheme.h)
AC_PREPROC_IFELSE([AC_LANG_SOURCE([[#include <uxtheme.h>]])],
[gtk_uxtheme_h=yes], [gtk_uxtheme_h=no])
AC_TRY_CPP([#include <uxtheme.h>], gtk_uxtheme_h=yes, gtk_uxtheme_h=no)
if test $gtk_uxtheme_h = yes; then
AC_DEFINE(HAVE_UXTHEME_H, 1, [Have uxtheme.h include file])
fi
@@ -723,7 +752,7 @@ AC_CHECK_FUNCS(_NSGetEnviron)
AC_MSG_CHECKING(whether to build dynamic modules)
AC_ARG_ENABLE(modules,
[AS_HELP_STRING([--disable-modules],
[AC_HELP_STRING([--disable-modules],
[disable dynamic module loading])])
dynworks=false
@@ -772,9 +801,13 @@ AM_CONDITIONAL(BUILD_DYNAMIC_MODULES, $dynworks)
#
AC_MSG_CHECKING(immodules to build)
dnl due to an autoconf bug, commas in the first arg to
dnl AC_HELP_STRING cause problems.
dnl AC_HELP_STRING([--with-included-immodules=MODULE1 MODULE2 ...],
dnl [build the specified input method modules into gtk])
AC_ARG_WITH(included_immodules,
[AS_HELP_STRING([--with-included-immodules=MODULE1,MODULE2,...],
[build the specified input methods into gtk])])
AC_HELP_STRING([--with-included-immodules=MODULE1,MODULE2,...],
[build the specified input methods into gtk]))
if $dynworks; then
:
@@ -831,6 +864,10 @@ AM_CONDITIONAL(INCLUDE_IM_TI_ET, [test x"$INCLUDE_ti_et" = xyes])
AM_CONDITIONAL(INCLUDE_IM_VIQR, [test x"$INCLUDE_viqr" = xyes])
AM_CONDITIONAL(INCLUDE_IM_XIM, [test x"$INCLUDE_xim" = xyes])
AC_HEADER_SYS_WAIT
AC_TYPE_SIGNAL
# Checks to see whether we should include mediaLib
# support.
#
@@ -938,17 +975,17 @@ if test "x$enable_x11_backend" == xyes; then
# Check for xReply
AC_MSG_CHECKING([if <X11/extensions/XIproto.h> is needed for xReply])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <X11/Xlibint.h>]],
[[xReply *rep;]])],
[AC_MSG_RESULT([no])],
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <X11/extensions/XIproto.h>
#include <X11/Xlibint.h>]],
[[xReply *rep;]])],
[AC_MSG_RESULT([yes])
AC_DEFINE([NEED_XIPROTO_H_FOR_XREPLY], [1],
[Define if <X11/extensions/XIproto.h> needed for xReply])],
[AC_MSG_RESULT([unknown])
AC_MSG_ERROR([xReply type unavailable. X11 is too old])])])
AC_TRY_COMPILE([#include <X11/Xlibint.h>],
[xReply *rep;],
[AC_MSG_RESULT([no])],
[AC_TRY_COMPILE([#include <X11/extensions/XIproto.h>
#include <X11/Xlibint.h>],
[xReply *rep;],
[AC_MSG_RESULT([yes])
AC_DEFINE([NEED_XIPROTO_H_FOR_XREPLY], 1,
[Define if <X11/extensions/XIproto.h> needed for xReply])],
[AC_MSG_RESULT([unknown])
AC_MSG_ERROR([xReply type unavailable. X11 is too old])])])
# Check for XConvertCase, XInternAtoms (X11R6 specific)
@@ -1330,7 +1367,7 @@ LIBS="$old_LIBS"
PRINT_BACKENDS="file lpr"
AC_ARG_ENABLE(cups,
[AS_HELP_STRING([--disable-cups],
[AC_HELP_STRING([--disable-cups],
[disable cups print backend])],,
[enable_cups=auto])
@@ -1372,11 +1409,10 @@ else
gtk_save_cflags="$CFLAGS"
CFLAGS="$CUPS_CFLAGS"
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <cups/http.h>]],
[[http_t http; char *s = http.authstring;]])],
[AC_DEFINE([HAVE_HTTP_AUTHSTRING], [],
[Define if cups http_t authstring field is accessible])],
[])
AC_TRY_COMPILE([#include <cups/http.h>],
[http_t http; char *s = http.authstring;],
[AC_DEFINE(HAVE_HTTP_AUTHSTRING, [],
[Define if cups http_t authstring field is accessible])],)
CFLAGS="$gtk_save_cflags"
AC_SUBST(HAVE_HTTP_AUTHSTRING)
@@ -1392,9 +1428,9 @@ fi
#
AC_ARG_ENABLE(papi,
[AS_HELP_STRING([--disable-papi],
[AC_HELP_STRING([--disable-papi],
[disable papi print backend])],,
[enable_papi=auto])
[enable_papi=auto])
if test "x$enable_papi" = "xno"; then
AM_CONDITIONAL(HAVE_PAPI, false)
@@ -1436,7 +1472,7 @@ CPPFLAGS="$gtk_save_cppflags"
AC_ARG_ENABLE(test-print-backend,
[AS_HELP_STRING([--enable-test-print-backend],
[AC_HELP_STRING([--enable-test-print-backend],
[build test print backend])],,
[enable_test_print_backend=no])
if test "x$enable_test_print_backend" != "xno" ; then
@@ -1475,15 +1511,15 @@ GLIB_GSETTINGS
# GObject introspection
##################################################
GOBJECT_INTROSPECTION_CHECK(introspection_required_version)
GOBJECT_INTROSPECTION_CHECK([0.10.1])
##################################################
# Packagekit module
#################################################
AC_ARG_ENABLE(packagekit,
[AS_HELP_STRING([--disable-packagekit],
[build packagekit open-with module])])
AC_HELP_STRING([--disable-packagekit],
[build packagekit open-with module]))
build_packagekit=no
if test "os_win32" != "yes"; then
@@ -1505,10 +1541,9 @@ AC_CHECK_PROG(DB2HTML, db2html, true, false)
AM_CONDITIONAL(HAVE_DOCBOOK, $DB2HTML)
AC_ARG_ENABLE(man,
[AS_HELP_STRING([--enable-man],
[regenerate man pages from Docbook [default=no]])],
[enable_man=yes],
[enable_man=no])
[AC_HELP_STRING([--enable-man],
[regenerate man pages from Docbook [default=no]])],enable_man=yes,
enable_man=no)
if test "${enable_man}" != no; then
dnl
@@ -1581,17 +1616,16 @@ dnl Check for -Bsymbolic-functions linker flag used to avoid
dnl intra-library PLT jumps, if available.
dnl
AC_ARG_ENABLE(Bsymbolic,
[AS_HELP_STRING([--disable-Bsymbolic],
[AC_HELP_STRING([--disable-Bsymbolic],
[avoid linking with -Bsymbolic])],,
[SAVED_LDFLAGS="${LDFLAGS}"
AC_MSG_CHECKING([for -Bsymbolic-functions linker flag])
LDFLAGS=-Wl,-Bsymbolic-functions
AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],
[[int main (void) { return 0; }]])],
[AC_MSG_RESULT(yes)
enable_Bsymbolic=yes],
[AC_MSG_RESULT(no)
enable_Bsymbolic=no])
AC_TRY_LINK([], [int main (void) { return 0; }],
AC_MSG_RESULT(yes)
enable_Bsymbolic=yes,
AC_MSG_RESULT(no)
enable_Bsymbolic=no)
LDFLAGS="${SAVED_LDFLAGS}"])
if test "x${enable_Bsymbolic}" = "xyes" ; then
@@ -1640,6 +1674,7 @@ gtk/Makefile
gtk/makefile.msc
gtk/gtkversion.h
gtk/gtk-win32.rc
gtk/theme-bits/Makefile
gtk/tests/Makefile
modules/Makefile
modules/other/Makefile
@@ -1667,10 +1702,7 @@ AC_OUTPUT
included_immodules=${included_immodules//,/ }
included_immodules=${included_immodules:-none}
echo ""
echo " GTK+ $GTK_VERSION"
echo " ==========="
echo ""
echo "configuration:"
echo " GDK backends: $GDK_BACKENDS"
if test "x$enable_x11_backend" = "xyes"; then
echo " X11 extensions: $X_EXTENSIONS"
+3 -3
View File
@@ -12,11 +12,11 @@ INCLUDES = \
$(GTK_DEP_CFLAGS)
DEPS = \
$(top_builddir)/gtk/libgtk-3.la
$(top_builddir)/gtk/libgtk-3.0.la
LDADDS = \
$(top_builddir)/gtk/libgtk-3.la \
$(top_builddir)/gdk/libgdk-3.la \
$(top_builddir)/gtk/libgtk-3.0.la \
$(top_builddir)/gdk/libgdk-3.0.la \
$(GTK_DEP_LIBS) \
$(MATH_LIB)
+3 -3
View File
@@ -55,11 +55,11 @@ INCLUDES = \
$(GTK_DEP_CFLAGS)
DEPS = \
$(top_builddir)/gtk/libgtk-3.la
$(top_builddir)/gtk/libgtk-3.0.la
LDADDS = \
$(top_builddir)/gtk/libgtk-3.la \
$(top_builddir)/gdk/libgdk-3.la \
$(top_builddir)/gtk/libgtk-3.0.la \
$(top_builddir)/gdk/libgdk-3.0.la \
$(GTK_DEP_LIBS) \
-lm
+5 -5
View File
@@ -48,27 +48,27 @@ add_items (void)
g_return_if_fail (articles != NULL);
foo.number = 3;
foo.product = "bottles of coke";
foo.product = g_strdup ("bottles of coke");
foo.yummy = 20;
g_array_append_vals (articles, &foo, 1);
foo.number = 5;
foo.product = "packages of noodles";
foo.product = g_strdup ("packages of noodles");
foo.yummy = 50;
g_array_append_vals (articles, &foo, 1);
foo.number = 2;
foo.product = "packages of chocolate chip cookies";
foo.product = g_strdup ("packages of chocolate chip cookies");
foo.yummy = 90;
g_array_append_vals (articles, &foo, 1);
foo.number = 1;
foo.product = "can vanilla ice cream";
foo.product = g_strdup ("can vanilla ice cream");
foo.yummy = 60;
g_array_append_vals (articles, &foo, 1);
foo.number = 6;
foo.product = "eggs";
foo.product = g_strdup ("eggs");
foo.yummy = 10;
g_array_append_vals (articles, &foo, 1);
}
-1
View File
@@ -105,7 +105,6 @@ fill_store (GtkListStore *store)
name = g_dir_read_name (dir);
}
g_dir_close (dir);
}
static gint
+1 -1
View File
@@ -432,7 +432,7 @@ do_images (GtkWidget *do_widget)
gtk_container_add (GTK_CONTAINER (align), frame);
gtk_box_pack_start (GTK_BOX (vbox), align, FALSE, FALSE, 0);
gicon = g_themed_icon_new_with_default_fallbacks ("battery-caution-charging-symbolic");
gicon = g_themed_icon_new_with_default_fallbacks ("battery-critical-charging-symbolic");
image = gtk_image_new_from_gicon (gicon, GTK_ICON_SIZE_DIALOG);
gtk_container_add (GTK_CONTAINER (frame), image);
+36 -6
View File
@@ -74,17 +74,47 @@ change_orientation (GtkWidget *button,
GtkWidget *menubar)
{
GtkWidget *parent;
GtkOrientation orientation;
GtkWidget *box = NULL;
parent = gtk_widget_get_parent (menubar);
orientation = gtk_orientable_get_orientation (GTK_ORIENTABLE (parent));
gtk_orientable_set_orientation (GTK_ORIENTABLE (parent), 1 - orientation);
if (orientation == GTK_ORIENTATION_VERTICAL)
g_object_set (menubar, "pack-direction", GTK_PACK_DIRECTION_TTB, NULL);
if (GTK_IS_VBOX (parent))
{
box = gtk_widget_get_parent (parent);
g_object_ref (menubar);
gtk_container_remove (GTK_CONTAINER (parent), menubar);
gtk_container_add (GTK_CONTAINER (box), menubar);
gtk_box_reorder_child (GTK_BOX (box), menubar, 0);
g_object_unref (menubar);
g_object_set (menubar,
"pack-direction", GTK_PACK_DIRECTION_TTB,
NULL);
}
else
g_object_set (menubar, "pack-direction", GTK_PACK_DIRECTION_LTR, NULL);
{
GList *children, *l;
children = gtk_container_get_children (GTK_CONTAINER (parent));
for (l = children; l; l = l->next)
{
if (GTK_IS_VBOX (l->data))
{
box = l->data;
break;
}
}
g_list_free (children);
g_object_ref (menubar);
gtk_container_remove (GTK_CONTAINER (parent), menubar);
gtk_container_add (GTK_CONTAINER (box), menubar);
gtk_box_reorder_child (GTK_BOX (box), menubar, 0);
g_object_unref (menubar);
g_object_set (menubar,
"pack-direction", GTK_PACK_DIRECTION_LTR,
NULL);
}
}
static GtkWidget *window = NULL;
+3 -2
View File
@@ -44,14 +44,15 @@ INCLUDES = \
$(GTK_DEBUG_FLAGS) \
$(GDK_DEP_CFLAGS)
GTKDOC_LIBS = $(top_builddir)/gdk/libgdk-3.la $(GDK_DEP_LIBS)
GTKDOC_LIBS = $(top_builddir)/gdk/libgdk-3.0.la $(GDK_DEP_LIBS)
# Extra options to supply to gtkdoc-mkdb
MKDB_OPTIONS=--sgml-mode --output-format=xml --name-space=gdk
# Extra SGML files that are included by DOC_MAIN_SGML_FILE
content_files = \
version.xml
version.xml \
multihead.sgml
# Images to copy into HTML directory
HTML_IMAGES = \
+8 -9
View File
@@ -6,24 +6,23 @@
]>
<book id="index" xmlns:xi="http://www.w3.org/2003/XInclude">
<bookinfo>
<title>GDK 3 Reference Manual</title>
<title>GDK Reference Manual</title>
<releaseinfo>
This document is for the GDK 3 library, version &version;
The latest versions can be found online at
<ulink role="online-location" url="http://library.gnome.org/devel/gdk3/">http://library.gnome.org/devel/gdk3/</ulink>.
If you are looking for the older GDK 2 series of libraries,
see <ulink role="online-location" url="http://library.gnome.org/devel/gdk/">http://library.gnome.org/devel/gdk/</ulink>.
for GDK &version;
The latest version of this documentation can be found on-line at
<ulink role="online-location" url="http://library.gnome.org/devel/gdk/unstable/">http://library.gnome.org/devel/gdk/unstable/</ulink>.
</releaseinfo>
</bookinfo>
<reference id="reference">
<title>API Reference</title>
<xi:include href="xml/general.xml" />
<xi:include href="xml/gdkdisplaymanager.xml" />
<xi:include href="multihead.sgml" />
<xi:include href="xml/gdkdisplay.xml" />
<xi:include href="xml/gdkscreen.xml" />
<xi:include href="xml/gdkdevicemanager.xml" />
<xi:include href="xml/gdkdisplaymanager.xml" />
<xi:include href="xml/gdkdevice.xml" />
<xi:include href="xml/gdkdevicemanager.xml" />
<xi:include href="xml/gdkscreen.xml" />
<xi:include href="xml/regions.xml" />
<xi:include href="xml/pixbufs.xml" />
<xi:include href="xml/colors.xml" />
+11 -3
View File
@@ -120,6 +120,7 @@ gdk_display_get_event
gdk_display_peek_event
gdk_display_put_event
gdk_display_has_pending
gdk_display_add_client_message_filter
gdk_display_set_double_click_time
gdk_display_set_double_click_distance
gdk_display_get_pointer
@@ -203,6 +204,7 @@ gdk_screen_get_monitor_at_window
gdk_screen_get_monitor_height_mm
gdk_screen_get_monitor_width_mm
gdk_screen_get_monitor_plug_name
gdk_screen_broadcast_client_message
gdk_screen_get_setting
gdk_screen_get_font_options
gdk_screen_set_font_options
@@ -775,6 +777,12 @@ gdk_events_get_distance
gdk_event_handler_set
GdkEventFunc
<SUBSECTION>
gdk_event_send_client_message
gdk_event_send_client_message_for_display
gdk_event_send_clientmessage_toall
gdk_add_client_message_filter
<SUBSECTION>
gdk_get_show_events
gdk_set_show_events
@@ -811,8 +819,10 @@ GdkEventFocus
GdkEventConfigure
GdkEventProperty
GdkEventSelection
GdkNativeWindow
GdkEventDND
GdkEventProximity
GdkEventClient
GdkEventWindowState
GdkEventSetting
GdkEventOwnerChange
@@ -881,11 +891,11 @@ gdk_drag_begin
gdk_drag_begin_for_device
gdk_drag_motion
gdk_drop_finish
gdk_drag_get_protocol_for_display
GdkDragProtocol
GdkDragAction
gdk_drag_status
gdk_drag_drop_succeeded
gdk_window_get_drag_protocol
gdk_drag_context_get_actions
gdk_drag_context_get_suggested_action
@@ -924,8 +934,6 @@ GDK_SCREEN_XNUMBER
GDK_SCREEN_XSCREEN
GDK_CURSOR_XCURSOR
GDK_CURSOR_XDISPLAY
GDK_POINTER_TO_XID
GDK_XID_TO_POINTER
gdk_x11_lookup_xdisplay
gdk_x11_get_server_time
gdk_x11_display_get_user_time
+128
View File
@@ -0,0 +1,128 @@
<?xml version="1.0"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
"http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
]>
<refentry id="multihead" revision="1 May 2002">
<refmeta>
<refentrytitle>Multi-head Support Overview</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>GDK Library</refmiscinfo>
</refmeta>
<refnamediv>
<refname>Multi-head Support Overview</refname>
<refpurpose>Overview of GdkDisplay and GdkScreen</refpurpose>
</refnamediv>
<refsect1>
<title>Overview</title>
<para>
Multihead support is based around two main object types:
<itemizedlist>
<listitem><para>GdkDisplay</para></listitem>
<listitem><para>GdkScreen</para></listitem>
</itemizedlist>
</para>
<para>
<link linkend="gdk-GdkDisplay">GdkDisplay</link> objects are the GDK
representation of the X Display which can be described as <emphasis>a
workstation consisting of a keyboard a pointing device (such as a
mouse) and one or more screens</emphasis>.
It is used to open and keep track of various <link
linkend="gdk-GdkScreen">GdkScreen</link> objects currently
instanciated by the application. It is also used to grab and release
the keyboard and the mouse pointer.
</para>
<para>
<link linkend="gdk-GdkScreen">GdkScreen</link> objects are the GDK
representation of a physical screen. It is used throughout GDK and GTK+
to specify which screen the top level windows are to be displayed on.
It is also used to query the screen specification and default settings such as
the default colormap (<link linkend="gdk-screen-get-default-colormap">gdk_screen_get_default_colormap</link>()),
the screen width (<link linkend="gdk-screen-get-width">gdk_screen_get_width</link>()), etc.
</para>
<para>
The following code samples demonstrate common usage of the objects described above.
</para>
<example>
<title>Testing the number of screen on the current display</title>
<programlisting><!--
-->gint num_screen = 0;
gchar *displayname = NULL;
GdkScreen **screen_list;
GdkDisplay *display;
gtk_init (&amp;argc, &amp;argv);
display = gdk_display_get_default ();
num_screen = gdk_display_get_n_screens (display);
displayname = gdk_display_get_name (display);
if (num_screen &lt;= 1)
{
printf ("This Xserver (%s) manages only one screen. exiting...\n",
displayname);
exit (1);
}
else
{
printf ("This Xserver (%s) manages %d screens.\n", displayname,
num_screen);
}<!--
--> </programlisting>
</example>
<example>
<title>Opening a second display</title>
<programlisting><!--
-->gchar *second_screen_name;
GdkDisplay *second_display;
GdkScreen *second_screen;
GtkWidget *window;
gtk_init (&amp;argc, &amp;argv);
/* screen2_name needs to be initialized before calling
/* gdk_display_new() */
second_display = gdk_display_new (&amp;argc, &amp;argv, second_screen_name);
if (second_display)
second_screen = gdk_display_get_default_screen (second_display);
else
{
g_print ("Can't open display :\n\t%s\n\n",
second_screen_name);
exit (1);
}
/* now GdkScreen can be assigned to GtkWindows */
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_window_set_screen (window, second_screen);<!--
--></programlisting>
</example>
</refsect1>
<refsect1>
<title>See Also</title>
<para>
<variablelist>
<varlistentry>
<term><link linkend="GdkDisplay">GdkDisplay</link></term>
<listitem><para>the GDK Object used to represent and manipulate display
related data</para></listitem>
</varlistentry>
<varlistentry>
<term><link linkend="GdkScreen">GdkScreen</link></term>
<listitem><para>the GDK Object used to represent and query screen related
data</para></listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
</refentry>
<!--
Local variables:
mode: sgml
sgml-parent-document: ("gdk-docs.sgml" "book" "refentry" "")
End:
-->
+1 -1
View File
@@ -106,7 +106,7 @@ CPPFLAGS += \
-UGTK_DISABLE_SINGLE_INCLUDES
GTKDOC_LIBS = \
$(top_builddir)/gtk/libgtk-3.la \
$(top_builddir)/gtk/libgtk-3.0.la \
$(GTK_DEP_LIBS)
+4 -17
View File
@@ -172,7 +172,7 @@ How to compile GTK+ itself
such as high level data types, Unicode manipulation, and
an object and type system to C programs. It is available
from the <ulink url="ftp://ftp.gtk.org/pub/glib/">GTK+
FTP site</ulink>.
FTP site.</ulink>
</para>
</listitem>
<listitem>
@@ -180,7 +180,7 @@ How to compile GTK+ itself
<ulink url="http://www.pango.org">Pango</ulink> is a library
for internationalized text handling. It is available from
the <ulink url="ftp://ftp.gtk.org/pub/pango/">GTK+ FTP
site</ulink>.
site.</ulink>.
</para>
</listitem>
<listitem>
@@ -189,7 +189,7 @@ How to compile GTK+ itself
interfaces allowing accessibility technologies such as
screen readers to interact with a graphical user interface.
It is available from the <ulink
url="ftp://ftp.gtk.org/pub/atk/">GTK+ FTP site</ulink>.
url="ftp://ftp.gtk.org/pub/atk/">GTK+ FTP site.</ulink>
</para>
</listitem>
<listitem>
@@ -309,60 +309,49 @@ How to compile GTK+ itself
<cmdsynopsis>
<command>configure</command>
<sbr/>
<group>
<arg>--disable-modules</arg>
<arg>--enable-modules</arg>
</group>
<sbr/>
<group>
<arg>--with-included-immodules=MODULE1,MODULE2,...</arg>
</group>
<sbr/>
<group>
<arg>--enable-debug=[no/minimum/yes]</arg>
</group>
<sbr/>
<group>
<arg>--disable-Bsymbolic</arg>
<arg>--enable-Bsymbolic</arg>
</group>
<sbr/>
<group>
<arg>--disable-xkb</arg>
<arg>--enable-xkb</arg>
</group>
<sbr/>
<group>
<arg>--disable-xinerama</arg>
<arg>--enable-xinerama</arg>
</group>
<sbr/>
<group>
<arg>--disable-gtk-doc</arg>
<arg>--enable-gtk-doc</arg>
</group>
<sbr/>
<group>
<arg>--disable-cups</arg>
<arg>--enable-cups</arg>
</group>
<sbr/>
<group>
<arg>--disable-papi</arg>
<arg>--enable-papi</arg>
</group>
<sbr/>
<group>
<arg>--enable-xinput</arg>
<arg>--disable-xinput</arg>
</group>
<sbr/>
<group>
<arg>--enable-packagekit</arg>
<arg>--disable-packagekit</arg>
</group>
<sbr/>
<group>
<arg>--enable-x11-backend</arg>
<arg>--disable-x11-backend</arg>
@@ -371,11 +360,9 @@ How to compile GTK+ itself
<arg>--enable-quartz-backend</arg>
<arg>--disable-quartz-backend</arg>
</group>
<sbr/>
<group>
<arg>--enable-introspection=[no/auto/yes]</arg>
</group>
<sbr/>
<group>
<arg>--enable-gtk2-dependency</arg>
<arg>--disable-gtk2-dependency</arg>
+1 -30
View File
@@ -32,7 +32,7 @@ your system may be different):
$ pkg-config --cflags gtk+-3.0
-pthread -I/usr/include/gtk-3.0 -I/usr/lib64/gtk-3.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12
$ pkg-config --libs gtk+-3.0
-pthread -lgtk-3 -lgdk-3 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lgdk_pixbuf-2.0 -lpangocairo-1.0 -lcairo -lpango-1.0 -lfreetype -lfontconfig -lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 -lrt -lglib-2.0
-pthread -lgtk-3.0 -lgdk-3.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lgdk_pixbuf-3.0 -lpangocairo-1.0 -lcairo -lpango-1.0 -lfreetype -lfontconfig -lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 -lrt -lglib-2.0
</programlisting>
</para>
<para>
@@ -69,34 +69,5 @@ define the preprocessor symbol GDK_MULTIDEVICE_SAFE by using the command
line option <literal>-DGTK_MULTIDEVICE_SAFE=1</literal>.
</para>
<refsect2>
<title>Useful autotools macros</title>
<para>
GTK+ provides various macros for easily checking version and backends
supported. The macros are
<variablelist>
<varlistentry>
<term>AM_PATH_GTK_3_0([minimum-version], [if-found], [if-not-found], [modules])</term>
<listitem>This macro should be used to check that GTK+ is installed
and available for compilation. The four arguments are optional, and
they are: <emphasis>minimum-version</emphasis>, the minimum version
of GTK+ required for compilation; <emphasis>if-found</emphasis>, the
action to perform if a valid version of GTK+ has been found;
<emphasis>if-not-found</emphasis>, the action to perform if a valid
version of GTK+ has not been found; <emphasis>modules</emphasis>, a
list of modules to be checked along with GTK+.</listitem>
</varlistentry>
<varlistentry>
<term>GTK_CHECK_BACKEND([backend-name], [minimum-version], [if-found], [if-not-found])</term>
<listitem>This macro should be used to check if a specific backend
is supported by GTK+. The <emphasis>minimum-version</emphasis>,
<emphasis>if-found</emphasis> and <emphasis>if-not-found</emphasis>
arguments are optional.</listitem>
</varlistentry>
</variablelist>
</para>
</refsect2>
</refsect1>
</refentry>
+2 -2
View File
@@ -186,9 +186,9 @@
</simplesect>
<simplesect>
<title>Building interfaces</title>
<title>Building UIs</title>
<para>When construcing a more complicated user interface, with dozens
<para>When construcing a more complicated interface, with dozens
or hundreds of widgets, doing all the setup work in C code is
cumbersome, and making changes becomes next to impossible.</para>
+4 -6
View File
@@ -8,13 +8,11 @@
]>
<book id="index" xmlns:xi="http://www.w3.org/2003/XInclude">
<bookinfo>
<title>GTK+ 3 Reference Manual</title>
<title>GTK+ Reference Manual</title>
<releaseinfo>
This document is for the GTK+ 3 library, version &version;.
The latest versions can be found online at
<ulink role="online-location" url="http://library.gnome.org/devel/gtk3/">http://library.gnome.org/devel/gtk3/</ulink>.
If you are looking for the older GTK+ 2 series of libraries,
see <ulink role="online-location" url="http://library.gnome.org/devel/gtk/">http://library.gnome.org/devel/gtk/</ulink>.
for GTK+ &version;
The latest version of this documentation can be found on-line at
<ulink role="online-location" url="http://library.gnome.org/devel/gtk/unstable/">http://library.gnome.org/devel/gtk/unstable/</ulink>.
</releaseinfo>
</bookinfo>
@@ -5,14 +5,13 @@
<refentry id="gtk-query-immodules-3.0">
<refmeta>
<refentrytitle>gtk-query-immodules-3.0</refentrytitle>
<manvolnum>1</manvolnum>
<refmiscinfo class="manual">User Commands</refmiscinfo>
<refentrytitle>gtk-query-immodules-3.0</refentrytitle>
<manvolnum>1</manvolnum>
</refmeta>
<refnamediv>
<refname>gtk-query-immodules-3.0</refname>
<refpurpose>Input method module registration utility</refpurpose>
<refname>gtk-query-immodules-3.0</refname>
<refpurpose>Input method module registration utility</refpurpose>
</refnamediv>
<refsynopsisdiv>
@@ -39,8 +38,8 @@ may be absolute or relative paths.
</para>
<para>
Normally, the output of <command>gtk-query-immodules-3.0</command> is written
to <filename><replaceable>libdir</replaceable>/gtk-3.0/3.0.0/immodules.cache</filename>, where GTK+ looks for it by default. If it is written to some other
location, the environment variable <link linkend="gtk-im-module-file"><envar>GTK_IM_MODULE_FILE</envar></link>
to <filename><replaceable>libdir</replaceable>gtk-3.0/3.0.0/immodules.cache</filename>, where GTK+ looks for it by default. If it is written to some other
location, the environment variable <link linkend="GTK_IM_MODULE_FILE"><envar>GTK_IM_MODULE_FILE</envar></link>
can be set to point GTK+ at the file.
</para>
</refsect1>
@@ -57,7 +56,7 @@ can be set to point GTK+ at the file.
<refsect1><title>Environment</title>
<para>
The environment variable <link linkend="gtk-path"><envar>GTK_PATH</envar></link>
The environment variable <link linkend="GTK_PATH"><envar>GTK_PATH</envar></link>
can be used to prepend directories to the input method module path.
</para>
</refsect1>
+15 -17
View File
@@ -5,14 +5,13 @@
<refentry id="gtk-update-icon-cache">
<refmeta>
<refentrytitle>gtk-update-icon-cache</refentrytitle>
<manvolnum>1</manvolnum>
<refmiscinfo class="manual">User Commands</refmiscinfo>
<refentrytitle>gtk-update-icon-cache</refentrytitle>
<manvolnum>1</manvolnum>
</refmeta>
<refnamediv>
<refname>gtk-update-icon-cache</refname>
<refpurpose>Icon theme caching utility</refpurpose>
<refname>gtk-update-icon-cache</refname>
<refpurpose>Icon theme caching utility</refpurpose>
</refnamediv>
<refsynopsisdiv>
@@ -21,29 +20,28 @@
<arg choice="opt">--force</arg>
<arg choice="opt">--ignore-theme-index</arg>
<arg choice="opt">--index-only</arg>
<arg choice="opt">--source <arg choice="plain"><replaceable>NAME</replaceable></arg></arg>
<arg choice="opt">--source<arg>name</arg></arg>
<arg choice="opt">--quiet</arg>
<arg choice="opt">--validate</arg>
<arg choice="plain"><replaceable>PATH</replaceable></arg>
<arg choice="req">iconpath</arg>
</cmdsynopsis>
</refsynopsisdiv>
<refsect1><title>Description</title>
<para>
<command>gtk-update-icon-cache</command> creates mmapable cache
<command>gtk-update-icon-cache</command> creates mmap()able cache
files for icon themes.
</para>
<para>
It expects to be given the <replaceable>PATH</replaceable> to a icon theme
directory containing an <filename>index.theme</filename>, e.g.
<filename>/usr/share/icons/hicolor</filename>, and writes a
<filename>icon-theme.cache</filename> containing cached information about
the icons in the directory tree below the given directory.
It expects to be given the path to a icon theme directory containing an
<filename>index.theme</filename>, e.g. <filename>/usr/share/icons/hicolor</filename>,
and writes a <filename>icon-theme.cache</filename> containing cached
information about the icons in the directory tree below the given directory.
</para>
<para>
GTK+ can use the cache files created by <command>gtk-update-icon-cache</command>
to avoid a lot of system call and disk seek overhead when the application
starts. Since the format of the cache files allows them to be mmaped
starts. Since the format of the cache files allows them to be mmap()ed
shared between multiple applications, the overall memory consumption is
reduced as well.
</para>
@@ -61,8 +59,8 @@
<varlistentry>
<term>--ignore-theme-index</term>
<term>-t</term>
<listitem><para>Don't check for the existence of <filename>index.theme</filename>
in the icon theme directory. Without this option, <command>gtk-update-icon-cache</command>
<listitem><para>Don't check for the existence of 'index.theme' in the icon
theme directory. Without this option, <command>gtk-update-icon-cache</command>
refuses to create an icon cache in a directory which does not appear to
be the toplevel directory of an icon theme.
</para></listitem>
@@ -79,7 +77,7 @@
<term>--source</term>
<term>-c</term>
<listitem><para>Output a C header file declaring a constant
<replaceable>NAME</replaceable> with the contents of the icon
<replaceable>name</replaceable> with the contents of the icon
cache.</para></listitem>
</varlistentry>
+2 -9
View File
@@ -2058,8 +2058,6 @@ gtk_menu_item_deselect
gtk_menu_item_activate
gtk_menu_item_toggle_size_request
gtk_menu_item_toggle_size_allocate
gtk_menu_item_get_reserve_indicator
gtk_menu_item_set_reserve_indicator
<SUBSECTION Standard>
GTK_MENU_ITEM
GTK_IS_MENU_ITEM
@@ -4204,7 +4202,6 @@ gtk_tree_view_column_set_clickable
gtk_tree_view_column_get_clickable
gtk_tree_view_column_set_widget
gtk_tree_view_column_get_widget
gtk_tree_view_column_get_button
gtk_tree_view_column_set_alignment
gtk_tree_view_column_get_alignment
gtk_tree_view_column_set_reorderable
@@ -4289,7 +4286,6 @@ gtk_tree_view_row_expanded
gtk_tree_view_set_reorderable
gtk_tree_view_get_reorderable
gtk_tree_view_get_path_at_pos
gtk_tree_view_is_blank_at_pos
gtk_tree_view_get_cell_area
gtk_tree_view_get_background_area
gtk_tree_view_get_visible_rect
@@ -4430,6 +4426,8 @@ gtk_cell_area_foreach
gtk_cell_area_foreach_alloc
gtk_cell_area_event
gtk_cell_area_render
gtk_cell_area_set_style_detail
gtk_cell_area_get_style_detail
gtk_cell_area_get_cell_allocation
gtk_cell_area_get_cell_at_position
gtk_cell_area_create_context
@@ -4559,7 +4557,6 @@ gtk_cell_renderer_get_alignment
gtk_cell_renderer_set_alignment
gtk_cell_renderer_get_padding
gtk_cell_renderer_set_padding
gtk_cell_renderer_get_state
gtk_cell_renderer_is_activatable
<SUBSECTION Width-for-height>
@@ -5534,9 +5531,7 @@ GTK_STYLE_CLASS_MENUITEM
GTK_STYLE_CLASS_PROGRESSBAR
GTK_STYLE_CLASS_SPINNER
GTK_STYLE_CLASS_TOOLBAR
GTK_STYLE_CLASS_PRIMARY_TOOLBAR
GTK_STYLE_CLASS_PANE_SEPARATOR
GTK_STYLE_CLASS_SEPARATOR
GTK_STYLE_CLASS_DND
GTK_STYLE_CLASS_ERROR
GTK_STYLE_CLASS_EXPANDER
@@ -5755,7 +5750,6 @@ gtk_style_new
gtk_style_copy
gtk_style_attach
gtk_style_detach
gtk_style_get_context
gtk_style_set_background
gtk_style_apply_default_background
gtk_style_lookup_color
@@ -6016,7 +6010,6 @@ gtk_bindings_activate
gtk_bindings_activate_event
gtk_binding_set_activate
gtk_binding_entry_add_signal
gtk_binding_entry_add_signal_from_string
gtk_binding_entry_skip
gtk_binding_entry_remove
gtk_binding_set_add_path
+1 -1
View File
@@ -1,4 +1,4 @@
#include <gtk/gtkx.h>
#include <gtk/gtk.h>
#include <gtk/gtkunixprint.h>
gtk_about_dialog_get_type
+59 -183
View File
@@ -144,8 +144,8 @@
GAppLaunchContext *context;
GError *error = NULL;
info = (GAppInfo*) g_desktop_app_info_new ("epiphany.desktop");
context = (GAppLaunchContext*) gdk_display_get_app_launch_context (display);
info = g_desktop_app_info_new ("epiphany.desktop");
context = gdk_display_get_app_launch_context (display);
g_app_info_launch (info, NULL, context, &amp;error);
if (error)
@@ -157,10 +157,6 @@
g_object_unref (info);
g_object_unref (context);
</programlisting></informalexample>
Remember that you have to include
<filename>gio/gdesktopappinfo.h</filename>
and use the <filename>gio-unix-2.0</filename> pkg-config file
when using g_desktop_app_info_new().
</listitem>
<listitem>If you are launching a custom commandline, you can
still use g_app_info_launch() with a GAppInfo that is constructed
@@ -199,7 +195,7 @@
<title>Drawing a GdkPixbuf onto a GdkWindow</title>
<para>
Drawing a pixbuf onto a drawable used to be done like this:
<informalexample><programlisting>
<programlisting><![CDATA[
gdk_draw_pixbuf (window,
gtk_widget_get_style (widget)->black_gc,
pixbuf,
@@ -209,17 +205,16 @@ gdk_draw_pixbuf (window,
gdk_pixbuf_get_height (pixbuf),
GDK_RGB_DITHER_NORMAL,
0, 0);
</programlisting></informalexample>
]]></programlisting>
Doing the same thing with cairo:
<informalexample><programlisting>
<programlisting><![CDATA[
cairo_t *cr = gdk_cairo_create (window);
gdk_cairo_set_source_pixbuf (cr, pixbuf, x, y);
cairo_paint (cr);
cairo_destroy (cr);
</programlisting></informalexample>
Note that very similar code can be used when porting code
using GdkPixmap to #cairo_surface_t by calling
cairo_set_source_surface() instead of
]]></programlisting>
Note that very similar code can be used for drawing pixmaps
by using gdk_cairo_set_source_pixmap() instead of
gdk_cairo_set_source_pixbuf().
</para>
</example>
@@ -228,7 +223,7 @@ cairo_destroy (cr);
<para>
Tiled pixmaps are often used for drawing backgrounds.
Old code looked something like this:
<informalexample><programlisting>
<programlisting><![CDATA[
GdkGCValues gc_values;
GdkGC *gc;
@@ -238,30 +233,26 @@ gdk_gc_set_tile (gc, pixmap);
gdk_gc_set_fill (gc, GDK_TILED);
gdk_gc_set_ts_origin (gc, x_origin, y_origin);
/* use */
gdk_draw_rectangle (window, gc, TRUE, 0, 0, width, height);
gdk_draw_rectangle (drawable, gc, TRUE, 0, 0, width, height);
/* restore */
gdk_gc_set_tile (gc, NULL);
gdk_gc_set_fill (gc, GDK_SOLID);
gdk_gc_set_ts_origin (gc, 0, 0);
</programlisting></informalexample>
The equivalent cairo code to draw a tiled surface looks
like this:
<informalexample><programlisting>
]]></programlisting>
The equivalent cairo code looks like this:
<programlisting><![CDATA[
cairo_t *cr;
cairo_surface_t *surface;
surface = ...
cr = gdk_cairo_create (window);
cairo_set_source_surface (cr, surface, x_origin, y_origin);
cr = gdk_cairo_create (drawable);
gdk_cairo_set_source_pixmap (cr, pixmap, x_origin, y_origin);
cairo_pattern_set_extend (cairo_get_source (cr), CAIRO_EXTEND_REPEAT);
cairo_rectangle (cr, 0, 0, width, height);
cairo_fill (cr);
cairo_destroy (cr);
</programlisting></informalexample>
The surface here can be either an image surface or a X surface,
and can either be created on the spot or kept around for caching purposes.
Another alternative is to use pixbufs instead of surfaces with
gdk_cairo_set_source_pixbuf() instead of cairo_set_source_surface().
]]></programlisting>
Again, you can exchange pixbufs and pixmaps by using
gdk_cairo_set_source_pixbuf() instead of
gdk_cairo_set_source_pixmap().
</para>
</example>
<example>
@@ -269,38 +260,32 @@ gdk_cairo_set_source_pixbuf() instead of cairo_set_source_surface().
<para>
Drawing layouts clipped is often used to avoid overdraw or to
allow drawing selections. Code would have looked like this:
<informalexample><programlisting>
<programlisting><![CDATA[
GdkGC *gc;
/* setup */
gc = gtk_widget_get_style (widget)->text_gc[state];
gdk_gc_set_clip_rectangle (gc, &amp;area);
gdk_gc_set_clip_rectangle (gc, &area);
/* use */
gdk_draw_layout (drawable, gc, x, y, layout);
/* restore */
gdk_gc_set_clip_rectangle (gc, NULL);
</programlisting></informalexample>
]]></programlisting>
With cairo, the same effect can be achieved using:
<informalexample><programlisting>
GtkStyleContext *context;
GtkStateFlags flags;
GdkRGBA rgba;
<programlisting><![CDATA[
cairo_t *cr;
cr = gdk_cairo_create (drawable);
/* clip */
gdk_cairo_rectangle (cr, &amp;area);
gdk_cairo_rectangle (cr, &area);
cairo_clip (cr);
/* set the correct source color */
context = gtk_widget_get_style_context (widget));
state = gtk_widget_get_state_flags (widget);
gtk_style_context_get_color (context, state, &amp;rgba);
gdk_cairo_set_source_rgba (cr, &amp;rgba);
gdk_cairo_set_source_color (cr, &gtk_widget_get_style (widget)->text[state]);
/* draw the text */
cairo_move_to (cr, x, y);
pango_cairo_show_layout (cr, layout);
cairo_destroy (cr);
</programlisting></informalexample>
]]></programlisting>
Clipping using cairo_clip() is of course not restricted to text
rendering and can be used everywhere where GC clips were used.
And using gdk_cairo_set_source_color() with style colors should
@@ -316,7 +301,7 @@ cairo_destroy (cr);
It was often used to achieve a checkerboard effect. You can use
cairo_mask() to achieve this effect. To get a checkerbox mask,
you can use code like this:
<informalexample><programlisting>
<programlisting><![CDATA[
static cairo_pattern_t *
gtk_color_button_get_checkered (void)
{
@@ -337,50 +322,44 @@ gtk_color_button_get_checkered (void)
return pattern;
}
</programlisting></informalexample>
]]></programlisting>
Note that stippling looks very outdated in UIs, and is rarely
used in modern applications. All properties that made use of
stippling have been removed from GTK+ 3. Most prominently,
stippling is absent from text rendering, in particular #GtkTextTag.
</para>
</formalpara>
<formalpara><title>Using the target also as source or mask</title>
<formalpara><title>Using the the target drawable also as source or mask</title>
<para>
The gdk_draw_drawable() function allowed using the same drawable
as source and target. This was often used to achieve a scrolling
effect. Cairo does not allow this yet. You can however use
cairo_push_group() to get a different intermediate target that
you can copy to. So you can replace this code:
<informalexample><programlisting>
<programlisting><![CDATA[
gdk_draw_drawable (pixmap,
gc,
pixmap,
area.x + dx, area.y + dy,
area.x, area.y,
area.width, area.height);
</programlisting></informalexample>
]]></programlisting>
By using this code:
<informalexample><programlisting>
cairo_t *cr = cairo_create (surface);
<programlisting><![CDATA[
cairo_t *cr = gdk_cairo_create (pixmap);
/* clipping restricts the intermediate surface's size, so it's a good idea
* to use it. */
gdk_cairo_rectangle (cr, &amp;area);
gdk_cairo_rectangle (cr, &area);
cairo_clip (cr);
/* Now push a group to change the target */
cairo_push_group (cr);
cairo_set_source_surface (cr, surface, dx, dy);
gdk_cairo_set_source_pixmap (cr, pixmap, dx, dy);
cairo_paint (cr);
/* Now copy the intermediate target back */
cairo_pop_group_to_source (cr);
cairo_paint (cr);
cairo_destroy (cr);
</programlisting></informalexample>
The surface here can be either an image surface or a X surface,
and can either be created on the spot or kept around for caching purposes.
Another alternative is to use pixbufs instead of surfaces with
gdk_cairo_set_source_pixbuf() instead of cairo_set_source_surface().
</para>
<para>
]]></programlisting>
The cairo developers plan to add self-copies in the future to allow
exactly this effect, so you might want to keep up on cairo
development to be able to change your code.
@@ -673,7 +652,7 @@ gtk_fixed_get_preferred_height (GtkWidget *widget,
<para>
One place where pixmaps were commonly used is to create custom
cursors:
<informalexample><programlisting>
<programlisting>
GdkCursor *cursor;
GdkPixmap *pixmap;
cairo_t *cr;
@@ -689,10 +668,10 @@ cairo_destroy (cr);
cursor = gdk_cursor_new_from_pixmap (pixmap, pixmap, &amp;fg, &amp;fg, 0, 0);
g_object_unref (pixmap);
</programlisting></informalexample>
</programlisting>
The same can be achieved without pixmaps, by drawing onto
an image surface:
<informalexample><programlisting>
<programlisting>
GdkCursor *cursor;
cairo_surface_t *s;
cairo_t *cr;
@@ -713,7 +692,7 @@ cairo_surface_destroy (s);
cursor = gdk_cursor_new_from_pixbuf (display, pixbuf, 0, 0);
g_object_unref (pixbuf);
</programlisting></informalexample>
</programlisting>
</para>
</example>
</section>
@@ -732,7 +711,7 @@ g_object_unref (pixbuf);
<para>You might have a screen-changed handler like the following
to set up a translucent window with an alpha-channel:
</para>
<informalexample><programlisting>
<programlisting>
static void
on_alpha_screen_changed (GtkWidget *widget,
GdkScreen *old_screen,
@@ -746,11 +725,11 @@ on_alpha_screen_changed (GtkWidget *widget,
gtk_widget_set_colormap (widget, colormap);
}
</programlisting></informalexample>
</programlisting>
<para>
With visuals instead of colormaps, this will look as follows:
</para>
<informalexample><programlisting>
<programlisting>
static void
on_alpha_screen_changed (GtkWindow *window,
GdkScreen *old_screen,
@@ -764,7 +743,7 @@ on_alpha_screen_changed (GtkWindow *window,
gtk_widget_set_visual (window, visual);
}
</programlisting></informalexample>
</programlisting>
</example>
</section>
@@ -774,8 +753,8 @@ on_alpha_screen_changed (GtkWindow *window,
<para>
#GdkDrawable has been removed in GTK+ 3, together with #GdkPixmap
and #GdkImage. The only remaining drawable class is #GdkWindow.
For dealing with image data, you should use a #cairo_surface_t or
a #GdkPixbuf.
For dealing with image data, you should use cairo surfaces or
#GdkPixbufs.
</para>
<para>
@@ -800,73 +779,6 @@ on_alpha_screen_changed (GtkWindow *window,
</para>
</section>
<section>
<title>Event filtering</title>
<para>
If your application uses the low-level event filtering facilities in GDK,
there are some changes you need to be aware of.
</para>
<para>
The special-purpose GdkEventClient events and the gdk_add_client_message_filter() and gdk_display_add_client_message_filter() functions have been
removed. Receiving X11 ClientMessage events is still possible, using
the general gdk_window_add_filter() API. A client message filter like
<informalexample><programlisting>
static GdkFilterReturn
message_filter (GdkXEvent *xevent, GdkEvent *event, gpointer data)
{
XClientMessageEvent *evt = (XClientMessageEvent *)xevent;
/* do something with evt ... */
}
...
message_type = gdk_atom_intern ("MANAGER", FALSE);
gdk_display_add_client_message_filter (display, message_type, message_filter, NULL);
</programlisting></informalexample>
then looks like this:
<informalexample><programlisting>
static GdkFilterReturn
event_filter (GdkXEvent *xevent, GdkEvent *event, gpointer data)
{
XClientMessageEvent *evt;
GdkAtom message_type;
if (((XEvent *)xevent)->type != ClientMessage)
return GDK_FILTER_CONTINUE;
evt = (XClientMessageEvent *)xevent;
message_type = XInternAtom (evt->display, "MANAGER", FALSE);
if (evt->message_type != message_type)
return GDK_FILTER_CONTINUE;
/* do something with evt ... */
}
...
gdk_window_add_filter (NULL, message_filter, NULL);
</programlisting></informalexample>
One advantage of using an event filter is that you can actually
remove the filter when you don't need it anymore, using
gdk_window_remove_filter().
</para>
<para>
The other difference to be aware of when working with event filters
in GTK+ 3 is that GDK now uses XI2 by default when available. That
means that your application does not receive core X11 key or button
events. Instead, all input events are delivered as XIDeviceEvents.
As a short-term workaround for this, you can force your application
to not use XI2, with gdk_disable_multidevice(). In the long term,
you probably want to rewrite your event filter to deal with
XIDeviceEvents.
</para>
</section>
<section>
<title>Backend-specific code</title>
<para>
@@ -908,30 +820,6 @@ gdk_window_add_filter (NULL, message_filter, NULL);
}
</programlisting></informalexample>
</para>
<para>
If you used the pkg-config variable <varname>target</varname> to
conditionally build part of your project depending on the GDK backend,
for instance like this:
<informalexample><programlisting>
AM_CONDITIONAL(BUILD_X11, test `$PKG_CONFIG --variable=target gtk+-2.0` = "x11")
</programlisting></informalexample>
then you should now use the M4 macro provided by GTK+ itself:
<informalexample><programlisting>
GTK_CHECK_BACKEND([x11], [3.0.2], [have_x11=yes], [have_x11=no])
AM_CONDITIONAL(BUILD_x11, [test "x$have_x11" = "xyes"])
</programlisting></informalexample>
</para>
</section>
<section>
<title>GtkPlug and GtkSocket</title>
<para>
The #GtkPlug and #GtkSocket widgets are now X11-specific, and you
have to include the <filename>&lt;gtk/gtkx.h&gt;</filename> header
to use them. The previous section about proper handling of
backend-specific code applies, if you care about other backends.
</para>
</section>
<section>
@@ -952,7 +840,7 @@ AM_CONDITIONAL(BUILD_x11, [test "x$have_x11" = "xyes"])
is available via the new gtk_widget_get_allocated_width() and
gtk_widget_get_allocated_height() functions. It is not necessary to
check for GTK_WIDGET_IS_DRAWABLE(), since GTK+ already does this check
before emitting the #GtkWidget::draw signal.
before emitting the ::draw signal.
</para>
<para>
There are some special considerations for widgets with multiple windows.
@@ -971,7 +859,7 @@ AM_CONDITIONAL(BUILD_x11, [test "x$have_x11" = "xyes"])
}
...
</programlisting></informalexample>
In contrast, the #GtkWidget::draw signal handler may have to draw multiple
In contrast, the ::draw signal handler may have to draw multiple
windows in one call. GTK+ has a convenience function
gtk_cairo_should_draw_window() that can be used to find out if
a window needs to be drawn. With that, the example above would look
@@ -1004,13 +892,10 @@ gboolean
gtk_arrow_draw (GtkWidget *widget,
cairo_t *cr)
{
GtkStyleContext *context;
gint x, y;
gint width, height;
gint extent;
context = gtk_widget_get_style_context (widget);
width = gtk_widget_get_allocated_width (widget);
height = gtk_widget_get_allocated_height (widget);
@@ -1018,7 +903,15 @@ gtk_arrow_draw (GtkWidget *widget,
x = PAD;
y = PAD;
gtk_render_arrow (context, rc, G_PI / 2, x, y, extent);
gtk_paint_arrow (gtk_widget_get_style (widget),
cr,
gtk_widget_get_state (widget),
GTK_SHADOW_OUT,
widget,
"arrow",
widget->priv->arrow_type,
TRUE,
x, y, extent, extent);
}
</programlisting>
</example>
@@ -1057,7 +950,7 @@ gtk_arrow_draw (GtkWidget *widget,
</section>
<section>
<title>Check your expand and fill flags</title>
<title>Check your expand flags</title>
<para>
The behaviour of expanding widgets has changed slightly in GTK+ 3,
@@ -1068,11 +961,6 @@ gtk_arrow_draw (GtkWidget *widget,
expand flag of the child from being inherited. See
gtk_widget_set_hexpand() and gtk_widget_set_vexpand().
</para>
<para>
If you experience sizing problems with widgets in ported code,
carefully check the #GtkBox::expand and #GtkBox::fill flags of your
boxes.
</para>
</section>
<section>
@@ -1103,7 +991,7 @@ gtk_arrow_draw (GtkWidget *widget,
classes that are directly derived from GtkObject, you have to make
them derive from #GInitiallyUnowned (or, if you don't need the floating
functionality, #GObject). If you have widgets that override the
destroy class handler, you have to adjust your class_init function,
destroy class handler, you have to adust your class_init function,
since destroy is now a member of GtkWidgetClass:
<informalexample><programlisting>
GtkObjectClass *object_class = GTK_OBJECT_CLASS (class);
@@ -1122,18 +1010,6 @@ gtk_arrow_draw (GtkWidget *widget,
</para>
</section>
<section>
<title>GtkEntryCompletion signal parameters</title>
<para>
The #GtkEntryCompletion::match-selected and
#GtkEntryCompletion::cursor-on-match signals were erroneously
given the internal filter model instead of the users model.
This oversight has been fixed in GTK+ 3; if you have handlers
for these signals, they will likely need slight adjustments.
</para>
</section>
<section>
<title>Resize grips</title>
@@ -59,21 +59,11 @@ The same application using GtkApplication:
static void
activate (GtkApplication *app)
{
GList *list;
GtkWidget *window;
list = gtk_application_get_windows (app);
if (list)
{
gtk_window_present (GTK_WINDOW (list->data));
}
else
{
window = create_my_window ();
gtk_window_set_application (GTK_WINDOW (window), app);
gtk_widget_show (window);
}
window = create_my_window ();
gtk_window_set_application (GTK_WINDOW (window), app);
gtk_widget_show (window);
}
int
@@ -27,21 +27,6 @@
with possible variants such as the dark theme being named
<filename>gtk-dark.css</filename> in the same directory.
</para>
<para>
If your theme RC file was providing values for #GtkSettings, you
can install a <filename>settings.ini</filename> keyfile along with
the <filename>gtk.css</filename> to provide theme-specific defaults
for settings.
</para>
<para>
Key themes have been converted to CSS syntax too. See the
<link linkend="css-binding-set">GtkCssProvider</link> documentation
information about the syntax. GTK+ looks for key themes in the file
<filename>$datadir/themes/<replaceable>theme</replaceable>/gtk-3.0/gtk-keys.css</filename>, where <replaceable>theme</replaceable> is the current
key theme name.
</para>
</section>
<section id="gtk-migrating-theme-GtkStyleContext-engines">
@@ -429,8 +414,8 @@
<orderedlist>
<listitem>
Replace #GtkWidget::style-set handlers with
#GtkWidget::style-updated handlers.
Replace <literal>style_set()</literal> calls with
<literal>style_updated()</literal>.
</listitem>
<listitem>
+1
View File
@@ -127,6 +127,7 @@
<emphasis>Misc. Objects</emphasis>
<link linkend="GtkAdjustment">GtkAdjustment</link>
<link linkend="GtkItemFactory">GtkItemFactory</link>
<link linkend="GtkInvisible">GtkInvisible</link>
</literallayout></entry>
+5 -5
View File
@@ -35,11 +35,11 @@ How do I get started with GTK+?
</para></question>
<answer><para>
The GTK+ <ulink url="http://www.gtk.org">website</ulink> offers some
<ulink url="http://www.gtk.org/documentation">tutorials</ulink> and other
documentation (most of it about GTK+ 2.x, but mostly still applicable).
More documentation ranging from whitepapers to online books can be found at
the <ulink url="http://library.gnome.org/devel/">GNOME developer's site</ulink>.
The GTK+ <ulink url="http://www.gtk.org">website</ulink> offers a
<ulink url="http://www.gtk.org/tutorial">tutorial</ulink> and a
<ulink url="http://www.gtk.org/faq">FAQ</ulink>. More documentation ranging
from whitepapers to online books can be found at the
<ulink url="http://library.gnome.org/devel/">GNOME developer's site</ulink>.
After studying these materials you should be well prepared to come back to
this reference manual for details.
</para></answer>
+8 -59
View File
@@ -199,13 +199,9 @@ additional environment variables.
<para>
A list of modules to load. Note that GTK+ also allows to specify modules to load via a commandline option (<option>--gtk-module</option>) and with the <literal>gtk-modules</literal> setting.
</para>
<warning>
Note that this environment variable is read by GTK+ 2.x too,
which may not have the same set of modules available for loading.
</warning>
</formalpara>
<formalpara id="gtk-path">
<formalpara>
<title><envar>GTK_PATH</envar></title>
<para>
@@ -215,7 +211,7 @@ additional environment variables.
modules, file system backends and print backends. If the path to
the dynamically loaded object is given as an absolute path name,
then GTK+ loads it directly.
Otherwise, GTK+ goes in turn through the directories in <envar>GTK_PATH</envar>,
Otherwise, GTK+ goes in turn through the directories in GTK_PATH,
followed by the directory <filename>.gtk-3.0</filename> in the user's
home directory, followed by the system default directory,
which is <filename><replaceable>libdir</replaceable>/gtk-3.0/modules</filename>.
@@ -245,12 +241,6 @@ additional environment variables.
The components of GTK_PATH are separated by the ':' character on
Linux and Unix, and the ';' character on Windows.
</para>
<warning>
Note that this environment variable is read by GTK+ 2.x too, which
makes it unsuitable for setting it system-wide (or session-wide),
since doing so will cause either GTK+ 2.x applications or GTK+ 3
applications to see incompatible modules.
</warning>
</formalpara>
<formalpara>
@@ -258,32 +248,23 @@ additional environment variables.
<para>
Specifies an IM module to use in preference to the one determined
from the locale. If this isn't set and you are running on the system
from the locale. If this isn't set and you are running on the system
that enables <literal>XSETTINGS</literal> and has a value in
<literal>Gtk/IMModule</literal>, that will be used for the default
IM module.
</para>
</formalpara>
<formalpara id="gtk-im-module-file">
<formalpara id="im-module-file">
<title><envar>GTK_IM_MODULE_FILE</envar></title>
<para>
Specifies the file listing the IM modules to load. This environment
variable the default value
variable overrides the <literal>im_module_file</literal> specified in
the RC files, which in turn overrides the default value
<filename><replaceable>libdir</replaceable>/gtk-3.0/3.0.0/immodules.cache</filename>
(<replaceable>libdir</replaceable> has the same meaning here as explained for <envar>GTK_PATH</envar>).
</para>
<para>
The <filename>immodules.cache</filename> file is generated by the
<command>gtk-query-immodules-3.0</command> utility.
</para>
<warning>
Note that this environment variable is read by GTK+ 2.x too, which
makes it unsuitable for setting it system-wide (or session-wide),
since doing so will cause either GTK+ 2.x applications or GTK+ 3
applications to see the wrong list of IM modules.
</warning>
</formalpara>
<formalpara>
@@ -316,13 +297,9 @@ nevertheless.
<para>
Specifies the file listing the GdkPixbuf loader modules to load.
This environment variable overrides the default value
<filename><replaceable>libdir</replaceable>/gtk-3.0/3.0.0/loaders.cache</filename>
<filename><replaceable>libdir</replaceable>/gtk-3.0/3.0.0/loaders.cache</filename>
(<replaceable>libdir</replaceable> is the sysconfdir specified when
GTK+ was configured, usually <filename>/usr/local/lib</filename>.)
</para>
<para>
The <filename>loaders.cache</filename> file is generated by the
<command>gdk-pixbuf-query-loaders</command> utility.
GTK+ was configured, usually <filename>/usr/local/lib</filename>.)
</para>
</formalpara>
@@ -391,34 +368,6 @@ nevertheless.
</para>
</formalpara>
<formalpara>
<title><envar>GDK_BACKEND</envar></title>
<para>
If set, selects the GDK backend to use. Selecting a backend requires that GTK is compiled
with support for that backend. The following backends can be selected:
<variablelist>
<varlistentry>
<term>quartz</term>
<listitem><para>Selects the native Quartz backend</para></listitem>
</varlistentry>
<varlistentry>
<term>win32</term>
<listitem><para>Selects the native backend for Microsoft Windows</para></listitem>
</varlistentry>
<varlistentry>
<term>x11</term>
<listitem><para>Selects the native backend for connecting to X11 servers.</para></listitem>
</varlistentry>
</variablelist>
For more information about selecting backends, see the gdk_display_manager_get() function.
</para>
</formalpara>
<formalpara>
<title><envar>GDK_SYNCHRONIZE</envar></title>
-2
View File
@@ -3,7 +3,6 @@ gtkactiongroup.sgml
gtkaboutdialog.sgml
gtkadjustment.sgml
gtkbbox.sgml
gtkbindings.sgml
gtkbox.sgml
gtkbuilder.sgml
gtkbutton.sgml
@@ -50,7 +49,6 @@ gtkpaned.sgml
gtkpapersize.sgml
gtkprinter.sgml
gtkprintjob.sgml
gtkprintoperation.sgml
gtkprogressbar.sgml
gtkradioaction.sgml
gtkradiobutton.sgml
+296
View File
@@ -0,0 +1,296 @@
<!-- ##### SECTION Title ##### -->
Bindings
<!-- ##### SECTION Short_Description ##### -->
Key bindings for individual widgets
<!-- ##### SECTION Long_Description ##### -->
<para>
GtkBinding provides a mechanism for configuring GTK+ key bindings through
RC files. This eases key binding adjustments for application developers as
well as users and provides GTK+ users or administrators with high key
binding configurability which requires no application or toolkit side changes.
</para>
<refsect2>
<anchor id="gtk-bindings-install"/>
<title>Installing a key binding</title>
<para>
A resource file binding consists of a 'binding' definition and a match
statement to apply the binding to specific widget types. Details on the
matching mechanism are described under
<link linkend="gtkrc-pathnames-and-patterns">Pathnames and patterns</link>.
Inside the binding definition, key combinations are bound to specific signal
emissions on the target widget. Key combinations are strings consisting of
an optional #GdkModifierType name and
<link linkend="gdk-Keyboard-Handling">key names</link> such as those defined
in <filename>&lt;gdk/gdkkeysyms.h&gt;</filename> or returned from
gdk_keyval_name(), they have to be parsable by gtk_accelerator_parse().
Specifications of signal emissions consist of a string identifying the signal
name, and a list of signal specific arguments in parenthesis.
</para>
<para>
For example for binding Control and the left or right cursor keys of a
#GtkEntry widget to the #GtkEntry::move-cursor signal, so movement occurs
in 3 letter steps, the following binding can be used:
<informalexample><programlisting>
binding "MoveCursor3" {
bind "&lt;Control&gt;Right" {
"move-cursor" (visual-positions, 3, 0)
}
bind "&lt;Control&gt;Left" {
"move-cursor" (visual-positions, -3, 0)
}
}
class "GtkEntry" binding "MoveCursor3"
</programlisting></informalexample>
</para>
<anchor id="gtk-bindings-unbind"/>
<title>Unbinding existing key bindings</title>
<para>
GTK+ already defines a number of useful bindings for the widgets it provides.
Because custom bindings set up in RC files take precedence over the default
bindings shipped with GTK+, overriding existing bindings as demonstrated in
<link linkend="gtk-bindings-install">Installing a key binding</link>
works as expected. The same mechanism can not be used to "unbind" existing
bindings, however.
<informalexample><programlisting>
binding "MoveCursor3" {
bind "&lt;Control&gt;Right" { }
bind "&lt;Control&gt;Left" { }
}
class "GtkEntry" binding "MoveCursor3"
</programlisting></informalexample>
The above example will not have the desired effect of causing
"&lt;Control&gt;Right" and "&lt;Control&gt;Left" key presses to be ignored
by GTK+. Instead, it just causes any existing bindings from the bindings
set "MoveCursor3" to be deleted, so when "&lt;Control&gt;Right" or
"&lt;Control&gt;Left" are pressed, no binding for these keys is found in
binding set "MoveCursor3". GTK+ will thus continue to search for matching
key bindings, and will eventually lookup and find the default GTK+ bindings
for entries which implement word movement. To keep GTK+ from activating its
default bindings, the "unbind" keyword can be used like this:
<informalexample><programlisting>
binding "MoveCursor3" {
unbind "&lt;Control&gt;Right"
unbind "&lt;Control&gt;Left"
}
class "GtkEntry" binding "MoveCursor3"
</programlisting></informalexample>
Now, GTK+ will find a match when looking up "&lt;Control&gt;Right" and
"&lt;Control&gt;Left" key presses before it resorts to its default
bindings, and the match instructs it to abort ("unbind") the search, so
the key presses are not consumed by this widget. As usual, further processing
of the key presses, e.g. by an entry's parent widget, is now possible.
</para>
<para>
The "unbind" functionality has been introduced in GTK+ 2.12.
</para>
</refsect2>
<!-- ##### SECTION See_Also ##### -->
<para>
<variablelist>
<varlistentry>
<term><link linkend="gtk-keyboard-accelerators">Keyboard Accelerators</link>
</term>
<listitem><para>installing and using keyboard short-cuts.</para></listitem>
</varlistentry>
<varlistentry>
<term><link linkend="Resource-Files">Resource Files</link>
</term>
<listitem><para>GTK+ Resource Files - behavior and style definitions.</para></listitem>
</varlistentry>
</variablelist>
</para>
<!-- ##### SECTION Stability_Level ##### -->
<!-- ##### SECTION Image ##### -->
<!-- ##### STRUCT GtkBindingSet ##### -->
<para>
A binding set maintains a list of activatable key bindings.
A single binding set can match multiple types of widgets.
Similar to styles, widgets can be mapped by widget name paths, widget
class paths or widget class types. When a binding within a set is
matched upon activation, an action signal is emitted on the target
widget to carry out the actual activation.
</para>
@set_name: unique binding set name
@priority: unused
@widget_path_pspecs: widgets matched by path that this binding set applies to
@widget_class_pspecs: widgets matched by class path that this binding set applies to
@class_branch_pspecs: widgets matched by class that this binding set applies to
@entries: the key binding entries in this binding set
@current: implementation detail
@parsed: whether this binding set stems from an RC file and is reset upon theme changes
<!-- ##### STRUCT GtkBindingEntry ##### -->
<para>
Each key binding element of a binding sets binding list is represented by
a #GtkBindingEntry.
</para>
@keyval: key value to match
@modifiers: key modifier to match
@binding_set: binding set this entry belongs to
@destroyed: implementation detail
@in_emission: implementation detail
@marks_unbound: implementation detail
@set_next: linked list of entries maintained by binding set
@hash_next: implementation detail
@signals: action signals of this entry
<!-- ##### STRUCT GtkBindingSignal ##### -->
<anchor id="keybinding-signals"/>
<para>
A #GtkBindingSignal stores the necessary information to activate a widget
in response to a key press via a signal emission.
</para>
@next: implementation detail
@signal_name: the action signal to be emitted
@n_args: number of arguments specified for the signal
@args: the arguments specified for the signal
<!-- ##### STRUCT GtkBindingArg ##### -->
<para>
A #GtkBindingArg holds the data associated with an argument for a
key binding signal emission as stored in #GtkBindingSignal.
</para>
@arg_type: implementation detail
<!-- ##### FUNCTION gtk_binding_entry_add_signall ##### -->
<para>
</para>
@binding_set:
@keyval:
@modifiers:
@signal_name:
@binding_args:
<!-- ##### FUNCTION gtk_binding_set_new ##### -->
<para>
</para>
@set_name:
@Returns:
<!-- ##### FUNCTION gtk_binding_set_by_class ##### -->
<para>
</para>
@object_class:
@Returns:
<!-- ##### FUNCTION gtk_binding_set_find ##### -->
<para>
</para>
@set_name:
@Returns:
<!-- ##### FUNCTION gtk_bindings_activate ##### -->
<para>
</para>
@object:
@keyval:
@modifiers:
@Returns:
<!-- ##### FUNCTION gtk_bindings_activate_event ##### -->
<para>
</para>
@object:
@event:
@Returns:
<!-- ##### FUNCTION gtk_binding_set_activate ##### -->
<para>
</para>
@binding_set:
@keyval:
@modifiers:
@object:
@Returns:
<!-- ##### FUNCTION gtk_binding_entry_add_signal ##### -->
<para>
</para>
@binding_set:
@keyval:
@modifiers:
@signal_name:
@n_args:
@Varargs:
<!-- ##### FUNCTION gtk_binding_entry_skip ##### -->
<para>
</para>
@binding_set:
@keyval:
@modifiers:
<!-- ##### FUNCTION gtk_binding_entry_remove ##### -->
<para>
</para>
@binding_set:
@keyval:
@modifiers:
<!-- ##### FUNCTION gtk_binding_set_add_path ##### -->
<para>
</para>
@binding_set:
@path_type:
@path_pattern:
@priority:
File diff suppressed because it is too large Load Diff
+265
View File
@@ -0,0 +1,265 @@
<!-- ##### SECTION Title ##### -->
GtkPreview
<!-- ##### SECTION Short_Description ##### -->
A widget to display RGB or grayscale data
<!-- ##### SECTION Long_Description ##### -->
<para>
The #GtkPreview widget provides a simple interface
used to display images as RGB or grayscale data.
It's deprecated; just use a #GdkPixbuf displayed by a #GtkImage, or
perhaps a #GtkDrawingArea. #GtkPreview has no advantage over those
approaches.
</para>
<!-- ##### SECTION See_Also ##### -->
<para>
<variablelist>
<varlistentry>
<term>#GdkRGB</term>
<listitem><para>the backend used by #GtkPreview.</para></listitem>
</varlistentry>
</variablelist>
</para>
<!-- ##### SECTION Stability_Level ##### -->
<!-- ##### STRUCT GtkPreview ##### -->
<para>
The #GtkPreview-struct struct contains private data only, and
should be accessed using the functions below.
</para>
<!-- ##### ARG GtkPreview:expand ##### -->
<para>
</para>
<!-- ##### STRUCT GtkPreviewInfo ##### -->
<para>
Contains information about global properties
of preview widgets.
The #GtkPreviewInfo struct contains the following fields.
(These fields should be considered read-only. They should never be set by
an application.)
<informaltable pgwide="1" frame="none" role="struct">
<tgroup cols="2"><colspec colwidth="2*"/><colspec colwidth="8*"/>
<tbody>
<row>
<entry>#GdkVisual *visual;</entry>
<entry>the visual used by all previews.</entry>
</row>
<row>
<entry>#GdkColormap *cmap;</entry>
<entry>the colormap used by all previews.</entry>
</row>
<row>
<entry>gdouble gamma;</entry>
<entry>the gamma correction value used by all previews (See gtk_preview_set_gamma()).</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</para>
@lookup:
@gamma:
<!-- ##### UNION GtkDitherInfo ##### -->
<para>
This union not used in GTK+.
</para>
<!-- ##### FUNCTION gtk_preview_uninit ##### -->
<para>
This function is deprecated and does nothing.
</para>
<!-- ##### FUNCTION gtk_preview_new ##### -->
<para>
Create a new preview widget.
</para>
@type: the type data contained by the widget.
(Grayscale or RGB)
@Returns: a new #GtkPreview
<!-- ##### FUNCTION gtk_preview_size ##### -->
<para>
Set the size that the preview widget will request
in response to a "size_request" signal. The
drawing area may actually be allocated a size
larger than this depending on how it is packed
within the enclosing containers. The effect
of this is determined by whether the preview
is set to expand or not (see gtk_preview_expand())
</para>
@preview: a #GtkPreview.
@width: the new width.
@height: the new height.
<!-- ##### FUNCTION gtk_preview_put ##### -->
<para>
Takes a portion of the contents of a preview widget
and draws it onto the given drawable, @window.
</para>
@preview: a #GtkPreview.
@window: a window or pixmap.
@gc: The graphics context for the operation. Only the
clip mask for this GC matters.
@srcx: the x coordinate of the upper left corner in the source image.
@srcy: the y coordinate of the upper left corner in the source image.
@destx: the x coordinate of the upper left corner in the destination image.
@desty: the y coordinate of the upper left corner in the destination image.
@width: the width of the rectangular portion to draw.
@height: the height of the rectangular portion to draw.
<!-- ##### FUNCTION gtk_preview_draw_row ##### -->
<para>
Sets the data for a portion of a row.
</para>
@preview: a #GtkPreview.
@data: the new data for the portion. It should contain
@w bytes of data if the preview is of type
GTK_TYPE_GRAYSCALE, and 3*@w bytes of data
if the preview is of type GTK_TYPE_COLOR.
@x: the starting value on the row to set.
@y: the row to change.
@w: the number of pixels in the row to change.
<!-- ##### FUNCTION gtk_preview_set_expand ##### -->
<para>
Determines the way that the the preview widget behaves
when the size it is allocated is larger than the requested
size. If @expand is %FALSE, then the preview's window
and buffer will be no larger than the size set with
gtk_preview_size(), and the data set will be centered
in the allocation if it is larger. If @expand is %TRUE
then the window and buffer will expand with the allocation;
the application is responsible for catching
the "size_allocate" signal and providing the data
appropriate for this size.
</para>
@preview: a #GtkPreview.
@expand: whether the preview's window should expand or not.
<!-- ##### FUNCTION gtk_preview_set_gamma ##### -->
<para>
Set the gamma-correction value for all preview widgets.
(This function will eventually be replaced with a
function that sets a per-preview-widget gamma value).
The resulting intensity is given by:
<literal>destination_value * pow (source_value/255, 1/gamma)</literal>.
The gamma value is applied when the data is
set with gtk_preview_draw_row() so changing this
value will not affect existing data in preview
widgets.
</para>
@gamma_: the new gamma value.
<!-- ##### FUNCTION gtk_preview_set_color_cube ##### -->
<para>
This function is deprecated and does nothing. GdkRGB
automatically picks an optimium color cube for the
display.
</para>
@nred_shades: ignored
@ngreen_shades: ignored
@nblue_shades: ignored
@ngray_shades: ignored
<!-- ##### FUNCTION gtk_preview_set_install_cmap ##### -->
<para>
This function is deprecated
and does nothing. GdkRGB will automatically pick
a private colormap if it cannot allocate sufficient
colors.
</para>
@install_cmap: ignored.
<!-- ##### FUNCTION gtk_preview_set_reserved ##### -->
<para>
This function is deprecated and does nothing.
</para>
@nreserved: ignored.
<!-- ##### FUNCTION gtk_preview_set_dither ##### -->
<para>
Set the dithering mode for the display.
</para>
@preview: a #GtkPreview.
@dither: the dithering mode.
<!-- ##### FUNCTION gtk_preview_get_visual ##### -->
<para>
Returns the visual used by preview widgets. This
function is deprecated, and you should use
gdk_rgb_get_visual() instead.
</para>
@Returns: the visual for previews.
<!-- ##### FUNCTION gtk_preview_get_cmap ##### -->
<para>
Returns the colormap used by preview widgets. This
function is deprecated, and you should use
gdk_rgb_get_cmap() instead.
</para>
@Returns: the colormap for previews.
<!-- ##### FUNCTION gtk_preview_get_info ##### -->
<para>
Return a #GtkPreviewInfo structure containing
global information about preview widgets.
</para>
@Returns: a #GtkPreviewInfo structure. The return
value belongs to GTK+ and must not be modified
or freed.
<!-- ##### FUNCTION gtk_preview_reset ##### -->
<para>
This function is deprecated and does nothing. It was
once used for changing the colormap and visual on the fly.
</para>
@@ -0,0 +1,701 @@
<!-- ##### SECTION Title ##### -->
GtkPrintOperation
<!-- ##### SECTION Short_Description ##### -->
High-level Printing API
<!-- ##### SECTION Long_Description ##### -->
<para>
GtkPrintOperation is the high-level, portable printing API. It looks
a bit different than other GTK+ dialogs such as the #GtkFileChooser,
since some platforms don't expose enough infrastructure to implement
a good print dialog. On such platforms, GtkPrintOperation uses the
native print dialog. On platforms which do not provide a native
print dialog, GTK+ uses its own, see #GtkPrintUnixDialog.
</para>
<para>
The typical way to use the high-level printing API is to create a
#GtkPrintOperation object with gtk_print_operation_new() when the user
selects to print. Then you set some properties on it, e.g. the page size,
any #GtkPrintSettings from previous print operations, the number of pages,
the current page, etc.
</para>
<para>
Then you start the print operation by calling gtk_print_operation_run().
It will then show a dialog, let the user select a printer and options.
When the user finished the dialog various signals will be emitted on the
#GtkPrintOperation, the main one being ::draw-page, which you are supposed
to catch and render the page on the provided #GtkPrintContext using Cairo.
</para>
<example>
<title>The high-level printing API</title>
<programlisting>
static GtkPrintSettings *settings = NULL;
static void
do_print (void)
{
GtkPrintOperation *print;
GtkPrintOperationResult res;
print = gtk_print_operation_new (<!-- -->);
if (settings != NULL)
gtk_print_operation_set_print_settings (print, settings);
g_signal_connect (print, "begin_print", G_CALLBACK (begin_print), NULL);
g_signal_connect (print, "draw_page", G_CALLBACK (draw_page), NULL);
res = gtk_print_operation_run (print, GTK_PRINT_OPERATION_ACTION_PRINT_DIALOG,
GTK_WINDOW (main_window), NULL);
if (res == GTK_PRINT_OPERATION_RESULT_APPLY)
{
if (settings != NULL)
g_object_unref (settings);
settings = g_object_ref (gtk_print_operation_get_print_settings (print));
}
g_object_unref (print);
}
</programlisting>
</example>
<para>
By default GtkPrintOperation uses an external application to do
print preview. To implement a custom print preview, an application
must connect to the preview signal. The functions
gtk_print_operation_print_preview_render_page(),
gtk_print_operation_preview_end_preview() and
gtk_print_operation_preview_is_selected() are useful
when implementing a print preview.
</para>
<para>
Printing support was added in GTK+ 2.10.
</para>
<!-- ##### SECTION See_Also ##### -->
<para>
#GtkPrintContext, #GtkPrintUnixDialog
</para>
<!-- ##### SECTION Stability_Level ##### -->
<!-- ##### SECTION Image ##### -->
<!-- ##### STRUCT GtkPrintOperation ##### -->
<para>
</para>
<!-- ##### SIGNAL GtkPrintOperation::begin-print ##### -->
<para>
</para>
@printoperation:
@context:
<!-- ##### SIGNAL GtkPrintOperation::create-custom-widget ##### -->
<para>
</para>
@printoperation:
@Returns:
<!-- ##### SIGNAL GtkPrintOperation::custom-widget-apply ##### -->
<para>
</para>
@printoperation:
@widget:
<!-- ##### SIGNAL GtkPrintOperation::done ##### -->
<para>
</para>
@printoperation: the object which received the signal.
@arg1:
<!-- ##### SIGNAL GtkPrintOperation::draw-page ##### -->
<para>
</para>
@printoperation: the object which received the signal.
@arg1:
@arg2:
<!-- ##### SIGNAL GtkPrintOperation::end-print ##### -->
<para>
</para>
@printoperation: the object which received the signal.
@arg1:
<!-- ##### SIGNAL GtkPrintOperation::paginate ##### -->
<para>
</para>
@printoperation: the object which received the signal.
@arg1:
@Returns:
<!-- ##### SIGNAL GtkPrintOperation::preview ##### -->
<para>
</para>
@printoperation: the object which received the signal.
@arg1:
@arg2:
@arg3:
@Returns:
<!-- ##### SIGNAL GtkPrintOperation::request-page-setup ##### -->
<para>
</para>
@printoperation: the object which received the signal.
@arg1:
@arg2:
@arg3:
<!-- ##### SIGNAL GtkPrintOperation::status-changed ##### -->
<para>
</para>
@printoperation: the object which received the signal.
<!-- ##### SIGNAL GtkPrintOperation::update-custom-widget ##### -->
<para>
</para>
@printoperation: the object which received the signal.
@widget:
@arg1:
@arg2:
<!-- ##### ARG GtkPrintOperation:allow-async ##### -->
<para>
</para>
<!-- ##### ARG GtkPrintOperation:current-page ##### -->
<para>
</para>
<!-- ##### ARG GtkPrintOperation:custom-tab-label ##### -->
<para>
</para>
<!-- ##### ARG GtkPrintOperation:default-page-setup ##### -->
<para>
</para>
<!-- ##### ARG GtkPrintOperation:embed-page-setup ##### -->
<para>
</para>
<!-- ##### ARG GtkPrintOperation:export-filename ##### -->
<para>
</para>
<!-- ##### ARG GtkPrintOperation:has-selection ##### -->
<para>
</para>
<!-- ##### ARG GtkPrintOperation:job-name ##### -->
<para>
</para>
<!-- ##### ARG GtkPrintOperation:n-pages ##### -->
<para>
</para>
<!-- ##### ARG GtkPrintOperation:n-pages-to-print ##### -->
<para>
</para>
<!-- ##### ARG GtkPrintOperation:print-settings ##### -->
<para>
</para>
<!-- ##### ARG GtkPrintOperation:show-progress ##### -->
<para>
</para>
<!-- ##### ARG GtkPrintOperation:status ##### -->
<para>
</para>
<!-- ##### ARG GtkPrintOperation:status-string ##### -->
<para>
</para>
<!-- ##### ARG GtkPrintOperation:support-selection ##### -->
<para>
</para>
<!-- ##### ARG GtkPrintOperation:track-print-status ##### -->
<para>
</para>
<!-- ##### ARG GtkPrintOperation:unit ##### -->
<para>
</para>
<!-- ##### ARG GtkPrintOperation:use-full-page ##### -->
<para>
</para>
<!-- ##### ENUM GtkPrintStatus ##### -->
<para>
The status gives a rough indication of the completion
of a running print operation.
</para>
@GTK_PRINT_STATUS_INITIAL: The printing has not started yet; this
status is set initially, and while the print dialog is shown.
@GTK_PRINT_STATUS_PREPARING: This status is set while the begin-print
signal is emitted and during pagination.
@GTK_PRINT_STATUS_GENERATING_DATA: This status is set while the
pages are being rendered.
@GTK_PRINT_STATUS_SENDING_DATA: The print job is being sent off to the
printer.
@GTK_PRINT_STATUS_PENDING: The print job has been sent to the printer,
but is not printed for some reason, e.g. the printer may be stopped.
@GTK_PRINT_STATUS_PENDING_ISSUE: Some problem has occurred during
printing, e.g. a paper jam.
@GTK_PRINT_STATUS_PRINTING: The printer is processing the print job.
@GTK_PRINT_STATUS_FINISHED: The printing has been completed successfully.
@GTK_PRINT_STATUS_FINISHED_ABORTED: The printing has been aborted.
<!-- ##### ENUM GtkPrintOperationAction ##### -->
<para>
The @action parameter to gtk_print_operation_run()
determines what action the print operation should perform.
</para>
@GTK_PRINT_OPERATION_ACTION_PRINT_DIALOG: Show the print dialog.
@GTK_PRINT_OPERATION_ACTION_PRINT: Start to print without showing
the print dialog, based on the current print settings.
@GTK_PRINT_OPERATION_ACTION_PREVIEW: Show the print preview.
@GTK_PRINT_OPERATION_ACTION_EXPORT: Export to a file. This requires
the export-filename property to be set.
<!-- ##### ENUM GtkPrintOperationResult ##### -->
<para>
A value of this type is returned by gtk_print_operation_run().
</para>
@GTK_PRINT_OPERATION_RESULT_ERROR: An error has occured.
@GTK_PRINT_OPERATION_RESULT_APPLY: The print settings should be stored.
@GTK_PRINT_OPERATION_RESULT_CANCEL: The print operation has been canceled,
the print settings should not be stored.
@GTK_PRINT_OPERATION_RESULT_IN_PROGRESS: The print operation is not complete
yet. This value will only be returned when running asynchronously.
<!-- ##### ENUM GtkPrintError ##### -->
<para>
Error codes that identify various errors that can occur while
using the GTK+ printing support.
</para>
@GTK_PRINT_ERROR_GENERAL: An unspecified error occurred.
@GTK_PRINT_ERROR_INTERNAL_ERROR: An internal error occurred.
@GTK_PRINT_ERROR_NOMEM: A memory allocation failed.
@GTK_PRINT_ERROR_INVALID_FILE: An error occurred while loading a page setup
or paper size from a key file.
<!-- ##### MACRO GTK_PRINT_ERROR ##### -->
<para>
The #GQuark used for #GtkPrintError errors.
</para>
<!-- ##### FUNCTION gtk_print_operation_new ##### -->
<para>
</para>
@void:
@Returns:
<!-- ##### FUNCTION gtk_print_operation_set_allow_async ##### -->
<para>
</para>
@op:
@allow_async:
<!-- ##### FUNCTION gtk_print_operation_get_error ##### -->
<para>
</para>
@op:
@error:
<!-- ##### FUNCTION gtk_print_operation_set_default_page_setup ##### -->
<para>
</para>
@op:
@default_page_setup:
<!-- ##### FUNCTION gtk_print_operation_get_default_page_setup ##### -->
<para>
</para>
@op:
@Returns:
<!-- ##### FUNCTION gtk_print_operation_set_print_settings ##### -->
<para>
</para>
@op:
@print_settings:
<!-- ##### FUNCTION gtk_print_operation_get_print_settings ##### -->
<para>
</para>
@op:
@Returns:
<!-- ##### FUNCTION gtk_print_operation_set_job_name ##### -->
<para>
</para>
@op:
@job_name:
<!-- ##### FUNCTION gtk_print_operation_set_n_pages ##### -->
<para>
</para>
@op:
@n_pages:
<!-- ##### FUNCTION gtk_print_operation_get_n_pages_to_print ##### -->
<para>
</para>
@op:
@Returns:
<!-- ##### FUNCTION gtk_print_operation_set_current_page ##### -->
<para>
</para>
@op:
@current_page:
<!-- ##### FUNCTION gtk_print_operation_set_use_full_page ##### -->
<para>
</para>
@op:
@full_page:
<!-- ##### FUNCTION gtk_print_operation_set_unit ##### -->
<para>
</para>
@op:
@unit:
<!-- ##### FUNCTION gtk_print_operation_set_export_filename ##### -->
<para>
</para>
@op:
@filename:
<!-- ##### FUNCTION gtk_print_operation_set_show_progress ##### -->
<para>
</para>
@op:
@show_progress:
<!-- ##### FUNCTION gtk_print_operation_set_track_print_status ##### -->
<para>
</para>
@op:
@track_status:
<!-- ##### FUNCTION gtk_print_operation_set_custom_tab_label ##### -->
<para>
</para>
@op:
@label:
<!-- ##### FUNCTION gtk_print_operation_run ##### -->
<para>
</para>
@op:
@action:
@parent:
@error:
@Returns:
<!-- ##### FUNCTION gtk_print_operation_cancel ##### -->
<para>
</para>
@op:
<!-- ##### FUNCTION gtk_print_operation_draw_page_finish ##### -->
<para>
</para>
@op:
<!-- ##### FUNCTION gtk_print_operation_set_defer_drawing ##### -->
<para>
</para>
@op:
<!-- ##### FUNCTION gtk_print_operation_get_status ##### -->
<para>
</para>
@op:
@Returns:
<!-- ##### FUNCTION gtk_print_operation_get_status_string ##### -->
<para>
</para>
@op:
@Returns:
<!-- ##### FUNCTION gtk_print_operation_is_finished ##### -->
<para>
</para>
@op:
@Returns:
<!-- ##### FUNCTION gtk_print_operation_set_support_selection ##### -->
<para>
</para>
@op:
@support_selection:
<!-- ##### FUNCTION gtk_print_operation_get_support_selection ##### -->
<para>
</para>
@op:
@Returns:
<!-- ##### FUNCTION gtk_print_operation_set_has_selection ##### -->
<para>
</para>
@op:
@has_selection:
<!-- ##### FUNCTION gtk_print_operation_get_has_selection ##### -->
<para>
</para>
@op:
@Returns:
<!-- ##### FUNCTION gtk_print_operation_set_embed_page_setup ##### -->
<para>
</para>
@op:
@embed:
<!-- ##### FUNCTION gtk_print_operation_get_embed_page_setup ##### -->
<para>
</para>
@op:
@Returns:
<!-- ##### FUNCTION gtk_print_run_page_setup_dialog ##### -->
<para>
</para>
@parent:
@page_setup:
@settings:
@Returns:
<!-- ##### USER_FUNCTION GtkPageSetupDoneFunc ##### -->
<para>
</para>
@page_setup:
@data:
<!-- ##### FUNCTION gtk_print_run_page_setup_dialog_async ##### -->
<para>
</para>
@parent:
@page_setup:
@settings:
@done_cb:
@data:
<!-- ##### STRUCT GtkPrintOperationPreview ##### -->
<para>
</para>
<!-- ##### SIGNAL GtkPrintOperationPreview::got-page-size ##### -->
<para>
</para>
@printoperationpreview: the object which received the signal.
@arg1:
@arg2:
<!-- ##### SIGNAL GtkPrintOperationPreview::ready ##### -->
<para>
</para>
@printoperationpreview: the object which received the signal.
@arg1:
<!-- ##### FUNCTION gtk_print_operation_preview_end_preview ##### -->
<para>
</para>
@preview:
<!-- ##### FUNCTION gtk_print_operation_preview_is_selected ##### -->
<para>
</para>
@preview:
@page_nr:
@Returns:
<!-- ##### FUNCTION gtk_print_operation_preview_render_page ##### -->
<para>
</para>
@preview:
@page_nr:
+215
View File
@@ -0,0 +1,215 @@
<!-- ##### SECTION Title ##### -->
GtkProgress
<!-- ##### SECTION Short_Description ##### -->
Base class for GtkProgressBar
<!-- ##### SECTION Long_Description ##### -->
<para>
A #GtkProgress is the abstract base class used to derive
a #GtkProgressBar which provides a visual representation of
the progress of a long running operation.
</para>
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
<!-- ##### SECTION Stability_Level ##### -->
<!-- ##### SECTION Image ##### -->
<!-- ##### STRUCT GtkProgress ##### -->
<para>
The #GtkProgress-struct struct contains private data only.
and should be accessed using the functions below.
</para>
<!-- ##### ARG GtkProgress:activity-mode ##### -->
<para>
</para>
<!-- ##### ARG GtkProgress:show-text ##### -->
<para>
</para>
<!-- ##### ARG GtkProgress:text-xalign ##### -->
<para>
</para>
<!-- ##### ARG GtkProgress:text-yalign ##### -->
<para>
</para>
<!-- ##### FUNCTION gtk_progress_set_show_text ##### -->
<para>
Controls whether progress text is shown.
</para>
@progress: a #GtkProgress.
@show_text: a boolean indicating whether the progress text
is shown.
<!-- ##### FUNCTION gtk_progress_set_text_alignment ##### -->
<para>
Controls the alignment of the text within the progress bar area.
</para>
@progress: a #GtkProgress.
@x_align: a number between 0.0 and 1.0 indicating the horizontal
alignment of the progress text within the #GtkProgress.
@y_align: a number between 0.0 and 1.0 indicating the vertical
alignment of the progress text within the #GtkProgress.
<!-- ##### FUNCTION gtk_progress_set_format_string ##### -->
<para>
Sets a format string used to display text indicating the
current progress. The string can contain the following substitution characters:
<itemizedlist>
<listitem>
<para>
&percnt;v - the current progress value.
</para>
</listitem>
<listitem>
<para>
&percnt;l - the lower bound for the progress value.
</para>
</listitem>
<listitem>
<para>
&percnt;u - the upper bound for the progress value.
</para>
</listitem>
<listitem>
<para>
&percnt;p - the current progress percentage.
</para>
</listitem>
</itemizedlist>
</para>
@progress: a #GtkProgress.
@format: a string used to display progress text, or %NULL
to restore to the default format.
<!-- ##### FUNCTION gtk_progress_set_adjustment ##### -->
<para>
Associates a #GtkAdjustment with the #GtkProgress. A #GtkAdjustment
is used to represent the upper and lower bounds and the step interval
of the underlying value for which progress is shown.
</para>
@progress: a #GtkProgress.
@adjustment: the #GtkAdjustment to be associated with the #GtkProgress.
<!-- ##### FUNCTION gtk_progress_set_percentage ##### -->
<para>
Sets the current percentage completion for the #GtkProgress.
</para>
@progress: a #GtkProgress.
@percentage: the percentage complete which must be between 0.0
and 1.0.
<!-- ##### FUNCTION gtk_progress_set_value ##### -->
<para>
Sets the value within the #GtkProgress to an absolute value.
The value must be within the valid range of values for the
underlying #GtkAdjustment.
</para>
@progress: a #GtkProgress.
@value: the value indicating the current completed amount.
<!-- ##### FUNCTION gtk_progress_get_value ##### -->
<para>
Returns the current progress complete value.
</para>
@progress: a #GtkProgress.
@Returns: the current progress complete value.
<!-- ##### FUNCTION gtk_progress_set_activity_mode ##### -->
<para>
A #GtkProgress can be in one of two different modes: percentage
mode (the default) and activity mode. In activity mode, the
progress is simply indicated as activity rather than as a percentage
complete.
</para>
@progress: a #GtkProgress.
@activity_mode: a boolean, %TRUE for activity mode.
<!-- ##### FUNCTION gtk_progress_get_current_text ##### -->
<para>
Returns the current text associated with the #GtkProgress. This
text is the based on the underlying format string after any substitutions
are made.
</para>
@progress: a #GtkProgress.
@Returns: the text indicating the current progress.
<!-- ##### FUNCTION gtk_progress_get_text_from_value ##### -->
<para>
Returns the text indicating the progress based on the supplied value.
The current value for the #GtkProgress remains unchanged.
</para>
@progress: a #GtkProgress.
@value: an absolute progress value to use when formatting the progress text.
@Returns: a string indicating the progress.
<!-- ##### FUNCTION gtk_progress_get_current_percentage ##### -->
<para>
Returns the current progress as a percentage.
</para>
@progress: a #GtkProgress.
@Returns: a number between 0.0 and 1.0 indicating the percentage complete.
<!-- ##### FUNCTION gtk_progress_get_percentage_from_value ##### -->
<para>
Returns the progress as a percentage calculated from the supplied
absolute progress value.
</para>
@progress: a #GtkProgress.
@value: an absolute progress value.
@Returns: a number between 0.0 and 1.0 indicating the percentage complete
represented by @value.
<!-- ##### FUNCTION gtk_progress_configure ##### -->
<para>
Allows the configuration of the minimum, maximum, and current values for
the #GtkProgress.
</para>
@progress: a #GtkProgress.
@value: the current progress value.
@min: the minimum progress value.
@max: the maximum progress value.
+3 -3
View File
@@ -2,7 +2,7 @@
Resource Files
<!-- ##### SECTION Short_Description ##### -->
Deprecated routines for handling resource files
Routines for handling resource files
<!-- ##### SECTION Long_Description ##### -->
<para>
@@ -10,10 +10,10 @@ GTK+ provides resource file mechanism for configuring
various aspects of the operation of a GTK+ program
at runtime.
</para>
<warning>
<para>
In GTK+ 3.0, resource files have been deprecated and replaced
by CSS-like style sheets, which are understood by #GtkCssProvider.
</warning>
</para>
<refsect2><title>Default files</title>
<para>
+134
View File
@@ -0,0 +1,134 @@
<!-- ##### SECTION Title ##### -->
GtkRuler
<!-- ##### SECTION Short_Description ##### -->
Base class for horizontal or vertical rulers
<!-- ##### SECTION Long_Description ##### -->
<note>
<para>
This widget is considered too specialized/little-used for
GTK+, and will in the future be moved to some other package. If
your application needs this widget, feel free to use it, as the
widget does work and is useful in some applications; it's just not
of general interest. However, we are not accepting new features for
the widget, and it will eventually move out of the GTK+
distribution.
</para>
</note>
<para>
The GTKRuler widget is a base class for horizontal and vertical rulers. Rulers
are used to show the mouse pointer's location in a window. The ruler can either
be horizontal or vertical on the window. Within the ruler a small triangle
indicates the location of the mouse relative to the horizontal or vertical
ruler. See #GtkHRuler to learn how to create a new horizontal ruler. See
#GtkVRuler to learn how to create a new vertical ruler.
</para>
<!-- ##### SECTION See_Also ##### -->
<para>
#GtkHRuler, #GtkVRuler
</para>
<!-- ##### SECTION Stability_Level ##### -->
<!-- ##### SECTION Image ##### -->
<!-- ##### STRUCT GtkRuler ##### -->
<para>
All distances are in 1/72nd's of an inch. (According to Adobe thats a point, but
points are really 1/72.27 in.)
</para>
<!-- ##### ARG GtkRuler:lower ##### -->
<para>
</para>
<!-- ##### ARG GtkRuler:max-size ##### -->
<para>
</para>
<!-- ##### ARG GtkRuler:metric ##### -->
<para>
</para>
<!-- ##### ARG GtkRuler:position ##### -->
<para>
</para>
<!-- ##### ARG GtkRuler:upper ##### -->
<para>
</para>
<!-- ##### STRUCT GtkRulerMetric ##### -->
<para>
This should be points_per_unit. This is the size of the unit in 1/72nd's of an inch and has nothing to do with screen pixels.
</para>
@metric_name:
@abbrev:
@pixels_per_unit:
@ruler_scale:
@subdivide:
<!-- ##### FUNCTION gtk_ruler_new ##### -->
<para>
</para>
@orientation:
@Returns:
<!-- ##### FUNCTION gtk_ruler_set_metric ##### -->
<para>
This calls the #GTKMetricType to set the ruler to units defined. Available units
are GTK_PIXELS, GTK_INCHES, or GTK_CENTIMETERS. The default unit of measurement
is GTK_PIXELS.
</para>
@ruler: the gtkruler
@metric: the unit of measurement
<!-- ##### FUNCTION gtk_ruler_set_range ##### -->
<para>
</para>
@ruler:
@lower:
@upper:
@position:
@max_size:
<!-- ##### FUNCTION gtk_ruler_get_metric ##### -->
<para>
</para>
@ruler:
@Returns:
<!-- ##### FUNCTION gtk_ruler_get_range ##### -->
<para>
</para>
@ruler:
@lower:
@upper:
@position:
@max_size:
+19
View File
@@ -0,0 +1,19 @@
<!-- ##### SECTION Title ##### -->
Themes
<!-- ##### SECTION Short_Description ##### -->
<!-- ##### SECTION Long_Description ##### -->
<para>
</para>
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
<!-- ##### SECTION Stability_Level ##### -->
+163
View File
@@ -0,0 +1,163 @@
<!-- ##### SECTION Title ##### -->
GtkTipsQuery
<!-- ##### SECTION Short_Description ##### -->
Displays help about widgets in the user interface
<!-- ##### SECTION Long_Description ##### -->
<para>
The #GtkTipsQuery widget is a subclass of #GtkLabel which is used to display
help about widgets in a user interface.
</para>
<para>
A query is started with a call to gtk_tips_query_start_query(), usually
when some kind of 'Help' button is pressed. The #GtkTipsQuery then grabs all
events, stopping the user interface from functioning normally.
Then as the user moves the mouse over the widgets, the #GtkTipsQuery displays
each widget's tooltip text.
</para>
<para>
By connecting to the "widget-entered" or "widget-selected" signals, it is
possible to customize the #GtkTipsQuery to perform other actions when widgets
are entered or selected. For example, a help browser could be opened with
documentation on the widget selected.
</para>
<para>
At some point a call to gtk_tips_query_stop_query() must be made in order to
stop the query and return the interface to its normal state.
The gtk_tips_query_set_caller() function can be used to specify a widget
which the user can select to stop the query (often the same button used to
start the query).
</para>
<!-- ##### SECTION See_Also ##### -->
<para>
<variablelist>
<varlistentry>
<term>#GtkTooltips</term>
<listitem><para>the object which handles tooltips.</para></listitem>
</varlistentry>
</variablelist>
</para>
<!-- ##### SECTION Stability_Level ##### -->
<!-- ##### STRUCT GtkTipsQuery ##### -->
<para>
The #GtkTipsQuery-struct struct contains private data only, and
should be accessed using the functions below.
</para>
<!-- ##### SIGNAL GtkTipsQuery::start-query ##### -->
<para>
Emitted when the query is started.
</para>
@tipsquery: the object which received the signal.
<!-- ##### SIGNAL GtkTipsQuery::stop-query ##### -->
<para>
Emitted when the query is stopped.
</para>
@tipsquery: the object which received the signal.
<!-- ##### SIGNAL GtkTipsQuery::widget-entered ##### -->
<para>
Emitted when a widget is entered by the pointer while the query is in effect.
</para>
@tipsquery: the object which received the signal.
@widget: the widget that was entered by the pointer.
@tip_text: the widget's tooltip.
@tip_private: the widget's private tooltip (see gtk_tooltips_set_tip()).
<!-- ##### SIGNAL GtkTipsQuery::widget-selected ##### -->
<para>
Emitted when a widget is selected during a query.
</para>
@tipsquery: the object which received the signal.
@widget: the widget that was selected.
@tip_text: the widget's tooltip.
@tip_private: the widget's private tooltip (see gtk_tooltips_set_tip()).
@event: the button press or button release event.
@Returns: %TRUE if the query should be stopped.
<!-- ##### ARG GtkTipsQuery:caller ##### -->
<para>
The widget that starts the tips query, usually a button.
If it is selected while the query is in effect the query is automatically
stopped.
</para>
<!-- ##### ARG GtkTipsQuery:emit-always ##### -->
<para>
%TRUE if the widget-entered and widget-selected signals are emitted even when
the widget has no tooltip set.
</para>
<!-- ##### ARG GtkTipsQuery:label-inactive ##### -->
<para>
The text to display in the #GtkTipsQuery widget when the query is not in
effect.
</para>
<!-- ##### ARG GtkTipsQuery:label-no-tip ##### -->
<para>
The text to display in the #GtkTipsQuery widget when the query is running
and the widget that the pointer is over has no tooltip.
</para>
<!-- ##### FUNCTION gtk_tips_query_new ##### -->
<para>
Creates a new #GtkTipsQuery.
</para>
@Returns: a new #GtkTipsQuery.
<!-- ##### FUNCTION gtk_tips_query_start_query ##### -->
<para>
Starts a query.
The #GtkTipsQuery widget will take control of the mouse and as the mouse
moves it will display the tooltip of the widget beneath the mouse.
</para>
@tips_query: a #GtkTipsQuery.
<!-- ##### FUNCTION gtk_tips_query_stop_query ##### -->
<para>
Stops a query.
</para>
@tips_query: a #GtkTipsQuery.
<!-- ##### FUNCTION gtk_tips_query_set_caller ##### -->
<para>
Sets the widget which initiates the query, usually a button.
If the @caller is selected while the query is running, the query is
automatically stopped.
</para>
@tips_query: a #GtkTipsQuery.
@caller: the widget which initiates the query.
<!-- ##### FUNCTION gtk_tips_query_set_labels ##### -->
<para>
Sets the text to display when the query is not in effect,
and the text to display when the query is in effect but the widget beneath
the pointer has no tooltip.
</para>
@tips_query: a #GtkTipsQuery.
@label_inactive: the text to display when the query is not running.
@label_no_tip: the text to display when the query is running but the widget
beneath the pointer has no tooltip.
-7
View File
@@ -31,13 +31,6 @@ see <link linkend="gdk-X-Window-System-Interaction">GDK X Window
System interaction</link> in the GDK manual.
</para>
<para>
GTK+ includes an cross-process embedding facility in the form of
the #GtkSocket and #GtkPlug widgets. These are X11-specific, and
you have to include the <filename>gtk/gtkx.h</filename> header
to use them.
</para>
<refsect2 id="x11-cmdline">
<title>X11-specific commandline options</title>
+5 -5
View File
@@ -9,13 +9,13 @@ INCLUDES = \
$(GTK_DEP_CFLAGS)
DEPS = \
$(top_builddir)/gtk/libgtk-3.la
$(top_builddir)/gtk/libgtk-3.0.la
LDADDS = \
$(top_builddir)/gtk/libgtk-3.la \
$(top_builddir)/gdk/libgdk-3.la \
$(GTK_DEP_LIBS) \
$(GDK_DEP_LIBS) \
$(top_builddir)/gtk/libgtk-3.0.la \
$(top_builddir)/gdk/libgdk-3.0.la \
$(GTK_DEP_LIBS) \
$(GDK_DEP_LIBS) \
-lm
if USE_X11
+2 -2
View File
@@ -45,11 +45,11 @@ INCLUDES = \
$(GTK_DEP_CFLAGS)
LDADD = \
$(top_builddir)/gtk/libgtk-3.la \
$(top_builddir)/gtk/libgtk-3.0.la \
$(GTK_DEP_LIBS)
drawing_LDADD = $(LDADD) \
$(top_builddir)/gdk/libgdk-3.la
$(top_builddir)/gdk/libgdk-3.0.la
noinst_PROGRAMS = \
hello-world \
+6 -3
View File
@@ -6,10 +6,13 @@ CFLAGS = -Wall \
-DGDK_DISABLE_DEPRECATED \
-DGDK_PIXBUF_DISABLE_DEPRECATED
all: menu
all: menu itemfactory
menu: menu.c
$(CC) menu.c -o menu $(CFLAGS) `pkg-config gtk+-3.0 --cflags --libs`
$(CC) menu.c -o menu $(CFLAGS) `pkg-config gtk+-2.0 --cflags --libs`
itemfactory: itemfactory.c
$(CC) itemfactory.c -o itemfactory $(CFLAGS) `pkg-config gtk+-2.0 --cflags --libs`
clean:
rm -f *.o menu
rm -f *.o menu itemfactory
+176
View File
@@ -0,0 +1,176 @@
#include <gtk/gtk.h>
/* Obligatory basic callback */
static void print_hello( GtkWidget *w,
gpointer data )
{
g_message ("Hello, World!\n");
}
/* For the check button */
static void print_toggle( gpointer callback_data,
guint callback_action,
GtkWidget *menu_item )
{
g_message ("Check button state - %d\n",
GTK_CHECK_MENU_ITEM (menu_item)->active);
}
/* For the radio buttons */
static void print_selected( gpointer callback_data,
guint callback_action,
GtkWidget *menu_item )
{
if(GTK_CHECK_MENU_ITEM(menu_item)->active)
g_message ("Radio button %d selected\n", callback_action);
}
/* Our menu, an array of GtkItemFactoryEntry structures that defines each menu item */
static GtkItemFactoryEntry menu_items[] = {
{ "/_File", NULL, NULL, 0, "<Branch>" },
{ "/File/_New", "<control>N", print_hello, 0, "<StockItem>", GTK_STOCK_NEW },
{ "/File/_Open", "<control>O", print_hello, 0, "<StockItem>", GTK_STOCK_OPEN },
{ "/File/_Save", "<control>S", print_hello, 0, "<StockItem>", GTK_STOCK_SAVE },
{ "/File/Save _As", NULL, NULL, 0, "<Item>" },
{ "/File/sep1", NULL, NULL, 0, "<Separator>" },
{ "/File/_Quit", "<CTRL>Q", gtk_main_quit, 0, "<StockItem>", GTK_STOCK_QUIT },
{ "/_Options", NULL, NULL, 0, "<Branch>" },
{ "/Options/tear", NULL, NULL, 0, "<Tearoff>" },
{ "/Options/Check", NULL, print_toggle, 1, "<CheckItem>" },
{ "/Options/sep", NULL, NULL, 0, "<Separator>" },
{ "/Options/Rad1", NULL, print_selected, 1, "<RadioItem>" },
{ "/Options/Rad2", NULL, print_selected, 2, "/Options/Rad1" },
{ "/Options/Rad3", NULL, print_selected, 3, "/Options/Rad1" },
{ "/_Help", NULL, NULL, 0, "<LastBranch>" },
{ "/_Help/About", NULL, NULL, 0, "<Item>" },
};
static gint nmenu_items = sizeof (menu_items) / sizeof (menu_items[0]);
/* Returns a menubar widget made from the above menu */
static GtkWidget *get_menubar_menu( GtkWidget *window )
{
GtkItemFactory *item_factory;
GtkAccelGroup *accel_group;
/* Make an accelerator group (shortcut keys) */
accel_group = gtk_accel_group_new ();
/* Make an ItemFactory (that makes a menubar) */
item_factory = gtk_item_factory_new (GTK_TYPE_MENU_BAR, "<main>",
accel_group);
/* This function generates the menu items. Pass the item factory,
the number of items in the array, the array itself, and any
callback data for the the menu items. */
gtk_item_factory_create_items (item_factory, nmenu_items, menu_items, NULL);
/* Attach the new accelerator group to the window. */
gtk_window_add_accel_group (GTK_WINDOW (window), accel_group);
/* Finally, return the actual menu bar created by the item factory. */
return gtk_item_factory_get_widget (item_factory, "<main>");
}
/* Popup the menu when the popup button is pressed */
static gboolean popup_cb( GtkWidget *widget,
GdkEvent *event,
GtkWidget *menu )
{
GdkEventButton *bevent = (GdkEventButton *)event;
/* Only take button presses */
if (event->type != GDK_BUTTON_PRESS)
return FALSE;
/* Show the menu */
gtk_menu_popup (GTK_MENU(menu), NULL, NULL,
NULL, NULL, bevent->button, bevent->time);
return TRUE;
}
/* Same as with get_menubar_menu() but just return a button with a signal to
call a popup menu */
GtkWidget *get_popup_menu( void )
{
GtkItemFactory *item_factory;
GtkWidget *button, *menu;
/* Same as before but don't bother with the accelerators */
item_factory = gtk_item_factory_new (GTK_TYPE_MENU, "<main>",
NULL);
gtk_item_factory_create_items (item_factory, nmenu_items, menu_items, NULL);
menu = gtk_item_factory_get_widget (item_factory, "<main>");
/* Make a button to activate the popup menu */
button = gtk_button_new_with_label ("Popup");
/* Make the menu popup when clicked */
g_signal_connect (G_OBJECT(button),
"event",
G_CALLBACK(popup_cb),
(gpointer) menu);
return button;
}
/* Same again but return an option menu */
GtkWidget *get_option_menu( void )
{
GtkItemFactory *item_factory;
GtkWidget *option_menu;
/* Same again, not bothering with the accelerators */
item_factory = gtk_item_factory_new (GTK_TYPE_OPTION_MENU, "<main>",
NULL);
gtk_item_factory_create_items (item_factory, nmenu_items, menu_items, NULL);
option_menu = gtk_item_factory_get_widget (item_factory, "<main>");
return option_menu;
}
/* You have to start somewhere */
int main( int argc,
char *argv[] )
{
GtkWidget *window;
GtkWidget *main_vbox;
GtkWidget *menubar, *option_menu, *popup_button;
/* Initialize GTK */
gtk_init (&argc, &argv);
/* Make a window */
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
g_signal_connect (G_OBJECT (window), "destroy",
G_CALLBACK (gtk_main_quit),
NULL);
gtk_window_set_title (GTK_WINDOW(window), "Item Factory");
gtk_widget_set_size_request (GTK_WIDGET(window), 300, 200);
/* Make a vbox to put the three menus in */
main_vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, FALSE, 1);
gtk_container_set_border_width (GTK_CONTAINER (main_vbox), 1);
gtk_container_add (GTK_CONTAINER (window), main_vbox);
/* Get the three types of menu */
/* Note: all three menus are separately created, so they are not the
same menu */
menubar = get_menubar_menu (window);
popup_button = get_popup_menu ();
option_menu = get_option_menu ();
/* Pack it all together */
gtk_box_pack_start (GTK_BOX (main_vbox), menubar, FALSE, TRUE, 0);
gtk_box_pack_end (GTK_BOX (main_vbox), popup_button, FALSE, TRUE, 0);
gtk_box_pack_end (GTK_BOX (main_vbox), option_menu, FALSE, TRUE, 0);
/* Show the widgets */
gtk_widget_show_all (window);
/* Finished! */
gtk_main ();
return 0;
}
+1 -1
View File
@@ -6,6 +6,6 @@ includedir=@includedir@
Name: Gail
Description: GNOME Accessibility Implementation Library
Version: @VERSION@
Requires: atk gtk+-3.0
Requires: atk gtk+-3.
Libs: ${pc_top_builddir}/${pcfiledir}/modules/other/gail/libgail.la ${pc_top_builddir}/${pcfiledir}/modules/other/gail/libgail-util/libgailutil.la
Cflags: -I${pc_top_builddir}/${pcfiledir}/modules/other/gail
+1 -1
View File
@@ -7,5 +7,5 @@ Name: Gail
Description: GNOME Accessibility Implementation Library
Version: @VERSION@
Requires: atk gtk+-3.0
Libs: -L${libdir} -lgailutil-3
Libs: -L${libdir} -lgailutil-3.0
Cflags: -I${includedir}/gail-3.0
+1 -1
View File
@@ -8,5 +8,5 @@ Name: GDK
Description: GTK+ Drawing Kit
Version: @VERSION@
Requires: @GDK_PACKAGES@
Libs: -L${libdir} -lgdk-3 @GDK_EXTRA_LIBS@
Libs: -L${libdir} -lgdk-@GTK_API_VERSION@ @GDK_EXTRA_LIBS@
Cflags: -I${includedir}/gtk-@GTK_API_VERSION@ @GDK_EXTRA_CFLAGS@
+26 -21
View File
@@ -92,6 +92,10 @@ gdk_public_h_sources = \
gdkvisual.h \
gdkwindow.h
gdk_built_public_sources = \
gdkconfig.h \
gdkenumtypes.h
gdk_private_headers = \
gdkapplaunchcontextprivate.h \
gdkcursorprivate.h \
@@ -137,15 +141,14 @@ gdk_built_sources = \
gdkenumtypes.c \
gdkmarshalers.h \
gdkmarshalers.c \
gdkenumtypes.h
$(gdk_built_public_sources)
#
# setup GDK sources and their dependencies
#
gdkincludedir = $(includedir)/gtk-3.0/gdk
gdkinclude_HEADERS = $(gdk_public_h_sources) gdkenumtypes.h
nodist_gdkinclude_HEADERS = gdkconfig.h
gdkinclude_HEADERS = $(gdk_public_h_sources) $(gdk_built_public_sources)
common_sources = \
$(gdk_private_headers) \
@@ -154,23 +157,23 @@ common_sources = \
gdkmarshalers.c \
gdkmarshalers.h
libgdk_3_la_SOURCES = $(common_sources)
libgdk_3_la_LIBADD = $(GDK_DEP_LIBS)
libgdk_3_la_LDFLAGS = $(LDADD)
libgdk_3_0_la_SOURCES = $(common_sources)
libgdk_3_0_la_LIBADD = $(GDK_DEP_LIBS)
libgdk_3_0_la_LDFLAGS = $(LDADD)
if USE_X11
libgdk_3_la_LIBADD += x11/libgdk-x11.la
libgdk_3_0_la_LIBADD += x11/libgdk-x11.la
endif # USE_X11
if USE_QUARTZ
libgdk_3_la_LIBADD += quartz/libgdk-quartz.la
libgdk_3_0_la_LIBADD += quartz/libgdk-quartz.la
endif # USE_QUARTZ
if USE_WIN32
libgdk_3_la_SOURCES += gdkkeynames.c
libgdk_3_la_LIBADD += win32/libgdk-win32.la
libgdk_3_la_DEPENDENCIES = win32/libgdk-win32.la win32/rc/gdk-win32-res.o gdk.def
libgdk_3_la_LDFLAGS += -Wl,win32/rc/gdk-win32-res.o -export-symbols $(srcdir)/gdk.def
libgdk_3_0_la_SOURCES += gdkkeynames.c
libgdk_3_0_la_LIBADD += win32/libgdk-win32.la
libgdk_3_0_la_DEPENDENCIES = win32/libgdk-win32.la win32/rc/gdk-win32-res.o gdk.def
libgdk_3_0_la_LDFLAGS += -Wl,win32/rc/gdk-win32-res.o -export-symbols $(srcdir)/gdk.def
endif # USE_WIN32
if HAVE_INTROSPECTION
@@ -181,11 +184,11 @@ introspection_files = \
gdkenumtypes.c \
gdkenumtypes.h
Gdk-3.0.gir: libgdk-3.la Makefile
Gdk-3.0.gir: libgdk-3.0.la Makefile
Gdk_3_0_gir_SCANNERFLAGS = \
--c-include="gdk/gdk.h"
Gdk_3_0_gir_INCLUDES = Gio-2.0 GdkPixbuf-2.0 Pango-1.0 cairo-1.0
Gdk_3_0_gir_LIBS = libgdk-3.la
Gdk_3_0_gir_LIBS = libgdk-3.0.la
Gdk_3_0_gir_FILES = $(introspection_files)
Gdk_3_0_gir_CFLAGS = $(INCLUDES)
Gdk_3_0_gir_EXPORT_PACKAGES = gdk-3.0
@@ -222,7 +225,7 @@ x11_introspection_files = \
x11/gdkxid.c \
x11/xsettings-client.c \
x11/xsettings-common.c \
x11/gdkx.h \
x11/gdkx.h \
x11/gdkx11cursor.h \
x11/gdkx11display.h \
x11/gdkx11property.h \
@@ -232,13 +235,13 @@ x11_introspection_files = \
x11/gdkx11visual.h \
x11/gdkx11window.h
GdkX11-3.0.gir: libgdk-3.la Gdk-3.0.gir Makefile
GdkX11-3.0.gir: libgdk-3.0.la Gdk-3.0.gir Makefile
GdkX11_3_0_gir_SCANNERFLAGS = \
--identifier-prefix=Gdk \
--c-include="gdk/gdkx.h" \
--include-uninstalled=$(top_builddir)/gdk/Gdk-3.0.gir
GdkX11_3_0_gir_INCLUDES = Gio-2.0 GdkPixbuf-2.0 Pango-1.0 xlib-2.0
GdkX11_3_0_gir_LIBS = libgdk-3.la
GdkX11_3_0_gir_INCLUDES = Gio-2.0 Gdk-3.0 GdkPixbuf-2.0 Pango-1.0 xlib-2.0
GdkX11_3_0_gir_LIBS = libgdk-3.0.la
GdkX11_3_0_gir_FILES = $(x11_introspection_files)
GdkX11_3_0_gir_CFLAGS = $(INCLUDES) -L$(top_builddir)/gdk
GdkX11_3_0_gir_EXPORT_PACKAGES = gdk-x11-3.0
@@ -294,16 +297,18 @@ if OS_LINUX
TESTS = abicheck.sh
endif
lib_LTLIBRARIES = libgdk-3.la
lib_LTLIBRARIES = libgdk-3.0.la
MAINTAINERCLEANFILES = $(gdk_built_sources) stamp-gdkenumtypes.h
EXTRA_DIST += $(gdk_built_sources)
EXTRA_HEADERS =
install-exec-hook:
if DISABLE_EXPLICIT_DEPS
$(SHELL) $(top_srcdir)/sanitize-la.sh $(DESTDIR)$(libdir)/libgdk-3.la
$(SHELL) $(top_srcdir)/sanitize-la.sh $(DESTDIR)$(libdir)/libgdk-3.0.la
endif
#note: not gdkconfig.h
BUILT_SOURCES = \
$(gdk_built_sources) \
gdkconfig.h
@@ -344,7 +349,7 @@ stamp-gc-h: $(top_builddir)/config.status
dist-hook: ../build/win32/vs9/gdk.vcproj
../build/win32/vs9/gdk.vcproj: ../build/win32/vs9/gdk.vcprojin
for F in $(libgdk_3_la_SOURCES); do \
for F in $(libgdk_3_0_la_SOURCES); do \
case $$F in \
*.c) echo ' <File RelativePath="..\..\..\gdk\'$$F'" />' \
;; \
+1 -1
View File
@@ -1,5 +1,5 @@
#! /bin/sh
cpp -P -DGDK_WINDOWING_X11 ${srcdir:-.}/gdk.symbols | sed -e '/^$/d' -e 's/ G_GNUC.*$//' | sort | uniq > expected-abi
nm -D -g --defined-only .libs/libgdk-3.so | cut -d ' ' -f 3 | egrep -v '^(__bss_start|_edata|_end)' | sort > actual-abi
nm -D -g --defined-only .libs/libgdk-3.0.so | cut -d ' ' -f 3 | egrep -v '^(__bss_start|_edata|_end)' | sort > actual-abi
diff -u expected-abi actual-abi && rm -f expected-abi actual-abi
+21 -5
View File
@@ -54,7 +54,27 @@
* The #GDK_WINDOWING_X11 macro is defined if the X11 backend
* is supported.
*
* Use this macro to guard code that is specific to the X11 backend.
* Use this macro to guard code that is specific to the X11-backend.
* Since GDK may be configured with multiple backends, an additional
* runtime check for the used backend is recommended:
*
* |[
* #ifdef GDK_WINDOWING_X11
* if (GDK_IS_X11_DISPLAY (display))
* {
* /&ast; make X11-specific calls here &ast;/
* }
* else
* #endif
* #ifdef GDK_WINDOWING_QUARTZ
* if (GDK_IS_QUARTZ_DISPLAY (display))
* {
* /&ast; make Quartz-specific calls here &ast/
* }
* else
* #endif
* g_error ("Unsupported GDK backend");
* ]|
*/
/**
@@ -62,8 +82,6 @@
*
* The #GDK_WINDOWING_WIN32 macro is defined if the Win32 backend
* is supported.
*
* Use this macro to guard code that is specific to the Win32 backend.
*/
/**
@@ -71,8 +89,6 @@
*
* The #GDK_WINDOWING_QUARTZ macro is defined if the Quartz backend
* is supported.
*
* Use this macro to guard code that is specific to the Quartz backend.
*/
typedef struct _GdkPredicate GdkPredicate;
+7 -1
View File
@@ -1,6 +1,7 @@
/* This file lists all exported symbols. It is used to generate
* the gdk.def file used to control exports on Windows.
*/
gdk_add_client_message_filter
gdk_add_option_entries_libgtk_only
gdk_app_launch_context_get_type G_GNUC_CONST
gdk_app_launch_context_new
@@ -78,6 +79,7 @@ gdk_device_type_get_type G_GNUC_CONST
gdk_device_ungrab
gdk_device_warp
gdk_disable_multidevice
gdk_display_add_client_message_filter
gdk_display_beep
gdk_display_close
gdk_display_device_is_grabbed
@@ -143,6 +145,7 @@ gdk_drag_context_set_device
gdk_drag_drop
gdk_drag_drop_succeeded
gdk_drag_find_window_for_screen
gdk_drag_get_protocol_for_display
gdk_drag_get_selection
gdk_drag_motion
gdk_drag_protocol_get_type G_GNUC_CONST
@@ -170,6 +173,9 @@ gdk_event_new
gdk_event_peek
gdk_event_put
gdk_event_request_motions
gdk_event_send_client_message
gdk_event_send_client_message_for_display
gdk_event_send_clientmessage_toall
gdk_event_set_device
gdk_event_set_screen
gdk_event_set_source_device
@@ -254,6 +260,7 @@ gdk_rgba_get_type
gdk_rgba_hash
gdk_rgba_parse
gdk_rgba_to_string
gdk_screen_broadcast_client_message
gdk_screen_get_active_window
gdk_screen_get_default
gdk_screen_get_display
@@ -389,7 +396,6 @@ gdk_window_get_device_cursor
gdk_window_get_device_events
gdk_window_get_device_position
gdk_window_get_display
gdk_window_get_drag_protocol
gdk_window_get_effective_parent
gdk_window_get_effective_toplevel
gdk_window_get_events
+111 -115
View File
@@ -8,7 +8,7 @@
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
@@ -27,18 +27,17 @@
/**
* SECTION:cairo_interaction
* @Short_description: Functions to support using cairo
* @Short_description: Functions to support using Cairo
* @Title: Cairo Interaction
*
* <link href="http://cairographics.org">Cairo</link> is a graphics
* library that supports vector graphics and image compositing that
* can be used with GDK. GTK+ does all of its drawing using cairo.
* can be used with GDK. GTK+ does all of its drawing using Cairo.
*
* GDK does not wrap the cairo API, instead it allows to create cairo
* GDK does not wrap the Cairo API, instead it allows to create Cairo
* contexts which can be used to draw on #GdkWindows. Additional
* functions allow use #GdkRectangles with cairo and to use #GdkColors,
* #GdkRGBAs, #GdkPixbufs and #GdkWindows as sources for drawing
* operations.
* #GdkPixbufs and #GdkWindows as sources for drawing operations.
*/
@@ -47,13 +46,13 @@
* @cr: a cairo context
* @rect: (out) (allow-none): return location for the clip, or %NULL
*
* This is a convenience function around cairo_clip_extents().
* It rounds the clip extents to integer coordinates and returns
* a boolean indicating if a clip area exists.
* This is a convenience function around cairo_clip_extents(). It rounds
* the clip extents to integer coordinates and returns a boolean
* indicating if a clip area exists.
*
* Returns: %TRUE if a clip rectangle exists, %FALSE if all of @cr is
* clipped and all drawing can be skipped
*/
* clipped and all drawing can be skipped.
**/
gboolean
gdk_cairo_get_clip_rectangle (cairo_t *cr,
GdkRectangle *rect)
@@ -83,35 +82,35 @@ gdk_cairo_get_clip_rectangle (cairo_t *cr,
/**
* gdk_cairo_set_source_color:
* @cr: a cairo context
* @cr: a #cairo_t
* @color: a #GdkColor
*
* Sets the specified #GdkColor as the source color of @cr.
*
* Since: 2.8
*/
**/
void
gdk_cairo_set_source_color (cairo_t *cr,
const GdkColor *color)
const GdkColor *color)
{
g_return_if_fail (cr != NULL);
g_return_if_fail (color != NULL);
cairo_set_source_rgb (cr,
color->red / 65535.,
color->green / 65535.,
color->blue / 65535.);
color->red / 65535.,
color->green / 65535.,
color->blue / 65535.);
}
/**
* gdk_cairo_set_source_rgba:
* @cr: a cairo context
* @cr: a #cairo_t
* @rgba: a #GdkRGBA
*
* Sets the specified #GdkRGBA as the source color of @cr.
*
* Since: 3.0
*/
**/
void
gdk_cairo_set_source_rgba (cairo_t *cr,
const GdkRGBA *rgba)
@@ -128,37 +127,37 @@ gdk_cairo_set_source_rgba (cairo_t *cr,
/**
* gdk_cairo_rectangle:
* @cr: a cairo context
* @cr: a #cairo_t
* @rectangle: a #GdkRectangle
*
*
* Adds the given rectangle to the current path of @cr.
*
* Since: 2.8
*/
**/
void
gdk_cairo_rectangle (cairo_t *cr,
const GdkRectangle *rectangle)
const GdkRectangle *rectangle)
{
g_return_if_fail (cr != NULL);
g_return_if_fail (rectangle != NULL);
cairo_rectangle (cr,
rectangle->x, rectangle->y,
rectangle->width, rectangle->height);
rectangle->x, rectangle->y,
rectangle->width, rectangle->height);
}
/**
* gdk_cairo_region:
* @cr: a cairo context
* @cr: a #cairo_t
* @region: a #cairo_region_t
*
*
* Adds the given region to the current path of @cr.
*
* Since: 2.8
*/
**/
void
gdk_cairo_region (cairo_t *cr,
const cairo_region_t *region)
const cairo_region_t *region)
{
cairo_rectangle_int_t box;
gint n_boxes, i;
@@ -177,23 +176,22 @@ gdk_cairo_region (cairo_t *cr,
/**
* gdk_cairo_set_source_pixbuf:
* @cr: a cairo context
* @cr: a #Cairo context
* @pixbuf: a #GdkPixbuf
* @pixbuf_x: X coordinate of location to place upper left corner of @pixbuf
* @pixbuf_y: Y coordinate of location to place upper left corner of @pixbuf
*
* Sets the given pixbuf as the source pattern for @cr.
*
*
* Sets the given pixbuf as the source pattern for the Cairo context.
* The pattern has an extend mode of %CAIRO_EXTEND_NONE and is aligned
* so that the origin of @pixbuf is @pixbuf_x, @pixbuf_y.
* so that the origin of @pixbuf is @pixbuf_x, @pixbuf_y
*
* Since: 2.8
*/
**/
void
gdk_cairo_set_source_pixbuf (cairo_t *cr,
const GdkPixbuf *pixbuf,
gdouble pixbuf_x,
gdouble pixbuf_y)
const GdkPixbuf *pixbuf,
double pixbuf_x,
double pixbuf_y)
{
gint width = gdk_pixbuf_get_width (pixbuf);
gint height = gdk_pixbuf_get_height (pixbuf);
@@ -219,7 +217,7 @@ gdk_cairo_set_source_pixbuf (cairo_t *cr,
width, height, cairo_stride);
cairo_surface_set_user_data (surface, &key,
cairo_pixels, (cairo_destroy_func_t)g_free);
cairo_pixels, (cairo_destroy_func_t)g_free);
for (j = height; j; j--)
{
@@ -227,51 +225,51 @@ gdk_cairo_set_source_pixbuf (cairo_t *cr,
guchar *q = cairo_pixels;
if (n_channels == 3)
{
guchar *end = p + 3 * width;
while (p < end)
{
{
guchar *end = p + 3 * width;
while (p < end)
{
#if G_BYTE_ORDER == G_LITTLE_ENDIAN
q[0] = p[2];
q[1] = p[1];
q[2] = p[0];
#else
q[1] = p[0];
q[2] = p[1];
q[3] = p[2];
q[0] = p[2];
q[1] = p[1];
q[2] = p[0];
#else
q[1] = p[0];
q[2] = p[1];
q[3] = p[2];
#endif
p += 3;
q += 4;
}
}
p += 3;
q += 4;
}
}
else
{
guchar *end = p + 4 * width;
guint t1,t2,t3;
{
guchar *end = p + 4 * width;
guint t1,t2,t3;
#define MULT(d,c,a,t) G_STMT_START { t = c * a + 0x7f; d = ((t >> 8) + t) >> 8; } G_STMT_END
while (p < end)
{
while (p < end)
{
#if G_BYTE_ORDER == G_LITTLE_ENDIAN
MULT(q[0], p[2], p[3], t1);
MULT(q[1], p[1], p[3], t2);
MULT(q[2], p[0], p[3], t3);
q[3] = p[3];
#else
q[0] = p[3];
MULT(q[1], p[0], p[3], t1);
MULT(q[2], p[1], p[3], t2);
MULT(q[3], p[2], p[3], t3);
MULT(q[0], p[2], p[3], t1);
MULT(q[1], p[1], p[3], t2);
MULT(q[2], p[0], p[3], t3);
q[3] = p[3];
#else
q[0] = p[3];
MULT(q[1], p[0], p[3], t1);
MULT(q[2], p[1], p[3], t2);
MULT(q[3], p[2], p[3], t3);
#endif
p += 4;
q += 4;
}
p += 4;
q += 4;
}
#undef MULT
}
}
gdk_pixels += gdk_rowstride;
cairo_pixels += cairo_stride;
@@ -283,13 +281,12 @@ gdk_cairo_set_source_pixbuf (cairo_t *cr,
/**
* gdk_cairo_set_source_window:
* @cr: a cairo context
* @cr: a #Cairo context
* @window: a #GdkWindow
* @x: X coordinate of location to place upper left corner of @window
* @y: Y coordinate of location to place upper left corner of @window
*
* Sets the given window as the source pattern for @cr.
*
* Sets the given window as the source pattern for the Cairo context.
* The pattern has an extend mode of %CAIRO_EXTEND_NONE and is aligned
* so that the origin of @window is @x, @y. The window contains all its
* subwindows when rendering.
@@ -302,11 +299,11 @@ gdk_cairo_set_source_pixbuf (cairo_t *cr,
void
gdk_cairo_set_source_window (cairo_t *cr,
GdkWindow *window,
gdouble x,
gdouble y)
double x,
double y)
{
cairo_surface_t *surface;
g_return_if_fail (cr != NULL);
g_return_if_fail (GDK_IS_WINDOW (window));
@@ -315,24 +312,23 @@ gdk_cairo_set_source_window (cairo_t *cr,
cairo_surface_destroy (surface);
}
/*
/**
* _gdk_cairo_surface_extents:
* @surface: surface to measure
* @extents: (out): rectangle to put the extents
*
* Measures the area covered by @surface and puts it into @extents.
*
* Note that this function respects device offsets set on @surface.
* If @surface is unbounded, the resulting extents will be empty and
* if @surface is unbounded, the resulting extents will be empty and
* not be a maximal sized rectangle. This is to avoid careless coding.
* You must explicitly check the return value of you want to handle
* that case.
*
* Returns: %TRUE if the extents fit in a #GdkRectangle, %FALSE if not
*/
* Returns: %TRUE if the extents fit in a #GdkRectangle, %FALSE if not.
**/
gboolean
_gdk_cairo_surface_extents (cairo_surface_t *surface,
GdkRectangle *extents)
GdkRectangle *extents)
{
double x1, x2, y1, y2;
cairo_t *cr;
@@ -350,7 +346,7 @@ _gdk_cairo_surface_extents (cairo_surface_t *surface,
y2 = ceil (y2);
x2 -= x1;
y2 -= y1;
if (x1 < G_MININT || x1 > G_MAXINT ||
y1 < G_MININT || y1 > G_MAXINT ||
x2 > G_MAXINT || y2 > G_MAXINT)
@@ -375,15 +371,14 @@ _gdk_cairo_surface_extents (cairo_surface_t *surface,
*/
/**
* gdk_cairo_region_create_from_surface:
* @surface: a cairo surface
* @surface: A surface
*
* Creates region that describes covers the area where the given
* @surface is more than 50% opaque.
* Creates region that describes covers the area where the given @surface
* is more than 50% opaque. This function takes into account device
* offsets that might be set with cairo_surface_set_device_offset().
*
* This function takes into account device offsets that might be
* set with cairo_surface_set_device_offset().
*
* Returns: A #cairo_region_t; must be freed with cairo_region_destroy()
* Returns: A #cairo_region_t. This must be freed with cairo_region_destroy()
* when you are done.
*/
cairo_region_t *
gdk_cairo_region_create_from_surface (cairo_surface_t *surface)
@@ -422,36 +417,37 @@ gdk_cairo_region_create_from_surface (cairo_surface_t *surface)
for (y = 0; y < extents.height; y++)
{
for (x = 0; x < extents.width; x++)
{
/* Search for a continuous range of "non transparent pixels"*/
gint x0 = x;
while (x < extents.width)
{
if (((data[x / 8] >> (x%8)) & 1) == 0)
/* This pixel is "transparent"*/
break;
x++;
}
if (x > x0)
{
/* Add the pixels (x0, y) to (x, y+1) as a new rectangle
* in the region
*/
{
/* Search for a continuous range of "non transparent pixels"*/
gint x0 = x;
while (x < extents.width)
{
if (((data[x / 8] >> (x%8)) & 1) == 0)
/* This pixel is "transparent"*/
break;
x++;
}
if (x > x0)
{
/* Add the pixels (x0, y) to (x, y+1) as a new rectangle
* in the region
*/
rect.x = x0;
rect.width = x - x0;
rect.y = y;
rect.height = 1;
cairo_region_union_rectangle (region, &rect);
}
}
}
}
data += stride;
}
cairo_surface_destroy (image);
cairo_region_translate (region, extents.x, extents.y);
return region;
}
+21 -21
View File
@@ -31,31 +31,31 @@
G_BEGIN_DECLS
cairo_t * gdk_cairo_create (GdkWindow *window);
gboolean gdk_cairo_get_clip_rectangle (cairo_t *cr,
GdkRectangle *rect);
cairo_t *gdk_cairo_create (GdkWindow *window);
gboolean gdk_cairo_get_clip_rectangle(cairo_t *cr,
GdkRectangle *rect);
void gdk_cairo_set_source_color (cairo_t *cr,
const GdkColor *color);
void gdk_cairo_set_source_rgba (cairo_t *cr,
const GdkRGBA *rgba);
void gdk_cairo_set_source_pixbuf (cairo_t *cr,
const GdkPixbuf *pixbuf,
gdouble pixbuf_x,
gdouble pixbuf_y);
void gdk_cairo_set_source_window (cairo_t *cr,
GdkWindow *window,
gdouble x,
gdouble y);
void gdk_cairo_set_source_color (cairo_t *cr,
const GdkColor *color);
void gdk_cairo_set_source_rgba (cairo_t *cr,
const GdkRGBA *rgba);
void gdk_cairo_set_source_pixbuf (cairo_t *cr,
const GdkPixbuf *pixbuf,
double pixbuf_x,
double pixbuf_y);
void gdk_cairo_set_source_window (cairo_t *cr,
GdkWindow *window,
double x,
double y);
void gdk_cairo_rectangle (cairo_t *cr,
const GdkRectangle *rectangle);
void gdk_cairo_region (cairo_t *cr,
const cairo_region_t *region);
void gdk_cairo_rectangle (cairo_t *cr,
const GdkRectangle *rectangle);
void gdk_cairo_region (cairo_t *cr,
const cairo_region_t *region);
cairo_region_t *
gdk_cairo_region_create_from_surface
(cairo_surface_t *surface);
gdk_cairo_region_create_from_surface
(cairo_surface_t *surface);
G_END_DECLS
+45 -55
View File
@@ -37,29 +37,23 @@
* SECTION:colors
* @Short_description: Manipulation of colors
* @Title: Colors
*
* A #GdkColor represents a color.
*
* When working with cairo, it is often more convenient
* to use a #GdkRGBA instead.
*/
/**
* gdk_color_copy:
* @color: a #GdkColor
*
* Makes a copy of a color structure.
*
* The result must be freed using gdk_color_free().
*
* Return value: a copy of @color
*/
* @color: a #GdkColor.
*
* Makes a copy of a color structure. The result
* must be freed using gdk_color_free().
*
* Return value: a copy of @color.
**/
GdkColor*
gdk_color_copy (const GdkColor *color)
{
GdkColor *new_color;
g_return_val_if_fail (color != NULL, NULL);
new_color = g_slice_new (GdkColor);
@@ -69,10 +63,11 @@ gdk_color_copy (const GdkColor *color)
/**
* gdk_color_free:
* @color: a #GdkColor
*
* Frees a color structure created with gdk_color_copy().
*/
* @color: a #GdkColor.
*
* Frees a color structure created with
* gdk_color_copy().
**/
void
gdk_color_free (GdkColor *color)
{
@@ -83,41 +78,41 @@ gdk_color_free (GdkColor *color)
/**
* gdk_color_hash:
* @color: a #GdkColor
*
* @colora: a #GdkColor.
*
* A hash function suitable for using for a hash
* table that stores #GdkColors.
*
* Return value: The hash function applied to @color
*/
* table that stores #GdkColor's.
*
* Return value: The hash function applied to @colora
**/
guint
gdk_color_hash (const GdkColor *color)
gdk_color_hash (const GdkColor *colora)
{
return ((color->red) +
(color->green << 11) +
(color->blue << 22) +
(color->blue >> 6));
return ((colora->red) +
(colora->green << 11) +
(colora->blue << 22) +
(colora->blue >> 6));
}
/**
* gdk_color_equal:
* @colora: a #GdkColor
* @colorb: another #GdkColor
*
* Compares two colors.
*
* @colora: a #GdkColor.
* @colorb: another #GdkColor.
*
* Compares two colors.
*
* Return value: %TRUE if the two colors compare equal
*/
**/
gboolean
gdk_color_equal (const GdkColor *colora,
const GdkColor *colorb)
const GdkColor *colorb)
{
g_return_val_if_fail (colora != NULL, FALSE);
g_return_val_if_fail (colorb != NULL, FALSE);
return ((colora->red == colorb->red) &&
(colora->green == colorb->green) &&
(colora->blue == colorb->blue));
(colora->green == colorb->green) &&
(colora->blue == colorb->blue));
}
G_DEFINE_BOXED_TYPE (GdkColor, gdk_color,
@@ -126,28 +121,25 @@ G_DEFINE_BOXED_TYPE (GdkColor, gdk_color,
/**
* gdk_color_parse:
* @spec: the string specifying the color
* @spec: the string specifying the color.
* @color: (out): the #GdkColor to fill in
*
* Parses a textual specification of a color and fill in the
* <structfield>red</structfield>, <structfield>green</structfield>,
* and <structfield>blue</structfield> fields of a #GdkColor
* structure.
*
* The string can either one of a large set of standard names
* (taken from the X11 <filename>rgb.txt</filename> file), or
* structure. The string can either one of a large set of standard
* names. (Taken from the X11 <filename>rgb.txt</filename> file), or
* it can be a hex value in the form '&num;rgb' '&num;rrggbb'
* '&num;rrrgggbbb' or '&num;rrrrggggbbbb' where 'r', 'g' and
* 'b' are hex digits of the red, green, and blue components
* of the color, respectively. (White in the four forms is
* '&num;fff', '&num;ffffff', '&num;fffffffff' and
* '&num;ffffffffffff').
*
* Return value: %TRUE if the parsing succeeded
*/
* '&num;rrrgggbbb' or '&num;rrrrggggbbbb' where 'r', 'g' and 'b' are
* hex digits of the red, green, and blue components of the color,
* respectively. (White in the four forms is '&num;fff' '&num;ffffff'
* '&num;fffffffff' and '&num;ffffffffffff')
*
* Return value: %TRUE if the parsing succeeded.
**/
gboolean
gdk_color_parse (const gchar *spec,
GdkColor *color)
GdkColor *color)
{
PangoColor pango_color;
@@ -172,12 +164,10 @@ gdk_color_parse (const gchar *spec,
* <literal>g</literal> and <literal>b</literal> are hex digits
* representing the red, green and blue components respectively.
*
* The returned string can be parsed by gdk_color_parse().
*
* Return value: a newly-allocated text string
*
* Since: 2.12
*/
**/
gchar *
gdk_color_to_string (const GdkColor *color)
{
+15 -17
View File
@@ -39,16 +39,16 @@ G_BEGIN_DECLS
/**
* GdkColor:
* @pixel: For allocated colors, the pixel value used to
* draw this color on the screen. Not used anymore.
* @pixel: For allocated colors, the value used to
* draw this color on the screen.
* @red: The red component of the color. This is
* a value between 0 and 65535, with 65535 indicating
* full intensitiy
* @green: The green component of the color
* @blue: The blue component of the color
* a value between 0 and 65535, with 65535 indicating
* full intensitiy.
* @green: The green component of the color.
* @blue: The blue component of the color.
*
* The #GdkColor structure is used to describe a color,
* similar to the XColor struct used in the X11 drawing API.
* The #GdkColor structure is used to describe an
* allocated or unallocated color.
*/
struct _GdkColor
{
@@ -58,21 +58,19 @@ struct _GdkColor
guint16 blue;
};
#define GDK_TYPE_COLOR (gdk_color_get_type ())
GType gdk_color_get_type (void) G_GNUC_CONST;
#define GDK_TYPE_COLOR (gdk_color_get_type ())
GdkColor *gdk_color_copy (const GdkColor *color);
void gdk_color_free (GdkColor *color);
guint gdk_color_hash (const GdkColor *color);
gboolean gdk_color_equal (const GdkColor *colora,
const GdkColor *colorb);
gboolean gdk_color_parse (const gchar *spec,
GdkColor *color);
GdkColor *color);
guint gdk_color_hash (const GdkColor *colora);
gboolean gdk_color_equal (const GdkColor *colora,
const GdkColor *colorb);
gchar * gdk_color_to_string (const GdkColor *color);
GType gdk_color_get_type (void) G_GNUC_CONST;
G_END_DECLS
+22 -11
View File
@@ -1,22 +1,33 @@
/* gdkconfig.h
*
* This is a generated file. Please modify `configure.ac'
* This is a pre-generated file.
*/
#ifndef __GDKCONFIG_H__
#define __GDKCONFIG_H__
#ifndef GDKCONFIG_H
#define GDKCONFIG_H
#if !defined (__GDK_H_INSIDE__) && !defined (GDK_COMPILATION)
#error "Only <gdk/gdk.h> can be included directly."
#endif
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#include <glib.h>
G_BEGIN_DECLS
#ifndef GSEAL
/* introduce GSEAL() here for all of Gdk and Gtk+ without the need to modify GLib */
# ifdef GSEAL_ENABLE
# define GSEAL(ident) _g_sealed__ ## ident
# else
# define GSEAL(ident) ident
# endif
#endif /* !GSEAL */
#define GDK_NATIVE_WINDOW_POINTER
#define GDK_WINDOWING_WIN32
G_END_DECLS
#define GDK_HAVE_WCHAR_H 1
#define GDK_HAVE_WCTYPE_H 1
#endif /* __GDKCONFIG_H__ */
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* GDKCONFIG_H */
+2 -2
View File
@@ -32,8 +32,7 @@
* @Title: GdkDevice
* @See_also: #GdkDeviceManager
*
* The #GdkDevice object represents a single input device, such
* as a keyboard, a mouse, a touchpad, etc.
* The #GdkDevice object represents a single input device.
*
* See the #GdkDeviceManager documentation for more information
* about the various kinds of master and slave devices, and their
@@ -49,6 +48,7 @@ struct _GdkAxisInfo
gdouble min_axis;
gdouble max_axis;
gdouble min_value;
gdouble max_value;
gdouble resolution;
+1 -1
View File
@@ -99,7 +99,7 @@ typedef enum
* @GDK_AXIS_Y: the axis is used as the y axis.
* @GDK_AXIS_PRESSURE: the axis is used for pressure information.
* @GDK_AXIS_XTILT: the axis is used for x tilt information.
* @GDK_AXIS_YTILT: the axis is used for y tilt information.
* @GDK_AXIS_YTILT: the axis is used for x tilt information.
* @GDK_AXIS_WHEEL: the axis is used for wheel information.
* @GDK_AXIS_LAST: a constant equal to the numerically highest axis value.
*
+8 -8
View File
@@ -41,19 +41,19 @@
* By default, and if the platform supports it, GDK is aware of multiple
* keyboard/pointer pairs and multitouch devices, this behavior can be
* changed by calling gdk_disable_multidevice() before gdk_display_open(),
* although there would rarely be a reason to do that. For a widget or
* although there would be rarely a reason to do that. For a widget or
* window to be dealt as multipointer aware,
* gdk_window_set_support_multidevice() or
* gtk_widget_set_support_multidevice() must have been called on it.
*
* Conceptually, in multidevice mode there are 2 device types. Virtual
* Conceptually, in multidevice mode there are 2 device types, virtual
* devices (or master devices) are represented by the pointer cursors
* and keyboard foci that are seen on the screen. Physical devices (or
* slave devices) represent the hardware that is controlling the virtual
* devices, and thus have no visible cursor on the screen.
* devices, and thus has no visible cursor on the screen.
*
* Virtual devices are always paired, so there is a keyboard device for every
* pointer device. Associations between devices may be inspected through
* Virtual devices are always paired, there is a keyboard device for every
* pointer device, associations between devices may be inspected through
* gdk_device_get_associated_device().
*
* There may be several virtual devices, and several physical devices could
@@ -72,9 +72,9 @@
* #GDK_DRAG_MOTION, #GDK_DRAG_STATUS, #GDK_DROP_START, #GDK_DROP_FINISHED
* and #GDK_GRAB_BROKEN.
* </footnote>
* Although gdk_window_set_support_multidevice() must be called on
* although gdk_window_set_support_multidevice() has to be called on
* #GdkWindows in order to support additional features of multiple pointer
* interaction, such as multiple per-device enter/leave events, the default
* interaction, such as multiple, per-device enter/leave events. The default
* setting will emit just one enter/leave event pair for all devices on the
* window. See gdk_window_set_support_multidevice() documentation for more
* information.
@@ -101,7 +101,7 @@
* physical devices being plugged or unplugged), GDK provides
* #GdkDeviceManager. On X11, multidevice support is implemented through
* XInput 2. Unless gdk_disable_multidevice() is called, the XInput 2.x
* #GdkDeviceManager implementation will be used as the input source. Otherwise
* #GdkDeviceManager implementation will be used as input source, else
* either the core or XInput 1.x implementations will be used.
*/
+165 -80
View File
@@ -38,32 +38,26 @@
/**
* SECTION:gdkdisplay
* @Short_description: Controls a set of GdkScreens and their associated input devices
* @Short_description: Controls the keyboard/mouse pointer grabs and a set of <type>GdkScreen</type>s
* @Title: GdkDisplay
*
* #GdkDisplay objects purpose are two fold:
* <itemizedlist>
* <listitem>
* To manage and provide information about input devices (pointers
* and keyboards)
* </listitem>
* <listitem>
* To manage and provide information about the available #GdkScreens
* </listitem>
* <listitem><para>
* To grab/ungrab keyboard focus and mouse pointer
* </para></listitem>
* <listitem><para>
* To manage and provide information about the #GdkScreen(s)
* available for this #GdkDisplay
* </para></listitem>
* </itemizedlist>
*
* GdkDisplay objects are the GDK representation of an X Display,
* which can be described as <emphasis>a workstation consisting of
* a keyboard, a pointing device (such as a mouse) and one or more
* screens</emphasis>.
* It is used to open and keep track of various GdkScreen objects
* currently instantiated by the application. It is also used to
* access the keyboard(s) and mouse pointer(s) of the display.
*
* Most of the input device handling has been factored out into
* the separate #GdkDeviceManager object. Every display has a
* device manager, which you can obtain using
* gdk_display_get_device_manager().
* #GdkDisplay objects are the GDK representation of the X Display which can be
* described as <emphasis>a workstation consisting of a keyboard a pointing
* device (such as a mouse) and one or more screens</emphasis>.
* It is used to open and keep track of various #GdkScreen objects currently
* instanciated by the application. It is also used to grab and release the keyboard
* and the mouse pointer.
*/
@@ -529,6 +523,48 @@ gdk_flush (void)
g_slist_free (list);
}
/**
* gdk_event_send_client_message:
* @event: the #GdkEvent to send, which should be a #GdkEventClient.
* @winid: the window to send the X ClientMessage event to.
*
* Sends an X ClientMessage event to a given window (which must be
* on the default #GdkDisplay.)
* This could be used for communicating between different applications,
* though the amount of data is limited to 20 bytes.
*
* Return value: non-zero on success.
**/
gboolean
gdk_event_send_client_message (GdkEvent *event,
GdkNativeWindow winid)
{
g_return_val_if_fail (event != NULL, FALSE);
return gdk_event_send_client_message_for_display (gdk_display_get_default (),
event, winid);
}
/**
* gdk_event_send_clientmessage_toall:
* @event: the #GdkEvent to send, which should be a #GdkEventClient.
*
* Sends an X ClientMessage event to all toplevel windows on the default
* #GdkScreen.
*
* Toplevel windows are determined by checking for the WM_STATE property, as
* described in the Inter-Client Communication Conventions Manual (ICCCM).
* If no windows are found with the WM_STATE property set, the message is sent
* to all children of the root window.
**/
void
gdk_event_send_clientmessage_toall (GdkEvent *event)
{
g_return_if_fail (event != NULL);
gdk_screen_broadcast_client_message (gdk_screen_get_default (), event);
}
void
_gdk_display_enable_motion_hints (GdkDisplay *display,
GdkDevice *device)
@@ -1342,9 +1378,7 @@ gdk_display_get_device_manager (GdkDisplay *display)
G_CONST_RETURN gchar *
gdk_display_get_name (GdkDisplay *display)
{
g_return_val_if_fail (GDK_IS_DISPLAY (display), NULL);
return GDK_DISPLAY_GET_CLASS (display)->get_name (display);
return GDK_DISPLAY_GET_CLASS(display)->get_name (display);
}
gchar *
@@ -1366,9 +1400,7 @@ gdk_get_display (void)
gint
gdk_display_get_n_screens (GdkDisplay *display)
{
g_return_val_if_fail (GDK_IS_DISPLAY (display), 0);
return GDK_DISPLAY_GET_CLASS (display)->get_n_screens (display);
return GDK_DISPLAY_GET_CLASS(display)->get_n_screens (display);
}
/**
@@ -1386,9 +1418,7 @@ GdkScreen *
gdk_display_get_screen (GdkDisplay *display,
gint screen_num)
{
g_return_val_if_fail (GDK_IS_DISPLAY (display), NULL);
return GDK_DISPLAY_GET_CLASS (display)->get_screen (display, screen_num);
return GDK_DISPLAY_GET_CLASS(display)->get_screen (display, screen_num);
}
/**
@@ -1404,9 +1434,7 @@ gdk_display_get_screen (GdkDisplay *display,
GdkScreen *
gdk_display_get_default_screen (GdkDisplay *display)
{
g_return_val_if_fail (GDK_IS_DISPLAY (display), NULL);
return GDK_DISPLAY_GET_CLASS (display)->get_default_screen (display);
return GDK_DISPLAY_GET_CLASS(display)->get_default_screen (display);
}
/**
@@ -1420,9 +1448,7 @@ gdk_display_get_default_screen (GdkDisplay *display)
void
gdk_display_beep (GdkDisplay *display)
{
g_return_if_fail (GDK_IS_DISPLAY (display));
GDK_DISPLAY_GET_CLASS (display)->beep (display);
GDK_DISPLAY_GET_CLASS(display)->beep (display);
}
/**
@@ -1444,9 +1470,7 @@ gdk_display_beep (GdkDisplay *display)
void
gdk_display_sync (GdkDisplay *display)
{
g_return_if_fail (GDK_IS_DISPLAY (display));
GDK_DISPLAY_GET_CLASS (display)->sync (display);
GDK_DISPLAY_GET_CLASS(display)->sync (display);
}
/**
@@ -1468,9 +1492,7 @@ gdk_display_sync (GdkDisplay *display)
void
gdk_display_flush (GdkDisplay *display)
{
g_return_if_fail (GDK_IS_DISPLAY (display));
GDK_DISPLAY_GET_CLASS (display)->flush (display);
GDK_DISPLAY_GET_CLASS(display)->flush (display);
}
/**
@@ -1489,9 +1511,7 @@ gdk_display_flush (GdkDisplay *display)
GdkWindow *
gdk_display_get_default_group (GdkDisplay *display)
{
g_return_val_if_fail (GDK_IS_DISPLAY (display), NULL);
return GDK_DISPLAY_GET_CLASS (display)->get_default_group (display);
return GDK_DISPLAY_GET_CLASS(display)->get_default_group (display);
}
/**
@@ -1509,9 +1529,7 @@ gdk_display_get_default_group (GdkDisplay *display)
gboolean
gdk_display_supports_selection_notification (GdkDisplay *display)
{
g_return_val_if_fail (GDK_IS_DISPLAY (display), FALSE);
return GDK_DISPLAY_GET_CLASS (display)->supports_selection_notification (display);
return GDK_DISPLAY_GET_CLASS(display)->supports_selection_notification (display);
}
/**
@@ -1533,9 +1551,7 @@ gdk_display_request_selection_notification (GdkDisplay *display,
GdkAtom selection)
{
g_return_val_if_fail (GDK_IS_DISPLAY (display), FALSE);
return GDK_DISPLAY_GET_CLASS (display)->request_selection_notification (display, selection);
return GDK_DISPLAY_GET_CLASS(display)->request_selection_notification (display, selection);
}
/**
@@ -1554,9 +1570,7 @@ gdk_display_request_selection_notification (GdkDisplay *display,
gboolean
gdk_display_supports_clipboard_persistence (GdkDisplay *display)
{
g_return_val_if_fail (GDK_IS_DISPLAY (display), FALSE);
return GDK_DISPLAY_GET_CLASS (display)->supports_clipboard_persistence (display);
return GDK_DISPLAY_GET_CLASS(display)->supports_clipboard_persistence (display);
}
/**
@@ -1564,7 +1578,7 @@ gdk_display_supports_clipboard_persistence (GdkDisplay *display)
* @display: a #GdkDisplay
* @clipboard_window: a #GdkWindow belonging to the clipboard owner
* @time_: a timestamp
* @targets: (array length=n_targets): an array of targets
* @targets: (array length=n_targets): an array of targets
* that should be saved, or %NULL
* if all available targets should be saved.
* @n_targets: length of the @targets array
@@ -1584,9 +1598,7 @@ gdk_display_store_clipboard (GdkDisplay *display,
const GdkAtom *targets,
gint n_targets)
{
g_return_if_fail (GDK_IS_DISPLAY (display));
GDK_DISPLAY_GET_CLASS (display)->store_clipboard (display, clipboard_window, time_, targets, n_targets);
GDK_DISPLAY_GET_CLASS(display)->store_clipboard (display, clipboard_window, time_, targets, n_targets);
}
/**
@@ -1603,9 +1615,7 @@ gdk_display_store_clipboard (GdkDisplay *display,
gboolean
gdk_display_supports_shapes (GdkDisplay *display)
{
g_return_val_if_fail (GDK_IS_DISPLAY (display), FALSE);
return GDK_DISPLAY_GET_CLASS (display)->supports_shapes (display);
return GDK_DISPLAY_GET_CLASS(display)->supports_shapes (display);
}
/**
@@ -1622,9 +1632,7 @@ gdk_display_supports_shapes (GdkDisplay *display)
gboolean
gdk_display_supports_input_shapes (GdkDisplay *display)
{
g_return_val_if_fail (GDK_IS_DISPLAY (display), FALSE);
return GDK_DISPLAY_GET_CLASS (display)->supports_input_shapes (display);
return GDK_DISPLAY_GET_CLASS(display)->supports_input_shapes (display);
}
/**
@@ -1644,9 +1652,7 @@ gdk_display_supports_input_shapes (GdkDisplay *display)
gboolean
gdk_display_supports_composite (GdkDisplay *display)
{
g_return_val_if_fail (GDK_IS_DISPLAY (display), FALSE);
return GDK_DISPLAY_GET_CLASS (display)->supports_composite (display);
return GDK_DISPLAY_GET_CLASS(display)->supports_composite (display);
}
/**
@@ -1666,9 +1672,77 @@ gdk_display_supports_composite (GdkDisplay *display)
GList *
gdk_display_list_devices (GdkDisplay *display)
{
g_return_val_if_fail (GDK_IS_DISPLAY (display), NULL);
return GDK_DISPLAY_GET_CLASS(display)->list_devices (display);
}
return GDK_DISPLAY_GET_CLASS (display)->list_devices (display);
/**
* gdk_event_send_client_message_for_display:
* @display: the #GdkDisplay for the window where the message is to be sent.
* @event: the #GdkEvent to send, which should be a #GdkEventClient.
* @winid: the window to send the client message to.
*
* On X11, sends an X ClientMessage event to a given window. On
* Windows, sends a message registered with the name
* GDK_WIN32_CLIENT_MESSAGE.
*
* This could be used for communicating between different
* applications, though the amount of data is limited to 20 bytes on
* X11, and to just four bytes on Windows.
*
* Returns: non-zero on success.
*
* Since: 2.2
*/
gboolean
gdk_event_send_client_message_for_display (GdkDisplay *display,
GdkEvent *event,
GdkNativeWindow winid)
{
return GDK_DISPLAY_GET_CLASS(display)->send_client_message (display, event, winid);
}
/**
* gdk_display_add_client_message_filter: (skip)
* @display: a #GdkDisplay for which this message filter applies
* @message_type: the type of ClientMessage events to receive.
* This will be checked against the @message_type field
* of the XClientMessage event struct.
* @func: the function to call to process the event.
* @data: user data to pass to @func.
*
* Adds a filter to be called when X ClientMessage events are received.
* See gdk_window_add_filter() if you are interested in filtering other
* types of events.
*
* Since: 2.2
**/
void
gdk_display_add_client_message_filter (GdkDisplay *display,
GdkAtom message_type,
GdkFilterFunc func,
gpointer data)
{
GDK_DISPLAY_GET_CLASS(display)->add_client_message_filter (display, message_type, func, data);
}
/**
* gdk_add_client_message_filter: (skip)
* @message_type: the type of ClientMessage events to receive. This will be
* checked against the <structfield>message_type</structfield> field of the
* XClientMessage event struct.
* @func: the function to call to process the event.
* @data: user data to pass to @func.
*
* Adds a filter to the default display to be called when X ClientMessage events
* are received. See gdk_display_add_client_message_filter().
**/
void
gdk_add_client_message_filter (GdkAtom message_type,
GdkFilterFunc func,
gpointer data)
{
gdk_display_add_client_message_filter (gdk_display_get_default (),
message_type, func, data);
}
static GdkAppLaunchContext *
@@ -1698,9 +1772,29 @@ gdk_display_real_get_app_launch_context (GdkDisplay *display)
GdkAppLaunchContext *
gdk_display_get_app_launch_context (GdkDisplay *display)
{
g_return_val_if_fail (GDK_IS_DISPLAY (display), NULL);
return GDK_DISPLAY_GET_CLASS(display)->get_app_launch_context (display);
}
return GDK_DISPLAY_GET_CLASS (display)->get_app_launch_context (display);
/**
* gdk_drag_get_protocol_for_display:
* @display: the #GdkDisplay where the destination window resides
* @xid: the windowing system id of the destination window.
* @protocol: (out): location where the supported DND protocol is returned.
*
* Finds out the DND protocol supported by a window.
*
* Return value: the windowing system id of the window where the drop
* should happen. This may be @xid or the id of a proxy window,
* or zero if @xid does not support Drag and Drop.
*
* Since: 2.2
*/
GdkNativeWindow
gdk_drag_get_protocol_for_display (GdkDisplay *display,
GdkNativeWindow xid,
GdkDragProtocol *protocol)
{
return GDK_DISPLAY_GET_CLASS (display)->get_drag_protocol (display, xid, protocol, NULL);
}
/**
@@ -1717,8 +1811,7 @@ gdk_display_get_app_launch_context (GdkDisplay *display)
GdkDisplay *
gdk_display_open (const gchar *display_name)
{
return gdk_display_manager_open_display (gdk_display_manager_get (),
display_name);
return gdk_display_manager_open_display (gdk_display_manager_get (), display_name);
}
/**
@@ -1735,8 +1828,6 @@ gdk_display_open (const gchar *display_name)
gboolean
gdk_display_has_pending (GdkDisplay *display)
{
g_return_val_if_fail (GDK_IS_DISPLAY (display), FALSE);
return GDK_DISPLAY_GET_CLASS (display)->has_pending (display);
}
@@ -1855,8 +1946,6 @@ gdk_display_warp_pointer (GdkDisplay *display,
gint x,
gint y)
{
g_return_if_fail (GDK_IS_DISPLAY (display));
gdk_device_warp (display->core_pointer,
screen,
x, y);
@@ -1934,8 +2023,6 @@ void
gdk_display_notify_startup_complete (GdkDisplay *display,
const gchar *startup_id)
{
g_return_if_fail (GDK_IS_DISPLAY (display));
GDK_DISPLAY_GET_CLASS (display)->notify_startup_complete (display, startup_id);
}
@@ -1991,8 +2078,6 @@ _gdk_display_create_window (GdkDisplay *display)
GdkKeymap*
gdk_keymap_get_for_display (GdkDisplay *display)
{
g_return_val_if_fail (GDK_IS_DISPLAY (display), NULL);
return GDK_DISPLAY_GET_CLASS (display)->get_keymap (display);
}
+5
View File
@@ -80,6 +80,11 @@ void gdk_display_put_event (GdkDisplay *display,
const GdkEvent *event);
gboolean gdk_display_has_pending (GdkDisplay *display);
void gdk_display_add_client_message_filter (GdkDisplay *display,
GdkAtom message_type,
GdkFilterFunc func,
gpointer data);
void gdk_display_set_double_click_time (GdkDisplay *display,
guint msec);
void gdk_display_set_double_click_distance (GdkDisplay *display,
+8 -45
View File
@@ -56,43 +56,6 @@
* The purpose of the #GdkDisplayManager singleton object is to offer
* notification when displays appear or disappear or the default display
* changes.
*
* You can use gdk_display_manager_get() to obtain the GdkDisplayManager
* singleton, but that should be rarely necessary. Typically, initializing
* GTK+ opens a display that you can work with without ever accessing the
* GdkDisplayManager.
*
* The GDK library can be built with support for multiple backends.
* The GdkDisplayManager object determines which backend is used
* at runtime.
*
* When writing backend-specific code that is supposed to work with
* multiple GDK backends, you have to consider both compile time and
* runtime. At compile time, use the #GDK_WINDOWING_X11, #GDK_WINDOWING_WIN32
* macros, etc. to find out which backends are present in the GDK library
* you are building your application against. At runtime, use type-check
* macros like GDK_IS_X11_DISPLAY() to find out which backend is in use:
*
* <example id="backend-specific">
* <title>Backend-specific code</title>
* <programlisting>
* #ifdef GDK_WINDOWING_X11
* if (GDK_IS_X11_DISPLAY (display))
* {
* /&ast; make X11-specific calls here &ast;/
* }
* else
* #endif
* #ifdef GDK_WINDOWING_QUARTZ
* if (GDK_IS_QUARTZ_DISPLAY (display))
* {
* /&ast; make Quartz-specific calls here &ast;/
* }
* else
* #endif
* g_error ("Unsupported GDK backend");
* </programlisting>
* </example>
*/
@@ -205,9 +168,9 @@ gdk_display_manager_get_property (GObject *object,
* Gets the singleton #GdkDisplayManager object.
*
* When called for the first time, this function consults the
* <envar>GDK_BACKEND</envar> environment variable to find out which
* of the supported GDK backends to use (in case GDK has been compiled
* with multiple backends).
* <envar>GDK_BACKEND</envar> to find out which of the supported
* GDK backends to use (in case GDK has been compiled with multiple
* backends).
*
* Returns: (transfer none): The global #GdkDisplayManager singleton;
* gdk_parse_args(), gdk_init(), or gdk_init_check() must have
@@ -225,6 +188,11 @@ gdk_display_manager_get (void)
const gchar *backend;
backend = g_getenv ("GDK_BACKEND");
#ifdef GDK_WINDOWING_X11
if (backend == NULL || strcmp (backend, "x11") == 0)
manager = g_object_new (gdk_x11_display_manager_get_type (), NULL);
else
#endif
#ifdef GDK_WINDOWING_QUARTZ
if (backend == NULL || strcmp (backend, "quartz") == 0)
manager = g_object_new (gdk_quartz_display_manager_get_type (), NULL);
@@ -234,11 +202,6 @@ gdk_display_manager_get (void)
if (backend == NULL || strcmp (backend, "win32") == 0)
manager = g_object_new (gdk_win32_display_manager_get_type (), NULL);
else
#endif
#ifdef GDK_WINDOWING_X11
if (backend == NULL || strcmp (backend, "x11") == 0)
manager = g_object_new (gdk_x11_display_manager_get_type (), NULL);
else
#endif
if (backend != NULL)
g_error ("Unsupported GDK backend: %s", backend);
+12 -1
View File
@@ -163,7 +163,18 @@ struct _GdkDisplayClass
gint y);
GList * (*list_devices) (GdkDisplay *display);
gboolean (*send_client_message) (GdkDisplay *display,
GdkEvent *event,
GdkNativeWindow winid);
void (*add_client_message_filter) (GdkDisplay *display,
GdkAtom message_type,
GdkFilterFunc func,
gpointer data);
GdkAppLaunchContext * (*get_app_launch_context) (GdkDisplay *display);
GdkNativeWindow (*get_drag_protocol) (GdkDisplay *display,
GdkNativeWindow winid,
GdkDragProtocol *protocol,
guint *version);
void (*before_process_all_updates) (GdkDisplay *display);
void (*after_process_all_updates) (GdkDisplay *display);
@@ -198,7 +209,7 @@ struct _GdkDisplayClass
guint32 time,
gboolean send_event);
void (*send_selection_notify) (GdkDisplay *dispay,
GdkWindow *requestor,
GdkNativeWindow requestor,
GdkAtom selection,
GdkAtom target,
GdkAtom property,
+1 -1
View File
@@ -70,7 +70,7 @@ gdk_drag_context_list_targets (GdkDragContext *context)
* @context: a #GdkDragContext
*
* Determines the bitmask of actions proposed by the source if
* gdk_drag_context_get_suggested_action() returns GDK_ACTION_ASK.
* gdk_drag_context_suggested_action() returns GDK_ACTION_ASK.
*
* Return value: the #GdkDragAction flags
*
+6 -2
View File
@@ -67,11 +67,11 @@ typedef enum
/**
* GdkDragProtocol:
* @GDK_DRAG_PROTO_NONE: no protocol.
* @GDK_DRAG_PROTO_MOTIF: The Motif DND protocol.
* @GDK_DRAG_PROTO_XDND: The Xdnd protocol.
* @GDK_DRAG_PROTO_ROOTWIN: An extension to the Xdnd protocol for
* unclaimed root window drops.
* @GDK_DRAG_PROTO_NONE: no protocol.
* @GDK_DRAG_PROTO_WIN32_DROPFILES: The simple WM_DROPFILES protocol.
* @GDK_DRAG_PROTO_OLE2: The complex OLE2 DND protocol (not implemented).
* @GDK_DRAG_PROTO_LOCAL: Intra-application DND.
@@ -81,10 +81,10 @@ typedef enum
*/
typedef enum
{
GDK_DRAG_PROTO_NONE = 0,
GDK_DRAG_PROTO_MOTIF,
GDK_DRAG_PROTO_XDND,
GDK_DRAG_PROTO_ROOTWIN,
GDK_DRAG_PROTO_NONE,
GDK_DRAG_PROTO_WIN32_DROPFILES,
GDK_DRAG_PROTO_OLE2,
GDK_DRAG_PROTO_LOCAL
@@ -128,6 +128,10 @@ GdkDragContext * gdk_drag_begin_for_device (GdkWindow *window,
GdkDevice *device,
GList *targets);
GdkNativeWindow gdk_drag_get_protocol_for_display (GdkDisplay *display,
GdkNativeWindow xid,
GdkDragProtocol *protocol);
void gdk_drag_find_window_for_screen (GdkDragContext *context,
GdkWindow *drag_window,
GdkScreen *screen,
-30
View File
@@ -555,8 +555,6 @@ gdk_event_copy (const GdkEvent *event)
break;
case GDK_BUTTON_PRESS:
case GDK_2BUTTON_PRESS:
case GDK_3BUTTON_PRESS:
case GDK_BUTTON_RELEASE:
if (event->button.axes)
new_event->button.axes = g_memdup (event->button.axes,
@@ -569,20 +567,6 @@ gdk_event_copy (const GdkEvent *event)
sizeof (gdouble) * gdk_device_get_n_axes (event->motion.device));
break;
case GDK_OWNER_CHANGE:
new_event->owner_change.owner = event->owner_change.owner;
if (new_event->owner_change.owner)
g_object_ref (new_event->owner_change.owner);
break;
case GDK_SELECTION_CLEAR:
case GDK_SELECTION_NOTIFY:
case GDK_SELECTION_REQUEST:
new_event->selection.requestor = event->selection.requestor;
if (new_event->selection.requestor)
g_object_unref (new_event->selection.requestor);
break;
default:
break;
}
@@ -634,8 +618,6 @@ gdk_event_free (GdkEvent *event)
break;
case GDK_BUTTON_PRESS:
case GDK_2BUTTON_PRESS:
case GDK_3BUTTON_PRESS:
case GDK_BUTTON_RELEASE:
g_free (event->button.axes);
break;
@@ -654,18 +636,6 @@ gdk_event_free (GdkEvent *event)
g_free (event->setting.name);
break;
case GDK_OWNER_CHANGE:
if (event->owner_change.owner)
g_object_unref (event->owner_change.owner);
break;
case GDK_SELECTION_CLEAR:
case GDK_SELECTION_NOTIFY:
case GDK_SELECTION_REQUEST:
if (event->selection.requestor)
g_object_unref (event->selection.requestor);
break;
default:
break;
}
+51 -10
View File
@@ -89,6 +89,7 @@ typedef struct _GdkEventProperty GdkEventProperty;
typedef struct _GdkEventSelection GdkEventSelection;
typedef struct _GdkEventOwnerChange GdkEventOwnerChange;
typedef struct _GdkEventProximity GdkEventProximity;
typedef struct _GdkEventClient GdkEventClient;
typedef struct _GdkEventDND GdkEventDND;
typedef struct _GdkEventWindowState GdkEventWindowState;
typedef struct _GdkEventSetting GdkEventSetting;
@@ -798,7 +799,7 @@ struct _GdkEventProperty
* @target: the target to which the selection should be converted.
* @property: the property in which to place the result of the conversion.
* @time: the time of the event in milliseconds.
* @requestor: the window on which to place @property or %NULL if none.
* @requestor: the native window on which to place @property.
*
* Generated when a selection is requested or ownership of a selection
* is taken over by another client application.
@@ -812,21 +813,21 @@ struct _GdkEventSelection
GdkAtom target;
GdkAtom property;
guint32 time;
GdkWindow *requestor;
GdkNativeWindow requestor;
};
/**
* GdkEventOwnerChange:
* @type: the type of the event (%GDK_OWNER_CHANGE).
* @window: the window which received the event
* @window: the window which received the event.
* @send_event: %TRUE if the event was sent explicitly (e.g. using
* <function>XSendEvent</function>)
* @owner: the new owner of the selection, or %NULL if there is none
* @reason: the reason for the ownership change as a #GdkOwnerChange value
* @selection: the atom identifying the selection
* @time: the timestamp of the event
* <function>XSendEvent</function>).
* @owner: the new owner of the selection.
* @reason: the reason for the ownership change as a #GdkOwnerChange value.
* @selection: the atom identifying the selection.
* @time: the timestamp of the event.
* @selection_time: the time at which the selection ownership was taken
* over
* over.
*
* Generated when the owner of a selection changes. On X11, this
* information is only available if the X server supports the XFIXES
@@ -839,7 +840,7 @@ struct _GdkEventOwnerChange
GdkEventType type;
GdkWindow *window;
gint8 send_event;
GdkWindow *owner;
GdkNativeWindow owner;
GdkOwnerChange reason;
GdkAtom selection;
guint32 time;
@@ -873,6 +874,35 @@ struct _GdkEventProximity
GdkDevice *device;
};
/**
* GdkEventClient:
* @type: the type of the event (%GDK_CLIENT_EVENT).
* @window: the window which received the event.
* @send_event: %TRUE if the event was sent explicitly (e.g. using
* <function>XSendEvent</function>).
* @message_type: the type of the message, which can be defined by the
* application.
* @data_format: the format of the data, given as the number of bits in each
* data element, i.e. 8, 16, or 32. 8-bit data uses the b array of the
* data union, 16-bit data uses the s array, and 32-bit data uses the l
* array.
*
* An event sent by another client application.
*/
struct _GdkEventClient
{
GdkEventType type;
GdkWindow *window;
gint8 send_event;
GdkAtom message_type;
gushort data_format;
union {
char b[20];
short s[10];
long l[5];
} data;
};
/**
* GdkEventSetting:
* @type: the type of the event (%GDK_SETTING).
@@ -1030,6 +1060,7 @@ union _GdkEvent
GdkEventSelection selection;
GdkEventOwnerChange owner_change;
GdkEventProximity proximity;
GdkEventClient client;
GdkEventDND dnd;
GdkEventWindowState window_state;
GdkEventSetting setting;
@@ -1094,9 +1125,19 @@ gboolean gdk_get_show_events (void);
gboolean gdk_setting_get (const gchar *name,
GValue *value);
void gdk_add_client_message_filter (GdkAtom message_type,
GdkFilterFunc func,
gpointer data);
gboolean gdk_event_send_client_message (GdkEvent *event,
GdkNativeWindow winid);
void gdk_event_send_clientmessage_toall (GdkEvent *event);
#endif /* GDK_MULTIHEAD_SAFE */
gboolean gdk_event_send_client_message_for_display (GdkDisplay *display,
GdkEvent *event,
GdkNativeWindow winid);
G_END_DECLS
#endif /* __GDK_EVENTS_H__ */
+1 -7
View File
@@ -684,12 +684,6 @@ gdk_offscreen_window_set_boolean (GdkWindow *window,
{
}
static void
gdk_offscreen_window_set_transient_for (GdkWindow *window,
GdkWindow *another)
{
}
static void
gdk_offscreen_window_process_updates_recurse (GdkWindow *window,
cairo_region_t *region)
@@ -745,7 +739,7 @@ gdk_offscreen_window_class_init (GdkOffscreenWindowClass *klass)
impl_class->set_title = NULL;
impl_class->set_role = NULL;
impl_class->set_startup_id = NULL;
impl_class->set_transient_for = gdk_offscreen_window_set_transient_for;
impl_class->set_transient_for = NULL;
impl_class->get_root_origin = NULL;
impl_class->get_frame_extents = NULL;
impl_class->set_override_redirect = NULL;
+45 -49
View File
@@ -34,14 +34,12 @@
/**
* SECTION:pixbufs
* @Short_description: Functions for obtaining pixbufs
* @Short_description: Functions for rendering pixbufs on drawables
* @Title: Pixbufs
*
* Pixbufs are client-side images. For details on how to create
* and manipulate pixbufs, see the #GdkPixbuf API documentation.
*
* The functions described here allow to obtain pixbufs from
* #GdkWindows and cairo surfaces.
* These functions allow to render pixbufs on drawables. Pixbufs are
* client-side images. For details on how to create and manipulate
* pixbufs, see the #GdkPixbuf API documentation.
*/
@@ -57,7 +55,7 @@
* representation inside a #GdkPixbuf. In other words, copies
* image data from a server-side drawable to a client-side RGB(A) buffer.
* This allows you to efficiently read individual pixels on the client side.
*
*
* This function will create an RGB pixbuf with 8 bits per channel with
* the same size specified by the @width and @height arguments. The pixbuf
* will contain an alpha channel if the @window contains one.
@@ -80,18 +78,16 @@
* it returns %NULL; so check the return value.)
*
* Return value: (transfer full): A newly-created pixbuf with a reference
* count of 1, or %NULL on error
*/
* count of 1, or %NULL on error
**/
GdkPixbuf *
gdk_pixbuf_get_from_window (GdkWindow *src,
gint src_x,
gint src_y,
gint width,
gint height)
gdk_pixbuf_get_from_window (GdkWindow *src,
int src_x, int src_y,
int width, int height)
{
cairo_surface_t *surface;
GdkPixbuf *dest;
g_return_val_if_fail (GDK_IS_WINDOW (src), NULL);
g_return_val_if_fail (gdk_window_is_viewable (src), NULL);
@@ -103,7 +99,7 @@ gdk_pixbuf_get_from_window (GdkWindow *src,
return dest;
}
static cairo_format_t
gdk_cairo_format_for_content (cairo_content_t content)
{
@@ -121,11 +117,11 @@ gdk_cairo_format_for_content (cairo_content_t content)
static cairo_surface_t *
gdk_cairo_surface_coerce_to_image (cairo_surface_t *surface,
cairo_content_t content,
int src_x,
int src_y,
int width,
int height)
cairo_content_t content,
int src_x,
int src_y,
int width,
int height)
{
cairo_surface_t *copy;
cairo_t *cr;
@@ -144,14 +140,14 @@ gdk_cairo_surface_coerce_to_image (cairo_surface_t *surface,
}
static void
convert_alpha (guchar *dest_data,
int dest_stride,
guchar *src_data,
int src_stride,
int src_x,
int src_y,
int width,
int height)
convert_alpha (guchar *dest_data,
int dest_stride,
guchar *src_data,
int src_stride,
int src_x,
int src_y,
int width,
int height)
{
int x, y;
@@ -184,14 +180,14 @@ convert_alpha (guchar *dest_data,
}
static void
convert_no_alpha (guchar *dest_data,
int dest_stride,
guchar *src_data,
int src_stride,
int src_x,
int src_y,
int width,
int height)
convert_no_alpha (guchar *dest_data,
int dest_stride,
guchar *src_data,
int src_stride,
int src_x,
int src_y,
int width,
int height)
{
int x, y;
@@ -224,22 +220,22 @@ convert_no_alpha (guchar *dest_data,
* individual pixels from cairo surfaces. For #GdkWindows, use
* gdk_pixbuf_get_from_window() instead.
*
* This function will create an RGB pixbuf with 8 bits per channel.
* The pixbuf will contain an alpha channel if the @surface contains one.
* This function will create an RGB pixbuf with 8 bits per channel. The pixbuf
* will contain an alpha channel if the @surface contains one.
*
* Return value: (transfer full): A newly-created pixbuf with a reference
* count of 1, or %NULL on error
*/
* Return value: (transfer full): A newly-created pixbuf with a reference count
* of 1, or %NULL on error
**/
GdkPixbuf *
gdk_pixbuf_get_from_surface (cairo_surface_t *surface,
gint src_x,
gint src_y,
gint width,
gint height)
int src_x,
int src_y,
int width,
int height)
{
cairo_content_t content;
GdkPixbuf *dest;
/* General sanity checks */
g_return_val_if_fail (surface != NULL, NULL);
g_return_val_if_fail (width > 0 && height > 0, NULL);
@@ -250,8 +246,7 @@ gdk_pixbuf_get_from_surface (cairo_surface_t *surface,
8,
width, height);
surface = gdk_cairo_surface_coerce_to_image (surface, content,
src_x, src_y,
surface = gdk_cairo_surface_coerce_to_image (surface, content, src_x, src_y,
width, height);
cairo_surface_flush (surface);
if (cairo_surface_status (surface) || dest == NULL)
@@ -278,3 +273,4 @@ gdk_pixbuf_get_from_surface (cairo_surface_t *surface,
cairo_surface_destroy (surface);
return dest;
}
+11 -10
View File
@@ -37,17 +37,18 @@
G_BEGIN_DECLS
GdkPixbuf *gdk_pixbuf_get_from_window (GdkWindow *window,
gint src_x,
gint src_y,
gint width,
gint height);
/* Fetching a region from a drawable */
GdkPixbuf *gdk_pixbuf_get_from_window (GdkWindow *window,
int src_x,
int src_y,
int width,
int height);
GdkPixbuf *gdk_pixbuf_get_from_surface (cairo_surface_t *surface,
gint src_x,
gint src_y,
gint width,
gint height);
GdkPixbuf *gdk_pixbuf_get_from_surface (cairo_surface_t *surface,
int src_x,
int src_y,
int width,
int height);
G_END_DECLS
+40 -49
View File
@@ -34,7 +34,7 @@
* @Title: RGBA Colors
*
* The #GdkRGBA struct is a convenient way to pass rgba colors around.
* It's based on cairo's way to deal with colors and mirrors its behavior.
* It's based on cairo's way to deal with colors and mirros its behavior.
* All values are in the range from 0.0 to 1.0 inclusive. So the color
* (0.0, 0.0, 0.0, 0.0) represents transparent black and
* (1.0, 1.0, 1.0, 1.0) is opaque white. Other values will be clamped
@@ -46,28 +46,28 @@ G_DEFINE_BOXED_TYPE (GdkRGBA, gdk_rgba,
/**
* GdkRGBA:
* @red: The intensity of the red channel from 0.0 to 1.0 inclusive
* @green: The intensity of the green channel from 0.0 to 1.0 inclusive
* @blue: The intensity of the blue channel from 0.0 to 1.0 inclusive
* @red: The intensity of the red channel from 0.0 to 1.0 inclusive.
* @green: The intensity of the green channel from 0.0 to 1.0 inclusive.
* @blue: The intensity of the blue channel from 0.0 to 1.0 inclusive.
* @alpha: The opacity of the color from 0.0 for completely translucent to
* 1.0 for opaque
* 1.0 for opaque.
*
* The GdkRGBA structure is used to represent a (possibly translucent)
* color, in a way that is compatible with cairos notion of color.
* The GdkRGBA structure is used to pass around color data. When using it
* as struct members or on the stack, you want to use the struct directly
* and not allocate it.
*/
/**
* gdk_rgba_copy:
* @rgba: a #GdkRGBA
*
* Makes a copy of a #GdkRGBA structure.
* Makes a copy of a #GdkRGBA structure, the result must be freed
* through gdk_rgba_free().
*
* The result must be freed through gdk_rgba_free().
*
* Returns: A newly allocated #GdkRGBA, with the same contents as @rgba
* Returns: A newly allocated #GdkRGBA
*
* Since: 3.0
*/
**/
GdkRGBA *
gdk_rgba_copy (const GdkRGBA *rgba)
{
@@ -89,7 +89,7 @@ gdk_rgba_copy (const GdkRGBA *rgba)
* Frees a #GdkRGBA struct created with gdk_rgba_copy()
*
* Since: 3.0
*/
**/
void
gdk_rgba_free (GdkRGBA *rgba)
{
@@ -111,7 +111,7 @@ gdk_rgba_free (GdkRGBA *rgba)
*/
static double
parse_rgb_value (const char *str,
char **endp)
char **endp)
{
double number;
const char *p;
@@ -168,7 +168,7 @@ parse_rgb_value (const char *str,
* Returns: %TRUE if the parsing succeeded
*
* Since: 3.0
*/
**/
gboolean
gdk_rgba_parse (GdkRGBA *rgba,
const gchar *spec)
@@ -193,8 +193,7 @@ gdk_rgba_parse (GdkRGBA *rgba,
PangoColor pango_color;
/* Resort on PangoColor for rgb.txt color
* map and '#' prefixed colors
*/
* map and '#' prefixed colors */
if (pango_color_parse (&pango_color, str))
{
if (rgba)
@@ -273,37 +272,37 @@ gdk_rgba_parse (GdkRGBA *rgba,
/**
* gdk_rgba_hash:
* @p: (type GdkRGBA): a #GdkRGBA pointer
* @p: (type GdkRGBA): a #GdkRGBA pointer.
*
* A hash function suitable for using for a hash
* table that stores #GdkRGBAs.
* table that stores #GdkRGBA<!-- -->s.
*
* Return value: The hash value for @p
* Return value: The hash function applied to @p
*
* Since: 3.0
*/
**/
guint
gdk_rgba_hash (gconstpointer p)
{
const GdkRGBA *rgba = p;
return ((guint) (rgba->red * 65535) +
((guint) (rgba->green * 65535) << 11) +
((guint) (rgba->blue * 65535) << 22) +
((guint) (rgba->alpha * 65535) >> 6));
((guint) (rgba->green * 65535) << 11) +
((guint) (rgba->blue * 65535) << 22) +
((guint) (rgba->alpha * 65535) >> 6));
}
/**
* gdk_rgba_equal:
* @p1: (type GdkRGBA): a #GdkRGBA pointer
* @p2: (type GdkRGBA): another #GdkRGBA pointer
* @p1: (type GdkRGBA): a #GdkRGBA pointer.
* @p2: (type GdkRGBA): another #GdkRGBA pointer.
*
* Compares two RGBA colors.
*
* Return value: %TRUE if the two colors compare equal
*
* Since: 3.0
*/
**/
gboolean
gdk_rgba_equal (gconstpointer p1,
gconstpointer p2)
@@ -326,35 +325,27 @@ gdk_rgba_equal (gconstpointer p1,
* gdk_rgba_to_string:
* @rgba: a #GdkRGBA
*
* Returns a textual specification of @rgba in the form
* <literal>rgb (r, g, b)</literal> or
* <literal>rgba (r, g, b, a)</literal>,
* where 'r', 'g', 'b' and 'a' represent the red, green,
* blue and alpha values respectively. r, g, and b are
* represented as integers in the range 0 to 255, and a
* is represented as floating point value in the range 0 to 1.
* Returns a textual specification of @rgba in the form <literal>rgb
* (r, g, b)</literal> or <literal>rgba (r, g, b, a)</literal>,
* where 'r', 'g', 'b' and 'a' represent the red, green, blue and alpha values
* respectively. r, g, and b are integers in the range 0 to 255, and a
* is a floating point value in the range 0 to 1.
*
* These string forms are string forms those supported by
* the CSS3 colors module, and can be parsed by gdk_rgba_parse().
*
* Note that this string representation may loose some
* precision, since r, g and b are represented as 8-bit
* integers. If this is a concern, you should use a
* different representation.
* (These string forms are string forms those supported by the CSS3 colors module)
*
* Returns: A newly allocated text string
*
* Since: 3.0
*/
**/
gchar *
gdk_rgba_to_string (const GdkRGBA *rgba)
{
if (rgba->alpha > 0.999)
{
return g_strdup_printf ("rgb(%d,%d,%d)",
(int)(0.5 + CLAMP (rgba->red, 0., 1.) * 255.),
(int)(0.5 + CLAMP (rgba->green, 0., 1.) * 255.),
(int)(0.5 + CLAMP (rgba->blue, 0., 1.) * 255.));
(int)(0.5 + CLAMP (rgba->red, 0., 1.) * 255.),
(int)(0.5 + CLAMP (rgba->green, 0., 1.) * 255.),
(int)(0.5 + CLAMP (rgba->blue, 0., 1.) * 255.));
}
else
{
@@ -363,9 +354,9 @@ gdk_rgba_to_string (const GdkRGBA *rgba)
g_ascii_dtostr (alpha, G_ASCII_DTOSTR_BUF_SIZE, CLAMP (rgba->alpha, 0, 1));
return g_strdup_printf ("rgba(%d,%d,%d,%s)",
(int)(0.5 + CLAMP (rgba->red, 0., 1.) * 255.),
(int)(0.5 + CLAMP (rgba->green, 0., 1.) * 255.),
(int)(0.5 + CLAMP (rgba->blue, 0., 1.) * 255.),
alpha);
(int)(0.5 + CLAMP (rgba->red, 0., 1.) * 255.),
(int)(0.5 + CLAMP (rgba->green, 0., 1.) * 255.),
(int)(0.5 + CLAMP (rgba->blue, 0., 1.) * 255.),
alpha);
}
}
+9 -8
View File
@@ -45,19 +45,20 @@ struct _GdkRGBA
#define GDK_TYPE_RGBA (gdk_rgba_get_type ())
GType gdk_rgba_get_type (void) G_GNUC_CONST;
GdkRGBA * gdk_rgba_copy (const GdkRGBA *rgba);
void gdk_rgba_free (GdkRGBA *rgba);
GdkRGBA * gdk_rgba_copy (const GdkRGBA *rgba);
void gdk_rgba_free (GdkRGBA *rgba);
gboolean gdk_rgba_parse (GdkRGBA *rgba,
const gchar *spec);
guint gdk_rgba_hash (gconstpointer p);
gboolean gdk_rgba_equal (gconstpointer p1,
gconstpointer p2);
guint gdk_rgba_hash (gconstpointer p);
gboolean gdk_rgba_equal (gconstpointer p1,
gconstpointer p2);
gboolean gdk_rgba_parse (GdkRGBA *rgba,
const gchar *spec);
gchar * gdk_rgba_to_string (const GdkRGBA *rgba);
GType gdk_rgba_get_type (void) G_GNUC_CONST;
G_END_DECLS
+33 -10
View File
@@ -34,17 +34,14 @@
* @Short_description: Object representing a physical screen
* @Title: GdkScreen
*
* #GdkScreen objects are the GDK representation of the screen on
* which windows can be displayed and on which the pointer moves.
* X originally identified screens with physical screens, but
* nowadays it is more common to have a single #GdkScreen which
* combines several physical monitors (see gdk_screen_get_n_monitors()).
* #GdkScreen objects are the GDK representation of a physical screen. It is used
* throughout GDK and GTK+ to specify which screen the top level windows
* are to be displayed on.
* It is also used to query the screen specification and default settings such as
* the screen width (gdk_screen_get_width()), etc.
*
* GdkScreen is used throughout GDK and GTK+ to specify which screen
* the top level windows are to be displayed on. it is also used to
* query the screen specification and default settings such as
* the default visual (gdk_screen_get_system_visual()), the dimensions
* of the physical monitors (gdk_screen_get_monitor_geometry()), etc.
* Note that a screen may consist of multiple monitors which are merged to
* form a large screen area.
*/
@@ -937,6 +934,32 @@ gdk_screen_get_window_stack (GdkScreen *screen)
return GDK_SCREEN_GET_CLASS(screen)->get_window_stack (screen);
}
/**
* gdk_screen_broadcast_client_message:
* @screen: the #GdkScreen where the event will be broadcasted.
* @event: the #GdkEvent.
*
* On X11, sends an X ClientMessage event to all toplevel windows on
* @screen.
*
* Toplevel windows are determined by checking for the WM_STATE property,
* as described in the Inter-Client Communication Conventions Manual (ICCCM).
* If no windows are found with the WM_STATE property set, the message is
* sent to all children of the root window.
*
* On Windows, broadcasts a message registered with the name
* GDK_WIN32_CLIENT_MESSAGE to all top-level windows. The amount of
* data is limited to one long, i.e. four bytes.
*
* Since: 2.2
*/
void
gdk_screen_broadcast_client_message (GdkScreen *screen,
GdkEvent *event)
{
return GDK_SCREEN_GET_CLASS(screen)->broadcast_client_message (screen, event);
}
/**
* gdk_screen_get_setting:
* @screen: the #GdkScreen where the setting is located
+3
View File
@@ -74,6 +74,9 @@ gint gdk_screen_get_monitor_height_mm (GdkScreen *screen,
gchar * gdk_screen_get_monitor_plug_name (GdkScreen *screen,
gint monitor_num);
void gdk_screen_broadcast_client_message (GdkScreen *screen,
GdkEvent *event);
GdkScreen *gdk_screen_get_default (void);
gboolean gdk_screen_get_setting (GdkScreen *screen,
+3 -3
View File
@@ -126,13 +126,13 @@ gdk_selection_owner_get (GdkAtom selection)
* Sends a response to SelectionRequest event.
*/
void
gdk_selection_send_notify (GdkWindow *requestor,
gdk_selection_send_notify (GdkNativeWindow requestor,
GdkAtom selection,
GdkAtom target,
GdkAtom property,
guint32 time)
{
gdk_selection_send_notify_for_display (gdk_window_get_display (requestor),
gdk_selection_send_notify_for_display (gdk_display_get_default (),
requestor, selection,
target, property, time);
}
@@ -213,7 +213,7 @@ gdk_selection_owner_get_for_display (GdkDisplay *display,
*/
void
gdk_selection_send_notify_for_display (GdkDisplay *display,
GdkWindow *requestor,
GdkNativeWindow requestor,
GdkAtom selection,
GdkAtom target,
GdkAtom property,
+4 -2
View File
@@ -192,14 +192,16 @@ gint gdk_selection_property_get (GdkWindow *requestor,
GdkAtom *prop_type,
gint *prop_format);
void gdk_selection_send_notify (GdkWindow *requestor,
#ifndef GDK_MULTIHEAD_SAFE
void gdk_selection_send_notify (GdkNativeWindow requestor,
GdkAtom selection,
GdkAtom target,
GdkAtom property,
guint32 time_);
#endif /* GDK_MULTIHEAD_SAFE */
void gdk_selection_send_notify_for_display (GdkDisplay *display,
GdkWindow *requestor,
GdkNativeWindow requestor,
GdkAtom selection,
GdkAtom target,
GdkAtom property,
+18
View File
@@ -104,6 +104,12 @@ typedef struct _GdkAtom *GdkAtom;
*/
#define GDK_POINTER_TO_ATOM(ptr) ((GdkAtom)(ptr))
#ifdef GDK_NATIVE_WINDOW_POINTER
#define GDK_GPOINTER_TO_NATIVE_WINDOW(p) ((GdkNativeWindow) (p))
#else
#define GDK_GPOINTER_TO_NATIVE_WINDOW(p) GPOINTER_TO_UINT(p)
#endif
#define _GDK_MAKE_ATOM(val) ((GdkAtom)GUINT_TO_POINTER(val))
/**
@@ -114,6 +120,18 @@ typedef struct _GdkAtom *GdkAtom;
*/
#define GDK_NONE _GDK_MAKE_ATOM (0)
/**
* GdkNativeWindow:
*
* Used to represent native windows (<type>Window</type>s for the X11
* backend, <type>HWND</type>s for Win32).
*/
#ifdef GDK_NATIVE_WINDOW_POINTER
typedef gpointer GdkNativeWindow;
#else
typedef guint32 GdkNativeWindow;
#endif
/* Forward declarations of commonly used types */
typedef struct _GdkColor GdkColor;
typedef struct _GdkRGBA GdkRGBA;
+8 -30
View File
@@ -51,12 +51,12 @@
* @Short_description: Onscreen display areas in the target window system
* @Title: Windows
*
* A #GdkWindow is a (usually) rectangular region on the screen.
* It's a low-level object, used to implement high-level objects such as
* #GtkWidget and #GtkWindow on the GTK+ level. A #GtkWindow is a toplevel
* window, the thing a user might think of as a "window" with a titlebar and
* so on; a #GtkWindow may contain many #GdkWindows. For example, each
* #GtkButton has a #GdkWindow associated with it.
* A #GdkWindow is a rectangular region on the screen. It's a low-level object,
* used to implement high-level objects such as #GtkWidget and #GtkWindow on the
* GTK+ level. A #GtkWindow is a toplevel window, the thing a user might think
* of as a "window" with a titlebar and so on; a #GtkWindow may contain many
* #GdkWindow<!-- -->s. For example, each #GtkButton has a #GdkWindow associated
* with it.
*
* <refsect2 id="COMPOSITED-WINDOWS">
* <title>Composited Windows</title>
@@ -78,7 +78,7 @@
* composited and therefore is no longer automatically drawn to the screen.
*
* When the contents of the event box change, an expose event is generated on
* its parent window (which, in this case, belongs to the toplevel #GtkWindow).
* it's parent window (which, in this case, belongs to the toplevel #GtkWindow).
* The expose handler for this widget is responsible for merging the changes
* back on the screen in the way that it wishes.
*
@@ -1240,7 +1240,7 @@ sync_native_window_stack_position (GdkWindow *window)
}
/**
* gdk_window_new: (constructor)
* gdk_window_new:
* @parent: (allow-none): a #GdkWindow, or %NULL to create the window as a child of
* the default root window for the default display.
* @attributes: attributes of the new window
@@ -10657,28 +10657,6 @@ gdk_window_register_dnd (GdkWindow *window)
GDK_WINDOW_IMPL_GET_CLASS (window->impl)->register_dnd (window);
}
/**
* gdk_window_get_drag_protocol:
* @window: the destination window
* @target: (out) (allow-none) (transfer full): location of the window
* where the drop should happen. This may be @window or a proxy window,
* or %NULL if @window does not support Drag and Drop.
*
* Finds out the DND protocol supported by a window.
*
* Returns: the supported DND protocol.
*
* Since: 3.0
*/
GdkDragProtocol
gdk_window_get_drag_protocol (GdkWindow *window,
GdkWindow **target)
{
g_return_val_if_fail (GDK_IS_WINDOW (window), GDK_DRAG_PROTO_NONE);
return GDK_WINDOW_IMPL_GET_CLASS (window->impl)->get_drag_protocol (window, target);
}
/**
* gdk_drag_begin:
* @window: the source window for this drag.
-4
View File
@@ -780,10 +780,6 @@ void gdk_window_set_opacity (GdkWindow *window,
gdouble opacity);
void gdk_window_register_dnd (GdkWindow *window);
GdkDragProtocol
gdk_window_get_drag_protocol(GdkWindow *window,
GdkWindow **target);
void gdk_window_begin_resize_drag (GdkWindow *window,
GdkWindowEdge edge,
gint button,
-2
View File
@@ -248,8 +248,6 @@ struct _GdkWindowImplClass
void (* set_composited) (GdkWindow *window,
gboolean composited);
void (* destroy_notify) (GdkWindow *window);
GdkDragProtocol (* get_drag_protocol) (GdkWindow *window,
GdkWindow **target);
void (* register_dnd) (GdkWindow *window);
GdkDragContext * (*drag_begin) (GdkWindow *window,
GdkDevice *device,
-39
View File
@@ -3937,17 +3937,6 @@ static const gdk_key gdk_keys_by_name[] = {
#if 0
/*
* Translators, the strings in the 'keyboard label' context are
* display names for keyboard keys. Some of them have prefixes like
* XF86 or ISO_ - these should be removed in the translation. Similarly,
* underscores should be replaced by spaces. The prefix 'KP_' stands
* for 'key pad' and you may want to include that in your translation.
* Here are some examples of English translations:
* XF86AudioMute - Audio mute
* Scroll_lock - Scroll lock
* KP_Space - Space (keypad)
*/
NC_("keyboard label", "BackSpace")
NC_("keyboard label", "Tab")
NC_("keyboard label", "Return")
@@ -3968,7 +3957,6 @@ NC_("keyboard label", "Begin")
NC_("keyboard label", "Print")
NC_("keyboard label", "Insert")
NC_("keyboard label", "Num_Lock")
/* Translators: KP_ means 'key pad' here */
NC_("keyboard label", "KP_Space")
NC_("keyboard label", "KP_Tab")
NC_("keyboard label", "KP_Enter")
@@ -3986,32 +3974,5 @@ NC_("keyboard label", "KP_Begin")
NC_("keyboard label", "KP_Insert")
NC_("keyboard label", "KP_Delete")
NC_("keyboard label", "Delete")
/* Translators: 'Mon' means Monitor here, and the XF86 prefix should be removed */
NC_("keyboard label", "XF86MonBrightnessUp")
NC_("keyboard label", "XF86MonBrightnessDown")
NC_("keyboard label", "XF86AudioMute")
NC_("keyboard label", "XF86AudioLowerVolume")
NC_("keyboard label", "XF86AudioRaiseVolume")
NC_("keyboard label", "XF86AudioPlay")
NC_("keyboard label", "XF86AudioStop")
NC_("keyboard label", "XF86AudioNext")
NC_("keyboard label", "XF86AudioPrev")
NC_("keyboard label", "XF86AudioRecord")
NC_("keyboard label", "XF86AudioPause")
NC_("keyboard label", "XF86AudioRewind")
NC_("keyboard label", "XF86AudioMedia")
NC_("keyboard label", "XF86ScreenSaver")
NC_("keyboard label", "XF86Battery")
NC_("keyboard label", "XF86Launch1")
NC_("keyboard label", "XF86Forward")
NC_("keyboard label", "XF86Back")
NC_("keyboard label", "XF86Sleep")
NC_("keyboard label", "XF86Hibernate")
NC_("keyboard label", "XF86WLAN")
NC_("keyboard label", "XF86WebCam")
NC_("keyboard label", "XF86Display")
NC_("keyboard label", "XF86TouchpadToggle")
NC_("keyboard label", "XF86WakeUp")
NC_("keyboard label", "XF86Suspend")
#endif
+1 -2
View File
@@ -213,8 +213,7 @@ gdk_quartz_device_core_query_state_helper (GdkWindow *window,
toplevel = gdk_window_get_effective_toplevel (window);
if (mask)
*mask = _gdk_quartz_events_get_current_event_mask ();
*mask = _gdk_quartz_events_get_current_event_mask ();
/* Get the y coordinate, needs to be flipped. */
if (window == _gdk_root)
+4
View File
@@ -342,6 +342,9 @@ gdk_quartz_display_class_init (GdkQuartzDisplayClass *class)
display_class->supports_input_shapes = gdk_quartz_display_supports_input_shapes;
display_class->supports_composite = gdk_quartz_display_supports_composite;
display_class->list_devices = gdk_quartz_display_list_devices;
display_class->send_client_message = _gdk_quartz_display_send_client_message;
display_class->add_client_message_filter = _gdk_quartz_display_add_client_message_filter;
display_class->get_drag_protocol = _gdk_quartz_display_get_drag_protocol;
display_class->get_cursor_for_type = _gdk_quartz_display_get_cursor_for_type;
display_class->get_cursor_for_name = _gdk_quartz_display_get_cursor_for_name;
display_class->get_cursor_for_pixbuf = _gdk_quartz_display_get_cursor_for_pixbuf;
@@ -360,6 +363,7 @@ gdk_quartz_display_class_init (GdkQuartzDisplayClass *class)
display_class->get_keymap = _gdk_quartz_display_get_keymap;
display_class->get_selection_owner = _gdk_quartz_display_get_selection_owner;
display_class->set_selection_owner = _gdk_quartz_display_set_selection_owner;
display_class->send_selection_notify = _gdk_quartz_display_send_selection_notify;
display_class->get_selection_property = _gdk_quartz_display_get_selection_property;
display_class->convert_selection = _gdk_quartz_display_convert_selection;
display_class->text_property_to_utf8_list = _gdk_quartz_display_text_property_to_utf8_list;
+10
View File
@@ -65,6 +65,16 @@ gdk_quartz_drag_context_drag_motion (GdkDragContext *context,
return FALSE;
}
GdkNativeWindow
_gdk_quartz_display_get_drag_protocol (GdkDisplay *display,
GdkNativeWindow xid,
GdkDragProtocol *protocol,
guint *version)
{
/* FIXME: Implement */
return 0;
}
static GdkWindow *
gdk_quartz_drag_context_find_window (GdkDragContext *context,
GdkWindow *drag_window,
+1 -1
View File
@@ -874,7 +874,7 @@ run_loop_before_waiting (void)
}
else if (timeout > 0)
{
/* We need to get the run loop to break out of its wait when our timeout
/* We need to get the run loop to break out of it's wait when our timeout
* expires. We do this by adding a dummy timer that we'll remove immediately
* after the wait wakes up.
*/
+19
View File
@@ -1331,6 +1331,25 @@ _gdk_quartz_display_queue_events (GdkDisplay *display)
}
}
void
_gdk_quartz_display_add_client_message_filter (GdkDisplay *display,
GdkAtom message_type,
GdkFilterFunc func,
gpointer data)
{
/* Not supported. */
}
gboolean
_gdk_quartz_display_send_client_message (GdkDisplay *display,
GdkEvent *event,
GdkNativeWindow winid)
{
/* Not supported. */
return FALSE;
}
void
_gdk_quartz_screen_broadcast_client_message (GdkScreen *screen,
GdkEvent *event)
+20
View File
@@ -95,6 +95,14 @@ void _gdk_quartz_display_event_data_copy (GdkDisplay *display,
void _gdk_quartz_display_event_data_free (GdkDisplay *display,
GdkEvent *event);
gboolean _gdk_quartz_display_send_client_message (GdkDisplay *display,
GdkEvent *event,
GdkNativeWindow winid);
void _gdk_quartz_display_add_client_message_filter (GdkDisplay *display,
GdkAtom message_type,
GdkFilterFunc func,
gpointer data);
/* Display methods - cursor */
GdkCursor *_gdk_quartz_display_get_cursor_for_type (GdkDisplay *display,
GdkCursorType type);
@@ -127,6 +135,12 @@ void _gdk_quartz_display_create_window_impl (GdkDisplay *display,
/* Display methods - keymap */
GdkKeymap * _gdk_quartz_display_get_keymap (GdkDisplay *display);
/* Display methods - Drag and Drop */
GdkNativeWindow _gdk_quartz_display_get_drag_protocol (GdkDisplay *display,
GdkNativeWindow xid,
GdkDragProtocol *protocol,
guint *version);
/* Display methods - selection */
gboolean _gdk_quartz_display_set_selection_owner (GdkDisplay *display,
GdkWindow *owner,
@@ -135,6 +149,12 @@ gboolean _gdk_quartz_display_set_selection_owner (GdkDisplay *display,
gboolean send_event);
GdkWindow * _gdk_quartz_display_get_selection_owner (GdkDisplay *display,
GdkAtom selection);
void _gdk_quartz_display_send_selection_notify (GdkDisplay *display,
GdkNativeWindow requestor,
GdkAtom selection,
GdkAtom target,
GdkAtom property,
guint32 time);
gint _gdk_quartz_display_get_selection_property (GdkDisplay *display,
GdkWindow *requestor,
guchar **data,
+11
View File
@@ -65,6 +65,17 @@ _gdk_quartz_display_get_selection_property (GdkDisplay *display,
return 0;
}
void
_gdk_quartz_display_send_selection_notify (GdkDisplay *display,
GdkNativeWindow requestor,
GdkAtom selection,
GdkAtom target,
GdkAtom property,
guint32 time)
{
/* FIXME: Implement */
}
gchar *
_gdk_quartz_display_utf8_to_string_target (GdkDisplay *display,
const gchar *str)
+1 -1
View File
@@ -12,7 +12,7 @@ AM_CPPFLAGS = \
progs_ldadd = \
$(GDK_DEP_LIBS) \
$(top_builddir)/gdk/libgdk-3.la \
$(top_builddir)/gdk/libgdk-$(GTK_API_VERSION).la \
$(NULL)
#TEST_PROGS += check-gdk-cairo
+3 -3
View File
@@ -290,7 +290,7 @@ gdk_device_win32_query_state (GdkDevice *device,
hwndc = ChildWindowFromPoint (hwnd, point);
if (hwndc && hwndc != hwnd)
*child_window = gdk_win32_handle_table_lookup (hwndc);
*child_window = gdk_win32_handle_table_lookup ((GdkNativeWindow) hwndc);
else
*child_window = NULL; /* Direct child unknown to gdk */
}
@@ -372,7 +372,7 @@ gdk_device_win32_window_at_position (GdkDevice *device,
do
{
if (get_toplevel &&
(window = gdk_win32_handle_table_lookup (hwnd)) != NULL &&
(window = gdk_win32_handle_table_lookup ((GdkNativeWindow) hwnd)) != NULL &&
GDK_WINDOW_TYPE (window) != GDK_WINDOW_FOREIGN)
break;
@@ -382,7 +382,7 @@ gdk_device_win32_window_at_position (GdkDevice *device,
}
while (hwndc != hwnd && (hwnd = hwndc, 1));
window = gdk_win32_handle_table_lookup (hwnd);
window = gdk_win32_handle_table_lookup ((GdkNativeWindow) hwnd);
if (window && (win_x || win_y))
{
+4 -1
View File
@@ -24,14 +24,17 @@
#include <math.h>
#include <gdk/gdk.h>
#include "gdkwin32.h"
#include "gdkprivate-win32.h"
#include "gdkdevicemanager-win32.h"
#include "gdkdeviceprivate.h"
#include "gdkdevice-win32.h"
#include "gdkdevice-wintab.h"
#include "gdkwin32.h"
#include "gdkdisplayprivate.h"
#include <windows.h>
#include <wintab.h>
#define WINTAB32_DLL "Wintab32.dll"
#define PACKETDATA (PK_CONTEXT | PK_CURSOR | PK_BUTTONS | PK_X | PK_Y | PK_NORMAL_PRESSURE | PK_ORIENTATION)
+3
View File
@@ -495,7 +495,10 @@ gdk_win32_display_class_init (GdkWin32DisplayClass *klass)
display_class->supports_composite = gdk_win32_display_supports_composite;
display_class->list_devices = _gdk_win32_display_list_devices;
display_class->send_client_message = _gdk_win32_display_send_client_message;
display_class->add_client_message_filter = _gdk_win32_display_add_client_message_filter;
//? display_class->get_app_launch_context = _gdk_win32_display_get_app_launch_context;
display_class->get_drag_protocol = _gdk_win32_display_get_drag_protocol;
display_class->get_cursor_for_type = _gdk_win32_display_get_cursor_for_type;
display_class->get_cursor_for_name = _gdk_win32_display_get_cursor_for_name;
display_class->get_cursor_for_pixbuf = _gdk_win32_display_get_cursor_for_pixbuf;
+17 -16
View File
@@ -1972,32 +1972,33 @@ _gdk_win32_dnd_do_dragdrop (void)
}
}
/* Untested, may not work ...
* ... but as of this writing is only used by exlusive X11 gtksocket.c
*/
GdkDragProtocol
_gdk_win32_window_get_drag_protocol (GdkWindow *window,
GdkWindow **target)
GdkNativeWindow
_gdk_win32_display_get_drag_protocol (GdkDisplay *display,
GdkNativeWindow xid,
GdkDragProtocol *protocol,
guint *version)
{
GdkDragProtocol protocol = GDK_DRAG_PROTO_NONE;
GdkWindow *window;
if (gdk_window_get_window_type (window) != GDK_WINDOW_FOREIGN)
window = gdk_win32_window_lookup_for_display (display, xid);
if (window &&
gdk_window_get_window_type (window) != GDK_WINDOW_FOREIGN)
{
if (g_object_get_data (G_OBJECT (window), "gdk-dnd-registered") != NULL)
{
if (use_ole2_dnd)
protocol = GDK_DRAG_PROTO_OLE2;
*protocol = GDK_DRAG_PROTO_OLE2;
else
protocol = GDK_DRAG_PROTO_LOCAL;
*protocol = GDK_DRAG_PROTO_LOCAL;
/* even X11 code not always intializes it */
*version = 0;
return xid;
}
}
if (target)
{
*target = NULL;
}
return protocol;
return 0;
}
static GdkWindow *
+79 -18
View File
@@ -48,11 +48,11 @@
#include "gdk.h"
#include "gdkdisplayprivate.h"
#include "gdkprivate-win32.h"
#include "gdkwin32.h"
#include "gdkkeysyms.h"
#include "gdkdevicemanager-win32.h"
#include "gdkdeviceprivate.h"
#include "gdkdevice-wintab.h"
#include "gdkwin32.h"
#include "gdkwin32dnd.h"
#include "gdkdndprivate.h"
@@ -527,7 +527,7 @@ find_window_for_mouse_event (GdkWindow* reported_window,
if (!PtInRect (&rect, pt))
return _gdk_root;
other_window = gdk_win32_handle_table_lookup (hwnd);
other_window = gdk_win32_handle_table_lookup ((GdkNativeWindow) hwnd);
}
if (other_window == NULL)
@@ -544,6 +544,21 @@ find_window_for_mouse_event (GdkWindow* reported_window,
return other_window;
}
void
_gdk_win32_display_add_client_message_filter (GdkDisplay *display,
GdkAtom message_type,
GdkFilterFunc func,
gpointer data)
{
GdkClientFilter *filter = g_new (GdkClientFilter, 1);
filter->type = message_type;
filter->function = func;
filter->data = data;
client_filters = g_list_append (client_filters, filter);
}
static void
build_key_event_state (GdkEvent *event,
BYTE *key_state)
@@ -819,7 +834,14 @@ _gdk_win32_print_event (const GdkEvent *event)
event->dnd.context->dest_window == NULL ? NULL : GDK_WINDOW_HWND (event->dnd.context->dest_window));
break;
case GDK_CLIENT_EVENT:
/* no more GdkEventClient */
g_print ("%s %d %ld %ld %ld %ld %ld",
gdk_atom_name (event->client.message_type),
event->client.data_format,
event->client.data.l[0],
event->client.data.l[1],
event->client.data.l[2],
event->client.data.l[3],
event->client.data.l[4]);
break;
case GDK_SCROLL:
g_print ("(%.4g,%.4g) (%.4g,%.4g) %s ",
@@ -1734,7 +1756,7 @@ gdk_event_translate (MSG *msg,
return TRUE;
}
window = gdk_win32_handle_table_lookup (msg->hwnd);
window = gdk_win32_handle_table_lookup ((GdkNativeWindow) msg->hwnd);
orig_window = window;
if (window == NULL)
@@ -1846,7 +1868,15 @@ gdk_event_translate (MSG *msg,
goto done;
case GDK_FILTER_CONTINUE:
/* No more: Send unknown client messages on to Gtk for it to use */
/* Send unknown client messages on to Gtk for it to use */
event->client.type = GDK_CLIENT_EVENT;
event->client.window = window;
event->client.message_type = GDK_POINTER_TO_ATOM (msg->wParam);
event->client.data_format = 32;
event->client.data.l[0] = msg->lParam;
for (i = 1; i < 5; i++)
event->client.data.l[i] = 0;
GDK_NOTE (EVENTS, _gdk_win32_print_event (event));
return_val = TRUE;
goto done;
@@ -1958,16 +1988,12 @@ gdk_event_translate (MSG *msg,
build_key_event_state (event, key_state);
if (msg->wParam == VK_PACKET &&
ToUnicode (VK_PACKET, HIWORD (msg->lParam), key_state, wbuf, 1, 0) == 1)
event->key.keyval = gdk_unicode_to_keyval (wbuf[0]);
else
gdk_keymap_translate_keyboard_state (_gdk_win32_display_get_keymap (_gdk_display),
event->key.hardware_keycode,
event->key.state,
event->key.group,
&event->key.keyval,
NULL, NULL, NULL);
gdk_keymap_translate_keyboard_state (_gdk_win32_display_get_keymap (_gdk_display),
event->key.hardware_keycode,
event->key.state,
event->key.group,
&event->key.keyval,
NULL, NULL, NULL);
fill_key_event_string (event);
@@ -2209,7 +2235,7 @@ gdk_event_translate (MSG *msg,
GDK_NOTE (EVENTS, g_print (" %d (%ld,%ld)",
HIWORD (msg->wParam), msg->pt.x, msg->pt.y));
if (!gdk_win32_handle_table_lookup (WindowFromPoint (msg->pt)))
if (!gdk_win32_handle_table_lookup ((GdkNativeWindow) WindowFromPoint (msg->pt)))
{
/* we are only interested if we don't know the new window */
if (current_toplevel)
@@ -2240,7 +2266,7 @@ gdk_event_translate (MSG *msg,
break;
msg->hwnd = hwnd;
if ((new_window = gdk_win32_handle_table_lookup (msg->hwnd)) == NULL)
if ((new_window = gdk_win32_handle_table_lookup ((GdkNativeWindow) msg->hwnd)) == NULL)
break;
if (new_window != window)
@@ -2968,7 +2994,7 @@ gdk_event_translate (MSG *msg,
event->selection.selection = GDK_SELECTION_CLIPBOARD;
event->selection.target = target;
event->selection.property = _gdk_selection;
event->selection.requestor = gdk_win32_handle_table_lookup (msg->hwnd);
event->selection.requestor = msg->hwnd;
event->selection.time = msg->time;
fixup_event (event);
@@ -3194,6 +3220,41 @@ is_modally_blocked (GdkWindow *window)
return modal_current != NULL ? gdk_window_get_toplevel (window) != modal_current : FALSE;
}
static void
check_for_too_much_data (GdkEvent *event)
{
if (event->client.data.l[1] ||
event->client.data.l[2] ||
event->client.data.l[3] ||
event->client.data.l[4])
{
g_warning ("Only four bytes of data are passed in client messages on Win32\n");
}
}
gboolean
_gdk_win32_display_send_client_message (GdkDisplay *display,
GdkEvent *event,
GdkNativeWindow winid)
{
check_for_too_much_data (event);
return PostMessageW ((HWND) winid, client_message,
(WPARAM) event->client.message_type,
event->client.data.l[0]);
}
void
_gdk_win32_screen_broadcast_client_message (GdkScreen *screen,
GdkEvent *event)
{
check_for_too_much_data (event);
PostMessageW (HWND_BROADCAST, client_message,
(WPARAM) event->client.message_type,
event->client.data.l[0]);
}
void
_gdk_win32_display_sync (GdkDisplay * display)
{
+1 -1
View File
@@ -417,7 +417,7 @@ update_keymap (void)
{
guint keysym = gdk_unicode_to_keyval (wcs[0]);
/* It is a dead key, and it has been stored in
/* It is a dead key, and it's has been stored in
* the keyboard layout's state by
* ToAsciiEx()/ToUnicodeEx(). Yes, this is an
* incredibly silly API! Make the keyboard
+14 -4
View File
@@ -164,9 +164,6 @@ void _gdk_win32_window_move_region (GdkWindow *window,
void _gdk_win32_selection_init (void);
void _gdk_win32_dnd_exit (void);
GdkDragProtocol _gdk_win32_window_get_drag_protocol (GdkWindow *window,
GdkWindow **target);
void gdk_win32_handle_table_insert (HANDLE *handle,
gpointer data);
void gdk_win32_handle_table_remove (HANDLE handle);
@@ -367,6 +364,11 @@ HICON _gdk_win32_pixbuf_to_hcursor (GdkPixbuf *pixbuf,
gboolean _gdk_win32_pixbuf_to_hicon_supports_alpha (void);
/* GdkDisplay member functions */
GdkNativeWindow _gdk_win32_display_get_drag_protocol (GdkDisplay *display,
GdkNativeWindow xid,
GdkDragProtocol *protocol,
guint *version);
GdkCursor *_gdk_win32_display_get_cursor_for_type (GdkDisplay *display,
GdkCursorType cursor_type);
GdkCursor *_gdk_win32_display_get_cursor_for_name (GdkDisplay *display,
@@ -386,6 +388,13 @@ gboolean _gdk_win32_display_supports_cursor_color (GdkDisplay *display);
GList *_gdk_win32_display_list_devices (GdkDisplay *dpy);
gboolean _gdk_win32_display_send_client_message (GdkDisplay *display,
GdkEvent *event,
GdkNativeWindow winid);
void _gdk_win32_display_add_client_message_filter (GdkDisplay *display,
GdkAtom message_type,
GdkFilterFunc func,
gpointer data);
void _gdk_win32_display_sync (GdkDisplay * display);
gboolean _gdk_win32_display_has_pending (GdkDisplay *display);
void _gdk_win32_display_queue_events (GdkDisplay *display);
@@ -403,7 +412,7 @@ gboolean _gdk_win32_display_set_selection_owner (GdkDisplay *display,
guint32 time,
gboolean send_event);
void _gdk_win32_display_send_selection_notify (GdkDisplay *display,
HWND requestor,
GdkNativeWindow requestor,
GdkAtom selection,
GdkAtom target,
GdkAtom property,
@@ -473,6 +482,7 @@ void _gdk_win32_window_delete_property (GdkWindow *window, GdkAtom property);
/* Stray GdkWin32Screen members */
GdkVisual *_gdk_win32_screen_get_system_visual (GdkScreen *screen);
void _gdk_win32_screen_broadcast_client_message (GdkScreen *screen, GdkEvent *event);
gboolean _gdk_win32_screen_get_setting (GdkScreen *screen, const gchar *name, GValue *value);
gint _gdk_win32_screen_visual_get_best_depth (GdkScreen *screen);
GdkVisualType _gdk_win32_screen_visual_get_best_type (GdkScreen *screen);
+1
View File
@@ -228,6 +228,7 @@ gdk_win32_screen_class_init (GdkWin32ScreenClass *klass)
screen_class->make_display_name = gdk_win32_screen_make_display_name;
screen_class->get_active_window = gdk_win32_screen_get_active_window;
screen_class->get_window_stack = gdk_win32_screen_get_window_stack;
screen_class->broadcast_client_message = _gdk_win32_screen_broadcast_client_message;
screen_class->get_setting = _gdk_win32_screen_get_setting;
screen_class->visual_get_best_depth = _gdk_win32_screen_visual_get_best_depth;
screen_class->visual_get_best_type = _gdk_win32_screen_visual_get_best_type;

Some files were not shown because too many files have changed in this diff Show More