PasswordEntryRef

public struct PasswordEntryRef : PasswordEntryProtocol, GWeakCapturing

GtkPasswordEntry 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, GtkPasswordEntry 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.

GtkPasswordEntry provides only minimal API and should be used with the [ifaceGtk.Editable] API.

CSS Nodes

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

GtkPasswordEntry 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

GtkPasswordEntry uses the GTK_ACCESSIBLE_ROLE_TEXT_BOX role.

The PasswordEntryRef type acts as a lightweight Swift reference to an underlying GtkPasswordEntry instance. It exposes methods that can operate on this data type through PasswordEntryProtocol conformance. Use PasswordEntryRef only as an unowned reference to an existing GtkPasswordEntry instance.

  • ptr
    Untyped pointer to the underlying `GtkPasswordEntry` instance.
    

    For type-safe access, use the generated, typed pointer password_entry_ptr property instead.

    Declaration

    Swift

    public let ptr: UnsafeMutableRawPointer!

PasswordEntry Class

  • Designated initialiser from the underlying C data type

    Declaration

    Swift

    @inlinable
    init(_ p: UnsafeMutablePointer<GtkPasswordEntry>)
  • Designated initialiser from a constant pointer to the underlying C data type

    Declaration

    Swift

    @inlinable
    init(_ p: UnsafePointer<GtkPasswordEntry>)
  • Conditional initialiser from an optional pointer to the underlying C data type

    Declaration

    Swift

    @inlinable
    init!(_ maybePointer: UnsafeMutablePointer<GtkPasswordEntry>?)
  • Conditional initialiser from an optional, non-mutable pointer to the underlying C data type

    Declaration

    Swift

    @inlinable
    init!(_ maybePointer: UnsafePointer<GtkPasswordEntry>?)
  • Conditional initialiser from an optional gpointer

    Declaration

    Swift

    @inlinable
    init!(gpointer g: gpointer?)
  • Conditional initialiser from an optional, non-mutable gconstpointer

    Declaration

    Swift

    @inlinable
    init!(gconstpointer g: gconstpointer?)
  • Reference intialiser for a related type that implements PasswordEntryProtocol

    Declaration

    Swift

    @inlinable
    init<T>(_ other: T) where T : PasswordEntryProtocol
  • This factory is syntactic sugar for setting weak pointers wrapped in GWeak<T>

    Declaration

    Swift

    @inlinable
    static func unowned<T>(_ other: T) -> PasswordEntryRef where T : PasswordEntryProtocol
  • Unsafe typed initialiser. Do not use unless you know the underlying data type the pointer points to conforms to PasswordEntryProtocol.

    Declaration

    Swift

    @inlinable
    init<T>(cPointer: UnsafeMutablePointer<T>)
  • Unsafe typed initialiser. Do not use unless you know the underlying data type the pointer points to conforms to PasswordEntryProtocol.

    Declaration

    Swift

    @inlinable
    init<T>(constPointer: UnsafePointer<T>)
  • Unsafe untyped initialiser. Do not use unless you know the underlying data type the pointer points to conforms to PasswordEntryProtocol.

    Declaration

    Swift

    @inlinable
    init(mutating raw: UnsafeRawPointer)
  • Unsafe untyped initialiser. Do not use unless you know the underlying data type the pointer points to conforms to PasswordEntryProtocol.

    Declaration

    Swift

    @inlinable
    init(raw: UnsafeMutableRawPointer)
  • Unsafe untyped initialiser. Do not use unless you know the underlying data type the pointer points to conforms to PasswordEntryProtocol.

    Declaration

    Swift

    @inlinable
    init(opaquePointer: OpaquePointer)
  • Creates a GtkPasswordEntry.

    Declaration

    Swift

    @inlinable
    init()