Commit Graph

162 Commits

Author SHA1 Message Date
Matthias Clasen
e16cdb141c Drop gdk_event_handler_set
This is no longer used by GTK.
2019-02-23 14:13:57 -05:00
Timm Bäder
5c81cc2f36 GdkEvent: Make gdk_event_set_user_data private 2019-01-18 19:43:48 +01:00
Tomasz Miąsko
c665a1d5a5 Annotate values of PRIORITY constants
g-ir-scanner incorrectly evaluates macro definition that include
references to other macro definitions. Provide a correct value as an
annotation.

Differences in generated gir files:

```diff
@@ -19017 +19017 @@
-    <constant name="PRIORITY_REDRAW" value="20" c:type="GDK_PRIORITY_REDRAW">
+    <constant name="PRIORITY_REDRAW" value="120" c:type="GDK_PRIORITY_REDRAW">
@@ -74229,3 +74229,3 @@
     </constant>
-    <constant name="PRIORITY_RESIZE" value="10" c:type="GTK_PRIORITY_RESIZE">
+    <constant name="PRIORITY_RESIZE" value="110" c:type="GTK_PRIORITY_RESIZE">
       <doc xml:space="preserve">Use this priority for functionality related to size allocation.
@@ -106786,3 +106786,3 @@
     <constant name="TEXT_VIEW_PRIORITY_VALIDATE"
-              value="5"
+              value="125"
               c:type="GTK_TEXT_VIEW_PRIORITY_VALIDATE">
```

See !472
2018-12-22 18:52:20 +01:00
Benjamin Otte
813957a92f gdk: Remove gdk_event_get_string()
You want to use an IM module to get strings out of keypresses, not some
crude hack that only works on X11 and Wayland anyway.
2018-07-30 19:32:38 +02:00
Matthias Clasen
7a1073c3ae Revert "gdk: Drop configure events"
This reverts commit a8926c9d87.
2018-07-15 20:23:45 -04:00
Matthias Clasen
7ca6440f4d gdk: Drop map events
We are really inconsistent about generating these,
and they are not actually used in GTK+. Instead,
add a boolean GdkSurface::mapped property.
2018-07-15 15:10:56 -04:00
Matthias Clasen
da3aaf39b9 gdk: Drop expose events
Replace expose events with a GdkSurface::expose signal.
This is part of the move to use events only for input.
2018-07-15 13:13:07 -04:00
Matthias Clasen
a8926c9d87 gdk: Drop configure events
Replace configure events with a GdkSurface::size-changed signal.
This is part of the move to use events only for input.
2018-07-15 11:51:09 -04:00
Matthias Clasen
64f5afe608 dnd: Rename headers
Rename gdkdnd.h to gdkdrag.h, to go along with gdkdrop.h

This commit includes the necessary updates to the X11, Wayland
and Broadway backends. Other backends have to be updated separately.
2018-07-02 15:00:50 +02:00
Matthias Clasen
8755d884f3 Remove a lot of Since annotations
4.0 will represent a clean epoch. We don't want to have
lots of noise in the docs about 2.x or 3.x.
2018-06-25 19:55:04 -04:00
Benjamin Otte
d02b185a87 dnd: Add gdk_event_get_drop()
And remove gdk_event_get_drag_context().

All GTK code now only uses GdkDrop for dropping.
2018-06-18 23:49:52 +02:00
Benjamin Otte
7e574fa98c gdk: Get rid of gdk_event_free()
Events are objects, so use g_object_unref().
2018-05-29 21:53:44 +02:00
Alexander Larsson
3dce0dcca7 GdkSurface: Rename lots of stuff from window->surface
Mostly these are internal things, but the major public change is
that event.window is now event.surface.
2018-03-20 15:14:10 +01:00
Alexander Larsson
391727bd0d GdkWindow -> GdkSurface initial type rename
This renames the GdkWindow class and related classes (impl, backend
subclasses) to surface. Additionally it renames related types:
GdkWindowAttr, GdkWindowPaint, GdkWindowWindowClass, GdkWindowType,
GdkWindowTypeHint, GdkWindowHints, GdkWindowState, GdkWindowEdge

This is an automatic conversion using the below commands:

git sed -f g GdkWindowWindowClass GdkSurfaceSurfaceClass

git sed -f g GdkWindow GdkSurface
git sed -f g "gdk_window\([ _\(\),;]\|$\)" "gdk_surface\1" # Avoid hitting gdk_windowing
git sed -f g "GDK_WINDOW\([ _\(]\|$\)" "GDK_SURFACE\1" # Avoid hitting GDK_WINDOWING
git sed "GDK_\([A-Z]*\)IS_WINDOW\([_ (]\|$\)" "GDK_\1IS_SURFACE\2"
git sed GDK_TYPE_WINDOW GDK_TYPE_SURFACE
git sed -f g GdkPointerWindowInfo GdkPointerSurfaceInfo

