summaryrefslogtreecommitdiff
path: root/gdk/gdkeventsprivate.h
Commit message (Collapse)AuthorAgeFilesLines
* Convert headers to #pragma onceMatthias Clasen2023-03-311-3/+1
| | | | The conversion was done by guard2one.
* Use native Windows API for converting keystrokes to charactersPhilip Zander2022-10-171-2/+8
|
* gdk/events: Add constructor for high-resolution scroll eventsJosé Expósito2022-08-101-0/+9
| | | | | | | | | | | | | Starting with Linux Kernel v5.0 two new axes are available for mice that support high-resolution wheel scrolling: REL_WHEEL_HI_RES and REL_HWHEEL_HI_RES. Both axes send data in fractions of 120 where each multiple of 120 amounts to one logical scroll event. Fractions of 120 indicate a wheel movement less than one detent. The 120 magic number is a copy of the Windows API, so this new constructor can be used both in Linux >= 5.0 and Windows >= Vista.
* gdkevent: Give touchpad hold events a sequenceCarlos Garnacho2022-08-051-0/+1
| | | | | | Following what was done for pinch/swipe events, give hold gestures their own distinct sequence as well. Without this it was NULL, which was already distinct to other touchpad gestures.
* Drop pointer_emulated discrete scroll eventsLuca Bacci2022-05-241-5/+1
| | | | | GTK4 has had smooth scroll events since the beginning, so we prefer not to emit emulated discrete scroll events at all
* gdk: Add enum to indicate the unit of scroll deltaspanoplie2022-03-191-1/+4
| | | | | | | Add a new GdkScrollUnit enum that represent the unit of scroll deltas provided by GdkScrollEvent. The unit is accessible through gdk_scroll_event_get_unit().
* gdk/events: Add hold GdkEventJosé Expósito2022-01-261-0/+9
| | | | | | | Allow to create hold events as well as the required functions to get information about the event: gesture phase, finger count, etc Part-of: <!3454>
* gdk: Prepare touchpad events for sequencesMatthias Clasen2021-12-151-9/+12
| | | | | | | It makes sense to connect the begin/update/end events for touchpad swipes and pinches in a sequence. This commit adds the plumbing for it, but not backends are setting sequences yet.
* Cosmetrics: Remove mention of a nonexisting typeMatthias Clasen2021-12-141-2/+2
| | | | No such thing as GdkScrollHistory.
* docs: Tag Gdk.ModifierType as flagsMarco Melorio2021-11-071-7/+7
|
* gdk: Clean up docs syntaxMatthias Clasen2021-05-221-12/+12
| | | | Replace leftover gtk-doc syntax (#Type) with backquotes.
* main: Add & use gdk_event_dup_axes()Timm Bäder2020-12-211-0/+2
| | | | | The way this code is written trips up scan-build. Add gdk_event_dup_axes() and use it in gtkmain.c.
* Remove stray mentions of GdkConfigureEventEmmanuele Bassi2020-12-151-4/+0
| | | | The event was removed, but some traces of it linger.
* gdk: Replace all GDK_CONFIGURE usage with GdkSurface::layoutJonas Ådahl2020-12-071-19/+0
| | | | | | This removes the GDK_CONFIGURE event and all related functions and data types; it includes untested changes to the MacOSX, Win32 and Broadway backends.
* gdk: Slim down gdkinternals.h moreMatthias Clasen2020-08-141-0/+28
| | | | Move things to the private headers they belong in.
* gdk: Conflate GDK devicesCarlos Garnacho2020-07-291-18/+0
| | | | | | | | | | Make GdkEvents hold a single GdkDevice. This device is closer to the logical device conceptually, although it must be sufficient for device checks (i.e. GdkInputSource), which makes it similar to the physical devices. Make the logical devices have a more accurate GdkInputSource where needed, and conflate the event devices altogether.
* Keep scroll historyMatthias Clasen2020-06-091-0/+4
| | | | | | Similar to how we keep motion history for compressed events, keep scroll history for compressed scroll events.
* Remove position from GdkScrollEventEmmanuele Bassi2020-06-011-2/+0
| | | | | | Scroll events do not have a position, so they shouldn't implement the GdkEventClass.get_position() virtual function; nor they should have an x and y fields that never get updated.
* Add private accessor for GdkKeyEvent.translatedEmmanuele Bassi2020-05-241-0/+3
| | | | Avoid accessing the event structure directly, even from within GTK.
* GdkEvent: Save history in a GArrayTimm Bäder2020-05-051-5/+5
| | | | Instead of a less efficient GList.
* Restructure the GdkEvent type hierarchyEmmanuele Bassi2020-04-161-301/+191
| | | | | | | | | | | | | | | | | | | | | | GdkEvent has been a "I-can't-believe-this-is-not-OOP" type for ages, using a union of sub-types. This has always been problematic when it comes to implementing accessor functions: either you get generic API that takes a GdkEvent and uses a massive switch() to determine which event types have the data you're looking for; or you create namespaced accessors, but break language bindings horribly, as boxed types cannot have derived types. The recent conversion of GskRenderNode (which had similar issues) to GTypeInstance, and the fact that GdkEvent is now a completely opaque type, provide us with the chance of moving GdkEvent to GTypeInstance, and have sub-types for GdkEvent. The change from boxed type to GTypeInstance is pretty small, all things considered, but ends up cascading to a larger commit, as we still have backends and code in GTK trying to access GdkEvent structures directly. Additionally, the naming of the public getter functions requires renaming all the data structures to conform to the namespace/type-name pattern.
* gdk: Redo key eventsMatthias Clasen2020-04-061-22/+22
| | | | | | | | | | | | | | | Add all of the keyboard translation results in the key event, so we can translate the keyboard state at the time the event is created, and avoid doing state translation at match time. We actually need to carry two sets of translation results, since we ignore CapsLock when matching accelerators, in gdk_event_matches(). At the same time, drop the scancode field - it is only ever set on win32, and is basically unused in GTK. Update all callers.
* gdk: Drop event structs from the headersMatthias Clasen2020-02-211-0/+20
| | | | All events are GdkEvents now.
* Stop exporting check_event_sanityMatthias Clasen2020-02-211-2/+0
|
* Some event struct packing improvementsMatthias Clasen2020-02-211-25/+15
| | | | | | | | | Rearrange a few things, and move some booleans into the Any struct, by using a bitfield there. Some more cleanup could be done - the flags field with its PENDING and FLUSHED members appears entirely unused. Nobody is setting those flags.
* Streamline event structsMatthias Clasen2020-02-211-40/+38
| | | | | Use proper types (GdkModifierType, double), and drop some unused fields (send_event, display).
* events: reorganize gettersMatthias Clasen2020-02-211-48/+2
| | | | | | | | | | Restructure the getters for event fields to be more targeted at particular event types. Update all callers, and replace all direct event struct access with getters. As a side-effect, this drops some unused getters.
* events: Drop target and related targetMatthias Clasen2020-02-211-10/+0
| | | | GTK no longer uses this, so we can drop it.
* Make GdkEvent a boxed typeMatthias Clasen2020-02-211-12/+1
|
* events: Drop x_root/y_rootMatthias Clasen2020-02-211-36/+0
| | | | We are not using these fields anymore.
* gdk: Add event constructorsMatthias Clasen2020-02-211-0/+169
| | | | | | | | | | | Add private API to construct events. This is a step towards making events readonly, and not objects anymore. The constructors here are sufficient to convert the Wayland backend over. More may be added for other backends as needed. Open issues: - history
* events: Make proximity and scroll events have toolsMatthias Clasen2020-02-151-0/+2
| | | | | | The Wayland backend tries to set device tools on these events, and it was just an oversight that they don't carry them.
* gdk: Fix coordinates in dnd eventsMatthias Clasen2019-12-301-1/+3
| | | | | | | Don't store coordinates as shorts. Use doubles, as everywhere else. Also add x, y in addition to x_root, y_root, and actually return those in gdk_event_get_coords.
* gdk: add a sanity check for eventsMatthias Clasen2019-05-011-0/+2
| | | | | | | Before delivering events to GTK, make sure they're sane. For now, this means making sure the surface and device are from the same display.
* gdk: Add a related_target field to some eventsMatthias Clasen2019-03-161-0/+5
| | | | | | Crossing and focus change events are emitted between two widgets, and want to associate both with the events.
* gdk: Rename gdk_event_set_user_dataMatthias Clasen2019-03-161-3/+4
| | | | | | | Lets call it what it is, the target. All of this is private api anyway. Update all callers.
* gdk: Add crossing mode and detail to focus eventsMatthias Clasen2019-03-161-0/+4
| | | | We want focus events more similar to crossing events.
* GdkEvent: Make gdk_event_set_user_data privateTimm Bäder2019-01-181-0/+4
|
* GdkEvent: Add a proper user_data member to GdkEventAnyTimm Bäder2019-01-181-0/+1
| | | | | | | Setting it as qdata on the object doesn't save any memory since we use the user_data as the event target, which every event has set these days. This way is also faster since just reffing the object doesn't do any locking.
* gdk: Remove key_event->string and key_event->lengthBenjamin Otte2018-07-301-14/+0
| | | | They're unused.
* Revert "gdk: Drop configure events"Matthias Clasen2018-07-151-0/+22
| | | | This reverts commit a8926c9d873ce968353a2eb1d3930c4f1ac79c94.
* gdk: Drop expose eventsMatthias Clasen2018-07-151-19/+0
| | | | | Replace expose events with a GdkSurface::expose signal. This is part of the move to use events only for input.
* gdk: Drop configure eventsMatthias Clasen2018-07-151-22/+0
| | | | | Replace configure events with a GdkSurface::size-changed signal. This is part of the move to use events only for input.
* dnd: Rename headersMatthias Clasen2018-07-021-1/+1
| | | | | | | 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.
* Remove a lot of Since annotationsMatthias Clasen2018-06-251-9/+1
| | | | | 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.
* events: Make GdkEventDND have a GdkDrop memberBenjamin Otte2018-06-181-2/+2
| | | | ... instead of a GdkDragContext.
* gdk: Remove unused area member from GdkEventExposeBenjamin Otte2018-03-211-1/+0
|
* gdk: Remove unused count member from GdkEventExposeBenjamin Otte2018-03-211-5/+0
|
* GdkSurface: Rename lots of stuff from window->surfaceAlexander Larsson2018-03-201-45/+45
| | | | | Mostly these are internal things, but the major public change is that event.window is now event.surface.
* GdkWindow -> GdkSurface initial type renameAlexander Larsson2018-03-201-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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