v0.2.1 c0399be

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

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