// 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" "github.com/bnema/puregotk/v4/pango" ) type EntryRowClass struct { _ structs.HostLayout ParentClass PreferencesRowClass } func (x *EntryRowClass) GoPointer() uintptr { return uintptr(unsafe.Pointer(x)) } // A [class@Gtk.ListBoxRow] with an embedded text entry. // // <picture> // // <source srcset="entry-row-dark.png" media="(prefers-color-scheme: dark)"> // <img src="entry-row.png" alt="entry-row"> // // </picture> // // `AdwEntryRow` has a title that doubles as placeholder text. It shows an icon // indicating that it's editable and can receive additional widgets before or // after the editable part. // // If [property@EntryRow:show-apply-button] is set to `TRUE`, `AdwEntryRow` can // show an apply button when editing its contents. This can be useful if // changing its contents can result in an expensive operation, such as network // activity. // // `AdwEntryRow` provides only minimal API and should be used with the // [iface@Gtk.Editable] API. // // See also [class@PasswordEntryRow]. // // ## AdwEntryRow as GtkBuildable // // The `AdwEntryRow` implementation of the [iface@Gtk.Buildable] interface // supports adding a child at its end by specifying “suffix” or omitting the // “type” attribute of a <child> element. // // It also supports adding a child as a prefix widget by specifying “prefix” as // the “type” attribute of a <child> element. // // ## CSS nodes // // `AdwEntryRow` has a single CSS node with name `row` and the `.entry` style // class. type EntryRow struct { PreferencesRow } var xEntryRowGLibType func() types.GType func EntryRowGLibType() types.GType { return xEntryRowGLibType() } func EntryRowNewFromInternalPtr(ptr uintptr) *EntryRow { cls := &EntryRow{} cls.Ptr = ptr return cls } var xNewEntryRow func() uintptr // Creates a new `AdwEntryRow`. func NewEntryRow() *EntryRow { var cls *EntryRow cret := xNewEntryRow() if cret == 0 { return nil } gobject.IncreaseRef(cret) cls = &EntryRow{} cls.Ptr = cret return cls } var xEntryRowAddPrefix func(uintptr, uintptr) // Adds a prefix widget to @self. func (x *EntryRow) AddPrefix(WidgetVar *gtk.Widget) { xEntryRowAddPrefix(x.GoPointer(), WidgetVar.GoPointer()) } var xEntryRowAddSuffix func(uintptr, uintptr) // Adds a suffix widget to @self. func (x *EntryRow) AddSuffix(WidgetVar *gtk.Widget) { xEntryRowAddSuffix(x.GoPointer(), WidgetVar.GoPointer()) } var xEntryRowGetActivatesDefault func(uintptr) bool // Gets whether activating the embedded entry can activate the default widget. func (x *EntryRow) GetActivatesDefault() bool { cret := xEntryRowGetActivatesDefault(x.GoPointer()) return cret } var xEntryRowGetAttributes func(uintptr) *pango.AttrList // Gets Pango attributes applied to the text of the embedded entry. func (x *EntryRow) GetAttributes() *pango.AttrList { cret := xEntryRowGetAttributes(x.GoPointer()) return cret } var xEntryRowGetEnableEmojiCompletion func(uintptr) bool // Gets whether to suggest emoji replacements on @self. func (x *EntryRow) GetEnableEmojiCompletion() bool { cret := xEntryRowGetEnableEmojiCompletion(x.GoPointer()) return cret } var xEntryRowGetInputHints func(uintptr) gtk.InputHints // Gets the additional input hints of @self. func (x *EntryRow) GetInputHints() gtk.InputHints { cret := xEntryRowGetInputHints(x.GoPointer()) return cret } var xEntryRowGetInputPurpose func(uintptr) gtk.InputPurpose // Gets the input purpose of @self. func (x *EntryRow) GetInputPurpose() gtk.InputPurpose { cret := xEntryRowGetInputPurpose(x.GoPointer()) return cret } var xEntryRowGetMaxLength func(uintptr) int // Retrieves the maximum length of the entry. func (x *EntryRow) GetMaxLength() int { cret := xEntryRowGetMaxLength(x.GoPointer()) return cret } var xEntryRowGetShowApplyButton func(uintptr) bool // Gets whether @self can show the apply button. func (x *EntryRow) GetShowApplyButton() bool { cret := xEntryRowGetShowApplyButton(x.GoPointer()) return cret } var xEntryRowGetTextLength func(uintptr) uint // Retrieves the current length of the text in @self. func (x *EntryRow) GetTextLength() uint { cret := xEntryRowGetTextLength(x.GoPointer()) return cret } var xEntryRowGrabFocusWithoutSelecting func(uintptr) bool // Causes @self to have keyboard focus without selecting the text. // // See [method@Gtk.Text.grab_focus_without_selecting] for more information. func (x *EntryRow) GrabFocusWithoutSelecting() bool { cret := xEntryRowGrabFocusWithoutSelecting(x.GoPointer()) return cret } var xEntryRowRemove func(uintptr, uintptr) // Removes a child from @self. func (x *EntryRow) Remove(WidgetVar *gtk.Widget) { xEntryRowRemove(x.GoPointer(), WidgetVar.GoPointer()) } var xEntryRowSetActivatesDefault func(uintptr, bool) // Sets whether activating the embedded entry can activate the default widget. func (x *EntryRow) SetActivatesDefault(ActivatesVar bool) { xEntryRowSetActivatesDefault(x.GoPointer(), ActivatesVar) } var xEntryRowSetAttributes func(uintptr, *pango.AttrList) // Sets Pango attributes to apply to the text of the embedded entry. // // The [struct@Pango.Attribute]'s `start_index` and `end_index` must refer to // the [class@Gtk.EntryBuffer] text, i.e. without the preedit string. func (x *EntryRow) SetAttributes(AttributesVar *pango.AttrList) { xEntryRowSetAttributes(x.GoPointer(), AttributesVar) } var xEntryRowSetEnableEmojiCompletion func(uintptr, bool) // Sets whether to suggest emoji replacements on @self. // // Emoji replacement is done with :-delimited names, like `:heart:`. func (x *EntryRow) SetEnableEmojiCompletion(EnableEmojiCompletionVar bool) { xEntryRowSetEnableEmojiCompletion(x.GoPointer(), EnableEmojiCompletionVar) } var xEntryRowSetInputHints func(uintptr, gtk.InputHints) // Set additional input hints for @self. // // Input hints allow input methods to fine-tune their behavior. // // See also: [property@AdwEntryRow:input-purpose] func (x *EntryRow) SetInputHints(HintsVar gtk.InputHints) { xEntryRowSetInputHints(x.GoPointer(), HintsVar) } var xEntryRowSetInputPurpose func(uintptr, gtk.InputPurpose) // Sets the input purpose of @self. // // The input purpose can be used by input methods to adjust their behavior. func (x *EntryRow) SetInputPurpose(PurposeVar gtk.InputPurpose) { xEntryRowSetInputPurpose(x.GoPointer(), PurposeVar) } var xEntryRowSetMaxLength func(uintptr, int) // Sets the maximum length of the entry. func (x *EntryRow) SetMaxLength(MaxLengthVar int) { xEntryRowSetMaxLength(x.GoPointer(), MaxLengthVar) } var xEntryRowSetShowApplyButton func(uintptr, bool) // Sets whether @self can show the apply button. // // When set to `TRUE`, typing text in the entry will reveal an apply button. // Clicking it or pressing the <kbd>Enter</kbd> key will hide the button and // emit the [signal@EntryRow::apply] signal. // // This is useful if changing the entry contents can trigger an expensive // operation, e.g. network activity, to avoid triggering it after typing every // character. func (x *EntryRow) SetShowApplyButton(ShowApplyButtonVar bool) { xEntryRowSetShowApplyButton(x.GoPointer(), ShowApplyButtonVar) } func (c *EntryRow) GoPointer() uintptr { if c == nil { return 0 } return c.Ptr } func (c *EntryRow) SetGoPointer(ptr uintptr) { c.Ptr = ptr } // SetPropertyActivatesDefault sets the "activates-default" property. // Whether activating the embedded entry can activate the default widget. func (x *EntryRow) SetPropertyActivatesDefault(value bool) { var v gobject.Value v.Init(gobject.TypeBooleanVal) v.SetBoolean(value) x.SetProperty("activates-default", &v) } // GetPropertyActivatesDefault gets the "activates-default" property. // Whether activating the embedded entry can activate the default widget. func (x *EntryRow) GetPropertyActivatesDefault() bool { var v gobject.Value x.GetProperty("activates-default", &v) return v.GetBoolean() } // SetPropertyAttributes sets the "attributes" property. // A list of Pango attributes to apply to the text of the embedded entry. // // The [struct@Pango.Attribute]'s `start_index` and `end_index` must refer to // the [class@Gtk.EntryBuffer] text, i.e. without the preedit string. func (x *EntryRow) SetPropertyAttributes(value uintptr) { var v gobject.Value v.Init(gobject.TypePointerVal) v.SetPointer(value) x.SetProperty("attributes", &v) } // GetPropertyAttributes gets the "attributes" property. // A list of Pango attributes to apply to the text of the embedded entry. // // The [struct@Pango.Attribute]'s `start_index` and `end_index` must refer to // the [class@Gtk.EntryBuffer] text, i.e. without the preedit string. func (x *EntryRow) GetPropertyAttributes() uintptr { var v gobject.Value x.GetProperty("attributes", &v) return v.GetPointer() } // SetPropertyEnableEmojiCompletion sets the "enable-emoji-completion" property. // Whether to suggest emoji replacements on the entry row. // // Emoji replacement is done with :-delimited names, like `:heart:`. func (x *EntryRow) SetPropertyEnableEmojiCompletion(value bool) { var v gobject.Value v.Init(gobject.TypeBooleanVal) v.SetBoolean(value) x.SetProperty("enable-emoji-completion", &v) } // GetPropertyEnableEmojiCompletion gets the "enable-emoji-completion" property. // Whether to suggest emoji replacements on the entry row. // // Emoji replacement is done with :-delimited names, like `:heart:`. func (x *EntryRow) GetPropertyEnableEmojiCompletion() bool { var v gobject.Value x.GetProperty("enable-emoji-completion", &v) return v.GetBoolean() } // SetPropertyMaxLength sets the "max-length" property. // Maximum number of characters for the entry. func (x *EntryRow) SetPropertyMaxLength(value int) { var v gobject.Value v.Init(gobject.TypeIntVal) v.SetInt(value) x.SetProperty("max-length", &v) } // GetPropertyMaxLength gets the "max-length" property. // Maximum number of characters for the entry. func (x *EntryRow) GetPropertyMaxLength() int { var v gobject.Value x.GetProperty("max-length", &v) return v.GetInt() } // SetPropertyShowApplyButton sets the "show-apply-button" property. // Whether to show the apply button. // // When set to `TRUE`, typing text in the entry will reveal an apply button. // Clicking it or pressing the <kbd>Enter</kbd> key will hide the button and // emit the [signal@EntryRow::apply] signal. // // This is useful if changing the entry contents can trigger an expensive // operation, e.g. network activity, to avoid triggering it after typing every // character. func (x *EntryRow) SetPropertyShowApplyButton(value bool) { var v gobject.Value v.Init(gobject.TypeBooleanVal) v.SetBoolean(value) x.SetProperty("show-apply-button", &v) } // GetPropertyShowApplyButton gets the "show-apply-button" property. // Whether to show the apply button. // // When set to `TRUE`, typing text in the entry will reveal an apply button. // Clicking it or pressing the <kbd>Enter</kbd> key will hide the button and // emit the [signal@EntryRow::apply] signal. // // This is useful if changing the entry contents can trigger an expensive // operation, e.g. network activity, to avoid triggering it after typing every // character. func (x *EntryRow) GetPropertyShowApplyButton() bool { var v gobject.Value x.GetProperty("show-apply-button", &v) return v.GetBoolean() } // GetPropertyTextLength gets the "text-length" property. // The length of the text in the entry row. func (x *EntryRow) GetPropertyTextLength() uint { var v gobject.Value x.GetProperty("text-length", &v) return v.GetUint() } // Emitted when the apply button is pressed. // // See [property@EntryRow:show-apply-button]. func (x *EntryRow) ConnectApply(cb *func(EntryRow)) uint { cbPtr := uintptr(unsafe.Pointer(cb)) if cbRefPtr, ok := glib.GetCallback(cbPtr); ok { handlerID := gobject.SignalConnect(x.GoPointer(), "apply", cbRefPtr) glib.SaveHandlerMapping(handlerID, cbPtr) return handlerID } fcb := func(clsPtr uintptr) { fa := EntryRow{} fa.Ptr = clsPtr cbFn := *cb cbFn(fa) } cbRefPtr := purego.NewCallback(fcb) glib.SaveCallbackWithClosure(cbPtr, cbRefPtr, cb) handlerID := gobject.SignalConnect(x.GoPointer(), "apply", cbRefPtr) glib.SaveHandlerMapping(handlerID, cbPtr) return handlerID } // Emitted when the embedded entry is activated. func (x *EntryRow) ConnectEntryActivated(cb *func(EntryRow)) uint { cbPtr := uintptr(unsafe.Pointer(cb)) if cbRefPtr, ok := glib.GetCallback(cbPtr); ok { handlerID := gobject.SignalConnect(x.GoPointer(), "entry-activated", cbRefPtr) glib.SaveHandlerMapping(handlerID, cbPtr) return handlerID } fcb := func(clsPtr uintptr) { fa := EntryRow{} fa.Ptr = clsPtr cbFn := *cb cbFn(fa) } cbRefPtr := purego.NewCallback(fcb) glib.SaveCallbackWithClosure(cbPtr, cbRefPtr, cb) handlerID := gobject.SignalConnect(x.GoPointer(), "entry-activated", 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 *EntryRow) 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 *EntryRow) 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 *EntryRow) GetAccessibleRole() gtk.AccessibleRole { cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer()) return cret } // Retrieves the implementation for the given accessible object. func (x *EntryRow) 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 *EntryRow) 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 *EntryRow) 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 *EntryRow) 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 *EntryRow) GetPlatformState(StateVar gtk.AccessiblePlatformState) bool { cret := gtk.XGtkAccessibleGetPlatformState(x.GoPointer(), StateVar) return cret } // Resets the accessible property to its default value. func (x *EntryRow) ResetProperty(PropertyVar gtk.AccessibleProperty) { gtk.XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar) } // Resets the accessible relation to its default value. func (x *EntryRow) ResetRelation(RelationVar gtk.AccessibleRelation) { gtk.XGtkAccessibleResetRelation(x.GoPointer(), RelationVar) } // Resets the accessible state to its default value. func (x *EntryRow) 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 *EntryRow) 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 *EntryRow) 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 *EntryRow) 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 *EntryRow) 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 *EntryRow) 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 *EntryRow) 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 *EntryRow) 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 *EntryRow) 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 *EntryRow) UpdateStateValue(NStatesVar int, StatesVar []gtk.AccessibleState, ValuesVar []gobject.Value) { gtk.XGtkAccessibleUpdateStateValue(x.GoPointer(), NStatesVar, StatesVar, ValuesVar) } // Gets the action name for @actionable. func (x *EntryRow) GetActionName() string { cret := gtk.XGtkActionableGetActionName(x.GoPointer()) return cret } // Gets the current target value of @actionable. func (x *EntryRow) 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 *EntryRow) 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 *EntryRow) 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 *EntryRow) 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 *EntryRow) 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 *EntryRow) GetBuildableId() string { cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer()) return cret } // Retrieves the accessible platform state from the editable delegate. // // This is an helper function to retrieve the accessible state for // `GtkEditable` interface implementations using a delegate pattern. // // You should call this function in your editable widget implementation // of the [vfunc@Gtk.Accessible.get_platform_state] virtual function, for // instance: // // ```c // static void // accessible_interface_init (GtkAccessibleInterface *iface) // // { // iface->get_platform_state = your_editable_get_accessible_platform_state; // } // // static gboolean // your_editable_get_accessible_platform_state (GtkAccessible *accessible, // // GtkAccessiblePlatformState state) // // { // return gtk_editable_delegate_get_accessible_platform_state (GTK_EDITABLE (accessible), state); // } // // ``` // // Note that the widget which is the delegate *must* be a direct child of // this widget, otherwise your implementation of [vfunc@Gtk.Accessible.get_platform_state] // might not even be called, as the platform change will originate from // the parent of the delegate, and, as a result, will not work properly. // // So, if you can't ensure the direct child condition, you should give the // delegate the %GTK_ACCESSIBLE_ROLE_TEXT_BOX role, or you can // change your tree to allow this function to work. func (x *EntryRow) DelegateGetAccessiblePlatformState(StateVar gtk.AccessiblePlatformState) bool { cret := gtk.XGtkEditableDelegateGetAccessiblePlatformState(x.GoPointer(), StateVar) return cret } // Deletes the currently selected text of the editable. // // This call doesn’t do anything if there is no selected text. func (x *EntryRow) DeleteSelection() { gtk.XGtkEditableDeleteSelection(x.GoPointer()) } // Deletes a sequence of characters. // // The characters that are deleted are those characters at positions // from @start_pos up to, but not including @end_pos. If @end_pos is // negative, then the characters deleted are those from @start_pos to // the end of the text. // // Note that the positions are specified in characters, not bytes. func (x *EntryRow) DeleteText(StartPosVar int, EndPosVar int) { gtk.XGtkEditableDeleteText(x.GoPointer(), StartPosVar, EndPosVar) } // Undoes the setup done by [method@Gtk.Editable.init_delegate]. // // This is a helper function that should be called from dispose, // before removing the delegate object. func (x *EntryRow) FinishDelegate() { gtk.XGtkEditableFinishDelegate(x.GoPointer()) } // Gets the alignment of the editable. func (x *EntryRow) GetAlignment() float32 { cret := gtk.XGtkEditableGetAlignment(x.GoPointer()) return cret } // Retrieves a sequence of characters. // // The characters that are retrieved are those characters at positions // from @start_pos up to, but not including @end_pos. If @end_pos is negative, // then the characters retrieved are those characters from @start_pos to // the end of the text. // // Note that positions are specified in characters, not bytes. func (x *EntryRow) GetChars(StartPosVar int, EndPosVar int) string { cret := gtk.XGtkEditableGetChars(x.GoPointer(), StartPosVar, EndPosVar) return cret } // Gets the `GtkEditable` that @editable is delegating its // implementation to. // // Typically, the delegate is a [class@Gtk.Text] widget. func (x *EntryRow) GetDelegate() *gtk.EditableBase { var cls *gtk.EditableBase cret := gtk.XGtkEditableGetDelegate(x.GoPointer()) if cret == 0 { return nil } gobject.IncreaseRef(cret) cls = >k.EditableBase{} cls.Ptr = cret return cls } // Retrieves whether @editable is editable. func (x *EntryRow) GetEditable() bool { cret := gtk.XGtkEditableGetEditable(x.GoPointer()) return cret } // Gets if undo/redo actions are enabled for @editable func (x *EntryRow) GetEnableUndo() bool { cret := gtk.XGtkEditableGetEnableUndo(x.GoPointer()) return cret } // Retrieves the desired maximum width of @editable, in characters. func (x *EntryRow) GetMaxWidthChars() int { cret := gtk.XGtkEditableGetMaxWidthChars(x.GoPointer()) return cret } // Retrieves the current position of the cursor relative // to the start of the content of the editable. // // Note that this position is in characters, not in bytes. func (x *EntryRow) GetPosition() int { cret := gtk.XGtkEditableGetPosition(x.GoPointer()) return cret } // Retrieves the selection bound of the editable. // // @start_pos will be filled with the start of the selection and // @end_pos with end. If no text was selected both will be identical // and %FALSE will be returned. // // Note that positions are specified in characters, not bytes. func (x *EntryRow) GetSelectionBounds(StartPosVar *int, EndPosVar *int) bool { cret := gtk.XGtkEditableGetSelectionBounds(x.GoPointer(), StartPosVar, EndPosVar) return cret } // Retrieves the contents of @editable. // // The returned string is owned by GTK and must not be modified or freed. func (x *EntryRow) GetText() string { cret := gtk.XGtkEditableGetText(x.GoPointer()) return cret } // Gets the number of characters of space reserved // for the contents of the editable. func (x *EntryRow) GetWidthChars() int { cret := gtk.XGtkEditableGetWidthChars(x.GoPointer()) return cret } // Sets up a delegate for `GtkEditable`. // // This is assuming that the get_delegate vfunc in the `GtkEditable` // interface has been set up for the @editable's type. // // This is a helper function that should be called in instance init, // after creating the delegate object. func (x *EntryRow) InitDelegate() { gtk.XGtkEditableInitDelegate(x.GoPointer()) } // Inserts @length bytes of @text into the contents of the // widget, at position @position. // // Note that the position is in characters, not in bytes. // The function updates @position to point after the newly // inserted text. func (x *EntryRow) InsertText(TextVar string, LengthVar int, PositionVar *int) { gtk.XGtkEditableInsertText(x.GoPointer(), TextVar, LengthVar, PositionVar) } // Selects a region of text. // // The characters that are selected are those characters at positions // from @start_pos up to, but not including @end_pos. If @end_pos is // negative, then the characters selected are those characters from // @start_pos to the end of the text. // // Note that positions are specified in characters, not bytes. func (x *EntryRow) SelectRegion(StartPosVar int, EndPosVar int) { gtk.XGtkEditableSelectRegion(x.GoPointer(), StartPosVar, EndPosVar) } // Sets the alignment for the contents of the editable. // // This controls the horizontal positioning of the contents when // the displayed text is shorter than the width of the editable. func (x *EntryRow) SetAlignment(XalignVar float32) { gtk.XGtkEditableSetAlignment(x.GoPointer(), XalignVar) } // Determines if the user can edit the text in the editable widget. func (x *EntryRow) SetEditable(IsEditableVar bool) { gtk.XGtkEditableSetEditable(x.GoPointer(), IsEditableVar) } // If enabled, changes to @editable will be saved for undo/redo // actions. // // This results in an additional copy of text changes and are not // stored in secure memory. As such, undo is forcefully disabled // when [property@Gtk.Text:visibility] is set to %FALSE. func (x *EntryRow) SetEnableUndo(EnableUndoVar bool) { gtk.XGtkEditableSetEnableUndo(x.GoPointer(), EnableUndoVar) } // Sets the desired maximum width in characters of @editable. func (x *EntryRow) SetMaxWidthChars(NCharsVar int) { gtk.XGtkEditableSetMaxWidthChars(x.GoPointer(), NCharsVar) } // Sets the cursor position in the editable to the given value. // // The cursor is displayed before the character with the given (base 0) // index in the contents of the editable. The value must be less than // or equal to the number of characters in the editable. A value of -1 // indicates that the position should be set after the last character // of the editable. Note that @position is in characters, not in bytes. func (x *EntryRow) SetPosition(PositionVar int) { gtk.XGtkEditableSetPosition(x.GoPointer(), PositionVar) } // Sets the text in the editable to the given value. // // This is replacing the current contents. func (x *EntryRow) SetText(TextVar string) { gtk.XGtkEditableSetText(x.GoPointer(), TextVar) } // Changes the size request of the editable to be about the // right size for @n_chars characters. // // Note that it changes the size request, the size can still // be affected by how you pack the widget into containers. // If @n_chars is -1, the size reverts to the default size. func (x *EntryRow) SetWidthChars(NCharsVar int) { gtk.XGtkEditableSetWidthChars(x.GoPointer(), NCharsVar) } 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(&xEntryRowGLibType, libs, "adw_entry_row_get_type") core.PuregoSafeRegister(&xNewEntryRow, libs, "adw_entry_row_new") core.PuregoSafeRegister(&xEntryRowAddPrefix, libs, "adw_entry_row_add_prefix") core.PuregoSafeRegister(&xEntryRowAddSuffix, libs, "adw_entry_row_add_suffix") core.PuregoSafeRegister(&xEntryRowGetActivatesDefault, libs, "adw_entry_row_get_activates_default") core.PuregoSafeRegister(&xEntryRowGetAttributes, libs, "adw_entry_row_get_attributes") core.PuregoSafeRegister(&xEntryRowGetEnableEmojiCompletion, libs, "adw_entry_row_get_enable_emoji_completion") core.PuregoSafeRegister(&xEntryRowGetInputHints, libs, "adw_entry_row_get_input_hints") core.PuregoSafeRegister(&xEntryRowGetInputPurpose, libs, "adw_entry_row_get_input_purpose") core.PuregoSafeRegister(&xEntryRowGetMaxLength, libs, "adw_entry_row_get_max_length") core.PuregoSafeRegister(&xEntryRowGetShowApplyButton, libs, "adw_entry_row_get_show_apply_button") core.PuregoSafeRegister(&xEntryRowGetTextLength, libs, "adw_entry_row_get_text_length") core.PuregoSafeRegister(&xEntryRowGrabFocusWithoutSelecting, libs, "adw_entry_row_grab_focus_without_selecting") core.PuregoSafeRegister(&xEntryRowRemove, libs, "adw_entry_row_remove") core.PuregoSafeRegister(&xEntryRowSetActivatesDefault, libs, "adw_entry_row_set_activates_default") core.PuregoSafeRegister(&xEntryRowSetAttributes, libs, "adw_entry_row_set_attributes") core.PuregoSafeRegister(&xEntryRowSetEnableEmojiCompletion, libs, "adw_entry_row_set_enable_emoji_completion") core.PuregoSafeRegister(&xEntryRowSetInputHints, libs, "adw_entry_row_set_input_hints") core.PuregoSafeRegister(&xEntryRowSetInputPurpose, libs, "adw_entry_row_set_input_purpose") core.PuregoSafeRegister(&xEntryRowSetMaxLength, libs, "adw_entry_row_set_max_length") core.PuregoSafeRegister(&xEntryRowSetShowApplyButton, libs, "adw_entry_row_set_show_apply_button") }