Copyright | Will Thompson and Iñaki García Etxebarria |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | None |
Language | Haskell2010 |
GI.Gtk.Objects.ColorDialog
Description
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 colorDialogChooseRgba
function.
See ColorDialogButton
for a convenient control
that uses GtkColorDialog
and presents the results.
Since: 4.10
Synopsis
- newtype ColorDialog = ColorDialog (ManagedPtr ColorDialog)
- class (GObject o, IsDescendantOf ColorDialog o) => IsColorDialog o
- toColorDialog :: (MonadIO m, IsColorDialog o) => o -> m ColorDialog
- colorDialogChooseRgba :: (HasCallStack, MonadIO m, IsColorDialog a, IsWindow b, IsCancellable c) => a -> Maybe b -> Maybe RGBA -> Maybe c -> Maybe AsyncReadyCallback -> m ()
- colorDialogChooseRgbaFinish :: (HasCallStack, MonadIO m, IsColorDialog a, IsAsyncResult b) => a -> b -> m (Maybe RGBA)
- colorDialogGetModal :: (HasCallStack, MonadIO m, IsColorDialog a) => a -> m Bool
- colorDialogGetTitle :: (HasCallStack, MonadIO m, IsColorDialog a) => a -> m Text
- colorDialogGetWithAlpha :: (HasCallStack, MonadIO m, IsColorDialog a) => a -> m Bool
- colorDialogNew :: (HasCallStack, MonadIO m) => m ColorDialog
- colorDialogSetModal :: (HasCallStack, MonadIO m, IsColorDialog a) => a -> Bool -> m ()
- colorDialogSetTitle :: (HasCallStack, MonadIO m, IsColorDialog a) => a -> Text -> m ()
- colorDialogSetWithAlpha :: (HasCallStack, MonadIO m, IsColorDialog a) => a -> Bool -> m ()
- constructColorDialogModal :: (IsColorDialog o, MonadIO m) => Bool -> m (GValueConstruct o)
- getColorDialogModal :: (MonadIO m, IsColorDialog o) => o -> m Bool
- setColorDialogModal :: (MonadIO m, IsColorDialog o) => o -> Bool -> m ()
- constructColorDialogTitle :: (IsColorDialog o, MonadIO m) => Text -> m (GValueConstruct o)
- getColorDialogTitle :: (MonadIO m, IsColorDialog o) => o -> m Text
- setColorDialogTitle :: (MonadIO m, IsColorDialog o) => o -> Text -> m ()
- constructColorDialogWithAlpha :: (IsColorDialog o, MonadIO m) => Bool -> m (GValueConstruct o)
- getColorDialogWithAlpha :: (MonadIO m, IsColorDialog o) => o -> m Bool
- setColorDialogWithAlpha :: (MonadIO m, IsColorDialog o) => o -> Bool -> m ()
Exported types
newtype ColorDialog Source #
Memory-managed wrapper type.
Constructors
ColorDialog (ManagedPtr ColorDialog) |
Instances
Eq ColorDialog Source # | |
Defined in GI.Gtk.Objects.ColorDialog | |
GObject ColorDialog Source # | |
Defined in GI.Gtk.Objects.ColorDialog | |
ManagedPtrNewtype ColorDialog Source # | |
Defined in GI.Gtk.Objects.ColorDialog Methods | |
TypedObject ColorDialog Source # | |
Defined in GI.Gtk.Objects.ColorDialog | |
HasParentTypes ColorDialog Source # | |
Defined in GI.Gtk.Objects.ColorDialog | |
IsGValue (Maybe ColorDialog) Source # | Convert |
Defined in GI.Gtk.Objects.ColorDialog Methods gvalueGType_ :: IO GType # gvalueSet_ :: Ptr GValue -> Maybe ColorDialog -> IO () # gvalueGet_ :: Ptr GValue -> IO (Maybe ColorDialog) # | |
type ParentTypes ColorDialog Source # | |
Defined in GI.Gtk.Objects.ColorDialog type ParentTypes ColorDialog = '[Object] |
class (GObject o, IsDescendantOf ColorDialog o) => IsColorDialog o Source #
Type class for types which can be safely cast to ColorDialog
, for instance with toColorDialog
.
Instances
(GObject o, IsDescendantOf ColorDialog o) => IsColorDialog o Source # | |
Defined in GI.Gtk.Objects.ColorDialog |
toColorDialog :: (MonadIO m, IsColorDialog o) => o -> m ColorDialog Source #
Cast to ColorDialog
, for types for which this is known to be safe. For general casts, use castTo
.
Methods
Click to display all available methods, including inherited ones
Methods
bindProperty, bindPropertyFull, chooseRgba, chooseRgbaFinish, forceFloating, freezeNotify, getv, isFloating, notify, notifyByPspec, ref, refSink, runDispose, stealData, stealQdata, thawNotify, unref, watchClosure.
Getters
getData, getModal, getProperty, getQdata, getTitle, getWithAlpha.
Setters
setData, setDataFull, setModal, setProperty, setTitle, setWithAlpha.
chooseRgba
colorDialogChooseRgba Source #
Arguments
:: (HasCallStack, MonadIO m, IsColorDialog a, IsWindow b, IsCancellable c) | |
=> a |
|
-> Maybe b |
|
-> Maybe RGBA |
|
-> Maybe c |
|
-> Maybe AsyncReadyCallback |
|
-> m () |
Presents a color chooser dialog to the user.
Since: 4.10
chooseRgbaFinish
colorDialogChooseRgbaFinish Source #
Arguments
:: (HasCallStack, MonadIO m, IsColorDialog a, IsAsyncResult b) | |
=> a |
|
-> b |
|
-> m (Maybe RGBA) | Returns: the selected color (Can throw |
Finishes the colorDialogChooseRgba
call
Since: 4.10
getModal
Arguments
:: (HasCallStack, MonadIO m, IsColorDialog a) | |
=> a |
|
-> m Bool | Returns: true if the color chooser dialog is modal |
Returns whether the color chooser dialog blocks interaction with the parent window while it is presented.
Since: 4.10
getTitle
Arguments
:: (HasCallStack, MonadIO m, IsColorDialog a) | |
=> a |
|
-> m Text | Returns: the title |
Returns the title that will be shown on the color chooser dialog.
Since: 4.10
getWithAlpha
colorDialogGetWithAlpha Source #
Arguments
:: (HasCallStack, MonadIO m, IsColorDialog a) | |
=> a |
|
-> m Bool | Returns: true if colors may have alpha |
Returns whether colors may have alpha.
Since: 4.10
new
Arguments
:: (HasCallStack, MonadIO m) | |
=> m ColorDialog | Returns: the new |
Creates a new GtkColorDialog
object.
Since: 4.10
setModal
Arguments
:: (HasCallStack, MonadIO m, IsColorDialog a) | |
=> a |
|
-> Bool |
|
-> m () |
Sets whether the color chooser dialog blocks interaction with the parent window while it is presented.
Since: 4.10
setTitle
Arguments
:: (HasCallStack, MonadIO m, IsColorDialog a) | |
=> a |
|
-> Text |
|
-> m () |
Sets the title that will be shown on the color chooser dialog.
Since: 4.10
setWithAlpha
colorDialogSetWithAlpha Source #
Arguments
:: (HasCallStack, MonadIO m, IsColorDialog a) | |
=> a |
|
-> Bool |
|
-> m () |
Sets whether colors may have alpha.
Since: 4.10
Properties
modal
Whether the color chooser dialog is modal.
Since: 4.10
constructColorDialogModal :: (IsColorDialog o, MonadIO m) => Bool -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “modal
” property. This is rarely needed directly, but it is used by new
.
getColorDialogModal :: (MonadIO m, IsColorDialog o) => o -> m Bool Source #
Get the value of the “modal
” property.
When overloading is enabled, this is equivalent to
get
colorDialog #modal
setColorDialogModal :: (MonadIO m, IsColorDialog o) => o -> Bool -> m () Source #
Set the value of the “modal
” property.
When overloading is enabled, this is equivalent to
set
colorDialog [ #modal:=
value ]
title
A title that may be shown on the color chooser dialog.
Since: 4.10
constructColorDialogTitle :: (IsColorDialog o, MonadIO m) => Text -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “title
” property. This is rarely needed directly, but it is used by new
.
getColorDialogTitle :: (MonadIO m, IsColorDialog o) => o -> m Text Source #
Get the value of the “title
” property.
When overloading is enabled, this is equivalent to
get
colorDialog #title
setColorDialogTitle :: (MonadIO m, IsColorDialog o) => o -> Text -> m () Source #
Set the value of the “title
” property.
When overloading is enabled, this is equivalent to
set
colorDialog [ #title:=
value ]
withAlpha
Whether colors may have alpha (translucency).
When with-alpha is false, the color that is selected will be forced to have alpha == 1.
Since: 4.10
constructColorDialogWithAlpha :: (IsColorDialog o, MonadIO m) => Bool -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “with-alpha
” property. This is rarely needed directly, but it is used by new
.
getColorDialogWithAlpha :: (MonadIO m, IsColorDialog o) => o -> m Bool Source #
Get the value of the “with-alpha
” property.
When overloading is enabled, this is equivalent to
get
colorDialog #withAlpha
setColorDialogWithAlpha :: (MonadIO m, IsColorDialog o) => o -> Bool -> m () Source #
Set the value of the “with-alpha
” property.
When overloading is enabled, this is equivalent to
set
colorDialog [ #withAlpha:=
value ]