v0.2.1 c0399be

gtkseparator.go RawHistoryFolder

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

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