Compare commits

..

1714 Commits

Author SHA1 Message Date
Tristan Van Berkom 0b0d41dc58 Fixed statement in gtkwindow.c when toplevelness changes.
Fixed a typo when checking if the heirarchy toplevel is a toplevel
before firing the hierarchy-changed signal.
2011-01-06 14:27:03 +09:00
Tristan Van Berkom 4d795437f1 Dont show the GtkWindow when removing it from a parent and becomming a toplevel
Showing the window causes it to try to grab focus, this causes problems
when embedded toplevels run through dispose cycles.
2011-01-04 00:55:04 +09:00
Tristan Van Berkom e40b77b569 Fixed conflict while rebasing master. 2010-12-29 18:22:39 +09:00
Tristan Van Berkom f0af03f951 Changes to testtoplevelembed
- Made notebook tabs smaller
  - No need to hide/show toplevels after removing from a parent,
    if it's visible it will be automatically shown after removing
    outside of it's previous parent.
2010-12-29 18:22:39 +09:00
Tristan Van Berkom 54f81cde17 Fixed GtkFileChooserDefault to handle cases of being in an embedded dialog.
This involves checking the toplevelness of new toplevels before connecting
but not the *old* ones for disconnecting signals. Also take care of handling
a row_reference that becomes invalid over the course of reparenting the
filechooser into another parent.
2010-12-29 18:22:39 +09:00
Tristan Van Berkom 460be460ec Fixed GtkWindow/GtkWidget to properly emit hierarchy changed for embedded toplevels
Now GtkWindow takes some measures when setting toplevelness:

  - When a window becomes toplevel after being embedded it saves
    the visibility state and reshow's itself so that the window
    re-realizes and presents itself again automatically

  - When emitting hierarchy-changed, synthetically mark the toplevel
    as not anchored, this allows the hierarchy changed propagation to
    recurse properly.

GtkWidget also takes care to unset the parent window *after* unparenting
the widget and after emitting the heirarhcy changed that leaves a NULL
toplevel.

That means there are now 2 cycles of "hierarchy-changed" when removing
an embedded toplevel from a parent, first one that makes the new toplevel
a NULL one (since the toplevel flag is not yet restored), the second cycle
makes the removed window toplevel again when setting the parent window
to NULL.
2010-12-29 18:22:39 +09:00
Tristan Van Berkom 96b954d242 Fixed focus handling on embedded windows.
Now GtkWindow chains up in focus vfuncs when non-toplevel, this
fixes focus in testtoplevelembed.
2010-12-29 18:22:39 +09:00
Tristan Van Berkom acb71a2fa7 Added buttons to notebook tabs in testtoplevelembed
Now you can remove and reembed the toplevels (deleting the
toplevels put them back in the notebook).
2010-12-29 18:22:39 +09:00
Tristan Van Berkom 16f1253b77 Moved location of unsetting parent window inside gtk_widget_unparent().
Make sure to do this after the widget is unrealized.
2010-12-29 18:22:39 +09:00
Tristan Van Berkom 3630b63b9c Fixed issues with "hierarchy-changed" signal.
GtkFileChooserDefault watches the toplevel and montitors "set-focus"
signal on it... however the connection needs to be remade when the
GtkFileChooserDialog is in an embedded toplevel.

Measure's taken: GtkWindow propagates hierarchy changes when
_gtk_window_set_is_toplevel() is called, gtk_widget_unparent()
unsets the widget's parent window earlier in the function so that
the possible hierarchy change is still able to properly access the hierarchy.

GtkFileChooserDefault checks if the "new" toplevel is indeed
gtk_widget_is_toplevel() but not the old one, GtkRange has been
updated to use gtk_widget_is_toplevel() inside it's hierarhcy_changed
vfunc, other classes already do this properly.
2010-12-29 18:22:39 +09:00
Tristan Van Berkom 0435071747 Added tests/testtoplevelembed. 2010-12-29 18:22:39 +09:00
Tristan Van Berkom 70796f8475 Slightly less special casing in GtkWindow for gtk_widget_is_toplevel()
Also take care of setting the resize-mode at realize time depending
on toplevelness.
2010-12-29 18:22:39 +09:00
Tristan Van Berkom 1ce7cc6202 Added docs to gtk_widget_set_parent_window.
Also stop setting the resize mode of the window.
2010-12-29 18:22:39 +09:00
Tristan Van Berkom 6a7f0894df Allow GtkWindow to be parented if gtk_widget_set_parent_window() is called on one
This patch makes gtk_widget_set_parent_window() undo the toplevelness
of a GtkWindow, GtkWindow then realizes itself as a normal child widget
and behaves like a normal GtkBin by checking gtk_widget_is_toplevel() in
several places (show/hide/map/unmap/draw/size_allocate/check_resize/configure_event).
2010-12-29 18:22:38 +09:00
Tristan Van Berkom c234313a25 Make GtkCheckButton's label left aligned by default.
Since we no longer limit the label's allocation to the minimum, now
we take a saner approach to left aligning the label.
2010-12-29 18:20:32 +09:00
Tristan Van Berkom a6a97ad442 Fixed unused variable in GtkCheckButton. 2010-12-29 16:30:38 +09:00
Tristan Van Berkom 21aef5b77f Fixed generic height-for-width implementation of GtkBin to consider request adjustments
Since "->adjust_size_request()" was added, it became important for GtkBin's
generic height-for-width implementation to further check the requests
using this vfunc.
2010-12-29 16:26:05 +09:00
Tristan Van Berkom f519da41cf Make GtkCheckButton allocate all remaining space to it's child instead
of limiting it to it's minimum size.

This fixes height-for-width labels inside a GtkCheckButton, for some
reason GtkCheckButton was limiting the child allocation to the child's
minimum request, probably for the sake of virtual left-alignment of
the child label to be beside the checkmark. This should be done by
other means if nescesarry.
2010-12-29 16:19:48 +09:00
Tristan Van Berkom 2fe4e6a815 Added proper height-for-width implementation to GtkAlignment.
For "padding" cases, it would be ok to fallback on GtkBin class
implementation of height-for-width. However in cases where the
user set's an xscale/yscale the GtkAlignment needs to take care
of properly adjusting the for_size when querying it's child.
2010-12-29 16:18:04 +09:00
Tristan Van Berkom 7fab89d93f Removed checks in gtksizerequest.c
Checks were in place to ensure that widgets never request taller
or wider than screen size. This was there to test a theory about
scrolled window children functioning correctly with dynamic content
however it breaks GtkViewport children which can generally return a
value taller than screen height intentionally, GtkViewport uses this
value to update the adjustments.
2010-12-29 16:12:11 +09:00
Carlos Garnacho ac00e77e54 Make GtkToolbar use GtkStyleContext 2010-12-28 19:25:49 +01:00
Carlos Garnacho a3a9c61a5a Make GtkHandleBox use GtkStyleContext 2010-12-28 19:25:49 +01:00
Carlos Garnacho 029fb53ac2 Make GtkSwitch use GtkStyleContext 2010-12-28 19:25:48 +01:00
Carlos Garnacho 18b333bfe7 Make GtkFileChooserEntry make GtkStyleContext 2010-12-28 19:25:48 +01:00
Carlos Garnacho b2e8992291 Make GtkProgressBar use GtkStyleContext 2010-12-28 19:25:48 +01:00
Carlos Garnacho e3457a83cf Make GtkScrolledWindow use GtkStyleContext 2010-12-28 19:25:48 +01:00
Carlos Garnacho 53a4feadf0 Make GtkEventBox use GtkStyleContext. 2010-12-28 19:25:47 +01:00
Carlos Garnacho 06462b98a0 Make GtkFrame use GtkStyleContext. 2010-12-28 19:18:57 +01:00
Carlos Garnacho 7a623988e5 Fix leak in GtkStyle. 2010-12-28 19:06:46 +01:00
Tristan Van Berkom 05254766c7 Avoid rendering frames when shadow type argument is GTK_SHADOW_NONE in
gtk_paint_* functions.
2010-12-28 23:15:39 +09:00
Ignacio Casal Quinteiro 9d64a5833d Fix docs. 2010-12-28 11:18:01 +01:00
Matthias Clasen 7032996c76 Remove bashisms from configure.ac
Pointed out by Koop Mast in
https://bugzilla.gnome.org/show_bug.cgi?id=637974
2010-12-27 19:24:05 -05:00
Benjamin Otte 42fbccd3d2 API: gdk: Remove gdk_device_set_source()
The source of a device is not changeable.
2010-12-27 20:08:50 +01:00
Benjamin Otte e4cc259111 testgtk: Don't use deprecated APIs 2010-12-27 19:43:24 +01:00
Benjamin Otte 7ab7422821 testgtk: Use the relevant device to query the widget to snapshot
Also gets rid of deprecated functions.
2010-12-27 19:27:16 +01:00
Benjamin Otte 9746991548 API: gdk: Make gdk_display_get_window_at_device_position() a device API
It's now called gdk_device_get_window_at_position(). It doesn't make
sense to keep device-specific API part of the display.
2010-12-27 18:46:41 +01:00
Benjamin Otte 0c285341a9 API: gdk: gdk_display_get_device_state() => gdk_device_get_position()
The API was not display-specific, but belonged to the device. Also, we
didn't find a user of the modifier mask, so we dropped it.
2010-12-27 18:46:41 +01:00
Alejandro Piñeiro 586283ecbb [gail] Clean the code to check the redundan object on the show watcher
The watcher doesn't add a window if is a redundant object. This
patch fixes two things:

 * The check was made twice.
 * It uses a check with the string "redundant object", when the
   defined role ATK_ROLE_REDUNDANT_OBJECT is available
2010-12-27 16:23:55 +01:00
Alejandro Piñeiro e1029b907c [gail] Proper connection to a toplevel window destroy signal
Only connect to the destroy of a toplevel window if it was
really added to the toplevel list of windows.

The destroy callback was added to remove the window from
the toplevel list. The callback doesn't cause a error,
but would iterate on the toplevel list without success.
2010-12-27 13:21:09 +01:00
Matthias Clasen 48b47971b5 Fix some issues with initial setup of GdkX11DisplayManager
We need to defer setting the default display until the
GdkDisplay is fully initialized. Also, short-circuit some
encoding conversions when creating windows, to avoid an
implicit dependency on the display being in the list of
displays yet.
2010-12-27 01:02:52 -05:00
Matthias Clasen 59ea137fa0 GtkTreeView: Don't use deprecated grab api 2010-12-26 23:40:59 -05:00
Matthias Clasen 51f7e42650 Remove pointless sealing from GtkTextMark 2010-12-26 23:17:10 -05:00
Matthias Clasen 0c4a0dae6d Remove pointless sealing from GtkTextChild 2010-12-26 22:58:57 -05:00
Matthias Clasen 9dee9a84d0 Removed sealed members from GtkMenuItem 2010-12-26 22:58:57 -05:00
A S Alam 05eb55dcfc update Punjabi Properities file 2010-12-27 07:30:19 +05:30
Benjamin Otte 45d98d108e tooltip: Don't use deprecated APIs 2010-12-27 01:05:40 +01:00
Benjamin Otte a5f493bfad notebook: Use nondeprecated API to query coordinates 2010-12-27 00:50:30 +01:00
Benjamin Otte 9bab53f1bd hsv: Fix gcc warnings 2010-12-27 00:45:56 +01:00
Matthias Clasen 5bc0cf1a19 Fix some more typos 2010-12-25 00:29:23 -05:00
Matthias Clasen 8f816d7c3b Fix a few typos 2010-12-25 00:26:22 -05:00
Matthias Clasen 27ce9421d0 Fix up GDK docs 2010-12-25 00:02:39 -05:00
Matthias Clasen 436e75c34c Add deprecation guards for deprecated grab APIs 2010-12-24 20:01:24 -05:00
Matthias Clasen bde1d072e5 Don't use gdk_{pointer,keyboard}_grab
Instead use gdk_device_grab.
2010-12-24 20:00:19 -05:00
Matthias Clasen 1d41b98cf8 Add deprecation guards for deprecated GdkAppLaunchContext API
Also adapt the docs to not use deprecated API.
2010-12-24 17:37:00 -05:00
Matthias Clasen 1e13b42b9b Avoid some gtk-doc warnings 2010-12-24 17:36:19 -05:00
Matthias Clasen 29eb3fba5f Fix gdk_x11_display_text_property_to_text_list
This was an incomplete attempt to get rid of the custom free function.
Lets just keep it for now. Bug 637849, patch by Dan Winship.

Also add a test case for this function.
2010-12-24 16:27:31 -05:00
Matthias Clasen 92f163d40a Consistently hide class structs
And, since we've decided to keep the structs private, there is
no point in having the standard GObject clas macros anymore either.
2010-12-24 15:54:12 -05:00
John Ralls 806b6dfa08 Rename GdkQuartzWindow.h and .c to GdkQuartzNSWindow.h and .c
Normally HFS+ (the MacOSX file system) isn't case-sensitive, so having both
GtkQuartzWindow.h and gtkquartzwindow.h causes the latter to overwrite the
former during git pull, breaking the build.
2010-12-24 11:29:08 -08:00
Carlos Garnacho 0f0512aee3 Use gtk_style_context_get_font() in GtkSpinButton 2010-12-24 20:20:40 +01:00
Carlos Garnacho 92102c3bf4 Make GtkSeparator use GtkStyleContext 2010-12-24 19:38:14 +01:00
Carlos Garnacho 7c35994bda Make GtkPaned use GtkStyleContext 2010-12-24 19:38:06 +01:00
Carlos Garnacho 760d6d1e78 Do not set "entry" class in spinbutton buttons.
Also, fix an unpaired gtk_style_context_save() call.
2010-12-24 19:37:56 +01:00
Carlos Garnacho 2bd221d215 Bug 637910 - GtkSpinner - does not animate
Fix widget-to-window coordinates translation in the
style context animation code.
2010-12-24 19:37:49 +01:00
Carlos Garnacho 7f099a9a23 Make GtkArrow use GtkStyleContext 2010-12-24 19:37:41 +01:00
Carlos Garnacho e5e95934ba Fix color name (as of rgb.txt) parsing in symbolic colors
The end of the substring wasn't being detected properly.
2010-12-24 19:37:30 +01:00
Carlos Garnacho 1cecb10584 Make GtkAccelLabel use GtkStyleContext. 2010-12-24 19:37:20 +01:00
Javier Jardón 5e74427dee gailmenushell.c: Fix typo 2010-12-24 18:42:24 +01:00
Javier Jardón 03cddad42b build: Use autoreconf 2010-12-24 18:40:54 +01:00
Kristian Rietveld c659542333 Check for NULL pointer 2010-12-24 14:45:47 +01:00
Javier Jardón 30cdab13fe docs: Add docs about how to get a GtkDevice
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=637895
2010-12-24 14:39:55 +01:00
Matthias Clasen 55ca24d1d4 Drop GtkThemeEngine
It is not used anymore.
2010-12-23 22:16:50 -05:00
Matthias Clasen ca493cd20d Fix a few warnings 2010-12-23 22:11:50 -05:00
Matthias Clasen 7ff572dfd3 Add some missing includes 2010-12-23 22:11:28 -05:00
Matthias Clasen 1bcf8a0027 Remove sealed members from GtkSettings 2010-12-23 21:56:50 -05:00
Stef Walter 433a22cd11 Remove private header from gtkwindow.h
https://bugzilla.gnome.org/show_bug.cgi?id=637907
2010-12-23 19:23:48 -06:00
Matthias Clasen 7650482e46 Add sufficient API to make gail work
The accessible implementations should really be folded into
gtk proper. Until that happens, we need some more guts exposed...
2010-12-23 20:11:38 -05:00
Matthias Clasen 2ed81aa57c Remove sealed members from GtkMenuShell 2010-12-23 18:21:53 -05:00
Matthias Clasen c5b020e628 Remove sealed members from GtkMenu 2010-12-23 15:51:20 -05:00
Jorge Gonzalez 65652d818d Updated Spanish translation 2010-12-23 20:47:02 +01:00
Gheyret T.Kenji 9b6a0a0e2b Added UG translation 2010-12-23 20:17:15 +01:00
Gheyret T.Kenji 80b534561b Added UG translation 2010-12-23 20:11:32 +01:00
Gheyret T.Kenji 4064a100f0 Added UG translation 2010-12-23 19:18:55 +01:00
Matthias Clasen 96d1c2c46e Reserve space for a pointer in GtkDrawingArea
It was pointed out that this will let us add a private pointer
without abi break in the future, should we ever need one.
2010-12-23 13:01:21 -05:00
Matthias Clasen 3e08a23237 Drop long-obsolete linux framebuffer APIs
The functions to set frames on windows stopped being interesting
when the linux framebuffer port was dropped, many years ago.

Similar functionality may come back with client-side decorations
in the future.
2010-12-23 12:59:49 -05:00
Kristian Rietveld 9ab2786991 GtkCellRendererText: use PANGO_PIXELS_CEIL for text_width
Usually pango_layout_get_pixel_extents() is used, which uses
PANGO_PIXELS_CEIL on the rectangle's width.  This commit makes the new
function gtk_cell_renderer_text_get_preferred_width() consistent with
this.

This fixes rounding errors on Mac OS X, where we were seeing tree views
with a double height for a single line of text, while the usual single
row height would have been sufficient.
2010-12-23 18:41:23 +01:00
Kristian Rietveld 31536736ea Hide GtkTreeViewColumn buttons when header_window is not visible 2010-12-23 18:19:56 +01:00
Kristian Rietveld 26173c7864 Delimit the other_entries array 2010-12-23 18:19:55 +01:00
Matthias Clasen 3a6800a898 Some small doc corrections 2010-12-23 11:18:50 -05:00
Matthias Clasen 1f9ce46906 Update keymap docs to match current behaviour
An overlooked API change in the gdk-backend work: many of the
keymap functions used to accept NULL to mean 'default keymap'.
They no longer do, so update the docs to match the new behaviour.
2010-12-23 10:06:08 -05:00
Kristian Rietveld 374f8e22aa quartz: internalize _gdk_quartz_window_set_needs_display_in_region 2010-12-23 14:17:42 +01:00
Kristian Rietveld f0b8dcb4f3 quartz: move gdkgeometry-quartz into gdkwindow-quartz.c 2010-12-23 14:17:42 +01:00
Kristian Rietveld deffbd9885 quartz: reorder gdkprivate-quartz.h and related clean up 2010-12-23 14:17:42 +01:00
Kristian Rietveld ac6f50120b quartz: _gdk_quartz_visual -> gdk_quartz_visual 2010-12-23 14:17:42 +01:00
Kristian Rietveld 1e2907fa02 quartz: _gdk_quartz_screen -> gdk_quartz_screen 2010-12-23 14:17:42 +01:00
Kristian Rietveld 0736544174 quartz: _gdk_quartz_keymap -> gdk_quartz_keymap 2010-12-23 14:17:42 +01:00
Kristian Rietveld 0d8eeb924e quartz: _gdk_quartz_display -> gdk_quartz_display 2010-12-23 14:17:42 +01:00
Kristian Rietveld 07110a6170 quartz: we must provide a window on drag begin now 2010-12-23 14:17:42 +01:00
Kristian Rietveld 0840b25165 quartz: fix some more typos 2010-12-23 14:17:42 +01:00
Kristian Rietveld 1e814709d7 quartz: fix typo 2010-12-23 14:17:41 +01:00
Kristian Rietveld fb8717f722 quartz: move utils to gdkutils-quartz.c 2010-12-23 14:17:41 +01:00
Kristian Rietveld f15934bd66 quartz: remove gdkmain-quartz.c 2010-12-23 14:17:41 +01:00
Kristian Rietveld caa9794af8 quartz: Clean up header files, use same arrangement as X11 backend 2010-12-23 14:17:41 +01:00
Erdal Ronahi dd5a74dcbc Updated Kurdish translations 2010-12-23 14:14:10 +01:00
Matthias Clasen af9d59aaca Allow inspection of construct-only object properties
The 'Properties' button here is not really modifying the property
in any way, so it doesn't make sense to disable it just because
the object can only be set at construction.

This lets us poke at e.g. the cell area of an icon view.
2010-12-23 00:43:50 -05:00
Brian Cameron f90365d46b Fix spacing. 2010-12-22 21:58:40 -06:00
Brian Cameron e88a44f4c9 Fix bug #637721, fix function prototype. 2010-12-22 21:57:12 -06:00
Matthias Clasen d77dcfb9b2 Better fix for keynav dnd
With proper rounding, we can go back to a 'small step' of 1.
2010-12-22 22:33:40 -05:00
Matthias Clasen 7e0a30b752 Abort a drag when a keynav drop has not destination
This was claimed to cause problems for Chromium, see bug 599130.

Also work around apparent rounding errors in XIWarpDevice by
setting the 'small step' for keynav dnd to 2 instead of 1 - I notice
that a warp seems to sometimes warp a little less than I tell it to,
and if I tell it to only move by 1 pixel then moving less means
that you are stuck.
2010-12-22 21:47:14 -05:00
Matthias Clasen 9baf24f87e Add a default handler for drag_failed
And use it in notebook dnd.
2010-12-22 18:46:29 -05:00
Matthias Clasen e6693ab840 Avoid invariant checking spew in gnome-shell
For normal toplevels, visible is tightly bound to mapped, but for
something like a toplevel that exists within a Clutter stage we
may want to make mapping dependenton external factors, so we shouldn't
actually checked that !mapped toplevels are !visible.

Pointed out by Owen Taylor,

https://bugzilla.gnome.org/show_bug.cgi?id=637834
2010-12-22 16:54:52 -05:00
Kristian Rietveld 197590258f quartz: Make keyboard input work again 2010-12-22 22:33:05 +01:00
Kristian Rietveld 48b6b939d3 Implement process_updates_recurse for GdkOffscreenWindow
Makes offscreen windows work again.
2010-12-22 20:41:39 +01:00
Matthias Clasen 03f7e26d26 Don't return PropertyNotify.state as modifier state
It isn't, it really is a GdkPropertyState.

Reported by Tim Janik in bug 633795.
2010-12-22 14:33:09 -05:00
Matthias Clasen 3adb7c7a49 Avoid a crash
pointed out in bug 533745
2010-12-22 14:08:03 -05:00
Javier Jardón 187762d8b3 docs: fix a typo 2010-12-22 17:05:50 +00:00
Kristian Rietveld 083c556e00 quartz: rename GdkDeviceManagerCore -> GdkQuartzDeviceManagerCore 2010-12-22 17:47:05 +01:00
Kristian Rietveld 59a3d9ae46 quartz: Rename GdkDeviceCore -> GdkQuartzDeviceCore 2010-12-22 17:47:05 +01:00
Kristian Rietveld e2e4391992 quartz: commit forgotten file 2010-12-22 17:47:05 +01:00
Kristian Rietveld 2e7f14c90f quartz: GdkDeviceCore: check for NULL pointer 2010-12-22 17:47:04 +01:00
Kristian Rietveld 32731fcb07 quartz: register before/after process all updates 2010-12-22 17:47:04 +01:00
Kristian Rietveld ab74358b82 quartz: set all methods on window class, not root window class 2010-12-22 17:47:04 +01:00
Kristian Rietveld 552e7be7e5 quartz: set window_type in display_class 2010-12-22 17:47:04 +01:00
Kristian Rietveld b0ffe16f90 quartz: introduce GdkQuartzWindow (as a subclass of GdkWindow) 2010-12-22 17:47:04 +01:00
Kristian Rietveld 3bc60a8149 quartz: rename GdkQuartzWindow to GdkQuartzNSWindow 2010-12-22 17:47:04 +01:00
Kristian Rietveld c6fad1d2cb quartz: fix typo 2010-12-22 17:47:04 +01:00
Kristian Rietveld c87e878308 quartz: add new files to Makefile.am 2010-12-22 17:47:04 +01:00
Kristian Rietveld e5695de12b GdkDisplayManager: register Quartz backend when applicable 2010-12-22 17:47:04 +01:00
Kristian Rietveld 5226ae3ecc quartz: create gdkdisplaymanager-quartz.h 2010-12-22 17:47:04 +01:00
Kristian Rietveld f2883fe8eb quartz: gdkselection-quartz.c: fix typos 2010-12-22 17:47:04 +01:00
Kristian Rietveld b638515ae0 quartz: re-introduce _gdk_quartz_display_list_devices 2010-12-22 17:47:03 +01:00
Kristian Rietveld 4c663f0474 gdkwindow-quartz: fix typo 2010-12-22 17:47:03 +01:00
Kristian Rietveld 4a6c50c298 gtkclipboard-quartz: use accessors and add missing include 2010-12-22 17:47:03 +01:00
Kristian Rietveld 44d9fb2d71 gtkdnd-quartz: use accessors and add missing include 2010-12-22 17:47:03 +01:00
Kristian Rietveld 7979be1430 quartz: gtkquartz.c: add missing include 2010-12-22 17:47:03 +01:00
Kristian Rietveld 9b4f5a424c gdk: Fix toplevel makefile to build non-x11 backends again 2010-12-22 17:47:03 +01:00
Kristian Rietveld 6b96c56976 quartz: remove duplicate definition of gdk_flush 2010-12-22 17:47:03 +01:00
Kristian Rietveld 8b4d583cd8 quartz: gdkkeys-quartz.c: remove duplicate function 2010-12-22 17:47:03 +01:00
Kristian Rietveld 3d02a14f4f quartz: remove duplicate functions from gdkmain-quartz.c 2010-12-22 17:47:03 +01:00
Kristian Rietveld fbd9fd6a38 quartz: make gdkwindow-quartz.c build again 2010-12-22 17:47:03 +01:00
Kristian Rietveld c14078f388 quartz: adapt gdkdisplay-quartz.c to new function names 2010-12-22 17:47:03 +01:00
Kristian Rietveld 5f782ed9e7 quartz: add prototype for _gdk_quartz_screen_new() 2010-12-22 17:47:03 +01:00
Kristian Rietveld 1b344ad8e4 quartz: convert GdkVisual 2010-12-22 17:47:02 +01:00
Kristian Rietveld d024153c96 quartz: Fix screen implementation, rename to GdkQuartzScreen 2010-12-22 17:47:02 +01:00
Kristian Rietveld cde6dade8f quartz: Port gdkkeys-quartz.c to new API 2010-12-22 17:47:02 +01:00
Kristian Rietveld 6fe3100f14 quartz: Remove gdkinput code 2010-12-22 17:47:02 +01:00
Kristian Rietveld e4a0101542 quartz: gdkeventloop-quartz.c: fix 2010-12-22 17:47:02 +01:00
Kristian Rietveld d0976d9f53 quartz: Fix gdkevents-quartz.c 2010-12-22 17:47:02 +01:00
Kristian Rietveld b2844cb48b quartz: Make GdkQuartzDisplay compile 2010-12-22 17:47:02 +01:00
Kristian Rietveld 709b4d4346 quartz: Fix display manager, move over code from gdkmain-quartz.c 2010-12-22 17:47:02 +01:00
Kristian Rietveld 988b8bf96a quartz: gdkcursor-quartz.h: fix cut-n-paste error 2010-12-22 17:47:02 +01:00
Kristian Rietveld 98b8bf035f quartz: gdkdevice-core: fix up 2010-12-22 17:47:02 +01:00
Kristian Rietveld da481666cd quartz: gdkdevice-core.c: use GdkQuartzCursor 2010-12-22 17:47:01 +01:00
Kristian Rietveld 62273fc08a quartz: add forgotten file (gdkdnd-quartz.h) 2010-12-22 17:47:01 +01:00
Kristian Rietveld f4c0c47a1a quartz: move bits into gdkcursor-quartz.h (private header for now) 2010-12-22 17:47:01 +01:00
Kristian Rietveld dff3973198 quartz: remove GdkCursorPrivate typedef 2010-12-22 17:47:01 +01:00
Kristian Rietveld 013cbea25f quartz: Remove API for extension checks 2010-12-22 17:47:01 +01:00
Kristian Rietveld 881ea6e06c quartz: convert GdkQuartzWindow to new drag context API 2010-12-22 17:47:01 +01:00
Kristian Rietveld 71404825c3 quartz: fix up GdkDragContext conversion 2010-12-22 17:47:01 +01:00
Kristian Rietveld 8cb301762a Fix typo 2010-12-22 17:47:01 +01:00
Kristian Rietveld 3ace122563 quartz: turn quartz GdkCursor into GObject 2010-12-22 17:47:01 +01:00
Matthias Clasen bd1ff477ca Deal with property encoding functions for quartz 2010-12-22 17:47:01 +01:00
Matthias Clasen de41790470 Implement selection related vfuncs for quartz 2010-12-22 17:47:01 +01:00
Matthias Clasen 762548d303 Implement selection owner vfuncs for quartz 2010-12-22 17:47:01 +01:00
Matthias Clasen 547d674ce5 Implement window property vfuncs for quartz 2010-12-22 17:47:01 +01:00
Matthias Clasen 168b3c13b7 Implement keyval vfuncs for quartz 2010-12-22 17:47:00 +01:00
Matthias Clasen 9ae2dc0deb Drop gdk_set_locale from quartz 2010-12-22 17:47:00 +01:00
Matthias Clasen a1b300ecb6 Implement test vfuncs for quartz 2010-12-22 17:47:00 +01:00
Matthias Clasen 6eb2a3520c Implement atom-related vfuncs for quartz 2010-12-22 17:47:00 +01:00
Matthias Clasen 51f149df5e Implement get_keymap vfunc for quartz 2010-12-22 17:47:00 +01:00
Matthias Clasen 46352afa6f Implement create_window_impl vfunc for quartz 2010-12-22 17:47:00 +01:00
Matthias Clasen 57efe15bda Drop gdk_spawn functions
These have been removed since the implementation was just
a straight wrapper around g_spawn.
2010-12-22 17:47:00 +01:00
Matthias Clasen 9dbe3bd316 Drop unimplemented foreign window functions
These have been relegated to backend-specific
2010-12-22 17:47:00 +01:00
Matthias Clasen b2ff02332f Implement event_data_{copy,free} for quartz 2010-12-22 17:47:00 +01:00
Matthias Clasen 4b92625fe0 Implement notify_startup_complete vfunc for quartz 2010-12-22 17:47:00 +01:00
Matthias Clasen 2f3c7da763 Remove a duplicate doc comment 2010-12-22 17:47:00 +01:00
Matthias Clasen 1a04631707 Implement get_next_serial for quartz 2010-12-22 17:47:00 +01:00
Matthias Clasen dadbc63f1e gdk_display_warp_pointer is in the frontend now 2010-12-22 17:46:59 +01:00
Matthias Clasen a1a0205dad Implment process_updates_recurse vfunc for quartz 2010-12-22 17:46:59 +01:00
Matthias Clasen 3232be603a Implement has_pending and queue_events vfuncs for quartz 2010-12-22 17:46:59 +01:00
Matthias Clasen 733c8fc8e7 Derive GdkDisplayManager for quartz 2010-12-22 17:46:59 +01:00
Matthias Clasen 8a9c604b8a Adapt quartz device code to new ways
We will need to rename the Core implementations in X11/Quartz
to not clash, later.
2010-12-22 17:46:59 +01:00
Matthias Clasen e2fea748d6 Adapt quartz visual code to new ways
We may still need a subclass here later, not sure
2010-12-22 17:46:59 +01:00
Matthias Clasen 46e8aadaf8 Rename _gdk_dnd_init 2010-12-22 17:46:59 +01:00
Matthias Clasen 25271f5e9a Implement dnd vtables for quartz 2010-12-22 17:46:59 +01:00
Matthias Clasen d2ce9ec3dc Convert a bunch of visual related calls to use the screen vtable, quartz 2010-12-22 17:46:59 +01:00
Matthias Clasen 41352f24d6 Convert all GdkScreen methods to vtable calls, quartz backend 2010-12-22 17:46:59 +01:00
Matthias Clasen f43f259d49 Derive GdkKeymap for Quartz 2010-12-22 17:46:59 +01:00
Matthias Clasen acd99409b8 Make display method vtable calls, quartz backend 2010-12-22 17:46:59 +01:00
Matthias Clasen 064bfceaad Convert all gdk_window methods to vtable calls in the quartz backend 2010-12-22 17:46:59 +01:00
Matthias Clasen 62cbc1acd4 continue to install gdk-$TARGET-3.0.pc 2010-12-22 11:39:58 -05:00
Matthias Clasen 05b43caf4c Add a section about gdk_spawn to migration guide 2010-12-22 11:13:31 -05:00
Tristan Van Berkom e20503836c Fixed GtkGrid GtkContainerClass->forall() to not use a for loop.
This loop needs to be safe for removing children in a forall loop.
2010-12-22 21:25:53 +09:00
Matthias Clasen 367211ed7f Document WINDOWING macros 2010-12-22 01:43:57 -05:00
Matthias Clasen 3973ef760e Mention GDK_BACKEND in the docs 2010-12-22 01:32:18 -05:00
Matthias Clasen fa59cc4652 Fix the X backend docs 2010-12-22 01:31:15 -05:00
Matthias Clasen a6b05106a5 GtkAboutDialog: Be slightly more flexible when listing credits
Make sure we render credits ok that are occurring in the wild,
such as "Contact us at:", "<foo@bar>" or "guy1\nguy2\nguy3"

https://bugzilla.gnome.org/show_bug.cgi?id=637763
https://bugzilla.gnome.org/show_bug.cgi?id=637736
2010-12-22 01:03:58 -05:00
Matthias Clasen 4cc76927b1 Show translators properly in the new about dialog
translator-credits is a single string, typically with newline-
separated names.
2010-12-22 00:31:05 -05:00
Robert Ancell 2013e23c4b Use getters and setters for GtkPrintJob in gtkprintbackendtest.c 2010-12-22 15:36:47 +11:00
Robert Ancell f4419be0d6 Fix DSO link issues 2010-12-22 15:01:50 +11:00
Matthias Clasen e60eff282a Bump version 2010-12-21 20:17:35 -05:00
Matthias Clasen 83364e8529 Fix distcheck 2010-12-21 19:37:18 -05:00
Matthias Clasen b824cdd6db Fix a blunder in grab handling
This was causing segfaults which would go away when compiled with
debug options.
2010-12-21 18:42:30 -05:00
Matthias Clasen 4b10167ce6 Set a default value for rgba style properties 2010-12-21 18:18:34 -05:00
Matthias Clasen 5b6bdcf016 Fix a tag mismatch in the docs 2010-12-21 18:18:34 -05:00
Mike Gorse 2a324ae304 Fix inclusion of gdkconfig.h 2010-12-21 18:18:07 -05:00
Matthias Clasen 4331d62567 Add gtkselectionprivate.h to Makefile 2010-12-21 17:57:40 -05:00
Matthias Clasen fcbfa05347 Drop no-longer-existing header from Makefile 2010-12-21 17:36:50 -05:00
Matthias Clasen 3ca69937f4 Don't install headers twice 2010-12-21 16:37:16 -05:00
Matthias Clasen 9cdbb31c06 Update NEWS 2010-12-21 16:25:27 -05:00
Matthias Clasen 7b6d759b04 Temporarily disable combo box entry test
This one got broken by the treeview refactoring, I assume.
2010-12-21 14:43:17 -05:00
Matthias Clasen 940d123de5 Add gdk_disable_multidevice to headers 2010-12-21 14:33:56 -05:00
Owen W. Taylor a2dddb1da0 Return an appropriate GtkStyle from gtk_rc_get_style_by_paths()
Always returning NULL (no match) from gtk_rc_get_style_by_paths()
means that looking up colors and style properties based on the
GtkStyle will give default values instead of themed values. We can
do better by returning a GtkStyle based on a GtkWidgetPath that we
figure out from the values passed in to get_style_by_paths().

https://bugzilla.gnome.org/show_bug.cgi?id=637520
2010-12-21 14:27:25 -05:00
Matthias Clasen 928fd84ebf Implement some more vfuncs in GdkOffscreenWindow 2010-12-21 14:20:19 -05:00
Matthias Clasen 82fe7594f9 More include shuffling; keep X extension headers to ourselves 2010-12-21 14:17:02 -05:00
Matthias Clasen 10a7f49fe7 Check the right library for symbols 2010-12-21 12:41:29 -05:00
Matthias Clasen f9e876e265 Fix another typo 2010-12-21 12:32:34 -05:00
Matthias Clasen b3bd184274 Fix a silly typo 2010-12-21 12:19:03 -05:00
Matthias Clasen ecddaa7a8e Disable the GtkPlug xi2 hack more thoroughly 2010-12-21 12:07:10 -05:00
Matthias Clasen 106047ffa4 Detangle includes for GdkDeviceManager subclasses 2010-12-21 12:07:10 -05:00
Matthias Clasen b1aaa10b6a Detangle includes for device subclasses 2010-12-21 12:07:10 -05:00
Matthias Clasen e5090396bf Forgotten file 2010-12-21 12:07:10 -05:00
Matthias Clasen bd36374413 Rename GdkAppLaunchContextX11 to GdkX11AppLaunchContext 2010-12-21 12:07:10 -05:00
Matthias Clasen 3fb8c3415b Rename GdkDragContextX11 to GdkX11DragContext 2010-12-21 12:07:09 -05:00
Matthias Clasen fdfabea958 Don't export gdk_x11_cursor_finalize 2010-12-21 12:07:09 -05:00
Matthias Clasen 71a515ef17 Get abicheck to almost pass again 2010-12-21 12:07:09 -05:00
Matthias Clasen b4802e3042 Rename x11-specific GdkDevice[Manager] implementations
Make them all fit in the gdk_x11_ prefix, and make the
get_type functions and standard macros available in headers.
2010-12-21 12:07:09 -05:00
Matthias Clasen 5cddc7ccbb Rename GdkDevice[Manager]Core to GdkX11Device[Manager]Core
This is mainly to avoid clash with the classes of the same
name in the quartz backend.
2010-12-21 12:07:09 -05:00
Matthias Clasen e96c193d06 Rename GdkKeymapX11 to GdkX11Keymap
And add a gdkx11keys.h header file.
2010-12-21 12:07:09 -05:00
Matthias Clasen 146fd989d6 Rename GdkDisplayManagerX11 to GdkX11DisplayManager
And add a gdkx11displaymanager.h header file.
2010-12-21 12:07:09 -05:00
Benjamin Otte 36893a9ef8 gdk: Make GdkWindow abstract
This way backend implementors get an error if they don't set
display_class->window_type to their subclass. And that's exactly what we
want.
2010-12-21 12:07:09 -05:00
Benjamin Otte dcb03b1085 gdk: Use G_DEFINE_TYPE for GdkWindow 2010-12-21 12:07:08 -05:00
Benjamin Otte 19699989e5 x11: Add a GdkX11Window class for X11 windows 2010-12-21 12:07:08 -05:00
Benjamin Otte af7afbbe06 gdk: Allow display subclasses to override the type used for windows
We want to have different window types for different displays, so we can
write code like this:

  #if GDK_WINDOWING_X11
    if (GDK_IS_X11_WINDOW (window))
      {
        /* do x11 stuff */
      }
    else
  #endif
  #if GDK_WINDOWING_WAYLAND
    if (GDK_IS_WAYLAND_WINDOW (window))
      {
        /* do wayland stuff */
      }
    else
  #endif
      {
        /* do stuff for unsupported system */
    }

This requires different GdkWindow types and we currently don't have
that, as only the GdkWindowImpl differs. With this method, every backend
defines a custom type that's just a simple subclass of GdkWindow. This
way GdkWindow behaves like all the other types (visuals, screens,
displays) and we can write code like the above.
2010-12-21 12:07:08 -05:00
Benjamin Otte 3036922b3d gdk: Create windows via _gdk_display_create_window()
THe use of this function will become visible in the next commits. But
wrapping g_object_new() is a generally a good idea anyway.
2010-12-21 12:07:08 -05:00
Benjamin Otte 503087dfc9 x11: Export GdkX11Screen 2010-12-21 12:07:08 -05:00
Benjamin Otte a8b69df376 x11: Rename GdkScreenX11 to GdkX11Screen 2010-12-21 12:07:08 -05:00
Benjamin Otte b154d3abf6 x11: Export GdkX11Visual 2010-12-21 12:07:08 -05:00
Benjamin Otte d185987ebd x11: Rename GdkVisualX11 to GdkX11Visual 2010-12-21 12:07:08 -05:00
Benjamin Otte 86e0a9aef7 x11: Have a proper GdkVisualX11Class struct 2010-12-21 12:07:08 -05:00
Benjamin Otte 21d8160c57 x11: Export GdkX11Cursor 2010-12-21 12:07:08 -05:00
Benjamin Otte 4848bf2719 x11: typedef GdkX11Display to GdkDisplay
This is for compatibility reasons. We want to change APIs that operate
on X11 objects to take the X11 objects as arguments. However, this would
break a lot of APIs and we'd like to avoid this, so we play this little
trick (we will use the same trick for the other X11 objects). Also,
gobject-introspection and other bindings can correctly attach the
functions to the correct types as it is the same scheme that GDK2 used
for pixmaps, windows and drawables.

For GTK 4, we will remove this trick, so apps should properly cast their
objects right now.
Unfortunately, I don't think there is a way to use
GDK_DISABLE_DEPRECATED or similar macros to check for proper type casts
while compiling ensure compatibility with future GDK versions. I'm free
to consider them though.
2010-12-21 12:07:07 -05:00
Benjamin Otte eba4529246 x11: Export GdkX11Display 2010-12-21 12:07:07 -05:00
Benjamin Otte 4db086da4b x11: Rename GdkDisplayX11 to GdkX11Display
Also rename all the macros etc.
2010-12-21 12:07:07 -05:00
Benjamin Otte 8e2240f699 x11: Rename GdkDisplayX11 to GdkX11Display 2010-12-21 12:07:07 -05:00
Benjamin Otte 85bd61778f API: gdk: GDK_DISPLAY_OBJECT() => GDK_DISPLAY()
GDK_DISPLAY_OBJECT is now deprecated. No need to keep failures from
gtk1 around.
2010-12-21 12:07:07 -05:00
Benjamin Otte 04d1459fca x11: Move remaining APIs into gdkx11utils.h
Now gdkx.h is a clean header equivalent to gdk.h.
2010-12-21 12:07:07 -05:00
Benjamin Otte dd177b5201 x11: Move atom API into gdkx11property.h 2010-12-21 12:07:07 -05:00
Benjamin Otte ebe46e6f9d x11: Move selection-specific API into gdkx11selection.h 2010-12-21 12:07:07 -05:00
Benjamin Otte 7949073dd5 x11: Move display-specific APIs into gdkx11display.h 2010-12-21 12:07:06 -05:00
Benjamin Otte 6dfa90f57c x11: Move screen-specific API into gdkx11screen.h 2010-12-21 12:07:06 -05:00
Benjamin Otte 0ca6a7ab20 x11: Move visual-specific API into gdkx11visual.h 2010-12-21 12:07:06 -05:00
Benjamin Otte 55f3451754 x11: Move cursor API into gdkx11cursor.h 2010-12-21 12:07:06 -05:00
Benjamin Otte 124cf96850 x11: Split out public window API into gdkx11window.h 2010-12-21 12:07:06 -05:00
Benjamin Otte 66f7c3a562 API: gdk: gdk_display_warp_device() => gdk_device_warp()
warping devices has nothing to do with displays, so putting it there
seems weird.
2010-12-21 12:07:06 -05:00
Benjamin Otte 7a33592231 gdk: Move gdk_cursor_get_image() to the base class
.. and make it call a vfunc on the cursor
2010-12-21 12:07:06 -05:00
Benjamin Otte 60dc856daf x11: Remove duplicated docs
They're in gdk/gdkdisplay.c now.
2010-12-21 12:07:06 -05:00
Benjamin Otte 095d1905a9 x11: Don't keep the display around anymore
Use gdk_cursor_get_display() instead.
2010-12-21 12:07:06 -05:00
Benjamin Otte 4793bd3399 gdk: Move gdk_cursor_get_display() out of the backends
Now that we store the display inside the cursor, that change is obvious.
2010-12-21 12:07:05 -05:00
Benjamin Otte 7a14b30ea3 gdk: Make display a property of GdkCursor 2010-12-21 12:07:05 -05:00
Benjamin Otte 28b2d7e5da gdk: Make cursor-type a property of the cursor 2010-12-21 12:07:05 -05:00
Benjamin Otte 3e068e921f API: gdk: Deprecate gdk_cursor_ref() and gdk_cursor_unref()
Now that GdkCursor is a GObject, it doesn't need custom refcount
handling anymore.
2010-12-21 12:07:05 -05:00
Benjamin Otte 73d8ffd74f testgtk: Use g_object_unref instead of gdk_cursor_unref 2010-12-21 12:07:05 -05:00
Benjamin Otte e622ae9a68 gtk-demo: Use g_object_unref instead of gdk_cursor_unref 2010-12-21 12:07:05 -05:00
Benjamin Otte 8f1f743903 gtk: Use g_object_unref instead of gdk_cursor_unref 2010-12-21 12:07:05 -05:00
Benjamin Otte a9637f05b6 gdk: Use g_object_(un)ref instead of gdk_cursor_(un)ref 2010-12-21 12:07:05 -05:00
Benjamin Otte 768b425ce6 x11: Use g_object_(un)ref instead of gdk_cursor_(un)ref 2010-12-21 12:07:04 -05:00
Benjamin Otte 0b4913a166 gdk: Make GdkCursor a GObject
Also port the X11 implementation. Win32 and Quartz need to be ported
still.
2010-12-21 12:07:04 -05:00
Benjamin Otte 66e3894539 gdk: Move GdkCursor definition into a private header 2010-12-21 12:07:04 -05:00
Benjamin Otte 2eef91ad93 x11: Move GdkCursorPrivate into the C file 2010-12-21 12:07:04 -05:00
Benjamin Otte 8e3afc6e5a x11: Use public API to access cursor's xcursor 2010-12-21 12:07:04 -05:00
Matthias Clasen 3d5d558393 Downgrade some Since tags 2010-12-21 12:07:04 -05:00
Matthias Clasen 2650328ea8 Add win32 implementation for foreign window functions 2010-12-21 12:07:04 -05:00
Matthias Clasen 58529e69ec Drop sm_client_id implementation for Quartz 2010-12-21 12:07:04 -05:00
Matthias Clasen 10e23de49e Drop sm_client_id win32 implementation 2010-12-21 12:07:04 -05:00
Matthias Clasen 00e2b949eb Reinstate the correct field value 2010-12-21 12:07:03 -05:00
Matthias Clasen 572bb20011 Deal with property encoding functions
Move everything dealing with compound text to be X11 specific
Only gdk_text_property_to_utf8_list and gdk_utf8_to_string_target
are kept across backends, so add vfuncs for these.

Also, remove the non-multihead-safe variants of all these.
2010-12-21 12:07:03 -05:00
Matthias Clasen 61104d58ea Avoid unnecessary use of gdk conversion routines
We can use use gtk_selection_data_get_uris, instead of
manually doing the conversion ourselves.
2010-12-21 12:07:03 -05:00
Matthias Clasen 05497c799a Add a vfunc for gdk_selection_convert 2010-12-21 12:07:03 -05:00
Matthias Clasen 95868ef00b Add a vfunc for gdk_selection_property_get 2010-12-21 12:07:03 -05:00
Matthias Clasen 625b8305e9 Add a vfunc for gdk_selection_send_notify_for_display 2010-12-21 12:07:03 -05:00
Matthias Clasen 7e22cf7e50 Rename some private x11 backend functions to _gdk_x11 2010-12-21 12:07:03 -05:00
Matthias Clasen cc03a6df79 Add vfuncs for get/set_selection_owner 2010-12-21 12:07:03 -05:00
Matthias Clasen 519f09f7f4 Add vfuncs for keyval and window property functions
The keyval functions should really be generic, and the window
property api should be completely revisited, but for now this
will allow us to proceed.
2010-12-21 12:07:03 -05:00
Matthias Clasen fdabc9585d Drop g[dt]k_set_locale
These functions were essentially just calling setlocale anyway.
The X11 version was also setting a gdk_use_mb variable that
is not used anywhere.
2010-12-21 12:07:02 -05:00
Matthias Clasen 2211e52ec5 Don't use gtk_set_locale 2010-12-21 12:07:02 -05:00
Matthias Clasen afa0ebf36b Add vfuncs for gdk_test apis 2010-12-21 12:07:02 -05:00
Matthias Clasen 28abd0c75f Add vfuncs for atoms 2010-12-21 12:07:02 -05:00
Matthias Clasen 62e9bb06a0 Add a vfunc for gdk_keymap_get_for_display 2010-12-21 12:07:02 -05:00
Matthias Clasen a97b1891b3 Rename private keymap symbols to _gdk_x11_keymap... 2010-12-21 12:07:02 -05:00
Matthias Clasen 1d5afe4880 Rename the _gdk_xid_table functions 2010-12-21 12:07:02 -05:00
Matthias Clasen 55e1031e84 Remove gdk_net_wm_supports
This function is totally misnamed, only operates on the default
screen, and has a perfectly fine replacement in
gdk_x11_screen_supports_net_wm_hint.
2010-12-21 12:07:02 -05:00
Matthias Clasen 902fd60a86 Remove the --sync commandline option
Remove the --sync option and remove the possibility of backend-specific
commandline options altogether. --sync is being replaced by
a GDK_SYNCHRONIZE environment variable.
2010-12-21 12:07:02 -05:00
Matthias Clasen b938e71e1d Remove unused _gdk_use_xshm global 2010-12-21 12:07:01 -05:00
Matthias Clasen 021f595a38 Rename _gdk_window_move_resize_child
Rename _gdk_window_move_resize_child and _gdk_window_process_expose
to _gdk_x11.
2010-12-21 12:07:01 -05:00
Matthias Clasen 214342eac5 Clean up gdkx.h a bit
Moving the direct-access redefinitions of various macros
to gdkprivate-x11.h and use that header throughout in x11/.

Also remove a workaround for a long-fixed X server bug.
2010-12-21 12:07:01 -05:00
Matthias Clasen 32e3dcfb47 drop dead function 2010-12-21 12:07:01 -05:00
Matthias Clasen 126212b470 Add a vfunc for _gdk_window_impl_new 2010-12-21 12:07:01 -05:00
Matthias Clasen d5803fa9b2 Get rid of the _gdk_selection_property global 2010-12-21 12:07:01 -05:00
Matthias Clasen 185cdddb0d Rename _gdk_moveresize functions to _gdk_x11_moveresize 2010-12-21 12:07:01 -05:00
Matthias Clasen 19cf9309a5 Drop gdkx_visual_get
The function is badly named, not multihead-safe, basically unused,
and has a better replacement with gdk_x11_screen_lookup_visual.
2010-12-21 12:07:01 -05:00
Matthias Clasen e11bbbf194 Rename _gdk_xgrab_ apis to _gdk_x11_window_ 2010-12-21 12:07:01 -05:00
Matthias Clasen 566abbad25 Rename _gdk_send_xevent to _gdk_x11_display_send_xevent 2010-12-21 12:07:00 -05:00
Matthias Clasen 28b7c6f05d Rename _gdk_event_mask_table to _gdk_x11_event_mask_table 2010-12-21 12:07:00 -05:00
Matthias Clasen 985eb14469 Multiple changes to reduce the amount of unprefixed symbols
The X11 backend exports a number of symbols which are _-prefixed
(so don't become part of the gdk api), but are not named in a
way to prevent accidental clashes between backends.

The one API change here is that the gdk_xid_table functions
have been removed - they did not server an purpose, since the
xid table only stores windows anyway, and we already have a
lookup-by-xid function for windows.
2010-12-21 12:07:00 -05:00
Benjamin Otte 33417c36f1 plug: Comment hack for xinput that used private x11 backend API 2010-12-21 12:07:00 -05:00
Matthias Clasen 624dc45755 Move event source apis to gdk_x11
Reduces the changes of cross-backend collisions
2010-12-21 12:07:00 -05:00
Matthias Clasen 25c66c11e2 Remove gdk_spawn functions
These functions were trivial g_spawn wrappers in all backends
except for X11, and they can be easily replaced by
g_app_info_create_for_commandline + GdkAppLaunchContext.
2010-12-21 12:07:00 -05:00
Matthias Clasen ef85f112da Don't use gdk_spawn
Replace the sole use of gdk_spawn in GTK+ by GAppInfo.
2010-12-21 12:07:00 -05:00
Matthias Clasen 536a7c8abb Work around issues with events without screens
Just use the default display for copy/free of event data.
Maybe the vfuncs should be moved to GdkDisplayManager.
2010-12-21 12:07:00 -05:00
Matthias Clasen 6c16ddc2d3 Make GdkAppLaunchContext work again
We didn't set the display, ever. Add a construct-only property
for this purpose.
2010-12-21 12:07:00 -05:00
Matthias Clasen fa33839d72 Consistently use per-display error traps in the X11 backend 2010-12-21 12:06:59 -05:00
Matthias Clasen 2d7583c0e3 Make gdk_window_{lookup,foreign_new}_for_display backend specific
At the same time, make GDK_IS_DISPLAY_X11 available in gdkx.h, and
add some exemplaric ifdefs to GTK+ code.
2010-12-21 12:06:59 -05:00
Matthias Clasen 39a71b8831 Add vfuncs for _gdk_windowing_event_data_{copy,free} 2010-12-21 12:06:59 -05:00
Matthias Clasen 968668629b Go back to installing libgdk.so 2010-12-21 12:06:59 -05:00
Matthias Clasen 5eb4506b94 Drop the --screen cmdline argument
Commandline arguments should go away altogether, but this one
goes first, since we then don't need to worry about
_gdk_windowing_substitute_screen_number anymore.
2010-12-21 12:06:59 -05:00
Matthias Clasen beaa11be98 Add a vfunc for gdk_notify_startup_complete
At the same time, add a display api for this, since it really
is per-display.
2010-12-21 12:06:59 -05:00
Matthias Clasen a251d3786b Remove sm-client-id related functions from headers 2010-12-21 12:06:59 -05:00
Matthias Clasen 2186203422 Remove unused get_offsets functions from headers 2010-12-21 12:06:59 -05:00
Matthias Clasen 224726f554 Remove gdk_windowing_{get_device_state,window_at_device_position}
The !trusted workaround code is pushed down into the GdkDevice
subclasses, and we use the device vfuncs directly in gdkdisplay.c
2010-12-21 12:06:59 -05:00
Matthias Clasen 9adb974155 Add a vfunc for _gdk_windowing_window_get_next_serial 2010-12-21 12:06:58 -05:00
Matthias Clasen 9635f09623 Move warp functions to the frontend
There were already GdkDevice vfuncs for this.
2010-12-21 12:06:58 -05:00
Matthias Clasen 4a74060d63 Make gdk_set_sm_client_id X11-specific
This is really not a cross-platform API
2010-12-21 12:06:58 -05:00
Matthias Clasen ccb6edeb8b Add vfuncs for process_updates_recurse and the before and after hooks 2010-12-21 12:06:58 -05:00
Matthias Clasen da216c0665 Add vfuncs for a bunch of cursor functionality to GdkDisplay 2010-12-21 12:06:58 -05:00
Javier Jardón dfe6ba932c Don't access GdkDisplay fields directly
Use accessors instead.
2010-12-21 12:06:58 -05:00
Matthias Clasen ea96e5e16f Explode gdkinternals.h into per-class private headers
At the same time, move some more class and instance structs
out of public headers.
2010-12-21 12:06:58 -05:00
Matthias Clasen ff8a334725 Hide GdkDevice struct
Once its hidden, we can kill the GdkDevicePrivate struct too.
2010-12-21 12:06:58 -05:00
Matthias Clasen b5df501296 Move destroy_foreign comment 2010-12-21 12:06:57 -05:00
Matthias Clasen 218fa6757a Weed out no longer needed declarations 2010-12-21 12:06:57 -05:00
Matthias Clasen 5fa8791c86 Add a vfunc for _gdk_events_queue 2010-12-21 12:06:57 -05:00
Matthias Clasen ec9c97752d Work toward turning GdkDisplayManager into a backend singleton
This commit hides the GdkDisplayManager instance and class structs,
adds vfuncs for listing displays, opening displays, and getting and
setting the default display. The X11 backend has a derived
GdkDisplayManagerX11.

The gdk_display_manager_get() function is responsible for deciding on
which of the compiled in backends to use. Currently, it consults the
GDK_BACKEND environment variable and falls back to x11.
2010-12-21 12:06:57 -05:00
Matthias Clasen fa4b54b6de Add per-target pc files back
Dropping those will be an unnecessary pain.
2010-12-21 12:06:57 -05:00
Matthias Clasen 9a1cc81acb Add a vfunc to replace _gdk_windowing_window_destroy_foreign
All backends updated.
2010-12-21 12:06:57 -05:00
Matthias Clasen 1e694b4dd8 Add a vfunc for gdk_window_set_composited 2010-12-21 12:06:57 -05:00
Matthias Clasen 7f6ac56e3c Add a vfunc for gdk_window_set_composited 2010-12-21 12:06:57 -05:00
Matthias Clasen 280e8329b4 Match parameters between headers and doc comment 2010-12-21 12:06:57 -05:00
Matthias Clasen a169f6e32d Make GdkDevice parallel-implementable
Use the grab and ungrab vfuncs from the frontend instead of the
_gdk_windowing wrappers, and move some things around accordingly.
Again, only the X11 backend has been updated, other backends
need to be updated to match.
2010-12-21 12:06:56 -05:00
Matthias Clasen c7559f57ed Hide GdkScreen too 2010-12-21 12:06:56 -05:00
Matthias Clasen 3412d7a23a Don't access GdkScreen fields 2010-12-21 12:06:56 -05:00
Matthias Clasen d5c0b92d5d Hide GdkDeviceManager and GdkDeviceManagerClass
And nuke GdkDeviceManagerPrivate at the same time. Again a commit
that only deals with the X11 backend, other backends will need to
catch up.
2010-12-21 12:06:56 -05:00
Matthias Clasen c6a5074295 Move GdkVisual parallel-implementable
It turned out no vfuncs were necessary. I've decided to move
the screen member up to GdkVisual, since it is the same in all
backends. The X11 backend subclasses now, to add the X members
that it needs to keep track of. GdkVisual and GdkVisualClass
are hidden now.
2010-12-21 12:06:56 -05:00
Matthias Clasen 23a2b42216 Fully initialize the ClientMessage struct
Otherwise we run into warnings from xdnd_status_filter
2010-12-21 12:06:56 -05:00
Matthias Clasen 8e1d320ce9 Rename _gdk_dnd_init
Nonstatic backend-specific functions need an x11 in their name.
2010-12-21 12:06:56 -05:00
Matthias Clasen c53ec081ce Add vtables for DND
This commit hides GdkDragContext and GdkDragContextClass, adds
vfuncs for most drag context functionality, and turns the X11 DND
implementation into GdkDragContextX11. We also add vfuncs to
GdkDisplay for gdk_drag_get_protocol and to GdkWindow for
gdk_drag_begin, and implemenet them for X11.
Other backends need similar treatment and are broken now.
2010-12-21 12:06:56 -05:00
Matthias Clasen 3c47c8467c Remove some direct access to GdkDragContext members 2010-12-21 12:06:56 -05:00
Matthias Clasen ae2c3a909c tests: Don't access GdkDragContext fields directly 2010-12-21 12:06:55 -05:00
Matthias Clasen a843a9d614 Make abicheck work again 2010-12-21 12:06:55 -05:00
Matthias Clasen 06f75b3727 Make GdkAppLaunchContext display-dependent
Add a GdkDisplay::get_app_launch_context vfunc, and a
gdk_display_get_app_launch_context that for X11 returns a subclass.
For win32 and quartz, the implementations were trivial, so we
just return a new GdkAppLaunchContext without subclassing. Since
the type of the context now depends on the display,
gdk_app_launch_context_set_display is deprecated.
2010-12-21 12:06:55 -05:00
Matthias Clasen de84a7b14f Move gdk_window_lookup to common code 2010-12-21 12:06:55 -05:00
Matthias Clasen 31cd046cd0 Move gdk_add_client_message_filter to common code 2010-12-21 12:06:55 -05:00
Matthias Clasen 8075cfd658 Move gdk_get_display to common code 2010-12-21 12:06:55 -05:00
Matthias Clasen 6465e8dd15 Reorganize pc files for a single library
After this commit, pc files no longer include the gdk backend in
their name, and we no longer install a pc file for gdk. There is
now a single gtk+-3.0.pc file. It turns out a separate gtk+-x11-3.0.pc
file is not necessary, since gdkx.h doesn't have a separate include
directory that would have to be added to Cflags.
2010-12-21 12:06:55 -05:00
Matthias Clasen 07d49ee56a Merge libgdk and libgtk
This commit does a number of things:
- remove some dead wchar configury from configure.ac and gdkconfig.h
- repurpose gdkconfig.h as header that contains GDK_WINDOWING_foo
  macros for each included backend, include it in gdk.h and install
  it in $includedir instead of below $libdir
- drop the backend from the library names
- build libgdk-3.0.la as a convenience lib and include it in libgtk-3.0.la
It does not yet enable building multiple backends at the same time.
2010-12-21 12:06:55 -05:00
Alexander Larsson ae146a2817 Convert a bunch of visual related calls to use the screen vtable 2010-12-21 12:06:55 -05:00
Alexander Larsson f52223f380 Convert all GdkScreen methods to vtable calls 2010-12-21 12:06:54 -05:00
Alexander Larsson 84c03b14e8 Move GdkScreenClass to internal header 2010-12-21 12:06:54 -05:00
Alexander Larsson 8c6162b50c Convert all gdk_keymap methods to vtable calls 2010-12-21 12:06:54 -05:00
Alexander Larsson 4ad948ec4a Move GdkKeymapClass definition to internal header
This lets us change this without affecting apps.
2010-12-21 12:06:54 -05:00
Alexander Larsson 5fda1669ea Make display method vtable calls 2010-12-21 12:06:54 -05:00
Alexander Larsson f1c32f109d Hide GdkDisplayClass from public header
There is no need for apps to access this class, as its only implemented
in the gdk backends, and we want to be free to change it later.
2010-12-21 12:06:54 -05:00
Alexander Larsson ac7d55c948 Convert all gdk_window methods to vtable calls 2010-12-21 12:06:54 -05:00
Tristan Van Berkom 49273f2277 Added "fixed-size" cell property to GtkCellAreaBox
Now a cell can either have a "fixed" size or it can have
an "aligned" starting point or both. "fixed" size cells take
no space when they are invisible.
2010-12-22 00:28:18 +09:00
Tristan Van Berkom c8ae68c33d Fixed gtk_cell_layout_set_cell_data_func() to pass the correct layout object
Added _gtk_cell_area_set_cell_data_func_with_proxy() to be called by
gtk_cell_layout_set_cell_data_func() when the layouting object itself
is not the underlying cell area.
2010-12-22 00:28:18 +09:00
Michael Natterer 13f18567e9 gdk: return 0, not NULL from gdk_device_get_n_axes() 2010-12-21 15:16:35 +01:00
Carlos Garnacho ac0353e08a Make gtk_style_context_get_* functions more robust
Even if the default CSS contains values for these, handle non-existing
values as queries might happen on an incomplete style.
2010-12-21 14:44:49 +01:00
Jesse van den Kieboom e36ba3465b Added out annotations for gtk_icon_size_lookup/_for_settings
https://bugzilla.gnome.org/show_bug.cgi?id=637606
2010-12-21 13:24:12 +01:00
Jesse van den Kieboom 939f68a35e Added out annotations for gtk_accelerator_parse
https://bugzilla.gnome.org/show_bug.cgi?id=637606
2010-12-21 13:24:12 +01:00
Yaron Shahrabani 1bb68f0bc5 Updated Hebrew translation 2010-12-21 12:46:41 +02:00
Carlos Garnacho e02b10046d Ensure widgets get a GtkStyle with its backing GtkStyleContext
Since the default style also has a backing context, it wasn't
being replaced after initialization.
2010-12-21 01:33:51 +01:00
Javier Jardón 33fd2104b7 docs: unmap signal will always be emitted when a widget is unmapped
Since commit 9552152dd9
2010-12-20 23:53:53 +00:00
Matthias Clasen 5c2f407935 Fix problems with window handling in GtkCalendar
After the window removal a while ago, the calendar main window
was not properly moved in size_allocate. Also, we ought to hide/show
the windows in map/unmap, not keep them visible at all times.

Bug 634657
2010-12-20 17:12:02 -05:00
Carlos Garnacho 17e97467df Strengthen checks in functions taking a GdkDevice
Docs have also been improved, to make explicit the device
type/source accepted.
2010-12-20 23:08:10 +01:00
Carlos Garcia Campos 0c518a81b8 printing: Set new print operation settings before emitting custom-widget-apply signal
So that custom settings can be added from the custom-widget-apply
callback.

https://bugzilla.gnome.org/show_bug.cgi?id=637069
2010-12-20 21:10:53 +01:00
Havoc Pennington 9552152dd9 Always emit unmap when a widget is unmapped
Previously, for performance reasons we would sometimes
skip invoking the unmap signal (and associated vfunc)
in favor of simply unrealizing. However, widgets then
had no way to clean stuff up when they were hidden
(but still inside a parent which was shown).

This patch also removes _gtk_tooltip_hide() which
was done in both unmap and unrealize in gtkwidget.c,
now can only be in unmap.

There are probably lots of things cleaned up in
unrealize that would now be better to move to unmap.

https://bugzilla.gnome.org/show_bug.cgi?id=629923
2010-12-20 13:04:45 -05:00
Havoc Pennington b67c5af55b Add invariant that a child is unmapped if parent is unmapped
Requires fixes to GtkContainer and GtkWindow to unmap their
children, rather than just withdrawing or hiding the container
window.

Requires fix to GtkHandleBox to chain up to GtkContainer unmap.

Historically we avoided these unmaps for efficiency reasons,
but these days it's a bigger problem that there's no way
for child widgets to know that one of their ancestors has
become unmapped.
2010-12-20 12:58:04 -05:00
Havoc Pennington 23ce44c9fe Verify GtkWidget invariants if G_ENABLE_DEBUG is defined
These checks are a bit expensive so require --enable-debug=yes.
gtk_widget_verify_invariants() checks invariants mentioned
in docs/widget_system.txt in particular, and can verify
others in the future.

Some of the invariants in docs/widget_system.txt don't
in fact hold right now, so those are #if 0'd in this
patch pending someone fixing either the docs or the code.
2010-12-20 12:46:51 -05:00
Matthias Clasen 28cc7baef0 Make GtkEntry hide completely
When it was converted to no-window, we forgot to make it hide/show
its input window as necessary.
2010-12-20 12:28:05 -05:00
Matthias Clasen 335bfbc8fc Update GtkAboutDialog documentation
Also, remove some dead code, pointed out in bug 637608.
2010-12-20 11:40:39 -05:00
Carlos Garnacho 33cd32f796 Make gtk_style_new() use a backing GtkStyleContext
Fixes a bug in mutter where it would resort to a dummy style
to get iconview rubberband color.

Reported by Mathieu Bridon in
https://bugzilla.gnome.org/show_bug.cgi?id=637520
2010-12-20 17:18:35 +01:00
Matthias Clasen 5b299ce7af Remove reference to GTK2_RC_FILES from the docs
Pointed out in bug 637471.
2010-12-20 10:23:43 -05:00
Cosimo Cecchi a5fe3fef7b appchooserdialog: use new GLib API to modify positioning
The dialog will always show up with the last selected application.
2010-12-20 16:08:21 +01:00
Matthias Clasen 183bf8ac9d Use g_strtod when converting strings for GtkCellRendererSpin
These strings are likely user-provided values, so we should
respect locale settings.

Reported in bug 637189.
2010-12-20 10:02:00 -05:00
Matthias Clasen a9753ef5c6 Add a test for basic style properties 2010-12-20 08:19:23 -05:00
Carlos Garnacho 7030492a3b Disable XI2 in gtk_test_init()
gdk_test_simulate_*() uses XSendEvent, which doesn't currently work
with XI2/GenericEvents, so make tests use core events for the time
being. Luckily there's a lot more to test than low-level event
handling in these tests.
2010-12-20 13:55:38 +01:00
Carlos Garnacho ca7fe1cb73 GtkStyleProperties: Assign default value for the font property
This fixes a failure when running make test, where style queries
happened before there was even an screen.
2010-12-20 13:55:37 +01:00
Ivar Smolin 3c8076f3dc [l10n] Updated Estonian translation 2010-12-20 13:54:25 +02:00
Javier Jardón 08af2cb488 gail: Fix a typo
This fixes commit d0b81b2148
2010-12-20 11:52:37 +00:00
Baurzhan Muftakhidinov 079b72574a Updates to Kazakh translation 2010-12-20 17:06:25 +06:00
Matthias Clasen d4e9cd09ab Fix up symbol lists 2010-12-19 23:45:21 -05:00
Javier Jardón 26a304c54b Move GtkSelectionData to a private header 2010-12-19 20:48:20 +00:00
Mahyar Moghimi 39b85421f8 Updating Persian translations (minor change) 2010-12-19 13:42:39 +03:30
Nguyễn Thái Ngọc Duy 75970da97f po/vi.po: import some translations from Ubuntu/Maverick 2010-12-19 16:24:42 +07:00
Yaron Shahrabani 3573179ced Updated Hebrew translation 2010-12-19 09:09:16 +02:00
Javier Jardón 66e7915dc4 gtktreeselection: Move public members to a private structure 2010-12-19 05:01:22 +00:00
Javier Jardón d0b81b2148 gail: Use accessor functions to access GtkTreeSelection 2010-12-19 04:56:32 +00:00
Javier Jardón 74a7bc3a77 gtk/gtktreeview.c: Use accessor to access GtkTreeSelection 2010-12-19 04:56:32 +00:00
Javier Jardón e92da3e166 gtkcombobox.c: Use accessor functions to access GtkTreeSelection 2010-12-19 01:27:41 +00:00
Matthias Clasen 1b67d31bd9 Remove G_SEAL from private headers 2010-12-18 17:46:19 -05:00
Matthias Clasen 8105125369 Remove sealed members from GtkPrintJob
Also add accessors for these members, and use them in print backends.
2010-12-18 17:45:31 -05:00
Matthias Clasen 5863382e11 Don't use GtkSocket internals in gail 2010-12-18 17:39:42 -05:00
Matthias Clasen eb11430228 Fix gdk symbols after recent changes 2010-12-18 17:39:42 -05:00
Matthias Clasen 5ee3a44415 Remove sealed members from GtkSocket 2010-12-18 17:39:41 -05:00
Jorge González 53845f0851 Updated Spanish translation 2010-12-18 14:39:36 +01:00
Carlos Garnacho 56c3d4b1be Remove dead Gtk[Rc]Style code
Most code in gtkrc.c has been turned into a no-op, but that one
reverting in public API (gtk_rc_scanner_new() and such). GtStyle
is also more shallow, now fully relies in the backing
GtkStyleContext and all connection to gtkrc.c has been removed.

GtkBinding has been also affected, there is no replacement yet
for custom keybindings in style files, so that piece of code that
hooked into gtkrc has been replaced by a FIXME so in the future
it may be added back.
2010-12-18 12:10:00 +01:00
Carlos Garnacho d7dc12d301 Adapt gtk_widget_set_name() docs to style context. 2010-12-18 11:43:37 +01:00
Carlos Garnacho bbc637f7fd GtkWindow: remove deprecated call.
gtk_style_context_reset_widgets() can be used now to reset all widgets
in a screen.
2010-12-18 11:43:37 +01:00
Matthias Clasen b45e5fa51e Remove sealed members from GtkTreeModelSort 2010-12-17 23:49:27 -05:00
Matthias Clasen 121746605b Add the private struct in class_init 2010-12-17 21:50:18 -05:00
Matthias Clasen 881ea2881d Remove sealed members from GtkTreeStore 2010-12-17 21:45:20 -05:00
Matthias Clasen 60953ae0f4 Avoid accidental exports 2010-12-17 21:43:42 -05:00
Matthias Clasen 841edfe8c3 Remove an unused pointer from GtkDrawingArea
This is part of removing all sealed members from instance structures.
2010-12-17 20:54:13 -05:00
Matthias Clasen 7b665316cf Hide GtkWindowGroup members
In the process of removing all sealed members from headers.
At the same time, add a gtkwindowprivate.h header and move
all internal functions from gtkwindow.h there.
2010-12-17 20:41:16 -05:00
Matthias Clasen a2dda0c2bb Trivial changes
Whitespace fixes, comment formatting, etc
2010-12-17 19:14:35 -05:00
Matthias Clasen 453bf477ed Don't query the position of keyboards
Turns out that this causes X errors with the XI2 implementation.
2010-12-17 18:41:24 -05:00
Matthias Clasen 8bc4e13c22 No links in title, please 2010-12-17 18:41:24 -05:00
Colin Walters d08ff485f2 gdkwindow: Fix event unref iteration
We were double looping previously which caused a NULL deref.
2010-12-17 15:41:15 -05:00
Matthias Clasen 33fb60e050 Fix an escaping problem
& must be escaped as &amp; in examples.
2010-12-17 14:53:43 -05:00
Matthias Clasen 55a0f8700f Another doc format problem 2010-12-17 14:51:53 -05:00
Matthias Clasen 17c7bda6a3 Fix a doc comment format problem
Parameters / enum values come first, then the paragraph.
2010-12-17 14:50:55 -05:00
Matthias Clasen 5627ba161e More parameter name mismatches 2010-12-17 14:49:27 -05:00
Matthias Clasen 9d8682b9ac Fix a few parameter name mismatches 2010-12-17 14:46:18 -05:00
Matthias Clasen b32f4ae7c4 Add deprecation guards for gtk_icon_set_render_icon 2010-12-17 14:31:44 -05:00
Matthias Clasen 55ffebe505 Avoid a gtk-doc warning 2010-12-17 14:27:48 -05:00
Matthias Clasen 4317ae32c3 Adjust symbol lists in the docs 2010-12-17 14:24:25 -05:00
Cosimo Cecchi b792a31995 widgetpath: allow GTypes non-derived from GTK_TYPE_WIDGET
This makes things like GtkCellRenderer or GtkNumerableIcon more easily
themeable.

https://bugzilla.gnome.org/show_bug.cgi?id=637169
2010-12-17 18:30:57 +01:00
Colin Walters 806c04411d gdk: Fix GdkWindowFilter internal refcounting
Running gnome-shell under valgrind, I saw the attached invalid write.
Basically we can destroy a window during event processing, and the old
window_remove_filters simply called g_free() on the filter, ignoring
the refcount.  Then later in event processing we call filter->refcount--,
which is writing to free()d memory.

Fix this by centralizing list mutation and refcount handling inside
a new shared _gdk_window_filter_unref() function, and using that
everywhere.

==13876== Invalid write of size 4
==13876==    at 0x446B181: gdk_event_apply_filters (gdkeventsource.c:86)
==13876==    by 0x446B411: _gdk_events_queue (gdkeventsource.c:188)
==13876==    by 0x44437EF: gdk_display_get_event (gdkdisplay.c:410)
==13876==    by 0x446B009: gdk_event_source_dispatch (gdkeventsource.c:317)
==13876==    by 0x4AB7159: g_main_context_dispatch (gmain.c:2436)
==13876==    by 0x4AB7957: g_main_context_iterate.clone.5 (gmain.c:3087)
==13876==    by 0x4AB806A: g_main_loop_run (gmain.c:3295)
==13876==    by 0x8084D6B: main (main.c:722)
==13876==  Address 0x1658bcac is 12 bytes inside a block of size 16 free'd
==13876==    at 0x4005EAD: free (vg_replace_malloc.c:366)
==13876==    by 0x4ABE515: g_free (gmem.c:263)
==13876==    by 0x444BCC9: window_remove_filters (gdkwindow.c:1873)
==13876==    by 0x4454BA3: _gdk_window_destroy_hierarchy (gdkwindow.c:2043)
==13876==    by 0x447BF6E: gdk_window_destroy_notify (gdkwindow-x11.c:1115)
==13876==    by 0x43588E2: _gtk_socket_windowing_filter_func (gtksocket-x11.c:518)
==13876==    by 0x446B170: gdk_event_apply_filters (gdkeventsource.c:79)
==13876==    by 0x446B411: _gdk_events_queue (gdkeventsource.c:188)
==13876==    by 0x44437EF: gdk_display_get_event (gdkdisplay.c:410)
==13876==    by 0x446B009: gdk_event_source_dispatch (gdkeventsource.c:317)
==13876==    by 0x4AB7159: g_main_context_dispatch (gmain.c:2436)
==13876==    by 0x4AB7957: g_main_context_iterate.clone.5 (gmain.c:3087)

https://bugzilla.gnome.org/show_bug.cgi?id=637464
2010-12-17 12:07:37 -05:00
Kristian Rietveld faf35d708b Fix size allocation for list mode combo box 2010-12-17 16:53:46 +01:00
Kristian Rietveld 21fc66f120 Set cell_view to NULL immediately after unparenting
This way we are sure no invalid pointer will be accessed in between.
2010-12-17 16:53:46 +01:00
Kristian Rietveld 81515f7183 Check if popup_window is mapped, not popup_widget
Before hide_all was used on popup_window, which means popup_widget
was also unmapped.  This is now no longer the case.  This fixes
subsequent pop ups for appears-as-list == 1.
2010-12-17 16:53:46 +01:00
Benjamin Otte d50c582961 selection: constify GtkSelectionData getters 2010-12-17 16:47:57 +01:00
Carlos Garnacho 2c8c1c6df4 Remove *_set_extension_events() and old API to query devices.
The old functions to get core pointer and devices list are gone as
well. This slice is entirely replaced internally by multidevice
handling and may just go.
2010-12-17 16:25:14 +01:00
Bastien Nocera 23c1d1cbc9 gtk: Add symbolic property for GtkVolumeButton
When the application prefers symbolic icons, avoids
having to reimplement the button in the software itself.

https://bugzilla.gnome.org/show_bug.cgi?id=636969
2010-12-17 13:23:23 +00:00
Kjartan Maraas 668604dcfd Updated Norwegian bokmål translation 2010-12-17 13:09:58 +01:00
Tristan Van Berkom df0d61e50d Fixed gtk_entry_set_icon_tooltip_text & markup to not crash
Setting this property before the icon is actually set was
resulting in a crash (found by way of Glade bug 606103).
2010-12-17 18:15:08 +09:00
Tristan Van Berkom b11bb46a76 Fixed parameter names in gtkcellarea.h for gtk-doc parsing. 2010-12-17 15:35:21 +09:00
Tristan Van Berkom 941a0e95d7 Fixed documentation of GtkCellLayout <cell-packing>
Mention that it's safe to use <cell-packing> tag for any GtkCellLayout
in GTK+ since they *all* use an underlying GtkCellArea (at least they
will once the other branches land).
2010-12-17 15:26:28 +09:00
Tristan Van Berkom 71e7cd0ec4 Merge branch 'master' into treeview-refactor
Conflicts:
	tests/testtreeedit.c
2010-12-17 15:25:15 +09:00
Kristian Rietveld 735fa8b197 Avoid recursion in do_validate_rows()
I have never really liked the updates done to the adjustments in
do_validate_rows() and other validation functions.  But it is really
required.  I have to come up with a real solution to this one day.
2010-12-16 23:33:42 +01:00
Kristian Rietveld 88f8859f90 Should pass inner_area to cell in gtk_cell_area_activate_cell() 2010-12-16 22:42:10 +01:00
Kristian Rietveld e3cab18354 Clip focus rectangle to background area 2010-12-16 12:33:00 +01:00
Kristian Rietveld c01ad6f615 Fix background area calculation in RTL mode 2010-12-16 12:26:18 +01:00
Javier Jardón e9a77a1535 docs: gtknotebook.c: Use accessor functions to access GtkSelectionData 2010-12-16 00:16:00 +00:00
Javier Jardón cf9e9ff47f gtk/gtkclipboard.c: Use accessor functions to access GtkSelectionData 2010-12-15 23:58:16 +00:00
Javier Jardón e5a3b7edbf gtk/gtkcolorbutton.c: Use accessor functions to access GtkSelectionData 2010-12-15 23:58:16 +00:00
Javier Jardón 1a2d9c368e gtk/gtkcolorsel.c: Use accessor functions to access GtkSelectionData 2010-12-15 23:58:16 +00:00
Javier Jardón a86d1fa7c3 gtk/gtkdnd.c: Use accessor functions to access GtkSelectionData 2010-12-15 23:58:16 +00:00
Javier Jardón 499aa2b3b9 gtk/gtkfilechooserbutton.c: Use accessor functions to access GtkSelectionData 2010-12-15 23:58:16 +00:00
Javier Jardón c806c0821a gtk/gtkfilechooserdefault.c: Use accessor functions to access GtkSelectionData 2010-12-15 23:58:16 +00:00
Javier Jardón fbbe9f5191 gtk/gtkiconview.c: Use accessor functions to access GtkSelectionData 2010-12-15 23:58:16 +00:00
Javier Jardón 8537163e20 gtk/gtklinkbutton.c: Use accessor functions to access GtkSelectionData 2010-12-15 23:58:16 +00:00
Javier Jardón ad4ac2182a gtk/gtknotebook.c: Use accessor functions to access GtkSelectionData 2010-12-15 23:58:15 +00:00
Javier Jardón 1ceddae7da gtk/gtktextbuffer: Use accessor functions to access GtkSelectionData 2010-12-15 23:58:15 +00:00
Javier Jardón 2b7afcdd79 gtk/gtktextview.c: Use accessor functions to access GtkSelectionData 2010-12-15 23:58:15 +00:00
Javier Jardón 7c6012d933 gtk/gtktoolpalette.c: Use accessor functions to access GtkSelectionData 2010-12-15 23:58:15 +00:00
Javier Jardón 640f85e568 gtk/gtktreednd.c: Use accessor functions to access GtkSelectionData 2010-12-15 23:58:15 +00:00
Javier Jardón 1cfd78269e gtk/gtktreeview.c: Use accessor functions to access GtkSelectionData 2010-12-15 23:58:15 +00:00
Javier Jardón a66f095b62 demos/gtk-demo/clipboard.c: Use accessor functions to access GtkSelectionData 2010-12-15 23:58:15 +00:00
Javier Jardón 7105e8e907 tests: Use accessor functions to access GtkSelectionData 2010-12-15 23:58:15 +00:00
Kristian Rietveld a28c11a27f Clip to cell_area when rendering cell content
This fixes a GTK+ 3.0 regression.  In GTK+ 2, the render method
on GtkCellRenderer had a expose_area parameter, typically set to
cell_area.  This parameter was used for clipping cell content to be
rendered to the cell area (and thus clipping to within the focus
rectangle).  During the rendering clean up this parameter was removed
and no clipping put back into place.

Since expose_area was usually equal to cell_area anyway, it does not make
sense to reintroduce the expose_area parameter.  Instead, we do clipping at
two levels:
 - in gtk_cell_renderer_render() we clip to background_area.  We cannot
clip to cell_area here because we want to allow cell renderers to
render in the background area (e.g. background color/effect).
 - cell renderers should clip to clip_area when rendering cell
content individually (as they had to individually clip to expose_region
before).
2010-12-16 00:07:08 +01:00
Kristian Rietveld c8d130efa7 Revisit "Handle clicks in indentation area"
Check (x, y) is inside background area.  If yes, continue processing
and clamp the coordinates into cell area.  This way we will properly
handle getting a cell (which is only used for setting the focus cell)
for clicks in the indentation area (in LTR and RTL mode) and clicks
in the focus rectangle area in case focus-line-width is large.
2010-12-15 23:55:26 +01:00
Jorge González 67f6a43702 Updated Spanish translation 2010-12-15 22:00:00 +01:00
Kristian Rietveld 5399f7b6e6 Make testtreeview handle RTL environment variable for testing 2010-12-15 21:36:47 +01:00
Kristian Rietveld 8e98333d8b RTL fix for gtk_tree_view_focus_to_cursor() 2010-12-15 21:31:35 +01:00
Kristian Rietveld 92e145e719 No need to correct direction for rtl, GtkCellArea takes care of that 2010-12-15 21:27:40 +01:00
Kristian Rietveld 0112c32c5b Make testcellarea handle RTL environment variable for testing 2010-12-15 21:22:35 +01:00
Kristian Rietveld be39883de2 Correct calculation of the cell focus rectangle
The cell's focus rectangle is located around the cell's aligned area.
To get to the correct coordinates for this rectangle, we have to subtract
focus_line_width from the found aligned_area.
2010-12-15 21:17:27 +01:00
Carlos Garnacho ec82d133b1 Remove debug messages from GdkDevice 2010-12-15 15:48:43 +01:00
Benjamin Otte 198fc0b774 tests: Hardcode testinput colors instead of trying to use GtkStyle
Makes it work with new themeing APIs.
2010-12-15 14:51:26 +01:00
Benjamin Otte cae6021d3a tests: Make testiconview-keynav set its custom style using CSS. 2010-12-15 14:51:26 +01:00
Benjamin Otte 1b64655eb6 cssprovider: Explode if we fail to parse the default CSS
This can only happen if somebody really messed up with a checkin, and in
that case we want to explode early.
2010-12-15 14:51:26 +01:00
Benjamin Otte 9e393020c4 gail: Fix for new style code 2010-12-15 14:51:26 +01:00
Benjamin Otte 211ccb5c73 xim: Fix for new style code 2010-12-15 14:51:26 +01:00
Benjamin Otte d3ed729643 gtkrc: Remove unused code
Makes gcc happy.
2010-12-15 14:51:26 +01:00
Benjamin Otte e77ce71caa gtk-demo: gtk_widget_render_icon() => gtk_widget_render_icon_pixbuf() 2010-12-15 14:51:26 +01:00
Benjamin Otte e274ac4b6c tests: gtk_widget_render_icon() => gtk_widget_render_icon_pixbuf() 2010-12-15 14:51:26 +01:00
Benjamin Otte 1312f774f5 tests: gtk_widget_render_icon() => gtk_widget_render_icon_pixbuf() 2010-12-15 14:51:26 +01:00
Benjamin Otte 7caec64bc3 tests: gtk_widget_render_icon() => gtk_widget_render_icon_pixbuf() 2010-12-15 14:51:26 +01:00
Benjamin Otte 6aa745b819 tests: gtk_widget_render_icon() => gtk_widget_render_icon_pixbuf() 2010-12-15 14:51:26 +01:00
Benjamin Otte b0b9c9683b dnd-quartz: gtk_widget_render_icon() => gtk_widget_render_icon_pixbuf() 2010-12-15 14:51:25 +01:00
Benjamin Otte 88767b0af7 gdk: Don't use NULL for integers 2010-12-15 14:51:25 +01:00
Florian Müllner ce5dae6702 Complete renaming of gdk_enable_multidevice()
The function was renamed in commit c4a5c2ed4, but some places were
missed, most notably the public header.
2010-12-15 13:05:11 +01:00
Benjamin Otte 544146b9be size-request: Clamp size requests to screen size
Size requests should only ever need to return the screen's width/height
and max. This way, potentially large widgets (tree view or icon view)
don't need to do so many computations, but can stop when their computed
size has reached the screen size.
2010-12-15 10:41:20 +01:00
Matthias Clasen 208d717fef Optimize gdk_window_set_shape_combine_region
When setting no shape on an unshaped window, nothing changes,
so return early instead of recomputing lots of visibility
information.

Pointed out by Owen Taylor in bug 637156.
2010-12-14 22:21:39 -05:00
Matthias Clasen b7fd6f1e88 Remove gtk_widget_reset_shapes
See bug 637155.
2010-12-14 22:15:33 -05:00
Carlos Garnacho f9ed6baeb4 Improve docs for gtk_widget_reset_style().
Document that it may be needed in containers when
children are reordered.
2010-12-15 03:33:01 +01:00
Carlos Garnacho 44a7ef7bec Add gdk_window_[gs]et_source_events()
This function will enable events for all devices of a given
GdkInputSource, either these available at the time of the call,
or these that are connected in the future.
2010-12-15 03:17:59 +01:00
Carlos Garnacho be7de347bf xi2: Improve device hierarchy handling
The xi2 device manager now handles slaves being detached and/or
attached to a master.

gdk_device_list_slaves() has been added so it is possible to
know how slaves relate with masters. The other backends (X11 and not)
don't neeed to to anything special here since their hierarchy is
fully flat.
2010-12-15 03:17:59 +01:00
Carlos Garnacho 9f41101ccc Emit GdkDevice::changed when the slave device being used changes
When the slave device changes, the master takes the shape of the
new one, modifying its axes, this signal is more useful to catch
this situation than the n-axes property
2010-12-15 03:17:58 +01:00
Carlos Garnacho f5a20ab65a Add gdk_event_[gs]et_source_device().
This function may be used to know the hardware device that triggered
an event, it could resort to the master device in the few cases there's
not a direct hardware device to relate to the event (i.e.: crossing events
due to grabs)
2010-12-15 03:17:58 +01:00
Carlos Garnacho c4a5c2ed4b Enable XI2 by default
gdk_enable_multidevice() has been replaced with gdk_disable_multidevice(),
so applications may call that function if they want to go back at the
previous behavior.

There would be usually little reasons to call that function, unless the
application is doing X calls itself that count on old fashioned core
devices.
2010-12-15 03:17:58 +01:00
Carlos Garnacho 66800aa212 Make GtkTextView use GtkStyleContext
GtkTextAppearance still uses GdkColors, even though it could
switch to GdkRGBA with little hassle as it seems sheldomly used
out there.
2010-12-15 03:17:58 +01:00
Diego Escalante Urrelo b0560107e9 docs: fix link failure on gtk-doc scanner binaries
Bug #637243
2010-12-14 20:31:14 -05:00
Diego Escalante Urrelo 02f92f29d5 gtkstylecontext: fix typos in annotations
Fixes Bug #637256
2010-12-15 00:46:25 +00:00
Benjamin Otte 9929743f24 docs: Redo drawing area drawing docs
They don't seem to have been updated for a long time...
2010-12-14 21:10:22 +01:00
Tristan Van Berkom 8ca6bbbfc0 Make GtkCellArea independantly GtkBuildable.
Simply use the GtkCellLayoutIface hooks for this.
2010-12-14 15:52:40 +09:00
William Jon McCann 96a4fc4e5b Update about dialog design to not use a swarm of dialogs
This is a modernization of the GtkAboutDialog look done
by William Jon McCann. The most noteworthy changes are:
- no more subdialogs
- show license short text in the main dialog
- less verbose email link formatting
- the dialog is modal to its transient parent
2010-12-14 00:15:21 -05:00
Carlos Garnacho ee31a016ec Make GtkInfoBar use GtkStyleContext
All colors are defined now in the default css, and classes have
been added so the bars are fully themeable (as opposed to
gtk_widget_override_*, which require changing the color map itself)
2010-12-14 02:29:57 +01:00
Carlos Garnacho fbb75b9b5d Add headers/docs changes for gtk_theming_engine_get_font()
Apparently I didn't git add enough...
2010-12-13 22:42:05 +01:00
Carlos Garnacho afca06b362 Add getter for font description in GtkThemingEngine
This function is analogous to gtk_style_context_get_font().
2010-12-13 22:31:30 +01:00
Carlos Garnacho a517cf1bed Make GtkExpander use GtkStyleContext 2010-12-13 22:31:30 +01:00
Carlos Garnacho 89e6cad92f GtkSpinButton: Use GtkStyleContext 2010-12-13 22:31:29 +01:00
Carlos Garnacho c64a1891f8 Port GtkRange widgets to GtkStyleContext 2010-12-13 22:31:29 +01:00
Carlos Garnacho 3306305fe1 GtkNotebook: Use GtkStyleContext. 2010-12-13 22:31:29 +01:00
Carlos Garnacho 8b8eab1c81 GtkEntry: Use GtkStyleContext. 2010-12-13 22:31:28 +01:00
Carlos Garnacho 618b1a8b33 GtkCssProvider: Make selectors applying from the topmost widget rank higher
For example, for an entry within a notebook, previously these 2 rules would
have the same weight:

.entry {}
.notebook {}

Now ".entry" will rank higher than ".notebook" for the GtkEntry, further
specific selectors such as:

.notebook .entry {}

still get a higher score than the previous ones.
2010-12-13 22:31:28 +01:00
Carlos Garnacho d80868aa68 GtkThemingEngine: Render tabs background in the correct direction.
The cairo context has been already rotated, so using GTK_JUNCTION_BOTTOM
is expected to be used there.
2010-12-13 22:31:28 +01:00
Carlos Garnacho 2371ed8b87 GtkThemingEngine: handle expander transitions to active, and rtl 2010-12-13 22:31:28 +01:00
Carlos Garnacho 1f697f2695 GtkThemingEngine: remove unused variable 2010-12-13 22:31:27 +01:00
Carlos Garnacho 99f59d8266 Fix coalescing of state animation areas for multiple window widgets.
Coordinates needed to be translated relative to the window position
in within the widget.
2010-12-13 22:31:27 +01:00
Paolo Borelli f285a84bd6 Add convenience function for the font description. 2010-12-13 22:31:27 +01:00
Tristan Van Berkom e2c8ecba30 Fixed an error in my last commit in gtk_cell_area_box_context_copy(). 2010-12-13 19:13:43 +09:00
Tristan Van Berkom 623abdedf6 Added gtk_entry_completion_new_with_area() 2010-12-13 15:58:07 +09:00
Tristan Van Berkom 96d636a780 Updated some docs and gtk.symbols file for new apis
Added gtk_cell_area_context_get_preferred_height_for_width and
width_for_height & gtk_cell_area_copy_context() to gtk.symbols
and gtk3-sections.txt (also finished up documenting those apis).
2010-12-13 15:43:58 +09:00
Tristan Van Berkom 41cd9d1394 Fixed gtk_cell_area_box_context_copy() to also copy it's allocations. 2010-12-13 15:37:12 +09:00
Kristian Rietveld d743ecf82e Handle clicks in indentation area
For this case, we want to set focus on the first cell in the column.
2010-12-12 17:32:59 +01:00
Tristan Van Berkom 2e1e97305f Make GtkTreeView explicitly focus the first cell in the first column when grabbing focus
When focus is initially grabbed and there is no focus column, when selecting
the first column for focus, further explicitly focus into the first cell
using gtk_cell_area_focus().
2010-12-12 17:21:28 +01:00
Tristan Van Berkom 31226ebfb2 Fixed GtkTreeView to give focus back to the last focued cell when hitting
the edge.

When focusing left/right or up/down inside GtkCellArea, now we save what
was the last focused cell and if we hit the side (or top or bottom) of
the view we then restore focus to the last focused cell.
2010-12-12 17:21:28 +01:00
Tristan Van Berkom 7e526d57f0 Add an editable cell to testverticalcells showing functional vertical focus navigation. 2010-12-12 17:21:28 +01:00
Tristan Van Berkom 632f1f3ac4 Modified gtk_tree_view_move_cursor_up_down to move focus inside the cell area
This currently leaves us the problem of maintaining the right cell in
focus for horizontal areas, the solution for that comming in the
next patch.
2010-12-12 17:21:28 +01:00
Tristan Van Berkom 2752fd0f16 Removing gtk_tree_view_move_focus_column() and only calling gtk_cell_area_focus()
This function did alot of nothing, gtk_cell_area_focus() simply returns whether
the focus stays in the area (column) or not, seems not to cause regressions to
just call it directly instead.
2010-12-12 17:21:28 +01:00
Tristan Van Berkom 0431dd67f8 Added apis to GtkCellArea for GtkIconView purposes.
Added a few apis,

  - GtkCellAreaContext get_preferred_height_for_width &
    width for height apis and vfuncs, this lets the icon view
    request the collective (and aligned) height for width for
    a said row.

  - gtk_cell_area_copy_context() this creates a duplicate of
    an already created and requested context, this way the icon
    view uses a global context to request the widths of all rows
    and then makes a copy with all the stored alignments and
    uses a separate copy to calculate the height and alignments
    of each row separately.
2010-12-13 00:29:21 +09:00
Kristian Rietveld ff39c76bfd Welcome _gtk_tree_view_column_get_cell_at_pos to the second dimension 2010-12-12 15:22:49 +01:00
Kristian Rietveld cbfc3f5bf0 Make gtk_tree_view_get_cell_area() aware of row separators 2010-12-12 15:09:27 +01:00
Kristian Rietveld 8c743a0363 Add unit test for row separator height 2010-12-12 15:03:33 +01:00
Kristian Rietveld d142d8bb6c Do not enforce a minimum of expander_size in gtk_tree_view_get_row_height
Instead this is now enforced in gtk_tree_view_get_cell_area_height().
There are rows for which a height in between 0 and expander_size is
allowed, for example separator rows.
2010-12-12 14:34:26 +01:00
Tristan Van Berkom 1c8093b65e Fixed some glitches in GtkCellAreaBox keynav from my last commit. 2010-12-12 20:40:34 +09:00
Tristan Van Berkom 89b3700b78 Make GtkCellAreaBox remember what was the last focus cell so that when
cycling focus from row to row for a horizontal area we can remember
where focus was the last time around.
2010-12-12 20:40:26 +09:00
Tristan Van Berkom 2f4e451075 Added "edit_only" argument to gtk_cell_area_activate()
This argument allows the caller to specify that only an editable
cell should start editing but an activatable cell should not toggle
it's state, this is important for public apis like
gtk_tree_view_set_cursor_on_cell() which are only intended to
programatically bring attention to the editing of a specific
row or cell but not actually change any data.

GtkTreeView & CellAreaScaffold updated for the last minute api change.
2010-12-12 17:15:46 +09:00
Tristan Van Berkom 46c49ee260 Removed the resetting_context flag from GtkTreeViewColumn private data
No longer need to detect if we're currently resetting the context since
the context properly now avoids re-triggering the reset by properly
avoiding to notify properties that dont change as a result of the reset.
2010-12-12 16:43:07 +09:00
Tristan Van Berkom fa71b24e9a Fixed gtk_cell_area_context_real_reset() to only notify properties if they change. 2010-12-12 16:42:37 +09:00
Milan Bouchet-Valat 029083454b [GtkComboBoxText] Add checks for id-column/entry-text-column >= 0
If the GtkComboBoxText doesn't have id-column or entry-text-column
set for some reason (value -1), better warn and return. Else, unrelated
assertions fail, and warnings from gtk_tree_model_get_column_type()
are printed, which are not really obvious.

https://bugzilla.gnome.org/show_bug.cgi?id=637018
2010-12-11 19:10:51 +01:00
Matthias Clasen 3b90d877b7 Remove unused header 2010-12-10 23:39:10 -05:00
Matthias Clasen 948ab1a168 Don't access GdkVisual fields directly
Use accessors instead.
2010-12-10 02:32:18 -05:00
Matthias Clasen 83204928b9 Don't access GdkDragContext fields directly
Instead use the accessors.
2010-12-10 00:59:07 -05:00
Matthias Clasen fe5e0e4502 Add some forgotten accessors for GdkDragContext
These fields are accessed in gtk.
2010-12-10 00:58:33 -05:00
Martyn Russell bb87eada6b gtksearchenginetracker: Update to work with libtracker-sparql
libtracker-sparql is available in Tracker 0.9/0.10
2010-12-09 23:53:51 +00:00
Benjamin Otte ddb5e12e61 docs: Reinstate pixbufs section in GDK docs
It was accidentally removed in 0775b0a858
2010-12-09 23:56:25 +01:00
Benjamin Otte 3070d6e3d5 Revert "docs: Reinstate pixbufs section in GDK docs"
I committed my whole working tee instead of just one file. Ooops.
This reverts commit ded14b2562.
2010-12-09 23:55:33 +01:00
Benjamin Otte ded14b2562 docs: Reinstate pixbufs section in GDK docs
It was accidentally removed in 0775b0a858
2010-12-09 11:14:21 +01:00
Tristan Van Berkom 95ca1e241c Removed calculation of background area when about to edit a cell (no need to check the background area of the cell in this case). 2010-12-09 13:59:17 +09:00
Tristan Van Berkom 32d9396f00 Changed misleading variable name in gtk_cell_area_real_activate. 2010-12-09 13:59:04 +09:00
Guillaume Desmottes 107cebe546 gtk_css_provider_get_named: don't leak subpath (#636777) 2010-12-08 21:13:03 -05:00
Matthias Clasen 05abea6c4f Add missing include
See bug 636732
2010-12-08 11:49:48 -05:00
Marek Kasik da85312097 Mark conflicts when printer has changed
Schedule marking of conflicts when printer has changed.
Map conflict warning immediately. (#635401)
2010-12-08 17:37:27 +01:00
Carlos Garcia Campos 24e832187f GtkCellRendererPixbuf: Use gtk_widget_render_icon_pixbuf()
Instead of gtk_widget_render_icon() which is now deprecated.
2010-12-08 17:16:02 +01:00
Carlos Garcia Campos e779b8f249 GtkIconFactory: mention gtk_widget_render_icon_pixbuf() in docs
Instead of gtk_widget_render_icon() which is now deprecated.
2010-12-08 17:15:25 +01:00
Carlos Garcia Campos 3a3a4e8f3b GtkStatusIcon: Use gtk_widget_render_icon_pixbuf()
Instead of gtk_widget_render_icon() which is now deprecated.
2010-12-08 17:14:48 +01:00
Carlos Garcia Campos 2dde04140d GtkImage: Use gtk_widget_render_icon_pixbuf()
Instead of gtk_widget_render_icon() which is now deprecated.
2010-12-08 17:13:43 +01:00
Carlos Garcia Campos e2100b13d0 GtkFileChooser: Use gtk_widget_render_icon_pixbuf()
Instead of gtk_widget_render_icon() which is now deprecated.
2010-12-08 17:12:59 +01:00
Carlos Garcia Campos a5dba1670e GtkEntry: Use gtk_widget_render_icon_pixbuf()
Instead of gtk_widget_render_icon() which is now deprecated.
2010-12-08 17:12:14 +01:00
Carlos Garcia Campos 8017092977 dnd: Use gtk_widget_render_icon_pixbuf()
Instead of gtk_widget_render_icon() which is now deprecated.
2010-12-08 17:10:34 +01:00
Carlos Garcia Campos 5582bd23fb Add gtk_widget_render_icon_pixbuf() prototype to gtkwidget.h
And move gtk_widget_render_icon() to deprecation guards block
2010-12-08 16:46:57 +01:00
Paolo Borelli 61731c65aa Annotate ColorButton get_color and get_rgba. 2010-12-08 15:30:42 +01:00
Paolo Borelli f5d7a63aff Fix gtk_builder_add_objects_from_file g-i annotation
Use the same annotation already used for add_objects_from_string
2010-12-08 15:15:50 +01:00
Tristan Van Berkom f1c26dfdb2 Fixed gtk-docs typo in gtkcellarea.c 2010-12-08 22:31:33 +09:00
Tristan Van Berkom 40e9f91f43 Fixed foreach_alloc call from gtk_cell_area_real_render to pass the real background area. 2010-12-08 21:27:52 +09:00
Tristan Van Berkom 34f4b5c190 Added 'background_area' calculation to GtkCellAreaClass->foreach_alloc vfunc
This allows us to reduce code allocation code paths in subclasses, as
a result GtkCellArea implements the ->render() vfunc and the subclass
only decides the cell area and background area distributions in a single
code path.
2010-12-08 21:18:05 +09:00
Robert Ancell 6188ea608f Add missing X11/Xlib.h include required for X11/extensions/sync.h 2010-12-08 18:44:20 +11:00
Tristan Van Berkom a47a557fc3 Merge branch 'master' into treeview-refactor 2010-12-08 15:24:49 +09:00
Milan Bouchet-Valat 13209a9a6c More annotations for GdkDisplay
Mostly (out), and a few (allow-none) for parameters.
2010-12-07 19:12:57 +01:00
Matthias Clasen 38321eacbf GtkStyleContext migration guide tweaks
Move the guide into the 2-to-3 guide, since it is something
you have to do when porting from 2 to 3. Also add an example
for handling of temporary state changes and some more text
about color handling.
2010-12-07 12:59:17 -05:00
Matthias Clasen 5ac194c2d7 Some doc additions 2010-12-07 09:55:30 -05:00
Tristan Van Berkom fc5cabba90 Added minimum size parameter to GtkWidgetClass->adjust_size_allocation.
This allows us to add a check before executing
->get_preferred_height_for_width() to ensure we always
request for at least the minimum required size (and lets
us remove the warning in gtkcontainer.c telling implementors
to do this check manually from thier container implementations).
2010-12-07 23:47:40 +09:00
Cosimo Cecchi 503be10148 label: plug a memory leak 2010-12-07 10:13:32 +01:00
Cosimo Cecchi 6f67f5281f app-chooser-widget: plug a memory leak 2010-12-07 10:08:47 +01:00
Tristan Van Berkom 5fef00de2c Adding gtk_tree_view_column_new_with_area to gtk.symbols and gtk3-sections.txt. 2010-12-07 17:04:04 +09:00
Tristan Van Berkom 1b33698384 Revert "Temporary fix to make separator rows request enough space for the expander size."
This reverts commit 515af9ce70.
2010-12-07 14:09:26 +09:00
Tristan Van Berkom 515af9ce70 Temporary fix to make separator rows request enough space for the expander size.
This fix is incorrect, treeviews dont rely on the expander size for drawing
separator rows (added XXX comment in line), need to fix this somewhere else
2010-12-07 13:52:31 +09:00
Tristan Van Berkom 97e060b094 Fixed my mistake in validate_row (), now the height of treeviews in GtkEntryCompletion is correct again. 2010-12-07 13:52:18 +09:00
Matthias Clasen 509e0423e1 Bump version 2010-12-06 20:37:30 -05:00
Matthias Clasen fae1e74812 More !srcdir fixes for the stylecontext test 2010-12-06 19:05:18 -05:00
Matthias Clasen 26f6b48ccb Update for the removal of gtk_decorated_window_ apis 2010-12-06 17:44:12 -05:00
Matthias Clasen fe008de12c Fix POTFILES for recent changes 2010-12-06 14:35:13 -05:00
Matthias Clasen f2ab9e497d Prepare the stylecontext test to run out-of-srcdir
This is necessary to make distcheck work.
2010-12-06 14:13:07 -05:00
Matthias Clasen ad80cb6279 Allow + in identifiers
This is necessary since we treat paths as identifiers in
@import rules, and it is common to have a + in there (at least
when distchecking gtk+ ...)
2010-12-06 14:13:07 -05:00
Benjamin Otte 9b042e39ec gdk: Add section docs for GdkRGBA 2010-12-06 18:57:11 +01:00
Benjamin Otte fc711434bc gtk: Remove old DirectFB code for drawing window decorations
I'm not sure it'd even compile.
2010-12-06 18:57:11 +01:00
Benjamin Otte 8f8aeb7dfe gdk: Remove GdkWindowObject typedef
It's unused by now.
2010-12-06 18:57:11 +01:00
Kjartan Maraas 48e92c6939 Updated Norwegian bokmål translation 2010-12-06 18:14:03 +01:00
Colin Walters 65e3c09139 introspection: Fix (out) for gdk_screen_get_monitor_geometry
Scanner doesn't detect this case correctly because it's a typedef;
work around it here by explicitly specifying that it's caller
allocates.  See bug 636393 for the scanner issue.
2010-12-06 11:42:47 -05:00
Colin Walters 66f0f55b62 configure: Drop AC_PREREQ back down to 2.62
Commit 39f5740763 bumped the
autoconf version to 2.64 with no explicit rationale.  It looks
to me like a copy-and-paste error.  Reverting back to 2.62 (the
previous version).  2.63 at least (RHEL6) works here.
2010-12-06 11:27:57 -05:00
Matthias Clasen 96139cbb00 Update NEWS for 2.91.6 2010-12-06 10:56:03 -05:00
Matthias Clasen 48dba326c2 Disable theme engines for now
They need to be ported to GtkThemingEngine.
2010-12-06 10:19:00 -05:00
Murray Cumming d23fb64d97 Fix a typo to fix the build. 2010-12-06 16:01:55 +01:00
Matthias Clasen 5f75ffc974 Add gtk_widget_path_get_type to the headers
Bug 636591
2010-12-06 09:50:01 -05:00
Kristian Rietveld fd6e57687d Port Quartz backend to latest rendering-cleanup changes 2010-12-06 14:15:47 +01:00
Matthias Clasen 3b753aa05e Fix Makefile syntax 2010-12-06 07:26:00 -05:00
Tristan Van Berkom 55bbe4a3a5 Adding gtk_tree_view_column_new_with_area().
Creates a treeviewcolumn using a specific GtkCellArea.
This patch also makes GtkEntryCompletion use the new api
instead of g_object_new().
2010-12-06 19:04:51 +09:00
Tristan Van Berkom f08f1f92aa Fixed some nit-picking bugs in GtkCellArea
- Dont try fetching a cell renderer for an event when the event
    coordinate is outside the cell area allocation (can happen
    on the y axis, not all events are button events).
  - Dont remove focus-line-width (inner area) an extra time from
    GtkCellArea->event
  - Dont remove focus-line-width from the cell area at all for the
    editable widget... use the whole area including the focus line
    (compared with git master behaviour and now it looks right, check
    the multiline editable string in testtreeedit).
2010-12-06 17:27:03 +09:00
Tristan Van Berkom 0d0ec85877 Fixed GtkTreeViewColumn to reset the context when _gtk_tree_view_column_cell_set_dirty is called.
This fixes autosize columns... result can be viewable by checking
tests/testtreeview and setting the second column to autosize and then
expanding/colapsing some rows.
2010-12-06 17:03:53 +09:00
Tristan Van Berkom bf1aa2ad87 Changed GtkTreeViewColumn->requested_width to ->padding
Now we bookkeep the treeview assigned padding asides from the
requested width stored in the GtkCellAreaContext, this removes
the need for bookkeeping the deepest expanded depth in gtktreeview.c

At allocation time, just remove the padding from the allocated width
of the column and feed the rest to the underlying cell area.
2010-12-06 16:31:07 +09:00
Tristan Van Berkom a090d62339 Added expand controls to testtreeedit (now you can play with align & expand effects in cells there). 2010-12-06 16:30:18 +09:00
Tristan Van Berkom 9366a345b4 Fix GtkCellAreaBox allocate_cells_manually to handle undersized areas. 2010-12-06 16:29:40 +09:00
Tristan Van Berkom c6572265cb Fixed gtk-doc statement in GtkCellArea header 2010-12-06 16:29:13 +09:00
Matthias Clasen f1fafca6ca Make invalid stylesheets fail to parse again
The recent improvements to error reporting caused gtk_css_provider_load...
to always return TRUE and leave the error unset. Error messages were instead
dumped out with g_message, which is not helpful.

This commit changes things back to the way they were before:
If a GError is passed in, parsing will fail at the first error, reporting
it in the given GError. If no GError is passed in, we keep going and
just issue the warning messages. This fixes the parser tests.
2010-12-06 00:47:13 -05:00
Matthias Clasen 94c9eb72ce Don't use g_warning when loading an engine fails
This causes the tests to abort if clearlooks can't be found.
2010-12-06 00:44:01 -05:00
Tristan Van Berkom 2588165bfb Added gtk_cell_area_foreach_alloc() to further simplify GtkCellArea subclasses
gtk_cell_area_foreach_alloc() itterates over an allocated list of cells
and calls a callback with the cell's allocation until the callback returns
TRUE.
  - Removed vfunc get_cell_allocation() and implemented
    gtk_cell_area_get_cell_allocation() using foreach_alloc()
  - Added gtk_cell_area_get_cell_at_position() using foreach_alloc()
  - Removed GtkCellAreaBox ->event() implementation and implemented
    mouse "click" cell activation in GtkCellArea class directly using
    gtk_cell_area_get_cell_at_position().
2010-12-06 14:11:28 +09:00
Tristan Van Berkom 4b065f5389 Changed gtk_cell_area_forall to gtk_cell_area_foreach since thats more widely used semantics.
Also gave a boolean return value to the callback to allow breaking out of the loop.
2010-12-06 12:41:38 +09:00
Benjamin Otte d378470e87 appchooser: Remove bogus function declaration 2010-12-06 01:30:19 +01:00
Benjamin Otte 6d6ee9a26a style: Remove unused code 2010-12-06 01:02:52 +01:00
Benjamin Otte e4c9d1a321 gdk: Constify argument to gdk_rgba_copy() 2010-12-06 01:02:52 +01:00
Benjamin Otte d55073fde6 gdk: Remove depth argument from GdkWindowImpl->get_geometry() 2010-12-06 01:02:52 +01:00
Benjamin Otte 645d0ac403 API: gdk: Remove depth argument from gdk_window_get_geometry()
We don't want to expose depth anymore. If you need it, query the visual.
2010-12-06 01:02:52 +01:00
Benjamin Otte 84fd9b166c gdk: Remove nonexisting function from internal header 2010-12-06 01:02:19 +01:00
Paolo Borelli b36cb87df9 Use the new style context API in GtkButton
Mostly replaces gtk_widget_style_get with gtk_style_context_get_style
2010-12-05 23:12:32 +01:00
Paolo Borelli 4a7e746bbc Use the new style context API in GtkLabel. 2010-12-05 22:07:30 +01:00
Paolo Borelli 561346bd40 Remove unused function modify_color_property 2010-12-05 22:07:30 +01:00
Carlos Garnacho 4cca7554b8 GtkStyleContext: warn on meaningless coords in gtk_render_* calls 2010-12-05 20:19:55 +01:00
Carlos Garnacho 5361490db8 Bug 636511 - New style override functions do not work on textview
Emit ::style-set on overrider style changes, this is necessary
in the mean time so widgets not listening yet to ::style-updated
get the style changes.
2010-12-05 20:19:55 +01:00
Jorge González 059aa89cbd Updated Spanish translation 2010-12-05 18:33:31 +01:00
Kristian Rietveld d28cbd6e6d Bring back _gtk_tree_view_column_get_cell_at_pos
The function has been re-implemented around GtkCellArea.  This commits
also brings back the invocation of this function in
gtk_tree_view_button_press().  I shouldn't have removed this.
2010-12-05 18:18:36 +01:00
Matthias Clasen d5df33c75f Fix abi check after recent merges 2010-12-05 12:18:30 -05:00
Kristian Rietveld 2a6550176c Replace FIRST_PIXEL macros with something that's more clear 2010-12-05 18:04:07 +01:00
Kristian Rietveld 7fe950a745 Clean up and clarify row height calculations 2010-12-05 17:56:30 +01:00
Kristian Rietveld 924359c31d Clean up _gtk_tree_view_column_cell_event 2010-12-05 17:12:37 +01:00
Kristian Rietveld 6c73647727 Remove the need for _gtk_tree_view_column_get_focus_area 2010-12-05 17:10:21 +01:00
Kristian Rietveld 64ddd3f40f Clarify start_pos parameter gtk_tree_view_column_cell_get_position
By renaming it to x_offset.
2010-12-05 17:04:52 +01:00
Kristian Rietveld 77d972e436 Remove private accessor for focus column 2010-12-05 15:20:17 +01:00
Kristian Rietveld 0a1982aff3 Move _gtk_tree_view_column_cell_focus to gtktreeview.c 2010-12-05 15:18:13 +01:00
Kristian Rietveld 131783005e Use structure bitfield instead of GtkTreeViewFlags 2010-12-05 15:12:53 +01:00
Fran Diéguez 4701aeb3bc Updated Galician translations 2010-12-05 14:57:08 +01:00
Kristian Rietveld 73f99eda1d Turn TREE_VIEW_DRAW_EXPANDERS into an inline function 2010-12-05 14:47:51 +01:00
Kristian Rietveld ebba08a842 Remove unused TREE_VIEW_COLUMN_REQUESTED_WIDTH macro 2010-12-05 14:42:40 +01:00
Kristian Rietveld 43de55d7a9 Turn TREE_VIEW_HEADER_HEIGHT into an inline function 2010-12-05 14:42:08 +01:00
Tristan Van Berkom 364fe807f4 Added g_getenv("RTL") to test rtl layouting. 2010-12-05 22:15:31 +09:00
Tristan Van Berkom 3ca2ec5d2d Fixed conflicts from rebasing GtkTreeViewColumn changes from treeview-refactor. 2010-12-05 22:15:19 +09:00
Tristan Van Berkom 847581b67c Adding testverticalcells.c.
This test displays a GtkTreeViewColumn rendering a vertically
oriented GtkCellArea along side a horizontally oriented column
in the same treeview.
2010-12-05 22:15:03 +09:00
Tristan Van Berkom 78979b2954 Removing hack and fixing gtk_tree_view_column_cell_get_size().
Now consult gtk_cell_area_context_get_preferred_height().

It can be that height-for-widths requested here were too large
when multiple cells are in play because of the alignments stored
in the context... removing the temporary focus-line-width hack.
2010-12-05 22:14:52 +09:00
Tristan Van Berkom 1b28d87253 Added GtkTreeViewColumn:cell-area construct-only property.
Allow feeding treeviewcolumn a custom cell-area (or not a custom one,
but allow sharing the cell-area with say, the combo-box area).

This patch also:

 - Fixes signal connections to the area (now they do eventually get
   disconnected at dispose time, they are handled regardless if a
   treeview is set but execute safely, at least there is only one
   connection/disconnection).

 - Fixes refcounting on the cell_area (GtkCellArea is GInitiallyUnowned).

 - Adds a constructor() in order to build the cell-area if one has
   not been provided by the caller before hand at g_object_new()
   construct time.
2010-12-05 22:14:40 +09:00
Tristan Van Berkom 0baee408f2 Fixed GtkTreeViewColumn allocation to only subtract the depth padding/indentation from the expander column. 2010-12-05 22:14:27 +09:00
Tristan Van Berkom 779125976c Changed GtkTreeView to bookkeep the deepest expanded depth instead of recalculating it at column allocation time. 2010-12-05 22:14:11 +09:00
Tristan Van Berkom b54c004c6b Allocate proper inner cell area to the GtkTreeViewColumn.
This is a premature patch, it traverses the tree's expanded
rows and fetches the deepest depth every time we allocate a
column. The deepest depth should rather be cached and pushed
when a row expands, then recalculated when the deepest expanded
row collapses.
2010-12-05 22:13:58 +09:00
Tristan Van Berkom 81e1d02de3 Created _gtk_tree_view_column_request_width().
Removed gtk_tree_view_get_real_requested_width_from_column() from
gtktreeview.c in favor of this function in the treeviewcolumn domain
(since this function goes and checks treeviewcolumn internals, settings
and derives the real requested width, seems logical this should be done
by the treeviewcolumn instead).
2010-12-05 22:12:16 +09:00
Tristan Van Berkom 7b36405a94 Use gtk_tree_view_get_real_requested_width_from_column() all around
GtkTreeView duplicated the contents of this function word-for-word
inside gtk_tree_view_update_size().
2010-12-05 22:12:04 +09:00
Tristan Van Berkom cf8299f098 Changed _gtk_tree_view_column_set_width for _gtk_tree_view_column_allocate
Now the GtkTreeViewColumn takes care of move/resizing its window and
allocating its button (except for the special case of current drag_column
where the column doesnt actually get reallocated).
2010-12-05 22:11:50 +09:00
Tristan Van Berkom 4038cd76b3 Removed GtkTreeViewPrivate from gtktreeprivate.h and added a few more accessors.
This actually much simplifies interaction with GtkTreeSelection
(at least reduces code size where dealing width the treeview anchor path).
2010-12-05 22:11:37 +09:00
Tristan Van Berkom 4b5c80dc0f Removed the private sharing of internal treeview macros from gtktreeprivate.h
Added them directly to gtktreeview.c.
2010-12-05 22:11:21 +09:00
Tristan Van Berkom 9f4f22faf1 Removed all variables from GtkTreeViewColumn and created GtkTreeViewColumnPrivate
Some details:
  - button_request was not needed, consult the minimum request of the button
  - gtk_tree_view_column_get_button() needed to be public as people can set
    tooltips on the button (and libgail accesses the button).
2010-12-05 22:11:08 +09:00
Kristian Rietveld 137f16c4c5 Do not bother starting a draw call if bar_size <= 0 2010-12-05 13:57:04 +01:00
Yaron Shahrabani 86c8ce1cc0 Updated Hebrew translation 2010-12-05 14:14:03 +02:00
Paolo Borelli e0efd067e4 Avoid memory corruption in the color_properties hashtable. 2010-12-05 12:30:28 +01:00
Tristan Van Berkom f24c21f1f0 Added proper handling of right to left layouting of cells to GtkCellAreaBox. 2010-12-05 15:24:19 +09:00
Tristan Van Berkom c6e1463d1e Added different icon at the end of testtreeedit to see if RTL is actually working. 2010-12-05 15:24:05 +09:00
Tristan Van Berkom 7b61cd8257 Merge branch 'master' into treeview-refactor 2010-12-05 13:14:39 +09:00
Javier Jardón d351b40a0b Add internal accessor for GtkEntry->is_cell_renderer
This fixes commit fb3429e507
2010-12-04 22:06:02 -05:00
Matthias Clasen 5fdc140dd8 Fix a segfault in gdk_window_beep
Not a good idea to cast an instance to a class...
2010-12-04 17:25:40 -05:00
Matthias Clasen afcd50d607 Try again to fix the gdk symbol list
Grr, gdk_window_class_class_get_type should have been
gdk_window_window_class_get_type.
2010-12-04 16:32:02 -05:00
Matthias Clasen 144c3fd478 Fix gdk_rgba_parse call 2010-12-04 16:16:29 -05:00
Carlos Garnacho 37719380ae Fix call to gtk_widget_override_cursor() 2010-12-04 18:26:34 +01:00
Carlos Garnacho 3d28adf317 Make gtk_widget_override_cursor() take GdkRGBAs
Even though the style properties have the GdkColor type, the other
gtk_widget_override_* API takes RGBA colors, so it is consistent
now.
2010-12-04 17:49:28 +01:00
Tristan Van Berkom 0d786985a3 Merge branch 'master' into treeview-refactor
Conflicts:
	gtk/gtkmarshalers.list
	tests/Makefile.am
2010-12-05 00:36:37 +09:00
Paolo Borelli cd76b057e9 Annotate gdk_window_get_geometry, get_position and get_origin 2010-12-04 15:47:50 +01:00
Carlos Garnacho 1c87180d5d GtkThemingEngine: Fix parameters for gtk_theming_engine_lookup_color() 2010-12-04 15:39:58 +01:00
Carlos Garnacho 8c02445bc5 testgtk: Fix gdk_rgba_parse() arguments. 2010-12-04 15:39:58 +01:00
Carlos Garnacho 0cba2dc726 GtkCssProvider: Improve error handling and reporting.
Nicer error reports are provided, and a GError can be spread from
anywhere in parsing, so over time more precise and meaningful
messages can be produced.
2010-12-04 15:39:57 +01:00
Carlos Garnacho 06d8676354 GtkThemingEngine: Be a bit more robust against missing essential properties. 2010-12-04 15:39:57 +01:00
Carlos Garcia Campos 07eeae1582 GtkWidget: add gtk_widget_render_icon_pixbuf()
and deprecate gtk_widget_render_icon()
2010-12-04 15:39:57 +01:00
Carlos Garcia Campos 905ba2f198 GtkIconFactory: add gtk_icon_set_render_icon_pixbuf()
and deprecate gtk_icon_set_render_icon().
2010-12-04 15:39:57 +01:00
Carlos Garcia Campos b75972d0ce GtkStyle: set style context state before calling gtk_render_icon_pixbuf() 2010-12-04 15:39:56 +01:00
Carlos Garcia Campos ca59b042df GtkStyle: make context property readable 2010-12-04 15:39:56 +01:00
Carlos Garcia Campos 15d997d58a GtkWidget: queue a resize when style context changed 2010-12-04 15:39:56 +01:00
Carlos Garcia Campos f261d56da3 GtkStyleContext: invalidate icon caches when resetting widgets 2010-12-04 15:39:56 +01:00
Carlos Garcia Campos 3b3307b946 Use gtk_style_context_reset_widgets() instead of gtk_rc_reset_styles() 2010-12-04 15:39:56 +01:00
Carlos Garcia Campos a8c8c23c77 GtkSettings: add _gtk_settings_get_screen() private method 2010-12-04 15:39:55 +01:00
Carlos Garnacho 47add6c7c3 Block direct #including in style headers 2010-12-04 15:39:55 +01:00
Carlos Garnacho bacb7906f2 Add helper API for getting colors/borders in GtkStyleContext/GtkThemingEngine 2010-12-04 15:39:55 +01:00
Carlos Garnacho 3e8d138ed6 GtkStyleProperties: Refactor color/gradient resolution 2010-12-04 15:39:55 +01:00
Carlos Garnacho 9aca6c8071 GtkWidget: Add gtk_widget_override_cursor().
This function replaces gtk_widget_modify_cursor().
2010-12-04 15:39:54 +01:00
Carlos Garnacho b0c87faa50 Add GtkModifierStyle as a private object
This object backs up gtk_widget_override_* operations. This object
is not meant to be public because any intention to modify widgets'
style in a themeable way should involve using regions/classes, so
they're modifiable through CSS. As such, the API is really
short-scoped.
2010-12-04 15:39:54 +01:00
Carlos Garnacho 0d2d60cf8a Gtk9Slice: Fix stretch rendering.
"Nearest" filter used when scaling the image, so image borders
aren't blurred.
2010-12-04 15:39:54 +01:00
Carlos Garnacho afeac82fbd GtkThemingEngine: Add gtk_theming_engine_lookup_color()
It could also be handy for theme engines...
2010-12-04 15:39:53 +01:00
Carlos Garnacho 066f35bf28 Parse user CSS from $XDG_CONFIG_HOME/gtk-3.0/gtk.css 2010-12-04 15:39:53 +01:00
Carlos Garnacho 9bdb7e6945 GtkThemingEngine: Remove unused variables 2010-12-04 15:39:53 +01:00
Carlos Garnacho 901af8fec8 Fix compiler warnings. 2010-12-04 15:39:52 +01:00
Carlos Garnacho cf0bd12e6c GtkStyleProperties: Turn border-width into a GtkBorder property.
All current users of this CSS property have been updated to deal
with a GtkBorder.

Also a 0 border width has been set in the default CSS to ensure
GtkStyleContext and GtkThemingEngine always provide a non-NULL
pointer for this property.
2010-12-04 15:39:52 +01:00
Carlos Garnacho f7e7201f11 Fix docs typo. 2010-12-04 15:39:51 +01:00
Carlos Garnacho daab45565a GtkCssProvider: Fix up state matching when looking up style properties. 2010-12-04 15:39:51 +01:00
Carlos Garnacho 297fa7a3dd GtkStyleProvider: Add GtkStateFlags parameter to get_style_property().
Widget style properties can now have different values depending on the
current state.
2010-12-04 15:39:51 +01:00
Carlos Garnacho 2ca905db5e GtkStyleContext: Handle directionality when picking next provider. 2010-12-04 15:39:50 +01:00
Carlos Garnacho 46de2130d3 GtkWidget: unset NULL properties when overriding style. 2010-12-04 15:39:50 +01:00
Carlos Garnacho 64b7d9e5c1 GtkThemingEngine: Render gradients in tabs.
Background will be actually rotated in tabs, so the "bottom" side coincides
with the junction point, this makes gradients work as expected in rotated tabs.
2010-12-04 15:39:50 +01:00
Carlos Garnacho 32c2b13969 GtkThemingEngine: split background rendering to a private function. 2010-12-04 15:39:50 +01:00
Carlos Garnacho 4c1a2426d4 GtkStyle: Commit a few typos when translating states. 2010-12-04 15:39:49 +01:00
Carlos Garcia Campos 4aaf193602 docs: gtk_style_context_get_screen() always returns a valid screen 2010-12-04 15:39:49 +01:00
Carlos Garcia Campos 7a5a622998 Check screen really changed before notifying it and invalidating the context 2010-12-04 15:39:49 +01:00
Carlos Garcia Campos 7abf76fbc1 Initialize screen of GtkStyleContext to default screen 2010-12-04 15:39:48 +01:00
Matthias Clasen 587c08a151 Add explanation to failing test 2010-12-04 15:39:48 +01:00
Matthias Clasen 12d6b5889d Add a testcase a problem with style property handling 2010-12-04 15:39:48 +01:00
Matthias Clasen f86e8f7512 Allow images for background-image
In addition to -gtk-gradient(...), allow url(path), and create
a pattern from the image. Still to do: allow stretch/repeat options.
2010-12-04 15:39:48 +01:00
Matthias Clasen ca143b1303 Add list of classes and regions to the docs 2010-12-04 15:39:48 +01:00
Matthias Clasen 897c370f5f Avoid compiler warnings 2010-12-04 15:39:47 +01:00
Matthias Clasen 5adfe6029d Don't add class "scrollbar" for every trough
Turns out "trough" as a detail string is used in a variety
of widgets, not all of which are scrollbars.
2010-12-04 15:39:47 +01:00
Matthias Clasen 2578f4f4c3 Trivial doc fixes 2010-12-04 15:39:47 +01:00
Matthias Clasen e598f17871 Some header cleanups
Move GtkGradient to their own files, also move GtkBorder out of
gtkstyle.h, so that header can be all deprecated.
2010-12-04 15:39:47 +01:00
Matthias Clasen 1915a19503 Add deprecation notes 2010-12-04 15:39:46 +01:00
Matthias Clasen f8a874abb1 Initial attempt at deprecating GtkStyle api
This will probably need some finetuning.
2010-12-04 15:39:46 +01:00
Matthias Clasen e374f7e4b5 Forgotten files 2010-12-04 15:39:46 +01:00
Matthias Clasen 757837b611 Make tests compile without using GtkStyle api 2010-12-04 15:39:46 +01:00
Matthias Clasen 9b1118a35d Port gtk3-demo to GtkStyleContext 2010-12-04 15:39:46 +01:00
Matthias Clasen bbca96044e Fix memory handling when dealing with colors 2010-12-04 15:39:45 +01:00
Matthias Clasen ab0a8fc17f Improve the migration guide
Add some hints about dealing with colors.
2010-12-04 15:39:45 +01:00
Matthias Clasen 53c2114356 Deprecate gtk_icon_info_load_symbolic_for_style
We might end removing it altogether since it is a bit silly to have
Since: 3.0
Deprecated: 3.0
2010-12-04 15:39:45 +01:00
Carlos Garnacho e9ef162d4c GtkSpinner: Use style context for rendering.
Animation is now handled by the theming layer, a looping animation
has been defined in the default CSS to handle active spinners.
2010-12-04 15:39:45 +01:00
Carlos Garnacho 3d956b10ee GtkStyleContext: handle prelight transitions 2010-12-04 15:39:44 +01:00
Carlos Garnacho c90bee16ba GtkThemingEngine: Handle prelight transitions in render_layout() 2010-12-04 15:39:44 +01:00
Carlos Garnacho e696c24f08 GtkThemingEngine: Also render topright and bottomleft corners if junction sides say so 2010-12-04 15:39:44 +01:00
Carlos Garnacho 11004ef61d Initialize all looping, active state transitions on map()
This allows widgets to gtk_widget_set_state_flags() before mapping
and have animations started anyway when this happens.
2010-12-04 15:39:44 +01:00
Carlos Garnacho 4027dceaa9 Add #define for the "spinner" style class 2010-12-04 15:39:44 +01:00
Carlos Garnacho 62e9188ff3 GtkStyleContext: store layout extents for animation purposes. 2010-12-04 15:39:43 +01:00
Carlos Garnacho 818aca5aee GtkStyleContext: Only allow looping transitions for states being turned on. 2010-12-04 15:39:43 +01:00
Carlos Garnacho ad6da0cdb8 GtkStyleContext: Stop animations if the window is gone. 2010-12-04 15:39:43 +01:00
Carlos Garnacho cc18d65986 GtkThemingEngine: render square corner if the gap is too close on render_frame_gap() 2010-12-04 15:39:43 +01:00
Matthias Clasen f0eed4a5b1 Use gtk_icon_info_load_symbolic_for_context
gtk_icon_info_load_symbolic_for_style is going to be deprecated.
2010-12-04 15:39:43 +01:00
Matthias Clasen f90881271f Add a GtkStyleContext-variant of symbolic icon loading 2010-12-04 15:39:42 +01:00
Matthias Clasen 091c882996 Some tweaks for the GtkStyleContext migration guide 2010-12-04 15:39:42 +01:00
Matthias Clasen 0f98b15090 Add illustration to gtk_render_handle docs 2010-12-04 15:39:42 +01:00
Matthias Clasen 3ddee2561b Small doc addition 2010-12-04 15:39:42 +01:00
Matthias Clasen d1f1af202b Add a frame-gap illustration 2010-12-04 15:39:42 +01:00
Matthias Clasen 1391a61bc5 Improve frame-gap drawing
Instead of overdrawing the gap with bg-color, clip it away.
2010-12-04 15:39:42 +01:00
Matthias Clasen 54eadfcefd Fix another parameter mismatch 2010-12-04 15:39:42 +01:00
Matthias Clasen 4e3dabf582 Fix up symbol list for docs 2010-12-04 15:39:41 +01:00
Matthias Clasen b51c0f826a fix parameter name mismatch 2010-12-04 15:39:41 +01:00
Matthias Clasen 8abe9f300c Forgotten file 2010-12-04 15:39:41 +01:00
Carlos Garnacho 9c0ef02ea5 GtkButton: Remove unneeded gtk_style_context_notify_state_change() calls
There is now code to handle this for one-item widgets (such as GtkButton)
in gtk_widget_set_state_flags()
2010-12-04 15:39:41 +01:00
Carlos Garnacho 2f0b5d8a9d GtkCheckButton: Look active when the pointer button is pressed and hovering 2010-12-04 15:39:41 +01:00
Carlos Garnacho 037c982824 GtkStyleContext: Handle empty areas when coalescing invalidation regions. 2010-12-04 15:39:41 +01:00
Carlos Garnacho 2fb9687f55 GtkToggleButton: Make it able to be prelight and active at the same time. 2010-12-04 15:39:40 +01:00
Carlos Garnacho 1d5a6b687e GtkComboBox: Use style context for rendering 2010-12-04 15:39:40 +01:00
Carlos Garnacho c6b2e47931 Let gtk_widget_get_path() correct early calls during init(). 2010-12-04 15:39:40 +01:00
Carlos Garnacho ebd8463007 GtkCssProvider: Handle unfocused label selections in default CSS. 2010-12-04 15:39:40 +01:00
Carlos Garnacho 90dd2eb42b GtkLabel: Use style context for rendering. 2010-12-04 15:39:40 +01:00
Carlos Garnacho 0fce9342ef GtkThemingEngine: Draw 3D-like effects on square frames with lines. 2010-12-04 15:39:40 +01:00
Carlos Garnacho 3138cc7677 GtkThemingEngine: Render rounded frames with light/shadow connections at 45° 2010-12-04 15:39:39 +01:00
Carlos Garnacho 95ae1a0aa6 GtkThemingEngine: don't overshoot when rendering frames. 2010-12-04 15:39:39 +01:00
Carlos Garnacho e47c8e2490 GtkStyle: Return the default icon set if no context is attached. 2010-12-04 15:39:39 +01:00
Carlos Garnacho 5d496aa7f3 GtkStyle: Do not warn if attach count == 0
This is going go happen more and more often now, as realize handlers start
removing the gtk_widget_style_attach() calls.
2010-12-04 15:39:39 +01:00
Carlos Garnacho 6bf04fbd94 GtkCssProvider: Add a default border color for insensitive elements. 2010-12-04 15:39:39 +01:00
Matthias Clasen e57e0e978d Illustrate extension rendering 2010-12-04 15:39:39 +01:00
Matthias Clasen 8589c5c65e Add slider illustration 2010-12-04 15:39:38 +01:00
Matthias Clasen 8d951476bf Add an activity example
This doesn't work, since it trips up on num-steps not being
available for GtkEventBox.
2010-12-04 15:39:38 +01:00
Matthias Clasen 7e96a51953 Add examples for frame rendering 2010-12-04 15:39:38 +01:00
Matthias Clasen 4c04d944e8 Atempt to fix stretched 9slice rendering 2010-12-04 15:39:38 +01:00
Matthias Clasen 30fe448750 Fix handling of junctions in frame drawing code 2010-12-04 15:39:38 +01:00
Matthias Clasen e522381183 Add a background example to the docs 2010-12-04 15:39:38 +01:00
Matthias Clasen d532c0e5c2 Test some wilder names for classes, etc 2010-12-04 15:39:37 +01:00
Matthias Clasen 391e445d11 Allow digits in selectors and values, where appropriate 2010-12-04 15:39:37 +01:00
Matthias Clasen 31368f16cb Add the style example code used to generate illustrations 2010-12-04 15:39:37 +01:00
Matthias Clasen f13f315312 Some more images for gtk_render docs 2010-12-04 15:39:37 +01:00
Matthias Clasen d4c70f214d Declare transition and border-image properties to be writeonly
We don't make the types of their values public, so getting their
values is useless and will leak.
2010-12-04 15:39:37 +01:00
Matthias Clasen a5e10e9b26 Improve some gtk_render_ docs
With pictures !!
2010-12-04 15:39:36 +01:00
Matthias Clasen d7a0fe5bf1 Document predefined style provider priorites
Also, rename GTK_STYLE_PROVIDER_PRIORITY_DEFAULT to _THEME and
use it for themes.
2010-12-04 15:39:35 +01:00
Matthias Clasen a260059c7f Fix doc formatting 2010-12-04 15:39:35 +01:00
Matthias Clasen d9b0da5b83 Fix resize grip drawing
There was some confusion about junctions...
2010-12-04 15:39:34 +01:00
Matthias Clasen be0ed14cce Fix GtkRadioButton drawing 2010-12-04 15:39:34 +01:00
Matthias Clasen fc10599ac8 Make unfocused selections visible in entries 2010-12-04 15:39:33 +01:00
Matthias Clasen 21a193ad02 Make expanders prelight 2010-12-04 15:39:33 +01:00
Matthias Clasen 8b6112b6e0 Rewrite GtkInfoBar color handling to bypass GtkStyle
This avoids a segfault that was happening due to the recursion
detection not working anymore with the old way of doing things.
2010-12-04 15:39:33 +01:00
Carlos Garnacho d63615d9cc GtkCssProvider: Render inconsistent toggle buttons differently. 2010-12-04 15:39:32 +01:00
Carlos Garnacho 9b2f878b06 GtkCssProvider: do not use selected fg/bg in sliders or spinbutton buttons. 2010-12-04 15:39:32 +01:00
Carlos Garnacho bcf1ee4825 GtkCssProvider: Use 1px border width for spinbutton buttons. 2010-12-04 15:39:32 +01:00
Carlos Garnacho 74b032b816 GtkCssProvider: Render radio and check boxes framess in menus. 2010-12-04 15:39:32 +01:00
Carlos Garnacho b33d48a802 GtkCssProvider: use selected fg/bg for selected menu items in CSS. 2010-12-04 15:39:31 +01:00
Carlos Garnacho 85aa672ff7 GtkCssProvider: Draw frame around menubars and toolbars in default CSS. 2010-12-04 15:39:31 +01:00
Matthias Clasen fea567bb9f More documentation reshuffling 2010-12-04 15:39:31 +01:00
Matthias Clasen ace967a042 Tweak wording 2010-12-04 15:39:30 +01:00
Matthias Clasen 3a7f79e814 Document border images better 2010-12-04 15:39:30 +01:00
Matthias Clasen 953ac51fb8 Make url parsing work for slices
The border-image parsing code relies on parse_path_str to return
a meaningful end_ptr in case of success, too.
2010-12-04 15:39:29 +01:00
Matthias Clasen 28e549082c Fix Gtk9Slice creation 2010-12-04 15:39:29 +01:00
Matthias Clasen 69254c552a Allow / in values
Otherwise, using url(path) on the right-hand side of properties
is not going to work.
2010-12-04 15:39:28 +01:00
Matthias Clasen 7d6fb7b7e7 Add some images to the docs
Add graphs for the transition functions and gradient examples.
2010-12-04 15:39:28 +01:00
Matthias Clasen b2d338d370 GtkWidgetPath documentation tweaks 2010-12-04 15:39:27 +01:00
Matthias Clasen 077270142f GtkStyleContext documentation tweaks 2010-12-04 15:39:27 +01:00
Matthias Clasen bcf3de095f Document various style-related enums 2010-12-04 15:39:26 +01:00
Carlos Garnacho 11480c57f0 GtkStyleContext: Use correct type for animation duration. 2010-12-04 15:39:26 +01:00
Carlos Garnacho 32ccac94e0 GtkAnimationDescription: parse "loop" correctly.
This sscanf parsing needs to go...
2010-12-04 15:39:25 +01:00
Carlos Garnacho 0c1cfd8a34 GtkStyle: handle scales when translating the detail string. 2010-12-04 15:39:24 +01:00
Carlos Garnacho 71f187a84f GtkCssProvider: Handle progressbars. 2010-12-04 15:39:24 +01:00
Carlos Garnacho f3445a2430 GtkCssProvider: Do not have border-color the same than active bg-color. 2010-12-04 15:39:24 +01:00
Carlos Garnacho 171157b0e4 GtkMenu: Use GtkStyleContext for rendering. 2010-12-04 15:39:23 +01:00
Carlos Garnacho 6fff76568c GtkMenuBar: Use GtkStyleContext for rendering. 2010-12-04 15:39:23 +01:00
Carlos Garnacho 0df9c70200 Use gtk_render_activity() when rendering progressbars through GtkStyle 2010-12-04 15:39:23 +01:00
Carlos Garnacho ee37847952 GtkCssProvider: Use default value when handling "none".
This way the default value has a way to override other values in previous
GtkStyleProviders when merged.
2010-12-04 15:39:22 +01:00
Matthias Clasen 5e26fb75a0 Add GtkStyleProperties to the docs 2010-12-04 15:39:22 +01:00
Matthias Clasen e2f91f7201 Documentation improvements
This patch adds more detail to the explanation of CSS, and also
adds documentation about which files are read.

We also make :focus an alternative to :focused (since :focus is
a standard CSS pseudo-class).
2010-12-04 15:39:22 +01:00
Matthias Clasen 42dd5b2e15 Adapt testgtk.css to parser changes 2010-12-04 15:39:21 +01:00
Carlos Garnacho 9567ed01e8 GtkCssProvider: Base prelight foreground on bg color.
Entries are also handled, so base/text colors are used.
2010-12-04 15:39:21 +01:00
Carlos Garnacho de94d04fea GtkCssProvider: Make prelight a bit less light in default CSS. 2010-12-04 15:39:21 +01:00
Carlos Garnacho bc3c9ce619 GtkStyle: Fix typo.
GtkStateType was being used in gtk_style_context_get(), instead of
GtkStateFlags, oops.
2010-12-04 15:39:20 +01:00
Carlos Garnacho ead23cd0ce GtkThemingEngine: Make render_option() depend on border-style and border-color. 2010-12-04 15:39:20 +01:00
Carlos Garnacho be4a616e6e GtkRadioButton: Use GtkStyleContext for rendering. 2010-12-04 15:39:20 +01:00
Carlos Garnacho 756e20f58c Make "button" class depend on mode for GtkToggleButtons 2010-12-04 15:39:20 +01:00
Carlos Garnacho 84d586043e Fix checkbuttons theming in CSS so it's more similar to 2.x 2010-12-04 15:39:19 +01:00
Carlos Garnacho 7478a77b04 GtkCheckButton: Use GtkStyleContext for rendering. 2010-12-04 15:39:19 +01:00
Carlos Garnacho 04783534ed GtkThemingEngine: Make render_check() depend on border-style and border-color. 2010-12-04 15:39:19 +01:00
Carlos Garnacho f62583d30c GtkContainer: Also copy permanent container's classes on get_path_for_child()
This makes inheritance work for the simplest cases when style is defined
for classes.
2010-12-04 15:39:18 +01:00
Carlos Garnacho 6d1cf76822 GtkWidgetPath: Make iter API deal with gints.
now gtk_widget_path_iter_* takes gints instead of guints, and also accept
numbers == -1 or > path_length for the path head.
2010-12-04 15:39:18 +01:00
Carlos Garnacho 5f88997297 GtkWidgetPath: Make gtk_widget_path_prepend_type() return nothing.
It's senseless to always return 0
2010-12-04 15:39:18 +01:00
Carlos Garnacho 198bb314c7 GtkStyleContext: preserve state on save(). 2010-12-04 15:39:18 +01:00
Carlos Garnacho 1bfb169ce6 GtkThemingEngine: Documents that engines must only use this API.
It was a bit unclear in the documentation, even if it was from the
API POV.
2010-12-04 15:39:18 +01:00
Matthias Clasen c5b38121ec Add tests for matching
These tests try to decipher how specificity works for selectors.
2010-12-04 15:39:17 +01:00
Matthias Clasen e1819055b9 Copy GtkWidgetPaths correctly
The code was forgetting to copy class information.
2010-12-04 15:39:17 +01:00
Matthias Clasen 49fed3d7d7 More css parsing tests 2010-12-04 15:39:17 +01:00
Matthias Clasen 4135fbf4d6 A little closer to css
Declarations are ;-separated, but there is no ; required after
the last declaration. We harmlessly accept either.
2010-12-04 15:39:17 +01:00
Javier Jardón 295cf25d6b docs: Refer to gtk_paint_*() instead draw_*() vfuncs in the migration guide 2010-12-04 15:39:17 +01:00
Matthias Clasen 933440e1f1 Some css parsing tests 2010-12-04 15:39:16 +01:00
Matthias Clasen 0396550ece Work harder at parsing import statements
Also, turn g_warning() into g_message() for now, so that tests
don't abort. Eventually, this needs to all go into GErrors.
2010-12-04 15:39:16 +01:00
Matthias Clasen 11cd19987b Move import syntax closer to css
Css allows @import url ("foo.css") or @import "foo.css" or
@import url ('foo.css') but not @import url(foo.css) or @immport foo.css.
2010-12-04 15:39:16 +01:00
Matthias Clasen f92c352f96 Some error reporting
When we take a GError argument, better use it.
2010-12-04 15:39:16 +01:00
Matthias Clasen 5f13b65065 Fix prototype of gtk_css_style_provider_load_from_data
GError arguments must be **.
2010-12-04 15:39:16 +01:00
Matthias Clasen 72f9a7940f Add an outline around menu popups 2010-12-04 15:39:15 +01:00
Matthias Clasen c8e5d3b07b Transform the 'menu' detail string to the 'popup' class 2010-12-04 15:39:15 +01:00
Matthias Clasen 016a656923 Fix prelighting of inconsistent radio and check buttons 2010-12-04 15:39:15 +01:00
Matthias Clasen b6776dc116 Fix the resize handle drawing 2010-12-04 15:39:15 +01:00
Matthias Clasen 627b33265b Handle float and uint style properties
These were giving errors in testgtk.
2010-12-04 15:39:15 +01:00
Matthias Clasen f0eafe60f8 Remove debug output 2010-12-04 15:39:14 +01:00
Matthias Clasen 4e778d7371 Fix a typo 2010-12-04 15:39:14 +01:00
Matthias Clasen 512bc44dbc Make frames visible by default 2010-12-04 15:39:14 +01:00
Matthias Clasen 9ca66efe2c Fix a memory leak 2010-12-04 15:39:14 +01:00
Matthias Clasen 69f91fed94 Translate detail strings for radio buttons 2010-12-04 15:39:14 +01:00
Carlos Garnacho 25b6945971 GtkThemingEngine: remove unused code 2010-12-04 15:39:13 +01:00
Carlos Garnacho 892fe46324 Fix compile warnings 2010-12-04 15:39:13 +01:00
Carlos Garnacho c9dc09e980 GtkStyleProvider: Pass a GParamSpec in get_style_property().
This is so we can know the owner type of the property, and matching
with the stored strings in GtkCssProvider is direct.
2010-12-04 15:39:13 +01:00
Carlos Garnacho b613f1f1f2 GtkStyleContext: Also use screen providers for widget style properties. 2010-12-04 15:39:13 +01:00
Carlos Garnacho 13e186bbca Handle menuitem detail string better. 2010-12-04 15:39:13 +01:00
Carlos Garnacho 9a2d1e5433 GtkSettings: install theme CSS with a lower priority.
This is so GtkSettings has an opportunity to modify theme colors.
2010-12-04 15:39:12 +01:00
Carlos Garnacho 0057aa5445 Add corners to GtkJunctionSides, defining sides as 2 corners. 2010-12-04 15:39:12 +01:00
Matthias Clasen eb8a1c4e33 Don't whine about expander-style missing
This check was lost in the GtkStyleContext porting.
2010-12-04 15:39:12 +01:00
Carlos Garnacho 43cff6f6f7 GtkCssProvider: theme notebooks. 2010-12-04 15:39:11 +01:00
Carlos Garnacho 6099399fa7 GtkThemingEngine: Use border settings on render_extension/frame_gap() 2010-12-04 15:39:11 +01:00
Carlos Garnacho 60a2e90df7 GtkStyle: transform tabs' detail string. 2010-12-04 15:39:10 +01:00
Carlos Garnacho 534942d994 GtkThemingEngine: Do not use possible reserved word. 2010-12-04 15:39:10 +01:00
Carlos Garnacho 5bf9f8c410 testgtk: Try to locate the right file. 2010-12-04 15:39:09 +01:00
Carlos Garnacho d4aade109f Fix gtk_css_provider_get_named() docs. 2010-12-04 15:39:09 +01:00
Carlos Garnacho c37797a10c GtkSettings: Keep right refcount of the theme provider. 2010-12-04 15:39:08 +01:00
Carlos Garnacho 611cb007b4 GtkSettings: Ensure the theme CSS is loaded on startup. 2010-12-04 15:39:08 +01:00
Carlos Garnacho 8243c3c025 GtkCssProvider: Fix typo in gtk_css_provider_get_named()
provider was being redefined in the inner block, so the loaded
provider didn't get to be returned.
2010-12-04 15:39:08 +01:00
Carlos Garnacho a185954d7c Hardcode 3.0 version for style files and paths.
It's about time to start using the right paths.
2010-12-04 15:39:07 +01:00
Carlos Garnacho 37f9f491d2 Make testgtk load CSS for custom styling. 2010-12-04 15:39:07 +01:00
Carlos Garnacho 9ffaf1122d GtkCssProvider: Accept '%' in value strings. 2010-12-04 15:39:06 +01:00
Carlos Garnacho 64e798e190 Do not initialize RC subsystem. 2010-12-04 15:39:06 +01:00
Carlos Garnacho 62ee0956e3 GtkStyleProperties: Use GParamSpec for properties registration. 2010-12-04 15:39:06 +01:00
Carlos Garnacho 1c847d9c21 GtkCssProvider: Docs fix for -gtk-gradient() syntax. 2010-12-04 15:39:06 +01:00
Carlos Garnacho bcf81a0e23 Handle looping transition animations. 2010-12-04 15:39:05 +01:00
Carlos Garnacho 1123159dc9 GtkCssProvider: Handle better wrong enum/flag values. 2010-12-04 15:39:05 +01:00
Carlos Garnacho 9bb96e271d GtkCssProviders: Parse GTypeFlags based values. 2010-12-04 15:39:05 +01:00
Carlos Garnacho 5cb6fed0bd GtkCssProvider: Add initial unit parsing logic
At the moment only "px" are supported, and such is the default
value when no unit is specified.
2010-12-04 15:39:05 +01:00
Carlos Garnacho 65abcb722e GtkCssProvider: Handle the "none" keyword to unset properties. 2010-12-04 15:39:05 +01:00
Carlos Garnacho c57fdf4c75 GtkStyleContext: Resolve symbolic colors for widget style properties. 2010-12-04 15:39:04 +01:00
Carlos Garnacho d865cf4b38 GtkStyleProperties: Handle GdkColor types.
Just in case.
2010-12-04 15:39:04 +01:00
Carlos Garnacho 8b9b9c22e7 GtkCssProvider: Also parse GdkColor values
This is necessary for widget style properties to work.
2010-12-04 15:39:04 +01:00
Carlos Garnacho 815e3499ae GtkCssProvider: Add lighter/darker color functions.
These behave the same than in GtkStyle.
2010-12-04 15:39:04 +01:00
Carlos Garnacho cb2f9a86e5 GtkCssProvider: allow color names from rgb.txt when parsing colors. 2010-12-04 15:39:03 +01:00
Carlos Garnacho 44b1a6c852 GtkStyleContext: Add #define's for the default properties. 2010-12-04 15:39:03 +01:00
Carlos Garnacho 1be9d6ebc9 Document missing GtkStateType values.
The documentation has also moved to gtkenums.h.
2010-12-04 15:39:02 +01:00
Carlos Garnacho 1487b34679 Remove GTK_STATE_LAST.
It didn't turn out to be that useful, nor widely used.
2010-12-04 15:38:56 +01:00
Carlos Garnacho 1fb6cc8d77 Use the correct cairo-gobject.h include path. 2010-12-04 15:38:56 +01:00
Carlos Garnacho 2fe0a51ed0 Add gtk_render_icon_pixbuf() function to docs. 2010-12-04 15:38:56 +01:00
Carlos Garnacho 04fbb74388 Add GtkStyleContext migration docs. 2010-12-04 15:38:56 +01:00
Carlos Garnacho fb97bd1f0a GtkThemingEngine: Document missing class vmethods. 2010-12-04 15:38:55 +01:00
Carlos Garnacho 4689b63739 GtkButton: Use GtkStyleContext for rendering. 2010-12-04 15:38:55 +01:00
Carlos Garnacho dc2df7d178 GtkWindow: Use GtkStyleContext for rendering. 2010-12-04 15:38:55 +01:00
Carlos Garnacho 3f12fc2bd8 GtkStyleContext: Add gtk_style_context_set_background().
This function replaces gtk_style_set_background().
2010-12-04 15:38:54 +01:00
Carlos Garnacho d9664021cc GtkWidget: Update pango context from style context's font description. 2010-12-04 15:38:49 +01:00
Carlos Garnacho 1cfeeadc70 GtkWidget: Ensure the style context always has an screen.
Things like font settings depend on the screen, and widgets
like GtkTextView trigger queries on widgets without screen
when the parent window is being destroyed.
2010-12-04 15:38:48 +01:00
Carlos Garnacho 48f239c1f2 Add CSS class defines for toolbars and docks. 2010-12-04 15:38:48 +01:00
Carlos Garnacho 99879d4a5f GtkStyle: translate a few more detail strings. 2010-12-04 15:38:48 +01:00
Carlos Garnacho 3848a58b17 GtkCssProvider: theme progressbars in default CSS. 2010-12-04 15:38:48 +01:00
Carlos Garnacho 0431239ead GtkThemingEngine: ensure 1px wide frames aren't painted between pixels. 2010-12-04 15:38:48 +01:00
Carlos Garnacho f66275fa6a GtkThemingEngine: Use square cap for solid frames. 2010-12-04 15:38:47 +01:00
Carlos Garnacho 3d1403e684 GtkThemingEngine: ensure that background isn't rendered past the frame boundaries. 2010-12-04 15:38:47 +01:00
Carlos Garnacho d6ba3b7d89 GtkThemingEngine: Get rid of obsolete code for tooltips. 2010-12-04 15:38:47 +01:00
Carlos Garnacho 661a13fe4d GtkStyleContext: Fix check for GtkIconSize in render_icon_pixbuf(). 2010-12-04 15:38:46 +01:00
Carlos Garnacho 405f2f306a GtkStyleContext: restore widget state too in restore(). 2010-12-04 15:38:45 +01:00
Carlos Garnacho 8b267a58da GtkCssProvider: Do not miss the last class name in concatenated classes.
Selectors like .menu.check or .entry.progressbar were being misparsed
and attributed to .menu and .entry.
2010-12-04 15:38:45 +01:00
Carlos Garnacho d321713704 GtkStyle: transform window background detail string. 2010-12-04 15:38:44 +01:00
Carlos Garnacho 1ec47b20db GtkStyle: Transform menubar detail string. 2010-12-04 15:38:43 +01:00
Carlos Garnacho 46b8cc8686 GtkStyle: Transform menu accelerators string 2010-12-04 15:38:42 +01:00
Carlos Garnacho 4c898a3c7e GtkStyleContext: Define some more class names. 2010-12-04 15:38:42 +01:00
Carlos Garnacho 912ad78cc5 Remove GTK_REGION_DEFAULT
GTK_STYLE_CLASS_DEFAULT is preferred to match a default area, as
it doesn't make sense to have a per-region default.
2010-12-04 15:38:41 +01:00
Carlos Garnacho 271145645c GtkThemingEngine: Use GtkSymbolicColor for shades. 2010-12-04 15:38:41 +01:00
Carlos Garnacho df95a74a27 GtkThemingEngine: Do not require a default value when registering properties
NULL should work for 0 for int/double/enum/... types and NULL for
pointer types, this should be sane enough to not require a default
value.
2010-12-04 15:38:40 +01:00
Carlos Garnacho 765f653df6 GtkSymbolicColor: Only require styleproperties when resolving named colors.
It is not necessary for resolving colors based on literals,
so be a bit less strict here.
2010-12-04 15:38:40 +01:00
Carlos Garnacho 525963d74d GtkSymbolicColor: convert to/from hls when shading.
This makes shading equal to GtkStyle's.
2010-12-04 15:38:39 +01:00
Carlos Garnacho 3ea9568c20 GtkSymbolicColor: Do not clamp shade/mix/alpha factors. 2010-12-04 15:38:39 +01:00
Carlos Garnacho a23863211b GtkStyleContext: Add gtk_render_icon_pixbuf()
This function is similar to gtk_style_render_icon(), which is now
implemented on top of this one.
2010-12-04 15:38:38 +01:00
Carlos Garnacho 06c8857191 GtkThemingEngine: Fix compile warning. 2010-12-04 15:38:38 +01:00
Carlos Garnacho 605fa03248 Fix compile warning 2010-12-04 15:38:37 +01:00
Carlos Garnacho f2c6c82ff0 GtkStatusIcon: update to use gtk_widget_override_symbolic_color(). 2010-12-04 15:38:37 +01:00
Carlos Garnacho f383e6b0a2 GtkWidget: Add new set of methods to override style information.
gtk_widget_override_*() deprecates gtk_widget_modify_*(). There are
only functions to modify fg/bg/font/symbolic color, If anything more
fancy/complex is needed. There is the possibility of adding a
GtkStyleProvider yourself.
2010-12-04 15:38:36 +01:00
Carlos Garnacho 920637abef GtkStyle: Listen to context changes.
This way the GtkStyle is updated to the latest style info, actually
emitting ::style-set must be performed after invalidating the style
context.
2010-12-04 15:38:36 +01:00
Carlos Garnacho 33e95ae65f GtkStyleContext: Add the start of a default set of class names/regions. 2010-12-04 15:38:36 +01:00
Carlos Garnacho 071ccaf8a7 Theming documentation fixes
2 functions were not in -sections.txt, and GtkStyleSet was renamed
to GtkStyleProperties.
2010-12-04 15:38:35 +01:00
Carlos Garnacho 80e74d79bb GtkStyleContext: Fix merging of local and global providers. 2010-12-04 15:38:35 +01:00
Carlos Garnacho fb8de847df GtkStyleProperties: Merge font descriptions on merge()
This is necessary so incomplete font descriptions are ensured to have
family and size.
2010-12-04 15:38:34 +01:00
Carlos Garnacho af20ba6103 GtkSymbolicColor: Take const GdkRGBA in new_literal(). 2010-12-04 15:38:34 +01:00
Carlos Garnacho 2efa2947be Document gtk_render_* functions. 2010-12-04 15:38:34 +01:00
Carlos Garnacho ebf5bd390f Add gtk_render_activity()
This method will render progress bars and spinners, these should
handle active and inconsistent states' animation progress in order
to perform animations.
2010-12-04 15:38:33 +01:00
Carlos Garnacho af1f8701dc GtkThemingEngine: draw resize grip through render_handle().
GtkJunctionSides is used instead of GdkWindowEdge, GtkStyle
implementation has changed to use GtkStyleContext's.
2010-12-04 15:38:33 +01:00
Carlos Garnacho 227294a6aa GtkWidget: Trigger state change transitions on state flags change.
This makes state transitions automatic for non-complex widgets, complex
widgets such as GtkTreeView still need to notify state updates themselves.
2010-12-04 15:38:33 +01:00
Carlos Garnacho c0d08ff627 GtkToolItemGroup: Set widget state as state flags. 2010-12-04 15:38:33 +01:00
Carlos Garnacho 1c2f27fe11 GtkToggleButton: Set widget state as state flags. 2010-12-04 15:38:32 +01:00
Carlos Garnacho 80d1ce9f67 GtkRadioButton: Set widget state as state flags. 2010-12-04 15:38:32 +01:00
Carlos Garnacho 517eaa55e5 GtkNotebook: Set widget state as state flags. 2010-12-04 15:38:32 +01:00
Carlos Garnacho 5f0f21aad3 GtkMenuItem: Set widget state as state flags. 2010-12-04 15:38:31 +01:00
Carlos Garnacho 9ae2e29f44 GtkMenu: Set widget state as state flags. 2010-12-04 15:38:31 +01:00
Carlos Garnacho 399499225e GtkExpander: Set widget state as state flags. 2010-12-04 15:38:31 +01:00
Carlos Garnacho f7f5ac1b09 GtkEntry: Set widget state as state flags. 2010-12-04 15:38:31 +01:00
Carlos Garnacho 0e25b19515 GtkComboBox: Set widget state as state flags. 2010-12-04 15:38:30 +01:00
Carlos Garnacho 401b655307 GtkButton: Set widget state as state flags. 2010-12-04 15:38:30 +01:00
Carlos Garnacho cd98204619 Implement widget states as a set of flags
gtk_widget_(set|unset|get)_state_flags() has been added, using GtkStateFlags
to represent the widget state. GtkStateType API has been implemented on top
of the new one.
2010-12-04 15:38:30 +01:00
Carlos Garnacho 34b91a74e5 Document missing value in GtkStateFlags 2010-12-04 15:38:30 +01:00
Carlos Garnacho 4acc20abc1 s/GtkStyleSet/GtkStyleProperties/
The former name had oddities such as gtk_style_set_set() and such,
so the new name is nicer in that regard and not much longer.
2010-12-04 15:38:29 +01:00
Carlos Garnacho 1bdd761c3f GtkWidget: Ensure name changes involve a style context update. 2010-12-04 15:38:29 +01:00
Carlos Garnacho 8ea649e0a0 Rely only on fg/bg colors.
"foreground-color" has been renamed to just "color" as in regular CSS,
and the "text-color" and "base-color" properties have been removed. The
default CSS has been changed to have widgets cope with this change.
2010-12-04 15:38:29 +01:00
Carlos Garnacho 7de2cf3286 GtkCssProvider: Fix parsing of concatenated classes.
Now selectors such as:

 GtkWidget#name.class1.class2
 #name.class1.class2
 .class1.class2

are parsed correctly, being meaningful for a widget defining several
classes.
2010-12-04 15:38:29 +01:00
Carlos Garnacho a8a1d8cd01 GtkThemingEngine: Use ::name when registering style props. 2010-12-04 15:38:29 +01:00
Carlos Garnacho 90de318ab3 GtkThemingEngine: Add ::name construct only property
This property is to be set by theming engines, the name set will be favored
over the object type name when registering custom properties, making possible
something like:

-Clearlooks-border: blah;
2010-12-04 15:38:28 +01:00
Carlos Garnacho c88e3bfc0c GtkStyleSet: Prevent from possible underflow. 2010-12-04 15:38:28 +01:00
Carlos Garnacho 51b742044a GtkCssProvider: Parse alpha() symbolic colors.
The "alpha" symbolic color modifies a passed color's alpha by a factor,
the syntax would accept things like:

background-color: alpha (@bg_color, 0.8);
foreground-color: alpha (shade (@fg_color, 0.8), 0.5);
2010-12-04 15:38:28 +01:00
Carlos Garnacho ca44965f33 GtkSymbolicColor: Add gtk_symbolic_color_new_alpha()
This function modifies the alpha channel of a color, multiplying
it by a factor.
2010-12-04 15:38:28 +01:00
Carlos Garnacho 0bd81ef710 GtkCssProvider: Make default style depend more on custom colors. 2010-12-04 15:38:28 +01:00
Carlos Garnacho 5310ad8070 GtkStyle: Get to style GtkCellRendererText text. 2010-12-04 15:38:27 +01:00
Carlos Garnacho 6356f01b06 GtkThemingEngine: render 0-radius frames with 3D-like 45° corner effect 2010-12-04 15:38:27 +01:00
Carlos Garnacho 43f7fb8354 GtkThemingEngine: Clear the background for .background class 2010-12-04 15:38:27 +01:00
Carlos Garnacho d565e15951 GtkStyle: translate active state in paint_flat_box(). 2010-12-04 15:38:27 +01:00
Carlos Garnacho 087249db07 GtkCssProvider: Update end string when misparsing symbolic colors. 2010-12-04 15:38:26 +01:00
Carlos Garnacho 7d441000f7 GtkCssProvider: Allow '\t' when parsing values. 2010-12-04 15:38:26 +01:00
Carlos Garnacho 4ca3b5071e GtkSymbolicColor: Initialize alpha when resolving shades. 2010-12-04 15:38:26 +01:00
Carlos Garnacho 975f133d63 GtkThemingEngine: Improve rendering of inset/outset borders. 2010-12-04 15:38:26 +01:00
Carlos Garnacho 39ce35dd75 GtkCssProvider: Improve default CSS. 2010-12-04 15:38:26 +01:00
Carlos Garnacho 6bd0865601 GtkStyle: Handle scrollbar buttons. 2010-12-04 15:38:25 +01:00
Carlos Garnacho 490d59f045 Do not shade alpha values. 2010-12-04 15:38:25 +01:00
Carlos Garnacho 3bfc59b9bb GtkStyle: Match "trough" and "slider" detail strings.
This is so scrollbars can be themed throught the "trough" and
"slider" classes.
2010-12-04 15:38:25 +01:00
Carlos Garnacho 4e02218f52 Use GdkRGBA all around in GtkStyleContext. 2010-12-04 15:38:25 +01:00
Carlos Garnacho 3a455ed8f9 GtkStyleSet: Register the border-style and border-color properties
This is also implemented in the theming engine, although the default
CSS should be using it in order to theme buttons, troughs, sliders
and such.
2010-12-04 15:38:25 +01:00
Carlos Garnacho 8d4ffedbf1 GtkStyleContext: '_' prefix the structs, gtk-doc prefers this. 2010-12-04 15:38:24 +01:00
Carlos Garnacho 770f050d8c GtkWidgetPath: turn into a boxed type. 2010-12-04 15:38:24 +01:00
Carlos Garnacho c9a3da5025 GtkStyleContext: s/set/add/ and s/unset/remove/ for classes/regions.
Several classes and regions may be set to GtkStyleContext, so rename
the functions to be more intuitive.
2010-12-04 15:38:24 +01:00
Carlos Garnacho 161d5175e1 GtkThemingEngine: Honor border-radius in render_background(). 2010-12-04 15:38:24 +01:00
Carlos Garnacho f7dd423862 GtkStyleSet: Register the "border-radius" property 2010-12-04 15:38:24 +01:00
Carlos Garnacho 32b50f2948 GtkStyleContext: Update function declaration in header. 2010-12-04 15:38:23 +01:00
Carlos Garnacho 0a0a1a20a7 GtkCssProvider: Make it able to parse enums. 2010-12-04 15:38:23 +01:00
Carlos Garnacho d03caa4683 GtkCssProvider: Run through the widget path in the correct order.
Comparing a selector with a widget path was being done backwards since
the change to use GtkContainer::get_path_for_child().
2010-12-04 15:38:23 +01:00
Matthias Clasen 35a41bd801 Make loading of theming engines from modules work 2010-12-04 15:38:23 +01:00
Carlos Garnacho d0f681e898 GtkStyleContext: Add gtk_style_context_new(). 2010-12-04 15:38:22 +01:00
Carlos Garnacho c2f47063c3 GtkCssProvider: Parse default/sorted region flags. 2010-12-04 15:38:22 +01:00
Carlos Garnacho 4a9890e3ab GtkCssProvider: Parse missing widget states. 2010-12-04 15:38:22 +01:00
Carlos Garnacho 68bfb94f69 Change semantics of the methods to check whether an animation is running.
It actually messed up with the state being actually set, and having a
transition animation running for it. Now this dichotomy is removed, and
gtk_style_context_state_is_running() only checks whether an animation is
running, leaving state checking to flags & GTK_STATE_FLAG_*.
2010-12-04 15:38:22 +01:00
Carlos Garnacho 96c16e246c GtkStyleContext: Actually store region ID when starting an animation. 2010-12-04 15:38:21 +01:00
Carlos Garnacho a79626b7fb Add theming docs
Both API and file format is documented, there's still missing
a migration doc though.
2010-12-04 15:38:21 +01:00
Carlos Garnacho 59b0fa8133 Remove GtkOrientation parameter from gtk_render_handle().
The case for paned can be guessed out from the height and width,
for handlebox the orientation parameter doesn't make much sense,
and this way it could also be used for resize grips.
2010-12-04 15:38:21 +01:00
Benjamin Berg e8c103f652 Use cairo gobject support instead of a new boxed type. 2010-12-04 15:38:20 +01:00
Carlos Garnacho 88a3c2daae GtkGradient: Handle symbolic gradients.
The css parser has been modified to parse correctly radial gradients:

background-image: -gtk-gradient (radial,
                                 center center, 0,
                                 center center, 0.8,
                                 from (#000), to (#fff));

The theming engine has been modified to correctly animate these,
as well as transitions between different pattern types.
2010-12-04 15:38:20 +01:00
Carlos Garnacho 2e8b1cd358 Gtk9Slice: Fix stretch case. 2010-12-04 15:38:20 +01:00
Carlos Garnacho a65d0d00c0 GtkWidget: Store GtkStyleContext in private struct. 2010-12-04 15:38:19 +01:00
Carlos Garnacho 5bbab9872d GtkStyleContext: Cache style properties accross class/region changes. 2010-12-04 15:38:19 +01:00
Carlos Garnacho 88b78953b6 GtkContainer: Add method to get the GtkWidgetPath for a child.
This is now used throughout in order to have the full path for a given widget,
including intermediate named regions, the default implementation just returns
the GtkContainer's path copy, no intermediate regions between.
2010-12-04 15:38:19 +01:00
Carlos Garnacho c575733eda GtkStyleContext: Fix animation framework to work with the new draw() semantics.
Invalidation region coalescing now happens recursively as draw() runs, and the
widget's x/y as now drawing coordinates are 0,0 based.
2010-12-04 15:38:18 +01:00
Carlos Garnacho f9788eb173 GtkCssProvider: Add support for @import rules
Now other CSS files can be referenced from the currently parsed file:

@import url (other-file.css);
@import url (/some/file.css);
2010-12-04 15:38:18 +01:00
Carlos Garnacho 0ef48c0bde GtkCssProvider: no need for resetting the parser prior to parsing data
This is done anyway on each iteration to parse_rule() in parse_stylesheet()
2010-12-04 15:38:18 +01:00
Carlos Garnacho 8e96e4e41f GtkCssProvider: improve file paths parser.
It will now return a full path, and check about the file being sane.
2010-12-04 15:38:18 +01:00
Carlos Garnacho 1772b00e85 GtkCssProvider: Transform custom colors to a @define-color rule.
Given there are other rules such as @import (which will be supported),
keep a sane namespace here, so for (re)defining a color name, in the CSS
file it will look like:

@define-color color-name #fff;
@define-color other-color mix (@color-name, #f00, 0.4);
2010-12-04 15:38:18 +01:00
Carlos Garnacho a1a90396b7 GtkThemingEngine: Do not return a const GtkThemingEngine on load() 2010-12-04 15:38:18 +01:00
Carlos Garnacho 5c2cf1e934 Plug some leaks. 2010-12-04 15:38:18 +01:00
Carlos Garnacho 5c8a818671 Fix typo in the Gtk9Slice parser. 2010-12-04 15:38:17 +01:00
Carlos Garnacho 5b11d14a49 GtkButton: Notify on prelight state change. 2010-12-04 15:38:17 +01:00
Carlos Garnacho 908babd8ae GtkThemingEngine: Implement animations between gradients/colors. 2010-12-04 15:38:17 +01:00
Carlos Garnacho d8187b34bb GtkSymbolicColor: Use G_DEFINE_BOXED_TYPE 2010-12-04 15:38:17 +01:00
Carlos Garnacho 7583f31609 GtkStyleContext: Store animation region for a bunch of paint operations. 2010-12-04 15:38:17 +01:00
Carlos Garnacho fecc079087 GtkStyleContext: Invalidate whole window if no invalidation region is obtained. 2010-12-04 15:38:17 +01:00
Carlos Garnacho 20051e02eb GtkCssProvider: use mapped file to read CSS files. 2010-12-04 15:38:16 +01:00
Carlos Garnacho 80cf01c271 GtkCssProvider: unset filename on load_from_data() 2010-12-04 15:38:16 +01:00
Carlos Garnacho 96e5a02148 GtkThemingEngine: Use border-image to render borders if an image is available. 2010-12-04 15:38:16 +01:00
Carlos Garnacho 7ee564c7cd GtkCssProvider: Add a parser for 9slice typed properties.
The value it parses is similar to the border-image CSS3 property,
so strings like this will be accepted:

  border-image: url (foo.png) 4 3 4 3 repeat repeat;

the image path is relative to the parsed CSS file dirname if no
absolute path is provided.
2010-12-04 15:38:16 +01:00
Carlos Garnacho f363e31a09 Register the border-image property
It will contain a 9-sliced image, so it can be rendered as rectangles with any
dimensions.
2010-12-04 15:38:16 +01:00
Carlos Garnacho 089f375cdb Add Gtk9Slice
This is a private boxed object to contain information about a border image
in order to render it in a size independent way.
2010-12-04 15:38:16 +01:00
Carlos Garnacho cc68e62e24 GtkSettings: Add a new provider for the theme CSS file. 2010-12-04 15:38:16 +01:00
Carlos Garnacho ac73a8f7a8 GtkStyleContext: Add gtk_style_context_reset_widgets()
This function recalculates the style for all widgets on a screen.
2010-12-04 15:38:15 +01:00
Carlos Garnacho 679ff63d5c GtkCssProvider: Add gtk_css_provider_get_named()
This functions loads a CSS file from a installed theme.
2010-12-04 15:38:15 +01:00
Carlos Garnacho a07fe2c0e6 Add generic providers per-screen.
The providers are added as soon as gtk GtkSettings object for the screen
is created.
2010-12-04 15:38:15 +01:00
Carlos Garnacho 1e66155aec GtkStyleContext: invalidate context when setting the screen 2010-12-04 15:38:14 +01:00
Carlos Garnacho 8dfa0e03ea GtkWidget: Set style context's screen before the widget_path.
This is so the style context has all necessary information before
triggering a style change on setting the path.
2010-12-04 15:38:14 +01:00
Carlos Garnacho 49ac732a18 GtkStyleContext: Add gtk_style_context_[add|remove]_provider_for_screen()
These functions allow per-screen style providers. also, the changed signal
will be emitted whenever a style context changes.
2010-12-04 15:38:14 +01:00
Carlos Garnacho f239704094 GtkWidget: Add gtk_widget_reset_style().
This function is analogous to gtk_widget_reset_rc_styles(),
updates style recursively on a widget.
2010-12-04 15:38:13 +01:00
Carlos Garnacho 3c390c9c8e GtkWidget: Add the style-updated signal
This signal is emitted whenever the widget's style changes.
2010-12-04 15:38:13 +01:00
Carlos Garnacho 77ccdfc94e GtkStyle: Protect against padding being NULL 2010-12-04 15:38:13 +01:00
Carlos Garnacho 9f84e101bf GtkStyleContext: Add gtk_style_context_invalidate().
This function will regenerate all styling information.
2010-12-04 15:38:12 +01:00
Carlos Garnacho 756bbf526f GtkStyleSet: Fix typo 2010-12-04 15:38:12 +01:00
Carlos Garnacho 58b6e538c9 GtkThemingEngine: use background-image in render_background() 2010-12-04 15:38:12 +01:00
Carlos Garnacho 2794e8d6dd GtkStyleSet: Register a "background-image" property.
Ironically, it currently just handles gradients, the name is to conform
to current CSS gradient implementation trends.
2010-12-04 15:38:12 +01:00
Carlos Garnacho cf87923d1b GtkStyleSet: Handle GtkGradients as a replacement for cairo_pattern_t
The former will handle GtkSymbolicColors, which will be resolved and
cached at query time.
2010-12-04 15:38:12 +01:00
Carlos Garnacho 3fc5c87bcb GtkCssProvider: Add a parser for gradients. 2010-12-04 15:38:12 +01:00
Carlos Garnacho 142a72637d Add GtkGradient.
This type defines a gradient between 2 symbolic colors, with any number
of color stop between these. At the moment it has been put besides
GtkSymbolicColor, although should be completely private, it will likely
need extending in the future for radial gradients.

At some point, it maybe should also be used for images, so painting
both a gradient and an image is consistent.
2010-12-04 15:38:11 +01:00
Carlos Garnacho 74de1839a4 GtkStyleSet: Set an empty default_value if none is provided. 2010-12-04 15:38:11 +01:00
Carlos Garnacho c908e263ac GtkCssProvider: strip whitespaces in symbolic color values. 2010-12-04 15:38:11 +01:00
Carlos Garnacho f12d7409cc Allow linefeeds in property values. 2010-12-04 15:38:11 +01:00
Carlos Garnacho 02a30118c6 Add a boxed type for cairo_pattern_t. 2010-12-04 15:38:11 +01:00
Carlos Garnacho 621a95f515 GtkSettings: implement GtkStyleProvider 2010-12-04 15:38:11 +01:00
Carlos Garnacho 58a51bca97 GtkStyle: Fill in x/ythickness and font_desc from the style context. 2010-12-04 15:38:11 +01:00
Carlos Garnacho 643abe3127 GtkStyleSet: Register "margin" property. 2010-12-04 15:38:10 +01:00
Carlos Garnacho 585afafa39 Add basic parser for GtkBorder properties.
Different units aren't supported, it takes 1 to 4 integers representing
pixel distances.
2010-12-04 15:38:10 +01:00
Carlos Garnacho 846f67d805 GtkStyle: Allow GTK_ARROW_NONE. 2010-12-04 15:38:10 +01:00
Carlos Garnacho 7e7347d1a0 GtkNotebook: invert tab drawing order so region flags are set correctly. 2010-12-04 15:38:10 +01:00
Carlos Garnacho 78a98decae Get rid of GdkPangoRenderer code in GtkThemingEngine. 2010-12-04 15:38:10 +01:00
Carlos Garnacho f058359182 Replace GdkRegion and GdkRectangle with their cairo counterparts. 2010-12-04 15:38:09 +01:00
Carlos Garnacho c9d626523d Remove gtkalias from style context code. 2010-12-04 15:38:09 +01:00
Carlos Garnacho 9dfba95f09 GtkCssProvider: Add gtk_css_provider_load_from_path() 2010-12-04 15:38:09 +01:00
Carlos Garnacho 0ce649e965 Plug a bunch of leaks. 2010-12-04 15:38:09 +01:00
Carlos Garnacho 91904f6778 GtkButton: Notify on active state when (un)depressed 2010-12-04 15:38:09 +01:00
Carlos Garnacho 9b949479b3 GtkThemingEngine: Animate checkboxes activation. 2010-12-04 15:38:09 +01:00
Carlos Garnacho 7519ed278b GtkThemingEngine: Add progress arg to gtk_theming_engine_is_state_set() 2010-12-04 15:38:09 +01:00
Carlos Garnacho 3c07e3d3df GtkWidget: Update GtkStyleContext animation regions on allocation change. 2010-12-04 15:38:08 +01:00
Carlos Garnacho 61a0544b8b GtkStyleContext: Add animation machinery.
Animation regions are confined through gtk_style_context_[push|pop]_animatable_region,
anything that's painted between these calls will be invalidated if an animation starts
for any of the regions in the stack.

gtk_style_context_notify_state_change() may be called from widgets to indicate a
change for a given GtkStateType, in that case an animation will be started if there
is an animation description for the widget/state.
2010-12-04 15:37:38 +01:00
Carlos Garnacho bbd0c5a2a2 GtkStyleContext: Declare gtk_style_context_list_classes() in header. 2010-12-04 15:37:38 +01:00
Carlos Garnacho 52baa7d51e GtkCssProvider: Parse properties of type GtkAnimationDescription. 2010-12-04 15:37:38 +01:00
Carlos Garnacho 114f30b772 GtkStyleSet: Register the "transition" property. 2010-12-04 15:37:38 +01:00
Carlos Garnacho ed840e73e4 Add GtkAnimationDescription as a private boxed object.
This struct will be used to represent an animation in GtkStyleSet. It
will only be used internally in GtkStyleContext in order to trigger
animations, engines shouldn't need this.
2010-12-04 15:37:37 +01:00
Carlos Garnacho 2e2c07b695 Add GtkTimeline as a private object.
This will only be used internally by GtkStyleContext in order
to animate state changes. When a proper animation framework is
introduced in GTK+, it may be ditched.
2010-12-04 15:37:37 +01:00
Carlos Garnacho 4781f94de2 Move all theming stack to use GtkStateFlags.
This support goes from the theming engines, which are able to retrieve
style for different combined states to the CSS provider, where several
state pseudo-classes may be specified, such as:

GtkButton:active:prelight {}
2010-12-04 15:37:37 +01:00
Carlos Garnacho 2c7c4d9a51 GtkStyleContext: Return insertion position if not found when matching classes/regions 2010-12-04 15:37:37 +01:00
Carlos Garnacho 11ac0cb3e1 GtkStyle: set the active flag depending on shadow_type in draw_box(). 2010-12-04 15:37:37 +01:00
Carlos Garnacho bccec3ef0c GtkCssProvider: Use class for tooltips. 2010-12-04 15:37:36 +01:00
Carlos Garnacho 74697d91fe GtkCssProvider: Parse and match class info. 2010-12-04 15:37:36 +01:00
Carlos Garnacho 27c91622f6 Set classes info in GtkWidgetPath. 2010-12-04 15:37:36 +01:00
Carlos Garnacho 2dabf20cfd GtkStyleContext: Add gtk_style_context_list_classes(). 2010-12-04 15:37:36 +01:00
Carlos Garnacho 8a1b6e8224 GtkWidgetPath: Add methods to include class info in paths. 2010-12-04 15:37:36 +01:00
Carlos Garnacho a3637ec60d s/child class/region/ everywhere.
"Child class" is an invented term anyway, and it conceptually defines
identifiable regions in widgets.
2010-12-04 15:37:35 +01:00
Carlos Garnacho 198d75bea5 GtkStyleContext: Rename internal struct.
GtkStyleRegion has been renamed to GtkStyleInfo, as it doesn't really
have much to do with regions itself, the information it contains does.
This struct is used in save/restore.
2010-12-04 15:37:35 +01:00
Carlos Garnacho e04dfd4d6d GtkThemingEngine: Add gtk_theming_engine_register_property().
This function may be used for custom property registration from
theming engines. The property names will have the
-${engine-type-name}-${prop-name} format, the parser has been
modified to allow properties with '-' as the first char.
2010-12-04 15:37:35 +01:00
Carlos Garnacho d9e3782391 GtkStyleSet: Fix compiler warning. 2010-12-04 15:37:35 +01:00
Carlos Garnacho 355f0d69ab GtkStyleSet: Allow custom parsers on registered properties. 2010-12-04 15:37:35 +01:00
Carlos Garnacho 99224c9eec GtkCssProvider: Parse correctly widget types with a name.
There's now a distinction between:

GtkLabel#label-name: Label with name "label-name"
GtkWindow #label-name: Window containing a widget named "label-name"
2010-12-04 15:37:34 +01:00
Carlos Garnacho 56e4ffabea Compare widget names as GQuarks in style matching. 2010-12-04 15:37:34 +01:00
Carlos Garnacho 09d8592b5b GtkWidgetPath: Make API more consistent. 2010-12-04 15:37:34 +01:00
Carlos Garnacho ad08330fae Compare region names as quarks in style matching. 2010-12-04 15:37:34 +01:00
Carlos Garnacho d47d3d0200 GtkCssProvider: Set child combinators in default CSS. 2010-12-04 15:37:34 +01:00
Carlos Garnacho 5f77ead9c6 GtkCssProvider: Parse and compare widget names. 2010-12-04 15:37:33 +01:00
Carlos Garnacho 52878c45b5 GtkCssProvider: Don't jump too eagerly to the next element when comparing selectors. 2010-12-04 15:37:33 +01:00
Carlos Garnacho 85dbc71921 GtkCssProvider: Immediately bail out if GType couldn't be resolved. 2010-12-04 15:37:33 +01:00
Carlos Garnacho 9ebbc7b5c5 GtkCssProvider: Small optimization. 2010-12-04 15:37:33 +01:00
Sven Herzberg c001833ed1 GtkCssProvider: don't ignore custom attributes
* gtk/gtkcssprovider.c: don't ignore custom attribites (which can be
  added by theme engines)
2010-12-04 15:37:33 +01:00
Sven Herzberg 27bc581dca GtkWidgetPath: properly use const
* gtk/gtkwidgetpath.c,
* gtk/gtkwidgetpath.h: use const where possible
2010-12-04 15:37:32 +01:00
Carlos Garnacho b6226cb7b9 GtkThemingEngine: Render correctly spinbutton buttons. 2010-12-04 15:37:32 +01:00
Carlos Garnacho dd8da82d1e GtkStyle: set junction details in spinbutton buttons. 2010-12-04 15:37:32 +01:00
Carlos Garnacho 8c117b1638 GtkThemingEngine: Add gtk_theming_engine_get_junction_sides(). 2010-12-04 15:37:31 +01:00
Carlos Garnacho 9108739c9b GtkStyleContext: Add gtk_style_context_[gs]et_junction_sides().
These functions will help widgets specify how does one element being painted
relate to other contiguous elements.
2010-12-04 15:37:31 +01:00
Carlos Garnacho d9b42ce50f Add GtkJunctionSides flags. 2010-12-04 15:37:30 +01:00
Carlos Garnacho 143c4b3b60 GtkStyleContext: Add gtk_style_context_lookup_color().
gtk_style_lookup_color() now uses this function internally.
2010-12-04 15:37:30 +01:00
Carlos Garnacho b4a24d6457 GtkStyleSet: Register the "border" property. 2010-12-04 15:37:29 +01:00
Carlos Garnacho 78cc97f7b3 GtkThemingEngine: fix typo in function declaration. 2010-12-04 15:37:28 +01:00
Carlos Garnacho fcf12ff9b9 GtkThemingEngine: Add gtk_theming_engine_get_direction(). 2010-12-04 15:37:28 +01:00
Carlos Garnacho 978d97ea6f GtkWidget: Set style context direction. 2010-12-04 15:37:27 +01:00
Carlos Garnacho dc216ffb00 GtkStyleContext: Add gtk_style_context_[gs]et_direction(). 2010-12-04 15:37:27 +01:00
Carlos Garnacho e15dc89f89 GtkWidget: Add the default CSS provider to all style contexts. 2010-12-04 15:37:27 +01:00
Carlos Garnacho 85398fc05f GtkCssProvider: Add gtk_css_provider_get_default().
This method returns a GtkCssProvider with the default style information
loaded.
2010-12-04 15:37:26 +01:00
Carlos Garnacho bd6751230a GtkStyle: Move gtk_render_* calls to default vmethod implementations. 2010-12-04 15:37:26 +01:00
Carlos Garnacho 9255e20bf8 GtkWidget: Create GtkStyle on top of GtkStyleContext. 2010-12-04 15:37:26 +01:00
Carlos Garnacho 6c549fecd3 GtkWidget: Construct style for partial widget hierarchies.
Some unparented widgets like to ask style details, so now the style is
constructed regardless of the parent being present or not, and then
reconstructed if the parent changes.
2010-12-04 15:37:25 +01:00
Carlos Garnacho 09d6c4ea52 GtkStyle: Optionally construct above a GtkStyleContext. 2010-12-04 15:37:25 +01:00
Carlos Garnacho 1e83e52b3d GtkThemingEngine: Add code to render GtkFrame frame with gap. 2010-12-04 15:37:24 +01:00
Carlos Garnacho d858801ec3 GtkThemingEngine: Obey active/selected when rendering text. 2010-12-04 15:37:24 +01:00
Carlos Garnacho 5510f24cc1 GtkThemingEngine: Rip out focus rendering from old code. 2010-12-04 15:37:24 +01:00
Carlos Garnacho eadaded374 GtkThemingEngine: Rip out expander rendering from old code. 2010-12-04 15:37:24 +01:00
Carlos Garnacho d22f393be3 GtkThemingEngine: Render frames and spinbutton boxes properly. 2010-12-04 15:37:24 +01:00
Carlos Garnacho 7482b636e6 GtkThemingEngine: Improve background rendering.
Now active and selected states are taken into account, and GtkSpinButton
buttons are special cased.
2010-12-04 15:37:23 +01:00
Carlos Garnacho 911431c0b2 GtkThemingEngine: Improve pixel alignment in arrows. 2010-12-04 15:37:23 +01:00
Carlos Garnacho c18ee462e3 GtkThemingEngine: Add methods to retrieve widget style properties. 2010-12-04 15:37:23 +01:00
Carlos Garnacho 0dc81b9a35 GtkStyleSet: Allow setting default value when registering properties.
This is now used for the "engine" keyword, where the default engine is used
if none is specified.
2010-12-04 15:37:23 +01:00
Carlos Garnacho c712480912 GtkStyleContext: Add varargs functions for getting widget style properties. 2010-12-04 15:37:23 +01:00
Carlos Garnacho 5f2e8bc0d1 GtkStyleContext: Ensure style rebuilds after adding/removing classes. 2010-12-04 15:37:23 +01:00
Carlos Garnacho 7748b1d2de GtkStyleContext: ensure class lookup return the correct insertion position if not found. 2010-12-04 15:37:22 +01:00
Carlos Garnacho 0813a2283e GtkCssProvider: Allow '_' in the middle of symbolic color names. 2010-12-04 15:37:22 +01:00
Carlos Garnacho 227c500dce GtkThemingEngine: Improve slider rendering. 2010-12-04 15:37:22 +01:00
Carlos Garnacho 44373ec551 GtkThemingEngine: Cairo-ify frame rendering from GtkStyle. 2010-12-04 15:37:22 +01:00
Carlos Garnacho 8771f46dae GtkThemingEngine: Cairo-ify frame_gap rendering from GtkStyle. 2010-12-04 15:37:22 +01:00
Carlos Garnacho 7d2b51f147 GtkThemingEngine: Cairo-ify extension rendering from GtkStyle. 2010-12-04 15:37:21 +01:00
Carlos Garnacho 4772b67563 GtkThemingEngine: Make render_background use drawing primitives. 2010-12-04 15:37:21 +01:00
Carlos Garnacho 1b556aa4d1 GtkThemingEngine: Unify code to render lines. 2010-12-04 15:37:21 +01:00
Carlos Garnacho 75b059a3f2 GtkThemingEngine: Add cairo-ified rendering primitives.
Functions to add paths for lines, rectangle sides, and the gap side in notebooks
have been added.
2010-12-04 15:37:20 +01:00
Carlos Garnacho 5cdb3f0e90 GtkThemingEngine: Cairo-ify handle rendering from GtkStyle. 2010-12-04 15:37:20 +01:00
Carlos Garnacho 9261c2a9d7 GtkThemingEngine: Take option rendering from GtkStyle. 2010-12-04 15:37:20 +01:00
Carlos Garnacho 4e45e9099e GtkThemingEngine: Take checkbox rendering from GtkStyle. 2010-12-04 15:37:19 +01:00
Carlos Garnacho 27f5257d49 GtkStyleContext: Don crash on empty class sets. 2010-12-04 15:37:19 +01:00
Carlos Garnacho 038bcdcdb6 GtkThemingEngine: Use GdkPangoRenderer when painting layouts. 2010-12-04 15:37:19 +01:00
Carlos Garnacho 475f0fc266 GtkStyleContext: Add gtk_style_context_save/restore().
This API will be used to have savepoints when adding and removing
style classes information.
2010-12-04 15:37:18 +01:00
Carlos Garnacho 4a465d279d GtkThemingEngine: Add gtk_theming_engine_get_screen(). 2010-12-04 15:37:18 +01:00
Carlos Garnacho 5db7197c27 GtkWidget: Set screen info in GtkStyleContext. 2010-12-04 15:37:18 +01:00
Carlos Garnacho 758c3e18cc GtkStyleContext: Add gtk_style_context_[gs]et_screen() 2010-12-04 15:37:17 +01:00
Carlos Garnacho 41650933fd GtkStyleContext: Add priv pointer to object struct. 2010-12-04 15:37:17 +01:00
Carlos Garnacho 10f6c04f33 GtkStyleSet: Add priv pointer to object struct. 2010-12-04 15:37:17 +01:00
Carlos Garnacho 875237187c GtkCssProvider: Add priv pointer to object struct. 2010-12-04 15:37:17 +01:00
Carlos Garnacho 51a8f642da Fix include. 2010-12-04 15:37:16 +01:00
Carlos Garnacho a256171d34 GtkStyleContext: Add gtk_style_context_lookup_icon_set(). 2010-12-04 15:37:16 +01:00
Carlos Garnacho 318e0f28ee GtkStyleProvider: Add gtk_style_provider_get_icon_factory().
With this, style providers have a way to override default icon theme.
2010-12-04 15:37:16 +01:00
Carlos Garnacho be5d4adf6b GtkCssProvider: Allow symbolic colors when parsing style rules. 2010-12-04 15:37:15 +01:00
Carlos Garnacho 1de8f75517 GtkCssProvider: Parse color mappings.
These are of the form:

@color-a: #fff;
@color-b: mix (@color-a, #000, 0.5)
@color-c: shade (@color-b, 0.7)

In the stylesheet, arbitrary nesting of these commands is handled.
2010-12-04 15:37:15 +01:00
Carlos Garnacho 4ed96df96a GtkStyleSet: Optionally take GtkSymbolicColors.
gtk_style_set_set_property() now takes both GdkColor and GtkSymbolicColor
GValues, All accessors still return GdkColors, so any symbolic color will
be resolved and replaced in the styleset at that time.
2010-12-04 15:37:15 +01:00
Carlos Garnacho b8fb2d1a36 GtkSymbolicColor: Add method to resolve to a GdkColor. 2010-12-04 15:37:15 +01:00
Carlos Garnacho e2b8efcbec GtkStyleSet: Add API to map symbolic colors. 2010-12-04 15:37:15 +01:00
Carlos Garnacho 7094213df9 Add GtkSymbolicColor.
This is a small boxed struct used to store symbolic colors so they
can be resolved at a later point.
2010-12-04 15:37:14 +01:00
Carlos Garnacho d748ea983d GtkWidgetPath: Add to gtkalias. 2010-12-04 15:37:14 +01:00
Carlos Garnacho b50c88d170 GtkCssProvider: Plug memory leak. 2010-12-04 15:37:14 +01:00
Carlos Garnacho 2cd4ff4215 GtkCssProvider: Fix compile warning. 2010-12-04 15:37:14 +01:00
Carlos Garnacho 1d4687675f GtkCssProvider: set scanner->input_name. 2010-12-04 15:37:13 +01:00
Carlos Garnacho 6c91ba1cc2 GtkWidget: Do not reset GtkStyleContext per get_style_context(). 2010-12-04 15:37:13 +01:00
Carlos Garnacho 22bae20ce8 GtkWidget: Hook up widget style property querying to style context. 2010-12-04 15:37:13 +01:00
Carlos Garnacho 03370c6e0c GtkStyleContext: Add methods to get style property values. 2010-12-04 15:37:13 +01:00
Carlos Garnacho bf12227435 GtkCssProvider: Implement GtkStyleProvider->get_style_property
Style properties in the resource files are something like:

-GtkComboBox-appears-as-string
-GtkEntry-icon-prelight

Following the usual naming spec for extensions to CSS.
2010-12-04 15:37:13 +01:00
Carlos Garnacho 37335fbb6f GtkWidgetPath: Add methods to check topmost widget type. 2010-12-04 15:37:12 +01:00
Carlos Garnacho 6990a01299 GtkStyleProvider: Add method to get widget style properties. 2010-12-04 15:37:12 +01:00
Carlos Garnacho eaddc9f254 GtkCssProvider: refactor out selector matching. 2010-12-04 15:37:12 +01:00
Carlos Garnacho eec75f1f59 GtkCssProvider: Ensure each scope has its parser config. 2010-12-04 15:37:12 +01:00
Carlos Garnacho ff05cc4849 GtkCssProvider: Parse boolean values. 2010-12-04 15:37:12 +01:00
Carlos Garnacho aa5ec97cac GtkCssProvider: Make additions to parse_value() less error prone. 2010-12-04 15:37:11 +01:00
Carlos Garnacho 814957021f Fix compile warning. 2010-12-04 15:37:11 +01:00
Carlos Garnacho 66d1cb8054 GtkStyleSet: Register GtkThemingEngine type.
This has been also hooked up to the CSS provider, which parses the "engine"
value to load the corresponding module.
2010-12-04 15:37:11 +01:00
Carlos Garnacho 327a9fc66a GtkWidget: Generate GtkWidgetPath on set_parent.
There's no need to wait for realize() to have the right widget style.
2010-12-04 15:37:11 +01:00
Carlos Garnacho 6906138e45 GtkStyleSet: Remove default value for registered properties.
This should be handled at a higher level, a single default value for all
states isn't that useful...
2010-12-04 15:37:10 +01:00
Carlos Garnacho 80e01becbe Fix compilation. 2010-12-04 15:37:10 +01:00
Carlos Garnacho a323310c19 GtkNotebook: Set GtkChildClassFlags for tabs. 2010-12-04 15:37:10 +01:00
Carlos Garnacho e899fdd973 GtkCssProvider: Set default value if no state pseudo-class is specified. 2010-12-04 15:37:10 +01:00
Carlos Garnacho 66accc4184 GtkStyleSet: Add gtk_style_set_set_default().
This will set the default value to a given property for all possible states,
such default value will only be used if the queried state doesn't have a
value itself.
2010-12-04 15:37:10 +01:00
Carlos Garnacho bd9bd1310b GtkStyleContext: Fix compiler warning. 2010-12-04 15:37:09 +01:00
Carlos Garnacho 17908880b5 GtkStyle: Use new render methods underneath.
This commit should probably be squashed in the future, when GtkStyleContext
is on par with it, and GtkStyle is just a shallow object on top of
GtkStyleContext and calling it in the default implementation methods, so
all gtk_paint_* and gtk_draw_* would work.
2010-12-04 15:37:09 +01:00
Carlos Garnacho f5adc2a1c3 Add region details in gtk_widget_get_path(). 2010-12-04 15:37:09 +01:00
Carlos Garnacho cf27f6f1cf GtkStyleContext: fix typos in code.
The wrong list was being modified in gtk_style_context_set_child_class(),
and gtk_style_context_has_child_class() was checking for *flags != 0, not
flags != NULL.
2010-12-04 15:37:09 +01:00
Carlos Garnacho 104caa74f0 GtkStyleContext: Add gtk_style_context_list_child_classes(). 2010-12-04 15:37:09 +01:00
Carlos Garnacho 67c4f8d02e GtkCssProvider: Compare GtkWidgetPath regions with css. 2010-12-04 15:37:08 +01:00
Carlos Garnacho 977a972358 GtkCssProvider: fix parsing of consecutive pseudo-classes.
Now either of foo{}, foo:first-child{}, foo:nth-child(even):insensitive or
foo:active{} will be correctly parsed.
2010-12-04 15:37:08 +01:00
Carlos Garnacho 0be4659c5d GtkCssProvider: move to next selector element on match or child combinator. 2010-12-04 15:37:08 +01:00
Carlos Garnacho bc0af3208d GtkCssProvider: free selector path on parse_rule(). 2010-12-04 15:37:08 +01:00
Carlos Garnacho 07171d5f68 GtkCssProvider: Add named regions to selector path. 2010-12-04 15:37:08 +01:00
Carlos Garnacho 707d5ae99c GtkCssProvider: Parse named regions. 2010-12-04 15:37:07 +01:00
Carlos Garnacho 11c874619b GtkWidgetPath: Add API for named regions. 2010-12-04 15:37:07 +01:00
Carlos Garnacho 71949e05c4 Refurbish GtkWidgetPath API.
The foreach() function is now gone, there's now API to get
GTypes and names from the position in the path.
2010-12-04 15:37:07 +01:00
Carlos Garnacho f60e3f3a8a Move GtkChildClassFlags to gtkenums.h. 2010-12-04 15:37:06 +01:00
Carlos Garnacho 8c03503d16 GtkCssProvider: Add support for child/descendant combinators.
Now, selectors like:

  GtkWindow > GtkButton {}
  GtkNotebook > GtkLabel {}

will represent a direct parent/child relation between both elements, while

  GtkWindow GtkButton {}
  GtkNotebook GtkLabel {}

will allow intermediate children between these.
2010-12-04 15:37:06 +01:00
Carlos Garnacho d691e79cbf GtkCssProvider: Fix typo freeing SelectorElements. 2010-12-04 15:37:05 +01:00
Carlos Garnacho abbeb89b7c GtkCssProvider: Allow empty selector.
universal selector is implied, so things like this work:

:active {}
:insensitive{}
2010-12-04 15:37:05 +01:00
Carlos Garnacho 4c8353bcbf GtkCssProvider: Allow '*' selectors.
These would match a single widget of any type.
2010-12-04 15:37:04 +01:00
Carlos Garnacho 468f216b1c GtkCssProvider: Add state parsing.
Now state is now defined as a pseudoclass in the CSS format, selectors like:

GtkWidget:active { }
GtkButton:insensitive { }
GtkCalendar:prelight { } (also :hover is accepted)
...

define the style for the given state.
2010-12-04 15:37:03 +01:00
Carlos Garnacho 7dada9949d GtkWidget: Create GtkCssProvider for user modifications.
~/.gtk-X.0.css is checked, and added as a style resource if available.
2010-12-04 15:37:03 +01:00
Carlos Garnacho 82f485afd9 GtkStyleProvider: Add defines for most common priorities. 2010-12-04 15:37:02 +01:00
Carlos Garnacho bccad0c65c Added GtkCssProvider.
GtkCssProvider is a GtkStyleProvider implementation which is able to read
CSS-like input to style widgets.

At the moment, only the basic parser features are available.
2010-12-04 15:37:02 +01:00
Carlos Garnacho 7c5c4d86ae Add GtkWidgetPath parameter to gtk_style_provider_get_style(). 2010-12-04 15:37:02 +01:00
Carlos Garnacho 9971f386b0 GtkStyleSet: Add method to lookup property default settings. 2010-12-04 15:37:01 +01:00
Carlos Garnacho 7647deb417 GtkStyleSet: Make property registration take const GValues. 2010-12-04 15:37:01 +01:00
Carlos Garnacho fdcda4b356 GtkStyleContext: allow late set_path() calls.
Now the properties will only be regenerated whenever there's a GtkWidgetPath
to query about.
2010-12-04 15:37:00 +01:00
Carlos Garnacho bdadcb568c GtkStyleContext: Fix compiler warning. 2010-12-04 15:37:00 +01:00
Carlos Garnacho f984c39e93 GtkStyleContext: Fix typo. 2010-12-04 15:37:00 +01:00
Carlos Garnacho f8c74ae54b GtkStyleContext: Add gtk_render_handle(). 2010-12-04 15:36:59 +01:00
Carlos Garnacho 9e5d9ff28d GtkThemingEngine: Add vmethod to render a handle area. 2010-12-04 15:36:59 +01:00
Carlos Garnacho 160821042c GtkStyleContext: Add gtk_render_extension(). 2010-12-04 15:36:59 +01:00
Carlos Garnacho aa1d492fe9 GtkThemingEngine: Add vmethod to render an extension. 2010-12-04 15:36:58 +01:00
Carlos Garnacho 88492a50d6 GtkStyleContext: Add gtk_render_frame_gap(). 2010-12-04 15:36:58 +01:00
Carlos Garnacho af1edc3d88 GtkThemingEngine: Add vmethod to render frames with a gap. 2010-12-04 15:36:58 +01:00
Carlos Garnacho 6a1b54f8bf GtkStyleContext: Add gtk_render_slider(). 2010-12-04 15:36:57 +01:00
Carlos Garnacho 2ebdf80adc GtkThemingEngine: Add vmethod to render sliders. 2010-12-04 15:36:57 +01:00
Carlos Garnacho 86727adc4d GtkStyleContext: Add gtk_render_line(). 2010-12-04 15:36:57 +01:00
Carlos Garnacho b8f6617d99 GtkThemingEngine: Add vmethod to render lines. 2010-12-04 15:36:56 +01:00
Carlos Garnacho f80fbbd829 GtkStyleContext: Add gtk_render_layout(). 2010-12-04 15:36:56 +01:00
Carlos Garnacho 92994a0129 GtkThemingEngine: Add vmethod to render layouts. 2010-12-04 15:36:56 +01:00
Carlos Garnacho 0486f5bbc0 GtkStyleContext: Add gtk_render_focus(). 2010-12-04 15:36:56 +01:00
Carlos Garnacho 8439537e2f GtkThemingEngine: Add vmethod to render focus indicator. 2010-12-04 15:36:55 +01:00
Carlos Garnacho 9c3b079c1c GtkStyleContext: Add gtk_render_expander(). 2010-12-04 15:36:55 +01:00
Carlos Garnacho 19fdaabf4c GtkThemingEngine: Add vmethod to render expanders. 2010-12-04 15:36:55 +01:00
Carlos Garnacho b4c8eba480 GtkStyleContext: Add gtk_render_frame(). 2010-12-04 15:36:55 +01:00
Carlos Garnacho 48990bc71c GtkThemingEngine: Add vmethod to render frames. 2010-12-04 15:36:54 +01:00
Carlos Garnacho 25488633ec GtkStyleContext: Add gtk_render_background(). 2010-12-04 15:36:54 +01:00
Carlos Garnacho 13812de971 GtkThemingEngine: Add vmethod to render backgrounds. 2010-12-04 15:36:54 +01:00
Carlos Garnacho 01a8e06842 GtkStyleContext: Add gtk_render_arrow(). 2010-12-04 15:36:54 +01:00
Carlos Garnacho b7ca7d19ee GtkThemingEngine: Add vmethod to render arrows. 2010-12-04 15:36:54 +01:00
Carlos Garnacho 1c15b140a9 GtkStyleContext: Add gtk_render_option(). 2010-12-04 15:36:53 +01:00
Carlos Garnacho 263f6de0e5 GtkThemingEngine: Add vmethod to render radio buttons. 2010-12-04 15:36:53 +01:00
Carlos Garnacho 401625b8b3 GtkStyleContext: Add gtk_render_check(). 2010-12-04 15:36:53 +01:00
Carlos Garnacho acf4306bcd GtkThemingEngine: Add vmethod to render checkboxes. 2010-12-04 15:36:53 +01:00
Carlos Garnacho bf7a9914dd GtkThemingEngine: Add accessors to style classes. 2010-12-04 15:36:53 +01:00
Carlos Garnacho fe4a6cea73 GtkWidget: Add widget path to style context. 2010-12-04 15:36:53 +01:00
Carlos Garnacho 1d2aa61407 GtkStyleContext: Add child style classes.
Child style classes are like style classes, but with additional positional
information. This would be usually set by the parent container.
2010-12-04 15:36:52 +01:00
Carlos Garnacho 9a76d1a332 GtkStyleContext: Add style classes.
Style classes are the replacement of detail strings.
2010-12-04 15:36:52 +01:00
Carlos Garnacho bd3b97d82b GtkStyleContext: Relate to a GtkThemingEngine. 2010-12-04 15:36:52 +01:00
Carlos Garnacho 0171c76871 GtkThemingEngine: Add module loading capabilities. 2010-12-04 15:36:52 +01:00
Carlos Garnacho 57be029b15 Add GtkThemingEngine.
GtkThemingEngine will be the theming engines base class, with default
implementations for all paint functions, and readonly access to the
related GtkStyleContext data.
2010-12-04 15:36:52 +01:00
Carlos Garnacho b7e6ae3983 GtkStyleContext: Add gtk_style_context_[gs]et_path()
This relates a GtkStyleContext with a widget path, so
all style querying would happen based on it.
2010-12-04 15:36:52 +01:00
Carlos Garnacho 9794b6adf9 GtkWidget: Add gtk_widget_get_path().
This function composes and returns a GtkWidgetPath representing
the passed widget.
2010-12-04 15:36:52 +01:00
Carlos Garnacho 61360dfddf Add GtkWidgetPath.
GtkWidgetPath represents a widget path. It will mainly used by theming
engines to know detail about the widget hierarchy without actually
accessing the widget.
2010-12-04 15:36:51 +01:00
Carlos Garnacho 835cc7049c GtkStyleContext: Add getters and setter for state. 2010-12-04 15:36:51 +01:00
Carlos Garnacho 3f93c714ae GtkWidget: Add gtk_widget_get_style_context().
There will be one GtkStyleContext per widget, at the moment its
lifetime is tied to the widget's, but it could be narrowed down
to GTK_WIDGET_REALIZED.
2010-12-04 15:36:51 +01:00
Carlos Garnacho 2e96770e0b Add GtkStateFlags.
It basically represents GtkStateType as a flag set.
2010-12-04 15:36:50 +01:00
Carlos Garnacho 8a7e035ac7 GtkStateType: Add inconsistent and focused state. 2010-12-04 15:36:50 +01:00
Carlos Garnacho b82355c76e GtkStyleContext: Fix typo. 2010-12-04 15:36:50 +01:00
Carlos Garnacho 28b7782d78 GtkStyleSet: Add method to register border property. 2010-12-04 15:36:50 +01:00
Carlos Garnacho 16484f8459 GtkStyleSet: Add method to register font properties. 2010-12-04 15:36:49 +01:00
Carlos Garnacho 1a3d964615 GtkStyleContext: Add methods to query composed style. 2010-12-04 15:36:49 +01:00
Carlos Garnacho 2da033b18c GtkStyleSet: Return default value if value is not set. 2010-12-04 15:36:49 +01:00
Carlos Garnacho 9fdcbd7a84 GtkStyleSet: Add valist and varargs getters/setters. 2010-12-04 15:36:48 +01:00
Carlos Garnacho 2bf7483e74 GtkStyleSet: Use property GQuark as store keys. 2010-12-04 15:36:48 +01:00
Carlos Garnacho 4c60de4783 GtkStyleSet: Add style property registration funcs.
Also some properties have been added as a default set.
2010-12-04 15:36:48 +01:00
Carlos Garnacho 2b425d89c8 Add GtkStyleContext.
GtkStyleContext will conglomerate the information of several
GtkStyleProviders for widgets and theme engines to query it.
2010-12-04 15:36:48 +01:00
Carlos Garnacho 530ae15f96 gtkstyleset.h: Add declaration for gtk_style_set_merge(). 2010-12-04 15:36:48 +01:00
Carlos Garnacho f969470ad8 GtkStyleSet: Implement GtkStyleProvider.
As simple as it can get.
2010-12-04 15:36:47 +01:00
Carlos Garnacho 019fa73308 Add GtkStyleProvider, an interface to provide style details.
The get_style() function isn't final yet, further parameters
should be added to query details based on the widget hierarchy,
name, etc.
2010-12-04 15:36:47 +01:00
Carlos Garnacho f601abd25f Add GtkStyleSet, a store of style properties.
At the moment there's only basic API for adding,
removing and clearing a property. There's also
API to merge 2 GtkStyleSets.
2010-12-04 15:36:47 +01:00
Carlos Garnacho 06288b5ae8 Add GTK_STATE_LAST to mark the end of GtkState enum. 2010-12-04 15:36:47 +01:00
Yaron Shahrabani 0d873a61e5 Updated Hebrew translation 2010-12-04 15:28:27 +02:00
Tristan Van Berkom 1d3961b342 Fixing gtk_cell_area_box_focus().
the ->focus() method was getting mixed up when more than
one cell was in the same group (not aligned), added the
proper check to break out of the loop on time.
2010-12-04 21:49:44 +09:00
Tristan Van Berkom c4eff8b6b0 Added some "align" checkbuttons to show configurable cell alignments in testtreeedit. 2010-12-04 21:41:48 +09:00
Tristan Van Berkom bbee4de33d Fixed typo in GtkCellArea docs. 2010-12-04 20:54:36 +09:00
Tristan Van Berkom b0f849eafd Changed GTK_CELL_AREA_WARN_INVALID_CHILD_PROPERTY_ID for GTK_CELL_AREA_WARN_INVALID_CELL_PROPERTY_ID 2010-12-04 20:52:03 +09:00
Tristan Van Berkom 9c7e00f744 Fixing GtkTreeViewColumn to use the new _gtk_cell_layout_buildable_custom_tag_end correctly. 2010-12-04 17:10:31 +09:00
Tristan Van Berkom 84eb40b57e Added GtkEntryCompletion:cell-area construct property.
- Removed most of GtkCellLayout implementation in favor of ->get_area()
  - This allows GtkBuildable cell layout implementation to implement
    the child "cell-properties"
  - Also allows feeding a custom/different GtkCellArea implementation to
    layout cells.
  - Share the internal area with the created GtkTreeViewColumn.
2010-12-04 16:55:49 +09:00
Tristan Van Berkom 52ba4f49c5 Added boolean return to GtkCellLayout buildable custom tag end shared private function. 2010-12-04 16:53:28 +09:00
Tristan Van Berkom c8c5ed8fa1 Removing hack and fixing gtk_tree_view_column_cell_get_size().
Now consult gtk_cell_area_context_get_preferred_height().

It can be that height-for-widths requested here were too large
when multiple cells are in play because of the alignments stored
in the context... removing the temporary focus-line-width hack.
2010-12-04 16:04:04 +09:00
Tristan Van Berkom 0f4a2d322b Fixed merge conflicts from cherry-pick of construct-only GtkTreeViewColumn:cell-area property. 2010-12-04 15:52:40 +09:00
Tristan Van Berkom acc4dd2912 Added GtkTreeViewColumn:cell-area construct-only property.
Allow feeding treeviewcolumn a custom cell-area (or not a custom one,
but allow sharing the cell-area with say, the combo-box area).

This patch also:

 - Fixes signal connections to the area (now they do eventually get
   disconnected at dispose time, they are handled regardless if a
   treeview is set but execute safely, at least there is only one
   connection/disconnection).

 - Fixes refcounting on the cell_area (GtkCellArea is GInitiallyUnowned).

 - Adds a constructor() in order to build the cell-area if one has
   not been provided by the caller before hand at g_object_new()
   construct time.
2010-12-04 15:49:46 +09:00
Tristan Van Berkom 9c6a801f52 Migrated GtkCellLayout documentation into the source code.
Also added a section on specifying <cell-packing> properties
in the GtkCellLayout UI description.
2010-12-04 15:41:42 +09:00
Tristan Van Berkom 7e2571a358 Added "Cell Properties" section to the GtkCellArea documentation. 2010-12-04 15:02:53 +09:00
Tristan Van Berkom 2a41de70b1 Removing an unused variable from GtkCellRendererText->get_preferred_width() 2010-12-04 14:31:45 +09:00
Matthias Clasen 12e5e24c3e Another attempt to fix the gdk symbol list 2010-12-03 23:50:58 -05:00
Matthias Clasen d998e7761c Update sections 2010-12-03 15:41:37 -05:00
Benjamin Otte 350fb1d55c API: gdk: Rename GdkWindowObjectClass to GdkWindowClass
Be consistent in the naming of objects.
2010-12-03 19:11:13 +01:00
Benjamin Otte d916398dd2 API: Rename GdkWindowClass to GdkWindowWindowClass
We argued replacing GdkWindowClass with a input_only boolean, but this
is not doable in an API-stable way, so I decided against it.
2010-12-03 19:11:13 +01:00
Matthias Clasen a996a309c7 One more forgotten symbol 2010-12-03 13:05:23 -05:00
Matthias Clasen 5687d7f880 Update gdk symbol list 2010-12-03 13:04:42 -05:00
Andrej Žnidaršič 3d81af670d Updated Slovenian translation 2010-12-03 18:10:08 +01:00
Matthias Clasen 17e2c5391c Fix up parameter mismatches in the docs
And other minor gdk doc fixes.
2010-12-03 09:07:06 -05:00
Matthias Clasen 4ef86fc500 Add annotation to gdk_screen_get_monitor_geometry
Pointed out by William Jon McCann.
2010-12-03 08:21:48 -05:00
Tristan Van Berkom c5a60e035d Removed GtkCellAreaBoxPrivate from GtkCellAreaBox section. 2010-12-03 17:21:28 +09:00
Tristan Van Berkom 0fa7477091 Adding documentation for GtkCellAreaBox. 2010-12-03 17:13:31 +09:00
Tristan Van Berkom 9e3ebe4955 Marking GtkCellArea structure portions as /*< private >*/ 2010-12-03 17:12:59 +09:00
Tristan Van Berkom 4c165de31f Added gtk-doc to GtkCellArea & GtkCellAreaContext. 2010-12-03 16:29:11 +09:00
Tristan Van Berkom b84f5aa4dd Added symbols from 'treeview-refactor' branch to gtk.symbols file. 2010-12-03 16:28:06 +09:00
Michael Natterer e4cbe47a11 gtk: properly indent calls to gdk_threads_add_timeout() 2010-12-02 23:01:12 +01:00
Bastien Nocera b1beaa2dea docs: Fix building with latest GDK changes 2010-12-02 21:01:53 +00:00
Matthias Clasen f5c27476a5 Don't require a display for the color test
Its not really needed, and the build bot doesn't have X...
2010-12-02 16:00:15 -05:00
Benjamin Otte fdb242ac6a gdk: Clean up Cairo code
Remove a bunch of code that is not required.
2010-12-02 20:21:05 +01:00
Benjamin Otte 0b6c184eaa label: Clarify docs for gtk_label_get_layout() 2010-12-02 20:21:05 +01:00
Benjamin Otte f9a9567731 gdk: Replace direct calls of _gdk_event_func with _gdk_event_emit()
For now that function just calls the event func.
2010-12-02 20:21:05 +01:00
Benjamin Otte b3e8504111 x11: Don't include gdkprivate.h in gdkx.h
It's private, mkay?
And include it directly where we need it anyway.
2010-12-02 20:21:05 +01:00
Benjamin Otte a6b407cf4a gtk: Fix typos in comment 2010-12-02 20:21:05 +01:00
Benjamin Otte 8c6831ab5e gdk: Remove useless macros from gdkprivate.h 2010-12-02 20:21:05 +01:00
Benjamin Otte f5be938840 gtk: Don't include private GDK headers
Use the function that exists for this purpose instead.
2010-12-02 20:21:05 +01:00
Benjamin Otte 585c489577 gdk: Remove GDK_PANGO_UNITS_OVERFLOWS() from internal headers
It's unused.
2010-12-02 20:21:05 +01:00
Benjamin Otte 4d1604c77d gdk: Move window beeps into GdkWindowImpl
One less magic function. Also refactored it to make it easier to
implement. It now returns TRUE if it beeped and FALSE if it failed to do
so. A default implementation exists that just returns FALSE for all the
backends that can't beep windows (read: everything but X11 with XKB -
and why on earth do keyboard libs implement beeping?)
2010-12-02 20:21:05 +01:00
Benjamin Otte 1269f8424f gdk: Make get_shape and get_input_shape vfuncs
Trying to get rid of all the _gdk_windowing_something() functions that
we expect backends to magically know about and instead put them in a
proper interface (mostly GdkWindowImplClass).
2010-12-02 20:21:04 +01:00
Benjamin Otte 218eea4378 gdk: Remove GdkDrawable
It's unused.
2010-12-02 20:21:04 +01:00
Benjamin Otte b9fc6a0c03 gdk: Remove remaining includes of gdkdrawable.h 2010-12-02 20:21:04 +01:00
Benjamin Otte 4bfa4e0d86 gdk: Make GdkWindowImpl inherit from GObject 2010-12-02 20:21:04 +01:00
Benjamin Otte 3494f87a10 API: Remove GdkNoExposeEvent
It's not used by anyone and not supported by any backend but X11.
2010-12-02 20:21:04 +01:00
Benjamin Otte 98838df2db gdk: Make GdkWindow->impl a GdkWindowImpl 2010-12-02 20:21:04 +01:00
Benjamin Otte e3013a5cf5 docs: Replace mentions of drawable with window in migration guide
No need to let gtk3-aware people learn about wonderous gtk2 terms when
they are migrating old code. ;)
2010-12-02 20:21:04 +01:00
Benjamin Otte d03c94907a docs: Remove overrides for types that don't exist anymore 2010-12-02 20:21:04 +01:00
Benjamin Otte ba20a00570 tests: Remove disabled testtext example 2010-12-02 20:21:04 +01:00
Benjamin Otte 804c2c8350 cellrenderer: Fix docs to say cairo_t instead of GdkDrawable 2010-12-02 20:21:04 +01:00
Benjamin Otte 17a0a467a1 gdk: Pass the GdkWindow to resize_cairo_surface vfunc
So it's in sync with all the other vfuncs.
2010-12-02 20:21:04 +01:00
Benjamin Otte e4c27b0a59 API: GdkWindow no longer is a GdkDrawable
Also, name the get_type function properly.
2010-12-02 20:21:03 +01:00
Benjamin Otte 1ad7c5f8c5 x11: Remove unused GDK_DRAWABLE_XROOTWIN macro 2010-12-02 20:21:03 +01:00
Benjamin Otte 2408936bb5 x11: Remove duplicate definition of GDK_WINDOW_XID
Now, where did that come from?
2010-12-02 20:21:03 +01:00
Benjamin Otte d1700d6e3c gdk: Move ref_cairo_surface from GdkDrawable to GdkWindowImpl
Also make it take the actual GdkWindow, not the implementation, like all
the other vfuncs do.
2010-12-02 20:21:03 +01:00
Benjamin Otte 62d004cf8f gdk: Remove _gdk_drawable_ref_cairo_surface()
Instead, call the vfunc directly from gdkWindow.c
2010-12-02 20:21:03 +01:00
Benjamin Otte 9d2abf81d2 x11: Remove outdated variable definition 2010-12-02 20:21:03 +01:00
Benjamin Otte 1215f70e23 gdk: Remove GdkDrawable->create_cairo_surface vfunc
It's unused.
2010-12-02 20:21:03 +01:00
Benjamin Otte 370d272b13 gdk: Remove _gdk_window_impl_get_type() function
It was only used in the backends, and they can use the correct type
directly.
2010-12-02 20:21:03 +01:00
Benjamin Otte ac4609ecc9 x11: Fix in_rectangle computation
A point is not in a rectangle when it's at the x + width coordinate.
2010-12-02 20:21:03 +01:00
Benjamin Otte 1bb6f48bb3 gdk: Rename GdkWindowObject to GdkWindow
... and remove most of the casting that used to be necessary.
2010-12-02 20:21:03 +01:00
Benjamin Otte 7acb64f983 gdk: Make GdkWindowImpl a class, not an interface
It's a subclass of GdkDrawable and the baseclass for GdkWindowImplX11
etc now.
2010-12-02 20:21:02 +01:00
Benjamin Otte b3bca70d5b gdk: Remove unused medialib code 2010-12-02 20:21:02 +01:00
Benjamin Otte b1f6df8085 API: Remove gdkdrawable.h from public headers
It continues to exist as a private header.
2010-12-02 20:21:02 +01:00
Benjamin Otte 771fa78257 textbuffer: Remove check for GdkDrawable
This should only have been used for stipple patterns, and those are gone
now.
2010-12-02 20:21:02 +01:00
Benjamin Otte cf6ce6e671 API: Decouple GdkWindow from GdkDrawable
Make GdkWindow no longer typedeffed to GdkDrawable, but instead make it
be its own (private) type.
2010-12-02 20:21:02 +01:00
Benjamin Otte 81605623e2 gdk: Use GdkDrawable for impl pointers
... instead of GdkWindow
2010-12-02 20:21:02 +01:00
Benjamin Otte a7e6d6c4b4 gtk: Avoid GdkDrawable usage, including needless casts 2010-12-02 20:21:02 +01:00
Benjamin Otte 63808f90a2 gail: Avoid needless calls to GdkDrawable 2010-12-02 20:21:02 +01:00
Benjamin Otte 62622a94ae gdk: Pass Drawable as argument
We're not passing a GdKWindow here, but the implementation.
2010-12-02 20:21:02 +01:00
Benjamin Otte 072498ae87 gdk: Make _gdk_window_ref_cairo_surface() protected and use it
... instead of _gdk_drawable_ref_cairo_surface() where appropriate.
Also, don't implement the drawable->create_cairo_surface vfunc anymore.

This is in preparation for the split of GdkWindow from GdkDrawable.
2010-12-02 20:21:02 +01:00
Benjamin Otte e724054d19 API: Remove GDK_WINDOW_XWINDOW() macro
Use GDK_WINDOW_XID() instead.

THis was done using sed, so there might be issues resulting to that.
Feel free to fix.
2010-12-02 20:20:56 +01:00
Benjamin Otte 18a6976e5a API: gdk: Don't track outstanding surfaces
You are not allowed to track surfaces from GDK or draw outside of expose
events. So we can remove ugly hacks needed previously. See
https://bugzilla.gnome.org/show_bug.cgi?id=606009 for the introduction
of this workaround.
2010-12-02 20:17:28 +01:00
Benjamin Otte fe6f76a5a2 x11: Make wrapper member a GdkDrawable
This is in preparation for getting rid of GdkDrawable as a dependency of
GdkWindow.
2010-12-02 20:17:28 +01:00
Benjamin Otte becaf660fc API: gdk_drawable_get_visible_region => gdk_window_get_visible_region
Also get rid of the GdkDrawable vfunc.
2010-12-02 20:17:28 +01:00
Benjamin Otte 6a3a89a621 API: gdk_drawable_get_clip_region() => gdk_window_get_clip_region()
Also remove the vfunc from GdkDrawableClass.
2010-12-02 20:17:28 +01:00
Benjamin Otte 97e6e9d212 API: Make gdk_cairo_create() take a GdkWindow
This is not strictly an API change as GdkDrawable is typedeffed to
GdkWindow, but it changes the header, so I'm marking it as such.
gdk_cairo_create() can only be used with windows these days, so it makes
sense to pass a window. With that, we can alseo remove the
set_cairo_clip() vfunc from GdkDrawable and implement it inside
gdkwindow.c.
2010-12-02 20:17:28 +01:00
Benjamin Otte 65dde2f92f API: Remove gdk_cairo_reset_clip()
You should not ever ever ever call cairo_reset_clip(). If you do, your
code is broken and you deserve everything you get.
And we should definitely not support this insanity.
2010-12-02 20:17:28 +01:00
Benjamin Otte d154344a43 win32: Remove some unused defines 2010-12-02 20:17:28 +01:00
Benjamin Otte 88399c041c x11: Remove GdkDrawableImplX11
It's not use anymore, the whole functionality has been moved to
GdkWindowImplX11.
2010-12-02 20:17:27 +01:00
Benjamin Otte 3e6a4af6d3 x11: _gdk_x11_drawable_update_size() => _gdk_x11_window_update_size() 2010-12-02 20:17:27 +01:00
Benjamin Otte bb79506665 x11: Move cairo_surface and wrapper members to GdkWindowImplX11 struct 2010-12-02 20:17:27 +01:00
Benjamin Otte 1c7f58fdb6 x11: Move xid member from GdkDrawableImplX11 to GdkWindowImplX11 2010-12-02 20:17:27 +01:00
Benjamin Otte a3c5005eef x11: Use GDK_WINDOW_XID() instead of writing it out 2010-12-02 20:17:27 +01:00
Benjamin Otte 094b0eeb98 x11: Remove screen member from GdkDrawableImplX11 2010-12-02 20:17:27 +01:00
Benjamin Otte 5f12730599 x11: Get display from window, not from impl-drawable's screen 2010-12-02 20:17:27 +01:00
Benjamin Otte cfa67127a1 x11: Get display from window, not from impl-drawable's screen 2010-12-02 20:17:27 +01:00
Benjamin Otte dc7d8dae67 x11: Change GDK_WINDOW_SCREEN macro
on't look at GdkDrawableImplX11->screen, but call
gdk_window_get_screen() instead.
2010-12-02 20:17:27 +01:00
Benjamin Otte 5139eecc75 API: x11: Remove GDK_DRAWABLE_XID and GDK_DRAWABLE_XDISPLAY
Window equivalents exist and drawables are on their way out.
2010-12-02 20:17:27 +01:00
Benjamin Otte 3b8aea389d x11: Use window macros instead of drawable macros
GDK_WINDOW_XID() instead of GDK_DRAWABLE_XID()
GDK_WINDOW_XDISPLAY() instead of GDK_DRAWABLE_XDISPLAY()
2010-12-02 20:17:27 +01:00
Benjamin Otte 91679c384a API: Remove gdk_x11_drawable_get_xdisplay()
No need for the function. Macros exist to do the same thing.
2010-12-02 20:17:27 +01:00
Benjamin Otte 0841281b55 x11: Use window macros in test code 2010-12-02 20:17:27 +01:00
Benjamin Otte 28ba4c2146 im-xim: Use window macros instead of drawable macros 2010-12-02 20:17:27 +01:00
Benjamin Otte 3af4432c6f API: x11: Remove gdk_x11_window_get_drawable_impl()
It's not used anymore
2010-12-02 20:17:27 +01:00
Benjamin Otte deffc9e39f API: x11: Change GDK_WINDOW_XDISPLAY() macro
Instead of lots of magic, we can go the usual way of requesting the
XDisplay of the window's display. So we do that.
2010-12-02 20:17:27 +01:00
Benjamin Otte cf51750bf4 API: x11: gdk_drawable_get_xid => gdk_window_get_xid
Also moves the function implementations to gtkwindow-x11.c.
2010-12-02 20:17:27 +01:00
Jorge González 86390c99dd Updated Spanish translation 2010-12-02 19:28:16 +01:00
Jorge González c5d1b36e87 Updated Spanish translation 2010-12-02 19:28:12 +01:00
Tristan Van Berkom 513546f3df Adding GtkCellArea to gtk-doc build (added to gtk3.types, gtk-docs.sgml and updated gtk3-sections.txt file). 2010-12-03 00:29:43 +09:00
Tristan Van Berkom a7ad110fe9 Adding more documentation to GtkCellArea, documented GtkCellAreaClass structure. 2010-12-03 00:29:22 +09:00
Bastien Nocera 66122b369e gtk: Centre the text under the icon in GtkIconView
No point in setting the alignment to centre if we don't center it
within the cell itself.
2010-12-02 15:04:32 +00:00
Tristan Van Berkom 005964b22a Manually pulling back a GtkTreeViewColumn fix from treeview-refactor-staging
This fix has evolved in the staging branch since all column members are
on a private structure, but since it causes warnings when closing the
windows of the testcellarea test (because the combo-boxes use a treeviewcolumn)
I thought it nice for now to just manually include the fix.

The fix is just proper bookkeeping of delegate objects at dispose() time.
2010-12-02 17:42:46 +09:00
Tristan Van Berkom cd09abf461 Changed tests/testcellarea.c (and scaffolding) to only reorient the GtkCellArea
It's a better test case if the scaffolding only displays the rows from top
to bottom and doesnt line up the cells from left to right (because it shows
that height-for-width still works with vertically oriented areas).
2010-12-02 17:10:10 +09:00
Tristan Van Berkom 2bf8f7eab9 Removed unused variable from GtkCellAreaBoxContext. 2010-12-02 17:09:44 +09:00
Tristan Van Berkom 03a72118ad Merge branch 'master' into treeview-refactor
Conflicts:
	tests/Makefile.am
2010-12-02 13:58:02 +09:00
Matthias Clasen dd678ac323 Avoid a warning when finalizing toolbars
Recent changes cause disposing menus to emit ::deactivate. So better
disconnect the deactivate handler first.
2010-12-01 23:32:35 -05:00
Tristan Van Berkom a9fd00a435 Fixed GtkCellAreaBoxContext for some typos introduced while removing GtkCellAreaContext->sum_preferred_width()/height() apis. 2010-12-02 13:19:37 +09:00
Cosimo Cecchi 6587652433 app-chooser-button: don't insert empty rows in the combobox 2010-12-01 20:18:12 +01:00
Cosimo Cecchi b17f033857 app-chooser-button: add a note in the docs 2010-12-01 17:04:22 +01:00
Cosimo Cecchi 6e6379c633 app-chooser: add docs and symbols coverage for new API 2010-12-01 17:04:22 +01:00
Cosimo Cecchi 510d65ba08 app-chooser-button: add gtk_app_chooser_button_set_active_custom_item()
This allows to pre-select a custom item.
2010-12-01 17:04:22 +01:00
Cosimo Cecchi 9ffd1f7adb app-chooser-button: make sure to always get a valid iter
Even in case there are no installed applications for our content type.
2010-12-01 17:03:51 +01:00
Bastien Nocera 959fc60c47 gtk: Allow hiding the trough/slider in GtkScale
When setting a GtkRange's upper and lower values to the same
value, the slider will not be drawn any more.

https://bugzilla.gnome.org/show_bug.cgi?id=549720
2010-12-01 15:39:50 +00:00
Tristan Van Berkom 30561228ed Added some rules to GtkCellAreaBox for rendering the last cell.
- When we reach a cell that is out of the render area, break out
   of the loop (for columns user resized too small)
 - CLAMP the size of the last renderer to fit into the area
   (so that renderers get a chance to ellipsize when rendered
   with a space less than allocation, same reason as above).
 - Hand out remaining space in the render area to the last cell,
   this is for shallow rows in the expand column which may recieve
   more than the allocated width.
2010-12-01 22:56:06 +09:00
Ivar Smolin 926622e2dd [l10n] Updated Estonian translation 2010-12-01 13:17:39 +02:00
Mahyar Moghimi 80b1c80dbb Updating Persian translation 2010-12-01 14:19:46 +03:30
Mahyar Moghimi b9bc2f1321 Updating Persian translation 2010-12-01 14:16:19 +03:30
Tristan Van Berkom a852deeb03 Fixed GtkCellArea to always activate a cell at gtk_cell_area_activate() time even if no cells have focus. 2010-12-01 16:22:18 +09:00
Tristan Van Berkom 26ac551b74 Added special clause to GtkCellAreaBox focus navigation.
If the area has no activatable cells and has focus when
focus should be cycled, immediately focus out of the area
(because focus in that case is given to the entire area).
2010-12-01 15:18:40 +09:00
Emmanuele Bassi b9859de917 switch: Fix the attribution line
Thomas Wood pointed out that the original MxGtkLightSwitch widget upon
which I based the behaviour of GtkSwitch was not written by him; the
original authors are:

  Joshua Lock
  Robert Staudinger
  Jussi Kukkonen

My apologies to all of them.
2010-11-30 21:54:48 +00:00
Matthias Clasen bdeba634d9 Update checkmenuitem docs slightly 2010-11-30 11:36:34 -05:00
Cosimo Cecchi 117e88646f Merge branch 'open-with-dialog' 2010-11-30 17:31:59 +01:00
Cosimo Cecchi 4fe23cae78 app-chooser: other misc doc fixes 2010-11-30 17:27:53 +01:00
Cosimo Cecchi 960516bf33 app-chooser: add more symbols & docs 2010-11-30 16:30:33 +01:00
Cosimo Cecchi cb916f2746 Merge branch 'master' into open-with-dialog
Conflicts:
	docs/reference/gtk/gtk3-sections.txt
	gtk/gtk.symbols
2010-11-30 16:27:28 +01:00
Guillaume Desmottes 8076dbfb5c gtkspinner: don't setup the timeout twice (#636129) 2010-11-30 15:59:49 +01:00
Cosimo Cecchi 5f942b1232 app-chooser-button: remove leftover typedef 2010-11-30 15:04:50 +01:00
Cosimo Cecchi 50e967d17b build: order new files alphabetically 2010-11-30 15:04:00 +01:00
Cosimo Cecchi d8ef15c592 app-chooser: update docs 2010-11-30 15:03:33 +01:00
Cosimo Cecchi 51cb082022 app-chooser-online: rework of the online module
- the _get_default() method is now async
- the PackageKit module will return NULL in case PackageKit is not
  available in the session bus
- the dummy module doesn't exist anymore
- the dialog won't display the online button in case there's no module
  available
2010-11-29 18:10:06 +01:00
Cosimo Cecchi 134e74177e app-chooser-button: tabs to spaces 2010-11-29 16:10:58 +01:00
Cosimo Cecchi 232a5c7b3b app-chooser-button: change the API approach for custom items
Introduce a 'custom-item-activated' on the widget, which behaves
similairly to GtkEntryCompletion::action-activated, i.e. is emitted when
a custom item is chosen from the dropdown list.
Clients can use the name provided when adding the item as a detail for
the signal, to get notified when that specific item is activated, or use
the signal without details to get notifications for all custom items.
2010-11-29 16:04:59 +01:00
Cosimo Cecchi 8ae7993397 app-chooser-button: include gtk-docs for show-dialog-item 2010-11-29 12:25:52 +01:00
Cosimo Cecchi 06f501fa07 app-chooser-button: rename GtkAppChooserComboBox -> GtkAppChooserButton 2010-11-29 12:19:18 +01:00
Tristan Van Berkom b39521dcf7 Make GtkTreeView tell the column about expand space instead of just assigning column->width.
Also modified the api to open up the way for treeview to tell the column
about how much of its size is really used to render the area.
2010-11-29 18:04:47 +09:00
Tristan Van Berkom 5729d2552b Fix GtkCellAreaBox to not paint a focus rectangle while a cell is currently being edited. 2010-11-29 16:49:34 +09:00
Tristan Van Berkom 626f27f7ed Changed cell area/renderer "can_focus" semantics to "is_activatable" across the board.
This is because focus in treeviews can be given to cells that cannot do anything
with activation (for better keynav), so we dissociate the concept of cell
activation and focusing.
2010-11-29 16:29:09 +09:00
Tristan Van Berkom dbe026ed1e Fixed GtkCellAreaBox->focus() to not give focus to cells that are siblings of an intentional focus cell. 2010-11-29 16:20:01 +09:00
Tristan Van Berkom 5f427ff476 Make focus rectangle painted on all cells if the GtkCellAreaBox is requested to paint focus and none of the cells are activatable. 2010-11-29 16:14:46 +09:00
Tristan Van Berkom 87892261e0 Make editable widget fill the entire inner area of the edited cell
instead of just the aligned focus area to match previous behaviour
2010-11-29 16:03:53 +09:00
Tristan Van Berkom 865eb60d21 Fixed GtkCellLayout to pack cells via the api when parsing builder input. 2010-11-29 13:03:54 +09:00
Tristan Van Berkom cad41833a2 Allow minimal implementation of GtkCellLayout
Since GtkCellArea delegate does all the work, cell layout widgets
who use a GtkCellArea internally only have to implement the _get_area()
method, this just reduces code to forward the calls over the the internal
cell area.
2010-11-29 13:03:41 +09:00
Tristan Van Berkom d3aed12b65 Removed cell_layout implementation details in GtkTreeViewColumn in favor of cell_layout->get_area 2010-11-29 13:01:49 +09:00
Tristan Van Berkom 2394f5e49b Touching up GtkCellArea docs. 2010-11-29 11:02:29 +09:00
Tristan Van Berkom 9ee9081405 Added initial detailed docs for GtkCellArea. 2010-11-29 10:55:50 +09:00
Tristan Van Berkom c1cbc8790e Removed gtk_cell_area_context_sum_preferred_width/height apis.
Turns out theres not much reason to do this in a separate api,
now we just sum up the sizes of aligned cell groups in GtkCellAreaContextBox
when pushing the group size.
2010-11-29 10:55:50 +09:00
Kristian Rietveld 217f688376 Remove obsolete code line 2010-11-28 21:14:33 +01:00
Kristian Rietveld cbbff6c5e6 Add temporary hack to get the row heights right 2010-11-28 21:02:36 +01:00
Kristian Rietveld 6568b59e8a Remove unused retrieval of focus-line-width 2010-11-28 20:40:59 +01:00
Kristian Rietveld 7527350d69 validate_row no longer uses focus-line-width 2010-11-28 20:39:51 +01:00
Kristian Rietveld 6fe9df2f1d First go at migrating GtkTreeView(Column) to GtkCellArea
This is still very much a work in progress, but it renders and more or
less works.  I will be fixing up the details in the very near future.

Important: this commit breaks ABI as it modifies the GtkTreeViewColumn
structure in gtktreeviewcolumn.h.  This is a sealed structure that needs
to be moved to an internal header file, most likely gtktreeprivate.h.
2010-11-28 19:54:24 +01:00
Kristian Rietveld 05b217ab2a Allow non-editable cells to receive focus
Slight tweak for GtkTreeView, also non-editable cells must be able to receive
focus to get all keyboard navigation right.  This will be further tweaked
to get focus siblings to work like focus cells did in GtkTreeView before
refactoring.
2010-11-28 19:54:24 +01:00
Kristian Rietveld 354b3412dd Available extra space could be less than zero
The allocated size, or (horizontally speaking) for-width size, can be
smaller than the sum of all minimum widths.  For example when the user
is resizing tree view columns manually.
2010-11-28 19:54:18 +01:00
Tristan Van Berkom 5df7dab3cf Changed all the flush apis on GtkCellAreaContext for a single "reset" api. 2010-11-27 16:05:14 +09:00
Tristan Van Berkom cbc4416c8e Removing the height_for_width vfuncs on GtkCellAreaContextClass which I forgot to remove. 2010-11-27 15:40:45 +09:00
Tristan Van Berkom e21c224f28 Fixing GtkCellAreaBox at render time to consider height-for-width when stacked vertically
Also bullet-proofing GtkCellAreaBoxContext at allocate time.
2010-11-26 23:44:22 +09:00
Tristan Van Berkom 08cc318946 Fixed CellAreaScaffold for new gtk_cell_area_context_allocate() api. 2010-11-26 21:38:29 +09:00
Tristan Van Berkom 487223d480 Finally really support rendering of cells in an unallocated context.
What this means is basically that a vertically oriented GtkCellAreaBox
will render cells properly even if the height is not constant for every
for of data in the said GtkCellAreaContext (i.e. the height was not allocated
by gtk_cell_area_context_allocate).

This is done completely on the fly and so is much more heavy duty
at render time (considerably slower but not visibly noticable in
lightweight views like GtkTreeMenu). Note that cell alignments
are not possible in an unallocated orientation, each row of data
individually receives only enough space to render the independant
row and no space is reserved for alignments if the size is not
a constant size across rows in the same context.
2010-11-26 21:38:10 +09:00
Tristan Van Berkom fa3c8f182e Revert "Removed tons of api that we dont absolutely need in GtkCellAreaContext:"
This reverts commit 5f7787ab2e.
2010-11-26 21:37:51 +09:00
Cosimo Cecchi ef9543e978 tests: fix indentation 2010-11-25 17:32:13 +01:00
Cosimo Cecchi 67e842be87 app-chooser-combobox: add a method to trigger the GtkAppChooserDialog
It's an optional special item in the combobox, turned off by default.
2010-11-25 17:30:01 +01:00
Tristan Van Berkom 7fc7bd613b Changed GtkCellRendererText to request less than wrap-width if the text is smaller than the wrap-width (or width-chars). 2010-11-25 22:46:55 +09:00
Tristan Van Berkom 2dd2c7ce05 Added gtk_cell_renderer_get_aligned_area() and class vfunc.
Since a cell renderer might use more space than the natural
size when recieving expand space it's impossible to know how
much space is actually used to render content.

Adding this virtual method to allow text renderers to implement
it, the base default method uses height-for-width apis and aligns
the cell assuming the renderer uses a fixed size.

This commit removes the similar code from gtkcellarea and
subclasses.
2010-11-25 17:41:26 +09:00
Tristan Van Berkom 5f7787ab2e Removed tons of api that we dont absolutely need in GtkCellAreaContext:
- gtk_cell_area_context_get_height_for_width()
  - gtk_cell_area_context_get_width_for_height()
  - gtk_cell_area_context_push_height_for_width()
  - gtk_cell_area_context_push_width_for_height()
  - gtk_cell_area_context_flush_height_for_width()
  - gtk_cell_area_context_flush_width_for_height()
  - Contextual size changed signal

All of these are not really important for the CellArea to operate
and not of any real consequential value to the user (the user can
accumulate the returned values from height-for-width requests
and do as they please with it).
2010-11-25 16:36:46 +09:00
Tristan Van Berkom 9d0c2f6b37 Make GtkCellAreaBox handle rendering without a previous allocation in the orientation of choice.
This is so that treeviews can have some columns oriented vertically and
some horizontally, usually the column will only allocate the areas
width, having vertical columns without fixed row heights just means
it's slower to render.
2010-11-25 16:09:51 +09:00
Tristan Van Berkom 57a94bfb53 Merge branch 'master' into treeview-refactor 2010-11-25 15:07:47 +09:00
Matthias Clasen a498d9a9ba Coding style fixups
This commit adjusts the app chooser code to GTK+ coding style:
- line up prototypes
- remove some excess {}
- remove tabs and trailing whitespace
- add docs
2010-11-24 18:32:05 -05:00
Matthias Clasen f64448473e Coding style fixes 2010-11-24 16:50:00 -05:00
Matthias Clasen 964b684455 Improve packing in testappchooser 2010-11-24 16:47:15 -05:00
Matthias Clasen 47308db2ba Fix reference counting for icons 2010-11-24 16:09:55 -05:00
Cosimo Cecchi 183d75b812 app-chooser-combobox: make refresh properly work with custom items
The refresh implementation leaves the custom items in place, and just
refreshes the recommended applications.
2010-11-24 19:08:17 +01:00
Cosimo Cecchi 2a95707b4c app-chooser-combobox: add an initial implementation
GtkAppChooserCombobox is an implementation of GtkAppChooser inside a
combobox that shows recommended applications for a given content type.
2010-11-24 18:45:42 +01:00
Cosimo Cecchi 627f9b70a7 app-chooser-dialog: add a 'Forget Association' context menu item 2010-11-24 17:12:08 +01:00
Cosimo Cecchi 6b900cf276 app-chooser-widget: add a 'populate-popup' signal for context menus
This way applications can append items to the menu, which will
automatically show when there's more than one item in it.
2010-11-24 17:12:04 +01:00
Cosimo Cecchi 783b36398e tests: remove radio mode from the test 2010-11-24 15:50:08 +01:00
Cosimo Cecchi 067b4ccb33 Revert "open-with-dialog: remove automatic setting of support-for-type"
This reverts commit 4cfe121296.

Conflicts:

	gtk/gtkappchooserdialog.c
2010-11-24 15:49:47 +01:00
Cosimo Cecchi abf3b4af07 open-with-widget: make sure to escape the string we use for markup 2010-11-23 18:15:28 +01:00
Cosimo Cecchi d0c35d63e0 Revert "open-with-widget: don't check if the app supports URIs/files"
This reverts commit b432242078.
2010-11-23 18:10:01 +01:00
Cosimo Cecchi 05bb715c51 app-chooser: rename GtkOpenWith to GtkAppChooser 2010-11-23 17:50:15 +01:00
Cosimo Cecchi 6f0a605891 open-with-dialog: don't show the 'Show More...' button in all mode 2010-11-23 16:53:23 +01:00
Cosimo Cecchi b432242078 open-with-widget: don't check if the app supports URIs/files
Because some apps are broken wrt. this property.
2010-11-23 16:53:23 +01:00
Cosimo Cecchi e861180a03 open-with-widget: add a show-default property 2010-11-23 16:53:23 +01:00
Cosimo Cecchi 0833894c38 open-with-widget: remove context menu
The widget should not modify itself the application list in any way.
2010-11-23 16:53:22 +01:00
Cosimo Cecchi cb934ad868 open-with-widget: remove radio mode
It's not useful for now.
2010-11-23 16:53:22 +01:00
Cosimo Cecchi 9d550fe42a open-with-pk: don't show an error if no apps are found
gnome-packagekit already shows a message dialog for us.
2010-11-23 16:53:22 +01:00
Cosimo Cecchi 04eb875e86 open-with-diaolog: set the default text according to the dialog mode 2010-11-23 16:53:22 +01:00
Cosimo Cecchi 1be137ae9f open-with-widget: let the default fallback text be customizable
We'll set it from the dialog.
2010-11-23 16:53:22 +01:00
Cosimo Cecchi 44ef183fa1 tests: update to the new API 2010-11-23 16:53:22 +01:00
Cosimo Cecchi 2cb1b7e891 open-with: move the "Show more applications" button in the dialog
It doesn't really belong in the widget now that we have the new states.
2010-11-23 16:53:22 +01:00
Cosimo Cecchi 4cfe121296 open-with-dialog: remove automatic setting of support-for-type
We don't want to hardcode any kind of policy in these widgets/dialogs from
now on.
2010-11-23 16:53:22 +01:00
Cosimo Cecchi 3b6941f087 open-with: add a public _refresh() method
This can be useful now that we're splitting some items from the widget.
2010-11-23 16:53:22 +01:00
Cosimo Cecchi f12ff4b676 open-with-widget: move to a property-based state
We can enable on-demand one of the three sections (recommended,
fallback, other apps) or use the special ALL property to display everything
uncategorized.

These properties are also easily bindable from outside.
2010-11-23 16:53:17 +01:00
Cosimo Cecchi 09b8d37b8a open-with-dialog: use misc_set_alignment instead of widget_set_halign 2010-11-23 16:51:41 +01:00
Cosimo Cecchi e7194c31a7 open-with-pk: don't set error if the user cancelled the installation 2010-11-23 16:51:40 +01:00
Cosimo Cecchi 9df2c0910d open-with-dialog: integrate the online capability 2010-11-23 16:51:40 +01:00
Cosimo Cecchi d4e1dd9734 open-with: add a PackageKit module for online lookup of applications
It's implemented with a GIOExtensionPoint, which has two
implementations:
- a dummy one, which just errors out
- a PackageKit one, which looks up for the specified content type using
  the PK DBus API and GDBus.

The PK module is optional, and can be compiled out at configure time.

TODO: a Win32 implementation of the module.
2010-11-23 16:51:40 +01:00
Cosimo Cecchi 86a8f99806 open-with-widget: don't forget to set the search column
Otherwise find-as-you-type won't work at all.
2010-11-23 16:51:40 +01:00
Cosimo Cecchi 4becd25bf5 open-with-widget: don't sort by name recommended apps 2010-11-23 16:51:40 +01:00
William Jon McCann 9bbbfe3aa8 Using italics here actually introduces more visual clutter than anything 2010-11-23 16:51:40 +01:00
William Jon McCann 370ecf0ee8 Use Related instead of the somewhat jargonny fallback 2010-11-23 16:51:40 +01:00
William Jon McCann 3c7e6cd49c Use other instead of more
More doesn't make sense when there are no apps in the list and
they aren't just more apps they are apps in another category.
2010-11-23 16:51:40 +01:00
William Jon McCann 8ea4faf0d3 The colon is a bit unneccessary and looks a bit ugly 2010-11-23 16:51:40 +01:00
William Jon McCann 1226070b93 Improve wording of no apps text 2010-11-23 16:51:40 +01:00
William Jon McCann 076e851c5f Add some window border to test open with 2010-11-23 16:51:40 +01:00
William Jon McCann 04452df476 Add a default file to open with test 2010-11-23 16:51:40 +01:00
William Jon McCann d09550b2d2 Simplify title and heading 2010-11-23 16:51:40 +01:00
Cosimo Cecchi 8b16f73f88 open-with-widget: don't set border in the widget box 2010-11-23 16:51:40 +01:00
Cosimo Cecchi 9a1cd83933 open-with-widget: add support for fallback applications
Needs some new API in GIO, which is not yet merged.
2010-11-23 16:51:40 +01:00
Cosimo Cecchi a443eb8602 open-with-dialog: remove old declarations 2010-11-23 16:51:40 +01:00
Cosimo Cecchi 1bb2a1b9ec open-with: remove obsolete code 2010-11-23 16:51:39 +01:00
Cosimo Cecchi 9150f6b13a open-with-widget: simplify code a bit 2010-11-23 16:51:39 +01:00
Cosimo Cecchi a6a56d4194 open-with-widget: add a "Show more applications" button
So that we don't always show them all unconditionally in HEADINGS mode.
2010-11-23 16:51:39 +01:00
Cosimo Cecchi 7d8e7e5f1d open-with-widget: make the list more pretty
Use bigger icons, with bold names and italic descriptions next to them.
2010-11-23 16:51:39 +01:00
Cosimo Cecchi 9ffe52c049 open-with-dialog: don't ever show_all()
As there might be some elements in the widget that we don't want to
always show.
2010-11-23 16:51:39 +01:00
Cosimo Cecchi 254cc6aca6 open-with-widget: add a context menu for recommended entries
We can put "Forget association" there, which removes the application
from the recommended list.
2010-11-23 16:51:39 +01:00
Cosimo Cecchi f8a6ac5429 tests: update to new API 2010-11-23 16:51:39 +01:00
Cosimo Cecchi 2f5073fbb3 open-with-dialog: remove the mode from the dialog, we won't use it anymore
According to the new design, the dialog should automatically do the
right thing wrt. app association and default handling.
2010-11-23 16:51:39 +01:00
Cosimo Cecchi cf25ec8fa7 open-with: first attempt to split the dialog into a widget + interface
Like GtkFileChooser does; GtkOpenWith is a generic interface, which is
now implemented by both GtkOpenWithDialog and GtkOpenWithWidget (and in
the future also by GtkOpenWithComboBox).
2010-11-23 16:51:39 +01:00
Cosimo Cecchi 9d6055d0c8 tests: use new open with mode in the tests 2010-11-23 16:51:39 +01:00
Cosimo Cecchi a4283d7bab open-with: turn the show_all_applications boolean into an enum
We have three modes of showing applications now:
- RECOMMENDED mode: shows only the recommended applications
- ALL mode: shows all applications, uncategorized
- HEADINGS: shows headings for recommended and other applications
  (default).
2010-11-23 16:51:39 +01:00
Cosimo Cecchi 77b5fcfa93 open-with: add docs and integrate with the build GTK+ conventions 2010-11-23 16:51:39 +01:00
Cosimo Cecchi 8c8f7f83ba open-with: add gtk_open_with_dialog_get_mode() 2010-11-23 16:51:39 +01:00
Cosimo Cecchi df8ccfb800 open-with: change the API to make it symmetric for GFile or content-type
It's much more convenient this way.
2010-11-23 16:51:39 +01:00
Cosimo Cecchi 3a6b936573 tests: rewrite the GtkOpenWithDialog test to make it more interactive
Now you can play with all the options provided by GtkOpenWithDialog API.
2010-11-23 16:51:39 +01:00
Cosimo Cecchi accb766db2 open-with: add misc utility API to the dialog
- _set/get_show_other_applications() is a way to only display
  recommended applications in the dialog
- _set/get_show_set_as_default_button() is a way to control the
  "Remember this application" checkbox

We also get rid of he "application-selected" signal, in favour of a
_get_selected_application() API inspired by GtkFileChooser.
2010-11-23 16:51:38 +01:00
Cosimo Cecchi a8cf63cc84 open-with: add xpadding to the treeview renderers
We use a GtkCellRenderer hack for this.
2010-11-23 16:51:38 +01:00
Cosimo Cecchi ee9a7a3baf open-with: cope with NULL GAppInfo
It's not that the GAppInfo can actually be NULL, but we use the store to
save headings too, which have no GAppInfo in their rows.
2010-11-23 16:51:38 +01:00
Cosimo Cecchi 1d67b4ac26 open-with: don't override the class signal handler, as it's RUN_LAST
And explain why in a comment; basically we want our handler to always
run before client code.
2010-11-23 16:51:38 +01:00
Cosimo Cecchi c8ea415873 open-with: don't use gtk_misc_* functions
They're so passe'!
2010-11-23 16:51:38 +01:00
Cosimo Cecchi 3d044a7c3e open-with: add a "show-other-applications" property
This is useful for use-cases where showing a list of all the installed
applications can be confusing. We can control that with a property now.
2010-11-23 16:51:38 +01:00
Cosimo Cecchi be18ca45f0 open-with: initial implementation of GtkOpenWithDialog 2010-11-23 16:51:38 +01:00
Tristan Van Berkom e53dc3479f Added GtkCellAreaClass->apply_attributes()
Made gtk_cell_area_apply_attributes use a vfunc & signal so that
subclasses might do specialized things picking up attributes from the
model possibly for embedding widgets, and as specially for GtkTreeMenu
to connect to the signal and synchronize the menu sensitivity states
in a more convenient way than going through the GtkCellLayoutDataFunc.
2010-11-23 23:37:58 +09:00
Tristan Van Berkom d56babefb4 Removed cell margin apis and now deal with "focus-line-width". 2010-11-23 16:26:46 +09:00
Tristan Van Berkom 7105d02a13 Merge branch 'master' into treeview-refactor 2010-11-16 16:21:04 +09:00
Javier Jardón 446c0fd1ad gtkmain: Remove deprecated gtk_init_add() function
https://bugzilla.gnome.org/show_bug.cgi?id=629955
2010-11-16 16:20:49 +09:00
Javier Jardón d5eee0d1bd Deprecate GtkCallbackMarshal and GtkFunction
As they're only used by already deprecated API

https://bugzilla.gnome.org/show_bug.cgi?id=629955
2010-11-16 16:20:49 +09:00
Javier Jardón a512143bab GtkArg is deprecated since 2.2 2010-11-16 16:20:49 +09:00
Javier Jardón a5ab0a4c84 docs: Add cross-reference in GtkAlign docs 2010-11-16 16:20:49 +09:00
Javier Jardón 8809e46a41 docs: Fix a typo in gtk_button_set_alignment() docs 2010-11-16 16:20:49 +09:00
Javier Jardón 70bb3776f0 docs: Remove template of unused functions 2010-11-16 16:20:49 +09:00
Javier Jardón ccd740f1b6 docs: Move documentation to inline comments: event_structs
All the GDK documentation is now moved to inline comments
2010-11-16 16:20:49 +09:00
Javier Jardón 1cbba3fae2 docs: Move documentation to inline comments: x_interaction 2010-11-16 16:20:49 +09:00
Javier Jardón 7d12d2a649 docs: Move documentation to inline comments: drawing 2010-11-16 16:20:48 +09:00
Javier Jardón dd2db852cc docs: Move documentation to inline comments: gdkthreads 2010-11-16 16:20:48 +09:00
Javier Jardón 7524d5fcbe docs: Move documentation to inline comments: gdkevents 2010-11-16 16:20:48 +09:00
Javier Jardón 4d6c033d16 docs: Move documentation to inline comments: properties 2010-11-16 16:20:48 +09:00
Javier Jardón 7090aa1e1b docs: Move documentation to inline comments: gdkselection 2010-11-16 16:20:48 +09:00
Javier Jardón 4593df1ef5 docs: Move documentation to inline comments: gdkvisual 2010-11-16 16:20:48 +09:00
Javier Jardón 2adf427467 docs: Move documentation to inline comments: gdkpango 2010-11-16 16:20:48 +09:00
Javier Jardón 1b5f0d5968 docs: Move documentation to inline comments: gdkcursor 2010-11-16 16:20:48 +09:00
Bastien Nocera e85c0f63fb gdk: Add big fat warning about updating XSettings
There's a tool to see if we forgot to update the gdk_settings_map
array, or got the offsets wrong. Mention those above the XSettings
list.
2010-11-16 16:20:48 +09:00
Bastien Nocera 038fb4b7e9 gdk: Update gdk_settings_map for blink timeout to work
gdk_settings_map needs to be updated when gdk_settings_names is changed,
and it's easier to add the setting at the end, so we don't need to
recalculate everything.

Really fixing:
https://bugzilla.gnome.org/show_bug.cgi?id=634697
2010-11-16 16:20:48 +09:00
John (J5) Palmieri 0d07cba436 [gi] add "out" annotations to gtk_tree_store_sort_column_id params 2010-11-16 16:20:48 +09:00
Petr Kovar 1e3f7ba162 Update Czech translation 2010-11-16 16:20:48 +09:00
Javier Jardón 4f92875bb1 docs: gdkrgba: Add "Since: 3.0" tags 2010-11-16 16:20:47 +09:00
Javier Jardón 40b7a916a8 docs: Remove GdkPixmap template 2010-11-16 16:20:47 +09:00
Javier Jardón 2909edb3e7 docs: Move documentation to inline comments: general 2010-11-16 16:20:47 +09:00
Javier Jardón 145fe4bdc0 docs: Move documentation to inline comments: gdkkeys 2010-11-16 16:20:47 +09:00
Javier Jardón 0b61aaacd1 docs: move documentation to inline comments: gdktesting 2010-11-16 16:20:47 +09:00
Javier Jardón 209afbbf17 docs: Move documentation to inline comments: gdkscreen 2010-11-16 16:20:47 +09:00
Javier Jardón 1a1c4be6c3 docs: Move documentation to inline comments: gdkdisplaymanager 2010-11-16 16:20:47 +09:00
Javier Jardón 236f15c3a9 docs: Move documentation to inline comments: gdkdisplay 2010-11-16 16:20:47 +09:00
Javier Jardón bb218b08e9 docs: Move documentation to inline comments: gdkapplaunchcontext 2010-11-16 16:20:47 +09:00
Jordi Mas 3166767c36 Fixes wrong translation for Catalan 2010-11-16 16:20:47 +09:00
Bruce Cowan bad8d0b8e6 Updated British English translation 2010-11-16 16:20:47 +09:00
Carlos Garcia Campos a00cd60540 docs: Mention that tooltip_column text should be escaped in GtkIconView 2010-11-16 16:20:46 +09:00
Javier Jardón 333ff7dbfc docs: Do not refer to deprecated GNOME2 porting guide
But to the related sections of Pango manual
2010-11-16 16:20:46 +09:00
Javier Jardón abb98246ff docs: Update URL of some documentation links
http://developer.gnome.org -> http://library.gnome.org
2010-11-16 16:20:46 +09:00
Gheyret T.Kenji cb1ef69b12 Added UG translation 2010-11-16 16:20:46 +09:00
Gabor Kelemen 1dd7424f0c Updated Hungarian translation 2010-11-16 16:20:46 +09:00
Tristan Van Berkom b0919b2058 Added "cell-packing" property GtkBuildable parsing to GtkCellLayout
Added gtk_cell_layout_get_area() iface vfunc and use that to apply
packing cell properties to the child renderers when parsing from
GtkBuilder.
2010-11-16 15:11:18 +09:00
Tristan Van Berkom 4ceb25e011 More documentation in gtkcellarea.c 2010-11-15 11:23:55 +09:00
Tristan Van Berkom 92dc7f31d4 Cleaned up cell editing api in GtkCellArea
Now layouting widgets need only concern themselves with
the "add-editable" and "remove-editable" signals, also added
lots of gtk-doc comments.
2010-11-14 23:33:26 +09:00
Tristan Van Berkom 1bca6349fb Mass rename GtkCellAreaIter --> GtkCellAreaContext 2010-11-13 16:23:01 +09:00
Khaled Hosny bef9559089 Updated Arabic translation 2010-11-13 15:23:34 +09:00
Javier Jardón df5286f11e examples/gtkdial: Do not use size_request vfunc 2010-11-13 15:23:34 +09:00
Matthias Clasen c68a4ad4f6 Fix a crash in gnome-terminal when using a compositor
In this case, gnome-terminal sets an RGBA visual on its window,
and we need to be careful when creating the icon pixmap, to create
the pixmap with the same depth as the visual, or we risk a BadMatch
from XRenderCreatePicture deep inside cairo.
2010-11-13 15:23:34 +09:00
Bastien Nocera 7d11c16b17 gdk: Add XSetting for "gtk-cursor-blink-timeout"
Otherwise the blink timeout is the one used by default in GTK+.

https://bugzilla.gnome.org/show_bug.cgi?id=634697
2010-11-13 15:23:34 +09:00
Matthias Clasen ed0aff4792 Remove no longer existing files
The gdk-pixbuf VC project files are gone, so don't reference
them from Makefile.am anymore.
2010-11-13 15:23:33 +09:00
Matthias Clasen 52adead88f Really get rid of _gtk_cell_renderer_calc_offset 2010-11-13 15:23:33 +09:00
Owen W. Taylor 342d897b58 Pass the correct GDK library when working around Debian libtool
We need to link against gdk/libgdk-x11-3.0.la, not
gdk/x11/libgdk-x11.la, which is the convenience library containing
the backend functions.
2010-11-13 15:23:33 +09:00
Chao-Hsiung Liao 88c1543845 Updated Traditional Chinese translation (Hong Kong and Taiwan) 2010-11-13 15:23:33 +09:00
Murray Cumming 131da8507b gtk_dialog_get_content_area(): Fix the docs.
This returns a GtkBox now, not a GtkVBox.
Language bindings may need to adjust their APIs accordingly.
2010-11-13 15:23:32 +09:00
Murray Cumming 233afbdab1 gtkdialog.c: Remove trailing whitespace 2010-11-13 15:23:32 +09:00
Marek Kasik 0fe9e481dd Print files to Documents directory by default
Set default directory to G_USER_DIRECTORY_DOCUMENTS
when printing to file backend and fallback to the current
directory when it is not available (#633896).
2010-11-13 15:23:32 +09:00
Chun-wei Fan 9d52a9d920 gtk.vcprojin: include .rc file 2010-11-13 15:23:32 +09:00
Chun-wei Fan cf34b804a4 gtk+.sln: Remove GDK-Pixbuf compilation stuff
GDK-Pixbuf is in a package of its own, so remove the project files from here
2010-11-13 15:23:32 +09:00
Chun-wei Fan 2d84d1cb38 gtk+.vsprops: Update for GTK-3.0
-removed headers that ceased to exist
-bump API version
-made up for new headers that is to be installed
-gtk-demo program and related sources/data copied to bin/gtk3-demo
2010-11-13 15:23:32 +09:00
Chun-wei Fan 14a40180cd gtklabel.c: Added hack for rint() 2010-11-13 15:23:31 +09:00
Chun-wei Fan 25c2f4b780 gtkwocket-win32.c Added missing include to avoid C4013 2010-11-13 15:23:31 +09:00
Chun-wei Fan 2e0278c752 gtk: fix C99-style variable declarations in various sources 2010-11-13 15:23:31 +09:00
John (J5) Palmieri 4e47110120 [introspection] mark invokers for gtkeditable vfuncs 2010-11-13 15:23:31 +09:00
John (J5) Palmieri b17a25142f [introspection] add transfer none annotation to gdk_keyval_name return
* moved docs from .sgml file to th e.c file so we can add the annotation
2010-11-13 15:23:31 +09:00
Matthias Clasen fdde029f06 bump version 2010-11-13 15:23:31 +09:00
Matthias Clasen 3e9d7a30b0 fix up accidental exports 2010-11-13 15:23:30 +09:00
Matthias Clasen b2ed95dd11 Another attempt at scrolledwindow size allocation
Patches taken from bug 633278.
2010-11-13 15:23:30 +09:00
Colin Walters 2facb830fa introspection: Explicitly include libgdk-x11.la when scanning gtk
Debian changed the behavior of libtool to not follow dependencies
from .la files.  Fortunately, the scanner explicitly looks at the
.la files to see if they're really shared; if not it doesn't add
them to the .gir, so there's no cost.

https://bugzilla.gnome.org/show_bug.cgi?id=633405
2010-11-13 15:23:30 +09:00
Matthias Clasen 79042e31a6 Rewrap text in gtk-demo 2010-11-13 15:23:30 +09:00
Matthias Clasen 70e161d2a2 Fix the doc build 2010-11-13 15:23:30 +09:00
Matthias Clasen 0a015f1bdb Don't export _gtk_cell_renderer_calc_offset
This is just a private convenience function, and exporting _-prefixed
functions doesn't work with our libtool setup. Just do the 3 line
calculation in gail.
2010-11-13 15:23:29 +09:00
Tristan Van Berkom e7c4ede64c Fixed some background area related bugs in CellAreaScaffold, cleanup testcellarea 2010-11-13 15:09:36 +09:00
Tristan Van Berkom eda16a096d Fixed some errors in testcellarea testcases. 2010-11-12 23:09:57 +09:00
Tristan Van Berkom 51b75ef44b Added tests to reflect proper treatment of background area.
CellAreaScaffold now also reflects how cell_area should be
passed to gtk_cell_area_activate() and gtk_cell_area_event()
and how the background area for gtk_cell_area_renderer() should
be created.
2010-11-12 21:55:28 +09:00
Tristan Van Berkom 47d55c4a4b Added orientation control to testcellarea's focus/editing test 2010-11-12 19:44:45 +09:00
Tristan Van Berkom 38666b406f Ironed out the kinks in editing apis for GtkCellArea
- Added gtk_cell_area_aligned_cell_area() to get the aligned
   internal area use by a cell (for focus painting and for
   event areas).

 - Provide the event area in "editing-started" signal

 - Fire "remove-editable" when editing is canceled by the user,
   an implementing layouting widget need only catch "editing-started"
   and "remove-editable" now.

 - CellAreaScaffold/testcellarea now edit textrenderers.
2010-11-12 19:25:07 +09:00
Tristan Van Berkom 7e821aa980 Distribute portions of GtkCellArea:render() background_area argument to cells
Also added gtk_cell_area_get/set_style_detail() to set the string to be
used by the area in gtk_paint_* functions.
2010-11-12 14:06:00 +09:00
Tristan Van Berkom 33db66e728 Added event handling to GtkCellAreaBox
Now GtkCellAreaBox handles the click event to activate renderers
and checks if the area is in a sibling of a focus renderer, possibly
activating the proper focus sibling renderer.

Also GtkCellArea gains a "focus-changed" signal to allow it to
change the currently focused row according to the button events.
2010-11-11 18:13:54 +09:00
Tristan Van Berkom f330b40521 GtkCellArea now paints focus on cells
Added concept of "Focus Siblings" to GtkCellArea so that some
static text/icon may be included in the focus/click area of
an activatable or editable cell, implemented focus drawing
as well, updated testcellarea to reflect the changes.
2010-11-11 16:13:06 +09:00
Tristan Van Berkom 524110f902 Focus driving in GtkCellArea now works.
- Fixed focus driving in GtkCellArea with refined apis
 - Added gtk_cell_area_activate() to be called when the area has focus
   (to activate or start editing the focused cell)
 - Added support for this in cellareascaffold
 - testcellarea now watches the "toggled" signal for a toggle renderer
   and updates the model state accordingly, this currently works with
   keyboard navigation, however focus is still not painted on cells.
2010-11-10 22:25:13 +09:00
Tristan Van Berkom 4643d90c5f Committing new (and simplified) focus handling approach for GtkCellArea.
Also adding missing file cellareascaffold.h
2010-11-10 19:17:06 +09:00
Matthias Clasen c51bfe8757 Bump glib req. to 2.27.3 2010-11-09 16:18:16 +09:00
Chun-wei Fan fb1a9d8c0d gdk.vcprojin: Include .rc file and fixed linker settings
-Added the missed gdk.rc file
-Made up for missed libraries required for link for configs other than Debug|win32
2010-11-09 16:18:16 +09:00
Chun-wei Fan 2fd00b9af3 gtk-demo.vcproj: set linker settings to be consistent
-Made up for the additional dependencies for setups other than Debug|Win32 (the correct setting)
-Made Subsystem="1" for all setups like Debug|Win32 (the correct setting)
2010-11-09 16:18:16 +09:00
Chun-wei Fan 5c52344551 gtk+.vsprops: Removed GdkPixbuf stuff and made up for missed headers
-Removed the GdkPixbuf stuff as it is now in a package of its own and added
 it as a dependent library here
-Made up for the headers missed in the installation stage for GTK+/GDK
2010-11-09 16:18:16 +09:00
Matthias Clasen 67112dae94 NEWS for 2.91.4 2010-11-09 16:18:15 +09:00
Matthias Clasen f991f88d3f Fix entry completion window sizing
I don't think we are at the end of scrolledwindow tweaks yet,
but this will make things work for now, as they used to.

https://bugzilla.gnome.org/show_bug.cgi?id=633670
2010-11-09 16:18:15 +09:00
Ryan Lortie 3f2281f8c6 pixbuf engine: remove only use of GCache in Gtk
We'll be deprecating GCache in GLib soon.
2010-11-09 16:18:15 +09:00
Patrick Bernaud 8eb7181979 docs: Move documentation to inline comments: GtkPaned
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=634338

Signed-off-by: Javier Jardón <jjardon@gnome.org>
2010-11-09 16:18:15 +09:00
Patrick Bernaud a00a0fb209 docs: Move documentation to inline comments: GtkProgressBar
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=634339

Signed-off-by: Javier Jardón <jjardon@gnome.org>
2010-11-09 16:18:15 +09:00
Patrick Bernaud 312fd9efc0 docs: Move documentation to inline comments: GtkPageSetup
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=634340

Signed-off-by: Javier Jardón <jjardon@gnome.org>
2010-11-09 16:18:15 +09:00
Tristan Van Berkom f85938a211 Changed testcellarea
Changed testcellarea to watch the iter for size changes and queue resizes
instead of explicitly queueing resizes when controls change.
2010-11-09 14:09:47 +09:00
Tristan Van Berkom e03b280757 Adding expand/align controls to testcellarea. 2010-11-09 13:50:53 +09:00
Tristan Van Berkom c932beef4b Fixing GtkCellAreaBox to rebuild groups when align/expand child properties change. 2010-11-09 13:50:30 +09:00
Tristan Van Berkom 2a3ae8da3a Added orientation control on testcellarea test
shows vertical orientation of cells lined up horizontally instead
of horizontal orientation of cells stacked up vertically.
2010-11-09 13:23:12 +09:00
Tristan Van Berkom 368cded84d Fixed a bug in GtkCellAreaBoxIter when allocating vertically. 2010-11-09 13:22:44 +09:00
Tristan Van Berkom 85d6aa1627 Added test and scaffolding widget for GtkCellArea. 2010-11-09 01:26:38 +09:00
Tristan Van Berkom e5e507e1d4 Added GtkCellArea classes to gtk.h and fixed a remainig rendering bug. 2010-11-09 01:25:45 +09:00
Tristan Van Berkom 92b9f432dd Fixed initial bugs in GtkCellArea implementation, starting to render
Tested all of this with some scaffolding code, test case comming soon.
2010-11-08 17:43:27 +09:00
Tristan Van Berkom 0336838366 Implemented focus handling in GtkCellAreaBox
Now when the GtkCellAreaBox receives key events it cycles
the currently focused cell to the next focusable cell in the box
while observing the navigation direction, it then emits "focus-leave"
when hitting the boundries of the area.
2010-11-08 11:31:03 +09:00
Tristan Van Berkom 09e3d9d3aa Added gtk_cell_area_stop_editing to allow explicit stopping of cell editing. 2010-11-08 11:31:03 +09:00
Tristan Van Berkom cbe1154e51 Added gtk_cell_area_activate_cell() and some cell editing management
Now:
  - The current edit cell and editable widget in use can be fetched
    with properties and accessors
  - gtk_cell_area_activate_cell() handles bookkeeping of the currently
    edited cell, starting the editing of a cell, activating a cell etc
  - Exported signals are available on GtkCellArea: "editing-started",
    "editing-canceled", "editing-done", "remove-editable".
  - Upon receiving GDK_KEY_Escape current editing gets canceled.
2010-11-08 11:31:03 +09:00
Hans Breuer 017f637a76 Bug 609622 - disappearing statusicon
Windows 7 is managing status icon visibility across process lifetime,
which did not work with GTK+ create icons. Apparently the mechanism
does not require use of new API (like suggested by MSDN), but it is
enough to give a "unique" tooltip at creation time.
Formerly this initial tooltip was not set at all, later setting via
gtk_status_icon_set_tooltip_text() is not enough, but luckily
different follow-up tooltips don't disturb the intended behavior.
(cherry picked from commit ae0544c636)
(cherry picked from commit 8a9d458baf)
2010-11-08 11:31:03 +09:00
Hans Breuer 0b749700e6 Update msvc build 2010-11-08 11:31:03 +09:00
Matthias Clasen e5c0d40d94 Make GtkFileChooserButton behave as expected when expanding 2010-11-08 11:31:03 +09:00
Ivar Smolin c4a54055fe [l10n] Updated Estonian translation 2010-11-08 11:31:02 +09:00
Garrett Regier c65a617bd7 docs: Move documentation to inline comments: GtkCellView
Signed-off-by: Javier Jardón <jjardon@gnome.org>
2010-11-08 11:31:02 +09:00
Garrett Regier 24c3b956f3 docs: Move documentation to inline comments: GtkCellRendererText
Signed-off-by: Javier Jardón <jjardon@gnome.org>
2010-11-08 11:31:02 +09:00
Javier Jardón 322db81256 docs: Move documentation to inline comments: GtkCellRenderer 2010-11-08 11:31:02 +09:00
Javier Jardón b1112cb87c docs: Move documentation to inline comments: GtkSettings 2010-11-08 11:31:02 +09:00
Garrett Regier bf17f3f32c docs: Move documentation to inline comments: GtkColorSelection
Signed-off-by: Javier Jardón <jjardon@gnome.org>
2010-11-08 11:31:02 +09:00
Garrett Regier 46627d008f docs: Move documentation to inline comments: GtkLayout
Signed-off-by: Javier Jardón <jjardon@gnome.org>
2010-11-08 11:31:02 +09:00
Kizito Birabwa e1e90c6f9c Added Luganda translation 2010-11-08 11:31:02 +09:00
Tor Lillqvist a446664c25 Add _gtk_cell_renderer_calc_offset 2010-11-08 11:31:02 +09:00
Tor Lillqvist bd8464834c Fix build breakage and avoid a warning 2010-11-08 11:31:02 +09:00
Tor Lillqvist 7754bf1a63 Avoid a compiler warning 2010-11-08 11:31:02 +09:00
Tor Lillqvist c418de1672 Drop unused static function 2010-11-08 11:31:02 +09:00
Javier Jardón a31142a8fa docs: move documentation to inline comments: GtkColorButton 2010-11-08 11:31:01 +09:00
Javier Jardón 65834294a5 docs: move documentation to inline comments: GtkTreeView 2010-11-08 11:31:01 +09:00
Javier Jardón 0331e1fab7 docs: Move documentation to inline comments: GtkTextView 2010-11-08 11:31:01 +09:00
Matthias Clasen 3b541bcfd4 GtkApplication: rewrite example application
The intended way of using GtkApplication is mainly by subclassing,
so make the example do that.
2010-11-08 11:31:01 +09:00
Matthias Clasen 9157e15653 GtkApplication: drop Quit from the docs
GtkApplication does not currently implement any default actions.
2010-11-08 11:31:01 +09:00
Javier Jardón a62b185e29 docs: move documentation to inline comments: GtkEntry 2010-11-08 11:31:01 +09:00
Javier Jardón dfeff671c4 docs: Fix generation of GtkGrid documentation 2010-11-08 11:31:01 +09:00
Cosimo Cecchi 99144330a0 tests: fix the build
gtk_box_new() changed API recently.
2010-11-08 11:31:01 +09:00
Cosimo Cecchi 1433ea24b5 icon-theme: always force icon sizes for emblems
https://bugzilla.gnome.org/show_bug.cgi?id=634060
2010-11-08 11:31:01 +09:00
Cosimo Cecchi c068e988a1 tests: add a test for pixbufs implementing the GIcon interface
https://bugzilla.gnome.org/show_bug.cgi?id=634060
2010-11-08 11:31:01 +09:00
Cosimo Cecchi 4239e49982 icon-theme: support pixbufs implementing the GIcon interface
https://bugzilla.gnome.org/show_bug.cgi?id=634060
2010-11-08 11:31:01 +09:00
Cosimo Cecchi cb51ad606f gtkwindow: properly set the window icon list (#631331)
This was probably a rendering-cleanup regression.
2010-11-08 11:31:01 +09:00
Tristan Van Berkom 631bdc438c Made progress on focus handling.
- Added vfunc to get the allocation of a cell inside an area
 - Superclass GtkCellArea handles activation of focused cells
   by handling key events (as well as editing of editable cells)
 - Added signal "editing-started" to GtkCellArea to signal that
   editing has started (generally signaled from inside event handling)
 - Added properties "focus-cell" and "edited-cell"
2010-11-05 22:19:50 +09:00
Tristan Van Berkom 1ad5fa3e7a Committing half-way done focus work. 2010-11-05 22:19:50 +09:00
Murray Cumming ce815afece GtkWidget/GtkContainer: Slight fixes to geometry-management docs.
Replace it's with its in several places.
Replace some , with .
Replace some ; with .
Fix some plurals.
Other minor corrections.
2010-11-05 22:19:50 +09:00
Murray Cumming b8bcbd1376 GtkWidget: Document the size-request signal deprecation.
Hopefully my text is correct.
2010-11-05 22:19:50 +09:00
Matthias Clasen a83b0b68ce Handle empty button boxes gracefully
https://bugzilla.gnome.org/show_bug.cgi?id=633915
2010-11-05 22:19:50 +09:00
Christian Dywan 7ca240916f Only show Desktop in file chooser button if there is one
Fixes: https://bugzilla.gnome.org/show_bug.cgi?id=632894
2010-11-05 22:19:50 +09:00
Owen W. Taylor d2b64a1db2 Switch to CSS interpretation of rgb() and rgba() colors
CSS3 defines a somewhat odd syntax for rgba() colors - the rgb values
are integers from 0 to 255 or percentages and the a value is a
float from 0 to 1. To avoid increasing the total amount of confusion
in the world, make gdk_rgb_to_string() and gdk_rgb_parse() follow
this syntax rather than using floats for r, g, and b.

https://bugzilla.gnome.org/show_bug.cgi?id=633762
2010-11-05 22:19:50 +09:00
Ryan Lortie 4bdff81f2e gtktoolitemgroup: don't use GTimeSpec
Use gint64 time instead.
2010-11-05 22:19:49 +09:00
Javier Jardón 65e045f5f4 Revert "Move the /*< private >*/ at the correct position"
All the object structures is opaque
This reverts commit c59ca4f6b9.
2010-11-05 22:19:49 +09:00
Javier Jardón dadf5c331a docs: Improve cross-referencing on GtkGrid docs 2010-11-05 22:19:49 +09:00
Javier Jardón 7dd52d7b60 docs: Fix gtk-doc markup in GtkWidget docs 2010-11-05 22:19:49 +09:00
Takayuki KUSANO 77be5690fd Updated Japanese translation 2010-11-05 22:19:49 +09:00
Murray Cumming 32b21694ef Fix tiny documetnation typo. 2010-11-05 22:19:49 +09:00
Tristan Van Berkom 832c123fd2 Extended gtk_cell_area_apply_attributes() to account for expander/expanded cells
The state of expanded cells must come from the view, since these states
can vary across views accessing the same model (also "finished up" the
applying of attributes code).
2010-11-02 18:01:03 +09:00
Murray Cumming 73e45cef9d GtkScrollable: Improve the documentation text. 2010-11-02 17:51:07 +09:00
Tristan Van Berkom 7ddf87f9ef Account for the possibility of invisible cells in GtkCellAreaBox/Iter
Also changed the GtkCellAreaBox to keep groups in an array
instead of a list, for this code it's generally more useful
this way (and more optimized).
2010-11-02 16:51:06 +09:00
Tristan Van Berkom e3b75cb053 Adding tentative implementation of GtkCellAreaBox->grab_focus(). 2010-11-02 12:04:38 +09:00
Murray Cumming 0583288dd9 Removed a trailing enum comma. 2010-11-02 12:04:38 +09:00
Ignacio Casal Quinteiro 997835af83 Normalize boolean. 2010-11-02 12:04:38 +09:00
Ignacio Casal Quinteiro bea2487d83 Do not use gbooleans to save some bits. 2010-11-02 12:04:38 +09:00
Matthias Clasen afa282f009 Bump version 2010-11-02 12:04:38 +09:00
Paolo Borelli 5e90bb269d Get rid of unused shaped_object list in _GtkTextLineDisplay
https://bugzilla.gnome.org/show_bug.cgi?id=631076
2010-11-02 12:04:37 +09:00
Matthias Clasen 053171c530 Update NEWS 2010-11-02 12:04:37 +09:00
Matthias Clasen bb0ff159cb GtkToolitemGroup: Use monotonic clock for animation timeout 2010-11-02 12:04:37 +09:00
Ignacio Casal Quinteiro ed62f93439 Add caseless unit tests for textiter. 2010-11-02 12:04:37 +09:00
Ignacio Casal Quinteiro 794e0446e9 Add case insensitive to GtkTextIter. Fixes bug #61852.
This code has been taken from GtkSourceView so also kudos to Paolo Maggi
and Paolo Borelli for helping with this patch.
2010-11-02 12:04:37 +09:00
Paolo Borelli 3511215730 Fix backward search bug exposed by the unit test
When searching with multiple lines first_line_start/end were initialized
to the last line start/end iters
2010-11-02 12:04:37 +09:00
Ignacio Casal Quinteiro a2360f979a Add unit tests for textiter. 2010-11-02 12:04:37 +09:00
Matthias Clasen ac3258b07d Avoid exporting an extra symbol 2010-11-02 12:04:37 +09:00
Matthias Clasen 31b0c1ad35 Fix make check 2010-11-02 12:04:37 +09:00
Paolo Borelli 002704fe25 Move the /*< private >*/ at the correct position 2010-11-02 12:04:37 +09:00
Matthias Clasen 673e660edc NEWS for 2.91.3 2010-11-02 12:04:37 +09:00
Ivar Smolin cba8cd8c59 [l10n] Updated Estonian translation 2010-11-02 12:04:36 +09:00
Matthias Clasen a8ade90b4f Fix a typo 2010-11-02 12:04:36 +09:00
Matthias Clasen 0c8df06f73 Mention actions in the libunique migration guide 2010-11-02 12:04:36 +09:00
Matthias Clasen 71d6a289fc Fix interaction between scrolling menus and automatic mnemonics
https://bugzilla.gnome.org/show_bug.cgi?id=612611
2010-11-02 12:04:36 +09:00
Michael Natterer ca6398a649 gtk: remove all border_width handling from the button box
and let GtkContainer do the job; fixes doubled border widths. GtkBox
did already delegate border handling to Gtkcontainer, which interacted
badly with a subclass that didn't.
2010-11-02 12:04:36 +09:00
Michael Natterer 8dd7023b52 gtk: fix automatic width of spin buttons which have no width in chars set 2010-11-02 12:04:35 +09:00
Michael Natterer 8979855f60 tests: missed these two gtk_box_new() which sneaked in by rebasing... 2010-11-02 12:04:35 +09:00
Matthias Clasen c70f3e26d2 GtkAssistant: Mention custom pages in the introduction 2010-11-02 12:04:35 +09:00
Michael Natterer 260ccdfebe gtk: remove "gboolean homogeneous" from gtk_box_new()
Because it's FALSE in virtually all use cases.
2010-11-02 12:04:35 +09:00
Matthias Clasen c50f790417 Add content size test for scrolled window 2010-11-02 12:04:35 +09:00
Bastien Nocera 76a0b9e5fa GtkAssistant: Add custom page type
The custom page type will not show any buttons by default, and
it is left to the application to add its own buttons instead.

The _next_page() and _previous_page() functions can be used
for the back and forward buttons used by the application.

https://bugzilla.gnome.org/show_bug.cgi?id=576498
2010-11-02 12:04:34 +09:00
Bastien Nocera ef2fe67832 GtkAssistant: Add more details about buttons shown
Add more documentation about which buttons will be shown for which
type of GtkAssistant page.

https://bugzilla.gnome.org/show_bug.cgi?id=576498
2010-11-02 12:04:34 +09:00
Matthias Clasen 75fd27e920 Improve GtkAssistant docs 2010-11-02 12:04:34 +09:00
Martin Nordholts 0feb08a4bb Handle NULL intp in test_increment_intp()
Support passing NULL for &int to gtk_test_display_button_window() so
we can use that function also when we are not interested in counting
clicks.
2010-11-02 12:04:34 +09:00
Tristan Van Berkom e94a177774 Added cell focus apis to GtkCellArea. 2010-11-01 16:01:25 +09:00
Tristan Van Berkom 54004237be Added GtkCellRendererState flags to GtkCellArea->event/render() methods 2010-11-01 12:39:00 +09:00
Tristan Van Berkom 9c4eb3d431 Changed GtkCellArea margin-left/right... for cell-margin-left/right...
The rationale here is that every cell in an area needs to have space
reserved around it, requests have to be fully margin inclusive...
cells need to have the full size fed as the "background area" and
the "cell area" has margins removed... This will be used by GtkTreeViewColumn
to set the focus line width so that cells can paint a background on the
full background, then render themselves into the cell area... and parents
can go ahead and draw focus and other indicators on the background area
but outside of the cell area.
2010-10-31 22:50:53 +09:00
Tristan Van Berkom 163c3c8852 Added margins to the cell area
Added margin properties to the cell area, margins will be removed
from the area given to ->render() when creating the inner cell area.
2010-10-31 18:55:51 +09:00
Tristan Van Berkom 25b00759c5 Implemented cell packing properties on GtkCellAreaBox 2010-10-31 17:45:29 +09:00
Tristan Van Berkom 01d2eddf03 Added GTK_CELL_AREA_WARN_INVALID_CHILD_PROPERTY_ID to gtkcellarea.h 2010-10-31 17:45:06 +09:00
Tristan Van Berkom d781c226da Implemented "cell properties" on the GtkCellArea
Added cell "packing" properties for generic configuration
of child cells inside an area.
2010-10-31 17:13:15 +09:00
Tristan Van Berkom 6da74b6e1e Finished up allocation of cells.
Added get_allocated_cells() which returns a practical list
of cells with allocation for render/event time, this abstracts
whether the cells are individually aligned or aligned into groups,
when there are groups of cells before an alignment, those groups
get allocated on the fly for render time.
2010-10-31 15:22:39 +09:00
Tristan Van Berkom e494f102cf Cleaned up GtkCellAreaIter implementation to use arrays to store grouped cell information. 2010-10-31 13:06:10 +09:00
Tristan Van Berkom b12e7a8115 Adding GtkCellAreaIter arg to GtkCellArea->render/->event 2010-10-30 23:48:52 +09:00
Tristan Van Berkom 972e077966 Fixed hangs in TextView and ToolPalette
Fixed the hangs by adding a ->inside_allocation flag and avoiding to
queue resizes while inside the allocation loop. The extra queue'd resizes
were causing the scrolled window size_allocate() to perform the guess
again and again thus causing an infinite loop.
2010-10-30 23:37:24 +09:00
Tristan Van Berkom a3b4681f9f Fixing typo in scrolled window
Seems with GtkScrollable interface we were setting the hadjustment as
the vadjustment, thanks to Cosimo Cecchi who debugged this and finally
found the typo.
2010-10-30 23:37:24 +09:00
Tristan Van Berkom ea6df20bbb Added the majority of the allocate machinery to GtkCellAreaIter[Box]. 2010-10-30 23:06:26 +09:00
Tristan Van Berkom 86fb6ab216 Fixed GtkCellAreaIter to notify invalidation of sizes on flush
Also fixed GtkCellAreaBox to track the iters it creates and flush
them when the overall layout configuration changes (add/remove/reorder/
spacing changed etc).
2010-10-30 21:40:22 +09:00
Javier Jardón 1dc7e3d885 Emphasize that GtkBox and GtkTable can be replaced by GtkGrid 2010-10-30 17:37:04 +09:00
Javier Jardón c15ef6405c Use gtk_box_new() instead gtk_[v|h]box_new() 2010-10-30 17:37:03 +09:00
Javier Jardón ae1d1fd048 docs: remove template of deprecated gtkcombo widget 2010-10-30 17:37:03 +09:00
Matthias Clasen 1469c3fd69 Migration guide additions
Add some information about expand flags and the scrollable interface.
2010-10-30 17:37:03 +09:00
Christian Persch 71b8875d2b Make gdk_rgba_to_string() take a const GdkRGBA
https://bugzilla.gnome.org/show_bug.cgi?id=633216
2010-10-30 17:37:03 +09:00
Matthias Clasen 0aa94bb946 Fix initial size allocation with child widgets
On some cases, it would take a resize of the window for children
to 'jump into place'.

https://bugzilla.gnome.org/show_bug.cgi?id=633500
2010-10-30 17:37:03 +09:00
Javier Jardón 6c301d4b0a Use gtk_scrollbar_new() instead gtk_[v|h]scrollbar_new() 2010-10-30 17:37:03 +09:00
Javier Jardón 234553c093 Use gtk_scale_new() instead gtk_[v|h]scale_new() 2010-10-30 17:37:03 +09:00
Javier Jardón d03d2943d2 Use gtk_scale_new_with_range() instead gtk_[v|h]scale_new_with_range() 2010-10-30 17:37:03 +09:00
Javier Jardón cdf4b4bbd5 Use gtk_paned_new() instead gtk_[v|h]paned_new() 2010-10-30 17:37:03 +09:00
Javier Jardón 524e704147 Use gtk_ruler_new() instead gtk_[v|h]ruler_new() 2010-10-30 17:37:02 +09:00
Javier Jardón 821c3c6578 Use gtk_separator_new() instead gtk_[v|h]separator_new() 2010-10-30 17:37:02 +09:00
Javier Jardón 2615ebf37e Use gtk_button_box_new() instead gtk_[v|h]_button_box_new() 2010-10-30 17:37:02 +09:00
Michael Natterer 34627a6371 gtk: remove declarations of removed internal functions 2010-10-30 17:37:02 +09:00
Matthias Clasen ef03dc3fc6 Don't set get_preferred_width_for_height to NULL
The size request machinery expects that it is non-NULL.
2010-10-30 17:37:02 +09:00
Matthias Clasen 70bef431b0 GtkComboBox: Add a constructor that takes a model and adds an entry
https://bugzilla.gnome.org/show_bug.cgi?id=633050
2010-10-30 17:37:02 +09:00
Javier Jardón d0974d4f02 Re-enable deprecation guards 2010-10-30 17:37:02 +09:00
Carles Ferrando 92431720dc Updated Catalan (Valencian) translation 2010-10-30 17:37:02 +09:00
Carlos Garnacho 18797dfa9a Use the client pointer for events with no device.
The core pointer is sort of meaningless in a multidevice environment,
the client pointer is used instead to fake a GdkDevice on events that
don't have one.
2010-10-30 17:37:02 +09:00
Owen W. Taylor 2d65bd08c3 Remove unused GdkDeviceManager variable
gdk_display_get_device_manager() was called but the device manager
not used.
2010-10-30 17:37:02 +09:00
Matthias Clasen ac0b97aa23 ifdef X-specific stuff
gdk_x11_ APIs can only be used inside #ifdef GDK_WINDOWING_X11.
2010-10-30 17:37:01 +09:00
Matthias Clasen 22d01c45cc GtkButtonBox doesn't do height-for-width
GtkButtonBox doesn't do height-for-width, therefore we should
explicitly set these methods to NULL instead of hoping that the
inherited GtkBox implementations work ok.
2010-10-30 17:37:01 +09:00
John (J5) Palmieri 1448111a58 [introspection] annotate delete_text invoker to match do_delete_text v-method 2010-10-30 17:37:01 +09:00
Vincent Untz e0d1652a99 Port tests to GtkScrollable API instead of deprecated GtkLayout API
https://bugzilla.gnome.org/show_bug.cgi?id=633374
2010-10-30 17:37:01 +09:00
Tristan Van Berkom 3b1c301a66 Made GtkCellAreaBox:align-cells a packing property per cell
Implemented all request apis on GtkCellAreaBox considering
alignment of groups of cells (some cells can be aligned while
others fill space smartly).
2010-10-30 17:35:22 +09:00
Ignacio Casal Quinteiro 211c39c500 Remove useless vars. 2010-10-30 17:35:22 +09:00
Tristan Van Berkom 89cc46374d Fire a warning if there are any handlers connected to the deprecated "size-request" signal. 2010-10-30 17:35:22 +09:00
Tristan Van Berkom 731853a7ec Added a runtime warning if any class is implementing the ->size_request() vfunc. 2010-10-30 17:35:22 +09:00
Tristan Van Berkom b277ba4238 Make GtkPathBar use set_size_request() instead of the "size-request" signal. 2010-10-30 17:35:22 +09:00
Tristan Van Berkom 05ca7e14b0 Removed size_request from GtkToolItemGroup
Ofcourse GtkToolPalette needs real migration to height-for-width
apis, this patch just removes the need for the size_request
signal and vfunc.
2010-10-30 17:35:21 +09:00
Tristan Van Berkom 3265d46c9d Use gtk_widget_set_size_request() instead of handling "size-request" signals. 2010-10-30 17:35:21 +09:00
Matthias Clasen d02443d57c Add a migration guide section on size_request 2010-10-30 17:35:21 +09:00
Matthias Clasen 9c128ed442 Fix the build 2010-10-30 17:35:21 +09:00
Matthias Clasen eb60282b1b Fix gtk_fixed_get_preferred_width
When dealing with widths, use x, not y.
Spotted by Ignacio Casal Quintero.
2010-10-30 17:35:21 +09:00
Bastien Nocera 2a37d949ba gtk: Fix crasher when loading symbolic icons
If the style didn't include symbolic colors for either success,
warning or error, gtk_icon_info_load_symbolic_for_style() would crash.

Instead, make sure we don't try to use the colors if they're not
available, and fallback on default colors inside
_gtk_icon_info_load_symbolic_internal().
2010-10-30 17:35:20 +09:00
Owen W. Taylor d8fdbd8b72 GtkSocket: Add error trap around call to XFixesChangeSaveSet()
Previously any X error from XFixesChangeSaveSet() was being eaten
by the subsequent error trap when sending a client message. With
asynchronous error traps, that side effect no longer occurs, so
we need to add a proper error trap around the call to
XFixesChangeSaveSet().

https://bugzilla.gnome.org/show_bug.cgi?id=633274
2010-10-30 17:35:20 +09:00
Tristan Van Berkom d86164f90d Revert "Removed size_request from GtkTextView"
This reverts commit 87dfa724eb.

I pushed this to the wrong branch, ouch sorry.
2010-10-30 17:35:20 +09:00
Matthias Clasen 2d4f3e1365 Remove size_request from GtkSocket
This is only preliminary, GtkSocket can do minimal/natural width
properly, there's code for that in the extended-layout branch.
2010-10-30 17:35:20 +09:00
Matthias Clasen 965b3af8a1 Don't g_free gslice-allocated structures
This was causing memory corruption when removing remote plugs from
sockets.
2010-10-30 17:35:20 +09:00
Matthias Clasen 3cdf3bc46c Remove size_request from GtkScale 2010-10-30 17:35:20 +09:00
Tristan Van Berkom e573a455bb Removed size_request from GtkTearoffMenuItem 2010-10-30 17:35:20 +09:00
Tristan Van Berkom 292f32dde8 Fixed remaining call to ->size_request in GtkTextView. 2010-10-30 17:35:20 +09:00
Matthias Clasen ebcb6e6b94 Remove size_request from GtkSeparatorToolItem 2010-10-30 17:35:20 +09:00
Matthias Clasen 5e0451de3a Use correct icon name in testtoolbar 2010-10-30 17:35:20 +09:00
Tristan Van Berkom 0db2b334b0 Removed size_request from GtkTextView 2010-10-30 17:35:19 +09:00
Matthias Clasen 9f074f8612 Remove size_request from gtkToolItem 2010-10-30 17:35:19 +09:00
Tristan Van Berkom 0b3e2ffee6 Removing size_request from GtkToolPalette
Note GtkToolPalette is internally height-for-width, it needs to
be refactored to cooperate with GTK+'s height-for-width geometry
management properly.
2010-10-30 17:35:19 +09:00
Matthias Clasen bf75f63f49 Remove size_request from GtkToolbar
This is just a bandaid fix, the toolbar should really return proper
min/natural sizes, so that we can handle the overflow properly.
2010-10-30 17:35:19 +09:00
Matthias Clasen f3d5e20cff Remove size_request from GtkTable 2010-10-30 17:35:19 +09:00
Tristan Van Berkom cd2a7a899f Removing size_request from GtkTreeview.
This should be implemented as propery height-for-width by
the treeview-refactor branch. This commit includes a FIXME
comment that scroll adjustments should not be updated from
inside size requests but only after receiving an allocation.
2010-10-30 17:35:19 +09:00
Matthias Clasen 113362b169 Remove size_request from GtkRuler 2010-10-30 17:35:19 +09:00
Matthias Clasen 7f8d92f02c Remove size_request from GtkPathBar 2010-10-30 17:35:19 +09:00
Matthias Clasen 70c81d6651 Remove size_request from GtkSeparator 2010-10-30 17:35:19 +09:00
Matthias Clasen 4927c16486 Remove size_request from GtkRange 2010-10-30 17:35:19 +09:00
Matthias Clasen 53744b6daf Fix a typo 2010-10-30 17:35:19 +09:00
Matthias Clasen 6b5debcaca Remove size_request from GtkPaned
This is not the final word; GtkPaned should really implement
height-for-width, but I didn't have time to complete that now.
2010-10-30 17:35:18 +09:00
Ivar Smolin c823f33516 [l10n] Updated Estonian translation 2010-10-30 17:35:18 +09:00
Tristan Van Berkom 34e1cd373b Removed size_request from GtkOffscreenWindow 2010-10-30 17:35:18 +09:00
Tristan Van Berkom af0c4bc656 Removed size_request from GtkNotebook 2010-10-30 17:35:18 +09:00
Tristan Van Berkom e9f541dc51 Removed size_request from GtkMenuBar 2010-10-30 17:35:18 +09:00
Tristan Van Berkom 0f9c04769b Removed size_request from GtkImageMenuItem 2010-10-30 17:35:18 +09:00
Tristan Van Berkom 8565b86223 Removed size_request from GtkIconView. 2010-10-30 17:35:18 +09:00
Tristan Van Berkom 399f353427 Remove size_request from GtkHandleBox 2010-10-30 17:35:18 +09:00
Tristan Van Berkom 16512bd9d3 Fixed unused variable in get_preferred_height(). 2010-10-30 17:35:18 +09:00
Matthias Clasen f336754a8f Remove size_request from GtkSpinButton 2010-10-30 17:35:18 +09:00
Matthias Clasen eca2d782ce Remove size_request from GtkProgressBar 2010-10-30 17:35:17 +09:00
Matthias Clasen f83403098d Remove size_reuqest from GtkImage 2010-10-30 17:35:17 +09:00
Matthias Clasen d4a07d5661 Remove size_request from GtkLayout 2010-10-30 17:35:17 +09:00
Matthias Clasen 381cd8b07c Remove size_request from GtkHSV 2010-10-30 17:35:17 +09:00
Matthias Clasen b3f6f67c33 Remove size_request from GtkFixed 2010-10-30 17:35:17 +09:00
Matthias Clasen e165c6c884 Remove size_request from GtkEntry 2010-10-30 17:35:17 +09:00
Matthias Clasen 2e4e7264e6 Remove size_request from GtkCheckButton 2010-10-30 17:35:17 +09:00
Matthias Clasen 23a9127765 Remove size_request from GtkCalendar 2010-10-30 17:35:17 +09:00
Matthias Clasen 2078db969c Remove size_request from GtkButtonBox 2010-10-30 17:35:17 +09:00
Matthias Clasen 42de07f2f3 Remove size_request from GtkAssistant 2010-10-30 17:35:17 +09:00
Javier Jardón 65dd3460ce Fix gtk-doc markup: /* <private> */ should be /*< private >*/ 2010-10-30 17:35:17 +09:00
Tristan Van Berkom abcfd2d5ef Merge branch 'master' into treeview-refactor 2010-10-27 01:06:58 +09:00
Tristan Van Berkom 695e427522 Added most of the request code for GtkCellAreaBox
Added the following to GtkCellAreaBox:
   - GtkCellAreaBox:spacing property defines spacing between cells
   - GtkCellAreaBox:align-cells property defines whether cells should
     be aligned with cells in adjacent rows.
   - Implementations for get_preferred_width / get_preferred_height
   - Implementations for get_preferred_height_for_width and the other
     when the box is oriented in the easy way (i.e. height_for_width()
     implemented for a vertical box, no virtual allocations done yet).
2010-10-27 01:01:58 +09:00
Tristan Van Berkom 11f8dfe3f4 Finished up initial revision of GtkCellAreaBoxIter
The interaction between this class and GtkCellAreaBox could
use some optimization, maybe the cells and their sizes should
be returned as a list and iterated over at the same time as
requesting sizes instead of the hash table approach currently
taken, however the code is clean this way for now.
2010-10-26 23:01:17 +09:00
Tristan Van Berkom 97e3ccc58b Added GtkCellAreaBox subclass to handle alignments of cells across rows inside a GtkCellAreaBox. 2010-10-26 18:22:59 +09:00
Tristan Van Berkom b5e529f578 Added GtkCellAreaIter class
Added base class to hold alignment and overall size request information
while itterating over the size requests of various rows of a GtkTreeModel,
updated GtkCellArea/GtkCellAreaBox classes accordingly.
2010-10-26 17:14:20 +09:00
Tristan Van Berkom 8679563247 Merge branch 'master' into treeview-refactor 2010-10-26 11:37:27 +09:00
Tristan Van Berkom fe3f948d0a Implemented GtkCellLayoutIface->reorder on GtkCellAreaBox. 2010-10-24 20:08:21 +09:00
Tristan Van Berkom 468a1d3e7c Implemented basic child list handling on GtkCellAreaBox
Added the child list to GtkCellAreaBox, added _pack_start() and
_pack_end() apis to GtkCellAreaBox since they are appropriate there
and implemented GtkCellLayoutIface to override the _pack_start()/end()
methods (since the base GtkCellArea class simply forwards these apis
to the generic ->add() api on the base class).
2010-10-24 20:01:04 +09:00
Tristan Van Berkom 0722fbe7c8 Removed attribute handling from class vfuncs of GtkCellArea.
Now GtkCellArea handles attribute connections in the base class,
subclasses only need to add/remove the renderers, render them,
do geometry and handle events.
2010-10-24 19:20:10 +09:00
Tristan Van Berkom 0e3179b669 Merge branch 'master' into treeview-refactor 2010-10-24 15:49:18 +09:00
Tristan Van Berkom 0d7fdfb36e Merge branch 'master' into treeview-refactor 2010-10-24 15:48:46 +09:00
Tristan Van Berkom 45e42ca2d2 Implemented remaining portions of GtkCellLayout iface
Now GtkCellArea provides a generic way of applying attributes
from a GtkTreeModel/GtkTreeIter, GtkCellArea bookkeeps a hashtable
of GtkCellLayoutDataFunc's and completely abstracts the applying
of data to cells... GtkCellArea implementations need only to bookkeep
the added renderers and attributes (probably we can abstract the
attribute bookkeeping in the base class as well).

Things starting to take a good and practical shape.
2010-10-24 15:44:48 +09:00
Tristan Van Berkom 741d10ca4f Adding initial code skeleton for GtkCellAreaBox. 2010-10-23 17:01:58 +09:00
Tristan Van Berkom 8885320d21 Merge branch 'master' into treeview-refactor 2010-10-23 13:25:45 +09:00
Tristan Van Berkom 705e7ee100 Added GtkCellArea to the build
Starting to form a good api, implemented most of GtkCellLayout iface
on the base class routing the apis through the new class vfuncs.
2010-10-22 16:41:52 +09:00
Tristan Van Berkom 8bb20925ed Adding vague initial draft of GtkCellArea to the codebase (treeview-refactor branch). 2010-10-21 22:46:10 +09:00
557 changed files with 89480 additions and 59783 deletions
+22 -36
View File
@@ -54,40 +54,39 @@ MAINTAINERCLEANFILES = \
$(srcdir)/ChangeLog \
`find "$(srcdir)" -type f -name Makefile.in -print`
GDKTARGET=@gdktarget@
## Copy .pc files to target-specific names
gtk+-$(GDKTARGET)-3.0.pc: gtk+-3.0.pc
rm -f gtk+-$(GDKTARGET)-3.0.pc && \
cp gtk+-3.0.pc gtk+-$(GDKTARGET)-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-$(GDKTARGET)-3.0.pc: gdk-3.0.pc
rm -f gdk-$(GDKTARGET)-3.0.pc && \
cp gdk-3.0.pc gdk-$(GDKTARGET)-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 $@
gtk+-$(GDKTARGET)-3.0-uninstalled.pc: gtk+-3.0-uninstalled.pc
rm -f gtk+-$(GDKTARGET)-3.0-uninstalled.pc && \
cp gtk+-3.0-uninstalled.pc gtk+-$(GDKTARGET)-3.0-uninstalled.pc
gdk-$(GDKTARGET)-3.0-uninstalled.pc: gdk-3.0-uninstalled.pc
rm -f gdk-$(GDKTARGET)-3.0-uninstalled.pc && \
cp gdk-3.0-uninstalled.pc gdk-$(GDKTARGET)-3.0-uninstalled.pc
gtk+-*-3.0-uninstalled.pc: gtk+-3.0-uninstalled.pc
rm -f $@ && \
cp gtk+-3.0-uninstalled.pc $@
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = gdk-$(GDKTARGET)-3.0.pc gtk+-$(GDKTARGET)-3.0.pc gail-3.0.pc
pkgconfig_DATA = gdk-3.0.pc gtk+-3.0.pc gail-3.0.pc
pkgconfig_DATA += $(patsubst %,gtk+-%-3.0.pc,@gdktarget@)
pkgconfig_DATA += $(patsubst %,gdk-%-3.0.pc,@gdktarget@)
if OS_UNIX
pkgconfig_DATA += gtk+-unix-print-3.0.pc
endif
DISTCLEANFILES = \
gtk+-unix-print-3.0.pc \
gtk+-$(GDKTARGET)-3.0.pc \
gdk-$(GDKTARGET)-3.0.pc \
gail-3.0.pc \
gtk+-$(GDKTARGET)-3.0-uninstalled.pc \
gdk-$(GDKTARGET)-3.0-uninstalled.pc \
gail-3.0-uninstalled.pc \
DISTCLEANFILES = \
gtk+-unix-print-3.0.pc \
gtk+-3.0.pc \
gtk+-x11-3.0.pc \
gdk-3.0.pc \
gdk-x11-3.0.pc \
gail-3.0.pc \
gtk+-3.0-uninstalled.pc \
gail-3.0-uninstalled.pc \
config.lt
distclean-local:
@@ -109,20 +108,7 @@ ChangeLog:
echo A git checkout and git-log is required to generate this file >> $@); \
fi
## copy the default target for this platform to gdk-3.0.pc and gtk+-3.0.pc
DEFAULT_GDKTARGET=x11
install-data-hook:
(cd $(DESTDIR)$(pkgconfigdir) && \
test -f gdk-$(DEFAULT_GDKTARGET)-3.0.pc && \
test -f gtk+-$(DEFAULT_GDKTARGET)-3.0.pc && \
rm -f gdk-3.0.pc && cp -f gdk-$(DEFAULT_GDKTARGET)-3.0.pc gdk-3.0.pc && \
rm -f gtk+-3.0.pc && cp -f gtk+-$(DEFAULT_GDKTARGET)-3.0.pc gtk+-3.0.pc) || \
(cd $(DESTDIR)$(pkgconfigdir) && \
rm -f gdk-3.0.pc && cp -f gdk-$(GDKTARGET)-3.0.pc gdk-3.0.pc && \
rm -f gtk+-3.0.pc && cp -f gtk+-$(GDKTARGET)-3.0.pc gtk+-3.0.pc)
uninstall-local:
rm -f $(DESTDIR)$(pkgconfigdir)/gdk-3.0.pc
rm -f $(DESTDIR)$(pkgconfigdir)/gtk+-3.0.pc
dist-hook:
+133
View File
@@ -1,3 +1,136 @@
Overview of Changes from GTK+ 2.91.6 to 2.91.7
==============================================
* The treeview-refactor branch has been merged, bringing more
flexible cell arrangement with GtkCellArea, GtkCellAreaBox, etc
* The gdk-backend branch has been merged. This branch cleans up the
internal frontend/backend separation in GDK, with the ultimate goal
of allowing to build a single gdk library that contains multiple
backends (interesting combinations are x11+wayland or quartz+x11).
For now, GDK is still restricted to a single backend, but
as a first step, the libraries no longer include the backend name
in their soname, but are just libgdk-3.0.so and libgtk-3.0.so.
Only the x11 backend has been kept up to date with this cleanup
work, other backends are broken in this release.
* Deprecations and removals:
- G_SEALed struct members have been removed from GtkWindowGroup,
GtkDrawingArea, GtkTreeStore, GtkTreeModelSort, GtkTreeSelection,
GtkSocket, GtkPrintJob, GtkSelectionData
- Input device handling:
- gdk_display_list_devices, gdk_display_get_core_pointer,
gdk_input_set_extension_events, gtk_widget_set_extension_events,
gdk_devices_list have been removed
- gdk_display_warp_device has been replaced by gdk_device_warp
- gdk_enable_multidevice has been replaced by gdk_disable_multidevice
- Drag-and-Drop:
gdk_drag_context_new, gdk_drag_find_window and gdk_drag_get_protocol
have been removed
- Property handling:
Functions that deal with X11-specific encodings such as Compound Text
have been moved to backend-specific API:
gdk_string_to_compound_text[_for_display],
gdk_utf8_to_compound_text[_for_display], gdk_free_compound_text,
gdk_text_property_to_text_list[_for_display], gdk_free_text_list,
gdk_text_property_to_utf8_list
- Foreign windows:
Functions for dealing with GdkWindow wrappers around foreign
windows have been moved to backend-specific API.
- Application launching:
The gdk_spawn_* APIs have been removed, since they were trivial
wrappers around g_spawn_* on most platforms and can be replaced
by GIO GAppInfo APIs.
- Misc. other functions: gdk_net_wm_supports, gdk_set_locale,
gdkx_visual_get have been either removed, gdk_set_sm_client_id
has been moved to backend-specific API.
* A number of GTK+ widgets have been ported to use GtkStyleContext
directly for rendering
* The tracker search backend for the file chooser has been updated
to work with libtracker-sparql as available in tracker >= 0.9
* The GtkAboutDialog has been given a facelift. It no longer
opens second-level dialogs
* The GDK X11 backend now uses XI2 (including multi-device capabilities)
by default. Use gdk_disable_multidevice() to switch back to the
XI1/Core implementation
* Bug fixes:
629923 Consider always calling unmap() when unsetting MAPPED flag
634657 Dynamically attached calendar does not respond to mouse clicks
635401 Setting conflict warning does not disappear when conflict is fixed
636732 Gtk+ fails to build
636777 Leak in gtk_css_provider_get_named
637018 Add checks for id-column/entry-text-column >= 0
637069 Custom print settings set in custom-widget-apply are lost
637155 Remove vestiges of support for themes using XSHAPE
637156 Optimize gtk_widget_shape_combine_region (widget, NULL, ...)
637189 gtk_cell_renderer_spin_start_editing uses g_ascii_strtod but...
637243 docs: fix link failure on gtk-doc scanner binaries
637256 gtkstylecontext: fix typos in annotations
637464 Fix GdkWindowFilter internal refcounting
637471 GTK2_RC_FILES should be renamed to GTK3_RC_FILES
637520 Gtk+ seems to have broken Mutter
637606 Missing out annotations for gtk_accelerator_parse and...
637608 Problems with the new AboutDialog
* Translation updates:
Estonian
Hebrew
Kazakh
Norwegian bokmål
Persian
Spanish
Vietnamese
Overview of Changes from GTK+ 2.91.5 to 2.91.6
==============================================
* Deprecations, cleanups and API changes:
- GdkDrawable and some X11-specific APIs have been removed
- GtkStyle and GtkRcStyle have been deprecated
- The GdkWindowClass enumeration is now GdkWindowWindowClass
- gdk_window_get_geometry lost its depth argument
- The old, unused gtk_decorated_window_... functions have
been removed.
* GtkComboBox has gained an 'active id' property that is
intended for easy binding to settings
* GtkAppChooser: A new family of widgets that allow choosing
an application to open a file. This is strongly based on
the corresponding nautilus dialog, which it is replacing.
* The GtkStyleContext branch has been merged, changing the APIs
that are used to do themed drawing, and the theme engine interfaces.
Among the new classes are GtkStyleContext (replacing GtkStyle) and
GtkCssProvider (replacing the gtkrc parser). The migration guide
contains a chapter about porting from GtkStyle to GtkStyleContext.
* Bugs fixed:
549720 Add a way to hide GtkScale's slider
582557 need open with dialog box to use with IBM's Lotus Notes...
619148 "active ID" properties (GtkComboBox)
636060 use ATK_DEFINE_TYPE where possible
636129 invalid uninstantiatable type `(null)' in cast to `GtkSpinner'
636388 gtk3-demo craches (segfault) when pressing a key in the textarea...
636511 New style override functions do not work on textview
* Updated translations:
Estonian
Galician
Hebrew
Persian
Slovenian
Spanish
Overview of Changes from GTK+ 2.91.4 to 2.91.5
==============================================
+18 -116
View File
@@ -1,130 +1,32 @@
#!/bin/sh
# Run this to generate all the initial makefiles, etc.
srcdir=`dirname $0`
test -z "$srcdir" && srcdir=.
test -n "$srcdir" || srcdir=`dirname "$0"`
test -n "$srcdir" || srcdir=.
ORIGDIR=`pwd`
cd $srcdir
PROJECT=Gtk+
TEST_TYPE=-d
FILE=gdk
olddir=`pwd`
cd "$srcdir"
DIE=0
have_libtool=false
if libtoolize --version < /dev/null > /dev/null 2>&1 ; then
libtool_version=`libtoolize --version |
head -1 |
sed -e 's/^\(.*\)([^)]*)\(.*\)$/\1\2/g' \
-e 's/^[^0-9]*\([0-9.][0-9.]*\).*/\1/'`
case $libtool_version in
2.*)
have_libtool=true
;;
esac
fi
if $have_libtool ; then : ; else
echo
echo "You must have libtool 2.2 installed to compile $PROJECT."
echo "Install the appropriate package for your distribution,"
echo "or get the source tarball at http://ftp.gnu.org/gnu/libtool/"
DIE=1
fi
(gtkdocize --version) < /dev/null > /dev/null 2>&1 || {
echo
echo "You must have gtk-doc installed to compile $PROJECT."
echo "Install the appropriate package for your distribution,"
echo "or get the source tarball at http://ftp.gnome.org/pub/GNOME/sources/gtk-doc/"
DIE=1
}
(autoconf --version) < /dev/null > /dev/null 2>&1 || {
echo
echo "You must have autoconf installed to compile $PROJECT."
echo "Install the appropriate package for your distribution,"
echo "or get the source tarball at http://ftp.gnu.org/gnu/autoconf/"
DIE=1
}
if automake-1.11 --version < /dev/null > /dev/null 2>&1 ; then
AUTOMAKE=automake-1.11
ACLOCAL=aclocal-1.11
else if automake-1.10 --version < /dev/null > /dev/null 2>&1 ; then
AUTOMAKE=automake-1.10
ACLOCAL=aclocal-1.10
GTKDOCIZE=`which gtkdocize`
if test -z $GTKDOCIZE; then
echo "*** No GTK-Doc found, please install it ***"
exit 1
else
echo
echo "You must have automake 1,10.x or 1.11.x installed to compile $PROJECT."
echo "Install the appropriate package for your distribution,"
echo "or get the source tarball at http://ftp.gnu.org/gnu/automake/"
DIE=1
gtkdocize || exit $?
fi
fi
if test "$DIE" -eq 1; then
exit 1
fi
test $TEST_TYPE $FILE || {
echo "You must run this script in the top-level $PROJECT directory"
exit 1
}
# NOCONFIGURE is used by gnome-common; support both
if ! test -z "$AUTOGEN_SUBDIR_MODE"; then
NOCONFIGURE=1
fi
if test -z "$NOCONFIGURE"; then
if test -z "$*"; then
echo "I am going to run ./configure with no arguments - if you wish "
echo "to pass any to it, please specify them on the $0 command line."
fi
fi
if test -z "$ACLOCAL_FLAGS"; then
acdir=`$ACLOCAL --print-ac-dir`
m4list="glib-2.0.m4 glib-gettext.m4"
for file in $m4list
do
if [ ! -f "$acdir/$file" ]; then
echo "WARNING: aclocal's directory is $acdir, but..."
echo " no file $acdir/$file"
echo " You may see fatal macro warnings below."
echo " If these files are installed in /some/dir, set the ACLOCAL_FLAGS "
echo " environment variable to \"-I /some/dir\", or install"
echo " $acdir/$file."
echo ""
fi
done
fi
rm -rf autom4te.cache
# README and INSTALL are required by automake, but may be deleted by clean
# up rules. to get automake to work, simply touch these here, they will be
# regenerated from their corresponding *.in files by ./configure anyway.
touch README INSTALL
gtkdocize || exit $?
$ACLOCAL -I m4 $ACLOCAL_FLAGS || exit $?
libtoolize --force || exit $?
autoheader || exit $?
$AUTOMAKE --add-missing || exit $?
autoconf || exit $?
cd $ORIGDIR || exit $?
if test -z "$NOCONFIGURE"; then
$srcdir/configure --enable-maintainer-mode $AUTOGEN_CONFIGURE_ARGS "$@" || exit $?
echo
echo "Now type 'make' to compile $PROJECT."
AUTORECONF=`which autoreconf`
if test -z $AUTORECONF; then
echo "*** No autoreconf found, please install it ***"
exit 1
else
autoreconf --force --install --verbose || exit $?
fi
cd "$olddir"
test -n "$NOCONFIGURE" || "$srcdir/configure" "$@"
-6
View File
@@ -276,12 +276,6 @@
/* Whether to load modules via .la files rather than directly */
/* #undef USE_LA_MODULES */
/* Define to 1 if medialib is available and should be used */
/* #undef USE_MEDIALIB */
/* Define to 1 if medialib 2.5 is available */
/* #undef USE_MEDIALIB25 */
/* Define to 1 if XXM is available and should be used */
#ifndef _MSC_VER
# define USE_MMX 1
+44 -111
View File
@@ -10,7 +10,7 @@
m4_define([gtk_major_version], [2])
m4_define([gtk_minor_version], [91])
m4_define([gtk_micro_version], [6])
m4_define([gtk_micro_version], [8])
m4_define([gtk_interface_age], [0])
m4_define([gtk_binary_age],
[m4_eval(100 * gtk_minor_version + gtk_micro_version)])
@@ -19,7 +19,7 @@ m4_define([gtk_version],
# This is the X.Y used in -lgtk-FOO-X.Y
m4_define([gtk_api_version], [3.0])
AC_PREREQ([2.64])
AC_PREREQ([2.62])
AC_INIT([gtk+], [gtk_version],
[http://bugzilla.gnome.org/enter_bug.cgi?product=gtk%2B],
[gtk+])
@@ -38,7 +38,7 @@ AC_CONFIG_MACRO_DIR([m4])
m4_define([gtk_binary_version], [3.0.0])
# required versions of other packages
m4_define([glib_required_version], [2.27.3])
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])
@@ -267,12 +267,6 @@ case $gdktarget in
*) AC_MSG_ERROR([Invalid target for GDK: use x11, quartz or win32.]);;
esac
gdktargetlib=libgdk-$gdktarget-$GTK_API_VERSION.la
gtktargetlib=libgtk-$gdktarget-$GTK_API_VERSION.la
AC_SUBST(gdktargetlib)
AC_SUBST(gtktargetlib)
if test "x$enable_debug" = "xyes"; then
test "$cflags_set" = set || CFLAGS="$CFLAGS -g"
GTK_DEBUG_FLAGS="-DG_ENABLE_DEBUG -DG_ERRORCHECK_MUTEXES"
@@ -666,53 +660,6 @@ else
fi
fi
# `widechar' tests for gdki18n.h
AC_MSG_CHECKING(for wchar.h)
AC_TRY_CPP([#include <wchar.h>], gdk_wchar_h=yes, gdk_wchar_h=no)
if test $gdk_wchar_h = yes; then
AC_DEFINE(HAVE_WCHAR_H, 1, [Have wchar.h include file])
fi
AC_MSG_RESULT($gdk_wchar_h)
# Check for wctype.h (for iswalnum)
AC_MSG_CHECKING(for wctype.h)
AC_TRY_CPP([#include <wctype.h>], gdk_wctype_h=yes, gdk_wctype_h=no)
if test $gdk_wctype_h = yes; then
AC_DEFINE(HAVE_WCTYPE_H, 1, [Have wctype.h include file])
fi
AC_MSG_RESULT($gdk_wctype_h)
# in Solaris 2.5, `iswalnum' is in -lw
GDK_WLIBS=
AC_CHECK_FUNC(iswalnum,,[AC_CHECK_LIB(w,iswalnum,GDK_WLIBS=-lw)])
oLIBS="$LIBS"
LIBS="$LIBS $GDK_WLIBS"
# The following is necessary for Linux libc-5.4.38
AC_MSG_CHECKING(if iswalnum() and friends are properly defined)
AC_TRY_LINK([#include <stdlib.h>],[
#if (defined(HAVE_WCTYPE_H) || defined(HAVE_WCHAR_H))
# ifdef HAVE_WCTYPE_H
# include <wctype.h>
# else
# ifdef HAVE_WCHAR_H
# include <wchar.h>
# endif
# endif
#else
# define iswalnum(c) ((wchar_t)(c) <= 0xFF && isalnum(c))
#endif
iswalnum((wchar_t) 0);
], gdk_working_wctype=yes, gdk_working_wctype=no)
LIBS="$oLIBS"
if test $gdk_working_wctype = no; then
AC_DEFINE(HAVE_BROKEN_WCTYPE, 1, [Is the wctype implementation broken])
GDK_WLIBS=
fi
AC_MSG_RESULT($gdk_working_wctype)
AC_SUBST(GDK_WLIBS)
# Check for uxtheme.h (for MS-Windows Engine)
AC_MSG_CHECKING(for uxtheme.h)
AC_TRY_CPP([#include <uxtheme.h>], gtk_uxtheme_h=yes, gtk_uxtheme_h=no)
@@ -858,28 +805,6 @@ AC_CHECK_HEADER(sys/sysinfo.h,
AC_DEFINE(HAVE_SYS_SYSINFO_H, 1,
[Define to 1 if sys/sysinfo.h is available]))
AC_MSG_CHECKING(for mediaLib 2.3)
use_mlib25=no
# Check for a mediaLib 2.3 function since that is what the GTK+ mediaLib
# patch requires.
AC_CHECK_LIB(mlib, mlib_ImageSetStruct, use_mlib=yes, use_mlib=no)
if test $use_mlib = yes; then
AC_DEFINE(USE_MEDIALIB, 1,
[Define to 1 if medialib is available and should be used])
MEDIA_LIB=-lmlib
AC_MSG_CHECKING(for mediaLib 2.5)
# Check for a mediaLib 2.5 function since that is what is needed for
# gdk_rgb_convert integration.
AC_CHECK_LIB(mlib, mlib_VideoColorRGBint_to_BGRAint, use_mlib25=yes, use_mlib25=no)
if test $use_mlib25 = yes; then
AC_DEFINE(USE_MEDIALIB25, 1,
[Define to 1 if medialib 2.5 is available])
fi
fi
AM_CONDITIONAL(USE_MEDIALIB, test $use_mlib = yes)
AM_CONDITIONAL(USE_MEDIALIB25, test $use_mlib25 = yes)
dnl Look for a host system's gdk-pixbuf-csource if we are cross-compiling
AM_CONDITIONAL(CROSS_COMPILING, test $cross_compiling = yes)
@@ -905,7 +830,7 @@ fi
# Windowing system checks
########################################
GDK_EXTRA_LIBS="$GDK_WLIBS"
GDK_EXTRA_LIBS=
GDK_EXTRA_CFLAGS=
# GTK+ uses some X calls, so needs to link against X directly
@@ -1488,6 +1413,25 @@ GLIB_GSETTINGS
GOBJECT_INTROSPECTION_CHECK([0.9.3])
##################################################
# Packagekit module
#################################################
AC_ARG_ENABLE(packagekit,
AC_HELP_STRING([--disable-packagekit],
[build packagekit open with module]))
ENABLE_PACKAGEKIT=
if test "os_win32" != "yes"; then
if test "x$enable_packagekit" != "xno"; then
ENABLE_PACKAGEKIT=1
AC_DEFINE(ENABLE_PACKAGEKIT, 1, [define to enable packagekit])
fi
fi
AC_SUBST(ENABLE_PACKAGEKIT)
AM_CONDITIONAL(ENABLE_PACKAGEKIT, test "x$ENABLE_PACKAGEKIT" = "x1")
##################################################
# Checks for gtk-doc and docbook-tools
##################################################
@@ -1533,12 +1477,16 @@ AC_CONFIG_COMMANDS([gdk/gdkconfig.h], [
* This is a generated file. Please modify `configure.ac'
*/
#ifndef GDKCONFIG_H
#define GDKCONFIG_H
#ifndef __GDKCONFIG_H__
#define __GDKCONFIG_H__
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#if !defined (__GDK_H_INSIDE__) && !defined (GDK_COMPILATION)
#error "Only <gdk/gdk.h> can be included directly."
#endif
#include <glib.h>
G_BEGIN_DECLS
#ifndef GSEAL
/* introduce GSEAL() here for all of Gdk and Gtk+ without the need to modify GLib */
@@ -1553,16 +1501,13 @@ _______EOF
cat >>$outfile <<_______EOF
$gdk_windowing
$gdk_wc
_______EOF
cat >>$outfile <<_______EOF
#ifdef __cplusplus
}
#endif /* __cplusplus */
G_END_DECLS
#endif /* GDKCONFIG_H */
#endif /* __GDKCONFIG_H__ */
_______EOF
@@ -1573,31 +1518,20 @@ _______EOF
mv $outfile gdk/gdkconfig.h
fi
],[
if test "x$gdktarget" = "xx11" ; then
gdk_windowing='
gdk_windowing=''
if expr "$gdktarget" : ".*x11.*" > /dev/null ; then
gdk_windowing='$gdk_windowing
#define GDK_WINDOWING_X11'
elif test "x$gdktarget" = "xwin32" ; then
gdk_windowing='
fi
if expr "$gdktarget" : ".*win32.*" > /dev/null ; then
gdk_windowing='$gdk_windowing
#define GDK_NATIVE_WINDOW_POINTER
#define GDK_WINDOWING_WIN32'
elif test "x$gdktarget" = "xquartz" ; then
gdk_windowing='
fi
if expr "$gdktarget" : ".*quartz.*" > /dev/null ; then
gdk_windowing='$gdk_windowing
#define GDK_WINDOWING_QUARTZ'
fi
if test x$gdk_wchar_h = xyes; then
gdk_wc='
#define GDK_HAVE_WCHAR_H 1'
fi
if test x$gdk_wctype_h = xyes; then
gdk_wc="\$gdk_wc
#define GDK_HAVE_WCTYPE_H 1"
fi
if test x$gdk_working_wctype = xno; then
gdk_wc="\$gdk_wc
#define GDK_HAVE_BROKEN_WCTYPE 1"
fi
])
dnl
@@ -1617,7 +1551,7 @@ AC_ARG_ENABLE(Bsymbolic,
enable_Bsymbolic=no)
LDFLAGS="${SAVED_LDFLAGS}"])
if test "x${enable_Bsymbolic}" == "xyes"; then
if test "x${enable_Bsymbolic}" = "xyes" ; then
GTK_LINK_FLAGS=-Wl,-Bsymbolic-functions
fi
AC_SUBST(GTK_LINK_FLAGS)
@@ -1630,7 +1564,6 @@ gdk-3.0.pc
gtk+-3.0.pc
gtk+-unix-print-3.0.pc
gail-3.0.pc
gdk-3.0-uninstalled.pc
gtk+-3.0-uninstalled.pc
gail-3.0-uninstalled.pc
m4macros/Makefile
+6 -7
View File
@@ -11,14 +11,13 @@ INCLUDES = \
$(GTK_DEBUG_FLAGS) \
$(GTK_DEP_CFLAGS)
DEPS = \
$(top_builddir)/gdk/$(gdktargetlib) \
$(top_builddir)/gtk/$(gtktargetlib)
DEPS = \
$(top_builddir)/gtk/libgtk-3.0.la
LDADDS = \
$(top_builddir)/gdk/$(gdktargetlib) \
$(top_builddir)/gtk/$(gtktargetlib) \
$(GTK_DEP_LIBS) \
LDADDS = \
$(top_builddir)/gtk/libgtk-3.0.la \
$(top_builddir)/gdk/libgdk-3.0.la \
$(GTK_DEP_LIBS) \
$(MATH_LIB)
noinst_PROGRAMS = \
+4 -5
View File
@@ -55,13 +55,12 @@ INCLUDES = \
$(GTK_DEP_CFLAGS)
DEPS = \
$(top_builddir)/gdk/$(gdktargetlib) \
$(top_builddir)/gtk/$(gtktargetlib)
$(top_builddir)/gtk/libgtk-3.0.la
LDADDS = \
$(top_builddir)/gdk/$(gdktargetlib) \
$(top_builddir)/gtk/$(gtktargetlib) \
$(GTK_DEP_LIBS) \
$(top_builddir)/gtk/libgtk-3.0.la \
$(top_builddir)/gdk/libgdk-3.0.la \
$(GTK_DEP_LIBS) \
-lm
bin_PROGRAMS = gtk3-demo
+3 -3
View File
@@ -110,7 +110,7 @@ create_page1 (GtkWidget *assistant)
gtk_assistant_set_page_title (GTK_ASSISTANT (assistant), box, "Page 1");
gtk_assistant_set_page_type (GTK_ASSISTANT (assistant), box, GTK_ASSISTANT_PAGE_INTRO);
pixbuf = gtk_widget_render_icon (assistant, GTK_STOCK_DIALOG_INFO, GTK_ICON_SIZE_DIALOG, NULL);
pixbuf = gtk_widget_render_icon_pixbuf (assistant, GTK_STOCK_DIALOG_INFO, GTK_ICON_SIZE_DIALOG);
gtk_assistant_set_page_header_image (GTK_ASSISTANT (assistant), box, pixbuf);
g_object_unref (pixbuf);
}
@@ -133,7 +133,7 @@ create_page2 (GtkWidget *assistant)
gtk_assistant_set_page_complete (GTK_ASSISTANT (assistant), box, TRUE);
gtk_assistant_set_page_title (GTK_ASSISTANT (assistant), box, "Page 2");
pixbuf = gtk_widget_render_icon (assistant, GTK_STOCK_DIALOG_INFO, GTK_ICON_SIZE_DIALOG, NULL);
pixbuf = gtk_widget_render_icon_pixbuf (assistant, GTK_STOCK_DIALOG_INFO, GTK_ICON_SIZE_DIALOG);
gtk_assistant_set_page_header_image (GTK_ASSISTANT (assistant), box, pixbuf);
g_object_unref (pixbuf);
}
@@ -152,7 +152,7 @@ create_page3 (GtkWidget *assistant)
gtk_assistant_set_page_complete (GTK_ASSISTANT (assistant), label, TRUE);
gtk_assistant_set_page_title (GTK_ASSISTANT (assistant), label, "Confirmation");
pixbuf = gtk_widget_render_icon (assistant, GTK_STOCK_DIALOG_INFO, GTK_ICON_SIZE_DIALOG, NULL);
pixbuf = gtk_widget_render_icon_pixbuf (assistant, GTK_STOCK_DIALOG_INFO, GTK_ICON_SIZE_DIALOG);
gtk_assistant_set_page_header_image (GTK_ASSISTANT (assistant), label, pixbuf);
g_object_unref (pixbuf);
}
+1 -1
View File
@@ -151,7 +151,7 @@ query_for_toplevel (GdkScreen *screen,
toplevel = NULL;
}
gdk_cursor_unref (cursor);
g_object_unref (cursor);
gtk_widget_destroy (popup);
gdk_flush (); /* Really release the grab */
+3 -3
View File
@@ -77,8 +77,8 @@ get_image_pixbuf (GtkImage *image)
return g_object_ref (gtk_image_get_pixbuf (image));
case GTK_IMAGE_STOCK:
gtk_image_get_stock (image, &stock_id, &size);
return gtk_widget_render_icon (GTK_WIDGET (image),
stock_id, size, NULL);
return gtk_widget_render_icon_pixbuf (GTK_WIDGET (image),
stock_id, size);
default:
g_warning ("Image storage type %d not handled",
gtk_image_get_storage_type (image));
@@ -125,7 +125,7 @@ drag_data_received (GtkWidget *widget,
{
GdkPixbuf *pixbuf;
if (selection_data->length > 0)
if (gtk_selection_data_get_length (selection_data) > 0)
{
pixbuf = gtk_selection_data_get_pixbuf (selection_data);
gtk_image_set_from_pixbuf (GTK_IMAGE (data), pixbuf);
+33 -32
View File
@@ -9,35 +9,37 @@
static GtkWidget *window = NULL;
static GtkWidget *da;
static GdkColor color;
static GdkRGBA color;
static GtkWidget *frame;
/* Expose callback for the drawing area
/* draw callback for the drawing area
*/
static gboolean
draw_callback (GtkWidget *widget,
draw_callback (GtkWidget *widget,
cairo_t *cr,
gpointer data)
{
GtkStyle *style;
GtkStyleContext *context;
GdkRGBA *bg;
style = gtk_widget_get_style (widget);
gdk_cairo_set_source_color (cr, &style->bg[GTK_STATE_NORMAL]);
context = gtk_widget_get_style_context (widget);
gtk_style_context_get (context, 0, "background-color", &bg, NULL);
gdk_cairo_set_source_rgba (cr, bg);
cairo_paint (cr);
gdk_rgba_free (bg);
return TRUE;
}
static void
change_color_callback (GtkWidget *button,
gpointer data)
gpointer data)
{
GtkWidget *dialog;
GtkColorSelection *colorsel;
GtkColorSelectionDialog *selection_dialog;
gint response;
dialog = gtk_color_selection_dialog_new ("Changing color");
gtk_window_set_transient_for (GTK_WINDOW (dialog), GTK_WINDOW (window));
@@ -45,20 +47,19 @@ change_color_callback (GtkWidget *button,
selection_dialog = GTK_COLOR_SELECTION_DIALOG (dialog);
colorsel = GTK_COLOR_SELECTION (gtk_color_selection_dialog_get_color_selection (selection_dialog));
gtk_color_selection_set_previous_color (colorsel, &color);
gtk_color_selection_set_current_color (colorsel, &color);
gtk_color_selection_set_previous_rgba (colorsel, &color);
gtk_color_selection_set_current_rgba (colorsel, &color);
gtk_color_selection_set_has_palette (colorsel, TRUE);
response = gtk_dialog_run (GTK_DIALOG (dialog));
if (response == GTK_RESPONSE_OK)
{
gtk_color_selection_get_current_color (colorsel,
&color);
gtk_widget_modify_bg (da, GTK_STATE_NORMAL, &color);
gtk_color_selection_get_current_rgba (colorsel, &color);
gtk_widget_override_background_color (da, 0, &color);
}
gtk_widget_destroy (dialog);
}
@@ -68,20 +69,21 @@ do_colorsel (GtkWidget *do_widget)
GtkWidget *vbox;
GtkWidget *button;
GtkWidget *alignment;
if (!window)
{
color.red = 0;
color.blue = 65535;
color.blue = 1;
color.green = 0;
color.alpha = 1;
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_window_set_screen (GTK_WINDOW (window),
gtk_widget_get_screen (do_widget));
gtk_widget_get_screen (do_widget));
gtk_window_set_title (GTK_WINDOW (window), "Color Selection");
g_signal_connect (window, "destroy",
G_CALLBACK (gtk_widget_destroyed), &window);
G_CALLBACK (gtk_widget_destroyed), &window);
gtk_container_set_border_width (GTK_CONTAINER (window), 8);
@@ -92,33 +94,32 @@ do_colorsel (GtkWidget *do_widget)
/*
* Create the color swatch area
*/
frame = gtk_frame_new (NULL);
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_IN);
gtk_box_pack_start (GTK_BOX (vbox), frame, TRUE, TRUE, 0);
da = gtk_drawing_area_new ();
g_signal_connect (da, "draw",
G_CALLBACK (draw_callback), NULL);
g_signal_connect (da, "draw", G_CALLBACK (draw_callback), NULL);
/* set a minimum size */
gtk_widget_set_size_request (da, 200, 200);
/* set the color */
gtk_widget_modify_bg (da, GTK_STATE_NORMAL, &color);
gtk_widget_override_background_color (da, 0, &color);
gtk_container_add (GTK_CONTAINER (frame), da);
alignment = gtk_alignment_new (1.0, 0.5, 0.0, 0.0);
button = gtk_button_new_with_mnemonic ("_Change the above color");
gtk_container_add (GTK_CONTAINER (alignment), button);
gtk_box_pack_start (GTK_BOX (vbox), alignment, FALSE, FALSE, 0);
g_signal_connect (button, "clicked",
G_CALLBACK (change_color_callback), NULL);
G_CALLBACK (change_color_callback), NULL);
}
if (!gtk_widget_get_visible (window))
+5 -5
View File
@@ -65,8 +65,8 @@ create_stock_icon_store (void)
{
if (stock_id[i])
{
pixbuf = gtk_widget_render_icon (cellview, stock_id[i],
GTK_ICON_SIZE_BUTTON, NULL);
pixbuf = gtk_widget_render_icon_pixbuf (cellview, stock_id[i],
GTK_ICON_SIZE_BUTTON);
gtk_stock_lookup (stock_id[i], &item);
label = strip_underscore (item.label);
gtk_list_store_append (store, &iter);
@@ -281,18 +281,18 @@ G_DEFINE_TYPE_WITH_CODE (MaskEntry, mask_entry, GTK_TYPE_ENTRY,
static void
mask_entry_set_background (MaskEntry *entry)
{
static const GdkColor error_color = { 0, 65535, 60000, 60000 };
static const GdkRGBA error_color = { 1.0, 0.9, 0.9, 1.0 };
if (entry->mask)
{
if (!g_regex_match_simple (entry->mask, gtk_entry_get_text (GTK_ENTRY (entry)), 0, 0))
{
gtk_widget_modify_base (GTK_WIDGET (entry), GTK_STATE_NORMAL, &error_color);
gtk_widget_override_color (GTK_WIDGET (entry), 0, &error_color);
return;
}
}
gtk_widget_modify_base (GTK_WIDGET (entry), GTK_STATE_NORMAL, NULL);
gtk_widget_override_color (GTK_WIDGET (entry), 0, NULL);
}
+1 -1
View File
@@ -751,7 +751,7 @@ create_text (GtkTextBuffer **buffer,
if (is_source)
{
font_desc = pango_font_description_from_string ("monospace");
gtk_widget_modify_font (text_view, font_desc);
gtk_widget_override_font (text_view, font_desc);
pango_font_description_free (font_desc);
gtk_text_view_set_wrap_mode (GTK_TEXT_VIEW (text_view),
+12 -13
View File
@@ -230,7 +230,7 @@ gtk_rotated_bin_realize (GtkWidget *widget)
{
GtkRotatedBin *bin = GTK_ROTATED_BIN (widget);
GtkAllocation allocation;
GtkStyle *style;
GtkStyleContext *context;
GdkWindow *window;
GdkWindowAttr attributes;
gint attributes_mask;
@@ -291,9 +291,9 @@ gtk_rotated_bin_realize (GtkWidget *widget)
G_CALLBACK (offscreen_window_from_parent), bin);
gtk_widget_style_attach (widget);
style = gtk_widget_get_style (widget);
gtk_style_set_background (style, window, GTK_STATE_NORMAL);
gtk_style_set_background (style, bin->offscreen_window, GTK_STATE_NORMAL);
context = gtk_widget_get_style_context (widget);
gtk_style_context_set_background (context, window);
gtk_style_context_set_background (context, bin->offscreen_window);
gdk_window_show (bin->offscreen_window);
}
@@ -542,12 +542,11 @@ gtk_rotated_bin_draw (GtkWidget *widget,
}
if (gtk_cairo_should_draw_window (cr, bin->offscreen_window))
{
gtk_paint_flat_box (gtk_widget_get_style (widget), cr,
GTK_STATE_NORMAL, GTK_SHADOW_NONE,
widget, "blah",
0, 0,
gdk_window_get_width (bin->offscreen_window),
gdk_window_get_height (bin->offscreen_window));
gtk_render_background (gtk_widget_get_style_context (widget),
cr,
0, 0,
gdk_window_get_width (bin->offscreen_window),
gdk_window_get_height (bin->offscreen_window));
if (bin->child)
gtk_container_propagate_draw (GTK_CONTAINER (widget),
@@ -575,7 +574,7 @@ do_offscreen_window (GtkWidget *do_widget)
if (!window)
{
GtkWidget *bin, *vbox, *scale, *button;
GdkColor black;
GdkRGBA black;
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_window_set_screen (GTK_WINDOW (window),
@@ -585,8 +584,8 @@ do_offscreen_window (GtkWidget *do_widget)
g_signal_connect (window, "destroy",
G_CALLBACK (gtk_widget_destroyed), &window);
gdk_color_parse ("black", &black);
gtk_widget_modify_bg (window, GTK_STATE_NORMAL, &black);
gdk_rgba_parse (&black, "black");
gtk_widget_override_background_color (window, 0, &black);
gtk_container_set_border_width (GTK_CONTAINER (window), 10);
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
+9 -10
View File
@@ -168,7 +168,7 @@ gtk_mirror_bin_realize (GtkWidget *widget)
{
GtkMirrorBin *bin = GTK_MIRROR_BIN (widget);
GtkAllocation allocation;
GtkStyle *style;
GtkStyleContext *context;
GdkWindow *window;
GdkWindowAttr attributes;
gint attributes_mask;
@@ -229,9 +229,9 @@ gtk_mirror_bin_realize (GtkWidget *widget)
G_CALLBACK (offscreen_window_from_parent), bin);
gtk_widget_style_attach (widget);
style = gtk_widget_get_style (widget);
gtk_style_set_background (style, window, GTK_STATE_NORMAL);
gtk_style_set_background (style, bin->offscreen_window, GTK_STATE_NORMAL);
context = gtk_widget_get_style_context (widget);
gtk_style_context_set_background (context, window);
gtk_style_context_set_background (context, bin->offscreen_window);
gdk_window_show (bin->offscreen_window);
}
@@ -451,12 +451,11 @@ gtk_mirror_bin_draw (GtkWidget *widget,
}
else if (gtk_cairo_should_draw_window (cr, bin->offscreen_window))
{
gtk_paint_flat_box (gtk_widget_get_style (widget), cr,
GTK_STATE_NORMAL, GTK_SHADOW_NONE,
widget, "blah",
0, 0,
gdk_window_get_width (bin->offscreen_window),
gdk_window_get_height (bin->offscreen_window));
gtk_render_background (gtk_widget_get_style_context (widget),
cr,
0, 0,
gdk_window_get_width (bin->offscreen_window),
gdk_window_get_height (bin->offscreen_window));
if (bin->child)
gtk_container_propagate_draw (GTK_CONTAINER (widget),
+25 -25
View File
@@ -18,17 +18,17 @@ const char text[] = "I ♥ GTK+";
static void
fancy_shape_renderer (cairo_t *cr,
PangoAttrShape *attr,
gboolean do_path,
gpointer data)
PangoAttrShape *attr,
gboolean do_path,
gpointer data)
{
double x, y;
cairo_get_current_point (cr, &x, &y);
cairo_translate (cr, x, y);
cairo_scale (cr,
(double) attr->ink_rect.width / PANGO_SCALE,
(double) attr->ink_rect.height / PANGO_SCALE);
(double) attr->ink_rect.width / PANGO_SCALE,
(double) attr->ink_rect.height / PANGO_SCALE);
switch (GPOINTER_TO_UINT (attr->data))
{
@@ -36,9 +36,9 @@ fancy_shape_renderer (cairo_t *cr,
{
cairo_move_to (cr, .5, .0);
cairo_line_to (cr, .9, -.4);
cairo_curve_to (cr, 1.1, -.8, .5, -.9, .5, -.5);
cairo_curve_to (cr, .5, -.9, -.1, -.8, .1, -.4);
cairo_close_path (cr);
cairo_curve_to (cr, 1.1, -.8, .5, -.9, .5, -.5);
cairo_curve_to (cr, .5, -.9, -.1, -.8, .1, -.4);
cairo_close_path (cr);
}
break;
}
@@ -60,8 +60,8 @@ create_fancy_attr_list_for_layout (PangoLayout *layout)
/* Get font metrics and prepare fancy shape size */
metrics = pango_context_get_metrics (pango_layout_get_context (layout),
pango_layout_get_font_description (layout),
NULL);
pango_layout_get_font_description (layout),
NULL);
ascent = pango_font_metrics_get_ascent (metrics);
logical_rect.x = 0;
logical_rect.width = ascent;
@@ -77,9 +77,9 @@ create_fancy_attr_list_for_layout (PangoLayout *layout)
PangoAttribute *attr;
attr = pango_attr_shape_new_with_data (&ink_rect,
&logical_rect,
GUINT_TO_POINTER (g_utf8_get_char (p)),
NULL, NULL);
&logical_rect,
GUINT_TO_POINTER (g_utf8_get_char (p)),
NULL, NULL);
attr->start_index = p - text;
attr->end_index = attr->start_index + strlen (HEART);
@@ -93,7 +93,7 @@ create_fancy_attr_list_for_layout (PangoLayout *layout)
static gboolean
rotated_text_draw (GtkWidget *widget,
cairo_t *cr,
gpointer data)
gpointer data)
{
#define RADIUS 150
#define N_WORDS 5
@@ -119,8 +119,8 @@ rotated_text_draw (GtkWidget *widget,
height = gtk_widget_get_allocated_height (widget);
device_radius = MIN (width, height) / 2.;
cairo_translate (cr,
device_radius + (width - 2 * device_radius) / 2,
device_radius + (height - 2 * device_radius) / 2);
device_radius + (width - 2 * device_radius) / 2,
device_radius + (height - 2 * device_radius) / 2);
cairo_scale (cr, device_radius / RADIUS, device_radius / RADIUS);
/* Create and a subtle gradient source and use it. */
@@ -132,8 +132,8 @@ rotated_text_draw (GtkWidget *widget,
/* Create a PangoContext and set up our shape renderer */
context = gtk_widget_create_pango_context (widget);
pango_cairo_context_set_shape_renderer (context,
fancy_shape_renderer,
NULL, NULL);
fancy_shape_renderer,
NULL, NULL);
/* Create a PangoLayout, set the text, font, and attributes */
layout = pango_layout_new (context);
@@ -181,11 +181,11 @@ do_rotated_text (GtkWidget *do_widget)
PangoLayout *layout;
PangoAttrList *attrs;
const GdkColor white = { 0, 0xffff, 0xffff, 0xffff };
const GdkRGBA white = { 1.0, 1.0, 1.0, 1.0 };
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_window_set_screen (GTK_WINDOW (window),
gtk_widget_get_screen (do_widget));
gtk_widget_get_screen (do_widget));
gtk_window_set_title (GTK_WINDOW (window), "Rotated Text");
gtk_window_set_default_size (GTK_WINDOW (window), 4 * RADIUS, 2 * RADIUS);
g_signal_connect (window, "destroy", G_CALLBACK (gtk_widget_destroyed), &window);
@@ -200,10 +200,10 @@ do_rotated_text (GtkWidget *do_widget)
gtk_container_add (GTK_CONTAINER (box), drawing_area);
/* This overrides the background color from the theme */
gtk_widget_modify_bg (drawing_area, GTK_STATE_NORMAL, &white);
gtk_widget_override_background_color (drawing_area, 0, &white);
g_signal_connect (drawing_area, "draw",
G_CALLBACK (rotated_text_draw), NULL);
G_CALLBACK (rotated_text_draw), NULL);
/* And a label */
@@ -215,8 +215,8 @@ do_rotated_text (GtkWidget *do_widget)
/* Set up fancy stuff on the label */
layout = gtk_label_get_layout (GTK_LABEL (label));
pango_cairo_context_set_shape_renderer (pango_layout_get_context (layout),
fancy_shape_renderer,
NULL, NULL);
fancy_shape_renderer,
NULL, NULL);
attrs = create_fancy_attr_list_for_layout (layout);
gtk_label_set_attributes (GTK_LABEL (label), attrs);
pango_attr_list_unref (attrs);
+3 -3
View File
@@ -166,9 +166,9 @@ create_model (void)
}
g_free (sizes);
info.small_icon = gtk_widget_render_icon (window, info.id,
size,
NULL);
info.small_icon = gtk_widget_render_icon_pixbuf (window,
info.id,
size);
if (size != GTK_ICON_SIZE_MENU)
{
+3 -3
View File
@@ -561,7 +561,7 @@ recursive_attach_view (int depth,
{
GtkWidget *child_view;
GtkWidget *event_box;
GdkColor color;
GdkRGBA color;
GtkWidget *align;
if (depth > 4)
@@ -571,8 +571,8 @@ recursive_attach_view (int depth,
/* Event box is to add a black border around each child view */
event_box = gtk_event_box_new ();
gdk_color_parse ("black", &color);
gtk_widget_modify_bg (event_box, GTK_STATE_NORMAL, &color);
gdk_rgba_parse (&color, "black");
gtk_widget_override_background_color (event_box, 0, &color);
align = gtk_alignment_new (0.5, 0.5, 1.0, 1.0);
gtk_container_set_border_width (GTK_CONTAINER (align), 1);
+1 -1
View File
@@ -41,7 +41,7 @@ canvas_item_new (GtkWidget *widget,
GdkPixbuf *pixbuf;
stock_id = gtk_tool_button_get_stock_id (button);
pixbuf = gtk_widget_render_icon (widget, stock_id, GTK_ICON_SIZE_DIALOG, NULL);
pixbuf = gtk_widget_render_icon_pixbuf (widget, stock_id, GTK_ICON_SIZE_DIALOG);
if (pixbuf)
{
+88 -90
View File
@@ -13,40 +13,39 @@ DOC_MAIN_SGML_FILE=gdk-docs.sgml
SCAN_OPTIONS=--deprecated-guards="GDK_ENABLE_BROKEN|GDK_DISABLE_DEPRECATED"
# The directory containing the source code. Relative to $(srcdir)
DOC_SOURCE_DIR=../../../gdk
DOC_SOURCE_DIR=../../../gdk ../../../gdk/x11
# Used for dependencies
HFILE_GLOB=$(top_srcdir)/gdk/*.h $(top_srcdir)/gdk/x11/gdkx.h
CFILE_GLOB=$(top_srcdir)/gdk/*.c
# Header files to ignore when scanning
IGNORE_HFILES= \
IGNORE_HFILES= \
gdkintl.h \
gdkmarshalers.h \
gdkkeysyms.h \
gdkinternals.h \
gdkprivate.h \
gdkpoly-generic.h \
gdk*private.h \
keyname-table.h \
win32 \
win32 \
x11 \
quartz
# Extra files to add when scanning (relative to $srcdir)
EXTRA_HFILES= \
../../../gdk/x11/gdkx.h
../../../gdk/x11/gdkx.h
# CFLAGS and LDFLAGS for compiling scan program. Only needed
# if $(DOC_MODULE).types is non-empty.
INCLUDES = \
-I$(top_srcdir) \
-I$(top_builddir) \
-I$(top_builddir)/gdk \
INCLUDES = \
-I$(top_srcdir) \
-I$(top_builddir) \
-I$(top_builddir)/gdk \
$(GTK_DEBUG_FLAGS) \
$(GDK_DEP_CFLAGS)
GTKDOC_LIBS = $(top_builddir)/gdk/$(gdktargetlib)
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
@@ -57,86 +56,85 @@ content_files = \
multihead.sgml
# Images to copy into HTML directory
HTML_IMAGES = \
HTML_IMAGES = \
images/rotated-text.png \
\
images/X_cursor.png \
images/arrow.png \
images/based_arrow_down.png \
images/based_arrow_up.png \
images/boat.png \
images/bogosity.png \
images/bottom_left_corner.png \
images/bottom_right_corner.png \
images/bottom_side.png \
images/bottom_tee.png \
images/box_spiral.png \
images/center_ptr.png \
images/circle.png \
images/clock.png \
images/coffee_mug.png \
images/cross.png \
images/cross_reverse.png \
images/crosshair.png \
images/diamond_cross.png \
images/dot.png \
images/dotbox.png \
images/double_arrow.png \
images/draft_large.png \
images/draft_small.png \
images/draped_box.png \
images/exchange.png \
images/fleur.png \
images/gobbler.png \
images/gumby.png \
images/hand1.png \
images/hand2.png \
images/heart.png \
images/icon.png \
images/iron_cross.png \
images/left_ptr.png \
images/left_side.png \
images/left_tee.png \
images/leftbutton.png \
images/ll_angle.png \
images/lr_angle.png \
images/man.png \
images/middlebutton.png \
images/mouse.png \
images/pencil.png \
images/pirate.png \
images/plus.png \
images/question_arrow.png \
images/right_ptr.png \
images/right_side.png \
images/right_tee.png \
images/rightbutton.png \
images/rtl_logo.png \
images/sailboat.png \
images/sb_down_arrow.png \
images/sb_h_double_arrow.png \
images/sb_left_arrow.png \
images/sb_right_arrow.png \
images/sb_up_arrow.png \
images/sb_v_double_arrow.png \
images/shuttle.png \
images/sizing.png \
images/spider.png \
images/spraycan.png \
images/star.png \
images/target.png \
images/tcross.png \
images/top_left_arrow.png \
images/top_left_corner.png \
images/top_right_corner.png \
images/top_side.png \
images/top_tee.png \
images/trek.png \
images/ul_angle.png \
images/umbrella.png \
images/ur_angle.png \
images/watch.png \
images/xterm.png
images/X_cursor.png \
images/arrow.png \
images/based_arrow_down.png \
images/based_arrow_up.png \
images/boat.png \
images/bogosity.png \
images/bottom_left_corner.png \
images/bottom_right_corner.png \
images/bottom_side.png \
images/bottom_tee.png \
images/box_spiral.png \
images/center_ptr.png \
images/circle.png \
images/clock.png \
images/coffee_mug.png \
images/cross.png \
images/cross_reverse.png \
images/crosshair.png \
images/diamond_cross.png \
images/dot.png \
images/dotbox.png \
images/double_arrow.png \
images/draft_large.png \
images/draft_small.png \
images/draped_box.png \
images/exchange.png \
images/fleur.png \
images/gobbler.png \
images/gumby.png \
images/hand1.png \
images/hand2.png \
images/heart.png \
images/icon.png \
images/iron_cross.png \
images/left_ptr.png \
images/left_side.png \
images/left_tee.png \
images/leftbutton.png \
images/ll_angle.png \
images/lr_angle.png \
images/man.png \
images/middlebutton.png \
images/mouse.png \
images/pencil.png \
images/pirate.png \
images/plus.png \
images/question_arrow.png \
images/right_ptr.png \
images/right_side.png \
images/right_tee.png \
images/rightbutton.png \
images/rtl_logo.png \
images/sailboat.png \
images/sb_down_arrow.png \
images/sb_h_double_arrow.png \
images/sb_left_arrow.png \
images/sb_right_arrow.png \
images/sb_up_arrow.png \
images/sb_v_double_arrow.png \
images/shuttle.png \
images/sizing.png \
images/spider.png \
images/spraycan.png \
images/star.png \
images/target.png \
images/tcross.png \
images/top_left_arrow.png \
images/top_left_corner.png \
images/top_right_corner.png \
images/top_side.png \
images/top_tee.png \
images/trek.png \
images/ul_angle.png \
images/umbrella.png \
images/ur_angle.png \
images/watch.png \
images/xterm.png
# Extra options to supply to gtkdoc-fixref
FIXXREF_OPTIONS= \
+3 -2
View File
@@ -20,9 +20,11 @@
<xi:include href="multihead.sgml" />
<xi:include href="xml/gdkdisplay.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/drawing.xml" />
<xi:include href="xml/pixbufs.xml" />
<xi:include href="xml/colors.xml" />
<xi:include href="xml/rgba_colors.xml" />
<xi:include href="xml/visuals.xml" />
@@ -35,7 +37,6 @@
<xi:include href="xml/dnd.xml" />
<xi:include href="xml/properties.xml" />
<xi:include href="xml/threads.xml" />
<xi:include href="xml/gdkdevicemanager.xml" />
<xi:include href="xml/pango_interaction.xml" />
<xi:include href="xml/cairo_interaction.xml" />
<xi:include href="xml/x_interaction.xml" />
-23
View File
@@ -1,27 +1,4 @@
# GdkPixmap, GdkBitmap and GdkDrawable are the same as GdkWindow.
<STRUCT>
<NAME>GdkWindow</NAME>
struct GdkPixmap
{
gpointer user_data;
};
</STRUCT>
<STRUCT>
<NAME>GdkPixmap</NAME>
struct GdkPixmap
{
gpointer user_data;
};
</STRUCT>
<STRUCT>
<NAME>GdkDrawable</NAME>
struct GdkDrawable
{
gpointer user_data;
};
</STRUCT>
# GdkAtom is an opaque typedef
<STRUCT>
<NAME>GdkAtom</NAME>
+94 -117
View File
@@ -8,8 +8,6 @@ gdk_init
gdk_init_check
gdk_parse_args
gdk_get_display_arg_name
gdk_set_locale
gdk_set_sm_client_id
gdk_notify_startup_complete
gdk_notify_startup_complete_with_id
@@ -63,7 +61,6 @@ GdkStatus
GDKVAR
gdk_axis_use_get_type
gdk_byte_order_get_type
gdk_cap_style_get_type
gdk_crossing_mode_get_type
gdk_cursor_type_get_type
gdk_drag_action_get_type
@@ -79,17 +76,14 @@ gdk_input_mode_get_type
gdk_input_source_get_type
gdk_modifier_type_get_type
gdk_notify_type_get_type
gdk_overlap_type_get_type
gdk_property_state_get_type
gdk_prop_mode_get_type
gdk_scroll_direction_get_type
gdk_setting_action_get_type
gdk_status_get_type
gdk_subwindow_mode_get_type
gdk_visibility_state_get_type
gdk_visual_type_get_type
gdk_window_attributes_type_get_type
gdk_window_class_get_type
gdk_window_edge_get_type
gdk_window_hints_get_type
gdk_window_state_get_type
@@ -122,23 +116,21 @@ gdk_display_sync
gdk_display_flush
gdk_display_close
gdk_display_is_closed
gdk_display_list_devices
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
gdk_display_get_device_state
gdk_display_list_devices
gdk_display_get_window_at_pointer
gdk_display_get_window_at_device_position
GdkDisplayPointerHooks
gdk_display_set_pointer_hooks
GdkDisplayDeviceHooks
gdk_display_set_device_hooks
gdk_display_warp_pointer
gdk_display_warp_device
gdk_display_supports_cursor_color
gdk_display_supports_cursor_alpha
gdk_display_get_default_cursor_size
@@ -151,7 +143,11 @@ gdk_display_store_clipboard
gdk_display_supports_shapes
gdk_display_supports_input_shapes
gdk_display_supports_composite
gdk_display_get_app_launch_context
gdk_display_notify_startup_complete
<SUBSECTION Standard>
GDK_DISPLAY
GDK_DISPLAY_OBJECT
GDK_IS_DISPLAY
GDK_TYPE_DISPLAY
@@ -173,7 +169,8 @@ gdk_display_manager_get
gdk_display_manager_get_default_display
gdk_display_manager_set_default_display
gdk_display_manager_list_displays
gdk_display_get_core_pointer
gdk_display_manager_open_display
<SUBSECTION Standard>
GDK_DISPLAY_MANAGER
GDK_DISPLAY_MANAGER_CLASS
@@ -219,10 +216,6 @@ gdk_screen_get_resolution
gdk_screen_set_resolution
gdk_screen_get_active_window
gdk_screen_get_window_stack
<SUBSECTION Spawning>
gdk_spawn_on_screen
gdk_spawn_on_screen_with_pipes
gdk_spawn_command_line_on_screen
<SUBSECTION Standard>
GDK_SCREEN
@@ -257,6 +250,8 @@ gdk_color_to_string
<SUBSECTION Standard>
GDK_TYPE_COLOR
<SUBSECTION Private>
gdk_color_get_type
</SECTION>
<SECTION>
@@ -272,25 +267,9 @@ gdk_rgba_to_string
<SUBSECTION Standard>
GDK_TYPE_RGBA
</SECTION>
<SECTION>
<TITLE>Drawing Primitives</TITLE>
<FILE>drawing</FILE>
GdkDrawable
gdk_drawable_get_clip_region
gdk_drawable_get_visible_region
<SUBSECTION Standard>
GDK_DRAWABLE
GDK_DRAWABLE_GET_CLASS
GDK_TYPE_DRAWABLE
GDK_IS_DRAWABLE
GDK_DRAWABLE_CLASS
GDK_IS_DRAWABLE_CLASS
<SUBSECTION Private>
GdkDrawableClass
gdk_rgba_get_type
</SECTION>
<SECTION>
@@ -339,7 +318,7 @@ gdk_visual_get_type
<FILE>windows</FILE>
GdkWindow
GdkWindowType
GdkWindowClass
GdkWindowWindowClass
GdkWindowHints
GdkGeometry
GdkGravity
@@ -397,9 +376,11 @@ gdk_window_constrain_size
gdk_window_beep
<SUBSECTION>
gdk_window_get_clip_region
gdk_window_begin_paint_rect
gdk_window_begin_paint_region
gdk_window_end_paint
gdk_window_get_visible_region
<SUBSECTION>
gdk_window_invalidate_rect
@@ -489,6 +470,8 @@ gdk_window_get_device_cursor
gdk_window_set_device_cursor
gdk_window_get_device_events
gdk_window_set_device_events
gdk_window_get_source_events
gdk_window_set_source_events
<SUBSECTION>
GdkPointerHooks
@@ -515,7 +498,6 @@ GDK_TYPE_FILTER_RETURN
GDK_TYPE_GRAVITY
GDK_TYPE_MODIFIER_TYPE
GDK_TYPE_WINDOW_ATTRIBUTES_TYPE
GDK_TYPE_WINDOW_CLASS
GDK_TYPE_WINDOW_EDGE
GDK_TYPE_WINDOW_HINTS
GDK_TYPE_WINDOW_TYPE
@@ -524,12 +506,11 @@ GDK_TYPE_WM_DECORATION
GDK_TYPE_WM_FUNCTION
<SUBSECTION Private>
gdk_window_object_get_type
gdk_drawable_get_type
GdkWindowObject
GdkWindowObjectClass
gdk_window_get_type
gdk_window_window_class_get_type
GdkWindowClass
GdkWindowImpl
GdkWindowImplIface
GdkWindowImplClass
GdkWindowRedirect
gdk_window_impl_get_type
gdk_window_freeze_toplevel_updates_libgtk_only
@@ -572,17 +553,8 @@ GdkAtom
GDK_ATOM_TO_POINTER
GDK_POINTER_TO_ATOM
GDK_NONE
gdk_text_property_to_text_list
gdk_text_property_to_text_list_for_display
gdk_free_text_list
gdk_text_property_to_utf8_list
gdk_text_property_to_utf8_list_for_display
gdk_string_to_compound_text
gdk_string_to_compound_text_for_display
gdk_free_compound_text
gdk_utf8_to_string_target
gdk_utf8_to_compound_text
gdk_utf8_to_compound_text_for_display
gdk_atom_intern
gdk_atom_intern_static_string
gdk_atom_name
@@ -616,7 +588,6 @@ gdk_cairo_set_source_pixbuf
gdk_cairo_set_source_window
gdk_cairo_rectangle
gdk_cairo_region
gdk_cairo_reset_clip
gdk_cairo_region_create_from_surface
</SECTION>
@@ -649,10 +620,6 @@ gdk_threads_add_timeout
gdk_threads_add_timeout_full
gdk_threads_add_timeout_seconds
gdk_threads_add_timeout_seconds_full
<SUBSECTION Private>
gdk_threads_lock
gdk_threads_unlock
</SECTION>
<SECTION>
@@ -702,25 +669,17 @@ gdk_keymap_get_type
</SECTION>
<SECTION>
<TITLE>GdkDeviceManager</TITLE>
<FILE>gdkdevicemanager</FILE>
GdkDeviceManager
<TITLE>GdkDevice</TITLE>
<FILE>gdkdevice</FILE>
GdkDevice
GdkDeviceType
GdkInputSource
GdkInputMode
GdkDeviceKey
GdkDeviceAxis
GdkAxisUse
GdkDeviceType
GdkGrabOwnership
gdk_enable_multidevice
gdk_device_manager_get_display
gdk_device_manager_list_devices
gdk_device_manager_get_client_pointer
<SUBSECTION>
gdk_device_get_name
gdk_device_set_source
gdk_device_get_source
gdk_device_set_mode
gdk_device_get_mode
@@ -729,10 +688,13 @@ gdk_device_get_key
gdk_device_set_axis_use
gdk_device_get_axis_use
gdk_device_get_associated_device
gdk_device_list_slave_devices
gdk_device_get_device_type
gdk_device_get_display
gdk_device_get_has_cursor
gdk_device_get_n_axes
gdk_device_get_n_keys
gdk_device_warp
<SUBSECTION>
gdk_device_grab
@@ -740,6 +702,8 @@ gdk_device_ungrab
<SUBSECTION>
gdk_device_get_state
gdk_device_get_position
gdk_device_get_window_at_position
gdk_device_get_history
gdk_device_free_history
GdkTimeCoord
@@ -747,14 +711,6 @@ gdk_device_get_axis
gdk_device_list_axes
gdk_device_get_axis_value
<SUBSECTION>
gdk_input_set_extension_events
GdkExtensionMode
<SUBSECTION>
gdk_devices_list
gdk_device_get_core_pointer
<SUBSECTION Standard>
GDK_TYPE_AXIS_USE
GDK_TYPE_EXTENSION_MODE
@@ -762,12 +718,6 @@ GDK_TYPE_INPUT_MODE
GDK_TYPE_INPUT_SOURCE
GDK_TYPE_DEVICE_TYPE
GDK_TYPE_GRAB_OWNERSHIP
GDK_DEVICE_MANAGER
GDK_DEVICE_MANAGER_CLASS
GDK_DEVICE_MANAGER_GET_CLASS
GDK_IS_DEVICE_MANAGER
GDK_IS_DEVICE_MANAGER_CLASS
GDK_TYPE_DEVICE_MANAGER
GDK_DEVICE
GDK_DEVICE_CLASS
GDK_DEVICE_GET_CLASS
@@ -777,15 +727,33 @@ GDK_TYPE_DEVICE
<SUBSECTION Private>
GdkDeviceClass
GdkDevicePrivate
GdkDeviceManagerClass
GdkDeviceManagerPrivate
gdk_device_get_type
gdk_device_manager_get_type
gdk_device_type_get_type
GDK_MAX_TIMECOORD_AXES
</SECTION>
<SECTION>
<TITLE>GdkDeviceManager</TITLE>
<FILE>gdkdevicemanager</FILE>
GdkDeviceManager
gdk_disable_multidevice
gdk_device_manager_get_display
gdk_device_manager_list_devices
gdk_device_manager_get_client_pointer
<SUBSECTION Standard>
GDK_DEVICE_MANAGER
GDK_DEVICE_MANAGER_CLASS
GDK_DEVICE_MANAGER_GET_CLASS
GDK_IS_DEVICE_MANAGER
GDK_IS_DEVICE_MANAGER_CLASS
GDK_TYPE_DEVICE_MANAGER
<SUBSECTION Private>
GdkDeviceManagerClass
gdk_device_manager_get_type
</SECTION>
<SECTION>
<TITLE>Events</TITLE>
<FILE>events</FILE>
@@ -795,7 +763,6 @@ GDK_CURRENT_TIME
GDK_PRIORITY_EVENTS
GDK_PRIORITY_REDRAW
<SUBSECTION>
gdk_events_pending
gdk_event_peek
@@ -831,6 +798,8 @@ gdk_event_set_screen
gdk_event_get_screen
gdk_event_get_device
gdk_event_set_device
gdk_event_get_source_device
gdk_event_set_source_device
<SUBSECTION>
gdk_setting_get
@@ -862,7 +831,6 @@ GdkNativeWindow
GdkEventDND
GdkEventProximity
GdkEventClient
GdkEventNoExpose
GdkEventWindowState
GdkEventSetting
GdkEventOwnerChange
@@ -921,30 +889,31 @@ gdk_cursor_get_type
<SECTION>
<TITLE>Drag and Drop</TITLE>
<FILE>dnd</FILE>
GdkDragContext
gdk_drag_get_selection
gdk_drag_abort
gdk_drop_reply
gdk_drag_context_new
gdk_drag_drop
gdk_drag_find_window
gdk_drag_find_window_for_screen
gdk_drag_context_get_source_window
gdk_drag_begin
gdk_drag_begin_for_device
gdk_drag_motion
gdk_drop_finish
gdk_drag_get_protocol
gdk_drag_get_protocol_for_display
GdkDragProtocol
GdkDragContext
GdkDragAction
gdk_drag_status
gdk_drag_drop_succeeded
gdk_drag_context_get_actions
gdk_drag_context_get_suggested_action
gdk_drag_context_get_selected_action
gdk_drag_context_list_targets
gdk_drag_context_get_device
gdk_drag_context_set_device
gdk_drag_context_get_source_window
gdk_drag_context_get_dest_window
gdk_drag_context_get_protocol
<SUBSECTION Standard>
GDK_DRAG_CONTEXT
@@ -966,38 +935,19 @@ gdk_drag_context_get_type
<TITLE>X Window System Interaction</TITLE>
<FILE>x_interaction</FILE>
GDK_ROOT_WINDOW
GDK_WINDOW_XDISPLAY
GDK_WINDOW_XID
GDK_DISPLAY_XDISPLAY
GDK_DRAWABLE_XDISPLAY
GDK_DRAWABLE_XID
GDK_SCREEN_XDISPLAY
GDK_SCREEN_XNUMBER
GDK_SCREEN_XSCREEN
GDK_CURSOR_XCURSOR
GDK_CURSOR_XDISPLAY
GDK_WINDOW_XWINDOW
gdkx_visual_get
gdk_window_foreign_new
gdk_window_foreign_new_for_display
gdk_xid_table_lookup
gdk_xid_table_lookup_for_display
gdk_window_lookup
gdk_window_lookup_for_display
gdk_x11_lookup_xdisplay
gdk_x11_get_server_time
gdk_net_wm_supports
gdk_x11_screen_supports_net_wm_hint
gdk_x11_screen_get_window_manager_name
gdk_x11_screen_get_monitor_output
gdk_x11_screen_lookup_visual
gdk_x11_window_set_user_time
gdk_x11_window_move_to_current_desktop
gdk_x11_display_get_user_time
gdk_x11_cursor_get_xcursor
gdk_x11_cursor_get_xdisplay
gdk_x11_display_broadcast_startup_message
gdk_x11_display_get_startup_notification_id
gdk_x11_display_set_startup_notification_id
gdk_x11_display_get_xdisplay
gdk_x11_display_grab
gdk_x11_display_ungrab
@@ -1006,15 +956,24 @@ gdk_x11_display_error_trap_pop
gdk_x11_display_error_trap_pop_ignored
gdk_x11_display_set_cursor_theme
gdk_x11_register_standard_event_type
gdk_x11_drawable_get_xdisplay
gdk_x11_drawable_get_xid
gdk_x11_screen_get_screen_number
gdk_x11_screen_get_xscreen
gdk_x11_screen_get_window_manager_name
gdk_x11_screen_get_monitor_output
gdk_x11_screen_lookup_visual
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_user_time
gdk_x11_window_move_to_current_desktop
gdk_x11_get_default_root_xwindow
gdk_x11_get_default_screen
gdk_x11_get_default_xdisplay
gdk_x11_grab_server
gdk_x11_screen_get_screen_number
gdk_x11_screen_get_xscreen
gdk_x11_ungrab_server
gdk_x11_cursor_get_xcursor
gdk_x11_cursor_get_xdisplay
gdk_x11_visual_get_xvisual
gdk_x11_atom_to_xatom
gdk_x11_atom_to_xatom_for_display
@@ -1024,11 +983,30 @@ gdk_x11_get_xatom_by_name
gdk_x11_get_xatom_by_name_for_display
gdk_x11_get_xatom_name
gdk_x11_get_xatom_name_for_display
gdk_x11_set_sm_client_id
gdk_x11_display_text_property_to_text_list
gdk_x11_free_text_list
gdk_x11_display_string_to_compound_text
gdk_x11_display_utf8_to_compound_text
gdk_x11_free_compound_text
<SUBSECTION Private>
GDK_HAVE_WCHAR_H
GDK_HAVE_WCTYPE_H
gdk_x11_window_get_drawable_impl
gdk_x11_app_launch_context_get_type
gdk_x11_cursor_get_type
gdk_x11_device_core_get_type
gdk_x11_device_manager_core_get_type
gdk_x11_device_manager_xi2_get_type
gdk_x11_device_manager_xi_get_type
gdk_x11_device_xi2_get_type
gdk_x11_device_xi_get_type
gdk_x11_display_get_type
gdk_x11_display_manager_get_type
gdk_x11_drag_context_get_type
gdk_x11_keymap_get_type
gdk_x11_screen_get_type
gdk_x11_visual_get_type
gdk_x11_window_get_type
gdk_window_impl_x11_get_type
</SECTION>
<SECTION>
@@ -1050,7 +1028,6 @@ GDK_IS_APP_LAUNCH_CONTEXT
GDK_IS_APP_LAUNCH_CONTEXT_CLASS
GDK_TYPE_APP_LAUNCH_CONTEXT
GdkAppLaunchContextClass
GdkAppLaunchContextPrivate
<SUBSECTION Private>
gdk_app_launch_context_get_type
</SECTION>
+9 -6
View File
@@ -1,10 +1,13 @@
#include <gdk/gdk.h>
gdk_display_get_type
gdk_display_manager_get_type
gdk_screen_get_type
gdk_drawable_get_type
gdk_window_object_get_type
gdk_keymap_get_type
gdk_app_launch_context_get_type
gdk_cursor_get_type
gdk_device_get_type
gdk_device_manager_get_type
gdk_display_get_type
gdk_display_manager_get_type
gdk_drag_context_get_type
gdk_keymap_get_type
gdk_screen_get_type
gdk_visual_get_type
gdk_window_get_type
+32 -3
View File
@@ -22,6 +22,8 @@ CFILE_GLOB=$(top_srcdir)/gtk/*.c
# Header files to ignore when scanning
IGNORE_HFILES= \
fnmatch.h \
gtk9slice.h \
gtkanimationdescription.h \
gtkdebug.h \
gtkbuilderprivate.h \
gtkdndcursors.h \
@@ -77,6 +79,7 @@ IGNORE_HFILES= \
gtktexttagprivate.h \
gtktexttypes.h \
gtktextutil.h \
gtktimeline.h \
gtkthemes.h \
gtktrayicon.h \
gtktreedatalist.h \
@@ -104,8 +107,8 @@ CPPFLAGS += \
-UGTK_DISABLE_SINGLE_INCLUDES
GTKDOC_LIBS = \
$(top_builddir)/gdk/$(gdktargetlib) \
$(top_builddir)/gtk/$(gtktargetlib)
$(top_builddir)/gtk/libgtk-3.0.la \
$(GTK_DEP_LIBS)
# Extra options to supply to gtkdoc-mkdb
@@ -122,6 +125,7 @@ content_files = \
migrating-2to3.xml \
migrating-checklist.sgml \
migrating-GtkApplication.xml \
migrating-GtkStyleContext.xml \
objects_grouped.sgml \
osx.sgml \
question_index.sgml \
@@ -144,6 +148,7 @@ expand_content_files = \
migrating-2to3.xml \
migrating-checklist.sgml \
migrating-GtkApplication.xml \
migrating-GtkStyleContext.xml \
question_index.sgml \
text_widget.sgml \
tree_widget.sgml
@@ -323,7 +328,31 @@ HTML_IMAGES = \
$(srcdir)/images/layout-tbrl.png \
$(srcdir)/images/window-default.png \
$(srcdir)/images/hello-world.png \
$(srcdir)/images/switch.png
$(srcdir)/images/switch.png \
$(srcdir)/images/linear.png \
$(srcdir)/images/ease.png \
$(srcdir)/images/ease-in-out.png \
$(srcdir)/images/ease-in.png \
$(srcdir)/images/ease-out.png \
$(srcdir)/images/gradient1.png \
$(srcdir)/images/gradient2.png \
$(srcdir)/images/gradient3.png \
$(srcdir)/images/gradient4.png \
$(srcdir)/images/border1.png \
$(srcdir)/images/border2.png \
$(srcdir)/images/border3.png \
$(srcdir)/images/slices.png \
$(srcdir)/images/checks.png \
$(srcdir)/images/options.png \
$(srcdir)/images/arrows.png \
$(srcdir)/images/expanders.png \
$(srcdir)/images/background.png \
$(srcdir)/images/frames.png \
$(srcdir)/images/frame-gap.png \
$(srcdir)/images/sliders.png \
$(srcdir)/images/focus.png \
$(srcdir)/images/handles.png \
$(srcdir)/images/extensions.png
# Extra options to supply to gtkdoc-fixref
FIXXREF_OPTIONS=--extra-dir=../gdk/html \
+1 -1
View File
@@ -32,7 +32,7 @@ your system may be different):
$ pkg-config --cflags gtk+-3.0
-pthread -I/usr/include/gtk-3.0 -I/usr/lib64/gtk-3.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12
$ pkg-config --libs gtk+-3.0
-pthread -lgtk-x11-3.0 -lgdk-x11-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
-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>
+30 -4
View File
@@ -3,6 +3,8 @@
"http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
<!ENTITY % local.common.attrib "xmlns:xi CDATA #FIXED 'http://www.w3.org/2003/XInclude'">
<!ENTITY version SYSTEM "version.xml">
<!ENTITY pi "&#960;">
<!ENTITY solidus "&#8260;">
]>
<book id="index" xmlns:xi="http://www.w3.org/2003/XInclude">
<bookinfo>
@@ -38,19 +40,31 @@
<xi:include href="xml/gtkaccelmap.xml" />
<xi:include href="xml/gtkclipboard.xml" />
<xi:include href="xml/gtkdnd.xml" />
<xi:include href="xml/gtkicontheme.xml" />
<xi:include href="xml/gtkstock.xml" />
<xi:include href="xml/gtkiconfactory.xml" />
<xi:include href="xml/gtkrc.xml" />
<xi:include href="xml/gtksettings.xml" />
<xi:include href="xml/gtkbindings.xml" />
<xi:include href="xml/gtkenums.xml" />
<xi:include href="xml/gtkstyle.xml" />
<xi:include href="xml/gtkselection.xml" />
<xi:include href="xml/gtktesting.xml" />
<xi:include href="xml/filesystem.xml" />
</part>
<part id="theming">
<title>Theming in GTK+</title>
<xi:include href="xml/gtkstylecontext.xml" />
<xi:include href="xml/gtkcssprovider.xml" />
<xi:include href="xml/gtkstyleprovider.xml" />
<xi:include href="xml/gtkstyleproperties.xml" />
<xi:include href="xml/gtkthemingengine.xml" />
<xi:include href="xml/gtkwidgetpath.xml" />
<xi:include href="xml/gtksymboliccolor.xml" />
<xi:include href="xml/gtkgradient.xml" />
<xi:include href="xml/gtkicontheme.xml" />
<xi:include href="xml/gtkiconfactory.xml" />
<xi:include href="xml/gtkrc.xml" />
<xi:include href="xml/gtkstyle.xml" />
</part>
<part id="gtkobjects">
<title>GTK+ Widgets and Objects</title>
@@ -137,6 +151,9 @@
<xi:include href="xml/gtktreemodelsort.xml" />
<xi:include href="xml/gtktreemodelfilter.xml" />
<xi:include href="xml/gtkcelllayout.xml" />
<xi:include href="xml/gtkcellarea.xml" />
<xi:include href="xml/gtkcellareabox.xml" />
<xi:include href="xml/gtkcellareacontext.xml" />
<xi:include href="xml/gtkcellrenderer.xml" />
<xi:include href="xml/gtkcelleditable.xml" />
<xi:include href="xml/gtkcellrendereraccel.xml" />
@@ -297,6 +314,14 @@
<xi:include href="xml/gtkrecentfilter.xml" />
</chapter>
<chapter id="ApplicationChoosing">
<title>Choosing from installed applications</title>
<xi:include href="xml/gtkappchooser.xml" />
<xi:include href="xml/gtkappchooserbutton.xml" />
<xi:include href="xml/gtkappchooserdialog.xml" />
<xi:include href="xml/gtkappchooserwidget.xml" />
</chapter>
<chapter id="Builder">
<title>Interface builder</title>
<xi:include href="xml/gtkbuildable.xml" />
@@ -325,6 +350,7 @@
<xi:include href="xml/migrating-checklist.sgml" />
<xi:include href="xml/migrating-2to3.xml" />
<xi:include href="xml/migrating-GtkApplication.xml" />
<xi:include href="xml/migrating-GtkStyleContext.xml" />
</part>
<part>
+585 -35
View File
@@ -881,6 +881,7 @@ gtk_container_set_resize_mode
gtk_container_check_resize
gtk_container_foreach
gtk_container_get_children
gtk_container_get_path_for_child
gtk_container_set_reallocate_redraws
gtk_container_get_focus_child
gtk_container_set_focus_child
@@ -993,9 +994,6 @@ gtk_editable_get_editable
GTK_EDITABLE
GTK_IS_EDITABLE
GTK_TYPE_EDITABLE
GTK_EDITABLE_CLASS
GTK_IS_EDITABLE_CLASS
GTK_EDITABLE_GET_CLASS
GTK_EDITABLE_GET_IFACE
<SUBSECTION Private>
gtk_editable_get_type
@@ -1118,6 +1116,7 @@ gtk_entry_buffer_get_type
GtkEntryCompletion
GtkEntryCompletionMatchFunc
gtk_entry_completion_new
gtk_entry_completion_new_with_area
gtk_entry_completion_get_entry
gtk_entry_completion_set_model
gtk_entry_completion_get_model
@@ -1735,9 +1734,7 @@ GTK_IMAGE_GET_CLASS
GtkImagePrivate
gtk_image_get_type
GtkImageIconSetData
GtkImageImageData
GtkImagePixbufData
GtkImagePixmapData
GtkImageStockData
GtkImageAnimationData
GtkImageIconNameData
@@ -2119,6 +2116,8 @@ gtk_menu_shell_activate_item
gtk_menu_shell_cancel
gtk_menu_shell_set_take_focus
gtk_menu_shell_get_take_focus
gtk_menu_shell_get_selected_item
gtk_menu_shell_get_parent_shell
GtkMenuDirectionType
<SUBSECTION Standard>
GTK_MENU_SHELL
@@ -2481,8 +2480,6 @@ GTK_RANGE_GET_CLASS
<SUBSECTION Private>
gtk_range_get_type
GtkRangePrivate
GtkRangeLayout
GtkRangeStepTimer
</SECTION>
<SECTION>
@@ -2771,13 +2768,11 @@ gtk_scrollable_set_vscroll_policy
<SUBSECTION Standard>
GtkScrollableIface
GTK_IS_SCROLLABLE
GTK_IS_SCROLLABLE_CLASS
GTK_SCROLLABLE
GTK_SCROLLABLE_CLASS
GTK_SCROLLABLE_GET_IFACE
GtkScrollableInterface
GTK_TYPE_SCROLLABLE
GTK_SCROLLABLE
GTK_IS_SCROLLABLE
GTK_SCROLLABLE_GET_IFACE
<SUBSECTION Private>
gtk_scrollable_get_type
@@ -3000,7 +2995,7 @@ GTK_SPINNER
GTK_IS_SPINNER
GTK_TYPE_SPINNER
GTK_SPINNER_CLASS
GTK_IS_SPINER_CLASS
GTK_IS_SPINNER_CLASS
GTK_SPINNER_GET_CLASS
GTK_IS_SPINNER_CLASS
@@ -3226,7 +3221,6 @@ GTK_TEXT_BUFFER_GET_CLASS
<SUBSECTION Private>
GtkTextBufferPrivate
gtk_text_buffer_get_type
GtkTextLogAttrCache
</SECTION>
<SECTION>
@@ -3495,8 +3489,6 @@ GtkTextViewPrivate
gtk_text_view_get_type
gtk_text_child_anchor_get_type
GtkTextBTree
GtkTextWindow
GtkTextPendingScroll
</SECTION>
<SECTION>
@@ -4144,6 +4136,7 @@ GtkTreeViewColumnSizing
GtkTreeCellDataFunc
GtkTreeViewColumn
gtk_tree_view_column_new
gtk_tree_view_column_new_with_area
gtk_tree_view_column_new_with_attributes
gtk_tree_view_column_pack_start
gtk_tree_view_column_pack_end
@@ -4363,6 +4356,7 @@ GtkCellLayoutIface
GtkCellLayoutDataFunc
gtk_cell_layout_pack_start
gtk_cell_layout_pack_end
gtk_cell_layout_get_area
gtk_cell_layout_get_cells
gtk_cell_layout_reorder
gtk_cell_layout_clear
@@ -4379,6 +4373,120 @@ GTK_CELL_LAYOUT_GET_IFACE
gtk_cell_layout_get_type
</SECTION>
<SECTION>
<FILE>gtkcellarea</FILE>
<TITLE>GtkCellArea</TITLE>
GtkCellArea
GtkCellAreaClass
GtkCellCallback
GtkCellAllocCallback
GTK_CELL_AREA_WARN_INVALID_CELL_PROPERTY_ID
gtk_cell_area_add
gtk_cell_area_remove
gtk_cell_area_has_renderer
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
gtk_cell_area_copy_context
gtk_cell_area_get_request_mode
gtk_cell_area_get_preferred_width
gtk_cell_area_get_preferred_height_for_width
gtk_cell_area_get_preferred_height
gtk_cell_area_get_preferred_width_for_height
gtk_cell_area_get_current_path_string
gtk_cell_area_apply_attributes
gtk_cell_area_attribute_connect
gtk_cell_area_attribute_disconnect
gtk_cell_area_class_install_cell_property
gtk_cell_area_class_find_cell_property
gtk_cell_area_class_list_cell_properties
gtk_cell_area_add_with_properties
gtk_cell_area_cell_set
gtk_cell_area_cell_get
gtk_cell_area_cell_set_valist
gtk_cell_area_cell_get_valist
gtk_cell_area_cell_set_property
gtk_cell_area_cell_get_property
gtk_cell_area_is_activatable
gtk_cell_area_activate
gtk_cell_area_focus
gtk_cell_area_set_focus_cell
gtk_cell_area_get_focus_cell
gtk_cell_area_add_focus_sibling
gtk_cell_area_remove_focus_sibling
gtk_cell_area_is_focus_sibling
gtk_cell_area_get_focus_siblings
gtk_cell_area_get_focus_from_sibling
gtk_cell_area_get_edited_cell
gtk_cell_area_get_edit_widget
gtk_cell_area_activate_cell
gtk_cell_area_stop_editing
gtk_cell_area_inner_cell_area
gtk_cell_area_request_renderer
<SUBSECTION Standard>
GTK_CELL_AREA
GTK_IS_CELL_AREA
GTK_TYPE_CELL_AREA
gtk_cell_area_get_type
GTK_CELL_AREA_CLASS
GTK_IS_CELL_AREA_CLASS
GTK_CELL_AREA_GET_CLASS
GtkCellAreaPrivate
</SECTION>
<SECTION>
<FILE>gtkcellareacontext</FILE>
<TITLE>GtkCellAreaContext</TITLE>
GtkCellAreaContextClass
GtkCellAreaContext
gtk_cell_area_context_get_area
gtk_cell_area_context_allocate
gtk_cell_area_context_reset
gtk_cell_area_context_get_preferred_width
gtk_cell_area_context_get_preferred_height
gtk_cell_area_context_get_preferred_height_for_width
gtk_cell_area_context_get_preferred_width_for_height
gtk_cell_area_context_get_allocation
gtk_cell_area_context_push_preferred_width
gtk_cell_area_context_push_preferred_height
<SUBSECTION Standard>
GTK_CELL_AREA_CONTEXT
GTK_IS_CELL_AREA_CONTEXT
GTK_TYPE_CELL_AREA_CONTEXT
gtk_cell_area_context_get_type
GTK_CELL_AREA_CONTEXT_CLASS
GTK_IS_CELL_AREA_CONTEXT_CLASS
GTK_CELL_AREA_CONTEXT_GET_CLASS
GtkCellAreaContextPrivate
</SECTION>
<SECTION>
<FILE>gtkcellareabox</FILE>
<TITLE>GtkCellAreaBox</TITLE>
GtkCellAreaBox
GtkCellAreaBoxClass
gtk_cell_area_box_new
gtk_cell_area_box_pack_start
gtk_cell_area_box_pack_end
gtk_cell_area_box_get_spacing
gtk_cell_area_box_set_spacing
<SUBSECTION Standard>
GTK_CELL_AREA_BOX
GTK_IS_CELL_AREA_BOX
GTK_TYPE_CELL_AREA_BOX
gtk_cell_area_box_get_type
GTK_CELL_AREA_BOX_CLASS
GTK_IS_CELL_AREA_BOX_CLASS
GTK_CELL_AREA_BOX_GET_CLASS
GtkCellAreaBoxPrivate
</SECTION>
<SECTION>
<FILE>gtkcellrenderer</FILE>
<TITLE>GtkCellRenderer</TITLE>
@@ -4386,6 +4494,7 @@ GtkCellRendererState
GtkCellRendererMode
GtkCellRenderer
GtkCellRendererClass
gtk_cell_renderer_get_aligned_area
gtk_cell_renderer_get_size
gtk_cell_renderer_render
gtk_cell_renderer_activate
@@ -4401,6 +4510,7 @@ gtk_cell_renderer_get_alignment
gtk_cell_renderer_set_alignment
gtk_cell_renderer_get_padding
gtk_cell_renderer_set_padding
gtk_cell_renderer_is_activatable
<SUBSECTION Width-for-height>
gtk_cell_renderer_get_preferred_height
@@ -4817,8 +4927,6 @@ gtk_widget_get_parent_window
gtk_widget_set_events
gtk_widget_get_events
gtk_widget_add_events
gtk_widget_set_extension_events
gtk_widget_get_extension_events
gtk_widget_set_device_events
gtk_widget_get_device_events
gtk_widget_add_device_events
@@ -4845,6 +4953,11 @@ gtk_widget_input_shape_combine_region
gtk_widget_path
gtk_widget_class_path
gtk_widget_get_composite_name
gtk_widget_override_background_color
gtk_widget_override_color
gtk_widget_override_font
gtk_widget_override_symbolic_color
gtk_widget_override_cursor
gtk_widget_modify_style
gtk_widget_get_modifier_style
gtk_widget_modify_fg
@@ -4853,16 +4966,15 @@ gtk_widget_modify_text
gtk_widget_modify_base
gtk_widget_modify_font
gtk_widget_modify_cursor
gtk_widget_modify_symbolic_color
gtk_widget_create_pango_context
gtk_widget_get_pango_context
gtk_widget_create_pango_layout
gtk_widget_render_icon
gtk_widget_render_icon_pixbuf
gtk_widget_pop_composite_child
gtk_widget_push_composite_child
gtk_widget_queue_draw_area
gtk_widget_queue_draw_region
gtk_widget_reset_shapes
gtk_widget_set_app_paintable
gtk_widget_set_double_buffered
gtk_widget_set_redraw_on_allocate
@@ -4932,6 +5044,9 @@ gtk_widget_is_sensitive
gtk_widget_get_state
gtk_widget_get_visible
gtk_widget_set_visible
gtk_widget_set_state_flags
gtk_widget_unset_state_flags
gtk_widget_get_state_flags
gtk_widget_has_default
gtk_widget_has_focus
gtk_widget_has_grab
@@ -4950,6 +5065,11 @@ gtk_widget_get_mapped
gtk_widget_get_requisition
gtk_widget_device_is_shadowed
<SUBSECTION>
gtk_widget_get_path
gtk_widget_get_style_context
gtk_widget_reset_style
<SUBSECTION>
gtk_requisition_new
gtk_requisition_copy
@@ -5059,8 +5179,6 @@ gtk_window_begin_resize_drag
gtk_window_begin_move_drag
gtk_window_set_decorated
gtk_window_set_deletable
gtk_window_set_frame_dimensions
gtk_window_set_has_frame
gtk_window_set_mnemonic_modifier
gtk_window_set_type_hint
gtk_window_set_skip_taskbar_hint
@@ -5076,8 +5194,6 @@ gtk_window_get_default_icon_list
gtk_window_get_default_icon_name
gtk_window_get_default_size
gtk_window_get_destroy_with_parent
gtk_window_get_frame_dimensions
gtk_window_get_has_frame
gtk_window_get_icon
gtk_window_get_icon_list
gtk_window_get_icon_name
@@ -5164,7 +5280,6 @@ gtk_window_group_get_type
<SECTION>
<FILE>gtkmain</FILE>
<TITLE>General</TITLE>
gtk_set_locale
gtk_disable_setlocale
gtk_get_default_language
gtk_parse_args
@@ -5246,6 +5361,327 @@ GTK_INTERFACE_AGE
GTK_CHECK_VERSION
</SECTION>
<SECTION>
<FILE>gtkwidgetpath</FILE>
<TITLE>GtkWidgetPath</TITLE>
GtkWidgetPath
gtk_widget_path_append_type
gtk_widget_path_copy
gtk_widget_path_free
gtk_widget_path_get_object_type
gtk_widget_path_has_parent
gtk_widget_path_is_type
gtk_widget_path_iter_add_class
gtk_widget_path_iter_add_region
gtk_widget_path_iter_clear_classes
gtk_widget_path_iter_clear_regions
gtk_widget_path_iter_get_name
gtk_widget_path_iter_get_object_type
gtk_widget_path_iter_has_class
gtk_widget_path_iter_has_name
gtk_widget_path_iter_has_qclass
gtk_widget_path_iter_has_qname
gtk_widget_path_iter_has_qregion
gtk_widget_path_iter_has_region
gtk_widget_path_iter_list_classes
gtk_widget_path_iter_list_regions
gtk_widget_path_iter_remove_class
gtk_widget_path_iter_remove_region
gtk_widget_path_iter_set_name
gtk_widget_path_iter_set_object_type
gtk_widget_path_length
gtk_widget_path_new
gtk_widget_path_prepend_type
<SUBSECTION Standard>
GTK_TYPE_WIDGET_PATH
<SUBSECTION Private>
gtk_widget_path_get_type
</SECTION>
<SECTION>
<FILE>gtkstyleprovider</FILE>
<TITLE>GtkStyleProvider</TITLE>
GtkStyleProviderIface
GtkStyleProvider
GTK_STYLE_PROVIDER_PRIORITY_FALLBACK
GTK_STYLE_PROVIDER_PRIORITY_THEME
GTK_STYLE_PROVIDER_PRIORITY_SETTINGS
GTK_STYLE_PROVIDER_PRIORITY_APPLICATION
GTK_STYLE_PROVIDER_PRIORITY_USER
gtk_style_provider_get_icon_factory
gtk_style_provider_get_style
gtk_style_provider_get_style_property
<SUBSECTION Standard>
GTK_TYPE_STYLE_PROVIDER
GTK_STYLE_PROVIDER
GTK_IS_STYLE_PROVIDER
GTK_STYLE_PROVIDER_GET_IFACE
<SUBSECTION Private>
gtk_style_provider_get_type
</SECTION>
<SECTION>
<FILE>gtkstyleproperties</FILE>
<TITLE>GtkStyleProperties</TITLE>
GtkStyleProperties
gtk_style_properties_clear
gtk_style_properties_get
gtk_style_properties_get_property
gtk_style_properties_get_valist
gtk_style_properties_lookup_color
gtk_style_properties_lookup_property
gtk_style_properties_map_color
gtk_style_properties_merge
gtk_style_properties_new
GtkStylePropertyParser
gtk_style_properties_register_property
gtk_style_properties_set
gtk_style_properties_set_property
gtk_style_properties_set_valist
gtk_style_properties_unset_property
<SUBSECTION Standard>
GTK_TYPE_STYLE_PROPERTIES
GTK_IS_STYLE_PROPERTIES
GTK_IS_STYLE_PROPERTIES_CLASS
GTK_STYLE_PROPERTIES
GTK_STYLE_PROPERTIES_CLASS
GTK_STYLE_PROPERTIES_GET_CLASS
<SUBSECTION Private>
gtk_style_properties_get_type
</SECTION>
<SECTION>
<FILE>gtkstylecontext</FILE>
<TITLE>GtkStyleContext</TITLE>
<SUBSECTION>
GTK_STYLE_PROPERTY_BACKGROUND_COLOR
GTK_STYLE_PROPERTY_COLOR
GTK_STYLE_PROPERTY_FONT
GTK_STYLE_PROPERTY_MARGIN
GTK_STYLE_PROPERTY_PADDING
GTK_STYLE_PROPERTY_BORDER_WIDTH
GTK_STYLE_PROPERTY_BORDER_RADIUS
GTK_STYLE_PROPERTY_BORDER_STYLE
GTK_STYLE_PROPERTY_BORDER_COLOR
GTK_STYLE_PROPERTY_BACKGROUND_IMAGE
<SUBSECTION>
GTK_STYLE_CLASS_BACKGROUND
GTK_STYLE_CLASS_BUTTON
GTK_STYLE_CLASS_CALENDAR
GTK_STYLE_CLASS_CELL
GTK_STYLE_CLASS_CHECK
GTK_STYLE_CLASS_DEFAULT
GTK_STYLE_CLASS_ENTRY
GTK_STYLE_CLASS_HEADER
GTK_STYLE_CLASS_MENU
GTK_STYLE_CLASS_RADIO
GTK_STYLE_CLASS_RUBBERBAND
GTK_STYLE_CLASS_SCROLLBAR
GTK_STYLE_CLASS_SLIDER
GTK_STYLE_CLASS_TOOLTIP
GTK_STYLE_CLASS_TROUGH
GTK_STYLE_CLASS_ACCELERATOR
GTK_STYLE_CLASS_DOCK
GTK_STYLE_CLASS_GRIP
GTK_STYLE_CLASS_MENUBAR
GTK_STYLE_CLASS_MENUITEM
GTK_STYLE_CLASS_PROGRESSBAR
GTK_STYLE_CLASS_SPINNER
GTK_STYLE_CLASS_TOOLBAR
GTK_STYLE_REGION_COLUMN
GTK_STYLE_REGION_COLUMN_HEADER
GTK_STYLE_REGION_ROW
GTK_STYLE_REGION_TAB
<SUBSECTION>
GtkStyleContext
gtk_style_context_new
gtk_style_context_add_provider
gtk_style_context_add_provider_for_screen
gtk_style_context_get
gtk_style_context_get_direction
gtk_style_context_get_junction_sides
gtk_style_context_get_path
gtk_style_context_get_property
gtk_style_context_get_screen
gtk_style_context_get_state
gtk_style_context_get_style
gtk_style_context_get_style_property
gtk_style_context_get_style_valist
gtk_style_context_get_valist
gtk_style_context_get_color
gtk_style_context_get_background_color
gtk_style_context_get_border_color
gtk_style_context_get_border
gtk_style_context_get_padding
gtk_style_context_get_margin
gtk_style_context_get_font
gtk_style_context_invalidate
gtk_style_context_state_is_running
gtk_style_context_lookup_color
gtk_style_context_lookup_icon_set
gtk_style_context_notify_state_change
gtk_style_context_pop_animatable_region
gtk_style_context_push_animatable_region
gtk_style_context_remove_provider
gtk_style_context_remove_provider_for_screen
gtk_style_context_reset_widgets
gtk_style_context_set_background
gtk_style_context_restore
gtk_style_context_save
gtk_style_context_set_direction
gtk_style_context_set_junction_sides
gtk_style_context_set_path
gtk_style_context_add_class
gtk_style_context_remove_class
gtk_style_context_has_class
gtk_style_context_list_classes
gtk_style_context_add_region
gtk_style_context_remove_region
gtk_style_context_has_region
gtk_style_context_list_regions
gtk_style_context_set_screen
gtk_style_context_set_state
<SUBSECTION>
GtkBorder
gtk_border_new
gtk_border_copy
gtk_border_free
<SUBSECTION>
gtk_render_arrow
gtk_render_background
gtk_render_check
gtk_render_expander
gtk_render_extension
gtk_render_focus
gtk_render_frame
gtk_render_frame_gap
gtk_render_handle
gtk_render_layout
gtk_render_line
gtk_render_option
gtk_render_slider
gtk_render_activity
gtk_render_icon_pixbuf
<SUBSECTION Standard>
GTK_TYPE_STYLE_CONTEXT
GTK_STYLE_CONTEXT
GTK_STYLE_CONTEXT_CLASS
GTK_STYLE_CONTEXT_GET_CLASS
GTK_IS_STYLE_CONTEXT
GTK_IS_STYLE_CONTEXT_CLASS
GTK_TYPE_BORDER
<SUBSECTION Private>
gtk_style_context_get_type
gtk_border_get_type
</SECTION>
<SECTION>
<FILE>gtkcssprovider</FILE>
<TITLE>GtkCssProvider</TITLE>
GtkCssProvider
gtk_css_provider_get_default
gtk_css_provider_get_named
gtk_css_provider_load_from_data
gtk_css_provider_load_from_file
gtk_css_provider_load_from_path
gtk_css_provider_new
GTK_CSS_PROVIDER_ERROR
GtkCssProviderError
<SUBSECTION Standard>
GTK_TYPE_CSS_PROVIDER
GTK_CSS_PROVIDER
GTK_CSS_PROVIDER_CLASS
GTK_CSS_PROVIDER_GET_CLASS
GTK_IS_CSS_PROVIDER
GTK_IS_CSS_PROVIDER_CLASS
<SUBSECTION Private>
gtk_css_provider_get_type
gtk_css_provider_error_quark
</SECTION>
<SECTION>
<FILE>gtkthemingengine</FILE>
<TITLE>GtkThemingEngine</TITLE>
GtkThemingEngineClass
GtkThemingEngine
gtk_theming_engine_get
gtk_theming_engine_get_direction
gtk_theming_engine_get_junction_sides
gtk_theming_engine_get_path
gtk_theming_engine_get_property
gtk_theming_engine_get_screen
gtk_theming_engine_get_state
gtk_theming_engine_get_style
gtk_theming_engine_get_style_property
gtk_theming_engine_get_style_valist
gtk_theming_engine_get_valist
gtk_theming_engine_get_color
gtk_theming_engine_get_background_color
gtk_theming_engine_get_border_color
gtk_theming_engine_get_border
gtk_theming_engine_get_padding
gtk_theming_engine_get_margin
gtk_theming_engine_get_font
gtk_theming_engine_has_class
gtk_theming_engine_has_region
gtk_theming_engine_lookup_color
gtk_theming_engine_state_is_running
gtk_theming_engine_load
gtk_theming_engine_register_property
<SUBSECTION Standard>
GTK_THEMING_ENGINE
GTK_THEMING_ENGINE_CLASS
GTK_THEMING_ENGINE_GET_CLASS
GTK_IS_THEMING_ENGINE
GTK_IS_THEMING_ENGINE_CLASS
<SUBSECTION Private>
GTK_TYPE_THEMING_ENGINE
gtk_theming_engine_get_type
</SECTION>
<SECTION>
<FILE>gtksymboliccolor</FILE>
<TITLE>GtkSymbolicColor</TITLE>
GtkSymbolicColor
gtk_symbolic_color_new_literal
gtk_symbolic_color_new_name
gtk_symbolic_color_new_shade
gtk_symbolic_color_new_alpha
gtk_symbolic_color_new_mix
gtk_symbolic_color_ref
gtk_symbolic_color_unref
gtk_symbolic_color_resolve
<SUBSECTION Standard>
GTK_TYPE_SYMBOLIC_COLOR
<SUBSECTION Private>
gtk_symbolic_color_get_type
</SECTION>
<SECTION>
<FILE>gtkgradient</FILE>
<TITLE>GtkGradient</TITLE>
GtkGradient
gtk_gradient_new_linear
gtk_gradient_new_radial
gtk_gradient_add_color_stop
gtk_gradient_ref
gtk_gradient_unref
gtk_gradient_resolve
<SUBSECTION Standard>
GTK_TYPE_GRADIENT
gtk_gradient_get_type
</SECTION>
<SECTION>
<FILE>gtkstyle</FILE>
<TITLE>GtkStyle</TITLE>
@@ -5285,12 +5721,6 @@ gtk_paint_layout
gtk_paint_resize_grip
gtk_draw_insertion_cursor
<SUBSECTION>
GtkBorder
gtk_border_new
gtk_border_copy
gtk_border_free
<SUBSECTION>
GtkRcProperty
GtkRcPropertyParser
@@ -5303,10 +5733,8 @@ GTK_TYPE_STYLE
GTK_STYLE_CLASS
GTK_IS_STYLE_CLASS
GTK_STYLE_GET_CLASS
GTK_TYPE_BORDER
<SUBSECTION Private>
gtk_style_get_type
gtk_border_get_type
GtkThemeEngine
</SECTION>
@@ -5556,12 +5984,16 @@ GtkScrollType
GtkSelectionMode
GtkShadowType
GtkStateType
GtkStateFlags
GtkToolbarStyle
GtkUpdateType
GtkWindowPosition
GtkWindowType
GtkSortType
GtkDragResult
GtkJunctionSides
GtkBorderStyle
GtkRegionFlags
<SUBSECTION Private>
GTK_PATH_PRIO_MASK
@@ -5723,6 +6155,7 @@ gtk_icon_info_get_builtin_pixbuf
gtk_icon_info_load_icon
gtk_icon_info_load_symbolic
gtk_icon_info_load_symbolic_for_style
gtk_icon_info_load_symbolic_for_context
gtk_icon_info_set_raw_coordinates
gtk_icon_info_get_embedded_rect
gtk_icon_info_get_attach_points
@@ -5764,6 +6197,7 @@ gtk_icon_set_new
gtk_icon_set_new_from_pixbuf
gtk_icon_set_ref
gtk_icon_set_render_icon
gtk_icon_set_render_icon_pixbuf
gtk_icon_set_unref
gtk_icon_size_lookup
gtk_icon_size_lookup_for_settings
@@ -6231,6 +6665,26 @@ gtk_print_job_get_surface
gtk_print_job_send
gtk_print_job_set_track_print_status
gtk_print_job_get_track_print_status
gtk_print_job_get_pages
gtk_print_job_set_pages
gtk_print_job_get_page_ranges
gtk_print_job_set_page_ranges
gtk_print_job_get_page_set
gtk_print_job_set_page_set
gtk_print_job_get_num_copies
gtk_print_job_set_num_copies
gtk_print_job_get_scale
gtk_print_job_set_scale
gtk_print_job_get_n_up
gtk_print_job_set_n_up
gtk_print_job_get_n_up_layout
gtk_print_job_set_n_up_layout
gtk_print_job_get_rotate
gtk_print_job_set_rotate
gtk_print_job_get_collate
gtk_print_job_set_collate
gtk_print_job_get_reverse
gtk_print_job_set_reverse
<SUBSECTION Standard>
GTK_TYPE_PRINT_JOB
@@ -6410,3 +6864,99 @@ GTK_SWITCH_GET_CLASS
GtkSwitchPrivate
gtk_switch_get_type
</SECTION>
<SECTION>
<FILE>gtkappchooser</FILE>
<TITLE>GtkAppChooser</TITLE>
GtkAppChooser
gtk_app_chooser_get_app_info
gtk_app_chooser_get_content_type
gtk_app_chooser_refresh
<SUBSECTION Standard>
GTK_TYPE_APP_CHOOSER
GTK_APP_CHOOSER
GTK_IS_APP_CHOOSER
<SUBSECTION Private>
gtk_app_chooser_get_type
</SECTION>
<SECTION>
<FILE>gtkappchooserbutton</FILE>
<TITLE>GtkAppChooserButton</TITLE>
GtkAppChooserButton
gtk_app_chooser_button_new
gtk_app_chooser_button_append_custom_item
gtk_app_chooser_button_append_separator
gtk_app_chooser_button_set_active_custom_item
gtk_app_chooser_button_get_show_dialog_item
gtk_app_chooser_button_set_show_dialog_item
<SUBSECTION Standard>
GtkAppChooserButtonClass
GTK_TYPE_APP_CHOOSER_BUTTON
GTK_APP_CHOOSER_BUTTON
GTK_APP_CHOOSER_BUTTON_CLASS
GTK_IS_APP_CHOOSER_BUTTON
GTK_IS_APP_CHOOSER_BUTTON_CLASS
GTK_APP_CHOOSER_BUTTON_GET_CLASS
<SUBSECTION Private>
GtkAppChooserButtonPrivate
gtk_app_chooser_button_get_type
</SECTION>
<SECTION>
<FILE>gtkappchooserdialog</FILE>
<TITLE>GtkAppChooserDialog</TITLE>
GtkAppChooserDialog
gtk_app_chooser_dialog_new
gtk_app_chooser_dialog_new_for_content_type
gtk_app_chooser_dialog_get_widget
<SUBSECTION Standard>
GtkAppChooserDialogClass
GTK_TYPE_APP_CHOOSER_DIALOG
GTK_APP_CHOOSER_DIALOG
GTK_APP_CHOOSER_DIALOG_CLASS
GTK_IS_APP_CHOOSER_DIALOG
GTK_IS_APP_CHOOSER_DIALOG_CLASS
GTK_APP_CHOOSER_DIALOG_GET_CLASS
<SUBSECTION Private>
GtkAppChooserDialogPrivate
gtk_app_chooser_dialog_get_type
</SECTION>
<SECTION>
<FILE>gtkappchooserwidget</FILE>
<TITLE>GtkAppChooserWidget</TITLE>
GtkAppChooserWidget
gtk_app_chooser_widget_new
gtk_app_chooser_widget_set_show_default
gtk_app_chooser_widget_get_show_default
gtk_app_chooser_widget_set_show_recommended
gtk_app_chooser_widget_get_show_recommended
gtk_app_chooser_widget_set_show_fallback
gtk_app_chooser_widget_get_show_fallback
gtk_app_chooser_widget_set_show_other
gtk_app_chooser_widget_get_show_other
gtk_app_chooser_widget_set_show_all
gtk_app_chooser_widget_get_show_all
gtk_app_chooser_widget_set_default_text
gtk_app_chooser_widget_get_default_text
<SUBSECTION Standard>
GtkAppChooserWidgetClass
GTK_TYPE_APP_CHOOSER_WIDGET
GTK_APP_CHOOSER_WIDGET
GTK_APP_CHOOSER_WIDGET_CLASS
GTK_IS_APP_CHOOSER_WIDGET
GTK_IS_APP_CHOOSER_WIDGET_CLASS
GTK_APP_CHOOSER_WIDGET_GET_CLASS
<SUBSECTION Private>
GtkAppChooserWidgetPrivate
gtk_app_chooser_widget_get_type
</SECTION>
+11
View File
@@ -11,6 +11,10 @@ gtk_action_group_get_type
gtk_activatable_get_type
gtk_adjustment_get_type
gtk_alignment_get_type
gtk_app_chooser_get_type
gtk_app_chooser_button_get_type
gtk_app_chooser_dialog_get_type
gtk_app_chooser_widget_get_type
gtk_application_get_type
gtk_arrow_get_type
gtk_aspect_frame_get_type
@@ -22,6 +26,9 @@ gtk_buildable_get_type
gtk_button_box_get_type
gtk_button_get_type
gtk_calendar_get_type
gtk_cell_area_get_type
gtk_cell_area_box_get_type
gtk_cell_area_context_get_type
gtk_cell_editable_get_type
gtk_cell_layout_get_type
gtk_cell_renderer_accel_get_type
@@ -43,6 +50,7 @@ gtk_color_selection_get_type
gtk_combo_box_get_type
gtk_combo_box_text_get_type
gtk_container_get_type
gtk_css_provider_get_type
gtk_dialog_get_type
gtk_drawing_area_get_type
gtk_editable_get_type
@@ -137,6 +145,8 @@ gtk_statusbar_get_type
gtk_status_icon_get_type
gtk_switch_get_type
gtk_style_get_type
gtk_style_context_get_type
gtk_style_provider_get_type
gtk_table_get_type
gtk_tearoff_menu_item_get_type
gtk_text_buffer_get_type
@@ -146,6 +156,7 @@ gtk_text_mark_get_type
gtk_text_tag_get_type
gtk_text_tag_table_get_type
gtk_text_view_get_type
gtk_theming_engine_get_type
gtk_toggle_action_get_type
gtk_toggle_button_get_type
gtk_toggle_tool_button_get_type
Binary file not shown.

After

Width:  |  Height:  |  Size: 549 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 961 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 529 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 697 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 475 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 371 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 322 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 722 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 397 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 660 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 470 B

+53 -3
View File
@@ -1,6 +1,7 @@
<?xml version="1.0"?>
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
"http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
<!ENTITY % local.common.attrib "xmlns:xi CDATA #FIXED 'http://www.w3.org/2003/XInclude'">
]>
<chapter id="gtk-migrating-2-to-3">
<title>Migrating from GTK+ 2.x to GTK+ 3</title>
@@ -122,6 +123,53 @@
</section>
<section>
<title>Use GIO for launching applications</title>
<para>
The <literal>gdk_spawn</literal> family of functions has been
deprecated in GDK 2.24 and removed from GDK 3. Various replacements
exist; the best replacement depends on the circumstances:
<itemizedlist>
<listitem>If you are opening a document or URI by launching a command
like <literal>firefox http://my-favourite-website.com</literal> or
<literal>gnome-open ghelp:epiphany</literal>, it is best to just use
gtk_show_uri(); as an added benefit, your application will henceforth
respect the users preference for what application to use.</listitem>
<listitem>If you are launching a regular, installed application that
has a desktop file, it is best to use GIOs #GAppInfo with a suitable
launch context.
<informalexample><programlisting>
GAppInfo *info;
GAppLaunchContext *context;
GError *error = NULL;
info = g_desktop_app_info_new ("epiphany.desktop");
context = gdk_display_get_app_launch_context (display);
g_app_info_launch (info, NULL, context, &amp;error);
if (error)
{
g_warning ("Failed to launch epiphany: %s", error-&gt;message);
g_error_free (error);
}
g_object_unref (info);
g_object_unref (context);
</programlisting></informalexample>
</listitem>
<listitem>If you are launching a custom commandline, you can
still use g_app_info_launch() with a GAppInfo that is constructed
with g_app_info_create_from_commandline(), or you can use the
more lowlevel <literal>g_spawn</literal> family of functions
(e.g. g_spawn_command_line_async()), and pass <envar>DISPLAY</envar>
in the environment. gdk_screen_make_display_name() can be
used to find the right value for the <envar>DISPLAY</envar>
environment variable.
</listitem>
</itemizedlist>
</para>
</section>
<section>
<title>Use cairo for drawing</title>
<para>
@@ -134,7 +182,7 @@
them, are gone. This includes the <literal>gdk_draw</literal> family
of functions like gdk_draw_rectangle() and gdk_draw_drawable(). As
#GdkGC is roughly equivalent to #cairo_t and #GdkImage was used for
drawing images to GdkDrawables, which cairo supports automatically,
drawing images to GdkWindows, which cairo supports automatically,
a transition is usually straightforward.
</para>
<para>
@@ -143,7 +191,7 @@
was replaced.
</para>
<example>
<title>Drawing a GdkPixbuf onto a GdkDrawable</title>
<title>Drawing a GdkPixbuf onto a GdkWindow</title>
<para>
Drawing a pixbuf onto a drawable used to be done like this:
<programlisting><![CDATA[
@@ -170,7 +218,7 @@ cairo_destroy (cr);
</para>
</example>
<example>
<title>Drawing a tiled GdkPixmap to a GdkDrawable</title>
<title>Drawing a tiled GdkPixmap to a GdkWindow</title>
<para>
Tiled pixmaps are often used for drawing backgrounds.
Old code looked something like this:
@@ -954,6 +1002,8 @@ gtk_arrow_draw (GtkWidget *widget,
</para>
</section>
<xi:include href="migrating-GtkStyleContext.xml" />
</section>
</chapter>
@@ -13,7 +13,7 @@
longer correct to assume that each window has an associated XID.
Code that makes this assumption can sometimes be fixed by calling
gdk_window_ensure_native() on the windows in question.
Calling gdk_x11_drawable_get_xid() (or GDK_WINDOW_XID()) from the
Calling gdk_x11_window_get_xid() (or GDK_WINDOW_XID()) from the
X11-specific API on a non-native window will explicitly call
gdk_window_ensure_native(), so old code using this will continue to
work. A small gotcha is that the GDK_WINDOW_XID() call is no longer a
@@ -46,15 +46,9 @@
<para>
Problems can also occur when using cairo for drawing. One thing that can
go wrong is clip handling. If you ever need to reset the clip region on
a cairo_t (i.e. use cairo_reset_clip()), you have to to use
gdk_cairo_reset_clip() instead. The reason for this is that the cairo_reset_clip() call will remove the initial clip region that limits your drawing to
the client-side window at hand, so you will end up drawing over stuff
outside the window. You also need to use gdk_cairo_reset_clip() if you
use a cairo_t that was not allocated in a double-buffered expose handler
and keep it in use after window hierarchy changes (resizing, moving,
stacking order changes). The easiest fix for this kind of problem is to
simply create a new cairo context for each expose event.
go wrong is clip handling. You may not use cairo_reset_clip() on a
cairo_t on a cairo context created via gdk_cairo_create() or passed to
the GtkWidget::draw signal.
</para>
<para>
@@ -0,0 +1,659 @@
<?xml version="1.0"?>
<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
"http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
]>
<section id="gtk-migrating-GtkStyleContext">
<title>Theming changes</title>
<para>
In GTK+ 3.0, #GtkStyleContext was added to replace #GtkStyle and
the theming infrastructure available in 2.x. GtkStyleContext is an
object similar in spirit to GtkStyle, as it contains theming information,
although in a more complete and tokenized fashion. There are two aspects
to switching to GtkStyleContext: porting themes and theme engines, and
porting applications, libraries and widgets.
</para>
<section id="gtk-migrating-GtkStyleContext-themes">
<title>Migrating themes</title>
<para>
From GTK+ 3.0 on, theme engines must implement #GtkThemingEngine and be
installed in <filename>$libdir/gtk+-3.0/$GTK_VERSION/theming-engines</filename>,
and the files containing style information must be written in the CSS-like
format that is understood by #GtkCssProvider. For a theme named
"Clearlooks", the CSS file parsed by default is
<filename>$datadir/themes/Clearlooks/gtk-3.0/gtk.css</filename>,
with possible variants such as the dark theme being named
<filename>gtk-dark.css</filename> in the same directory.
</para>
</section>
<section id="gtk-migrating-theme-GtkStyleContext-engines">
<title>Migrating theme engines</title>
<para>
Migrating a #GtkStyle based engine to a #GtkThemingEngine based one
should be straightforward for most of the vfuncs. Besides a cleanup
in the available paint methods and a simplification in the passed
arguments (in favor of #GtkStyleContext containing all the information),
the available render methods resemble those of #GtkStyle quite
evidently. Notable differences include:
</para>
<orderedlist>
<listitem>
All variations of gtk_paint_box(), gtk_paint_flat_box(),
gtk_paint_shadow(), gtk_paint_box_gap() and gtk_paint_shadow_gap()
are replaced by gtk_render_background(), gtk_render_frame() and
gtk_render_frame_gap(). The first function renders frameless
backgrounds and the last two render frames in various forms.
</listitem>
<listitem>
gtk_paint_resize_grip() has been subsumed by gtk_render_handle()
with a #GTK_STYLE_CLASS_GRIP class set in the style context.
</listitem>
<listitem>
gtk_paint_spinner() disappears in favor of gtk_render_activity()
with a #GTK_STYLE_CLASS_SPINNER class set in the style context.
</listitem>
</orderedlist>
<para>
The list of available render methods is:
</para>
<simplelist>
<member>
gtk_render_background(): Renders a widget/area background.
</member>
<member>
gtk_render_frame(): Renders a frame border around the given rectangle.
Usually the detail of the border depends on the theme information,
plus the current widget state.
</member>
<member>
gtk_render_frame_gap(): Renders a frame border with a gap on one side.
</member>
<member>
gtk_render_layout(): Renders a #PangoLayout.
</member>
<member>
gtk_render_handle(): Renders all kind of handles and resize grips,
depending on the style class.
</member>
<member>
gtk_render_check(): Render checkboxes.
</member>
<member>
gtk_render_option(): Render radiobuttons.
</member>
<member>
gtk_render_arrow(): Renders an arrow pointing to a direction.
</member>
<member>
gtk_render_expander(): Renders an expander indicator, such as in
#GtkExpander.
</member>
<member>
gtk_render_focus(): Renders the indication that a widget has the
keyboard focus.
</member>
<member>
gtk_render_line(): Renders a line from one coordinate to another.
</member>
<member>
gtk_render_slider(): Renders a slider, such as in #GtkScale.
</member>
<member>
gtk_render_extension(): Renders an extension that protrudes from
a UI element, such as a notebook tab.
</member>
<member>
gtk_render_activity(): Renders an area displaying activity, be it
a progressbar or a spinner.
</member>
<member>
gtk_render_icon_pixbuf(): Renders an icon into a #GdkPixbuf.
</member>
</simplelist>
<para>
One of the main differences to #GtkStyle-based engines is that the
rendered widget is totally isolated from the theme engine, all style
information is meant to be retrieved from the #GtkThemingEngine API,
or from the #GtkWidgetPath obtained from gtk_theming_engine_get_path(),
which fully represents the rendered widget's hierarchy from a styling
point of view.
</para>
<para>
The detail string available in #GtkStyle-based engines has been
replaced by widget regions and style classes. Regions are a way for
complex widgets to associate different styles with different areas,
such as even and odd rows in a treeview. Style classes allow sharing
of style information between widgets, regardless of their type.
Regions and style classes can be used in style sheets to associate
styles, and them engines can also access them. There are several
predefined classes and regions such as %GTK_STYLE_CLASS_BUTTON or
%GTK_STYLE_REGION_TAB in <filename>gtkstylecontext.h</filename>,
although custom widgets may define their own, which themes may
attempt to handle.
</para>
</section>
<section id="gtk-migrating-GtkStyleContext-parser-extensions">
<title>Extending the CSS parser</title>
<para>
In #GtkStyle-based engines, #GtkRCStyle provided ways to extend the
gtkrc parser with engine-specific extensions. This has been replaced
by gtk_theming_engine_register_property(), which lets a theme engine
register new properties with an arbitrary type. While there is built-in
support for most basic types, it is possible to use a custom parser
for the property.
</para>
<para>
The installed properties depend on the #GtkThemeEngine::name property,
so they should be added in the <literal>constructed()</literal> vfunc.
For example, if an engine with the name "Clearlooks" installs a
"focus-color" property with the type #GdkRGBA, the property
<literal>-Clearlooks-focus-color</literal> will be registered and
accepted in CSS like this:
<informalexample><programlisting>
GtkEntry {
-Clearlooks-focus-color: rgba(255, 0, 0, 1.0);
}
</programlisting></informalexample>
</para>
<para>
Widget style properties also follow a similar syntax, with the widget
type name used as a prefix. For example, the #GtkWidget:focus-line-width
style property can be modified in CSS as
<literal>-GtkWidget-focus-line-width</literal>.
</para>
</section>
<section id="gtk-migrating-GtkStyleContext-css">
<title>Using the CSS file format</title>
<para>
The syntax of RC and CSS files formats is obviously different.
The CSS-like syntax will hopefully be much more familiar to many
people, lowering the barrier for custom theming.
</para>
<para>
Instead of going through the syntax differences one-by-one, we
will present a more or less comprehensive example and discuss
how it can be translated into CSS:
</para>
<example>
<title>Sample RC code</title>
<programlisting>
style "default" {
xthickness = 1
ythickness = 1
GtkButton::child-displacement-x = 1
GtkButton::child-displacement-y = 1
GtkCheckButton::indicator-size = 14
bg[NORMAL] = @bg_color
bg[PRELIGHT] = shade (1.02, @bg_color)
bg[SELECTED] = @selected_bg_color
bg[INSENSITIVE] = @bg_color
bg[ACTIVE] = shade (0.9, @bg_color)
fg[NORMAL] = @fg_color
fg[PRELIGHT] = @fg_color
fg[SELECTED] = @selected_fg_color
fg[INSENSITIVE] = darker (@bg_color)
fg[ACTIVE] = @fg_color
text[NORMAL] = @text_color
text[PRELIGHT] = @text_color
text[SELECTED] = @selected_fg_color
text[INSENSITIVE] = darker (@bg_color)
text[ACTIVE] = @selected_fg_color
base[NORMAL] = @base_color
base[PRELIGHT] = shade (0.95, @bg_color)
base[SELECTED] = @selected_bg_color
base[INSENSITIVE] = @bg_color
base[ACTIVE] = shade (0.9, @selected_bg_color)
engine "clearlooks" {
colorize_scrollbar = TRUE
style = CLASSIC
}
}
style "tooltips" {
xthickness = 4
ythickness = 4
bg[NORMAL] = @tooltip_bg_color
fg[NORMAL] = @tooltip_fg_color
}
style "button" {
xthickness = 3
ythickness = 3
bg[NORMAL] = shade (1.04, @bg_color)
bg[PRELIGHT] = shade (1.06, @bg_color)
bg[ACTIVE] = shade (0.85, @bg_color)
}
style "entry" {
xthickness = 3
ythickness = 3
bg[SELECTED] = mix (0.4, @selected_bg_color, @base_color)
fg[SELECTED] = @text_color
engine "clearlooks" {
focus_color = shade (0.65, @selected_bg_color)
}
}
style "other" {
bg[NORMAL] = &num;fff;
}
class "GtkWidget" style "default"
class "GtkEntry" style "entry"
widget_class "*&lt;GtkButton&gt;" style "button"
widget "gtk-tooltip*" style "tooltips"
widget_class "window-name.*.GtkButton" style "other"
</programlisting>
</example>
<para>
would roughly translate to this CSS:
</para>
<example>
<title>CSS translation</title>
<programlisting>
* {
padding: 1;
-GtkButton-child-displacement-x: 1;
-GtkButton-child-displacement-y: 1;
-GtkCheckButton-indicator-size: 14;
background-color: @bg_color;
color: @fg_color;
-Clearlooks-colorize-scrollbar: true;
-Clearlooks-style: classic;
}
*:hover {
background-color: shade (@bg_color, 1.02);
}
*:selected {
background-color: @selected_bg_color;
color: @selected_fg_color;
}
*:insensitive {
color: shade (@bg_color, 0.7);
}
*:active {
background-color: shade (@bg_color, 0.9);
}
.tooltip {
padding: 4;
background-color: @tooltip_bg_color;
color: @tooltip_fg_color;
}
.button {
padding: 3;
background-color: shade (@bg_color, 1.04);
}
.button:hover {
background-color: shade (@bg_color, 1.06);
}
.button:active {
background-color: shade (@bg_color, 0.85);
}
.entry {
padding: 3;
background-color: @base_color;
color: @text_color;
}
.entry:selected {
background-color: mix (@selected_bg_color, @base_color, 0.4);
-Clearlooks-focus-color: shade (0.65, @selected_bg_color)
}
/* The latter selector is an specification of the first,
since any widget may use the same classes or names */
&num;window-name .button,
GtkWindow&num;window-name GtkButton.button {
background-color: &num;fff;
}
</programlisting>
</example>
<para>
One notable difference is the reduction from fg/bg/text/base colors
to only foreground/background, in exchange the widget is able to render
its various elements with different CSS classes, which can be themed
independently.
</para>
<para>
In the same vein, the light, dark and mid color variants that
were available in GtkStyle should be replaced by a combination of
symbolic colors and custom CSS, where necessary. text_aa should
really not be used anywhere, anyway, and the white and black colors
that were available in GtkStyle can just be replaced by literal
GdkRGBA structs.
</para>
<para>
Access to colors has also changed a bit. With #GtkStyle, the common
way to access colors is:
<informalexample><programlisting>
GdkColor *color1;
GdkColor color2;
color1 = &amp;style->bg[GTK_STATE_PRELIGHT];
gtk_style_lookup_color (style, "focus_color", &amp;color2);
</programlisting></informalexample>
With #GtkStyleContext, you generally use #GdkRGBA instead of #GdkColor
and the code looks like this:
<informalexample><programlisting>
GdkRGBA *color1;
GdkRGBA color2;
gtk_style_context_get (context, GTK_STATE_FLAG_PRELIGHT,
"background-color", &amp;color1,
NULL);
gtk_style_context_lookup_color (context, "focus_color", &amp;color2);
...
gdk_rgba_free (color1);
</programlisting></informalexample>
Note that the memory handling here is different: gtk_style_context_get()
expects the address of a GdkRGBA* and returns a newly allocated struct,
gtk_style_context_lookup_color() expects the address of an existing
struct, and fills it.
</para>
<para>
It is worth mentioning that the new file format does not support
custom keybindings nor stock icon mappings as the RC format did.
</para>
</section>
<section id="gtk-migrating-GtkStyleContext-checklist">
<title>A checklist for widgets</title>
<para>
When porting your widgets to use #GtkStyleContext, this checklist
might be useful.
</para>
<orderedlist>
<listitem>
Replace <literal>style_set()</literal> calls with
<literal>style_updated()</literal>.
</listitem>
<listitem>
<para>
Try to identify the role of what you're rendering with any number
of classes. This will replace the detail string. There is a predefined
set of CSS classes which you can reuse where appropriate. Doing so
will give you theming 'for free', whereas custom classes will require
extra work in the theme. Note that complex widgets are likely to
need different styles when rendering different parts, and style
classes are one way to achieve this. This could result in code like
the following (simplified) examples:
</para>
<example>
<title>Setting a permanent CSS class</title>
<programlisting>
static void
gtk_button_init (GtkButton *button)
{
GtkStyleContext *context;
...
context = gtk_widget_get_style_context (GTK_WIDGET (button));
/* Set the "button" class */
gtk_style_context_add_class (context, GTK_STYLE_CLASS_BUTTON);
}
</programlisting>
</example>
<para>
Or
</para>
<example>
<title>Using dynamic CSS classes for different elements</title>
<programlisting>
static gboolean
gtk_spin_button_draw (GtkSpinButton *spin,
cairo_t *cr)
{
GtkStyleContext *context;
...
context = gtk_widget_get_style_context (GTK_WIDGET (spin));
gtk_style_context_save (context);
gtk_style_context_add_class (context, GTK_STYLE_CLASS_ENTRY);
/* Call to entry draw impl with "entry" class */
parent_class->draw (spin, cr);
gtk_style_context_restore (context);
gtk_style_context_save (context);
/* Render up/down buttons with the "button" class */
gtk_style_context_add_class (context, GTK_STYLE_CLASS_BUTTON);
draw_up_button (spin, cr);
draw_down_button (spin, cr);
gtk_style_context_restore (context);
...
}
</programlisting>
</example>
<para>
Note that #GtkStyleContext only provides fg/bg colors, so text/base
is done through distinctive theming of the different classes. For
example, an entry would usually be black on white while a button
would usually be black on light grey.
</para>
</listitem>
<listitem>
<para>
Replace all <literal>gtk_paint_*()</literal> calls with corresponding
<literal>gtk_render_*()</literal> calls.
</para>
<para>
The most distinctive changes are the use of #GtkStateFlags to
represent the widget state and the lack of #GtkShadowType. Note
that widget state is now passed implicitly via the context, so
to render in a certain state, you have to temporarily set the
state on the context, as in the following example:
</para>
<example>
<title>Rendering with a specific state</title>
<programlisting>
gtk_style_context_save (context);
gtk_style_context_set_state (context, GTK_STATE_FLAG_ACTIVE);
gtk_render_check (context, cr, x, y, width, height);
gtk_style_context_restore (context);
</programlisting>
</example>
<para>
For gtk_render_check() and gtk_render_option(), the @shadow_type
parameter is replaced by the #GTK_STATE_FLAG_ACTIVE and
#GTK_STATE_FLAG_INCONSISTENT state flags. For things such as
pressed/unpressed button states, #GTK_STATE_FLAG_ACTIVE is used,
and the CSS may style normal/active states differently to render
outset/inset borders, respectively.
</para>
</listitem>
<listitem>
The various <literal>gtk_widget_modify_*()</literal> functions to
override colors or fonts for individual widgets have been replaced
by similar <literal>gtk_widget_override_*()</literal> functions.
</listitem>
<listitem>
It is no longer necessary to call gtk_widget_style_attach(),
gtk_style_attach(), gtk_style_detach() or gtk_widget_ensure_style().
</listitem>
<listitem>
Replace all uses of xthickness/ythickness. #GtkStyleContext uses the
CSS box model, and there are border-width/padding/margin properties to
replace the different applications of X and Y thickness. Note that all
of this is merely a guideline. Widgets may choose to follow it or not.
</listitem>
</orderedlist>
</section>
<section id="gtk-migrating-GtkStyleContext-parsing">
<title>Parsing of custom resources</title>
<para>
As a consequence of the RC format going away, calling gtk_rc_parse() or
gtk_rc_parse_string() won't have any effect on a widgets appearance.
The way to replace these calls is using a custom #GtkStyleProvider,
either for an individual widget through gtk_style_context_add_provider()
or for all widgets on a screen through gtk_style_context_add_provider_for_screen().
Typically, the provider will be a #GtkCssProvider, which parse CSS
information from a file or from a string.
</para>
<para>
Notice that you can also get style information from custom resources
by implementing the #GtkStyleProvider interface yourself. This is
an advanced feature that should be rarely used.
</para>
</section>
<section id="gtk-migrating-GtkStyleContext-bonus-points">
<title>Bonus points</title>
<para>
There are some features in #GtkStyleContext that were not available in
#GtkStyle, or were made available over time for certain widgets through
extending the detail string in obscure ways. There is a lot more
information available when rendering UI elements, and it is accessible
in more uniform, less hacky ways. By going through this list you'll
ensure your widget is a good citizen in a fully themable user interface.
</para>
<orderedlist>
<listitem>
If your widget renders a series of similar elements, such as tabs
in a #GtkNotebook or rows/column in a #GtkTreeView, consider adding
regions through gtk_style_context_add_region(). These regions can be
referenced in CSS and the :nth-child pseudo-class may be used to match
the elements depending on the flags passed.
<example>
<title>Theming widget regions</title>
<programlisting>
GtkNotebook tab {
background-color: &num;f3329d;
}
GtkTreeView row::nth-child (even) {
background-color: &num;dddddd;
}
</programlisting>
</example>
</listitem>
<listitem>
<para>
If your container renders child widgets within different regions,
make it implement GtkContainer::get_path_for_child(). This function
lets containers assign a special #GtkWidgetPath to child widgets
depending on their role/region. This is necessary to extend the
concept above throughout the widget hierarchy.
</para>
<para>
For example, a #GtkNotebook modifies the tab labels' #GtkWidgetPath
so the "tab" region is added. This makes it possible to theme tab
labels through:
</para>
<example>
<title>Theming a widget within a parent container region</title>
<programlisting>
GtkNotebook tab GtkLabel {
font: Sans 8;
}
</programlisting>
</example>
</listitem>
<listitem>
If you intend several visual elements to look interconnected,
make sure you specify rendered elements' connection areas with
gtk_style_context_set_junction_sides(). It is of course up to the
theme to make use of this information or not.
</listitem>
<listitem>
<para>
#GtkStyleContext supports implicit animations on state changes for
the most simple case out-of-the-box: widgets with a single animatable
area, whose state is changed with gtk_widget_set_state_flags() or
gtk_widget_unset_state_flags(). These functions trigger animated
transitions for the affected state flags. Examples of widgets for
which this kind of animation may be sufficient are #GtkButton or
#GtkEntry.
</para>
<para>
If your widget consists of more than a simple area, and these areas
may be rendered with different states, make sure to mark the rendered
areas with gtk_style_context_push_animatable_region() and
gtk_style_context_pop_animatable_region().
</para>
<para>
gtk_style_context_notify_state_change() may be used to trigger a
transition for a given state. The region ID will determine the
animatable region that is affected by this transition.
</para>
</listitem>
</orderedlist>
</section>
</section>
+9 -9
View File
@@ -267,15 +267,6 @@ additional environment variables.
</para>
</formalpara>
<formalpara>
<title><envar>GTK2_RC_FILES</envar></title>
<para>
Specifies a list of RC files to parse instead of the default ones;
see <link linkend="gtk-Resource-Files">Resource Files</link>.
</para>
</formalpara>
<formalpara>
<title><envar>GTK_EXE_PREFIX</envar></title>
@@ -377,6 +368,15 @@ nevertheless.
</para>
</formalpara>
<formalpara>
<title><envar>GDK_SYNCHRONIZE</envar></title>
<para>
If set, GDK makes all X requests synchronously. This is a useful
option for debugging, but it will slow down the performance considerably.
</para>
</formalpara>
<formalpara>
<title><envar>XDG_DATA_HOME</envar>, <envar>XDG_DATA_DIRS</envar></title>
-186
View File
@@ -1,186 +0,0 @@
<!-- ##### SECTION Title ##### -->
GtkCellLayout
<!-- ##### SECTION Short_Description ##### -->
An interface for packing cells
<!-- ##### SECTION Long_Description ##### -->
<para>
#GtkCellLayout is an interface to be implemented by all objects which
want to provide a #GtkTreeViewColumn-like API for packing cells, setting
attributes and data funcs.
</para>
<para>
One of the notable features provided by implementations of GtkCellLayout
are <emphasis>attributes</emphasis>. Attributes let you set the properties
in flexible ways. They can just be set to constant values like regular
properties. But they can also be mapped to a column of the underlying
tree model with gtk_cell_layout_set_attributes(), which means that the value
of the attribute can change from cell to cell as they are rendered by the
cell renderer. Finally, it is possible to specify a function with
gtk_cell_layout_set_cell_data_func() that is called to determine the value
of the attribute for each cell that is rendered.
</para>
<refsect2 id="GtkCellLayout-BUILDER-UI">
<title>GtkCellLayouts as GtkBuildable</title>
<para>
Implementations of GtkCellLayout which also implement the GtkBuildable
interface (#GtkCellView, #GtkIconView, #GtkComboBox, #GtkComboBoxEntry,
#GtkEntryCompletion, #GtkTreeViewColumn) accept GtkCellRenderer objects
as &lt;child&gt; elements in UI definitions. They support a custom
&lt;attributes&gt; element for their children, which can contain
multiple &lt;attribute&gt; elements. Each &lt;attribute&gt; element has
a name attribute which specifies a property of the cell renderer; the
content of the element is the attribute value.
</para>
<example>
<title>A UI definition fragment specifying attributes</title>
<programlisting><![CDATA[
<object class="GtkCellView">
<child>
<object class="GtkCellRendererText"/>
<attributes>
<attribute name="text">0</attribute>
</attributes>
</child>"
</object>
]]></programlisting>
</example>
</refsect2>
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
<!-- ##### SECTION Stability_Level ##### -->
<!-- ##### SECTION Image ##### -->
<!-- ##### STRUCT GtkCellLayout ##### -->
<para>
</para>
<!-- ##### STRUCT GtkCellLayoutIface ##### -->
<para>
</para>
@g_iface:
@pack_start:
@pack_end:
@clear:
@add_attribute:
@set_cell_data_func:
@clear_attributes:
@reorder:
@get_cells:
<!-- ##### USER_FUNCTION GtkCellLayoutDataFunc ##### -->
<para>
A function which should set the value of @cell_layout's cell renderer(s)
as appropriate.
</para>
@cell_layout: a #GtkCellLayout
@cell: the cell renderer whose value is to be set
@tree_model: the model
@iter: a #GtkTreeIter indicating the row to set the value for
@data: user data passed to gtk_cell_layout_set_cell_data_func()
<!-- ##### FUNCTION gtk_cell_layout_pack_start ##### -->
<para>
</para>
@cell_layout:
@cell:
@expand:
<!-- ##### FUNCTION gtk_cell_layout_pack_end ##### -->
<para>
</para>
@cell_layout:
@cell:
@expand:
<!-- ##### FUNCTION gtk_cell_layout_get_cells ##### -->
<para>
</para>
@cell_layout:
@Returns:
<!-- ##### FUNCTION gtk_cell_layout_reorder ##### -->
<para>
</para>
@cell_layout:
@cell:
@position:
<!-- ##### FUNCTION gtk_cell_layout_clear ##### -->
<para>
</para>
@cell_layout:
<!-- ##### FUNCTION gtk_cell_layout_set_attributes ##### -->
<para>
</para>
@cell_layout:
@cell:
@Varargs:
<!-- ##### FUNCTION gtk_cell_layout_add_attribute ##### -->
<para>
</para>
@cell_layout:
@cell:
@attribute:
@column:
<!-- ##### FUNCTION gtk_cell_layout_set_cell_data_func ##### -->
<para>
</para>
@cell_layout:
@cell:
@func:
@func_data:
@destroy:
<!-- ##### FUNCTION gtk_cell_layout_clear_attributes ##### -->
<para>
</para>
@cell_layout:
@cell:
+4 -16
View File
@@ -30,20 +30,8 @@ toggles the value.
<!-- ##### STRUCT GtkCheckMenuItem ##### -->
<para>
The #GtkCheckMenuItem-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>#guint active;</entry>
<entry>TRUE if the check box is active.</entry>
</row>
</tbody></tgroup></informaltable>
The #GtkCheckMenuItem-struct struct contains only private fields that
should not be directly accessed.
</para>
@@ -53,8 +41,8 @@ This signal is emitted when the state of the check box is changed.
</para>
<para>
A signal handler can examine the <structfield>active</structfield>
field of the #GtkCheckMenuItem-struct struct to discover the new state.
A signal handler can use gtk_check_menu_item_get_active()
to discover the new state.
</para>
@checkmenuitem: the object which received the signal.
+31 -22
View File
@@ -35,8 +35,8 @@ the application may want to connect to:
</listitem>
<listitem>
<para>
The "expose_event" signal to handle redrawing the
contents of the widget.
The "draw" signal to handle redrawing the contents of the
widget.
</para>
</listitem>
</itemizedlist>
@@ -53,40 +53,49 @@ that drawing is implicitly clipped to the exposed area.
<title>Simple <structname>GtkDrawingArea</structname> usage.</title>
<programlisting>
gboolean
expose_event_callback (GtkWidget *widget, GdkEventExpose *event, gpointer data)
draw_callback (GtkWidget *widget, cairo_t *cr, gpointer data)
{
cairo_t *cr;
cr = gdk_cairo_create (event->window);
guint width, height;
GdkRGBA color;
cairo_set_source_rgb (cr, 0.0, 0.0, 1.0);
cairo_paint (cr);
width = gtk_widget_get_allocated_width (widget);
height = gtk_widget_get_allocated_height (widget);
cairo_arc (cr,
width / 2.0, height / 2.0,
MIN (width, height) / 2.0,
0, 2 * G_PI);
cairo_destroy (cr);
return TRUE;
gtk_style_context_get_color (gtk_widget_get_style_context (widget),
0,
&amp;color);
gdk_cairo_set_source_rgba (cr, &amp;color);
cairo_fill (cr);
return FALSE;
}
[...]
/* ... */
GtkWidget *drawing_area = gtk_drawing_area_new (<!-- -->);
gtk_widget_set_size_request (drawing_area, 100, 100);
g_signal_connect (G_OBJECT (drawing_area), "expose_event",
G_CALLBACK (expose_event_callback), NULL);
g_signal_connect (G_OBJECT (drawing_area), "draw",
G_CALLBACK (draw_callback), NULL);
</programlisting>
</example>
<para>
Expose events are normally delivered when a drawing area first comes
onscreen, or when it's covered by another window and then uncovered
(exposed). You can also force an expose event by adding to the "damage
region" of the drawing area's window; gtk_widget_queue_draw_area() and
gdk_window_invalidate_rect() are equally good ways to do this. You'll
then get an expose event for the invalid region.
Draw signals are normally delivered when a drawing area first comes
onscreen, or when it's covered by another window and then uncovered.
You can also force a redraw by adding to the "damage region" of the
drawing area's window; use gtk_widget_queue_draw_area() to do this.
You'll then get a draw event for the invalid region.
</para>
<para>
The available routines for drawing are documented on the <link
linkend="gdk-Drawing-Primitives">GDK Drawing Primitives</link> page.
See also gdk_draw_pixbuf() for drawing a #GdkPixbuf.
linkend="gdk3-Cairo-Interaction">GDK Drawing Primitives</link> page
and the cairo documentation.
</para>
<para>
+56 -11
View File
@@ -315,19 +315,28 @@ Used to change the appearance of an outline typically provided by a #GtkFrame.
<!-- ##### ENUM GtkStateType ##### -->
<para>
This type indicates the current state of a widget; the state determines how
the widget is drawn. The #GtkStateType enumeration is also used to
identify different colors in a #GtkStyle for drawing, so states can be
used for subparts of a widget as well as entire widgets.
</para>
@GTK_STATE_NORMAL: State during normal operation.
@GTK_STATE_ACTIVE: State of a currently active widget, such as a depressed button.
@GTK_STATE_PRELIGHT: State indicating that the mouse pointer is over
the widget and the widget will respond to mouse clicks.
@GTK_STATE_SELECTED: State of a selected item, such the selected row in a list.
@GTK_STATE_INSENSITIVE: State indicating that the widget is
unresponsive to user actions.
@GTK_STATE_NORMAL:
@GTK_STATE_ACTIVE:
@GTK_STATE_PRELIGHT:
@GTK_STATE_SELECTED:
@GTK_STATE_INSENSITIVE:
@GTK_STATE_INCONSISTENT:
@GTK_STATE_FOCUSED:
<!-- ##### ENUM GtkStateFlags ##### -->
<para>
</para>
@GTK_STATE_FLAG_ACTIVE:
@GTK_STATE_FLAG_PRELIGHT:
@GTK_STATE_FLAG_SELECTED:
@GTK_STATE_FLAG_INSENSITIVE:
@GTK_STATE_FLAG_INCONSISTENT:
@GTK_STATE_FLAG_FOCUSED:
<!-- ##### ENUM GtkToolbarStyle ##### -->
<para>
@@ -411,3 +420,39 @@ The value can by obtained by connecting to the
@GTK_DRAG_RESULT_ERROR: The drag operation failed due to some
unspecified error
<!-- ##### ENUM GtkJunctionSides ##### -->
<para>
</para>
@GTK_JUNCTION_NONE:
@GTK_JUNCTION_CORNER_TOPLEFT:
@GTK_JUNCTION_CORNER_TOPRIGHT:
@GTK_JUNCTION_CORNER_BOTTOMLEFT:
@GTK_JUNCTION_CORNER_BOTTOMRIGHT:
@GTK_JUNCTION_TOP:
@GTK_JUNCTION_BOTTOM:
@GTK_JUNCTION_LEFT:
@GTK_JUNCTION_RIGHT:
<!-- ##### ENUM GtkBorderStyle ##### -->
<para>
</para>
@GTK_BORDER_STYLE_NONE:
@GTK_BORDER_STYLE_SOLID:
@GTK_BORDER_STYLE_INSET:
@GTK_BORDER_STYLE_OUTSET:
<!-- ##### ENUM GtkRegionFlags ##### -->
<para>
</para>
@GTK_REGION_EVEN:
@GTK_REGION_ODD:
@GTK_REGION_FIRST:
@GTK_REGION_LAST:
@GTK_REGION_SORTED:
@@ -279,6 +279,17 @@ This attribute is optional.</para>
@Returns:
<!-- ##### FUNCTION gtk_icon_set_render_icon_pixbuf ##### -->
<para>
</para>
@icon_set:
@context:
@size:
@Returns:
<!-- ##### FUNCTION gtk_icon_set_unref ##### -->
<para>
+12
View File
@@ -449,6 +449,18 @@ The #GQuark used for #GtkIconThemeError errors.
@Returns:
<!-- ##### FUNCTION gtk_icon_info_load_symbolic_for_context ##### -->
<para>
</para>
@icon_info:
@context:
@was_symbolic:
@error:
@Returns:
<!-- ##### FUNCTION gtk_icon_info_set_raw_coordinates ##### -->
<para>
+4
View File
@@ -10,6 +10,10 @@ GTK+ provides resource file mechanism for configuring
various aspects of the operation of a GTK+ program
at runtime.
</para>
<para>
In GTK+ 3.0, resource files have been deprecated and replaced
by CSS-like style sheets, which are understood by #GtkCssProvider.
</para>
<refsect2><title>Default files</title>
<para>
+5 -33
View File
@@ -20,13 +20,13 @@ X11 aspects of using GTK+
<title>GTK+ for the X Window System</title>
<para>
On UNIX, the X backend is the default build for GTK+. So
you don't need to do anything special when compiling it,
On UNIX, the X backend is the default build for GTK+.
So you don't need to do anything special when compiling it,
and everything should "just work."
</para>
<para>
To mix low-level Xlib routines into a GTK program,
To mix low-level Xlib routines into a GTK program,
see <link linkend="gdk-X-Window-System-Interaction">GDK X Window
System interaction</link> in the GDK manual.
</para>
@@ -35,8 +35,7 @@ System interaction</link> in the GDK manual.
<title>X11-specific commandline options</title>
<para>
The X backend understands some additional command line
arguments.
The X backend understands some additional command line arguments.
</para>
<formalpara>
@@ -44,34 +43,7 @@ arguments.
<para>
The name of the X display to open instead of the one specified
in the <envar>DISPLAY</envar> environment variable.
</para>
</formalpara>
<formalpara>
<title><systemitem>--screen <replaceable>screen_number</replaceable></systemitem></title>
<para>
The number of the screen within the default display. This overrides
any screen number specified in the display name specified by
by he <systemitem>--display</systemitem> command line option or
the <envar>DISPLAY</envar> environment variable. If this screen
cannot be opened, then GTK+ will fall back to the screen
specified in the display name. This option is not useful
interactively; the intended purposes is that when a program
registers its command line with a <firstterm>session
manager</firstterm> for later restarting, it can save the
screen it is on, without having to worry if it might be
restarted on a different display.
</para>
</formalpara>
<formalpara>
<title><systemitem>--sync</systemitem></title>
<para>
Makes all X requests synchronously. This is a useful option for
debugging, but it will slow down the performance considerably.
in the <envar>DISPLAY</envar> environment variable.
</para>
</formalpara>
+13 -14
View File
@@ -1,22 +1,21 @@
include $(top_srcdir)/Makefile.decl
INCLUDES = \
-I$(top_srcdir) \
-I$(top_builddir)/gdk \
-I$(top_srcdir)/gdk \
-I$(top_srcdir)/gdk/x11 \
$(GTK_DEBUG_FLAGS) \
INCLUDES = \
-I$(top_srcdir) \
-I$(top_builddir)/gdk \
-I$(top_srcdir)/gdk \
-I$(top_srcdir)/gdk/x11 \
$(GTK_DEBUG_FLAGS) \
$(GTK_DEP_CFLAGS)
DEPS = \
$(top_builddir)/gdk/$(gdktargetlib) \
$(top_builddir)/gtk/$(gtktargetlib)
DEPS = \
$(top_builddir)/gtk/libgtk-3.0.la
LDADDS = \
$(top_builddir)/gdk/$(gdktargetlib) \
$(top_builddir)/gtk/$(gtktargetlib) \
$(GTK_DEP_LIBS) \
$(GDK_DEP_LIBS) \
LDADDS = \
$(top_builddir)/gtk/libgtk-3.0.la \
$(top_builddir)/gdk/libgdk-3.0.la \
$(GTK_DEP_LIBS) \
$(GDK_DEP_LIBS) \
-lm
if USE_X11
+2 -2
View File
@@ -138,7 +138,7 @@ take_window_shot (Window child,
else
xid = child;
window = gdk_window_foreign_new (xid);
window = gdk_x11_window_foreign_new_for_display (gdk_display_get_default (), xid);
width = gdk_window_get_width (window);
height = gdk_window_get_height (window);
@@ -224,7 +224,7 @@ int main (int argc, char **argv)
gtk_main_iteration ();
}
id = gdk_x11_drawable_get_xid (GDK_DRAWABLE (window));
id = gdk_x11_window_get_xid (window);
screenshot = take_window_shot (id, info->include_decorations);
filename = g_strdup_printf ("./%s.png", info->name);
gdk_pixbuf_save (screenshot, filename, "png", NULL, NULL);
+1 -1
View File
@@ -255,7 +255,7 @@ In the following
widget->parent && GTK_WIDGET_MAPPED (widget->parent) &&
GTK_WIDGET_VISIBLE (widget) && GTK_WIDGET_CHILD_VISIBLE
=> GTK_WIDGET_MAPPED (widget)
<=> GTK_WIDGET_MAPPED (widget)
Note:, the definition
+1 -2
View File
@@ -45,8 +45,7 @@ INCLUDES = \
$(GTK_DEP_CFLAGS)
LDADD = \
$(top_builddir)/gdk/$(gdktargetlib) \
$(top_builddir)/gtk/$(gtktargetlib) \
$(top_builddir)/gtk/libgtk-3.0.la \
$(GTK_DEP_LIBS)
noinst_PROGRAMS = hello-world window-default
-8
View File
@@ -1,8 +0,0 @@
target=@gdktarget@
Name: GDK Uninstalled
Description: GTK+ Drawing Kit (${target} target), Not Installed
Version: @VERSION@
Requires: gdk-pixbuf-@GTK_API_VERSION@-uninstalled @GDK_PACKAGES@
Libs: ${pc_top_builddir}/${pcfiledir}/gdk/libgdk-${target}-@GTK_API_VERSION@.la @GDK_EXTRA_LIBS@
Cflags: -I${pc_top_builddir}/${pcfiledir}/@srcdir@/gdk -I${pc_top_builddir}/${pcfiledir}/@srcdir@ -I${pc_top_builddir}/${pcfiledir} @GDK_EXTRA_CFLAGS@
+3 -3
View File
@@ -5,8 +5,8 @@ includedir=@includedir@
target=@gdktarget@
Name: GDK
Description: GTK+ Drawing Kit (${target} target)
Description: GTK+ Drawing Kit
Version: @VERSION@
Requires: @GDK_PACKAGES@
Libs: -L${libdir} -lgdk-${target}-@GTK_API_VERSION@ @GDK_EXTRA_LIBS@
Cflags: -I${includedir}/gtk-@GTK_API_VERSION@ -I${libdir}/gtk-@GTK_API_VERSION@/include @GDK_EXTRA_CFLAGS@ -DGSEAL_ENABLE
Libs: -L${libdir} -lgdk-@GTK_API_VERSION@ @GDK_EXTRA_LIBS@
Cflags: -I${includedir}/gtk-@GTK_API_VERSION@ @GDK_EXTRA_CFLAGS@
+85 -94
View File
@@ -13,15 +13,15 @@ DIST_SUBDIRS = win32 x11 quartz tests
CLEANFILES =
EXTRA_DIST += \
EXTRA_DIST += \
keynames.txt \
keyname-table.h \
gdkkeynames.c \
gen-keyname-table.pl \
gdkconfig.h.win32 \
gdkconfig.h.win32 \
gdkkeysyms-update.pl \
gdk.def \
gdk.def \
gdkmarshalers.list \
gdkmedialib.h \
gdkwindowimpl.h \
makeenums.pl \
makefile.msc \
@@ -30,12 +30,12 @@ EXTRA_DIST += \
gdkenumtypes.h.template \
abicheck.sh
INCLUDES = \
INCLUDES = \
-DG_LOG_DOMAIN=\"Gdk\" \
-DGDK_COMPILATION \
-I$(top_srcdir) \
-I$(top_builddir)/gdk \
$(GTK_DEBUG_FLAGS) \
$(GTK_DEBUG_FLAGS) \
$(GDK_DEP_CFLAGS)
gtarget=$(gdktarget)
@@ -47,28 +47,21 @@ endif
# libtool stuff: set version and export symbols for resolving
# since automake doesn't support conditionalized libsomething_la_LDFLAGS
# we use the general approach here
LDADD = \
$(GTK_LINK_FLAGS) \
-version-info $(LT_VERSION_INFO) \
-export-dynamic \
-rpath $(libdir) \
$(no_undefined) \
LDADD = \
$(GTK_LINK_FLAGS) \
-version-info $(LT_VERSION_INFO) \
-export-dynamic \
-rpath $(libdir) \
$(no_undefined) \
$(LIBTOOL_EXPORT_OPTIONS)
if USE_MEDIALIB
medialib_sources = \
gdkmedialib.c
else
medialib_sources =
endif
#
# setup source file variables
#
#
# GDK header files for public installation (non-generated)
#
gdk_public_h_sources = \
gdk_public_h_sources = \
gdk.h \
gdkapplaunchcontext.h \
gdkcairo.h \
@@ -79,9 +72,7 @@ gdk_public_h_sources = \
gdkdisplay.h \
gdkdisplaymanager.h \
gdkdnd.h \
gdkdrawable.h \
gdkevents.h \
gdkinput.h \
gdkkeys.h \
gdkkeysyms.h \
gdkkeysyms-compat.h \
@@ -94,51 +85,57 @@ gdk_public_h_sources = \
gdkrgba.h \
gdkscreen.h \
gdkselection.h \
gdkspawn.h \
gdktestutils.h \
gdkthreads.h \
gdktypes.h \
gdkvisual.h \
gdkwindow.h
gdk_built_public_sources = \
gdk_built_public_sources = \
gdkconfig.h \
gdkenumtypes.h
gdk_private_headers = \
gdkinternals.h \
gdk_private_headers = \
gdkapplaunchcontextprivate.h \
gdkcursorprivate.h \
gdkdevicemanagerprivate.h \
gdkdeviceprivate.h \
gdkdisplaymanagerprivate.h \
gdkdisplayprivate.h \
gdkdndprivate.h \
gdkscreenprivate.h \
gdkinternals.h \
gdkintl.h \
gdkpoly-generic.h
gdkkeysprivate.h \
gdkvisualprivate.h
gdk_c_sources = \
$(medialib_sources) \
gdk.c \
gdkapplaunchcontext.c \
gdkcairo.c \
gdkcolor.c \
gdkcursor.c \
gdkdevice.c \
gdkdevicemanager.c \
gdkdisplay.c \
gdkdisplaymanager.c \
gdkdnd.c \
gdkdraw.c \
gdkevents.c \
gdkglobals.c \
gdkkeys.c \
gdkkeyuni.c \
gdkoffscreenwindow.c \
gdkpango.c \
gdkpixbuf-drawable.c \
gdkrectangle.c \
gdkrgba.c \
gdkscreen.c \
gdkselection.c \
gdkvisual.c \
gdkwindow.c \
gdk_c_sources = \
gdk.c \
gdkapplaunchcontext.c \
gdkcairo.c \
gdkcolor.c \
gdkcursor.c \
gdkdevice.c \
gdkdevicemanager.c \
gdkdisplay.c \
gdkdisplaymanager.c \
gdkdnd.c \
gdkevents.c \
gdkglobals.c \
gdkkeys.c \
gdkkeyuni.c \
gdkoffscreenwindow.c \
gdkpango.c \
gdkpixbuf-drawable.c \
gdkrectangle.c \
gdkrgba.c \
gdkscreen.c \
gdkselection.c \
gdkvisual.c \
gdkwindow.c \
gdkwindowimpl.c
gdk_built_sources = \
gdk_built_sources = \
gdkenumtypes.c \
gdkmarshalers.h \
gdkmarshalers.c \
@@ -158,18 +155,24 @@ common_sources = \
gdkmarshalers.c \
gdkmarshalers.h
libgdk_x11_3_0_la_SOURCES = $(common_sources)
libgdk_x11_3_0_la_LIBADD = x11/libgdk-x11.la $(GDK_DEP_LIBS)
libgdk_x11_3_0_la_LDFLAGS = $(LDADD)
libgdk_3_0_la_SOURCES = $(common_sources)
libgdk_3_0_la_LIBADD = $(GDK_DEP_LIBS)
libgdk_3_0_la_LDFLAGS = $(LDADD)
libgdk_quartz_3_0_la_SOURCES = $(common_sources) gdkkeynames.c
libgdk_quartz_3_0_la_LIBADD = quartz/libgdk-quartz.la $(GDK_DEP_LIBS)
libgdk_quartz_3_0_la_LDFLAGS = $(LDADD)
if USE_X11
libgdk_3_0_la_LIBADD += x11/libgdk-x11.la
endif # USE_X11
libgdk_win32_3_0_la_SOURCES = $(common_sources) gdkkeynames.c
libgdk_win32_3_0_la_LIBADD = win32/libgdk-win32.la $(GDK_DEP_LIBS)
libgdk_win32_3_0_la_DEPENDENCIES = win32/libgdk-win32.la win32/rc/gdk-win32-res.o gdk.def
libgdk_win32_3_0_la_LDFLAGS = -Wl,win32/rc/gdk-win32-res.o -export-symbols $(srcdir)/gdk.def $(LDADD)
if USE_QUARTZ
libgdk_3_0_la_LIBADD += quartz/libgdk-quartz.la
endif # USE_QUARTZ
if USE_WIN32
libgdk_3_0_la_SOURCES += gdkkeynames.c
libgdk_3_0_la_LIBADD += win32/libgdk-win32.la
libgdk_3_0_la_DEPENDENCIES = win32/libgdk-win32.la win32/rc/gdk-win32-res.o gdk.def
libgdk_3_0_la_LDFLAGS += -Wl,win32/rc/gdk-win32-res.o -export-symbols $(srcdir)/gdk.def
endif # USE_WIN32
if HAVE_INTROSPECTION
@@ -179,10 +182,10 @@ introspection_files = \
gdkenumtypes.c \
gdkenumtypes.h
Gdk-3.0.gir: $(gdktargetlib) Makefile
Gdk-3.0.gir: libgdk-3.0.la Makefile
Gdk_3_0_gir_SCANNERFLAGS = --warn-all
Gdk_3_0_gir_INCLUDES = Gio-2.0 GdkPixbuf-2.0 Pango-1.0 cairo-1.0
Gdk_3_0_gir_LIBS = $(gdktargetlib)
Gdk_3_0_gir_LIBS = libgdk-3.0.la
Gdk_3_0_gir_FILES = $(introspection_files)
Gdk_3_0_gir_CFLAGS = $(INCLUDES)
INTROSPECTION_GIRS += Gdk-3.0.gir
@@ -193,29 +196,24 @@ x11_introspection_files = \
x11/gdkapplaunchcontext-x11.c \
x11/gdkasync.c \
x11/gdkcursor-x11.c \
x11/gdkdevice-core.c \
x11/gdkdevicemanager-core.c \
x11/gdkdevice-core-x11.c \
x11/gdkdevicemanager-core-x11.c \
x11/gdkdevicemanager-x11.c \
x11/gdkdevicemanager-xi2.c \
x11/gdkdevicemanager-xi.c \
x11/gdkdevicemanager-xi2.c \
x11/gdkdevice-xi2.c \
x11/gdkdevice-xi.c \
x11/gdkdisplay-x11.c \
x11/gdkdnd-x11.c \
x11/gdkdrawable-x11.c \
x11/gdkeventsource.c \
x11/gdkeventtranslator.c \
x11/gdkgeometry-x11.c \
x11/gdkglobals-x11.c \
x11/gdkim-x11.c \
x11/gdkinput.c \
x11/gdkkeys-x11.c \
x11/gdkmain-x11.c \
x11/gdkproperty-x11.c \
x11/gdkscreen-x11.c \
x11/gdkselection-x11.c \
x11/gdksettings.c \
x11/gdkspawn-x11.c \
x11/gdktestutils-x11.c \
x11/gdkvisual-x11.c \
x11/gdkwindow-x11.c \
@@ -223,12 +221,20 @@ 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 \
x11/gdkx11screen.h \
x11/gdkx11selection.h \
x11/gdkx11utils.h \
x11/gdkx11visual.h \
x11/gdkx11window.h
GdkX11-3.0.gir: $(gdktargetlib) Gdk-3.0.gir Makefile
GdkX11-3.0.gir: libgdk-3.0.la Gdk-3.0.gir Makefile
GdkX11_3_0_gir_SCANNERFLAGS = --warn-all --strip-prefix=Gdk
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 = $(gdktargetlib)
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
INTROSPECTION_GIRS += GdkX11-3.0.gir
@@ -285,30 +291,15 @@ if OS_LINUX
TESTS = abicheck.sh
endif
lib_LTLIBRARIES = $(gdktargetlib)
EXTRA_LTLIBRARIES = libgdk-x11-3.0.la libgdk-win32-3.0.la libgdk-quartz-3.0.la
lib_LTLIBRARIES = libgdk-3.0.la
MAINTAINERCLEANFILES = $(gdk_built_sources) stamp-gdkenumtypes.h
EXTRA_DIST += $(gdk_built_sources)
EXTRA_HEADERS =
#
# Rule to install gdkconfig.h header file
#
configexecincludedir = $(libdir)/gtk-3.0/include
#configexecinclude_DATA = gdkconfig.h
install-exec-local: gdkconfig.h
$(mkinstalldirs) $(DESTDIR)$(configexecincludedir)
file=$(DESTDIR)$(configexecincludedir)/gdkconfig.h; \
if test -r $$file && cmp -s gdkconfig.h $$file; then :; \
else $(INSTALL_DATA) gdkconfig.h $$file; fi
install-exec-hook:
if DISABLE_EXPLICIT_DEPS
$(SHELL) $(top_srcdir)/sanitize-la.sh $(DESTDIR)$(libdir)/$(gdktargetlib)
$(SHELL) $(top_srcdir)/sanitize-la.sh $(DESTDIR)$(libdir)/libgdk-3.0.la
endif
#note: not gdkconfig.h
+2 -2
View File
@@ -1,5 +1,5 @@
#! /bin/sh
cpp -P -DGDK_ENABLE_BROKEN -include ../config.h -include ./gdkconfig.h ${srcdir:-.}/gdk.symbols | sed -e '/^$/d' -e 's/ G_GNUC.*$//' | sort | uniq > expected-abi
nm -D -g --defined-only .libs/libgdk-x11-3.0.so | cut -d ' ' -f 3 | egrep -v '^(__bss_start|_edata|_end)' | sort > actual-abi
cpp -P -DGDK_ENABLE_BROKEN -include ../config.h ${srcdir:-.}/gdk.symbols | sed -e '/^$/d' -e 's/ G_GNUC.*$//' | sort | uniq > expected-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
+127 -114
View File
@@ -8,7 +8,7 @@
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
@@ -48,6 +48,48 @@
* utility functions.
*/
/**
* GDK_WINDOWING_X11:
*
* The #GDK_WINDOWING_X11 macro is defined if the X11 backend
* is supported.
*
* Use this macro to guard code that is specific to the X11-backend.
* Since GDK may be configured with multiple backends, an additional
* runtime check for the used backend is recommended:
*
* |[
* #ifdef GDK_WINDOWING_X11
* if (GDK_IS_X11_DISPLAY (display))
* {
* /&ast; make X11-specific calls here &ast;/
* }
* else
* #endif
* #ifdef GDK_WINDOWING_QUARTZ
* if (GDK_IS_QUARTZ_DISPLAY (display))
* {
* /&ast; make Quartz-specific calls here &ast/
* }
* else
* #endif
* g_error ("Unsupported GDK backend");
* ]|
*/
/**
* GDK_WINDOWING_WIN32:
*
* The #GDK_WINDOWING_WIN32 macro is defined if the Win32 backend
* is supported.
*/
/**
* GDK_WINDOWING_QUARTZ:
*
* The #GDK_WINDOWING_QUARTZ macro is defined if the Quartz backend
* is supported.
*/
typedef struct _GdkPredicate GdkPredicate;
@@ -69,9 +111,9 @@ struct _GdkThreadsDispatch
/* Private variable declarations
*/
static int gdk_initialized = 0; /* 1 if the library is initialized,
* 0 otherwise.
*/
static int gdk_initialized = 0; /* 1 if the library is initialized,
* 0 otherwise.
*/
static gchar *gdk_progclass = NULL;
@@ -82,37 +124,32 @@ static GCallback gdk_threads_unlock = NULL;
#ifdef G_ENABLE_DEBUG
static const GDebugKey gdk_debug_keys[] = {
{"events", GDK_DEBUG_EVENTS},
{"misc", GDK_DEBUG_MISC},
{"dnd", GDK_DEBUG_DND},
{"xim", GDK_DEBUG_XIM},
{"events", GDK_DEBUG_EVENTS},
{"misc", GDK_DEBUG_MISC},
{"dnd", GDK_DEBUG_DND},
{"xim", GDK_DEBUG_XIM},
{"nograbs", GDK_DEBUG_NOGRABS},
{"colormap", GDK_DEBUG_COLORMAP},
{"input", GDK_DEBUG_INPUT},
{"cursor", GDK_DEBUG_CURSOR},
{"multihead", GDK_DEBUG_MULTIHEAD},
{"xinerama", GDK_DEBUG_XINERAMA},
{"draw", GDK_DEBUG_DRAW},
{"eventloop", GDK_DEBUG_EVENTLOOP}
{"colormap", GDK_DEBUG_COLORMAP},
{"input", GDK_DEBUG_INPUT},
{"cursor", GDK_DEBUG_CURSOR},
{"multihead", GDK_DEBUG_MULTIHEAD},
{"xinerama", GDK_DEBUG_XINERAMA},
{"draw", GDK_DEBUG_DRAW},
{"eventloop", GDK_DEBUG_EVENTLOOP}
};
static const int gdk_ndebug_keys = G_N_ELEMENTS (gdk_debug_keys);
#endif /* G_ENABLE_DEBUG */
#ifdef G_ENABLE_DEBUG
static gboolean
gdk_arg_debug_cb (const char *key, const char *value, gpointer user_data, GError **error)
{
guint debug_value = g_parse_debug_string (value,
(GDebugKey *) gdk_debug_keys,
gdk_ndebug_keys);
(GDebugKey *) gdk_debug_keys,
G_N_ELEMENTS (gdk_debug_keys));
if (debug_value == 0 && value != NULL && strcmp (value, "") != 0)
{
g_set_error (error,
G_OPTION_ERROR, G_OPTION_ERROR_FAILED,
_("Error parsing option --gdk-debug"));
g_set_error (error,
G_OPTION_ERROR, G_OPTION_ERROR_FAILED,
_("Error parsing option --gdk-debug"));
return FALSE;
}
@@ -125,14 +162,14 @@ static gboolean
gdk_arg_no_debug_cb (const char *key, const char *value, gpointer user_data, GError **error)
{
guint debug_value = g_parse_debug_string (value,
(GDebugKey *) gdk_debug_keys,
gdk_ndebug_keys);
(GDebugKey *) gdk_debug_keys,
G_N_ELEMENTS (gdk_debug_keys));
if (debug_value == 0 && value != NULL && strcmp (value, "") != 0)
{
g_set_error (error,
G_OPTION_ERROR, G_OPTION_ERROR_FAILED,
_("Error parsing option --gdk-no-debug"));
g_set_error (error,
G_OPTION_ERROR, G_OPTION_ERROR_FAILED,
_("Error parsing option --gdk-no-debug"));
return FALSE;
}
@@ -168,9 +205,6 @@ static const GOptionEntry gdk_args[] = {
{ "display", 0, G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_STRING, &_gdk_display_name,
/* Description of --display=DISPLAY in --help output */ N_("X display to use"),
/* Placeholder in --display=DISPLAY in --help output */ N_("DISPLAY") },
{ "screen", 0, 0, G_OPTION_ARG_INT, &_gdk_screen_number,
/* Description of --screen=SCREEN in --help output */ N_("X screen to use"),
/* Placeholder in --screen=SCREEN in --help output */ N_("SCREEN") },
#ifdef G_ENABLE_DEBUG
{ "gdk-debug", 0, 0, G_OPTION_ARG_CALLBACK, gdk_arg_debug_cb,
/* Description of --gdk-debug=FLAGS in --help output */ N_("GDK debugging flags to set"),
@@ -185,15 +219,14 @@ static const GOptionEntry gdk_args[] = {
/**
* gdk_add_option_entries_libgtk_only:
* @group: An option group.
*
*
* Appends gdk option entries to the passed in option group. This is
* not public API and must not be used by applications.
**/
*/
void
gdk_add_option_entries_libgtk_only (GOptionGroup *group)
{
g_option_group_add_entries (group, gdk_args);
g_option_group_add_entries (group, _gdk_windowing_args);
}
void
@@ -213,24 +246,22 @@ gdk_pre_parse_libgtk_only (void)
gchar *debug_string = getenv("GDK_DEBUG");
if (debug_string != NULL)
_gdk_debug_flags = g_parse_debug_string (debug_string,
(GDebugKey *) gdk_debug_keys,
gdk_ndebug_keys);
(GDebugKey *) gdk_debug_keys,
G_N_ELEMENTS (gdk_debug_keys));
}
#endif /* G_ENABLE_DEBUG */
#endif /* G_ENABLE_DEBUG */
if (getenv ("GDK_NATIVE_WINDOWS"))
{
_gdk_native_windows = TRUE;
/* Ensure that this is not propagated
to spawned applications */
/* Ensure that this is not propagated to spawned applications */
g_unsetenv ("GDK_NATIVE_WINDOWS");
}
g_type_init ();
/* Do any setup particular to the windowing system
*/
_gdk_windowing_init ();
/* Do any setup particular to the windowing system */
gdk_display_manager_get ();
}
@@ -252,7 +283,7 @@ gdk_pre_parse_libgtk_only (void)
**/
void
gdk_parse_args (int *argc,
char ***argv)
char ***argv)
{
GOptionContext *option_context;
GOptionGroup *option_group;
@@ -262,15 +293,14 @@ gdk_parse_args (int *argc,
return;
gdk_pre_parse_libgtk_only ();
option_context = g_option_context_new (NULL);
g_option_context_set_ignore_unknown_options (option_context, TRUE);
g_option_context_set_help_enabled (option_context, FALSE);
option_group = g_option_group_new (NULL, NULL, NULL, NULL, NULL);
g_option_context_set_main_group (option_context, option_group);
g_option_group_add_entries (option_group, gdk_args);
g_option_group_add_entries (option_group, _gdk_windowing_args);
if (!g_option_context_parse (option_context, argc, argv, &error))
{
@@ -282,7 +312,7 @@ gdk_parse_args (int *argc,
GDK_NOTE (MISC, g_message ("progname: \"%s\"", g_get_prgname ()));
}
/**
/**
* gdk_get_display_arg_name:
*
* Gets the display name specified in the command line arguments passed
@@ -297,25 +327,20 @@ G_CONST_RETURN gchar *
gdk_get_display_arg_name (void)
{
if (!_gdk_display_arg_name)
{
if (_gdk_screen_number >= 0)
_gdk_display_arg_name = _gdk_windowing_substitute_screen_number (_gdk_display_name, _gdk_screen_number);
else
_gdk_display_arg_name = g_strdup (_gdk_display_name);
}
_gdk_display_arg_name = g_strdup (_gdk_display_name);
return _gdk_display_arg_name;
}
/**
* gdk_display_open_default_libgtk_only:
*
*
* Opens the default display specified by command line arguments or
* environment variables, sets it as the default display, and returns
* it. gdk_parse_args must have been called first. If the default
* display has previously been set, simply returns that. An internal
* function that should not be used by applications.
*
*
* Return value: (transfer none): the default display, if it could be
* opened, otherwise %NULL.
**/
@@ -325,25 +350,13 @@ gdk_display_open_default_libgtk_only (void)
GdkDisplay *display;
g_return_val_if_fail (gdk_initialized, NULL);
display = gdk_display_get_default ();
if (display)
return display;
display = gdk_display_open (gdk_get_display_arg_name ());
if (!display && _gdk_screen_number >= 0)
{
g_free (_gdk_display_arg_name);
_gdk_display_arg_name = g_strdup (_gdk_display_name);
display = gdk_display_open (_gdk_display_name);
}
if (display)
gdk_display_manager_set_default_display (gdk_display_manager_get (),
display);
return display;
}
@@ -352,20 +365,20 @@ gdk_display_open_default_libgtk_only (void)
* @argc: (inout): the number of command line arguments.
* @argv: (array length=argc) (inout): the array of command line arguments.
*
* Initializes the GDK library and connects to the X server, returning %TRUE on
* success.
* Initializes the GDK library and connects to the windowing system,
* returning %TRUE on success.
*
* Any arguments used by GDK are removed from the array and @argc and @argv are
* updated accordingly.
* Any arguments used by GDK are removed from the array and @argc and @argv
* are updated accordingly.
*
* GTK+ initializes GDK in gtk_init() and so this function is not usually needed
* by GTK+ applications.
* GTK+ initializes GDK in gtk_init() and so this function is not usually
* needed by GTK+ applications.
*
* Returns: %TRUE if initialization succeeded.
*/
gboolean
gdk_init_check (int *argc,
char ***argv)
char ***argv)
{
gdk_parse_args (argc, argv);
@@ -378,15 +391,15 @@ gdk_init_check (int *argc,
* @argc: (inout): the number of command line arguments.
* @argv: (array length=argc) (inout): the array of command line arguments.
*
* Initializes the GDK library and connects to the X server.
* Initializes the GDK library and connects to the windowing system.
* If initialization fails, a warning message is output and the application
* terminates with a call to <literal>exit(1)</literal>.
*
* Any arguments used by GDK are removed from the array and @argc and @argv are
* updated accordingly.
* Any arguments used by GDK are removed from the array and @argc and @argv
* are updated accordingly.
*
* GTK+ initializes GDK in gtk_init() and so this function is not usually needed
* by GTK+ applications.
* GTK+ initializes GDK in gtk_init() and so this function is not usually
* needed by GTK+ applications.
*/
void
gdk_init (int *argc, char ***argv)
@@ -549,28 +562,28 @@ gdk_init (int *argc, char ***argv)
* say_something = (yes_or_no != data->what);
*
* if(say_something)
* {
* /<!---->* set the variable *<!---->/
* yes_or_no = data->what;
* }
* {
* /<!---->* set the variable *<!---->/
* yes_or_no = data->what;
* }
*
* /<!---->* Unlock the yes_or_no variable *<!---->/
* G_UNLOCK (yes_or_no);
*
* if (say_something)
* {
* /<!---->* get GTK thread lock *<!---->/
* gdk_threads_enter (<!-- -->);
* {
* /<!---->* get GTK thread lock *<!---->/
* gdk_threads_enter (<!-- -->);
*
* /<!---->* set label text *<!---->/
* if(data->what == YES_IT_IS)
* gtk_label_set_text (GTK_LABEL (data->label), "O yes, it is!");
* else
* gtk_label_set_text (GTK_LABEL (data->label), "O no, it isn't!");
* /<!---->* set label text *<!---->/
* if(data->what == YES_IT_IS)
* gtk_label_set_text (GTK_LABEL (data->label), "O yes, it is!");
* else
* gtk_label_set_text (GTK_LABEL (data->label), "O no, it isn't!");
*
* /<!---->* release GTK thread lock *<!---->/
* gdk_threads_leave (<!-- -->);
* }
* /<!---->* release GTK thread lock *<!---->/
* gdk_threads_leave (<!-- -->);
* }
* }
*
* return NULL;
@@ -724,10 +737,10 @@ gdk_threads_init (void)
**/
void
gdk_threads_set_lock_functions (GCallback enter_fn,
GCallback leave_fn)
GCallback leave_fn)
{
g_return_if_fail (gdk_threads_lock == NULL &&
gdk_threads_unlock == NULL);
gdk_threads_unlock == NULL);
gdk_threads_lock = enter_fn;
gdk_threads_unlock = leave_fn;
@@ -817,9 +830,9 @@ gdk_threads_dispatch_free (gpointer data)
*/
guint
gdk_threads_add_idle_full (gint priority,
GSourceFunc function,
gpointer data,
GDestroyNotify notify)
GSourceFunc function,
gpointer data,
GDestroyNotify notify)
{
GdkThreadsDispatch *dispatch;
@@ -852,7 +865,7 @@ gdk_threads_add_idle_full (gint priority,
*/
guint
gdk_threads_add_idle (GSourceFunc function,
gpointer data)
gpointer data)
{
return gdk_threads_add_idle_full (G_PRIORITY_DEFAULT_IDLE,
function, data, NULL);
@@ -973,9 +986,9 @@ gdk_threads_add_timeout (guint interval,
* @interval: the time between calls to the function, in seconds
* @function: function to call
* @data: data to pass to @function
* @notify: (allow-none): function to call when the timeout is removed, or %NULL
* @notify: (allow-none): function to call when the timeout is removed, or %NULL
*
* A variant of gdk_threads_add_timout_full() with second-granularity.
* A variant of gdk_threads_add_timeout_full() with second-granularity.
* See g_timeout_add_seconds_full() for a discussion of why it is
* a good idea to use this function if you don't need finer granularity.
*
@@ -1063,24 +1076,24 @@ gdk_set_program_class (const char *program_class)
}
/**
* gdk_enable_multidevice:
* gdk_disable_multidevice:
*
* Enables multidevice support in GDK. This call must happen prior
* Disables multidevice support in GDK. This call must happen prior
* to gdk_display_open(), gtk_init(), gtk_init_with_args() or
* gtk_init_check() in order to take effect.
*
* Note that individual #GdkWindow<!-- -->s still need to explicitly
* enable multidevice awareness through gdk_window_set_support_multidevice().
*
* This function must be called before initializing GDK.
* Most common GTK+ applications won't ever need to call this. Only
* applications that do mixed GDK/Xlib calls could want to disable
* multidevice support if such Xlib code deals with input devices in
* any way and doesn't observe the presence of XInput 2.
*
* Since: 3.0
**/
*/
void
gdk_enable_multidevice (void)
gdk_disable_multidevice (void)
{
if (gdk_initialized)
return;
_gdk_enable_multidevice = TRUE;
_gdk_disable_multidevice = TRUE;
}
+1 -3
View File
@@ -29,6 +29,7 @@
#define __GDK_H_INSIDE__
#include <gdk/gdkconfig.h>
#include <gdk/gdkapplaunchcontext.h>
#include <gdk/gdkcairo.h>
#include <gdk/gdkcolor.h>
@@ -38,10 +39,8 @@
#include <gdk/gdkdisplay.h>
#include <gdk/gdkdisplaymanager.h>
#include <gdk/gdkdnd.h>
#include <gdk/gdkdrawable.h>
#include <gdk/gdkenumtypes.h>
#include <gdk/gdkevents.h>
#include <gdk/gdkinput.h>
#include <gdk/gdkkeys.h>
#include <gdk/gdkkeysyms.h>
#include <gdk/gdkmain.h>
@@ -52,7 +51,6 @@
#include <gdk/gdkrgba.h>
#include <gdk/gdkscreen.h>
#include <gdk/gdkselection.h>
#include <gdk/gdkspawn.h>
#include <gdk/gdktestutils.h>
#include <gdk/gdkthreads.h>
#include <gdk/gdktypes.h>
+44 -50
View File
@@ -22,7 +22,6 @@ gdk_cairo_get_clip_rectangle
gdk_cairo_rectangle
gdk_cairo_region
gdk_cairo_region_create_from_surface
gdk_cairo_reset_clip
gdk_cairo_set_source_color
gdk_cairo_set_source_pixbuf
gdk_cairo_set_source_rgba
@@ -51,7 +50,6 @@ gdk_device_get_associated_device
gdk_device_get_axis
gdk_device_get_axis_use
gdk_device_get_axis_value
gdk_device_get_core_pointer
gdk_device_get_device_type
gdk_device_get_display
gdk_device_get_has_cursor
@@ -61,38 +59,37 @@ gdk_device_get_mode
gdk_device_get_name
gdk_device_get_n_axes
gdk_device_get_n_keys
gdk_device_get_position
gdk_device_get_source
gdk_device_get_state
gdk_device_get_type G_GNUC_CONST
gdk_device_get_window_at_position
gdk_device_grab
gdk_device_grab_info_libgtk_only
gdk_device_list_axes
gdk_device_manager_core_get_type
gdk_device_list_slave_devices
gdk_device_manager_get_client_pointer
gdk_device_manager_get_display
gdk_device_manager_get_type G_GNUC_CONST
gdk_device_manager_list_devices
gdk_device_manager_xi2_get_type
gdk_device_manager_xi_get_type
gdk_device_set_axis_use
gdk_device_set_key
gdk_device_set_mode
gdk_device_set_source
gdk_devices_list
gdk_device_type_get_type G_GNUC_CONST
gdk_device_ungrab
gdk_device_warp
gdk_disable_multidevice
gdk_display_add_client_message_filter
gdk_display_beep
gdk_display_close
gdk_display_device_is_grabbed
gdk_display_flush
gdk_display_get_core_pointer
gdk_display_get_app_launch_context
gdk_display_get_default
gdk_display_get_default_cursor_size
gdk_display_get_default_group
gdk_display_get_default_screen
gdk_display_get_device_manager
gdk_display_get_device_state
gdk_display_get_event
gdk_display_get_maximal_cursor_size
gdk_display_get_name
@@ -100,8 +97,8 @@ gdk_display_get_n_screens
gdk_display_get_pointer
gdk_display_get_screen
gdk_display_get_type G_GNUC_CONST
gdk_display_get_window_at_device_position
gdk_display_get_window_at_pointer
gdk_display_has_pending
gdk_display_is_closed
gdk_display_keyboard_ungrab
gdk_display_list_devices
@@ -109,7 +106,9 @@ gdk_display_manager_get
gdk_display_manager_get_default_display
gdk_display_manager_get_type G_GNUC_CONST
gdk_display_manager_list_displays
gdk_display_manager_open_display
gdk_display_manager_set_default_display
gdk_display_notify_startup_complete
gdk_display_open
gdk_display_open_default_libgtk_only
gdk_display_peek_event
@@ -130,36 +129,31 @@ gdk_display_supports_input_shapes
gdk_display_supports_selection_notification
gdk_display_supports_shapes
gdk_display_sync
gdk_display_warp_device
gdk_display_warp_pointer
gdk_drag_abort
gdk_drag_action_get_type G_GNUC_CONST
gdk_drag_begin
gdk_drag_begin_for_device
gdk_drag_context_get_actions
gdk_drag_context_get_dest_window
gdk_drag_context_get_device
gdk_drag_context_get_protocol
gdk_drag_context_get_selected_action
gdk_drag_context_get_source_window
gdk_drag_context_get_suggested_action
gdk_drag_context_get_type G_GNUC_CONST
gdk_drag_context_list_targets
gdk_drag_context_new
gdk_drag_context_set_device
gdk_drag_drop
gdk_drag_drop_succeeded
gdk_drag_find_window
gdk_drag_find_window_for_screen
gdk_drag_get_protocol
gdk_drag_get_protocol_for_display
gdk_drag_get_selection
gdk_drag_motion
gdk_drag_protocol_get_type G_GNUC_CONST
gdk_drag_status
gdk_drawable_get_clip_region
gdk_drawable_get_type G_GNUC_CONST
gdk_drawable_get_visible_region
gdk_drop_finish
gdk_drop_reply
gdk_enable_multidevice
gdk_error_trap_pop
gdk_error_trap_pop_ignored
gdk_error_trap_push
@@ -171,6 +165,7 @@ gdk_event_get_coords
gdk_event_get_device
gdk_event_get_root_coords
gdk_event_get_screen
gdk_event_get_source_device
gdk_event_get_state
gdk_event_get_time
gdk_event_get_type G_GNUC_CONST
@@ -185,20 +180,15 @@ gdk_event_send_client_message_for_display
gdk_event_send_clientmessage_toall
gdk_event_set_device
gdk_event_set_screen
gdk_event_set_source_device
gdk_events_get_angle
gdk_events_get_center
gdk_events_get_distance
gdk_events_pending
gdk_event_translator_get_handled_events
gdk_event_translator_get_type G_GNUC_CONST
gdk_event_translator_select_window_events
gdk_event_translator_translate
gdk_event_type_get_type G_GNUC_CONST
gdk_extension_mode_get_type G_GNUC_CONST
gdk_filter_return_get_type G_GNUC_CONST
gdk_flush
gdk_free_compound_text
gdk_free_text_list
gdk_get_default_root_window
gdk_get_display
gdk_get_display_arg_name
@@ -210,7 +200,6 @@ gdk_gravity_get_type G_GNUC_CONST
gdk_init
gdk_init_check
gdk_input_mode_get_type G_GNUC_CONST
gdk_input_set_extension_events
gdk_input_source_get_type G_GNUC_CONST
gdk_keyboard_grab
gdk_keyboard_ungrab
@@ -237,7 +226,6 @@ gdk_keyval_to_unicode G_GNUC_CONST
gdk_keyval_to_upper G_GNUC_CONST
gdk_list_visuals
gdk_modifier_type_get_type G_GNUC_CONST
gdk_net_wm_supports
gdk_notify_startup_complete
gdk_notify_startup_complete_with_id
gdk_notify_type_get_type G_GNUC_CONST
@@ -319,26 +307,16 @@ gdk_selection_property_get
gdk_selection_send_notify
gdk_selection_send_notify_for_display
gdk_set_double_click_time
gdk_set_locale
gdk_set_pointer_hooks
gdk_set_program_class
gdk_set_show_events
gdk_set_sm_client_id
gdk_setting_action_get_type G_GNUC_CONST
gdk_setting_get
gdk_spawn_command_line_on_screen
gdk_spawn_on_screen
gdk_spawn_on_screen_with_pipes
gdk_status_get_type G_GNUC_CONST
gdk_string_to_compound_text
gdk_string_to_compound_text_for_display
gdk_synthesize_window_state
gdk_test_render_sync
gdk_test_simulate_button
gdk_test_simulate_key
gdk_text_property_to_text_list
gdk_text_property_to_text_list_for_display
gdk_text_property_to_utf8_list
gdk_text_property_to_utf8_list_for_display
gdk_threads_add_idle
gdk_threads_add_idle_full
@@ -351,8 +329,6 @@ gdk_threads_init
gdk_threads_leave
gdk_threads_set_lock_functions
gdk_unicode_to_keyval G_GNUC_CONST
gdk_utf8_to_compound_text
gdk_utf8_to_compound_text_for_display
gdk_utf8_to_string_target
gdk_visibility_state_get_type G_GNUC_CONST
gdk_visual_get_best
@@ -390,7 +366,7 @@ gdk_window_begin_move_drag
gdk_window_begin_paint_rect
gdk_window_begin_paint_region
gdk_window_begin_resize_drag
gdk_window_class_get_type G_GNUC_CONST
gdk_window_window_class_get_type G_GNUC_CONST
gdk_window_configure_finished
gdk_window_constrain_size
gdk_window_coords_from_parent
@@ -405,8 +381,6 @@ gdk_window_end_paint
gdk_window_ensure_native
gdk_window_flush
gdk_window_focus
gdk_window_foreign_new
gdk_window_foreign_new_for_display
gdk_window_freeze_toplevel_updates_libgtk_only
gdk_window_freeze_updates
gdk_window_fullscreen
@@ -414,6 +388,7 @@ gdk_window_geometry_changed
gdk_window_get_accept_focus
gdk_window_get_background_pattern
gdk_window_get_children
gdk_window_get_clip_region
gdk_window_get_composited
gdk_window_get_cursor
gdk_window_get_decorations
@@ -437,12 +412,15 @@ gdk_window_get_position
gdk_window_get_root_coords
gdk_window_get_root_origin
gdk_window_get_screen
gdk_window_get_source_events
gdk_window_get_state
gdk_window_get_support_multidevice
gdk_window_get_toplevel
gdk_window_get_type G_GNUC_CONST
gdk_window_get_type_hint
gdk_window_get_update_area
gdk_window_get_user_data
gdk_window_get_visible_region
gdk_window_get_visual
gdk_window_get_width
gdk_window_get_window_type
@@ -461,8 +439,6 @@ gdk_window_is_input_only
gdk_window_is_shaped
gdk_window_is_viewable
gdk_window_is_visible
gdk_window_lookup
gdk_window_lookup_for_display
gdk_window_lower
gdk_window_maximize
gdk_window_merge_child_input_shapes
@@ -471,7 +447,6 @@ gdk_window_move
gdk_window_move_region
gdk_window_move_resize
gdk_window_new
gdk_window_object_get_type G_GNUC_CONST
gdk_window_peek_children
gdk_window_process_all_updates
gdk_window_process_updates
@@ -509,6 +484,7 @@ gdk_window_set_override_redirect
gdk_window_set_role
gdk_window_set_skip_pager_hint
gdk_window_set_skip_taskbar_hint
gdk_window_set_source_events
gdk_window_set_startup_id
gdk_window_set_static_gravities
gdk_window_set_support_multidevice
@@ -532,23 +508,37 @@ gdk_window_unstick
gdk_window_withdraw
gdk_wm_decoration_get_type G_GNUC_CONST
gdk_wm_function_get_type G_GNUC_CONST
gdk_x11_app_launch_context_get_type
gdk_x11_atom_to_xatom
gdk_x11_atom_to_xatom_for_display
gdk_x11_cursor_get_type
gdk_x11_cursor_get_xcursor
gdk_x11_cursor_get_xdisplay
gdk_x11_device_core_get_type
gdk_x11_device_manager_core_get_type
gdk_x11_device_manager_xi2_get_type
gdk_x11_device_manager_xi_get_type
gdk_x11_device_xi2_get_type
gdk_x11_device_xi_get_type
gdk_x11_display_broadcast_startup_message
gdk_x11_display_error_trap_pop
gdk_x11_display_error_trap_pop_ignored
gdk_x11_display_error_trap_push
gdk_x11_display_get_startup_notification_id
gdk_x11_display_get_type
gdk_x11_display_get_user_time
gdk_x11_display_get_xdisplay
gdk_x11_display_grab
gdk_x11_display_manager_get_type
gdk_x11_display_set_cursor_theme
gdk_x11_display_set_startup_notification_id
gdk_x11_display_string_to_compound_text
gdk_x11_display_text_property_to_text_list
gdk_x11_display_ungrab
gdk_x11_drawable_get_xdisplay
gdk_x11_drawable_get_xid
gdk_x11_display_utf8_to_compound_text
gdk_x11_drag_context_get_type
gdk_x11_free_compound_text
gdk_x11_free_text_list
gdk_x11_get_default_root_xwindow
gdk_x11_get_default_screen
gdk_x11_get_default_xdisplay
@@ -558,21 +548,25 @@ gdk_x11_get_xatom_by_name_for_display
gdk_x11_get_xatom_name
gdk_x11_get_xatom_name_for_display
gdk_x11_grab_server
gdk_x11_keymap_get_type
gdk_x11_lookup_xdisplay
gdk_x11_register_standard_event_type
gdk_x11_screen_get_monitor_output
gdk_x11_screen_get_screen_number
gdk_x11_screen_get_type
gdk_x11_screen_get_window_manager_name
gdk_x11_screen_get_xscreen
gdk_x11_screen_lookup_visual
gdk_x11_screen_supports_net_wm_hint
gdk_x11_set_sm_client_id
gdk_x11_ungrab_server
gdk_x11_visual_get_type
gdk_x11_visual_get_xvisual
gdk_x11_window_get_drawable_impl
gdk_x11_window_foreign_new_for_display
gdk_x11_window_lookup_for_display
gdk_x11_window_get_type
gdk_x11_window_get_xid
gdk_x11_window_move_to_current_desktop
gdk_x11_window_set_user_time
gdk_x11_xatom_to_atom
gdk_x11_xatom_to_atom_for_display
gdk_xid_table_lookup
gdk_xid_table_lookup_for_display
gdkx_visual_get
+125 -72
View File
@@ -22,9 +22,7 @@
#include "config.h"
#include "gdkapplaunchcontext.h"
#include "gdkinternals.h"
#include "gdkapplaunchcontextprivate.h"
#include "gdkscreen.h"
#include "gdkintl.h"
@@ -43,9 +41,9 @@
* <programlisting>
* GdkAppLaunchContext *context;
*
* context = gdk_app_launch_context_new (<!-- -->);
* context = gdk_display_get_app_launch_context (display);
*
* gdk_app_launch_context_set_screen (my_screen);
* gdk_app_launch_context_set_screen (screen);
* gdk_app_launch_context_set_timestamp (event->time);
*
* if (!g_app_info_launch_default_for_uri ("http://www.gtk.org", context, &error))
@@ -61,10 +59,56 @@ static void gdk_app_launch_context_finalize (GObject *object);
static gchar * gdk_app_launch_context_get_display (GAppLaunchContext *context,
GAppInfo *info,
GList *files);
static gchar * gdk_app_launch_context_get_startup_notify_id (GAppLaunchContext *context,
GAppInfo *info,
GList *files);
static void gdk_app_launch_context_launch_failed (GAppLaunchContext *context,
const gchar *startup_notify_id);
G_DEFINE_TYPE (GdkAppLaunchContext, gdk_app_launch_context,
G_TYPE_APP_LAUNCH_CONTEXT)
enum
{
PROP_0,
PROP_DISPLAY
};
G_DEFINE_TYPE (GdkAppLaunchContext, gdk_app_launch_context, G_TYPE_APP_LAUNCH_CONTEXT)
static void
gdk_app_launch_context_get_property (GObject *object,
guint prop_id,
GValue *value,
GParamSpec *pspec)
{
GdkAppLaunchContext *context = GDK_APP_LAUNCH_CONTEXT (object);
switch (prop_id)
{
case PROP_DISPLAY:
g_value_set_object (value, context->display);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
}
}
static void
gdk_app_launch_context_set_property (GObject *object,
guint prop_id,
const GValue *value,
GParamSpec *pspec)
{
GdkAppLaunchContext *context = GDK_APP_LAUNCH_CONTEXT (object);
switch (prop_id)
{
case PROP_DISPLAY:
context->display = g_value_dup_object (value);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
}
}
static void
gdk_app_launch_context_class_init (GdkAppLaunchContextClass *klass)
@@ -72,44 +116,42 @@ gdk_app_launch_context_class_init (GdkAppLaunchContextClass *klass)
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
GAppLaunchContextClass *context_class = G_APP_LAUNCH_CONTEXT_CLASS (klass);
gobject_class->set_property = gdk_app_launch_context_set_property,
gobject_class->get_property = gdk_app_launch_context_get_property;
gobject_class->finalize = gdk_app_launch_context_finalize;
context_class->get_display = gdk_app_launch_context_get_display;
context_class->get_startup_notify_id = _gdk_windowing_get_startup_notify_id;
context_class->launch_failed = _gdk_windowing_launch_failed;
context_class->get_startup_notify_id = gdk_app_launch_context_get_startup_notify_id;
context_class->launch_failed = gdk_app_launch_context_launch_failed;
g_type_class_add_private (klass, sizeof (GdkAppLaunchContextPrivate));
g_object_class_install_property (gobject_class, PROP_DISPLAY,
g_param_spec_object ("display", P_("Display"), P_("Display"),
GDK_TYPE_DISPLAY,
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS));
}
static void
gdk_app_launch_context_init (GdkAppLaunchContext *context)
{
context->priv = G_TYPE_INSTANCE_GET_PRIVATE (context,
GDK_TYPE_APP_LAUNCH_CONTEXT,
GdkAppLaunchContextPrivate);
context->priv->workspace = -1;
context->workspace = -1;
}
static void
gdk_app_launch_context_finalize (GObject *object)
{
GdkAppLaunchContext *context;
GdkAppLaunchContextPrivate *priv;
GdkAppLaunchContext *context = GDK_APP_LAUNCH_CONTEXT (object);
context = GDK_APP_LAUNCH_CONTEXT (object);
if (context->display)
g_object_unref (context->display);
priv = context->priv;
if (context->screen)
g_object_unref (context->screen);
if (priv->display)
g_object_unref (priv->display);
if (context->icon)
g_object_unref (context->icon);
if (priv->screen)
g_object_unref (priv->screen);
if (priv->icon)
g_object_unref (priv->icon);
g_free (priv->icon_name);
g_free (context->icon_name);
G_OBJECT_CLASS (gdk_app_launch_context_parent_class)->finalize (object);
}
@@ -119,16 +161,14 @@ gdk_app_launch_context_get_display (GAppLaunchContext *context,
GAppInfo *info,
GList *files)
{
GdkAppLaunchContext *ctx = GDK_APP_LAUNCH_CONTEXT (context);
GdkDisplay *display;
GdkAppLaunchContextPrivate *priv;
priv = GDK_APP_LAUNCH_CONTEXT (context)->priv;
if (ctx->screen)
return gdk_screen_make_display_name (ctx->screen);
if (priv->screen)
return gdk_screen_make_display_name (priv->screen);
if (priv->display)
display = priv->display;
if (ctx->display)
display = ctx->display;
else
display = gdk_display_get_default ();
@@ -144,22 +184,17 @@ gdk_app_launch_context_get_display (GAppLaunchContext *context,
* using this context. See also gdk_app_launch_context_set_screen().
*
* Since: 2.14
*
* Deprecated: 3.0: Use gdk_display_get_app_launch_context() instead
*/
void
gdk_app_launch_context_set_display (GdkAppLaunchContext *context,
GdkDisplay *display)
GdkDisplay *display)
{
g_return_if_fail (GDK_IS_APP_LAUNCH_CONTEXT (context));
g_return_if_fail (display == NULL || GDK_IS_DISPLAY (display));
if (context->priv->display)
{
g_object_unref (context->priv->display);
context->priv->display = NULL;
}
if (display)
context->priv->display = g_object_ref (display);
g_warn_if_fail (display == NULL || display == context->display);
}
/**
@@ -178,19 +213,21 @@ gdk_app_launch_context_set_display (GdkAppLaunchContext *context,
*/
void
gdk_app_launch_context_set_screen (GdkAppLaunchContext *context,
GdkScreen *screen)
GdkScreen *screen)
{
g_return_if_fail (GDK_IS_APP_LAUNCH_CONTEXT (context));
g_return_if_fail (screen == NULL || GDK_IS_SCREEN (screen));
if (context->priv->screen)
g_return_if_fail (screen == NULL || gdk_screen_get_display (screen) == context->display);
if (context->screen)
{
g_object_unref (context->priv->screen);
context->priv->screen = NULL;
g_object_unref (context->screen);
context->screen = NULL;
}
if (screen)
context->priv->screen = g_object_ref (screen);
context->screen = g_object_ref (screen);
}
/**
@@ -199,12 +236,12 @@ gdk_app_launch_context_set_screen (GdkAppLaunchContext *context,
* @desktop: the number of a workspace, or -1
*
* Sets the workspace on which applications will be launched when
* using this context when running under a window manager that
* supports multiple workspaces, as described in the
* <ulink url="http://www.freedesktop.org/Standards/wm-spec">Extended
* Window Manager Hints</ulink>.
* using this context when running under a window manager that
* supports multiple workspaces, as described in the
* <ulink url="http://www.freedesktop.org/Standards/wm-spec">Extended
* Window Manager Hints</ulink>.
*
* When the workspace is not specified or @desktop is set to -1,
* When the workspace is not specified or @desktop is set to -1,
* it is up to the window manager to pick one, typically it will
* be the current workspace.
*
@@ -212,11 +249,11 @@ gdk_app_launch_context_set_screen (GdkAppLaunchContext *context,
*/
void
gdk_app_launch_context_set_desktop (GdkAppLaunchContext *context,
gint desktop)
gint desktop)
{
g_return_if_fail (GDK_IS_APP_LAUNCH_CONTEXT (context));
context->priv->workspace = desktop;
context->workspace = desktop;
}
/**
@@ -225,7 +262,7 @@ gdk_app_launch_context_set_desktop (GdkAppLaunchContext *context,
* @timestamp: a timestamp
*
* Sets the timestamp of @context. The timestamp should ideally
* be taken from the event that triggered the launch.
* be taken from the event that triggered the launch.
*
* Window managers can use this information to avoid moving the
* focus to the newly launched application when the user is busy
@@ -236,11 +273,11 @@ gdk_app_launch_context_set_desktop (GdkAppLaunchContext *context,
*/
void
gdk_app_launch_context_set_timestamp (GdkAppLaunchContext *context,
guint32 timestamp)
guint32 timestamp)
{
g_return_if_fail (GDK_IS_APP_LAUNCH_CONTEXT (context));
context->priv->timestamp = timestamp;
context->timestamp = timestamp;
}
/**
@@ -265,14 +302,14 @@ gdk_app_launch_context_set_icon (GdkAppLaunchContext *context,
g_return_if_fail (GDK_IS_APP_LAUNCH_CONTEXT (context));
g_return_if_fail (icon == NULL || G_IS_ICON (icon));
if (context->priv->icon)
if (context->icon)
{
g_object_unref (context->priv->icon);
context->priv->icon = NULL;
g_object_unref (context->icon);
context->icon = NULL;
}
if (icon)
context->priv->icon = g_object_ref (icon);
context->icon = g_object_ref (icon);
}
/**
@@ -280,25 +317,25 @@ gdk_app_launch_context_set_icon (GdkAppLaunchContext *context,
* @context: a #GdkAppLaunchContext
* @icon_name: (allow-none): an icon name, or %NULL
*
* Sets the icon for applications that are launched with this context.
* The @icon_name will be interpreted in the same way as the Icon field
* in desktop files. See also gdk_app_launch_context_set_icon().
* Sets the icon for applications that are launched with this context.
* The @icon_name will be interpreted in the same way as the Icon field
* in desktop files. See also gdk_app_launch_context_set_icon().
*
* If both @icon and @icon_name are set, the @icon_name takes priority.
* If neither @icon or @icon_name is set, the icon is taken from either
* the file that is passed to launched application or from the #GAppInfo
* If neither @icon or @icon_name is set, the icon is taken from either
* the file that is passed to launched application or from the #GAppInfo
* for the launched application itself.
*
*
* Since: 2.14
*/
void
gdk_app_launch_context_set_icon_name (GdkAppLaunchContext *context,
const char *icon_name)
const char *icon_name)
{
g_return_if_fail (GDK_IS_APP_LAUNCH_CONTEXT (context));
g_free (context->priv->icon_name);
context->priv->icon_name = g_strdup (icon_name);
g_free (context->icon_name);
context->icon_name = g_strdup (icon_name);
}
/**
@@ -309,9 +346,25 @@ gdk_app_launch_context_set_icon_name (GdkAppLaunchContext *context,
* Returns: a new #GdkAppLaunchContext
*
* Since: 2.14
*
* Deprecated: 3.0: Use gdk_display_get_app_launch_context() instead
*/
GdkAppLaunchContext *
gdk_app_launch_context_new (void)
{
return g_object_new (GDK_TYPE_APP_LAUNCH_CONTEXT, NULL);
return gdk_display_get_app_launch_context (gdk_display_get_default ());
}
static char *
gdk_app_launch_context_get_startup_notify_id (GAppLaunchContext *context,
GAppInfo *info,
GList *files)
{
return NULL;
}
static void
gdk_app_launch_context_launch_failed (GAppLaunchContext *context,
const gchar *startup_notify_id)
{
}
+9 -24
View File
@@ -28,48 +28,33 @@
#define __GDK_APP_LAUNCH_CONTEXT_H__
#include <gio/gio.h>
#include <gdk/gdktypes.h>
#include <gdk/gdkscreen.h>
G_BEGIN_DECLS
#define GDK_TYPE_APP_LAUNCH_CONTEXT (gdk_app_launch_context_get_type ())
#define GDK_APP_LAUNCH_CONTEXT(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GDK_TYPE_APP_LAUNCH_CONTEXT, GdkAppLaunchContext))
#define GDK_APP_LAUNCH_CONTEXT_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GDK_TYPE_APP_LAUNCH_CONTEXT, GdkAppLaunchContextClass))
#define GDK_IS_APP_LAUNCH_CONTEXT(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDK_TYPE_APP_LAUNCH_CONTEXT))
#define GDK_IS_APP_LAUNCH_CONTEXT_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GDK_TYPE_APP_LAUNCH_CONTEXT))
#define GDK_APP_LAUNCH_CONTEXT_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GDK_TYPE_APP_LAUNCH_CONTEXT, GdkAppLaunchContextClass))
typedef struct GdkAppLaunchContext GdkAppLaunchContext;
typedef struct GdkAppLaunchContextClass GdkAppLaunchContextClass;
typedef struct GdkAppLaunchContextPrivate GdkAppLaunchContextPrivate;
struct GdkAppLaunchContext
{
GAppLaunchContext parent_instance;
GdkAppLaunchContextPrivate *priv;
};
struct GdkAppLaunchContextClass
{
GAppLaunchContextClass parent_class;
};
GType gdk_app_launch_context_get_type (void);
#ifndef GDK_DISABLE_DEPRECATED
GdkAppLaunchContext *gdk_app_launch_context_new (void);
void gdk_app_launch_context_set_display (GdkAppLaunchContext *context,
GdkDisplay *display);
GdkDisplay *display);
#endif
void gdk_app_launch_context_set_screen (GdkAppLaunchContext *context,
GdkScreen *screen);
GdkScreen *screen);
void gdk_app_launch_context_set_desktop (GdkAppLaunchContext *context,
gint desktop);
gint desktop);
void gdk_app_launch_context_set_timestamp (GdkAppLaunchContext *context,
guint32 timestamp);
guint32 timestamp);
void gdk_app_launch_context_set_icon (GdkAppLaunchContext *context,
GIcon *icon);
GIcon *icon);
void gdk_app_launch_context_set_icon_name (GdkAppLaunchContext *context,
const char *icon_name);
const char *icon_name);
G_END_DECLS
+50
View File
@@ -0,0 +1,50 @@
/* GDK - The GIMP Drawing Kit
* Copyright (C) 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.
*/
#ifndef __GDK_APP_LAUNCH_CONTEXT_PRIVATE_H__
#define __GDK_APP_LAUNCH_CONTEXT_PRIVATE_H__
#include <gio/gio.h>
#include "gdkapplaunchcontext.h"
#include "gdktypes.h"
G_BEGIN_DECLS
#define GDK_APP_LAUNCH_CONTEXT_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GDK_TYPE_APP_LAUNCH_CONTEXT, GdkAppLaunchContextClass))
#define GDK_IS_APP_LAUNCH_CONTEXT_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GDK_TYPE_APP_LAUNCH_CONTEXT))
#define GDK_APP_LAUNCH_CONTEXT_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GDK_TYPE_APP_LAUNCH_CONTEXT, GdkAppLaunchContextClass))
typedef GAppLaunchContextClass GdkAppLaunchContextClass;
struct _GdkAppLaunchContext
{
GAppLaunchContext parent_instance;
GdkDisplay *display;
GdkScreen *screen;
gint workspace;
guint32 timestamp;
GIcon *icon;
char *icon_name;
};
G_END_DECLS
#endif
+11 -67
View File
@@ -21,7 +21,6 @@
#include "gdkcairo.h"
#include "gdkdrawable.h"
#include "gdkinternals.h"
#include <math.h>
@@ -42,70 +41,6 @@
*/
/**
* gdk_cairo_create:
* @drawable: a #GdkDrawable
*
* Creates a Cairo context for drawing to @drawable.
*
* <note><para>
* Note that due to double-buffering, Cairo contexts created
* in a GTK+ expose event handler cannot be cached and reused
* between different expose events.
* </para></note>
*
* Return value: A newly created Cairo context. Free with
* cairo_destroy() when you are done drawing.
*
* Since: 2.8
**/
cairo_t *
gdk_cairo_create (GdkDrawable *drawable)
{
cairo_surface_t *surface;
cairo_t *cr;
g_return_val_if_fail (GDK_IS_DRAWABLE (drawable), NULL);
surface = _gdk_drawable_ref_cairo_surface (drawable);
cr = cairo_create (surface);
if (GDK_DRAWABLE_GET_CLASS (drawable)->set_cairo_clip)
GDK_DRAWABLE_GET_CLASS (drawable)->set_cairo_clip (drawable, cr);
cairo_surface_destroy (surface);
return cr;
}
/**
* gdk_cairo_reset_clip:
* @cr: a #cairo_t
* @drawable: a #GdkDrawable
*
* Resets the clip region for a Cairo context created by gdk_cairo_create().
*
* This resets the clip region to the "empty" state for the given drawable.
* This is required for non-native windows since a direct call to
* cairo_reset_clip() would unset the clip region inherited from the
* drawable (i.e. the window clip region), and thus let you e.g.
* draw outside your window.
*
* This is rarely needed though, since most code just create a new cairo_t
* using gdk_cairo_create() each time they want to draw something.
*
* Since: 2.18
**/
void
gdk_cairo_reset_clip (cairo_t *cr,
GdkDrawable *drawable)
{
cairo_reset_clip (cr);
if (GDK_DRAWABLE_GET_CLASS (drawable)->set_cairo_clip)
GDK_DRAWABLE_GET_CLASS (drawable)->set_cairo_clip (drawable, cr);
}
/**
* gdk_cairo_get_clip_rectangle:
* @cr: a cairo context
@@ -149,7 +84,7 @@ gdk_cairo_get_clip_rectangle (cairo_t *cr,
* gdk_cairo_set_source_color:
* @cr: a #cairo_t
* @color: a #GdkColor
*
*
* Sets the specified #GdkColor as the source color of @cr.
*
* Since: 2.8
@@ -167,6 +102,15 @@ gdk_cairo_set_source_color (cairo_t *cr,
color->blue / 65535.);
}
/**
* gdk_cairo_set_source_rgba:
* @cr: a #cairo_t
* @rgba: a #GdkRGBA
*
* Sets the specified #GdkRGBA as the source color of @cr.
*
* Since: 3.0
**/
void
gdk_cairo_set_source_rgba (cairo_t *cr,
const GdkRGBA *rgba)
@@ -363,7 +307,7 @@ gdk_cairo_set_source_window (cairo_t *cr,
g_return_if_fail (cr != NULL);
g_return_if_fail (GDK_IS_WINDOW (window));
surface = _gdk_drawable_ref_cairo_surface (GDK_DRAWABLE (window));
surface = _gdk_window_ref_cairo_surface (window);
cairo_set_source_surface (cr, surface, x, y);
cairo_surface_destroy (surface);
}
+1 -3
View File
@@ -31,9 +31,7 @@
G_BEGIN_DECLS
cairo_t *gdk_cairo_create (GdkDrawable *drawable);
void gdk_cairo_reset_clip (cairo_t *cr,
GdkDrawable *drawable);
cairo_t *gdk_cairo_create (GdkWindow *window);
gboolean gdk_cairo_get_clip_rectangle(cairo_t *cr,
GdkRectangle *rect);
+286 -22
View File
@@ -27,8 +27,9 @@
#include "config.h"
#include "gdkcursor.h"
#include "gdkdisplay.h"
#include "gdkcursorprivate.h"
#include "gdkdisplayprivate.h"
#include "gdkintl.h"
#include "gdkinternals.h"
@@ -53,28 +54,112 @@
* #GdkWindowAttr struct passed to gdk_window_new().
*/
/**
* GdkCursor:
*
* The #GdkCursor structure represents a cursor. Its contents are private.
*/
G_DEFINE_BOXED_TYPE (GdkCursor, gdk_cursor,
gdk_cursor_ref,
gdk_cursor_unref)
enum {
PROP_0,
PROP_CURSOR_TYPE,
PROP_DISPLAY
};
G_DEFINE_ABSTRACT_TYPE (GdkCursor, gdk_cursor, G_TYPE_OBJECT)
static void
gdk_cursor_get_property (GObject *object,
guint prop_id,
GValue *value,
GParamSpec *pspec)
{
GdkCursor *cursor = GDK_CURSOR (object);
switch (prop_id)
{
case PROP_CURSOR_TYPE:
g_value_set_enum (value, cursor->type);
break;
case PROP_DISPLAY:
g_value_set_object (value, cursor->display);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
}
}
static void
gdk_cursor_set_property (GObject *object,
guint prop_id,
const GValue *value,
GParamSpec *pspec)
{
GdkCursor *cursor = GDK_CURSOR (object);
switch (prop_id)
{
case PROP_CURSOR_TYPE:
cursor->type = g_value_get_enum (value);
break;
case PROP_DISPLAY:
cursor->display = g_value_get_object (value);
/* check that implementations actually provide the display when constructing */
g_assert (cursor->display != NULL);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
}
}
static void
gdk_cursor_class_init (GdkCursorClass *cursor_class)
{
GObjectClass *object_class = G_OBJECT_CLASS (cursor_class);
object_class->get_property = gdk_cursor_get_property;
object_class->set_property = gdk_cursor_set_property;
g_object_class_install_property (object_class,
PROP_CURSOR_TYPE,
g_param_spec_enum ("cursor-type",
P_("Cursor type"),
P_("Standard cursor type"),
GDK_TYPE_CURSOR_TYPE, GDK_X_CURSOR,
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
g_object_class_install_property (object_class,
PROP_DISPLAY,
g_param_spec_object ("display",
P_("Display"),
P_("Display of this cursor"),
GDK_TYPE_DISPLAY,
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
}
static void
gdk_cursor_init (GdkCursor *cursor)
{
}
/**
* gdk_cursor_ref:
* @cursor: a #GdkCursor
*
*
* Adds a reference to @cursor.
*
*
* Return value: Same @cursor that was passed in
**/
*
* Deprecated: 3.0: Use g_object_ref() instead
*/
GdkCursor*
gdk_cursor_ref (GdkCursor *cursor)
{
g_return_val_if_fail (cursor != NULL, NULL);
g_return_val_if_fail (cursor->ref_count > 0, NULL);
cursor->ref_count += 1;
return cursor;
return g_object_ref (cursor);
}
/**
@@ -83,31 +168,28 @@ gdk_cursor_ref (GdkCursor *cursor)
*
* Removes a reference from @cursor, deallocating the cursor
* if no references remain.
*
**/
*
* Deprecated: 3.0: Use g_object_unref() instead
*/
void
gdk_cursor_unref (GdkCursor *cursor)
{
g_return_if_fail (cursor != NULL);
g_return_if_fail (cursor->ref_count > 0);
cursor->ref_count -= 1;
if (cursor->ref_count == 0)
_gdk_cursor_destroy (cursor);
g_object_unref (cursor);
}
/**
* gdk_cursor_new:
* @cursor_type: cursor to create
*
*
* Creates a new cursor from the set of builtin cursors for the default display.
* See gdk_cursor_new_for_display().
*
* To make the cursor invisible, use %GDK_BLANK_CURSOR.
*
*
* Return value: a new #GdkCursor
**/
*/
GdkCursor*
gdk_cursor_new (GdkCursorType cursor_type)
{
@@ -131,3 +213,185 @@ gdk_cursor_get_cursor_type (GdkCursor *cursor)
return cursor->type;
}
/**
* gdk_cursor_new_for_display:
* @display: the #GdkDisplay for which the cursor will be created
* @cursor_type: cursor to create
*
* Creates a new cursor from the set of builtin cursors.
* Some useful ones are:
* <itemizedlist>
* <listitem><para>
* <inlinegraphic format="PNG" fileref="right_ptr.png"></inlinegraphic> #GDK_RIGHT_PTR (right-facing arrow)
* </para></listitem>
* <listitem><para>
* <inlinegraphic format="PNG" fileref="crosshair.png"></inlinegraphic> #GDK_CROSSHAIR (crosshair)
* </para></listitem>
* <listitem><para>
* <inlinegraphic format="PNG" fileref="xterm.png"></inlinegraphic> #GDK_XTERM (I-beam)
* </para></listitem>
* <listitem><para>
* <inlinegraphic format="PNG" fileref="watch.png"></inlinegraphic> #GDK_WATCH (busy)
* </para></listitem>
* <listitem><para>
* <inlinegraphic format="PNG" fileref="fleur.png"></inlinegraphic> #GDK_FLEUR (for moving objects)
* </para></listitem>
* <listitem><para>
* <inlinegraphic format="PNG" fileref="hand1.png"></inlinegraphic> #GDK_HAND1 (a right-pointing hand)
* </para></listitem>
* <listitem><para>
* <inlinegraphic format="PNG" fileref="hand2.png"></inlinegraphic> #GDK_HAND2 (a left-pointing hand)
* </para></listitem>
* <listitem><para>
* <inlinegraphic format="PNG" fileref="left_side.png"></inlinegraphic> #GDK_LEFT_SIDE (resize left side)
* </para></listitem>
* <listitem><para>
* <inlinegraphic format="PNG" fileref="right_side.png"></inlinegraphic> #GDK_RIGHT_SIDE (resize right side)
* </para></listitem>
* <listitem><para>
* <inlinegraphic format="PNG" fileref="top_left_corner.png"></inlinegraphic> #GDK_TOP_LEFT_CORNER (resize northwest corner)
* </para></listitem>
* <listitem><para>
* <inlinegraphic format="PNG" fileref="top_right_corner.png"></inlinegraphic> #GDK_TOP_RIGHT_CORNER (resize northeast corner)
* </para></listitem>
* <listitem><para>
* <inlinegraphic format="PNG" fileref="bottom_left_corner.png"></inlinegraphic> #GDK_BOTTOM_LEFT_CORNER (resize southwest corner)
* </para></listitem>
* <listitem><para>
* <inlinegraphic format="PNG" fileref="bottom_right_corner.png"></inlinegraphic> #GDK_BOTTOM_RIGHT_CORNER (resize southeast corner)
* </para></listitem>
* <listitem><para>
* <inlinegraphic format="PNG" fileref="top_side.png"></inlinegraphic> #GDK_TOP_SIDE (resize top side)
* </para></listitem>
* <listitem><para>
* <inlinegraphic format="PNG" fileref="bottom_side.png"></inlinegraphic> #GDK_BOTTOM_SIDE (resize bottom side)
* </para></listitem>
* <listitem><para>
* <inlinegraphic format="PNG" fileref="sb_h_double_arrow.png"></inlinegraphic> #GDK_SB_H_DOUBLE_ARROW (move vertical splitter)
* </para></listitem>
* <listitem><para>
* <inlinegraphic format="PNG" fileref="sb_v_double_arrow.png"></inlinegraphic> #GDK_SB_V_DOUBLE_ARROW (move horizontal splitter)
* </para></listitem>
* <listitem><para>
* #GDK_BLANK_CURSOR (Blank cursor). Since 2.16
* </para></listitem>
* </itemizedlist>
*
* Return value: a new #GdkCursor
*
* Since: 2.2
**/
GdkCursor*
gdk_cursor_new_for_display (GdkDisplay *display,
GdkCursorType cursor_type)
{
g_return_val_if_fail (GDK_IS_DISPLAY (display), NULL);
return GDK_DISPLAY_GET_CLASS (display)->get_cursor_for_type (display, cursor_type);
}
/**
* gdk_cursor_new_from_name:
* @display: the #GdkDisplay for which the cursor will be created
* @name: the name of the cursor
*
* Creates a new cursor by looking up @name in the current cursor
* theme.
*
* Returns: a new #GdkCursor, or %NULL if there is no cursor with
* the given name
*
* Since: 2.8
*/
GdkCursor*
gdk_cursor_new_from_name (GdkDisplay *display,
const gchar *name)
{
g_return_val_if_fail (GDK_IS_DISPLAY (display), NULL);
return GDK_DISPLAY_GET_CLASS (display)->get_cursor_for_name (display, name);
}
/**
* gdk_cursor_new_from_pixbuf:
* @display: the #GdkDisplay for which the cursor will be created
* @pixbuf: the #GdkPixbuf containing the cursor image
* @x: the horizontal offset of the 'hotspot' of the cursor.
* @y: the vertical offset of the 'hotspot' of the cursor.
*
* Creates a new cursor from a pixbuf.
*
* Not all GDK backends support RGBA cursors. If they are not
* supported, a monochrome approximation will be displayed.
* The functions gdk_display_supports_cursor_alpha() and
* gdk_display_supports_cursor_color() can be used to determine
* whether RGBA cursors are supported;
* gdk_display_get_default_cursor_size() and
* gdk_display_get_maximal_cursor_size() give information about
* cursor sizes.
*
* If @x or @y are <literal>-1</literal>, the pixbuf must have
* options named "x_hot" and "y_hot", resp., containing
* integer values between %0 and the width resp. height of
* the pixbuf. (Since: 3.0)
*
* On the X backend, support for RGBA cursors requires a
* sufficently new version of the X Render extension.
*
* Returns: a new #GdkCursor.
*
* Since: 2.4
*/
GdkCursor *
gdk_cursor_new_from_pixbuf (GdkDisplay *display,
GdkPixbuf *pixbuf,
gint x,
gint y)
{
g_return_val_if_fail (GDK_IS_DISPLAY (display), NULL);
g_return_val_if_fail (GDK_IS_PIXBUF (pixbuf), NULL);
return GDK_DISPLAY_GET_CLASS (display)->get_cursor_for_pixbuf (display, pixbuf, x, y);
}
/**
* gdk_cursor_get_display:
* @cursor: a #GdkCursor.
*
* Returns the display on which the #GdkCursor is defined.
*
* Returns: (transfer none): the #GdkDisplay associated to @cursor
*
* Since: 2.2
*/
GdkDisplay *
gdk_cursor_get_display (GdkCursor *cursor)
{
g_return_val_if_fail (GDK_IS_CURSOR (cursor), NULL);
return cursor->display;
}
/**
* gdk_cursor_get_image:
* @cursor: a #GdkCursor
*
* Returns a #GdkPixbuf with the image used to display the cursor.
*
* Note that depending on the capabilities of the windowing system and
* on the cursor, GDK may not be able to obtain the image data. In this
* case, %NULL is returned.
*
* Returns: (transfer full): a #GdkPixbuf representing @cursor, or %NULL
*
* Since: 2.8
*/
GdkPixbuf*
gdk_cursor_get_image (GdkCursor *cursor)
{
g_return_val_if_fail (GDK_IS_CURSOR (cursor), NULL);
return GDK_CURSOR_GET_CLASS (cursor)->get_image (cursor);
}
+9 -16
View File
@@ -36,7 +36,10 @@
G_BEGIN_DECLS
#define GDK_TYPE_CURSOR (gdk_cursor_get_type ())
#define GDK_TYPE_CURSOR (gdk_cursor_get_type ())
#define GDK_CURSOR(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_CURSOR, GdkCursor))
#define GDK_IS_CURSOR(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_CURSOR))
/**
* GdkCursorType:
@@ -208,18 +211,6 @@ typedef enum
GDK_CURSOR_IS_PIXMAP = -1
} GdkCursorType;
/**
* GdkCursor:
*
* A #GdkCursor structure represents a cursor.
*/
struct _GdkCursor
{
/*< private >*/
GdkCursorType GSEAL (type);
guint GSEAL (ref_count);
};
/* Cursors
*/
@@ -234,11 +225,13 @@ GdkCursor* gdk_cursor_new_from_pixbuf (GdkDisplay *display,
GdkPixbuf *pixbuf,
gint x,
gint y);
GdkDisplay* gdk_cursor_get_display (GdkCursor *cursor);
GdkCursor* gdk_cursor_ref (GdkCursor *cursor);
void gdk_cursor_unref (GdkCursor *cursor);
GdkCursor* gdk_cursor_new_from_name (GdkDisplay *display,
const gchar *name);
GdkDisplay* gdk_cursor_get_display (GdkCursor *cursor);
#ifndef GDK_DISABLE_DEPRECATED
GdkCursor* gdk_cursor_ref (GdkCursor *cursor);
void gdk_cursor_unref (GdkCursor *cursor);
#endif
GdkPixbuf* gdk_cursor_get_image (GdkCursor *cursor);
GdkCursorType gdk_cursor_get_cursor_type (GdkCursor *cursor);
+20 -22
View File
@@ -24,37 +24,35 @@
* GTK+ at ftp://ftp.gtk.org/pub/gtk/.
*/
#if !defined (__GDK_H_INSIDE__) && !defined (GDK_COMPILATION)
#error "Only <gdk/gdk.h> can be included directly."
#endif
#ifndef __GDK_CURSOR_PRIVATE_H__
#define __GDK_CURSOR_PRIVATE_H__
#ifndef __GDK_INPUT_H__
#define __GDK_INPUT_H__
#include <gdk/gdktypes.h>
#include <gdk/gdkdevice.h>
#include <gdk/gdkcursor.h>
G_BEGIN_DECLS
#if !defined (GDK_MULTIDEVICE_SAFE) && !defined (GDK_DISABLE_DEPRECATED)
#define GDK_CURSOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_CURSOR, GdkCursorClass))
#define GDK_IS_CURSOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_CURSOR))
#define GDK_CURSOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_CURSOR, GdkCursorClass))
#ifndef GDK_MULTIHEAD_SAFE
typedef struct _GdkCursorClass GdkCursorClass;
/* Returns a list of GdkDevice * */
GList * gdk_devices_list (void);
struct _GdkCursor
{
GObject parent_instance;
#ifndef GTK_DISABLE_DEPRECATED
GdkDevice *gdk_device_get_core_pointer (void);
#endif
/*< private >*/
GdkCursorType type;
GdkDisplay *display;
};
#endif /* GDK_MULTIHEAD_SAFE */
struct _GdkCursorClass
{
GObjectClass parent_class;
void gdk_input_set_extension_events (GdkWindow *window,
gint mask,
GdkExtensionMode mode);
#endif /* !GDK_MULTIDEVICE_SAFE && GDK_DISABLE_DEPRECATED */
GdkPixbuf * (* get_image) (GdkCursor * cursor);
};
G_END_DECLS
#endif /* __GDK_INPUT_H__ */
#endif /* __GDK_CURSOR_PRIVATE_H__ */
+417 -232
View File
File diff suppressed because it is too large Load Diff
+32 -29
View File
@@ -33,8 +33,6 @@ G_BEGIN_DECLS
#define GDK_DEVICE(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GDK_TYPE_DEVICE, GdkDevice))
#define GDK_IS_DEVICE(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDK_TYPE_DEVICE))
typedef struct _GdkDevice GdkDevice;
typedef struct _GdkDevicePrivate GdkDevicePrivate;
typedef struct _GdkTimeCoord GdkTimeCoord;
/**
@@ -156,27 +154,17 @@ struct _GdkTimeCoord
gdouble axes[GDK_MAX_TIMECOORD_AXES];
};
struct _GdkDevice
{
GObject parent_instance;
/*< private >*/
GdkDevicePrivate *priv;
};
GType gdk_device_get_type (void) G_GNUC_CONST;
GType gdk_device_get_type (void) G_GNUC_CONST;
G_CONST_RETURN gchar *gdk_device_get_name (GdkDevice *device);
gboolean gdk_device_get_has_cursor (GdkDevice *device);
/* Functions to configure a device */
GdkInputSource gdk_device_get_source (GdkDevice *device);
void gdk_device_set_source (GdkDevice *device,
GdkInputSource source);
GdkInputMode gdk_device_get_mode (GdkDevice *device);
gboolean gdk_device_set_mode (GdkDevice *device,
GdkInputMode mode);
GdkInputMode mode);
gint gdk_device_get_n_keys (GdkDevice *device);
gboolean gdk_device_get_key (GdkDevice *device,
@@ -184,9 +172,9 @@ gboolean gdk_device_get_key (GdkDevice *device,
guint *keyval,
GdkModifierType *modifiers);
void gdk_device_set_key (GdkDevice *device,
guint index_,
guint keyval,
GdkModifierType modifiers);
guint index_,
guint keyval,
GdkModifierType modifiers);
GdkAxisUse gdk_device_get_axis_use (GdkDevice *device,
guint index_);
@@ -196,17 +184,26 @@ void gdk_device_set_axis_use (GdkDevice *device,
void gdk_device_get_state (GdkDevice *device,
GdkWindow *window,
gdouble *axes,
GdkModifierType *mask);
GdkWindow *window,
gdouble *axes,
GdkModifierType *mask);
void gdk_device_get_position (GdkDevice *device,
GdkScreen **screen,
gint *x,
gint *y);
GdkWindow *
gdk_device_get_window_at_position
(GdkDevice *device,
gint *win_x,
gint *win_y);
gboolean gdk_device_get_history (GdkDevice *device,
GdkWindow *window,
guint32 start,
guint32 stop,
GdkTimeCoord ***events,
gint *n_events);
GdkWindow *window,
guint32 start,
guint32 stop,
GdkTimeCoord ***events,
gint *n_events);
void gdk_device_free_history (GdkTimeCoord **events,
gint n_events);
gint n_events);
gint gdk_device_get_n_axes (GdkDevice *device);
GList * gdk_device_list_axes (GdkDevice *device);
@@ -216,12 +213,13 @@ gboolean gdk_device_get_axis_value (GdkDevice *device,
gdouble *value);
gboolean gdk_device_get_axis (GdkDevice *device,
gdouble *axes,
GdkAxisUse use,
gdouble *value);
gdouble *axes,
GdkAxisUse use,
gdouble *value);
GdkDisplay * gdk_device_get_display (GdkDevice *device);
GdkDevice * gdk_device_get_associated_device (GdkDevice *device);
GList * gdk_device_list_slave_devices (GdkDevice *device);
GdkDeviceType gdk_device_get_device_type (GdkDevice *device);
@@ -236,6 +234,11 @@ GdkGrabStatus gdk_device_grab (GdkDevice *device,
void gdk_device_ungrab (GdkDevice *device,
guint32 time_);
void gdk_device_warp (GdkDevice *device,
GdkScreen *screen,
gint x,
gint y);
gboolean gdk_device_grab_info_libgtk_only (GdkDisplay *display,
GdkDevice *device,
GdkWindow **grab_window,
+79 -83
View File
@@ -19,74 +19,90 @@
#include "config.h"
#include "gdkdevicemanager.h"
#include "gdkdevicemanagerprivate.h"
#include "gdkdisplay.h"
#include "gdkintl.h"
#include "gdkinternals.h"
/**
* SECTION:gdkdevicemanager
* @Short_description: Functions for handling input devices
* @Long_description: In addition to a single pointer and keyboard for user interface input, GDK
* contains support for a variety of input devices, including graphics tablets,
* touchscreens and multiple pointers/keyboards interacting simultaneously with
* the user interface. Under X, the support for multiple input devices is done
* through the <firstterm>XInput 2</firstterm> extension, which also supports
* additional features such as sub-pixel positioning information and additional
* device-dependent information.
* @Title: GdkDeviceManager
* @See_also: #GdkDevice, #GdkEvent, gdk_enable_multidevice()
* @See_also: #GdkDevice, #GdkEvent
*
* By default, GDK supports the traditional single keyboard/pointer input scheme (Plus additional
* special input devices such as tablets. In short, backwards compatible with 2.X). Since version 3.0,
* if gdk_enable_multidevice() is called before gdk_display_open() and the platform supports it, GDK
* will be aware of multiple keyboard/pointer pairs interacting simultaneously with the user interface.
* In addition to a single pointer and keyboard for user interface input,
* GDK contains support for a variety of input devices, including graphics
* tablets, touchscreens and multiple pointers/keyboards interacting
* simultaneously with the user interface. Under X, the support for multiple
* input devices is done through the <firstterm>XInput 2</firstterm> extension,
* which also supports additional features such as sub-pixel positioning
* information and additional device-dependent information.
*
* Conceptually, in multidevice mode there are 2 device types, virtual devices (or master devices)
* are represented by the pointer cursors and keyboard foci that are seen on the screen. physical
* devices (or slave devices) represent the hardware that is controlling the virtual devices, and
* thus has no visible cursor on the screen.
* By default, and if the platform supports it, GDK is aware of multiple
* keyboard/pointer pairs and multitouch devices, this behavior can be
* changed by calling gdk_disable_multidevice() before gdk_display_open(),
* although there would be rarely a reason to do that. For a widget or
* window to be dealt as multipointer aware,
* gdk_window_set_support_multidevice() or
* gtk_widget_set_support_multidevice() must have been called on it.
*
* Virtual devices are always paired, there is a keyboard device for every pointer device,
* associations between devices may be inspected through gdk_device_get_associated_device().
* Conceptually, in multidevice mode there are 2 device types, virtual
* devices (or master devices) are represented by the pointer cursors
* and keyboard foci that are seen on the screen. Physical devices (or
* slave devices) represent the hardware that is controlling the virtual
* devices, and thus has no visible cursor on the screen.
*
* There may be several virtual devices, and several physical devices could be controlling each of
* these virtual devices. Physical devices may also be "floating", which means they are not attached
* to any virtual device.
* Virtual devices are always paired, there is a keyboard device for every
* pointer device, associations between devices may be inspected through
* gdk_device_get_associated_device().
*
* By default, GDK will automatically listen for events coming from all master devices, setting the
* #GdkDevice for all events coming from input devices
* There may be several virtual devices, and several physical devices could
* be controlling each of these virtual devices. Physical devices may also
* be "floating", which means they are not attached to any virtual device.
*
* By default, GDK will automatically listen for events coming from all
* master devices, setting the #GdkDevice for all events coming from input
* devices,
* <footnote>
* Events containing device information are #GDK_MOTION_NOTIFY, #GDK_BUTTON_PRESS, #GDK_2BUTTON_PRESS,
* #GDK_3BUTTON_PRESS, #GDK_BUTTON_RELEASE, #GDK_SCROLL, #GDK_KEY_PRESS, #GDK_KEY_RELEASE,
* #GDK_ENTER_NOTIFY, #GDK_LEAVE_NOTIFY, #GDK_FOCUS_CHANGE, #GDK_PROXIMITY_IN, #GDK_PROXIMITY_OUT,
* #GDK_DRAG_ENTER, #GDK_DRAG_LEAVE, #GDK_DRAG_MOTION, #GDK_DRAG_STATUS, #GDK_DROP_START,
* #GDK_DROP_FINISHED and #GDK_GRAB_BROKEN.
* Events containing device information are #GDK_MOTION_NOTIFY,
* #GDK_BUTTON_PRESS, #GDK_2BUTTON_PRESS, #GDK_3BUTTON_PRESS,
* #GDK_BUTTON_RELEASE, #GDK_SCROLL, #GDK_KEY_PRESS, #GDK_KEY_RELEASE,
* #GDK_ENTER_NOTIFY, #GDK_LEAVE_NOTIFY, #GDK_FOCUS_CHANGE,
* #GDK_PROXIMITY_IN, #GDK_PROXIMITY_OUT, #GDK_DRAG_ENTER, #GDK_DRAG_LEAVE,
* #GDK_DRAG_MOTION, #GDK_DRAG_STATUS, #GDK_DROP_START, #GDK_DROP_FINISHED
* and #GDK_GRAB_BROKEN.
* </footnote>
* , although gdk_window_set_support_multidevice() has to be called on #GdkWindow<!-- --> in order to
* support additional features of multiple pointer interaction, such as multiple, per-device enter/leave
* events. The default setting will emit just one enter/leave event pair for all devices on the window.
* See gdk_window_set_support_multidevice() documentation for more information.
* although gdk_window_set_support_multidevice() has to be called on
* #GdkWindows in order to support additional features of multiple pointer
* interaction, such as multiple, per-device enter/leave events. The default
* setting will emit just one enter/leave event pair for all devices on the
* window. See gdk_window_set_support_multidevice() documentation for more
* information.
*
* In order to listen for events coming from other than a virtual device, gdk_window_set_device_events()
* must be called. Generally, this function can be used to modify the event mask for any given device.
* In order to listen for events coming from other than a virtual device,
* gdk_window_set_device_events() must be called. Generally, this function
* can be used to modify the event mask for any given device.
*
* Input devices may also provide additional information besides X/Y. For example, graphics tablets may
* also provide pressure and X/Y tilt information. This information is device-dependent, and may be
* queried through gdk_device_get_axis(). In multidevice mode, virtual devices will change axes in order
* to always represent the physical device that is routing events through it. Whenever the physical device
* changes, the #GdkDevice:n-axes property will be notified, and gdk_device_list_axes() will return the
* new device axes.
* Input devices may also provide additional information besides X/Y.
* For example, graphics tablets may also provide pressure and X/Y tilt
* information. This information is device-dependent, and may be
* queried through gdk_device_get_axis(). In multidevice mode, virtual
* devices will change axes in order to always represent the physical
* device that is routing events through it. Whenever the physical device
* changes, the #GdkDevice:n-axes property will be notified, and
* gdk_device_list_axes() will return the new device axes.
*
* Devices may also have associated <firstterm>keys</firstterm> or macro buttons. Such keys can be
* globally set to map into normal X keyboard events. The mapping is set using gdk_device_set_key().
* Devices may also have associated <firstterm>keys</firstterm> or
* macro buttons. Such keys can be globally set to map into normal X
* keyboard events. The mapping is set using gdk_device_set_key().
*
* In order to query the device hierarchy and be aware of changes in the device hierarchy (such as
* virtual devices being created or removed, or physical devices being plugged or unplugged), GDK
* provides #GdkDeviceManager. On X11, multidevice support is implemented through XInput 2. If
* gdk_enable_multidevice() is called, the XInput 2.x #GdkDeviceManager implementation will be used
* as input source, else either the core or XInput 1.x implementations will be used.
* In order to query the device hierarchy and be aware of changes in the
* device hierarchy (such as virtual devices being created or removed, or
* physical devices being plugged or unplugged), GDK provides
* #GdkDeviceManager. On X11, multidevice support is implemented through
* XInput 2. Unless gdk_disable_multidevice() is called, the XInput 2.x
* #GdkDeviceManager implementation will be used as input source, else
* either the core or XInput 1.x implementations will be used.
*/
static void gdk_device_manager_set_property (GObject *object,
@@ -116,12 +132,6 @@ enum {
static guint signals [LAST_SIGNAL] = { 0 };
struct _GdkDeviceManagerPrivate
{
GdkDisplay *display;
};
static void
gdk_device_manager_class_init (GdkDeviceManagerClass *klass)
{
@@ -182,12 +192,16 @@ gdk_device_manager_class_init (GdkDeviceManagerClass *klass)
* @device_manager: the object on which the signal is emitted
* @device: the #GdkDevice that changed.
*
* The ::device-changed signal is emitted either when some
* #GdkDevice has changed the number of either axes or keys.
* For example In X this will normally happen when the slave
* device routing events through the master device changes,
* in that case the master device will change to reflect the
* new slave device axes and keys.
* The ::device-changed signal is emitted whenever a device
* has changed in the hierarchy, either slave devices being
* disconnected from their master device or connected to
* another one, or master devices being added or removed
* a slave device.
*
* If a slave device is detached from all master devices
* (gdk_device_get_associated_device() returns %NULL), its
* #GdkDeviceType will change to %GDK_DEVICE_TYPE_FLOATING,
* if it's attached, it will change to %GDK_DEVICE_TYPE_SLAVE.
*/
signals [DEVICE_CHANGED] =
g_signal_new (g_intern_static_string ("device-changed"),
@@ -198,18 +212,11 @@ gdk_device_manager_class_init (GdkDeviceManagerClass *klass)
g_cclosure_marshal_VOID__OBJECT,
G_TYPE_NONE, 1,
GDK_TYPE_DEVICE);
g_type_class_add_private (object_class, sizeof (GdkDeviceManagerPrivate));
}
static void
gdk_device_manager_init (GdkDeviceManager *device_manager)
{
GdkDeviceManagerPrivate *priv;
device_manager->priv = priv = G_TYPE_INSTANCE_GET_PRIVATE (device_manager,
GDK_TYPE_DEVICE_MANAGER,
GdkDeviceManagerPrivate);
}
static void
@@ -218,14 +225,10 @@ gdk_device_manager_set_property (GObject *object,
const GValue *value,
GParamSpec *pspec)
{
GdkDeviceManagerPrivate *priv;
priv = GDK_DEVICE_MANAGER (object)->priv;
switch (prop_id)
{
case PROP_DISPLAY:
priv->display = g_value_get_object (value);
GDK_DEVICE_MANAGER (object)->display = g_value_get_object (value);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
@@ -239,14 +242,11 @@ gdk_device_manager_get_property (GObject *object,
GValue *value,
GParamSpec *pspec)
{
GdkDeviceManagerPrivate *priv;
priv = GDK_DEVICE_MANAGER (object)->priv;
switch (prop_id)
{
case PROP_DISPLAY:
g_value_set_object (value, priv->display);
g_value_set_object (value, GDK_DEVICE_MANAGER (object)->display);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
@@ -269,13 +269,9 @@ gdk_device_manager_get_property (GObject *object,
GdkDisplay *
gdk_device_manager_get_display (GdkDeviceManager *device_manager)
{
GdkDeviceManagerPrivate *priv;
g_return_val_if_fail (GDK_IS_DEVICE_MANAGER (device_manager), NULL);
priv = device_manager->priv;
return priv->display;
return device_manager->display;
}
/**
+5 -37
View File
@@ -31,47 +31,15 @@ G_BEGIN_DECLS
#define GDK_TYPE_DEVICE_MANAGER (gdk_device_manager_get_type ())
#define GDK_DEVICE_MANAGER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GDK_TYPE_DEVICE_MANAGER, GdkDeviceManager))
#define GDK_DEVICE_MANAGER_CLASS(c) (G_TYPE_CHECK_CLASS_CAST ((c), GDK_TYPE_DEVICE_MANAGER, GdkDeviceManagerClass))
#define GDK_IS_DEVICE_MANAGER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDK_TYPE_DEVICE_MANAGER))
#define GDK_IS_DEVICE_MANAGER_CLASS(c) (G_TYPE_CHECK_CLASS_TYPE ((c), GDK_TYPE_DEVICE_MANAGER))
#define GDK_DEVICE_MANAGER_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GDK_TYPE_DEVICE_MANAGER, GdkDeviceManagerClass))
typedef struct _GdkDeviceManager GdkDeviceManager;
typedef struct _GdkDeviceManagerPrivate GdkDeviceManagerPrivate;
typedef struct _GdkDeviceManagerClass GdkDeviceManagerClass;
struct _GdkDeviceManager
{
GObject parent_instance;
GType gdk_device_manager_get_type (void) G_GNUC_CONST;
/*< private >*/
GdkDeviceManagerPrivate *priv;
};
struct _GdkDeviceManagerClass
{
GObjectClass parent_class;
/* Signals */
void (* device_added) (GdkDeviceManager *device_manager,
GdkDevice *device);
void (* device_removed) (GdkDeviceManager *device_manager,
GdkDevice *device);
void (* device_changed) (GdkDeviceManager *device_manager,
GdkDevice *device);
/* VMethods */
GList * (* list_devices) (GdkDeviceManager *device_manager,
GdkDeviceType type);
GdkDevice * (* get_client_pointer) (GdkDeviceManager *device_manager);
};
GType gdk_device_manager_get_type (void) G_GNUC_CONST;
GdkDisplay * gdk_device_manager_get_display (GdkDeviceManager *device_manager);
GList * gdk_device_manager_list_devices (GdkDeviceManager *device_manager,
GdkDeviceType type);
GdkDevice * gdk_device_manager_get_client_pointer (GdkDeviceManager *device_manager);
GdkDisplay * gdk_device_manager_get_display (GdkDeviceManager *device_manager);
GList * gdk_device_manager_list_devices (GdkDeviceManager *device_manager,
GdkDeviceType type);
GdkDevice * gdk_device_manager_get_client_pointer (GdkDeviceManager *device_manager);
G_END_DECLS
+63
View File
@@ -0,0 +1,63 @@
/* GDK - The GIMP Drawing Kit
* Copyright (C) 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.
*/
#ifndef __GDK_DEVICE_MANAGER_PRIVATE_H__
#define __GDK_DEVICE_MANAGER_PRIVATE_H__
#include "gdkdevicemanager.h"
G_BEGIN_DECLS
#define GDK_DEVICE_MANAGER_CLASS(c) (G_TYPE_CHECK_CLASS_CAST ((c), GDK_TYPE_DEVICE_MANAGER, GdkDeviceManagerClass))
#define GDK_IS_DEVICE_MANAGER_CLASS(c) (G_TYPE_CHECK_CLASS_TYPE ((c), GDK_TYPE_DEVICE_MANAGER))
#define GDK_DEVICE_MANAGER_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GDK_TYPE_DEVICE_MANAGER, GdkDeviceManagerClass))
typedef struct _GdkDeviceManagerClass GdkDeviceManagerClass;
struct _GdkDeviceManager
{
GObject parent_instance;
/*< private >*/
GdkDisplay *display;
};
struct _GdkDeviceManagerClass
{
GObjectClass parent_class;
/* Signals */
void (* device_added) (GdkDeviceManager *device_manager,
GdkDevice *device);
void (* device_removed) (GdkDeviceManager *device_manager,
GdkDevice *device);
void (* device_changed) (GdkDeviceManager *device_manager,
GdkDevice *device);
/* VMethods */
GList * (* list_devices) (GdkDeviceManager *device_manager,
GdkDeviceType type);
GdkDevice * (* get_client_pointer) (GdkDeviceManager *device_manager);
};
G_END_DECLS
#endif
+63 -18
View File
@@ -20,8 +20,9 @@
#ifndef __GDK_DEVICE_PRIVATE_H__
#define __GDK_DEVICE_PRIVATE_H__
#include <gdk/gdkdevice.h>
#include <gdk/gdkevents.h>
#include "gdkdevice.h"
#include "gdkdevicemanager.h"
#include "gdkevents.h"
G_BEGIN_DECLS
@@ -30,22 +31,50 @@ G_BEGIN_DECLS
#define GDK_DEVICE_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GDK_TYPE_DEVICE, GdkDeviceClass))
typedef struct _GdkDeviceClass GdkDeviceClass;
typedef struct _GdkDeviceKey GdkDeviceKey;
struct _GdkDeviceKey
{
guint keyval;
GdkModifierType modifiers;
};
struct _GdkDevice
{
GObject parent_instance;
gchar *name;
GdkInputSource source;
GdkInputMode mode;
gboolean has_cursor;
gint num_keys;
GdkDeviceKey *keys;
GdkDeviceManager *manager;
GdkDisplay *display;
/* Paired master for master,
* associated master for slaves
*/
GdkDevice *associated;
GList *slaves;
GdkDeviceType type;
GArray *axes;
};
struct _GdkDeviceClass
{
GObjectClass parent_class;
gboolean (* get_history) (GdkDevice *device,
GdkWindow *window,
guint32 start,
guint32 stop,
GdkTimeCoord ***events,
gint *n_events);
gboolean (* get_history) (GdkDevice *device,
GdkWindow *window,
guint32 start,
guint32 stop,
GdkTimeCoord ***events,
gint *n_events);
void (* get_state) (GdkDevice *device,
GdkWindow *window,
gdouble *axes,
GdkModifierType *mask);
void (* get_state) (GdkDevice *device,
GdkWindow *window,
gdouble *axes,
GdkModifierType *mask);
void (* set_window_cursor) (GdkDevice *device,
GdkWindow *window,
@@ -55,10 +84,10 @@ struct _GdkDeviceClass
GdkScreen *screen,
gint x,
gint y);
gboolean (* query_state) (GdkDevice *device,
GdkWindow *window,
GdkWindow **root_window,
GdkWindow **child_window,
gboolean (* query_state) (GdkDevice *device,
GdkWindow *window,
GdkWindow **root_window,
GdkWindow **child_window,
gint *root_x,
gint *root_y,
gint *win_x,
@@ -123,8 +152,24 @@ gboolean _gdk_device_translate_axis (GdkDevice *device,
GdkTimeCoord ** _gdk_device_allocate_history (GdkDevice *device,
gint n_events);
void _gdk_input_check_extension_events (GdkDevice *device);
void _gdk_device_add_slave (GdkDevice *device,
GdkDevice *slave);
void _gdk_device_remove_slave (GdkDevice *device,
GdkDevice *slave);
gboolean _gdk_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 * _gdk_device_window_at_position (GdkDevice *device,
gint *win_x,
gint *win_y,
GdkModifierType *mask,
gboolean get_toplevel);
G_END_DECLS
+974 -212
View File
File diff suppressed because it is too large Load Diff
+54 -158
View File
@@ -1,7 +1,7 @@
/*
* gdkdisplay.h
*
* Copyright 2001 Sun Microsystems Inc.
*
* Copyright 2001 Sun Microsystems Inc.
*
* Erwann Chenede <erwann.chenede@sun.com>
*
@@ -34,104 +34,16 @@
G_BEGIN_DECLS
typedef struct _GdkDisplayClass GdkDisplayClass;
#define GDK_TYPE_DISPLAY (gdk_display_get_type ())
#define GDK_DISPLAY(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_DISPLAY, GdkDisplay))
#define GDK_IS_DISPLAY(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_DISPLAY))
#ifndef GDK_DISABLE_DEPRECATED
#define GDK_DISPLAY_OBJECT(object) GDK_DISPLAY(object)
#endif
typedef struct _GdkDisplayPointerHooks GdkDisplayPointerHooks;
typedef struct _GdkDisplayDeviceHooks GdkDisplayDeviceHooks;
#define GDK_TYPE_DISPLAY (gdk_display_get_type ())
#define GDK_DISPLAY_OBJECT(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_DISPLAY, GdkDisplay))
#define GDK_DISPLAY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_DISPLAY, GdkDisplayClass))
#define GDK_IS_DISPLAY(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_DISPLAY))
#define GDK_IS_DISPLAY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_DISPLAY))
#define GDK_DISPLAY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_DISPLAY, GdkDisplayClass))
/* Tracks information about the keyboard grab on this display */
typedef struct
{
GdkWindow *window;
GdkWindow *native_window;
gulong serial;
gboolean owner_events;
guint32 time;
} GdkKeyboardGrabInfo;
/* Tracks information about which window and position the pointer last was in.
* This is useful when we need to synthesize events later.
* Note that we track toplevel_under_pointer using enter/leave events,
* so in the case of a grab, either with owner_events==FALSE or with the
* pointer in no clients window the x/y coordinates may actually be outside
* the window.
*/
typedef struct
{
GdkWindow *toplevel_under_pointer; /* The toplevel window with mouse inside, tracked via native events */
GdkWindow *window_under_pointer; /* The window that last got sent a normal enter event */
gdouble toplevel_x, toplevel_y;
guint32 state;
guint32 button;
} GdkPointerWindowInfo;
typedef struct
{
guint32 button_click_time[2]; /* The last 2 button click times. */
GdkWindow *button_window[2]; /* The last 2 windows to receive button presses. */
gint button_number[2]; /* The last 2 buttons to be pressed. */
gint button_x[2]; /* The last 2 button click positions. */
gint button_y[2];
} GdkMultipleClickInfo;
struct _GdkDisplay
{
GObject parent_instance;
/*< private >*/
GList *GSEAL (queued_events);
GList *GSEAL (queued_tail);
/* Information for determining if the latest button click
* is part of a double-click or triple-click
*/
GHashTable *GSEAL (multiple_click_info);
guint GSEAL (double_click_time); /* Maximum time between clicks in msecs */
GdkDevice *GSEAL (core_pointer); /* Core pointer device */
const GdkDisplayDeviceHooks *GSEAL (device_hooks); /* Current hooks for querying pointer */
guint GSEAL (closed) : 1; /* Whether this display has been closed */
guint GSEAL (ignore_core_events) : 1; /* Don't send core motion and button event */
guint GSEAL (double_click_distance); /* Maximum distance between clicks in pixels */
GHashTable *GSEAL (device_grabs);
GHashTable *GSEAL (motion_hint_info);
/* Hashtable containing a GdkPointerWindowInfo for each device */
GHashTable *GSEAL (pointers_info);
/* Last reported event time from server */
guint32 GSEAL (last_event_time);
/* Device manager associated to the display */
GdkDeviceManager *GSEAL (device_manager);
};
struct _GdkDisplayClass
{
GObjectClass parent_class;
G_CONST_RETURN gchar * (*get_display_name) (GdkDisplay *display);
gint (*get_n_screens) (GdkDisplay *display);
GdkScreen * (*get_screen) (GdkDisplay *display,
gint screen_num);
GdkScreen * (*get_default_screen) (GdkDisplay *display);
/* Signals */
void (*closed) (GdkDisplay *display,
gboolean is_error);
};
/**
* GdkDisplayPointerHooks:
* @get_pointer: Obtains the current pointer position and modifier state.
@@ -157,18 +69,18 @@ struct _GdkDisplayClass
struct _GdkDisplayPointerHooks
{
void (*get_pointer) (GdkDisplay *display,
GdkScreen **screen,
gint *x,
gint *y,
GdkModifierType *mask);
GdkScreen **screen,
gint *x,
gint *y,
GdkModifierType *mask);
GdkWindow* (*window_get_pointer) (GdkDisplay *display,
GdkWindow *window,
gint *x,
gint *y,
GdkModifierType *mask);
GdkWindow *window,
gint *x,
gint *y,
GdkModifierType *mask);
GdkWindow* (*window_at_pointer) (GdkDisplay *display,
gint *win_x,
gint *win_y);
gint *win_x,
gint *win_y);
};
/**
@@ -216,15 +128,17 @@ G_CONST_RETURN gchar * gdk_display_get_name (GdkDisplay *display);
gint gdk_display_get_n_screens (GdkDisplay *display);
GdkScreen * gdk_display_get_screen (GdkDisplay *display,
gint screen_num);
gint screen_num);
GdkScreen * gdk_display_get_default_screen (GdkDisplay *display);
#ifndef GDK_MULTIDEVICE_SAFE
#ifndef GDK_DISABLE_DEPRECATED
void gdk_display_pointer_ungrab (GdkDisplay *display,
guint32 time_);
guint32 time_);
void gdk_display_keyboard_ungrab (GdkDisplay *display,
guint32 time_);
guint32 time_);
gboolean gdk_display_pointer_is_grabbed (GdkDisplay *display);
#endif /* GDK_DISABLE_DEPRECATED */
#endif /* GDK_MULTIDEVICE_SAFE */
gboolean gdk_display_device_is_grabbed (GdkDisplay *display,
@@ -233,7 +147,7 @@ void gdk_display_beep (GdkDisplay *display);
void gdk_display_sync (GdkDisplay *display);
void gdk_display_flush (GdkDisplay *display);
void gdk_display_close (GdkDisplay *display);
void gdk_display_close (GdkDisplay *display);
gboolean gdk_display_is_closed (GdkDisplay *display);
#ifndef GDK_DISABLE_DEPRECATED
@@ -243,59 +157,38 @@ GList * gdk_display_list_devices (GdkDisplay *display);
GdkEvent* gdk_display_get_event (GdkDisplay *display);
GdkEvent* gdk_display_peek_event (GdkDisplay *display);
void gdk_display_put_event (GdkDisplay *display,
const GdkEvent *event);
const GdkEvent *event);
gboolean gdk_display_has_pending (GdkDisplay *display);
void gdk_display_add_client_message_filter (GdkDisplay *display,
GdkAtom message_type,
GdkFilterFunc func,
gpointer data);
GdkAtom message_type,
GdkFilterFunc func,
gpointer data);
void gdk_display_set_double_click_time (GdkDisplay *display,
guint msec);
guint msec);
void gdk_display_set_double_click_distance (GdkDisplay *display,
guint distance);
guint distance);
GdkDisplay *gdk_display_get_default (void);
#ifndef GDK_MULTIDEVICE_SAFE
#ifndef GDK_DISABLE_DEPRECATED
GdkDevice *gdk_display_get_core_pointer (GdkDisplay *display);
#endif /* GDK_DISABLE_DEPRECATED */
void gdk_display_get_pointer (GdkDisplay *display,
GdkScreen **screen,
gint *x,
gint *y,
GdkModifierType *mask);
GdkScreen **screen,
gint *x,
gint *y,
GdkModifierType *mask);
GdkWindow * gdk_display_get_window_at_pointer (GdkDisplay *display,
gint *win_x,
gint *win_y);
gint *win_x,
gint *win_y);
void gdk_display_warp_pointer (GdkDisplay *display,
GdkScreen *screen,
gint x,
gint y);
#endif /* GDK_MULTIDEVICE_SAFE */
void gdk_display_get_device_state (GdkDisplay *display,
GdkDevice *device,
GdkScreen **screen,
gint *x,
gint *y,
GdkModifierType *mask);
GdkWindow * gdk_display_get_window_at_device_position (GdkDisplay *display,
GdkDevice *device,
gint *win_x,
gint *win_y);
void gdk_display_warp_device (GdkDisplay *display,
GdkDevice *device,
GdkScreen *screen,
gint x,
gint y);
#ifndef GDK_MULTIDEVICE_SAFE
GdkScreen *screen,
gint x,
gint y);
GdkDisplayPointerHooks *gdk_display_set_pointer_hooks (GdkDisplay *display,
const GdkDisplayPointerHooks *new_hooks);
const GdkDisplayPointerHooks *new_hooks);
#endif /* GDK_DISABLE_DEPRECATED */
#endif /* GDK_MULTIDEVICE_SAFE */
GdkDisplayDeviceHooks *gdk_display_set_device_hooks (GdkDisplay *display,
@@ -307,29 +200,32 @@ gboolean gdk_display_supports_cursor_alpha (GdkDisplay *display);
gboolean gdk_display_supports_cursor_color (GdkDisplay *display);
guint gdk_display_get_default_cursor_size (GdkDisplay *display);
void gdk_display_get_maximal_cursor_size (GdkDisplay *display,
guint *width,
guint *height);
guint *width,
guint *height);
GdkWindow *gdk_display_get_default_group (GdkDisplay *display);
gboolean gdk_display_supports_selection_notification (GdkDisplay *display);
gboolean gdk_display_request_selection_notification (GdkDisplay *display,
GdkAtom selection);
GdkAtom selection);
gboolean gdk_display_supports_clipboard_persistence (GdkDisplay *display);
void gdk_display_store_clipboard (GdkDisplay *display,
GdkWindow *clipboard_window,
guint32 time_,
const GdkAtom *targets,
gint n_targets);
GdkWindow *clipboard_window,
guint32 time_,
const GdkAtom *targets,
gint n_targets);
gboolean gdk_display_supports_shapes (GdkDisplay *display);
gboolean gdk_display_supports_input_shapes (GdkDisplay *display);
gboolean gdk_display_supports_composite (GdkDisplay *display);
void gdk_display_notify_startup_complete (GdkDisplay *display,
const gchar *startup_id);
GdkDeviceManager * gdk_display_get_device_manager (GdkDisplay *display);
GdkAppLaunchContext *gdk_display_get_app_launch_context (GdkDisplay *display);
G_END_DECLS
#endif /* __GDK_DISPLAY_H__ */
#endif /* __GDK_DISPLAY_H__ */
+184 -64
View File
@@ -21,19 +21,29 @@
* 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/.
* GTK+ at ftp://ftp.gtk.org/pub/gtk/.
*/
#include "config.h"
#include "gdkdisplaymanager.h"
#include "gdkscreen.h"
#include "gdkdisplay.h"
#include "gdkconfig.h"
#include "gdkdisplaymanagerprivate.h"
#include "gdkinternals.h"
#include "gdkmarshalers.h"
#include "gdkintl.h"
#ifdef GDK_WINDOWING_X11
#include "x11/gdkx.h"
#endif
#ifdef GDK_WINDOWING_QUARTZ
/* We immediately include gdkquartzdisplaymanager.h here instead of
* gdkquartz.h so that we do not have to enable -xobjective-c for the
* "generic" GDK source code.
*/
#include "quartz/gdkquartzdisplaymanager.h"
#endif
/**
* SECTION:gdkdisplaymanager
@@ -58,18 +68,16 @@ enum {
static void gdk_display_manager_class_init (GdkDisplayManagerClass *klass);
static void gdk_display_manager_set_property (GObject *object,
guint prop_id,
const GValue *value,
GParamSpec *pspec);
guint prop_id,
const GValue *value,
GParamSpec *pspec);
static void gdk_display_manager_get_property (GObject *object,
guint prop_id,
GValue *value,
GParamSpec *pspec);
guint prop_id,
GValue *value,
GParamSpec *pspec);
static guint signals[LAST_SIGNAL] = { 0 };
static GdkDisplay *default_display = NULL;
G_DEFINE_TYPE (GdkDisplayManager, gdk_display_manager, G_TYPE_OBJECT)
static void
@@ -82,32 +90,32 @@ gdk_display_manager_class_init (GdkDisplayManagerClass *klass)
/**
* GdkDisplayManager::display-opened:
* @display_manager: the object on which the signal is emitted
* @manager: the object on which the signal is emitted
* @display: the opened display
*
* The ::display_opened signal is emitted when a display is opened.
* The ::display-opened signal is emitted when a display is opened.
*
* Since: 2.2
*/
signals[DISPLAY_OPENED] =
g_signal_new (g_intern_static_string ("display-opened"),
G_OBJECT_CLASS_TYPE (object_class),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (GdkDisplayManagerClass, display_opened),
NULL, NULL,
_gdk_marshal_VOID__OBJECT,
G_TYPE_NONE,
1,
GDK_TYPE_DISPLAY);
G_OBJECT_CLASS_TYPE (object_class),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (GdkDisplayManagerClass, display_opened),
NULL, NULL,
_gdk_marshal_VOID__OBJECT,
G_TYPE_NONE,
1,
GDK_TYPE_DISPLAY);
g_object_class_install_property (object_class,
PROP_DEFAULT_DISPLAY,
g_param_spec_object ("default-display",
P_("Default Display"),
P_("The default display for GDK"),
GDK_TYPE_DISPLAY,
G_PARAM_READWRITE|G_PARAM_STATIC_NAME|
G_PARAM_STATIC_NICK|G_PARAM_STATIC_BLURB));
PROP_DEFAULT_DISPLAY,
g_param_spec_object ("default-display",
P_("Default Display"),
P_("The default display for GDK"),
GDK_TYPE_DISPLAY,
G_PARAM_READWRITE|G_PARAM_STATIC_NAME|
G_PARAM_STATIC_NICK|G_PARAM_STATIC_BLURB));
}
static void
@@ -117,15 +125,15 @@ gdk_display_manager_init (GdkDisplayManager *manager)
static void
gdk_display_manager_set_property (GObject *object,
guint prop_id,
const GValue *value,
GParamSpec *pspec)
guint prop_id,
const GValue *value,
GParamSpec *pspec)
{
switch (prop_id)
{
case PROP_DEFAULT_DISPLAY:
gdk_display_manager_set_default_display (GDK_DISPLAY_MANAGER (object),
g_value_get_object (value));
g_value_get_object (value));
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
@@ -135,14 +143,15 @@ gdk_display_manager_set_property (GObject *object,
static void
gdk_display_manager_get_property (GObject *object,
guint prop_id,
GValue *value,
GParamSpec *pspec)
guint prop_id,
GValue *value,
GParamSpec *pspec)
{
switch (prop_id)
{
case PROP_DEFAULT_DISPLAY:
g_value_set_object (value, default_display);
g_value_set_object (value,
gdk_display_manager_get_default_display (GDK_DISPLAY_MANAGER (object)));
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
@@ -155,37 +164,61 @@ gdk_display_manager_get_property (GObject *object,
*
* Gets the singleton #GdkDisplayManager object.
*
* Returns: (transfer none): The global #GdkDisplayManager singleton; gdk_parse_pargs(),
* gdk_init(), or gdk_init_check() must have been called first.
* When called for the first time, this function consults the
* <envar>GDK_BACKEND</envar> to find out which of the supported
* GDK backends to use (in case GDK has been compiled with multiple
* backends).
*
* Returns: (transfer none): The global #GdkDisplayManager singleton;
* gdk_parse_args(), gdk_init(), or gdk_init_check() must have
* been called first.
*
* Since: 2.2
**/
GdkDisplayManager*
gdk_display_manager_get (void)
{
static GdkDisplayManager *display_manager = NULL;
static GdkDisplayManager *manager = NULL;
if (!display_manager)
display_manager = g_object_new (GDK_TYPE_DISPLAY_MANAGER, NULL);
if (!manager)
{
const gchar *backend;
return display_manager;
backend = g_getenv ("GDK_BACKEND");
#ifdef GDK_WINDOWING_X11
if (backend == NULL || strcmp (backend, "x11") == 0)
manager = g_object_new (gdk_x11_display_manager_get_type (), NULL);
else
#endif
#ifdef GDK_WINDOWING_QUARTZ
if (backend == NULL || strcmp (backend, "quartz") == 0)
manager = g_object_new (gdk_quartz_display_manager_get_type (), NULL);
else
#endif
if (backend != NULL)
g_error ("Unsupported GDK backend: %s", backend);
else
g_error ("No GDK backend found");
}
return manager;
}
/**
* gdk_display_manager_get_default_display:
* @display_manager: a #GdkDisplayManager
* @manager: a #GdkDisplayManager
*
* Gets the default #GdkDisplay.
*
* Returns: (transfer none): a #GdkDisplay, or %NULL if there is no default
* display.
* Returns: (transfer none): a #GdkDisplay, or %NULL
* if there is no default display.
*
* Since: 2.2
*/
GdkDisplay *
gdk_display_manager_get_default_display (GdkDisplayManager *display_manager)
gdk_display_manager_get_default_display (GdkDisplayManager *manager)
{
return default_display;
return GDK_DISPLAY_MANAGER_GET_CLASS (manager)->get_default_display (manager);
}
/**
@@ -203,7 +236,7 @@ gdk_display_manager_get_default_display (GdkDisplayManager *display_manager)
GdkDisplay *
gdk_display_get_default (void)
{
return default_display;
return gdk_display_manager_get_default_display (gdk_display_manager_get ());
}
/**
@@ -219,6 +252,10 @@ gdk_display_get_default (void)
GdkScreen *
gdk_screen_get_default (void)
{
GdkDisplay *default_display;
default_display = gdk_display_get_default ();
if (default_display)
return gdk_display_get_default_screen (default_display);
else
@@ -227,7 +264,7 @@ gdk_screen_get_default (void)
/**
* gdk_display_manager_set_default_display:
* @display_manager: a #GdkDisplayManager
* @manager: a #GdkDisplayManager
* @display: a #GdkDisplay
*
* Sets @display as the default display.
@@ -235,30 +272,113 @@ gdk_screen_get_default (void)
* Since: 2.2
**/
void
gdk_display_manager_set_default_display (GdkDisplayManager *display_manager,
GdkDisplay *display)
gdk_display_manager_set_default_display (GdkDisplayManager *manager,
GdkDisplay *display)
{
default_display = display;
GDK_DISPLAY_MANAGER_GET_CLASS (manager)->set_default_display (manager, display);
_gdk_windowing_set_default_display (display);
g_object_notify (G_OBJECT (display_manager), "default-display");
g_object_notify (G_OBJECT (manager), "default-display");
}
/**
* gdk_display_manager_list_displays:
* @display_manager: a #GdkDisplayManager
* @manager: a #GdkDisplayManager
*
* List all currently open displays.
*
* Return value: (transfer container) (element-type GdkDisplay): a newly allocated
* #GSList of #GdkDisplay objects. Free this list with g_slist_free() when you
* are done with it.
*
* Return value: (transfer container) (element-type GdkDisplay): a newly
* allocated #GSList of #GdkDisplay objects. Free with g_slist_free()
* when you are done with it.
*
* Since: 2.2
**/
GSList *
gdk_display_manager_list_displays (GdkDisplayManager *display_manager)
gdk_display_manager_list_displays (GdkDisplayManager *manager)
{
return g_slist_copy (_gdk_displays);
return GDK_DISPLAY_MANAGER_GET_CLASS (manager)->list_displays (manager);
}
/**
* gdk_display_manager_open_display:
* @manager: a #GdkDisplayManager
* @name: the name of the display to open
*
* Opens a display.
*
* Return value: (transfer none): a #GdkDisplay, or %NULL
* if the display could not be opened
*
* Since: 3.0
*/
GdkDisplay *
gdk_display_manager_open_display (GdkDisplayManager *manager,
const gchar *name)
{
return GDK_DISPLAY_MANAGER_GET_CLASS (manager)->open_display (manager, name);
}
/**
* gdk_atom_intern:
* @atom_name: a string.
* @only_if_exists: if %TRUE, GDK is allowed to not create a new atom, but
* just return %GDK_NONE if the requested atom doesn't already
* exists. Currently, the flag is ignored, since checking the
* existance of an atom is as expensive as creating it.
*
* Finds or creates an atom corresponding to a given string.
*
* Returns: the atom corresponding to @atom_name.
*/
GdkAtom
gdk_atom_intern (const gchar *atom_name,
gboolean only_if_exists)
{
GdkDisplayManager *manager = gdk_display_manager_get ();
return GDK_DISPLAY_MANAGER_GET_CLASS (manager)->atom_intern (manager, atom_name, TRUE);
}
/**
* gdk_atom_intern_static_string:
* @atom_name: a static string
*
* Finds or creates an atom corresponding to a given string.
*
* Note that this function is identical to gdk_atom_intern() except
* that if a new #GdkAtom is created the string itself is used rather
* than a copy. This saves memory, but can only be used if the string
* will <emphasis>always</emphasis> exist. It can be used with statically
* allocated strings in the main program, but not with statically
* allocated memory in dynamically loaded modules, if you expect to
* ever unload the module again (e.g. do not use this function in
* GTK+ theme engines).
*
* Returns: the atom corresponding to @atom_name
*
* Since: 2.10
*/
GdkAtom
gdk_atom_intern_static_string (const gchar *atom_name)
{
GdkDisplayManager *manager = gdk_display_manager_get ();
return GDK_DISPLAY_MANAGER_GET_CLASS (manager)->atom_intern (manager, atom_name, FALSE);
}
/**
* gdk_atom_name:
* @atom: a #GdkAtom.
*
* Determines the string corresponding to an atom.
*
* Returns: a newly-allocated string containing the string
* corresponding to @atom. When you are done with the
* return value, you should free it using g_free().
*/
gchar *
gdk_atom_name (GdkAtom atom)
{
GdkDisplayManager *manager = gdk_display_manager_get ();
return GDK_DISPLAY_MANAGER_GET_CLASS (manager)->get_atom_name (manager, atom);
}
+8 -24
View File
@@ -8,7 +8,7 @@
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
@@ -39,34 +39,18 @@ G_BEGIN_DECLS
#define GDK_TYPE_DISPLAY_MANAGER (gdk_display_manager_get_type ())
#define GDK_DISPLAY_MANAGER(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_DISPLAY_MANAGER, GdkDisplayManager))
#define GDK_DISPLAY_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_DISPLAY_MANAGER, GdkDisplayManagerClass))
#define GDK_IS_DISPLAY_MANAGER(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_DISPLAY_MANAGER))
#define GDK_IS_DISPLAY_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_DISPLAY_MANAGER))
#define GDK_DISPLAY_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_DISPLAY_MANAGER, GdkDisplayManagerClass))
typedef struct _GdkDisplayManager GdkDisplayManager;
typedef struct _GdkDisplayManagerClass GdkDisplayManagerClass;
struct _GdkDisplayManager
{
GObject parent_instance;
};
struct _GdkDisplayManagerClass
{
GObjectClass parent_class;
void (*display_opened) (GdkDisplayManager *display_manager,
GdkDisplay *display);
};
GType gdk_display_manager_get_type (void) G_GNUC_CONST;
GType gdk_display_manager_get_type (void) G_GNUC_CONST;
GdkDisplayManager *gdk_display_manager_get (void);
GdkDisplay * gdk_display_manager_get_default_display (GdkDisplayManager *display_manager);
void gdk_display_manager_set_default_display (GdkDisplayManager *display_manager,
GdkDisplay *display);
GSList * gdk_display_manager_list_displays (GdkDisplayManager *display_manager);
GdkDisplay * gdk_display_manager_get_default_display (GdkDisplayManager *manager);
void gdk_display_manager_set_default_display (GdkDisplayManager *manager,
GdkDisplay *display);
GSList * gdk_display_manager_list_displays (GdkDisplayManager *manager);
GdkDisplay * gdk_display_manager_open_display (GdkDisplayManager *manager,
const gchar *name);
G_END_DECLS
+71
View File
@@ -0,0 +1,71 @@
/* GDK - The GIMP Drawing Kit
* Copyright (C) 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.
*/
#ifndef __GDK_DISPLAY_MANAGER_PRIVATE_H__
#define __GDK_DISPLAY_MANAGER_PRIVATE_H__
#include "gdkdisplaymanager.h"
G_BEGIN_DECLS
#define GDK_DISPLAY_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_DISPLAY_MANAGER, GdkDisplayManagerClass))
#define GDK_IS_DISPLAY_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_DISPLAY_MANAGER))
#define GDK_DISPLAY_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_DISPLAY_MANAGER, GdkDisplayManagerClass))
typedef struct _GdkDisplayManagerClass GdkDisplayManagerClass;
struct _GdkDisplayManager
{
GObject parent_instance;
};
struct _GdkDisplayManagerClass
{
GObjectClass parent_class;
GSList * (*list_displays) (GdkDisplayManager *manager);
GdkDisplay * (*get_default_display) (GdkDisplayManager *manager);
void (*set_default_display) (GdkDisplayManager *manager,
GdkDisplay *display);
GdkDisplay * (*open_display) (GdkDisplayManager *manager,
const gchar *name);
/* FIXME the following should really be frontend-only, not vfuncs */
GdkAtom (*atom_intern) (GdkDisplayManager *manager,
const gchar *atom_name,
gboolean copy_name);
gchar * (*get_atom_name) (GdkDisplayManager *manager,
GdkAtom atom);
guint (*lookup_keyval) (GdkDisplayManager *manager,
const gchar *name);
gchar * (*get_keyval_name) (GdkDisplayManager *manager,
guint keyval);
void (*keyval_convert_case) (GdkDisplayManager *manager,
guint keyval,
guint *lower,
guint *upper);
/* signals */
void (*display_opened) (GdkDisplayManager *manager,
GdkDisplay *display);
};
G_END_DECLS
#endif
+301
View File
@@ -0,0 +1,301 @@
/* GDK - The GIMP Drawing Kit
* Copyright (C) 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.
*/
#ifndef __GDK_DISPLAY_PRIVATE_H__
#define __GDK_DISPLAY_PRIVATE_H__
#include "gdkdisplay.h"
#include "gdkwindow.h"
#include "gdkcursor.h"
G_BEGIN_DECLS
#define GDK_DISPLAY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_DISPLAY, GdkDisplayClass))
#define GDK_IS_DISPLAY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_DISPLAY))
#define GDK_DISPLAY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_DISPLAY, GdkDisplayClass))
typedef struct _GdkDisplayClass GdkDisplayClass;
/* Tracks information about the keyboard grab on this display */
typedef struct
{
GdkWindow *window;
GdkWindow *native_window;
gulong serial;
gboolean owner_events;
guint32 time;
} GdkKeyboardGrabInfo;
/* Tracks information about the pointer grab on this display */
typedef struct
{
GdkWindow *window;
GdkWindow *native_window;
gulong serial_start;
gulong serial_end; /* exclusive, i.e. not active on serial_end */
gboolean owner_events;
guint event_mask;
gboolean implicit;
guint32 time;
GdkGrabOwnership ownership;
guint activated : 1;
guint implicit_ungrab : 1;
} GdkDeviceGrabInfo;
/* Tracks information about which window and position the pointer last was in.
* This is useful when we need to synthesize events later.
* Note that we track toplevel_under_pointer using enter/leave events,
* so in the case of a grab, either with owner_events==FALSE or with the
* pointer in no clients window the x/y coordinates may actually be outside
* the window.
*/
typedef struct
{
GdkWindow *toplevel_under_pointer; /* toplevel window containing the pointer, */
/* tracked via native events */
GdkWindow *window_under_pointer; /* window that last got a normal enter event */
gdouble toplevel_x, toplevel_y;
guint32 state;
guint32 button;
} GdkPointerWindowInfo;
typedef struct
{
guint32 button_click_time[2]; /* last 2 button click times */
GdkWindow *button_window[2]; /* last 2 windows to receive button presses */
gint button_number[2]; /* last 2 buttons to be pressed */
gint button_x[2]; /* last 2 button click positions */
gint button_y[2];
} GdkMultipleClickInfo;
struct _GdkDisplay
{
GObject parent_instance;
GList *queued_events;
GList *queued_tail;
/* Information for determining if the latest button click
* is part of a double-click or triple-click
*/
GHashTable *multiple_click_info;
guint double_click_time; /* Maximum time between clicks in msecs */
GdkDevice *core_pointer; /* Core pointer device */
const GdkDisplayDeviceHooks *device_hooks; /* Hooks for querying pointer */
guint closed : 1; /* Whether this display has been closed */
guint ignore_core_events : 1; /* Don't send core motion and button event */
guint double_click_distance; /* Maximum distance between clicks in pixels */
GHashTable *device_grabs;
GHashTable *motion_hint_info;
GHashTable *pointers_info; /* GdkPointerWindowInfo for each device */
guint32 last_event_time; /* Last reported event time from server */
GdkDeviceManager *device_manager;
};
struct _GdkDisplayClass
{
GObjectClass parent_class;
GType window_type; /* type for native windows for this display, set in class_init */
G_CONST_RETURN gchar * (*get_name) (GdkDisplay *display);
gint (*get_n_screens) (GdkDisplay *display);
GdkScreen * (*get_screen) (GdkDisplay *display,
gint screen_num);
GdkScreen * (*get_default_screen) (GdkDisplay *display);
void (*beep) (GdkDisplay *display);
void (*sync) (GdkDisplay *display);
void (*flush) (GdkDisplay *display);
gboolean (*has_pending) (GdkDisplay *display);
void (*queue_events) (GdkDisplay *display);
GdkWindow * (*get_default_group) (GdkDisplay *display);
gboolean (*supports_selection_notification) (GdkDisplay *display);
gboolean (*request_selection_notification) (GdkDisplay *display,
GdkAtom selection);
gboolean (*supports_shapes) (GdkDisplay *display);
gboolean (*supports_input_shapes) (GdkDisplay *display);
gboolean (*supports_composite) (GdkDisplay *display);
gboolean (*supports_cursor_alpha) (GdkDisplay *display);
gboolean (*supports_cursor_color) (GdkDisplay *display);
gboolean (*supports_clipboard_persistence) (GdkDisplay *display);
void (*store_clipboard) (GdkDisplay *display,
GdkWindow *clipboard_window,
guint32 time_,
const GdkAtom *targets,
gint n_targets);
void (*get_default_cursor_size) (GdkDisplay *display,
guint *width,
guint *height);
void (*get_maximal_cursor_size) (GdkDisplay *display,
guint *width,
guint *height);
GdkCursor * (*get_cursor_for_type) (GdkDisplay *display,
GdkCursorType type);
GdkCursor * (*get_cursor_for_name) (GdkDisplay *display,
const gchar *name);
GdkCursor * (*get_cursor_for_pixbuf) (GdkDisplay *display,
GdkPixbuf *pixbuf,
gint x,
gint y);
GList * (*list_devices) (GdkDisplay *display);
gboolean (*send_client_message) (GdkDisplay *display,
GdkEvent *event,
GdkNativeWindow winid);
void (*add_client_message_filter) (GdkDisplay *display,
GdkAtom message_type,
GdkFilterFunc func,
gpointer data);
GdkAppLaunchContext * (*get_app_launch_context) (GdkDisplay *display);
GdkNativeWindow (*get_drag_protocol) (GdkDisplay *display,
GdkNativeWindow winid,
GdkDragProtocol *protocol,
guint *version);
void (*before_process_all_updates) (GdkDisplay *display);
void (*after_process_all_updates) (GdkDisplay *display);
gulong (*get_next_serial) (GdkDisplay *display);
void (*notify_startup_complete) (GdkDisplay *display,
const gchar *startup_id);
void (*event_data_copy) (GdkDisplay *display,
const GdkEvent *event,
GdkEvent *new_event);
void (*event_data_free) (GdkDisplay *display,
GdkEvent *event);
void (*create_window_impl) (GdkDisplay *display,
GdkWindow *window,
GdkWindow *real_parent,
GdkScreen *screen,
GdkEventMask event_mask,
GdkWindowAttr *attributes,
gint attributes_mask);
GdkKeymap * (*get_keymap) (GdkDisplay *display);
void (*push_error_trap) (GdkDisplay *display);
gint (*pop_error_trap) (GdkDisplay *display,
gboolean ignore);
GdkWindow * (*get_selection_owner) (GdkDisplay *display,
GdkAtom selection);
gboolean (*set_selection_owner) (GdkDisplay *display,
GdkWindow *owner,
GdkAtom selection,
guint32 time,
gboolean send_event);
void (*send_selection_notify) (GdkDisplay *dispay,
GdkNativeWindow requestor,
GdkAtom selection,
GdkAtom target,
GdkAtom property,
guint32 time);
gint (*get_selection_property) (GdkDisplay *display,
GdkWindow *requestor,
guchar **data,
GdkAtom *type,
gint *format);
void (*convert_selection) (GdkDisplay *display,
GdkWindow *requestor,
GdkAtom selection,
GdkAtom target,
guint32 time);
gint (*text_property_to_utf8_list) (GdkDisplay *display,
GdkAtom encoding,
gint format,
const guchar *text,
gint length,
gchar ***list);
gchar * (*utf8_to_string_target) (GdkDisplay *display,
const gchar *text);
/* Signals */
void (*closed) (GdkDisplay *display,
gboolean is_error);
};
typedef void (* GdkDisplayPointerInfoForeach) (GdkDisplay *display,
GdkDevice *device,
GdkPointerWindowInfo *device_info,
gpointer user_data);
void _gdk_display_device_grab_update (GdkDisplay *display,
GdkDevice *device,
GdkDevice *source_device,
gulong current_serial);
GdkDeviceGrabInfo * _gdk_display_get_last_device_grab (GdkDisplay *display,
GdkDevice *device);
GdkDeviceGrabInfo * _gdk_display_add_device_grab (GdkDisplay *display,
GdkDevice *device,
GdkWindow *window,
GdkWindow *native_window,
GdkGrabOwnership grab_ownership,
gboolean owner_events,
GdkEventMask event_mask,
gulong serial_start,
guint32 time,
gboolean implicit);
GdkDeviceGrabInfo * _gdk_display_has_device_grab (GdkDisplay *display,
GdkDevice *device,
gulong serial);
gboolean _gdk_display_end_device_grab (GdkDisplay *display,
GdkDevice *device,
gulong serial,
GdkWindow *if_child,
gboolean implicit);
gboolean _gdk_display_check_grab_ownership (GdkDisplay *display,
GdkDevice *device,
gulong serial);
void _gdk_display_enable_motion_hints (GdkDisplay *display,
GdkDevice *device);
GdkPointerWindowInfo * _gdk_display_get_pointer_info (GdkDisplay *display,
GdkDevice *device);
void _gdk_display_pointer_info_foreach (GdkDisplay *display,
GdkDisplayPointerInfoForeach func,
gpointer user_data);
gulong _gdk_display_get_next_serial (GdkDisplay *display);
void _gdk_display_event_data_copy (GdkDisplay *display,
const GdkEvent *event,
GdkEvent *new_event);
void _gdk_display_event_data_free (GdkDisplay *display,
GdkEvent *event);
void _gdk_display_create_window_impl (GdkDisplay *display,
GdkWindow *window,
GdkWindow *real_parent,
GdkScreen *screen,
GdkEventMask event_mask,
GdkWindowAttr *attributes,
gint attributes_mask);
GdkWindow * _gdk_display_create_window (GdkDisplay *display);
G_END_DECLS
#endif /* __GDK_DISPLAY_PRIVATE_H__ */
+319 -49
View File
@@ -26,8 +26,7 @@
#include "config.h"
#include "gdkdnd.h"
#include "gdkdndprivate.h"
#include "gdkdisplay.h"
#include "gdkwindow.h"
@@ -48,53 +47,6 @@
* the GTK+ documentation for more information.
*/
/**
* gdk_drag_find_window:
* @context: a #GdkDragContext.
* @drag_window: a window which may be at the pointer position, but
* should be ignored, since it is put up by the drag source as an icon.
* @x_root: the x position of the pointer in root coordinates.
* @y_root: the y position of the pointer in root coordinates.
* @dest_window: (out): location to store the destination window in.
* @protocol: (out): location to store the DND protocol in.
*
* Finds the destination window and DND protocol to use at the
* given pointer position.
*
* This function is called by the drag source to obtain the
* @dest_window and @protocol parameters for gdk_drag_motion().
**/
void
gdk_drag_find_window (GdkDragContext *context,
GdkWindow *drag_window,
gint x_root,
gint y_root,
GdkWindow **dest_window,
GdkDragProtocol *protocol)
{
gdk_drag_find_window_for_screen (context, drag_window,
gdk_window_get_screen (context->source_window),
x_root, y_root, dest_window, protocol);
}
/**
* gdk_drag_get_protocol:
* @xid: the windowing system id of the destination window.
* @protocol: location where the supported DND protocol is returned.
*
* Finds out the DND protocol supported by a window.
*
* Return value: the windowing system specific id for the window where
* the drop should happen. This may be @xid or the id of a proxy
* window, or zero if @xid doesn't support Drag and Drop.
**/
GdkNativeWindow
gdk_drag_get_protocol (GdkNativeWindow xid,
GdkDragProtocol *protocol)
{
return gdk_drag_get_protocol_for_display (gdk_display_get_default (), xid, protocol);
}
/**
* gdk_drag_context_list_targets:
* @context: a #GdkDragContext
@@ -185,3 +137,321 @@ gdk_drag_context_get_source_window (GdkDragContext *context)
return context->source_window;
}
/**
* gdk_drag_context_get_dest_window:
* @context: a #GdkDragContext
*
* Returns the destination windw for the DND operation.
*
* Return value: (transfer none): a #GdkWindow
*
* Since: 3.0
**/
GdkWindow *
gdk_drag_context_get_dest_window (GdkDragContext *context)
{
g_return_val_if_fail (GDK_IS_DRAG_CONTEXT (context), NULL);
return context->dest_window;
}
/**
* gdk_drag_context_get_protocol:
* @context: a #GdkDragContext
*
* Returns the drag protocol thats used by this context.
*
* Returns: the drag protocol
*
* Since: 3.0
*/
GdkDragProtocol
gdk_drag_context_get_protocol (GdkDragContext *context)
{
g_return_val_if_fail (GDK_IS_DRAG_CONTEXT (context), GDK_DRAG_PROTO_NONE);
return context->protocol;
}
/**
* gdk_drag_context_set_device:
* @context: a #GdkDragContext
* @device: a #GdkDevice
*
* Associates a #GdkDevice to @context, so all Drag and Drop events
* for @context are emitted as if they came from this device.
*/
void
gdk_drag_context_set_device (GdkDragContext *context,
GdkDevice *device)
{
g_return_if_fail (GDK_IS_DRAG_CONTEXT (context));
g_return_if_fail (GDK_IS_DEVICE (device));
if (context->device)
g_object_unref (context->device);
context->device = device;
if (context->device)
g_object_ref (context->device);
}
/**
* gdk_drag_context_get_device:
* @context: a #GdkDragContext
*
* Returns the #GdkDevice associated to the drag context.
*
* Returns: (transfer none): The #GdkDevice associated to @context.
**/
GdkDevice *
gdk_drag_context_get_device (GdkDragContext *context)
{
g_return_val_if_fail (GDK_IS_DRAG_CONTEXT (context), NULL);
return context->device;
}
G_DEFINE_TYPE (GdkDragContext, gdk_drag_context, G_TYPE_OBJECT)
static void
gdk_drag_context_init (GdkDragContext *context)
{
}
static void
gdk_drag_context_finalize (GObject *object)
{
GdkDragContext *context = GDK_DRAG_CONTEXT (object);
g_list_free (context->targets);
if (context->source_window)
g_object_unref (context->source_window);
if (context->dest_window)
g_object_unref (context->dest_window);
G_OBJECT_CLASS (gdk_drag_context_parent_class)->finalize (object);
}
static void
gdk_drag_context_class_init (GdkDragContextClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
object_class->finalize = gdk_drag_context_finalize;
}
/**
* gdk_drag_find_window_for_screen:
* @context: a #GdkDragContext
* @drag_window: a window which may be at the pointer position, but
* should be ignored, since it is put up by the drag source as an icon
* @screen: the screen where the destination window is sought
* @x_root: the x position of the pointer in root coordinates
* @y_root: the y position of the pointer in root coordinates
* @dest_window: (out): location to store the destination window in
* @protocol: (out): location to store the DND protocol in
*
* Finds the destination window and DND protocol to use at the
* given pointer position.
*
* This function is called by the drag source to obtain the
* @dest_window and @protocol parameters for gdk_drag_motion().
*
* Since: 2.2
*/
void
gdk_drag_find_window_for_screen (GdkDragContext *context,
GdkWindow *drag_window,
GdkScreen *screen,
gint x_root,
gint y_root,
GdkWindow **dest_window,
GdkDragProtocol *protocol)
{
g_return_if_fail (GDK_IS_DRAG_CONTEXT (context));
*dest_window = GDK_DRAG_CONTEXT_GET_CLASS (context)
->find_window (context, drag_window, screen, x_root, y_root, protocol);
}
/**
* gdk_drag_status:
* @context: a #GdkDragContext
* @action: the selected action which will be taken when a drop happens,
* or 0 to indicate that a drop will not be accepted
* @time_: the timestamp for this operation
*
* Selects one of the actions offered by the drag source.
*
* This function is called by the drag destination in response to
* gdk_drag_motion() called by the drag source.
*/
void
gdk_drag_status (GdkDragContext *context,
GdkDragAction action,
guint32 time_)
{
g_return_if_fail (GDK_IS_DRAG_CONTEXT (context));
GDK_DRAG_CONTEXT_GET_CLASS (context)->drag_status (context, action, time_);
}
/**
* gdk_drag_motion:
* @context: a #GdkDragContext
* @dest_window: the new destination window, obtained by
* gdk_drag_find_window()
* @protocol: the DND protocol in use, obtained by gdk_drag_find_window()
* @x_root: the x position of the pointer in root coordinates
* @y_root: the y position of the pointer in root coordinates
* @suggested_action: the suggested action
* @possible_actions: the possible actions
* @time_: the timestamp for this operation
*
* Updates the drag context when the pointer moves or the
* set of actions changes.
*
* This function is called by the drag source.
*/
gboolean
gdk_drag_motion (GdkDragContext *context,
GdkWindow *dest_window,
GdkDragProtocol protocol,
gint x_root,
gint y_root,
GdkDragAction suggested_action,
GdkDragAction possible_actions,
guint32 time_)
{
g_return_val_if_fail (GDK_IS_DRAG_CONTEXT (context), FALSE);
return GDK_DRAG_CONTEXT_GET_CLASS (context)
->drag_motion (context,
dest_window,
protocol,
x_root,
y_root,
suggested_action,
possible_actions,
time_);
}
/**
* gdk_drag_abort:
* @context: a #GdkDragContext
* @time_: the timestamp for this operation
*
* Aborts a drag without dropping.
*
* This function is called by the drag source.
*/
void
gdk_drag_abort (GdkDragContext *context,
guint32 time_)
{
g_return_if_fail (GDK_IS_DRAG_CONTEXT (context));
GDK_DRAG_CONTEXT_GET_CLASS (context)->drag_abort (context, time_);
}
/**
* gdk_drag_drop:
* @context: a #GdkDragContext
* @time_: the timestamp for this operation
*
* Drops on the current destination.
*
* This function is called by the drag source.
*/
void
gdk_drag_drop (GdkDragContext *context,
guint32 time_)
{
g_return_if_fail (GDK_IS_DRAG_CONTEXT (context));
GDK_DRAG_CONTEXT_GET_CLASS (context)->drag_drop (context, time_);
}
/**
* gdk_drop_reply:
* @context: a #GdkDragContext
* @accepted: %TRUE if the drop is accepted
* @time_: the timestamp for this operation
*
* Accepts or rejects a drop.
*
* This function is called by the drag destination in response
* to a drop initiated by the drag source.
*/
void
gdk_drop_reply (GdkDragContext *context,
gboolean accepted,
guint32 time_)
{
g_return_if_fail (GDK_IS_DRAG_CONTEXT (context));
GDK_DRAG_CONTEXT_GET_CLASS (context)->drop_reply (context, accepted, time_);
}
/**
* gdk_drop_finish:
* @context: a #GtkDragContext
* @success: %TRUE if the data was successfully received
* @time_: the timestamp for this operation
*
* Ends the drag operation after a drop.
*
* This function is called by the drag destination.
*/
void
gdk_drop_finish (GdkDragContext *context,
gboolean success,
guint32 time_)
{
g_return_if_fail (GDK_IS_DRAG_CONTEXT (context));
GDK_DRAG_CONTEXT_GET_CLASS (context)->drop_finish (context, success, time_);
}
/**
* gdk_drag_drop_succeeded:
* @context: a #GdkDragContext
*
* Returns whether the dropped data has been successfully
* transferred. This function is intended to be used while
* handling a %GDK_DROP_FINISHED event, its return value is
* meaningless at other times.
*
* Return value: %TRUE if the drop was successful.
*
* Since: 2.6
**/
gboolean
gdk_drag_drop_succeeded (GdkDragContext *context)
{
g_return_val_if_fail (GDK_IS_DRAG_CONTEXT (context), FALSE);
return GDK_DRAG_CONTEXT_GET_CLASS (context)->drop_status (context);
}
/**
* gdk_drag_get_selection:
* @context: a #GdkDragContext.
*
* Returns the selection atom for the current source window.
*
* Return value: the selection atom, or %GDK_NONE
*/
GdkAtom
gdk_drag_get_selection (GdkDragContext *context)
{
g_return_val_if_fail (GDK_IS_DRAG_CONTEXT (context), GDK_NONE);
g_return_val_if_fail (context->source_window != NULL, GDK_NONE);
return GDK_DRAG_CONTEXT_GET_CLASS (context)->get_selection (context);
}
+40 -89
View File
@@ -36,7 +36,9 @@
G_BEGIN_DECLS
typedef struct _GdkDragContext GdkDragContext;
#define GDK_TYPE_DRAG_CONTEXT (gdk_drag_context_get_type ())
#define GDK_DRAG_CONTEXT(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_DRAG_CONTEXT, GdkDragContext))
#define GDK_IS_DRAG_CONTEXT(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_DRAG_CONTEXT))
/**
* GdkDragAction:
@@ -81,60 +83,15 @@ typedef enum
{
GDK_DRAG_PROTO_MOTIF,
GDK_DRAG_PROTO_XDND,
GDK_DRAG_PROTO_ROOTWIN, /* A root window with nobody claiming
* drags */
GDK_DRAG_PROTO_NONE, /* Not a valid drag window */
GDK_DRAG_PROTO_WIN32_DROPFILES, /* The simple WM_DROPFILES dnd */
GDK_DRAG_PROTO_OLE2, /* The complex OLE2 dnd (not implemented) */
GDK_DRAG_PROTO_LOCAL /* Intra-app */
GDK_DRAG_PROTO_ROOTWIN,
GDK_DRAG_PROTO_NONE,
GDK_DRAG_PROTO_WIN32_DROPFILES,
GDK_DRAG_PROTO_OLE2,
GDK_DRAG_PROTO_LOCAL
} GdkDragProtocol;
/* Object that holds information about a drag in progress.
* this is used on both source and destination sides.
*/
typedef struct _GdkDragContextClass GdkDragContextClass;
#define GDK_TYPE_DRAG_CONTEXT (gdk_drag_context_get_type ())
#define GDK_DRAG_CONTEXT(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_DRAG_CONTEXT, GdkDragContext))
#define GDK_DRAG_CONTEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_DRAG_CONTEXT, GdkDragContextClass))
#define GDK_IS_DRAG_CONTEXT(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_DRAG_CONTEXT))
#define GDK_IS_DRAG_CONTEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_DRAG_CONTEXT))
#define GDK_DRAG_CONTEXT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_DRAG_CONTEXT, GdkDragContextClass))
struct _GdkDragContext {
GObject parent_instance;
/*< public >*/
GdkDragProtocol GSEAL (protocol);
gboolean GSEAL (is_source);
GdkWindow *GSEAL (source_window);
GdkWindow *GSEAL (dest_window);
GList *GSEAL (targets);
GdkDragAction GSEAL (actions);
GdkDragAction GSEAL (suggested_action);
GdkDragAction GSEAL (action);
guint32 GSEAL (start_time);
/*< private >*/
gpointer GSEAL (windowing_data);
};
struct _GdkDragContextClass {
GObjectClass parent_class;
};
/* Drag and Drop */
GType gdk_drag_context_get_type (void) G_GNUC_CONST;
GdkDragContext * gdk_drag_context_new (void);
GType gdk_drag_context_get_type (void) G_GNUC_CONST;
void gdk_drag_context_set_device (GdkDragContext *context,
GdkDevice *device);
@@ -146,61 +103,55 @@ GdkDragAction gdk_drag_context_get_suggested_action (GdkDragContext *context)
GdkDragAction gdk_drag_context_get_selected_action (GdkDragContext *context);
GdkWindow *gdk_drag_context_get_source_window (GdkDragContext *context);
GdkWindow *gdk_drag_context_get_dest_window (GdkDragContext *context);
GdkDragProtocol gdk_drag_context_get_protocol (GdkDragContext *context);
/* Destination side */
void gdk_drag_status (GdkDragContext *context,
GdkDragAction action,
guint32 time_);
GdkDragAction action,
guint32 time_);
void gdk_drop_reply (GdkDragContext *context,
gboolean ok,
guint32 time_);
gboolean accepted,
guint32 time_);
void gdk_drop_finish (GdkDragContext *context,
gboolean success,
guint32 time_);
gboolean success,
guint32 time_);
GdkAtom gdk_drag_get_selection (GdkDragContext *context);
/* Source side */
GdkDragContext * gdk_drag_begin (GdkWindow *window,
GList *targets);
GdkDragContext * gdk_drag_begin (GdkWindow *window,
GList *targets);
GdkDragContext * gdk_drag_begin_for_device (GdkWindow *window,
GdkDevice *device,
GList *targets);
GdkNativeWindow gdk_drag_get_protocol_for_display (GdkDisplay *display,
GdkNativeWindow xid,
GdkDragProtocol *protocol);
GdkNativeWindow xid,
GdkDragProtocol *protocol);
void gdk_drag_find_window_for_screen (GdkDragContext *context,
GdkWindow *drag_window,
GdkScreen *screen,
gint x_root,
gint y_root,
GdkWindow **dest_window,
GdkDragProtocol *protocol);
#ifndef GDK_MULTIHEAD_SAFE
GdkNativeWindow gdk_drag_get_protocol (GdkNativeWindow xid,
GdkDragProtocol *protocol);
void gdk_drag_find_window (GdkDragContext *context,
GdkWindow *drag_window,
gint x_root,
gint y_root,
GdkWindow **dest_window,
GdkDragProtocol *protocol);
#endif /* GDK_MULTIHEAD_SAFE */
GdkWindow *drag_window,
GdkScreen *screen,
gint x_root,
gint y_root,
GdkWindow **dest_window,
GdkDragProtocol *protocol);
gboolean gdk_drag_motion (GdkDragContext *context,
GdkWindow *dest_window,
GdkDragProtocol protocol,
gint x_root,
gint y_root,
GdkDragAction suggested_action,
GdkDragAction possible_actions,
guint32 time_);
GdkWindow *dest_window,
GdkDragProtocol protocol,
gint x_root,
gint y_root,
GdkDragAction suggested_action,
GdkDragAction possible_actions,
guint32 time_);
void gdk_drag_drop (GdkDragContext *context,
guint32 time_);
guint32 time_);
void gdk_drag_abort (GdkDragContext *context,
guint32 time_);
guint32 time_);
gboolean gdk_drag_drop_succeeded (GdkDragContext *context);
G_END_DECLS
+91
View File
@@ -0,0 +1,91 @@
/* GDK - The GIMP Drawing Kit
* Copyright (C) 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.
*/
#ifndef __GDK_DND_PRIVATE_H__
#define __GDK_DND_PRIVATE_H__
#include "gdkdnd.h"
G_BEGIN_DECLS
#define GDK_DRAG_CONTEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_DRAG_CONTEXT, GdkDragContextClass))
#define GDK_IS_DRAG_CONTEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_DRAG_CONTEXT))
#define GDK_DRAG_CONTEXT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_DRAG_CONTEXT, GdkDragContextClass))
typedef struct _GdkDragContextClass GdkDragContextClass;
struct _GdkDragContextClass {
GObjectClass parent_class;
GdkWindow * (*find_window) (GdkDragContext *context,
GdkWindow *drag_window,
GdkScreen *screen,
gint x_root,
gint y_root,
GdkDragProtocol *protocol);
GdkAtom (*get_selection) (GdkDragContext *context);
gboolean (*drag_motion) (GdkDragContext *context,
GdkWindow *dest_window,
GdkDragProtocol protocol,
gint root_x,
gint root_y,
GdkDragAction suggested_action,
GdkDragAction possible_actions,
guint32 time_);
void (*drag_status) (GdkDragContext *context,
GdkDragAction action,
guint32 time_);
void (*drag_abort) (GdkDragContext *context,
guint32 time_);
void (*drag_drop) (GdkDragContext *context,
guint32 time_);
void (*drop_reply) (GdkDragContext *context,
gboolean accept,
guint32 time_);
void (*drop_finish) (GdkDragContext *context,
gboolean success,
guint32 time_);
gboolean (*drop_status) (GdkDragContext *context);
};
struct _GdkDragContext {
GObject parent_instance;
/*< private >*/
GdkDragProtocol protocol;
gboolean is_source;
GdkWindow *source_window;
GdkWindow *dest_window;
GList *targets;
GdkDragAction actions;
GdkDragAction suggested_action;
GdkDragAction action;
guint32 start_time;
GdkDevice *device;
};
G_END_DECLS
#endif
-123
View File
@@ -1,123 +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"
#include "gdkdrawable.h"
#include "gdkcairo.h"
#include "gdkinternals.h"
#include "gdkwindow.h"
#include "gdkscreen.h"
#include "gdkpixbuf.h"
#include <pango/pangocairo.h>
#include <gdk-pixbuf/gdk-pixbuf.h>
#include <math.h>
G_DEFINE_ABSTRACT_TYPE (GdkDrawable, gdk_drawable, G_TYPE_OBJECT)
static void
gdk_drawable_class_init (GdkDrawableClass *klass)
{
}
static void
gdk_drawable_init (GdkDrawable *drawable)
{
}
/**
* gdk_drawable_get_clip_region:
* @drawable: a #GdkDrawable
*
* Computes the region of a drawable that potentially can be written
* to by drawing primitives. This region will not take into account
* the clip region for the GC, and may also not take into account
* other factors such as if the window is obscured by other windows,
* but no area outside of this region will be affected by drawing
* primitives.
*
* Returns: a #cairo_region_t. This must be freed with cairo_region_destroy()
* when you are done.
**/
cairo_region_t *
gdk_drawable_get_clip_region (GdkDrawable *drawable)
{
g_return_val_if_fail (GDK_IS_DRAWABLE (drawable), NULL);
return GDK_DRAWABLE_GET_CLASS (drawable)->get_clip_region (drawable);
}
/**
* gdk_drawable_get_visible_region:
* @drawable: a #GdkDrawable
*
* Computes the region of a drawable that is potentially visible.
* This does not necessarily take into account if the window is
* obscured by other windows, but no area outside of this region
* is visible.
*
* Returns: a #cairo_region_t. This must be freed with cairo_region_destroy()
* when you are done.
**/
cairo_region_t *
gdk_drawable_get_visible_region (GdkDrawable *drawable)
{
g_return_val_if_fail (GDK_IS_DRAWABLE (drawable), NULL);
return GDK_DRAWABLE_GET_CLASS (drawable)->get_visible_region (drawable);
}
/**
* _gdk_drawable_ref_cairo_surface:
* @drawable: a #GdkDrawable
*
* Obtains a #cairo_surface_t for the given drawable. If a
* #cairo_surface_t for the drawable already exists, it will be
* referenced, otherwise a new surface will be created.
*
* Return value: a newly referenced #cairo_surface_t that points
* to @drawable. Unref with cairo_surface_destroy()
**/
cairo_surface_t *
_gdk_drawable_ref_cairo_surface (GdkDrawable *drawable)
{
g_return_val_if_fail (GDK_IS_DRAWABLE (drawable), NULL);
return GDK_DRAWABLE_GET_CLASS (drawable)->ref_cairo_surface (drawable);
}
/************************************************************************/
cairo_surface_t *
_gdk_drawable_create_cairo_surface (GdkDrawable *drawable,
int width,
int height)
{
return GDK_DRAWABLE_GET_CLASS (drawable)->create_cairo_surface (drawable,
width, height);
}

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