Basics

Guides

API Reference

Menu

Basics

Guides

API Reference

class: Entry

[62:7] extends: object

A single-line text entry widget. An example GtkEntry A fairly large set of key bindings are supported by default. If the entered text is longer than the allocation of the widget, the widget will scroll so that the cursor position is visible. When using an entry for passwords and other sensitive information, it can be put into “password mode” using [method@Gtk.Entry.set_visibility]. In this mode, entered text is displayed using a “invisible” character. By default, GTK picks the best invisible character that is available in the current font, but it can be changed with [method@Gtk.Entry.set_invisible_char]. GtkEntry has the ability to display progress or activity information behind the text. To make an entry display such information, use [method@Gtk.Entry.set_progress_fraction] or [method@Gtk.Entry.set_progress_pulse_step]. Additionally, GtkEntry can show icons at either side of the entry. These icons can be activatable by clicking, can be set up as drag source and can have tooltips. To add an icon, use [method@Gtk.Entry.set_icon_from_gicon] or one of the various other functions that set an icon from an icon name or a paintable. To trigger an action when the user clicks an icon, connect to the [signal@Gtk.Entry::icon-press] signal. To allow DND operations from an icon, use [method@Gtk.Entry.set_icon_drag_source]. To set a tooltip on an icon, use [method@Gtk.Entry.set_icon_tooltip_text] or the corresponding function for markup. Note that functionality or information that is only available by clicking on an icon in an entry may not be accessible at all to users which are not able to use a mouse or other pointing device. It is therefore recommended that any such functionality should also be available by other means, e.g. via the context menu of the entry. # CSS nodes entry[.flat][.warning][.error] ├── text[.readonly] ├── image.left ├── image.right ╰── [progress[.pulse]] GtkEntry has a main node with the name entry. Depending on the properties of the entry, the style classes .read-only and .flat may appear. The style classes .warning and .error may also be used with entries. When the entry shows icons, it adds subnodes with the name image and the style class .left or .right, depending on where the icon appears. When the entry shows progress, it adds a subnode with the name progress. The node has the style class .pulse when the shown progress is pulsing. For all the subnodes added to the text node in various situations, see [class@Gtk.Text]. # GtkEntry as GtkBuildable The GtkEntry implementation of the GtkBuildable interface supports a custom <attributes> element, which supports any number of <attribute> elements. The <attribute> element has attributes named “name“, “value“, “start“ and “end“ and allows you to specify PangoAttribute values for this label. An example of a UI definition fragment specifying Pango attributes: xml <object class="GtkEntry"> <attributes> <attribute name="weight" value="PANGO_WEIGHT_BOLD"/> <attribute name="background" value="red" start="5" end="10"/> </attributes> </object> The start and end attributes specify the range of characters to which the Pango attribute applies. If start and end are not specified, the attribute is applied to the whole text. Note that specifying ranges does not make much sense with translatable attributes. Use markup embedded in the translatable content instead. # Accessibility GtkEntry uses the [enum@Gtk.AccessibleRole.text_box] role.

Members

  • handleObj
  • lib
  • retainedCallbacks
  • signalHandlerNames
  • signalSetterHandlers

