Commit Graph

112 Commits

Author SHA1 Message Date
Matthias Clasen
27ce9421d0 Fix up GDK docs 2010-12-25 00:02:39 -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
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
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
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
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
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
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
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
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
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
8075cfd658 Move gdk_get_display to common code 2010-12-21 12:06:55 -05:00
Alexander Larsson
5fda1669ea Make display method vtable calls 2010-12-21 12:06:54 -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 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
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
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
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
Milan Bouchet-Valat
2e3935ba9d Fix missing (transfer) annotations in GDK
Mostly missing (transfer none).
2010-11-24 21:37:20 +01:00
Michael Natterer
fb5dd9f72f Move all GdkDevice members to private and add one missing accessor 2010-11-23 20:25:13 +01:00
Javier Jardón
ca480f3771 docs: Move documentation to inline comments: gdkdisplay 2010-11-15 03:37:21 +01:00
Matthias Clasen
bda1f35585 Inclusion cleanups in sources
Try to do inclusions in the same sequence, more or less.
2010-10-14 22:09:36 -04:00
Benjamin Otte
b5097de481 gdk: gdk_drawable_get_display() => gdk_window_get_display() 2010-09-26 15:11:33 +02:00
Havoc Pennington
c7d73ee587 Fix bugs that crashed gdk_display_close() on x11
* _gdk_device_set_associated_device() did not allow NULL device
* GdkDisplay should dispose device manager to avoid devices
  trying to touch the display in finalize
* GdkDeviceManagerXI did not ref devices in id hash
* GdkDisplayX11 did not ref devices in ->input_devices
2010-09-18 22:57:36 -04:00
Javier Jardón
e3fafd7512 docs: Fix gdk_display_get_core_pointer() docs
Point to gdk_device_manager_get_client_pointer(),
not gdk_display_get_client_pointer().
2010-09-13 02:48:21 +02:00
Matthias Clasen
ce08b9bb01 Fix some documentation issues 2010-08-16 23:52:03 -04:00
John Stowers
4198dd8519 Add gdk_display_is_closed
https://bugzilla.gnome.org/show_bug.cgi?id=624224
2010-08-07 23:21:31 +12:00
Javier Jardón
404e7d0e00 gdk/: fully remove gdkalias hacks
https://bugzilla.gnome.org/show_bug.cgi?id=623845
2010-07-10 02:21:31 +02:00
Javier Jardón
d35e4848a2 [docs] Fix annotations: "(allow-none): (out)" -> "(out) (allow-none)" 2010-06-24 18:10:03 +02:00
Carlos Garnacho
6cde835acd GdkDeviceManager: Add gdk_device_manager_get_client_pointer().
This function makes a better replacement for
gdk_display_get_core_pointer(), wherever it might yet be needed, for
XI2 resorts to XIGetClientPointer(), for the others return the only
core pointer.

https://bugzilla.gnome.org/show_bug.cgi?id=621685
2010-06-24 02:30:53 +02:00
Javier Jardón
d6bacafc52 [docs] Use the correct gtk-doc notation
Use 'Deprecated: 3.0:' intead 'Deprecated: 3.0.'
2010-05-27 15:37:19 +02:00
Matthias Clasen
c7a48881c6 Documentation fixes 2010-05-25 19:27:42 -04:00
Matthias Clasen
bd4609b140 Merge the xi2-for-master branch 2010-05-25 18:38:44 -04:00
Johan Dahlin
fe85272112 [annotations] Add allow-none
This commit was created using a script that searched for all docstrings
containing a parameter and the string 'or %NULL'.
Gdk backends and demos excluded as they are not part of a public API

https://bugzilla.gnome.org/show_bug.cgi?id=610474
2010-02-19 17:57:51 -02:00
Colin Walters
18dc96caf8 Merge in Gdk-custom.c introspection annotations
The Gdk-custom.c file in gir-repository contained a number of
introspection annotations.  Merge those into the GDK source files.

Some documentation was moved from the tmpl/ files to accomodate
the addition of annotations.

https://bugzilla.gnome.org/show_bug.cgi?id=592279
2009-12-16 17:22:01 -02:00
Alexander Larsson
739121dee0 Remove unused grab_one_pointer_release_event var
We don't use this anymore, so just remove.
2009-09-28 15:26:19 +02:00
Alexander Larsson
5ebb32d1ff Extend _gdk_windowing_window_at_pointer to be able to get toplevels only
This has two advantages:
1) In many backends, this is faster as we can terminate the window
hierarchy traversal earlier
2) When used in gdkdisplay.c::get_current_toplevel() to get the
current toplevel that has the pointer we now correctly return
a toplevel with the pointer in it where the pointer is inside
some foreign subwindow of a toplevel window.

The second advantage fixes some bugs in client side event generation
when the pointer is inside such a foreign child window.
2009-09-28 15:21:54 +02:00
Alexander Larsson
1932f32ef2 Correct generation of broken grabs
We send a broken grab when a *parent* gets unmapped, not when
a child gets unmapped!
2009-08-27 13:32:01 +02:00
Alexander Larsson
41054425b9 Make sure we only send one grab broken event
We were incorrectly sending grab broken events in two places which
could cause multiple events for a single grab broken.
2009-08-27 13:32:01 +02:00