Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria (inaki@blueleaf.cc) |
Safe Haskell | None |
Language | Haskell2010 |
HSV
is the “color wheel” part of a complete color selector widget.
It allows to select a color by determining its HSV components in an
intuitive way. Moving the selection around the outer ring changes the hue,
and moving the selection point inside the inner triangle changes value and
saturation.
HSV
has been deprecated together with ColorSelection
, where
it was used.
Synopsis
- newtype HSV = HSV (ManagedPtr HSV)
- class (GObject o, IsDescendantOf HSV o) => IsHSV o
- toHSV :: (MonadIO m, IsHSV o) => o -> m HSV
- noHSV :: Maybe HSV
- hSVGetColor :: (HasCallStack, MonadIO m, IsHSV a) => a -> m (Double, Double, Double)
- hSVGetMetrics :: (HasCallStack, MonadIO m, IsHSV a) => a -> m (Int32, Int32)
- hSVIsAdjusting :: (HasCallStack, MonadIO m, IsHSV a) => a -> m Bool
- hSVNew :: (HasCallStack, MonadIO m) => m HSV
- hSVSetColor :: (HasCallStack, MonadIO m, IsHSV a) => a -> Double -> Double -> Double -> m ()
- hSVSetMetrics :: (HasCallStack, MonadIO m, IsHSV a) => a -> Int32 -> Int32 -> m ()
- hSVToRgb :: (HasCallStack, MonadIO m) => Double -> Double -> Double -> m (Double, Double, Double)
- type C_HSVChangedCallback = Ptr () -> Ptr () -> IO ()
- type HSVChangedCallback = IO ()
- afterHSVChanged :: (IsHSV a, MonadIO m) => a -> HSVChangedCallback -> m SignalHandlerId
- genClosure_HSVChanged :: MonadIO m => HSVChangedCallback -> m (GClosure C_HSVChangedCallback)
- mk_HSVChangedCallback :: C_HSVChangedCallback -> IO (FunPtr C_HSVChangedCallback)
- noHSVChangedCallback :: Maybe HSVChangedCallback
- onHSVChanged :: (IsHSV a, MonadIO m) => a -> HSVChangedCallback -> m SignalHandlerId
- wrap_HSVChangedCallback :: HSVChangedCallback -> C_HSVChangedCallback
- type C_HSVMoveCallback = Ptr () -> CUInt -> Ptr () -> IO ()
- type HSVMoveCallback = DirectionType -> IO ()
- afterHSVMove :: (IsHSV a, MonadIO m) => a -> HSVMoveCallback -> m SignalHandlerId
- genClosure_HSVMove :: MonadIO m => HSVMoveCallback -> m (GClosure C_HSVMoveCallback)
- mk_HSVMoveCallback :: C_HSVMoveCallback -> IO (FunPtr C_HSVMoveCallback)
- noHSVMoveCallback :: Maybe HSVMoveCallback
- onHSVMove :: (IsHSV a, MonadIO m) => a -> HSVMoveCallback -> m SignalHandlerId
- wrap_HSVMoveCallback :: HSVMoveCallback -> C_HSVMoveCallback
Exported types
Memory-managed wrapper type.
HSV (ManagedPtr HSV) |
Instances
GObject HSV Source # | |
Defined in GI.Gtk.Objects.HSV gobjectType :: IO GType # | |
HasParentTypes HSV Source # | |
Defined in GI.Gtk.Objects.HSV | |
type ParentTypes HSV Source # | |
Defined in GI.Gtk.Objects.HSV |
class (GObject o, IsDescendantOf HSV o) => IsHSV o Source #
Instances
(GObject o, IsDescendantOf HSV o) => IsHSV o Source # | |
Defined in GI.Gtk.Objects.HSV |
Methods
getColor
Queries the current color in an HSV color selector. Returned values will be in the [0.0, 1.0] range.
Since: 2.14
getMetrics
:: (HasCallStack, MonadIO m, IsHSV a) | |
=> a |
|
-> m (Int32, Int32) |
Queries the size and ring width of an HSV color selector.
Since: 2.14
isAdjusting
:: (HasCallStack, MonadIO m, IsHSV a) | |
=> a |
|
-> m Bool | Returns: |
An HSV color selector can be said to be adjusting if multiple rapid changes are being made to its value, for example, when the user is adjusting the value with the mouse. This function queries whether the HSV color selector is being adjusted or not.
Since: 2.14
new
:: (HasCallStack, MonadIO m) | |
=> m HSV | Returns: A newly-created HSV color selector. |
Creates a new HSV color selector.
Since: 2.14
setColor
:: (HasCallStack, MonadIO m, IsHSV a) | |
=> a |
|
-> Double |
|
-> Double |
|
-> Double |
|
-> m () |
Sets the current color in an HSV color selector. Color component values must be in the [0.0, 1.0] range.
Since: 2.14
setMetrics
:: (HasCallStack, MonadIO m, IsHSV a) | |
=> a |
|
-> Int32 |
|
-> Int32 |
|
-> m () |
Sets the size and ring width of an HSV color selector.
Since: 2.14
toRgb
:: (HasCallStack, MonadIO m) | |
=> Double |
|
-> Double |
|
-> Double |
|
-> m (Double, Double, Double) |
Converts a color from HSV space to RGB.
Input values must be in the [0.0, 1.0] range; output values will be in the same range.
Since: 2.14
Signals
changed
type C_HSVChangedCallback = Ptr () -> Ptr () -> IO () Source #
Type for the callback on the (unwrapped) C side.
type HSVChangedCallback = IO () Source #
No description available in the introspection data.
afterHSVChanged :: (IsHSV a, MonadIO m) => a -> HSVChangedCallback -> m SignalHandlerId Source #
Connect a signal handler for the “changed
” signal, to be run after the default handler.
When overloading is enabled, this is equivalent to
after
hSV #changed callback
genClosure_HSVChanged :: MonadIO m => HSVChangedCallback -> m (GClosure C_HSVChangedCallback) Source #
Wrap the callback into a GClosure
.
mk_HSVChangedCallback :: C_HSVChangedCallback -> IO (FunPtr C_HSVChangedCallback) Source #
Generate a function pointer callable from C code, from a C_HSVChangedCallback
.
noHSVChangedCallback :: Maybe HSVChangedCallback Source #
A convenience synonym for
.Nothing
:: Maybe
HSVChangedCallback
onHSVChanged :: (IsHSV a, MonadIO m) => a -> HSVChangedCallback -> m SignalHandlerId Source #
Connect a signal handler for the “changed
” signal, to be run before the default handler.
When overloading is enabled, this is equivalent to
on
hSV #changed callback
wrap_HSVChangedCallback :: HSVChangedCallback -> C_HSVChangedCallback Source #
Wrap a HSVChangedCallback
into a C_HSVChangedCallback
.
move
type C_HSVMoveCallback = Ptr () -> CUInt -> Ptr () -> IO () Source #
Type for the callback on the (unwrapped) C side.
type HSVMoveCallback = DirectionType -> IO () Source #
No description available in the introspection data.
afterHSVMove :: (IsHSV a, MonadIO m) => a -> HSVMoveCallback -> m SignalHandlerId Source #
Connect a signal handler for the “move
” signal, to be run after the default handler.
When overloading is enabled, this is equivalent to
after
hSV #move callback
genClosure_HSVMove :: MonadIO m => HSVMoveCallback -> m (GClosure C_HSVMoveCallback) Source #
Wrap the callback into a GClosure
.
mk_HSVMoveCallback :: C_HSVMoveCallback -> IO (FunPtr C_HSVMoveCallback) Source #
Generate a function pointer callable from C code, from a C_HSVMoveCallback
.
noHSVMoveCallback :: Maybe HSVMoveCallback Source #
A convenience synonym for
.Nothing
:: Maybe
HSVMoveCallback
onHSVMove :: (IsHSV a, MonadIO m) => a -> HSVMoveCallback -> m SignalHandlerId Source #
Connect a signal handler for the “move
” signal, to be run before the default handler.
When overloading is enabled, this is equivalent to
on
hSV #move callback
wrap_HSVMoveCallback :: HSVMoveCallback -> C_HSVMoveCallback Source #
Wrap a HSVMoveCallback
into a C_HSVMoveCallback
.