Commit Graph

4369 Commits

Author SHA1 Message Date
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
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
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
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
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
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
Mike Gorse
2a324ae304 Fix inclusion of gdkconfig.h 2010-12-21 18:18:07 -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
940d123de5 Add gdk_disable_multidevice to headers 2010-12-21 14:33:56 -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
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
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
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
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
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
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
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
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
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
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
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
Michael Natterer
13f18567e9 gdk: return 0, not NULL from gdk_device_get_n_axes() 2010-12-21 15:16:35 +01: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
Matthias Clasen
eb11430228 Fix gdk symbols after recent changes 2010-12-18 17:39:42 -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
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
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
Carlos Garnacho
ec82d133b1 Remove debug messages from GdkDevice 2010-12-15 15:48:43 +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
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
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
Matthias Clasen
3b90d877b7 Remove unused header 2010-12-10 23:39:10 -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
Matthias Clasen
05abea6c4f Add missing include
See bug 636732
2010-12-08 11:49:48 -05:00
Robert Ancell
6188ea608f Add missing X11/Xlib.h include required for X11/extensions/sync.h 2010-12-08 18:44:20 +11: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
Benjamin Otte
9b042e39ec gdk: Add section docs for GdkRGBA 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
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
Kristian Rietveld
fd6e57687d Port Quartz backend to latest rendering-cleanup changes 2010-12-06 14:15:47 +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
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
Alexander Larsson
190f533258 [broadway] Remove unnecessary backend-specific function
These were just blindly copied from the X backend
2010-12-04 22:59:04 +01:00
Alexander Larsson
7dbbc54370 [broadway] Remove unneeded _gdk_window_impl_get_type call 2010-12-04 22:54:45 +01: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
Alexander Larsson
895922569e [broadway] Update to the new drawable-less APIs 2010-12-04 22:31:28 +01:00
Alexander Larsson
07fafe7b23 Merge branch 'master' into broadway 2010-12-04 22:31:15 +01:00
Paolo Borelli
cd76b057e9 Annotate gdk_window_get_geometry, get_position and get_origin 2010-12-04 15:47:50 +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
02a30118c6 Add a boxed type for cairo_pattern_t. 2010-12-04 15:38:11 +01:00
Matthias Clasen
12e5e24c3e Another attempt to fix the gdk symbol list 2010-12-03 23:50:58 -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
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
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
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
8c6831ab5e gdk: Remove useless macros from gdkprivate.h 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
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
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
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
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
Matthias Clasen
670dfdb7cc Re-add some conditionals to symbols files
We need to keep the ifdefs for platform abi differences.
2010-11-29 12:47:44 -05:00
Matthias Clasen
a562646678 Add gdk_device_get_n_keys to symbol list 2010-11-29 11:49:11 -05:00
Emmanuele Bassi
1779ae79a1 rgba: Invert the arguments and improve bindability
Since parse() is a method of the Gdk.RGBA class, the GdkRGBA pointer
should be the first argument, and the string the second one, to allow a
more natural binding.

https://bugzilla.gnome.org/show_bug.cgi?id=635879
2010-11-28 19:01:51 +00:00
Matthias Clasen
b0bf2b5202 Avoid delays in starting applications
Only query file info once, and don't do it for non-native files, since
that may cause sync network IO.

