AppChooserButtonRef
public struct AppChooserButtonRef : AppChooserButtonProtocol, GWeakCapturing
The GtkAppChooserButton
lets the user select an application.
Initially, a GtkAppChooserButton
selects the first application
in its list, which will either be the most-recently used application
or, if [propertyGtk.AppChooserButton: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
[propertyGtk.AppChooserButton:show-default-item
] is set, the default
application is also included. To let the user chooser other applications,
you can set the [propertyGtk.AppChooserButton:show-dialog-item
] property,
which allows to open a full [classGtk.AppChooserDialog
].
It is possible to add custom items to the list, using
[methodGtk.AppChooserButton.append_custom_item
]. These items cause
the [signalGtk.AppChooserButton::custom-item-activated
] signal to be
emitted when they are selected.
To track changes in the selected application, use the
[signalGtk.AppChooserButton::changed
] signal.
CSS nodes
GtkAppChooserButton
has a single CSS node with the name “appchooserbutton”.
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.
-
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!
-
Designated initialiser from the underlying
C
data typeDeclaration
Swift
@inlinable init(_ p: UnsafeMutablePointer<GtkAppChooserButton>)
-
Designated initialiser from a constant pointer to the underlying
C
data typeDeclaration
Swift
@inlinable init(_ p: UnsafePointer<GtkAppChooserButton>)
-
Conditional initialiser from an optional pointer to the underlying
C
data typeDeclaration
Swift
@inlinable init!(_ maybePointer: UnsafeMutablePointer<GtkAppChooserButton>?)
-
Conditional initialiser from an optional, non-mutable pointer to the underlying
C
data typeDeclaration
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<CChar>!)