gi-gtk-3.0.26: Gtk bindings

CopyrightWill Thompson Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria (garetxe@gmail.com)
Safe HaskellNone
LanguageHaskell2010

GI.Gtk.Objects.HSV

Contents

Description

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

Exported types

newtype HSV Source #

Memory-managed wrapper type.

Constructors

HSV (ManagedPtr HSV) 
Instances
GObject HSV Source # 
Instance details

Defined in GI.Gtk.Objects.HSV

Methods

gobjectType :: HSV -> IO GType #

IsImplementorIface HSV Source # 
Instance details

Defined in GI.Gtk.Objects.HSV

IsObject HSV Source # 
Instance details

Defined in GI.Gtk.Objects.HSV

IsBuildable HSV Source # 
Instance details

Defined in GI.Gtk.Objects.HSV

IsWidget HSV Source # 
Instance details

Defined in GI.Gtk.Objects.HSV

IsHSV HSV Source # 
Instance details

Defined in GI.Gtk.Objects.HSV

class GObject o => IsHSV o Source #

Type class for types which can be safely cast to HSV, for instance with toHSV.

Instances
(GObject a, (UnknownAncestorError HSV a :: Constraint)) => IsHSV a Source # 
Instance details

Defined in GI.Gtk.Objects.HSV

IsHSV HSV Source # 
Instance details

Defined in GI.Gtk.Objects.HSV

toHSV :: (MonadIO m, IsHSV o) => o -> m HSV Source #

Cast to HSV, for types for which this is known to be safe. For general casts, use castTo.

noHSV :: Maybe HSV Source #

A convenience alias for Nothing :: Maybe HSV.

Methods

getColor

hSVGetColor Source #

Arguments

:: (HasCallStack, MonadIO m, IsHSV a) 
=> a

hsv: An HSV color selector

-> m (Double, Double, Double) 

Queries the current color in an HSV color selector. Returned values will be in the [0.0, 1.0] range.

Since: 2.14

getMetrics

hSVGetMetrics Source #

Arguments

:: (HasCallStack, MonadIO m, IsHSV a) 
=> a

hsv: An HSV color selector

-> m (Int32, Int32) 

Queries the size and ring width of an HSV color selector.

Since: 2.14

isAdjusting

hSVIsAdjusting Source #

Arguments

:: (HasCallStack, MonadIO m, IsHSV a) 
=> a

hsv: A HSV

-> m Bool

Returns: True if clients can ignore changes to the color value, since they may be transitory, or False if they should consider the color value status to be final.

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

hSVNew Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> m HSV

Returns: A newly-created HSV color selector.

Creates a new HSV color selector.

Since: 2.14

setColor

hSVSetColor Source #

Arguments

:: (HasCallStack, MonadIO m, IsHSV a) 
=> a

hsv: An HSV color selector

-> Double

h: Hue

-> Double

s: Saturation

-> Double

v: Value

-> 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

hSVSetMetrics Source #

Arguments

:: (HasCallStack, MonadIO m, IsHSV a) 
=> a

hsv: An HSV color selector

-> Int32

size: Diameter for the hue ring

-> Int32

ringWidth: Width of the hue ring

-> m () 

Sets the size and ring width of an HSV color selector.

Since: 2.14

toRgb

hSVToRgb Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Double

h: Hue

-> Double

s: Saturation

-> Double

v: Value

-> 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

mk_HSVChangedCallback :: C_HSVChangedCallback -> IO (FunPtr C_HSVChangedCallback) Source #

Generate a function pointer callable from C code, from a C_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

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

mk_HSVMoveCallback :: C_HSVMoveCallback -> IO (FunPtr C_HSVMoveCallback) Source #

Generate a function pointer callable from C code, from a C_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