GtkPasswordEntry

gtk.password_entry.PasswordEntry is an entry that has been tailored for entering secrets.

An example 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 Caps Lock is engaged. If the underlying platform allows it, gtk.password_entry.PasswordEntry 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.

gtk.password_entry.PasswordEntry provides only minimal API and should be used with the gtk.editable.Editable API.

CSS Nodes

entry.password
╰── text
    ├── image.caps-lock-indicator
    ┊

gtk.password_entry.PasswordEntry has a single CSS node with name entry that carries a .passwordstyle class. The text Css node below it has a child with name image and style class .caps-lock-indicator for the Caps Lock icon, and possibly other children.

Accessibility

gtk.password_entry.PasswordEntry uses the gtk.types.AccessibleRole.TextBox role.

struct GtkPasswordEntry