v0.2.1 c0399be

gtkpaned.go RawHistoryFolder

1// Package gtk was automatically generated by github.com/bnema/puregotk DO NOT EDIT
2package gtk
3
4import (
5	"unsafe"
6
7	"github.com/ebitengine/purego"
8
9	"github.com/bnema/puregotk/pkg/core"
10	"github.com/bnema/puregotk/v4/glib"
11	"github.com/bnema/puregotk/v4/gobject"
12	"github.com/bnema/puregotk/v4/gobject/types"
13)
14
15// Arranges its children in two panes, horizontally or vertically.
16//
17// <picture>
18//
19//	<source srcset="panes-dark.png" media="(prefers-color-scheme: dark)">
20//	<img alt="An example GtkPaned" src="panes.png">
21//
22// </picture>
23//
24// The division between the two panes is adjustable by the user
25// by dragging a handle.
26//
27// Child widgets are added to the panes of the widget with
28// [method@Gtk.Paned.set_start_child] and [method@Gtk.Paned.set_end_child].
29// The division between the two children is set by default from the size
30// requests of the children, but it can be adjusted by the user.
31//
32// A paned widget draws a separator between the two child widgets and a
33// small handle that the user can drag to adjust the division. It does not
34// draw any relief around the children or around the separator. (The space
35// in which the separator is called the gutter.) Often, it is useful to put
36// each child inside a [class@Gtk.Frame] so that the gutter appears as a
37// ridge. No separator is drawn if one of the children is missing.
38//
39// Each child has two options that can be set, "resize" and "shrink". If
40// "resize" is true then, when the `GtkPaned` is resized, that child will
41// expand or shrink along with the paned widget. If "shrink" is true, then
42// that child can be made smaller than its requisition by the user.
43// Setting "shrink" to false allows the application to set a minimum size.
44// If "resize" is false for both children, then this is treated as if
45// "resize" is true for both children.
46//
47// The application can set the position of the slider as if it were set
48// by the user, by calling [method@Gtk.Paned.set_position].
49//
50// # Shortcuts and Gestures
51//
52// The following signals have default keybindings:
53//
54// - [signal@Gtk.Paned::accept-position]
55// - [signal@Gtk.Paned::cancel-position]
56// - [signal@Gtk.Paned::cycle-child-focus]
57// - [signal@Gtk.Paned::cycle-handle-focus]
58// - [signal@Gtk.Paned::move-handle]
59// - [signal@Gtk.Paned::toggle-handle-focus]
60//
61// # CSS nodes
62//
63// ```
64// paned
65// ├── <child>
66// ├── separator[.wide]
67// ╰── <child>
68// ```
69//
70// `GtkPaned` has a main CSS node with name paned, and a subnode for
71// the separator with name separator. The subnode gets a .wide style
72// class when the paned is supposed to be wide.
73//
74// In horizontal orientation, the nodes are arranged based on the text
75// direction, so in left-to-right mode, :first-child will select the
76// leftmost child, while it will select the rightmost child in
77// RTL layouts.
78//
79// ## Creating a paned widget with minimum sizes.
80//
81// ```c
82// GtkWidget *hpaned = gtk_paned_new (GTK_ORIENTATION_HORIZONTAL);
83// GtkWidget *frame1 = gtk_frame_new (NULL);
84// GtkWidget *frame2 = gtk_frame_new (NULL);
85//
86// gtk_widget_set_size_request (hpaned, 200, -1);
87//
88// gtk_paned_set_start_child (GTK_PANED (hpaned), frame1);
89// gtk_paned_set_resize_start_child (GTK_PANED (hpaned), TRUE);
90// gtk_paned_set_shrink_start_child (GTK_PANED (hpaned), FALSE);
91// gtk_widget_set_size_request (frame1, 50, -1);
92//
93// gtk_paned_set_end_child (GTK_PANED (hpaned), frame2);
94// gtk_paned_set_resize_end_child (GTK_PANED (hpaned), FALSE);
95// gtk_paned_set_shrink_end_child (GTK_PANED (hpaned), FALSE);
96// gtk_widget_set_size_request (frame2, 50, -1);
97// ```
98type Paned struct {
99	Widget
100}
101
102var xPanedGLibType func() types.GType
103
104func PanedGLibType() types.GType {
105	return xPanedGLibType()
106}
107
108func PanedNewFromInternalPtr(ptr uintptr) *Paned {
109	cls := &Paned{}
110	cls.Ptr = ptr
111	return cls
112}
113
114var xNewPaned func(Orientation) uintptr
115
116// Creates a new `GtkPaned` widget.
117func NewPaned(OrientationVar Orientation) *Paned {
118	var cls *Paned
119
120	cret := xNewPaned(OrientationVar)
121
122	if cret == 0 {
123		return nil
124	}
125	gobject.IncreaseRef(cret)
126	cls = &Paned{}
127	cls.Ptr = cret
128	return cls
129}
130
131var xPanedGetEndChild func(uintptr) uintptr
132
133// Retrieves the end child of the given `GtkPaned`.
134func (x *Paned) GetEndChild() *Widget {
135	var cls *Widget
136
137	cret := xPanedGetEndChild(x.GoPointer())
138
139	if cret == 0 {
140		return nil
141	}
142	gobject.IncreaseRef(cret)
143	cls = &Widget{}
144	cls.Ptr = cret
145	return cls
146}
147
148var xPanedGetPosition func(uintptr) int
149
150// Obtains the position of the divider between the two panes.
151func (x *Paned) GetPosition() int {
152
153	cret := xPanedGetPosition(x.GoPointer())
154	return cret
155}
156
157var xPanedGetResizeEndChild func(uintptr) bool
158
159// Returns whether the [property@Gtk.Paned:end-child] can be resized.
160func (x *Paned) GetResizeEndChild() bool {
161
162	cret := xPanedGetResizeEndChild(x.GoPointer())
163	return cret
164}
165
166var xPanedGetResizeStartChild func(uintptr) bool
167
168// Returns whether the [property@Gtk.Paned:start-child] can be resized.
169func (x *Paned) GetResizeStartChild() bool {
170
171	cret := xPanedGetResizeStartChild(x.GoPointer())
172	return cret
173}
174
175var xPanedGetShrinkEndChild func(uintptr) bool
176
177// Returns whether the [property@Gtk.Paned:end-child] can shrink.
178func (x *Paned) GetShrinkEndChild() bool {
179
180	cret := xPanedGetShrinkEndChild(x.GoPointer())
181	return cret
182}
183
184var xPanedGetShrinkStartChild func(uintptr) bool
185
186// Returns whether the [property@Gtk.Paned:start-child] can shrink.
187func (x *Paned) GetShrinkStartChild() bool {
188
189	cret := xPanedGetShrinkStartChild(x.GoPointer())
190	return cret
191}
192
193var xPanedGetStartChild func(uintptr) uintptr
194
195// Retrieves the start child of the given `GtkPaned`.
196func (x *Paned) GetStartChild() *Widget {
197	var cls *Widget
198
199	cret := xPanedGetStartChild(x.GoPointer())
200
201	if cret == 0 {
202		return nil
203	}
204	gobject.IncreaseRef(cret)
205	cls = &Widget{}
206	cls.Ptr = cret
207	return cls
208}
209
210var xPanedGetWideHandle func(uintptr) bool
211
212// Gets whether the separator should be wide.
213func (x *Paned) GetWideHandle() bool {
214
215	cret := xPanedGetWideHandle(x.GoPointer())
216	return cret
217}
218
219var xPanedSetEndChild func(uintptr, uintptr)
220
221// Sets the end child of @paned to @child.
222//
223// If @child is `NULL`, the existing child will be removed.
224func (x *Paned) SetEndChild(ChildVar *Widget) {
225
226	xPanedSetEndChild(x.GoPointer(), ChildVar.GoPointer())
227
228}
229
230var xPanedSetPosition func(uintptr, int)
231
232// Sets the position of the divider between the two panes.
233func (x *Paned) SetPosition(PositionVar int) {
234
235	xPanedSetPosition(x.GoPointer(), PositionVar)
236
237}
238
239var xPanedSetResizeEndChild func(uintptr, bool)
240
241// Sets whether the [property@Gtk.Paned:end-child] can be resized.
242func (x *Paned) SetResizeEndChild(ResizeVar bool) {
243
244	xPanedSetResizeEndChild(x.GoPointer(), ResizeVar)
245
246}
247
248var xPanedSetResizeStartChild func(uintptr, bool)
249
250// Sets whether the [property@Gtk.Paned:start-child] can be resized.
251func (x *Paned) SetResizeStartChild(ResizeVar bool) {
252
253	xPanedSetResizeStartChild(x.GoPointer(), ResizeVar)
254
255}
256
257var xPanedSetShrinkEndChild func(uintptr, bool)
258
259// Sets whether the [property@Gtk.Paned:end-child] can shrink.
260func (x *Paned) SetShrinkEndChild(ResizeVar bool) {
261
262	xPanedSetShrinkEndChild(x.GoPointer(), ResizeVar)
263
264}
265
266var xPanedSetShrinkStartChild func(uintptr, bool)
267
268// Sets whether the [property@Gtk.Paned:start-child] can shrink.
269func (x *Paned) SetShrinkStartChild(ResizeVar bool) {
270
271	xPanedSetShrinkStartChild(x.GoPointer(), ResizeVar)
272
273}
274
275var xPanedSetStartChild func(uintptr, uintptr)
276
277// Sets the start child of @paned to @child.
278//
279// If @child is `NULL`, the existing child will be removed.
280func (x *Paned) SetStartChild(ChildVar *Widget) {
281
282	xPanedSetStartChild(x.GoPointer(), ChildVar.GoPointer())
283
284}
285
286var xPanedSetWideHandle func(uintptr, bool)
287
288// Sets whether the separator should be wide.
289func (x *Paned) SetWideHandle(WideVar bool) {
290
291	xPanedSetWideHandle(x.GoPointer(), WideVar)
292
293}
294
295func (c *Paned) GoPointer() uintptr {
296	if c == nil {
297		return 0
298	}
299	return c.Ptr
300}
301
302func (c *Paned) SetGoPointer(ptr uintptr) {
303	c.Ptr = ptr
304}
305
306// GetPropertyMaxPosition gets the "max-position" property.
307// The largest possible value for the [property@Gtk.Paned:position]
308// property.
309//
310// This property is derived from the size and shrinkability
311// of the widget's children.
312func (x *Paned) GetPropertyMaxPosition() int {
313	var v gobject.Value
314	x.GetProperty("max-position", &v)
315	return v.GetInt()
316}
317
318// GetPropertyMinPosition gets the "min-position" property.
319// The smallest possible value for the [property@Gtk.Paned:position]
320// property.
321//
322// This property is derived from the size and shrinkability
323// of the widget's children.
324func (x *Paned) GetPropertyMinPosition() int {
325	var v gobject.Value
326	x.GetProperty("min-position", &v)
327	return v.GetInt()
328}
329
330// SetPropertyPosition sets the "position" property.
331// Position of the separator in pixels, from the left/top.
332func (x *Paned) SetPropertyPosition(value int) {
333	var v gobject.Value
334	v.Init(gobject.TypeIntVal)
335	v.SetInt(value)
336	x.SetProperty("position", &v)
337}
338
339// GetPropertyPosition gets the "position" property.
340// Position of the separator in pixels, from the left/top.
341func (x *Paned) GetPropertyPosition() int {
342	var v gobject.Value
343	x.GetProperty("position", &v)
344	return v.GetInt()
345}
346
347// SetPropertyPositionSet sets the "position-set" property.
348// Whether the [property@Gtk.Paned:position] property has been set.
349func (x *Paned) SetPropertyPositionSet(value bool) {
350	var v gobject.Value
351	v.Init(gobject.TypeBooleanVal)
352	v.SetBoolean(value)
353	x.SetProperty("position-set", &v)
354}
355
356// GetPropertyPositionSet gets the "position-set" property.
357// Whether the [property@Gtk.Paned:position] property has been set.
358func (x *Paned) GetPropertyPositionSet() bool {
359	var v gobject.Value
360	x.GetProperty("position-set", &v)
361	return v.GetBoolean()
362}
363
364// SetPropertyResizeEndChild sets the "resize-end-child" property.
365// Determines whether the second child expands and shrinks
366// along with the paned widget.
367func (x *Paned) SetPropertyResizeEndChild(value bool) {
368	var v gobject.Value
369	v.Init(gobject.TypeBooleanVal)
370	v.SetBoolean(value)
371	x.SetProperty("resize-end-child", &v)
372}
373
374// GetPropertyResizeEndChild gets the "resize-end-child" property.
375// Determines whether the second child expands and shrinks
376// along with the paned widget.
377func (x *Paned) GetPropertyResizeEndChild() bool {
378	var v gobject.Value
379	x.GetProperty("resize-end-child", &v)
380	return v.GetBoolean()
381}
382
383// SetPropertyResizeStartChild sets the "resize-start-child" property.
384// Determines whether the first child expands and shrinks
385// along with the paned widget.
386func (x *Paned) SetPropertyResizeStartChild(value bool) {
387	var v gobject.Value
388	v.Init(gobject.TypeBooleanVal)
389	v.SetBoolean(value)
390	x.SetProperty("resize-start-child", &v)
391}
392
393// GetPropertyResizeStartChild gets the "resize-start-child" property.
394// Determines whether the first child expands and shrinks
395// along with the paned widget.
396func (x *Paned) GetPropertyResizeStartChild() bool {
397	var v gobject.Value
398	x.GetProperty("resize-start-child", &v)
399	return v.GetBoolean()
400}
401
402// SetPropertyShrinkEndChild sets the "shrink-end-child" property.
403// Determines whether the second child can be made smaller
404// than its requisition.
405func (x *Paned) SetPropertyShrinkEndChild(value bool) {
406	var v gobject.Value
407	v.Init(gobject.TypeBooleanVal)
408	v.SetBoolean(value)
409	x.SetProperty("shrink-end-child", &v)
410}
411
412// GetPropertyShrinkEndChild gets the "shrink-end-child" property.
413// Determines whether the second child can be made smaller
414// than its requisition.
415func (x *Paned) GetPropertyShrinkEndChild() bool {
416	var v gobject.Value
417	x.GetProperty("shrink-end-child", &v)
418	return v.GetBoolean()
419}
420
421// SetPropertyShrinkStartChild sets the "shrink-start-child" property.
422// Determines whether the first child can be made smaller
423// than its requisition.
424func (x *Paned) SetPropertyShrinkStartChild(value bool) {
425	var v gobject.Value
426	v.Init(gobject.TypeBooleanVal)
427	v.SetBoolean(value)
428	x.SetProperty("shrink-start-child", &v)
429}
430
431// GetPropertyShrinkStartChild gets the "shrink-start-child" property.
432// Determines whether the first child can be made smaller
433// than its requisition.
434func (x *Paned) GetPropertyShrinkStartChild() bool {
435	var v gobject.Value
436	x.GetProperty("shrink-start-child", &v)
437	return v.GetBoolean()
438}
439
440// SetPropertyWideHandle sets the "wide-handle" property.
441// Whether the `GtkPaned` should provide a stronger visual separation.
442//
443// For example, this could be set when a paned contains two
444// [class@Gtk.Notebook]s, whose tab rows would otherwise merge visually.
445func (x *Paned) SetPropertyWideHandle(value bool) {
446	var v gobject.Value
447	v.Init(gobject.TypeBooleanVal)
448	v.SetBoolean(value)
449	x.SetProperty("wide-handle", &v)
450}
451
452// GetPropertyWideHandle gets the "wide-handle" property.
453// Whether the `GtkPaned` should provide a stronger visual separation.
454//
455// For example, this could be set when a paned contains two
456// [class@Gtk.Notebook]s, whose tab rows would otherwise merge visually.
457func (x *Paned) GetPropertyWideHandle() bool {
458	var v gobject.Value
459	x.GetProperty("wide-handle", &v)
460	return v.GetBoolean()
461}
462
463// Emitted to accept the current position of the handle when
464// moving it using key bindings.
465//
466// This is a [keybinding signal](class.SignalAction.html).
467//
468// The default binding for this signal is <kbd>Return</kbd> or
469// <kbd>Space</kbd>.
470func (x *Paned) ConnectAcceptPosition(cb *func(Paned) bool) uint {
471	cbPtr := uintptr(unsafe.Pointer(cb))
472	if cbRefPtr, ok := glib.GetCallback(cbPtr); ok {
473		handlerID := gobject.SignalConnect(x.GoPointer(), "accept-position", cbRefPtr)
474		glib.SaveHandlerMapping(handlerID, cbPtr)
475		return handlerID
476	}
477
478	fcb := func(clsPtr uintptr) bool {
479		fa := Paned{}
480		fa.Ptr = clsPtr
481		cbFn := *cb
482
483		return cbFn(fa)
484
485	}
486	cbRefPtr := purego.NewCallback(fcb)
487	glib.SaveCallbackWithClosure(cbPtr, cbRefPtr, cb)
488	handlerID := gobject.SignalConnect(x.GoPointer(), "accept-position", cbRefPtr)
489	glib.SaveHandlerMapping(handlerID, cbPtr)
490	return handlerID
491}
492
493// Emitted to cancel moving the position of the handle using key
494// bindings.
495//
496// The position of the handle will be reset to the value prior to
497// moving it.
498//
499// This is a [keybinding signal](class.SignalAction.html).
500//
501// The default binding for this signal is <kbd>Escape</kbd>.
502func (x *Paned) ConnectCancelPosition(cb *func(Paned) bool) uint {
503	cbPtr := uintptr(unsafe.Pointer(cb))
504	if cbRefPtr, ok := glib.GetCallback(cbPtr); ok {
505		handlerID := gobject.SignalConnect(x.GoPointer(), "cancel-position", cbRefPtr)
506		glib.SaveHandlerMapping(handlerID, cbPtr)
507		return handlerID
508	}
509
510	fcb := func(clsPtr uintptr) bool {
511		fa := Paned{}
512		fa.Ptr = clsPtr
513		cbFn := *cb
514
515		return cbFn(fa)
516
517	}
518	cbRefPtr := purego.NewCallback(fcb)
519	glib.SaveCallbackWithClosure(cbPtr, cbRefPtr, cb)
520	handlerID := gobject.SignalConnect(x.GoPointer(), "cancel-position", cbRefPtr)
521	glib.SaveHandlerMapping(handlerID, cbPtr)
522	return handlerID
523}
524
525// Emitted to cycle the focus between the children of the paned.
526//
527// This is a [keybinding signal](class.SignalAction.html).
528//
529// The default binding is <kbd>F6</kbd>.
530func (x *Paned) ConnectCycleChildFocus(cb *func(Paned, bool) bool) uint {
531	cbPtr := uintptr(unsafe.Pointer(cb))
532	if cbRefPtr, ok := glib.GetCallback(cbPtr); ok {
533		handlerID := gobject.SignalConnect(x.GoPointer(), "cycle-child-focus", cbRefPtr)
534		glib.SaveHandlerMapping(handlerID, cbPtr)
535		return handlerID
536	}
537
538	fcb := func(clsPtr uintptr, ReversedVarp bool) bool {
539		fa := Paned{}
540		fa.Ptr = clsPtr
541		cbFn := *cb
542
543		return cbFn(fa, ReversedVarp)
544
545	}
546	cbRefPtr := purego.NewCallback(fcb)
547	glib.SaveCallbackWithClosure(cbPtr, cbRefPtr, cb)
548	handlerID := gobject.SignalConnect(x.GoPointer(), "cycle-child-focus", cbRefPtr)
549	glib.SaveHandlerMapping(handlerID, cbPtr)
550	return handlerID
551}
552
553// Emitted to cycle whether the paned should grab focus to allow
554// the user to change position of the handle by using key bindings.
555//
556// This is a [keybinding signal](class.SignalAction.html).
557//
558// The default binding for this signal is <kbd>F8</kbd>.
559func (x *Paned) ConnectCycleHandleFocus(cb *func(Paned, bool) bool) uint {
560	cbPtr := uintptr(unsafe.Pointer(cb))
561	if cbRefPtr, ok := glib.GetCallback(cbPtr); ok {
562		handlerID := gobject.SignalConnect(x.GoPointer(), "cycle-handle-focus", cbRefPtr)
563		glib.SaveHandlerMapping(handlerID, cbPtr)
564		return handlerID
565	}
566
567	fcb := func(clsPtr uintptr, ReversedVarp bool) bool {
568		fa := Paned{}
569		fa.Ptr = clsPtr
570		cbFn := *cb
571
572		return cbFn(fa, ReversedVarp)
573
574	}
575	cbRefPtr := purego.NewCallback(fcb)
576	glib.SaveCallbackWithClosure(cbPtr, cbRefPtr, cb)
577	handlerID := gobject.SignalConnect(x.GoPointer(), "cycle-handle-focus", cbRefPtr)
578	glib.SaveHandlerMapping(handlerID, cbPtr)
579	return handlerID
580}
581
582// Emitted to move the handle with key bindings.
583//
584// This is a [keybinding signal](class.SignalAction.html).
585//
586// The default bindings for this signal are
587// <kbd>Ctrl</kbd>+<kbd>←</kbd>, <kbd>←</kbd>,
588// <kbd>Ctrl</kbd>+<kbd>→</kbd>, <kbd>→</kbd>,
589// <kbd>Ctrl</kbd>+<kbd>↑</kbd>, <kbd>↑</kbd>,
590// <kbd>Ctrl</kbd>+<kbd>↓</kbd>, <kbd>↓</kbd>,
591// <kbd>PgUp</kbd>, <kbd>PgDn</kbd>, <kbd>Home</kbd>, <kbd>End</kbd>.
592func (x *Paned) ConnectMoveHandle(cb *func(Paned, ScrollType) bool) uint {
593	cbPtr := uintptr(unsafe.Pointer(cb))
594	if cbRefPtr, ok := glib.GetCallback(cbPtr); ok {
595		handlerID := gobject.SignalConnect(x.GoPointer(), "move-handle", cbRefPtr)
596		glib.SaveHandlerMapping(handlerID, cbPtr)
597		return handlerID
598	}
599
600	fcb := func(clsPtr uintptr, ScrollTypeVarp ScrollType) bool {
601		fa := Paned{}
602		fa.Ptr = clsPtr
603		cbFn := *cb
604
605		return cbFn(fa, ScrollTypeVarp)
606
607	}
608	cbRefPtr := purego.NewCallback(fcb)
609	glib.SaveCallbackWithClosure(cbPtr, cbRefPtr, cb)
610	handlerID := gobject.SignalConnect(x.GoPointer(), "move-handle", cbRefPtr)
611	glib.SaveHandlerMapping(handlerID, cbPtr)
612	return handlerID
613}
614
615// Emitted to accept the current position of the handle and then
616// move focus to the next widget in the focus chain.
617//
618// This is a [keybinding signal](class.SignalAction.html).
619//
620// The default binding is <kbd>Tab</kbd>.
621func (x *Paned) ConnectToggleHandleFocus(cb *func(Paned) bool) uint {
622	cbPtr := uintptr(unsafe.Pointer(cb))
623	if cbRefPtr, ok := glib.GetCallback(cbPtr); ok {
624		handlerID := gobject.SignalConnect(x.GoPointer(), "toggle-handle-focus", cbRefPtr)
625		glib.SaveHandlerMapping(handlerID, cbPtr)
626		return handlerID
627	}
628
629	fcb := func(clsPtr uintptr) bool {
630		fa := Paned{}
631		fa.Ptr = clsPtr
632		cbFn := *cb
633
634		return cbFn(fa)
635
636	}
637	cbRefPtr := purego.NewCallback(fcb)
638	glib.SaveCallbackWithClosure(cbPtr, cbRefPtr, cb)
639	handlerID := gobject.SignalConnect(x.GoPointer(), "toggle-handle-focus", cbRefPtr)
640	glib.SaveHandlerMapping(handlerID, cbPtr)
641	return handlerID
642}
643
644// Requests the user's screen reader to announce the given message.
645//
646// This kind of notification is useful for messages that
647// either have only a visual representation or that are not
648// exposed visually at all, e.g. a notification about a
649// successful operation.
650//
651// Also, by using this API, you can ensure that the message
652// does not interrupts the user's current screen reader output.
653func (x *Paned) Announce(MessageVar string, PriorityVar AccessibleAnnouncementPriority) {
654
655	XGtkAccessibleAnnounce(x.GoPointer(), MessageVar, PriorityVar)
656
657}
658
659// Retrieves the accessible parent for an accessible object.
660//
661// This function returns `NULL` for top level widgets.
662func (x *Paned) GetAccessibleParent() *AccessibleBase {
663	var cls *AccessibleBase
664
665	cret := XGtkAccessibleGetAccessibleParent(x.GoPointer())
666
667	if cret == 0 {
668		return nil
669	}
670	cls = &AccessibleBase{}
671	cls.Ptr = cret
672	return cls
673}
674
675// Retrieves the accessible role of an accessible object.
676func (x *Paned) GetAccessibleRole() AccessibleRole {
677
678	cret := XGtkAccessibleGetAccessibleRole(x.GoPointer())
679	return cret
680}
681
682// Retrieves the implementation for the given accessible object.
683func (x *Paned) GetAtContext() *ATContext {
684	var cls *ATContext
685
686	cret := XGtkAccessibleGetAtContext(x.GoPointer())
687
688	if cret == 0 {
689		return nil
690	}
691	cls = &ATContext{}
692	cls.Ptr = cret
693	return cls
694}
695
696// Queries the coordinates and dimensions of this accessible
697//
698// This functionality can be overridden by `GtkAccessible`
699// implementations, e.g. to get the bounds from an ignored
700// child widget.
701func (x *Paned) GetBounds(XVar *int, YVar *int, WidthVar *int, HeightVar *int) bool {
702
703	cret := XGtkAccessibleGetBounds(x.GoPointer(), XVar, YVar, WidthVar, HeightVar)
704	return cret
705}
706
707// Retrieves the first accessible child of an accessible object.
708func (x *Paned) GetFirstAccessibleChild() *AccessibleBase {
709	var cls *AccessibleBase
710
711	cret := XGtkAccessibleGetFirstAccessibleChild(x.GoPointer())
712
713	if cret == 0 {
714		return nil
715	}
716	cls = &AccessibleBase{}
717	cls.Ptr = cret
718	return cls
719}
720
721// Retrieves the next accessible sibling of an accessible object
722func (x *Paned) GetNextAccessibleSibling() *AccessibleBase {
723	var cls *AccessibleBase
724
725	cret := XGtkAccessibleGetNextAccessibleSibling(x.GoPointer())
726
727	if cret == 0 {
728		return nil
729	}
730	cls = &AccessibleBase{}
731	cls.Ptr = cret
732	return cls
733}
734
735// Queries a platform state, such as focus.
736//
737// This functionality can be overridden by `GtkAccessible`
738// implementations, e.g. to get platform state from an ignored
739// child widget, as is the case for `GtkText` wrappers.
740func (x *Paned) GetPlatformState(StateVar AccessiblePlatformState) bool {
741
742	cret := XGtkAccessibleGetPlatformState(x.GoPointer(), StateVar)
743	return cret
744}
745
746// Resets the accessible property to its default value.
747func (x *Paned) ResetProperty(PropertyVar AccessibleProperty) {
748
749	XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar)
750
751}
752
753// Resets the accessible relation to its default value.
754func (x *Paned) ResetRelation(RelationVar AccessibleRelation) {
755
756	XGtkAccessibleResetRelation(x.GoPointer(), RelationVar)
757
758}
759
760// Resets the accessible state to its default value.
761func (x *Paned) ResetState(StateVar AccessibleState) {
762
763	XGtkAccessibleResetState(x.GoPointer(), StateVar)
764
765}
766
767// Sets the parent and sibling of an accessible object.
768//
769// This function is meant to be used by accessible implementations that are
770// not part of the widget hierarchy, and but act as a logical bridge between
771// widgets. For instance, if a widget creates an object that holds metadata
772// for each child, and you want that object to implement the `GtkAccessible`
773// interface, you will use this function to ensure that the parent of each
774// child widget is the metadata object, and the parent of each metadata
775// object is the container widget.
776func (x *Paned) SetAccessibleParent(ParentVar Accessible, NextSiblingVar Accessible) {
777
778	XGtkAccessibleSetAccessibleParent(x.GoPointer(), ParentVar.GoPointer(), NextSiblingVar.GoPointer())
779
780}
781
782// Updates the next accessible sibling.
783//
784// That might be useful when a new child of a custom accessible
785// is created, and it needs to be linked to a previous child.
786func (x *Paned) UpdateNextAccessibleSibling(NewSiblingVar Accessible) {
787
788	XGtkAccessibleUpdateNextAccessibleSibling(x.GoPointer(), NewSiblingVar.GoPointer())
789
790}
791
792// Informs ATs that the platform state has changed.
793//
794// This function should be used by `GtkAccessible` implementations that
795// have a platform state but are not widgets. Widgets handle platform
796// states automatically.
797func (x *Paned) UpdatePlatformState(StateVar AccessiblePlatformState) {
798
799	XGtkAccessibleUpdatePlatformState(x.GoPointer(), StateVar)
800
801}
802
803// Updates a list of accessible properties.
804//
805// See the [enum@Gtk.AccessibleProperty] documentation for the
806// value types of accessible properties.
807//
808// This function should be called by `GtkWidget` types whenever
809// an accessible property change must be communicated to assistive
810// technologies.
811//
812// Example:
813// ```c
814// value = gtk_adjustment_get_value (adjustment);
815// gtk_accessible_update_property (GTK_ACCESSIBLE (spin_button),
816//
817//	GTK_ACCESSIBLE_PROPERTY_VALUE_NOW, value,
818//	-1);
819//
820// ```
821func (x *Paned) UpdateProperty(FirstPropertyVar AccessibleProperty, varArgs ...interface{}) {
822
823	XGtkAccessibleUpdateProperty(x.GoPointer(), FirstPropertyVar, varArgs...)
824
825}
826
827// Updates an array of accessible properties.
828//
829// This function should be called by `GtkWidget` types whenever an accessible
830// property change must be communicated to assistive technologies.
831//
832// This function is meant to be used by language bindings.
833func (x *Paned) UpdatePropertyValue(NPropertiesVar int, PropertiesVar []AccessibleProperty, ValuesVar []gobject.Value) {
834
835	XGtkAccessibleUpdatePropertyValue(x.GoPointer(), NPropertiesVar, PropertiesVar, ValuesVar)
836
837}
838
839// Updates a list of accessible relations.
840//
841// This function should be called by `GtkWidget` types whenever an accessible
842// relation change must be communicated to assistive technologies.
843//
844// If the [enum@Gtk.AccessibleRelation] requires a list of references,
845// you should pass each reference individually, followed by `NULL`, e.g.
846//
847// ```c
848// gtk_accessible_update_relation (accessible,
849//
850//	GTK_ACCESSIBLE_RELATION_CONTROLS,
851//	  ref1, NULL,
852//	GTK_ACCESSIBLE_RELATION_LABELLED_BY,
853//	  ref1, ref2, ref3, NULL,
854//	-1);
855//
856// ```
857func (x *Paned) UpdateRelation(FirstRelationVar AccessibleRelation, varArgs ...interface{}) {
858
859	XGtkAccessibleUpdateRelation(x.GoPointer(), FirstRelationVar, varArgs...)
860
861}
862
863// Updates an array of accessible relations.
864//
865// This function should be called by `GtkWidget` types whenever an accessible
866// relation change must be communicated to assistive technologies.
867//
868// This function is meant to be used by language bindings.
869func (x *Paned) UpdateRelationValue(NRelationsVar int, RelationsVar []AccessibleRelation, ValuesVar []gobject.Value) {
870
871	XGtkAccessibleUpdateRelationValue(x.GoPointer(), NRelationsVar, RelationsVar, ValuesVar)
872
873}
874
875// Updates a list of accessible states.
876//
877// See the [enum@Gtk.AccessibleState] documentation for the
878// value types of accessible states.
879//
880// This function should be called by `GtkWidget` types whenever
881// an accessible state change must be communicated to assistive
882// technologies.
883//
884// Example:
885//
886// ```c
887// value = GTK_ACCESSIBLE_TRISTATE_MIXED;
888// gtk_accessible_update_state (GTK_ACCESSIBLE (check_button),
889//
890//	GTK_ACCESSIBLE_STATE_CHECKED, value,
891//	-1);
892//
893// ```
894func (x *Paned) UpdateState(FirstStateVar AccessibleState, varArgs ...interface{}) {
895
896	XGtkAccessibleUpdateState(x.GoPointer(), FirstStateVar, varArgs...)
897
898}
899
900// Updates an array of accessible states.
901//
902// This function should be called by `GtkWidget` types whenever an accessible
903// state change must be communicated to assistive technologies.
904//
905// This function is meant to be used by language bindings.
906func (x *Paned) UpdateStateValue(NStatesVar int, StatesVar []AccessibleState, ValuesVar []gobject.Value) {
907
908	XGtkAccessibleUpdateStateValue(x.GoPointer(), NStatesVar, StatesVar, ValuesVar)
909
910}
911
912// Gets the ID of the @buildable object.
913//
914// `GtkBuilder` sets the name based on the ID attribute
915// of the `<object>` tag used to construct the @buildable.
916func (x *Paned) GetBuildableId() string {
917
918	cret := XGtkBuildableGetBuildableId(x.GoPointer())
919	return cret
920}
921
922// Retrieves the orientation of the @orientable.
923func (x *Paned) GetOrientation() Orientation {
924
925	cret := XGtkOrientableGetOrientation(x.GoPointer())
926	return cret
927}
928
929// Sets the orientation of the @orientable.
930func (x *Paned) SetOrientation(OrientationVar Orientation) {
931
932	XGtkOrientableSetOrientation(x.GoPointer(), OrientationVar)
933
934}
935
936func init() {
937	core.SetPackageName("GTK", "gtk4")
938	core.SetSharedLibraries("GTK", []string{"libgtk-4.so.1"})
939	var libs []uintptr
940	for _, libPath := range core.GetPaths("GTK") {
941		lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL)
942		if err != nil {
943			panic(err)
944		}
945		libs = append(libs, lib)
946	}
947
948	core.PuregoSafeRegister(&xPanedGLibType, libs, "gtk_paned_get_type")
949
950	core.PuregoSafeRegister(&xNewPaned, libs, "gtk_paned_new")
951
952	core.PuregoSafeRegister(&xPanedGetEndChild, libs, "gtk_paned_get_end_child")
953	core.PuregoSafeRegister(&xPanedGetPosition, libs, "gtk_paned_get_position")
954	core.PuregoSafeRegister(&xPanedGetResizeEndChild, libs, "gtk_paned_get_resize_end_child")
955	core.PuregoSafeRegister(&xPanedGetResizeStartChild, libs, "gtk_paned_get_resize_start_child")
956	core.PuregoSafeRegister(&xPanedGetShrinkEndChild, libs, "gtk_paned_get_shrink_end_child")
957	core.PuregoSafeRegister(&xPanedGetShrinkStartChild, libs, "gtk_paned_get_shrink_start_child")
958	core.PuregoSafeRegister(&xPanedGetStartChild, libs, "gtk_paned_get_start_child")
959	core.PuregoSafeRegister(&xPanedGetWideHandle, libs, "gtk_paned_get_wide_handle")
960	core.PuregoSafeRegister(&xPanedSetEndChild, libs, "gtk_paned_set_end_child")
961	core.PuregoSafeRegister(&xPanedSetPosition, libs, "gtk_paned_set_position")
962	core.PuregoSafeRegister(&xPanedSetResizeEndChild, libs, "gtk_paned_set_resize_end_child")
963	core.PuregoSafeRegister(&xPanedSetResizeStartChild, libs, "gtk_paned_set_resize_start_child")
964	core.PuregoSafeRegister(&xPanedSetShrinkEndChild, libs, "gtk_paned_set_shrink_end_child")
965	core.PuregoSafeRegister(&xPanedSetShrinkStartChild, libs, "gtk_paned_set_shrink_start_child")
966	core.PuregoSafeRegister(&xPanedSetStartChild, libs, "gtk_paned_set_start_child")
967	core.PuregoSafeRegister(&xPanedSetWideHandle, libs, "gtk_paned_set_wide_handle")
968
969}

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