Compare commits
9 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 78c0b1da9f | |||
| e2dfd6296d | |||
| 0ee8c43f8f | |||
| db55f2e16d | |||
| 2f3d2128ea | |||
| 0054bb6936 | |||
| d10c862acd | |||
| 0640d95a11 | |||
| 542533a2a5 |
@@ -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
@@ -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
|
||||
|
||||
|
||||
+2
-2
@@ -55,11 +55,11 @@ MAINTAINERCLEANFILES = \
|
||||
|
||||
|
||||
## Copy .pc files to target-specific names
|
||||
gtk+-x11-3.0.pc gtk+-win32-3.0.pc gtk+-quartz-3.0.pc gtk+-broadway-3.0.pc gtk+-wayland-3.0.pc: gtk+-3.0.pc
|
||||
gtk+-x11-3.0.pc gtk+-win32-3.0.pc gtk+-quartz-3.0.pc: gtk+-3.0.pc
|
||||
rm -f $@ && \
|
||||
cp gtk+-3.0.pc $@
|
||||
|
||||
gdk-x11-3.0.pc gdk-win32-3.0.pc gdk-quartz-3.0.pc gdk-broadway-3.0.pc gdk-wayland-3.0.pc: gdk-3.0.pc
|
||||
gdk-x11-3.0.pc gdk-win32-3.0.pc gdk-quartz-3.0.pc: gdk-3.0.pc
|
||||
rm -f $@ && \
|
||||
cp gdk-3.0.pc $@
|
||||
|
||||
|
||||
@@ -1,392 +1,3 @@
|
||||
Overview of Changes in GTK+ 3.1.2
|
||||
=================================
|
||||
|
||||
* Theming fixes and enhancements
|
||||
- GtkNotebook has an initial-gap style property
|
||||
- GtkNotebook tab drawing fixes
|
||||
- Fix problems with transparent backgrounds in panel applets
|
||||
- Style classes for 'inline' and 'primary' toolbars and sidebars
|
||||
- Dark theme information is made available to window managers via
|
||||
the _GTK_THEME_VARIANT property
|
||||
- Improved rendering of insensitive text
|
||||
- Support non-uniform border withs in the default engine
|
||||
- Fix prelight on treeview expanders
|
||||
- Make it possible to give combo boxes, buttons, entries a
|
||||
uniform height
|
||||
|
||||
* GtkEntry supports 'hinting'
|
||||
|
||||
* GtkExpander can resize toplevel windows when expanding
|
||||
|
||||
* GtkGrid supports RTL flipping
|
||||
|
||||
* GtkStatusIcon reads the _NET_SYSTEM_TRAY_ICON_SIZE property
|
||||
to get information about the preferred icon size
|
||||
|
||||
* To help with debugging of rendering problems, GDK consults
|
||||
the GDK_RENDERING environment variable. Possible values include
|
||||
'similar', 'image' and 'recording'
|
||||
|
||||
* Fix some problems with XI2 and input methods
|
||||
|
||||
* New, experimental GDK backends:
|
||||
- broadway, which targets HTML5
|
||||
- wayland, which targets the wayland display server
|
||||
To build these backends, use the --enable-broadway-backend
|
||||
and --enable-wayland-backend configure options.
|
||||
To use them at runtime, set the GDK_BACKEND environment variable
|
||||
to 'broadway' or 'wayland'. Other backend-specific setup may
|
||||
still be required, such as running a wayland server.
|
||||
|
||||
* Bugs fixed:
|
||||
440963 Add hinting to GtkEntry
|
||||
635254 Check whether a resolution is set in GtkPrintSettings...
|
||||
639584 initial emission of GtkWidget:style-set is not happening
|
||||
640692 GtkNotebook has wrong background colour when border and...
|
||||
642712 improve the file chooser design
|
||||
642918 Sensitivity of buttons sometimes screws up
|
||||
643805 Allow GtkExpander to resize the toplevel upon expanding...
|
||||
643841 Make initial gap before the first tab of the notebook...
|
||||
644276 paned: don't set the "pane-separator" style class...
|
||||
644348 notebook: make GtkNotebook respect the focus-padding...
|
||||
644353 Missing annotations in Gtk/Gdk Window...
|
||||
644355 credits toggle inconsintency
|
||||
644570 handles with a background image don't work
|
||||
644777 range: allow stepper-spacing > 0 and trough-under-...
|
||||
644836 gdk_keyval_to_unicode returns incorrect value...
|
||||
644847 GdkDeviceManagerXI2: process send_event core events
|
||||
644925 widget: reset widget style after applying style classes...
|
||||
644975 styleproperties: make sure to merge the font...
|
||||
644976 Fix "backspace", "enter", "escape" input.
|
||||
645057 ./configure fails on gtk+3.0 git head
|
||||
645134 switch: fix boundaries for the switch motion
|
||||
645172 radiobutton: don't forget to set the insensitive state...
|
||||
645176 Closing display causes segfault
|
||||
645232 symbolic status icons are the wrong size
|
||||
645234 Leaky calls to gdk_device_manager_list_devices()
|
||||
645235 Free the motion hint infos in GdkDisplay
|
||||
645236 Don't leak translate queue in GdkDisplay
|
||||
645341 pre dialog set CAPSLOCK is ignored.
|
||||
645354 window: Export theme variant to X11
|
||||
645405 themingengine: don't hardcode white to draw insensitive...
|
||||
645458 styleproperties: don't replace when merging...
|
||||
645937 Drawing model docs are outdated
|
||||
645960 GtkTreeSelection has no property to set mode
|
||||
646338 gdk_x_io_error() should call _exit(), not exit()
|
||||
646446 gtkprintunixdialog.c: set_cell_sensitivity_func leaks badly
|
||||
646457 Leak in gtkfilechooserdefault.c: search_selected_foreach...
|
||||
646458 Leak in gtkfilechooserdefault.c: list_row_activated
|
||||
646460 Weirdness in gtkfilechooserbutton.c: set_info_get_info_cb
|
||||
646461 Leak in gtkfilechooserbutton.c: model_free_row_data
|
||||
646462 Leak in gtkappchooserbutton.c: select_application_func_cb
|
||||
646500 GTK+ 3.1 causes terminals to start up with 0 height
|
||||
646815 Ref leak in gtk_color_button_clicked
|
||||
646882 Theming fixes for GtkButton and GtkCombobox
|
||||
646886 Do not leak list when drawing notebook.
|
||||
647086 Mismatched style_context_[save/restore] calls
|
||||
647152 Assertion `GTK_IS_PRINTER (printer)' failed...
|
||||
647244 Toggling the 'Deletable' option under the general...
|
||||
647275 Opening messages in Evolution and Empathy...
|
||||
647278 Small cleanup in statusbar
|
||||
647594 README link to mailing list is broken
|
||||
554057 Calling gtk_menu_shell_select_item() on GtkMenuBar...
|
||||
|
||||
Updated translations:
|
||||
Afrikaans
|
||||
Assamese
|
||||
Bengali
|
||||
Brazilian Portuguese
|
||||
British English
|
||||
Bulgarian
|
||||
Catalan
|
||||
Czech
|
||||
Danish
|
||||
Dutch
|
||||
French
|
||||
Galician
|
||||
German
|
||||
Greek
|
||||
Hindi
|
||||
Hungarian
|
||||
Indonesian
|
||||
Japanese
|
||||
Korean
|
||||
Kurdish
|
||||
Portuguese
|
||||
Romanian
|
||||
Russian
|
||||
Serbian
|
||||
Simplified Chinese
|
||||
Slovenian
|
||||
Spanish
|
||||
Swedish
|
||||
Traditional Chinese
|
||||
Uighur
|
||||
Ukrainian
|
||||
|
||||
|
||||
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
|
||||
==================================
|
||||
|
||||
@@ -436,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
|
||||
|
||||
@@ -18,7 +18,7 @@ The official web site is:
|
||||
http://www.gtk.org/
|
||||
|
||||
Information about mailing lists can be found at
|
||||
http://www.gtk.org/mailing-lists.html
|
||||
http://www.gtk.org/mailinglists.html
|
||||
|
||||
|
||||
Installation
|
||||
@@ -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.)
|
||||
|
||||
+4
-20
@@ -7,18 +7,9 @@ Building GTK+ on Win32
|
||||
======================
|
||||
|
||||
First you obviously need developer packages for the compile-time
|
||||
dependencies: GDK-Pixbuf, Pango, atk, glib, gettext-runtime, libiconv at least.
|
||||
See http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies .
|
||||
|
||||
For people compiling GTK+ with Visual C++ 2005 or later, it is
|
||||
recommended that the same compiler is used for at least GDK-Pixbuf,
|
||||
Pango, atk and glib so that crashes and errors caused by different CRTs
|
||||
can be avoided. The VS 2008 project files and/or VS Makefiles are
|
||||
either already available or will be available in the next stable release.
|
||||
Unfortunately compiling with Microsoft's compilers versions 2003 or earlier
|
||||
is not supported as compiling the latest stable GLib (which *is* required for
|
||||
building this GTK+ release) requires features from newer compilers
|
||||
and/or Platform SDKs
|
||||
dependencies: Pango, atk, glib, gettext-runtime, libiconv, libpng,
|
||||
zlib, libtiff at least. See
|
||||
http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies .
|
||||
|
||||
After installing the dependencies, there are two ways to build GTK+
|
||||
for win32.
|
||||
@@ -156,17 +147,11 @@ Use the Microsoft compiler, cl and Make, nmake. Say nmake -f
|
||||
makefile.msc in gdk and gtk. Be prepared to manually edit various
|
||||
makefile.msc files, and the makefile snippets in build/win32.
|
||||
|
||||
There are also VS 2008 solution and project files to build GTK+, which
|
||||
are maintained by Chun-wei Fan. They should build GTK+ out of the box,
|
||||
provided that the afore-mentioned dependencies are installed. They will
|
||||
build GDK with the Win32 backend, GTK+ itself and the gtk-demo program.
|
||||
(The GAIL and GAIL-util sources are not built by this method yet)
|
||||
|
||||
Alternative 1 also generates Microsoft import libraries (.lib), if you
|
||||
have lib.exe available. It might also work for cross-compilation from
|
||||
Unix.
|
||||
|
||||
I (Tor) use method 1 myself. Hans Breuer has been taking care of the MSVC
|
||||
I use method 1 myself. Hans Breuer has been taking care of the MSVC
|
||||
makefiles. At times, we disagree a bit about various issues, and for
|
||||
instance the makefile.msc files might not produce identically named
|
||||
DLLs and import libraries as the "autoconfiscated" makefiles and
|
||||
@@ -197,4 +182,3 @@ sources. Unfortunately it seems that only Wacom tablets come with
|
||||
support for the Wintab API nowadays.
|
||||
|
||||
--Tor Lillqvist <tml@iki.fi>, <tml@novell.com>
|
||||
--Updated by Fan, Chun-wei <fanc999@yahoo.com.tw>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories="..\..\..;$(GlibEtcInstallRoot)\lib\glib-2.0\include;$(GlibEtcInstallRoot)\include\glib-2.0;$(GlibEtcInstallRoot)\include;$(GlibEtcInstallRoot)\include\cairo;$(GlibEtcInstallRoot)\include\atk-1.0;$(GlibEtcInstallRoot)\include\pango-1.0;$(GlibEtcInstallRoot)\include\gdk-pixbuf-2.0"
|
||||
AdditionalIncludeDirectories="..\..\..;$(GlibEtcInstallRoot)\lib\glib-2.0\include;$(GlibEtcInstallRoot)\include\glib-2.0;$(GlibEtcInstallRoot)\include;$(GlibEtcInstallRoot)\include\cairo;$(GlibEtcInstallRoot)\include\atk-1.0;$(GlibEtcInstallRoot)\include\pango-1.0;$(GlibEtcInstallRoot)\include\GdkPixbuf-2.0"
|
||||
PreprocessorDefinitions="HAVE_CONFIG_H;G_DISABLE_DEPRECATED;G_DISABLE_SINGLE_INCLUDES;ATK_DISABLE_SINGLE_INCLUDES;GDK_PIXBUF_DISABLE_SINGLE_INCLUDES;GTK_DISABLE_SINGLE_INCLUDES"
|
||||
ForcedIncludeFiles="msvc_recommended_pragmas.h"
|
||||
/>
|
||||
@@ -316,6 +316,7 @@ copy ..\..\..\gtk\gtkwidget.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk
&#
|
||||
copy ..\..\..\gtk\gtkwidgetpath.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkwindow.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
|
||||
mkdir $(OutDir)\lib\gtk-$(GtkApiVersion)\include

|
||||
copy ..\..\..\gdk\gdkconfig.h $(OutDir)\include\gtk-3.0\gdk

|
||||
|
||||
copy $(ConfigurationName)\$(PlatformName)\bin\*-$(GtkApiVersion).lib $(OutDir)\lib

|
||||
|
||||
+160
-163
@@ -8,9 +8,9 @@
|
||||
# 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], [1])
|
||||
m4_define([gtk_micro_version], [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)])
|
||||
@@ -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,71 +233,63 @@ 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])
|
||||
AC_ARG_ENABLE(broadway-backend,
|
||||
[AC_HELP_STRING([--enable-broadway-backend],
|
||||
[enable the broadway (HTML5) gdk backend])],
|
||||
[backend_set=yes])
|
||||
AC_ARG_ENABLE(wayland-backend,
|
||||
[AC_HELP_STRING([--enable-wayland-backend],
|
||||
[enable the wayland gdk backend])],
|
||||
[backend_set=yes])
|
||||
|
||||
if test -z "$backend_set"; then
|
||||
if test "$platform_win32" = yes; then
|
||||
@@ -323,7 +308,7 @@ GDK_WINDOWING=
|
||||
GIO_PACKAGE=gio-2.0
|
||||
PANGO_PACKAGES="pango pangocairo"
|
||||
|
||||
if test "x$enable_x11_backend" = xyes; then
|
||||
if test "x$enable_x11_backend" == xyes; then
|
||||
# GDK calls the xlib backend "x11," cairo calls it "xlib." Other
|
||||
# backend names are identical.
|
||||
cairo_backends="$cairo_backends cairo-xlib"
|
||||
@@ -336,11 +321,12 @@ if test "x$enable_x11_backend" = xyes; then
|
||||
#define GDK_WINDOWING_X11"
|
||||
fi
|
||||
|
||||
if test "x$enable_win32_backend" = xyes; then
|
||||
if test "x$enable_win32_backend" == xyes; then
|
||||
cairo_backends="$cairo_backends cairo-win32"
|
||||
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)
|
||||
@@ -349,7 +335,7 @@ else
|
||||
AM_CONDITIONAL(USE_WIN32, false)
|
||||
fi
|
||||
|
||||
if test "x$enable_quartz_backend" = xyes; then
|
||||
if test "x$enable_quartz_backend" == xyes; then
|
||||
cairo_backends="$cairo_backends cairo-quartz"
|
||||
GDK_BACKENDS="$GDK_BACKENDS quartz"
|
||||
GDK_WINDOWING="$GDK_WINDOWING
|
||||
@@ -360,33 +346,8 @@ else
|
||||
AM_CONDITIONAL(USE_QUARTZ, false)
|
||||
fi
|
||||
|
||||
|
||||
if test "x$enable_broadway_backend" == xyes; then
|
||||
GDK_BACKENDS="$GDK_BACKENDS broadway"
|
||||
cairo_backends="$cairo_backends cairo"
|
||||
GDK_WINDOWING="$GDK_WINDOWING
|
||||
#define GDK_WINDOWING_BROADWAY"
|
||||
GDK_EXTRA_LIBS="$GDK_EXTRA_LIBS -lz"
|
||||
AM_CONDITIONAL(USE_BROADWAY, true)
|
||||
else
|
||||
AM_CONDITIONAL(USE_BROADWAY, false)
|
||||
fi
|
||||
|
||||
if test "x$enable_wayland_backend" == "xyes"; then
|
||||
# Wayland uses cairo-gl
|
||||
cairo_backends="$cairo_backends cairo-gl"
|
||||
GDK_BACKENDS="$GDK_BACKENDS wayland"
|
||||
GIO_PACKAGE=gio-unix-2.0
|
||||
GDK_WINDOWING="$GDK_WINDOWING
|
||||
#define GDK_WINDOWING_WAYLAND"
|
||||
WAYLAND_PACKAGES="wayland-client xkbcommon wayland-egl"
|
||||
AM_CONDITIONAL(USE_WAYLAND, true)
|
||||
else
|
||||
AM_CONDITIONAL(USE_WAYLAND, false)
|
||||
fi
|
||||
|
||||
# strip leading space
|
||||
GDK_BACKENDS=${GDK_BACKENDS#* }
|
||||
GDK_BACKENDS=${GDK_BACKENDS/# }
|
||||
|
||||
AC_SUBST(GDK_BACKENDS)
|
||||
|
||||
@@ -502,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])
|
||||
|
||||
@@ -511,7 +472,7 @@ case $enable_explicit_deps in
|
||||
auto)
|
||||
export SED
|
||||
deplibs_check_method=`(./libtool --config; echo 'eval echo \"$deplibs_check_method\"') | sh`
|
||||
if test "x$deplibs_check_method" != xpass_all || test "x$enable_static" = xyes ; then
|
||||
if test "x$deplibs_check_method" '!=' xpass_all || test "x$enable_static" = xyes ; then
|
||||
enable_explicit_deps=yes
|
||||
else
|
||||
enable_explicit_deps=no
|
||||
@@ -547,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],
|
||||
@@ -559,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],
|
||||
@@ -571,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],
|
||||
@@ -583,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],
|
||||
@@ -597,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.
|
||||
@@ -631,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)
|
||||
@@ -673,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
|
||||
#
|
||||
@@ -717,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])
|
||||
@@ -733,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
|
||||
@@ -756,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
|
||||
@@ -805,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
|
||||
:
|
||||
@@ -864,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.
|
||||
#
|
||||
@@ -906,7 +910,7 @@ GTK_DEP_PACKAGES_FOR_X=
|
||||
GTK_DEP_LIBS_FOR_X=
|
||||
X_EXTENSIONS=
|
||||
|
||||
if test "x$enable_x11_backend" = xyes; then
|
||||
if test "x$enable_x11_backend" == xyes; then
|
||||
X_PACKAGES=fontconfig
|
||||
|
||||
#
|
||||
@@ -971,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)
|
||||
|
||||
@@ -1199,7 +1203,7 @@ if test "x$enable_x11_backend" = xyes; then
|
||||
AM_CONDITIONAL(USE_X11, true)
|
||||
|
||||
# strip leading space
|
||||
X_EXTENSIONS=${X_EXTENSIONS#* }
|
||||
X_EXTENSIONS=${X_EXTENSIONS/# }
|
||||
|
||||
else
|
||||
XPACKAGES=
|
||||
@@ -1241,7 +1245,7 @@ fi
|
||||
CFLAGS="$saved_cflags"
|
||||
LDFLAGS="$saved_ldflags"
|
||||
|
||||
GDK_PACKAGES="$PANGO_PACKAGES $GIO_PACKAGE $X_PACKAGES $WAYLAND_PACKAGES gdk-pixbuf-2.0 $cairo_backends cairo-gobject"
|
||||
GDK_PACKAGES="$PANGO_PACKAGES $GIO_PACKAGE $X_PACKAGES gdk-pixbuf-2.0 $cairo_backends cairo-gobject"
|
||||
|
||||
GDK_DEP_LIBS="$GDK_EXTRA_LIBS `$PKG_CONFIG --libs $GDK_PACKAGES`"
|
||||
GDK_DEP_CFLAGS="`$PKG_CONFIG --cflags gthread-2.0 $GDK_PACKAGES` $GDK_EXTRA_CFLAGS"
|
||||
@@ -1291,7 +1295,7 @@ else
|
||||
fi
|
||||
|
||||
GTK_PACKAGES="atk cairo cairo-gobject gdk-pixbuf-2.0 gio-2.0"
|
||||
if test "x$enable_x11_backend" = xyes; then
|
||||
if test "x$enable_x11_backend" == xyes; then
|
||||
GTK_PACKAGES="$GTK_PACKAGES pangoft2"
|
||||
fi
|
||||
GTK_EXTRA_LIBS=
|
||||
@@ -1363,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])
|
||||
|
||||
@@ -1405,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)
|
||||
@@ -1425,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)
|
||||
@@ -1469,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
|
||||
@@ -1508,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
|
||||
@@ -1538,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
|
||||
@@ -1614,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
|
||||
@@ -1663,18 +1664,17 @@ build/Makefile
|
||||
build/win32/Makefile
|
||||
build/win32/vs9/Makefile
|
||||
gdk/Makefile
|
||||
gdk/broadway/Makefile
|
||||
gdk/x11/Makefile
|
||||
gdk/win32/Makefile
|
||||
gdk/win32/rc/Makefile
|
||||
gdk/win32/rc/gdk.rc
|
||||
gdk/quartz/Makefile
|
||||
gdk/wayland/Makefile
|
||||
gdk/tests/Makefile
|
||||
gtk/Makefile
|
||||
gtk/makefile.msc
|
||||
gtk/gtkversion.h
|
||||
gtk/gtk-win32.rc
|
||||
gtk/theme-bits/Makefile
|
||||
gtk/tests/Makefile
|
||||
modules/Makefile
|
||||
modules/other/Makefile
|
||||
@@ -1699,13 +1699,10 @@ perf/Makefile
|
||||
AC_OUTPUT
|
||||
|
||||
# beautify the immodule list a bit
|
||||
included_immodules=$(echo "${included_immodules}" | $SED 's/,/ /g')
|
||||
if test -z "${included_immodules}"; then included_immodules="none"; fi
|
||||
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
@@ -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)
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -105,7 +105,6 @@ fill_store (GtkListStore *store)
|
||||
|
||||
name = g_dir_read_name (dir);
|
||||
}
|
||||
g_dir_close (dir);
|
||||
}
|
||||
|
||||
static gint
|
||||
|
||||
@@ -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
@@ -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;
|
||||
|
||||
@@ -93,7 +93,6 @@ search_by_name (GtkWidget *item,
|
||||
GTK_ENTRY_ICON_PRIMARY,
|
||||
"Search by name\n"
|
||||
"Click here to change the search type");
|
||||
gtk_entry_set_placeholder_text (entry, "name");
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -107,7 +106,6 @@ search_by_description (GtkWidget *item,
|
||||
GTK_ENTRY_ICON_PRIMARY,
|
||||
"Search by description\n"
|
||||
"Click here to change the search type");
|
||||
gtk_entry_set_placeholder_text (entry, "description");
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -121,7 +119,6 @@ search_by_file (GtkWidget *item,
|
||||
GTK_ENTRY_ICON_PRIMARY,
|
||||
"Search by file name\n"
|
||||
"Click here to change the search type");
|
||||
gtk_entry_set_placeholder_text (entry, "file name");
|
||||
}
|
||||
|
||||
GtkWidget *
|
||||
@@ -249,7 +246,6 @@ do_search_entry (GtkWidget *do_widget)
|
||||
GtkWidget *hbox;
|
||||
GtkWidget *label;
|
||||
GtkWidget *entry;
|
||||
GtkWidget *button;
|
||||
GtkWidget *find_button;
|
||||
GtkWidget *cancel_button;
|
||||
|
||||
@@ -327,10 +323,6 @@ do_search_entry (GtkWidget *do_widget)
|
||||
/* add accessible alternatives for icon functionality */
|
||||
g_signal_connect (entry, "populate-popup",
|
||||
G_CALLBACK (entry_populate_popup), NULL);
|
||||
|
||||
/* Give the focus to the close button */
|
||||
button = gtk_dialog_get_widget_for_response (GTK_DIALOG (window), GTK_RESPONSE_NONE);
|
||||
gtk_widget_grab_focus (button);
|
||||
}
|
||||
|
||||
if (!gtk_widget_get_visible (window))
|
||||
|
||||
@@ -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 = \
|
||||
|
||||
@@ -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" />
|
||||
|
||||
@@ -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
|
||||
@@ -949,7 +957,6 @@ gdk_x11_screen_supports_net_wm_hint
|
||||
gdk_x11_window_foreign_new_for_display
|
||||
gdk_x11_window_lookup_for_display
|
||||
gdk_x11_window_get_xid
|
||||
gdk_x11_window_set_theme_variant
|
||||
gdk_x11_window_set_user_time
|
||||
gdk_x11_window_move_to_current_desktop
|
||||
gdk_x11_get_default_root_xwindow
|
||||
|
||||
@@ -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 (&argc, &argv);
|
||||
|
||||
display = gdk_display_get_default ();
|
||||
num_screen = gdk_display_get_n_screens (display);
|
||||
displayname = gdk_display_get_name (display);
|
||||
if (num_screen <= 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 (&argc, &argv);
|
||||
|
||||
/* screen2_name needs to be initialized before calling
|
||||
/* gdk_display_new() */
|
||||
second_display = gdk_display_new (&argc, &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:
|
||||
-->
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -178,7 +178,7 @@ HTML_IMAGES = \
|
||||
$(top_srcdir)/gtk/stock-icons/32/gtk-dnd-multiple.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/gtk-edit.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/system-run.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/text-x-generic.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/document-x-generic.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/edit-find.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/edit-find-replace.png \
|
||||
$(top_srcdir)/gtk/stock-icons/24/go-bottom.png \
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -78,72 +78,42 @@
|
||||
of the resources they use from the windowing system.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
A <link linkend="GdkWindow"><classname>GdkWindow</classname></link>
|
||||
represents a window from the underlying windowing system on which GTK+
|
||||
is running. For example, on X11 it corresponds to a
|
||||
<type>Window</type>; on Win32, it corresponds to a <type>HANDLE</type>.
|
||||
The windowing system generates events for these windows. The GDK
|
||||
interface to the windowing system translates such native events into
|
||||
<link linkend="GdkEvent"><structname>GdkEvent</structname></link>
|
||||
structures and sends them on to the GTK layer. In turn, the GTK layer
|
||||
finds the widget that corresponds to a particular
|
||||
<classname>GdkWindow</classname> and emits the corresponding event
|
||||
signals on that widget.
|
||||
</para>
|
||||
|
||||
<refsect2 id="emission of the draw event">
|
||||
<title>Emission of the draw event</title>
|
||||
|
||||
<para>
|
||||
When the program needs to redraw a region of a
|
||||
<classname>GdkWindow</classname>, generates an event of
|
||||
type <link
|
||||
linkend="GDK_EVENT_EXPOSE"><constant>GDK_EVENT_EXPOSE</constant></link>
|
||||
for that window, specifying the region to redraw in the process.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
When generating the event, GDK also sets up double buffering to
|
||||
avoid the flickering that would result from each widget drawing
|
||||
itself in turn. <xref linkend="double-buffering"/> describes
|
||||
the double buffering mechanism in detail.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
When the GTK+ widget layer receives the event, it finds the widget that
|
||||
corresponds to the window, and causes it to render itself using the
|
||||
widget's #GtkWidget::draw signal. For this purpose it creates a
|
||||
<link linkend="#cairo_t">cairo context</link>. It then clips the context
|
||||
to the area that needs to be drawn. This makes sure that the minimal
|
||||
amount of work is done if only a small part of the widget needs to be
|
||||
repainted. After translating the context so that its (0, 0) coordinate
|
||||
corresponds to the top left corner of the widget, it effectively calls
|
||||
the widget's <function>gtk_widget_draw</function> function.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
<function>gtk_widget_draw</function> takes care of drawing the widget
|
||||
to the cairo context. It first checks that the widget actually needs to
|
||||
be drawn. Widgets might for example be empty or outside of the cairo
|
||||
context's clipped area, which would make drawing them not do anything.
|
||||
Usually they will need to be drawn. In this case, the context will be
|
||||
clipped to the widget's allocated size and the
|
||||
<link linkend="GtkWidget::draw">draw signal</link> will be emitted on
|
||||
the widget which will finally draw the widget.
|
||||
</para>
|
||||
</refsect2>
|
||||
|
||||
<refsect2 id="window-no-window-widgets">
|
||||
<title>Window and no-window widgets</title>
|
||||
|
||||
<para>
|
||||
A <link linkend="GdkWindow"><classname>GdkWindow</classname></link>
|
||||
represents a window from the underlying windowing system on which GTK+
|
||||
is running. For example, on X11 it corresponds to a
|
||||
<type>Window</type>; on Win32, it corresponds to a <type>HANDLE</type>.
|
||||
The windowing system generates events for these windows. The GDK
|
||||
interface to the windowing system translates such native events into
|
||||
<link linkend="GdkEvent"><structname>GdkEvent</structname></link>
|
||||
structures and sends them on to the GTK layer. In turn, the GTK layer
|
||||
finds the widget that corresponds to a particular
|
||||
<classname>GdkWindow</classname> and emits the corresponding event
|
||||
signals on that widget.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
When the program needs to redraw a region of a
|
||||
<classname>GdkWindow</classname>, GDK generates an event of
|
||||
type <link
|
||||
linkend="GDK_EVENT_EXPOSE"><constant>GDK_EVENT_EXPOSE</constant></link>
|
||||
for that window. The GTK+ widget layer in turn finds the
|
||||
widget that corresponds to that window, and emits the <link
|
||||
linkend="GtkWidget-expose-event">expose-event signal</link>
|
||||
for that widget.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
In principle, each widget could have a
|
||||
<classname>GdkWindow</classname> of its own. With such a
|
||||
scheme, the drawing cycle would be trivial: when GDK notifies
|
||||
the GTK layer about an exposure event for a
|
||||
<classname>GdkWindow</classname>, the GTK layer would simply
|
||||
emit the #GtkWidget::draw signal for that widget. The signal
|
||||
emit the <link linkend="GtkWidget-expose-event">expose-event
|
||||
signal</link> for that widget. The widget's expose event
|
||||
handler would subsequently repaint the widget. No further
|
||||
work would be necessary; the windowing system would generate
|
||||
exposure events for each window that needs it, and then each
|
||||
@@ -323,8 +293,56 @@
|
||||
|
||||
<graphic fileref="figure-hierarchical-drawing.png" format="png"/>
|
||||
</figure>
|
||||
|
||||
<para>
|
||||
To avoid the flickering that would result from each widget drawing
|
||||
itself in turn, GTK+ uses a double-buffering mechanism. The following
|
||||
sections describe this mechanism in detail.
|
||||
</para>
|
||||
</refsect2>
|
||||
|
||||
<refsect2 id="notes-on-drawing-no-window-widgets">
|
||||
<title>Notes on drawing no-window widgets</title>
|
||||
|
||||
<para>
|
||||
Remember that the coordinates in a <link
|
||||
linkend="GdkEventExpose">GdkEventExpose</link> are relative to
|
||||
the <classname>GdkWindow</classname> that received the event,
|
||||
<emphasis>not</emphasis> to the widget whose expose-event
|
||||
handler is being called. If your widget owns the window, then
|
||||
these coordinates are probably what you expect. However, if
|
||||
you have a <constant>GTK_NO_WINDOW</constant> widget that
|
||||
shares its parent's window, then the event's coordinates will
|
||||
be offset by your widget's allocation: remember that the
|
||||
allocation is always relative to the parent
|
||||
<emphasis>window</emphasis> of the widget, not to the parent
|
||||
<emphasis>widget</emphasis> itself.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
For example, if you have a no-window widget whose allocation
|
||||
is { x=5, y=6,
|
||||
<replaceable>width</replaceable>, <replaceable>height</replaceable> },
|
||||
then your drawing origin should be at (5, 6), not at
|
||||
(0, 0).
|
||||
</para>
|
||||
</refsect2>
|
||||
|
||||
<refsect2 id="include-inferiors">
|
||||
<title>Drawing over child windows</title>
|
||||
|
||||
<para>
|
||||
When you draw on a <classname>GdkWindow</classname>, your
|
||||
drawing gets clipped by any child windows that it may
|
||||
intersect. Sometimes you need to draw over your child windows
|
||||
as well; for example, when drawing a drag-handle to resize
|
||||
something. In this case, turn on the <link
|
||||
linkend="GDK-INCLUDE-INFERIORS:CAPS">GDK_INCLUDE_INFERIORS</link>
|
||||
subwindow mode for the <link
|
||||
linkend="gdk-Graphics-Contexts">GdkGC</link> which you use for
|
||||
drawing.
|
||||
</para>
|
||||
</refsect2>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 id="double-buffering">
|
||||
@@ -333,8 +351,8 @@
|
||||
<para>
|
||||
When the GTK layer receives an exposure event from GDK, it first finds
|
||||
the <literal>!<constant>GTK_NO_WINDOW</constant></literal> widget that
|
||||
corresponds to the event's window. Then, it emits the
|
||||
#GtkWidget::draw signal for that
|
||||
corresponds to the event's window. Then, it emits the <link
|
||||
linkend="GtkWidget-expose-event">expose-event signal</link> for that
|
||||
widget. As described above, that widget will first draw its background,
|
||||
and then ask each of its <constant>GTK_NO_WINDOW</constant> children to
|
||||
draw themselves.
|
||||
@@ -342,7 +360,7 @@
|
||||
|
||||
<para>
|
||||
If each of the drawing calls made by each subwidget's
|
||||
<literal>draw</literal> handler were sent directly to the
|
||||
<literal>expose-event</literal> handler were sent directly to the
|
||||
windowing system, flicker could result. This is because areas may get
|
||||
redrawn repeatedly: the background, then decorative frames, then text
|
||||
labels, etc. To avoid flicker, GTK+ employs a <firstterm>double
|
||||
@@ -392,7 +410,7 @@
|
||||
It would be inconvenient for all widgets to call
|
||||
<function>gdk_window_begin_paint_region()</function> and
|
||||
<function>gdk_window_end_paint()</function> at the beginning
|
||||
and end of their draw handlers.
|
||||
and end of their expose-event handlers.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
@@ -401,7 +419,7 @@
|
||||
linkend="GtkWidgetFlags">widget flag</link> turned on by
|
||||
default. When GTK+ encounters such a widget, it automatically
|
||||
calls <function>gdk_window_begin_paint_region()</function>
|
||||
before emitting the #GtkWidget::draw signal for the widget, and
|
||||
before emitting the expose-event signal for the widget, and
|
||||
then it calls <function>gdk_window_end_paint()</function>
|
||||
after the signal has been emitted. This is convenient for
|
||||
most widgets, as they do not need to worry about creating
|
||||
@@ -412,9 +430,8 @@
|
||||
<para>
|
||||
However, some widgets may prefer to disable this kind of
|
||||
automatic double buffering and do things on their own. To do
|
||||
this, call the
|
||||
<function>gtk_widget_set_double_buffered()</function> function
|
||||
in your widget's constructor.
|
||||
this, turn off the <constant>GTK_DOUBLE_BUFFERED</constant>
|
||||
flag in your widget's constructor.
|
||||
</para>
|
||||
|
||||
<example id="disabling-double-buffering">
|
||||
@@ -446,7 +463,8 @@ my_widget_init (MyWidget *widget)
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Even if you turn off double buffering on a widget, you
|
||||
Even if you turn off the
|
||||
<constant>GTK_DOUBLE_BUFFERED</constant> flag on a widget, you
|
||||
can still call
|
||||
<function>gdk_window_begin_paint_region()</function> and
|
||||
<function>gdk_window_end_paint()</function> by hand to use
|
||||
@@ -471,42 +489,69 @@ my_widget_init (MyWidget *widget)
|
||||
|
||||
<para>
|
||||
<classname>GtkWindow</classname> and
|
||||
<classname>GtkEventBox</classname> are the two widgets that allow
|
||||
turning off drawing of default contents by calling
|
||||
<function>gtk_widget_set_app_paintable()</function>. If you call
|
||||
this function, they will not draw their contents and let you do
|
||||
<classname>GtkEventBox</classname> are the only two widgets
|
||||
which will draw their default contents unless you turn on the
|
||||
<constant>GTK_APP_PAINTABLE</constant> <link
|
||||
linkend="GtkWidgetFlags">widget flag</link>. If you turn on
|
||||
this flag, then they will not draw their contents and let you do
|
||||
it instead.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Since the #GtkWidget::draw signal runs user-connected handlers
|
||||
The expose-event handler for <classname>GtkWindow</classname> is
|
||||
implemented effectively like this:
|
||||
</para>
|
||||
|
||||
<programlisting>
|
||||
static gint
|
||||
gtk_window_expose (GtkWidget *widget,
|
||||
GdkEventExpose *event)
|
||||
{
|
||||
if (!gtk_widget_get_app_paintable (widget))
|
||||
gtk_paint_flat_box (widget->style, widget->window, GTK_STATE_NORMAL,
|
||||
GTK_SHADOW_NONE, event->area, widget, "base", 0, 0, -1, -1);
|
||||
|
||||
if (GTK_WIDGET_CLASS (gtk_window_parent_class)->expose_event)
|
||||
return GTK_WIDGET_CLASS (gtk_window_parent_class)->expose_event (widget, event);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
</programlisting>
|
||||
|
||||
<para>
|
||||
The expose-event handler for <classname>GtkEventBox</classname>
|
||||
is implemented in a similar fashion.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Since the <link linkend="GtkWidget-expose-event">expose-event
|
||||
signal</link> runs user-connected handlers
|
||||
<emphasis>before</emphasis> the widget's default handler, what
|
||||
usually happens is this:
|
||||
happens is this:
|
||||
</para>
|
||||
|
||||
<orderedlist>
|
||||
<listitem>
|
||||
<para>
|
||||
Your own draw handler gets run. It paints something
|
||||
Your own expose-event handler gets run. It paints something
|
||||
on the window or the event box.
|
||||
</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>
|
||||
The widget's default draw handler gets run. If
|
||||
<function>gtk_widget_set_app_paintable()</function> has not
|
||||
been called to turn off widget drawing (this
|
||||
The widget's default expose-event handler gets run. If
|
||||
<constant>GTK_APP_PAINTABLE</constant> is turned off (this
|
||||
is the default), <emphasis>your drawing will be
|
||||
overwritten</emphasis>. An app paintable widget will not
|
||||
draw its default contents however and preserve your drawing
|
||||
instead.
|
||||
overwritten</emphasis>. If that flag is turned on, the
|
||||
widget will not draw its default contents and preserve your
|
||||
drawing instead.
|
||||
</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>
|
||||
The draw handler for the parent class gets run.
|
||||
The expose-event handler for the parent class gets run.
|
||||
Since both <classname>GtkWindow</classname> and
|
||||
<classname>GtkEventBox</classname> are descendants of
|
||||
<classname>GtkContainer</classname>, their no-window
|
||||
@@ -520,7 +565,7 @@ my_widget_init (MyWidget *widget)
|
||||
<title>Summary of app-paintable widgets</title>
|
||||
|
||||
<para>
|
||||
Call <function>gtk_widget_set_app_paintable()</function> if you
|
||||
Turn on the <constant>GTK_APP_PAINTABLE</constant> flag if you
|
||||
intend to draw your own content directly on a
|
||||
<classname>GtkWindow</classname> and
|
||||
<classname>GtkEventBox</classname>. You seldom need to draw
|
||||
|
||||
@@ -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>
|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -376,10 +374,6 @@
|
||||
<title>Index of new symbols in 3.0</title>
|
||||
<xi:include href="xml/api-index-3.0.xml"><xi:fallback /></xi:include>
|
||||
</index>
|
||||
<index id="api-index-3-2" role="3.2">
|
||||
<title>Index of new symbols in 3.2</title>
|
||||
<xi:include href="xml/api-index-3.2.xml"><xi:fallback /></xi:include>
|
||||
</index>
|
||||
|
||||
<xi:include href="xml/annotation-glossary.xml"><xi:fallback /></xi:include>
|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
|
||||
@@ -1028,8 +1028,6 @@ gtk_entry_set_width_chars
|
||||
gtk_entry_get_invisible_char
|
||||
gtk_entry_set_alignment
|
||||
gtk_entry_get_alignment
|
||||
gtk_entry_set_placeholder_text
|
||||
gtk_entry_get_placeholder_text
|
||||
gtk_entry_set_overwrite_mode
|
||||
gtk_entry_get_overwrite_mode
|
||||
gtk_entry_get_layout
|
||||
@@ -1197,8 +1195,6 @@ gtk_expander_set_label_widget
|
||||
gtk_expander_get_label_widget
|
||||
gtk_expander_set_label_fill
|
||||
gtk_expander_get_label_fill
|
||||
gtk_expander_set_resize_toplevel
|
||||
gtk_expander_get_resize_toplevel
|
||||
<SUBSECTION Standard>
|
||||
GTK_TYPE_EXPANDER
|
||||
GTK_EXPANDER_CLASS
|
||||
@@ -2062,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
|
||||
@@ -4208,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
|
||||
@@ -4293,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
|
||||
@@ -4434,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
|
||||
@@ -4563,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>
|
||||
@@ -5440,7 +5433,6 @@ gtk_widget_path_iter_set_object_type
|
||||
gtk_widget_path_length
|
||||
gtk_widget_path_new
|
||||
gtk_widget_path_prepend_type
|
||||
gtk_widget_path_to_string
|
||||
|
||||
<SUBSECTION Standard>
|
||||
GTK_TYPE_WIDGET_PATH
|
||||
@@ -5539,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
|
||||
@@ -5760,7 +5750,6 @@ gtk_style_new
|
||||
gtk_style_copy
|
||||
gtk_style_attach
|
||||
gtk_style_detach
|
||||
gtk_style_has_context
|
||||
gtk_style_set_background
|
||||
gtk_style_apply_default_background
|
||||
gtk_style_lookup_color
|
||||
@@ -6021,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,4 +1,4 @@
|
||||
#include <gtk/gtkx.h>
|
||||
#include <gtk/gtk.h>
|
||||
#include <gtk/gtkunixprint.h>
|
||||
|
||||
gtk_about_dialog_get_type
|
||||
|
||||
@@ -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, &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, &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, &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, &rgba);
|
||||
gdk_cairo_set_source_rgba (cr, &rgba);
|
||||
gdk_cairo_set_source_color (cr, >k_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, &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, &fg, &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><gtk/gtkx.h></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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -382,65 +359,12 @@ nevertheless.
|
||||
</formalpara>
|
||||
|
||||
<formalpara>
|
||||
<title><envar>GDK_RENDERING</envar></title>
|
||||
<title><envar>GDK_NATIVE_WINDOWS</envar></title>
|
||||
|
||||
<para>
|
||||
If set, selects the way how GDK creates similar surfaces. This affects both the
|
||||
functionality of the function gdk_window_create_similar_surface() as well as the
|
||||
way GDK creates backing surfaces for double buffering. The following values can
|
||||
be used:
|
||||
<variablelist>
|
||||
|
||||
<varlistentry>
|
||||
<term>similar</term>
|
||||
<listitem><para>Create similar surfaces to the window in use. This is the
|
||||
default behavior when the variable is not set.</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>image</term>
|
||||
<listitem><para>Always create image surfaces. This essentially turns off
|
||||
all hardware acceleration inside GTK.</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>recording</term>
|
||||
<listitem><para>Always create recording surfaces. This causes bare rendering
|
||||
to the backend without the creation of intermediate surfaces (Pixmaps in X)
|
||||
and will likely cause flicker.</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
</variablelist>
|
||||
All other values will be ignored and fall back to the default behavior. More
|
||||
values might be added in the future.
|
||||
</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.
|
||||
If set, GDK creates all windows as native windows. This can help
|
||||
applications that make assumptions about 1-1 correspondence between
|
||||
GDK windows and X11 windows.
|
||||
</para>
|
||||
</formalpara>
|
||||
|
||||
|
||||
@@ -3,7 +3,6 @@ gtkactiongroup.sgml
|
||||
gtkaboutdialog.sgml
|
||||
gtkadjustment.sgml
|
||||
gtkbbox.sgml
|
||||
gtkbindings.sgml
|
||||
gtkbox.sgml
|
||||
gtkbuilder.sgml
|
||||
gtkbutton.sgml
|
||||
@@ -11,20 +10,10 @@ gtkcalendar.sgml
|
||||
gtkcelleditable.sgml
|
||||
gtkcelllayout.sgml
|
||||
gtkcellrenderer.sgml
|
||||
gtkcellrendereraccel.sgml
|
||||
gtkcellrenderercombo.sgml
|
||||
gtkcellrendererpixbuf.sgml
|
||||
gtkcellrendererprogress.sgml
|
||||
gtkcellrendererspin.sgml
|
||||
gtkcellrenderertext.sgml
|
||||
gtkcellrenderertoggle.sgml
|
||||
gtkcellview.sgml
|
||||
gtkcheckbutton.sgml
|
||||
gtkcheckmenuitem.sgml
|
||||
gtkclipboard.sgml
|
||||
gtkcolorbutton.sgml
|
||||
gtkcolorsel.sgml
|
||||
gtkcolorseldlg.sgml
|
||||
gtkcombobox.sgml
|
||||
gtkcomboboxentry.sgml
|
||||
gtkcontainer.sgml
|
||||
@@ -38,22 +27,11 @@ gtkeventbox.sgml
|
||||
gtkexpander.sgml
|
||||
gtkfeatures.sgml
|
||||
gtkfixed.sgml
|
||||
gtkfilechooserwidget.sgml
|
||||
gtkfilefilter.sgml
|
||||
gtkfontbutton.sgml
|
||||
gtkframe.sgml
|
||||
gtkhbbox.sgml
|
||||
gtkhbox.sgml
|
||||
gtkhpaned.sgml
|
||||
gtkhscale.sgml
|
||||
gtkhscrollbar.sgml
|
||||
gtkhseparator.sgml
|
||||
gtkiconview.sgml
|
||||
gtkimagemenuitem.sgml
|
||||
gtkimcontext.sgml
|
||||
gtkimcontextsimple.sgml
|
||||
gtkimmulticontext.sgml
|
||||
gtkinvisible.sgml
|
||||
gtkitemfactory.sgml
|
||||
gtklayout.sgml
|
||||
gtklinkbutton.sgml
|
||||
@@ -62,7 +40,6 @@ gtkmenu.sgml
|
||||
gtkmenubar.sgml
|
||||
gtkmenushell.sgml
|
||||
gtkmessagedialog.sgml
|
||||
gtkmisc.sgml
|
||||
gtknotebook.sgml
|
||||
gtkobject.sgml
|
||||
gtkorientable.sgml
|
||||
@@ -72,7 +49,6 @@ gtkpaned.sgml
|
||||
gtkpapersize.sgml
|
||||
gtkprinter.sgml
|
||||
gtkprintjob.sgml
|
||||
gtkprintoperation.sgml
|
||||
gtkprogressbar.sgml
|
||||
gtkradioaction.sgml
|
||||
gtkradiobutton.sgml
|
||||
@@ -93,10 +69,7 @@ gtkseparatormenuitem.sgml
|
||||
gtkseparatortoolitem.sgml
|
||||
gtksettings.sgml
|
||||
gtkstatusbar.sgml
|
||||
gtkstatusicon.sgml
|
||||
gtkstyle.sgml
|
||||
gtktable.sgml
|
||||
gtktearoffmenuitem.sgml
|
||||
gtktesting.sgml
|
||||
gtktextiter.sgml
|
||||
gtktexttag.sgml
|
||||
|
||||
@@ -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><gdk/gdkkeysyms.h></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 "<Control>Right" {
|
||||
"move-cursor" (visual-positions, 3, 0)
|
||||
}
|
||||
bind "<Control>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 "<Control>Right" { }
|
||||
bind "<Control>Left" { }
|
||||
}
|
||||
class "GtkEntry" binding "MoveCursor3"
|
||||
</programlisting></informalexample>
|
||||
|
||||
The above example will not have the desired effect of causing
|
||||
"<Control>Right" and "<Control>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 "<Control>Right" or
|
||||
"<Control>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 "<Control>Right"
|
||||
unbind "<Control>Left"
|
||||
}
|
||||
class "GtkEntry" binding "MoveCursor3"
|
||||
</programlisting></informalexample>
|
||||
|
||||
Now, GTK+ will find a match when looking up "<Control>Right" and
|
||||
"<Control>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:
|
||||
|
||||
|
||||
@@ -0,0 +1,90 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
GtkCellRendererAccel
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
Renders a keyboard accelerator in a cell
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
#GtkCellRendererAccel displays a keyboard accelerator (i.e. a
|
||||
key combination like <Control>-a). If the cell renderer is editable, the
|
||||
accelerator can be changed by simply typing the new combination.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The #GtkCellRendererAccel cell renderer was added in GTK+ 2.10.
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### SECTION Image ##### -->
|
||||
|
||||
|
||||
<!-- ##### STRUCT GtkCellRendererAccel ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### SIGNAL GtkCellRendererAccel::accel-cleared ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@cellrendereraccel: the object which received the signal.
|
||||
@arg1:
|
||||
|
||||
<!-- ##### SIGNAL GtkCellRendererAccel::accel-edited ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@cellrendereraccel: the object which received the signal.
|
||||
@arg1:
|
||||
@arg2:
|
||||
@arg3:
|
||||
@arg4:
|
||||
|
||||
<!-- ##### ARG GtkCellRendererAccel:accel-key ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkCellRendererAccel:accel-mode ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkCellRendererAccel:accel-mods ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkCellRendererAccel:keycode ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ENUM GtkCellRendererAccelMode ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@GTK_CELL_RENDERER_ACCEL_MODE_GTK:
|
||||
@GTK_CELL_RENDERER_ACCEL_MODE_OTHER:
|
||||
|
||||
<!-- ##### FUNCTION gtk_cell_renderer_accel_new ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@void:
|
||||
@Returns:
|
||||
|
||||
|
||||
@@ -0,0 +1,78 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
GtkCellRendererCombo
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
Renders a combobox in a cell
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
#GtkCellRendererCombo renders text in a cell like #GtkCellRendererText from
|
||||
which it is derived. But while #GtkCellRendererText offers a simple entry to
|
||||
edit the text, #GtkCellRendererCombo offers a #GtkComboBox or #GtkComboBoxEntry
|
||||
widget to edit the text. The values to display in the combo box are taken from
|
||||
the tree model specified in the
|
||||
<link linkend="GtkCellRendererCombo--model">model</link> property.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The combo cell renderer takes care of adding a text cell renderer to the combo
|
||||
box and sets it to display the column specified by its
|
||||
<link linkend="GtkCellRendererCombo--text-column">text-column</link>
|
||||
property. Further properties of the comnbo box can be set in a handler for the
|
||||
editing-started signal.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The #GtkCellRendererCombo cell renderer was added in GTK+ 2.6.
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### SECTION Image ##### -->
|
||||
|
||||
|
||||
<!-- ##### STRUCT GtkCellRendererCombo ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### SIGNAL GtkCellRendererCombo::changed ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@cellrenderercombo: the object which received the signal.
|
||||
@arg1:
|
||||
@arg2:
|
||||
|
||||
<!-- ##### ARG GtkCellRendererCombo:has-entry ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkCellRendererCombo:model ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkCellRendererCombo:text-column ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### FUNCTION gtk_cell_renderer_combo_new ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@void:
|
||||
@Returns:
|
||||
|
||||
|
||||
@@ -0,0 +1,98 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
GtkCellRendererPixbuf
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
Renders a pixbuf in a cell
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
A #GtkCellRendererPixbuf can be used to render an image in a cell. It allows to render
|
||||
either a given #GdkPixbuf (set via the
|
||||
<link linkend="GtkCellRendererPixbuf--pixbuf">pixbuf</link> property) or a stock icon
|
||||
(set via the <link linkend="GtkCellRendererPixbuf--stock-id">stock-id</link> property).
|
||||
</para>
|
||||
|
||||
<para>
|
||||
To support the tree view, #GtkCellRendererPixbuf also supports rendering two alternative
|
||||
pixbufs, when the <link linkend="GtkCellRenderer--is-expander">is-expander</link> property
|
||||
is %TRUE. If the <link linkend="GtkCellRenderer--is-expanded">is-expanded</link> property
|
||||
is %TRUE and the
|
||||
<link linkend="GtkCellRendererPixbuf--pixbuf-expander-open">pixbuf-expander-open</link>
|
||||
property is set to a pixbuf, it renders that pixbuf, if the
|
||||
<link linkend="GtkCellRenderer--is-expanded">is-expanded</link> property is %FALSE and
|
||||
the
|
||||
<link linkend="GtkCellRendererPixbuf--pixbuf-expander-closed">pixbuf-expander-closed</link>
|
||||
property is set to a pixbuf, it renders that one.
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### SECTION Image ##### -->
|
||||
|
||||
|
||||
<!-- ##### STRUCT GtkCellRendererPixbuf ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### ARG GtkCellRendererPixbuf:follow-state ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkCellRendererPixbuf:gicon ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkCellRendererPixbuf:icon-name ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkCellRendererPixbuf:pixbuf ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkCellRendererPixbuf:pixbuf-expander-closed ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkCellRendererPixbuf:pixbuf-expander-open ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkCellRendererPixbuf:stock-detail ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkCellRendererPixbuf:stock-id ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkCellRendererPixbuf:stock-size ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### FUNCTION gtk_cell_renderer_pixbuf_new ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@void:
|
||||
@Returns:
|
||||
|
||||
|
||||
@@ -0,0 +1,72 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
GtkCellRendererProgress
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
Renders numbers as progress bars
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
#GtkCellRendererProgress renders a numeric value as a progress par in a cell.
|
||||
Additionally, it can display a text on top of the progress bar.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The #GtkCellRendererProgress cell renderer was added in GTK+ 2.6.
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### SECTION Image ##### -->
|
||||
|
||||
|
||||
<!-- ##### STRUCT GtkCellRendererProgress ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### ARG GtkCellRendererProgress:inverted ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkCellRendererProgress:pulse ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkCellRendererProgress:text ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkCellRendererProgress:text-xalign ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkCellRendererProgress:text-yalign ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkCellRendererProgress:value ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### FUNCTION gtk_cell_renderer_progress_new ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@void:
|
||||
@Returns:
|
||||
|
||||
|
||||
@@ -0,0 +1,68 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
GtkCellRendererSpin
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
Renders a spin button in a cell
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
#GtkCellRendererSpin renders text in a cell like #GtkCellRendererText from
|
||||
which it is derived. But while #GtkCellRendererText offers a simple entry to
|
||||
edit the text, #GtkCellRendererSpin offers a #GtkSpinButton widget. Of course,
|
||||
that means that the text has to be parseable as a floating point number.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The range of the spinbutton is taken from the adjustment property of the
|
||||
cell renderer, which can be set explicitly or mapped to a column in the
|
||||
tree model, like all properties of cell renders. #GtkCellRendererSpin
|
||||
also has properties for the climb rate and the number of digits to
|
||||
display. Other #GtkSpinButton properties can be set in a handler for the
|
||||
start-editing signal.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The #GtkCellRendererSpin cell renderer was added in GTK+ 2.10.
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
#GtkCellRendererText, #GtkSpinButton
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### SECTION Image ##### -->
|
||||
|
||||
|
||||
<!-- ##### STRUCT GtkCellRendererSpin ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### ARG GtkCellRendererSpin:adjustment ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkCellRendererSpin:climb-rate ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkCellRendererSpin:digits ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### FUNCTION gtk_cell_renderer_spin_new ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@void:
|
||||
@Returns:
|
||||
|
||||
|
||||
@@ -0,0 +1,127 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
GtkCellRendererToggle
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
Renders a toggle button in a cell
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
#GtkCellRendererToggle renders a toggle button in a cell. The
|
||||
button is drawn as a radio- or checkbutton, depending on the
|
||||
<link linkend="GtkCellRendererToggle--radio">radio</link>
|
||||
property. When activated, it emits the toggled signal.
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### SECTION Image ##### -->
|
||||
|
||||
|
||||
<!-- ##### STRUCT GtkCellRendererToggle ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### SIGNAL GtkCellRendererToggle::toggled ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@cellrenderertoggle: the object which received the signal.
|
||||
@arg1:
|
||||
|
||||
<!-- ##### ARG GtkCellRendererToggle:activatable ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkCellRendererToggle:active ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkCellRendererToggle:inconsistent ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkCellRendererToggle:indicator-size ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkCellRendererToggle:radio ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### FUNCTION gtk_cell_renderer_toggle_new ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@void:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_cell_renderer_toggle_get_radio ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@toggle:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_cell_renderer_toggle_set_radio ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@toggle:
|
||||
@radio:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_cell_renderer_toggle_get_active ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@toggle:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_cell_renderer_toggle_set_active ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@toggle:
|
||||
@setting:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_cell_renderer_toggle_get_activatable ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@toggle:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_cell_renderer_toggle_set_activatable ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@toggle:
|
||||
@setting:
|
||||
|
||||
|
||||
@@ -0,0 +1,85 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
GtkCheckButton
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
Create widgets with a discrete toggle button
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
A #GtkCheckButton places a discrete #GtkToggleButton next to a widget, (usually a #GtkLabel). See the section on #GtkToggleButton widgets for more information about toggle/check buttons.
|
||||
</para>
|
||||
<para>
|
||||
The important signal ('toggled') is also inherited from #GtkToggleButton.
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term>#GtkCheckMenuItem</term>
|
||||
<listitem><para>add check buttons to your menus.</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>#GtkButton</term>
|
||||
<listitem><para>a more general button.</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>#GtkToggleButton</term>
|
||||
<listitem><para>#GtkCheckButton's parent.</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>#GtkRadioButton</term>
|
||||
<listitem><para>group check buttons together.</para></listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### SECTION Image ##### -->
|
||||
|
||||
|
||||
<!-- ##### STRUCT GtkCheckButton ##### -->
|
||||
<para>
|
||||
<structfield>toggle_button</structfield> is a #GtkToggleButton representing the actual toggle button that composes the check button.
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### ARG GtkCheckButton:indicator-size ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkCheckButton:indicator-spacing ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### FUNCTION gtk_check_button_new ##### -->
|
||||
<para>
|
||||
Creates a new #GtkCheckButton.
|
||||
</para>
|
||||
|
||||
@void:
|
||||
@Returns: a #GtkWidget.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_check_button_new_with_label ##### -->
|
||||
<para>
|
||||
Creates a new #GtkCheckButton with a #GtkLabel to the right of it.
|
||||
</para>
|
||||
|
||||
@label: the text for the check button.
|
||||
@Returns: a #GtkWidget.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_check_button_new_with_mnemonic ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@label:
|
||||
@Returns:
|
||||
|
||||
|
||||
@@ -0,0 +1,158 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
GtkCheckMenuItem
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
A menu item with a check box
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
A #GtkCheckMenuItem is a menu item that maintains the state of a boolean
|
||||
value in addition to a #GtkMenuItem's usual role in activating application
|
||||
code.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
A check box indicating the state of the boolean value is displayed
|
||||
at the left side of the #GtkMenuItem. Activating the #GtkMenuItem
|
||||
toggles the value.
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### SECTION Image ##### -->
|
||||
|
||||
|
||||
<!-- ##### STRUCT GtkCheckMenuItem ##### -->
|
||||
<para>
|
||||
The #GtkCheckMenuItem-struct struct contains only private fields that
|
||||
should not be directly accessed.
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### SIGNAL GtkCheckMenuItem::toggled ##### -->
|
||||
<para>
|
||||
This signal is emitted when the state of the check box is changed.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
A signal handler can use gtk_check_menu_item_get_active()
|
||||
to discover the new state.
|
||||
</para>
|
||||
|
||||
@checkmenuitem: the object which received the signal.
|
||||
|
||||
<!-- ##### ARG GtkCheckMenuItem:active ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkCheckMenuItem:draw-as-radio ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkCheckMenuItem:inconsistent ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkCheckMenuItem:indicator-size ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### FUNCTION gtk_check_menu_item_new ##### -->
|
||||
<para>
|
||||
Creates a new #GtkCheckMenuItem.
|
||||
</para>
|
||||
|
||||
@void:
|
||||
@Returns: a new #GtkCheckMenuItem.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_check_menu_item_new_with_label ##### -->
|
||||
<para>
|
||||
Creates a new #GtkCheckMenuItem with a label.
|
||||
</para>
|
||||
|
||||
@label: the string to use for the label.
|
||||
@Returns: a new #GtkCheckMenuItem.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_check_menu_item_new_with_mnemonic ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@label:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_check_menu_item_get_active ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@check_menu_item:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_check_menu_item_set_active ##### -->
|
||||
<para>
|
||||
Sets the active state of the menu item's check box.
|
||||
</para>
|
||||
|
||||
@check_menu_item: a #GtkCheckMenuItem.
|
||||
@is_active: boolean value indicating whether the check box is active.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_check_menu_item_toggled ##### -->
|
||||
<para>
|
||||
Emits the GtkCheckMenuItem::toggled signal.
|
||||
</para>
|
||||
|
||||
@check_menu_item: a #GtkCheckMenuItem.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_check_menu_item_get_inconsistent ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@check_menu_item:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_check_menu_item_set_inconsistent ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@check_menu_item:
|
||||
@setting:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_check_menu_item_set_draw_as_radio ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@check_menu_item:
|
||||
@draw_as_radio:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_check_menu_item_get_draw_as_radio ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@check_menu_item:
|
||||
@Returns:
|
||||
|
||||
|
||||
@@ -0,0 +1,499 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
Clipboards
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
Storing data on clipboards
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
The #GtkClipboard object represents a clipboard of data shared
|
||||
between different processes or between different widgets in
|
||||
the same process. Each clipboard is identified by a name encoded as a
|
||||
#GdkAtom. (Conversion to and from strings can be done with
|
||||
gdk_atom_intern() and gdk_atom_name().) The default clipboard
|
||||
corresponds to the "CLIPBOARD" atom; another commonly used clipboard
|
||||
is the "PRIMARY" clipboard, which, in X, traditionally contains
|
||||
the currently selected text.
|
||||
</para>
|
||||
<para>
|
||||
To support having a number of different formats on the clipboard
|
||||
at the same time, the clipboard mechanism allows providing
|
||||
callbacks instead of the actual data. When you set the contents
|
||||
of the clipboard, you can either supply the data directly (via
|
||||
functions like gtk_clipboard_set_text()), or you can supply a
|
||||
callback to be called at a later time when the data is needed (via
|
||||
gtk_clipboard_set_with_data() or gtk_clipboard_set_with_owner().)
|
||||
Providing a callback also avoids having to make copies of the data
|
||||
when it is not needed.
|
||||
</para>
|
||||
<para>
|
||||
gtk_clipboard_set_with_data() and gtk_clipboard_set_with_owner()
|
||||
are quite similar; the choice between the two depends mostly on
|
||||
which is more convenient in a particular situation.
|
||||
The former is most useful when you want to have a blob of data
|
||||
with callbacks to convert it into the various data types that you
|
||||
advertise. When the @clear_func you provided is called, you
|
||||
simply free the data blob. The latter is more useful when the
|
||||
contents of clipboard reflect the internal state of a #GObject
|
||||
(As an example, for the PRIMARY clipboard, when an entry widget
|
||||
provides the clipboard's contents the contents are simply the
|
||||
text within the selected region.) If the contents change, the
|
||||
entry widget can call gtk_clipboard_set_with_owner() to update
|
||||
the timestamp for clipboard ownership, without having to worry
|
||||
about @clear_func being called.
|
||||
</para>
|
||||
<para>
|
||||
Requesting the data from the clipboard is essentially
|
||||
asynchronous. If the contents of the clipboard are provided within
|
||||
the same process, then a direct function call will be made to
|
||||
retrieve the data, but if they are provided by another process,
|
||||
then the data needs to be retrieved from the other process, which
|
||||
may take some time. To avoid blocking the user interface, the call
|
||||
to request the selection, gtk_clipboard_request_contents() takes a
|
||||
callback that will be called when the contents are received (or
|
||||
when the request fails.) If you don't want to deal with providing
|
||||
a separate callback, you can also use gtk_clipboard_wait_for_contents().
|
||||
What this does is run the GLib main loop recursively waiting for
|
||||
the contents. This can simplify the code flow, but you still have
|
||||
to be aware that other callbacks in your program can be called
|
||||
while this recursive mainloop is running.
|
||||
</para>
|
||||
<para>
|
||||
Along with the functions to get the clipboard contents as an
|
||||
arbitrary data chunk, there are also functions to retrieve
|
||||
it as text, gtk_clipboard_request_text() and
|
||||
gtk_clipboard_wait_for_text(). These functions take care of
|
||||
determining which formats are advertised by the clipboard
|
||||
provider, asking for the clipboard in the best available format
|
||||
and converting the results into the UTF-8 encoding. (The standard
|
||||
form for representing strings in GTK+.)
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
<variablelist>
|
||||
|
||||
<varlistentry>
|
||||
<term>#GtkSelection</term>
|
||||
<listitem><para>#GtkClipboard provides a high-level wrapper around the
|
||||
lower level routines that deal with X selections. It is
|
||||
also possibly to directly manipulate the X selections,
|
||||
though it is seldom necessary to do so.</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
</variablelist>
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### SECTION Image ##### -->
|
||||
|
||||
|
||||
<!-- ##### STRUCT GtkClipboard ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### SIGNAL GtkClipboard::owner-change ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@clipboard: the object which received the signal.
|
||||
@event:
|
||||
|
||||
<!-- ##### USER_FUNCTION GtkClipboardReceivedFunc ##### -->
|
||||
<para>
|
||||
A function to be called when the results of gtk_clipboard_request_contents()
|
||||
are received, or when the request fails.
|
||||
</para>
|
||||
|
||||
@clipboard: the #GtkClipboard
|
||||
@selection_data: a #GtkSelectionData containing the data was received.
|
||||
If retrieving the data failed, then then length field
|
||||
of @selection_data will be negative.
|
||||
@data: the @user_data supplied to gtk_clipboard_request_contents().
|
||||
|
||||
|
||||
<!-- ##### USER_FUNCTION GtkClipboardTextReceivedFunc ##### -->
|
||||
<para>
|
||||
A function to be called when the results of gtk_clipboard_request_text()
|
||||
are received, or when the request fails.
|
||||
</para>
|
||||
|
||||
@clipboard: the #GtkClipboard
|
||||
@text: the text received, as a UTF-8 encoded string, or %NULL
|
||||
if retrieving the data failed.
|
||||
@data: the @user_data supplied to gtk_clipboard_request_text().
|
||||
|
||||
|
||||
<!-- ##### USER_FUNCTION GtkClipboardImageReceivedFunc ##### -->
|
||||
<para>
|
||||
A function to be called when the results of gtk_clipboard_request_image()
|
||||
are received, or when the request fails.
|
||||
</para>
|
||||
|
||||
@clipboard: the #GtkClipboard
|
||||
@pixbuf: the received image
|
||||
@data: the @user_data supplied to gtk_clipboard_request_image().
|
||||
@Since: 2.6
|
||||
|
||||
|
||||
<!-- ##### USER_FUNCTION GtkClipboardTargetsReceivedFunc ##### -->
|
||||
<para>
|
||||
A function to be called when the results of gtk_clipboard_request_targets()
|
||||
are received, or when the request fails.
|
||||
</para>
|
||||
|
||||
@clipboard: the #GtkClipboard
|
||||
@atoms: the supported targets, as array of #GdkAtom, or %NULL
|
||||
if retrieving the data failed.
|
||||
@n_atoms: the length of the @atoms array.
|
||||
@data: the @user_data supplied to gtk_clipboard_request_targets().
|
||||
@Since: 2.4
|
||||
|
||||
|
||||
<!-- ##### USER_FUNCTION GtkClipboardRichTextReceivedFunc ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@clipboard:
|
||||
@format:
|
||||
@text:
|
||||
@length:
|
||||
@data:
|
||||
|
||||
|
||||
<!-- ##### USER_FUNCTION GtkClipboardURIReceivedFunc ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@clipboard:
|
||||
@uris:
|
||||
@data:
|
||||
|
||||
|
||||
<!-- ##### USER_FUNCTION GtkClipboardGetFunc ##### -->
|
||||
<para>
|
||||
A function that will be called to provide the contents of the selection.
|
||||
If multiple types of data were advertised, the requested type can
|
||||
be determined from the @info parameter or by checking the target field
|
||||
of @selection_data. If the data could successfully be converted into
|
||||
then it should be stored into the @selection_data object by
|
||||
calling gtk_selection_data_set() (or related functions such
|
||||
as gtk_selection_data_set_text()). If no data is set, the requestor
|
||||
will be informed that the attempt to get the data failed.
|
||||
</para>
|
||||
|
||||
@clipboard: the #GtkClipboard
|
||||
@selection_data: a #GtkSelectionData argument in which the requested
|
||||
data should be stored.
|
||||
@info: the info field corresponding to the requested
|
||||
target from the #GtkTargetEntry array passed to
|
||||
gtk_clipboard_set_with_data() or gtk_clipboard_set_with_owner().
|
||||
@user_data_or_owner: the @user_data argument passed to gtk_clipboard_set_with_data(), or
|
||||
the @owner argument passed to gtk_clipboard_set_with_owner()
|
||||
|
||||
|
||||
<!-- ##### USER_FUNCTION GtkClipboardClearFunc ##### -->
|
||||
<para>
|
||||
A function that will be called when the contents of the clipboard are changed
|
||||
or cleared. Once this has called, the @user_data_or_owner argument
|
||||
will not be used again.
|
||||
</para>
|
||||
|
||||
@clipboard: the #GtkClipboard
|
||||
@user_data_or_owner: the @user_data argument passed to gtk_clipboard_set_with_data(), or
|
||||
the @owner argument passed to gtk_clipboard_set_with_owner()
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_clipboard_get ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@selection:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_clipboard_get_for_display ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
@selection:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_clipboard_get_display ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@clipboard:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_clipboard_set_with_data ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@clipboard:
|
||||
@targets:
|
||||
@n_targets:
|
||||
@get_func:
|
||||
@clear_func:
|
||||
@user_data:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_clipboard_set_with_owner ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@clipboard:
|
||||
@targets:
|
||||
@n_targets:
|
||||
@get_func:
|
||||
@clear_func:
|
||||
@owner:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_clipboard_get_owner ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@clipboard:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_clipboard_clear ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@clipboard:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_clipboard_set_text ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@clipboard:
|
||||
@text:
|
||||
@len:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_clipboard_set_image ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@clipboard:
|
||||
@pixbuf:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_clipboard_request_contents ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@clipboard:
|
||||
@target:
|
||||
@callback:
|
||||
@user_data:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_clipboard_request_text ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@clipboard:
|
||||
@callback:
|
||||
@user_data:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_clipboard_request_image ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@clipboard:
|
||||
@callback:
|
||||
@user_data:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_clipboard_request_targets ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@clipboard:
|
||||
@callback:
|
||||
@user_data:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_clipboard_request_rich_text ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@clipboard:
|
||||
@buffer:
|
||||
@callback:
|
||||
@user_data:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_clipboard_request_uris ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@clipboard:
|
||||
@callback:
|
||||
@user_data:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_clipboard_wait_for_contents ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@clipboard:
|
||||
@target:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_clipboard_wait_for_text ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@clipboard:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_clipboard_wait_for_image ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@clipboard:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_clipboard_wait_for_rich_text ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@clipboard:
|
||||
@buffer:
|
||||
@format:
|
||||
@length:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_clipboard_wait_for_uris ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@clipboard:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_clipboard_wait_is_text_available ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@clipboard:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_clipboard_wait_is_image_available ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@clipboard:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_clipboard_wait_is_rich_text_available ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@clipboard:
|
||||
@buffer:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_clipboard_wait_is_uris_available ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@clipboard:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_clipboard_wait_for_targets ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@clipboard:
|
||||
@targets:
|
||||
@n_targets:
|
||||
@Returns:
|
||||
|
||||
<!--
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-parent-document: ("../gtk-docs.sgml" "book" "refsect2" "")
|
||||
End:
|
||||
-->
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_clipboard_wait_is_target_available ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@clipboard:
|
||||
@target:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_clipboard_set_can_store ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@clipboard:
|
||||
@targets:
|
||||
@n_targets:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_clipboard_store ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@clipboard:
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,117 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
GtkColorSelectionDialog
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
A standard dialog box for selecting a color
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
The #GtkColorSelectionDialog provides a standard dialog which
|
||||
allows the user to select a color much like the #GtkFileSelection
|
||||
provides a standard dialog for file selection.
|
||||
</para>
|
||||
|
||||
<refsect2 id="GtkColorSelectionDialog-BUILDER-UI">
|
||||
<title>GtkColorSelectionDialog as GtkBuildable</title>
|
||||
<para>
|
||||
The GtkColorSelectionDialog implementation of the GtkBuildable interface
|
||||
exposes the embedded #GtkColorSelection as internal child with the
|
||||
name "color_selection". It also exposes the buttons with the names
|
||||
"ok_button", "cancel_button" and "help_button".
|
||||
</para>
|
||||
</refsect2>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### SECTION Image ##### -->
|
||||
|
||||
|
||||
<!-- ##### STRUCT GtkColorSelectionDialog ##### -->
|
||||
<para>
|
||||
The #GtkColorSelectionDialog-struct 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>#GtkWidget *colorsel;</entry>
|
||||
<entry>The #GtkColorSelection widget contained within the
|
||||
dialog. Use this widget and its gtk_color_selection_get_current_color()
|
||||
function to gain access to the selected color. Connect a handler
|
||||
for this widget's color_changed signal to be notified when the
|
||||
color changes.
|
||||
</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>#GtkWidget *ok_button;</entry>
|
||||
<entry>The OK button widget contained within the dialog.
|
||||
Connect a handler for the clicked event.
|
||||
</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>#GtkWidget *cancel_button;</entry>
|
||||
<entry>The cancel button widget contained within the dialog.
|
||||
Connect a handler for the clicked event.
|
||||
</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>#GtkWidget *help_button;</entry>
|
||||
<entry>The help button widget contained within the dialog.
|
||||
Connect a handler for the clicked event.
|
||||
</entry>
|
||||
</row>
|
||||
|
||||
</tbody></tgroup></informaltable>
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### ARG GtkColorSelectionDialog:cancel-button ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkColorSelectionDialog:color-selection ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkColorSelectionDialog:help-button ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkColorSelectionDialog:ok-button ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### FUNCTION gtk_color_selection_dialog_new ##### -->
|
||||
<para>
|
||||
Creates a new #GtkColorSelectionDialog.
|
||||
</para>
|
||||
|
||||
@title: a string containing the title text for the dialog.
|
||||
@Returns: a #GtkColorSelectionDialog.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_color_selection_dialog_get_color_selection ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@colorsel:
|
||||
@Returns:
|
||||
|
||||
|
||||
@@ -0,0 +1,57 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
GtkFileChooserWidget
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
File chooser widget that can be embedded in other widgets
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
#GtkFileChooserWidget is a widget suitable for selecting files.
|
||||
It is the main building block of a #GtkFileChooserDialog. Most
|
||||
applications will only need to use the latter; you can use
|
||||
#GtkFileChooserWidget as part of a larger window if you have
|
||||
special needs.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Note that #GtkFileChooserWidget does not have any methods of its
|
||||
own. Instead, you should use the functions that work on a
|
||||
#GtkFileChooser.
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
#GtkFileChooser, #GtkFileChooserDialog
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### SECTION Image ##### -->
|
||||
|
||||
|
||||
<!-- ##### STRUCT GtkFileChooserWidget ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_file_chooser_widget_new ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@action:
|
||||
@Returns:
|
||||
|
||||
|
||||
|
||||
|
||||
<!--
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-parent-document: ("../gtk-docs.sgml" "book" "refentry")
|
||||
End:
|
||||
-->
|
||||
|
||||
|
||||
@@ -0,0 +1,194 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
GtkFontButton
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
A button to launch a font selection dialog
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
The #GtkFontButton is a button which displays the currently selected font an allows to open a font selection
|
||||
dialog to change the font. It is suitable widget for selecting a font in a preference dialog.
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
#GtkFontSelectionDialog, #GtkColorButton.
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### SECTION Image ##### -->
|
||||
|
||||
|
||||
<!-- ##### STRUCT GtkFontButton ##### -->
|
||||
<para>
|
||||
The GtkFontButton struct has only private members and should not be used
|
||||
directly.
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### SIGNAL GtkFontButton::font-set ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@fontbutton: the object which received the signal.
|
||||
|
||||
<!-- ##### ARG GtkFontButton:font-name ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkFontButton:show-size ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkFontButton:show-style ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkFontButton:title ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkFontButton:use-font ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkFontButton:use-size ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### FUNCTION gtk_font_button_new ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@void:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_font_button_new_with_font ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@fontname:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_font_button_set_font_name ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@font_button:
|
||||
@fontname:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_font_button_get_font_name ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@font_button:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_font_button_set_show_style ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@font_button:
|
||||
@show_style:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_font_button_get_show_style ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@font_button:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_font_button_set_show_size ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@font_button:
|
||||
@show_size:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_font_button_get_show_size ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@font_button:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_font_button_set_use_font ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@font_button:
|
||||
@use_font:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_font_button_get_use_font ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@font_button:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_font_button_set_use_size ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@font_button:
|
||||
@use_size:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_font_button_get_use_size ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@font_button:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_font_button_set_title ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@font_button:
|
||||
@title:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_font_button_get_title ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@font_button:
|
||||
@Returns:
|
||||
|
||||
|
||||
@@ -0,0 +1,160 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
GtkFrame
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
A bin with a decorative frame and optional label
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
The frame widget is a Bin that surrounds its child
|
||||
with a decorative frame and an optional label.
|
||||
If present, the label is drawn in a gap in the
|
||||
top side of the frame. The position of the
|
||||
label can be controlled with gtk_frame_set_label_align().
|
||||
</para>
|
||||
|
||||
<refsect2 id="GtkFrame-BUILDER-UI">
|
||||
<title>GtkFrame as GtkBuildable</title>
|
||||
<para>
|
||||
The GtkFrame implementation of the GtkBuildable interface
|
||||
supports placing a child in the label position by specifying
|
||||
"label" as the "type" attribute of a <child> element.
|
||||
A normal content child can be specified without specifying
|
||||
a <child> type attribute.
|
||||
</para>
|
||||
<example>
|
||||
<title>A UI definition fragment with GtkFrame</title>
|
||||
<programlisting><![CDATA[
|
||||
<object class="GtkFrame">
|
||||
<child type="label">
|
||||
<object class="GtkLabel" id="frame-label"/>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkEntry" id="frame-content"/>
|
||||
</child>
|
||||
</object>
|
||||
]]></programlisting>
|
||||
</example>
|
||||
</refsect2>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### SECTION Image ##### -->
|
||||
|
||||
|
||||
<!-- ##### STRUCT GtkFrame ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### ARG GtkFrame:label ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkFrame:label-widget ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkFrame:label-xalign ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkFrame:label-yalign ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkFrame:shadow-type ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### FUNCTION gtk_frame_new ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@label:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_frame_set_label ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@frame:
|
||||
@label:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_frame_set_label_widget ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@frame:
|
||||
@label_widget:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_frame_set_label_align ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@frame:
|
||||
@xalign:
|
||||
@yalign:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_frame_set_shadow_type ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@frame:
|
||||
@type:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_frame_get_label ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@frame:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_frame_get_label_align ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@frame:
|
||||
@xalign:
|
||||
@yalign:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_frame_get_label_widget ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@frame:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_frame_get_shadow_type ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@frame:
|
||||
@Returns:
|
||||
|
||||
|
||||
@@ -0,0 +1,68 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
GtkHButtonBox
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
A container for arranging buttons horizontally
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
A button box should be used to provide a consistent layout of buttons
|
||||
throughout your application. The layout/spacing can be altered by the
|
||||
programmer, or if desired, by the user to alter the 'feel' of a
|
||||
program to a small degree.
|
||||
</para>
|
||||
<para>
|
||||
A #GtkHButtonBox is created with gtk_hbutton_box_new(). Buttons are
|
||||
packed into a button box the same way widgets are added to any other
|
||||
container, using gtk_container_add(). You can also use
|
||||
gtk_box_pack_start() or gtk_box_pack_end(), but for button boxes both
|
||||
these functions work just like gtk_container_add(), ie., they pack the
|
||||
button in a way that depends on the current layout style and on
|
||||
whether the button has had gtk_button_box_set_child_secondary() called
|
||||
on it.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The spacing between buttons can be set with gtk_box_set_spacing(). The
|
||||
arrangement and layout of the buttons can be changed with
|
||||
gtk_button_box_set_layout().
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term>#GtkBox</term>
|
||||
<listitem><para>Used to pack widgets into button boxes.</para></listitem>
|
||||
</varlistentry><varlistentry>
|
||||
<term>#GtkButtonBox</term>
|
||||
<listitem><para>Provides functions for controlling button boxes.</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>#GtkVButtonBox</term>
|
||||
<listitem><para>Pack buttons vertically</para></listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### SECTION Image ##### -->
|
||||
|
||||
|
||||
<!-- ##### STRUCT GtkHButtonBox ##### -->
|
||||
<para>
|
||||
GtkHButtonBox does not contain any public fields.
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_hbutton_box_new ##### -->
|
||||
<para>
|
||||
Creates a new horizontal button box.
|
||||
</para>
|
||||
|
||||
@void:
|
||||
@Returns: a new button box #GtkWidget.
|
||||
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
GtkHPaned
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
A container with two panes arranged horizontally
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
The HPaned widget is a container widget with two
|
||||
children arranged horizontally. The division between
|
||||
the two panes is adjustable by the user by dragging
|
||||
a handle. See #GtkPaned for details.
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### SECTION Image ##### -->
|
||||
|
||||
|
||||
<!-- ##### STRUCT GtkHPaned ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_hpaned_new ##### -->
|
||||
<para>
|
||||
Create a new #GtkHPaned
|
||||
</para>
|
||||
|
||||
@void:
|
||||
@Returns: the new #GtkHPaned
|
||||
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
GtkHScale
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
A horizontal slider widget for selecting a value from a range
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
The #GtkHScale widget is used to allow the user to select a value using
|
||||
a horizontal slider. To create one, use gtk_hscale_new_with_range().
|
||||
</para>
|
||||
<para>
|
||||
The position to show the current value, and the number of decimal places
|
||||
shown can be set using the parent #GtkScale class's functions.
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### SECTION Image ##### -->
|
||||
|
||||
|
||||
<!-- ##### STRUCT GtkHScale ##### -->
|
||||
<para>
|
||||
The #GtkHScale-struct struct contains private data only, and
|
||||
should be accessed using the functions below.
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_hscale_new ##### -->
|
||||
<para>
|
||||
Creates a new #GtkHScale.
|
||||
</para>
|
||||
|
||||
@adjustment: the #GtkAdjustment which sets the range of the scale.
|
||||
@Returns: a new #GtkHScale.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_hscale_new_with_range ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@min:
|
||||
@max:
|
||||
@step:
|
||||
@Returns:
|
||||
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
GtkHScrollbar
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
A horizontal scrollbar
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
|
||||
<para>
|
||||
The #GtkHScrollbar widget is a widget arranged horizontally creating a
|
||||
scrollbar. See #GtkScrollbar for details on
|
||||
scrollbars. #GtkAdjustment pointers may be added to handle the
|
||||
adjustment of the scrollbar or it may be left %NULL in which case one
|
||||
will be created for you. See #GtkScrollbar for a description of what the
|
||||
fields in an adjustment represent for a scrollbar.
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
#GtkScrollbar, #GtkScrolledWindow
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### SECTION Image ##### -->
|
||||
|
||||
|
||||
<!-- ##### STRUCT GtkHScrollbar ##### -->
|
||||
<para>
|
||||
The #GtkHScrollbar struct contains private data and should be accessed
|
||||
using the functions below.
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_hscrollbar_new ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@adjustment:
|
||||
@Returns:
|
||||
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
GtkHSeparator
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
A horizontal separator
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
The #GtkHSeparator widget is a horizontal separator, used to group the
|
||||
widgets within a window. It displays a horizontal line with a shadow to
|
||||
make it appear sunken into the interface.
|
||||
</para>
|
||||
<note>
|
||||
<para>
|
||||
The #GtkHSeparator widget is not used as a separator within menus.
|
||||
To create a separator in a menu create an empty #GtkSeparatorMenuItem
|
||||
widget using gtk_separator_menu_item_new() and add it to the menu with
|
||||
gtk_menu_shell_append().
|
||||
</para>
|
||||
</note>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term>#GtkVSeparator</term>
|
||||
<listitem><para>a vertical separator.</para></listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### SECTION Image ##### -->
|
||||
|
||||
|
||||
<!-- ##### STRUCT GtkHSeparator ##### -->
|
||||
<para>
|
||||
The #GtkHSeparator-struct struct contains private data only, and
|
||||
should be accessed using the functions below.
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_hseparator_new ##### -->
|
||||
<para>
|
||||
Creates a new #GtkHSeparator.
|
||||
</para>
|
||||
|
||||
@void:
|
||||
@Returns: a new #GtkHSeparator.
|
||||
|
||||
|
||||
@@ -0,0 +1,152 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
GtkImageMenuItem
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
A menu item with an icon
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
A GtkImageMenuItem is a menu item which has an icon next to the text label.
|
||||
</para>
|
||||
<para>
|
||||
Note that the user can disable display of menu icons, so make sure to still
|
||||
fill in the text label.
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### SECTION Image ##### -->
|
||||
|
||||
|
||||
<!-- ##### STRUCT GtkImageMenuItem ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### ARG GtkImageMenuItem:accel-group ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkImageMenuItem:always-show-image ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkImageMenuItem:image ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkImageMenuItem:use-stock ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### FUNCTION gtk_image_menu_item_set_image ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@image_menu_item:
|
||||
@image:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_image_menu_item_get_image ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@image_menu_item:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_image_menu_item_new ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@void:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_image_menu_item_new_from_stock ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@stock_id:
|
||||
@accel_group:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_image_menu_item_new_with_label ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@label:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_image_menu_item_new_with_mnemonic ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@label:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_image_menu_item_get_use_stock ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@image_menu_item:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_image_menu_item_set_use_stock ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@image_menu_item:
|
||||
@use_stock:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_image_menu_item_get_always_show_image ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@image_menu_item:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_image_menu_item_set_always_show_image ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@image_menu_item:
|
||||
@always_show:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_image_menu_item_set_accel_group ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@image_menu_item:
|
||||
@accel_group:
|
||||
|
||||
|
||||
@@ -0,0 +1,213 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
GtkIMContext
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### SECTION Image ##### -->
|
||||
|
||||
|
||||
<!-- ##### STRUCT GtkIMContext ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### SIGNAL GtkIMContext::commit ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@imcontext: the object which received the signal.
|
||||
@arg1:
|
||||
|
||||
<!-- ##### SIGNAL GtkIMContext::delete-surrounding ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@imcontext: the object which received the signal.
|
||||
@arg1:
|
||||
@arg2:
|
||||
@Returns:
|
||||
|
||||
<!-- ##### SIGNAL GtkIMContext::preedit-changed ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@imcontext: the object which received the signal.
|
||||
|
||||
<!-- ##### SIGNAL GtkIMContext::preedit-end ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@imcontext: the object which received the signal.
|
||||
|
||||
<!-- ##### SIGNAL GtkIMContext::preedit-start ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@imcontext: the object which received the signal.
|
||||
|
||||
<!-- ##### SIGNAL GtkIMContext::retrieve-surrounding ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@imcontext: the object which received the signal.
|
||||
@Returns:
|
||||
|
||||
<!-- ##### STRUCT GtkIMContextClass ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@preedit_start:
|
||||
@preedit_end:
|
||||
@preedit_changed:
|
||||
@commit:
|
||||
@retrieve_surrounding:
|
||||
@delete_surrounding:
|
||||
@set_client_window:
|
||||
@get_preedit_string:
|
||||
@filter_keypress:
|
||||
@focus_in:
|
||||
@focus_out:
|
||||
@reset:
|
||||
@set_cursor_location:
|
||||
@set_use_preedit:
|
||||
@set_surrounding:
|
||||
@get_surrounding:
|
||||
|
||||
<!-- ##### STRUCT GtkIMContextInfo ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@context_id:
|
||||
@context_name:
|
||||
@domain:
|
||||
@domain_dirname:
|
||||
@default_locales:
|
||||
|
||||
<!-- ##### FUNCTION gtk_im_context_set_client_window ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@context:
|
||||
@window:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_im_context_get_preedit_string ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@context:
|
||||
@str:
|
||||
@attrs:
|
||||
@cursor_pos:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_im_context_filter_keypress ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@context:
|
||||
@event:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_im_context_focus_in ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@context:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_im_context_focus_out ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@context:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_im_context_reset ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@context:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_im_context_set_cursor_location ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@context:
|
||||
@area:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_im_context_set_use_preedit ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@context:
|
||||
@use_preedit:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_im_context_set_surrounding ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@context:
|
||||
@text:
|
||||
@len:
|
||||
@cursor_index:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_im_context_get_surrounding ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@context:
|
||||
@text:
|
||||
@cursor_index:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_im_context_delete_surrounding ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@context:
|
||||
@offset:
|
||||
@n_chars:
|
||||
@Returns:
|
||||
|
||||
|
||||
@@ -0,0 +1,73 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
GtkInvisible
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
A widget which is not displayed
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
The #GtkInvisible widget is used internally in GTK+, and is probably not
|
||||
very useful for application developers.
|
||||
</para>
|
||||
<para>
|
||||
It is used for reliable pointer grabs and selection handling in the code
|
||||
for drag-and-drop.
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### SECTION Image ##### -->
|
||||
|
||||
|
||||
<!-- ##### STRUCT GtkInvisible ##### -->
|
||||
<para>
|
||||
The #GtkInvisible-struct struct contains no public fields.
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### ARG GtkInvisible:screen ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### FUNCTION gtk_invisible_new ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@void:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_invisible_new_for_screen ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@screen:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_invisible_set_screen ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@invisible:
|
||||
@screen:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_invisible_get_screen ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@invisible:
|
||||
@Returns:
|
||||
|
||||
|
||||
@@ -324,21 +324,3 @@ Emits the "toggle_size_allocate" signal on the given item.
|
||||
@allocation: the allocation to use as signal data.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_menu_item_get_reserve_indicator ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@menu_item:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_menu_item_set_reserve_indicator ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@menu_item:
|
||||
@reserve:
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,137 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
GtkMisc
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
Base class for widgets with alignments and padding
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
The #GtkMisc widget is an abstract widget which is not useful itself, but
|
||||
is used to derive subclasses which have alignment and padding attributes.
|
||||
</para>
|
||||
<para>
|
||||
The horizontal and vertical padding attributes allows extra space to be
|
||||
added around the widget.
|
||||
</para>
|
||||
<para>
|
||||
The horizontal and vertical alignment attributes enable the widget to be
|
||||
positioned within its allocated area. Note that if the widget is added to
|
||||
a container in such a way that it expands automatically to fill its
|
||||
allocated area, the alignment settings will not alter the widgets position.
|
||||
</para>
|
||||
<note>
|
||||
<para>
|
||||
Note that the desired effect can in most cases be achieved by using the
|
||||
#GtkWidget:halign, #GtkWidget:valign and #GtkWidget:margin properties
|
||||
on the child widget, so GtkMisc should not be used in new code.
|
||||
</para>
|
||||
</note>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### SECTION Image ##### -->
|
||||
|
||||
|
||||
<!-- ##### STRUCT GtkMisc ##### -->
|
||||
<para>
|
||||
The #GtkMisc-struct 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>#gfloat <structfield>xalign</structfield>;</entry>
|
||||
<entry>the horizontal alignment, from 0 (left) to 1 (right).</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>#gfloat <structfield>yalign</structfield>;</entry>
|
||||
<entry>the vertical alignment, from 0 (top) to 1 (bottom).</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>#guint16 <structfield>xpad</structfield>;</entry>
|
||||
<entry>the amount of space to add on the left and right of the widget,
|
||||
in pixels.</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>#guint16 <structfield>ypad</structfield>;</entry>
|
||||
<entry>the amount of space to add on the top and bottom of the widget,
|
||||
in pixels.</entry>
|
||||
</row>
|
||||
</tbody></tgroup></informaltable>
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### ARG GtkMisc:xalign ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkMisc:xpad ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkMisc:yalign ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkMisc:ypad ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### FUNCTION gtk_misc_set_alignment ##### -->
|
||||
<para>
|
||||
Sets the alignment of the widget.
|
||||
</para>
|
||||
|
||||
@misc: a #GtkMisc.
|
||||
@xalign: the horizontal alignment, from 0 (left) to 1 (right).
|
||||
@yalign: the vertical alignment, from 0 (top) to 1 (bottom).
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_misc_set_padding ##### -->
|
||||
<para>
|
||||
Sets the amount of space to add around the widget.
|
||||
</para>
|
||||
|
||||
@misc: a #GtkMisc.
|
||||
@xpad: the amount of space to add on the left and right of the widget,
|
||||
in pixels.
|
||||
@ypad: the amount of space to add on the top and bottom of the widget,
|
||||
in pixels.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_misc_get_alignment ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@misc:
|
||||
@xalign:
|
||||
@yalign:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_misc_get_padding ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@misc:
|
||||
@xpad:
|
||||
@ypad:
|
||||
|
||||
|
||||
@@ -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:
|
||||
|
||||
|
||||
@@ -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>
|
||||
%v - the current progress value.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
%l - the lower bound for the progress value.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
%u - the upper bound for the progress value.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
%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.
|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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:
|
||||
|
||||
|
||||
@@ -0,0 +1,504 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
GtkStatusIcon
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
Display an icon in the system tray
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
The "system tray" or notification area is normally used for transient icons
|
||||
that indicate some special state. For example, a system tray icon might
|
||||
appear to tell the user that they have new mail, or have an incoming instant
|
||||
message, or something along those lines. The basic idea is that creating an
|
||||
icon in the notification area is less annoying than popping up a dialog.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
A #GtkStatusIcon object can be used to display an icon in a "system tray".
|
||||
The icon can have a tooltip, and the user can interact with it by
|
||||
activating it or popping up a context menu. Critical information should
|
||||
not solely be displayed in a #GtkStatusIcon, since it may not be
|
||||
visible (e.g. when the user doesn't have a notification area on his panel).
|
||||
This can be checked with gtk_status_icon_is_embedded().
|
||||
</para>
|
||||
|
||||
<para>
|
||||
On X11, the implementation follows the freedesktop.org "System Tray"
|
||||
<ulink url="http://www.freedesktop.org/wiki/Standards/systemtray-spec">specification</ulink>. Implementations of the "tray" side of this specification can
|
||||
be found e.g. in the GNOME and KDE panel applications.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Note that a GtkStatusIcon is <emphasis>not</emphasis> a widget, but just
|
||||
a #GObject. Making it a widget would be impractical, since the system tray
|
||||
on Win32 doesn't allow to embed arbitrary widgets.
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### SECTION Image ##### -->
|
||||
|
||||
|
||||
<!-- ##### STRUCT GtkStatusIcon ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### SIGNAL GtkStatusIcon::activate ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@statusicon: the object which received the signal.
|
||||
|
||||
<!-- ##### SIGNAL GtkStatusIcon::button-press-event ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@statusicon: the object which received the signal.
|
||||
@event:
|
||||
@Returns:
|
||||
|
||||
<!-- ##### SIGNAL GtkStatusIcon::button-release-event ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@statusicon: the object which received the signal.
|
||||
@event:
|
||||
@Returns:
|
||||
|
||||
<!-- ##### SIGNAL GtkStatusIcon::popup-menu ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@statusicon: the object which received the signal.
|
||||
@arg1:
|
||||
@arg2:
|
||||
|
||||
<!-- ##### SIGNAL GtkStatusIcon::query-tooltip ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@statusicon: the object which received the signal.
|
||||
@arg1:
|
||||
@arg2:
|
||||
@arg3:
|
||||
@arg4:
|
||||
@Returns:
|
||||
|
||||
<!-- ##### SIGNAL GtkStatusIcon::scroll-event ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@statusicon: the object which received the signal.
|
||||
@event:
|
||||
@Returns:
|
||||
|
||||
<!-- ##### SIGNAL GtkStatusIcon::size-changed ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@statusicon: the object which received the signal.
|
||||
@arg1:
|
||||
@Returns:
|
||||
|
||||
<!-- ##### ARG GtkStatusIcon:embedded ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkStatusIcon:file ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkStatusIcon:gicon ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkStatusIcon:has-tooltip ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkStatusIcon:icon-name ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkStatusIcon:orientation ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkStatusIcon:pixbuf ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkStatusIcon:screen ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkStatusIcon:size ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkStatusIcon:stock ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkStatusIcon:storage-type ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkStatusIcon:title ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkStatusIcon:tooltip-markup ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkStatusIcon:tooltip-text ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkStatusIcon:visible ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### FUNCTION gtk_status_icon_new ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@void:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_status_icon_new_from_pixbuf ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@pixbuf:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_status_icon_new_from_file ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@filename:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_status_icon_new_from_stock ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@stock_id:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_status_icon_new_from_icon_name ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@icon_name:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_status_icon_new_from_gicon ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@icon:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_status_icon_set_from_pixbuf ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@status_icon:
|
||||
@pixbuf:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_status_icon_set_from_file ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@status_icon:
|
||||
@filename:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_status_icon_set_from_stock ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@status_icon:
|
||||
@stock_id:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_status_icon_set_from_icon_name ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@status_icon:
|
||||
@icon_name:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_status_icon_set_from_gicon ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@status_icon:
|
||||
@icon:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_status_icon_get_storage_type ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@status_icon:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_status_icon_get_pixbuf ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@status_icon:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_status_icon_get_stock ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@status_icon:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_status_icon_get_icon_name ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@status_icon:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_status_icon_get_gicon ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@status_icon:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_status_icon_get_size ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@status_icon:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_status_icon_set_screen ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@status_icon:
|
||||
@screen:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_status_icon_get_screen ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@status_icon:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_status_icon_set_tooltip_text ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@status_icon:
|
||||
@text:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_status_icon_get_tooltip_text ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@status_icon:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_status_icon_set_tooltip_markup ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@status_icon:
|
||||
@markup:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_status_icon_get_tooltip_markup ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@status_icon:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_status_icon_set_has_tooltip ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@status_icon:
|
||||
@has_tooltip:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_status_icon_get_has_tooltip ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@status_icon:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_status_icon_set_title ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@status_icon:
|
||||
@title:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_status_icon_get_title ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@status_icon:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_status_icon_set_name ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@status_icon:
|
||||
@name:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_status_icon_set_visible ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@status_icon:
|
||||
@visible:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_status_icon_get_visible ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@status_icon:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_status_icon_is_embedded ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@status_icon:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_status_icon_position_menu ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@menu:
|
||||
@x:
|
||||
@y:
|
||||
@push_in:
|
||||
@user_data:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_status_icon_get_geometry ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@status_icon:
|
||||
@screen:
|
||||
@area:
|
||||
@orientation:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_status_icon_get_x11_window_id ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@status_icon:
|
||||
@Returns:
|
||||
|
||||
|
||||
@@ -0,0 +1,314 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
GtkTable
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
Pack widgets in regular patterns
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
The #GtkTable functions allow the programmer to arrange widgets in rows and
|
||||
columns, making it easy to align many widgets next to each other,
|
||||
horizontally and vertically.
|
||||
</para>
|
||||
<para>
|
||||
Tables are created with a call to gtk_table_new(), the size of which can
|
||||
later be changed with gtk_table_resize().
|
||||
</para>
|
||||
<para>
|
||||
Widgets can be added to a table using gtk_table_attach() or the more
|
||||
convenient (but slightly less flexible) gtk_table_attach_defaults().
|
||||
</para>
|
||||
<para>
|
||||
To alter the space next to a specific row, use gtk_table_set_row_spacing(),
|
||||
and for a column, gtk_table_set_col_spacing().</para>
|
||||
<para>
|
||||
The gaps between <emphasis>all</emphasis> rows or columns can be changed by
|
||||
calling gtk_table_set_row_spacings() or gtk_table_set_col_spacings()
|
||||
respectively. Note that spacing is added <emphasis>between</emphasis> the
|
||||
children, while padding added by gtk_table_atach() is added <emphasis>on
|
||||
either side</emphasis> of the widget it belongs to.
|
||||
</para>
|
||||
<para>
|
||||
gtk_table_set_homogeneous(), can be used to set whether all cells in the
|
||||
table will resize themselves to the size of the largest widget in the table.
|
||||
</para>
|
||||
<note>
|
||||
<para>
|
||||
Note that #GtkGrid provides the same capabilities as GtkTable for arranging
|
||||
widgets in a rectangular grid, and additionally supports height-for-width
|
||||
geometry management.
|
||||
</para>
|
||||
</note>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term>#GtkBox</term>
|
||||
<listitem><para>For packing widgets in a single row.</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>#GtkGrid</term>
|
||||
<listitem><para>For packing widgets in a grid with height-for-width geometry management.</para></listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### SECTION Image ##### -->
|
||||
|
||||
|
||||
<!-- ##### STRUCT GtkTable ##### -->
|
||||
<para>
|
||||
The <structname>GtkTable</structname> structure holds the data for the actual table itself.
|
||||
|
||||
<structfield>children</structfield> is a #GList of all the widgets the table contains. <structfield>rows</structfield> and <structfield>columns</structfield> are pointers to #GtkTableRowCol structures, which contain the default spacing and expansion details for the #GtkTable's rows and columns, respectively.
|
||||
</para>
|
||||
<para>
|
||||
<structfield>nrows</structfield> and <structfield>ncols</structfield> are 16bit integers storing the number of rows and columns the table has.
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### ARG GtkTable:column-spacing ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkTable:homogeneous ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkTable:n-columns ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkTable:n-rows ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkTable:row-spacing ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkTable:bottom-attach ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkTable:left-attach ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkTable:right-attach ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkTable:top-attach ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkTable:x-options ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkTable:x-padding ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkTable:y-options ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkTable:y-padding ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### FUNCTION gtk_table_new ##### -->
|
||||
<para>
|
||||
Used to create a new table widget. An initial size must be given by
|
||||
specifying how many rows and columns the table should have, although
|
||||
this can be changed later with gtk_table_resize(). @rows and @columns
|
||||
must both be in the range 1 .. 65535. For historical reasons, 0 is accepted
|
||||
as well and is silently interpreted as 1.
|
||||
</para>
|
||||
|
||||
@rows: The number of rows the new table should have.
|
||||
@columns: The number of columns the new table should have.
|
||||
@homogeneous: If set to %TRUE, all table cells are resized to the size of the cell
|
||||
containing the largest widget.
|
||||
@Returns: A pointer to the the newly created table widget.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_table_resize ##### -->
|
||||
<para>
|
||||
If you need to change a table's size <emphasis>after</emphasis> it has been created, this function allows you to do so.
|
||||
</para>
|
||||
|
||||
@table: The #GtkTable you wish to change the size of.
|
||||
@rows: The new number of rows.
|
||||
@columns: The new number of columns.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_table_get_size ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@table:
|
||||
@rows:
|
||||
@columns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_table_attach ##### -->
|
||||
<para>
|
||||
Adds a widget to a table. The number of 'cells' that a widget will occupy is
|
||||
specified by @left_attach, @right_attach, @top_attach and @bottom_attach.
|
||||
These each represent the leftmost, rightmost, uppermost and lowest column
|
||||
and row numbers of the table. (Columns and rows are indexed from zero).
|
||||
</para>
|
||||
<para>
|
||||
To make a button occupy the lower right cell of a 2x2 table, use
|
||||
<informalexample><programlisting>
|
||||
gtk_table_attach (table, button,
|
||||
1, 2, /* left, right attach */
|
||||
1, 2, /* top, bottom attach */
|
||||
xoptions, yoptions,
|
||||
xpadding, ypadding);
|
||||
</programlisting></informalexample>
|
||||
If you want to make the button span the entire bottom row, use @left_attach == 0 and @right_attach = 2 instead.
|
||||
</para>
|
||||
|
||||
@table: The #GtkTable to add a new widget to.
|
||||
@child: The widget to add.
|
||||
@left_attach: the column number to attach the left side of a child widget to.
|
||||
@right_attach: the column number to attach the right side of a child widget to.
|
||||
@top_attach: the row number to attach the top of a child widget to.
|
||||
@bottom_attach: the row number to attach the bottom of a child widget to.
|
||||
@xoptions: Used to specify the properties of the child widget when the table is resized.
|
||||
@yoptions: The same as xoptions, except this field determines behaviour of vertical resizing.
|
||||
@xpadding: An integer value specifying the padding on the left and right of the widget being added to the table.
|
||||
@ypadding: The amount of padding above and below the child widget.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_table_attach_defaults ##### -->
|
||||
<para>
|
||||
As there are many options associated with gtk_table_attach(), this convenience function provides the programmer with a means to add children to a table with identical padding and expansion options. The values used for the #GtkAttachOptions are <literal>GTK_EXPAND | GTK_FILL</literal>, and the padding is set to 0.
|
||||
</para>
|
||||
|
||||
@table: The table to add a new child widget to.
|
||||
@widget: The child widget to add.
|
||||
@left_attach: The column number to attach the left side of the child widget to.
|
||||
@right_attach: The column number to attach the right side of the child widget to.
|
||||
@top_attach: The row number to attach the top of the child widget to.
|
||||
@bottom_attach: The row number to attach the bottom of the child widget to.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_table_set_row_spacing ##### -->
|
||||
<para>
|
||||
Changes the space between a given table row and the subsequent row.
|
||||
</para>
|
||||
|
||||
@table: a #GtkTable containing the row whose properties you wish to change.
|
||||
@row: row number whose spacing will be changed.
|
||||
@spacing: number of pixels that the spacing should take up.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_table_set_col_spacing ##### -->
|
||||
<para>
|
||||
Alters the amount of space between a given table column and the following
|
||||
column.
|
||||
</para>
|
||||
|
||||
@table: a #GtkTable.
|
||||
@column: the column whose spacing should be changed.
|
||||
@spacing: number of pixels that the spacing should take up.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_table_set_row_spacings ##### -->
|
||||
<para>
|
||||
Sets the space between every row in @table equal to @spacing.
|
||||
</para>
|
||||
|
||||
@table: a #GtkTable.
|
||||
@spacing: the number of pixels of space to place between every row in the table.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_table_set_col_spacings ##### -->
|
||||
<para>
|
||||
Sets the space between every column in @table equal to @spacing.
|
||||
</para>
|
||||
|
||||
@table: a #GtkTable.
|
||||
@spacing: the number of pixels of space to place between every column in the table.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_table_set_homogeneous ##### -->
|
||||
<para>
|
||||
Changes the homogenous property of table cells, ie. whether all cells are an equal size or not.
|
||||
</para>
|
||||
|
||||
@table: The #GtkTable you wish to set the homogeneous properties of.
|
||||
@homogeneous: Set to %TRUE to ensure all table cells are the same size. Set
|
||||
to %FALSE if this is not your desired behaviour.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_table_get_default_row_spacing ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@table:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_table_get_homogeneous ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@table:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_table_get_row_spacing ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@table:
|
||||
@row:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_table_get_col_spacing ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@table:
|
||||
@column:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_table_get_default_col_spacing ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@table:
|
||||
@Returns:
|
||||
|
||||
|
||||
@@ -0,0 +1,60 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
GtkTearoffMenuItem
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
A menu item used to tear off and reattach its menu
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
A #GtkTearoffMenuItem is a special #GtkMenuItem which is used to
|
||||
tear off and reattach its menu.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
When its menu is shown normally, the #GtkTearoffMenuItem is drawn as a
|
||||
dotted line indicating that the menu can be torn off. Activating it
|
||||
causes its menu to be torn off and displayed in its own window
|
||||
as a tearoff menu.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
When its menu is shown as a tearoff menu, the #GtkTearoffMenuItem is drawn
|
||||
as a dotted line which has a left pointing arrow graphic indicating that
|
||||
the tearoff menu can be reattached. Activating it will erase the tearoff
|
||||
menu window.
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
<variablelist>
|
||||
|
||||
<varlistentry>
|
||||
<term>#GtkMenu</term>
|
||||
<listitem><para>for further discussion of menus in GTK.</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
</variablelist>
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### SECTION Image ##### -->
|
||||
|
||||
|
||||
<!-- ##### STRUCT GtkTearoffMenuItem ##### -->
|
||||
<para>
|
||||
The #GtkTearoffMenuItem-struct struct contains private data only, and
|
||||
should be accessed using the functions below.
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_tearoff_menu_item_new ##### -->
|
||||
<para>
|
||||
Creates a new #GtkTearoffMenuItem.
|
||||
</para>
|
||||
|
||||
@void:
|
||||
@Returns: a new #GtkTearoffMenuItem.
|
||||
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
Themes
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
@@ -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.
|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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,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
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
@@ -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
@@ -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
@@ -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@
|
||||
|
||||
+27
-30
@@ -11,7 +11,7 @@ INTROSPECTION_COMPILER_ARGS = \
|
||||
|
||||
SUBDIRS = $(GDK_BACKENDS) . tests
|
||||
|
||||
DIST_SUBDIRS = win32 x11 quartz broadway wayland tests
|
||||
DIST_SUBDIRS = win32 x11 quartz tests
|
||||
|
||||
CLEANFILES =
|
||||
|
||||
@@ -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,33 +157,25 @@ 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 USE_BROADWAY
|
||||
libgdk_3_la_LIBADD += broadway/libgdk-broadway.la
|
||||
endif # USE_BROADWAY
|
||||
|
||||
if USE_WAYLAND
|
||||
libgdk_3_la_LIBADD += wayland/libgdk-wayland.la
|
||||
endif
|
||||
|
||||
if HAVE_INTROSPECTION
|
||||
|
||||
introspection_files = \
|
||||
@@ -189,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
|
||||
@@ -230,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 \
|
||||
@@ -240,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
|
||||
@@ -302,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
|
||||
@@ -352,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
@@ -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
|
||||
|
||||
@@ -1,88 +0,0 @@
|
||||
## Process this file with automake to produce Makefile.in
|
||||
include $(top_srcdir)/Makefile.decl
|
||||
|
||||
libgdkincludedir = $(includedir)/gtk-3.0/gdk
|
||||
libgdkbroadwayincludedir = $(includedir)/gtk-3.0/gdk/broadway
|
||||
|
||||
INCLUDES = \
|
||||
-DG_LOG_DOMAIN=\"Gdk\" \
|
||||
-DGDK_COMPILATION \
|
||||
-I$(top_srcdir) \
|
||||
-I$(top_srcdir)/gdk \
|
||||
-I$(top_builddir)/gdk \
|
||||
$(GTK_DEBUG_FLAGS) \
|
||||
$(GDK_DEP_CFLAGS)
|
||||
|
||||
LDADDS = $(GDK_DEP_LIBS)
|
||||
|
||||
noinst_LTLIBRARIES = libbroadway.la libgdk-broadway.la
|
||||
|
||||
libgdkinclude_HEADERS = \
|
||||
gdkbroadway.h
|
||||
|
||||
libgdkbroadwayinclude_HEADERS = \
|
||||
gdkbroadwaydisplaymanager.h \
|
||||
gdkbroadwaywindow.h \
|
||||
gdkbroadwaycursor.h \
|
||||
gdkbroadwayvisual.h
|
||||
|
||||
libbroadway_la_SOURCES = \
|
||||
broadway.h \
|
||||
broadway.c
|
||||
|
||||
clienthtml.h: client.html
|
||||
$(PERL) ./toarray.pl client.html client_html > $@
|
||||
|
||||
EXTRA_DIST += client.html
|
||||
|
||||
broadwayjs.h: broadway.js
|
||||
$(PERL) ./toarray.pl broadway.js broadway_js > $@
|
||||
|
||||
EXTRA_DIST += broadway.js
|
||||
|
||||
# built headers that don't get installed
|
||||
broadway_built_private_headers = \
|
||||
clienthtml.h \
|
||||
broadwayjs.h
|
||||
|
||||
broadway_built_sources = \
|
||||
${broadway_built_private_headers}
|
||||
|
||||
libgdk_broadway_la_SOURCES = \
|
||||
${broadway_built_private_headers}\
|
||||
gdkcursor-broadway.c \
|
||||
gdkdevice-broadway.h \
|
||||
gdkdevice-broadway.c \
|
||||
gdkdevicemanager-broadway.h \
|
||||
gdkdevicemanager-broadway.c \
|
||||
gdkdisplay-broadway.c \
|
||||
gdkdisplay-broadway.h \
|
||||
gdkdisplaymanager-broadway.c \
|
||||
gdkdnd-broadway.c \
|
||||
gdkeventsource.c \
|
||||
gdkeventsource.h \
|
||||
gdkglobals-broadway.c \
|
||||
gdkim-broadway.c \
|
||||
gdkkeys-broadway.c \
|
||||
gdkmain-broadway.c \
|
||||
gdkproperty-broadway.c \
|
||||
gdkscreen-broadway.c \
|
||||
gdkscreen-broadway.h \
|
||||
gdkselection-broadway.c \
|
||||
gdktestutils-broadway.c \
|
||||
gdkvisual-broadway.c \
|
||||
gdkwindow-broadway.c \
|
||||
gdkwindow-broadway.h \
|
||||
gdkprivate-broadway.h
|
||||
|
||||
libgdk_broadway_la_LIBADD = libbroadway.la
|
||||
|
||||
MAINTAINERCLEANFILES = $(broadway_built_sources)
|
||||
EXTRA_DIST += $(broadway_built_sources)
|
||||
|
||||
BUILT_SOURCES = $(broadway_built_sources)
|
||||
|
||||
noinst_PROGRAMS = broadway-demo
|
||||
broadway_demo_LDADD = -lz -lcairo libbroadway.la -lglib-2.0
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
||||
@@ -1,230 +0,0 @@
|
||||
/* Build with
|
||||
gcc -lm -lz -O2 -Wall `pkg-config --libs --cflags cairo` -o broadway broadway.c demo.c
|
||||
*/
|
||||
|
||||
#include "broadway.h"
|
||||
#include <math.h>
|
||||
#include <unistd.h>
|
||||
#include <stdint.h>
|
||||
#include <cairo.h>
|
||||
|
||||
static void
|
||||
diff_surfaces (cairo_surface_t *surface,
|
||||
cairo_surface_t *old_surface)
|
||||
{
|
||||
uint8_t *data, *old_data;
|
||||
uint32_t *line, *old_line;
|
||||
int w, h, stride, old_stride;
|
||||
int x, y;
|
||||
|
||||
data = cairo_image_surface_get_data (surface);
|
||||
old_data = cairo_image_surface_get_data (old_surface);
|
||||
|
||||
w = cairo_image_surface_get_width (surface);
|
||||
h = cairo_image_surface_get_height (surface);
|
||||
|
||||
stride = cairo_image_surface_get_stride (surface);
|
||||
old_stride = cairo_image_surface_get_stride (old_surface);
|
||||
|
||||
for (y = 0; y < h; y++)
|
||||
{
|
||||
line = (uint32_t *)data;
|
||||
old_line = (uint32_t *)old_data;
|
||||
|
||||
for (x = 0; x < w; x++)
|
||||
{
|
||||
if ((*line & 0xffffff) == (*old_line & 0xffffff))
|
||||
*old_line = 0;
|
||||
else
|
||||
*old_line = *line | 0xff000000;
|
||||
line ++;
|
||||
old_line ++;
|
||||
}
|
||||
|
||||
data += stride;
|
||||
old_data += old_stride;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
snippet(cairo_t *cr, int i)
|
||||
{
|
||||
if (1)
|
||||
{
|
||||
cairo_save(cr);
|
||||
cairo_rotate (cr, i * 0.002);
|
||||
/* a custom shape that could be wrapped in a function */
|
||||
double x0 = 25.6, /* parameters like cairo_rectangle */
|
||||
y0 = 25.6,
|
||||
rect_width = 204.8,
|
||||
rect_height = 204.8,
|
||||
radius = 102.4; /* and an approximate curvature radius */
|
||||
|
||||
double x1,y1;
|
||||
|
||||
x1=x0+rect_width;
|
||||
y1=y0+rect_height;
|
||||
if (rect_width/2<radius) {
|
||||
if (rect_height/2<radius) {
|
||||
cairo_move_to (cr, x0, (y0 + y1)/2);
|
||||
cairo_curve_to (cr, x0 ,y0, x0, y0, (x0 + x1)/2, y0);
|
||||
cairo_curve_to (cr, x1, y0, x1, y0, x1, (y0 + y1)/2);
|
||||
cairo_curve_to (cr, x1, y1, x1, y1, (x1 + x0)/2, y1);
|
||||
cairo_curve_to (cr, x0, y1, x0, y1, x0, (y0 + y1)/2);
|
||||
} else {
|
||||
cairo_move_to (cr, x0, y0 + radius);
|
||||
cairo_curve_to (cr, x0 ,y0, x0, y0, (x0 + x1)/2, y0);
|
||||
cairo_curve_to (cr, x1, y0, x1, y0, x1, y0 + radius);
|
||||
cairo_line_to (cr, x1 , y1 - radius);
|
||||
cairo_curve_to (cr, x1, y1, x1, y1, (x1 + x0)/2, y1);
|
||||
cairo_curve_to (cr, x0, y1, x0, y1, x0, y1- radius);
|
||||
}
|
||||
} else {
|
||||
if (rect_height/2<radius) {
|
||||
cairo_move_to (cr, x0, (y0 + y1)/2);
|
||||
cairo_curve_to (cr, x0 , y0, x0 , y0, x0 + radius, y0);
|
||||
cairo_line_to (cr, x1 - radius, y0);
|
||||
cairo_curve_to (cr, x1, y0, x1, y0, x1, (y0 + y1)/2);
|
||||
cairo_curve_to (cr, x1, y1, x1, y1, x1 - radius, y1);
|
||||
cairo_line_to (cr, x0 + radius, y1);
|
||||
cairo_curve_to (cr, x0, y1, x0, y1, x0, (y0 + y1)/2);
|
||||
} else {
|
||||
cairo_move_to (cr, x0, y0 + radius);
|
||||
cairo_curve_to (cr, x0 , y0, x0 , y0, x0 + radius, y0);
|
||||
cairo_line_to (cr, x1 - radius, y0);
|
||||
cairo_curve_to (cr, x1, y0, x1, y0, x1, y0 + radius);
|
||||
cairo_line_to (cr, x1 , y1 - radius);
|
||||
cairo_curve_to (cr, x1, y1, x1, y1, x1 - radius, y1);
|
||||
cairo_line_to (cr, x0 + radius, y1);
|
||||
cairo_curve_to (cr, x0, y1, x0, y1, x0, y1- radius);
|
||||
}
|
||||
}
|
||||
cairo_close_path (cr);
|
||||
|
||||
cairo_set_source_rgb (cr, 0.5, 0.5, 1);
|
||||
cairo_fill_preserve (cr);
|
||||
cairo_set_source_rgba (cr, 0.5, 0, 0, 0.5);
|
||||
cairo_set_line_width (cr, 10.0);
|
||||
cairo_stroke (cr);
|
||||
cairo_restore(cr);
|
||||
}
|
||||
if (1)
|
||||
{
|
||||
double xc = 128.0;
|
||||
double yc = 128.0;
|
||||
double radius = 100.0;
|
||||
double angle1 = (45.0 + i * 5) * (M_PI/180.0); /* angles are specified */
|
||||
double angle2 = (180.0 + i * 5) * (M_PI/180.0); /* in radians */
|
||||
|
||||
cairo_set_source_rgb (cr, 0.0, 0.0, 0.0);
|
||||
|
||||
cairo_set_line_width (cr, 10.0);
|
||||
cairo_arc (cr, xc, yc, radius, angle1, angle2);
|
||||
cairo_stroke (cr);
|
||||
|
||||
/* draw helping lines */
|
||||
cairo_set_source_rgba (cr, 1, 0.2, 0.2, 0.6);
|
||||
cairo_set_line_width (cr, 6.0);
|
||||
|
||||
cairo_arc (cr, xc, yc, 10.0, 0, 2*M_PI);
|
||||
cairo_fill (cr);
|
||||
|
||||
cairo_arc (cr, xc, yc, radius, angle1, angle1);
|
||||
cairo_line_to (cr, xc, yc);
|
||||
cairo_arc (cr, xc, yc, radius, angle2, angle2);
|
||||
cairo_line_to (cr, xc, yc);
|
||||
cairo_stroke (cr);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
demo2 (BroadwayOutput *output)
|
||||
{
|
||||
cairo_t *cr;
|
||||
cairo_surface_t *surface, *old_surface;
|
||||
BroadwayRect rects[2];
|
||||
double da = 0;
|
||||
int i;
|
||||
|
||||
broadway_output_new_surface(output, 0, 100, 100, 800, 600, 0);
|
||||
|
||||
surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32,
|
||||
800, 600);
|
||||
old_surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32,
|
||||
800, 600);
|
||||
|
||||
cr = cairo_create (old_surface);
|
||||
cairo_set_source_rgb (cr, 0.0, 0.0, 0.0);
|
||||
cairo_rectangle (cr, 0, 0, 800, 600);
|
||||
cairo_fill (cr);
|
||||
cairo_destroy (cr);
|
||||
|
||||
for (i = 0; i < 100; i++)
|
||||
{
|
||||
cr = cairo_create (surface);
|
||||
|
||||
cairo_set_source_rgb (cr, 0.8, 0.8, 0.8);
|
||||
|
||||
cairo_rectangle (cr, 0, 0, 800, 600);
|
||||
cairo_fill (cr);
|
||||
|
||||
snippet(cr, i);
|
||||
|
||||
cairo_destroy (cr);
|
||||
|
||||
if (i == 0)
|
||||
{
|
||||
broadway_output_put_rgb (output, 0, 0, 0, 800, 600, 800*4,
|
||||
cairo_image_surface_get_data(surface)
|
||||
);
|
||||
broadway_output_show_surface (output, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
diff_surfaces (surface,
|
||||
old_surface);
|
||||
broadway_output_put_rgba (output, 0, 0, 0, 800, 600, 800*4,
|
||||
cairo_image_surface_get_data(old_surface));
|
||||
}
|
||||
broadway_output_move_resize_surface (output, 0, 1, 100 + i, 100 + i, 0, 0, 0);
|
||||
|
||||
rects[0].x = 500;
|
||||
rects[0].y = 0;
|
||||
rects[0].width = 100;
|
||||
rects[0].height = 100;
|
||||
rects[1].x = 600;
|
||||
rects[1].y = 100;
|
||||
rects[1].width = 100;
|
||||
rects[1].height = 100;
|
||||
broadway_output_copy_rectangles (output,
|
||||
0,
|
||||
rects, 2,
|
||||
400, 0);
|
||||
|
||||
broadway_output_flush (output);
|
||||
|
||||
cr = cairo_create (old_surface);
|
||||
cairo_set_source_surface (cr, surface, 0, 0);
|
||||
cairo_paint (cr);
|
||||
cairo_destroy (cr);
|
||||
|
||||
da += 10;
|
||||
usleep (50 * 1000);
|
||||
}
|
||||
|
||||
|
||||
cairo_surface_destroy (surface);
|
||||
broadway_output_destroy_surface(output, 0);
|
||||
broadway_output_flush (output);
|
||||
}
|
||||
|
||||
int
|
||||
main (int argc, char *argv[])
|
||||
{
|
||||
BroadwayOutput *output;
|
||||
|
||||
output = broadway_output_new (STDOUT_FILENO, 1);
|
||||
demo2(output);
|
||||
|
||||
return 0;
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,67 +0,0 @@
|
||||
#include <glib.h>
|
||||
|
||||
typedef struct BroadwayOutput BroadwayOutput;
|
||||
|
||||
typedef struct {
|
||||
int x, y;
|
||||
int width, height;
|
||||
} BroadwayRect;
|
||||
|
||||
BroadwayOutput *broadway_output_new (int fd,
|
||||
guint32 serial);
|
||||
void broadway_output_free (BroadwayOutput *output);
|
||||
int broadway_output_flush (BroadwayOutput *output);
|
||||
int broadway_output_has_error (BroadwayOutput *output);
|
||||
guint32 broadway_output_get_next_serial (BroadwayOutput *output);
|
||||
void broadway_output_new_surface (BroadwayOutput *output,
|
||||
int id,
|
||||
int x,
|
||||
int y,
|
||||
int w,
|
||||
int h,
|
||||
gboolean is_temp);
|
||||
void broadway_output_show_surface (BroadwayOutput *output,
|
||||
int id);
|
||||
void broadway_output_hide_surface (BroadwayOutput *output,
|
||||
int id);
|
||||
void broadway_output_destroy_surface (BroadwayOutput *output,
|
||||
int id);
|
||||
void broadway_output_move_resize_surface (BroadwayOutput *output,
|
||||
int id,
|
||||
gboolean has_pos,
|
||||
int x,
|
||||
int y,
|
||||
gboolean has_size,
|
||||
int w,
|
||||
int h);
|
||||
void broadway_output_set_transient_for (BroadwayOutput *output,
|
||||
int id,
|
||||
int parent_id);
|
||||
void broadway_output_put_rgb (BroadwayOutput *output,
|
||||
int id,
|
||||
int x,
|
||||
int y,
|
||||
int w,
|
||||
int h,
|
||||
int byte_stride,
|
||||
void *data);
|
||||
void broadway_output_put_rgba (BroadwayOutput *output,
|
||||
int id,
|
||||
int x,
|
||||
int y,
|
||||
int w,
|
||||
int h,
|
||||
int byte_stride,
|
||||
void *data);
|
||||
void broadway_output_surface_flush (BroadwayOutput *output,
|
||||
int id);
|
||||
void broadway_output_copy_rectangles (BroadwayOutput *output,
|
||||
int id,
|
||||
BroadwayRect *rects,
|
||||
int n_rects,
|
||||
int dx,
|
||||
int dy);
|
||||
void broadway_output_grab_pointer (BroadwayOutput *output,
|
||||
int id,
|
||||
gboolean owner_event);
|
||||
guint32 broadway_output_ungrab_pointer (BroadwayOutput *output);
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,65 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf8" />
|
||||
<title>broadway 2.0</title>
|
||||
<script type="text/javascript" src="broadway.js"></script>
|
||||
<style type="text/css">
|
||||
|
||||
.frame-window {
|
||||
background-color: rgb(179, 230, 255);
|
||||
background-image: -moz-linear-gradient(rgba(250, 253, 255, 0.1) 0px, rgba(250, 253, 255, 0.65) 40px, rgba(250, 253, 255, 0.75) 50px, rgba(250, 253, 255, 0) 54px);
|
||||
background-image: -webkit-gradient(linear, left top, left 50, from(rgba(250, 253, 255, 0.9)), to(rgba(250, 253, 255, 0)), color-stop(88%, rgba(250, 253, 255, 0.75)));
|
||||
border-radius: 6px;
|
||||
-moz-border-radius: 6px;
|
||||
border: 1px solid rgb(0, 0,0);
|
||||
padding: 0 7px 7px 7px;
|
||||
}
|
||||
|
||||
.frame-contents {
|
||||
border-radius: 3px;
|
||||
-moz-border-radius: 3px;
|
||||
border: 1px solid rgb(0, 0, 0);
|
||||
clear: both;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.frame-close {
|
||||
margin: 0 2px 3px 2px;
|
||||
background-color: #CC3333;
|
||||
background-image: -moz-linear-gradient(rgba(255, 255, 255, 0.35) 0%, rgba(255, 255, 255, 0.5) 50%, rgba(255, 255, 255, 0) 50%, rgba(255, 255, 255, 0.5) 100%);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(rgba(255, 255, 255, 0.35)), to(rgba(255, 255, 255, 0.5)), color-stop(50%, rgba(255, 255, 255, 0.5)), color-stop(50%, rgba(255, 255, 255, 0)));
|
||||
border-radius: 2px;
|
||||
border-top-left-radius: 0;
|
||||
border-top-right-radius: 0;
|
||||
-moz-border-radius: 2px;
|
||||
-moz-border-top-left-radius: 0;
|
||||
-moz-border-top-right-radius: 0;
|
||||
border: 1px solid #550000;
|
||||
border-top: none;
|
||||
float: right;
|
||||
color: white;
|
||||
width: 36px;
|
||||
text-shadow: black -1px 0 0, black 1px 0 0, black 0 1px 0, black 0 -1px 0;
|
||||
font-weight: bold;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.frame-close:focus {
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.frame-close:hover {
|
||||
background-color: #EE4A4A;
|
||||
}
|
||||
|
||||
.frame-close:active {
|
||||
background-color: #AA2020;
|
||||
}
|
||||
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body onload="connect()">
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,41 +0,0 @@
|
||||
/* GDK - The GIMP Drawing Kit
|
||||
* Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* 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
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
|
||||
* file for a list of people on the GTK+ Team. See the ChangeLog
|
||||
* files for a list of changes. These files are distributed with
|
||||
* GTK+ at ftp://ftp.gtk.org/pub/gtk/.
|
||||
*/
|
||||
|
||||
#ifndef __GDK_BROADWAY_H__
|
||||
#define __GDK_BROADWAY_H__
|
||||
|
||||
#include <gdk/gdk.h>
|
||||
|
||||
#define __GDKBROADWAY_H_INSIDE__
|
||||
|
||||
#include <gdk/broadway/gdkbroadwaywindow.h>
|
||||
#include <gdk/broadway/gdkbroadwaycursor.h>
|
||||
#include <gdk/broadway/gdkbroadwayvisual.h>
|
||||
#include <gdk/broadway/gdkbroadwaydisplaymanager.h>
|
||||
|
||||
#undef __GDKBROADWAY_H_INSIDE__
|
||||
|
||||
#endif /* __GDK_BROADWAY_H__ */
|
||||
@@ -1,56 +0,0 @@
|
||||
/* GDK - The GIMP Drawing Kit
|
||||
* Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* 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
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
|
||||
* file for a list of people on the GTK+ Team. See the ChangeLog
|
||||
* files for a list of changes. These files are distributed with
|
||||
* GTK+ at ftp://ftp.gtk.org/pub/gtk/.
|
||||
*/
|
||||
|
||||
#if !defined (__GDKBROADWAY_H_INSIDE__) && !defined (GDK_COMPILATION)
|
||||
#error "Only <gdk/gdkbroadway.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#ifndef __GDK_BROADWAY_CURSOR_H__
|
||||
#define __GDK_BROADWAY_CURSOR_H__
|
||||
|
||||
#include <gdk/gdk.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define GDK_TYPE_BROADWAY_CURSOR (gdk_broadway_cursor_get_type ())
|
||||
#define GDK_BROADWAY_CURSOR(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_BROADWAY_CURSOR, GdkBroadwayCursor))
|
||||
#define GDK_BROADWAY_CURSOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_BROADWAY_CURSOR, GdkBroadwayCursorClass))
|
||||
#define GDK_IS_BROADWAY_CURSOR(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_BROADWAY_CURSOR))
|
||||
#define GDK_IS_BROADWAY_CURSOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_BROADWAY_CURSOR))
|
||||
#define GDK_BROADWAY_CURSOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_BROADWAY_CURSOR, GdkBroadwayCursorClass))
|
||||
|
||||
#ifdef GDK_COMPILATION
|
||||
typedef struct _GdkBroadwayCursor GdkBroadwayCursor;
|
||||
#else
|
||||
typedef GdkCursor GdkBroadwayCursor;
|
||||
#endif
|
||||
typedef struct _GdkBroadwayCursorClass GdkBroadwayCursorClass;
|
||||
|
||||
GType gdk_broadway_cursor_get_type (void);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GDK_BROADWAY_CURSOR_H__ */
|
||||
@@ -1,47 +0,0 @@
|
||||
/* gdkbroadwaydisplaymanager.h
|
||||
*
|
||||
* Copyright (C) 2005-2007 Imendio AB
|
||||
* Copyright 2010 Red Hat, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* 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
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#if !defined(__GDKBROADWAY_H_INSIDE__) && !defined (GDK_COMPILATION)
|
||||
#error "Only <gdk/gdkbroadway.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#ifndef __GDK_BROADWAY_DISPLAY_MANAGER_H__
|
||||
#define __GDK_BROADWAY_DISPLAY_MANAGER_H__
|
||||
|
||||
#include <gdk/gdk.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define GDK_TYPE_BROADWAY_DISPLAY_MANAGER (gdk_broadway_display_manager_get_type ())
|
||||
#define GDK_BROADWAY_DISPLAY_MANAGER(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_BROADWAY_DISPLAY_MANAGER, GdkBroadwayDisplayManager))
|
||||
|
||||
#ifdef GDK_COMPILATION
|
||||
typedef struct _GdkBroadwayDisplayManager GdkBroadwayDisplayManager;
|
||||
#else
|
||||
typedef GdkDisplayManager _GdkBroadwayDisplayManager;
|
||||
#endif
|
||||
typedef struct _GdkDisplayManagerClass GdkBroadwayDisplayManagerClass;
|
||||
|
||||
GType gdk_broadway_display_manager_get_type (void);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GDK_BROADWAY_DISPLAY_MANAGER_H__ */
|
||||
@@ -1,47 +0,0 @@
|
||||
/* gdkbroadwayvisual.h
|
||||
*
|
||||
* Copyright (C) 2011 Alexander Larsson <alexl@redhat.com>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* 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
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef __GDK_BROADWAY_VISUAL_H__
|
||||
#define __GDK_BROADWAY_VISUAL_H__
|
||||
|
||||
#include <gdk/gdk.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define GDK_TYPE_BROADWAY_VISUAL (gdk_broadway_visual_get_type ())
|
||||
#define GDK_BROADWAY_VISUAL(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_BROADWAY_VISUAL, GdkBroadwayVisual))
|
||||
#define GDK_BROADWAY_VISUAL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_BROADWAY_VISUAL, GdkBroadwayVisualClass))
|
||||
#define GDK_IS_BROADWAY_VISUAL(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_BROADWAY_VISUAL))
|
||||
#define GDK_IS_BROADWAY_VISUAL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_BROADWAY_VISUAL))
|
||||
#define GDK_BROADWAY_VISUAL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_BROADWAY_VISUAL, GdkBroadwayVisualClass))
|
||||
|
||||
#ifdef GDK_COMPILATION
|
||||
typedef struct _GdkBroadwayVisual GdkBroadwayVisual;
|
||||
#else
|
||||
typedef GdkVisual GdkBroadwayVisual;
|
||||
#endif
|
||||
typedef struct _GdkBroadwayVisualClass GdkBroadwayVisualClass;
|
||||
|
||||
|
||||
GType gdk_broadway_visual_get_type (void);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GDK_BROADWAY_VISUAL_H__ */
|
||||
@@ -1,54 +0,0 @@
|
||||
/* GDK - The GIMP Drawing Kit
|
||||
* Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* 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
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
|
||||
* file for a list of people on the GTK+ Team. See the ChangeLog
|
||||
* files for a list of changes. These files are distributed with
|
||||
* GTK+ at ftp://ftp.gtk.org/pub/gtk/.
|
||||
*/
|
||||
|
||||
#ifndef __GDK_BROADWAY_WINDOW_H__
|
||||
#define __GDK_BROADWAY_WINDOW_H__
|
||||
|
||||
#include <gdk/gdk.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define GDK_TYPE_BROADWAY_WINDOW (gdk_broadway_window_get_type ())
|
||||
#define GDK_BROADWAY_WINDOW(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_BROADWAY_WINDOW, GdkBroadwayWindow))
|
||||
#define GDK_BROADWAY_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_BROADWAY_WINDOW, GdkBroadwayWindowClass))
|
||||
#define GDK_IS_BROADWAY_WINDOW(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_BROADWAY_WINDOW))
|
||||
#define GDK_IS_BROADWAY_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_BROADWAY_WINDOW))
|
||||
#define GDK_BROADWAY_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_BROADWAY_WINDOW, GdkBroadwayWindowClass))
|
||||
|
||||
#ifdef GDK_COMPILATION
|
||||
typedef struct _GdkBroadwayWindow GdkBroadwayWindow;
|
||||
#else
|
||||
typedef GdkWindow GdkBroadwayWindow;
|
||||
#endif
|
||||
typedef struct _GdkBroadwayWindowClass GdkBroadwayWindowClass;
|
||||
|
||||
GType gdk_broadway_window_get_type (void);
|
||||
|
||||
guint32 gdk_broadway_get_last_seen_time (GdkWindow *window);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GDK_BROADWAY_WINDOW_H__ */
|
||||
@@ -1,185 +0,0 @@
|
||||
/* GDK - The GIMP Drawing Kit
|
||||
* Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* 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
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
|
||||
* file for a list of people on the GTK+ Team. See the ChangeLog
|
||||
* files for a list of changes. These files are distributed with
|
||||
* GTK+ at ftp://ftp.gtk.org/pub/gtk/.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
/* needs to be first because any header might include gdk-pixbuf.h otherwise */
|
||||
#define GDK_PIXBUF_ENABLE_BACKEND
|
||||
#include <gdk-pixbuf/gdk-pixbuf.h>
|
||||
|
||||
#include "gdkcursor.h"
|
||||
#include "gdkcursorprivate.h"
|
||||
|
||||
#include "gdkprivate-broadway.h"
|
||||
#include "gdkdisplay-broadway.h"
|
||||
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
|
||||
struct _GdkBroadwayCursor
|
||||
{
|
||||
GdkCursor cursor;
|
||||
};
|
||||
|
||||
struct _GdkBroadwayCursorClass
|
||||
{
|
||||
GdkCursorClass cursor_class;
|
||||
};
|
||||
|
||||
/*** GdkBroadwayCursor ***/
|
||||
|
||||
G_DEFINE_TYPE (GdkBroadwayCursor, gdk_broadway_cursor, GDK_TYPE_CURSOR)
|
||||
|
||||
static GdkPixbuf* gdk_broadway_cursor_get_image (GdkCursor *cursor);
|
||||
|
||||
static void
|
||||
gdk_broadway_cursor_finalize (GObject *object)
|
||||
{
|
||||
G_OBJECT_CLASS (gdk_broadway_cursor_parent_class)->finalize (object);
|
||||
}
|
||||
|
||||
static void
|
||||
gdk_broadway_cursor_class_init (GdkBroadwayCursorClass *xcursor_class)
|
||||
{
|
||||
GdkCursorClass *cursor_class = GDK_CURSOR_CLASS (xcursor_class);
|
||||
GObjectClass *object_class = G_OBJECT_CLASS (xcursor_class);
|
||||
|
||||
object_class->finalize = gdk_broadway_cursor_finalize;
|
||||
|
||||
cursor_class->get_image = gdk_broadway_cursor_get_image;
|
||||
}
|
||||
|
||||
static void
|
||||
gdk_broadway_cursor_init (GdkBroadwayCursor *cursor)
|
||||
{
|
||||
}
|
||||
|
||||
/* Called by gdk_display_broadway_finalize to flush any cached cursors
|
||||
* for a dead display.
|
||||
*/
|
||||
void
|
||||
_gdk_broadway_cursor_display_finalize (GdkDisplay *display)
|
||||
{
|
||||
}
|
||||
|
||||
GdkCursor*
|
||||
_gdk_broadway_display_get_cursor_for_type (GdkDisplay *display,
|
||||
GdkCursorType cursor_type)
|
||||
{
|
||||
GdkBroadwayCursor *private;
|
||||
|
||||
g_return_val_if_fail (GDK_IS_DISPLAY (display), NULL);
|
||||
|
||||
private = g_object_new (GDK_TYPE_BROADWAY_CURSOR,
|
||||
"cursor-type", cursor_type,
|
||||
"display", display,
|
||||
NULL);
|
||||
|
||||
return GDK_CURSOR (private);
|
||||
}
|
||||
|
||||
static GdkPixbuf*
|
||||
gdk_broadway_cursor_get_image (GdkCursor *cursor)
|
||||
{
|
||||
g_return_val_if_fail (cursor != NULL, NULL);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void
|
||||
_gdk_broadway_cursor_update_theme (GdkCursor *cursor)
|
||||
{
|
||||
g_return_if_fail (cursor != NULL);
|
||||
}
|
||||
|
||||
GdkCursor *
|
||||
_gdk_broadway_display_get_cursor_for_pixbuf (GdkDisplay *display,
|
||||
GdkPixbuf *pixbuf,
|
||||
gint x,
|
||||
gint y)
|
||||
{
|
||||
GdkBroadwayCursor *private;
|
||||
GdkCursor *cursor;
|
||||
|
||||
private = g_object_new (GDK_TYPE_BROADWAY_CURSOR,
|
||||
"cursor-type", GDK_CURSOR_IS_PIXMAP,
|
||||
"display", display,
|
||||
NULL);
|
||||
cursor = (GdkCursor *) private;
|
||||
|
||||
return cursor;
|
||||
}
|
||||
|
||||
GdkCursor*
|
||||
_gdk_broadway_display_get_cursor_for_name (GdkDisplay *display,
|
||||
const gchar *name)
|
||||
{
|
||||
GdkBroadwayCursor *private;
|
||||
|
||||
private = g_object_new (GDK_TYPE_BROADWAY_CURSOR,
|
||||
"cursor-type", GDK_CURSOR_IS_PIXMAP,
|
||||
"display", display,
|
||||
NULL);
|
||||
|
||||
return GDK_CURSOR (private);
|
||||
}
|
||||
|
||||
gboolean
|
||||
_gdk_broadway_display_supports_cursor_alpha (GdkDisplay *display)
|
||||
{
|
||||
g_return_val_if_fail (GDK_IS_DISPLAY (display), FALSE);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
gboolean
|
||||
_gdk_broadway_display_supports_cursor_color (GdkDisplay *display)
|
||||
{
|
||||
g_return_val_if_fail (GDK_IS_DISPLAY (display), FALSE);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void
|
||||
_gdk_broadway_display_get_default_cursor_size (GdkDisplay *display,
|
||||
guint *width,
|
||||
guint *height)
|
||||
{
|
||||
g_return_if_fail (GDK_IS_DISPLAY (display));
|
||||
|
||||
*width = *height = 20;
|
||||
}
|
||||
|
||||
void
|
||||
_gdk_broadway_display_get_maximal_cursor_size (GdkDisplay *display,
|
||||
guint *width,
|
||||
guint *height)
|
||||
{
|
||||
g_return_if_fail (GDK_IS_DISPLAY (display));
|
||||
|
||||
*width = 128;
|
||||
*height = 128;
|
||||
}
|
||||
@@ -1,365 +0,0 @@
|
||||
/* GDK - The GIMP Drawing Kit
|
||||
* Copyright (C) 2009 Carlos Garnacho <carlosg@gnome.org>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* 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
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "gdkdevice-broadway.h"
|
||||
|
||||
#include "gdkwindow.h"
|
||||
#include "gdkprivate-broadway.h"
|
||||
|
||||
static gboolean gdk_broadway_device_get_history (GdkDevice *device,
|
||||
GdkWindow *window,
|
||||
guint32 start,
|
||||
guint32 stop,
|
||||
GdkTimeCoord ***events,
|
||||
gint *n_events);
|
||||
static void gdk_broadway_device_get_state (GdkDevice *device,
|
||||
GdkWindow *window,
|
||||
gdouble *axes,
|
||||
GdkModifierType *mask);
|
||||
static void gdk_broadway_device_set_window_cursor (GdkDevice *device,
|
||||
GdkWindow *window,
|
||||
GdkCursor *cursor);
|
||||
static void gdk_broadway_device_warp (GdkDevice *device,
|
||||
GdkScreen *screen,
|
||||
gint x,
|
||||
gint y);
|
||||
static gboolean gdk_broadway_device_query_state (GdkDevice *device,
|
||||
GdkWindow *window,
|
||||
GdkWindow **root_window,
|
||||
GdkWindow **child_window,
|
||||
gint *root_x,
|
||||
gint *root_y,
|
||||
gint *win_x,
|
||||
gint *win_y,
|
||||
GdkModifierType *mask);
|
||||
static GdkGrabStatus gdk_broadway_device_grab (GdkDevice *device,
|
||||
GdkWindow *window,
|
||||
gboolean owner_events,
|
||||
GdkEventMask event_mask,
|
||||
GdkWindow *confine_to,
|
||||
GdkCursor *cursor,
|
||||
guint32 time_);
|
||||
static void gdk_broadway_device_ungrab (GdkDevice *device,
|
||||
guint32 time_);
|
||||
static GdkWindow * gdk_broadway_device_window_at_position (GdkDevice *device,
|
||||
gint *win_x,
|
||||
gint *win_y,
|
||||
GdkModifierType *mask,
|
||||
gboolean get_toplevel);
|
||||
static void gdk_broadway_device_select_window_events (GdkDevice *device,
|
||||
GdkWindow *window,
|
||||
GdkEventMask event_mask);
|
||||
|
||||
|
||||
G_DEFINE_TYPE (GdkBroadwayDevice, gdk_broadway_device, GDK_TYPE_DEVICE)
|
||||
|
||||
static void
|
||||
gdk_broadway_device_class_init (GdkBroadwayDeviceClass *klass)
|
||||
{
|
||||
GdkDeviceClass *device_class = GDK_DEVICE_CLASS (klass);
|
||||
|
||||
device_class->get_history = gdk_broadway_device_get_history;
|
||||
device_class->get_state = gdk_broadway_device_get_state;
|
||||
device_class->set_window_cursor = gdk_broadway_device_set_window_cursor;
|
||||
device_class->warp = gdk_broadway_device_warp;
|
||||
device_class->query_state = gdk_broadway_device_query_state;
|
||||
device_class->grab = gdk_broadway_device_grab;
|
||||
device_class->ungrab = gdk_broadway_device_ungrab;
|
||||
device_class->window_at_position = gdk_broadway_device_window_at_position;
|
||||
device_class->select_window_events = gdk_broadway_device_select_window_events;
|
||||
}
|
||||
|
||||
static void
|
||||
gdk_broadway_device_init (GdkBroadwayDevice *device_core)
|
||||
{
|
||||
GdkDevice *device;
|
||||
|
||||
device = GDK_DEVICE (device_core);
|
||||
|
||||
_gdk_device_add_axis (device, GDK_NONE, GDK_AXIS_X, 0, 0, 1);
|
||||
_gdk_device_add_axis (device, GDK_NONE, GDK_AXIS_Y, 0, 0, 1);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gdk_broadway_device_get_history (GdkDevice *device,
|
||||
GdkWindow *window,
|
||||
guint32 start,
|
||||
guint32 stop,
|
||||
GdkTimeCoord ***events,
|
||||
gint *n_events)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static void
|
||||
gdk_broadway_device_get_state (GdkDevice *device,
|
||||
GdkWindow *window,
|
||||
gdouble *axes,
|
||||
GdkModifierType *mask)
|
||||
{
|
||||
gint x_int, y_int;
|
||||
|
||||
gdk_window_get_pointer (window, &x_int, &y_int, mask);
|
||||
|
||||
if (axes)
|
||||
{
|
||||
axes[0] = x_int;
|
||||
axes[1] = y_int;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
gdk_broadway_device_set_window_cursor (GdkDevice *device,
|
||||
GdkWindow *window,
|
||||
GdkCursor *cursor)
|
||||
{
|
||||
}
|
||||
|
||||
static void
|
||||
gdk_broadway_device_warp (GdkDevice *device,
|
||||
GdkScreen *screen,
|
||||
gint x,
|
||||
gint y)
|
||||
{
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gdk_broadway_device_query_state (GdkDevice *device,
|
||||
GdkWindow *window,
|
||||
GdkWindow **root_window,
|
||||
GdkWindow **child_window,
|
||||
gint *root_x,
|
||||
gint *root_y,
|
||||
gint *win_x,
|
||||
gint *win_y,
|
||||
GdkModifierType *mask)
|
||||
{
|
||||
GdkWindow *toplevel;
|
||||
GdkWindowImplBroadway *impl;
|
||||
GdkDisplay *display;
|
||||
GdkBroadwayDisplay *broadway_display;
|
||||
GdkScreen *screen;
|
||||
gint device_root_x, device_root_y;
|
||||
|
||||
if (gdk_device_get_source (device) != GDK_SOURCE_MOUSE)
|
||||
return FALSE;
|
||||
|
||||
display = gdk_device_get_display (device);
|
||||
broadway_display = GDK_BROADWAY_DISPLAY (display);
|
||||
|
||||
impl = GDK_WINDOW_IMPL_BROADWAY (window->impl);
|
||||
toplevel = impl->wrapper;
|
||||
|
||||
if (root_window)
|
||||
{
|
||||
screen = gdk_window_get_screen (window);
|
||||
*root_window = gdk_screen_get_root_window (screen);
|
||||
}
|
||||
|
||||
if (broadway_display->output)
|
||||
{
|
||||
_gdk_broadway_display_consume_all_input (display);
|
||||
if (root_x)
|
||||
*root_x = broadway_display->future_root_x;
|
||||
if (root_y)
|
||||
*root_y = broadway_display->future_root_y;
|
||||
/* TODO: Should really use future_x/y when we get configure events */
|
||||
if (win_x)
|
||||
*win_x = broadway_display->future_root_x - toplevel->x;
|
||||
if (win_y)
|
||||
*win_y = broadway_display->future_root_y - toplevel->y;
|
||||
if (mask)
|
||||
*mask = broadway_display->future_state;
|
||||
if (child_window)
|
||||
{
|
||||
if (gdk_window_get_window_type (toplevel) == GDK_WINDOW_ROOT)
|
||||
*child_window =
|
||||
g_hash_table_lookup (broadway_display->id_ht,
|
||||
GINT_TO_POINTER (broadway_display->future_mouse_in_toplevel));
|
||||
else
|
||||
*child_window = toplevel; /* No native children */
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/* Fallback when unconnected */
|
||||
|
||||
device_root_x = broadway_display->last_x;
|
||||
device_root_y = broadway_display->last_y;
|
||||
|
||||
if (root_x)
|
||||
*root_x = device_root_x;
|
||||
if (root_y)
|
||||
*root_y = device_root_y;
|
||||
if (win_x)
|
||||
*win_x = device_root_y - toplevel->x;
|
||||
if (win_y)
|
||||
*win_y = device_root_y - toplevel->y;
|
||||
if (mask)
|
||||
*mask = broadway_display->last_state;
|
||||
if (child_window)
|
||||
{
|
||||
if (gdk_window_get_window_type (toplevel) == GDK_WINDOW_ROOT)
|
||||
{
|
||||
*child_window = broadway_display->mouse_in_toplevel;
|
||||
if (*child_window == NULL)
|
||||
*child_window = toplevel;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* No native children */
|
||||
*child_window = toplevel;
|
||||
}
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static GdkGrabStatus
|
||||
gdk_broadway_device_grab (GdkDevice *device,
|
||||
GdkWindow *window,
|
||||
gboolean owner_events,
|
||||
GdkEventMask event_mask,
|
||||
GdkWindow *confine_to,
|
||||
GdkCursor *cursor,
|
||||
guint32 time_)
|
||||
{
|
||||
GdkDisplay *display;
|
||||
GdkBroadwayDisplay *broadway_display;
|
||||
|
||||
display = gdk_device_get_display (device);
|
||||
broadway_display = GDK_BROADWAY_DISPLAY (display);
|
||||
|
||||
if (gdk_device_get_source (device) == GDK_SOURCE_KEYBOARD)
|
||||
{
|
||||
/* Device is a keyboard */
|
||||
return GDK_GRAB_SUCCESS;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Device is a pointer */
|
||||
|
||||
if (broadway_display->pointer_grab_window != NULL &&
|
||||
time_ != 0 && broadway_display->pointer_grab_time > time_)
|
||||
return GDK_GRAB_ALREADY_GRABBED;
|
||||
|
||||
if (time_ == 0)
|
||||
time_ = broadway_display->last_seen_time;
|
||||
|
||||
broadway_display->pointer_grab_window = window;
|
||||
broadway_display->pointer_grab_owner_events = owner_events;
|
||||
broadway_display->pointer_grab_time = time_;
|
||||
|
||||
if (broadway_display->output)
|
||||
{
|
||||
broadway_output_grab_pointer (broadway_display->output,
|
||||
GDK_WINDOW_IMPL_BROADWAY (window->impl)->id,
|
||||
owner_events);
|
||||
gdk_display_flush (display);
|
||||
}
|
||||
|
||||
/* TODO: What about toplevel grab events if we're not connected? */
|
||||
|
||||
return GDK_GRAB_SUCCESS;
|
||||
}
|
||||
}
|
||||
|
||||
#define TIME_IS_LATER(time1, time2) \
|
||||
( (( time1 > time2 ) && ( time1 - time2 < ((guint32)-1)/2 )) || \
|
||||
(( time1 < time2 ) && ( time2 - time1 > ((guint32)-1)/2 )) \
|
||||
)
|
||||
|
||||
static void
|
||||
gdk_broadway_device_ungrab (GdkDevice *device,
|
||||
guint32 time_)
|
||||
{
|
||||
GdkDisplay *display;
|
||||
GdkBroadwayDisplay *broadway_display;
|
||||
GdkDeviceGrabInfo *grab;
|
||||
guint32 serial;
|
||||
|
||||
display = gdk_device_get_display (device);
|
||||
broadway_display = GDK_BROADWAY_DISPLAY (display);
|
||||
|
||||
if (gdk_device_get_source (device) == GDK_SOURCE_KEYBOARD)
|
||||
{
|
||||
/* Device is a keyboard */
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Device is a pointer */
|
||||
|
||||
if (broadway_display->pointer_grab_window != NULL &&
|
||||
time_ != 0 && broadway_display->pointer_grab_time > time_)
|
||||
return;
|
||||
|
||||
/* TODO: What about toplevel grab events if we're not connected? */
|
||||
|
||||
if (broadway_display->output)
|
||||
{
|
||||
serial = broadway_output_ungrab_pointer (broadway_display->output);
|
||||
gdk_display_flush (display);
|
||||
}
|
||||
else
|
||||
{
|
||||
serial = broadway_display->saved_serial;
|
||||
}
|
||||
|
||||
grab = _gdk_display_get_last_device_grab (display, device);
|
||||
if (grab &&
|
||||
(time_ == GDK_CURRENT_TIME ||
|
||||
grab->time == GDK_CURRENT_TIME ||
|
||||
!TIME_IS_LATER (grab->time, time_)))
|
||||
grab->serial_end = serial;
|
||||
|
||||
broadway_display->pointer_grab_window = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
static GdkWindow *
|
||||
gdk_broadway_device_window_at_position (GdkDevice *device,
|
||||
gint *win_x,
|
||||
gint *win_y,
|
||||
GdkModifierType *mask,
|
||||
gboolean get_toplevel)
|
||||
{
|
||||
gboolean res;
|
||||
GdkScreen *screen;
|
||||
GdkWindow *root_window;
|
||||
GdkWindow *window;
|
||||
|
||||
screen = gdk_screen_get_default ();
|
||||
root_window = gdk_screen_get_root_window (screen);
|
||||
|
||||
res = gdk_broadway_device_query_state (device, root_window, NULL, &window, NULL, NULL, win_x, win_y, mask);
|
||||
if (res)
|
||||
return window;
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static void
|
||||
gdk_broadway_device_select_window_events (GdkDevice *device,
|
||||
GdkWindow *window,
|
||||
GdkEventMask event_mask)
|
||||
{
|
||||
}
|
||||
@@ -1,52 +0,0 @@
|
||||
/* GDK - The GIMP Drawing Kit
|
||||
* Copyright (C) 2009 Carlos Garnacho <carlosg@gnome.org>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* 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
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef __GDK_DEVICE_BROADWAY_H__
|
||||
#define __GDK_DEVICE_BROADWAY_H__
|
||||
|
||||
#include <gdk/gdkdeviceprivate.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define GDK_TYPE_BROADWAY_DEVICE (gdk_broadway_device_get_type ())
|
||||
#define GDK_BROADWAY_DEVICE(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GDK_TYPE_BROADWAY_DEVICE, GdkBroadwayDevice))
|
||||
#define GDK_BROADWAY_DEVICE_CLASS(c) (G_TYPE_CHECK_CLASS_CAST ((c), GDK_TYPE_BROADWAY_DEVICE, GdkBroadwayDeviceClass))
|
||||
#define GDK_IS_BROADWAY_DEVICE(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDK_TYPE_BROADWAY_DEVICE))
|
||||
#define GDK_IS_BROADWAY_DEVICE_CLASS(c) (G_TYPE_CHECK_CLASS_TYPE ((c), GDK_TYPE_BROADWAY_DEVICE))
|
||||
#define GDK_BROADWAY_DEVICE_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GDK_TYPE_BROADWAY_DEVICE, GdkBroadwayDeviceClass))
|
||||
|
||||
typedef struct _GdkBroadwayDevice GdkBroadwayDevice;
|
||||
typedef struct _GdkBroadwayDeviceClass GdkBroadwayDeviceClass;
|
||||
|
||||
struct _GdkBroadwayDevice
|
||||
{
|
||||
GdkDevice parent_instance;
|
||||
};
|
||||
|
||||
struct _GdkBroadwayDeviceClass
|
||||
{
|
||||
GdkDeviceClass parent_class;
|
||||
};
|
||||
|
||||
G_GNUC_INTERNAL
|
||||
GType gdk_broadway_device_get_type (void) G_GNUC_CONST;
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GDK_DEVICE_BROADWAY_H__ */
|
||||
@@ -1,148 +0,0 @@
|
||||
/* GDK - The GIMP Drawing Kit
|
||||
* Copyright (C) 2009 Carlos Garnacho <carlosg@gnome.org>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* 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
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include "gdkdevicemanager-broadway.h"
|
||||
|
||||
#include "gdktypes.h"
|
||||
#include "gdkdevicemanager.h"
|
||||
#include "gdkdevice-broadway.h"
|
||||
#include "gdkkeysyms.h"
|
||||
#include "gdkprivate-broadway.h"
|
||||
|
||||
#define HAS_FOCUS(toplevel) \
|
||||
((toplevel)->has_focus || (toplevel)->has_pointer_focus)
|
||||
|
||||
static void gdk_broadway_device_manager_finalize (GObject *object);
|
||||
static void gdk_broadway_device_manager_constructed (GObject *object);
|
||||
|
||||
static GList * gdk_broadway_device_manager_list_devices (GdkDeviceManager *device_manager,
|
||||
GdkDeviceType type);
|
||||
static GdkDevice * gdk_broadway_device_manager_get_client_pointer (GdkDeviceManager *device_manager);
|
||||
|
||||
G_DEFINE_TYPE (GdkBroadwayDeviceManager, gdk_broadway_device_manager, GDK_TYPE_DEVICE_MANAGER)
|
||||
|
||||
static void
|
||||
gdk_broadway_device_manager_class_init (GdkBroadwayDeviceManagerClass *klass)
|
||||
{
|
||||
GdkDeviceManagerClass *device_manager_class = GDK_DEVICE_MANAGER_CLASS (klass);
|
||||
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
||||
|
||||
object_class->finalize = gdk_broadway_device_manager_finalize;
|
||||
object_class->constructed = gdk_broadway_device_manager_constructed;
|
||||
device_manager_class->list_devices = gdk_broadway_device_manager_list_devices;
|
||||
device_manager_class->get_client_pointer = gdk_broadway_device_manager_get_client_pointer;
|
||||
}
|
||||
|
||||
static GdkDevice *
|
||||
create_core_pointer (GdkDeviceManager *device_manager,
|
||||
GdkDisplay *display)
|
||||
{
|
||||
return g_object_new (GDK_TYPE_BROADWAY_DEVICE,
|
||||
"name", "Core Pointer",
|
||||
"type", GDK_DEVICE_TYPE_MASTER,
|
||||
"input-source", GDK_SOURCE_MOUSE,
|
||||
"input-mode", GDK_MODE_SCREEN,
|
||||
"has-cursor", TRUE,
|
||||
"display", display,
|
||||
"device-manager", device_manager,
|
||||
NULL);
|
||||
}
|
||||
|
||||
static GdkDevice *
|
||||
create_core_keyboard (GdkDeviceManager *device_manager,
|
||||
GdkDisplay *display)
|
||||
{
|
||||
return g_object_new (GDK_TYPE_BROADWAY_DEVICE,
|
||||
"name", "Core Keyboard",
|
||||
"type", GDK_DEVICE_TYPE_MASTER,
|
||||
"input-source", GDK_SOURCE_KEYBOARD,
|
||||
"input-mode", GDK_MODE_SCREEN,
|
||||
"has-cursor", FALSE,
|
||||
"display", display,
|
||||
"device-manager", device_manager,
|
||||
NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
gdk_broadway_device_manager_init (GdkBroadwayDeviceManager *device_manager)
|
||||
{
|
||||
}
|
||||
|
||||
static void
|
||||
gdk_broadway_device_manager_finalize (GObject *object)
|
||||
{
|
||||
GdkBroadwayDeviceManager *device_manager;
|
||||
|
||||
device_manager = GDK_BROADWAY_DEVICE_MANAGER (object);
|
||||
|
||||
g_object_unref (device_manager->core_pointer);
|
||||
g_object_unref (device_manager->core_keyboard);
|
||||
|
||||
G_OBJECT_CLASS (gdk_broadway_device_manager_parent_class)->finalize (object);
|
||||
}
|
||||
|
||||
static void
|
||||
gdk_broadway_device_manager_constructed (GObject *object)
|
||||
{
|
||||
GdkBroadwayDeviceManager *device_manager;
|
||||
GdkDisplay *display;
|
||||
|
||||
device_manager = GDK_BROADWAY_DEVICE_MANAGER (object);
|
||||
display = gdk_device_manager_get_display (GDK_DEVICE_MANAGER (object));
|
||||
device_manager->core_pointer = create_core_pointer (GDK_DEVICE_MANAGER (device_manager), display);
|
||||
device_manager->core_keyboard = create_core_keyboard (GDK_DEVICE_MANAGER (device_manager), display);
|
||||
|
||||
_gdk_device_set_associated_device (device_manager->core_pointer, device_manager->core_keyboard);
|
||||
_gdk_device_set_associated_device (device_manager->core_keyboard, device_manager->core_pointer);
|
||||
}
|
||||
|
||||
|
||||
static GList *
|
||||
gdk_broadway_device_manager_list_devices (GdkDeviceManager *device_manager,
|
||||
GdkDeviceType type)
|
||||
{
|
||||
GdkBroadwayDeviceManager *broadway_device_manager = (GdkBroadwayDeviceManager *) device_manager;
|
||||
GList *devices = NULL;
|
||||
|
||||
if (type == GDK_DEVICE_TYPE_MASTER)
|
||||
{
|
||||
devices = g_list_prepend (devices, broadway_device_manager->core_keyboard);
|
||||
devices = g_list_prepend (devices, broadway_device_manager->core_pointer);
|
||||
}
|
||||
|
||||
return devices;
|
||||
}
|
||||
|
||||
static GdkDevice *
|
||||
gdk_broadway_device_manager_get_client_pointer (GdkDeviceManager *device_manager)
|
||||
{
|
||||
GdkBroadwayDeviceManager *broadway_device_manager = (GdkBroadwayDeviceManager *) device_manager;
|
||||
|
||||
return broadway_device_manager->core_pointer;
|
||||
}
|
||||
|
||||
GdkDeviceManager *
|
||||
_gdk_broadway_device_manager_new (GdkDisplay *display)
|
||||
{
|
||||
return g_object_new (GDK_TYPE_BROADWAY_DEVICE_MANAGER,
|
||||
"display", display,
|
||||
NULL);
|
||||
}
|
||||
@@ -1,54 +0,0 @@
|
||||
/* GDK - The GIMP Drawing Kit
|
||||
* Copyright (C) 2009 Carlos Garnacho <carlosg@gnome.org>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* 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
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef __GDK_DEVICE_MANAGER_BROADWAY_H__
|
||||
#define __GDK_DEVICE_MANAGER_BROADWAY_H__
|
||||
|
||||
#include <gdk/gdkdevicemanagerprivate.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define GDK_TYPE_BROADWAY_DEVICE_MANAGER (gdk_broadway_device_manager_get_type ())
|
||||
#define GDK_BROADWAY_DEVICE_MANAGER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GDK_TYPE_BROADWAY_DEVICE_MANAGER, GdkBroadwayDeviceManager))
|
||||
#define GDK_BROADWAY_DEVICE_MANAGER_CLASS(c) (G_TYPE_CHECK_CLASS_CAST ((c), GDK_TYPE_BROADWAY_DEVICE_MANAGER, GdkBroadwayDeviceManagerClass))
|
||||
#define GDK_IS_BROADWAY_DEVICE_MANAGER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDK_TYPE_BROADWAY_DEVICE_MANAGER))
|
||||
#define GDK_IS_BROADWAY_DEVICE_MANAGER_CLASS(c) (G_TYPE_CHECK_CLASS_TYPE ((c), GDK_TYPE_BROADWAY_DEVICE_MANAGER))
|
||||
#define GDK_BROADWAY_DEVICE_MANAGER_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GDK_TYPE_BROADWAY_DEVICE_MANAGER, GdkBroadwayDeviceManagerClass))
|
||||
|
||||
typedef struct _GdkBroadwayDeviceManager GdkBroadwayDeviceManager;
|
||||
typedef struct _GdkBroadwayDeviceManagerClass GdkBroadwayDeviceManagerClass;
|
||||
|
||||
struct _GdkBroadwayDeviceManager
|
||||
{
|
||||
GdkDeviceManager parent_object;
|
||||
GdkDevice *core_pointer;
|
||||
GdkDevice *core_keyboard;
|
||||
};
|
||||
|
||||
struct _GdkBroadwayDeviceManagerClass
|
||||
{
|
||||
GdkDeviceManagerClass parent_class;
|
||||
};
|
||||
|
||||
GType gdk_broadway_device_manager_get_type (void) G_GNUC_CONST;
|
||||
GdkDeviceManager *_gdk_broadway_device_manager_new (GdkDisplay *display);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GDK_DEVICE_MANAGER_BROADWAY_H__ */
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,180 +0,0 @@
|
||||
/*
|
||||
* gdkdisplay-broadway.h
|
||||
*
|
||||
* Copyright 2001 Sun Microsystems Inc.
|
||||
*
|
||||
* Erwann Chenede <erwann.chenede@sun.com>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Library General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* 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
|
||||
* Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef __GDK_BROADWAY_DISPLAY__
|
||||
#define __GDK_BROADWAY_DISPLAY__
|
||||
|
||||
#include "gdkdisplayprivate.h"
|
||||
#include "gdkkeys.h"
|
||||
#include "gdkwindow.h"
|
||||
#include "gdkinternals.h"
|
||||
#include "gdkmain.h"
|
||||
#include "broadway.h"
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
typedef struct _GdkBroadwayDisplay GdkBroadwayDisplay;
|
||||
typedef struct _GdkBroadwayDisplayClass GdkBroadwayDisplayClass;
|
||||
|
||||
typedef struct BroadwayInput BroadwayInput;
|
||||
|
||||
#define GDK_TYPE_BROADWAY_DISPLAY (gdk_broadway_display_get_type())
|
||||
#define GDK_BROADWAY_DISPLAY(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_BROADWAY_DISPLAY, GdkBroadwayDisplay))
|
||||
#define GDK_BROADWAY_DISPLAY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_BROADWAY_DISPLAY, GdkBroadwayDisplayClass))
|
||||
#define GDK_IS_BROADWAY_DISPLAY(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_BROADWAY_DISPLAY))
|
||||
#define GDK_IS_BROADWAY_DISPLAY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_BROADWAY_DISPLAY))
|
||||
#define GDK_BROADWAY_DISPLAY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_BROADWAY_DISPLAY, GdkBroadwayDisplayClass))
|
||||
|
||||
typedef struct {
|
||||
char type;
|
||||
guint32 serial;
|
||||
guint64 time;
|
||||
} BroadwayInputBaseMsg;
|
||||
|
||||
typedef struct {
|
||||
BroadwayInputBaseMsg base;
|
||||
guint32 mouse_window_id; /* The real window, not taking grabs into account */
|
||||
guint32 event_window_id;
|
||||
int root_x;
|
||||
int root_y;
|
||||
int win_x;
|
||||
int win_y;
|
||||
guint32 state;
|
||||
} BroadwayInputPointerMsg;
|
||||
|
||||
typedef struct {
|
||||
BroadwayInputPointerMsg pointer;
|
||||
guint32 mode;
|
||||
} BroadwayInputCrossingMsg;
|
||||
|
||||
typedef struct {
|
||||
BroadwayInputPointerMsg pointer;
|
||||
guint32 button;
|
||||
} BroadwayInputButtonMsg;
|
||||
|
||||
typedef struct {
|
||||
BroadwayInputPointerMsg pointer;
|
||||
int dir;
|
||||
} BroadwayInputScrollMsg;
|
||||
|
||||
typedef struct {
|
||||
BroadwayInputBaseMsg base;
|
||||
int key;
|
||||
} BroadwayInputKeyMsg;
|
||||
|
||||
typedef struct {
|
||||
BroadwayInputBaseMsg base;
|
||||
int res;
|
||||
} BroadwayInputGrabReply;
|
||||
|
||||
typedef struct {
|
||||
BroadwayInputBaseMsg base;
|
||||
int id;
|
||||
int x;
|
||||
int y;
|
||||
int width;
|
||||
int height;
|
||||
} BroadwayInputConfigureNotify;
|
||||
|
||||
typedef struct {
|
||||
BroadwayInputBaseMsg base;
|
||||
int width;
|
||||
int height;
|
||||
} BroadwayInputScreenResizeNotify;
|
||||
|
||||
typedef struct {
|
||||
BroadwayInputBaseMsg base;
|
||||
int id;
|
||||
} BroadwayInputDeleteNotify;
|
||||
|
||||
typedef union {
|
||||
BroadwayInputBaseMsg base;
|
||||
BroadwayInputPointerMsg pointer;
|
||||
BroadwayInputCrossingMsg crossing;
|
||||
BroadwayInputButtonMsg button;
|
||||
BroadwayInputScrollMsg scroll;
|
||||
BroadwayInputKeyMsg key;
|
||||
BroadwayInputGrabReply grab_reply;
|
||||
BroadwayInputConfigureNotify configure_notify;
|
||||
BroadwayInputDeleteNotify delete_notify;
|
||||
BroadwayInputScreenResizeNotify screen_resize_notify;
|
||||
} BroadwayInputMsg;
|
||||
|
||||
struct _GdkBroadwayDisplay
|
||||
{
|
||||
GdkDisplay parent_instance;
|
||||
GdkScreen *default_screen;
|
||||
GdkScreen **screens;
|
||||
|
||||
GHashTable *id_ht;
|
||||
GList *toplevels;
|
||||
|
||||
GSource *event_source;
|
||||
GdkWindow *mouse_in_toplevel;
|
||||
int last_x, last_y; /* in root coords */
|
||||
guint32 last_state;
|
||||
GdkWindow *real_mouse_in_toplevel; /* Not affected by grabs */
|
||||
|
||||
/* Keyboard related information */
|
||||
GdkKeymap *keymap;
|
||||
|
||||
/* drag and drop information */
|
||||
GdkDragContext *current_dest_drag;
|
||||
|
||||
/* Input device */
|
||||
/* input GdkDevice list */
|
||||
GList *input_devices;
|
||||
|
||||
/* The offscreen window that has the pointer in it (if any) */
|
||||
GdkWindow *active_offscreen_window;
|
||||
|
||||
GSocketService *service;
|
||||
BroadwayOutput *output;
|
||||
guint32 saved_serial;
|
||||
guint64 last_seen_time;
|
||||
BroadwayInput *input;
|
||||
GList *input_messages;
|
||||
guint process_input_idle;
|
||||
|
||||
/* Explicit pointer grabs: */
|
||||
GdkWindow *pointer_grab_window;
|
||||
guint32 pointer_grab_time;
|
||||
gboolean pointer_grab_owner_events;
|
||||
|
||||
/* Future data, from the currently queued events */
|
||||
int future_root_x;
|
||||
int future_root_y;
|
||||
GdkModifierType future_state;
|
||||
int future_mouse_in_toplevel;
|
||||
};
|
||||
|
||||
struct _GdkBroadwayDisplayClass
|
||||
{
|
||||
GdkDisplayClass parent_class;
|
||||
};
|
||||
|
||||
GType gdk_broadway_display_get_type (void);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GDK_BROADWAY_DISPLAY__ */
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user