v0.2.1 c0399be

gtkdropdown.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/gio"
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 DropDownClass struct {
18	_ structs.HostLayout
19
20	ParentClass WidgetClass
21}
22
23func (x *DropDownClass) GoPointer() uintptr {
24	return uintptr(unsafe.Pointer(x))
25}
26
27// Allows the user to choose an item from a list of options.
28//
29// <picture>
30//
31//	<source srcset="drop-down-dark.png" media="(prefers-color-scheme: dark)">
32//	<img alt="An example GtkDropDown" src="drop-down.png">
33//
34// </picture>
35//
36// The `GtkDropDown` displays the [selected][property@Gtk.DropDown:selected]
37// choice.
38//
39// The options are given to `GtkDropDown` in the form of `GListModel`
40// and how the individual options are represented is determined by
41// a [class@Gtk.ListItemFactory]. The default factory displays simple strings,
42// and adds a checkmark to the selected item in the popup.
43//
44// To set your own factory, use [method@Gtk.DropDown.set_factory]. It is
45// possible to use a separate factory for the items in the popup, with
46// [method@Gtk.DropDown.set_list_factory].
47//
48// `GtkDropDown` knows how to obtain strings from the items in a
49// [class@Gtk.StringList]; for other models, you have to provide an expression
50// to find the strings via [method@Gtk.DropDown.set_expression].
51//
52// `GtkDropDown` can optionally allow search in the popup, which is
53// useful if the list of options is long. To enable the search entry,
54// use [method@Gtk.DropDown.set_enable_search].
55//
56// Here is a UI definition example for `GtkDropDown` with a simple model:
57//
58// ```xml
59// <object class="GtkDropDown">
60//
61//	<property name="model">
62//	  <object class="GtkStringList">
63//	    <items>
64//	      <item translatable="yes">Factory</item>
65//	      <item translatable="yes">Home</item>
66//	      <item translatable="yes">Subway</item>
67//	    </items>
68//	  </object>
69//	</property>
70//
71// </object>
72// ```
73//
74// If a `GtkDropDown` is created in this manner, or with
75// [ctor@Gtk.DropDown.new_from_strings], for instance, the object returned from
76// [method@Gtk.DropDown.get_selected_item] will be a [class@Gtk.StringObject].
77//
78// To learn more about the list widget framework, see the
79// [overview](section-list-widget.html).
80//
81// ## CSS nodes
82//
83// `GtkDropDown` has a single CSS node with name dropdown,
84// with the button and popover nodes as children.
85//
86// ## Accessibility
87//
88// `GtkDropDown` uses the [enum@Gtk.AccessibleRole.combo_box] role.
89type DropDown struct {
90	Widget
91}
92
93var xDropDownGLibType func() types.GType
94
95func DropDownGLibType() types.GType {
96	return xDropDownGLibType()
97}
98
99func DropDownNewFromInternalPtr(ptr uintptr) *DropDown {
100	cls := &DropDown{}
101	cls.Ptr = ptr
102	return cls
103}
104
105var xNewDropDown func(uintptr, uintptr) uintptr
106
107// Creates a new `GtkDropDown`.
108//
109// You may want to call [method@Gtk.DropDown.set_factory]
110// to set up a way to map its items to widgets.
111func NewDropDown(ModelVar gio.ListModel, ExpressionVar *Expression) *DropDown {
112	var cls *DropDown
113
114	cret := xNewDropDown(ModelVar.GoPointer(), ExpressionVar.GoPointer())
115
116	if cret == 0 {
117		return nil
118	}
119	gobject.IncreaseRef(cret)
120	cls = &DropDown{}
121	cls.Ptr = cret
122	return cls
123}
124
125var xNewDropDownFromStrings func([]string) uintptr
126
127// Creates a new `GtkDropDown` that is populated with
128// the strings.
129func NewDropDownFromStrings(StringsVar []string) *DropDown {
130	var cls *DropDown
131
132	cret := xNewDropDownFromStrings(StringsVar)
133
134	if cret == 0 {
135		return nil
136	}
137	gobject.IncreaseRef(cret)
138	cls = &DropDown{}
139	cls.Ptr = cret
140	return cls
141}
142
143var xDropDownGetEnableSearch func(uintptr) bool
144
145// Returns whether search is enabled.
146func (x *DropDown) GetEnableSearch() bool {
147
148	cret := xDropDownGetEnableSearch(x.GoPointer())
149	return cret
150}
151
152var xDropDownGetExpression func(uintptr) uintptr
153
154// Gets the expression set that is used to obtain strings from items.
155//
156// See [method@Gtk.DropDown.set_expression].
157func (x *DropDown) GetExpression() *Expression {
158	var cls *Expression
159
160	cret := xDropDownGetExpression(x.GoPointer())
161
162	if cret == 0 {
163		return nil
164	}
165	gobject.IncreaseRef(cret)
166	cls = &Expression{}
167	cls.Ptr = cret
168	return cls
169}
170
171var xDropDownGetFactory func(uintptr) uintptr
172
173// Gets the factory that's currently used to populate list items.
174//
175// The factory returned by this function is always used for the
176// item in the button. It is also used for items in the popup
177// if [property@Gtk.DropDown:list-factory] is not set.
178func (x *DropDown) GetFactory() *ListItemFactory {
179	var cls *ListItemFactory
180
181	cret := xDropDownGetFactory(x.GoPointer())
182
183	if cret == 0 {
184		return nil
185	}
186	gobject.IncreaseRef(cret)
187	cls = &ListItemFactory{}
188	cls.Ptr = cret
189	return cls
190}
191
192var xDropDownGetHeaderFactory func(uintptr) uintptr
193
194// Gets the factory that's currently used to create header widgets for the popup.
195func (x *DropDown) GetHeaderFactory() *ListItemFactory {
196	var cls *ListItemFactory
197
198	cret := xDropDownGetHeaderFactory(x.GoPointer())
199
200	if cret == 0 {
201		return nil
202	}
203	gobject.IncreaseRef(cret)
204	cls = &ListItemFactory{}
205	cls.Ptr = cret
206	return cls
207}
208
209var xDropDownGetListFactory func(uintptr) uintptr
210
211// Gets the factory that's currently used to populate list items in the popup.
212func (x *DropDown) GetListFactory() *ListItemFactory {
213	var cls *ListItemFactory
214
215	cret := xDropDownGetListFactory(x.GoPointer())
216
217	if cret == 0 {
218		return nil
219	}
220	gobject.IncreaseRef(cret)
221	cls = &ListItemFactory{}
222	cls.Ptr = cret
223	return cls
224}
225
226var xDropDownGetModel func(uintptr) uintptr
227
228// Gets the model that provides the displayed items.
229func (x *DropDown) GetModel() *gio.ListModelBase {
230	var cls *gio.ListModelBase
231
232	cret := xDropDownGetModel(x.GoPointer())
233
234	if cret == 0 {
235		return nil
236	}
237	gobject.IncreaseRef(cret)
238	cls = &gio.ListModelBase{}
239	cls.Ptr = cret
240	return cls
241}
242
243var xDropDownGetSearchMatchMode func(uintptr) StringFilterMatchMode
244
245// Returns the match mode that the search filter is using.
246func (x *DropDown) GetSearchMatchMode() StringFilterMatchMode {
247
248	cret := xDropDownGetSearchMatchMode(x.GoPointer())
249	return cret
250}
251
252var xDropDownGetSelected func(uintptr) uint
253
254// Gets the position of the selected item.
255func (x *DropDown) GetSelected() uint {
256
257	cret := xDropDownGetSelected(x.GoPointer())
258	return cret
259}
260
261var xDropDownGetSelectedItem func(uintptr) uintptr
262
263// Gets the selected item. If no item is selected, %NULL is returned.
264func (x *DropDown) GetSelectedItem() *gobject.Object {
265	var cls *gobject.Object
266
267	cret := xDropDownGetSelectedItem(x.GoPointer())
268
269	if cret == 0 {
270		return nil
271	}
272	gobject.IncreaseRef(cret)
273	cls = &gobject.Object{}
274	cls.Ptr = cret
275	return cls
276}
277
278var xDropDownGetShowArrow func(uintptr) bool
279
280// Returns whether to show an arrow within the widget.
281func (x *DropDown) GetShowArrow() bool {
282
283	cret := xDropDownGetShowArrow(x.GoPointer())
284	return cret
285}
286
287var xDropDownSetEnableSearch func(uintptr, bool)
288
289// Sets whether a search entry will be shown in the popup that
290// allows to search for items in the list.
291//
292// Note that [property@Gtk.DropDown:expression] must be set for
293// search to work.
294func (x *DropDown) SetEnableSearch(EnableSearchVar bool) {
295
296	xDropDownSetEnableSearch(x.GoPointer(), EnableSearchVar)
297
298}
299
300var xDropDownSetExpression func(uintptr, uintptr)
301
302// Sets the expression that gets evaluated to obtain strings from items.
303//
304// This is used for search in the popup. The expression must have
305// a value type of %G_TYPE_STRING.
306func (x *DropDown) SetExpression(ExpressionVar *Expression) {
307
308	xDropDownSetExpression(x.GoPointer(), ExpressionVar.GoPointer())
309
310}
311
312var xDropDownSetFactory func(uintptr, uintptr)
313
314// Sets the `GtkListItemFactory` to use for populating list items.
315func (x *DropDown) SetFactory(FactoryVar *ListItemFactory) {
316
317	xDropDownSetFactory(x.GoPointer(), FactoryVar.GoPointer())
318
319}
320
321var xDropDownSetHeaderFactory func(uintptr, uintptr)
322
323// Sets the `GtkListItemFactory` to use for creating header widgets for the popup.
324func (x *DropDown) SetHeaderFactory(FactoryVar *ListItemFactory) {
325
326	xDropDownSetHeaderFactory(x.GoPointer(), FactoryVar.GoPointer())
327
328}
329
330var xDropDownSetListFactory func(uintptr, uintptr)
331
332// Sets the `GtkListItemFactory` to use for populating list items in the popup.
333func (x *DropDown) SetListFactory(FactoryVar *ListItemFactory) {
334
335	xDropDownSetListFactory(x.GoPointer(), FactoryVar.GoPointer())
336
337}
338
339var xDropDownSetModel func(uintptr, uintptr)
340
341// Sets the `GListModel` to use.
342func (x *DropDown) SetModel(ModelVar gio.ListModel) {
343
344	xDropDownSetModel(x.GoPointer(), ModelVar.GoPointer())
345
346}
347
348var xDropDownSetSearchMatchMode func(uintptr, StringFilterMatchMode)
349
350// Sets the match mode for the search filter.
351func (x *DropDown) SetSearchMatchMode(SearchMatchModeVar StringFilterMatchMode) {
352
353	xDropDownSetSearchMatchMode(x.GoPointer(), SearchMatchModeVar)
354
355}
356
357var xDropDownSetSelected func(uintptr, uint)
358
359// Selects the item at the given position.
360func (x *DropDown) SetSelected(PositionVar uint) {
361
362	xDropDownSetSelected(x.GoPointer(), PositionVar)
363
364}
365
366var xDropDownSetShowArrow func(uintptr, bool)
367
368// Sets whether an arrow will be displayed within the widget.
369func (x *DropDown) SetShowArrow(ShowArrowVar bool) {
370
371	xDropDownSetShowArrow(x.GoPointer(), ShowArrowVar)
372
373}
374
375func (c *DropDown) GoPointer() uintptr {
376	if c == nil {
377		return 0
378	}
379	return c.Ptr
380}
381
382func (c *DropDown) SetGoPointer(ptr uintptr) {
383	c.Ptr = ptr
384}
385
386// SetPropertyEnableSearch sets the "enable-search" property.
387// Whether to show a search entry in the popup.
388//
389// Note that search requires [property@Gtk.DropDown:expression]
390// to be set.
391func (x *DropDown) SetPropertyEnableSearch(value bool) {
392	var v gobject.Value
393	v.Init(gobject.TypeBooleanVal)
394	v.SetBoolean(value)
395	x.SetProperty("enable-search", &v)
396}
397
398// GetPropertyEnableSearch gets the "enable-search" property.
399// Whether to show a search entry in the popup.
400//
401// Note that search requires [property@Gtk.DropDown:expression]
402// to be set.
403func (x *DropDown) GetPropertyEnableSearch() bool {
404	var v gobject.Value
405	x.GetProperty("enable-search", &v)
406	return v.GetBoolean()
407}
408
409// SetPropertySelected sets the "selected" property.
410// The position of the selected item.
411//
412// If no item is selected, the property has the value
413// %GTK_INVALID_LIST_POSITION.
414func (x *DropDown) SetPropertySelected(value uint) {
415	var v gobject.Value
416	v.Init(gobject.TypeUintVal)
417	v.SetUint(value)
418	x.SetProperty("selected", &v)
419}
420
421// GetPropertySelected gets the "selected" property.
422// The position of the selected item.
423//
424// If no item is selected, the property has the value
425// %GTK_INVALID_LIST_POSITION.
426func (x *DropDown) GetPropertySelected() uint {
427	var v gobject.Value
428	x.GetProperty("selected", &v)
429	return v.GetUint()
430}
431
432// SetPropertyShowArrow sets the "show-arrow" property.
433// Whether to show an arrow within the GtkDropDown widget.
434func (x *DropDown) SetPropertyShowArrow(value bool) {
435	var v gobject.Value
436	v.Init(gobject.TypeBooleanVal)
437	v.SetBoolean(value)
438	x.SetProperty("show-arrow", &v)
439}
440
441// GetPropertyShowArrow gets the "show-arrow" property.
442// Whether to show an arrow within the GtkDropDown widget.
443func (x *DropDown) GetPropertyShowArrow() bool {
444	var v gobject.Value
445	x.GetProperty("show-arrow", &v)
446	return v.GetBoolean()
447}
448
449// Emitted to when the drop down is activated.
450//
451// The `::activate` signal on `GtkDropDown` is an action signal and
452// emitting it causes the drop down to pop up its dropdown.
453func (x *DropDown) ConnectActivate(cb *func(DropDown)) uint {
454	cbPtr := uintptr(unsafe.Pointer(cb))
455	if cbRefPtr, ok := glib.GetCallback(cbPtr); ok {
456		handlerID := gobject.SignalConnect(x.GoPointer(), "activate", cbRefPtr)
457		glib.SaveHandlerMapping(handlerID, cbPtr)
458		return handlerID
459	}
460
461	fcb := func(clsPtr uintptr) {
462		fa := DropDown{}
463		fa.Ptr = clsPtr
464		cbFn := *cb
465
466		cbFn(fa)
467
468	}
469	cbRefPtr := purego.NewCallback(fcb)
470	glib.SaveCallbackWithClosure(cbPtr, cbRefPtr, cb)
471	handlerID := gobject.SignalConnect(x.GoPointer(), "activate", cbRefPtr)
472	glib.SaveHandlerMapping(handlerID, cbPtr)
473	return handlerID
474}
475
476// Requests the user's screen reader to announce the given message.
477//
478// This kind of notification is useful for messages that
479// either have only a visual representation or that are not
480// exposed visually at all, e.g. a notification about a
481// successful operation.
482//
483// Also, by using this API, you can ensure that the message
484// does not interrupts the user's current screen reader output.
485func (x *DropDown) Announce(MessageVar string, PriorityVar AccessibleAnnouncementPriority) {
486
487	XGtkAccessibleAnnounce(x.GoPointer(), MessageVar, PriorityVar)
488
489}
490
491// Retrieves the accessible parent for an accessible object.
492//
493// This function returns `NULL` for top level widgets.
494func (x *DropDown) GetAccessibleParent() *AccessibleBase {
495	var cls *AccessibleBase
496
497	cret := XGtkAccessibleGetAccessibleParent(x.GoPointer())
498
499	if cret == 0 {
500		return nil
501	}
502	cls = &AccessibleBase{}
503	cls.Ptr = cret
504	return cls
505}
506
507// Retrieves the accessible role of an accessible object.
508func (x *DropDown) GetAccessibleRole() AccessibleRole {
509
510	cret := XGtkAccessibleGetAccessibleRole(x.GoPointer())
511	return cret
512}
513
514// Retrieves the implementation for the given accessible object.
515func (x *DropDown) GetAtContext() *ATContext {
516	var cls *ATContext
517
518	cret := XGtkAccessibleGetAtContext(x.GoPointer())
519
520	if cret == 0 {
521		return nil
522	}
523	cls = &ATContext{}
524	cls.Ptr = cret
525	return cls
526}
527
528// Queries the coordinates and dimensions of this accessible
529//
530// This functionality can be overridden by `GtkAccessible`
531// implementations, e.g. to get the bounds from an ignored
532// child widget.
533func (x *DropDown) GetBounds(XVar *int, YVar *int, WidthVar *int, HeightVar *int) bool {
534
535	cret := XGtkAccessibleGetBounds(x.GoPointer(), XVar, YVar, WidthVar, HeightVar)
536	return cret
537}
538
539// Retrieves the first accessible child of an accessible object.
540func (x *DropDown) GetFirstAccessibleChild() *AccessibleBase {
541	var cls *AccessibleBase
542
543	cret := XGtkAccessibleGetFirstAccessibleChild(x.GoPointer())
544
545	if cret == 0 {
546		return nil
547	}
548	cls = &AccessibleBase{}
549	cls.Ptr = cret
550	return cls
551}
552
553// Retrieves the next accessible sibling of an accessible object
554func (x *DropDown) GetNextAccessibleSibling() *AccessibleBase {
555	var cls *AccessibleBase
556
557	cret := XGtkAccessibleGetNextAccessibleSibling(x.GoPointer())
558
559	if cret == 0 {
560		return nil
561	}
562	cls = &AccessibleBase{}
563	cls.Ptr = cret
564	return cls
565}
566
567// Queries a platform state, such as focus.
568//
569// This functionality can be overridden by `GtkAccessible`
570// implementations, e.g. to get platform state from an ignored
571// child widget, as is the case for `GtkText` wrappers.
572func (x *DropDown) GetPlatformState(StateVar AccessiblePlatformState) bool {
573
574	cret := XGtkAccessibleGetPlatformState(x.GoPointer(), StateVar)
575	return cret
576}
577
578// Resets the accessible property to its default value.
579func (x *DropDown) ResetProperty(PropertyVar AccessibleProperty) {
580
581	XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar)
582
583}
584
585// Resets the accessible relation to its default value.
586func (x *DropDown) ResetRelation(RelationVar AccessibleRelation) {
587
588	XGtkAccessibleResetRelation(x.GoPointer(), RelationVar)
589
590}
591
592// Resets the accessible state to its default value.
593func (x *DropDown) ResetState(StateVar AccessibleState) {
594
595	XGtkAccessibleResetState(x.GoPointer(), StateVar)
596
597}
598
599// Sets the parent and sibling of an accessible object.
600//
601// This function is meant to be used by accessible implementations that are
602// not part of the widget hierarchy, and but act as a logical bridge between
603// widgets. For instance, if a widget creates an object that holds metadata
604// for each child, and you want that object to implement the `GtkAccessible`
605// interface, you will use this function to ensure that the parent of each
606// child widget is the metadata object, and the parent of each metadata
607// object is the container widget.
608func (x *DropDown) SetAccessibleParent(ParentVar Accessible, NextSiblingVar Accessible) {
609
610	XGtkAccessibleSetAccessibleParent(x.GoPointer(), ParentVar.GoPointer(), NextSiblingVar.GoPointer())
611
612}
613
614// Updates the next accessible sibling.
615//
616// That might be useful when a new child of a custom accessible
617// is created, and it needs to be linked to a previous child.
618func (x *DropDown) UpdateNextAccessibleSibling(NewSiblingVar Accessible) {
619
620	XGtkAccessibleUpdateNextAccessibleSibling(x.GoPointer(), NewSiblingVar.GoPointer())
621
622}
623
624// Informs ATs that the platform state has changed.
625//
626// This function should be used by `GtkAccessible` implementations that
627// have a platform state but are not widgets. Widgets handle platform
628// states automatically.
629func (x *DropDown) UpdatePlatformState(StateVar AccessiblePlatformState) {
630
631	XGtkAccessibleUpdatePlatformState(x.GoPointer(), StateVar)
632
633}
634
635// Updates a list of accessible properties.
636//
637// See the [enum@Gtk.AccessibleProperty] documentation for the
638// value types of accessible properties.
639//
640// This function should be called by `GtkWidget` types whenever
641// an accessible property change must be communicated to assistive
642// technologies.
643//
644// Example:
645// ```c
646// value = gtk_adjustment_get_value (adjustment);
647// gtk_accessible_update_property (GTK_ACCESSIBLE (spin_button),
648//
649//	GTK_ACCESSIBLE_PROPERTY_VALUE_NOW, value,
650//	-1);
651//
652// ```
653func (x *DropDown) UpdateProperty(FirstPropertyVar AccessibleProperty, varArgs ...interface{}) {
654
655	XGtkAccessibleUpdateProperty(x.GoPointer(), FirstPropertyVar, varArgs...)
656
657}
658
659// Updates an array of accessible properties.
660//
661// This function should be called by `GtkWidget` types whenever an accessible
662// property change must be communicated to assistive technologies.
663//
664// This function is meant to be used by language bindings.
665func (x *DropDown) UpdatePropertyValue(NPropertiesVar int, PropertiesVar []AccessibleProperty, ValuesVar []gobject.Value) {
666
667	XGtkAccessibleUpdatePropertyValue(x.GoPointer(), NPropertiesVar, PropertiesVar, ValuesVar)
668
669}
670
671// Updates a list of accessible relations.
672//
673// This function should be called by `GtkWidget` types whenever an accessible
674// relation change must be communicated to assistive technologies.
675//
676// If the [enum@Gtk.AccessibleRelation] requires a list of references,
677// you should pass each reference individually, followed by `NULL`, e.g.
678//
679// ```c
680// gtk_accessible_update_relation (accessible,
681//
682//	GTK_ACCESSIBLE_RELATION_CONTROLS,
683//	  ref1, NULL,
684//	GTK_ACCESSIBLE_RELATION_LABELLED_BY,
685//	  ref1, ref2, ref3, NULL,
686//	-1);
687//
688// ```
689func (x *DropDown) UpdateRelation(FirstRelationVar AccessibleRelation, varArgs ...interface{}) {
690
691	XGtkAccessibleUpdateRelation(x.GoPointer(), FirstRelationVar, varArgs...)
692
693}
694
695// Updates an array of accessible relations.
696//
697// This function should be called by `GtkWidget` types whenever an accessible
698// relation change must be communicated to assistive technologies.
699//
700// This function is meant to be used by language bindings.
701func (x *DropDown) UpdateRelationValue(NRelationsVar int, RelationsVar []AccessibleRelation, ValuesVar []gobject.Value) {
702
703	XGtkAccessibleUpdateRelationValue(x.GoPointer(), NRelationsVar, RelationsVar, ValuesVar)
704
705}
706
707// Updates a list of accessible states.
708//
709// See the [enum@Gtk.AccessibleState] documentation for the
710// value types of accessible states.
711//
712// This function should be called by `GtkWidget` types whenever
713// an accessible state change must be communicated to assistive
714// technologies.
715//
716// Example:
717//
718// ```c
719// value = GTK_ACCESSIBLE_TRISTATE_MIXED;
720// gtk_accessible_update_state (GTK_ACCESSIBLE (check_button),
721//
722//	GTK_ACCESSIBLE_STATE_CHECKED, value,
723//	-1);
724//
725// ```
726func (x *DropDown) UpdateState(FirstStateVar AccessibleState, varArgs ...interface{}) {
727
728	XGtkAccessibleUpdateState(x.GoPointer(), FirstStateVar, varArgs...)
729
730}
731
732// Updates an array of accessible states.
733//
734// This function should be called by `GtkWidget` types whenever an accessible
735// state change must be communicated to assistive technologies.
736//
737// This function is meant to be used by language bindings.
738func (x *DropDown) UpdateStateValue(NStatesVar int, StatesVar []AccessibleState, ValuesVar []gobject.Value) {
739
740	XGtkAccessibleUpdateStateValue(x.GoPointer(), NStatesVar, StatesVar, ValuesVar)
741
742}
743
744// Gets the ID of the @buildable object.
745//
746// `GtkBuilder` sets the name based on the ID attribute
747// of the `<object>` tag used to construct the @buildable.
748func (x *DropDown) GetBuildableId() string {
749
750	cret := XGtkBuildableGetBuildableId(x.GoPointer())
751	return cret
752}
753
754func init() {
755	core.SetPackageName("GTK", "gtk4")
756	core.SetSharedLibraries("GTK", []string{"libgtk-4.so.1"})
757	var libs []uintptr
758	for _, libPath := range core.GetPaths("GTK") {
759		lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL)
760		if err != nil {
761			panic(err)
762		}
763		libs = append(libs, lib)
764	}
765
766	core.PuregoSafeRegister(&xDropDownGLibType, libs, "gtk_drop_down_get_type")
767
768	core.PuregoSafeRegister(&xNewDropDown, libs, "gtk_drop_down_new")
769	core.PuregoSafeRegister(&xNewDropDownFromStrings, libs, "gtk_drop_down_new_from_strings")
770
771	core.PuregoSafeRegister(&xDropDownGetEnableSearch, libs, "gtk_drop_down_get_enable_search")
772	core.PuregoSafeRegister(&xDropDownGetExpression, libs, "gtk_drop_down_get_expression")
773	core.PuregoSafeRegister(&xDropDownGetFactory, libs, "gtk_drop_down_get_factory")
774	core.PuregoSafeRegister(&xDropDownGetHeaderFactory, libs, "gtk_drop_down_get_header_factory")
775	core.PuregoSafeRegister(&xDropDownGetListFactory, libs, "gtk_drop_down_get_list_factory")
776	core.PuregoSafeRegister(&xDropDownGetModel, libs, "gtk_drop_down_get_model")
777	core.PuregoSafeRegister(&xDropDownGetSearchMatchMode, libs, "gtk_drop_down_get_search_match_mode")
778	core.PuregoSafeRegister(&xDropDownGetSelected, libs, "gtk_drop_down_get_selected")
779	core.PuregoSafeRegister(&xDropDownGetSelectedItem, libs, "gtk_drop_down_get_selected_item")
780	core.PuregoSafeRegister(&xDropDownGetShowArrow, libs, "gtk_drop_down_get_show_arrow")
781	core.PuregoSafeRegister(&xDropDownSetEnableSearch, libs, "gtk_drop_down_set_enable_search")
782	core.PuregoSafeRegister(&xDropDownSetExpression, libs, "gtk_drop_down_set_expression")
783	core.PuregoSafeRegister(&xDropDownSetFactory, libs, "gtk_drop_down_set_factory")
784	core.PuregoSafeRegister(&xDropDownSetHeaderFactory, libs, "gtk_drop_down_set_header_factory")
785	core.PuregoSafeRegister(&xDropDownSetListFactory, libs, "gtk_drop_down_set_list_factory")
786	core.PuregoSafeRegister(&xDropDownSetModel, libs, "gtk_drop_down_set_model")
787	core.PuregoSafeRegister(&xDropDownSetSearchMatchMode, libs, "gtk_drop_down_set_search_match_mode")
788	core.PuregoSafeRegister(&xDropDownSetSelected, libs, "gtk_drop_down_set_selected")
789	core.PuregoSafeRegister(&xDropDownSetShowArrow, libs, "gtk_drop_down_set_show_arrow")
790
791}

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