1// Package gtk was automatically generated by github.com/bnema/puregotk DO NOT EDIT
2package gtk
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/glib"
12 "github.com/bnema/puregotk/v4/gobject"
13 "github.com/bnema/puregotk/v4/gobject/types"
14)
15
16// The common interface for accessible objects.
17type AccessibleInterface struct {
18 _ structs.HostLayout
19
20 GIface uintptr
21
22 xGetAtContext uintptr
23
24 xGetPlatformState uintptr
25
26 xGetAccessibleParent uintptr
27
28 xGetFirstAccessibleChild uintptr
29
30 xGetNextAccessibleSibling uintptr
31
32 xGetBounds uintptr
33}
34
35func (x *AccessibleInterface) GoPointer() uintptr {
36 return uintptr(unsafe.Pointer(x))
37}
38
39// OverrideGetAtContext sets the "get_at_context" callback function.
40// retrieve the platform-specific accessibility context
41//
42// for the accessible implementation
43func (x *AccessibleInterface) OverrideGetAtContext(cb func(Accessible) *ATContext) {
44 if cb == nil {
45 x.xGetAtContext = 0
46 } else {
47 x.xGetAtContext = purego.NewCallback(func(SelfVarp uintptr) uintptr {
48 ret := cb(&AccessibleBase{Ptr: SelfVarp})
49 if ret == nil {
50 return 0
51 }
52 return ret.GoPointer()
53 })
54 }
55}
56
57// GetGetAtContext gets the "get_at_context" callback function.
58// retrieve the platform-specific accessibility context
59//
60// for the accessible implementation
61func (x *AccessibleInterface) GetGetAtContext() func(Accessible) *ATContext {
62 if x.xGetAtContext == 0 {
63 return nil
64 }
65 var rawCallback func(SelfVarp uintptr) uintptr
66 purego.RegisterFunc(&rawCallback, x.xGetAtContext)
67 return func(SelfVar Accessible) *ATContext {
68 rawRet := rawCallback(SelfVar.GoPointer())
69 if rawRet == 0 {
70 return nil
71 }
72 ret := &ATContext{}
73 ret.Ptr = rawRet
74 return ret
75 }
76}
77
78// OverrideGetPlatformState sets the "get_platform_state" callback function.
79// retrieve the accessible state
80func (x *AccessibleInterface) OverrideGetPlatformState(cb func(Accessible, AccessiblePlatformState) bool) {
81 if cb == nil {
82 x.xGetPlatformState = 0
83 } else {
84 x.xGetPlatformState = purego.NewCallback(func(SelfVarp uintptr, StateVarp AccessiblePlatformState) bool {
85 return cb(&AccessibleBase{Ptr: SelfVarp}, StateVarp)
86 })
87 }
88}
89
90// GetGetPlatformState gets the "get_platform_state" callback function.
91// retrieve the accessible state
92func (x *AccessibleInterface) GetGetPlatformState() func(Accessible, AccessiblePlatformState) bool {
93 if x.xGetPlatformState == 0 {
94 return nil
95 }
96 var rawCallback func(SelfVarp uintptr, StateVarp AccessiblePlatformState) bool
97 purego.RegisterFunc(&rawCallback, x.xGetPlatformState)
98 return func(SelfVar Accessible, StateVar AccessiblePlatformState) bool {
99 return rawCallback(SelfVar.GoPointer(), StateVar)
100 }
101}
102
103// OverrideGetAccessibleParent sets the "get_accessible_parent" callback function.
104func (x *AccessibleInterface) OverrideGetAccessibleParent(cb func(Accessible) *AccessibleBase) {
105 if cb == nil {
106 x.xGetAccessibleParent = 0
107 } else {
108 x.xGetAccessibleParent = purego.NewCallback(func(SelfVarp uintptr) uintptr {
109 ret := cb(&AccessibleBase{Ptr: SelfVarp})
110 if ret == nil {
111 return 0
112 }
113 return ret.GoPointer()
114 })
115 }
116}
117
118// GetGetAccessibleParent gets the "get_accessible_parent" callback function.
119func (x *AccessibleInterface) GetGetAccessibleParent() func(Accessible) *AccessibleBase {
120 if x.xGetAccessibleParent == 0 {
121 return nil
122 }
123 var rawCallback func(SelfVarp uintptr) uintptr
124 purego.RegisterFunc(&rawCallback, x.xGetAccessibleParent)
125 return func(SelfVar Accessible) *AccessibleBase {
126 rawRet := rawCallback(SelfVar.GoPointer())
127 if rawRet == 0 {
128 return nil
129 }
130 ret := &AccessibleBase{}
131 ret.Ptr = rawRet
132 return ret
133 }
134}
135
136// OverrideGetFirstAccessibleChild sets the "get_first_accessible_child" callback function.
137func (x *AccessibleInterface) OverrideGetFirstAccessibleChild(cb func(Accessible) *AccessibleBase) {
138 if cb == nil {
139 x.xGetFirstAccessibleChild = 0
140 } else {
141 x.xGetFirstAccessibleChild = purego.NewCallback(func(SelfVarp uintptr) uintptr {
142 ret := cb(&AccessibleBase{Ptr: SelfVarp})
143 if ret == nil {
144 return 0
145 }
146 return ret.GoPointer()
147 })
148 }
149}
150
151// GetGetFirstAccessibleChild gets the "get_first_accessible_child" callback function.
152func (x *AccessibleInterface) GetGetFirstAccessibleChild() func(Accessible) *AccessibleBase {
153 if x.xGetFirstAccessibleChild == 0 {
154 return nil
155 }
156 var rawCallback func(SelfVarp uintptr) uintptr
157 purego.RegisterFunc(&rawCallback, x.xGetFirstAccessibleChild)
158 return func(SelfVar Accessible) *AccessibleBase {
159 rawRet := rawCallback(SelfVar.GoPointer())
160 if rawRet == 0 {
161 return nil
162 }
163 ret := &AccessibleBase{}
164 ret.Ptr = rawRet
165 return ret
166 }
167}
168
169// OverrideGetNextAccessibleSibling sets the "get_next_accessible_sibling" callback function.
170func (x *AccessibleInterface) OverrideGetNextAccessibleSibling(cb func(Accessible) *AccessibleBase) {
171 if cb == nil {
172 x.xGetNextAccessibleSibling = 0
173 } else {
174 x.xGetNextAccessibleSibling = purego.NewCallback(func(SelfVarp uintptr) uintptr {
175 ret := cb(&AccessibleBase{Ptr: SelfVarp})
176 if ret == nil {
177 return 0
178 }
179 return ret.GoPointer()
180 })
181 }
182}
183
184// GetGetNextAccessibleSibling gets the "get_next_accessible_sibling" callback function.
185func (x *AccessibleInterface) GetGetNextAccessibleSibling() func(Accessible) *AccessibleBase {
186 if x.xGetNextAccessibleSibling == 0 {
187 return nil
188 }
189 var rawCallback func(SelfVarp uintptr) uintptr
190 purego.RegisterFunc(&rawCallback, x.xGetNextAccessibleSibling)
191 return func(SelfVar Accessible) *AccessibleBase {
192 rawRet := rawCallback(SelfVar.GoPointer())
193 if rawRet == 0 {
194 return nil
195 }
196 ret := &AccessibleBase{}
197 ret.Ptr = rawRet
198 return ret
199 }
200}
201
202// OverrideGetBounds sets the "get_bounds" callback function.
203func (x *AccessibleInterface) OverrideGetBounds(cb func(Accessible, *int, *int, *int, *int) bool) {
204 if cb == nil {
205 x.xGetBounds = 0
206 } else {
207 x.xGetBounds = purego.NewCallback(func(SelfVarp uintptr, XVarp *int, YVarp *int, WidthVarp *int, HeightVarp *int) bool {
208 return cb(&AccessibleBase{Ptr: SelfVarp}, XVarp, YVarp, WidthVarp, HeightVarp)
209 })
210 }
211}
212
213// GetGetBounds gets the "get_bounds" callback function.
214func (x *AccessibleInterface) GetGetBounds() func(Accessible, *int, *int, *int, *int) bool {
215 if x.xGetBounds == 0 {
216 return nil
217 }
218 var rawCallback func(SelfVarp uintptr, XVarp *int, YVarp *int, WidthVarp *int, HeightVarp *int) bool
219 purego.RegisterFunc(&rawCallback, x.xGetBounds)
220 return func(SelfVar Accessible, XVar *int, YVar *int, WidthVar *int, HeightVar *int) bool {
221 return rawCallback(SelfVar.GoPointer(), XVar, YVar, WidthVar, HeightVar)
222 }
223}
224
225// Wraps a list of references to [iface@Gtk.Accessible] objects.
226type AccessibleList struct {
227 _ structs.HostLayout
228}
229
230var xAccessibleListGLibType func() types.GType
231
232func AccessibleListGLibType() types.GType {
233 return xAccessibleListGLibType()
234}
235
236func (x *AccessibleList) GoPointer() uintptr {
237 return uintptr(unsafe.Pointer(x))
238}
239
240var xNewAccessibleListFromArray func(uintptr, uint) *AccessibleList
241
242// Allocates a new list of accessible objects.
243func NewAccessibleListFromArray(AccessiblesVar uintptr, NAccessiblesVar uint) *AccessibleList {
244
245 cret := xNewAccessibleListFromArray(AccessiblesVar, NAccessiblesVar)
246 return cret
247}
248
249var xNewAccessibleListFromList func(*glib.List) *AccessibleList
250
251// Allocates a new `GtkAccessibleList`, doing a shallow copy
252// of the passed list of accessible objects
253func NewAccessibleListFromList(ListVar *glib.List) *AccessibleList {
254
255 cret := xNewAccessibleListFromList(ListVar)
256 return cret
257}
258
259var xAccessibleListGetObjects func(uintptr) *glib.List
260
261// Gets the list of objects this boxed type holds.
262func (x *AccessibleList) GetObjects() *glib.List {
263
264 cret := xAccessibleListGetObjects(x.GoPointer())
265 return cret
266}
267
268// An interface for describing UI elements for Assistive Technologies.
269//
270// Every accessible implementation has:
271//
272// - a “role”, represented by a value of the [enum@Gtk.AccessibleRole] enumeration
273// - “attributes”, represented by a set of [enum@Gtk.AccessibleState],
274// [enum@Gtk.AccessibleProperty] and [enum@Gtk.AccessibleRelation] values
275//
276// The role cannot be changed after instantiating a `GtkAccessible`
277// implementation.
278//
279// The attributes are updated every time a UI element's state changes in
280// a way that should be reflected by assistive technologies. For instance,
281// if a `GtkWidget` visibility changes, the %GTK_ACCESSIBLE_STATE_HIDDEN
282// state will also change to reflect the [property@Gtk.Widget:visible] property.
283//
284// Every accessible implementation is part of a tree of accessible objects.
285// Normally, this tree corresponds to the widget tree, but can be customized
286// by reimplementing the [vfunc@Gtk.Accessible.get_accessible_parent],
287// [vfunc@Gtk.Accessible.get_first_accessible_child] and
288// [vfunc@Gtk.Accessible.get_next_accessible_sibling] virtual functions.
289//
290// Note that you can not create a top-level accessible object as of now,
291// which means that you must always have a parent accessible object.
292//
293// Also note that when an accessible object does not correspond to a widget,
294// and it has children, whose implementation you don't control,
295// it is necessary to ensure the correct shape of the a11y tree
296// by calling [method@Gtk.Accessible.set_accessible_parent] and
297// updating the sibling by [method@Gtk.Accessible.update_next_accessible_sibling].
298type Accessible interface {
299 GoPointer() uintptr
300 SetGoPointer(uintptr)
301 Announce(MessageVar string, PriorityVar AccessibleAnnouncementPriority)
302 GetAccessibleParent() *AccessibleBase
303 GetAccessibleRole() AccessibleRole
304 GetAtContext() *ATContext
305 GetBounds(XVar *int, YVar *int, WidthVar *int, HeightVar *int) bool
306 GetFirstAccessibleChild() *AccessibleBase
307 GetNextAccessibleSibling() *AccessibleBase
308 GetPlatformState(StateVar AccessiblePlatformState) bool
309 ResetProperty(PropertyVar AccessibleProperty)
310 ResetRelation(RelationVar AccessibleRelation)
311 ResetState(StateVar AccessibleState)
312 SetAccessibleParent(ParentVar Accessible, NextSiblingVar Accessible)
313 UpdateNextAccessibleSibling(NewSiblingVar Accessible)
314 UpdatePlatformState(StateVar AccessiblePlatformState)
315 UpdateProperty(FirstPropertyVar AccessibleProperty, varArgs ...interface{})
316 UpdatePropertyValue(NPropertiesVar int, PropertiesVar []AccessibleProperty, ValuesVar []gobject.Value)
317 UpdateRelation(FirstRelationVar AccessibleRelation, varArgs ...interface{})
318 UpdateRelationValue(NRelationsVar int, RelationsVar []AccessibleRelation, ValuesVar []gobject.Value)
319 UpdateState(FirstStateVar AccessibleState, varArgs ...interface{})
320 UpdateStateValue(NStatesVar int, StatesVar []AccessibleState, ValuesVar []gobject.Value)
321}
322
323var xAccessibleGLibType func() types.GType
324
325func AccessibleGLibType() types.GType {
326 return xAccessibleGLibType()
327}
328
329type AccessibleBase struct {
330 Ptr uintptr
331}
332
333func (x *AccessibleBase) GoPointer() uintptr {
334 if x == nil {
335 return 0
336 }
337 return x.Ptr
338}
339
340func (x *AccessibleBase) SetGoPointer(ptr uintptr) {
341 x.Ptr = ptr
342}
343
344// Requests the user's screen reader to announce the given message.
345//
346// This kind of notification is useful for messages that
347// either have only a visual representation or that are not
348// exposed visually at all, e.g. a notification about a
349// successful operation.
350//
351// Also, by using this API, you can ensure that the message
352// does not interrupts the user's current screen reader output.
353func (x *AccessibleBase) Announce(MessageVar string, PriorityVar AccessibleAnnouncementPriority) {
354
355 XGtkAccessibleAnnounce(x.GoPointer(), MessageVar, PriorityVar)
356
357}
358
359// Retrieves the accessible parent for an accessible object.
360//
361// This function returns `NULL` for top level widgets.
362func (x *AccessibleBase) GetAccessibleParent() *AccessibleBase {
363 var cls *AccessibleBase
364
365 cret := XGtkAccessibleGetAccessibleParent(x.GoPointer())
366
367 if cret == 0 {
368 return nil
369 }
370 cls = &AccessibleBase{}
371 cls.Ptr = cret
372 return cls
373}
374
375// Retrieves the accessible role of an accessible object.
376func (x *AccessibleBase) GetAccessibleRole() AccessibleRole {
377
378 cret := XGtkAccessibleGetAccessibleRole(x.GoPointer())
379 return cret
380}
381
382// Retrieves the implementation for the given accessible object.
383func (x *AccessibleBase) GetAtContext() *ATContext {
384 var cls *ATContext
385
386 cret := XGtkAccessibleGetAtContext(x.GoPointer())
387
388 if cret == 0 {
389 return nil
390 }
391 cls = &ATContext{}
392 cls.Ptr = cret
393 return cls
394}
395
396// Queries the coordinates and dimensions of this accessible
397//
398// This functionality can be overridden by `GtkAccessible`
399// implementations, e.g. to get the bounds from an ignored
400// child widget.
401func (x *AccessibleBase) GetBounds(XVar *int, YVar *int, WidthVar *int, HeightVar *int) bool {
402
403 cret := XGtkAccessibleGetBounds(x.GoPointer(), XVar, YVar, WidthVar, HeightVar)
404 return cret
405}
406
407// Retrieves the first accessible child of an accessible object.
408func (x *AccessibleBase) GetFirstAccessibleChild() *AccessibleBase {
409 var cls *AccessibleBase
410
411 cret := XGtkAccessibleGetFirstAccessibleChild(x.GoPointer())
412
413 if cret == 0 {
414 return nil
415 }
416 cls = &AccessibleBase{}
417 cls.Ptr = cret
418 return cls
419}
420
421// Retrieves the next accessible sibling of an accessible object
422func (x *AccessibleBase) GetNextAccessibleSibling() *AccessibleBase {
423 var cls *AccessibleBase
424
425 cret := XGtkAccessibleGetNextAccessibleSibling(x.GoPointer())
426
427 if cret == 0 {
428 return nil
429 }
430 cls = &AccessibleBase{}
431 cls.Ptr = cret
432 return cls
433}
434
435// Queries a platform state, such as focus.
436//
437// This functionality can be overridden by `GtkAccessible`
438// implementations, e.g. to get platform state from an ignored
439// child widget, as is the case for `GtkText` wrappers.
440func (x *AccessibleBase) GetPlatformState(StateVar AccessiblePlatformState) bool {
441
442 cret := XGtkAccessibleGetPlatformState(x.GoPointer(), StateVar)
443 return cret
444}
445
446// Resets the accessible property to its default value.
447func (x *AccessibleBase) ResetProperty(PropertyVar AccessibleProperty) {
448
449 XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar)
450
451}
452
453// Resets the accessible relation to its default value.
454func (x *AccessibleBase) ResetRelation(RelationVar AccessibleRelation) {
455
456 XGtkAccessibleResetRelation(x.GoPointer(), RelationVar)
457
458}
459
460// Resets the accessible state to its default value.
461func (x *AccessibleBase) ResetState(StateVar AccessibleState) {
462
463 XGtkAccessibleResetState(x.GoPointer(), StateVar)
464
465}
466
467// Sets the parent and sibling of an accessible object.
468//
469// This function is meant to be used by accessible implementations that are
470// not part of the widget hierarchy, and but act as a logical bridge between
471// widgets. For instance, if a widget creates an object that holds metadata
472// for each child, and you want that object to implement the `GtkAccessible`
473// interface, you will use this function to ensure that the parent of each
474// child widget is the metadata object, and the parent of each metadata
475// object is the container widget.
476func (x *AccessibleBase) SetAccessibleParent(ParentVar Accessible, NextSiblingVar Accessible) {
477
478 XGtkAccessibleSetAccessibleParent(x.GoPointer(), ParentVar.GoPointer(), NextSiblingVar.GoPointer())
479
480}
481
482// Updates the next accessible sibling.
483//
484// That might be useful when a new child of a custom accessible
485// is created, and it needs to be linked to a previous child.
486func (x *AccessibleBase) UpdateNextAccessibleSibling(NewSiblingVar Accessible) {
487
488 XGtkAccessibleUpdateNextAccessibleSibling(x.GoPointer(), NewSiblingVar.GoPointer())
489
490}
491
492// Informs ATs that the platform state has changed.
493//
494// This function should be used by `GtkAccessible` implementations that
495// have a platform state but are not widgets. Widgets handle platform
496// states automatically.
497func (x *AccessibleBase) UpdatePlatformState(StateVar AccessiblePlatformState) {
498
499 XGtkAccessibleUpdatePlatformState(x.GoPointer(), StateVar)
500
501}
502
503// Updates a list of accessible properties.
504//
505// See the [enum@Gtk.AccessibleProperty] documentation for the
506// value types of accessible properties.
507//
508// This function should be called by `GtkWidget` types whenever
509// an accessible property change must be communicated to assistive
510// technologies.
511//
512// Example:
513// ```c
514// value = gtk_adjustment_get_value (adjustment);
515// gtk_accessible_update_property (GTK_ACCESSIBLE (spin_button),
516//
517// GTK_ACCESSIBLE_PROPERTY_VALUE_NOW, value,
518// -1);
519//
520// ```
521func (x *AccessibleBase) UpdateProperty(FirstPropertyVar AccessibleProperty, varArgs ...interface{}) {
522
523 XGtkAccessibleUpdateProperty(x.GoPointer(), FirstPropertyVar, varArgs...)
524
525}
526
527// Updates an array of accessible properties.
528//
529// This function should be called by `GtkWidget` types whenever an accessible
530// property change must be communicated to assistive technologies.
531//
532// This function is meant to be used by language bindings.
533func (x *AccessibleBase) UpdatePropertyValue(NPropertiesVar int, PropertiesVar []AccessibleProperty, ValuesVar []gobject.Value) {
534
535 XGtkAccessibleUpdatePropertyValue(x.GoPointer(), NPropertiesVar, PropertiesVar, ValuesVar)
536
537}
538
539// Updates a list of accessible relations.
540//
541// This function should be called by `GtkWidget` types whenever an accessible
542// relation change must be communicated to assistive technologies.
543//
544// If the [enum@Gtk.AccessibleRelation] requires a list of references,
545// you should pass each reference individually, followed by `NULL`, e.g.
546//
547// ```c
548// gtk_accessible_update_relation (accessible,
549//
550// GTK_ACCESSIBLE_RELATION_CONTROLS,
551// ref1, NULL,
552// GTK_ACCESSIBLE_RELATION_LABELLED_BY,
553// ref1, ref2, ref3, NULL,
554// -1);
555//
556// ```
557func (x *AccessibleBase) UpdateRelation(FirstRelationVar AccessibleRelation, varArgs ...interface{}) {
558
559 XGtkAccessibleUpdateRelation(x.GoPointer(), FirstRelationVar, varArgs...)
560
561}
562
563// Updates an array of accessible relations.
564//
565// This function should be called by `GtkWidget` types whenever an accessible
566// relation change must be communicated to assistive technologies.
567//
568// This function is meant to be used by language bindings.
569func (x *AccessibleBase) UpdateRelationValue(NRelationsVar int, RelationsVar []AccessibleRelation, ValuesVar []gobject.Value) {
570
571 XGtkAccessibleUpdateRelationValue(x.GoPointer(), NRelationsVar, RelationsVar, ValuesVar)
572
573}
574
575// Updates a list of accessible states.
576//
577// See the [enum@Gtk.AccessibleState] documentation for the
578// value types of accessible states.
579//
580// This function should be called by `GtkWidget` types whenever
581// an accessible state change must be communicated to assistive
582// technologies.
583//
584// Example:
585//
586// ```c
587// value = GTK_ACCESSIBLE_TRISTATE_MIXED;
588// gtk_accessible_update_state (GTK_ACCESSIBLE (check_button),
589//
590// GTK_ACCESSIBLE_STATE_CHECKED, value,
591// -1);
592//
593// ```
594func (x *AccessibleBase) UpdateState(FirstStateVar AccessibleState, varArgs ...interface{}) {
595
596 XGtkAccessibleUpdateState(x.GoPointer(), FirstStateVar, varArgs...)
597
598}
599
600// Updates an array of accessible states.
601//
602// This function should be called by `GtkWidget` types whenever an accessible
603// state change must be communicated to assistive technologies.
604//
605// This function is meant to be used by language bindings.
606func (x *AccessibleBase) UpdateStateValue(NStatesVar int, StatesVar []AccessibleState, ValuesVar []gobject.Value) {
607
608 XGtkAccessibleUpdateStateValue(x.GoPointer(), NStatesVar, StatesVar, ValuesVar)
609
610}
611
612var XGtkAccessibleAnnounce func(uintptr, string, AccessibleAnnouncementPriority)
613var XGtkAccessibleGetAccessibleParent func(uintptr) uintptr
614var XGtkAccessibleGetAccessibleRole func(uintptr) AccessibleRole
615var XGtkAccessibleGetAtContext func(uintptr) uintptr
616var XGtkAccessibleGetBounds func(uintptr, *int, *int, *int, *int) bool
617var XGtkAccessibleGetFirstAccessibleChild func(uintptr) uintptr
618var XGtkAccessibleGetNextAccessibleSibling func(uintptr) uintptr
619var XGtkAccessibleGetPlatformState func(uintptr, AccessiblePlatformState) bool
620var XGtkAccessibleResetProperty func(uintptr, AccessibleProperty)
621var XGtkAccessibleResetRelation func(uintptr, AccessibleRelation)
622var XGtkAccessibleResetState func(uintptr, AccessibleState)
623var XGtkAccessibleSetAccessibleParent func(uintptr, uintptr, uintptr)
624var XGtkAccessibleUpdateNextAccessibleSibling func(uintptr, uintptr)
625var XGtkAccessibleUpdatePlatformState func(uintptr, AccessiblePlatformState)
626var XGtkAccessibleUpdateProperty func(uintptr, AccessibleProperty, ...interface{})
627var XGtkAccessibleUpdatePropertyValue func(uintptr, int, []AccessibleProperty, []gobject.Value)
628var XGtkAccessibleUpdateRelation func(uintptr, AccessibleRelation, ...interface{})
629var XGtkAccessibleUpdateRelationValue func(uintptr, int, []AccessibleRelation, []gobject.Value)
630var XGtkAccessibleUpdateState func(uintptr, AccessibleState, ...interface{})
631var XGtkAccessibleUpdateStateValue func(uintptr, int, []AccessibleState, []gobject.Value)
632
633// The various platform states which can be queried
634// using [method@Gtk.Accessible.get_platform_state].
635type AccessiblePlatformState int
636
637var xAccessiblePlatformStateGLibType func() types.GType
638
639func AccessiblePlatformStateGLibType() types.GType {
640 return xAccessiblePlatformStateGLibType()
641}
642
643const (
644
645 // whether the accessible can be focused
646 AccessiblePlatformStateFocusableValue AccessiblePlatformState = 0
647 // whether the accessible has focus
648 AccessiblePlatformStateFocusedValue AccessiblePlatformState = 1
649 // whether the accessible is active
650 AccessiblePlatformStateActiveValue AccessiblePlatformState = 2
651)
652
653var xAccessiblePropertyInitValue func(AccessibleProperty, *gobject.Value)
654
655// Initializes @value with the appropriate type for the @property.
656//
657// This function is mostly meant for language bindings, in conjunction
658// with gtk_accessible_update_property_value().
659func AccessiblePropertyInitValue(PropertyVar AccessibleProperty, ValueVar *gobject.Value) {
660
661 xAccessiblePropertyInitValue(PropertyVar, ValueVar)
662
663}
664
665var xAccessibleRelationInitValue func(AccessibleRelation, *gobject.Value)
666
667// Initializes @value with the appropriate type for the @relation.
668//
669// This function is mostly meant for language bindings, in conjunction
670// with gtk_accessible_update_relation_value().
671func AccessibleRelationInitValue(RelationVar AccessibleRelation, ValueVar *gobject.Value) {
672
673 xAccessibleRelationInitValue(RelationVar, ValueVar)
674
675}
676
677var xAccessibleStateInitValue func(AccessibleState, *gobject.Value)
678
679// Initializes @value with the appropriate type for the @state.
680//
681// This function is mostly meant for language bindings, in conjunction
682// with gtk_accessible_update_relation_state().
683func AccessibleStateInitValue(StateVar AccessibleState, ValueVar *gobject.Value) {
684
685 xAccessibleStateInitValue(StateVar, ValueVar)
686
687}
688
689func init() {
690 core.SetPackageName("GTK", "gtk4")
691 core.SetSharedLibraries("GTK", []string{"libgtk-4.so.1"})
692 var libs []uintptr
693 for _, libPath := range core.GetPaths("GTK") {
694 lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL)
695 if err != nil {
696 panic(err)
697 }
698 libs = append(libs, lib)
699 }
700
701 core.PuregoSafeRegister(&xAccessiblePlatformStateGLibType, libs, "gtk_accessible_platform_state_get_type")
702
703 core.PuregoSafeRegister(&xAccessiblePropertyInitValue, libs, "gtk_accessible_property_init_value")
704 core.PuregoSafeRegister(&xAccessibleRelationInitValue, libs, "gtk_accessible_relation_init_value")
705 core.PuregoSafeRegister(&xAccessibleStateInitValue, libs, "gtk_accessible_state_init_value")
706
707 core.PuregoSafeRegister(&xAccessibleListGLibType, libs, "gtk_accessible_list_get_type")
708
709 core.PuregoSafeRegister(&xNewAccessibleListFromArray, libs, "gtk_accessible_list_new_from_array")
710 core.PuregoSafeRegister(&xNewAccessibleListFromList, libs, "gtk_accessible_list_new_from_list")
711
712 core.PuregoSafeRegister(&xAccessibleListGetObjects, libs, "gtk_accessible_list_get_objects")
713
714 core.PuregoSafeRegister(&xAccessibleGLibType, libs, "gtk_accessible_get_type")
715
716 core.PuregoSafeRegister(&XGtkAccessibleAnnounce, libs, "gtk_accessible_announce")
717 core.PuregoSafeRegister(&XGtkAccessibleGetAccessibleParent, libs, "gtk_accessible_get_accessible_parent")
718 core.PuregoSafeRegister(&XGtkAccessibleGetAccessibleRole, libs, "gtk_accessible_get_accessible_role")
719 core.PuregoSafeRegister(&XGtkAccessibleGetAtContext, libs, "gtk_accessible_get_at_context")
720 core.PuregoSafeRegister(&XGtkAccessibleGetBounds, libs, "gtk_accessible_get_bounds")
721 core.PuregoSafeRegister(&XGtkAccessibleGetFirstAccessibleChild, libs, "gtk_accessible_get_first_accessible_child")
722 core.PuregoSafeRegister(&XGtkAccessibleGetNextAccessibleSibling, libs, "gtk_accessible_get_next_accessible_sibling")
723 core.PuregoSafeRegister(&XGtkAccessibleGetPlatformState, libs, "gtk_accessible_get_platform_state")
724 core.PuregoSafeRegister(&XGtkAccessibleResetProperty, libs, "gtk_accessible_reset_property")
725 core.PuregoSafeRegister(&XGtkAccessibleResetRelation, libs, "gtk_accessible_reset_relation")
726 core.PuregoSafeRegister(&XGtkAccessibleResetState, libs, "gtk_accessible_reset_state")
727 core.PuregoSafeRegister(&XGtkAccessibleSetAccessibleParent, libs, "gtk_accessible_set_accessible_parent")
728 core.PuregoSafeRegister(&XGtkAccessibleUpdateNextAccessibleSibling, libs, "gtk_accessible_update_next_accessible_sibling")
729 core.PuregoSafeRegister(&XGtkAccessibleUpdatePlatformState, libs, "gtk_accessible_update_platform_state")
730 core.PuregoSafeRegister(&XGtkAccessibleUpdateProperty, libs, "gtk_accessible_update_property")
731 core.PuregoSafeRegister(&XGtkAccessibleUpdatePropertyValue, libs, "gtk_accessible_update_property_value")
732 core.PuregoSafeRegister(&XGtkAccessibleUpdateRelation, libs, "gtk_accessible_update_relation")
733 core.PuregoSafeRegister(&XGtkAccessibleUpdateRelationValue, libs, "gtk_accessible_update_relation_value")
734 core.PuregoSafeRegister(&XGtkAccessibleUpdateState, libs, "gtk_accessible_update_state")
735 core.PuregoSafeRegister(&XGtkAccessibleUpdateStateValue, libs, "gtk_accessible_update_state_value")
736
737}