Package: gtk

Class gtk:password-entry

Superclasses

Documented Subclasses

None

Direct Slots

activates-default
The activates-default property of type :boolean (Read / Write)
Whether to activate the default widget, such as the default button in a dialog, when the Enter key is pressed.
Default value: false
extra-menu
The extra-menu property of type g:menu-model (Read / Write)
The menu model whose contents will be appended to the context menu.
placeholder-text
The placeholder-text property of type :string (Read / Write)
The text that will be displayed in the password entry when it is empty and unfocused.
Default value: nil
show-peek-icon
The show-peek-icon property of type :boolean (Read / Write)
Whether to show an icon for revealing the content.
Default value: false

Details

The gtk:password-entry class is a text entry that has been tailored for entering secrets.

Figure: GtkPasswordEntry

It does not show its contents in clear text, does not allow to copy it to the clipboard, and it shows a warning when the Caps Lock key is engaged. If the underlying platform allows it, the gtk:password-entry widget will also place the text in a non-pageable memory area, to avoid it being written out to disk by the operating system. Optionally, it can offer a way to reveal the contents in clear text.

The gtk:password-entry widget provides only minimal API and should be used with the gtk:editable API.

CSS Nodes

entry.password
╰── text
    ├── image.caps-lock-indicator
    ┊    
The gtk:password-entry implementation has a single CSS node with name entry that carries a .passwordstyle style class. The text CSS node below it has a child with name image and .caps-lock-indicator style class for the Caps Lock icon, and possibly other children.

Accessibility

The gtk:password-entry implementation uses the :text-box role of the gtk:accessible-role enumeration.

Signal Details

The "activate" signal
lambda (entry)    :action      
entry
The gtk:password-entry widget on which the signal is emitted.
A keybinding signal which gets emitted when the user activates the password entry. Applications should not connect to it, but may emit it with the g:signal-emit function if they need to control activation programmatically. The default bindings for this signal are all forms of the Enter key.
 

Returned by

Slot Access Functions

Inherited Slot Access Functions

See also

2024-12-5