1// Package gtk was automatically generated by github.com/bnema/puregotk DO NOT EDIT
2package gtk
3
4import (
5 "unsafe"
6
7 "github.com/ebitengine/purego"
8
9 "github.com/bnema/puregotk/pkg/core"
10 "github.com/bnema/puregotk/v4/glib"
11 "github.com/bnema/puregotk/v4/gobject"
12 "github.com/bnema/puregotk/v4/gobject/types"
13)
14
15// `GtkInfoBar` can be used to show messages to the user without a dialog.
16//
17// <picture>
18//
19// <source srcset="info-bar-dark.png" media="(prefers-color-scheme: dark)">
20// <img alt="An example GtkInfoBar" src="info-bar.png">
21//
22// </picture>
23//
24// It is often temporarily shown at the top or bottom of a document.
25// In contrast to [class@Gtk.Dialog], which has an action area at the
26// bottom, `GtkInfoBar` has an action area at the side.
27//
28// The API of `GtkInfoBar` is very similar to `GtkDialog`, allowing you
29// to add buttons to the action area with [method@Gtk.InfoBar.add_button]
30// or [ctor@Gtk.InfoBar.new_with_buttons]. The sensitivity of action widgets
31// can be controlled with [method@Gtk.InfoBar.set_response_sensitive].
32//
33// To add widgets to the main content area of a `GtkInfoBar`, use
34// [method@Gtk.InfoBar.add_child].
35//
36// Similar to [class@Gtk.MessageDialog], the contents of a `GtkInfoBar`
37// can by classified as error message, warning, informational message, etc,
38// by using [method@Gtk.InfoBar.set_message_type]. GTK may use the message
39// type to determine how the message is displayed.
40//
41// A simple example for using a `GtkInfoBar`:
42// ```c
43// GtkWidget *message_label;
44// GtkWidget *widget;
45// GtkWidget *grid;
46// GtkInfoBar *bar;
47//
48// // set up info bar
49// widget = gtk_info_bar_new ();
50// bar = GTK_INFO_BAR (widget);
51// grid = gtk_grid_new ();
52//
53// message_label = gtk_label_new ("");
54// gtk_info_bar_add_child (bar, message_label);
55// gtk_info_bar_add_button (bar,
56//
57// _("_OK"),
58// GTK_RESPONSE_OK);
59//
60// g_signal_connect (bar,
61//
62// "response",
63// G_CALLBACK (gtk_widget_hide),
64// NULL);
65//
66// gtk_grid_attach (GTK_GRID (grid),
67//
68// widget,
69// 0, 2, 1, 1);
70//
71// // ...
72//
73// // show an error message
74// gtk_label_set_text (GTK_LABEL (message_label), "An error occurred!");
75// gtk_info_bar_set_message_type (bar, GTK_MESSAGE_ERROR);
76// gtk_widget_show (bar);
77// ```
78//
79// # GtkInfoBar as GtkBuildable
80//
81// `GtkInfoBar` supports a custom `<action-widgets>` element, which can contain
82// multiple `<action-widget>` elements. The “response” attribute specifies a
83// numeric response, and the content of the element is the id of widget
84// (which should be a child of the dialogs @action_area).
85//
86// `GtkInfoBar` supports adding action widgets by specifying “action” as
87// the “type” attribute of a `<child>` element. The widget will be added
88// either to the action area. The response id has to be associated
89// with the action widget using the `<action-widgets>` element.
90//
91// # CSS nodes
92//
93// `GtkInfoBar` has a single CSS node with name infobar. The node may get
94// one of the style classes .info, .warning, .error or .question, depending
95// on the message type.
96// If the info bar shows a close button, that button will have the .close
97// style class applied.
98type InfoBar struct {
99 Widget
100}
101
102var xInfoBarGLibType func() types.GType
103
104func InfoBarGLibType() types.GType {
105 return xInfoBarGLibType()
106}
107
108func InfoBarNewFromInternalPtr(ptr uintptr) *InfoBar {
109 cls := &InfoBar{}
110 cls.Ptr = ptr
111 return cls
112}
113
114var xNewInfoBar func() uintptr
115
116// Creates a new `GtkInfoBar` object.
117func NewInfoBar() *InfoBar {
118 var cls *InfoBar
119
120 cret := xNewInfoBar()
121
122 if cret == 0 {
123 return nil
124 }
125 gobject.IncreaseRef(cret)
126 cls = &InfoBar{}
127 cls.Ptr = cret
128 return cls
129}
130
131var xNewInfoBarWithButtons func(uintptr, ...interface{}) uintptr
132
133// Creates a new `GtkInfoBar` with buttons.
134//
135// Button text/response ID pairs should be listed, with a %NULL pointer
136// ending the list. A response ID can be any positive number,
137// or one of the values in the `GtkResponseType` enumeration. If the
138// user clicks one of these dialog buttons, GtkInfoBar will emit
139// the [signal@Gtk.InfoBar::response] signal with the corresponding
140// response ID.
141func NewInfoBarWithButtons(FirstButtonTextVar *string, varArgs ...interface{}) *InfoBar {
142 var cls *InfoBar
143
144 FirstButtonTextVarPtr := core.GStrdupNullable(FirstButtonTextVar)
145 defer core.GFreeNullable(FirstButtonTextVarPtr)
146
147 cret := xNewInfoBarWithButtons(FirstButtonTextVarPtr, varArgs...)
148
149 if cret == 0 {
150 return nil
151 }
152 gobject.IncreaseRef(cret)
153 cls = &InfoBar{}
154 cls.Ptr = cret
155 return cls
156}
157
158var xInfoBarAddActionWidget func(uintptr, uintptr, int)
159
160// Add an activatable widget to the action area of a `GtkInfoBar`.
161//
162// This also connects a signal handler that will emit the
163// [signal@Gtk.InfoBar::response] signal on the message area
164// when the widget is activated. The widget is appended to the
165// end of the message areas action area.
166func (x *InfoBar) AddActionWidget(ChildVar *Widget, ResponseIdVar int) {
167
168 xInfoBarAddActionWidget(x.GoPointer(), ChildVar.GoPointer(), ResponseIdVar)
169
170}
171
172var xInfoBarAddButton func(uintptr, string, int) uintptr
173
174// Adds a button with the given text.
175//
176// Clicking the button will emit the [signal@Gtk.InfoBar::response]
177// signal with the given response_id. The button is appended to the
178// end of the info bar's action area. The button widget is returned,
179// but usually you don't need it.
180func (x *InfoBar) AddButton(ButtonTextVar string, ResponseIdVar int) *Button {
181 var cls *Button
182
183 cret := xInfoBarAddButton(x.GoPointer(), ButtonTextVar, ResponseIdVar)
184
185 if cret == 0 {
186 return nil
187 }
188 gobject.IncreaseRef(cret)
189 cls = &Button{}
190 cls.Ptr = cret
191 return cls
192}
193
194var xInfoBarAddButtons func(uintptr, string, ...interface{})
195
196// Adds multiple buttons.
197//
198// This is the same as calling [method@Gtk.InfoBar.add_button]
199// repeatedly. The variable argument list should be %NULL-terminated
200// as with [ctor@Gtk.InfoBar.new_with_buttons]. Each button must have both
201// text and response ID.
202func (x *InfoBar) AddButtons(FirstButtonTextVar string, varArgs ...interface{}) {
203
204 xInfoBarAddButtons(x.GoPointer(), FirstButtonTextVar, varArgs...)
205
206}
207
208var xInfoBarAddChild func(uintptr, uintptr)
209
210// Adds a widget to the content area of the info bar.
211func (x *InfoBar) AddChild(WidgetVar *Widget) {
212
213 xInfoBarAddChild(x.GoPointer(), WidgetVar.GoPointer())
214
215}
216
217var xInfoBarGetMessageType func(uintptr) MessageType
218
219// Returns the message type of the message area.
220func (x *InfoBar) GetMessageType() MessageType {
221
222 cret := xInfoBarGetMessageType(x.GoPointer())
223 return cret
224}
225
226var xInfoBarGetRevealed func(uintptr) bool
227
228// Returns whether the info bar is currently revealed.
229func (x *InfoBar) GetRevealed() bool {
230
231 cret := xInfoBarGetRevealed(x.GoPointer())
232 return cret
233}
234
235var xInfoBarGetShowCloseButton func(uintptr) bool
236
237// Returns whether the widget will display a standard close button.
238func (x *InfoBar) GetShowCloseButton() bool {
239
240 cret := xInfoBarGetShowCloseButton(x.GoPointer())
241 return cret
242}
243
244var xInfoBarRemoveActionWidget func(uintptr, uintptr)
245
246// Removes a widget from the action area of @info_bar.
247//
248// The widget must have been put there by a call to
249// [method@Gtk.InfoBar.add_action_widget] or [method@Gtk.InfoBar.add_button].
250func (x *InfoBar) RemoveActionWidget(WidgetVar *Widget) {
251
252 xInfoBarRemoveActionWidget(x.GoPointer(), WidgetVar.GoPointer())
253
254}
255
256var xInfoBarRemoveChild func(uintptr, uintptr)
257
258// Removes a widget from the content area of the info bar.
259func (x *InfoBar) RemoveChild(WidgetVar *Widget) {
260
261 xInfoBarRemoveChild(x.GoPointer(), WidgetVar.GoPointer())
262
263}
264
265var xInfoBarResponse func(uintptr, int)
266
267// Emits the “response” signal with the given @response_id.
268func (x *InfoBar) Response(ResponseIdVar int) {
269
270 xInfoBarResponse(x.GoPointer(), ResponseIdVar)
271
272}
273
274var xInfoBarSetDefaultResponse func(uintptr, int)
275
276// Sets the last widget in the info bar’s action area with
277// the given response_id as the default widget for the dialog.
278//
279// Pressing “Enter” normally activates the default widget.
280//
281// Note that this function currently requires @info_bar to
282// be added to a widget hierarchy.
283func (x *InfoBar) SetDefaultResponse(ResponseIdVar int) {
284
285 xInfoBarSetDefaultResponse(x.GoPointer(), ResponseIdVar)
286
287}
288
289var xInfoBarSetMessageType func(uintptr, MessageType)
290
291// Sets the message type of the message area.
292//
293// GTK uses this type to determine how the message is displayed.
294func (x *InfoBar) SetMessageType(MessageTypeVar MessageType) {
295
296 xInfoBarSetMessageType(x.GoPointer(), MessageTypeVar)
297
298}
299
300var xInfoBarSetResponseSensitive func(uintptr, int, bool)
301
302// Sets the sensitivity of action widgets for @response_id.
303//
304// Calls `gtk_widget_set_sensitive (widget, setting)` for each
305// widget in the info bars’s action area with the given @response_id.
306// A convenient way to sensitize/desensitize buttons.
307func (x *InfoBar) SetResponseSensitive(ResponseIdVar int, SettingVar bool) {
308
309 xInfoBarSetResponseSensitive(x.GoPointer(), ResponseIdVar, SettingVar)
310
311}
312
313var xInfoBarSetRevealed func(uintptr, bool)
314
315// Sets whether the `GtkInfoBar` is revealed.
316//
317// Changing this will make @info_bar reveal or conceal
318// itself via a sliding transition.
319//
320// Note: this does not show or hide @info_bar in the
321// [property@Gtk.Widget:visible] sense, so revealing has no effect
322// if [property@Gtk.Widget:visible] is %FALSE.
323func (x *InfoBar) SetRevealed(RevealedVar bool) {
324
325 xInfoBarSetRevealed(x.GoPointer(), RevealedVar)
326
327}
328
329var xInfoBarSetShowCloseButton func(uintptr, bool)
330
331// If true, a standard close button is shown.
332//
333// When clicked it emits the response %GTK_RESPONSE_CLOSE.
334func (x *InfoBar) SetShowCloseButton(SettingVar bool) {
335
336 xInfoBarSetShowCloseButton(x.GoPointer(), SettingVar)
337
338}
339
340func (c *InfoBar) GoPointer() uintptr {
341 if c == nil {
342 return 0
343 }
344 return c.Ptr
345}
346
347func (c *InfoBar) SetGoPointer(ptr uintptr) {
348 c.Ptr = ptr
349}
350
351// SetPropertyRevealed sets the "revealed" property.
352// Whether the info bar shows its contents.
353func (x *InfoBar) SetPropertyRevealed(value bool) {
354 var v gobject.Value
355 v.Init(gobject.TypeBooleanVal)
356 v.SetBoolean(value)
357 x.SetProperty("revealed", &v)
358}
359
360// GetPropertyRevealed gets the "revealed" property.
361// Whether the info bar shows its contents.
362func (x *InfoBar) GetPropertyRevealed() bool {
363 var v gobject.Value
364 x.GetProperty("revealed", &v)
365 return v.GetBoolean()
366}
367
368// SetPropertyShowCloseButton sets the "show-close-button" property.
369// Whether to include a standard close button.
370func (x *InfoBar) SetPropertyShowCloseButton(value bool) {
371 var v gobject.Value
372 v.Init(gobject.TypeBooleanVal)
373 v.SetBoolean(value)
374 x.SetProperty("show-close-button", &v)
375}
376
377// GetPropertyShowCloseButton gets the "show-close-button" property.
378// Whether to include a standard close button.
379func (x *InfoBar) GetPropertyShowCloseButton() bool {
380 var v gobject.Value
381 x.GetProperty("show-close-button", &v)
382 return v.GetBoolean()
383}
384
385// Gets emitted when the user uses a keybinding to dismiss the info bar.
386//
387// The ::close signal is a [keybinding signal](class.SignalAction.html).
388//
389// The default binding for this signal is the Escape key.
390func (x *InfoBar) ConnectClose(cb *func(InfoBar)) uint {
391 cbPtr := uintptr(unsafe.Pointer(cb))
392 if cbRefPtr, ok := glib.GetCallback(cbPtr); ok {
393 handlerID := gobject.SignalConnect(x.GoPointer(), "close", cbRefPtr)
394 glib.SaveHandlerMapping(handlerID, cbPtr)
395 return handlerID
396 }
397
398 fcb := func(clsPtr uintptr) {
399 fa := InfoBar{}
400 fa.Ptr = clsPtr
401 cbFn := *cb
402
403 cbFn(fa)
404
405 }
406 cbRefPtr := purego.NewCallback(fcb)
407 glib.SaveCallbackWithClosure(cbPtr, cbRefPtr, cb)
408 handlerID := gobject.SignalConnect(x.GoPointer(), "close", cbRefPtr)
409 glib.SaveHandlerMapping(handlerID, cbPtr)
410 return handlerID
411}
412
413// Emitted when an action widget is clicked.
414//
415// The signal is also emitted when the application programmer
416// calls [method@Gtk.InfoBar.response]. The @response_id depends
417// on which action widget was clicked.
418func (x *InfoBar) ConnectResponse(cb *func(InfoBar, int)) uint {
419 cbPtr := uintptr(unsafe.Pointer(cb))
420 if cbRefPtr, ok := glib.GetCallback(cbPtr); ok {
421 handlerID := gobject.SignalConnect(x.GoPointer(), "response", cbRefPtr)
422 glib.SaveHandlerMapping(handlerID, cbPtr)
423 return handlerID
424 }
425
426 fcb := func(clsPtr uintptr, ResponseIdVarp int) {
427 fa := InfoBar{}
428 fa.Ptr = clsPtr
429 cbFn := *cb
430
431 cbFn(fa, ResponseIdVarp)
432
433 }
434 cbRefPtr := purego.NewCallback(fcb)
435 glib.SaveCallbackWithClosure(cbPtr, cbRefPtr, cb)
436 handlerID := gobject.SignalConnect(x.GoPointer(), "response", cbRefPtr)
437 glib.SaveHandlerMapping(handlerID, cbPtr)
438 return handlerID
439}
440
441// Requests the user's screen reader to announce the given message.
442//
443// This kind of notification is useful for messages that
444// either have only a visual representation or that are not
445// exposed visually at all, e.g. a notification about a
446// successful operation.
447//
448// Also, by using this API, you can ensure that the message
449// does not interrupts the user's current screen reader output.
450func (x *InfoBar) Announce(MessageVar string, PriorityVar AccessibleAnnouncementPriority) {
451
452 XGtkAccessibleAnnounce(x.GoPointer(), MessageVar, PriorityVar)
453
454}
455
456// Retrieves the accessible parent for an accessible object.
457//
458// This function returns `NULL` for top level widgets.
459func (x *InfoBar) GetAccessibleParent() *AccessibleBase {
460 var cls *AccessibleBase
461
462 cret := XGtkAccessibleGetAccessibleParent(x.GoPointer())
463
464 if cret == 0 {
465 return nil
466 }
467 cls = &AccessibleBase{}
468 cls.Ptr = cret
469 return cls
470}
471
472// Retrieves the accessible role of an accessible object.
473func (x *InfoBar) GetAccessibleRole() AccessibleRole {
474
475 cret := XGtkAccessibleGetAccessibleRole(x.GoPointer())
476 return cret
477}
478
479// Retrieves the implementation for the given accessible object.
480func (x *InfoBar) GetAtContext() *ATContext {
481 var cls *ATContext
482
483 cret := XGtkAccessibleGetAtContext(x.GoPointer())
484
485 if cret == 0 {
486 return nil
487 }
488 cls = &ATContext{}
489 cls.Ptr = cret
490 return cls
491}
492
493// Queries the coordinates and dimensions of this accessible
494//
495// This functionality can be overridden by `GtkAccessible`
496// implementations, e.g. to get the bounds from an ignored
497// child widget.
498func (x *InfoBar) GetBounds(XVar *int, YVar *int, WidthVar *int, HeightVar *int) bool {
499
500 cret := XGtkAccessibleGetBounds(x.GoPointer(), XVar, YVar, WidthVar, HeightVar)
501 return cret
502}
503
504// Retrieves the first accessible child of an accessible object.
505func (x *InfoBar) GetFirstAccessibleChild() *AccessibleBase {
506 var cls *AccessibleBase
507
508 cret := XGtkAccessibleGetFirstAccessibleChild(x.GoPointer())
509
510 if cret == 0 {
511 return nil
512 }
513 cls = &AccessibleBase{}
514 cls.Ptr = cret
515 return cls
516}
517
518// Retrieves the next accessible sibling of an accessible object
519func (x *InfoBar) GetNextAccessibleSibling() *AccessibleBase {
520 var cls *AccessibleBase
521
522 cret := XGtkAccessibleGetNextAccessibleSibling(x.GoPointer())
523
524 if cret == 0 {
525 return nil
526 }
527 cls = &AccessibleBase{}
528 cls.Ptr = cret
529 return cls
530}
531
532// Queries a platform state, such as focus.
533//
534// This functionality can be overridden by `GtkAccessible`
535// implementations, e.g. to get platform state from an ignored
536// child widget, as is the case for `GtkText` wrappers.
537func (x *InfoBar) GetPlatformState(StateVar AccessiblePlatformState) bool {
538
539 cret := XGtkAccessibleGetPlatformState(x.GoPointer(), StateVar)
540 return cret
541}
542
543// Resets the accessible property to its default value.
544func (x *InfoBar) ResetProperty(PropertyVar AccessibleProperty) {
545
546 XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar)
547
548}
549
550// Resets the accessible relation to its default value.
551func (x *InfoBar) ResetRelation(RelationVar AccessibleRelation) {
552
553 XGtkAccessibleResetRelation(x.GoPointer(), RelationVar)
554
555}
556
557// Resets the accessible state to its default value.
558func (x *InfoBar) ResetState(StateVar AccessibleState) {
559
560 XGtkAccessibleResetState(x.GoPointer(), StateVar)
561
562}
563
564// Sets the parent and sibling of an accessible object.
565//
566// This function is meant to be used by accessible implementations that are
567// not part of the widget hierarchy, and but act as a logical bridge between
568// widgets. For instance, if a widget creates an object that holds metadata
569// for each child, and you want that object to implement the `GtkAccessible`
570// interface, you will use this function to ensure that the parent of each
571// child widget is the metadata object, and the parent of each metadata
572// object is the container widget.
573func (x *InfoBar) SetAccessibleParent(ParentVar Accessible, NextSiblingVar Accessible) {
574
575 XGtkAccessibleSetAccessibleParent(x.GoPointer(), ParentVar.GoPointer(), NextSiblingVar.GoPointer())
576
577}
578
579// Updates the next accessible sibling.
580//
581// That might be useful when a new child of a custom accessible
582// is created, and it needs to be linked to a previous child.
583func (x *InfoBar) UpdateNextAccessibleSibling(NewSiblingVar Accessible) {
584
585 XGtkAccessibleUpdateNextAccessibleSibling(x.GoPointer(), NewSiblingVar.GoPointer())
586
587}
588
589// Informs ATs that the platform state has changed.
590//
591// This function should be used by `GtkAccessible` implementations that
592// have a platform state but are not widgets. Widgets handle platform
593// states automatically.
594func (x *InfoBar) UpdatePlatformState(StateVar AccessiblePlatformState) {
595
596 XGtkAccessibleUpdatePlatformState(x.GoPointer(), StateVar)
597
598}
599
600// Updates a list of accessible properties.
601//
602// See the [enum@Gtk.AccessibleProperty] documentation for the
603// value types of accessible properties.
604//
605// This function should be called by `GtkWidget` types whenever
606// an accessible property change must be communicated to assistive
607// technologies.
608//
609// Example:
610// ```c
611// value = gtk_adjustment_get_value (adjustment);
612// gtk_accessible_update_property (GTK_ACCESSIBLE (spin_button),
613//
614// GTK_ACCESSIBLE_PROPERTY_VALUE_NOW, value,
615// -1);
616//
617// ```
618func (x *InfoBar) UpdateProperty(FirstPropertyVar AccessibleProperty, varArgs ...interface{}) {
619
620 XGtkAccessibleUpdateProperty(x.GoPointer(), FirstPropertyVar, varArgs...)
621
622}
623
624// Updates an array of accessible properties.
625//
626// This function should be called by `GtkWidget` types whenever an accessible
627// property change must be communicated to assistive technologies.
628//
629// This function is meant to be used by language bindings.
630func (x *InfoBar) UpdatePropertyValue(NPropertiesVar int, PropertiesVar []AccessibleProperty, ValuesVar []gobject.Value) {
631
632 XGtkAccessibleUpdatePropertyValue(x.GoPointer(), NPropertiesVar, PropertiesVar, ValuesVar)
633
634}
635
636// Updates a list of accessible relations.
637//
638// This function should be called by `GtkWidget` types whenever an accessible
639// relation change must be communicated to assistive technologies.
640//
641// If the [enum@Gtk.AccessibleRelation] requires a list of references,
642// you should pass each reference individually, followed by `NULL`, e.g.
643//
644// ```c
645// gtk_accessible_update_relation (accessible,
646//
647// GTK_ACCESSIBLE_RELATION_CONTROLS,
648// ref1, NULL,
649// GTK_ACCESSIBLE_RELATION_LABELLED_BY,
650// ref1, ref2, ref3, NULL,
651// -1);
652//
653// ```
654func (x *InfoBar) UpdateRelation(FirstRelationVar AccessibleRelation, varArgs ...interface{}) {
655
656 XGtkAccessibleUpdateRelation(x.GoPointer(), FirstRelationVar, varArgs...)
657
658}
659
660// Updates an array of accessible relations.
661//
662// This function should be called by `GtkWidget` types whenever an accessible
663// relation change must be communicated to assistive technologies.
664//
665// This function is meant to be used by language bindings.
666func (x *InfoBar) UpdateRelationValue(NRelationsVar int, RelationsVar []AccessibleRelation, ValuesVar []gobject.Value) {
667
668 XGtkAccessibleUpdateRelationValue(x.GoPointer(), NRelationsVar, RelationsVar, ValuesVar)
669
670}
671
672// Updates a list of accessible states.
673//
674// See the [enum@Gtk.AccessibleState] documentation for the
675// value types of accessible states.
676//
677// This function should be called by `GtkWidget` types whenever
678// an accessible state change must be communicated to assistive
679// technologies.
680//
681// Example:
682//
683// ```c
684// value = GTK_ACCESSIBLE_TRISTATE_MIXED;
685// gtk_accessible_update_state (GTK_ACCESSIBLE (check_button),
686//
687// GTK_ACCESSIBLE_STATE_CHECKED, value,
688// -1);
689//
690// ```
691func (x *InfoBar) UpdateState(FirstStateVar AccessibleState, varArgs ...interface{}) {
692
693 XGtkAccessibleUpdateState(x.GoPointer(), FirstStateVar, varArgs...)
694
695}
696
697// Updates an array of accessible states.
698//
699// This function should be called by `GtkWidget` types whenever an accessible
700// state change must be communicated to assistive technologies.
701//
702// This function is meant to be used by language bindings.
703func (x *InfoBar) UpdateStateValue(NStatesVar int, StatesVar []AccessibleState, ValuesVar []gobject.Value) {
704
705 XGtkAccessibleUpdateStateValue(x.GoPointer(), NStatesVar, StatesVar, ValuesVar)
706
707}
708
709// Gets the ID of the @buildable object.
710//
711// `GtkBuilder` sets the name based on the ID attribute
712// of the `<object>` tag used to construct the @buildable.
713func (x *InfoBar) GetBuildableId() string {
714
715 cret := XGtkBuildableGetBuildableId(x.GoPointer())
716 return cret
717}
718
719func init() {
720 core.SetPackageName("GTK", "gtk4")
721 core.SetSharedLibraries("GTK", []string{"libgtk-4.so.1"})
722 var libs []uintptr
723 for _, libPath := range core.GetPaths("GTK") {
724 lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL)
725 if err != nil {
726 panic(err)
727 }
728 libs = append(libs, lib)
729 }
730
731 core.PuregoSafeRegister(&xInfoBarGLibType, libs, "gtk_info_bar_get_type")
732
733 core.PuregoSafeRegister(&xNewInfoBar, libs, "gtk_info_bar_new")
734 core.PuregoSafeRegister(&xNewInfoBarWithButtons, libs, "gtk_info_bar_new_with_buttons")
735
736 core.PuregoSafeRegister(&xInfoBarAddActionWidget, libs, "gtk_info_bar_add_action_widget")
737 core.PuregoSafeRegister(&xInfoBarAddButton, libs, "gtk_info_bar_add_button")
738 core.PuregoSafeRegister(&xInfoBarAddButtons, libs, "gtk_info_bar_add_buttons")
739 core.PuregoSafeRegister(&xInfoBarAddChild, libs, "gtk_info_bar_add_child")
740 core.PuregoSafeRegister(&xInfoBarGetMessageType, libs, "gtk_info_bar_get_message_type")
741 core.PuregoSafeRegister(&xInfoBarGetRevealed, libs, "gtk_info_bar_get_revealed")
742 core.PuregoSafeRegister(&xInfoBarGetShowCloseButton, libs, "gtk_info_bar_get_show_close_button")
743 core.PuregoSafeRegister(&xInfoBarRemoveActionWidget, libs, "gtk_info_bar_remove_action_widget")
744 core.PuregoSafeRegister(&xInfoBarRemoveChild, libs, "gtk_info_bar_remove_child")
745 core.PuregoSafeRegister(&xInfoBarResponse, libs, "gtk_info_bar_response")
746 core.PuregoSafeRegister(&xInfoBarSetDefaultResponse, libs, "gtk_info_bar_set_default_response")
747 core.PuregoSafeRegister(&xInfoBarSetMessageType, libs, "gtk_info_bar_set_message_type")
748 core.PuregoSafeRegister(&xInfoBarSetResponseSensitive, libs, "gtk_info_bar_set_response_sensitive")
749 core.PuregoSafeRegister(&xInfoBarSetRevealed, libs, "gtk_info_bar_set_revealed")
750 core.PuregoSafeRegister(&xInfoBarSetShowCloseButton, libs, "gtk_info_bar_set_show_close_button")
751
752}