gi-clutter-1.0.2: 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.ActorBox

Description

Bounding box of an actor. The coordinates of the top left and right bottom corners of an actor. The coordinates of the two points are expressed in pixels with sub-pixel precision

Synopsis

Exported types

newtype ActorBox Source #

Memory-managed wrapper type.

Constructors

ActorBox (ManagedPtr ActorBox) 

Instances

Instances details
Eq ActorBox Source # 
Instance details

Defined in GI.Clutter.Structs.ActorBox

GBoxed ActorBox Source # 
Instance details

Defined in GI.Clutter.Structs.ActorBox

ManagedPtrNewtype ActorBox Source # 
Instance details

Defined in GI.Clutter.Structs.ActorBox

TypedObject ActorBox Source # 
Instance details

Defined in GI.Clutter.Structs.ActorBox

Methods

glibType :: IO GType #

HasParentTypes ActorBox Source # 
Instance details

Defined in GI.Clutter.Structs.ActorBox

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

Defined in GI.Clutter.Structs.ActorBox

Methods

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

IsGValue (Maybe ActorBox) Source #

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

Instance details

Defined in GI.Clutter.Structs.ActorBox

type ParentTypes ActorBox Source # 
Instance details

Defined in GI.Clutter.Structs.ActorBox

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

newZeroActorBox :: MonadIO m => m ActorBox Source #

Construct a ActorBox struct initialized to zero.

Methods

Click to display all available methods, including inherited ones

Expand

Methods

clampToPixel, contains, copy, equal, free, fromVertices, init, initRect, interpolate, union.

Getters

getArea, getHeight, getOrigin, getSize, getWidth, getX, getY.

Setters

setOrigin, setSize.

alloc

actorBoxAlloc Source #

Arguments

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

Returns: the newly allocated ActorBox. Use actorBoxFree to free its resources

Allocates a new ActorBox.

Since: 1.12

clampToPixel

actorBoxClampToPixel Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> ActorBox

box: the ActorBox to clamp

-> m () 

Clamps the components of box to the nearest integer

Since: 1.2

contains

actorBoxContains Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> ActorBox

box: a ActorBox

-> Float

x: X coordinate of the point

-> Float

y: Y coordinate of the point

-> m Bool

Returns: True if the point is contained by the ActorBox

Checks whether a point with x, y coordinates is contained withing box

Since: 1.0

copy

actorBoxCopy Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> ActorBox

box: a ActorBox

-> m ActorBox

Returns: a newly allocated copy of ActorBox. Use actorBoxFree to free the allocated resources

Copies box

Since: 1.0

equal

actorBoxEqual Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> ActorBox

boxA: a ActorBox

-> ActorBox

boxB: a ActorBox

-> m Bool

Returns: True if the passed ActorBox are equal

Checks boxA and boxB for equality

Since: 1.0

free

actorBoxFree Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> ActorBox

box: a ActorBox

-> m () 

Frees a ActorBox allocated using actorBoxNew or actorBoxCopy

Since: 1.0

fromVertices

actorBoxFromVertices Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> ActorBox

box: a ActorBox

-> [Vertex]

verts: array of four Vertex

-> m () 

Calculates the bounding box represented by the four vertices; for details of the vertex array see actorGetAbsAllocationVertices.

Since: 1.0

getArea

actorBoxGetArea Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> ActorBox

box: a ActorBox

-> m Float

Returns: the area of a ActorBox, in pixels

Retrieves the area of box

Since: 1.0

getHeight

actorBoxGetHeight Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> ActorBox

box: a ActorBox

-> m Float

Returns: the height of the box

Retrieves the height of the box

Since: 1.0

getOrigin

actorBoxGetOrigin Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> ActorBox

box: a ActorBox

-> m (Float, Float) 

Retrieves the origin of box

Since: 1.0

getSize

actorBoxGetSize Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> ActorBox

box: a ActorBox

-> m (Float, Float) 

Retrieves the size of box

Since: 1.0

