v0.2.2 9100209

gtkshortcutlabel.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/gobject"
12	"github.com/bnema/puregotk/v4/gobject/types"
13)
14
15type ShortcutLabelClass struct {
16	_ structs.HostLayout
17}
18
19func (x *ShortcutLabelClass) GoPointer() uintptr {
20	return uintptr(unsafe.Pointer(x))
21}
22
23// `GtkShortcutLabel` displays a single keyboard shortcut or gesture.
24//
25// The main use case for `GtkShortcutLabel` is inside a [class@Gtk.ShortcutsWindow].
26type ShortcutLabel struct {
27	Widget
28}
29
30var xShortcutLabelGLibType func() types.GType
31
32func ShortcutLabelGLibType() types.GType {
33	return xShortcutLabelGLibType()
34}
35
36func ShortcutLabelNewFromInternalPtr(ptr uintptr) *ShortcutLabel {
37	cls := &ShortcutLabel{}
38	cls.Ptr = ptr
39	return cls
40}
41
42var xNewShortcutLabel func(string) uintptr
43
44// Creates a new `GtkShortcutLabel` with @accelerator set.
45func NewShortcutLabel(AcceleratorVar string) *ShortcutLabel {
46	var cls *ShortcutLabel
47
48	cret := xNewShortcutLabel(AcceleratorVar)
49
50	if cret == 0 {
51		return nil
52	}
53	gobject.IncreaseRef(cret)
54	cls = &ShortcutLabel{}
55	cls.Ptr = cret
56	return cls
57}
58
59var xShortcutLabelGetAccelerator func(uintptr) string
60
61// Retrieves the current accelerator of @self.
62func (x *ShortcutLabel) GetAccelerator() string {
63
64	cret := xShortcutLabelGetAccelerator(x.GoPointer())
65	return cret
66}
67
68var xShortcutLabelGetDisabledText func(uintptr) string
69
70// Retrieves the text that is displayed when no accelerator is set.
71func (x *ShortcutLabel) GetDisabledText() string {
72
73	cret := xShortcutLabelGetDisabledText(x.GoPointer())
74	return cret
75}
76
77var xShortcutLabelSetAccelerator func(uintptr, string)
78
79// Sets the accelerator to be displayed by @self.
80func (x *ShortcutLabel) SetAccelerator(AcceleratorVar string) {
81
82	xShortcutLabelSetAccelerator(x.GoPointer(), AcceleratorVar)
83
84}
85
86var xShortcutLabelSetDisabledText func(uintptr, string)
87
88// Sets the text to be displayed by @self when no accelerator is set.
89func (x *ShortcutLabel) SetDisabledText(DisabledTextVar string) {
90
91	xShortcutLabelSetDisabledText(x.GoPointer(), DisabledTextVar)
92
93}
94
95func (c *ShortcutLabel) GoPointer() uintptr {
96	if c == nil {
97		return 0
98	}
99	return c.Ptr
100}
101
102func (c *ShortcutLabel) SetGoPointer(ptr uintptr) {
103	c.Ptr = ptr
104}
105
106// SetPropertyAccelerator sets the "accelerator" property.
107// The accelerator that @self displays.
108//
109// See [property@Gtk.ShortcutsShortcut:accelerator]
110// for the accepted syntax.
111func (x *ShortcutLabel) SetPropertyAccelerator(value string) {
112	var v gobject.Value
113	v.Init(gobject.TypeStringVal)
114	v.SetString(&value)
115	x.SetProperty("accelerator", &v)
116}
117
118// GetPropertyAccelerator gets the "accelerator" property.
119// The accelerator that @self displays.
120//
121// See [property@Gtk.ShortcutsShortcut:accelerator]
122// for the accepted syntax.
123func (x *ShortcutLabel) GetPropertyAccelerator() string {
124	var v gobject.Value
125	x.GetProperty("accelerator", &v)
126	return v.GetString()
127}
128
129// SetPropertyDisabledText sets the "disabled-text" property.
130// The text that is displayed when no accelerator is set.
131func (x *ShortcutLabel) SetPropertyDisabledText(value string) {
132	var v gobject.Value
133	v.Init(gobject.TypeStringVal)
134	v.SetString(&value)
135	x.SetProperty("disabled-text", &v)
136}
137
138// GetPropertyDisabledText gets the "disabled-text" property.
139// The text that is displayed when no accelerator is set.
140func (x *ShortcutLabel) GetPropertyDisabledText() string {
141	var v gobject.Value
142	x.GetProperty("disabled-text", &v)
143	return v.GetString()
144}
145
146// Requests the user's screen reader to announce the given message.
147//
148// This kind of notification is useful for messages that
149// either have only a visual representation or that are not
150// exposed visually at all, e.g. a notification about a
151// successful operation.
152//
153// Also, by using this API, you can ensure that the message
154// does not interrupts the user's current screen reader output.
155func (x *ShortcutLabel) Announce(MessageVar string, PriorityVar AccessibleAnnouncementPriority) {
156
157	XGtkAccessibleAnnounce(x.GoPointer(), MessageVar, PriorityVar)
158
159}
160
161// Retrieves the accessible parent for an accessible object.
162//
163// This function returns `NULL` for top level widgets.
164func (x *ShortcutLabel) GetAccessibleParent() *AccessibleBase {
165	var cls *AccessibleBase
166
167	cret := XGtkAccessibleGetAccessibleParent(x.GoPointer())
168
169	if cret == 0 {
170		return nil
171	}
172	cls = &AccessibleBase{}
173	cls.Ptr = cret
174	return cls
175}
176
177// Retrieves the accessible role of an accessible object.
178func (x *ShortcutLabel) GetAccessibleRole() AccessibleRole {
179
180	cret := XGtkAccessibleGetAccessibleRole(x.GoPointer())
181	return cret
182}
183
184// Retrieves the implementation for the given accessible object.
185func (x *ShortcutLabel) GetAtContext() *ATContext {
186	var cls *ATContext
187
188	cret := XGtkAccessibleGetAtContext(x.GoPointer())
189
190	if cret == 0 {
191		return nil
192	}
193	cls = &ATContext{}
194	cls.Ptr = cret
195	return cls
196}
197
198// Queries the coordinates and dimensions of this accessible
199//
200// This functionality can be overridden by `GtkAccessible`
201// implementations, e.g. to get the bounds from an ignored
202// child widget.
203func (x *ShortcutLabel) GetBounds(XVar *int, YVar *int, WidthVar *int, HeightVar *int) bool {
204
205	cret := XGtkAccessibleGetBounds(x.GoPointer(), XVar, YVar, WidthVar, HeightVar)
206	return cret
207}
208
209// Retrieves the first accessible child of an accessible object.
210func (x *ShortcutLabel) GetFirstAccessibleChild() *AccessibleBase {
211	var cls *AccessibleBase
212
213	cret := XGtkAccessibleGetFirstAccessibleChild(x.GoPointer())
214
215	if cret == 0 {
216		return nil
217	}
218	cls = &AccessibleBase{}
219	cls.Ptr = cret
220	return cls
221}
222
223// Retrieves the next accessible sibling of an accessible object
224func (x *ShortcutLabel) GetNextAccessibleSibling() *AccessibleBase {
225	var cls *AccessibleBase
226
227	cret := XGtkAccessibleGetNextAccessibleSibling(x.GoPointer())
228
229	if cret == 0 {
230		return nil
231	}
232	cls = &AccessibleBase{}
233	cls.Ptr = cret
234	return cls
235}
236
237// Queries a platform state, such as focus.
238//
239// This functionality can be overridden by `GtkAccessible`
240// implementations, e.g. to get platform state from an ignored
241// child widget, as is the case for `GtkText` wrappers.
242func (x *ShortcutLabel) GetPlatformState(StateVar AccessiblePlatformState) bool {
243
244	cret := XGtkAccessibleGetPlatformState(x.GoPointer(), StateVar)
245	return cret
246}
247
248// Resets the accessible property to its default value.
249func (x *ShortcutLabel) ResetProperty(PropertyVar AccessibleProperty) {
250
251	XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar)
252
253}
254
255// Resets the accessible relation to its default value.
256func (x *ShortcutLabel) ResetRelation(RelationVar AccessibleRelation) {
257
258	XGtkAccessibleResetRelation(x.GoPointer(), RelationVar)
259
260}
261
262// Resets the accessible state to its default value.
263func (x *ShortcutLabel) ResetState(StateVar AccessibleState) {
264
265	XGtkAccessibleResetState(x.GoPointer(), StateVar)
266
267}
268
269// Sets the parent and sibling of an accessible object.
270//
271// This function is meant to be used by accessible implementations that are
272// not part of the widget hierarchy, and but act as a logical bridge between
273// widgets. For instance, if a widget creates an object that holds metadata
274// for each child, and you want that object to implement the `GtkAccessible`
275// interface, you will use this function to ensure that the parent of each
276// child widget is the metadata object, and the parent of each metadata
277// object is the container widget.
278func (x *ShortcutLabel) SetAccessibleParent(ParentVar Accessible, NextSiblingVar Accessible) {
279
280	XGtkAccessibleSetAccessibleParent(x.GoPointer(), ParentVar.GoPointer(), NextSiblingVar.GoPointer())
281
282}
283
284// Updates the next accessible sibling.
285//
286// That might be useful when a new child of a custom accessible
287// is created, and it needs to be linked to a previous child.
288func (x *ShortcutLabel) UpdateNextAccessibleSibling(NewSiblingVar Accessible) {
289
290	XGtkAccessibleUpdateNextAccessibleSibling(x.GoPointer(), NewSiblingVar.GoPointer())
291
292}
293
294// Informs ATs that the platform state has changed.
295//
296// This function should be used by `GtkAccessible` implementations that
297// have a platform state but are not widgets. Widgets handle platform
298// states automatically.
299func (x *ShortcutLabel) UpdatePlatformState(StateVar AccessiblePlatformState) {
300
301	XGtkAccessibleUpdatePlatformState(x.GoPointer(), StateVar)
302
303}
304
305// Updates a list of accessible properties.
306//
307// See the [enum@Gtk.AccessibleProperty] documentation for the
308// value types of accessible properties.
309//
310// This function should be called by `GtkWidget` types whenever
311// an accessible property change must be communicated to assistive
312// technologies.
313//
314// Example:
315// ```c
316// value = gtk_adjustment_get_value (adjustment);
317// gtk_accessible_update_property (GTK_ACCESSIBLE (spin_button),
318//
319//	GTK_ACCESSIBLE_PROPERTY_VALUE_NOW, value,
320//	-1);
321//
322// ```
323func (x *ShortcutLabel) UpdateProperty(FirstPropertyVar AccessibleProperty, varArgs ...interface{}) {
324
325	XGtkAccessibleUpdateProperty(x.GoPointer(), FirstPropertyVar, varArgs...)
326
327}
328
329// Updates an array of accessible properties.
330//
331// This function should be called by `GtkWidget` types whenever an accessible
332// property change must be communicated to assistive technologies.
333//
334// This function is meant to be used by language bindings.
335func (x *ShortcutLabel) UpdatePropertyValue(NPropertiesVar int, PropertiesVar []AccessibleProperty, ValuesVar []gobject.Value) {
336
337	XGtkAccessibleUpdatePropertyValue(x.GoPointer(), NPropertiesVar, PropertiesVar, ValuesVar)
338
339}
340
341// Updates a list of accessible relations.
342//
343// This function should be called by `GtkWidget` types whenever an accessible
344// relation change must be communicated to assistive technologies.
345//
346// If the [enum@Gtk.AccessibleRelation] requires a list of references,
347// you should pass each reference individually, followed by `NULL`, e.g.
348//
349// ```c
350// gtk_accessible_update_relation (accessible,
351//
352//	GTK_ACCESSIBLE_RELATION_CONTROLS,
353//	  ref1, NULL,
354//	GTK_ACCESSIBLE_RELATION_LABELLED_BY,
355//	  ref1, ref2, ref3, NULL,
356//	-1);
357//
358// ```
359func (x *ShortcutLabel) UpdateRelation(FirstRelationVar AccessibleRelation, varArgs ...interface{}) {
360
361	XGtkAccessibleUpdateRelation(x.GoPointer(), FirstRelationVar, varArgs...)
362
363}
364
365// Updates an array of accessible relations.
366//
367// This function should be called by `GtkWidget` types whenever an accessible
368// relation change must be communicated to assistive technologies.
369//
370// This function is meant to be used by language bindings.
371func (x *ShortcutLabel) UpdateRelationValue(NRelationsVar int, RelationsVar []AccessibleRelation, ValuesVar []gobject.Value) {
372
373	XGtkAccessibleUpdateRelationValue(x.GoPointer(), NRelationsVar, RelationsVar, ValuesVar)
374
375}
376
377// Updates a list of accessible states.
378//
379// See the [enum@Gtk.AccessibleState] documentation for the
380// value types of accessible states.
381//
382// This function should be called by `GtkWidget` types whenever
383// an accessible state change must be communicated to assistive
384// technologies.
385//
386// Example:
387//
388// ```c
389// value = GTK_ACCESSIBLE_TRISTATE_MIXED;
390// gtk_accessible_update_state (GTK_ACCESSIBLE (check_button),
391//
392//	GTK_ACCESSIBLE_STATE_CHECKED, value,
393//	-1);
394//
395// ```
396func (x *ShortcutLabel) UpdateState(FirstStateVar AccessibleState, varArgs ...interface{}) {
397
398	XGtkAccessibleUpdateState(x.GoPointer(), FirstStateVar, varArgs...)
399
400}
401
402// Updates an array of accessible states.
403//
404// This function should be called by `GtkWidget` types whenever an accessible
405// state change must be communicated to assistive technologies.
406//
407// This function is meant to be used by language bindings.
408func (x *ShortcutLabel) UpdateStateValue(NStatesVar int, StatesVar []AccessibleState, ValuesVar []gobject.Value) {
409
410	XGtkAccessibleUpdateStateValue(x.GoPointer(), NStatesVar, StatesVar, ValuesVar)
411
412}
413
414// Gets the ID of the @buildable object.
415//
416// `GtkBuilder` sets the name based on the ID attribute
417// of the `<object>` tag used to construct the @buildable.
418func (x *ShortcutLabel) GetBuildableId() string {
419
420	cret := XGtkBuildableGetBuildableId(x.GoPointer())
421	return cret
422}
423
424func init() {
425	core.SetPackageName("GTK", "gtk4")
426	core.SetSharedLibraries("GTK", []string{"libgtk-4.so.1"})
427	var libs []uintptr
428	for _, libPath := range core.GetPaths("GTK") {
429		lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL)
430		if err != nil {
431			panic(err)
432		}
433		libs = append(libs, lib)
434	}
435
436	core.PuregoSafeRegister(&xShortcutLabelGLibType, libs, "gtk_shortcut_label_get_type")
437
438	core.PuregoSafeRegister(&xNewShortcutLabel, libs, "gtk_shortcut_label_new")
439
440	core.PuregoSafeRegister(&xShortcutLabelGetAccelerator, libs, "gtk_shortcut_label_get_accelerator")
441	core.PuregoSafeRegister(&xShortcutLabelGetDisabledText, libs, "gtk_shortcut_label_get_disabled_text")
442	core.PuregoSafeRegister(&xShortcutLabelSetAccelerator, libs, "gtk_shortcut_label_set_accelerator")
443	core.PuregoSafeRegister(&xShortcutLabelSetDisabledText, libs, "gtk_shortcut_label_set_disabled_text")
444
445}

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