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
27ce9421d0
Fix up GDK docs
2010-12-25 00:02:39 -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
2f3c7da763
Remove a duplicate doc comment
2010-12-22 17:47:00 +01: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
3ca69937f4
Don't install headers twice
2010-12-21 16:37:16 -05:00
Matthias Clasen
82fe7594f9
More include shuffling; keep X extension headers to ourselves
2010-12-21 14:17:02 -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
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
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
19699989e5
x11: Add a GdkX11Window class for X11 windows
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
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
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
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
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
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
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
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
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
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
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
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
9a1cc81acb
Add a vfunc to replace _gdk_windowing_window_destroy_foreign
...
All backends updated.
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