| 1 | /* GTK - The GIMP Toolkit |
| 2 | * Copyright (C) 2012, One Laptop Per Child. |
| 3 | * Copyright (C) 2014, Red Hat, Inc. |
| 4 | * |
| 5 | * This library is free software; you can redistribute it and/or |
| 6 | * modify it under the terms of the GNU Lesser General Public |
| 7 | * License as published by the Free Software Foundation; either |
| 8 | * version 2 of the License, or (at your option) any later version. |
| 9 | * |
| 10 | * This library is distributed in the hope that it will be useful, |
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 13 | * Lesser General Public License for more details. |
| 14 | * |
| 15 | * You should have received a copy of the GNU Lesser General Public |
| 16 | * License along with this library. If not, see <http://www.gnu.org/licenses/>. |
| 17 | * |
| 18 | * Author(s): Carlos Garnacho <[email protected]> |
| 19 | */ |
| 20 | |
| 21 | /** |
| 22 | * GtkGesture: |
| 23 | * |
| 24 | * The base class for gesture recognition. |
| 25 | * |
| 26 | * Although `GtkGesture` is quite generalized to serve as a base for |
| 27 | * multi-touch gestures, it is suitable to implement single-touch and |
| 28 | * pointer-based gestures (using the special %NULL `GdkEventSequence` |
| 29 | * value for these). |
| 30 | * |
| 31 | * The number of touches that a `GtkGesture` need to be recognized is |
| 32 | * controlled by the [[email protected]:n-points] property, if a |
| 33 | * gesture is keeping track of less or more than that number of sequences, |
| 34 | * it won't check whether the gesture is recognized. |
| 35 | * |
| 36 | * As soon as the gesture has the expected number of touches, it will check |
| 37 | * regularly if it is recognized, the criteria to consider a gesture as |
| 38 | * "recognized" is left to `GtkGesture` subclasses. |
| 39 | * |
| 40 | * A recognized gesture will then emit the following signals: |
| 41 | * |
| 42 | * - [[email protected]::begin] when the gesture is recognized. |
| 43 | * - [[email protected]::update], whenever an input event is processed. |
| 44 | * - [[email protected]::end] when the gesture is no longer recognized. |
| 45 | * |
| 46 | * ## Event propagation |
| 47 | * |
| 48 | * In order to receive events, a gesture needs to set a propagation phase |
| 49 | * through [[email protected]_propagation_phase]. |
| 50 | * |
| 51 | * In the capture phase, events are propagated from the toplevel down |
| 52 | * to the target widget, and gestures that are attached to containers |
| 53 | * above the widget get a chance to interact with the event before it |
| 54 | * reaches the target. |
| 55 | * |
| 56 | * In the bubble phase, events are propagated up from the target widget |
| 57 | * to the toplevel, and gestures that are attached to containers above |
| 58 | * the widget get a chance to interact with events that have not been |
| 59 | * handled yet. |
| 60 | * |
| 61 | * ## States of a sequence |
| 62 | * |
| 63 | * Whenever input interaction happens, a single event may trigger a cascade |
| 64 | * of `GtkGesture`s, both across the parents of the widget receiving the |
| 65 | * event and in parallel within an individual widget. It is a responsibility |
| 66 | * of the widgets using those gestures to set the state of touch sequences |
| 67 | * accordingly in order to enable cooperation of gestures around the |
| 68 | * `GdkEventSequence`s triggering those. |
| 69 | * |
| 70 | * Within a widget, gestures can be grouped through [[email protected]]. |
| 71 | * Grouped gestures synchronize the state of sequences, so calling |
| 72 | * [[email protected]_state] on one will effectively propagate |
| 73 | * the state throughout the group. |
| 74 | * |
| 75 | * By default, all sequences start out in the %GTK_EVENT_SEQUENCE_NONE state, |
| 76 | * sequences in this state trigger the gesture event handler, but event |
| 77 | * propagation will continue unstopped by gestures. |
| 78 | * |
| 79 | * If a sequence enters into the %GTK_EVENT_SEQUENCE_DENIED state, the gesture |
| 80 | * group will effectively ignore the sequence, letting events go unstopped |
| 81 | * through the gesture, but the "slot" will still remain occupied while |
| 82 | * the touch is active. |
| 83 | * |
| 84 | * If a sequence enters in the %GTK_EVENT_SEQUENCE_CLAIMED state, the gesture |
| 85 | * group will grab all interaction on the sequence, by: |
| 86 | * |
| 87 | * - Setting the same sequence to %GTK_EVENT_SEQUENCE_DENIED on every other |
| 88 | * gesture group within the widget, and every gesture on parent widgets |
| 89 | * in the propagation chain. |
| 90 | * - Emitting [[email protected]::cancel] on every gesture in widgets |
| 91 | * underneath in the propagation chain. |
| 92 | * - Stopping event propagation after the gesture group handles the event. |
| 93 | * |
| 94 | * Note: if a sequence is set early to %GTK_EVENT_SEQUENCE_CLAIMED on |
| 95 | * %GDK_TOUCH_BEGIN/%GDK_BUTTON_PRESS (so those events are captured before |
| 96 | * reaching the event widget, this implies %GTK_PHASE_CAPTURE), one similar |
| 97 | * event will be emulated if the sequence changes to %GTK_EVENT_SEQUENCE_DENIED. |
| 98 | * This way event coherence is preserved before event propagation is unstopped |
| 99 | * again. |
| 100 | * |
| 101 | * Sequence states can't be changed freely. |
| 102 | * See [[email protected]_state] to know about the possible |
| 103 | * lifetimes of a `GdkEventSequence`. |
| 104 | * |
| 105 | * ## Touchpad gestures |
| 106 | * |
| 107 | * On the platforms that support it, `GtkGesture` will handle transparently |
| 108 | * touchpad gesture events. The only precautions users of `GtkGesture` should |
| 109 | * do to enable this support are: |
| 110 | * |
| 111 | * - If the gesture has %GTK_PHASE_NONE, ensuring events of type |
| 112 | * %GDK_TOUCHPAD_SWIPE and %GDK_TOUCHPAD_PINCH are handled by the `GtkGesture` |
| 113 | */ |
| 114 | |
| 115 | #include "config.h"cxx . . $ `<file>/build/config.h`/ |
| 116 | #include "gtkgesture.h"cxx . . $ `<file>/gtk/gtkgesture.h`/ |
| 117 | #include "gtkwidgetprivate.h"cxx . . $ `<file>/gtk/gtkwidgetprivate.h`/ |
| 118 | #include "gtkeventcontrollerprivate.h"cxx . . $ `<file>/gtk/gtkeventcontrollerprivate.h`/ |
| 119 | #include "gtkgestureprivate.h"cxx . . $ `<file>/gtk/gtkgestureprivate.h`/ |
| 120 | #include "gtktypebuiltins.h"cxx . . $ `<file>/build/gtk/gtktypebuiltins.h`/ |
| 121 | #include "gtkprivate.h"cxx . . $ `<file>/gtk/gtkprivate.h`/ |
| 122 | #include "gtkmain.h"cxx . . $ `<file>/gtk/gtkmain.h`/ |
| 123 | #include "gtkmarshalers.h"cxx . . $ `<file>/build/gtk/gtkmarshalers.h`/ |
| 124 | #include "gtknative.h"cxx . . $ `<file>/gtk/gtknative.h`/ |
| 125 | |
| 126 | typedef struct _GtkGesturePrivatecxx . . $ _GtkGesturePrivate# GtkGesturePrivatecxx . . $ GtkGesturePrivate#; |
| 127 | typedef struct _PointDatacxx . . $ _PointData# PointDatacxx . . $ PointData#; |
| 128 | |
| 129 | enumcxx . . $ $anonymous_type_5d7308d393dec5ee_0# { |
| 130 | PROP_N_POINTScxx . . $ PROP_N_POINTS. = 1, |
| 131 | }; |
| 132 | |
| 133 | enumcxx . . $ $anonymous_type_5d7308d393dec5ee_1# { |
| 134 | BEGINcxx . . $ BEGIN., |
| 135 | ENDcxx . . $ END., |
| 136 | UPDATEcxx . . $ UPDATE., |
| 137 | CANCELcxx . . $ CANCEL., |
| 138 | SEQUENCE_STATE_CHANGEDcxx . . $ SEQUENCE_STATE_CHANGED., |
| 139 | N_SIGNALScxx . . $ N_SIGNALS. |
| 140 | }; |
| 141 | |
| 142 | struct _PointDatacxx . . $ _PointData# |
| 143 | { |
| 144 | GdkEventcxx . . $ GdkEvent# *eventcxx . . $ _PointData#event.; |
| 145 | GtkWidgetcxx . . $ GtkWidget# *targetcxx . . $ _PointData#target.; |
| 146 | double widget_xcxx . . $ _PointData#widget_x.; |
| 147 | double widget_ycxx . . $ _PointData#widget_y.; |
| 148 | |
| 149 | /* Acummulators for touchpad events */ |
| 150 | double accum_dxcxx . . $ _PointData#accum_dx.; |
| 151 | double accum_dycxx . . $ _PointData#accum_dy.; |
| 152 | |
| 153 | guintcxx . . $ guint# press_handledcxx . . $ _PointData#press_handled. : 1; |
| 154 | guintcxx . . $ guint# statecxx . . $ _PointData#state. : 2; |
| 155 | }; |
| 156 | |
| 157 | struct _GtkGesturePrivatecxx . . $ _GtkGesturePrivate# |
| 158 | { |
| 159 | GHashTablecxx . . $ GHashTable# *pointscxx . . $ _GtkGesturePrivate#points.; |
| 160 | GdkEventSequencecxx . . $ GdkEventSequence# *last_sequencecxx . . $ _GtkGesturePrivate#last_sequence.; |
| 161 | GdkDevicecxx . . $ GdkDevice# *devicecxx . . $ _GtkGesturePrivate#device.; |
| 162 | GListcxx . . $ GList# *group_linkcxx . . $ _GtkGesturePrivate#group_link.; |
| 163 | guintcxx . . $ guint# n_pointscxx . . $ _GtkGesturePrivate#n_points.; |
| 164 | guintcxx . . $ guint# recognizedcxx . . $ _GtkGesturePrivate#recognized. : 1; |
| 165 | guintcxx . . $ guint# touchpadcxx . . $ _GtkGesturePrivate#touchpad. : 1; |
| 166 | }; |
| 167 | |
| 168 | static guintcxx . . $ guint# signalscxx . . $ signals.[N_SIGNALScxx . . $ N_SIGNALS.] = { 0 }; |
| 169 | |
| 170 | #define BUTTONS_MASKcxx . . $ `gtk/gtkgesture.c:170:9`! (GDK_BUTTON1_MASK | GDK_BUTTON2_MASK | GDK_BUTTON3_MASK) |
| 171 | |
| 172 | #define EVENT_IS_TOUCHPAD_GESTUREcxx . . $ `gtk/gtkgesture.c:172:9`!(e) (gdk_event_get_event_type (e) == GDK_TOUCHPAD_SWIPE || \ |
| 173 | gdk_event_get_event_type (e) == GDK_TOUCHPAD_PINCH || \ |
| 174 | gdk_event_get_event_type (e) == GDK_TOUCHPAD_HOLD) |
| 175 | |
| 176 | GListcxx . . $ GList# * _gtk_gesture_get_group_linkcxx . . $ _gtk_gesture_get_group_link(65a30909e0dbc2f3). (GtkGesturecxx . . $ GtkGesture# *gesture); |
| 177 | |
| 178 | G_DEFINE_ABSTRACT_TYPE_WITH_PRIVATEcxx . . $ `<external>/9567554376676449156/gtype.h:1924:9`! (GtkGesture, gtk_gesture, GTK_TYPE_EVENT_CONTROLLERcxx . . $ `gtk/gtkeventcontroller.h:34:9`!) |
| 179 | |
| 180 | static void |
| 181 | gtk_gesture_get_propertycxx . . $ gtk_gesture_get_property(cee2c52f22407c66). (GObjectcxx . . $ GObject# *object, |
| 182 | guintcxx . . $ guint# prop_id, |
| 183 | GValuecxx . . $ GValue# *value, |
| 184 | GParamSpeccxx . . $ GParamSpec# *pspec) |
| 185 | { |
| 186 | GtkGesturePrivatecxx . . $ GtkGesturePrivate# *priv = gtk_gesture_get_instance_privatecxx . . $ gtk_gesture_get_instance_private(b9559087c869032c). (GTK_GESTUREcxx . . $ `gtk/gtkgesture.h:32:9`! (object)); |
| 187 | |
| 188 | switch (prop_id) |
| 189 | { |
| 190 | case PROP_N_POINTScxx . . $ PROP_N_POINTS.: |
| 191 | g_value_set_uintcxx . . $ g_value_set_uint(f81c5c84daf56975). (value, priv->n_pointscxx . . $ _GtkGesturePrivate#n_points.); |
| 192 | break; |
| 193 | default: |
| 194 | G_OBJECT_WARN_INVALID_PROPERTY_IDcxx . . $ `<external>/1341695927569185362/gobject.h:690:9`! (object, prop_id, pspec); |
| 195 | } |
| 196 | } |
| 197 | |
| 198 | static void |
| 199 | gtk_gesture_set_propertycxx . . $ gtk_gesture_set_property(d7c4bb29f36c0dc4). (GObjectcxx . . $ GObject# *object, |
| 200 | guintcxx . . $ guint# prop_id, |
| 201 | const GValuecxx . . $ GValue# *value, |
| 202 | GParamSpeccxx . . $ GParamSpec# *pspec) |
| 203 | { |
| 204 | GtkGesturePrivatecxx . . $ GtkGesturePrivate# *priv = gtk_gesture_get_instance_privatecxx . . $ gtk_gesture_get_instance_private(b9559087c869032c). (GTK_GESTUREcxx . . $ `gtk/gtkgesture.h:32:9`! (object)); |
| 205 | |
| 206 | switch (prop_id) |
| 207 | { |
| 208 | case PROP_N_POINTScxx . . $ PROP_N_POINTS.: |
| 209 | priv->n_pointscxx . . $ _GtkGesturePrivate#n_points. = g_value_get_uintcxx . . $ g_value_get_uint(1e175b1568bd83e1). (value); |
| 210 | break; |
| 211 | default: |
| 212 | G_OBJECT_WARN_INVALID_PROPERTY_IDcxx . . $ `<external>/1341695927569185362/gobject.h:690:9`! (object, prop_id, pspec); |
| 213 | } |
| 214 | } |
| 215 | |
| 216 | static void |
| 217 | gtk_gesture_finalizecxx . . $ gtk_gesture_finalize(6087475fa43034d3). (GObjectcxx . . $ GObject# *object) |
| 218 | { |
| 219 | GtkGesturecxx . . $ GtkGesture# *gesture = GTK_GESTUREcxx . . $ `gtk/gtkgesture.h:32:9`! (object); |
| 220 | GtkGesturePrivatecxx . . $ GtkGesturePrivate# *priv = gtk_gesture_get_instance_privatecxx . . $ gtk_gesture_get_instance_private(b9559087c869032c). (gesture); |
| 221 | |
| 222 | gtk_gesture_ungroupcxx . . $ gtk_gesture_ungroup(fa1efe69d66df200). (gesture); |
| 223 | g_list_freecxx . . $ g_list_free(d1b6ff1ff9a6d4b6). (priv->group_linkcxx . . $ _GtkGesturePrivate#group_link.); |
| 224 | |
| 225 | g_hash_table_destroycxx . . $ g_hash_table_destroy(ce4eddf544b9218). (priv->pointscxx . . $ _GtkGesturePrivate#points.); |
| 226 | |
| 227 | G_OBJECT_CLASScxx . . $ `<external>/1341695927569185362/gobject.h:61:9`! (gtk_gesture_parent_class)->finalizecxx . . $ _GObjectClass#finalize. (object); |
| 228 | } |
| 229 | |
| 230 | static guintcxx . . $ guint# |
| 231 | _gtk_gesture_get_n_touchpad_pointscxx . . $ _gtk_gesture_get_n_touchpad_points(f26697a5dc036d5d). (GtkGesturecxx . . $ GtkGesture# *gesture, |
| 232 | gbooleancxx . . $ gboolean# only_active) |
| 233 | { |
| 234 | GtkGesturePrivatecxx . . $ GtkGesturePrivate# *priv; |
| 235 | PointDatacxx . . $ PointData# *data; |
| 236 | GdkEventTypecxx . . $ GdkEventType# event_type; |
| 237 | GdkTouchpadGesturePhasecxx . . $ GdkTouchpadGesturePhase# phase = 0; |
| 238 | guintcxx . . $ guint# n_fingers = 0; |
| 239 | |
| 240 | priv = gtk_gesture_get_instance_privatecxx . . $ gtk_gesture_get_instance_private(b9559087c869032c). (gesture); |
| 241 | |
| 242 | if (!priv->touchpadcxx . . $ _GtkGesturePrivate#touchpad.) |
| 243 | return 0; |
| 244 | |
| 245 | data = g_hash_table_lookupcxx . . $ g_hash_table_lookup(8183d62c39a6a245). (priv->pointscxx . . $ _GtkGesturePrivate#points., priv->last_sequencecxx . . $ _GtkGesturePrivate#last_sequence.); |
| 246 | |
| 247 | if (!data) |
| 248 | return 0; |
| 249 | |
| 250 | event_type = gdk_event_get_event_typecxx . . $ gdk_event_get_event_type(af0289f7121992bc). (data->eventcxx . . $ _PointData#event.); |
| 251 | |
| 252 | if (EVENT_IS_TOUCHPAD_GESTUREcxx . . $ `gtk/gtkgesture.c:172:9`! (data->event)) |
| 253 | { |
| 254 | phase = gdk_touchpad_event_get_gesture_phasecxx . . $ gdk_touchpad_event_get_gesture_phase(35723e1960c7a284). (data->eventcxx . . $ _PointData#event.); |
| 255 | n_fingers = gdk_touchpad_event_get_n_fingerscxx . . $ gdk_touchpad_event_get_n_fingers(2d406c81f4428913). (data->eventcxx . . $ _PointData#event.); |
| 256 | } |
| 257 | |
| 258 | if (only_active && |
| 259 | (data->statecxx . . $ _PointData#state. == GTK_EVENT_SEQUENCE_DENIEDcxx . . $ GTK_EVENT_SEQUENCE_DENIED. || |
| 260 | (event_type == GDK_TOUCHPAD_SWIPEcxx . . $ GDK_TOUCHPAD_SWIPE. && phase == GDK_TOUCHPAD_GESTURE_PHASE_ENDcxx . . $ GDK_TOUCHPAD_GESTURE_PHASE_END.) || |
| 261 | (event_type == GDK_TOUCHPAD_PINCHcxx . . $ GDK_TOUCHPAD_PINCH. && phase == GDK_TOUCHPAD_GESTURE_PHASE_ENDcxx . . $ GDK_TOUCHPAD_GESTURE_PHASE_END.) || |
| 262 | (event_type == GDK_TOUCHPAD_HOLDcxx . . $ GDK_TOUCHPAD_HOLD. && phase == GDK_TOUCHPAD_GESTURE_PHASE_ENDcxx . . $ GDK_TOUCHPAD_GESTURE_PHASE_END.))) |
| 263 | return 0; |
| 264 | |
| 265 | return n_fingers; |
| 266 | } |
| 267 | |
| 268 | static guintcxx . . $ guint# |
| 269 | _gtk_gesture_get_n_touch_pointscxx . . $ _gtk_gesture_get_n_touch_points(f26697a5dc036d5d). (GtkGesturecxx . . $ GtkGesture# *gesture, |
| 270 | gbooleancxx . . $ gboolean# only_active) |
| 271 | { |
| 272 | GtkGesturePrivatecxx . . $ GtkGesturePrivate# *priv; |
| 273 | GHashTableItercxx . . $ GHashTableIter# iter; |
| 274 | guintcxx . . $ guint# n_points = 0; |
| 275 | PointDatacxx . . $ PointData# *data; |
| 276 | GdkEventTypecxx . . $ GdkEventType# event_type; |
| 277 | |
| 278 | priv = gtk_gesture_get_instance_privatecxx . . $ gtk_gesture_get_instance_private(b9559087c869032c). (gesture); |
| 279 | g_hash_table_iter_initcxx . . $ g_hash_table_iter_init(1fd6bbae530c3b4). (&iter, priv->pointscxx . . $ _GtkGesturePrivate#points.); |
| 280 | |
| 281 | while (g_hash_table_iter_nextcxx . . $ g_hash_table_iter_next(1740d3f8cffea03c). (&iter, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, (gpointercxx . . $ gpointer# *) &data)) |
| 282 | { |
| 283 | event_type = gdk_event_get_event_typecxx . . $ gdk_event_get_event_type(af0289f7121992bc). (data->eventcxx . . $ _PointData#event.); |
| 284 | |
| 285 | if (only_active && |
| 286 | (data->statecxx . . $ _PointData#state. == GTK_EVENT_SEQUENCE_DENIEDcxx . . $ GTK_EVENT_SEQUENCE_DENIED. || |
| 287 | event_type == GDK_TOUCH_ENDcxx . . $ GDK_TOUCH_END. || |
| 288 | event_type == GDK_BUTTON_RELEASEcxx . . $ GDK_BUTTON_RELEASE.)) |
| 289 | continue; |
| 290 | |
| 291 | n_points++; |
| 292 | } |
| 293 | |
| 294 | return n_points; |
| 295 | } |
| 296 | |
| 297 | static guintcxx . . $ guint# |
| 298 | _gtk_gesture_get_n_physical_pointscxx . . $ _gtk_gesture_get_n_physical_points(f26697a5dc036d5d). (GtkGesturecxx . . $ GtkGesture# *gesture, |
| 299 | gbooleancxx . . $ gboolean# only_active) |
| 300 | { |
| 301 | GtkGesturePrivatecxx . . $ GtkGesturePrivate# *priv; |
| 302 | |
| 303 | priv = gtk_gesture_get_instance_privatecxx . . $ gtk_gesture_get_instance_private(b9559087c869032c). (gesture); |
| 304 | |
| 305 | if (priv->touchpadcxx . . $ _GtkGesturePrivate#touchpad.) |
| 306 | return _gtk_gesture_get_n_touchpad_pointscxx . . $ _gtk_gesture_get_n_touchpad_points(f26697a5dc036d5d). (gesture, only_active); |
| 307 | else |
| 308 | return _gtk_gesture_get_n_touch_pointscxx . . $ _gtk_gesture_get_n_touch_points(f26697a5dc036d5d). (gesture, only_active); |
| 309 | } |
| 310 | |
| 311 | static gbooleancxx . . $ gboolean# |
| 312 | gtk_gesture_check_implcxx . . $ gtk_gesture_check_impl(7d3530d02874564). (GtkGesturecxx . . $ GtkGesture# *gesture) |
| 313 | { |
| 314 | GtkGesturePrivatecxx . . $ GtkGesturePrivate# *priv; |
| 315 | guintcxx . . $ guint# n_points; |
| 316 | |
| 317 | priv = gtk_gesture_get_instance_privatecxx . . $ gtk_gesture_get_instance_private(b9559087c869032c). (gesture); |
| 318 | n_points = _gtk_gesture_get_n_physical_pointscxx . . $ _gtk_gesture_get_n_physical_points(f26697a5dc036d5d). (gesture, TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!); |
| 319 | |
| 320 | return n_points == priv->n_pointscxx . . $ _GtkGesturePrivate#n_points.; |
| 321 | } |
| 322 | |
| 323 | static void |
| 324 | _gtk_gesture_set_recognizedcxx . . $ _gtk_gesture_set_recognized(127fc4060b7c95a5). (GtkGesturecxx . . $ GtkGesture# *gesture, |
| 325 | gbooleancxx . . $ gboolean# recognized, |
| 326 | GdkEventSequencecxx . . $ GdkEventSequence# *sequence) |
| 327 | { |
| 328 | GtkGesturePrivatecxx . . $ GtkGesturePrivate# *priv; |
| 329 | |
| 330 | priv = gtk_gesture_get_instance_privatecxx . . $ gtk_gesture_get_instance_private(b9559087c869032c). (gesture); |
| 331 | |
| 332 | if (priv->recognizedcxx . . $ _GtkGesturePrivate#recognized. == recognized) |
| 333 | return; |
| 334 | |
| 335 | priv->recognizedcxx . . $ _GtkGesturePrivate#recognized. = recognized; |
| 336 | |
| 337 | if (recognized) |
| 338 | g_signal_emitcxx . . $ g_signal_emit(cc3f7c2ba1c6a182). (gesture, signalscxx . . $ signals.[BEGINcxx . . $ BEGIN.], 0, sequence); |
| 339 | else |
| 340 | g_signal_emitcxx . . $ g_signal_emit(cc3f7c2ba1c6a182). (gesture, signalscxx . . $ signals.[ENDcxx . . $ END.], 0, sequence); |
| 341 | } |
| 342 | |
| 343 | static gbooleancxx . . $ gboolean# |
| 344 | _gtk_gesture_do_checkcxx . . $ _gtk_gesture_do_check(7d3530d02874564). (GtkGesturecxx . . $ GtkGesture# *gesture) |
| 345 | { |
| 346 | GtkGestureClasscxx . . $ GtkGestureClass# *gesture_class; |
| 347 | gbooleancxx . . $ gboolean# retval = FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!; |
| 348 | |
| 349 | gesture_class = GTK_GESTURE_GET_CLASScxx . . $ `gtk/gtkgesture.h:36:9`! (gesture); |
| 350 | |
| 351 | if (!gesture_class->checkcxx . . $ _GtkGestureClass#check.) |
| 352 | return retval; |
| 353 | |
| 354 | retval = gesture_class->checkcxx . . $ _GtkGestureClass#check. (gesture); |
| 355 | return retval; |
| 356 | } |
| 357 | |
| 358 | static gbooleancxx . . $ gboolean# |
| 359 | _gtk_gesture_has_matching_touchpointscxx . . $ _gtk_gesture_has_matching_touchpoints(7d3530d02874564). (GtkGesturecxx . . $ GtkGesture# *gesture) |
| 360 | { |
| 361 | GtkGesturePrivatecxx . . $ GtkGesturePrivate# *priv = gtk_gesture_get_instance_privatecxx . . $ gtk_gesture_get_instance_private(b9559087c869032c). (gesture); |
| 362 | guintcxx . . $ guint# active_n_points, current_n_points; |
| 363 | |
| 364 | current_n_points = _gtk_gesture_get_n_physical_pointscxx . . $ _gtk_gesture_get_n_physical_points(f26697a5dc036d5d). (gesture, FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!); |
| 365 | active_n_points = _gtk_gesture_get_n_physical_pointscxx . . $ _gtk_gesture_get_n_physical_points(f26697a5dc036d5d). (gesture, TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!); |
| 366 | |
| 367 | return (active_n_points == priv->n_pointscxx . . $ _GtkGesturePrivate#n_points. && |
| 368 | current_n_points == priv->n_pointscxx . . $ _GtkGesturePrivate#n_points.); |
| 369 | } |
| 370 | |
| 371 | static gbooleancxx . . $ gboolean# |
| 372 | _gtk_gesture_check_recognizedcxx . . $ _gtk_gesture_check_recognized(6aa08b709753b55f). (GtkGesturecxx . . $ GtkGesture# *gesture, |
| 373 | GdkEventSequencecxx . . $ GdkEventSequence# *sequence) |
| 374 | { |
| 375 | GtkGesturePrivatecxx . . $ GtkGesturePrivate# *priv = gtk_gesture_get_instance_privatecxx . . $ gtk_gesture_get_instance_private(b9559087c869032c). (gesture); |
| 376 | gbooleancxx . . $ gboolean# has_matching_touchpoints; |
| 377 | |
| 378 | has_matching_touchpoints = _gtk_gesture_has_matching_touchpointscxx . . $ _gtk_gesture_has_matching_touchpoints(7d3530d02874564). (gesture); |
| 379 | |
| 380 | if (priv->recognizedcxx . . $ _GtkGesturePrivate#recognized. && !has_matching_touchpoints) |
| 381 | _gtk_gesture_set_recognizedcxx . . $ _gtk_gesture_set_recognized(127fc4060b7c95a5). (gesture, FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!, sequence); |
| 382 | else if (!priv->recognizedcxx . . $ _GtkGesturePrivate#recognized. && has_matching_touchpoints && |
| 383 | _gtk_gesture_do_checkcxx . . $ _gtk_gesture_do_check(7d3530d02874564). (gesture)) |
| 384 | _gtk_gesture_set_recognizedcxx . . $ _gtk_gesture_set_recognized(127fc4060b7c95a5). (gesture, TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!, sequence); |
| 385 | |
| 386 | return priv->recognizedcxx . . $ _GtkGesturePrivate#recognized.; |
| 387 | } |
| 388 | |
| 389 | static void |
| 390 | _update_touchpad_deltascxx . . $ _update_touchpad_deltas(37e09533b0355e77). (PointDatacxx . . $ PointData# *data) |
| 391 | { |
| 392 | GdkEventcxx . . $ GdkEvent# *event = data->eventcxx . . $ _PointData#event.; |
| 393 | GdkTouchpadGesturePhasecxx . . $ GdkTouchpadGesturePhase# phase; |
| 394 | double dx = 0; |
| 395 | double dy = 0; |
| 396 | |
| 397 | if (!event) |
| 398 | return; |
| 399 | |
| 400 | if (EVENT_IS_TOUCHPAD_GESTUREcxx . . $ `gtk/gtkgesture.c:172:9`! (event)) |
| 401 | { |
| 402 | phase = gdk_touchpad_event_get_gesture_phasecxx . . $ gdk_touchpad_event_get_gesture_phase(35723e1960c7a284). (event); |
| 403 | |
| 404 | if (gdk_event_get_event_typecxx . . $ gdk_event_get_event_type(af0289f7121992bc). (event) != GDK_TOUCHPAD_HOLDcxx . . $ GDK_TOUCHPAD_HOLD.) |
| 405 | gdk_touchpad_event_get_deltascxx . . $ gdk_touchpad_event_get_deltas(842a4266370f443a). (event, &dx, &dy); |
| 406 | |
| 407 | if (phase == GDK_TOUCHPAD_GESTURE_PHASE_BEGINcxx . . $ GDK_TOUCHPAD_GESTURE_PHASE_BEGIN.) |
| 408 | data->accum_dxcxx . . $ _PointData#accum_dx. = data->accum_dycxx . . $ _PointData#accum_dy. = 0; |
| 409 | else if (phase == GDK_TOUCHPAD_GESTURE_PHASE_UPDATEcxx . . $ GDK_TOUCHPAD_GESTURE_PHASE_UPDATE.) |
| 410 | { |
| 411 | data->accum_dxcxx . . $ _PointData#accum_dx. += dx; |
| 412 | data->accum_dycxx . . $ _PointData#accum_dy. += dy; |
| 413 | } |
| 414 | } |
| 415 | } |
| 416 | |
| 417 | static GtkEventSequenceStatecxx . . $ GtkEventSequenceState# |
| 418 | gtk_gesture_get_group_statecxx . . $ gtk_gesture_get_group_state(7ed3205cdc9bf84c). (GtkGesturecxx . . $ GtkGesture# *gesture, |
| 419 | GdkEventSequencecxx . . $ GdkEventSequence# *sequence) |
| 420 | { |
| 421 | GtkEventSequenceStatecxx . . $ GtkEventSequenceState# state = GTK_EVENT_SEQUENCE_NONEcxx . . $ GTK_EVENT_SEQUENCE_NONE.; |
| 422 | GListcxx . . $ GList# *group_elem; |
| 423 | |
| 424 | group_elem = g_list_firstcxx . . $ g_list_first(e31b64636014b719). (_gtk_gesture_get_group_linkcxx . . $ _gtk_gesture_get_group_link(65a30909e0dbc2f3). (gesture)); |
| 425 | |
| 426 | for (; group_elem; group_elem = group_elem->nextcxx . . $ _GList#next.) |
| 427 | { |
| 428 | if (group_elem->datacxx . . $ _GList#data. == gesture) |
| 429 | continue; |
| 430 | if (!gtk_gesture_handles_sequencecxx . . $ gtk_gesture_handles_sequence(6aa08b709753b55f). (group_elem->datacxx . . $ _GList#data., sequence)) |
| 431 | continue; |
| 432 | |
| 433 | state = gtk_gesture_get_sequence_statecxx . . $ gtk_gesture_get_sequence_state(7ed3205cdc9bf84c). (group_elem->datacxx . . $ _GList#data., sequence); |
| 434 | break; |
| 435 | } |
| 436 | |
| 437 | return state; |
| 438 | } |
| 439 | |
| 440 | static gbooleancxx . . $ gboolean# |
| 441 | _gtk_gesture_update_pointcxx . . $ _gtk_gesture_update_point(ecc854bbee3b8506). (GtkGesturecxx . . $ GtkGesture# *gesture, |
| 442 | GdkEventcxx . . $ GdkEvent# *event, |
| 443 | GtkWidgetcxx . . $ GtkWidget# *target, |
| 444 | double x, |
| 445 | double y, |
| 446 | gbooleancxx . . $ gboolean# add) |
| 447 | { |
| 448 | GdkEventSequencecxx . . $ GdkEventSequence# *sequence; |
| 449 | GtkGesturePrivatecxx . . $ GtkGesturePrivate# *priv; |
| 450 | GdkDevicecxx . . $ GdkDevice# *device; |
| 451 | gbooleancxx . . $ gboolean# existed, touchpad; |
| 452 | PointDatacxx . . $ PointData# *data; |
| 453 | |
| 454 | device = gdk_event_get_devicecxx . . $ gdk_event_get_device(34b68624c462eb2f). (event); |
| 455 | |
| 456 | if (!device) |
| 457 | return FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!; |
| 458 | |
| 459 | priv = gtk_gesture_get_instance_privatecxx . . $ gtk_gesture_get_instance_private(b9559087c869032c). (gesture); |
| 460 | touchpad = EVENT_IS_TOUCHPAD_GESTUREcxx . . $ `gtk/gtkgesture.c:172:9`! (event); |
| 461 | |
| 462 | if (add) |
| 463 | { |
| 464 | /* If the event happens with the wrong device, or |
| 465 | * on the wrong window, ignore. |
| 466 | */ |
| 467 | if (priv->devicecxx . . $ _GtkGesturePrivate#device. && priv->devicecxx . . $ _GtkGesturePrivate#device. != device) |
| 468 | return FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!; |
| 469 | |
| 470 | /* Make touchpad and touchscreen gestures mutually exclusive */ |
| 471 | if (touchpad && g_hash_table_sizecxx . . $ g_hash_table_size(4b2d4d194d262c0c). (priv->pointscxx . . $ _GtkGesturePrivate#points.) > 0) |
| 472 | return FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!; |
| 473 | else if (!touchpad && priv->touchpadcxx . . $ _GtkGesturePrivate#touchpad.) |
| 474 | return FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!; |
| 475 | } |
| 476 | else if (!priv->devicecxx . . $ _GtkGesturePrivate#device.) |
| 477 | return FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!; |
| 478 | |
| 479 | sequence = gdk_event_get_event_sequencecxx . . $ gdk_event_get_event_sequence(3bee55fa98a9c851). (event); |
| 480 | existed = g_hash_table_lookup_extendedcxx . . $ g_hash_table_lookup_extended(af2aa9836613954a). (priv->pointscxx . . $ _GtkGesturePrivate#points., sequence, |
| 481 | NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, (gpointercxx . . $ gpointer# *) &data); |
| 482 | if (!existed) |
| 483 | { |
| 484 | if (!add) |
| 485 | return FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!; |
| 486 | |
| 487 | if (g_hash_table_sizecxx . . $ g_hash_table_size(4b2d4d194d262c0c). (priv->pointscxx . . $ _GtkGesturePrivate#points.) == 0) |
| 488 | { |
| 489 | priv->devicecxx . . $ _GtkGesturePrivate#device. = device; |
| 490 | priv->touchpadcxx . . $ _GtkGesturePrivate#touchpad. = touchpad; |
| 491 | } |
| 492 | |
| 493 | data = g_new0cxx . . $ `<external>/1123956534522462559/gmem.h:335:9`! (PointData, 1); |
| 494 | g_hash_table_insertcxx . . $ g_hash_table_insert(6a7c46015dd5ef26). (priv->pointscxx . . $ _GtkGesturePrivate#points., sequence, data); |
| 495 | } |
| 496 | |
| 497 | if (data->eventcxx . . $ _PointData#event.) |
| 498 | gdk_event_unrefcxx . . $ gdk_event_unref(d2fff11cfbb0bd0a). (data->eventcxx . . $ _PointData#event.); |
| 499 | |
| 500 | data->eventcxx . . $ _PointData#event. = gdk_event_refcxx . . $ gdk_event_ref(f5df32f7378a2dd4). ((GdkEventcxx . . $ GdkEvent# *)event); |
| 501 | g_set_objectcxx . . $ `<external>/1341695927569185362/gobject.h:762:9`! (&data->target, target); |
| 502 | _update_touchpad_deltascxx . . $ _update_touchpad_deltas(37e09533b0355e77). (data); |
| 503 | data->widget_xcxx . . $ _PointData#widget_x. = x + data->accum_dxcxx . . $ _PointData#accum_dx.; |
| 504 | data->widget_ycxx . . $ _PointData#widget_y. = y + data->accum_dycxx . . $ _PointData#accum_dy.; |
| 505 | |
| 506 | if (!existed) |
| 507 | { |
| 508 | GtkEventSequenceStatecxx . . $ GtkEventSequenceState# state; |
| 509 | |
| 510 | /* Deny the sequence right away if the expected |
| 511 | * number of points is exceeded, so this sequence |
| 512 | * can be tracked with gtk_gesture_handles_sequence(). |
| 513 | * |
| 514 | * Otherwise, make the sequence inherit the same state |
| 515 | * from other gestures in the same group. |
| 516 | */ |
| 517 | if (_gtk_gesture_get_n_physical_pointscxx . . $ _gtk_gesture_get_n_physical_points(f26697a5dc036d5d). (gesture, FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!) > priv->n_pointscxx . . $ _GtkGesturePrivate#n_points.) |
| 518 | state = GTK_EVENT_SEQUENCE_DENIEDcxx . . $ GTK_EVENT_SEQUENCE_DENIED.; |
| 519 | else |
| 520 | state = gtk_gesture_get_group_statecxx . . $ gtk_gesture_get_group_state(7ed3205cdc9bf84c). (gesture, sequence); |
| 521 | |
| 522 | G_GNUC_BEGIN_IGNORE_DEPRECATIONScxx . . $ `<external>/12741050725406041920/gmacros.h:771:9`! |
| 523 | gtk_gesture_set_sequence_statecxx . . $ gtk_gesture_set_sequence_state(6ec7ce0f6792fd90). (gesture, sequence, state); |
| 524 | G_GNUC_END_IGNORE_DEPRECATIONScxx . . $ `<external>/12741050725406041920/gmacros.h:774:9`! |
| 525 | } |
| 526 | |
| 527 | return TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!; |
| 528 | } |
| 529 | |
| 530 | static void |
| 531 | _gtk_gesture_check_emptycxx . . $ _gtk_gesture_check_empty(fa1efe69d66df200). (GtkGesturecxx . . $ GtkGesture# *gesture) |
| 532 | { |
| 533 | GtkGesturePrivatecxx . . $ GtkGesturePrivate# *priv; |
| 534 | |
| 535 | priv = gtk_gesture_get_instance_privatecxx . . $ gtk_gesture_get_instance_private(b9559087c869032c). (gesture); |
| 536 | |
| 537 | if (g_hash_table_sizecxx . . $ g_hash_table_size(4b2d4d194d262c0c). (priv->pointscxx . . $ _GtkGesturePrivate#points.) == 0) |
| 538 | { |
| 539 | priv->devicecxx . . $ _GtkGesturePrivate#device. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 540 | priv->touchpadcxx . . $ _GtkGesturePrivate#touchpad. = FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!; |
| 541 | } |
| 542 | } |
| 543 | |
| 544 | static void |
| 545 | _gtk_gesture_remove_pointcxx . . $ _gtk_gesture_remove_point(475ba5779a56ba21). (GtkGesturecxx . . $ GtkGesture# *gesture, |
| 546 | GdkEventcxx . . $ GdkEvent# *event) |
| 547 | { |
| 548 | GdkEventSequencecxx . . $ GdkEventSequence# *sequence; |
| 549 | GtkGesturePrivatecxx . . $ GtkGesturePrivate# *priv; |
| 550 | GdkDevicecxx . . $ GdkDevice# *device; |
| 551 | |
| 552 | sequence = gdk_event_get_event_sequencecxx . . $ gdk_event_get_event_sequence(3bee55fa98a9c851). (event); |
| 553 | device = gdk_event_get_devicecxx . . $ gdk_event_get_device(34b68624c462eb2f). (event); |
| 554 | priv = gtk_gesture_get_instance_privatecxx . . $ gtk_gesture_get_instance_private(b9559087c869032c). (gesture); |
| 555 | |
| 556 | if (priv->devicecxx . . $ _GtkGesturePrivate#device. != device) |
| 557 | return; |
| 558 | |
| 559 | g_hash_table_removecxx . . $ g_hash_table_remove(453ebbf4abdbe50e). (priv->pointscxx . . $ _GtkGesturePrivate#points., sequence); |
| 560 | _gtk_gesture_check_emptycxx . . $ _gtk_gesture_check_empty(fa1efe69d66df200). (gesture); |
| 561 | } |
| 562 | |
| 563 | static void |
| 564 | _gtk_gesture_cancel_allcxx . . $ _gtk_gesture_cancel_all(fa1efe69d66df200). (GtkGesturecxx . . $ GtkGesture# *gesture) |
| 565 | { |
| 566 | GdkEventSequencecxx . . $ GdkEventSequence# *sequence; |
| 567 | GtkGesturePrivatecxx . . $ GtkGesturePrivate# *priv; |
| 568 | GHashTableItercxx . . $ GHashTableIter# iter; |
| 569 | |
| 570 | priv = gtk_gesture_get_instance_privatecxx . . $ gtk_gesture_get_instance_private(b9559087c869032c). (gesture); |
| 571 | g_hash_table_iter_initcxx . . $ g_hash_table_iter_init(1fd6bbae530c3b4). (&iter, priv->pointscxx . . $ _GtkGesturePrivate#points.); |
| 572 | |
| 573 | while (g_hash_table_iter_nextcxx . . $ g_hash_table_iter_next(1740d3f8cffea03c). (&iter, (gpointercxx . . $ gpointer#*) &sequence, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)) |
| 574 | { |
| 575 | g_signal_emitcxx . . $ g_signal_emit(cc3f7c2ba1c6a182). (gesture, signalscxx . . $ signals.[CANCELcxx . . $ CANCEL.], 0, sequence); |
| 576 | g_hash_table_iter_removecxx . . $ g_hash_table_iter_remove(9647bc02074e2e65). (&iter); |
| 577 | _gtk_gesture_check_recognizedcxx . . $ _gtk_gesture_check_recognized(6aa08b709753b55f). (gesture, sequence); |
| 578 | } |
| 579 | |
| 580 | _gtk_gesture_check_emptycxx . . $ _gtk_gesture_check_empty(fa1efe69d66df200). (gesture); |
| 581 | } |
| 582 | |
| 583 | static gbooleancxx . . $ gboolean# |
| 584 | gesture_within_surfacecxx . . $ gesture_within_surface(c9c3b26df74b55f). (GtkGesturecxx . . $ GtkGesture# *gesture, |
| 585 | GdkSurfacecxx . . $ GdkSurface# *surface) |
| 586 | { |
| 587 | GtkWidgetcxx . . $ GtkWidget# *widget; |
| 588 | |
| 589 | widget = gtk_event_controller_get_widgetcxx . . $ gtk_event_controller_get_widget(71aab0125320da1a). (GTK_EVENT_CONTROLLERcxx . . $ `gtk/gtkeventcontroller.h:35:9`! (gesture)); |
| 590 | return surface == gtk_native_get_surfacecxx . . $ gtk_native_get_surface(bdacbdb7fef9c16f). (gtk_widget_get_nativecxx . . $ gtk_widget_get_native(38d4aa93baea8f2d). (widget)); |
| 591 | } |
| 592 | |
| 593 | static gbooleancxx . . $ gboolean# |
| 594 | gtk_gesture_filter_eventcxx . . $ gtk_gesture_filter_event(7ad650e377e57494). (GtkEventControllercxx . . $ GtkEventController# *controller, |
| 595 | GdkEventcxx . . $ GdkEvent# *event) |
| 596 | { |
| 597 | /* Even though GtkGesture handles these events, we want |
| 598 | * touchpad gestures disabled by default, it will be |
| 599 | * subclasses which punch the holes in for the events |
| 600 | * they can possibly handle. |
| 601 | */ |
| 602 | if (EVENT_IS_TOUCHPAD_GESTUREcxx . . $ `gtk/gtkgesture.c:172:9`! (event)) |
| 603 | return FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!; |
| 604 | |
| 605 | return GTK_EVENT_CONTROLLER_CLASScxx . . $ `gtk/gtkeventcontroller.h:36:9`! (gtk_gesture_parent_class)->filter_eventcxx . . $ _GtkEventControllerClass#filter_event. (controller, event); |
| 606 | } |
| 607 | |
| 608 | static gbooleancxx . . $ gboolean# |
| 609 | gtk_gesture_handle_eventcxx . . $ gtk_gesture_handle_event(df5f496728f85019). (GtkEventControllercxx . . $ GtkEventController# *controller, |
| 610 | GdkEventcxx . . $ GdkEvent# *event, |
| 611 | double x, |
| 612 | double y) |
| 613 | { |
| 614 | GtkGesturecxx . . $ GtkGesture# *gesture = GTK_GESTUREcxx . . $ `gtk/gtkgesture.h:32:9`! (controller); |
| 615 | GdkEventSequencecxx . . $ GdkEventSequence# *sequence; |
| 616 | GtkGesturePrivatecxx . . $ GtkGesturePrivate# *priv; |
| 617 | GdkDevicecxx . . $ GdkDevice# *source_device; |
| 618 | gbooleancxx . . $ gboolean# was_recognized; |
| 619 | GdkEventTypecxx . . $ GdkEventType# event_type; |
| 620 | GdkTouchpadGesturePhasecxx . . $ GdkTouchpadGesturePhase# phase = 0; |
| 621 | GdkModifierTypecxx . . $ GdkModifierType# state; |
| 622 | GtkWidgetcxx . . $ GtkWidget# *target; |
| 623 | |
| 624 | source_device = gdk_event_get_devicecxx . . $ gdk_event_get_device(34b68624c462eb2f). (event); |
| 625 | |
| 626 | if (!source_device) |
| 627 | return FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!; |
| 628 | |
| 629 | priv = gtk_gesture_get_instance_privatecxx . . $ gtk_gesture_get_instance_private(b9559087c869032c). (gesture); |
| 630 | sequence = gdk_event_get_event_sequencecxx . . $ gdk_event_get_event_sequence(3bee55fa98a9c851). (event); |
| 631 | was_recognized = gtk_gesture_is_recognizedcxx . . $ gtk_gesture_is_recognized(7d3530d02874564). (gesture); |
| 632 | event_type = gdk_event_get_event_typecxx . . $ gdk_event_get_event_type(af0289f7121992bc). (event); |
| 633 | state = gdk_event_get_modifier_statecxx . . $ gdk_event_get_modifier_state(75c35027a2dedee4). (event); |
| 634 | if (EVENT_IS_TOUCHPAD_GESTUREcxx . . $ `gtk/gtkgesture.c:172:9`! (event)) |
| 635 | phase = gdk_touchpad_event_get_gesture_phasecxx . . $ gdk_touchpad_event_get_gesture_phase(35723e1960c7a284). (event); |
| 636 | |
| 637 | target = gtk_event_controller_get_targetcxx . . $ gtk_event_controller_get_target(71aab0125320da1a). (controller); |
| 638 | |
| 639 | if (gtk_gesture_get_sequence_statecxx . . $ gtk_gesture_get_sequence_state(7ed3205cdc9bf84c). (gesture, sequence) != GTK_EVENT_SEQUENCE_DENIEDcxx . . $ GTK_EVENT_SEQUENCE_DENIED.) |
| 640 | priv->last_sequencecxx . . $ _GtkGesturePrivate#last_sequence. = sequence; |
| 641 | |
| 642 | if (event_type == GDK_BUTTON_PRESScxx . . $ GDK_BUTTON_PRESS. || |
| 643 | event_type == GDK_TOUCH_BEGINcxx . . $ GDK_TOUCH_BEGIN. || |
| 644 | (EVENT_IS_TOUCHPAD_GESTUREcxx . . $ `gtk/gtkgesture.c:172:9`! (event) && |
| 645 | phase == GDK_TOUCHPAD_GESTURE_PHASE_BEGINcxx . . $ GDK_TOUCHPAD_GESTURE_PHASE_BEGIN. && |
| 646 | gdk_touchpad_event_get_n_fingerscxx . . $ gdk_touchpad_event_get_n_fingers(2d406c81f4428913). (event) == priv->n_pointscxx . . $ _GtkGesturePrivate#n_points.)) |
| 647 | { |
| 648 | if (_gtk_gesture_update_pointcxx . . $ _gtk_gesture_update_point(ecc854bbee3b8506). (gesture, event, target, x, y, TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!)) |
| 649 | { |
| 650 | gbooleancxx . . $ gboolean# triggered_recognition; |
| 651 | |
| 652 | triggered_recognition = |
| 653 | !was_recognized && _gtk_gesture_has_matching_touchpointscxx . . $ _gtk_gesture_has_matching_touchpoints(7d3530d02874564). (gesture); |
| 654 | |
| 655 | if (_gtk_gesture_check_recognizedcxx . . $ _gtk_gesture_check_recognized(6aa08b709753b55f). (gesture, sequence)) |
| 656 | { |
| 657 | PointDatacxx . . $ PointData# *data; |
| 658 | |
| 659 | data = g_hash_table_lookupcxx . . $ g_hash_table_lookup(8183d62c39a6a245). (priv->pointscxx . . $ _GtkGesturePrivate#points., sequence); |
| 660 | |
| 661 | /* If the sequence was claimed early, the press event will be consumed */ |
| 662 | if (gtk_gesture_get_sequence_statecxx . . $ gtk_gesture_get_sequence_state(7ed3205cdc9bf84c). (gesture, sequence) == GTK_EVENT_SEQUENCE_CLAIMEDcxx . . $ GTK_EVENT_SEQUENCE_CLAIMED.) |
| 663 | data->press_handledcxx . . $ _PointData#press_handled. = TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!; |
| 664 | } |
| 665 | else if (triggered_recognition && g_hash_table_sizecxx . . $ g_hash_table_size(4b2d4d194d262c0c). (priv->pointscxx . . $ _GtkGesturePrivate#points.) == 0) |
| 666 | { |
| 667 | /* Recognition was triggered, but the gesture reset during |
| 668 | * ::begin emission. Still, recognition was strictly triggered, |
| 669 | * so the event should be consumed. |
| 670 | */ |
| 671 | return TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!; |
| 672 | } |
| 673 | } |
| 674 | } |
| 675 | else if (event_type == GDK_BUTTON_RELEASEcxx . . $ GDK_BUTTON_RELEASE. || |
| 676 | event_type == GDK_TOUCH_ENDcxx . . $ GDK_TOUCH_END. || |
| 677 | (EVENT_IS_TOUCHPAD_GESTUREcxx . . $ `gtk/gtkgesture.c:172:9`! (event) && |
| 678 | phase == GDK_TOUCHPAD_GESTURE_PHASE_ENDcxx . . $ GDK_TOUCHPAD_GESTURE_PHASE_END. && |
| 679 | gdk_touchpad_event_get_n_fingerscxx . . $ gdk_touchpad_event_get_n_fingers(2d406c81f4428913). (event) == priv->n_pointscxx . . $ _GtkGesturePrivate#n_points.)) |
| 680 | { |
| 681 | gbooleancxx . . $ gboolean# was_claimed = FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!; |
| 682 | |
| 683 | if (_gtk_gesture_update_pointcxx . . $ _gtk_gesture_update_point(ecc854bbee3b8506). (gesture, event, target, x, y, FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!)) |
| 684 | { |
| 685 | if (was_recognized && |
| 686 | _gtk_gesture_check_recognizedcxx . . $ _gtk_gesture_check_recognized(6aa08b709753b55f). (gesture, sequence)) |
| 687 | g_signal_emitcxx . . $ g_signal_emit(cc3f7c2ba1c6a182). (gesture, signalscxx . . $ signals.[UPDATEcxx . . $ UPDATE.], 0, sequence); |
| 688 | |
| 689 | was_claimed = |
| 690 | gtk_gesture_get_sequence_statecxx . . $ gtk_gesture_get_sequence_state(7ed3205cdc9bf84c). (gesture, sequence) == GTK_EVENT_SEQUENCE_CLAIMEDcxx . . $ GTK_EVENT_SEQUENCE_CLAIMED.; |
| 691 | |
| 692 | _gtk_gesture_remove_pointcxx . . $ _gtk_gesture_remove_point(475ba5779a56ba21). (gesture, event); |
| 693 | } |
| 694 | |
| 695 | return was_claimed && was_recognized; |
| 696 | } |
| 697 | else if (event_type == GDK_MOTION_NOTIFYcxx . . $ GDK_MOTION_NOTIFY. || |
| 698 | event_type == GDK_TOUCH_UPDATEcxx . . $ GDK_TOUCH_UPDATE. || |
| 699 | (EVENT_IS_TOUCHPAD_GESTUREcxx . . $ `gtk/gtkgesture.c:172:9`! (event) && |
| 700 | phase == GDK_TOUCHPAD_GESTURE_PHASE_UPDATEcxx . . $ GDK_TOUCHPAD_GESTURE_PHASE_UPDATE. && |
| 701 | gdk_touchpad_event_get_n_fingerscxx . . $ gdk_touchpad_event_get_n_fingers(2d406c81f4428913). (event) == priv->n_pointscxx . . $ _GtkGesturePrivate#n_points.)) |
| 702 | { |
| 703 | if (event_type == GDK_MOTION_NOTIFYcxx . . $ GDK_MOTION_NOTIFY.) |
| 704 | { |
| 705 | if ((state & BUTTONS_MASKcxx . . $ `gtk/gtkgesture.c:170:9`!) == 0) |
| 706 | return FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!; |
| 707 | } |
| 708 | |
| 709 | if (_gtk_gesture_update_pointcxx . . $ _gtk_gesture_update_point(ecc854bbee3b8506). (gesture, event, target, x, y, FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!) && |
| 710 | _gtk_gesture_check_recognizedcxx . . $ _gtk_gesture_check_recognized(6aa08b709753b55f). (gesture, sequence)) |
| 711 | g_signal_emitcxx . . $ g_signal_emit(cc3f7c2ba1c6a182). (gesture, signalscxx . . $ signals.[UPDATEcxx . . $ UPDATE.], 0, sequence); |
| 712 | } |
| 713 | else if (event_type == GDK_TOUCH_CANCELcxx . . $ GDK_TOUCH_CANCEL.) |
| 714 | { |
| 715 | if (!priv->touchpadcxx . . $ _GtkGesturePrivate#touchpad.) |
| 716 | _gtk_gesture_cancel_sequencecxx . . $ _gtk_gesture_cancel_sequence(6aa08b709753b55f). (gesture, sequence); |
| 717 | } |
| 718 | else if (EVENT_IS_TOUCHPAD_GESTUREcxx . . $ `gtk/gtkgesture.c:172:9`! (event) && |
| 719 | phase == GDK_TOUCHPAD_GESTURE_PHASE_CANCELcxx . . $ GDK_TOUCHPAD_GESTURE_PHASE_CANCEL. && |
| 720 | gdk_touchpad_event_get_n_fingerscxx . . $ gdk_touchpad_event_get_n_fingers(2d406c81f4428913). (event) == priv->n_pointscxx . . $ _GtkGesturePrivate#n_points.) |
| 721 | { |
| 722 | if (priv->touchpadcxx . . $ _GtkGesturePrivate#touchpad.) |
| 723 | _gtk_gesture_cancel_sequencecxx . . $ _gtk_gesture_cancel_sequence(6aa08b709753b55f). (gesture, sequence); |
| 724 | } |
| 725 | else if (event_type == GDK_GRAB_BROKENcxx . . $ GDK_GRAB_BROKEN.) |
| 726 | { |
| 727 | GdkSurfacecxx . . $ GdkSurface# *surface; |
| 728 | |
| 729 | surface = gdk_grab_broken_event_get_grab_surfacecxx . . $ gdk_grab_broken_event_get_grab_surface(d99df7223b9c0c68). (event); |
| 730 | if (!surface || !gesture_within_surfacecxx . . $ gesture_within_surface(c9c3b26df74b55f). (gesture, surface)) |
| 731 | _gtk_gesture_cancel_allcxx . . $ _gtk_gesture_cancel_all(fa1efe69d66df200). (gesture); |
| 732 | |
| 733 | return FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!; |
| 734 | } |
| 735 | else |
| 736 | { |
| 737 | /* Unhandled event */ |
| 738 | return FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!; |
| 739 | } |
| 740 | |
| 741 | if (gtk_gesture_get_sequence_statecxx . . $ gtk_gesture_get_sequence_state(7ed3205cdc9bf84c). (gesture, sequence) != GTK_EVENT_SEQUENCE_CLAIMEDcxx . . $ GTK_EVENT_SEQUENCE_CLAIMED.) |
| 742 | return FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!; |
| 743 | |
| 744 | return priv->recognizedcxx . . $ _GtkGesturePrivate#recognized.; |
| 745 | } |
| 746 | |
| 747 | static void |
| 748 | gtk_gesture_resetcxx . . $ gtk_gesture_reset(9b408ea79d359342). (GtkEventControllercxx . . $ GtkEventController# *controller) |
| 749 | { |
| 750 | _gtk_gesture_cancel_allcxx . . $ _gtk_gesture_cancel_all(fa1efe69d66df200). (GTK_GESTUREcxx . . $ `gtk/gtkgesture.h:32:9`! (controller)); |
| 751 | } |
| 752 | |
| 753 | static void |
| 754 | gtk_gesture_class_initcxx . . $ gtk_gesture_class_init(1a572f1ea57e550). (GtkGestureClasscxx . . $ GtkGestureClass# *klass) |
| 755 | { |
| 756 | GObjectClasscxx . . $ GObjectClass# *object_class = G_OBJECT_CLASScxx . . $ `<external>/1341695927569185362/gobject.h:61:9`! (klass); |
| 757 | GtkEventControllerClasscxx . . $ GtkEventControllerClass# *controller_class = GTK_EVENT_CONTROLLER_CLASScxx . . $ `gtk/gtkeventcontroller.h:36:9`! (klass); |
| 758 | |
| 759 | object_class->get_propertycxx . . $ _GObjectClass#get_property. = gtk_gesture_get_propertycxx . . $ gtk_gesture_get_property(cee2c52f22407c66).; |
| 760 | object_class->set_propertycxx . . $ _GObjectClass#set_property. = gtk_gesture_set_propertycxx . . $ gtk_gesture_set_property(d7c4bb29f36c0dc4).; |
| 761 | object_class->finalizecxx . . $ _GObjectClass#finalize. = gtk_gesture_finalizecxx . . $ gtk_gesture_finalize(6087475fa43034d3).; |
| 762 | |
| 763 | controller_class->filter_eventcxx . . $ _GtkEventControllerClass#filter_event. = gtk_gesture_filter_eventcxx . . $ gtk_gesture_filter_event(7ad650e377e57494).; |
| 764 | controller_class->handle_eventcxx . . $ _GtkEventControllerClass#handle_event. = gtk_gesture_handle_eventcxx . . $ gtk_gesture_handle_event(df5f496728f85019).; |
| 765 | controller_class->resetcxx . . $ _GtkEventControllerClass#reset. = gtk_gesture_resetcxx . . $ gtk_gesture_reset(9b408ea79d359342).; |
| 766 | |
| 767 | klass->checkcxx . . $ _GtkGestureClass#check. = gtk_gesture_check_implcxx . . $ gtk_gesture_check_impl(7d3530d02874564).; |
| 768 | |
| 769 | /** |
| 770 | * GtkGesture:n-points: |
| 771 | * |
| 772 | * The number of touch points that trigger |
| 773 | * recognition on this gesture. |
| 774 | */ |
| 775 | g_object_class_install_propertycxx . . $ g_object_class_install_property(9c80cb614dbe5a26). (object_class, |
| 776 | PROP_N_POINTScxx . . $ PROP_N_POINTS., |
| 777 | g_param_spec_uintcxx . . $ g_param_spec_uint(503a1013c8de17d5). ("n-points", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, |
| 778 | 1, G_MAXUINTcxx . . $ `<external>/10505296616216143549/glibconfig.h:40:9`!, 1, |
| 779 | GTK_PARAM_READWRITEcxx . . $ `gtk/gtkprivate.h:44:9`! | |
| 780 | G_PARAM_CONSTRUCT_ONLYcxx . . $ G_PARAM_CONSTRUCT_ONLY.)); |
| 781 | /** |
| 782 | * GtkGesture::begin: |
| 783 | * @gesture: the object which received the signal |
| 784 | * @sequence: (nullable): the `GdkEventSequence` that made the gesture |
| 785 | * to be recognized |
| 786 | * |
| 787 | * Emitted when the gesture is recognized. |
| 788 | * |
| 789 | * This means the number of touch sequences matches |
| 790 | * [[email protected]:n-points]. |
| 791 | * |
| 792 | * Note: These conditions may also happen when an extra touch |
| 793 | * (eg. a third touch on a 2-touches gesture) is lifted, in that |
| 794 | * situation @sequence won't pertain to the current set of active |
| 795 | * touches, so don't rely on this being true. |
| 796 | */ |
| 797 | signalscxx . . $ signals.[BEGINcxx . . $ BEGIN.] = |
| 798 | g_signal_newcxx . . $ g_signal_new(b0aa5e8090fb95c0). (I_cxx . . $ `gdk/gdkprivate.h:35:9`!("begin"), |
| 799 | G_TYPE_FROM_CLASScxx . . $ `<external>/9567554376676449156/gtype.h:657:9`! (klass), |
| 800 | G_SIGNAL_RUN_LASTcxx . . $ G_SIGNAL_RUN_LAST., |
| 801 | G_STRUCT_OFFSETcxx . . $ `<external>/12741050725406041920/gmacros.h:1005:9`! (GtkGestureClass, begin), |
| 802 | NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, |
| 803 | G_TYPE_NONEcxx . . $ `<external>/9567554376676449156/gtype.h:72:9`!, 1, GDK_TYPE_EVENT_SEQUENCEcxx . . $ `gdk/gdkevents.h:39:9`!); |
| 804 | |
| 805 | /** |
| 806 | * GtkGesture::end: |
| 807 | * @gesture: the object which received the signal |
| 808 | * @sequence: (nullable): the `GdkEventSequence` that made gesture |
| 809 | * recognition to finish |
| 810 | * |
| 811 | * Emitted when @gesture either stopped recognizing the event |
| 812 | * sequences as something to be handled, or the number of touch |
| 813 | * sequences became higher or lower than [[email protected]:n-points]. |
| 814 | * |
| 815 | * Note: @sequence might not pertain to the group of sequences that |
| 816 | * were previously triggering recognition on @gesture (ie. a just |
| 817 | * pressed touch sequence that exceeds [[email protected]:n-points]). |
| 818 | * This situation may be detected by checking through |
| 819 | * [[email protected]_sequence]. |
| 820 | */ |
| 821 | signalscxx . . $ signals.[ENDcxx . . $ END.] = |
| 822 | g_signal_newcxx . . $ g_signal_new(b0aa5e8090fb95c0). (I_cxx . . $ `gdk/gdkprivate.h:35:9`!("end"), |
| 823 | G_TYPE_FROM_CLASScxx . . $ `<external>/9567554376676449156/gtype.h:657:9`! (klass), |
| 824 | G_SIGNAL_RUN_LASTcxx . . $ G_SIGNAL_RUN_LAST., |
| 825 | G_STRUCT_OFFSETcxx . . $ `<external>/12741050725406041920/gmacros.h:1005:9`! (GtkGestureClass, end), |
| 826 | NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, |
| 827 | G_TYPE_NONEcxx . . $ `<external>/9567554376676449156/gtype.h:72:9`!, 1, GDK_TYPE_EVENT_SEQUENCEcxx . . $ `gdk/gdkevents.h:39:9`!); |
| 828 | |
| 829 | /** |
| 830 | * GtkGesture::update: |
| 831 | * @gesture: the object which received the signal |
| 832 | * @sequence: (nullable): the `GdkEventSequence` that was updated |
| 833 | * |
| 834 | * Emitted whenever an event is handled while the gesture is recognized. |
| 835 | * |
| 836 | * @sequence is guaranteed to pertain to the set of active touches. |
| 837 | */ |
| 838 | signalscxx . . $ signals.[UPDATEcxx . . $ UPDATE.] = |
| 839 | g_signal_newcxx . . $ g_signal_new(b0aa5e8090fb95c0). (I_cxx . . $ `gdk/gdkprivate.h:35:9`!("update"), |
| 840 | G_TYPE_FROM_CLASScxx . . $ `<external>/9567554376676449156/gtype.h:657:9`! (klass), |
| 841 | G_SIGNAL_RUN_LASTcxx . . $ G_SIGNAL_RUN_LAST., |
| 842 | G_STRUCT_OFFSETcxx . . $ `<external>/12741050725406041920/gmacros.h:1005:9`! (GtkGestureClass, update), |
| 843 | NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, |
| 844 | G_TYPE_NONEcxx . . $ `<external>/9567554376676449156/gtype.h:72:9`!, 1, GDK_TYPE_EVENT_SEQUENCEcxx . . $ `gdk/gdkevents.h:39:9`!); |
| 845 | |
| 846 | /** |
| 847 | * GtkGesture::cancel: |
| 848 | * @gesture: the object which received the signal |
| 849 | * @sequence: (nullable): the `GdkEventSequence` that was cancelled |
| 850 | * |
| 851 | * Emitted whenever a sequence is cancelled. |
| 852 | * |
| 853 | * This usually happens on active touches when |
| 854 | * [[email protected]] is called on @gesture |
| 855 | * (manually, due to grabs...), or the individual @sequence |
| 856 | * was claimed by parent widgets' controllers (see |
| 857 | * [[email protected]_sequence_state]). |
| 858 | * |
| 859 | * @gesture must forget everything about @sequence as in |
| 860 | * response to this signal. |
| 861 | */ |
| 862 | signalscxx . . $ signals.[CANCELcxx . . $ CANCEL.] = |
| 863 | g_signal_newcxx . . $ g_signal_new(b0aa5e8090fb95c0). (I_cxx . . $ `gdk/gdkprivate.h:35:9`!("cancel"), |
| 864 | G_TYPE_FROM_CLASScxx . . $ `<external>/9567554376676449156/gtype.h:657:9`! (klass), |
| 865 | G_SIGNAL_RUN_LASTcxx . . $ G_SIGNAL_RUN_LAST., |
| 866 | G_STRUCT_OFFSETcxx . . $ `<external>/12741050725406041920/gmacros.h:1005:9`! (GtkGestureClass, cancel), |
| 867 | NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, |
| 868 | G_TYPE_NONEcxx . . $ `<external>/9567554376676449156/gtype.h:72:9`!, 1, GDK_TYPE_EVENT_SEQUENCEcxx . . $ `gdk/gdkevents.h:39:9`!); |
| 869 | |
| 870 | /** |
| 871 | * GtkGesture::sequence-state-changed: |
| 872 | * @gesture: the object which received the signal |
| 873 | * @sequence: (nullable): the `GdkEventSequence` that was cancelled |
| 874 | * @state: the new sequence state |
| 875 | * |
| 876 | * Emitted whenever a sequence state changes. |
| 877 | * |
| 878 | * See [[email protected]_sequence_state] to know |
| 879 | * more about the expectable sequence lifetimes. |
| 880 | */ |
| 881 | signalscxx . . $ signals.[SEQUENCE_STATE_CHANGEDcxx . . $ SEQUENCE_STATE_CHANGED.] = |
| 882 | g_signal_newcxx . . $ g_signal_new(b0aa5e8090fb95c0). (I_cxx . . $ `gdk/gdkprivate.h:35:9`!("sequence-state-changed"), |
| 883 | G_TYPE_FROM_CLASScxx . . $ `<external>/9567554376676449156/gtype.h:657:9`! (klass), |
| 884 | G_SIGNAL_RUN_LASTcxx . . $ G_SIGNAL_RUN_LAST., |
| 885 | G_STRUCT_OFFSETcxx . . $ `<external>/12741050725406041920/gmacros.h:1005:9`! (GtkGestureClass, sequence_state_changed), |
| 886 | NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, |
| 887 | _gtk_marshal_VOID__BOXED_ENUMcxx . . $ _gtk_marshal_VOID__BOXED_ENUM(cba270afb0f82555)., |
| 888 | G_TYPE_NONEcxx . . $ `<external>/9567554376676449156/gtype.h:72:9`!, 2, GDK_TYPE_EVENT_SEQUENCEcxx . . $ `gdk/gdkevents.h:39:9`!, |
| 889 | GTK_TYPE_EVENT_SEQUENCE_STATEcxx . . $ `build/gtk/gtktypebuiltins.h:204:9`!); |
| 890 | g_signal_set_va_marshallercxx . . $ g_signal_set_va_marshaller(4fd870c04a9d6fe7). (signalscxx . . $ signals.[SEQUENCE_STATE_CHANGEDcxx . . $ SEQUENCE_STATE_CHANGED.], |
| 891 | G_TYPE_FROM_CLASScxx . . $ `<external>/9567554376676449156/gtype.h:657:9`! (klass), |
| 892 | _gtk_marshal_VOID__BOXED_ENUMvcxx . . $ _gtk_marshal_VOID__BOXED_ENUMv(d309f4be92d1737c).); |
| 893 | } |
| 894 | |
| 895 | static void |
| 896 | free_point_datacxx . . $ free_point_data(5d22bdacc48458e8). (gpointercxx . . $ gpointer# data) |
| 897 | { |
| 898 | PointDatacxx . . $ PointData# *point = data; |
| 899 | |
| 900 | if (point->eventcxx . . $ _PointData#event.) |
| 901 | gdk_event_unrefcxx . . $ gdk_event_unref(d2fff11cfbb0bd0a). (point->eventcxx . . $ _PointData#event.); |
| 902 | |
| 903 | if (point->targetcxx . . $ _PointData#target.) |
| 904 | g_object_unrefcxx . . $ g_object_unref(5d22bdacc48458e8). (point->targetcxx . . $ _PointData#target.); |
| 905 | |
| 906 | g_freecxx . . $ g_free(5d22bdacc48458e8). (point); |
| 907 | } |
| 908 | |
| 909 | static void |
| 910 | gtk_gesture_initcxx . . $ gtk_gesture_init(fa1efe69d66df200). (GtkGesturecxx . . $ GtkGesture# *gesture) |
| 911 | { |
| 912 | GtkGesturePrivatecxx . . $ GtkGesturePrivate# *priv; |
| 913 | |
| 914 | priv = gtk_gesture_get_instance_privatecxx . . $ gtk_gesture_get_instance_private(b9559087c869032c). (gesture); |
| 915 | priv->pointscxx . . $ _GtkGesturePrivate#points. = g_hash_table_new_fullcxx . . $ g_hash_table_new_full(e2dd12b570de7430). (NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, |
| 916 | (GDestroyNotifycxx . . $ GDestroyNotify#) free_point_datacxx . . $ free_point_data(5d22bdacc48458e8).); |
| 917 | priv->group_linkcxx . . $ _GtkGesturePrivate#group_link. = g_list_prependcxx . . $ g_list_prepend(35007086a6b2ba1c). (NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, gesture); |
| 918 | } |
| 919 | |
| 920 | /** |
| 921 | * gtk_gesture_get_device: |
| 922 | * @gesture: a `GtkGesture` |
| 923 | * |
| 924 | * Returns the logical `GdkDevice` that is currently operating |
| 925 | * on @gesture. |
| 926 | * |
| 927 | * This returns %NULL if the gesture is not being interacted. |
| 928 | * |
| 929 | * Returns: (nullable) (transfer none): a `GdkDevice` |
| 930 | */ |
| 931 | GdkDevicecxx . . $ GdkDevice# * |
| 932 | gtk_gesture_get_devicecxx . . $ gtk_gesture_get_device(b8870bc3920be57d). (GtkGesturecxx . . $ GtkGesture# *gesture) |
| 933 | { |
| 934 | GtkGesturePrivatecxx . . $ GtkGesturePrivate# *priv; |
| 935 | |
| 936 | g_return_val_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:665:9`! (GTK_IS_GESTUREcxx . . $ `gtk/gtkgesture.h:34:9`! (gesture), NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 937 | |
| 938 | priv = gtk_gesture_get_instance_privatecxx . . $ gtk_gesture_get_instance_private(b9559087c869032c). (gesture); |
| 939 | |
| 940 | return priv->devicecxx . . $ _GtkGesturePrivate#device.; |
| 941 | } |
| 942 | |
| 943 | /** |
| 944 | * gtk_gesture_get_sequence_state: |
| 945 | * @gesture: a `GtkGesture` |
| 946 | * @sequence: a `GdkEventSequence` |
| 947 | * |
| 948 | * Returns the @sequence state, as seen by @gesture. |
| 949 | * |
| 950 | * Returns: The sequence state in @gesture |
| 951 | */ |
| 952 | GtkEventSequenceStatecxx . . $ GtkEventSequenceState# |
| 953 | gtk_gesture_get_sequence_statecxx . . $ gtk_gesture_get_sequence_state(7ed3205cdc9bf84c). (GtkGesturecxx . . $ GtkGesture# *gesture, |
| 954 | GdkEventSequencecxx . . $ GdkEventSequence# *sequence) |
| 955 | { |
| 956 | GtkGesturePrivatecxx . . $ GtkGesturePrivate# *priv; |
| 957 | PointDatacxx . . $ PointData# *data; |
| 958 | |
| 959 | g_return_val_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:665:9`! (GTK_IS_GESTUREcxx . . $ `gtk/gtkgesture.h:34:9`! (gesture), |
| 960 | GTK_EVENT_SEQUENCE_NONE); |
| 961 | |
| 962 | priv = gtk_gesture_get_instance_privatecxx . . $ gtk_gesture_get_instance_private(b9559087c869032c). (gesture); |
| 963 | data = g_hash_table_lookupcxx . . $ g_hash_table_lookup(8183d62c39a6a245). (priv->pointscxx . . $ _GtkGesturePrivate#points., sequence); |
| 964 | |
| 965 | if (!data) |
| 966 | return GTK_EVENT_SEQUENCE_NONEcxx . . $ GTK_EVENT_SEQUENCE_NONE.; |
| 967 | |
| 968 | return data->statecxx . . $ _PointData#state.; |
| 969 | } |
| 970 | |
| 971 | /** |
| 972 | * gtk_gesture_set_sequence_state: |
| 973 | * @gesture: a `GtkGesture` |
| 974 | * @sequence: a `GdkEventSequence` |
| 975 | * @state: the sequence state |
| 976 | * |
| 977 | * Sets the state of @sequence in @gesture. |
| 978 | * |
| 979 | * Sequences start in state %GTK_EVENT_SEQUENCE_NONE, and whenever |
| 980 | * they change state, they can never go back to that state. Likewise, |
| 981 | * sequences in state %GTK_EVENT_SEQUENCE_DENIED cannot turn back to |
| 982 | * a not denied state. With these rules, the lifetime of an event |
| 983 | * sequence is constrained to the next four: |
| 984 | * |
| 985 | * * None |
| 986 | * * None → Denied |
| 987 | * * None → Claimed |
| 988 | * * None → Claimed → Denied |
| 989 | * |
| 990 | * Note: Due to event handling ordering, it may be unsafe to set the |
| 991 | * state on another gesture within a [[email protected]::begin] signal |
| 992 | * handler, as the callback might be executed before the other gesture |
| 993 | * knows about the sequence. A safe way to perform this could be: |
| 994 | * |
| 995 | * ```c |
| 996 | * static void |
| 997 | * first_gesture_begin_cb (GtkGesture *first_gesture, |
| 998 | * GdkEventSequence *sequence, |
| 999 | * gpointer user_data) |
| 1000 | * { |
| 1001 | * gtk_gesture_set_sequence_state (first_gesture, sequence, GTK_EVENT_SEQUENCE_CLAIMED); |
| 1002 | * gtk_gesture_set_sequence_state (second_gesture, sequence, GTK_EVENT_SEQUENCE_DENIED); |
| 1003 | * } |
| 1004 | * |
| 1005 | * static void |
| 1006 | * second_gesture_begin_cb (GtkGesture *second_gesture, |
| 1007 | * GdkEventSequence *sequence, |
| 1008 | * gpointer user_data) |
| 1009 | * { |
| 1010 | * if (gtk_gesture_get_sequence_state (first_gesture, sequence) == GTK_EVENT_SEQUENCE_CLAIMED) |
| 1011 | * gtk_gesture_set_sequence_state (second_gesture, sequence, GTK_EVENT_SEQUENCE_DENIED); |
| 1012 | * } |
| 1013 | * ``` |
| 1014 | * |
| 1015 | * If both gestures are in the same group, just set the state on |
| 1016 | * the gesture emitting the event, the sequence will be already |
| 1017 | * be initialized to the group's global state when the second |
| 1018 | * gesture processes the event. |
| 1019 | * |
| 1020 | * Returns: %TRUE if @sequence is handled by @gesture, |
| 1021 | * and the state is changed successfully |
| 1022 | * |
| 1023 | * Deprecated: 4.10. Use [[email protected]_state] |
| 1024 | */ |
| 1025 | gbooleancxx . . $ gboolean# |
| 1026 | gtk_gesture_set_sequence_statecxx . . $ gtk_gesture_set_sequence_state(6ec7ce0f6792fd90). (GtkGesturecxx . . $ GtkGesture# *gesture, |
| 1027 | GdkEventSequencecxx . . $ GdkEventSequence# *sequence, |
| 1028 | GtkEventSequenceStatecxx . . $ GtkEventSequenceState# state) |
| 1029 | { |
| 1030 | GtkGesturePrivatecxx . . $ GtkGesturePrivate# *priv; |
| 1031 | GtkWidgetcxx . . $ GtkWidget# *widget; |
| 1032 | PointDatacxx . . $ PointData# *data; |
| 1033 | |
| 1034 | g_return_val_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:665:9`! (GTK_IS_GESTUREcxx . . $ `gtk/gtkgesture.h:34:9`! (gesture), FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!); |
| 1035 | g_return_val_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:665:9`! (state >= GTK_EVENT_SEQUENCE_NONE && |
| 1036 | state <= GTK_EVENT_SEQUENCE_DENIED, FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!); |
| 1037 | |
| 1038 | priv = gtk_gesture_get_instance_privatecxx . . $ gtk_gesture_get_instance_private(b9559087c869032c). (gesture); |
| 1039 | data = g_hash_table_lookupcxx . . $ g_hash_table_lookup(8183d62c39a6a245). (priv->pointscxx . . $ _GtkGesturePrivate#points., sequence); |
| 1040 | |
| 1041 | if (!data) |
| 1042 | return FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!; |
| 1043 | |
| 1044 | if (data->statecxx . . $ _PointData#state. == state) |
| 1045 | return FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!; |
| 1046 | |
| 1047 | /* denied sequences remain denied */ |
| 1048 | if (data->statecxx . . $ _PointData#state. == GTK_EVENT_SEQUENCE_DENIEDcxx . . $ GTK_EVENT_SEQUENCE_DENIED.) |
| 1049 | return FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!; |
| 1050 | |
| 1051 | /* Sequences can't go from claimed/denied to none */ |
| 1052 | if (state == GTK_EVENT_SEQUENCE_NONEcxx . . $ GTK_EVENT_SEQUENCE_NONE. && |
| 1053 | data->statecxx . . $ _PointData#state. != GTK_EVENT_SEQUENCE_NONEcxx . . $ GTK_EVENT_SEQUENCE_NONE.) |
| 1054 | return FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!; |
| 1055 | |
| 1056 | data->statecxx . . $ _PointData#state. = state; |
| 1057 | |
| 1058 | widget = gtk_event_controller_get_widgetcxx . . $ gtk_event_controller_get_widget(71aab0125320da1a). (GTK_EVENT_CONTROLLERcxx . . $ `gtk/gtkeventcontroller.h:35:9`! (gesture)); |
| 1059 | gtk_widget_propagate_event_sequence_statecxx . . $ gtk_widget_propagate_event_sequence_state(db052dd72fd336e6). (widget, gesture, sequence, state); |
| 1060 | g_signal_emitcxx . . $ g_signal_emit(cc3f7c2ba1c6a182). (gesture, signalscxx . . $ signals.[SEQUENCE_STATE_CHANGEDcxx . . $ SEQUENCE_STATE_CHANGED.], 0, |
| 1061 | sequence, state); |
| 1062 | |
| 1063 | if (state == GTK_EVENT_SEQUENCE_DENIEDcxx . . $ GTK_EVENT_SEQUENCE_DENIED.) |
| 1064 | _gtk_gesture_check_recognizedcxx . . $ _gtk_gesture_check_recognized(6aa08b709753b55f). (gesture, sequence); |
| 1065 | |
| 1066 | return TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!; |
| 1067 | } |
| 1068 | |
| 1069 | /** |
| 1070 | * gtk_gesture_set_state: |
| 1071 | * @gesture: a `GtkGesture` |
| 1072 | * @state: the sequence state |
| 1073 | * |
| 1074 | * Sets the state of all sequences that @gesture is currently |
| 1075 | * interacting with. |
| 1076 | * |
| 1077 | * Sequences start in state %GTK_EVENT_SEQUENCE_NONE, and whenever |
| 1078 | * they change state, they can never go back to that state. Likewise, |
| 1079 | * sequences in state %GTK_EVENT_SEQUENCE_DENIED cannot turn back to |
| 1080 | * a not denied state. With these rules, the lifetime of an event |
| 1081 | * sequence is constrained to the next four: |
| 1082 | * |
| 1083 | * * None |
| 1084 | * * None → Denied |
| 1085 | * * None → Claimed |
| 1086 | * * None → Claimed → Denied |
| 1087 | * |
| 1088 | * Note: Due to event handling ordering, it may be unsafe to set the |
| 1089 | * state on another gesture within a [[email protected]::begin] signal |
| 1090 | * handler, as the callback might be executed before the other gesture |
| 1091 | * knows about the sequence. A safe way to perform this could be: |
| 1092 | * |
| 1093 | * ```c |
| 1094 | * static void |
| 1095 | * first_gesture_begin_cb (GtkGesture *first_gesture, |
| 1096 | * GdkEventSequence *sequence, |
| 1097 | * gpointer user_data) |
| 1098 | * { |
| 1099 | * gtk_gesture_set_state (first_gesture, GTK_EVENT_SEQUENCE_CLAIMED); |
| 1100 | * gtk_gesture_set_state (second_gesture, GTK_EVENT_SEQUENCE_DENIED); |
| 1101 | * } |
| 1102 | * |
| 1103 | * static void |
| 1104 | * second_gesture_begin_cb (GtkGesture *second_gesture, |
| 1105 | * GdkEventSequence *sequence, |
| 1106 | * gpointer user_data) |
| 1107 | * { |
| 1108 | * if (gtk_gesture_get_sequence_state (first_gesture, sequence) == GTK_EVENT_SEQUENCE_CLAIMED) |
| 1109 | * gtk_gesture_set_state (second_gesture, GTK_EVENT_SEQUENCE_DENIED); |
| 1110 | * } |
| 1111 | * ``` |
| 1112 | * |
| 1113 | * If both gestures are in the same group, just set the state on |
| 1114 | * the gesture emitting the event, the sequence will be already |
| 1115 | * be initialized to the group's global state when the second |
| 1116 | * gesture processes the event. |
| 1117 | * |
| 1118 | * Returns: %TRUE if the state of at least one sequence |
| 1119 | * was changed successfully |
| 1120 | */ |
| 1121 | gbooleancxx . . $ gboolean# |
| 1122 | gtk_gesture_set_statecxx . . $ gtk_gesture_set_state(e8b82f7bdf7c1c23). (GtkGesturecxx . . $ GtkGesture# *gesture, |
| 1123 | GtkEventSequenceStatecxx . . $ GtkEventSequenceState# state) |
| 1124 | { |
| 1125 | gbooleancxx . . $ gboolean# handled = FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!; |
| 1126 | GtkGesturePrivatecxx . . $ GtkGesturePrivate# *priv; |
| 1127 | GListcxx . . $ GList# *sequences, *l; |
| 1128 | |
| 1129 | g_return_val_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:665:9`! (GTK_IS_GESTUREcxx . . $ `gtk/gtkgesture.h:34:9`! (gesture), FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!); |
| 1130 | g_return_val_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:665:9`! (state >= GTK_EVENT_SEQUENCE_NONE && |
| 1131 | state <= GTK_EVENT_SEQUENCE_DENIED, FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!); |
| 1132 | |
| 1133 | priv = gtk_gesture_get_instance_privatecxx . . $ gtk_gesture_get_instance_private(b9559087c869032c). (gesture); |
| 1134 | sequences = g_hash_table_get_keyscxx . . $ g_hash_table_get_keys(1f44cec2c80773f2). (priv->pointscxx . . $ _GtkGesturePrivate#points.); |
| 1135 | |
| 1136 | G_GNUC_BEGIN_IGNORE_DEPRECATIONScxx . . $ `<external>/12741050725406041920/gmacros.h:771:9`! |
| 1137 | for (l = sequences; l; l = l->nextcxx . . $ _GList#next.) |
| 1138 | handled |= gtk_gesture_set_sequence_statecxx . . $ gtk_gesture_set_sequence_state(6ec7ce0f6792fd90). (gesture, l->datacxx . . $ _GList#data., state); |
| 1139 | G_GNUC_END_IGNORE_DEPRECATIONScxx . . $ `<external>/12741050725406041920/gmacros.h:774:9`! |
| 1140 | |
| 1141 | g_list_freecxx . . $ g_list_free(d1b6ff1ff9a6d4b6). (sequences); |
| 1142 | |
| 1143 | return handled; |
| 1144 | } |
| 1145 | |
| 1146 | /** |
| 1147 | * gtk_gesture_get_sequences: |
| 1148 | * @gesture: a `GtkGesture` |
| 1149 | * |
| 1150 | * Returns the list of `GdkEventSequences` currently being interpreted |
| 1151 | * by @gesture. |
| 1152 | * |
| 1153 | * Returns: (transfer container) (element-type GdkEventSequence): A list |
| 1154 | * of `GdkEventSequence`, the list elements are owned by GTK and must |
| 1155 | * not be freed or modified, the list itself must be deleted |
| 1156 | * through g_list_free() |
| 1157 | */ |
| 1158 | GListcxx . . $ GList# * |
| 1159 | gtk_gesture_get_sequencescxx . . $ gtk_gesture_get_sequences(65a30909e0dbc2f3). (GtkGesturecxx . . $ GtkGesture# *gesture) |
| 1160 | { |
| 1161 | GdkEventSequencecxx . . $ GdkEventSequence# *sequence; |
| 1162 | GtkGesturePrivatecxx . . $ GtkGesturePrivate# *priv; |
| 1163 | GListcxx . . $ GList# *sequences = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 1164 | GHashTableItercxx . . $ GHashTableIter# iter; |
| 1165 | PointDatacxx . . $ PointData# *data; |
| 1166 | GdkEventTypecxx . . $ GdkEventType# event_type; |
| 1167 | |
| 1168 | g_return_val_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:665:9`! (GTK_IS_GESTUREcxx . . $ `gtk/gtkgesture.h:34:9`! (gesture), NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 1169 | |
| 1170 | priv = gtk_gesture_get_instance_privatecxx . . $ gtk_gesture_get_instance_private(b9559087c869032c). (gesture); |
| 1171 | g_hash_table_iter_initcxx . . $ g_hash_table_iter_init(1fd6bbae530c3b4). (&iter, priv->pointscxx . . $ _GtkGesturePrivate#points.); |
| 1172 | |
| 1173 | while (g_hash_table_iter_nextcxx . . $ g_hash_table_iter_next(1740d3f8cffea03c). (&iter, (gpointercxx . . $ gpointer# *) &sequence, (gpointercxx . . $ gpointer# *) &data)) |
| 1174 | { |
| 1175 | if (data->statecxx . . $ _PointData#state. == GTK_EVENT_SEQUENCE_DENIEDcxx . . $ GTK_EVENT_SEQUENCE_DENIED.) |
| 1176 | continue; |
| 1177 | |
| 1178 | event_type = gdk_event_get_event_typecxx . . $ gdk_event_get_event_type(af0289f7121992bc). (data->eventcxx . . $ _PointData#event.); |
| 1179 | |
| 1180 | if (event_type == GDK_TOUCH_ENDcxx . . $ GDK_TOUCH_END. || |
| 1181 | event_type == GDK_BUTTON_RELEASEcxx . . $ GDK_BUTTON_RELEASE.) |
| 1182 | continue; |
| 1183 | |
| 1184 | sequences = g_list_prependcxx . . $ g_list_prepend(35007086a6b2ba1c). (sequences, sequence); |
| 1185 | } |
| 1186 | |
| 1187 | return sequences; |
| 1188 | } |
| 1189 | |
| 1190 | /** |
| 1191 | * gtk_gesture_get_last_updated_sequence: |
| 1192 | * @gesture: a `GtkGesture` |
| 1193 | * |
| 1194 | * Returns the `GdkEventSequence` that was last updated on @gesture. |
| 1195 | * |
| 1196 | * Returns: (transfer none) (nullable): The last updated sequence |
| 1197 | */ |
| 1198 | GdkEventSequencecxx . . $ GdkEventSequence# * |
| 1199 | gtk_gesture_get_last_updated_sequencecxx . . $ gtk_gesture_get_last_updated_sequence(9fe85c655f49cc0e). (GtkGesturecxx . . $ GtkGesture# *gesture) |
| 1200 | { |
| 1201 | GtkGesturePrivatecxx . . $ GtkGesturePrivate# *priv; |
| 1202 | |
| 1203 | g_return_val_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:665:9`! (GTK_IS_GESTUREcxx . . $ `gtk/gtkgesture.h:34:9`! (gesture), NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 1204 | |
| 1205 | priv = gtk_gesture_get_instance_privatecxx . . $ gtk_gesture_get_instance_private(b9559087c869032c). (gesture); |
| 1206 | |
| 1207 | return priv->last_sequencecxx . . $ _GtkGesturePrivate#last_sequence.; |
| 1208 | } |
| 1209 | |
| 1210 | /** |
| 1211 | * gtk_gesture_get_last_event: |
| 1212 | * @gesture: a `GtkGesture` |
| 1213 | * @sequence: (nullable): a `GdkEventSequence` |
| 1214 | * |
| 1215 | * Returns the last event that was processed for @sequence. |
| 1216 | * |
| 1217 | * Note that the returned pointer is only valid as long as the |
| 1218 | * @sequence is still interpreted by the @gesture. If in doubt, |
| 1219 | * you should make a copy of the event. |
| 1220 | * |
| 1221 | * Returns: (transfer none) (nullable): The last event from @sequence |
| 1222 | */ |
| 1223 | GdkEventcxx . . $ GdkEvent# * |
| 1224 | gtk_gesture_get_last_eventcxx . . $ gtk_gesture_get_last_event(bb392b7a95f5154a). (GtkGesturecxx . . $ GtkGesture# *gesture, |
| 1225 | GdkEventSequencecxx . . $ GdkEventSequence# *sequence) |
| 1226 | { |
| 1227 | GtkGesturePrivatecxx . . $ GtkGesturePrivate# *priv; |
| 1228 | PointDatacxx . . $ PointData# *data; |
| 1229 | |
| 1230 | g_return_val_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:665:9`! (GTK_IS_GESTUREcxx . . $ `gtk/gtkgesture.h:34:9`! (gesture), NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 1231 | |
| 1232 | priv = gtk_gesture_get_instance_privatecxx . . $ gtk_gesture_get_instance_private(b9559087c869032c). (gesture); |
| 1233 | data = g_hash_table_lookupcxx . . $ g_hash_table_lookup(8183d62c39a6a245). (priv->pointscxx . . $ _GtkGesturePrivate#points., sequence); |
| 1234 | |
| 1235 | if (!data) |
| 1236 | return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 1237 | |
| 1238 | return data->eventcxx . . $ _PointData#event.; |
| 1239 | } |
| 1240 | |
| 1241 | /* |
| 1242 | * gtk_gesture_get_last_target: |
| 1243 | * @gesture: a `GtkGesture` |
| 1244 | * @sequence: event sequence |
| 1245 | * |
| 1246 | * Returns the widget that the last event was targeted at. |
| 1247 | * |
| 1248 | * See [[email protected]_last_event]. |
| 1249 | * |
| 1250 | * Returns: (transfer none) (nullable): The target of the last event |
| 1251 | */ |
| 1252 | GtkWidgetcxx . . $ GtkWidget# * |
| 1253 | gtk_gesture_get_last_targetcxx . . $ gtk_gesture_get_last_target(58cb968df91c6bc3). (GtkGesturecxx . . $ GtkGesture# *gesture, |
| 1254 | GdkEventSequencecxx . . $ GdkEventSequence# *sequence) |
| 1255 | { |
| 1256 | GtkGesturePrivatecxx . . $ GtkGesturePrivate# *priv; |
| 1257 | PointDatacxx . . $ PointData# *data; |
| 1258 | |
| 1259 | g_return_val_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:665:9`! (GTK_IS_GESTUREcxx . . $ `gtk/gtkgesture.h:34:9`! (gesture), NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 1260 | |
| 1261 | priv = gtk_gesture_get_instance_privatecxx . . $ gtk_gesture_get_instance_private(b9559087c869032c). (gesture); |
| 1262 | data = g_hash_table_lookupcxx . . $ g_hash_table_lookup(8183d62c39a6a245). (priv->pointscxx . . $ _GtkGesturePrivate#points., sequence); |
| 1263 | |
| 1264 | if (!data) |
| 1265 | return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 1266 | |
| 1267 | return data->targetcxx . . $ _PointData#target.; |
| 1268 | } |
| 1269 | |
| 1270 | /** |
| 1271 | * gtk_gesture_get_point: |
| 1272 | * @gesture: a `GtkGesture` |
| 1273 | * @sequence: (nullable): a `GdkEventSequence`, or %NULL for pointer events |
| 1274 | * @x: (out) (optional): return location for X axis of the sequence coordinates |
| 1275 | * @y: (out) (optional): return location for Y axis of the sequence coordinates |
| 1276 | * |
| 1277 | * If @sequence is currently being interpreted by @gesture, |
| 1278 | * returns %TRUE and fills in @x and @y with the last coordinates |
| 1279 | * stored for that event sequence. |
| 1280 | * |
| 1281 | * The coordinates are always relative to the widget allocation. |
| 1282 | * |
| 1283 | * Returns: %TRUE if @sequence is currently interpreted |
| 1284 | */ |
| 1285 | gbooleancxx . . $ gboolean# |
| 1286 | gtk_gesture_get_pointcxx . . $ gtk_gesture_get_point(c2c448b15d15778f). (GtkGesturecxx . . $ GtkGesture# *gesture, |
| 1287 | GdkEventSequencecxx . . $ GdkEventSequence# *sequence, |
| 1288 | double *x, |
| 1289 | double *y) |
| 1290 | { |
| 1291 | GtkGesturePrivatecxx . . $ GtkGesturePrivate# *priv; |
| 1292 | PointDatacxx . . $ PointData# *data; |
| 1293 | |
| 1294 | g_return_val_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:665:9`! (GTK_IS_GESTUREcxx . . $ `gtk/gtkgesture.h:34:9`! (gesture), FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!); |
| 1295 | |
| 1296 | priv = gtk_gesture_get_instance_privatecxx . . $ gtk_gesture_get_instance_private(b9559087c869032c). (gesture); |
| 1297 | |
| 1298 | if (!g_hash_table_lookup_extendedcxx . . $ g_hash_table_lookup_extended(af2aa9836613954a). (priv->pointscxx . . $ _GtkGesturePrivate#points., sequence, |
| 1299 | NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, (gpointercxx . . $ gpointer# *) &data)) |
| 1300 | return FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!; |
| 1301 | |
| 1302 | if (x) |
| 1303 | *x = data->widget_xcxx . . $ _PointData#widget_x.; |
| 1304 | if (y) |
| 1305 | *y = data->widget_ycxx . . $ _PointData#widget_y.; |
| 1306 | |
| 1307 | return TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!; |
| 1308 | } |
| 1309 | |
| 1310 | gbooleancxx . . $ gboolean# |
| 1311 | _gtk_gesture_get_last_update_timecxx . . $ _gtk_gesture_get_last_update_time(b22408fed21b103a). (GtkGesturecxx . . $ GtkGesture# *gesture, |
| 1312 | GdkEventSequencecxx . . $ GdkEventSequence# *sequence, |
| 1313 | guint32cxx . . $ guint32# *evtime) |
| 1314 | { |
| 1315 | GtkGesturePrivatecxx . . $ GtkGesturePrivate# *priv; |
| 1316 | PointDatacxx . . $ PointData# *data; |
| 1317 | |
| 1318 | g_return_val_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:665:9`! (GTK_IS_GESTUREcxx . . $ `gtk/gtkgesture.h:34:9`! (gesture), FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!); |
| 1319 | |
| 1320 | priv = gtk_gesture_get_instance_privatecxx . . $ gtk_gesture_get_instance_private(b9559087c869032c). (gesture); |
| 1321 | |
| 1322 | if (!g_hash_table_lookup_extendedcxx . . $ g_hash_table_lookup_extended(af2aa9836613954a). (priv->pointscxx . . $ _GtkGesturePrivate#points., sequence, |
| 1323 | NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, (gpointercxx . . $ gpointer# *) &data)) |
| 1324 | return FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!; |
| 1325 | |
| 1326 | if (evtime) |
| 1327 | *evtime = gdk_event_get_timecxx . . $ gdk_event_get_time(2d406c81f4428913). (data->eventcxx . . $ _PointData#event.); |
| 1328 | |
| 1329 | return TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!; |
| 1330 | }; |
| 1331 | |
| 1332 | /** |
| 1333 | * gtk_gesture_get_bounding_box: |
| 1334 | * @gesture: a `GtkGesture` |
| 1335 | * @rect: (out): bounding box containing all active touches. |
| 1336 | * |
| 1337 | * If there are touch sequences being currently handled by @gesture, |
| 1338 | * returns %TRUE and fills in @rect with the bounding box containing |
| 1339 | * all active touches. |
| 1340 | * |
| 1341 | * Otherwise, %FALSE will be returned. |
| 1342 | * |
| 1343 | * Note: This function will yield unexpected results on touchpad |
| 1344 | * gestures. Since there is no correlation between physical and |
| 1345 | * pixel distances, these will look as if constrained in an |
| 1346 | * infinitely small area, @rect width and height will thus be 0 |
| 1347 | * regardless of the number of touchpoints. |
| 1348 | * |
| 1349 | * Returns: %TRUE if there are active touches, %FALSE otherwise |
| 1350 | */ |
| 1351 | gbooleancxx . . $ gboolean# |
| 1352 | gtk_gesture_get_bounding_boxcxx . . $ gtk_gesture_get_bounding_box(186023fc5a82d610). (GtkGesturecxx . . $ GtkGesture# *gesture, |
| 1353 | GdkRectanglecxx . . $ GdkRectangle# *rect) |
| 1354 | { |
| 1355 | GtkGesturePrivatecxx . . $ GtkGesturePrivate# *priv; |
| 1356 | double x1, y1, x2, y2; |
| 1357 | GHashTableItercxx . . $ GHashTableIter# iter; |
| 1358 | guintcxx . . $ guint# n_points = 0; |
| 1359 | PointDatacxx . . $ PointData# *data; |
| 1360 | GdkEventTypecxx . . $ GdkEventType# event_type; |
| 1361 | |
| 1362 | g_return_val_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:665:9`! (GTK_IS_GESTUREcxx . . $ `gtk/gtkgesture.h:34:9`! (gesture), FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!); |
| 1363 | g_return_val_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:665:9`! (rect != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!); |
| 1364 | |
| 1365 | priv = gtk_gesture_get_instance_privatecxx . . $ gtk_gesture_get_instance_private(b9559087c869032c). (gesture); |
| 1366 | x1 = y1 = G_MAXDOUBLEcxx . . $ `<external>/10505296616216143549/glibconfig.h:34:9`!; |
| 1367 | x2 = y2 = -G_MAXDOUBLEcxx . . $ `<external>/10505296616216143549/glibconfig.h:34:9`!; |
| 1368 | |
| 1369 | g_hash_table_iter_initcxx . . $ g_hash_table_iter_init(1fd6bbae530c3b4). (&iter, priv->pointscxx . . $ _GtkGesturePrivate#points.); |
| 1370 | |
| 1371 | while (g_hash_table_iter_nextcxx . . $ g_hash_table_iter_next(1740d3f8cffea03c). (&iter, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, (gpointercxx . . $ gpointer# *) &data)) |
| 1372 | { |
| 1373 | if (data->statecxx . . $ _PointData#state. == GTK_EVENT_SEQUENCE_DENIEDcxx . . $ GTK_EVENT_SEQUENCE_DENIED.) |
| 1374 | continue; |
| 1375 | |
| 1376 | event_type = gdk_event_get_event_typecxx . . $ gdk_event_get_event_type(af0289f7121992bc). (data->eventcxx . . $ _PointData#event.); |
| 1377 | |
| 1378 | if (event_type == GDK_TOUCH_ENDcxx . . $ GDK_TOUCH_END. || |
| 1379 | event_type == GDK_BUTTON_RELEASEcxx . . $ GDK_BUTTON_RELEASE.) |
| 1380 | continue; |
| 1381 | |
| 1382 | n_points++; |
| 1383 | x1 = MINcxx . . $ `<external>/12741050725406041920/gmacros.h:978:9`! (x1, data->widget_x); |
| 1384 | y1 = MINcxx . . $ `<external>/12741050725406041920/gmacros.h:978:9`! (y1, data->widget_y); |
| 1385 | x2 = MAXcxx . . $ `<external>/12741050725406041920/gmacros.h:975:9`! (x2, data->widget_x); |
| 1386 | y2 = MAXcxx . . $ `<external>/12741050725406041920/gmacros.h:975:9`! (y2, data->widget_y); |
| 1387 | } |
| 1388 | |
| 1389 | if (n_points == 0) |
| 1390 | return FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!; |
| 1391 | |
| 1392 | rect->xcxx . . $ _cairo_rectangle_int#x. = x1; |
| 1393 | rect->ycxx . . $ _cairo_rectangle_int#y. = y1; |
| 1394 | rect->widthcxx . . $ _cairo_rectangle_int#width. = x2 - x1; |
| 1395 | rect->heightcxx . . $ _cairo_rectangle_int#height. = y2 - y1; |
| 1396 | |
| 1397 | return TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!; |
| 1398 | } |
| 1399 | |
| 1400 | |
| 1401 | /** |
| 1402 | * gtk_gesture_get_bounding_box_center: |
| 1403 | * @gesture: a `GtkGesture` |
| 1404 | * @x: (out): X coordinate for the bounding box center |
| 1405 | * @y: (out): Y coordinate for the bounding box center |
| 1406 | * |
| 1407 | * If there are touch sequences being currently handled by @gesture, |
| 1408 | * returns %TRUE and fills in @x and @y with the center of the bounding |
| 1409 | * box containing all active touches. |
| 1410 | * |
| 1411 | * Otherwise, %FALSE will be returned. |
| 1412 | * |
| 1413 | * Returns: %FALSE if no active touches are present, %TRUE otherwise |
| 1414 | */ |
| 1415 | gbooleancxx . . $ gboolean# |
| 1416 | gtk_gesture_get_bounding_box_centercxx . . $ gtk_gesture_get_bounding_box_center(cf171ba755eb2365). (GtkGesturecxx . . $ GtkGesture# *gesture, |
| 1417 | double *x, |
| 1418 | double *y) |
| 1419 | { |
| 1420 | GdkEventcxx . . $ GdkEvent# *last_event; |
| 1421 | GdkRectanglecxx . . $ GdkRectangle# rect; |
| 1422 | GdkEventSequencecxx . . $ GdkEventSequence# *sequence; |
| 1423 | |
| 1424 | g_return_val_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:665:9`! (GTK_IS_GESTUREcxx . . $ `gtk/gtkgesture.h:34:9`! (gesture), FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!); |
| 1425 | g_return_val_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:665:9`! (x != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`! && y != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!); |
| 1426 | |
| 1427 | sequence = gtk_gesture_get_last_updated_sequencecxx . . $ gtk_gesture_get_last_updated_sequence(9fe85c655f49cc0e). (gesture); |
| 1428 | last_event = gtk_gesture_get_last_eventcxx . . $ gtk_gesture_get_last_event(bb392b7a95f5154a). (gesture, sequence); |
| 1429 | |
| 1430 | if (EVENT_IS_TOUCHPAD_GESTUREcxx . . $ `gtk/gtkgesture.c:172:9`! (last_event)) |
| 1431 | return gtk_gesture_get_pointcxx . . $ gtk_gesture_get_point(c2c448b15d15778f). (gesture, sequence, x, y); |
| 1432 | else if (!gtk_gesture_get_bounding_boxcxx . . $ gtk_gesture_get_bounding_box(186023fc5a82d610). (gesture, &rect)) |
| 1433 | return FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!; |
| 1434 | |
| 1435 | *x = rect.xcxx . . $ _cairo_rectangle_int#x. + rect.widthcxx . . $ _cairo_rectangle_int#width. / 2; |
| 1436 | *y = rect.ycxx . . $ _cairo_rectangle_int#y. + rect.heightcxx . . $ _cairo_rectangle_int#height. / 2; |
| 1437 | return TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!; |
| 1438 | } |
| 1439 | |
| 1440 | /** |
| 1441 | * gtk_gesture_is_active: |
| 1442 | * @gesture: a `GtkGesture` |
| 1443 | * |
| 1444 | * Returns %TRUE if the gesture is currently active. |
| 1445 | * |
| 1446 | * A gesture is active while there are touch sequences |
| 1447 | * interacting with it. |
| 1448 | * |
| 1449 | * Returns: %TRUE if gesture is active |
| 1450 | */ |
| 1451 | gbooleancxx . . $ gboolean# |
| 1452 | gtk_gesture_is_activecxx . . $ gtk_gesture_is_active(7d3530d02874564). (GtkGesturecxx . . $ GtkGesture# *gesture) |
| 1453 | { |
| 1454 | g_return_val_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:665:9`! (GTK_IS_GESTUREcxx . . $ `gtk/gtkgesture.h:34:9`! (gesture), FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!); |
| 1455 | |
| 1456 | return _gtk_gesture_get_n_physical_pointscxx . . $ _gtk_gesture_get_n_physical_points(f26697a5dc036d5d). (gesture, TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!) != 0; |
| 1457 | } |
| 1458 | |
| 1459 | /** |
| 1460 | * gtk_gesture_is_recognized: |
| 1461 | * @gesture: a `GtkGesture` |
| 1462 | * |
| 1463 | * Returns %TRUE if the gesture is currently recognized. |
| 1464 | * |
| 1465 | * A gesture is recognized if there are as many interacting |
| 1466 | * touch sequences as required by @gesture. |
| 1467 | * |
| 1468 | * Returns: %TRUE if gesture is recognized |
| 1469 | */ |
| 1470 | gbooleancxx . . $ gboolean# |
| 1471 | gtk_gesture_is_recognizedcxx . . $ gtk_gesture_is_recognized(7d3530d02874564). (GtkGesturecxx . . $ GtkGesture# *gesture) |
| 1472 | { |
| 1473 | GtkGesturePrivatecxx . . $ GtkGesturePrivate# *priv; |
| 1474 | |
| 1475 | g_return_val_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:665:9`! (GTK_IS_GESTUREcxx . . $ `gtk/gtkgesture.h:34:9`! (gesture), FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!); |
| 1476 | |
| 1477 | priv = gtk_gesture_get_instance_privatecxx . . $ gtk_gesture_get_instance_private(b9559087c869032c). (gesture); |
| 1478 | |
| 1479 | return priv->recognizedcxx . . $ _GtkGesturePrivate#recognized.; |
| 1480 | } |
| 1481 | |
| 1482 | gbooleancxx . . $ gboolean# |
| 1483 | _gtk_gesture_checkcxx . . $ _gtk_gesture_check(7d3530d02874564). (GtkGesturecxx . . $ GtkGesture# *gesture) |
| 1484 | { |
| 1485 | GtkGesturePrivatecxx . . $ GtkGesturePrivate# *priv; |
| 1486 | |
| 1487 | g_return_val_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:665:9`! (GTK_IS_GESTUREcxx . . $ `gtk/gtkgesture.h:34:9`! (gesture), FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!); |
| 1488 | |
| 1489 | priv = gtk_gesture_get_instance_privatecxx . . $ gtk_gesture_get_instance_private(b9559087c869032c). (gesture); |
| 1490 | |
| 1491 | return _gtk_gesture_check_recognizedcxx . . $ _gtk_gesture_check_recognized(6aa08b709753b55f). (gesture, priv->last_sequencecxx . . $ _GtkGesturePrivate#last_sequence.); |
| 1492 | } |
| 1493 | |
| 1494 | /** |
| 1495 | * gtk_gesture_handles_sequence: |
| 1496 | * @gesture: a `GtkGesture` |
| 1497 | * @sequence: (nullable): a `GdkEventSequence` |
| 1498 | * |
| 1499 | * Returns %TRUE if @gesture is currently handling events |
| 1500 | * corresponding to @sequence. |
| 1501 | * |
| 1502 | * Returns: %TRUE if @gesture is handling @sequence, %FALSE otherwise |
| 1503 | */ |
| 1504 | gbooleancxx . . $ gboolean# |
| 1505 | gtk_gesture_handles_sequencecxx . . $ gtk_gesture_handles_sequence(6aa08b709753b55f). (GtkGesturecxx . . $ GtkGesture# *gesture, |
| 1506 | GdkEventSequencecxx . . $ GdkEventSequence# *sequence) |
| 1507 | { |
| 1508 | GtkGesturePrivatecxx . . $ GtkGesturePrivate# *priv; |
| 1509 | PointDatacxx . . $ PointData# *data; |
| 1510 | |
| 1511 | g_return_val_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:665:9`! (GTK_IS_GESTUREcxx . . $ `gtk/gtkgesture.h:34:9`! (gesture), FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!); |
| 1512 | |
| 1513 | priv = gtk_gesture_get_instance_privatecxx . . $ gtk_gesture_get_instance_private(b9559087c869032c). (gesture); |
| 1514 | data = g_hash_table_lookupcxx . . $ g_hash_table_lookup(8183d62c39a6a245). (priv->pointscxx . . $ _GtkGesturePrivate#points., sequence); |
| 1515 | |
| 1516 | if (!data) |
| 1517 | return FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!; |
| 1518 | |
| 1519 | if (data->statecxx . . $ _PointData#state. == GTK_EVENT_SEQUENCE_DENIEDcxx . . $ GTK_EVENT_SEQUENCE_DENIED.) |
| 1520 | return FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!; |
| 1521 | |
| 1522 | return TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!; |
| 1523 | } |
| 1524 | |
| 1525 | gbooleancxx . . $ gboolean# |
| 1526 | _gtk_gesture_cancel_sequencecxx . . $ _gtk_gesture_cancel_sequence(6aa08b709753b55f). (GtkGesturecxx . . $ GtkGesture# *gesture, |
| 1527 | GdkEventSequencecxx . . $ GdkEventSequence# *sequence) |
| 1528 | { |
| 1529 | GtkGesturePrivatecxx . . $ GtkGesturePrivate# *priv; |
| 1530 | PointDatacxx . . $ PointData# *data; |
| 1531 | |
| 1532 | g_return_val_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:665:9`! (GTK_IS_GESTUREcxx . . $ `gtk/gtkgesture.h:34:9`! (gesture), FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!); |
| 1533 | |
| 1534 | priv = gtk_gesture_get_instance_privatecxx . . $ gtk_gesture_get_instance_private(b9559087c869032c). (gesture); |
| 1535 | data = g_hash_table_lookupcxx . . $ g_hash_table_lookup(8183d62c39a6a245). (priv->pointscxx . . $ _GtkGesturePrivate#points., sequence); |
| 1536 | |
| 1537 | if (!data) |
| 1538 | return FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!; |
| 1539 | |
| 1540 | g_signal_emitcxx . . $ g_signal_emit(cc3f7c2ba1c6a182). (gesture, signalscxx . . $ signals.[CANCELcxx . . $ CANCEL.], 0, sequence); |
| 1541 | _gtk_gesture_remove_pointcxx . . $ _gtk_gesture_remove_point(475ba5779a56ba21). (gesture, data->eventcxx . . $ _PointData#event.); |
| 1542 | _gtk_gesture_check_recognizedcxx . . $ _gtk_gesture_check_recognized(6aa08b709753b55f). (gesture, sequence); |
| 1543 | |
| 1544 | return TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!; |
| 1545 | } |
| 1546 | |
| 1547 | GListcxx . . $ GList# * |
| 1548 | _gtk_gesture_get_group_linkcxx . . $ _gtk_gesture_get_group_link(65a30909e0dbc2f3). (GtkGesturecxx . . $ GtkGesture# *gesture) |
| 1549 | { |
| 1550 | GtkGesturePrivatecxx . . $ GtkGesturePrivate# *priv; |
| 1551 | |
| 1552 | priv = gtk_gesture_get_instance_privatecxx . . $ gtk_gesture_get_instance_private(b9559087c869032c). (gesture); |
| 1553 | |
| 1554 | return priv->group_linkcxx . . $ _GtkGesturePrivate#group_link.; |
| 1555 | } |
| 1556 | |
| 1557 | /** |
| 1558 | * gtk_gesture_group: |
| 1559 | * @gesture: a `GtkGesture` |
| 1560 | * @group_gesture: `GtkGesture` to group @gesture with |
| 1561 | * |
| 1562 | * Adds @gesture to the same group than @group_gesture. |
| 1563 | * |
| 1564 | * Gestures are by default isolated in their own groups. |
| 1565 | * |
| 1566 | * Both gestures must have been added to the same widget before |
| 1567 | * they can be grouped. |
| 1568 | * |
| 1569 | * When gestures are grouped, the state of `GdkEventSequences` |
| 1570 | * is kept in sync for all of those, so calling |
| 1571 | * [[email protected]_sequence_state], on one will transfer |
| 1572 | * the same value to the others. |
| 1573 | * |
| 1574 | * Groups also perform an "implicit grabbing" of sequences, if a |
| 1575 | * `GdkEventSequence` state is set to %GTK_EVENT_SEQUENCE_CLAIMED |
| 1576 | * on one group, every other gesture group attached to the same |
| 1577 | * `GtkWidget` will switch the state for that sequence to |
| 1578 | * %GTK_EVENT_SEQUENCE_DENIED. |
| 1579 | */ |
| 1580 | void |
| 1581 | gtk_gesture_groupcxx . . $ gtk_gesture_group(d69f46075ac73c06). (GtkGesturecxx . . $ GtkGesture# *gesture, |
| 1582 | GtkGesturecxx . . $ GtkGesture# *group_gesture) |
| 1583 | { |
| 1584 | GListcxx . . $ GList# *link, *group_link, *next; |
| 1585 | |
| 1586 | g_return_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:652:9`! (GTK_IS_GESTUREcxx . . $ `gtk/gtkgesture.h:34:9`! (gesture)); |
| 1587 | g_return_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:652:9`! (GTK_IS_GESTUREcxx . . $ `gtk/gtkgesture.h:34:9`! (group_gesture)); |
| 1588 | g_return_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:652:9`! (gtk_event_controller_get_widget (GTK_EVENT_CONTROLLERcxx . . $ `gtk/gtkeventcontroller.h:35:9`! (group_gesture)) == |
| 1589 | gtk_event_controller_get_widget (GTK_EVENT_CONTROLLERcxx . . $ `gtk/gtkeventcontroller.h:35:9`! (gesture))); |
| 1590 | |
| 1591 | link = _gtk_gesture_get_group_linkcxx . . $ _gtk_gesture_get_group_link(65a30909e0dbc2f3). (gesture); |
| 1592 | |
| 1593 | if (link->prevcxx . . $ _GList#prev. || link->nextcxx . . $ _GList#next.) |
| 1594 | { |
| 1595 | if (gtk_gesture_is_grouped_withcxx . . $ gtk_gesture_is_grouped_with(fd96d32a8bfd3b37). (gesture, group_gesture)) |
| 1596 | return; |
| 1597 | gtk_gesture_ungroupcxx . . $ gtk_gesture_ungroup(fa1efe69d66df200). (gesture); |
| 1598 | } |
| 1599 | |
| 1600 | group_link = _gtk_gesture_get_group_linkcxx . . $ _gtk_gesture_get_group_link(65a30909e0dbc2f3). (group_gesture); |
| 1601 | next = group_link->nextcxx . . $ _GList#next.; |
| 1602 | |
| 1603 | /* Rewire link so it's inserted after the group_gesture elem */ |
| 1604 | link->prevcxx . . $ _GList#prev. = group_link; |
| 1605 | link->nextcxx . . $ _GList#next. = next; |
| 1606 | group_link->nextcxx . . $ _GList#next. = link; |
| 1607 | if (next) |
| 1608 | next->prevcxx . . $ _GList#prev. = link; |
| 1609 | } |
| 1610 | |
| 1611 | /** |
| 1612 | * gtk_gesture_ungroup: |
| 1613 | * @gesture: a `GtkGesture` |
| 1614 | * |
| 1615 | * Separates @gesture into an isolated group. |
| 1616 | */ |
| 1617 | void |
| 1618 | gtk_gesture_ungroupcxx . . $ gtk_gesture_ungroup(fa1efe69d66df200). (GtkGesturecxx . . $ GtkGesture# *gesture) |
| 1619 | { |
| 1620 | GListcxx . . $ GList# *link, *prev, *next; |
| 1621 | |
| 1622 | g_return_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:652:9`! (GTK_IS_GESTUREcxx . . $ `gtk/gtkgesture.h:34:9`! (gesture)); |
| 1623 | |
| 1624 | link = _gtk_gesture_get_group_linkcxx . . $ _gtk_gesture_get_group_link(65a30909e0dbc2f3). (gesture); |
| 1625 | prev = link->prevcxx . . $ _GList#prev.; |
| 1626 | next = link->nextcxx . . $ _GList#next.; |
| 1627 | |
| 1628 | /* Detach link from the group chain */ |
| 1629 | if (prev) |
| 1630 | prev->nextcxx . . $ _GList#next. = next; |
| 1631 | if (next) |
| 1632 | next->prevcxx . . $ _GList#prev. = prev; |
| 1633 | |
| 1634 | link->nextcxx . . $ _GList#next. = link->prevcxx . . $ _GList#prev. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 1635 | } |
| 1636 | |
| 1637 | /** |
| 1638 | * gtk_gesture_get_group: |
| 1639 | * @gesture: a `GtkGesture` |
| 1640 | * |
| 1641 | * Returns all gestures in the group of @gesture |
| 1642 | * |
| 1643 | * Returns: (element-type GtkGesture) (transfer container): The list |
| 1644 | * of `GtkGesture`s, free with g_list_free() |
| 1645 | */ |
| 1646 | GListcxx . . $ GList# * |
| 1647 | gtk_gesture_get_groupcxx . . $ gtk_gesture_get_group(65a30909e0dbc2f3). (GtkGesturecxx . . $ GtkGesture# *gesture) |
| 1648 | { |
| 1649 | GListcxx . . $ GList# *link; |
| 1650 | |
| 1651 | g_return_val_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:665:9`! (GTK_IS_GESTUREcxx . . $ `gtk/gtkgesture.h:34:9`! (gesture), NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 1652 | |
| 1653 | link = _gtk_gesture_get_group_linkcxx . . $ _gtk_gesture_get_group_link(65a30909e0dbc2f3). (gesture); |
| 1654 | |
| 1655 | return g_list_copycxx . . $ g_list_copy(e31b64636014b719). (g_list_firstcxx . . $ g_list_first(e31b64636014b719). (link)); |
| 1656 | } |
| 1657 | |
| 1658 | /** |
| 1659 | * gtk_gesture_is_grouped_with: |
| 1660 | * @gesture: a `GtkGesture` |
| 1661 | * @other: another `GtkGesture` |
| 1662 | * |
| 1663 | * Returns %TRUE if both gestures pertain to the same group. |
| 1664 | * |
| 1665 | * Returns: whether the gestures are grouped |
| 1666 | */ |
| 1667 | gbooleancxx . . $ gboolean# |
| 1668 | gtk_gesture_is_grouped_withcxx . . $ gtk_gesture_is_grouped_with(fd96d32a8bfd3b37). (GtkGesturecxx . . $ GtkGesture# *gesture, |
| 1669 | GtkGesturecxx . . $ GtkGesture# *other) |
| 1670 | { |
| 1671 | GListcxx . . $ GList# *link; |
| 1672 | |
| 1673 | g_return_val_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:665:9`! (GTK_IS_GESTUREcxx . . $ `gtk/gtkgesture.h:34:9`! (gesture), FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!); |
| 1674 | g_return_val_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:665:9`! (GTK_IS_GESTUREcxx . . $ `gtk/gtkgesture.h:34:9`! (other), FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!); |
| 1675 | |
| 1676 | link = _gtk_gesture_get_group_linkcxx . . $ _gtk_gesture_get_group_link(65a30909e0dbc2f3). (gesture); |
| 1677 | link = g_list_firstcxx . . $ g_list_first(e31b64636014b719). (link); |
| 1678 | |
| 1679 | return g_list_findcxx . . $ g_list_find(29d4c135b9e7c78b). (link, other) != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 1680 | } |
| 1681 | |
| 1682 | gbooleancxx . . $ gboolean# |
| 1683 | _gtk_gesture_handled_sequence_presscxx . . $ _gtk_gesture_handled_sequence_press(6aa08b709753b55f). (GtkGesturecxx . . $ GtkGesture# *gesture, |
| 1684 | GdkEventSequencecxx . . $ GdkEventSequence# *sequence) |
| 1685 | { |
| 1686 | GtkGesturePrivatecxx . . $ GtkGesturePrivate# *priv; |
| 1687 | PointDatacxx . . $ PointData# *data; |
| 1688 | |
| 1689 | g_return_val_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:665:9`! (GTK_IS_GESTUREcxx . . $ `gtk/gtkgesture.h:34:9`! (gesture), FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!); |
| 1690 | |
| 1691 | priv = gtk_gesture_get_instance_privatecxx . . $ gtk_gesture_get_instance_private(b9559087c869032c). (gesture); |
| 1692 | data = g_hash_table_lookupcxx . . $ g_hash_table_lookup(8183d62c39a6a245). (priv->pointscxx . . $ _GtkGesturePrivate#points., sequence); |
| 1693 | |
| 1694 | if (!data) |
| 1695 | return FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!; |
| 1696 | |
| 1697 | return data->press_handledcxx . . $ _PointData#press_handled.; |
| 1698 | } |
| 1699 | |
| 1700 | gbooleancxx . . $ gboolean# |
| 1701 | _gtk_gesture_get_pointer_emulating_sequencecxx . . $ _gtk_gesture_get_pointer_emulating_sequence(9085f52dffd1dc00). (GtkGesturecxx . . $ GtkGesture# *gesture, |
| 1702 | GdkEventSequencecxx . . $ GdkEventSequence# **sequence) |
| 1703 | { |
| 1704 | GtkGesturePrivatecxx . . $ GtkGesturePrivate# *priv; |
| 1705 | GdkEventSequencecxx . . $ GdkEventSequence# *seq; |
| 1706 | GHashTableItercxx . . $ GHashTableIter# iter; |
| 1707 | PointDatacxx . . $ PointData# *data; |
| 1708 | |
| 1709 | g_return_val_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:665:9`! (GTK_IS_GESTUREcxx . . $ `gtk/gtkgesture.h:34:9`! (gesture), FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!); |
| 1710 | |
| 1711 | priv = gtk_gesture_get_instance_privatecxx . . $ gtk_gesture_get_instance_private(b9559087c869032c). (gesture); |
| 1712 | g_hash_table_iter_initcxx . . $ g_hash_table_iter_init(1fd6bbae530c3b4). (&iter, priv->pointscxx . . $ _GtkGesturePrivate#points.); |
| 1713 | |
| 1714 | while (g_hash_table_iter_nextcxx . . $ g_hash_table_iter_next(1740d3f8cffea03c). (&iter, (gpointercxx . . $ gpointer#*) &seq, (gpointercxx . . $ gpointer#*) &data)) |
| 1715 | { |
| 1716 | switch ((guintcxx . . $ guint#) gdk_event_get_event_typecxx . . $ gdk_event_get_event_type(af0289f7121992bc). (data->eventcxx . . $ _PointData#event.)) |
| 1717 | { |
| 1718 | case GDK_TOUCH_BEGINcxx . . $ GDK_TOUCH_BEGIN.: |
| 1719 | case GDK_TOUCH_UPDATEcxx . . $ GDK_TOUCH_UPDATE.: |
| 1720 | case GDK_TOUCH_ENDcxx . . $ GDK_TOUCH_END.: |
| 1721 | if (!gdk_touch_event_get_emulating_pointercxx . . $ gdk_touch_event_get_emulating_pointer(c727dcafa855acc7). (data->eventcxx . . $ _PointData#event.)) |
| 1722 | continue; |
| 1723 | G_GNUC_FALLTHROUGHcxx . . $ `<external>/12741050725406041920/gmacros.h:689:9`!; |
| 1724 | case GDK_BUTTON_PRESScxx . . $ GDK_BUTTON_PRESS.: |
| 1725 | case GDK_BUTTON_RELEASEcxx . . $ GDK_BUTTON_RELEASE.: |
| 1726 | case GDK_MOTION_NOTIFYcxx . . $ GDK_MOTION_NOTIFY.: |
| 1727 | *sequence = seq; |
| 1728 | return TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!; |
| 1729 | default: |
| 1730 | break; |
| 1731 | } |
| 1732 | } |
| 1733 | |
| 1734 | return FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!; |
| 1735 | } |