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 |
- Exported types
- Methods
- getCurrentAlpha
- getCurrentColor
- getCurrentRgba
- getHasOpacityControl
- getHasPalette
- getPreviousAlpha
- getPreviousColor
- getPreviousRgba
- isAdjusting
- new
- paletteFromString
- paletteToString
- setCurrentAlpha
- setCurrentColor
- setCurrentRgba
- setHasOpacityControl
- setHasPalette
- setPreviousAlpha
- setPreviousColor
- setPreviousRgba
- Properties
- Signals
No description available in the introspection data.
Synopsis
- newtype ColorSelection = ColorSelection (ManagedPtr ColorSelection)
- class (GObject o, IsDescendantOf ColorSelection o) => IsColorSelection o
- toColorSelection :: (MonadIO m, IsColorSelection o) => o -> m ColorSelection
- colorSelectionGetCurrentAlpha :: (HasCallStack, MonadIO m, IsColorSelection a) => a -> m Word16
- colorSelectionGetCurrentColor :: (HasCallStack, MonadIO m, IsColorSelection a) => a -> m Color
- colorSelectionGetCurrentRgba :: (HasCallStack, MonadIO m, IsColorSelection a) => a -> m RGBA
- colorSelectionGetHasOpacityControl :: (HasCallStack, MonadIO m, IsColorSelection a) => a -> m Bool
- colorSelectionGetHasPalette :: (HasCallStack, MonadIO m, IsColorSelection a) => a -> m Bool
- colorSelectionGetPreviousAlpha :: (HasCallStack, MonadIO m, IsColorSelection a) => a -> m Word16
- colorSelectionGetPreviousColor :: (HasCallStack, MonadIO m, IsColorSelection a) => a -> m Color
- colorSelectionGetPreviousRgba :: (HasCallStack, MonadIO m, IsColorSelection a) => a -> m RGBA
- colorSelectionIsAdjusting :: (HasCallStack, MonadIO m, IsColorSelection a) => a -> m Bool
- colorSelectionNew :: (HasCallStack, MonadIO m) => m ColorSelection
- colorSelectionPaletteFromString :: (HasCallStack, MonadIO m) => Text -> m (Bool, [Color])
- colorSelectionPaletteToString :: (HasCallStack, MonadIO m) => [Color] -> m Text
- colorSelectionSetCurrentAlpha :: (HasCallStack, MonadIO m, IsColorSelection a) => a -> Word16 -> m ()
- colorSelectionSetCurrentColor :: (HasCallStack, MonadIO m, IsColorSelection a) => a -> Color -> m ()
- colorSelectionSetCurrentRgba :: (HasCallStack, MonadIO m, IsColorSelection a) => a -> RGBA -> m ()
- colorSelectionSetHasOpacityControl :: (HasCallStack, MonadIO m, IsColorSelection a) => a -> Bool -> m ()
- colorSelectionSetHasPalette :: (HasCallStack, MonadIO m, IsColorSelection a) => a -> Bool -> m ()
- colorSelectionSetPreviousAlpha :: (HasCallStack, MonadIO m, IsColorSelection a) => a -> Word16 -> m ()
- colorSelectionSetPreviousColor :: (HasCallStack, MonadIO m, IsColorSelection a) => a -> Color -> m ()
- colorSelectionSetPreviousRgba :: (HasCallStack, MonadIO m, IsColorSelection a) => a -> RGBA -> m ()
- constructColorSelectionCurrentAlpha :: (IsColorSelection o, MonadIO m) => Word32 -> m (GValueConstruct o)
- getColorSelectionCurrentAlpha :: (MonadIO m, IsColorSelection o) => o -> m Word32
- setColorSelectionCurrentAlpha :: (MonadIO m, IsColorSelection o) => o -> Word32 -> m ()
- constructColorSelectionCurrentColor :: (IsColorSelection o, MonadIO m) => Color -> m (GValueConstruct o)
- getColorSelectionCurrentColor :: (MonadIO m, IsColorSelection o) => o -> m (Maybe Color)
- setColorSelectionCurrentColor :: (MonadIO m, IsColorSelection o) => o -> Color -> m ()
- constructColorSelectionCurrentRgba :: (IsColorSelection o, MonadIO m) => RGBA -> m (GValueConstruct o)
- getColorSelectionCurrentRgba :: (MonadIO m, IsColorSelection o) => o -> m (Maybe RGBA)
- setColorSelectionCurrentRgba :: (MonadIO m, IsColorSelection o) => o -> RGBA -> m ()
- constructColorSelectionHasOpacityControl :: (IsColorSelection o, MonadIO m) => Bool -> m (GValueConstruct o)
- getColorSelectionHasOpacityControl :: (MonadIO m, IsColorSelection o) => o -> m Bool
- setColorSelectionHasOpacityControl :: (MonadIO m, IsColorSelection o) => o -> Bool -> m ()
- constructColorSelectionHasPalette :: (IsColorSelection o, MonadIO m) => Bool -> m (GValueConstruct o)
- getColorSelectionHasPalette :: (MonadIO m, IsColorSelection o) => o -> m Bool
- setColorSelectionHasPalette :: (MonadIO m, IsColorSelection o) => o -> Bool -> m ()
- type ColorSelectionColorChangedCallback = IO ()
- afterColorSelectionColorChanged :: (IsColorSelection a, MonadIO m) => a -> ((?self :: a) => ColorSelectionColorChangedCallback) -> m SignalHandlerId
- onColorSelectionColorChanged :: (IsColorSelection a, MonadIO m) => a -> ((?self :: a) => ColorSelectionColorChangedCallback) -> m SignalHandlerId
Exported types
newtype ColorSelection Source #
Memory-managed wrapper type.
ColorSelection (ManagedPtr ColorSelection) |
Instances
class (GObject o, IsDescendantOf ColorSelection o) => IsColorSelection o Source #
Type class for types which can be safely cast to ColorSelection
, for instance with toColorSelection
.
Instances
(GObject o, IsDescendantOf ColorSelection o) => IsColorSelection o Source # | |
Defined in GI.Gtk.Objects.ColorSelection |
toColorSelection :: (MonadIO m, IsColorSelection o) => o -> m ColorSelection Source #
Cast to ColorSelection
, 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
activate, add, addAccelerator, addChild, addDeviceEvents, addEvents, addMnemonicLabel, addTickCallback, bindProperty, bindPropertyFull, canActivateAccel, checkResize, childFocus, childGetProperty, childNotify, childNotifyByPspec, childSetProperty, childType, 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, forall, forceFloating, foreach, 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, packEnd, packStart, parserFinished, path, propagateDraw, queryChildPacking, queueAllocate, queueComputeExpand, queueDraw, queueDrawArea, queueDrawRegion, queueResize, queueResizeNoRedraw, realize, ref, refSink, regionIntersect, registerWindow, remove, removeAccelerator, removeMnemonicLabel, removeTickCallback, renderIcon, renderIconPixbuf, reorderChild, reparent, resetRcStyles, resetStyle, resizeChildren, runDispose, sendExpose, sendFocusChange, shapeCombineRegion, show, showAll, showNow, sizeAllocate, sizeAllocateWithBaseline, sizeRequest, stealData, stealQdata, styleAttach, styleGetProperty, thawChildNotify, thawNotify, translateCoordinates, triggerTooltipQuery, unmap, unparent, unrealize, unref, unregisterWindow, unsetFocusChain, unsetStateFlags, watchClosure.
Getters
getAccessible, getActionGroup, getAllocatedBaseline, getAllocatedHeight, getAllocatedSize, getAllocatedWidth, getAllocation, getAncestor, getAppPaintable, getBaselinePosition, getBorderWidth, getCanDefault, getCanFocus, getCenterWidget, getChildRequisition, getChildVisible, getChildren, getClip, getClipboard, getCompositeName, getCurrentAlpha, getCurrentColor, getCurrentRgba, getData, getDeviceEnabled, getDeviceEvents, getDirection, getDisplay, getDoubleBuffered, getEvents, getFocusChain, getFocusChild, getFocusHadjustment, getFocusOnClick, getFocusVadjustment, getFontMap, getFontOptions, getFrameClock, getHalign, getHasOpacityControl, getHasPalette, getHasTooltip, getHasWindow, getHexpand, getHexpandSet, getHomogeneous, getInternalChild, getMapped, getMarginBottom, getMarginEnd, getMarginLeft, getMarginRight, getMarginStart, getMarginTop, getModifierMask, getModifierStyle, getName, getNoShowAll, getOpacity, getOrientation, getPangoContext, getParent, getParentWindow, getPath, getPathForChild, getPointer, getPreferredHeight, getPreferredHeightAndBaselineForWidth, getPreferredHeightForWidth, getPreferredSize, getPreferredWidth, getPreferredWidthForHeight, getPreviousAlpha, getPreviousColor, getPreviousRgba, getProperty, getQdata, getRealized, getReceivesDefault, getRequestMode, getRequisition, getResizeMode, getRootWindow, getScaleFactor, getScreen, getSensitive, getSettings, getSizeRequest, getSpacing, getState, getStateFlags, getStyle, getStyleContext, getSupportMultidevice, getTemplateChild, getTooltipMarkup, getTooltipText, getTooltipWindow, getToplevel, getValign, getValignWithBaseline, getVexpand, getVexpandSet, getVisible, getVisual, getWindow.
Setters
setAccelPath, setAllocation, setAppPaintable, setBaselinePosition, setBorderWidth, setBuildableProperty, setCanDefault, setCanFocus, setCenterWidget, setChildPacking, setChildVisible, setClip, setCompositeName, setCurrentAlpha, setCurrentColor, setCurrentRgba, setData, setDataFull, setDeviceEnabled, setDeviceEvents, setDirection, setDoubleBuffered, setEvents, setFocusChain, setFocusChild, setFocusHadjustment, setFocusOnClick, setFocusVadjustment, setFontMap, setFontOptions, setHalign, setHasOpacityControl, setHasPalette, setHasTooltip, setHasWindow, setHexpand, setHexpandSet, setHomogeneous, setMapped, setMarginBottom, setMarginEnd, setMarginLeft, setMarginRight, setMarginStart, setMarginTop, setName, setNoShowAll, setOpacity, setOrientation, setParent, setParentWindow, setPreviousAlpha, setPreviousColor, setPreviousRgba, setProperty, setRealized, setReallocateRedraws, setReceivesDefault, setRedrawOnAllocate, setResizeMode, setSensitive, setSizeRequest, setSpacing, setState, setStateFlags, setStyle, setSupportMultidevice, setTooltipMarkup, setTooltipText, setTooltipWindow, setValign, setVexpand, setVexpandSet, setVisible, setVisual, setWindow.
getCurrentAlpha
colorSelectionGetCurrentAlpha Source #
:: (HasCallStack, MonadIO m, IsColorSelection a) | |
=> a |
|
-> m Word16 | Returns: an integer between 0 and 65535 |
Returns the current alpha value.
getCurrentColor
colorSelectionGetCurrentColor Source #
:: (HasCallStack, MonadIO m, IsColorSelection a) | |
=> a |
|
-> m Color |
Deprecated: (Since version 3.4)Use colorSelectionGetCurrentRgba
instead.
Sets color
to be the current color in the GtkColorSelection widget.
getCurrentRgba
colorSelectionGetCurrentRgba Source #
:: (HasCallStack, MonadIO m, IsColorSelection a) | |
=> a |
|
-> m RGBA |
Sets rgba
to be the current color in the GtkColorSelection widget.
Since: 3.0
getHasOpacityControl
colorSelectionGetHasOpacityControl Source #
:: (HasCallStack, MonadIO m, IsColorSelection a) | |
=> a |
|
-> m Bool | Returns: |
Determines whether the colorsel has an opacity control.
getHasPalette
colorSelectionGetHasPalette Source #
:: (HasCallStack, MonadIO m, IsColorSelection a) | |
=> a |
|
-> m Bool | Returns: |
Determines whether the color selector has a color palette.
getPreviousAlpha
colorSelectionGetPreviousAlpha Source #
:: (HasCallStack, MonadIO m, IsColorSelection a) | |
=> a |
|
-> m Word16 | Returns: an integer between 0 and 65535 |
Returns the previous alpha value.
getPreviousColor
colorSelectionGetPreviousColor Source #
:: (HasCallStack, MonadIO m, IsColorSelection a) | |
=> a |
|
-> m Color |
Deprecated: (Since version 3.4)Use colorSelectionGetPreviousRgba
instead.
Fills color
in with the original color value.
getPreviousRgba
colorSelectionGetPreviousRgba Source #
:: (HasCallStack, MonadIO m, IsColorSelection a) | |
=> a |
|
-> m RGBA |
Fills rgba
in with the original color value.
Since: 3.0
isAdjusting
colorSelectionIsAdjusting Source #
:: (HasCallStack, MonadIO m, IsColorSelection a) | |
=> a |
|
-> m Bool | Returns: |
Gets the current state of the colorsel
.
new
:: (HasCallStack, MonadIO m) | |
=> m ColorSelection | Returns: a new |
Creates a new GtkColorSelection.
paletteFromString
colorSelectionPaletteFromString Source #
:: (HasCallStack, MonadIO m) | |
=> Text |
|
-> m (Bool, [Color]) | Returns: |
Parses a color palette string; the string is a colon-separated
list of color names readable by colorParse
.
paletteToString
colorSelectionPaletteToString Source #
:: (HasCallStack, MonadIO m) | |
=> [Color] |
|
-> m Text | Returns: allocated string encoding the palette |
Encodes a palette as a string, useful for persistent storage.
setCurrentAlpha
colorSelectionSetCurrentAlpha Source #
:: (HasCallStack, MonadIO m, IsColorSelection a) | |
=> a |
|
-> Word16 |
|
-> m () |
Sets the current opacity to be alpha
.
The first time this is called, it will also set
the original opacity to be alpha
too.
setCurrentColor
colorSelectionSetCurrentColor Source #
:: (HasCallStack, MonadIO m, IsColorSelection a) | |
=> a |
|
-> Color |
|
-> m () |
Deprecated: (Since version 3.4)Use colorSelectionSetCurrentRgba
instead.
Sets the current color to be color
.
The first time this is called, it will also set
the original color to be color
too.
setCurrentRgba
colorSelectionSetCurrentRgba Source #
:: (HasCallStack, MonadIO m, IsColorSelection a) | |
=> a |
|
-> RGBA |
|
-> m () |
Sets the current color to be rgba
.
The first time this is called, it will also set
the original color to be rgba
too.
Since: 3.0
setHasOpacityControl
colorSelectionSetHasOpacityControl Source #
:: (HasCallStack, MonadIO m, IsColorSelection a) | |
=> a |
|
-> Bool |
|
-> m () |
Sets the colorsel
to use or not use opacity.
setHasPalette
colorSelectionSetHasPalette Source #
:: (HasCallStack, MonadIO m, IsColorSelection a) | |
=> a |
|
-> Bool |
|
-> m () |
Shows and hides the palette based upon the value of hasPalette
.
setPreviousAlpha
colorSelectionSetPreviousAlpha Source #
:: (HasCallStack, MonadIO m, IsColorSelection a) | |
=> a |
|
-> Word16 |
|
-> m () |
Sets the “previous” alpha to be alpha
.
This function should be called with some hesitations, as it might seem confusing to have that alpha change.
setPreviousColor
colorSelectionSetPreviousColor Source #
:: (HasCallStack, MonadIO m, IsColorSelection a) | |
=> a |
|
-> Color |
|
-> m () |
Deprecated: (Since version 3.4)Use colorSelectionSetPreviousRgba
instead.
Sets the “previous” color to be color
.
This function should be called with some hesitations,
as it might seem confusing to have that color change.
Calling colorSelectionSetCurrentColor
will also
set this color the first time it is called.
setPreviousRgba
colorSelectionSetPreviousRgba Source #
:: (HasCallStack, MonadIO m, IsColorSelection a) | |
=> a |
|
-> RGBA |
|
-> m () |
Sets the “previous” color to be rgba
.
This function should be called with some hesitations,
as it might seem confusing to have that color change.
Calling colorSelectionSetCurrentRgba
will also
set this color the first time it is called.
Since: 3.0
Properties
currentAlpha
No description available in the introspection data.
constructColorSelectionCurrentAlpha :: (IsColorSelection o, MonadIO m) => Word32 -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “current-alpha
” property. This is rarely needed directly, but it is used by new
.
getColorSelectionCurrentAlpha :: (MonadIO m, IsColorSelection o) => o -> m Word32 Source #
Get the value of the “current-alpha
” property.
When overloading is enabled, this is equivalent to
get
colorSelection #currentAlpha
setColorSelectionCurrentAlpha :: (MonadIO m, IsColorSelection o) => o -> Word32 -> m () Source #
Set the value of the “current-alpha
” property.
When overloading is enabled, this is equivalent to
set
colorSelection [ #currentAlpha:=
value ]
currentColor
The current GdkColor color.
constructColorSelectionCurrentColor :: (IsColorSelection o, MonadIO m) => Color -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “current-color
” property. This is rarely needed directly, but it is used by new
.
getColorSelectionCurrentColor :: (MonadIO m, IsColorSelection o) => o -> m (Maybe Color) Source #
Get the value of the “current-color
” property.
When overloading is enabled, this is equivalent to
get
colorSelection #currentColor
setColorSelectionCurrentColor :: (MonadIO m, IsColorSelection o) => o -> Color -> m () Source #
Set the value of the “current-color
” property.
When overloading is enabled, this is equivalent to
set
colorSelection [ #currentColor:=
value ]
currentRgba
The current RGBA color.
Since: 3.0
constructColorSelectionCurrentRgba :: (IsColorSelection o, MonadIO m) => RGBA -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “current-rgba
” property. This is rarely needed directly, but it is used by new
.
getColorSelectionCurrentRgba :: (MonadIO m, IsColorSelection o) => o -> m (Maybe RGBA) Source #
Get the value of the “current-rgba
” property.
When overloading is enabled, this is equivalent to
get
colorSelection #currentRgba
setColorSelectionCurrentRgba :: (MonadIO m, IsColorSelection o) => o -> RGBA -> m () Source #
Set the value of the “current-rgba
” property.
When overloading is enabled, this is equivalent to
set
colorSelection [ #currentRgba:=
value ]
hasOpacityControl
No description available in the introspection data.
constructColorSelectionHasOpacityControl :: (IsColorSelection o, MonadIO m) => Bool -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “has-opacity-control
” property. This is rarely needed directly, but it is used by new
.
getColorSelectionHasOpacityControl :: (MonadIO m, IsColorSelection o) => o -> m Bool Source #
Get the value of the “has-opacity-control
” property.
When overloading is enabled, this is equivalent to
get
colorSelection #hasOpacityControl
setColorSelectionHasOpacityControl :: (MonadIO m, IsColorSelection o) => o -> Bool -> m () Source #
Set the value of the “has-opacity-control
” property.
When overloading is enabled, this is equivalent to
set
colorSelection [ #hasOpacityControl:=
value ]
hasPalette
No description available in the introspection data.
constructColorSelectionHasPalette :: (IsColorSelection o, MonadIO m) => Bool -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “has-palette
” property. This is rarely needed directly, but it is used by new
.
getColorSelectionHasPalette :: (MonadIO m, IsColorSelection o) => o -> m Bool Source #
Get the value of the “has-palette
” property.
When overloading is enabled, this is equivalent to
get
colorSelection #hasPalette
setColorSelectionHasPalette :: (MonadIO m, IsColorSelection o) => o -> Bool -> m () Source #
Set the value of the “has-palette
” property.
When overloading is enabled, this is equivalent to
set
colorSelection [ #hasPalette:=
value ]
Signals
colorChanged
type ColorSelectionColorChangedCallback = IO () Source #
This signal is emitted when the color changes in the ColorSelection
according to its update policy.
afterColorSelectionColorChanged :: (IsColorSelection a, MonadIO m) => a -> ((?self :: a) => ColorSelectionColorChangedCallback) -> m SignalHandlerId Source #
Connect a signal handler for the colorChanged signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
colorSelection #colorChanged 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.
onColorSelectionColorChanged :: (IsColorSelection a, MonadIO m) => a -> ((?self :: a) => ColorSelectionColorChangedCallback) -> m SignalHandlerId Source #
Connect a signal handler for the colorChanged signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
colorSelection #colorChanged callback