Class ColorChooser

All Implemented Interfaces:
PointerInterface

public class ColorChooser extends Interface
`GtkColorChooser` is an interface that is implemented by widgets
for choosing colors.

Depending on the situation, colors may be allowed to have alpha (translucency).

In GTK, the main widgets that implement this interface are
[class@Gtk.ColorChooserWidget], [class@Gtk.ColorChooserDialog] and
[class@Gtk.ColorButton].

https://docs.gtk.org/gtk4/iface.ColorChooser.html

  • Field Details

  • Constructor Details

  • Method Details

    • getClassHandler

      public static ClassHandler getClassHandler()
    • getRgba

      public void getRgba(@Nonnull RGBA color)
      Gets the currently-selected color.
      Parameters:
      color - a `GdkRGBA` to fill in with the current color
    • getUseAlpha

      public boolean getUseAlpha()
      Returns whether the color chooser shows the alpha channel.
      Returns:
      %TRUE if the color chooser uses the alpha channel, %FALSE if not
    • setRgba

      public void setRgba(@Nonnull RGBA color)
      Sets the color.
      Parameters:
      color - the new color
    • setUseAlpha

      public void setUseAlpha(boolean use_alpha)
      Sets whether or not the color chooser should use the alpha channel.
      Parameters:
      use_alpha - %TRUE if color chooser should use alpha channel, %FALSE if not
    • onColorActivated

      public SignalHandler onColorActivated(ColorChooser.OnColorActivated signal)
      Connect to signal "color-activated".
      See ColorChooser.OnColorActivated.onColorActivated(ch.bailu.gtk.gdk.RGBA) for signal description.
      Field SIGNAL_ON_COLOR_ACTIVATED contains original signal name and can be used as resource reference.
      Parameters:
      signal - callback function (lambda).
      Returns:
      SignalHandler. Can be used to disconnect signal and to release callback function.
    • getTypeID

      public static long getTypeID()
    • getParentTypeID

      public static long getParentTypeID()
    • getTypeSize

      public static TypeSystem.TypeSize getTypeSize()
    • getParentTypeSize

      public static TypeSystem.TypeSize getParentTypeSize()
    • getInstanceSize

      public static int getInstanceSize()