Methods

  • Entry (buffer = null)

    Creates a new entry.

    • @p buffer is The buffer to use for the new GtkEntry..
  • toNativeHandle (Source)

    Normalizes a constructor argument into a raw pointer carrier. Accepts a raw NativeHandle, a raw NativeBuffer returned from fn.call(...), another generated wrapper exposing handle(), or null. Returns null when the argument carries no pointer.

    • @p Source is the raw handle, raw buffer, wrapper, or null.
    • @r A raw pointer carrier or null when no pointer is present.
  • getLib ()

    Returns the opened native library for this generated wrapper.

    • @r The opened native library.
  • handle ()

    Returns the wrapped NativeHandle.

    • @r The wrapped NativeHandle.
  • isNull ()

    Returns true when the wrapped handle is null.

    • @r A bool.
  • describe ()

    Returns a small string for debugging generated wrappers.

    • @r A string.
  • asWidget ()

    Wraps this handle as Widget.

    • @r A Widget object.
  • asAccessible ()

    Wraps this handle as Accessible.

    • @r A Accessible object.
  • asBuildable ()

    Wraps this handle as Buildable.

    • @r A Buildable object.
  • asCellEditable ()

    Wraps this handle as CellEditable.

    • @r A CellEditable object.
  • asConstraintTarget ()

    Wraps this handle as ConstraintTarget.

    • @r A ConstraintTarget object.
  • asEditable ()

    Wraps this handle as Editable.

    • @r A Editable object.
  • connectSignal (string Name, CallbackObj)

    Connects one generated callback wrapper to a named signal.

    • @p Name is the signal name.
    • @p CallbackObj is the generated callback wrapper to connect.
    • @r The connected handler id.
  • disconnectSignalHandler (int HandlerId)

    Disconnects one retained signal handler id.

    • @p HandlerId is the signal handler id to disconnect.
    • @r None.
  • setOnActivate (callback Fn, UserData = null)

    Emitted when the entry is activated. The keybindings for this signal are all forms of the Enter key.

    • @p Fn is the Aussom callback.
    • @p Fn is called with (Entry Self).
    • @p UserData is retained and passed through to the generated callback wrapper when provided.
    • @r The connected handler id.
  • setOnIconpress (callback Fn, UserData = null)

    Emitted when an activatable icon is clicked.

    • @p Fn is the Aussom callback.
    • @p Fn is called with (Entry Self, string Icon_pos).
    • @p UserData is retained and passed through to the generated callback wrapper when provided.
    • @r The connected handler id.
  • setOnIconrelease (callback Fn, UserData = null)

    Emitted on the button release from a mouse click over an activatable icon.

    • @p Fn is the Aussom callback.
    • @p Fn is called with (Entry Self, string Icon_pos).
    • @p UserData is retained and passed through to the generated callback wrapper when provided.
    • @r The connected handler id.
  • getProperty (string Name)

    Reads one generated property by name.

  • setProperty (string Name, Value)

    Writes one generated property by name.

  • setActivatesdefault (bool Value)

    Whether to activate the default widget when Enter is pressed.

    • @p Value is the new property value.
    • @r None.
  • setAttributes (object Value)

    A list of Pango attributes to apply to the text of the entry. This is mainly useful to change the size or weight of the text. The PangoAttribute's @start_index and @end_index must refer to the [class@Gtk.EntryBuffer] text, i.e. without the preedit string.

    • @p Value is the new property value.
    • @r None.
  • setBuffer (object Value)

    The buffer object which actually stores the text.

    • @p Value is the new property value.
    • @r None.
  • setCompletion (object Value)

    The auxiliary completion object to use with the entry.

    • @p Value is the new property value.
    • @r None.
  • setEnableemojicompletion (bool Value)

    Whether to suggest Emoji replacements for :-delimited names like :heart:.

    • @p Value is the new property value.
    • @r None.
  • setExtramenu (object Value)

    A menu model whose contents will be appended to the context menu.

    • @p Value is the new property value.
    • @r None.
  • setHasframe (bool Value)

    Whether the entry should draw a frame.

    • @p Value is the new property value.
    • @r None.
  • setImmodule (string Value)

    Which IM (input method) module should be used for this entry. See [class@Gtk.IMContext]. Setting this to a non-%NULL value overrides the system-wide IM module setting. See the GtkSettings [property@Gtk.Settings:gtk-im-module] property.

    • @p Value is the new property value.
    • @r None.
  • setInputhints (string Value)

    Additional hints that allow input methods to fine-tune their behavior. Also see [property@Gtk.Entry:input-purpose]

    • @p Value is the new property value.
    • @r None.
  • setInputpurpose (string Value)

    The purpose of this text field. This property can be used by on-screen keyboards and other input methods to adjust their behaviour. Note that setting the purpose to %GTK_INPUT_PURPOSE_PASSWORD or %GTK_INPUT_PURPOSE_PIN is independent from setting [property@Gtk.Entry:visibility].

    • @p Value is the new property value.
    • @r None.
  • setInvisiblechar (int Value)

    The character to use when masking entry contents (“password mode”).

    • @p Value is the new property value.
    • @r None.
  • setInvisiblecharset (bool Value)

    Whether the invisible char has been set for the GtkEntry.

    • @p Value is the new property value.
    • @r None.
  • setMaxlength (int Value)

    Maximum number of characters for this entry.

    • @p Value is the new property value.
    • @r None.
  • setMenuentryiconprimarytext (string Value)

    Text for an item in the context menu to activate the primary icon action. When the primary icon is activatable and this property has been set, a new entry in the context menu of this GtkEntry will appear with this text. Selecting that menu entry will result in the primary icon being activated, exactly in the same way as it would be activated from a mouse click. This simplifies adding accessibility support to applications using activatable icons. The activatable icons aren't focusable when navigating the interface with the keyboard This is why Gtk recommends to also add those actions in the context menu. This set of methods greatly simplifies this, by adding a menu item that, when enabled, calls the same callback than clicking on the icon.

    • @p Value is the new property value.
    • @r None.
  • setMenuentryiconsecondarytext (string Value)

    Text for an item in the context menu to activate the secondary icon action. When the primary icon is activatable and this property has been set, a new entry in the context menu of this GtkEntry will appear with this text. Selecting that menu entry will result in the primary icon being activated, exactly in the same way as it would be activated from a mouse click. This simplifies adding accessibility support to applications using activatable icons. The activatable icons aren't focusable when navigating the interface with the keyboard This is why Gtk recommends to also add those actions in the context menu. This set of methods greatly simplifies this, by adding a menu item that, when enabled, calls the same callback than clicking on the icon.

    • @p Value is the new property value.
    • @r None.
  • setOverwritemode (bool Value)

    If text is overwritten when typing in the GtkEntry.

    • @p Value is the new property value.
    • @r None.
  • setPlaceholdertext (string Value)

    The text that will be displayed in the GtkEntry when it is empty and unfocused.

    • @p Value is the new property value.
    • @r None.
  • setPrimaryiconactivatable (bool Value)

    Whether the primary icon is activatable. GTK emits the [signal@Gtk.Entry::icon-press] and [signal@Gtk.Entry::icon-release] signals only on sensitive, activatable icons. Sensitive, but non-activatable icons can be used for purely informational purposes.

    • @p Value is the new property value.
    • @r None.
  • setPrimaryicongicon (object Value)

    The GIcon to use for the primary icon for the entry.

    • @p Value is the new property value.
    • @r None.
  • setPrimaryiconname (string Value)

    The icon name to use for the primary icon for the entry.

    • @p Value is the new property value.
    • @r None.
  • setPrimaryiconpaintable (object Value)

    A GdkPaintable to use as the primary icon for the entry.

    • @p Value is the new property value.
    • @r None.
  • setPrimaryiconsensitive (bool Value)

    Whether the primary icon is sensitive. An insensitive icon appears grayed out. GTK does not emit the [signal@Gtk.Entry::icon-press] and [signal@Gtk.Entry::icon-release] signals and does not allow DND from insensitive icons. An icon should be set insensitive if the action that would trigger when clicked is currently not available.

    • @p Value is the new property value.
    • @r None.
  • setPrimaryicontooltipmarkup (string Value)

    The contents of the tooltip on the primary icon, with markup. Also see [method@Gtk.Entry.set_icon_tooltip_markup].

    • @p Value is the new property value.
    • @r None.
  • setPrimaryicontooltiptext (string Value)

    The contents of the tooltip on the primary icon. Also see [method@Gtk.Entry.set_icon_tooltip_text].

    • @p Value is the new property value.
    • @r None.
  • setProgressfraction (double Value)

    The current fraction of the task that's been completed.

    • @p Value is the new property value.
    • @r None.
  • setProgresspulsestep (double Value)

    The fraction of total entry width to move the progress bouncing block for each pulse. See [method@Gtk.Entry.progress_pulse].

    • @p Value is the new property value.
    • @r None.
  • setSecondaryiconactivatable (bool Value)

    Whether the secondary icon is activatable. GTK emits the [signal@Gtk.Entry::icon-press] and [signal@Gtk.Entry::icon-release] signals only on sensitive, activatable icons. Sensitive, but non-activatable icons can be used for purely informational purposes.

    • @p Value is the new property value.
    • @r None.
  • setSecondaryicongicon (object Value)

    The GIcon to use for the secondary icon for the entry.

    • @p Value is the new property value.
    • @r None.
  • setSecondaryiconname (string Value)

    The icon name to use for the secondary icon for the entry.

    • @p Value is the new property value.
    • @r None.
  • setSecondaryiconpaintable (object Value)

    A GdkPaintable to use as the secondary icon for the entry.

    • @p Value is the new property value.
    • @r None.
  • setSecondaryiconsensitive (bool Value)

    Whether the secondary icon is sensitive. An insensitive icon appears grayed out. GTK does not emit the [signal@Gtk.Entry::icon-press[ and [signal@Gtk.Entry::icon-release] signals and does not allow DND from insensitive icons. An icon should be set insensitive if the action that would trigger when clicked is currently not available.

    • @p Value is the new property value.
    • @r None.
  • setSecondaryicontooltipmarkup (string Value)

    The contents of the tooltip on the secondary icon, with markup. Also see [method@Gtk.Entry.set_icon_tooltip_markup].

    • @p Value is the new property value.
    • @r None.
  • setSecondaryicontooltiptext (string Value)

    The contents of the tooltip on the secondary icon. Also see [method@Gtk.Entry.set_icon_tooltip_text].

    • @p Value is the new property value.
    • @r None.
  • setShowemojiicon (bool Value)

    Whether the entry will show an Emoji icon in the secondary icon position to open the Emoji chooser.

    • @p Value is the new property value.
    • @r None.
  • setTabs (object Value)

    A list of tabstops to apply to the text of the entry.

    • @p Value is the new property value.
    • @r None.
  • setTruncatemultiline (bool Value)

    When %TRUE, pasted multi-line text is truncated to the first line.

    • @p Value is the new property value.
    • @r None.
  • setVisibility (bool Value)

    Whether the entry should show the “invisible char” instead of the actual text (“password mode”).

    • @p Value is the new property value.
    • @r None.
  • get_activates_default ()

    Retrieves the value set by gtk_entry_set_activates_default().

  • get_alignment ()

    Gets the value set by gtk_entry_set_alignment(). See also: [property@Gtk.Editable:xalign]

  • get_attributes ()

    Gets the attribute list of the GtkEntry. See [method@Gtk.Entry.set_attributes].

  • get_buffer ()

    Get the GtkEntryBuffer object which holds the text for this widget.

  • get_completion ()

    Returns the auxiliary completion object currently in use by @entry.

  • get_current_icon_drag_source ()

    Returns the index of the icon which is the source of the current DND operation, or -1.

  • get_extra_menu ()

    Gets the menu model set with gtk_entry_set_extra_menu().

  • get_has_frame ()

    Gets the value set by gtk_entry_set_has_frame().

  • get_icon_activatable (string icon_pos)

    Returns whether the icon is activatable.

    • @p icon_pos is Icon position.
  • get_icon_at_pos (int x, int y)

    Finds the icon at the given position and return its index. The position’s coordinates are relative to the @entry’s top left corner. If @x, @y doesn’t lie inside an icon, -1 is returned. This function is intended for use in a [signal@Gtk.Widget::query-tooltip] signal handler.

    • @p x is the x coordinate of the position to find, relative to @entry.
    • @p y is the y coordinate of the position to find, relative to @entry.
  • get_icon_gicon (string icon_pos)

    Retrieves the GIcon used for the icon. %NULL will be returned if there is no icon or if the icon was set by some other method (e.g., by GdkPaintable or icon name).

    • @p icon_pos is Icon position.
  • get_icon_name (string icon_pos)

    Retrieves the icon name used for the icon. %NULL is returned if there is no icon or if the icon was set by some other method (e.g., by GdkPaintable or gicon).

    • @p icon_pos is Icon position.
  • get_icon_paintable (string icon_pos)

    Retrieves the GdkPaintable used for the icon. If no GdkPaintable was used for the icon, %NULL is returned.

    • @p icon_pos is Icon position.
  • get_icon_sensitive (string icon_pos)

    Returns whether the icon appears sensitive or insensitive.

    • @p icon_pos is Icon position.
  • get_icon_storage_type (string icon_pos)

    Gets the type of representation being used by the icon to store image data. If the icon has no image data, the return value will be %GTK_IMAGE_EMPTY.

    • @p icon_pos is Icon position.
  • get_icon_tooltip_markup (string icon_pos)

    Gets the contents of the tooltip on the icon at the specified position in

    • @entry. ``
    • @p icon_pos is the icon position.
  • get_icon_tooltip_text (string icon_pos)

    Gets the contents of the tooltip on the icon at the specified position in

    • @entry. ``
    • @p icon_pos is the icon position.
  • get_input_hints ()

    Gets the input hints of this GtkEntry.

  • get_input_purpose ()

    Gets the input purpose of the GtkEntry.

  • get_max_length ()

    Retrieves the maximum allowed length of the text in @entry. See [method@Gtk.Entry.set_max_length].

  • get_menu_entry_icon_text (string icon_pos)

    Gets the text that will be used in the context menu of the GtkEntry when the specified icon is activatable. Selecting this item in the menu results, from all aspects, the same than clicking on the specified icon. This greatly simplifies making accessible applications, because the icons aren't focusable when using keyboard navigation. This is why Gtk recommends to add the same action to the context menu.

    • @p icon_pos is either @GTK_ENTRY_ICON_PRIMARY or
    • @GTK_ENTRY_ICON_SECONDARY. ``
  • get_overwrite_mode ()

    Gets whether the GtkEntry is in overwrite mode.

  • get_placeholder_text ()

    Retrieves the text that will be displayed when @entry is empty and unfocused

  • get_progress_fraction ()

    Returns the current fraction of the task that’s been completed. See [method@Gtk.Entry.set_progress_fraction].

  • get_progress_pulse_step ()

    Retrieves the pulse step set with gtk_entry_set_progress_pulse_step().

  • get_tabs ()

    Gets the tabstops of the GtkEntry. See [method@Gtk.Entry.set_tabs].

  • get_visibility ()

    Retrieves whether the text in @entry is visible. See [method@Gtk.Entry.set_visibility].

  • grab_focus_without_selecting ()

    Causes @entry to have keyboard focus. It behaves like [method@Gtk.Widget.grab_focus], except that it doesn't select the contents of the entry. You only want to call this on some special entries which the user usually doesn't want to replace all text in, such as search-as-you-type entries.

  • progress_pulse ()

    Indicates that some progress is made, but you don’t know how much. Causes the entry’s progress indicator to enter “activity mode”, where a block bounces back and forth. Each call to gtk_entry_progress_pulse() causes the block to move by a little bit (the amount of movement per pulse is determined by [method@Gtk.Entry.set_progress_pulse_step]).

    • @r None.
  • reset_im_context ()

    Reset the input method context of the entry if needed. This can be necessary in the case where modifying the buffer would confuse on-going input method behavior.

    • @r None.
  • set_activates_default (bool setting)

    Sets whether pressing Enter in the @entry will activate the default widget for the window containing the entry. This usually means that the dialog containing the entry will be closed, since the default widget is usually one of the dialog buttons.

    • @p setting is %TRUE to activate window’s default widget on Enter keypress.
    • @r None.
  • set_alignment (double xalign)

    Sets the alignment for the contents of the entry. This controls the horizontal positioning of the contents when the displayed text is shorter than the width of the entry. See also: [property@Gtk.Editable:xalign]

    • @p xalign is The horizontal alignment, from 0 (left) to 1 (right). Reversed for RTL layouts.
    • @r None.
  • set_attributes (object attrs)

    Sets a PangoAttrList. The attributes in the list are applied to the entry text. Since the attributes will be applied to text that changes as the user types, it makes most sense to use attributes with unlimited extent.

    • @p attrs is a PangoAttrList.
    • @r None.
  • set_buffer (object buffer)

    Set the GtkEntryBuffer object which holds the text for this widget.

    • @p buffer is a GtkEntryBuffer.
    • @r None.
  • set_completion (object completion)

    Sets @completion to be the auxiliary completion object to use with

    • @entry. All further configuration of the completion mechanism is done on
    • @completion using the GtkEntryCompletion API. Completion is disabled if
    • @completion is set to %NULL.
    • @p completion is The GtkEntryCompletion.
    • @r None.
  • set_extra_menu (object model)

    Sets a menu model to add when constructing the context menu for @entry.

    • @p model is a GMenuModel.
    • @r None.
  • set_has_frame (bool setting)

    Sets whether the entry has a beveled frame around it.

    • @p setting is new value.
    • @r None.
  • set_icon_activatable (string icon_pos, bool activatable)

    Sets whether the icon is activatable.

    • @p icon_pos is Icon position.
    • @p activatable is %TRUE if the icon should be activatable.
    • @r None.
  • set_icon_drag_source (string icon_pos, object provider, string actions)

    Sets up the icon at the given position as drag source. This makes it so that GTK will start a drag operation when the user clicks and drags the icon.

    • @p icon_pos is icon position.
    • @p provider is a GdkContentProvider.
    • @p actions is a bitmask of the allowed drag actions.
    • @r None.
  • set_icon_from_gicon (string icon_pos, object icon)

    Sets the icon shown in the entry at the specified position from the current icon theme. If the icon isn’t known, a “broken image” icon will be displayed instead. If @icon is %NULL, no icon will be shown in the specified position.

    • @p icon_pos is The position at which to set the icon.
    • @p icon is The icon to set.
    • @r None.
  • set_icon_from_icon_name (string icon_pos, string icon_name)

    Sets the icon shown in the entry at the specified position from the current icon theme. If the icon name isn’t known, a “broken image” icon will be displayed instead. If @icon_name is %NULL, no icon will be shown in the specified position.

    • @p icon_pos is The position at which to set the icon.
    • @p icon_name is An icon name.
    • @r None.
  • set_icon_from_paintable (string icon_pos, object paintable)

    Sets the icon shown in the specified position using a GdkPaintable. If

    • @paintable is %NULL, no icon will be shown in the specified position.
    • @p icon_pos is Icon position.
    • @p paintable is A GdkPaintable.
    • @r None.
  • set_icon_sensitive (string icon_pos, bool sensitive)

    Sets the sensitivity for the specified icon.

    • @p icon_pos is Icon position.
    • @p sensitive is Specifies whether the icon should appear sensitive or insensitive.
    • @r None.
  • set_icon_tooltip_markup (string icon_pos, string tooltip)

    Sets @tooltip as the contents of the tooltip for the icon at the specified position. @tooltip is assumed to be marked up with Pango Markup. Use %NULL for @tooltip to remove an existing tooltip. See also [method@Gtk.Widget.set_tooltip_markup] and [method@Gtk.Entry.set_icon_tooltip_text].

    • @p icon_pos is the icon position.
    • @p tooltip is the contents of the tooltip for the icon.
    • @r None.
  • set_icon_tooltip_text (string icon_pos, string tooltip)

    Sets @tooltip as the contents of the tooltip for the icon at the specified position. Use %NULL for @tooltip to remove an existing tooltip. See also [method@Gtk.Widget.set_tooltip_text] and [method@Gtk.Entry.set_icon_tooltip_markup]. If you unset the widget tooltip via [method@Gtk.Widget.set_tooltip_text] or [method@Gtk.Widget.set_tooltip_markup], this sets [property@Gtk.Widget:has-tooltip] to %FALSE, which suppresses icon tooltips too. You can resolve this by then calling [method@Gtk.Widget.set_has_tooltip] to set [property@Gtk.Widget:has-tooltip] back to %TRUE, or setting at least one non-empty tooltip on any icon achieves the same result.

    • @p icon_pos is the icon position.
    • @p tooltip is the contents of the tooltip for the icon.
    • @r None.
  • set_input_hints (string hints)

    Set additional hints which allow input methods to fine-tune their behavior.

    • @p hints is the hints.
    • @r None.
  • set_input_purpose (string purpose)

    Sets the input purpose which can be used by input methods to adjust their behavior.

    • @p purpose is the purpose.
    • @r None.
  • set_max_length (int max)

    Sets the maximum allowed length of the contents of the widget. If the current contents are longer than the given length, then they will be truncated to fit. The length is in characters. This is equivalent to getting @entry's GtkEntryBuffer and calling [method@Gtk.EntryBuffer.set_max_length] on it.

    • @p max is the maximum length of the entry, or 0 for no maximum. (other than the maximum length of entries.) The value passed in will be clamped to the range 0-65536..
    • @r None.
  • set_menu_entry_icon_text (string icon_pos, string text)

    Sets the text that will be used in the context menu of the GtkEntry when the specified icon is activatable. Selecting this item in the menu results, from all aspects, the same than clicking on the specified icon. This greatly simplifies making accessible applications, because the icons aren't focusable when using keyboard navigation. This is why Gtk recommends to add the same action to the context menu.

    • @p icon_pos is either @GTK_ENTRY_ICON_PRIMARY or
    • @GTK_ENTRY_ICON_SECONDARY. ``
    • @p text is the text used for the menu item in the context menu, or NULL to not add a menu item..
    • @r None.
  • set_overwrite_mode (bool overwrite)

    Sets whether the text is overwritten when typing in the GtkEntry.

    • @p overwrite is new value.
    • @r None.
  • set_placeholder_text (string text)

    Sets text to be displayed in @entry when it is empty. This can be used to give a visual hint of the expected contents of the GtkEntry.

    • @p text is a string to be displayed when @entry is empty and unfocused.
    • @r None.
  • set_progress_fraction (double fraction)

    Causes the entry’s progress indicator to “fill in” the given fraction of the bar. The fraction should be between 0.0 and 1.0, inclusive.

    • @p fraction is fraction of the task that’s been completed.
    • @r None.
  • set_progress_pulse_step (double fraction)

    Sets the fraction of total entry width to move the progress bouncing block for each pulse. Use [method@Gtk.Entry.progress_pulse] to pulse the progress.

    • @p fraction is fraction between 0.0 and 1.0.
    • @r None.
  • set_tabs (object tabs)

    Sets a PangoTabArray. The tabstops in the array are applied to the entry text.

    • @p tabs is a PangoTabArray.
    • @r None.
  • set_visibility (bool visible)

    Sets whether the contents of the entry are visible or not. When visibility is set to %FALSE, characters are displayed as the invisible char, and will also appear that way when the text in the entry widget is copied elsewhere. By default, GTK picks the best invisible character available in the current font, but it can be changed with [method@Gtk.Entry.set_invisible_char]. Note that you probably want to set [property@Gtk.Entry:input-purpose] to %GTK_INPUT_PURPOSE_PASSWORD or %GTK_INPUT_PURPOSE_PIN to inform input methods about the purpose of this entry, in addition to setting visibility to %FALSE.

    • @p visible is %TRUE if the contents of the entry are displayed as plaintext.
    • @r None.
  • unset_invisible_char ()

    Unsets the invisible char, so that the default invisible char is used again. See [method@Gtk.Entry.set_invisible_char].

    • @r None.

class: EntryIconpressCallback

[1628:7] extends: object

Generated low-level callback wrapper for GIR callback icon-press.

Members

  • callbackObj
  • userFn
  • userData
  • hasUserData

Methods

  • EntryIconpressCallback (callback Fn, UserData = null)

    Creates one native callback wrapper. The wrapper owns a trampoline that converts native pointers into generated wrapper objects before invoking Fn.

    • @p Fn is the Aussom callback implementation.
    • @p UserData is retained and passed through to Fn on each invocation when provided.
  • trampoline (nativeSelf, icon_pos, nativeUserData)

    Internal trampoline. Converts native pointer arguments into generated wrapper instances, then invokes the user's callback.

  • callback ()

    Returns the wrapped NativeCallback.

  • handle ()

    Returns the callback as a NativeHandle.

  • close ()

    Closes the underlying NativeCallback.

  • isClosed ()

    Returns true when the callback has been closed.

class: EntryActivateCallback

[1558:7] extends: object

Generated low-level callback wrapper for GIR callback activate.

Members

  • callbackObj
  • userFn
  • userData
  • hasUserData

Methods

  • EntryActivateCallback (callback Fn, UserData = null)

    Creates one native callback wrapper. The wrapper owns a trampoline that converts native pointers into generated wrapper objects before invoking Fn.

    • @p Fn is the Aussom callback implementation.
    • @p UserData is retained and passed through to Fn on each invocation when provided.
  • trampoline (nativeSelf, nativeUserData)

    Internal trampoline. Converts native pointer arguments into generated wrapper instances, then invokes the user's callback.

  • callback ()

    Returns the wrapped NativeCallback.

  • handle ()

    Returns the callback as a NativeHandle.

  • close ()

    Closes the underlying NativeCallback.

  • isClosed ()

    Returns true when the callback has been closed.

class: EntryIconreleaseCallback

[1699:7] extends: object

Generated low-level callback wrapper for GIR callback icon-release.

Members

  • callbackObj
  • userFn
  • userData
  • hasUserData

Methods

  • EntryIconreleaseCallback (callback Fn, UserData = null)

    Creates one native callback wrapper. The wrapper owns a trampoline that converts native pointers into generated wrapper objects before invoking Fn.

    • @p Fn is the Aussom callback implementation.
    • @p UserData is retained and passed through to Fn on each invocation when provided.
  • trampoline (nativeSelf, icon_pos, nativeUserData)

    Internal trampoline. Converts native pointer arguments into generated wrapper instances, then invokes the user's callback.

  • callback ()

    Returns the wrapped NativeCallback.

  • handle ()

    Returns the callback as a NativeHandle.

  • close ()

    Closes the underlying NativeCallback.

  • isClosed ()

    Returns true when the callback has been closed.

class: EntryMeta

[1770:14] static extends: object

Generated metadata helpers for Entry class surfaces.

Methods

  • properties ()

    Returns property metadata for Entry.

    • @r A list.
  • signals ()

    Returns signal metadata for Entry.

    • @r A list.