v0.2.1 c0399be

gtklistbase.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/bnema/puregotk/v4/gobject"
9	"github.com/bnema/puregotk/v4/gobject/types"
10)
11
12type ListBaseClass struct {
13	_ structs.HostLayout
14}
15
16func (x *ListBaseClass) GoPointer() uintptr {
17	return uintptr(unsafe.Pointer(x))
18}
19
20// The abstract base class for GTK's list widgets.
21//
22// # Shortcuts and Gestures
23//
24// `GtkListBase` supports the following keyboard shortcuts:
25//
26//   - <kbd>Ctrl</kbd>+<kbd>A</kbd> or <kbd>Ctrl</kbd>+<kbd>/</kbd>
27//     selects all items.
28//   - <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>A</kbd> or
29//     <kbd>Ctrl</kbd>+<kbd>\</kbd> unselects all items.
30//
31// The focused item is controlled by the navigation keys below, combined
32// with the <kbd>Ctrl</kbd> modifier to prevent moving the selection,
33// and the <kbd>Shift</kbd> modifier to extend the current selection.
34//
35//   - <kbd>←</kbd>, <kbd>→</kbd>, <kbd>↑</kbd>, <kbd>↓</kbd> move the focus
36//     on the next item in the designed direction.
37//   - <kbd>Home</kbd> and <kbd>End</kbd> focus the first or last item.
38//   - <kbd>PgUp</kbd> and <kbd>PgDn</kbd> move the focus one page up or down.
39//
40// List item widgets support the following keyboard shortcuts:
41//
42//   - <kbd>Enter</kbd> activates the item.
43//   - <kbd>␣</kbd> selects the item, with the same <kbd>Ctrl</kbd> and
44//     <kbd>Shift</kbd> modifiers combinations as the navigation keys.
45//
46// # Actions
47//
48// `GtkListBase` defines a set of built-in actions:
49//
50//   - `list.scroll-to-item` moves the visible area to the item at given position
51//     with the minimum amount of scrolling required. If the item is already
52//     visible, nothing happens.
53//   - `list.select-item` changes the selection.
54//   - `list.select-all` selects all items in the model, if the selection model
55//     supports it.
56//   - `list.unselect-all` unselects all items in the model, if the selection
57//     model supports it.
58//
59// List item widgets install the following actions:
60//
61//   - `listitem.select` changes selection if the item is selectable.
62//   - `listitem.scroll-to` moves the visible area of the list to this item with
63//     the minimum amount of scrolling required.
64type ListBase struct {
65	Widget
66}
67
68var xListBaseGLibType func() types.GType
69
70func ListBaseGLibType() types.GType {
71	return xListBaseGLibType()
72}
73
74func ListBaseNewFromInternalPtr(ptr uintptr) *ListBase {
75	cls := &ListBase{}
76	cls.Ptr = ptr
77	return cls
78}
79
80func (c *ListBase) GoPointer() uintptr {
81	if c == nil {
82		return 0
83	}
84	return c.Ptr
85}
86
87func (c *ListBase) SetGoPointer(ptr uintptr) {
88	c.Ptr = ptr
89}
90
91// Requests the user's screen reader to announce the given message.
92//
93// This kind of notification is useful for messages that
94// either have only a visual representation or that are not
95// exposed visually at all, e.g. a notification about a
96// successful operation.
97//
98// Also, by using this API, you can ensure that the message
99// does not interrupts the user's current screen reader output.
100func (x *ListBase) Announce(MessageVar string, PriorityVar AccessibleAnnouncementPriority) {
101
102	XGtkAccessibleAnnounce(x.GoPointer(), MessageVar, PriorityVar)
103
104}
105
106// Retrieves the accessible parent for an accessible object.
107//
108// This function returns `NULL` for top level widgets.
109func (x *ListBase) GetAccessibleParent() *AccessibleBase {
110	var cls *AccessibleBase
111
112	cret := XGtkAccessibleGetAccessibleParent(x.GoPointer())
113
114	if cret == 0 {
115		return nil
116	}
117	cls = &AccessibleBase{}
118	cls.Ptr = cret
119	return cls
120}
121
122// Retrieves the accessible role of an accessible object.
123func (x *ListBase) GetAccessibleRole() AccessibleRole {
124
125	cret := XGtkAccessibleGetAccessibleRole(x.GoPointer())
126	return cret
127}
128
129// Retrieves the implementation for the given accessible object.
130func (x *ListBase) GetAtContext() *ATContext {
131	var cls *ATContext
132
133	cret := XGtkAccessibleGetAtContext(x.GoPointer())
134
135	if cret == 0 {
136		return nil
137	}
138	cls = &ATContext{}
139	cls.Ptr = cret
140	return cls
141}
142
143// Queries the coordinates and dimensions of this accessible
144//
145// This functionality can be overridden by `GtkAccessible`
146// implementations, e.g. to get the bounds from an ignored
147// child widget.
148func (x *ListBase) GetBounds(XVar *int, YVar *int, WidthVar *int, HeightVar *int) bool {
149
150	cret := XGtkAccessibleGetBounds(x.GoPointer(), XVar, YVar, WidthVar, HeightVar)
151	return cret
152}
153
154// Retrieves the first accessible child of an accessible object.
155func (x *ListBase) GetFirstAccessibleChild() *AccessibleBase {
156	var cls *AccessibleBase
157
158	cret := XGtkAccessibleGetFirstAccessibleChild(x.GoPointer())
159
160	if cret == 0 {
161		return nil
162	}
163	cls = &AccessibleBase{}
164	cls.Ptr = cret
165	return cls
166}
167
168// Retrieves the next accessible sibling of an accessible object
169func (x *ListBase) GetNextAccessibleSibling() *AccessibleBase {
170	var cls *AccessibleBase
171
172	cret := XGtkAccessibleGetNextAccessibleSibling(x.GoPointer())
173
174	if cret == 0 {
175		return nil
176	}
177	cls = &AccessibleBase{}
178	cls.Ptr = cret
179	return cls
180}
181
182// Queries a platform state, such as focus.
183//
184// This functionality can be overridden by `GtkAccessible`
185// implementations, e.g. to get platform state from an ignored
186// child widget, as is the case for `GtkText` wrappers.
187func (x *ListBase) GetPlatformState(StateVar AccessiblePlatformState) bool {
188
189	cret := XGtkAccessibleGetPlatformState(x.GoPointer(), StateVar)
190	return cret
191}
192
193// Resets the accessible property to its default value.
194func (x *ListBase) ResetProperty(PropertyVar AccessibleProperty) {
195
196	XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar)
197
198}
199
200// Resets the accessible relation to its default value.
201func (x *ListBase) ResetRelation(RelationVar AccessibleRelation) {
202
203	XGtkAccessibleResetRelation(x.GoPointer(), RelationVar)
204
205}
206
207// Resets the accessible state to its default value.
208func (x *ListBase) ResetState(StateVar AccessibleState) {
209
210	XGtkAccessibleResetState(x.GoPointer(), StateVar)
211
212}
213
214// Sets the parent and sibling of an accessible object.
215//
216// This function is meant to be used by accessible implementations that are
217// not part of the widget hierarchy, and but act as a logical bridge between
218// widgets. For instance, if a widget creates an object that holds metadata
219// for each child, and you want that object to implement the `GtkAccessible`
220// interface, you will use this function to ensure that the parent of each
221// child widget is the metadata object, and the parent of each metadata
222// object is the container widget.
223func (x *ListBase) SetAccessibleParent(ParentVar Accessible, NextSiblingVar Accessible) {
224
225	XGtkAccessibleSetAccessibleParent(x.GoPointer(), ParentVar.GoPointer(), NextSiblingVar.GoPointer())
226
227}
228
229// Updates the next accessible sibling.
230//
231// That might be useful when a new child of a custom accessible
232// is created, and it needs to be linked to a previous child.
233func (x *ListBase) UpdateNextAccessibleSibling(NewSiblingVar Accessible) {
234
235	XGtkAccessibleUpdateNextAccessibleSibling(x.GoPointer(), NewSiblingVar.GoPointer())
236
237}
238
239// Informs ATs that the platform state has changed.
240//
241// This function should be used by `GtkAccessible` implementations that
242// have a platform state but are not widgets. Widgets handle platform
243// states automatically.
244func (x *ListBase) UpdatePlatformState(StateVar AccessiblePlatformState) {
245
246	XGtkAccessibleUpdatePlatformState(x.GoPointer(), StateVar)
247
248}
249
250// Updates a list of accessible properties.
251//
252// See the [enum@Gtk.AccessibleProperty] documentation for the
253// value types of accessible properties.
254//
255// This function should be called by `GtkWidget` types whenever
256// an accessible property change must be communicated to assistive
257// technologies.
258//
259// Example:
260// ```c
261// value = gtk_adjustment_get_value (adjustment);
262// gtk_accessible_update_property (GTK_ACCESSIBLE (spin_button),
263//
264//	GTK_ACCESSIBLE_PROPERTY_VALUE_NOW, value,
265//	-1);
266//
267// ```
268func (x *ListBase) UpdateProperty(FirstPropertyVar AccessibleProperty, varArgs ...interface{}) {
269
270	XGtkAccessibleUpdateProperty(x.GoPointer(), FirstPropertyVar, varArgs...)
271
272}
273
274// Updates an array of accessible properties.
275//
276// This function should be called by `GtkWidget` types whenever an accessible
277// property change must be communicated to assistive technologies.
278//
279// This function is meant to be used by language bindings.
280func (x *ListBase) UpdatePropertyValue(NPropertiesVar int, PropertiesVar []AccessibleProperty, ValuesVar []gobject.Value) {
281
282	XGtkAccessibleUpdatePropertyValue(x.GoPointer(), NPropertiesVar, PropertiesVar, ValuesVar)
283
284}
285
286// Updates a list of accessible relations.
287//
288// This function should be called by `GtkWidget` types whenever an accessible
289// relation change must be communicated to assistive technologies.
290//
291// If the [enum@Gtk.AccessibleRelation] requires a list of references,
292// you should pass each reference individually, followed by `NULL`, e.g.
293//
294// ```c
295// gtk_accessible_update_relation (accessible,
296//
297//	GTK_ACCESSIBLE_RELATION_CONTROLS,
298//	  ref1, NULL,
299//	GTK_ACCESSIBLE_RELATION_LABELLED_BY,
300//	  ref1, ref2, ref3, NULL,
301//	-1);
302//
303// ```
304func (x *ListBase) UpdateRelation(FirstRelationVar AccessibleRelation, varArgs ...interface{}) {
305
306	XGtkAccessibleUpdateRelation(x.GoPointer(), FirstRelationVar, varArgs...)
307
308}
309
310// Updates an array of accessible relations.
311//
312// This function should be called by `GtkWidget` types whenever an accessible
313// relation change must be communicated to assistive technologies.
314//
315// This function is meant to be used by language bindings.
316func (x *ListBase) UpdateRelationValue(NRelationsVar int, RelationsVar []AccessibleRelation, ValuesVar []gobject.Value) {
317
318	XGtkAccessibleUpdateRelationValue(x.GoPointer(), NRelationsVar, RelationsVar, ValuesVar)
319
320}
321
322// Updates a list of accessible states.
323//
324// See the [enum@Gtk.AccessibleState] documentation for the
325// value types of accessible states.
326//
327// This function should be called by `GtkWidget` types whenever
328// an accessible state change must be communicated to assistive
329// technologies.
330//
331// Example:
332//
333// ```c
334// value = GTK_ACCESSIBLE_TRISTATE_MIXED;
335// gtk_accessible_update_state (GTK_ACCESSIBLE (check_button),
336//
337//	GTK_ACCESSIBLE_STATE_CHECKED, value,
338//	-1);
339//
340// ```
341func (x *ListBase) UpdateState(FirstStateVar AccessibleState, varArgs ...interface{}) {
342
343	XGtkAccessibleUpdateState(x.GoPointer(), FirstStateVar, varArgs...)
344
345}
346
347// Updates an array of accessible states.
348//
349// This function should be called by `GtkWidget` types whenever an accessible
350// state change must be communicated to assistive technologies.
351//
352// This function is meant to be used by language bindings.
353func (x *ListBase) UpdateStateValue(NStatesVar int, StatesVar []AccessibleState, ValuesVar []gobject.Value) {
354
355	XGtkAccessibleUpdateStateValue(x.GoPointer(), NStatesVar, StatesVar, ValuesVar)
356
357}
358
359// Gets the ID of the @buildable object.
360//
361// `GtkBuilder` sets the name based on the ID attribute
362// of the `<object>` tag used to construct the @buildable.
363func (x *ListBase) GetBuildableId() string {
364
365	cret := XGtkBuildableGetBuildableId(x.GoPointer())
366	return cret
367}
368
369// Retrieves the orientation of the @orientable.
370func (x *ListBase) GetOrientation() Orientation {
371
372	cret := XGtkOrientableGetOrientation(x.GoPointer())
373	return cret
374}
375
376// Sets the orientation of the @orientable.
377func (x *ListBase) SetOrientation(OrientationVar Orientation) {
378
379	XGtkOrientableSetOrientation(x.GoPointer(), OrientationVar)
380
381}
382
383// Returns the size of a non-scrolling border around the
384// outside of the scrollable.
385//
386// An example for this would be treeview headers. GTK can use
387// this information to display overlaid graphics, like the
388// overshoot indication, at the right position.
389func (x *ListBase) GetBorder(BorderVar *Border) bool {
390
391	cret := XGtkScrollableGetBorder(x.GoPointer(), BorderVar)
392	return cret
393}
394
395// Retrieves the `GtkAdjustment` used for horizontal scrolling.
396func (x *ListBase) GetHadjustment() *Adjustment {
397	var cls *Adjustment
398
399	cret := XGtkScrollableGetHadjustment(x.GoPointer())
400
401	if cret == 0 {
402		return nil
403	}
404	gobject.IncreaseRef(cret)
405	cls = &Adjustment{}
406	cls.Ptr = cret
407	return cls
408}
409
410// Gets the horizontal `GtkScrollablePolicy`.
411func (x *ListBase) GetHscrollPolicy() ScrollablePolicy {
412
413	cret := XGtkScrollableGetHscrollPolicy(x.GoPointer())
414	return cret
415}
416
417// Retrieves the `GtkAdjustment` used for vertical scrolling.
418func (x *ListBase) GetVadjustment() *Adjustment {
419	var cls *Adjustment
420
421	cret := XGtkScrollableGetVadjustment(x.GoPointer())
422
423	if cret == 0 {
424		return nil
425	}
426	gobject.IncreaseRef(cret)
427	cls = &Adjustment{}
428	cls.Ptr = cret
429	return cls
430}
431
432// Gets the vertical `GtkScrollablePolicy`.
433func (x *ListBase) GetVscrollPolicy() ScrollablePolicy {
434
435	cret := XGtkScrollableGetVscrollPolicy(x.GoPointer())
436	return cret
437}
438
439// Sets the horizontal adjustment of the `GtkScrollable`.
440func (x *ListBase) SetHadjustment(HadjustmentVar *Adjustment) {
441
442	XGtkScrollableSetHadjustment(x.GoPointer(), HadjustmentVar.GoPointer())
443
444}
445
446// Sets the `GtkScrollablePolicy`.
447//
448// The policy determines whether horizontal scrolling should start
449// below the minimum width or below the natural width.
450func (x *ListBase) SetHscrollPolicy(PolicyVar ScrollablePolicy) {
451
452	XGtkScrollableSetHscrollPolicy(x.GoPointer(), PolicyVar)
453
454}
455
456// Sets the vertical adjustment of the `GtkScrollable`.
457func (x *ListBase) SetVadjustment(VadjustmentVar *Adjustment) {
458
459	XGtkScrollableSetVadjustment(x.GoPointer(), VadjustmentVar.GoPointer())
460
461}
462
463// Sets the `GtkScrollablePolicy`.
464//
465// The policy determines whether vertical scrolling should start
466// below the minimum height or below the natural height.
467func (x *ListBase) SetVscrollPolicy(PolicyVar ScrollablePolicy) {
468
469	XGtkScrollableSetVscrollPolicy(x.GoPointer(), PolicyVar)
470
471}

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