getWidth

actorBoxGetWidth Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> ActorBox

box: a ActorBox

-> m Float

Returns: the width of the box

Retrieves the width of the box

Since: 1.0

getX

actorBoxGetX Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> ActorBox

box: a ActorBox

-> m Float

Returns: the X coordinate of the origin

Retrieves the X coordinate of the origin of box

Since: 1.0

getY

actorBoxGetY Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> ActorBox

box: a ActorBox

-> m Float

Returns: the Y coordinate of the origin

Retrieves the Y coordinate of the origin of box

Since: 1.0

init

actorBoxInit Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> ActorBox

box: a ActorBox

-> Float

x1: X coordinate of the top left point

-> Float

y1: Y coordinate of the top left point

-> Float

x2: X coordinate of the bottom right point

-> Float

y2: Y coordinate of the bottom right point

-> m ActorBox

Returns: the initialized ActorBox

Initializes box with the given coordinates.

Since: 1.10

initRect

actorBoxInitRect Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> ActorBox

box: a ActorBox

-> Float

x: X coordinate of the origin

-> Float

y: Y coordinate of the origin

-> Float

width: width of the box

-> Float

height: height of the box

-> m () 

Initializes box with the given origin and size.

Since: 1.10

interpolate

actorBoxInterpolate Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> ActorBox

initial: the initial ActorBox

-> ActorBox

final: the final ActorBox

-> Double

progress: the interpolation progress

-> m ActorBox 

Interpolates between initial and final ActorBoxes using progress

Since: 1.2

new

actorBoxNew Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Float

x1: X coordinate of the top left point

-> Float

y1: Y coordinate of the top left point

-> Float

x2: X coordinate of the bottom right point

-> Float

y2: Y coordinate of the bottom right point

-> m ActorBox

Returns: the newly allocated ActorBox. Use actorBoxFree to free the resources

Allocates a new ActorBox using the passed coordinates for the top left and bottom right points.

This function is the logical equivalent of:

 clutter_actor_box_init (clutter_actor_box_alloc (),
                         x_1, y_1,
                         x_2, y_2);

Since: 1.0

setOrigin

actorBoxSetOrigin Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> ActorBox

box: a ActorBox

-> Float

x: the X coordinate of the new origin

-> Float

y: the Y coordinate of the new origin

-> m () 

Changes the origin of box, maintaining the size of the ActorBox.

Since: 1.6

setSize

actorBoxSetSize Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> ActorBox

box: a ActorBox

-> Float

width: the new width

-> Float

height: the new height

-> m () 

Sets the size of box, maintaining the origin of the ActorBox.

Since: 1.6

union

actorBoxUnion Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> ActorBox

a: the first ActorBox

-> ActorBox

b: the second ActorBox

-> m ActorBox 

Unions the two boxes a and b and stores the result in result.

Since: 1.4

Properties

x1

X coordinate of the top left corner

getActorBoxX1 :: MonadIO m => ActorBox -> m Float Source #

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

get actorBox #x1

setActorBoxX1 :: MonadIO m => ActorBox -> Float -> m () Source #

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

set actorBox [ #x1 := value ]

x2

X coordinate of the bottom right corner

getActorBoxX2 :: MonadIO m => ActorBox -> m Float Source #

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

get actorBox #x2

setActorBoxX2 :: MonadIO m => ActorBox -> Float -> m () Source #

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

set actorBox [ #x2 := value ]

y1

Y coordinate of the top left corner

getActorBoxY1 :: MonadIO m => ActorBox -> m Float Source #

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

get actorBox #y1

setActorBoxY1 :: MonadIO m => ActorBox -> Float -> m () Source #

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

set actorBox [ #y1 := value ]

y2

Y coordinate of the bottom right corner

getActorBoxY2 :: MonadIO m => ActorBox -> m Float Source #

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

get actorBox #y2

setActorBoxY2 :: MonadIO m => ActorBox -> Float -> m () Source #

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

set actorBox [ #y2 := value ]