Bug http://bugzilla.gnome.org/show_bug.cgi?id=635588
2010-11-27 23:12:09 -05:00
Alexander Larsson
80f332308f [broadway] Add initial keyboard event support 2010-11-25 22:09:34 +01:00
Alexander Larsson
4aac045a30 [broadway] Don't return undefined counts in keymap calls 2010-11-25 22:09:34 +01:00
Alexander Larsson
667d23aa7c [broadway] Hook mousewheel scrolling 2010-11-25 22:09:33 +01:00
Alexander Larsson
d6029949e6 [broadway] Disable context menu so rmb works 2010-11-25 22:09:33 +01:00
Alexander Larsson
4004882b92 [broadway] Only change window positioning for toplevels not e.g. menus 2010-11-25 22:09:33 +01:00
Alexander Larsson
c1a35afa5f [broadway] Don't have mouse_in_toplevel point to hidden or destroyed window 2010-11-25 22:09:33 +01:00
Alexander Larsson
0b6265b76a [broadway] Only allow one input session 2010-11-25 22:09:33 +01:00
Alexander Larsson
a4fc901c07 [broadway] Handle errors in input nicer
Also, fix a leak
2010-11-25 22:09:33 +01:00
Alexander Larsson
9cc073803f [broadway] Only open one websocket for input! 2010-11-25 22:09:33 +01:00
Alexander Larsson
e7169f75e6 Move send_error up 2010-11-25 22:09:33 +01:00
Alexander Larsson
1b3efb3599 Save current input request 2010-11-25 22:09:33 +01:00
Alexander Larsson
1ba38a48d7 [broadway] Remove old unused declarations 2010-11-25 22:09:33 +01:00
Alexander Larsson
7667ad456b [broadway] Avoid crash if mask is NULL 2010-11-25 22:09:33 +01:00
Alexander Larsson
b23fd41449 [broadway] Fix warning 2010-11-25 22:09:33 +01:00
Alexander Larsson
ccab600fb4 Move event generation to gdkeventsource.c 2010-11-25 22:09:33 +01:00
Alexander Larsson
0539303dfc Handle output errors correctly 2010-11-25 22:09:33 +01:00
Alexander Larsson
0ca5a1a574 [broadway] Track errors in BroadwayOutput 2010-11-25 22:09:33 +01:00
Alexander Larsson
ce5cccf0ab [broadway] Fix typo in assignment 2010-11-25 22:09:33 +01:00
Alexander Larsson
e8117544a0 [broadway] Convert broadway.c to use glib stuff 2010-11-25 22:09:33 +01:00
Alexander Larsson
fcce2986ce [broadway] Keep track of the GSocketConnection for the output 2010-11-25 22:09:32 +01:00
Alexander Larsson
f407b4a5f5 Rename BroadwayClient to BroadwayOutput 2010-11-25 22:09:32 +01:00
Alexander Larsson
5a9f7a1e35 [broadway] Fix warning in demo 2010-11-25 22:09:32 +01:00
Alexander Larsson
1bc7bc5542 [broadway] Initialize masks to zero everywhere to avoid valgrind warnings 2010-11-25 22:09:32 +01:00
Alexander Larsson
77907fec79 Move global window list to per-display 2010-11-25 22:09:32 +01:00
Alexander Larsson
08a180a699 [broadway] Hack up window placement for demo 2010-11-25 22:09:32 +01:00
Alexander Larsson
b82ed84709 [broadway] Implement window resize 2010-11-25 22:09:32 +01:00
Alexander Larsson
65f767a363 [broadway] NULL out ref_surface on resize too 2010-11-25 22:09:32 +01:00
Alexander Larsson
2e1f6e09e5 [broadway] Add some fuzz to rectangle scanner
We don't want a bazillion tiny rectangles, so add some fuzz
to the rectangle scanners so we get less but larger rectangles.
2010-11-25 22:09:32 +01:00
Alexander Larsson
5ec2531e9b [broadway] Switch autocrop to smarter rectangle search 2010-11-25 22:09:32 +01:00
Alexander Larsson
e88a18e0ea [broadway] Add realloc wrapper 2010-11-25 22:09:32 +01:00
Alexander Larsson
d0e403c54d [broadway] Fix up scrolling 2010-11-25 22:09:32 +01:00
Alexander Larsson
bed0ccba9d [broadway] Handle window moves 2010-11-25 22:09:32 +01:00
Alexander Larsson
ec4a6c4a5f [broadway] Implement _gdk_windowing_window_at_device_position 2010-11-25 22:09:31 +01:00
Alexander Larsson
93fec05183 [broadway] Track last mouse position 2010-11-25 22:09:30 +01:00
Alexander Larsson
e64a38eeef [broadway] Fix x/y mismatch in canvas position 2010-11-25 22:09:30 +01:00
Alexander Larsson
5a49bfe96a Fix some type warnings 2010-11-25 22:09:30 +01:00
Alexander Larsson
e6c340519c [broadway] Send diffs as bilevel rgba instead of true diff
The true diff only works if the destination keeps perfect 32bit
canvas data, which is not always true. So, instead we send only
changed pixels, masking the others to 0 via alpha 0.
2010-11-25 22:09:30 +01:00
Alexander Larsson
6fe849d4f1 [broadway] Send and use canvas ids in events 2010-11-25 22:09:30 +01:00
Alexander Larsson
d211d78eef [broadway] Track window<->id mapping 2010-11-25 22:09:30 +01:00
Alexander Larsson
cdd274a55c [broadway] Missed a place to use event time 2010-11-25 22:09:30 +01:00
Alexander Larsson
8f9c6eb1a9 [broadway] clean up input sending js 2010-11-25 22:09:30 +01:00
Alexander Larsson
65d4edbd5b [broadway] Send event timestamps from client 2010-11-25 22:09:30 +01:00
Alexander Larsson
2e8f21cb1b [broadway] Allow loading client.html as "/" only 2010-11-25 22:09:30 +01:00
Alexander Larsson
2ee6dbd998 Remove unneeded copy of region 2010-11-25 22:09:30 +01:00
Alexander Larsson
163a278d13 Fix button numbers in events (starts with 1, not 0) 2010-11-25 22:09:30 +01:00
Alexander Larsson
884527a958 [broadway] Initial work on mouse events 2010-11-25 22:09:30 +01:00
Alexander Larsson
ee6b07bf15 [broadway] remove some spew 2010-11-25 22:09:29 +01:00
Alexander Larsson
95df67f47b [broadway] don't sync the root window 2010-11-25 22:09:29 +01:00
Alexander Larsson
0a20ab58fa [brodway] Don't send 0x0 deltas, they confuse the client 2010-11-25 22:09:29 +01:00
Alexander Larsson
1e3dffeee9 Send mouse events from js 2010-11-25 22:09:29 +01:00
Alexander Larsson
852b317b4f Initial sketch of websockets support 2010-11-25 22:09:29 +01:00
Alexander Larsson
f11a7d2fde Don't put output on stdin, instead do it on http connection 2010-11-25 22:09:29 +01:00
Alexander Larsson
8a0429b42d Flesh out http server to handle client.html and broadway.js 2010-11-25 22:09:29 +01:00
Alexander Larsson
b07ead64ed Add makerules to turn client.html and broadway.js into #include files 2010-11-25 22:09:29 +01:00
Alexander Larsson
ded9bc698b Add initial http server 2010-11-25 22:09:29 +01:00
Alexander Larsson
0b85341737 Add broadway javascript and html part 2010-11-25 22:09:29 +01:00
Alexander Larsson
6651eab293 [broadway] Initial hookup of broadway client 2010-11-25 22:09:29 +01:00
Alexander Larsson
cb056e3738 [broadway] Fix up nvisuals handling 2010-11-25 22:09:29 +01:00
Alexander Larsson
db288f3233 [broadway] Ensure gdk_ref_cairo_surface object can be destroyed
If we return a direct ref that is not possible, since we own a ref to it.
This is problematic as the gdkwindow.c code uses destruction to track
outstanding surfaces.

