v0.2.1 c0399be

adw-layout-slot.go RawHistoryFolder

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

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