v0.2.1 c0399be

gtkgesture.go RawHistoryFolder

1// Package gtk was automatically generated by github.com/bnema/puregotk DO NOT EDIT
2package gtk
3
4import (
5	"structs"
6	"unsafe"
7
8	"github.com/ebitengine/purego"
9
10	"github.com/bnema/puregotk/pkg/core"
11	"github.com/bnema/puregotk/v4/gdk"
12	"github.com/bnema/puregotk/v4/glib"
13	"github.com/bnema/puregotk/v4/gobject"
14	"github.com/bnema/puregotk/v4/gobject/types"
15)
16
17type GestureClass struct {
18	_ structs.HostLayout
19}
20
21func (x *GestureClass) GoPointer() uintptr {
22	return uintptr(unsafe.Pointer(x))
23}
24
25// The base class for gesture recognition.
26//
27// Although `GtkGesture` is quite generalized to serve as a base for
28// multi-touch gestures, it is suitable to implement single-touch and
29// pointer-based gestures (using the special %NULL `GdkEventSequence`
30// value for these).
31//
32// The number of touches that a `GtkGesture` need to be recognized is
33// controlled by the [property@Gtk.Gesture:n-points] property, if a
34// gesture is keeping track of less or more than that number of sequences,
35// it won't check whether the gesture is recognized.
36//
37// As soon as the gesture has the expected number of touches, it will check
38// regularly if it is recognized, the criteria to consider a gesture as
39// "recognized" is left to `GtkGesture` subclasses.
40//
41// A recognized gesture will then emit the following signals:
42//
43// - [signal@Gtk.Gesture::begin] when the gesture is recognized.
44// - [signal@Gtk.Gesture::update], whenever an input event is processed.
45// - [signal@Gtk.Gesture::end] when the gesture is no longer recognized.
46//
47// ## Event propagation
48//
49// In order to receive events, a gesture needs to set a propagation phase
50// through [method@Gtk.EventController.set_propagation_phase].
51//
52// In the capture phase, events are propagated from the toplevel down
53// to the target widget, and gestures that are attached to containers
54// above the widget get a chance to interact with the event before it
55// reaches the target.
56//
57// In the bubble phase, events are propagated up from the target widget
58// to the toplevel, and gestures that are attached to containers above
59// the widget get a chance to interact with events that have not been
60// handled yet.
61//
62// ## States of a sequence
63//
64// Whenever input interaction happens, a single event may trigger a cascade
65// of `GtkGesture`s, both across the parents of the widget receiving the
66// event and in parallel within an individual widget. It is a responsibility
67// of the widgets using those gestures to set the state of touch sequences
68// accordingly in order to enable cooperation of gestures around the
69// `GdkEventSequence`s triggering those.
70//
71// Within a widget, gestures can be grouped through [method@Gtk.Gesture.group].
72// Grouped gestures synchronize the state of sequences, so calling
73// [method@Gtk.Gesture.set_state] on one will effectively propagate
74// the state throughout the group.
75//
76// By default, all sequences start out in the %GTK_EVENT_SEQUENCE_NONE state,
77// sequences in this state trigger the gesture event handler, but event
78// propagation will continue unstopped by gestures.
79//
80// If a sequence enters into the %GTK_EVENT_SEQUENCE_DENIED state, the gesture
81// group will effectively ignore the sequence, letting events go unstopped
82// through the gesture, but the "slot" will still remain occupied while
83// the touch is active.
84//
85// If a sequence enters in the %GTK_EVENT_SEQUENCE_CLAIMED state, the gesture
86// group will grab all interaction on the sequence, by:
87//
88//   - Setting the same sequence to %GTK_EVENT_SEQUENCE_DENIED on every other
89//     gesture group within the widget, and every gesture on parent widgets
90//     in the propagation chain.
91//   - Emitting [signal@Gtk.Gesture::cancel] on every gesture in widgets
92//     underneath in the propagation chain.
93//   - Stopping event propagation after the gesture group handles the event.
94//
95// Note: if a sequence is set early to %GTK_EVENT_SEQUENCE_CLAIMED on
96// %GDK_TOUCH_BEGIN/%GDK_BUTTON_PRESS (so those events are captured before
97// reaching the event widget, this implies %GTK_PHASE_CAPTURE), one similar
98// event will be emulated if the sequence changes to %GTK_EVENT_SEQUENCE_DENIED.
99// This way event coherence is preserved before event propagation is unstopped
100// again.
101//
102// Sequence states can't be changed freely.
103// See [method@Gtk.Gesture.set_state] to know about the possible
104// lifetimes of a `GdkEventSequence`.
105//
106// ## Touchpad gestures
107//
108// On the platforms that support it, `GtkGesture` will handle transparently
109// touchpad gesture events. The only precautions users of `GtkGesture` should
110// do to enable this support are:
111//
112//   - If the gesture has %GTK_PHASE_NONE, ensuring events of type
113//     %GDK_TOUCHPAD_SWIPE and %GDK_TOUCHPAD_PINCH are handled by the `GtkGesture`
114type Gesture struct {
115	EventController
116}
117
118var xGestureGLibType func() types.GType
119
120func GestureGLibType() types.GType {
121	return xGestureGLibType()
122}
123
124func GestureNewFromInternalPtr(ptr uintptr) *Gesture {
125	cls := &Gesture{}
126	cls.Ptr = ptr
127	return cls
128}
129
130var xGestureGetBoundingBox func(uintptr, *gdk.Rectangle) bool
131
132// If there are touch sequences being currently handled by @gesture,
133// returns %TRUE and fills in @rect with the bounding box containing
134// all active touches.
135//
136// Otherwise, %FALSE will be returned.
137//
138// Note: This function will yield unexpected results on touchpad
139// gestures. Since there is no correlation between physical and
140// pixel distances, these will look as if constrained in an
141// infinitely small area, @rect width and height will thus be 0
142// regardless of the number of touchpoints.
143func (x *Gesture) GetBoundingBox(RectVar *gdk.Rectangle) bool {
144
145	cret := xGestureGetBoundingBox(x.GoPointer(), RectVar)
146	return cret
147}
148
149var xGestureGetBoundingBoxCenter func(uintptr, *float64, *float64) bool
150
151// If there are touch sequences being currently handled by @gesture,
152// returns %TRUE and fills in @x and @y with the center of the bounding
153// box containing all active touches.
154//
155// Otherwise, %FALSE will be returned.
156func (x *Gesture) GetBoundingBoxCenter(XVar *float64, YVar *float64) bool {
157
158	cret := xGestureGetBoundingBoxCenter(x.GoPointer(), XVar, YVar)
159	return cret
160}
161
162var xGestureGetDevice func(uintptr) uintptr
163
164// Returns the logical `GdkDevice` that is currently operating
165// on @gesture.
166//
167// This returns %NULL if the gesture is not being interacted.
168func (x *Gesture) GetDevice() *gdk.Device {
169	var cls *gdk.Device
170
171	cret := xGestureGetDevice(x.GoPointer())
172
173	if cret == 0 {
174		return nil
175	}
176	gobject.IncreaseRef(cret)
177	cls = &gdk.Device{}
178	cls.Ptr = cret
179	return cls
180}
181
182var xGestureGetGroup func(uintptr) *glib.List
183
184// Returns all gestures in the group of @gesture
185func (x *Gesture) GetGroup() *glib.List {
186
187	cret := xGestureGetGroup(x.GoPointer())
188	return cret
189}
190
191var xGestureGetLastEvent func(uintptr, *gdk.EventSequence) uintptr
192
193// Returns the last event that was processed for @sequence.
194//
195// Note that the returned pointer is only valid as long as the
196// @sequence is still interpreted by the @gesture. If in doubt,
197// you should make a copy of the event.
198func (x *Gesture) GetLastEvent(SequenceVar *gdk.EventSequence) *gdk.Event {
199	var cls *gdk.Event
200
201	cret := xGestureGetLastEvent(x.GoPointer(), SequenceVar)
202
203	if cret == 0 {
204		return nil
205	}
206	gobject.IncreaseRef(cret)
207	cls = &gdk.Event{}
208	cls.Ptr = cret
209	return cls
210}
211
212var xGestureGetLastUpdatedSequence func(uintptr) *gdk.EventSequence
213
214// Returns the `GdkEventSequence` that was last updated on @gesture.
215func (x *Gesture) GetLastUpdatedSequence() *gdk.EventSequence {
216
217	cret := xGestureGetLastUpdatedSequence(x.GoPointer())
218	return cret
219}
220
221var xGestureGetPoint func(uintptr, *gdk.EventSequence, *float64, *float64) bool
222
223// If @sequence is currently being interpreted by @gesture,
224// returns %TRUE and fills in @x and @y with the last coordinates
225// stored for that event sequence.
226//
227// The coordinates are always relative to the widget allocation.
228func (x *Gesture) GetPoint(SequenceVar *gdk.EventSequence, XVar *float64, YVar *float64) bool {
229
230	cret := xGestureGetPoint(x.GoPointer(), SequenceVar, XVar, YVar)
231	return cret
232}
233
234var xGestureGetSequenceState func(uintptr, *gdk.EventSequence) EventSequenceState
235
236// Returns the @sequence state, as seen by @gesture.
237func (x *Gesture) GetSequenceState(SequenceVar *gdk.EventSequence) EventSequenceState {
238
239	cret := xGestureGetSequenceState(x.GoPointer(), SequenceVar)
240	return cret
241}
242
243var xGestureGetSequences func(uintptr) *glib.List
244
245// Returns the list of `GdkEventSequences` currently being interpreted
246// by @gesture.
247func (x *Gesture) GetSequences() *glib.List {
248
249	cret := xGestureGetSequences(x.GoPointer())
250	return cret
251}
252
253var xGestureGroup func(uintptr, uintptr)
254
255// Adds @gesture to the same group than @group_gesture.
256//
257// Gestures are by default isolated in their own groups.
258//
259// Both gestures must have been added to the same widget before
260// they can be grouped.
261//
262// When gestures are grouped, the state of `GdkEventSequences`
263// is kept in sync for all of those, so calling
264// [method@Gtk.Gesture.set_sequence_state], on one will transfer
265// the same value to the others.
266//
267// Groups also perform an "implicit grabbing" of sequences, if a
268// `GdkEventSequence` state is set to %GTK_EVENT_SEQUENCE_CLAIMED
269// on one group, every other gesture group attached to the same
270// `GtkWidget` will switch the state for that sequence to
271// %GTK_EVENT_SEQUENCE_DENIED.
272func (x *Gesture) Group(GestureVar *Gesture) {
273
274	xGestureGroup(x.GoPointer(), GestureVar.GoPointer())
275
276}
277
278var xGestureHandlesSequence func(uintptr, *gdk.EventSequence) bool
279
280// Returns %TRUE if @gesture is currently handling events
281// corresponding to @sequence.
282func (x *Gesture) HandlesSequence(SequenceVar *gdk.EventSequence) bool {
283
284	cret := xGestureHandlesSequence(x.GoPointer(), SequenceVar)
285	return cret
286}
287
288var xGestureIsActive func(uintptr) bool
289
290// Returns %TRUE if the gesture is currently active.
291//
292// A gesture is active while there are touch sequences
293// interacting with it.
294func (x *Gesture) IsActive() bool {
295
296	cret := xGestureIsActive(x.GoPointer())
297	return cret
298}
299
300var xGestureIsGroupedWith func(uintptr, uintptr) bool
301
302// Returns %TRUE if both gestures pertain to the same group.
303func (x *Gesture) IsGroupedWith(OtherVar *Gesture) bool {
304
305	cret := xGestureIsGroupedWith(x.GoPointer(), OtherVar.GoPointer())
306	return cret
307}
308
309var xGestureIsRecognized func(uintptr) bool
310
311// Returns %TRUE if the gesture is currently recognized.
312//
313// A gesture is recognized if there are as many interacting
314// touch sequences as required by @gesture.
315func (x *Gesture) IsRecognized() bool {
316
317	cret := xGestureIsRecognized(x.GoPointer())
318	return cret
319}
320
321var xGestureSetSequenceState func(uintptr, *gdk.EventSequence, EventSequenceState) bool
322
323// Sets the state of @sequence in @gesture.
324//
325// Sequences start in state %GTK_EVENT_SEQUENCE_NONE, and whenever
326// they change state, they can never go back to that state. Likewise,
327// sequences in state %GTK_EVENT_SEQUENCE_DENIED cannot turn back to
328// a not denied state. With these rules, the lifetime of an event
329// sequence is constrained to the next four:
330//
331// * None
332// * None → Denied
333// * None → Claimed
334// * None → Claimed → Denied
335//
336// Note: Due to event handling ordering, it may be unsafe to set the
337// state on another gesture within a [signal@Gtk.Gesture::begin] signal
338// handler, as the callback might be executed before the other gesture
339// knows about the sequence. A safe way to perform this could be:
340//
341// ```c
342// static void
343// first_gesture_begin_cb (GtkGesture       *first_gesture,
344//
345//	GdkEventSequence *sequence,
346//	gpointer          user_data)
347//
348//	{
349//	  gtk_gesture_set_sequence_state (first_gesture, sequence, GTK_EVENT_SEQUENCE_CLAIMED);
350//	  gtk_gesture_set_sequence_state (second_gesture, sequence, GTK_EVENT_SEQUENCE_DENIED);
351//	}
352//
353// static void
354// second_gesture_begin_cb (GtkGesture       *second_gesture,
355//
356//	GdkEventSequence *sequence,
357//	gpointer          user_data)
358//
359//	{
360//	  if (gtk_gesture_get_sequence_state (first_gesture, sequence) == GTK_EVENT_SEQUENCE_CLAIMED)
361//	    gtk_gesture_set_sequence_state (second_gesture, sequence, GTK_EVENT_SEQUENCE_DENIED);
362//	}
363//
364// ```
365//
366// If both gestures are in the same group, just set the state on
367// the gesture emitting the event, the sequence will be already
368// be initialized to the group's global state when the second
369// gesture processes the event.
370func (x *Gesture) SetSequenceState(SequenceVar *gdk.EventSequence, StateVar EventSequenceState) bool {
371
372	cret := xGestureSetSequenceState(x.GoPointer(), SequenceVar, StateVar)
373	return cret
374}
375
376var xGestureSetState func(uintptr, EventSequenceState) bool
377
378// Sets the state of all sequences that @gesture is currently
379// interacting with.
380//
381// Sequences start in state %GTK_EVENT_SEQUENCE_NONE, and whenever
382// they change state, they can never go back to that state. Likewise,
383// sequences in state %GTK_EVENT_SEQUENCE_DENIED cannot turn back to
384// a not denied state. With these rules, the lifetime of an event
385// sequence is constrained to the next four:
386//
387// * None
388// * None → Denied
389// * None → Claimed
390// * None → Claimed → Denied
391//
392// Note: Due to event handling ordering, it may be unsafe to set the
393// state on another gesture within a [signal@Gtk.Gesture::begin] signal
394// handler, as the callback might be executed before the other gesture
395// knows about the sequence. A safe way to perform this could be:
396//
397// ```c
398// static void
399// first_gesture_begin_cb (GtkGesture       *first_gesture,
400//
401//	GdkEventSequence *sequence,
402//	gpointer          user_data)
403//
404//	{
405//	  gtk_gesture_set_state (first_gesture, GTK_EVENT_SEQUENCE_CLAIMED);
406//	  gtk_gesture_set_state (second_gesture, GTK_EVENT_SEQUENCE_DENIED);
407//	}
408//
409// static void
410// second_gesture_begin_cb (GtkGesture       *second_gesture,
411//
412//	GdkEventSequence *sequence,
413//	gpointer          user_data)
414//
415//	{
416//	  if (gtk_gesture_get_sequence_state (first_gesture, sequence) == GTK_EVENT_SEQUENCE_CLAIMED)
417//	    gtk_gesture_set_state (second_gesture, GTK_EVENT_SEQUENCE_DENIED);
418//	}
419//
420// ```
421//
422// If both gestures are in the same group, just set the state on
423// the gesture emitting the event, the sequence will be already
424// be initialized to the group's global state when the second
425// gesture processes the event.
426func (x *Gesture) SetState(StateVar EventSequenceState) bool {
427
428	cret := xGestureSetState(x.GoPointer(), StateVar)
429	return cret
430}
431
432var xGestureUngroup func(uintptr)
433
434// Separates @gesture into an isolated group.
435func (x *Gesture) Ungroup() {
436
437	xGestureUngroup(x.GoPointer())
438
439}
440
441func (c *Gesture) GoPointer() uintptr {
442	if c == nil {
443		return 0
444	}
445	return c.Ptr
446}
447
448func (c *Gesture) SetGoPointer(ptr uintptr) {
449	c.Ptr = ptr
450}
451
452// SetPropertyNPoints sets the "n-points" property.
453// The number of touch points that trigger
454// recognition on this gesture.
455func (x *Gesture) SetPropertyNPoints(value uint) {
456	var v gobject.Value
457	v.Init(gobject.TypeUintVal)
458	v.SetUint(value)
459	x.SetProperty("n-points", &v)
460}
461
462// GetPropertyNPoints gets the "n-points" property.
463// The number of touch points that trigger
464// recognition on this gesture.
465func (x *Gesture) GetPropertyNPoints() uint {
466	var v gobject.Value
467	x.GetProperty("n-points", &v)
468	return v.GetUint()
469}
470
471// Emitted when the gesture is recognized.
472//
473// This means the number of touch sequences matches
474// [property@Gtk.Gesture:n-points].
475//
476// Note: These conditions may also happen when an extra touch
477// (eg. a third touch on a 2-touches gesture) is lifted, in that
478// situation @sequence won't pertain to the current set of active
479// touches, so don't rely on this being true.
480func (x *Gesture) ConnectBegin(cb *func(Gesture, uintptr)) uint {
481	cbPtr := uintptr(unsafe.Pointer(cb))
482	if cbRefPtr, ok := glib.GetCallback(cbPtr); ok {
483		handlerID := gobject.SignalConnect(x.GoPointer(), "begin", cbRefPtr)
484		glib.SaveHandlerMapping(handlerID, cbPtr)
485		return handlerID
486	}
487
488	fcb := func(clsPtr uintptr, SequenceVarp uintptr) {
489		fa := Gesture{}
490		fa.Ptr = clsPtr
491		cbFn := *cb
492
493		cbFn(fa, SequenceVarp)
494
495	}
496	cbRefPtr := purego.NewCallback(fcb)
497	glib.SaveCallbackWithClosure(cbPtr, cbRefPtr, cb)
498	handlerID := gobject.SignalConnect(x.GoPointer(), "begin", cbRefPtr)
499	glib.SaveHandlerMapping(handlerID, cbPtr)
500	return handlerID
501}
502
503// Emitted whenever a sequence is cancelled.
504//
505// This usually happens on active touches when
506// [method@Gtk.EventController.reset] is called on @gesture
507// (manually, due to grabs...), or the individual @sequence
508// was claimed by parent widgets' controllers (see
509// [method@Gtk.Gesture.set_sequence_state]).
510//
511// @gesture must forget everything about @sequence as in
512// response to this signal.
513func (x *Gesture) ConnectCancel(cb *func(Gesture, uintptr)) uint {
514	cbPtr := uintptr(unsafe.Pointer(cb))
515	if cbRefPtr, ok := glib.GetCallback(cbPtr); ok {
516		handlerID := gobject.SignalConnect(x.GoPointer(), "cancel", cbRefPtr)
517		glib.SaveHandlerMapping(handlerID, cbPtr)
518		return handlerID
519	}
520
521	fcb := func(clsPtr uintptr, SequenceVarp uintptr) {
522		fa := Gesture{}
523		fa.Ptr = clsPtr
524		cbFn := *cb
525
526		cbFn(fa, SequenceVarp)
527
528	}
529	cbRefPtr := purego.NewCallback(fcb)
530	glib.SaveCallbackWithClosure(cbPtr, cbRefPtr, cb)
531	handlerID := gobject.SignalConnect(x.GoPointer(), "cancel", cbRefPtr)
532	glib.SaveHandlerMapping(handlerID, cbPtr)
533	return handlerID
534}
535
536// Emitted when @gesture either stopped recognizing the event
537// sequences as something to be handled, or the number of touch
538// sequences became higher or lower than [property@Gtk.Gesture:n-points].
539//
540// Note: @sequence might not pertain to the group of sequences that
541// were previously triggering recognition on @gesture (ie. a just
542// pressed touch sequence that exceeds [property@Gtk.Gesture:n-points]).
543// This situation may be detected by checking through
544// [method@Gtk.Gesture.handles_sequence].
545func (x *Gesture) ConnectEnd(cb *func(Gesture, uintptr)) uint {
546	cbPtr := uintptr(unsafe.Pointer(cb))
547	if cbRefPtr, ok := glib.GetCallback(cbPtr); ok {
548		handlerID := gobject.SignalConnect(x.GoPointer(), "end", cbRefPtr)
549		glib.SaveHandlerMapping(handlerID, cbPtr)
550		return handlerID
551	}
552
553	fcb := func(clsPtr uintptr, SequenceVarp uintptr) {
554		fa := Gesture{}
555		fa.Ptr = clsPtr
556		cbFn := *cb
557
558		cbFn(fa, SequenceVarp)
559
560	}
561	cbRefPtr := purego.NewCallback(fcb)
562	glib.SaveCallbackWithClosure(cbPtr, cbRefPtr, cb)
563	handlerID := gobject.SignalConnect(x.GoPointer(), "end", cbRefPtr)
564	glib.SaveHandlerMapping(handlerID, cbPtr)
565	return handlerID
566}
567
568// Emitted whenever a sequence state changes.
569//
570// See [method@Gtk.Gesture.set_sequence_state] to know
571// more about the expectable sequence lifetimes.
572func (x *Gesture) ConnectSequenceStateChanged(cb *func(Gesture, uintptr, EventSequenceState)) uint {
573	cbPtr := uintptr(unsafe.Pointer(cb))
574	if cbRefPtr, ok := glib.GetCallback(cbPtr); ok {
575		handlerID := gobject.SignalConnect(x.GoPointer(), "sequence-state-changed", cbRefPtr)
576		glib.SaveHandlerMapping(handlerID, cbPtr)
577		return handlerID
578	}
579
580	fcb := func(clsPtr uintptr, SequenceVarp uintptr, StateVarp EventSequenceState) {
581		fa := Gesture{}
582		fa.Ptr = clsPtr
583		cbFn := *cb
584
585		cbFn(fa, SequenceVarp, StateVarp)
586
587	}
588	cbRefPtr := purego.NewCallback(fcb)
589	glib.SaveCallbackWithClosure(cbPtr, cbRefPtr, cb)
590	handlerID := gobject.SignalConnect(x.GoPointer(), "sequence-state-changed", cbRefPtr)
591	glib.SaveHandlerMapping(handlerID, cbPtr)
592	return handlerID
593}
594
595// Emitted whenever an event is handled while the gesture is recognized.
596//
597// @sequence is guaranteed to pertain to the set of active touches.
598func (x *Gesture) ConnectUpdate(cb *func(Gesture, uintptr)) uint {
599	cbPtr := uintptr(unsafe.Pointer(cb))
600	if cbRefPtr, ok := glib.GetCallback(cbPtr); ok {
601		handlerID := gobject.SignalConnect(x.GoPointer(), "update", cbRefPtr)
602		glib.SaveHandlerMapping(handlerID, cbPtr)
603		return handlerID
604	}
605
606	fcb := func(clsPtr uintptr, SequenceVarp uintptr) {
607		fa := Gesture{}
608		fa.Ptr = clsPtr
609		cbFn := *cb
610
611		cbFn(fa, SequenceVarp)
612
613	}
614	cbRefPtr := purego.NewCallback(fcb)
615	glib.SaveCallbackWithClosure(cbPtr, cbRefPtr, cb)
616	handlerID := gobject.SignalConnect(x.GoPointer(), "update", cbRefPtr)
617	glib.SaveHandlerMapping(handlerID, cbPtr)
618	return handlerID
619}
620
621func init() {
622	core.SetPackageName("GTK", "gtk4")
623	core.SetSharedLibraries("GTK", []string{"libgtk-4.so.1"})
624	var libs []uintptr
625	for _, libPath := range core.GetPaths("GTK") {
626		lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL)
627		if err != nil {
628			panic(err)
629		}
630		libs = append(libs, lib)
631	}
632
633	core.PuregoSafeRegister(&xGestureGLibType, libs, "gtk_gesture_get_type")
634
635	core.PuregoSafeRegister(&xGestureGetBoundingBox, libs, "gtk_gesture_get_bounding_box")
636	core.PuregoSafeRegister(&xGestureGetBoundingBoxCenter, libs, "gtk_gesture_get_bounding_box_center")
637	core.PuregoSafeRegister(&xGestureGetDevice, libs, "gtk_gesture_get_device")
638	core.PuregoSafeRegister(&xGestureGetGroup, libs, "gtk_gesture_get_group")
639	core.PuregoSafeRegister(&xGestureGetLastEvent, libs, "gtk_gesture_get_last_event")
640	core.PuregoSafeRegister(&xGestureGetLastUpdatedSequence, libs, "gtk_gesture_get_last_updated_sequence")
641	core.PuregoSafeRegister(&xGestureGetPoint, libs, "gtk_gesture_get_point")
642	core.PuregoSafeRegister(&xGestureGetSequenceState, libs, "gtk_gesture_get_sequence_state")
643	core.PuregoSafeRegister(&xGestureGetSequences, libs, "gtk_gesture_get_sequences")
644	core.PuregoSafeRegister(&xGestureGroup, libs, "gtk_gesture_group")
645	core.PuregoSafeRegister(&xGestureHandlesSequence, libs, "gtk_gesture_handles_sequence")
646	core.PuregoSafeRegister(&xGestureIsActive, libs, "gtk_gesture_is_active")
647	core.PuregoSafeRegister(&xGestureIsGroupedWith, libs, "gtk_gesture_is_grouped_with")
648	core.PuregoSafeRegister(&xGestureIsRecognized, libs, "gtk_gesture_is_recognized")
649	core.PuregoSafeRegister(&xGestureSetSequenceState, libs, "gtk_gesture_set_sequence_state")
650	core.PuregoSafeRegister(&xGestureSetState, libs, "gtk_gesture_set_state")
651	core.PuregoSafeRegister(&xGestureUngroup, libs, "gtk_gesture_ungroup")
652
653}

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 1

Tags 102

↑↓ moveenter openesc close