Copyright | Will Thompson and Iñaki García Etxebarria |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | Safe-Inferred |
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
- 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 HSVChangedCallback = IO ()
- afterHSVChanged :: (IsHSV a, MonadIO m) => a -> ((?self :: a) => HSVChangedCallback) -> m SignalHandlerId
- onHSVChanged :: (IsHSV a, MonadIO m) => a -> ((?self :: a) => HSVChangedCallback) -> m SignalHandlerId
- type HSVMoveCallback = DirectionType -> IO ()
- afterHSVMove :: (IsHSV a, MonadIO m) => a -> ((?self :: a) => HSVMoveCallback) -> m SignalHandlerId
- onHSVMove :: (IsHSV a, MonadIO m) => a -> ((?self :: a) => HSVMoveCallback) -> m SignalHandlerId
Exported types
Memory-managed wrapper type.
Instances
Eq HSV Source # | |
GObject HSV Source # | |
Defined in GI.Gtk.Objects.HSV | |
ManagedPtrNewtype HSV Source # | |
Defined in GI.Gtk.Objects.HSV toManagedPtr :: HSV -> ManagedPtr HSV | |
TypedObject HSV Source # | |
Defined in GI.Gtk.Objects.HSV | |
HasParentTypes HSV Source # | |
Defined in GI.Gtk.Objects.HSV | |
IsGValue (Maybe HSV) Source # | Convert |
Defined in GI.Gtk.Objects.HSV gvalueGType_ :: IO GType gvalueSet_ :: Ptr GValue -> Maybe HSV -> IO () gvalueGet_ :: Ptr GValue -> IO (Maybe 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
Click to display all available methods, including inherited ones
Methods
activate, addAccelerator, addChild, addDeviceEvents, addEvents, addMnemonicLabel, addTickCallback, bindProperty, bindPropertyFull, canActivateAccel, childFocus, childNotify, classPath, computeExpand, constructChild, createPangoContext, createPangoLayout, customFinished, customTagEnd, customTagStart, destroy, destroyed, deviceIsShadowed, dragBegin, dragBeginWithCoordinates, dragCheckThreshold, dragDestAddImageTargets, dragDestAddTextTargets, dragDestAddUriTargets, dragDestFindTarget, dragDestGetTargetList, dragDestGetTrackMotion, dragDestSet, dragDestSetProxy, dragDestSetTargetList, dragDestSetTrackMotion, dragDestUnset, dragGetData, dragHighlight, dragSourceAddImageTargets, dragSourceAddTextTargets, dragSourceAddUriTargets, dragSourceGetTargetList, dragSourceSet, dragSourceSetIconGicon, dragSourceSetIconName, dragSourceSetIconPixbuf, dragSourceSetIconStock, dragSourceSetTargetList, dragSourceUnset, dragUnhighlight, draw, ensureStyle, errorBell, event, forceFloating, freezeChildNotify, freezeNotify, getv, grabAdd, grabDefault, grabFocus, grabRemove, hasDefault, hasFocus, hasGrab, hasRcStyle, hasScreen, hasVisibleFocus, hide, hideOnDelete, inDestruction, initTemplate, inputShapeCombineRegion, insertActionGroup, intersect, isAdjusting, isAncestor, isComposited, isDrawable, isFloating, isFocus, isSensitive, isToplevel, isVisible, keynavFailed, listAccelClosures, listActionPrefixes, listMnemonicLabels, map, mnemonicActivate, modifyBase, modifyBg, modifyCursor, modifyFg, modifyFont, modifyStyle, modifyText, notify, notifyByPspec, overrideBackgroundColor, overrideColor, overrideCursor, overrideFont, overrideSymbolicColor, parserFinished, path, queueAllocate, queueComputeExpand, queueDraw, queueDrawArea, queueDrawRegion, queueResize, queueResizeNoRedraw, realize, ref, refSink, regionIntersect, registerWindow, removeAccelerator, removeMnemonicLabel, removeTickCallback, renderIcon, renderIconPixbuf, reparent, resetRcStyles, resetStyle, runDispose, sendExpose, sendFocusChange, shapeCombineRegion, show, showAll, showNow, sizeAllocate, sizeAllocateWithBaseline, sizeRequest, stealData, stealQdata, styleAttach, styleGetProperty, thawChildNotify, thawNotify, translateCoordinates, triggerTooltipQuery, unmap, unparent, unrealize, unref, unregisterWindow, unsetStateFlags, watchClosure.
Getters
getAccessible, getActionGroup, getAllocatedBaseline, getAllocatedHeight, getAllocatedSize, getAllocatedWidth, getAllocation, getAncestor, getAppPaintable, getCanDefault, getCanFocus, getChildRequisition, getChildVisible, getClip, getClipboard, getColor, getCompositeName, getData, getDeviceEnabled, getDeviceEvents, getDirection, getDisplay, getDoubleBuffered, getEvents, getFocusOnClick, getFontMap, getFontOptions, getFrameClock, getHalign, getHasTooltip, getHasWindow, getHexpand, getHexpandSet, getInternalChild, getMapped, getMarginBottom, getMarginEnd, getMarginLeft, getMarginRight, getMarginStart, getMarginTop, getMetrics, getModifierMask, getModifierStyle, getName, getNoShowAll, getOpacity, getPangoContext, getParent, getParentWindow, getPath, getPointer, getPreferredHeight, getPreferredHeightAndBaselineForWidth, getPreferredHeightForWidth, getPreferredSize, getPreferredWidth, getPreferredWidthForHeight, getProperty, getQdata, getRealized, getReceivesDefault, getRequestMode, getRequisition, getRootWindow, getScaleFactor, getScreen, getSensitive, getSettings, getSizeRequest, getState, getStateFlags, getStyle, getStyleContext, getSupportMultidevice, getTemplateChild, getTooltipMarkup, getTooltipText, getTooltipWindow, getToplevel, getValign, getValignWithBaseline, getVexpand, getVexpandSet, getVisible, getVisual, getWindow.
Setters
setAccelPath, setAllocation, setAppPaintable, setBuildableProperty, setCanDefault, setCanFocus, setChildVisible, setClip, setColor, setCompositeName, setData, setDataFull, setDeviceEnabled, setDeviceEvents, setDirection, setDoubleBuffered, setEvents, setFocusOnClick, setFontMap, setFontOptions, setHalign, setHasTooltip, setHasWindow, setHexpand, setHexpandSet, setMapped, setMarginBottom, setMarginEnd, setMarginLeft, setMarginRight, setMarginStart, setMarginTop, setMetrics, setName, setNoShowAll, setOpacity, setParent, setParentWindow, setProperty, setRealized, setReceivesDefault, setRedrawOnAllocate, setSensitive, setSizeRequest, setState, setStateFlags, setStyle, setSupportMultidevice, setTooltipMarkup, setTooltipText, setTooltipWindow, setValign, setVexpand, setVexpandSet, setVisible, setVisual, setWindow.
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 HSVChangedCallback = IO () Source #
No description available in the introspection data.
afterHSVChanged :: (IsHSV a, MonadIO m) => a -> ((?self :: 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
By default the object invoking the signal is not passed to the callback.
If you need to access it, you can use the implit ?self
parameter.
Note that this requires activating the ImplicitParams
GHC extension.
onHSVChanged :: (IsHSV a, MonadIO m) => a -> ((?self :: 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
move
type HSVMoveCallback = DirectionType -> IO () Source #
No description available in the introspection data.
afterHSVMove :: (IsHSV a, MonadIO m) => a -> ((?self :: 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
By default the object invoking the signal is not passed to the callback.
If you need to access it, you can use the implit ?self
parameter.
Note that this requires activating the ImplicitParams
GHC extension.
onHSVMove :: (IsHSV a, MonadIO m) => a -> ((?self :: 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