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
16type ScaleButtonClass struct {
17 _ structs.HostLayout
18
19 ParentClass WidgetClass
20
21 xValueChanged uintptr
22
23 Padding [8]uintptr
24}
25
26func (x *ScaleButtonClass) GoPointer() uintptr {
27 return uintptr(unsafe.Pointer(x))
28}
29
30// OverrideValueChanged sets the "value_changed" callback function.
31func (x *ScaleButtonClass) OverrideValueChanged(cb func(*ScaleButton, float64)) {
32 if cb == nil {
33 x.xValueChanged = 0
34 } else {
35 x.xValueChanged = purego.NewCallback(func(ButtonVarp uintptr, ValueVarp float64) {
36 cb(ScaleButtonNewFromInternalPtr(ButtonVarp), ValueVarp)
37 })
38 }
39}
40
41// GetValueChanged gets the "value_changed" callback function.
42func (x *ScaleButtonClass) GetValueChanged() func(*ScaleButton, float64) {
43 if x.xValueChanged == 0 {
44 return nil
45 }
46 var rawCallback func(ButtonVarp uintptr, ValueVarp float64)
47 purego.RegisterFunc(&rawCallback, x.xValueChanged)
48 return func(ButtonVar *ScaleButton, ValueVar float64) {
49 rawCallback(ButtonVar.GoPointer(), ValueVar)
50 }
51}
52
53// Provides a button which pops up a scale widget.
54//
55// This kind of widget is commonly used for volume controls in multimedia
56// applications, and GTK provides a [class@Gtk.VolumeButton] subclass that
57// is tailored for this use case.
58//
59// # Shortcuts and Gestures
60//
61// The following signals have default keybindings:
62//
63// - [signal@Gtk.ScaleButton::popup]
64//
65// # CSS nodes
66//
67// ```
68// scalebutton.scale
69// ╰── button.toggle
70//
71// ╰── <icon>
72//
73// ```
74//
75// `GtkScaleButton` has a single CSS node with name scalebutton and `.scale`
76// style class, and contains a `button` node with a `.toggle` style class.
77type ScaleButton struct {
78 Widget
79}
80
81var xScaleButtonGLibType func() types.GType
82
83func ScaleButtonGLibType() types.GType {
84 return xScaleButtonGLibType()
85}
86
87func ScaleButtonNewFromInternalPtr(ptr uintptr) *ScaleButton {
88 cls := &ScaleButton{}
89 cls.Ptr = ptr
90 return cls
91}
92
93var xNewScaleButton func(float64, float64, float64, []string) uintptr
94
95// Creates a `GtkScaleButton`.
96//
97// The new scale button has a range between @min and @max,
98// with a stepping of @step.
99func NewScaleButton(MinVar float64, MaxVar float64, StepVar float64, IconsVar []string) *ScaleButton {
100 var cls *ScaleButton
101
102 cret := xNewScaleButton(MinVar, MaxVar, StepVar, IconsVar)
103
104 if cret == 0 {
105 return nil
106 }
107 gobject.IncreaseRef(cret)
108 cls = &ScaleButton{}
109 cls.Ptr = cret
110 return cls
111}
112
113var xScaleButtonGetActive func(uintptr) bool
114
115// Queries a `GtkScaleButton` and returns its current state.
116//
117// Returns %TRUE if the scale button is pressed in and %FALSE
118// if it is raised.
119func (x *ScaleButton) GetActive() bool {
120
121 cret := xScaleButtonGetActive(x.GoPointer())
122 return cret
123}
124
125var xScaleButtonGetAdjustment func(uintptr) uintptr
126
127// Gets the `GtkAdjustment` associated with the `GtkScaleButton`’s scale.
128//
129// See [method@Gtk.Range.get_adjustment] for details.
130func (x *ScaleButton) GetAdjustment() *Adjustment {
131 var cls *Adjustment
132
133 cret := xScaleButtonGetAdjustment(x.GoPointer())
134
135 if cret == 0 {
136 return nil
137 }
138 gobject.IncreaseRef(cret)
139 cls = &Adjustment{}
140 cls.Ptr = cret
141 return cls
142}
143
144var xScaleButtonGetHasFrame func(uintptr) bool
145
146// Returns whether the button has a frame.
147func (x *ScaleButton) GetHasFrame() bool {
148
149 cret := xScaleButtonGetHasFrame(x.GoPointer())
150 return cret
151}
152
153var xScaleButtonGetMinusButton func(uintptr) uintptr
154
155// Retrieves the minus button of the `GtkScaleButton`.
156func (x *ScaleButton) GetMinusButton() *Button {
157 var cls *Button
158
159 cret := xScaleButtonGetMinusButton(x.GoPointer())
160
161 if cret == 0 {
162 return nil
163 }
164 gobject.IncreaseRef(cret)
165 cls = &Button{}
166 cls.Ptr = cret
167 return cls
168}
169
170var xScaleButtonGetPlusButton func(uintptr) uintptr
171
172// Retrieves the plus button of the `GtkScaleButton.`
173func (x *ScaleButton) GetPlusButton() *Button {
174 var cls *Button
175
176 cret := xScaleButtonGetPlusButton(x.GoPointer())
177
178 if cret == 0 {
179 return nil
180 }
181 gobject.IncreaseRef(cret)
182 cls = &Button{}
183 cls.Ptr = cret
184 return cls
185}
186
187var xScaleButtonGetPopup func(uintptr) uintptr
188
189// Retrieves the popup of the `GtkScaleButton`.
190func (x *ScaleButton) GetPopup() *Widget {
191 var cls *Widget
192
193 cret := xScaleButtonGetPopup(x.GoPointer())
194
195 if cret == 0 {
196 return nil
197 }
198 gobject.IncreaseRef(cret)
199 cls = &Widget{}
200 cls.Ptr = cret
201 return cls
202}
203
204var xScaleButtonGetValue func(uintptr) float64
205
206// Gets the current value of the scale button.
207func (x *ScaleButton) GetValue() float64 {
208
209 cret := xScaleButtonGetValue(x.GoPointer())
210 return cret
211}
212
213var xScaleButtonSetAdjustment func(uintptr, uintptr)
214
215// Sets the `GtkAdjustment` to be used as a model
216// for the `GtkScaleButton`’s scale.
217//
218// See [method@Gtk.Range.set_adjustment] for details.
219func (x *ScaleButton) SetAdjustment(AdjustmentVar *Adjustment) {
220
221 xScaleButtonSetAdjustment(x.GoPointer(), AdjustmentVar.GoPointer())
222
223}
224
225var xScaleButtonSetHasFrame func(uintptr, bool)
226
227// Sets the style of the button.
228func (x *ScaleButton) SetHasFrame(HasFrameVar bool) {
229
230 xScaleButtonSetHasFrame(x.GoPointer(), HasFrameVar)
231
232}
233
234var xScaleButtonSetIcons func(uintptr, []string)
235
236// Sets the icons to be used by the scale button.
237func (x *ScaleButton) SetIcons(IconsVar []string) {
238
239 xScaleButtonSetIcons(x.GoPointer(), IconsVar)
240
241}
242
243var xScaleButtonSetValue func(uintptr, float64)
244
245// Sets the current value of the scale.
246//
247// If the value is outside the minimum or maximum range values,
248// it will be clamped to fit inside them.
249//
250// The scale button emits the [signal@Gtk.ScaleButton::value-changed]
251// signal if the value changes.
252func (x *ScaleButton) SetValue(ValueVar float64) {
253
254 xScaleButtonSetValue(x.GoPointer(), ValueVar)
255
256}
257
258func (c *ScaleButton) GoPointer() uintptr {
259 if c == nil {
260 return 0
261 }
262 return c.Ptr
263}
264
265func (c *ScaleButton) SetGoPointer(ptr uintptr) {
266 c.Ptr = ptr
267}
268
269// GetPropertyActive gets the "active" property.
270// If the scale button should be pressed in.
271func (x *ScaleButton) GetPropertyActive() bool {
272 var v gobject.Value
273 x.GetProperty("active", &v)
274 return v.GetBoolean()
275}
276
277// SetPropertyHasFrame sets the "has-frame" property.
278// If the scale button has a frame.
279func (x *ScaleButton) SetPropertyHasFrame(value bool) {
280 var v gobject.Value
281 v.Init(gobject.TypeBooleanVal)
282 v.SetBoolean(value)
283 x.SetProperty("has-frame", &v)
284}
285
286// GetPropertyHasFrame gets the "has-frame" property.
287// If the scale button has a frame.
288func (x *ScaleButton) GetPropertyHasFrame() bool {
289 var v gobject.Value
290 x.GetProperty("has-frame", &v)
291 return v.GetBoolean()
292}
293
294// SetPropertyIcons sets the "icons" property.
295// The names of the icons to be used by the scale button.
296//
297// The first item in the array will be used in the button
298// when the current value is the lowest value, the second
299// item for the highest value. All the subsequent icons will
300// be used for all the other values, spread evenly over the
301// range of values.
302//
303// If there's only one icon name in the @icons array, it will
304// be used for all the values. If only two icon names are in
305// the @icons array, the first one will be used for the bottom
306// 50% of the scale, and the second one for the top 50%.
307//
308// It is recommended to use at least 3 icons so that the
309// `GtkScaleButton` reflects the current value of the scale
310// better for the users.
311func (x *ScaleButton) SetPropertyIcons(value []string) {
312 var v gobject.Value
313 v.Init(glib.StrvGetType())
314 v.SetBoxed(uintptr(unsafe.Pointer(core.ByteSlice(value))))
315 x.SetProperty("icons", &v)
316}
317
318// GetPropertyIcons gets the "icons" property.
319// The names of the icons to be used by the scale button.
320//
321// The first item in the array will be used in the button
322// when the current value is the lowest value, the second
323// item for the highest value. All the subsequent icons will
324// be used for all the other values, spread evenly over the
325// range of values.
326//
327// If there's only one icon name in the @icons array, it will
328// be used for all the values. If only two icon names are in
329// the @icons array, the first one will be used for the bottom
330// 50% of the scale, and the second one for the top 50%.
331//
332// It is recommended to use at least 3 icons so that the
333// `GtkScaleButton` reflects the current value of the scale
334// better for the users.
335func (x *ScaleButton) GetPropertyIcons() []string {
336 var v gobject.Value
337 x.GetProperty("icons", &v)
338 return core.GoStringSlice(v.GetBoxed())
339}
340
341// SetPropertyValue sets the "value" property.
342// The value of the scale.
343func (x *ScaleButton) SetPropertyValue(value float64) {
344 var v gobject.Value
345 v.Init(gobject.TypeDoubleVal)
346 v.SetDouble(value)
347 x.SetProperty("value", &v)
348}
349
350// GetPropertyValue gets the "value" property.
351// The value of the scale.
352func (x *ScaleButton) GetPropertyValue() float64 {
353 var v gobject.Value
354 x.GetProperty("value", &v)
355 return v.GetDouble()
356}
357
358// Emitted to dismiss the popup.
359//
360// This is a [keybinding signal](class.SignalAction.html).
361//
362// The default binding for this signal is <kbd>Escape</kbd>.
363func (x *ScaleButton) ConnectPopdown(cb *func(ScaleButton)) uint {
364 cbPtr := uintptr(unsafe.Pointer(cb))
365 if cbRefPtr, ok := glib.GetCallback(cbPtr); ok {
366 handlerID := gobject.SignalConnect(x.GoPointer(), "popdown", cbRefPtr)
367 glib.SaveHandlerMapping(handlerID, cbPtr)
368 return handlerID
369 }
370
371 fcb := func(clsPtr uintptr) {
372 fa := ScaleButton{}
373 fa.Ptr = clsPtr
374 cbFn := *cb
375
376 cbFn(fa)
377
378 }
379 cbRefPtr := purego.NewCallback(fcb)
380 glib.SaveCallbackWithClosure(cbPtr, cbRefPtr, cb)
381 handlerID := gobject.SignalConnect(x.GoPointer(), "popdown", cbRefPtr)
382 glib.SaveHandlerMapping(handlerID, cbPtr)
383 return handlerID
384}
385
386// Emitted to popup the scale widget.
387//
388// This is a [keybinding signal](class.SignalAction.html).
389//
390// The default bindings for this signal are <kbd>Space</kbd>,
391// <kbd>Enter</kbd> and <kbd>Return</kbd>.
392func (x *ScaleButton) ConnectPopup(cb *func(ScaleButton)) uint {
393 cbPtr := uintptr(unsafe.Pointer(cb))
394 if cbRefPtr, ok := glib.GetCallback(cbPtr); ok {
395 handlerID := gobject.SignalConnect(x.GoPointer(), "popup", cbRefPtr)
396 glib.SaveHandlerMapping(handlerID, cbPtr)
397 return handlerID
398 }
399
400 fcb := func(clsPtr uintptr) {
401 fa := ScaleButton{}
402 fa.Ptr = clsPtr
403 cbFn := *cb
404
405 cbFn(fa)
406
407 }
408 cbRefPtr := purego.NewCallback(fcb)
409 glib.SaveCallbackWithClosure(cbPtr, cbRefPtr, cb)
410 handlerID := gobject.SignalConnect(x.GoPointer(), "popup", cbRefPtr)
411 glib.SaveHandlerMapping(handlerID, cbPtr)
412 return handlerID
413}
414
415// Emitted when the value field has changed.
416func (x *ScaleButton) ConnectValueChanged(cb *func(ScaleButton, float64)) uint {
417 cbPtr := uintptr(unsafe.Pointer(cb))
418 if cbRefPtr, ok := glib.GetCallback(cbPtr); ok {
419 handlerID := gobject.SignalConnect(x.GoPointer(), "value-changed", cbRefPtr)
420 glib.SaveHandlerMapping(handlerID, cbPtr)
421 return handlerID
422 }
423
424 fcb := func(clsPtr uintptr, ValueVarp float64) {
425 fa := ScaleButton{}
426 fa.Ptr = clsPtr
427 cbFn := *cb
428
429 cbFn(fa, ValueVarp)
430
431 }
432 cbRefPtr := purego.NewCallback(fcb)
433 glib.SaveCallbackWithClosure(cbPtr, cbRefPtr, cb)
434 handlerID := gobject.SignalConnect(x.GoPointer(), "value-changed", cbRefPtr)
435 glib.SaveHandlerMapping(handlerID, cbPtr)
436 return handlerID
437}
438
439// Requests the user's screen reader to announce the given message.
440//
441// This kind of notification is useful for messages that
442// either have only a visual representation or that are not
443// exposed visually at all, e.g. a notification about a
444// successful operation.
445//
446// Also, by using this API, you can ensure that the message
447// does not interrupts the user's current screen reader output.
448func (x *ScaleButton) Announce(MessageVar string, PriorityVar AccessibleAnnouncementPriority) {
449
450 XGtkAccessibleAnnounce(x.GoPointer(), MessageVar, PriorityVar)
451
452}
453
454// Retrieves the accessible parent for an accessible object.
455//
456// This function returns `NULL` for top level widgets.
457func (x *ScaleButton) GetAccessibleParent() *AccessibleBase {
458 var cls *AccessibleBase
459
460 cret := XGtkAccessibleGetAccessibleParent(x.GoPointer())
461
462 if cret == 0 {
463 return nil
464 }
465 cls = &AccessibleBase{}
466 cls.Ptr = cret
467 return cls
468}
469
470// Retrieves the accessible role of an accessible object.
471func (x *ScaleButton) GetAccessibleRole() AccessibleRole {
472
473 cret := XGtkAccessibleGetAccessibleRole(x.GoPointer())
474 return cret
475}
476
477// Retrieves the implementation for the given accessible object.
478func (x *ScaleButton) GetAtContext() *ATContext {
479 var cls *ATContext
480
481 cret := XGtkAccessibleGetAtContext(x.GoPointer())
482
483 if cret == 0 {
484 return nil
485 }
486 cls = &ATContext{}
487 cls.Ptr = cret
488 return cls
489}
490
491// Queries the coordinates and dimensions of this accessible
492//
493// This functionality can be overridden by `GtkAccessible`
494// implementations, e.g. to get the bounds from an ignored
495// child widget.
496func (x *ScaleButton) GetBounds(XVar *int, YVar *int, WidthVar *int, HeightVar *int) bool {
497
498 cret := XGtkAccessibleGetBounds(x.GoPointer(), XVar, YVar, WidthVar, HeightVar)
499 return cret
500}
501
502// Retrieves the first accessible child of an accessible object.
503func (x *ScaleButton) GetFirstAccessibleChild() *AccessibleBase {
504 var cls *AccessibleBase
505
506 cret := XGtkAccessibleGetFirstAccessibleChild(x.GoPointer())
507
508 if cret == 0 {
509 return nil
510 }
511 cls = &AccessibleBase{}
512 cls.Ptr = cret
513 return cls
514}
515
516// Retrieves the next accessible sibling of an accessible object
517func (x *ScaleButton) GetNextAccessibleSibling() *AccessibleBase {
518 var cls *AccessibleBase
519
520 cret := XGtkAccessibleGetNextAccessibleSibling(x.GoPointer())
521
522 if cret == 0 {
523 return nil
524 }
525 cls = &AccessibleBase{}
526 cls.Ptr = cret
527 return cls
528}
529
530// Queries a platform state, such as focus.
531//
532// This functionality can be overridden by `GtkAccessible`
533// implementations, e.g. to get platform state from an ignored
534// child widget, as is the case for `GtkText` wrappers.
535func (x *ScaleButton) GetPlatformState(StateVar AccessiblePlatformState) bool {
536
537 cret := XGtkAccessibleGetPlatformState(x.GoPointer(), StateVar)
538 return cret
539}
540
541// Resets the accessible property to its default value.
542func (x *ScaleButton) ResetProperty(PropertyVar AccessibleProperty) {
543
544 XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar)
545
546}
547
548// Resets the accessible relation to its default value.
549func (x *ScaleButton) ResetRelation(RelationVar AccessibleRelation) {
550
551 XGtkAccessibleResetRelation(x.GoPointer(), RelationVar)
552
553}
554
555// Resets the accessible state to its default value.
556func (x *ScaleButton) ResetState(StateVar AccessibleState) {
557
558 XGtkAccessibleResetState(x.GoPointer(), StateVar)
559
560}
561
562// Sets the parent and sibling of an accessible object.
563//
564// This function is meant to be used by accessible implementations that are
565// not part of the widget hierarchy, and but act as a logical bridge between
566// widgets. For instance, if a widget creates an object that holds metadata
567// for each child, and you want that object to implement the `GtkAccessible`
568// interface, you will use this function to ensure that the parent of each
569// child widget is the metadata object, and the parent of each metadata
570// object is the container widget.
571func (x *ScaleButton) SetAccessibleParent(ParentVar Accessible, NextSiblingVar Accessible) {
572
573 XGtkAccessibleSetAccessibleParent(x.GoPointer(), ParentVar.GoPointer(), NextSiblingVar.GoPointer())
574
575}
576
577// Updates the next accessible sibling.
578//
579// That might be useful when a new child of a custom accessible
580// is created, and it needs to be linked to a previous child.
581func (x *ScaleButton) UpdateNextAccessibleSibling(NewSiblingVar Accessible) {
582
583 XGtkAccessibleUpdateNextAccessibleSibling(x.GoPointer(), NewSiblingVar.GoPointer())
584
585}
586
587// Informs ATs that the platform state has changed.
588//
589// This function should be used by `GtkAccessible` implementations that
590// have a platform state but are not widgets. Widgets handle platform
591// states automatically.
592func (x *ScaleButton) UpdatePlatformState(StateVar AccessiblePlatformState) {
593
594 XGtkAccessibleUpdatePlatformState(x.GoPointer(), StateVar)
595
596}
597
598// Updates a list of accessible properties.
599//
600// See the [enum@Gtk.AccessibleProperty] documentation for the
601// value types of accessible properties.
602//
603// This function should be called by `GtkWidget` types whenever
604// an accessible property change must be communicated to assistive
605// technologies.
606//
607// Example:
608// ```c
609// value = gtk_adjustment_get_value (adjustment);
610// gtk_accessible_update_property (GTK_ACCESSIBLE (spin_button),
611//
612// GTK_ACCESSIBLE_PROPERTY_VALUE_NOW, value,
613// -1);
614//
615// ```
616func (x *ScaleButton) UpdateProperty(FirstPropertyVar AccessibleProperty, varArgs ...interface{}) {
617
618 XGtkAccessibleUpdateProperty(x.GoPointer(), FirstPropertyVar, varArgs...)
619
620}
621
622// Updates an array of accessible properties.
623//
624// This function should be called by `GtkWidget` types whenever an accessible
625// property change must be communicated to assistive technologies.
626//
627// This function is meant to be used by language bindings.
628func (x *ScaleButton) UpdatePropertyValue(NPropertiesVar int, PropertiesVar []AccessibleProperty, ValuesVar []gobject.Value) {
629
630 XGtkAccessibleUpdatePropertyValue(x.GoPointer(), NPropertiesVar, PropertiesVar, ValuesVar)
631
632}
633
634// Updates a list of accessible relations.
635//
636// This function should be called by `GtkWidget` types whenever an accessible
637// relation change must be communicated to assistive technologies.
638//
639// If the [enum@Gtk.AccessibleRelation] requires a list of references,
640// you should pass each reference individually, followed by `NULL`, e.g.
641//
642// ```c
643// gtk_accessible_update_relation (accessible,
644//
645// GTK_ACCESSIBLE_RELATION_CONTROLS,
646// ref1, NULL,
647// GTK_ACCESSIBLE_RELATION_LABELLED_BY,
648// ref1, ref2, ref3, NULL,
649// -1);
650//
651// ```
652func (x *ScaleButton) UpdateRelation(FirstRelationVar AccessibleRelation, varArgs ...interface{}) {
653
654 XGtkAccessibleUpdateRelation(x.GoPointer(), FirstRelationVar, varArgs...)
655
656}
657
658// Updates an array of accessible relations.
659//
660// This function should be called by `GtkWidget` types whenever an accessible
661// relation change must be communicated to assistive technologies.
662//
663// This function is meant to be used by language bindings.
664func (x *ScaleButton) UpdateRelationValue(NRelationsVar int, RelationsVar []AccessibleRelation, ValuesVar []gobject.Value) {
665
666 XGtkAccessibleUpdateRelationValue(x.GoPointer(), NRelationsVar, RelationsVar, ValuesVar)
667
668}
669
670// Updates a list of accessible states.
671//
672// See the [enum@Gtk.AccessibleState] documentation for the
673// value types of accessible states.
674//
675// This function should be called by `GtkWidget` types whenever
676// an accessible state change must be communicated to assistive
677// technologies.
678//
679// Example:
680//
681// ```c
682// value = GTK_ACCESSIBLE_TRISTATE_MIXED;
683// gtk_accessible_update_state (GTK_ACCESSIBLE (check_button),
684//
685// GTK_ACCESSIBLE_STATE_CHECKED, value,
686// -1);
687//
688// ```
689func (x *ScaleButton) UpdateState(FirstStateVar AccessibleState, varArgs ...interface{}) {
690
691 XGtkAccessibleUpdateState(x.GoPointer(), FirstStateVar, varArgs...)
692
693}
694
695// Updates an array of accessible states.
696//
697// This function should be called by `GtkWidget` types whenever an accessible
698// state change must be communicated to assistive technologies.
699//
700// This function is meant to be used by language bindings.
701func (x *ScaleButton) UpdateStateValue(NStatesVar int, StatesVar []AccessibleState, ValuesVar []gobject.Value) {
702
703 XGtkAccessibleUpdateStateValue(x.GoPointer(), NStatesVar, StatesVar, ValuesVar)
704
705}
706
707// Gets the ID of the @buildable object.
708//
709// `GtkBuilder` sets the name based on the ID attribute
710// of the `<object>` tag used to construct the @buildable.
711func (x *ScaleButton) GetBuildableId() string {
712
713 cret := XGtkBuildableGetBuildableId(x.GoPointer())
714 return cret
715}
716
717// Retrieves the orientation of the @orientable.
718func (x *ScaleButton) GetOrientation() Orientation {
719
720 cret := XGtkOrientableGetOrientation(x.GoPointer())
721 return cret
722}
723
724// Sets the orientation of the @orientable.
725func (x *ScaleButton) SetOrientation(OrientationVar Orientation) {
726
727 XGtkOrientableSetOrientation(x.GoPointer(), OrientationVar)
728
729}
730
731func init() {
732 core.SetPackageName("GTK", "gtk4")
733 core.SetSharedLibraries("GTK", []string{"libgtk-4.so.1"})
734 var libs []uintptr
735 for _, libPath := range core.GetPaths("GTK") {
736 lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL)
737 if err != nil {
738 panic(err)
739 }
740 libs = append(libs, lib)
741 }
742
743 core.PuregoSafeRegister(&xScaleButtonGLibType, libs, "gtk_scale_button_get_type")
744
745 core.PuregoSafeRegister(&xNewScaleButton, libs, "gtk_scale_button_new")
746
747 core.PuregoSafeRegister(&xScaleButtonGetActive, libs, "gtk_scale_button_get_active")
748 core.PuregoSafeRegister(&xScaleButtonGetAdjustment, libs, "gtk_scale_button_get_adjustment")
749 core.PuregoSafeRegister(&xScaleButtonGetHasFrame, libs, "gtk_scale_button_get_has_frame")
750 core.PuregoSafeRegister(&xScaleButtonGetMinusButton, libs, "gtk_scale_button_get_minus_button")
751 core.PuregoSafeRegister(&xScaleButtonGetPlusButton, libs, "gtk_scale_button_get_plus_button")
752 core.PuregoSafeRegister(&xScaleButtonGetPopup, libs, "gtk_scale_button_get_popup")
753 core.PuregoSafeRegister(&xScaleButtonGetValue, libs, "gtk_scale_button_get_value")
754 core.PuregoSafeRegister(&xScaleButtonSetAdjustment, libs, "gtk_scale_button_set_adjustment")
755 core.PuregoSafeRegister(&xScaleButtonSetHasFrame, libs, "gtk_scale_button_set_has_frame")
756 core.PuregoSafeRegister(&xScaleButtonSetIcons, libs, "gtk_scale_button_set_icons")
757 core.PuregoSafeRegister(&xScaleButtonSetValue, libs, "gtk_scale_button_set_value")
758
759}