AppChooserButtonRef

public struct AppChooserButtonRef : AppChooserButtonProtocol, GWeakCapturing

The GtkAppChooserButton is a widget that lets the user select an application. It implements the GtkAppChooser interface.

Initially, a GtkAppChooserButton selects the first application in its list, which will either be the most-recently used application or, if GtkAppChooserButton:show-default-item is true, the default application.

The list of applications shown in a GtkAppChooserButton includes the recommended applications for the given content type. When GtkAppChooserButton:show-default-item is set, the default application is also included. To let the user chooser other applications, you can set the GtkAppChooserButton:show-dialog-item property, which allows to open a full GtkAppChooserDialog.

It is possible to add custom items to the list, using gtk_app_chooser_button_append_custom_item(). These items cause the GtkAppChooserButton::custom-item-activated signal to be emitted when they are selected.

To track changes in the selected application, use the GtkComboBox::changed signal.

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

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

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

    Declaration

    Swift

    public let ptr: UnsafeMutableRawPointer!

AppChooserButton Class

  • Designated initialiser from the underlying C data type

    Declaration

    Swift

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

    Declaration

    Swift

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

    Declaration

    Swift

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

    Declaration

    Swift

    @inlinable
    init!(_ maybePointer: UnsafePointer<GtkAppChooserButton>?)
  • 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 AppChooserButtonProtocol

    Declaration

    Swift

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

    Declaration

    Swift

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

    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 AppChooserButtonProtocol.

    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 AppChooserButtonProtocol.

    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 AppChooserButtonProtocol.

    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 AppChooserButtonProtocol.

    Declaration

    Swift

    @inlinable
    init(opaquePointer: OpaquePointer)
  • Creates a new `GtkAppChooserButton` for applications
    

    that can handle content of the given type.

    Declaration

    Swift

    @inlinable
    init(contentType: UnsafePointer<gchar>!)