Basics

Guides

API Reference

Menu

Basics

Guides

API Reference

class: ColorDialog

[17:7] extends: object

Asynchronous API to present a color chooser dialog. GtkColorDialog collects the arguments that are needed to present the dialog to the user, such as a title for the dialog and whether it should be modal. The dialog is shown with the [method@Gtk.ColorDialog.choose_rgba] function. See [class@Gtk.ColorDialogButton] for a convenient control that uses GtkColorDialog and presents the results.

Members

  • handleObj
  • lib
  • retainedCallbacks
  • signalHandlerNames
  • signalSetterHandlers

Methods

  • ColorDialog ()

    Creates a new GtkColorDialog object.

  • toNativeHandle (Source)

    Normalizes a constructor argument into a raw pointer carrier. Accepts a raw NativeHandle, a raw NativeBuffer returned from fn.call(...), another generated wrapper exposing handle(), or null. Returns null when the argument carries no pointer.

    • @p Source is the raw handle, raw buffer, wrapper, or null.
    • @r A raw pointer carrier or null when no pointer is present.
  • getLib ()

    Returns the opened native library for this generated wrapper.

    • @r The opened native library.
  • handle ()

    Returns the wrapped NativeHandle.

    • @r The wrapped NativeHandle.
  • isNull ()

    Returns true when the wrapped handle is null.

    • @r A bool.
  • describe ()

    Returns a small string for debugging generated wrappers.

    • @r A string.
  • asObject ()

    Wraps this handle as Object.

    • @r A Object object.
  • getProperty (string Name)

    Reads one generated property by name.

  • setProperty (string Name, Value)

    Writes one generated property by name.

  • setModal (bool Value)

    Whether the color chooser dialog is modal.

    • @p Value is the new property value.
    • @r None.
  • setTitle (string Value)

    A title that may be shown on the color chooser dialog.

    • @p Value is the new property value.
    • @r None.
  • setWithalpha (bool Value)

    Whether colors may have alpha (translucency). When with-alpha is false, the color that is selected will be forced to have alpha == 1.

    • @p Value is the new property value.
    • @r None.
  • choose_rgba_finish (object result)

    Finishes the [method@Gtk.ColorDialog.choose_rgba] call Note that this function returns a [error@Gtk.DialogError.DISMISSED] error if the user cancels the dialog.

    • @p result is the result.
  • get_modal ()

    Returns whether the color chooser dialog blocks interaction with the parent window while it is presented.

  • get_title ()

    Returns the title that will be shown on the color chooser dialog.

  • get_with_alpha ()

    Returns whether colors may have alpha.

  • set_modal (bool modal)

    Sets whether the color chooser dialog blocks interaction with the parent window while it is presented.

    • @p modal is the new value.
    • @r None.
  • set_title (string title)

    Sets the title that will be shown on the color chooser dialog.

    • @p title is the new title.
    • @r None.
  • set_with_alpha (bool with_alpha)

    Sets whether colors may have alpha.

    • @p with_alpha is the new value.
    • @r None.

class: ColorDialogMeta

[235:14] static extends: object

Generated metadata helpers for ColorDialog class surfaces.

Methods

  • properties ()

    Returns property metadata for ColorDialog.

    • @r A list.