gi-clutter-1.0.3: 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.Structs.Point

Description

A point in 2D space.

Since: 1.12

Synopsis

Exported types

newtype Point Source #

Memory-managed wrapper type.

Constructors

Point (ManagedPtr Point) 

Instances

Instances details
Eq Point Source # 
Instance details

Defined in GI.Clutter.Structs.Point

Methods

(==) :: Point -> Point -> Bool #

(/=) :: Point -> Point -> Bool #

GBoxed Point Source # 
Instance details

Defined in GI.Clutter.Structs.Point

ManagedPtrNewtype Point Source # 
Instance details

Defined in GI.Clutter.Structs.Point

Methods

toManagedPtr :: Point -> ManagedPtr Point

TypedObject Point Source # 
Instance details

Defined in GI.Clutter.Structs.Point

Methods

glibType :: IO GType

HasParentTypes Point Source # 
Instance details

Defined in GI.Clutter.Structs.Point

tag ~ 'AttrSet => Constructible Point tag Source # 
Instance details

Defined in GI.Clutter.Structs.Point

Methods

new :: MonadIO m => (ManagedPtr Point -> Point) -> [AttrOp Point tag] -> m Point

IsGValue (Maybe Point) Source #

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

Instance details

Defined in GI.Clutter.Structs.Point

Methods

gvalueGType_ :: IO GType

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

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

type ParentTypes Point Source # 
Instance details

Defined in GI.Clutter.Structs.Point

type ParentTypes Point = '[] :: [Type]

newZeroPoint :: MonadIO m => m Point Source #

Construct a Point struct initialized to zero.

Methods

Click to display all available methods, including inherited ones

Expand

Methods

copy, distance, equals, free, init.

Getters

None.

Setters

None.

alloc

pointAlloc Source #

Arguments

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

Returns: the newly allocated Point. Use pointFree to free its resources.

Allocates a new Point.

Since: 1.12

copy

pointCopy Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Point

point: a Point

-> m Point

Returns: a newly allocated Point. Use pointFree to free its resources.

Creates a new Point with the same coordinates of point.

Since: 1.12

distance

pointDistance Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Point

a: a Point

-> Point

b: a Point

-> m (Float, Float, Float)

Returns: the distance between the points.

Computes the distance between two Point.

Since: 1.12

equals

pointEquals Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Point

a: the first Point to compare

-> Point

b: the second Point to compare

-> m Bool

Returns: True if the ClutterPoints are equal

Compares two Point for equality.

Since: 1.12

free

pointFree Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Point

point: a Point

-> m () 

Frees the resources allocated for point.

Since: 1.12

init

pointInit Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Point

point: a Point

-> Float

x: the X coordinate of the point

-> Float

y: the Y coordinate of the point

-> m Point

Returns: the initialized Point

Initializes point with the given coordinates.

Since: 1.12

zero

pointZero Source #

Arguments

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

Returns: a point centered in (0, 0); the returned Point is owned by Clutter and it should not be modified or freed.

A point centered at (0, 0).

The returned value can be used as a guard.

Since: 1.12

Properties

x

X coordinate, in pixels

getPointX :: MonadIO m => Point -> m Float Source #

Get the value of the “x” field. When overloading is enabled, this is equivalent to

get point #x

setPointX :: MonadIO m => Point -> Float -> m () Source #

Set the value of the “x” field. When overloading is enabled, this is equivalent to

set point [ #x := value ]

y

Y coordinate, in pixels

getPointY :: MonadIO m => Point -> m Float Source #

Get the value of the “y” field. When overloading is enabled, this is equivalent to

get point #y

setPointY :: MonadIO m => Point -> Float -> m () Source #

Set the value of the “y” field. When overloading is enabled, this is equivalent to

set point [ #y := value ]