// Package adw was automatically generated by github.com/bnema/puregotk DO NOT EDIT package adw import ( "structs" "unsafe" "github.com/ebitengine/purego" "github.com/bnema/puregotk/pkg/core" "github.com/bnema/puregotk/v4/glib" "github.com/bnema/puregotk/v4/gobject" "github.com/bnema/puregotk/v4/gobject/types" "github.com/bnema/puregotk/v4/gtk" ) type DialogClass struct { _ structs.HostLayout ParentClass gtk.WidgetClass xCloseAttempt uintptr xClosed uintptr Padding [4]uintptr } func (x *DialogClass) GoPointer() uintptr { return uintptr(unsafe.Pointer(x)) } // OverrideCloseAttempt sets the "close_attempt" callback function. func (x *DialogClass) OverrideCloseAttempt(cb func(*Dialog)) { if cb == nil { x.xCloseAttempt = 0 } else { x.xCloseAttempt = purego.NewCallback(func(DialogVarp uintptr) { cb(DialogNewFromInternalPtr(DialogVarp)) }) } } // GetCloseAttempt gets the "close_attempt" callback function. func (x *DialogClass) GetCloseAttempt() func(*Dialog) { if x.xCloseAttempt == 0 { return nil } var rawCallback func(DialogVarp uintptr) purego.RegisterFunc(&rawCallback, x.xCloseAttempt) return func(DialogVar *Dialog) { rawCallback(DialogVar.GoPointer()) } } // OverrideClosed sets the "closed" callback function. func (x *DialogClass) OverrideClosed(cb func(*Dialog)) { if cb == nil { x.xClosed = 0 } else { x.xClosed = purego.NewCallback(func(DialogVarp uintptr) { cb(DialogNewFromInternalPtr(DialogVarp)) }) } } // GetClosed gets the "closed" callback function. func (x *DialogClass) GetClosed() func(*Dialog) { if x.xClosed == 0 { return nil } var rawCallback func(DialogVarp uintptr) purego.RegisterFunc(&rawCallback, x.xClosed) return func(DialogVar *Dialog) { rawCallback(DialogVar.GoPointer()) } } // Describes the available presentation modes for [class@Dialog]. // // New values may be added to this enumeration over time. // // See [property@Dialog:presentation-mode]. type DialogPresentationMode int var xDialogPresentationModeGLibType func() types.GType func DialogPresentationModeGLibType() types.GType { return xDialogPresentationModeGLibType() } const ( // Switch between `ADW_DIALOG_FLOATING` and // `ADW_DIALOG_BOTTOM_SHEET` depending on available size. DialogAutoValue DialogPresentationMode = 0 // Present dialog as a centered floating window. DialogFloatingValue DialogPresentationMode = 1 // Present dialog as a bottom sheet. DialogBottomSheetValue DialogPresentationMode = 2 ) // An adaptive dialog container. // // <picture> // // <source srcset="dialog-floating-dark.png" media="(prefers-color-scheme: dark)"> // <img src="dialog-floating.png" alt="dialog-floating"> // // </picture> // <picture> // // <source srcset="dialog-bottom-dark.png" media="(prefers-color-scheme: dark)"> // <img src="dialog-bottom.png" alt="dialog-bottom"> // // </picture> // // `AdwDialog` is similar to a window, but is shown within another window. It // can be used with [class@Window] and [class@ApplicationWindow], use // [method@Dialog.present] to show it. // // `AdwDialog` is not resizable. Use the [property@Dialog:content-width] and // [property@Dialog:content-height] properties to set its size, or set // [property@Dialog:follows-content-size] to `TRUE` to make the dialog track the // content's size as it changes. `AdwDialog` can never be larger than its parent // window. // // `AdwDialog` can be presented as a centered floating window or a bottom sheet. // By default it's automatic depending on the available size. // [property@Dialog:presentation-mode] can be used to change that. // // `AdwDialog` can be closed via [method@Dialog.close]. // // When presented as a bottom sheet, `AdwDialog` can also be closed via swiping // it down. // // The [property@Dialog:can-close] can be used to prevent closing. In that case, // [signal@Dialog::close-attempt] gets emitted instead. // // Use [method@Dialog.force_close] to close the dialog even when `can-close` is set to // `FALSE`. // // `AdwDialog` is transient and doesn't integrate with the window below it, for // example it's not possible to collapse it into a bottom bar. See // [class@BottomSheet] for persistent and more tightly integrated bottom sheets. // // ## Header Bar Integration // // When placed inside an `AdwDialog`, [class@HeaderBar] will display the dialog // title instead of window title. It will also adjust the decoration layout to // ensure it always has a close button and nothing else. Set // [property@HeaderBar:show-start-title-buttons] and // [property@HeaderBar:show-end-title-buttons] to `FALSE` to remove it if it's // unwanted. // // ## Breakpoints // // `AdwDialog` can be used with [class@Breakpoint] the same way as // [class@BreakpointBin]. Refer to that widget's documentation for details. // // Like `AdwBreakpointBin`, if breakpoints are used, `AdwDialog` doesn't have a // minimum size, and [property@Gtk.Widget:width-request] and // [property@Gtk.Widget:height-request] properties must be set manually. type Dialog struct { gtk.Widget } var xDialogGLibType func() types.GType func DialogGLibType() types.GType { return xDialogGLibType() } func DialogNewFromInternalPtr(ptr uintptr) *Dialog { cls := &Dialog{} cls.Ptr = ptr return cls } var xNewDialog func() uintptr // Creates a new `AdwDialog`. func NewDialog() *Dialog { var cls *Dialog cret := xNewDialog() if cret == 0 { return nil } gobject.IncreaseRef(cret) cls = &Dialog{} cls.Ptr = cret return cls } var xDialogAddBreakpoint func(uintptr, uintptr) // Adds @breakpoint to @self. func (x *Dialog) AddBreakpoint(BreakpointVar *Breakpoint) { xDialogAddBreakpoint(x.GoPointer(), BreakpointVar.GoPointer()) } var xDialogClose func(uintptr) bool // Attempts to close @self. // // If the [property@Dialog:can-close] property is set to `FALSE`, the // [signal@Dialog::close-attempt] signal is emitted. // // See also: [method@Dialog.force_close]. func (x *Dialog) Close() bool { cret := xDialogClose(x.GoPointer()) return cret } var xDialogForceClose func(uintptr) // Closes @self. // // Unlike [method@Dialog.close], it succeeds even if [property@Dialog:can-close] // is set to `FALSE`. func (x *Dialog) ForceClose() { xDialogForceClose(x.GoPointer()) } var xDialogGetCanClose func(uintptr) bool // Gets whether @self can be closed. func (x *Dialog) GetCanClose() bool { cret := xDialogGetCanClose(x.GoPointer()) return cret } var xDialogGetChild func(uintptr) uintptr // Gets the child widget of @self. func (x *Dialog) GetChild() *gtk.Widget { var cls *gtk.Widget cret := xDialogGetChild(x.GoPointer()) if cret == 0 { return nil } gobject.IncreaseRef(cret) cls = >k.Widget{} cls.Ptr = cret return cls } var xDialogGetContentHeight func(uintptr) int // Gets the height of the dialog's contents. func (x *Dialog) GetContentHeight() int { cret := xDialogGetContentHeight(x.GoPointer()) return cret } var xDialogGetContentWidth func(uintptr) int // Gets the width of the dialog's contents. func (x *Dialog) GetContentWidth() int { cret := xDialogGetContentWidth(x.GoPointer()) return cret } var xDialogGetCurrentBreakpoint func(uintptr) uintptr // Gets the current breakpoint. func (x *Dialog) GetCurrentBreakpoint() *Breakpoint { var cls *Breakpoint cret := xDialogGetCurrentBreakpoint(x.GoPointer()) if cret == 0 { return nil } gobject.IncreaseRef(cret) cls = &Breakpoint{} cls.Ptr = cret return cls } var xDialogGetDefaultWidget func(uintptr) uintptr // Gets the default widget for @self. func (x *Dialog) GetDefaultWidget() *gtk.Widget { var cls *gtk.Widget cret := xDialogGetDefaultWidget(x.GoPointer()) if cret == 0 { return nil } gobject.IncreaseRef(cret) cls = >k.Widget{} cls.Ptr = cret return cls } var xDialogGetFocus func(uintptr) uintptr // Gets the focus widget for @self. func (x *Dialog) GetFocus() *gtk.Widget { var cls *gtk.Widget cret := xDialogGetFocus(x.GoPointer()) if cret == 0 { return nil } gobject.IncreaseRef(cret) cls = >k.Widget{} cls.Ptr = cret return cls } var xDialogGetFollowsContentSize func(uintptr) bool // Gets whether to size content of @self automatically. func (x *Dialog) GetFollowsContentSize() bool { cret := xDialogGetFollowsContentSize(x.GoPointer()) return cret } var xDialogGetPresentationMode func(uintptr) DialogPresentationMode // Gets presentation mode for @self. func (x *Dialog) GetPresentationMode() DialogPresentationMode { cret := xDialogGetPresentationMode(x.GoPointer()) return cret } var xDialogGetTitle func(uintptr) string // Gets the title of @self. func (x *Dialog) GetTitle() string { cret := xDialogGetTitle(x.GoPointer()) return cret } var xDialogPresent func(uintptr, uintptr) // Presents @self within @parent's window. // // If @self is already shown, raises it to the top instead. // // If the window is an [class@Window] or [class@ApplicationWindow], the dialog // will be shown within it. Otherwise, it will be a separate window. func (x *Dialog) Present(ParentVar *gtk.Widget) { xDialogPresent(x.GoPointer(), ParentVar.GoPointer()) } var xDialogSetCanClose func(uintptr, bool) // Sets whether @self can be closed. // // If set to `FALSE`, the close button, shortcuts and // [method@Dialog.close] will result in [signal@Dialog::close-attempt] being // emitted instead, and bottom sheet close swipe will be disabled. // [method@Dialog.force_close] still works. func (x *Dialog) SetCanClose(CanCloseVar bool) { xDialogSetCanClose(x.GoPointer(), CanCloseVar) } var xDialogSetChild func(uintptr, uintptr) // Sets the child widget of @self. func (x *Dialog) SetChild(ChildVar *gtk.Widget) { xDialogSetChild(x.GoPointer(), ChildVar.GoPointer()) } var xDialogSetContentHeight func(uintptr, int) // Sets the height of the dialog's contents. // // Set it to -1 to reset it to the content's natural height. // // See also: [property@Gtk.Window:default-height] func (x *Dialog) SetContentHeight(ContentHeightVar int) { xDialogSetContentHeight(x.GoPointer(), ContentHeightVar) } var xDialogSetContentWidth func(uintptr, int) // Sets the width of the dialog's contents. // // Set it to -1 to reset it to the content's natural width. // // See also: [property@Gtk.Window:default-width] func (x *Dialog) SetContentWidth(ContentWidthVar int) { xDialogSetContentWidth(x.GoPointer(), ContentWidthVar) } var xDialogSetDefaultWidget func(uintptr, uintptr) // Sets the default widget for @self. // // It's activated when the user presses Enter. func (x *Dialog) SetDefaultWidget(DefaultWidgetVar *gtk.Widget) { xDialogSetDefaultWidget(x.GoPointer(), DefaultWidgetVar.GoPointer()) } var xDialogSetFocus func(uintptr, uintptr) // Sets the focus widget for @self. // // If @focus is not the current focus widget, and is focusable, sets it as the // focus widget for the dialog. // // If focus is `NULL`, unsets the focus widget for this dialog. To set the focus // to a particular widget in the dialog, it is usually more convenient to use // [method@Gtk.Widget.grab_focus] instead of this function. func (x *Dialog) SetFocus(FocusVar *gtk.Widget) { xDialogSetFocus(x.GoPointer(), FocusVar.GoPointer()) } var xDialogSetFollowsContentSize func(uintptr, bool) // Sets whether to size content of @self automatically. // // If set to `TRUE`, always use the content's natural size instead of // [property@Dialog:content-width] and [property@Dialog:content-height]. If // the content resizes, the dialog will immediately resize as well. // // See also: [property@Gtk.Window:resizable] func (x *Dialog) SetFollowsContentSize(FollowsContentSizeVar bool) { xDialogSetFollowsContentSize(x.GoPointer(), FollowsContentSizeVar) } var xDialogSetPresentationMode func(uintptr, DialogPresentationMode) // Sets presentation mode for @self. // // When set to `ADW_DIALOG_AUTO`, the dialog appears as a bottom sheet when the // following condition is met: `max-width: 450px or max-height: 360px`, and as a // floating window otherwise. // // Set it to `ADW_DIALOG_FLOATING` or `ADW_DIALOG_BOTTOM_SHEET` to always // present it a floating window or a bottom sheet respectively, regardless of // available size. // // Presentation mode does nothing for dialogs presented as a window. func (x *Dialog) SetPresentationMode(PresentationModeVar DialogPresentationMode) { xDialogSetPresentationMode(x.GoPointer(), PresentationModeVar) } var xDialogSetTitle func(uintptr, string) // Sets the title of @self. func (x *Dialog) SetTitle(TitleVar string) { xDialogSetTitle(x.GoPointer(), TitleVar) } func (c *Dialog) GoPointer() uintptr { if c == nil { return 0 } return c.Ptr } func (c *Dialog) SetGoPointer(ptr uintptr) { c.Ptr = ptr } // SetPropertyCanClose sets the "can-close" property. // Whether the dialog can be closed. // // If set to `FALSE`, the close button, shortcuts and // [method@Dialog.close] will result in [signal@Dialog::close-attempt] being // emitted instead, and bottom sheet close swipe will be disabled. // [method@Dialog.force_close] still works. func (x *Dialog) SetPropertyCanClose(value bool) { var v gobject.Value v.Init(gobject.TypeBooleanVal) v.SetBoolean(value) x.SetProperty("can-close", &v) } // GetPropertyCanClose gets the "can-close" property. // Whether the dialog can be closed. // // If set to `FALSE`, the close button, shortcuts and // [method@Dialog.close] will result in [signal@Dialog::close-attempt] being // emitted instead, and bottom sheet close swipe will be disabled. // [method@Dialog.force_close] still works. func (x *Dialog) GetPropertyCanClose() bool { var v gobject.Value x.GetProperty("can-close", &v) return v.GetBoolean() } // SetPropertyContentHeight sets the "content-height" property. // The height of the dialog's contents. // // Set it to -1 to reset it to the content's natural height. // // See also: [property@Gtk.Window:default-height] func (x *Dialog) SetPropertyContentHeight(value int) { var v gobject.Value v.Init(gobject.TypeIntVal) v.SetInt(value) x.SetProperty("content-height", &v) } // GetPropertyContentHeight gets the "content-height" property. // The height of the dialog's contents. // // Set it to -1 to reset it to the content's natural height. // // See also: [property@Gtk.Window:default-height] func (x *Dialog) GetPropertyContentHeight() int { var v gobject.Value x.GetProperty("content-height", &v) return v.GetInt() } // SetPropertyContentWidth sets the "content-width" property. // The width of the dialog's contents. // // Set it to -1 to reset it to the content's natural width. // // See also: [property@Gtk.Window:default-width] func (x *Dialog) SetPropertyContentWidth(value int) { var v gobject.Value v.Init(gobject.TypeIntVal) v.SetInt(value) x.SetProperty("content-width", &v) } // GetPropertyContentWidth gets the "content-width" property. // The width of the dialog's contents. // // Set it to -1 to reset it to the content's natural width. // // See also: [property@Gtk.Window:default-width] func (x *Dialog) GetPropertyContentWidth() int { var v gobject.Value x.GetProperty("content-width", &v) return v.GetInt() } // SetPropertyFollowsContentSize sets the "follows-content-size" property. // Whether to size content automatically. // // If set to `TRUE`, always use the content's natural size instead of // [property@Dialog:content-width] and [property@Dialog:content-height]. If // the content resizes, the dialog will immediately resize as well. // // See also: [property@Gtk.Window:resizable] func (x *Dialog) SetPropertyFollowsContentSize(value bool) { var v gobject.Value v.Init(gobject.TypeBooleanVal) v.SetBoolean(value) x.SetProperty("follows-content-size", &v) } // GetPropertyFollowsContentSize gets the "follows-content-size" property. // Whether to size content automatically. // // If set to `TRUE`, always use the content's natural size instead of // [property@Dialog:content-width] and [property@Dialog:content-height]. If // the content resizes, the dialog will immediately resize as well. // // See also: [property@Gtk.Window:resizable] func (x *Dialog) GetPropertyFollowsContentSize() bool { var v gobject.Value x.GetProperty("follows-content-size", &v) return v.GetBoolean() } // SetPropertyTitle sets the "title" property. // The title of the dialog. func (x *Dialog) SetPropertyTitle(value string) { var v gobject.Value v.Init(gobject.TypeStringVal) v.SetString(&value) x.SetProperty("title", &v) } // GetPropertyTitle gets the "title" property. // The title of the dialog. func (x *Dialog) GetPropertyTitle() string { var v gobject.Value x.GetProperty("title", &v) return v.GetString() } // Emitted when the close button or shortcut is used, or // [method@Dialog.close] is called while [property@Dialog:can-close] is set to // `FALSE`. func (x *Dialog) ConnectCloseAttempt(cb *func(Dialog)) uint { cbPtr := uintptr(unsafe.Pointer(cb)) if cbRefPtr, ok := glib.GetCallback(cbPtr); ok { handlerID := gobject.SignalConnect(x.GoPointer(), "close-attempt", cbRefPtr) glib.SaveHandlerMapping(handlerID, cbPtr) return handlerID } fcb := func(clsPtr uintptr) { fa := Dialog{} fa.Ptr = clsPtr cbFn := *cb cbFn(fa) } cbRefPtr := purego.NewCallback(fcb) glib.SaveCallbackWithClosure(cbPtr, cbRefPtr, cb) handlerID := gobject.SignalConnect(x.GoPointer(), "close-attempt", cbRefPtr) glib.SaveHandlerMapping(handlerID, cbPtr) return handlerID } // Emitted when the dialog is successfully closed. func (x *Dialog) ConnectClosed(cb *func(Dialog)) uint { cbPtr := uintptr(unsafe.Pointer(cb)) if cbRefPtr, ok := glib.GetCallback(cbPtr); ok { handlerID := gobject.SignalConnect(x.GoPointer(), "closed", cbRefPtr) glib.SaveHandlerMapping(handlerID, cbPtr) return handlerID } fcb := func(clsPtr uintptr) { fa := Dialog{} fa.Ptr = clsPtr cbFn := *cb cbFn(fa) } cbRefPtr := purego.NewCallback(fcb) glib.SaveCallbackWithClosure(cbPtr, cbRefPtr, cb) handlerID := gobject.SignalConnect(x.GoPointer(), "closed", cbRefPtr) glib.SaveHandlerMapping(handlerID, cbPtr) return handlerID } // Requests the user's screen reader to announce the given message. // // This kind of notification is useful for messages that // either have only a visual representation or that are not // exposed visually at all, e.g. a notification about a // successful operation. // // Also, by using this API, you can ensure that the message // does not interrupts the user's current screen reader output. func (x *Dialog) Announce(MessageVar string, PriorityVar gtk.AccessibleAnnouncementPriority) { gtk.XGtkAccessibleAnnounce(x.GoPointer(), MessageVar, PriorityVar) } // Retrieves the accessible parent for an accessible object. // // This function returns `NULL` for top level widgets. func (x *Dialog) GetAccessibleParent() *gtk.AccessibleBase { var cls *gtk.AccessibleBase cret := gtk.XGtkAccessibleGetAccessibleParent(x.GoPointer()) if cret == 0 { return nil } cls = >k.AccessibleBase{} cls.Ptr = cret return cls } // Retrieves the accessible role of an accessible object. func (x *Dialog) GetAccessibleRole() gtk.AccessibleRole { cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer()) return cret } // Retrieves the implementation for the given accessible object. func (x *Dialog) GetAtContext() *gtk.ATContext { var cls *gtk.ATContext cret := gtk.XGtkAccessibleGetAtContext(x.GoPointer()) if cret == 0 { return nil } cls = >k.ATContext{} cls.Ptr = cret return cls } // Queries the coordinates and dimensions of this accessible // // This functionality can be overridden by `GtkAccessible` // implementations, e.g. to get the bounds from an ignored // child widget. func (x *Dialog) GetBounds(XVar *int, YVar *int, WidthVar *int, HeightVar *int) bool { cret := gtk.XGtkAccessibleGetBounds(x.GoPointer(), XVar, YVar, WidthVar, HeightVar) return cret } // Retrieves the first accessible child of an accessible object. func (x *Dialog) GetFirstAccessibleChild() *gtk.AccessibleBase { var cls *gtk.AccessibleBase cret := gtk.XGtkAccessibleGetFirstAccessibleChild(x.GoPointer()) if cret == 0 { return nil } cls = >k.AccessibleBase{} cls.Ptr = cret return cls } // Retrieves the next accessible sibling of an accessible object func (x *Dialog) GetNextAccessibleSibling() *gtk.AccessibleBase { var cls *gtk.AccessibleBase cret := gtk.XGtkAccessibleGetNextAccessibleSibling(x.GoPointer()) if cret == 0 { return nil } cls = >k.AccessibleBase{} cls.Ptr = cret return cls } // Queries a platform state, such as focus. // // This functionality can be overridden by `GtkAccessible` // implementations, e.g. to get platform state from an ignored // child widget, as is the case for `GtkText` wrappers. func (x *Dialog) GetPlatformState(StateVar gtk.AccessiblePlatformState) bool { cret := gtk.XGtkAccessibleGetPlatformState(x.GoPointer(), StateVar) return cret } // Resets the accessible property to its default value. func (x *Dialog) ResetProperty(PropertyVar gtk.AccessibleProperty) { gtk.XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar) } // Resets the accessible relation to its default value. func (x *Dialog) ResetRelation(RelationVar gtk.AccessibleRelation) { gtk.XGtkAccessibleResetRelation(x.GoPointer(), RelationVar) } // Resets the accessible state to its default value. func (x *Dialog) ResetState(StateVar gtk.AccessibleState) { gtk.XGtkAccessibleResetState(x.GoPointer(), StateVar) } // Sets the parent and sibling of an accessible object. // // This function is meant to be used by accessible implementations that are // not part of the widget hierarchy, and but act as a logical bridge between // widgets. For instance, if a widget creates an object that holds metadata // for each child, and you want that object to implement the `GtkAccessible` // interface, you will use this function to ensure that the parent of each // child widget is the metadata object, and the parent of each metadata // object is the container widget. func (x *Dialog) SetAccessibleParent(ParentVar gtk.Accessible, NextSiblingVar gtk.Accessible) { gtk.XGtkAccessibleSetAccessibleParent(x.GoPointer(), ParentVar.GoPointer(), NextSiblingVar.GoPointer()) } // Updates the next accessible sibling. // // That might be useful when a new child of a custom accessible // is created, and it needs to be linked to a previous child. func (x *Dialog) UpdateNextAccessibleSibling(NewSiblingVar gtk.Accessible) { gtk.XGtkAccessibleUpdateNextAccessibleSibling(x.GoPointer(), NewSiblingVar.GoPointer()) } // Informs ATs that the platform state has changed. // // This function should be used by `GtkAccessible` implementations that // have a platform state but are not widgets. Widgets handle platform // states automatically. func (x *Dialog) UpdatePlatformState(StateVar gtk.AccessiblePlatformState) { gtk.XGtkAccessibleUpdatePlatformState(x.GoPointer(), StateVar) } // Updates a list of accessible properties. // // See the [enum@Gtk.AccessibleProperty] documentation for the // value types of accessible properties. // // This function should be called by `GtkWidget` types whenever // an accessible property change must be communicated to assistive // technologies. // // Example: // ```c // value = gtk_adjustment_get_value (adjustment); // gtk_accessible_update_property (GTK_ACCESSIBLE (spin_button), // // GTK_ACCESSIBLE_PROPERTY_VALUE_NOW, value, // -1); // // ``` func (x *Dialog) UpdateProperty(FirstPropertyVar gtk.AccessibleProperty, varArgs ...interface{}) { gtk.XGtkAccessibleUpdateProperty(x.GoPointer(), FirstPropertyVar, varArgs...) } // Updates an array of accessible properties. // // This function should be called by `GtkWidget` types whenever an accessible // property change must be communicated to assistive technologies. // // This function is meant to be used by language bindings. func (x *Dialog) UpdatePropertyValue(NPropertiesVar int, PropertiesVar []gtk.AccessibleProperty, ValuesVar []gobject.Value) { gtk.XGtkAccessibleUpdatePropertyValue(x.GoPointer(), NPropertiesVar, PropertiesVar, ValuesVar) } // Updates a list of accessible relations. // // This function should be called by `GtkWidget` types whenever an accessible // relation change must be communicated to assistive technologies. // // If the [enum@Gtk.AccessibleRelation] requires a list of references, // you should pass each reference individually, followed by `NULL`, e.g. // // ```c // gtk_accessible_update_relation (accessible, // // GTK_ACCESSIBLE_RELATION_CONTROLS, // ref1, NULL, // GTK_ACCESSIBLE_RELATION_LABELLED_BY, // ref1, ref2, ref3, NULL, // -1); // // ``` func (x *Dialog) UpdateRelation(FirstRelationVar gtk.AccessibleRelation, varArgs ...interface{}) { gtk.XGtkAccessibleUpdateRelation(x.GoPointer(), FirstRelationVar, varArgs...) } // Updates an array of accessible relations. // // This function should be called by `GtkWidget` types whenever an accessible // relation change must be communicated to assistive technologies. // // This function is meant to be used by language bindings. func (x *Dialog) UpdateRelationValue(NRelationsVar int, RelationsVar []gtk.AccessibleRelation, ValuesVar []gobject.Value) { gtk.XGtkAccessibleUpdateRelationValue(x.GoPointer(), NRelationsVar, RelationsVar, ValuesVar) } // Updates a list of accessible states. // // See the [enum@Gtk.AccessibleState] documentation for the // value types of accessible states. // // This function should be called by `GtkWidget` types whenever // an accessible state change must be communicated to assistive // technologies. // // Example: // // ```c // value = GTK_ACCESSIBLE_TRISTATE_MIXED; // gtk_accessible_update_state (GTK_ACCESSIBLE (check_button), // // GTK_ACCESSIBLE_STATE_CHECKED, value, // -1); // // ``` func (x *Dialog) UpdateState(FirstStateVar gtk.AccessibleState, varArgs ...interface{}) { gtk.XGtkAccessibleUpdateState(x.GoPointer(), FirstStateVar, varArgs...) } // Updates an array of accessible states. // // This function should be called by `GtkWidget` types whenever an accessible // state change must be communicated to assistive technologies. // // This function is meant to be used by language bindings. func (x *Dialog) UpdateStateValue(NStatesVar int, StatesVar []gtk.AccessibleState, ValuesVar []gobject.Value) { gtk.XGtkAccessibleUpdateStateValue(x.GoPointer(), NStatesVar, StatesVar, ValuesVar) } // Gets the ID of the @buildable object. // // `GtkBuilder` sets the name based on the ID attribute // of the `<object>` tag used to construct the @buildable. func (x *Dialog) GetBuildableId() string { cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer()) return cret } func init() { core.SetPackageName("ADW", "libadwaita-1") core.SetSharedLibraries("ADW", []string{"libadwaita-1.so.0"}) var libs []uintptr for _, libPath := range core.GetPaths("ADW") { lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL) if err != nil { panic(err) } libs = append(libs, lib) } core.PuregoSafeRegister(&xDialogPresentationModeGLibType, libs, "adw_dialog_presentation_mode_get_type") core.PuregoSafeRegister(&xDialogGLibType, libs, "adw_dialog_get_type") core.PuregoSafeRegister(&xNewDialog, libs, "adw_dialog_new") core.PuregoSafeRegister(&xDialogAddBreakpoint, libs, "adw_dialog_add_breakpoint") core.PuregoSafeRegister(&xDialogClose, libs, "adw_dialog_close") core.PuregoSafeRegister(&xDialogForceClose, libs, "adw_dialog_force_close") core.PuregoSafeRegister(&xDialogGetCanClose, libs, "adw_dialog_get_can_close") core.PuregoSafeRegister(&xDialogGetChild, libs, "adw_dialog_get_child") core.PuregoSafeRegister(&xDialogGetContentHeight, libs, "adw_dialog_get_content_height") core.PuregoSafeRegister(&xDialogGetContentWidth, libs, "adw_dialog_get_content_width") core.PuregoSafeRegister(&xDialogGetCurrentBreakpoint, libs, "adw_dialog_get_current_breakpoint") core.PuregoSafeRegister(&xDialogGetDefaultWidget, libs, "adw_dialog_get_default_widget") core.PuregoSafeRegister(&xDialogGetFocus, libs, "adw_dialog_get_focus") core.PuregoSafeRegister(&xDialogGetFollowsContentSize, libs, "adw_dialog_get_follows_content_size") core.PuregoSafeRegister(&xDialogGetPresentationMode, libs, "adw_dialog_get_presentation_mode") core.PuregoSafeRegister(&xDialogGetTitle, libs, "adw_dialog_get_title") core.PuregoSafeRegister(&xDialogPresent, libs, "adw_dialog_present") core.PuregoSafeRegister(&xDialogSetCanClose, libs, "adw_dialog_set_can_close") core.PuregoSafeRegister(&xDialogSetChild, libs, "adw_dialog_set_child") core.PuregoSafeRegister(&xDialogSetContentHeight, libs, "adw_dialog_set_content_height") core.PuregoSafeRegister(&xDialogSetContentWidth, libs, "adw_dialog_set_content_width") core.PuregoSafeRegister(&xDialogSetDefaultWidget, libs, "adw_dialog_set_default_widget") core.PuregoSafeRegister(&xDialogSetFocus, libs, "adw_dialog_set_focus") core.PuregoSafeRegister(&xDialogSetFollowsContentSize, libs, "adw_dialog_set_follows_content_size") core.PuregoSafeRegister(&xDialogSetPresentationMode, libs, "adw_dialog_set_presentation_mode") core.PuregoSafeRegister(&xDialogSetTitle, libs, "adw_dialog_set_title") }