v0.2.1 c0399be

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

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