We fix this by returning a subsurface.
2010-11-25 22:09:29 +01:00
Alexander Larsson
f02b7c9ed2 [broadway] Copy regions on last_surface during translations too
This will help make scrolling more efficient
2010-11-25 22:09:29 +01:00
Alexander Larsson
60cf2d53eb Track last_surface properly 2010-11-25 22:09:29 +01:00
Alexander Larsson
7f0e43c0fd [broadway] Import broadway lib
We put this in gtk+ for now since it will be synced initially, but
it avoids using glib so that it can be used lower in the stack if
required (e.g. in cairo later).
2010-11-25 22:09:29 +01:00
Alexander Larsson
d707d057c2 [broadway] Rename X11 -> Broadway in all code
This just runs:
for i in *.[ch]; do
 sed -i s/DisplayX11/DisplayBroadway/g $i;
 sed -i s/PrivateX11/PrivateBroadway/g $i;
 sed -i s/ImplX11/ImplBroadway/g $i;
 sed -i s/KeymapX11/KeymapBroadway/g $i;
 sed -i s/ScreenX11/ScreenBroadway/g $i;
 sed -i s/GdkX11Monitor/GdkBroadwayMonitor/g $i;
 sed -i s/_X11/_BROADWAY/g $i;
 sed -i s/x11/broadway/g $i;
done
2010-11-25 22:09:29 +01:00
Alexander Larsson
ce6ae54607 [broadway] Send MAP/UNMAP events for impl windows 2010-11-25 22:09:29 +01:00
Alexander Larsson
2ecaeb149f [broadway] Implement window translation 2010-11-25 22:09:28 +01:00
Alexander Larsson
73f9c0cc00 [broadway] Track dirty windows 2010-11-25 22:09:28 +01:00
Alexander Larsson
85515b7775 [broadway] Keep track of all (toplevel) windows 2010-11-25 22:09:28 +01:00
Alexander Larsson
c456e98880 Remove X use from broadway backend 2010-11-25 22:09:28 +01:00
Alexander Larsson
dffa6e0da7 Remove X based dnd 2010-11-25 22:09:28 +01:00
Alexander Larsson
a54e556ad8 Remove event translators 2010-11-25 22:09:28 +01:00
Alexander Larsson
5b480e1b0d [broadway] Copy X backend to broadway 2010-11-25 22:09:19 +01:00
Milan Bouchet-Valat
2e3935ba9d Fix missing (transfer) annotations in GDK
Mostly missing (transfer none).
2010-11-24 21:37:20 +01:00
Michael Natterer
aaf8530177 gdk: remove GdkDeviceKey and GdkDeviceAxis from the public API
move GdkDeviceKey to gdkdevice.c because it's still used there, remove
GdkDeviceAxis entirely.
2010-11-24 20:28:19 +01:00
Michael Natterer
bdf18500ec gdk: gdk_device_get_n_keys() is now Since: 2.24 2010-11-24 20:16:25 +01:00
Benjamin Otte
fd96b16c15 gdk: Remove unused macros from build
Both ALL_FILES and INCLUDE_VARIABLES don't exist anymore
2010-11-24 16:18:46 +01:00
Benjamin Otte
cca530070e gdk: Clean up gdk.symbols file
Remove all the macro madness and sort it alphabetically.
2010-11-24 16:15:47 +01:00
Tor Lillqvist
290ecb0aba Fix compilation breakage in gdk/win32 2010-11-24 14:26:53 +02:00
John Ralls
c0aae6644a Replace references to sealed GdkDevice private variables with accessor calls in quartz. 2010-11-23 16:53:45 -08:00