ColorChooserWidgetRef
public struct ColorChooserWidgetRef : ColorChooserWidgetProtocol, GWeakCapturing
The GtkColorChooserWidget widget lets the user select a color.
By default, the chooser presents a predefined palette of colors, plus a small number of settable custom colors. It is also possible to select a different color with the single-color editor.
To enter the single-color editing mode, use the context menu of any color of the palette, or use the ‘+’ button to add a new custom color.
The chooser automatically remembers the last selection, as well as custom colors.
To create a GtkColorChooserWidget, use [ctorGtk.ColorChooserWidget.new].
To change the initially selected color, use
[methodGtk.ColorChooser.set_rgba]. To get the selected color use
[methodGtk.ColorChooser.get_rgba].
The GtkColorChooserWidget is used in the [classGtk.ColorChooserDialog]
to provide a dialog for selecting colors.
CSS names
GtkColorChooserWidget has a single CSS node with name colorchooser.
The ColorChooserWidgetRef type acts as a lightweight Swift reference to an underlying GtkColorChooserWidget instance.
It exposes methods that can operate on this data type through ColorChooserWidgetProtocol conformance.
Use ColorChooserWidgetRef only as an unowned reference to an existing GtkColorChooserWidget instance.
-
Untyped pointer to the underlying `GtkColorChooserWidget` instance.For type-safe access, use the generated, typed pointer
color_chooser_widget_ptrproperty instead.Declaration
Swift
public let ptr: UnsafeMutableRawPointer!
-
Designated initialiser from the underlying
Cdata typeDeclaration
Swift
@inlinable init(_ p: UnsafeMutablePointer<GtkColorChooserWidget>) -
Designated initialiser from a constant pointer to the underlying
Cdata typeDeclaration
Swift
@inlinable init(_ p: UnsafePointer<GtkColorChooserWidget>) -
Conditional initialiser from an optional pointer to the underlying
Cdata typeDeclaration
Swift
@inlinable init!(_ maybePointer: UnsafeMutablePointer<GtkColorChooserWidget>?) -
Conditional initialiser from an optional, non-mutable pointer to the underlying
Cdata typeDeclaration
Swift
@inlinable init!(_ maybePointer: UnsafePointer<GtkColorChooserWidget>?) -
Conditional initialiser from an optional
gpointerDeclaration
Swift
@inlinable init!(gpointer g: gpointer?) -
Conditional initialiser from an optional, non-mutable
gconstpointerDeclaration
Swift
@inlinable init!(gconstpointer g: gconstpointer?) -
Reference intialiser for a related type that implements
ColorChooserWidgetProtocolDeclaration
Swift
@inlinable init<T>(_ other: T) where T : ColorChooserWidgetProtocol -
This factory is syntactic sugar for setting weak pointers wrapped in
GWeak<T>Declaration
Swift
@inlinable static func unowned<T>(_ other: T) -> ColorChooserWidgetRef where T : ColorChooserWidgetProtocol -
Unsafe typed initialiser. Do not use unless you know the underlying data type the pointer points to conforms to
ColorChooserWidgetProtocol.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
ColorChooserWidgetProtocol.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
ColorChooserWidgetProtocol.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
ColorChooserWidgetProtocol.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
ColorChooserWidgetProtocol.Declaration
Swift
@inlinable init(opaquePointer: OpaquePointer) -
Creates a new
GtkColorChooserWidget.Declaration
Swift
@inlinable init()
View on GitHub
Install in Dash
ColorChooserWidgetRef Structure Reference