gi-clutter-1.0.5: clutter GObject bindings
CopyrightWill Thompson and Iñaki García Etxebarria
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellSafe-Inferred
LanguageHaskell2010

GI.Clutter.Objects.SnapConstraint

Description

SnapConstraint is an opaque structure whose members cannot be directly accesses

Since: 1.6

Synopsis

Exported types

newtype SnapConstraint Source #

Memory-managed wrapper type.

Constructors

SnapConstraint (ManagedPtr SnapConstraint) 

Instances

Instances details
Eq SnapConstraint Source # 
Instance details

Defined in GI.Clutter.Objects.SnapConstraint

GObject SnapConstraint Source # 
Instance details

Defined in GI.Clutter.Objects.SnapConstraint

ManagedPtrNewtype SnapConstraint Source # 
Instance details

Defined in GI.Clutter.Objects.SnapConstraint

TypedObject SnapConstraint Source # 
Instance details

Defined in GI.Clutter.Objects.SnapConstraint

Methods

glibType :: IO GType

HasParentTypes SnapConstraint Source # 
Instance details

Defined in GI.Clutter.Objects.SnapConstraint

IsGValue (Maybe SnapConstraint) Source #

Convert SnapConstraint to and from GValue. See toGValue and fromGValue.

Instance details

Defined in GI.Clutter.Objects.SnapConstraint

Methods

gvalueGType_ :: IO GType

gvalueSet_ :: Ptr GValue -> Maybe SnapConstraint -> IO ()

gvalueGet_ :: Ptr GValue -> IO (Maybe SnapConstraint)

type ParentTypes SnapConstraint Source # 
Instance details

Defined in GI.Clutter.Objects.SnapConstraint

type ParentTypes SnapConstraint = '[Constraint, ActorMeta, Object]

class (GObject o, IsDescendantOf SnapConstraint o) => IsSnapConstraint o Source #

Type class for types which can be safely cast to SnapConstraint, for instance with toSnapConstraint.

Instances

Instances details
(GObject o, IsDescendantOf SnapConstraint o) => IsSnapConstraint o Source # 
Instance details

Defined in GI.Clutter.Objects.SnapConstraint

toSnapConstraint :: (MonadIO m, IsSnapConstraint o) => o -> m SnapConstraint Source #

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

Methods

getEdges

snapConstraintGetEdges Source #

Arguments

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

constraint: a SnapConstraint

-> m (SnapEdge, SnapEdge) 

Retrieves the edges used by the constraint

Since: 1.6

getOffset

snapConstraintGetOffset Source #

Arguments

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

constraint: a SnapConstraint

-> m Float

Returns: the offset, in pixels

Retrieves the offset set using snapConstraintSetOffset

Since: 1.6

getSource

snapConstraintGetSource Source #

Arguments

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

constraint: a SnapConstraint

-> m Actor

Returns: a pointer to the source actor

Retrieves the Actor set using snapConstraintSetSource

Since: 1.6

new

snapConstraintNew Source #

Arguments

:: (HasCallStack, MonadIO m, IsActor a) 
=> Maybe a

source: the Actor to use as the source of the constraint, or Nothing

-> SnapEdge

fromEdge: the edge of the actor to use in the constraint

-> SnapEdge

toEdge: the edge of source to use in the constraint

-> Float

offset: the offset to apply to the constraint, in pixels

-> m SnapConstraint

Returns: the newly created SnapConstraint

Creates a new SnapConstraint that will snap a Actor to the edge of source, with the given offset.

Since: 1.6

setEdges

snapConstraintSetEdges Source #

Arguments

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

constraint: a SnapConstraint

-> SnapEdge

fromEdge: the edge on the actor

-> SnapEdge

toEdge: the edge on the source

-> m () 

Sets the edges to be used by the constraint

The fromEdge is the edge on the Actor to which constraint has been added. The toEdge is the edge of the Actor inside the SnapConstraint:source property.

Since: 1.6

setOffset

snapConstraintSetOffset Source #

Arguments

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

constraint: a SnapConstraint

-> Float

offset: the offset to apply, in pixels

-> m () 

Sets the offset to be applied to the constraint

Since: 1.6

setSource

snapConstraintSetSource Source #

Arguments

:: (HasCallStack, MonadIO m, IsSnapConstraint a, IsActor b) 
=> a

constraint: a SnapConstraint

-> Maybe b

source: a Actor, or Nothing to unset the source

-> m () 

Sets the source Actor for the constraint

Since: 1.6

Properties

fromEdge

The edge of the Actor that should be snapped

Since: 1.6

constructSnapConstraintFromEdge :: (IsSnapConstraint o, MonadIO m) => SnapEdge -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “from-edge” property. This is rarely needed directly, but it is used by new.

getSnapConstraintFromEdge :: (MonadIO m, IsSnapConstraint o) => o -> m SnapEdge Source #

Get the value of the “from-edge” property. When overloading is enabled, this is equivalent to

get snapConstraint #fromEdge

setSnapConstraintFromEdge :: (MonadIO m, IsSnapConstraint o) => o -> SnapEdge -> m () Source #

Set the value of the “from-edge” property. When overloading is enabled, this is equivalent to

set snapConstraint [ #fromEdge := value ]

offset

The offset, in pixels, between SnapConstraint:fromEdge and SnapConstraint:toEdge

Since: 1.6

constructSnapConstraintOffset :: (IsSnapConstraint o, MonadIO m) => Float -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “offset” property. This is rarely needed directly, but it is used by new.

getSnapConstraintOffset :: (MonadIO m, IsSnapConstraint o) => o -> m Float Source #

Get the value of the “offset” property. When overloading is enabled, this is equivalent to

get snapConstraint #offset

setSnapConstraintOffset :: (MonadIO m, IsSnapConstraint o) => o -> Float -> m () Source #

Set the value of the “offset” property. When overloading is enabled, this is equivalent to

set snapConstraint [ #offset := value ]

source

The Actor used as the source for the constraint

Since: 1.6

clearSnapConstraintSource :: (MonadIO m, IsSnapConstraint o) => o -> m () Source #

Set the value of the “source” property to Nothing. When overloading is enabled, this is equivalent to

clear #source

constructSnapConstraintSource :: (IsSnapConstraint o, MonadIO m, IsActor a) => a -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “source” property. This is rarely needed directly, but it is used by new.

getSnapConstraintSource :: (MonadIO m, IsSnapConstraint o) => o -> m Actor Source #

Get the value of the “source” property. When overloading is enabled, this is equivalent to

get snapConstraint #source

setSnapConstraintSource :: (MonadIO m, IsSnapConstraint o, IsActor a) => o -> a -> m () Source #

Set the value of the “source” property. When overloading is enabled, this is equivalent to

set snapConstraint [ #source := value ]

toEdge

The edge of the SnapConstraint:source that should be snapped

Since: 1.6

constructSnapConstraintToEdge :: (IsSnapConstraint o, MonadIO m) => SnapEdge -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “to-edge” property. This is rarely needed directly, but it is used by new.

getSnapConstraintToEdge :: (MonadIO m, IsSnapConstraint o) => o -> m SnapEdge Source #

Get the value of the “to-edge” property. When overloading is enabled, this is equivalent to

get snapConstraint #toEdge

setSnapConstraintToEdge :: (MonadIO m, IsSnapConstraint o) => o -> SnapEdge -> m () Source #

Set the value of the “to-edge” property. When overloading is enabled, this is equivalent to

set snapConstraint [ #toEdge := value ]