Commit Graph

25 Commits

Author SHA1 Message Date
Matthias Clasen
14ad1fab8e GdkDisplay: Struct packing improvements 2011-04-12 12:13:55 -04:00
Benjamin Otte
44c02fcbb1 API: gdk: Change get_drag_window() API
The previous function gdk_drag_get_protocol_for_display() took native
window handles, so it had to be changed. Because it didn't do what it
was named to do (it didn't return a protocol even though it was named
get_protocol) and because it doesn't operate on the display anymore but
on the actual window, it's now called gdk_window_get_drag_protocol().
2011-02-01 18:51:57 +01:00
Benjamin Otte
5bc04bc07b API: gdk: Make GdkEventSelection.requestor a GdkWindow
instead of a GdkNativeWindow. Also change gdk_selection_notify() API to
take a GdkWindow to match this change.
2011-02-01 18:51:57 +01:00
Benjamin Otte
c332ac207a gdk: Remove GdkEventClient
... and all APIs making use of it.

That code like it hasn't been touched in years, Google codesearch
didn't find any users and most importantly it's a horrendous API, so
let's just make it die instead of having to port it over to
non-GdkNativeWindow usage, which would be required for multi-backend
GDK.

http://mail.gnome.org/archives/gtk-devel-list/2011-January/msg00049.html
2011-02-01 06:33:02 +01:00
Benjamin Otte
6c39cade16 gdk: Get rid of GdkDisplayDeviceHooks
Move the only user to call the function directly and copy the called
function over.
2011-01-03 17:44:24 +01:00
Benjamin Otte
6e18276f52 gdk: Move get_device_state out of the display hooks
Previous callers now use _gdk_device_query_state() directly.
2011-01-03 17:44:24 +01:00
Benjamin Otte
8d2104fdc9 gdk: Move window_get_device_position function out of the device hooks 2011-01-03 17:44:24 +01:00
Benjamin Otte
d72d19d247 API: gdk: Remove gdk_display_set_device_hooks()
There's no usecase for them, so remove them before we have to commit to
keeping an API.

Make the hooks private for now, actually removing them will come in
followup patches.
2011-01-03 16:51:38 +01: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
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
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
cc03a6df79 Add vfuncs for get/set_selection_owner 2010-12-21 12:07:03 -05:00
Matthias Clasen
afa0ebf36b Add vfuncs for gdk_test apis 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
126212b470 Add a vfunc for _gdk_window_impl_new 2010-12-21 12:07:01 -05:00
Matthias Clasen
39a71b8831 Add vfuncs for _gdk_windowing_event_data_{copy,free} 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
9adb974155 Add a vfunc for _gdk_windowing_window_get_next_serial 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
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