// 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/gio" "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 SplitButtonClass struct { _ structs.HostLayout ParentClass gtk.WidgetClass } func (x *SplitButtonClass) GoPointer() uintptr { return uintptr(unsafe.Pointer(x)) } // A combined button and dropdown widget. // // <picture> // // <source srcset="split-button-dark.png" media="(prefers-color-scheme: dark)"> // <img src="split-button.png" alt="split-button"> // // </picture> // // `AdwSplitButton` is typically used to present a set of actions in a menu, // but allow access to one of them with a single click. // // The API is very similar to [class@Gtk.Button] and [class@Gtk.MenuButton], see // their documentation for details. // // ## CSS nodes // // ``` // splitbutton[.image-button][.text-button] // ├── button // │ ╰── <content> // ├── separator // ╰── menubutton // // ╰── button.toggle // ╰── arrow // // ``` // // `AdwSplitButton`'s CSS node is called `splitbutton`. It contains the css // nodes: `button`, `separator`, `menubutton`. See [class@Gtk.MenuButton] // documentation for the `menubutton` contents. // // The main CSS node will contain the `.image-button` or `.text-button` style // classes matching the button contents. The nested button nodes will never // contain them. // // ## Style classes // // `AdwSplitButton` can use some of the same style classes as [class@Gtk.Button]: // // - [`.suggested-action`](style-classes.html#suggested-action) // - [`.destructive-action`](style-classes.html#destructive-action) // - [`.flat`](style-classes.html#flat) // - [`.raised`](style-classes.html#raised) // // Other style classes, like `.pill`, cannot be used. // // ## Accessibility // // `AdwSplitButton` uses the `GTK_ACCESSIBLE_ROLE_GROUP` role. type SplitButton struct { gtk.Widget } var xSplitButtonGLibType func() types.GType func SplitButtonGLibType() types.GType { return xSplitButtonGLibType() } func SplitButtonNewFromInternalPtr(ptr uintptr) *SplitButton { cls := &SplitButton{} cls.Ptr = ptr return cls } var xNewSplitButton func() uintptr // Creates a new `AdwSplitButton`. func NewSplitButton() *SplitButton { var cls *SplitButton cret := xNewSplitButton() if cret == 0 { return nil } gobject.IncreaseRef(cret) cls = &SplitButton{} cls.Ptr = cret return cls } var xSplitButtonGetCanShrink func(uintptr) bool // gets whether the button can be smaller than the natural size of its contents. func (x *SplitButton) GetCanShrink() bool { cret := xSplitButtonGetCanShrink(x.GoPointer()) return cret } var xSplitButtonGetChild func(uintptr) uintptr // Gets the child widget. func (x *SplitButton) GetChild() *gtk.Widget { var cls *gtk.Widget cret := xSplitButtonGetChild(x.GoPointer()) if cret == 0 { return nil } gobject.IncreaseRef(cret) cls = >k.Widget{} cls.Ptr = cret return cls } var xSplitButtonGetDirection func(uintptr) gtk.ArrowType // Gets the direction in which the popup will be popped up. func (x *SplitButton) GetDirection() gtk.ArrowType { cret := xSplitButtonGetDirection(x.GoPointer()) return cret } var xSplitButtonGetDropdownTooltip func(uintptr) string // Gets the tooltip of the dropdown button of @self. func (x *SplitButton) GetDropdownTooltip() string { cret := xSplitButtonGetDropdownTooltip(x.GoPointer()) return cret } var xSplitButtonGetIconName func(uintptr) string // Gets the name of the icon used to automatically populate the button. func (x *SplitButton) GetIconName() string { cret := xSplitButtonGetIconName(x.GoPointer()) return cret } var xSplitButtonGetLabel func(uintptr) string // Gets the label for @self. func (x *SplitButton) GetLabel() string { cret := xSplitButtonGetLabel(x.GoPointer()) return cret } var xSplitButtonGetMenuModel func(uintptr) uintptr // Gets the menu model from which the popup will be created. func (x *SplitButton) GetMenuModel() *gio.MenuModel { var cls *gio.MenuModel cret := xSplitButtonGetMenuModel(x.GoPointer()) if cret == 0 { return nil } gobject.IncreaseRef(cret) cls = &gio.MenuModel{} cls.Ptr = cret return cls } var xSplitButtonGetPopover func(uintptr) uintptr // Gets the popover that will be popped up when the dropdown is clicked. func (x *SplitButton) GetPopover() *gtk.Popover { var cls *gtk.Popover cret := xSplitButtonGetPopover(x.GoPointer()) if cret == 0 { return nil } gobject.IncreaseRef(cret) cls = >k.Popover{} cls.Ptr = cret return cls } var xSplitButtonGetUseUnderline func(uintptr) bool // Gets whether an underline in the text indicates a mnemonic. func (x *SplitButton) GetUseUnderline() bool { cret := xSplitButtonGetUseUnderline(x.GoPointer()) return cret } var xSplitButtonPopdown func(uintptr) // Dismisses the menu. func (x *SplitButton) Popdown() { xSplitButtonPopdown(x.GoPointer()) } var xSplitButtonPopup func(uintptr) // Pops up the menu. func (x *SplitButton) Popup() { xSplitButtonPopup(x.GoPointer()) } var xSplitButtonSetCanShrink func(uintptr, bool) // Sets whether the button can be smaller than the natural size of its contents. // // If set to `TRUE`, the label will ellipsize. // // See [method@Gtk.Button.set_can_shrink] and // [method@Gtk.MenuButton.set_can_shrink]. func (x *SplitButton) SetCanShrink(CanShrinkVar bool) { xSplitButtonSetCanShrink(x.GoPointer(), CanShrinkVar) } var xSplitButtonSetChild func(uintptr, uintptr) // Sets the child widget. // // Setting the child widget will set [property@SplitButton:label] and // [property@SplitButton:icon-name] to `NULL`. func (x *SplitButton) SetChild(ChildVar *gtk.Widget) { xSplitButtonSetChild(x.GoPointer(), ChildVar.GoPointer()) } var xSplitButtonSetDirection func(uintptr, gtk.ArrowType) // Sets the direction in which the popup will be popped up. // // The dropdown arrow icon will point at the same direction. // // If the does not fit in the available space in the given direction, GTK will // try its best to keep it inside the screen and fully visible. // // If you pass `GTK_ARROW_NONE`, it's equivalent to `GTK_ARROW_DOWN`. func (x *SplitButton) SetDirection(DirectionVar gtk.ArrowType) { xSplitButtonSetDirection(x.GoPointer(), DirectionVar) } var xSplitButtonSetDropdownTooltip func(uintptr, string) // Sets the tooltip of the dropdown button of @self. // // The tooltip can be marked up with the Pango text markup language. func (x *SplitButton) SetDropdownTooltip(TooltipVar string) { xSplitButtonSetDropdownTooltip(x.GoPointer(), TooltipVar) } var xSplitButtonSetIconName func(uintptr, string) // Sets the name of the icon used to automatically populate the button. // // Setting the icon name will set [property@SplitButton:label] and // [property@SplitButton:child] to `NULL`. func (x *SplitButton) SetIconName(IconNameVar string) { xSplitButtonSetIconName(x.GoPointer(), IconNameVar) } var xSplitButtonSetLabel func(uintptr, string) // Sets the label for @self. // // Setting the label will set [property@SplitButton:icon-name] and // [property@SplitButton:child] to `NULL`. func (x *SplitButton) SetLabel(LabelVar string) { xSplitButtonSetLabel(x.GoPointer(), LabelVar) } var xSplitButtonSetMenuModel func(uintptr, uintptr) // Sets the menu model from which the popup will be created. // // If the menu model is `NULL`, the dropdown is disabled. // // A [class@Gtk.Popover] will be created from the menu model with // [ctor@Gtk.PopoverMenu.new_from_model]. Actions will be connected as // documented for this function. // // If [property@SplitButton:popover] is already set, it will be dissociated from // the button, and the property is set to `NULL`. func (x *SplitButton) SetMenuModel(MenuModelVar *gio.MenuModel) { xSplitButtonSetMenuModel(x.GoPointer(), MenuModelVar.GoPointer()) } var xSplitButtonSetPopover func(uintptr, uintptr) // Sets the popover that will be popped up when the dropdown is clicked. // // If the popover is `NULL`, the dropdown is disabled. // // If [property@SplitButton:menu-model] is set, the menu model is dissociated // from the button, and the property is set to `NULL`. func (x *SplitButton) SetPopover(PopoverVar *gtk.Popover) { xSplitButtonSetPopover(x.GoPointer(), PopoverVar.GoPointer()) } var xSplitButtonSetUseUnderline func(uintptr, bool) // Sets whether an underline in the text indicates a mnemonic. // // See [property@SplitButton:label]. func (x *SplitButton) SetUseUnderline(UseUnderlineVar bool) { xSplitButtonSetUseUnderline(x.GoPointer(), UseUnderlineVar) } func (c *SplitButton) GoPointer() uintptr { if c == nil { return 0 } return c.Ptr } func (c *SplitButton) SetGoPointer(ptr uintptr) { c.Ptr = ptr } // SetPropertyCanShrink sets the "can-shrink" property. // Whether the button can be smaller than the natural size of its contents. // // If set to `TRUE`, the label will ellipsize. // // See [property@Gtk.Button:can-shrink] and // [property@Gtk.MenuButton:can-shrink]. func (x *SplitButton) SetPropertyCanShrink(value bool) { var v gobject.Value v.Init(gobject.TypeBooleanVal) v.SetBoolean(value) x.SetProperty("can-shrink", &v) } // GetPropertyCanShrink gets the "can-shrink" property. // Whether the button can be smaller than the natural size of its contents. // // If set to `TRUE`, the label will ellipsize. // // See [property@Gtk.Button:can-shrink] and // [property@Gtk.MenuButton:can-shrink]. func (x *SplitButton) GetPropertyCanShrink() bool { var v gobject.Value x.GetProperty("can-shrink", &v) return v.GetBoolean() } // SetPropertyDropdownTooltip sets the "dropdown-tooltip" property. // The tooltip of the dropdown button. // // The tooltip can be marked up with the Pango text markup language. func (x *SplitButton) SetPropertyDropdownTooltip(value string) { var v gobject.Value v.Init(gobject.TypeStringVal) v.SetString(&value) x.SetProperty("dropdown-tooltip", &v) } // GetPropertyDropdownTooltip gets the "dropdown-tooltip" property. // The tooltip of the dropdown button. // // The tooltip can be marked up with the Pango text markup language. func (x *SplitButton) GetPropertyDropdownTooltip() string { var v gobject.Value x.GetProperty("dropdown-tooltip", &v) return v.GetString() } // SetPropertyIconName sets the "icon-name" property. // The name of the icon used to automatically populate the button. // // Setting the icon name will set [property@SplitButton:label] and // [property@SplitButton:child] to `NULL`. func (x *SplitButton) SetPropertyIconName(value string) { var v gobject.Value v.Init(gobject.TypeStringVal) v.SetString(&value) x.SetProperty("icon-name", &v) } // GetPropertyIconName gets the "icon-name" property. // The name of the icon used to automatically populate the button. // // Setting the icon name will set [property@SplitButton:label] and // [property@SplitButton:child] to `NULL`. func (x *SplitButton) GetPropertyIconName() string { var v gobject.Value x.GetProperty("icon-name", &v) return v.GetString() } // SetPropertyLabel sets the "label" property. // The label for the button. // // Setting the label will set [property@SplitButton:icon-name] and // [property@SplitButton:child] to `NULL`. func (x *SplitButton) SetPropertyLabel(value string) { var v gobject.Value v.Init(gobject.TypeStringVal) v.SetString(&value) x.SetProperty("label", &v) } // GetPropertyLabel gets the "label" property. // The label for the button. // // Setting the label will set [property@SplitButton:icon-name] and // [property@SplitButton:child] to `NULL`. func (x *SplitButton) GetPropertyLabel() string { var v gobject.Value x.GetProperty("label", &v) return v.GetString() } // SetPropertyUseUnderline sets the "use-underline" property. // Whether an underline in the text indicates a mnemonic. // // See [property@SplitButton:label]. func (x *SplitButton) SetPropertyUseUnderline(value bool) { var v gobject.Value v.Init(gobject.TypeBooleanVal) v.SetBoolean(value) x.SetProperty("use-underline", &v) } // GetPropertyUseUnderline gets the "use-underline" property. // Whether an underline in the text indicates a mnemonic. // // See [property@SplitButton:label]. func (x *SplitButton) GetPropertyUseUnderline() bool { var v gobject.Value x.GetProperty("use-underline", &v) return v.GetBoolean() } // Emitted to animate press then release. // // This is an action signal. Applications should never connect to this signal, // but use the [signal@SplitButton::clicked] signal. func (x *SplitButton) ConnectActivate(cb *func(SplitButton)) uint { cbPtr := uintptr(unsafe.Pointer(cb)) if cbRefPtr, ok := glib.GetCallback(cbPtr); ok { handlerID := gobject.SignalConnect(x.GoPointer(), "activate", cbRefPtr) glib.SaveHandlerMapping(handlerID, cbPtr) return handlerID } fcb := func(clsPtr uintptr) { fa := SplitButton{} fa.Ptr = clsPtr cbFn := *cb cbFn(fa) } cbRefPtr := purego.NewCallback(fcb) glib.SaveCallbackWithClosure(cbPtr, cbRefPtr, cb) handlerID := gobject.SignalConnect(x.GoPointer(), "activate", cbRefPtr) glib.SaveHandlerMapping(handlerID, cbPtr) return handlerID } // Emitted when the button has been activated (pressed and released). func (x *SplitButton) ConnectClicked(cb *func(SplitButton)) uint { cbPtr := uintptr(unsafe.Pointer(cb)) if cbRefPtr, ok := glib.GetCallback(cbPtr); ok { handlerID := gobject.SignalConnect(x.GoPointer(), "clicked", cbRefPtr) glib.SaveHandlerMapping(handlerID, cbPtr) return handlerID } fcb := func(clsPtr uintptr) { fa := SplitButton{} fa.Ptr = clsPtr cbFn := *cb cbFn(fa) } cbRefPtr := purego.NewCallback(fcb) glib.SaveCallbackWithClosure(cbPtr, cbRefPtr, cb) handlerID := gobject.SignalConnect(x.GoPointer(), "clicked", 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 *SplitButton) 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 *SplitButton) 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 *SplitButton) GetAccessibleRole() gtk.AccessibleRole { cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer()) return cret } // Retrieves the implementation for the given accessible object. func (x *SplitButton) 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 *SplitButton) 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 *SplitButton) 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 *SplitButton) 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 *SplitButton) GetPlatformState(StateVar gtk.AccessiblePlatformState) bool { cret := gtk.XGtkAccessibleGetPlatformState(x.GoPointer(), StateVar) return cret } // Resets the accessible property to its default value. func (x *SplitButton) ResetProperty(PropertyVar gtk.AccessibleProperty) { gtk.XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar) } // Resets the accessible relation to its default value. func (x *SplitButton) ResetRelation(RelationVar gtk.AccessibleRelation) { gtk.XGtkAccessibleResetRelation(x.GoPointer(), RelationVar) } // Resets the accessible state to its default value. func (x *SplitButton) 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 *SplitButton) 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 *SplitButton) 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 *SplitButton) 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 *SplitButton) 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 *SplitButton) 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 *SplitButton) 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 *SplitButton) 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 *SplitButton) 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 *SplitButton) UpdateStateValue(NStatesVar int, StatesVar []gtk.AccessibleState, ValuesVar []gobject.Value) { gtk.XGtkAccessibleUpdateStateValue(x.GoPointer(), NStatesVar, StatesVar, ValuesVar) } // Gets the action name for @actionable. func (x *SplitButton) GetActionName() string { cret := gtk.XGtkActionableGetActionName(x.GoPointer()) return cret } // Gets the current target value of @actionable. func (x *SplitButton) GetActionTargetValue() *glib.Variant { cret := gtk.XGtkActionableGetActionTargetValue(x.GoPointer()) return cret } // Specifies the name of the action with which this widget should be // associated. // // If @action_name is %NULL then the widget will be unassociated from // any previous action. // // Usually this function is used when the widget is located (or will be // located) within the hierarchy of a `GtkApplicationWindow`. // // Names are of the form “win.save” or “app.quit” for actions on the // containing [class@ApplicationWindow] or its associated [class@Application], // respectively. This is the same form used for actions in the [class@Gio.Menu] // associated with the window. func (x *SplitButton) SetActionName(ActionNameVar *string) { ActionNameVarPtr := core.GStrdupNullable(ActionNameVar) defer core.GFreeNullable(ActionNameVarPtr) gtk.XGtkActionableSetActionName(x.GoPointer(), ActionNameVarPtr) } // Sets the target of an actionable widget. // // This is a convenience function that calls [ctor@GLib.Variant.new] for // @format_string and uses the result to call // [method@Gtk.Actionable.set_action_target_value]. // // If you are setting a string-valued target and want to set // the action name at the same time, you can use // [method@Gtk.Actionable.set_detailed_action_name]. func (x *SplitButton) SetActionTarget(FormatStringVar string, varArgs ...interface{}) { gtk.XGtkActionableSetActionTarget(x.GoPointer(), FormatStringVar, varArgs...) } // Sets the target value of an actionable widget. // // If @target_value is %NULL then the target value is unset. // // The target value has two purposes. First, it is used as the parameter // to activation of the action associated with the `GtkActionable` widget. // Second, it is used to determine if the widget should be rendered as // “active” — the widget is active if the state is equal to the given target. // // Consider the example of associating a set of buttons with a [iface@Gio.Action] // with string state in a typical “radio button” situation. Each button // will be associated with the same action, but with a different target // value for that action. Clicking on a particular button will activate // the action with the target of that button, which will typically cause // the action’s state to change to that value. Since the action’s state // is now equal to the target value of the button, the button will now // be rendered as active (and the other buttons, with different targets, // rendered inactive). func (x *SplitButton) SetActionTargetValue(TargetValueVar *glib.Variant) { gtk.XGtkActionableSetActionTargetValue(x.GoPointer(), TargetValueVar) } // Sets the action-name and associated string target value of an // actionable widget. // // @detailed_action_name is a string in the format accepted by // [func@Gio.Action.parse_detailed_name]. func (x *SplitButton) SetDetailedActionName(DetailedActionNameVar string) { gtk.XGtkActionableSetDetailedActionName(x.GoPointer(), DetailedActionNameVar) } // 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 *SplitButton) 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(&xSplitButtonGLibType, libs, "adw_split_button_get_type") core.PuregoSafeRegister(&xNewSplitButton, libs, "adw_split_button_new") core.PuregoSafeRegister(&xSplitButtonGetCanShrink, libs, "adw_split_button_get_can_shrink") core.PuregoSafeRegister(&xSplitButtonGetChild, libs, "adw_split_button_get_child") core.PuregoSafeRegister(&xSplitButtonGetDirection, libs, "adw_split_button_get_direction") core.PuregoSafeRegister(&xSplitButtonGetDropdownTooltip, libs, "adw_split_button_get_dropdown_tooltip") core.PuregoSafeRegister(&xSplitButtonGetIconName, libs, "adw_split_button_get_icon_name") core.PuregoSafeRegister(&xSplitButtonGetLabel, libs, "adw_split_button_get_label") core.PuregoSafeRegister(&xSplitButtonGetMenuModel, libs, "adw_split_button_get_menu_model") core.PuregoSafeRegister(&xSplitButtonGetPopover, libs, "adw_split_button_get_popover") core.PuregoSafeRegister(&xSplitButtonGetUseUnderline, libs, "adw_split_button_get_use_underline") core.PuregoSafeRegister(&xSplitButtonPopdown, libs, "adw_split_button_popdown") core.PuregoSafeRegister(&xSplitButtonPopup, libs, "adw_split_button_popup") core.PuregoSafeRegister(&xSplitButtonSetCanShrink, libs, "adw_split_button_set_can_shrink") core.PuregoSafeRegister(&xSplitButtonSetChild, libs, "adw_split_button_set_child") core.PuregoSafeRegister(&xSplitButtonSetDirection, libs, "adw_split_button_set_direction") core.PuregoSafeRegister(&xSplitButtonSetDropdownTooltip, libs, "adw_split_button_set_dropdown_tooltip") core.PuregoSafeRegister(&xSplitButtonSetIconName, libs, "adw_split_button_set_icon_name") core.PuregoSafeRegister(&xSplitButtonSetLabel, libs, "adw_split_button_set_label") core.PuregoSafeRegister(&xSplitButtonSetMenuModel, libs, "adw_split_button_set_menu_model") core.PuregoSafeRegister(&xSplitButtonSetPopover, libs, "adw_split_button_set_popover") core.PuregoSafeRegister(&xSplitButtonSetUseUnderline, libs, "adw_split_button_set_use_underline") }