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