git sed -f g "BROADWAY_WINDOW" "BROADWAY_SURFACE"
git sed -f g "broadway_window" "broadway_surface"
git sed -f g "BroadwayWindow" "BroadwaySurface"
git sed -f g "WAYLAND_WINDOW" "WAYLAND_SURFACE"
git sed -f g "wayland_window" "wayland_surface"
git sed -f g "WaylandWindow" "WaylandSurface"
git sed -f g "X11_WINDOW" "X11_SURFACE"
git sed -f g "x11_window" "x11_surface"
git sed -f g "X11Window" "X11Surface"
git sed -f g "WIN32_WINDOW" "WIN32_SURFACE"
git sed -f g "win32_window" "win32_surface"
git sed -f g "Win32Window" "Win32Surface"
git sed -f g "QUARTZ_WINDOW" "QUARTZ_SURFACE"
git sed -f g "quartz_window" "quartz_surface"
git sed -f g "QuartzWindow" "QuartzSurface"

git checkout NEWS* po-properties
2018-03-20 11:40:08 +01:00
Matthias Clasen
89f6b8751e Remove gdk_window_add_filter
Drop the public filtering API. The x11 backend already has
the ::xevent signal as replacement. The win32 backend needs
a similar signal to replace filtering.

Reshuffle header inclusions in the x11 backend a little bit
to avoid a cyclic inclusion between gdkprivate-x11.h and
gdkdisplay-x11.h that is otherwise causing problems.
2018-02-07 15:12:03 -05:00
Matthias Clasen
5b63583c0b Make gdk_event_get_history public
This function is meant to be public, but was missing
an annotation in the header.
2018-02-06 01:17:17 -05:00
Matthias Clasen
4c150d8eb5 The big versioning cleanup
Remove all the old 2.x and 3.x version annotations.
GTK+ 4 is a new start, and from the perspective of a
GTK+ 4 developer all these APIs have been around since
the beginning.
2018-02-06 01:16:32 -05:00
Carlos Garnacho
f964fe3ee5 gdk: Rename gdk_event_get_history() to get_motion_history()
It only applies to GDK_MOTION_NOTIFY events, so this is a more descriptive
name. Also add Since tag in docs, and GDK_AVAILABLE_IN_3_94.
2018-02-05 16:05:34 +01:00
Matthias Clasen
dbcf0d1b69 gdk: Move GdkWindowState enum around
We no longer have an event for this, so move the
enum to gdkwindow.h, where it belongs.
2017-12-26 13:00:27 -05:00
Matthias Clasen
97dcf2461e gdk: Remove the event structs from the documentation
No longer public api.
2017-12-26 13:00:27 -05:00
Matthias Clasen
22a43dafc8 Remove leftover gdk_event_request_motions from headers
The implementation of this function was removed in
44cb3ccfa1.
2017-12-26 11:51:28 -05:00
Benjamin Otte
a04afde35c gdk: Remove DRAG_STATUS and DROP_FINISHED events
Those are source-side events that are handled by signals of the
Dragontext these days.
2017-12-15 23:48:36 +01:00
Matthias Clasen
9194ee4973 gdk: Drop GDK_DAMAGE
We haven't been generating events of this type
since we dropped offscreen windows.
2017-12-14 23:35:08 -05:00
Matthias Clasen
65fc43a1f3 Drop GDK_CLIENT_EVENT
We never generate events of this type, so no need
to carry it around.
2017-12-14 22:55:03 -05:00
Matthias Clasen
8d42ab6b91 gdk: Remove explicit event type numbering
The numeric values of event types are irrelevant,
so we don't need to declare them explicitly.
2017-12-14 22:43:53 -05:00
Matthias Clasen
11a946df39 gdk: Drop GdkEventWindowState
No longer generate this event. Instead, emit change
notification for GdkWindow::state.
2017-12-14 22:24:06 -05:00
Benjamin Otte
f2bb2024c8 gdk: Remove properties
They are not used anymore.

Gone with them are PropertyNotify events.
2017-12-14 03:05:34 +01:00
Carlos Garnacho
ea216accd7 gdk: Implement motion history as motion event data
In the motion compression phase the coalesced events will be saved
as a GdkTimeCoord on the motion event that shall be delivered.

