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/types"
13 "github.com/bnema/puregotk/v4/graphene"
14)
15
16// The interface vtable for accessible objects containing text.
17type AccessibleTextInterface struct {
18 _ structs.HostLayout
19
20 GIface uintptr
21
22 xGetContents uintptr
23
24 xGetContentsAt uintptr
25
26 xGetCaretPosition uintptr
27
28 xGetSelection uintptr
29
30 xGetAttributes uintptr
31
32 xGetDefaultAttributes uintptr
33
34 xGetExtents uintptr
35
36 xGetOffset uintptr
37}
38
39func (x *AccessibleTextInterface) GoPointer() uintptr {
40 return uintptr(unsafe.Pointer(x))
41}
42
43// OverrideGetContents sets the "get_contents" callback function.
44func (x *AccessibleTextInterface) OverrideGetContents(cb func(AccessibleText, uint, uint) *glib.Bytes) {
45 if cb == nil {
46 x.xGetContents = 0
47 } else {
48 x.xGetContents = purego.NewCallback(func(SelfVarp uintptr, StartVarp uint, EndVarp uint) *glib.Bytes {
49 return cb(&AccessibleTextBase{Ptr: SelfVarp}, StartVarp, EndVarp)
50 })
51 }
52}
53
54// GetGetContents gets the "get_contents" callback function.
55func (x *AccessibleTextInterface) GetGetContents() func(AccessibleText, uint, uint) *glib.Bytes {
56 if x.xGetContents == 0 {
57 return nil
58 }
59 var rawCallback func(SelfVarp uintptr, StartVarp uint, EndVarp uint) *glib.Bytes
60 purego.RegisterFunc(&rawCallback, x.xGetContents)
61 return func(SelfVar AccessibleText, StartVar uint, EndVar uint) *glib.Bytes {
62 return rawCallback(SelfVar.GoPointer(), StartVar, EndVar)
63 }
64}
65
66// OverrideGetContentsAt sets the "get_contents_at" callback function.
67func (x *AccessibleTextInterface) OverrideGetContentsAt(cb func(AccessibleText, uint, AccessibleTextGranularity, *uint, *uint) *glib.Bytes) {
68 if cb == nil {
69 x.xGetContentsAt = 0
70 } else {
71 x.xGetContentsAt = purego.NewCallback(func(SelfVarp uintptr, OffsetVarp uint, GranularityVarp AccessibleTextGranularity, StartVarp *uint, EndVarp *uint) *glib.Bytes {
72 return cb(&AccessibleTextBase{Ptr: SelfVarp}, OffsetVarp, GranularityVarp, StartVarp, EndVarp)
73 })
74 }
75}
76
77// GetGetContentsAt gets the "get_contents_at" callback function.
78func (x *AccessibleTextInterface) GetGetContentsAt() func(AccessibleText, uint, AccessibleTextGranularity, *uint, *uint) *glib.Bytes {
79 if x.xGetContentsAt == 0 {
80 return nil
81 }
82 var rawCallback func(SelfVarp uintptr, OffsetVarp uint, GranularityVarp AccessibleTextGranularity, StartVarp *uint, EndVarp *uint) *glib.Bytes
83 purego.RegisterFunc(&rawCallback, x.xGetContentsAt)
84 return func(SelfVar AccessibleText, OffsetVar uint, GranularityVar AccessibleTextGranularity, StartVar *uint, EndVar *uint) *glib.Bytes {
85 return rawCallback(SelfVar.GoPointer(), OffsetVar, GranularityVar, StartVar, EndVar)
86 }
87}
88
89// OverrideGetCaretPosition sets the "get_caret_position" callback function.
90func (x *AccessibleTextInterface) OverrideGetCaretPosition(cb func(AccessibleText) uint) {
91 if cb == nil {
92 x.xGetCaretPosition = 0
93 } else {
94 x.xGetCaretPosition = purego.NewCallback(func(SelfVarp uintptr) uint {
95 return cb(&AccessibleTextBase{Ptr: SelfVarp})
96 })
97 }
98}
99
100// GetGetCaretPosition gets the "get_caret_position" callback function.
101func (x *AccessibleTextInterface) GetGetCaretPosition() func(AccessibleText) uint {
102 if x.xGetCaretPosition == 0 {
103 return nil
104 }
105 var rawCallback func(SelfVarp uintptr) uint
106 purego.RegisterFunc(&rawCallback, x.xGetCaretPosition)
107 return func(SelfVar AccessibleText) uint {
108 return rawCallback(SelfVar.GoPointer())
109 }
110}
111
112// OverrideGetSelection sets the "get_selection" callback function.
113func (x *AccessibleTextInterface) OverrideGetSelection(cb func(AccessibleText, *uint, *uintptr) bool) {
114 if cb == nil {
115 x.xGetSelection = 0
116 } else {
117 x.xGetSelection = purego.NewCallback(func(SelfVarp uintptr, NRangesVarp *uint, RangesVarp *uintptr) bool {
118 return cb(&AccessibleTextBase{Ptr: SelfVarp}, NRangesVarp, RangesVarp)
119 })
120 }
121}
122
123// GetGetSelection gets the "get_selection" callback function.
124func (x *AccessibleTextInterface) GetGetSelection() func(AccessibleText, *uint, *uintptr) bool {
125 if x.xGetSelection == 0 {
126 return nil
127 }
128 var rawCallback func(SelfVarp uintptr, NRangesVarp *uint, RangesVarp *uintptr) bool
129 purego.RegisterFunc(&rawCallback, x.xGetSelection)
130 return func(SelfVar AccessibleText, NRangesVar *uint, RangesVar *uintptr) bool {
131 return rawCallback(SelfVar.GoPointer(), NRangesVar, RangesVar)
132 }
133}
134
135// OverrideGetAttributes sets the "get_attributes" callback function.
136func (x *AccessibleTextInterface) OverrideGetAttributes(cb func(AccessibleText, uint, *uint, *uintptr, *[]string, *[]string) bool) {
137 if cb == nil {
138 x.xGetAttributes = 0
139 } else {
140 x.xGetAttributes = purego.NewCallback(func(SelfVarp uintptr, OffsetVarp uint, NRangesVarp *uint, RangesVarp *uintptr, AttributeNamesVarp *[]string, AttributeValuesVarp *[]string) bool {
141 return cb(&AccessibleTextBase{Ptr: SelfVarp}, OffsetVarp, NRangesVarp, RangesVarp, AttributeNamesVarp, AttributeValuesVarp)
142 })
143 }
144}
145
146// GetGetAttributes gets the "get_attributes" callback function.
147func (x *AccessibleTextInterface) GetGetAttributes() func(AccessibleText, uint, *uint, *uintptr, *[]string, *[]string) bool {
148 if x.xGetAttributes == 0 {
149 return nil
150 }
151 var rawCallback func(SelfVarp uintptr, OffsetVarp uint, NRangesVarp *uint, RangesVarp *uintptr, AttributeNamesVarp *[]string, AttributeValuesVarp *[]string) bool
152 purego.RegisterFunc(&rawCallback, x.xGetAttributes)
153 return func(SelfVar AccessibleText, OffsetVar uint, NRangesVar *uint, RangesVar *uintptr, AttributeNamesVar *[]string, AttributeValuesVar *[]string) bool {
154 return rawCallback(SelfVar.GoPointer(), OffsetVar, NRangesVar, RangesVar, AttributeNamesVar, AttributeValuesVar)
155 }
156}
157
158// OverrideGetDefaultAttributes sets the "get_default_attributes" callback function.
159func (x *AccessibleTextInterface) OverrideGetDefaultAttributes(cb func(AccessibleText, *[]string, *[]string)) {
160 if cb == nil {
161 x.xGetDefaultAttributes = 0
162 } else {
163 x.xGetDefaultAttributes = purego.NewCallback(func(SelfVarp uintptr, AttributeNamesVarp *[]string, AttributeValuesVarp *[]string) {
164 cb(&AccessibleTextBase{Ptr: SelfVarp}, AttributeNamesVarp, AttributeValuesVarp)
165 })
166 }
167}
168
169// GetGetDefaultAttributes gets the "get_default_attributes" callback function.
170func (x *AccessibleTextInterface) GetGetDefaultAttributes() func(AccessibleText, *[]string, *[]string) {
171 if x.xGetDefaultAttributes == 0 {
172 return nil
173 }
174 var rawCallback func(SelfVarp uintptr, AttributeNamesVarp *[]string, AttributeValuesVarp *[]string)
175 purego.RegisterFunc(&rawCallback, x.xGetDefaultAttributes)
176 return func(SelfVar AccessibleText, AttributeNamesVar *[]string, AttributeValuesVar *[]string) {
177 rawCallback(SelfVar.GoPointer(), AttributeNamesVar, AttributeValuesVar)
178 }
179}
180
181// OverrideGetExtents sets the "get_extents" callback function.
182func (x *AccessibleTextInterface) OverrideGetExtents(cb func(AccessibleText, uint, uint, *graphene.Rect) bool) {
183 if cb == nil {
184 x.xGetExtents = 0
185 } else {
186 x.xGetExtents = purego.NewCallback(func(SelfVarp uintptr, StartVarp uint, EndVarp uint, ExtentsVarp *graphene.Rect) bool {
187 return cb(&AccessibleTextBase{Ptr: SelfVarp}, StartVarp, EndVarp, ExtentsVarp)
188 })
189 }
190}
191
192// GetGetExtents gets the "get_extents" callback function.
193func (x *AccessibleTextInterface) GetGetExtents() func(AccessibleText, uint, uint, *graphene.Rect) bool {
194 if x.xGetExtents == 0 {
195 return nil
196 }
197 var rawCallback func(SelfVarp uintptr, StartVarp uint, EndVarp uint, ExtentsVarp *graphene.Rect) bool
198 purego.RegisterFunc(&rawCallback, x.xGetExtents)
199 return func(SelfVar AccessibleText, StartVar uint, EndVar uint, ExtentsVar *graphene.Rect) bool {
200 return rawCallback(SelfVar.GoPointer(), StartVar, EndVar, ExtentsVar)
201 }
202}
203
204// OverrideGetOffset sets the "get_offset" callback function.
205func (x *AccessibleTextInterface) OverrideGetOffset(cb func(AccessibleText, *graphene.Point, *uint) bool) {
206 if cb == nil {
207 x.xGetOffset = 0
208 } else {
209 x.xGetOffset = purego.NewCallback(func(SelfVarp uintptr, PointVarp *graphene.Point, OffsetVarp *uint) bool {
210 return cb(&AccessibleTextBase{Ptr: SelfVarp}, PointVarp, OffsetVarp)
211 })
212 }
213}
214
215// GetGetOffset gets the "get_offset" callback function.
216func (x *AccessibleTextInterface) GetGetOffset() func(AccessibleText, *graphene.Point, *uint) bool {
217 if x.xGetOffset == 0 {
218 return nil
219 }
220 var rawCallback func(SelfVarp uintptr, PointVarp *graphene.Point, OffsetVarp *uint) bool
221 purego.RegisterFunc(&rawCallback, x.xGetOffset)
222 return func(SelfVar AccessibleText, PointVar *graphene.Point, OffsetVar *uint) bool {
223 return rawCallback(SelfVar.GoPointer(), PointVar, OffsetVar)
224 }
225}
226
227// A range inside the text of an accessible object.
228type AccessibleTextRange struct {
229 _ structs.HostLayout
230
231 Start uint
232
233 Length uint
234}
235
236func (x *AccessibleTextRange) GoPointer() uintptr {
237 return uintptr(unsafe.Pointer(x))
238}
239
240// An interface for accessible objects containing formatted text.
241//
242// The `GtkAccessibleText` interfaces is meant to be implemented by accessible
243// objects that have text formatted with attributes, or non-trivial text contents.
244//
245// You should use the [enum@Gtk.AccessibleProperty.LABEL] or the
246// [enum@Gtk.AccessibleProperty.DESCRIPTION] properties for accessible
247// objects containing simple, unformatted text.
248type AccessibleText interface {
249 GoPointer() uintptr
250 SetGoPointer(uintptr)
251 UpdateCaretPosition()
252 UpdateContents(ChangeVar AccessibleTextContentChange, StartVar uint, EndVar uint)
253 UpdateSelectionBound()
254}
255
256var xAccessibleTextGLibType func() types.GType
257
258func AccessibleTextGLibType() types.GType {
259 return xAccessibleTextGLibType()
260}
261
262type AccessibleTextBase struct {
263 Ptr uintptr
264}
265
266func (x *AccessibleTextBase) GoPointer() uintptr {
267 if x == nil {
268 return 0
269 }
270 return x.Ptr
271}
272
273func (x *AccessibleTextBase) SetGoPointer(ptr uintptr) {
274 x.Ptr = ptr
275}
276
277// Updates the position of the caret.
278//
279// Implementations of the `GtkAccessibleText` interface should call this
280// function every time the caret has moved, in order to notify assistive
281// technologies.
282func (x *AccessibleTextBase) UpdateCaretPosition() {
283
284 XGtkAccessibleTextUpdateCaretPosition(x.GoPointer())
285
286}
287
288// Notifies assistive technologies of a change in contents.
289//
290// Implementations of the `GtkAccessibleText` interface should call this
291// function every time their contents change as the result of an operation,
292// like an insertion or a removal.
293//
294// Note: If the change is a deletion, this function must be called *before*
295// removing the contents, if it is an insertion, it must be called *after*
296// inserting the new contents.
297func (x *AccessibleTextBase) UpdateContents(ChangeVar AccessibleTextContentChange, StartVar uint, EndVar uint) {
298
299 XGtkAccessibleTextUpdateContents(x.GoPointer(), ChangeVar, StartVar, EndVar)
300
301}
302
303// Updates the boundary of the selection.
304//
305// Implementations of the `GtkAccessibleText` interface should call this
306// function every time the selection has moved, in order to notify assistive
307// technologies.
308func (x *AccessibleTextBase) UpdateSelectionBound() {
309
310 XGtkAccessibleTextUpdateSelectionBound(x.GoPointer())
311
312}
313
314var XGtkAccessibleTextUpdateCaretPosition func(uintptr)
315var XGtkAccessibleTextUpdateContents func(uintptr, AccessibleTextContentChange, uint, uint)
316var XGtkAccessibleTextUpdateSelectionBound func(uintptr)
317
318const (
319 // An attribute for the background color, expressed as an RGB value
320 // encoded in a string using the format: `{r8},{g8},{b8}`.
321 ACCESSIBLE_ATTRIBUTE_BACKGROUND string = "bg-color"
322 // An attribute for the font family name.
323 ACCESSIBLE_ATTRIBUTE_FAMILY string = "family-name"
324 // An attribute for the foreground color, expressed as an RGB value
325 // encoded in a string using the format: `{r8},{g8},{b8}`.
326 ACCESSIBLE_ATTRIBUTE_FOREGROUND string = "fg-color"
327 // An attribute for the overline style.
328 //
329 // Possible values are:
330 //
331 // - [const@Gtk.ACCESSIBLE_ATTRIBUTE_OVERLINE_NONE]
332 // - [const@Gtk.ACCESSIBLE_ATTRIBUTE_OVERLINE_SINGLE]
333 ACCESSIBLE_ATTRIBUTE_OVERLINE string = "overline"
334 // The "none" overline value for [const@Gtk.ACCESSIBLE_ATTRIBUTE_OVERLINE].
335 ACCESSIBLE_ATTRIBUTE_OVERLINE_NONE string = "none"
336 // The "single" overline value for [const@Gtk.ACCESSIBLE_ATTRIBUTE_OVERLINE].
337 ACCESSIBLE_ATTRIBUTE_OVERLINE_SINGLE string = "single"
338 // An attribute for the font size, expressed in points.
339 ACCESSIBLE_ATTRIBUTE_SIZE string = "size"
340 // An attribute for the font stretch type.
341 //
342 // Possible values are:
343 //
344 // - [const@Gtk.ACCESSIBLE_ATTRIBUTE_STRETCH_ULTRA_CONDENSED]
345 // - [const@Gtk.ACCESSIBLE_ATTRIBUTE_STRETCH_EXTRA_CONDENSED]
346 // - [const@Gtk.ACCESSIBLE_ATTRIBUTE_STRETCH_CONDENSED]
347 // - [const@Gtk.ACCESSIBLE_ATTRIBUTE_STRETCH_SEMI_CONDENSED]
348 ACCESSIBLE_ATTRIBUTE_STRETCH string = "stretch"
349 // The "condensed" stretch value for [const@Gtk.ACCESSIBLE_ATTRIBUTE_STRETCH].
350 ACCESSIBLE_ATTRIBUTE_STRETCH_CONDENSED string = "condensed"
351 // The "expanded" stretch value for [const@Gtk.ACCESSIBLE_ATTRIBUTE_STRETCH].
352 ACCESSIBLE_ATTRIBUTE_STRETCH_EXPANDED string = "expanded"
353 // The "extra condensed" stretch value for [const@Gtk.ACCESSIBLE_ATTRIBUTE_STRETCH].
354 ACCESSIBLE_ATTRIBUTE_STRETCH_EXTRA_CONDENSED string = "extra_condensed"
355 // The "extra expanded" stretch value for [const@Gtk.ACCESSIBLE_ATTRIBUTE_STRETCH].
356 ACCESSIBLE_ATTRIBUTE_STRETCH_EXTRA_EXPANDED string = "extra_expanded"
357 // The "normal" stretch value for [const@Gtk.ACCESSIBLE_ATTRIBUTE_STRETCH].
358 ACCESSIBLE_ATTRIBUTE_STRETCH_NORMAL string = "normal"
359 // The "semi condensed" stretch value for [const@Gtk.ACCESSIBLE_ATTRIBUTE_STRETCH].
360 ACCESSIBLE_ATTRIBUTE_STRETCH_SEMI_CONDENSED string = "semi_condensed"
361 // The "semi expanded" stretch value for [const@Gtk.ACCESSIBLE_ATTRIBUTE_STRETCH].
362 ACCESSIBLE_ATTRIBUTE_STRETCH_SEMI_EXPANDED string = "semi_expanded"
363 // The "ultra condensed" stretch value for [const@Gtk.ACCESSIBLE_ATTRIBUTE_STRETCH].
364 ACCESSIBLE_ATTRIBUTE_STRETCH_ULTRA_CONDENSED string = "ultra_condensed"
365 // The "ultra expanded" stretch value for [const@Gtk.ACCESSIBLE_ATTRIBUTE_STRETCH].
366 ACCESSIBLE_ATTRIBUTE_STRETCH_ULTRA_EXPANDED string = "ultra_expanded"
367 // An attribute for strikethrough text.
368 //
369 // Possible values are `true` or `false`.
370 ACCESSIBLE_ATTRIBUTE_STRIKETHROUGH string = "strikethrough"
371 // An attribute for the font style.
372 //
373 // Possible values are:
374 //
375 // - [const@Gtk.ACCESSIBLE_ATTRIBUTE_STYLE_NORMAL]
376 // - [const@Gtk.ACCESSIBLE_ATTRIBUTE_STYLE_OBLIQUE]
377 // - [const@Gtk.ACCESSIBLE_ATTRIBUTE_STYLE_ITALIC]
378 ACCESSIBLE_ATTRIBUTE_STYLE string = "style"
379 // The "italic" style value for [const@Gtk.ACCESSIBLE_ATTRIBUTE_STYLE].
380 ACCESSIBLE_ATTRIBUTE_STYLE_ITALIC string = "italic"
381 // The "normal" style value for [const@Gtk.ACCESSIBLE_ATTRIBUTE_STYLE].
382 ACCESSIBLE_ATTRIBUTE_STYLE_NORMAL string = "normal"
383 // The "oblique" style value for [const@Gtk.ACCESSIBLE_ATTRIBUTE_STYLE].
384 ACCESSIBLE_ATTRIBUTE_STYLE_OBLIQUE string = "oblique"
385 // An attribute for the underline style.
386 //
387 // Possible values are:
388 //
389 // - [const@Gtk.ACCESSIBLE_ATTRIBUTE_UNDERLINE_NONE]
390 // - [const@Gtk.ACCESSIBLE_ATTRIBUTE_UNDERLINE_SINGLE]
391 // - [const@Gtk.ACCESSIBLE_ATTRIBUTE_UNDERLINE_DOUBLE]
392 // - [const@Gtk.ACCESSIBLE_ATTRIBUTE_UNDERLINE_ERROR]
393 ACCESSIBLE_ATTRIBUTE_UNDERLINE string = "underline"
394 // The "double" underline value for [const@Gtk.ACCESSIBLE_ATTRIBUTE_UNDERLINE].
395 ACCESSIBLE_ATTRIBUTE_UNDERLINE_DOUBLE string = "double"
396 // The "error" underline value for [const@Gtk.ACCESSIBLE_ATTRIBUTE_UNDERLINE].
397 ACCESSIBLE_ATTRIBUTE_UNDERLINE_ERROR string = "error"
398 // The "none" underline value for [const@Gtk.ACCESSIBLE_ATTRIBUTE_UNDERLINE].
399 ACCESSIBLE_ATTRIBUTE_UNDERLINE_NONE string = "none"
400 // The "single" underline value for [const@Gtk.ACCESSIBLE_ATTRIBUTE_UNDERLINE].
401 ACCESSIBLE_ATTRIBUTE_UNDERLINE_SINGLE string = "single"
402 // An attribute for the font variant.
403 //
404 // Possible values are:
405 //
406 // - [const@Gtk.ACCESSIBLE_ATTRIBUTE_VARIANT_SMALL_CAPS]
407 // - [const@Gtk.ACCESSIBLE_ATTRIBUTE_VARIANT_ALL_SMALL_CAPS]
408 // - [const@Gtk.ACCESSIBLE_ATTRIBUTE_VARIANT_PETITE_CAPS]
409 // - [const@Gtk.ACCESSIBLE_ATTRIBUTE_VARIANT_ALL_PETITE_CAPS]
410 // - [const@Gtk.ACCESSIBLE_ATTRIBUTE_VARIANT_UNICASE]
411 // - [const@Gtk.ACCESSIBLE_ATTRIBUTE_VARIANT_TITLE_CAPS]
412 ACCESSIBLE_ATTRIBUTE_VARIANT string = "variant"
413 // The "all petite caps" variant value for [const@Gtk.ACCESSIBLE_ATTRIBUTE_VARIANT].
414 ACCESSIBLE_ATTRIBUTE_VARIANT_ALL_PETITE_CAPS string = "all-petite-caps"
415 // The "all small caps" variant value for [const@Gtk.ACCESSIBLE_ATTRIBUTE_VARIANT].
416 ACCESSIBLE_ATTRIBUTE_VARIANT_ALL_SMALL_CAPS string = "all-small-caps"
417 // The "petite caps" variant value for [const@Gtk.ACCESSIBLE_ATTRIBUTE_VARIANT].
418 ACCESSIBLE_ATTRIBUTE_VARIANT_PETITE_CAPS string = "petite-caps"
419 // The "small caps" variant value for [const@Gtk.ACCESSIBLE_ATTRIBUTE_VARIANT].
420 ACCESSIBLE_ATTRIBUTE_VARIANT_SMALL_CAPS string = "small-caps"
421 // The "title caps" variant value for [const@Gtk.ACCESSIBLE_ATTRIBUTE_VARIANT].
422 ACCESSIBLE_ATTRIBUTE_VARIANT_TITLE_CAPS string = "title-caps"
423 // The "unicase" variant value for [const@Gtk.ACCESSIBLE_ATTRIBUTE_VARIANT].
424 ACCESSIBLE_ATTRIBUTE_VARIANT_UNICASE string = "unicase"
425 // An attribute for the font weight.
426 ACCESSIBLE_ATTRIBUTE_WEIGHT string = "weight"
427)
428
429// The type of contents change operation.
430type AccessibleTextContentChange int
431
432var xAccessibleTextContentChangeGLibType func() types.GType
433
434func AccessibleTextContentChangeGLibType() types.GType {
435 return xAccessibleTextContentChangeGLibType()
436}
437
438const (
439
440 // contents change as the result of
441 // an insert operation
442 AccessibleTextContentChangeInsertValue AccessibleTextContentChange = 0
443 // contents change as the result of
444 // a remove operation
445 AccessibleTextContentChangeRemoveValue AccessibleTextContentChange = 1
446)
447
448// The granularity for queries about the text contents of a [iface@Gtk.AccessibleText]
449// implementation.
450type AccessibleTextGranularity int
451
452var xAccessibleTextGranularityGLibType func() types.GType
453
454func AccessibleTextGranularityGLibType() types.GType {
455 return xAccessibleTextGranularityGLibType()
456}
457
458const (
459
460 // Use the boundary between
461 // characters (including non-printing characters)
462 AccessibleTextGranularityCharacterValue AccessibleTextGranularity = 0
463 // Use the boundary between words,
464 // starting from the beginning of the current word and ending at the
465 // beginning of the next word
466 AccessibleTextGranularityWordValue AccessibleTextGranularity = 1
467 // Use the boundary between
468 // sentences, starting from the beginning of the current sentence and
469 // ending at the beginning of the next sentence
470 AccessibleTextGranularitySentenceValue AccessibleTextGranularity = 2
471 // Use the boundary between lines,
472 // starting from the beginning of the current line and ending at the
473 // beginning of the next line
474 AccessibleTextGranularityLineValue AccessibleTextGranularity = 3
475 // Use the boundary between
476 // paragraphs, starting from the beginning of the current paragraph and
477 // ending at the beginning of the next paragraph
478 AccessibleTextGranularityParagraphValue AccessibleTextGranularity = 4
479)
480
481func init() {
482 core.SetPackageName("GTK", "gtk4")
483 core.SetSharedLibraries("GTK", []string{"libgtk-4.so.1"})
484 var libs []uintptr
485 for _, libPath := range core.GetPaths("GTK") {
486 lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL)
487 if err != nil {
488 panic(err)
489 }
490 libs = append(libs, lib)
491 }
492
493 core.PuregoSafeRegister(&xAccessibleTextContentChangeGLibType, libs, "gtk_accessible_text_content_change_get_type")
494
495 core.PuregoSafeRegister(&xAccessibleTextGranularityGLibType, libs, "gtk_accessible_text_granularity_get_type")
496
497 core.PuregoSafeRegister(&xAccessibleTextGLibType, libs, "gtk_accessible_text_get_type")
498
499 core.PuregoSafeRegister(&XGtkAccessibleTextUpdateCaretPosition, libs, "gtk_accessible_text_update_caret_position")
500 core.PuregoSafeRegister(&XGtkAccessibleTextUpdateContents, libs, "gtk_accessible_text_update_contents")
501 core.PuregoSafeRegister(&XGtkAccessibleTextUpdateSelectionBound, libs, "gtk_accessible_text_update_selection_bound")
502
503}