Commit Graph

152 Commits

Author SHA1 Message Date
Torsten Schönfeld
e6149931c9 gdk: add missing annotations to gdk_event_get_scroll_deltas
https://bugzilla.gnome.org/show_bug.cgi?id=677774
2012-06-10 22:21:32 +02:00
Matthias Clasen
050cba6a31 Fix malformed doc comments
Most of these are forgotten :'s and similar details
which gtk-doc now warns about.
2012-04-12 21:12:16 -04:00
Carlos Garnacho
f47e470e58 gdk: deal with GDK_SMOOTH_SCROLL events as not having a direction
gdk_event_get_scroll_direction() will return FALSE on these, so
gdk_event_get_scroll_deltas() has to be used to retrieve dx/dy
2012-03-01 16:28:57 -05:00
Michael Natterer
0efbbc6435 gdk: Add delta_x/y to scroll events
gdk_event_get_scroll_deltas() can be used to retrieve those
values on smooth scroll events.
2012-03-01 16:28:56 -05:00
Carlos Garnacho
7f35708cee gdk: Add touch event types and mask
This commit introduces GDK_TOUCH_BEGIN/UPDATE/END/CANCEL
and a separate GdkEventTouch struct that they use. This
is closer to the touch event API of other platforms and
matches the xi2 events closely, too.
2012-03-01 16:25:20 -05:00
Carlos Garnacho
a490d2ebda gdk: Add internal API to set "pointer emulated" flag on events
This flag will be used for non-pointer events that are emulated
from eg. touch events, or pointer events being emulated.
2012-03-01 16:25:19 -05:00
Carlos Garnacho
bc8401d1ed gdk: Add GdkEventSequence
GdkEventSequence is an opaque pointer type that is used
to identify sequences of touch events that belong together.
2012-03-01 16:25:13 -05:00
Javier Jardón
9d0febc9a6 Change FSF Address 2012-02-27 17:06:11 +00:00
Carlos Garcia Campos
bc5d8da0c6 gdkevents: Use symbolic names for button numbers 2012-01-27 09:47:42 +01:00
Alexander Larsson
6690e6dc58 ref, don't unref, requestor member when copying GdkEvents
This seems like a typo, we should obviously ref the member when
copying. Apparently nobody copied GDK_SELECTION_* events...
2011-11-17 11:59:27 +01:00
Michael Natterer
2d3db3421f Bug 659406 - Abstract what triggers a context menu
Add gdk_event_triggers_context_menu(), using the new modifier
abstraction API. Remove _gtk_button_event_triggers_context_menu()
and port all callers.
2011-09-27 15:45:18 +02:00
Cosimo Cecchi
f7c188c019 API: add accessors for GdkEvent fields
Add accessors for the following fields: button, keyval, keycode, scroll
direction, click count.

https://bugzilla.gnome.org/show_bug.cgi?id=657384
2011-08-28 19:50:34 -04:00
Matthias Clasen
9e6d3d969c Fix some possible crashes if the default display is NULL
Unlikely that many people will hit these, but still.
https://bugzilla.gnome.org/show_bug.cgi?id=645176
2011-04-08 21:20:26 -04:00
Carlos Garcia Campos
651410fa2a Copy event axes for double/triple click events in gdk_event_copy()
Button event axes for double/triple click events are freed by
gdk_event_free(), so copy them to avoid an invalid free when releasing a
copied event.
2011-02-25 09:13:35 +01:00
Carlos Garnacho
3f78b251b9 Free event axes for double/triple click events.
The button event axes are copied over when synthesizing
these events, so free them as well in gdk_event_free().
2011-02-17 20:45:32 +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
Matthias Clasen
b52db73f59 Deal gracefully with unowned selections
If a selection looses its owner without a replacement, owner is
None, which we did not handle very well.