For simplicity (and because history doesn't make much sense otherwise)
event history is only recorded while there are buttons pressed, this
also tidily ensures that those coalesced events would have the same
target widget on the gtk side than the delivered one, because of
implicit grabs.
2017-12-14 01:05:48 +01:00
Carlos Garnacho
2acbb7b01d gdk: Turn GdkEvent into a GObject
Two warts remain. gdk_event_copy() should be unnecessary as
events should be considered static after delivery, so g_object_ref()
should be just as good. There's a few exceptional cases that the event
is copied and then modifier for later processing, those cases should be
reconsidered individually.

And gdk_event_free() could be likewise turned into g_object_unref(),
many callers remain though.
2017-12-14 01:05:48 +01:00
Benjamin Otte
54f9aef0d4 gdk: Remove gdk_selection_convert()
It's not used anymore.
2017-12-14 00:44:26 +01:00
Benjamin Otte
4042d5f242 gdk: Remove ability to own a selection
With this, the GDK_EVENT_SELECTION_REQUEST and GDK_EVENT_SELECTION_CLEAR
and the associated GtkWidget signals are gone, too.
2017-12-13 23:39:02 +01:00
Benjamin Otte
8a453924a0 gdk: Remove gdk_event_put(), peek() etc
We don't want to treat events like they don't belong to displays. So
instead, people should use gdk_display_put/peek/get_event().
2017-12-13 00:56:52 +01:00
Benjamin Otte
437d70f569 gdk: Get rid of owner change events
They're unused now.
2017-12-03 05:46:49 +01:00
Benjamin Otte
bd6b6ed93c gdk: Remove VisibilityNotify events 2017-11-01 22:00:34 +01:00
Matthias Clasen
f0189aecbc Drop gdk_event_set/get_screen
These functions have been replaced by display variants.
2017-10-30 22:22:00 -04:00
Matthias Clasen
c74ee7a159 Add gdk_event_get/set_display
The GdkScreen apis are going away, this is a replacement.
2017-10-30 22:22:00 -04:00
Matthias Clasen
209f24f962 Remove gdk_setting_get
This is a minor convenience api, and it is unused.
2017-10-30 15:31:02 -04:00
Matthias Clasen
e99687194a Forgotten files
Clean up the setting event from headers and docs too.
2017-10-30 10:08:32 -04:00
Matthias Clasen
10ba84a6a9 gdk: Drop settings events
We are not emitting these events anymore, so lets remove them
from the api. The GdkSettingAction enum is moved to xsettings-client.c
where its only use remains.
2017-10-30 09:49:02 -04:00
Timm Bäder
73b52665e6 gdkevents: Remove gtk_widget_set_events mention
Doesn't exist anymore.
2017-10-20 14:56:29 +02:00
Marc-Antoine Perennou
4808829352 gdk: add accessor for GdkEventOwnerChange::reason
https://bugzilla.gnome.org/show_bug.cgi?id=789198

Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
2017-10-19 14:37:28 +02:00
Carlos Garnacho
a9988e18b0 gtk: Remove 2BUTTON and 3BUTTON events and event types
Those should be interpreted by widget-local gestures, not guessed at a
high level with no notions of the specific context. Users will want
GtkGestureMultiPress to replace these events.
2017-09-19 18:40:50 +02:00
Matthias Clasen
7306f55912 Add some more GdkEvent getters 2017-09-19 18:39:03 +02:00
Matthias Clasen
66d8483fdf Add more GdkEvents API 2017-09-19 18:39:02 +02:00
Matthias Clasen
5488009150 Add more getters for event fields 2017-09-19 18:39:02 +02:00
Carlos Garnacho
c7431f46b5 gdk: Make GdkEvent structs/union opaque
All users are forced to deal with events as opaque pointers, only
using API to access the info.
2017-09-19 18:39:02 +02:00
Georges Basile Stavracas Neto
019f0af0eb gdk: introduce edge constraint states
These states will be consumed by GtkWindow in order to
have better edge management on tiling situations. Their
values are supplied by the compositor, and will be send
through and X11 Atom or a Wayland protocol extension.

https://bugzilla.gnome.org/show_bug.cgi?id=783669
2017-09-17 23:16:48 -03:00
Timm Bäder
b2c0afce34 Remove gdk_event_get_user_data from public headers
And add it back in gdk-private.h
2017-08-19 08:53:38 +02:00
Daniel Boles
406db15066 gdk/gtk: Fix more AVAILABLE_IN annotations to 3_92 2017-05-28 14:20:19 +01:00
Daniel Boles
b6e13847d5 gdkevents.h: Fix version annotations on new funcs 2017-05-27 15:25:35 +01:00