| 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 |
GI.Graphene.Structs.Size
Description
A size.
Since: 1.0
Synopsis
- newtype Size = Size (ManagedPtr Size)
- newZeroSize :: MonadIO m => m Size
- sizeAlloc :: (HasCallStack, MonadIO m) => m Size
- sizeEqual :: (HasCallStack, MonadIO m) => Size -> Size -> m Bool
- sizeFree :: (HasCallStack, MonadIO m) => Size -> m ()
- sizeInit :: (HasCallStack, MonadIO m) => Size -> Float -> Float -> m Size
- sizeInitFromSize :: (HasCallStack, MonadIO m) => Size -> Size -> m Size
- sizeInterpolate :: (HasCallStack, MonadIO m) => Size -> Size -> Double -> m Size
- sizeScale :: (HasCallStack, MonadIO m) => Size -> Float -> m Size
- sizeZero :: (HasCallStack, MonadIO m) => m Size
- getSizeHeight :: MonadIO m => Size -> m Float
- setSizeHeight :: MonadIO m => Size -> Float -> m ()
- getSizeWidth :: MonadIO m => Size -> m Float
- setSizeWidth :: MonadIO m => Size -> Float -> m ()
Exported types
Memory-managed wrapper type.
Constructors
| Size (ManagedPtr Size) |
Instances
| Eq Size Source # | |
| GBoxed Size Source # | |
Defined in GI.Graphene.Structs.Size | |
| ManagedPtrNewtype Size Source # | |
Defined in GI.Graphene.Structs.Size Methods toManagedPtr :: Size -> ManagedPtr Size # | |
| TypedObject Size Source # | |
Defined in GI.Graphene.Structs.Size | |
| HasParentTypes Size Source # | |
Defined in GI.Graphene.Structs.Size | |
| tag ~ 'AttrSet => Constructible Size tag Source # | |
Defined in GI.Graphene.Structs.Size | |
| IsGValue (Maybe Size) Source # | Convert |
Defined in GI.Graphene.Structs.Size | |
| type ParentTypes Size Source # | |
Defined in GI.Graphene.Structs.Size | |
Methods
Click to display all available methods, including inherited ones
alloc
Arguments
| :: (HasCallStack, MonadIO m) | |
| => m Size | Returns: the newly allocated |
equal
Arguments
| :: (HasCallStack, MonadIO m) | |
| => Size |
|
| -> Size |
|
| -> m Bool | Returns: |
Checks whether the two give Size are equal.
Since: 1.0
free
Arguments
| :: (HasCallStack, MonadIO m) | |
| => Size |
|
| -> m () |
Frees the resources allocated by sizeAlloc.
Since: 1.0
init
Arguments
| :: (HasCallStack, MonadIO m) | |
| => Size |
|
| -> Float |
|
| -> Float |
|
| -> m Size | Returns: the initialized |
Initializes a Size using the given width and height.
Since: 1.0
initFromSize
Arguments
| :: (HasCallStack, MonadIO m) | |
| => Size |
|
| -> Size |
|
| -> m Size | Returns: the initialized |
Initializes a Size using the width and height of
the given src.
Since: 1.0
interpolate
Arguments
| :: (HasCallStack, MonadIO m) | |
| => Size |
|
| -> Size |
|
| -> Double |
|
| -> m Size |
Linearly interpolates the two given Size using the given
interpolation factor.
Since: 1.0
scale
Scales the components of a Size using the given factor.
Since: 1.0
zero
Arguments
| :: (HasCallStack, MonadIO m) | |
| => m Size | Returns: a constant size |
A constant pointer to a zero Size, useful for
equality checks and interpolations.
Since: 1.0
Properties
height
the height
getSizeHeight :: MonadIO m => Size -> m Float Source #
Get the value of the “height” field.
When overloading is enabled, this is equivalent to
get size #height
setSizeHeight :: MonadIO m => Size -> Float -> m () Source #
Set the value of the “height” field.
When overloading is enabled, this is equivalent to
setsize [ #height:=value ]
width
the width
getSizeWidth :: MonadIO m => Size -> m Float Source #
Get the value of the “width” field.
When overloading is enabled, this is equivalent to
get size #width
setSizeWidth :: MonadIO m => Size -> Float -> m () Source #
Set the value of the “width” field.
When overloading is enabled, this is equivalent to
setsize [ #width:=value ]