https://bugzilla.gnome.org/show_bug.cgi?id=641042
2011-01-31 19:35:51 -05:00
Benjamin Otte
9864445b1f API: gdk: Change GdkEventOwnerChange to not take GdkNativeWindow
Use GdkWindow instead. This requires calling
gdk_x11_window_foreign_new_for_display(), so might cause a slight
performance penalty, but is required to be portable.
2011-01-31 07:17:31 +01:00
Matthias Clasen
454c36523a Silence new gcc warnings
gcc 4.6.0 has started to warn about set-but-unused variables.
So don't do that, then.
2011-01-23 18:50:09 -05:00
Pavel Holejsovsky
2fb1c06402 [GI] Add missing (out) and (array) annotations 2011-01-20 13:57:20 +01:00
Pavel Holejsovsky
2f0d40335b [GI] Add missing (transfer) annotations 2011-01-20 13:57:18 +01:00
Matthias Clasen
99812be7d7 Be more careful with private event data
When copying allocated events, also copy the source device.
When synthesizing double or triple clicks, copy the original
button press event including device information.

https://bugzilla.gnome.org/show_bug.cgi?id=639822
2011-01-19 22:52:55 -05: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
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
39a71b8831 Add vfuncs for _gdk_windowing_event_data_{copy,free} 2010-12-21 12:06:59 -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
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
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
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
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
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
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
4400f997a8 docs: Move documentation to inline comments: gdkevents 2010-11-15 21:06:35 +01:00
Carlos Garnacho
b1dec866e5 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-28 23:01:16 +02:00
Owen W. Taylor
398728feb5 Remove unused GdkDeviceManager variable
gdk_display_get_device_manager() was called but the device manager
not used.
2010-10-28 16:43:55 -04: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
Benjamin Otte
a6e936788a gdk: gdk_drawable_get_screen/visual => gdk_window_get_screen/visual 2010-09-26 15:11:33 +02:00
Tomeu Vizoso
41f4fd94df Don't try to unref event->dnd.context unconditionally.
As it's not set in gdk_event_new but eventually later.

https://bugzilla.gnome.org/show_bug.cgi?id=630520
2010-09-24 18:20:41 +02:00
Javier Jardón
9c3d1080d6 Do not use deprecated gdk_display_get_core_pointer()
Use gdk_device_manager_get_client_pointer() instead
2010-09-22 03:42:15 +02:00
Matthias Clasen
e0aa12eb0a Tons of transfer annotations 2010-09-21 00:18:11 -04:00
Matthias Clasen
eb10e6b128 Remove the long deprecated GDK_WINDOW_DIALOG type.
This has been deprecated forever, and was just left in for
compatibility reasons.
2010-08-28 20:10:02 -04:00
Christian Persch
ffa07ee21e Use G_DEFINE_BOXED_TYPE
Bug #627214.
2010-08-18 15:34:47 +02: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
Kristian Rietveld
43f4398dbd Remove mention of gdk_event_get_graphics_expose() 2010-06-30 21:43:25 +02:00
Benjamin Otte
3e96cfe8fc Deprecate the GdkRegion API
Includes fixing all callers to use the cairo region API instead. This is
usually just replacing the function names, the only difference is
gdk_region_get_rectangles() being replaced by
cairo_region_num_rectangles() and cairo_region_get_rectangle() which
required a bit more work.

https://bugzilla.gnome.org/show_bug.cgi?id=613284
2010-06-29 16:06:38 +02:00
Javier Jardón
349f8c561d Remove gdk_input_* callbacks on file descriptors deprecated functions
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=619687
2010-06-20 00:46:38 +02:00
Carlos Garnacho
cd76d995eb gdk_event_get_device(): Fallback to core pointer/keyboard.
Events could be injected by third party code, which could not have a
GdkDevice set for newer GdkEvent types holding a GdkDevice. This
function will now fallback to core pointer/keyboard, plus issuing
a warning about the problem.
2010-06-15 21:06:11 +02:00
Steve Frécinaux
586d60dbee [gdkevents] Add annotations for GdkEvent getters. 2010-06-08 00:00:28 +02:00