gi-dazzle-1.0.2: libdazzle bindings
CopyrightWill Thompson and Iñaki García Etxebarria
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellSafe-Inferred
LanguageHaskell2010

GI.Dazzle.Structs.Ring

Description

No description available in the introspection data.

Synopsis

Exported types

newtype Ring Source #

Memory-managed wrapper type.

Constructors

Ring (ManagedPtr Ring) 

Instances

Instances details
Eq Ring Source # 
Instance details

Defined in GI.Dazzle.Structs.Ring

Methods

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

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

GBoxed Ring Source # 
Instance details

Defined in GI.Dazzle.Structs.Ring

ManagedPtrNewtype Ring Source # 
Instance details

Defined in GI.Dazzle.Structs.Ring

Methods

toManagedPtr :: Ring -> ManagedPtr Ring

TypedObject Ring Source # 
Instance details

Defined in GI.Dazzle.Structs.Ring

Methods

glibType :: IO GType

HasParentTypes Ring Source # 
Instance details

Defined in GI.Dazzle.Structs.Ring

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

Defined in GI.Dazzle.Structs.Ring

Methods

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

IsGValue (Maybe Ring) Source #

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

Instance details

Defined in GI.Dazzle.Structs.Ring

Methods

gvalueGType_ :: IO GType

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

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

type ParentTypes Ring Source # 
Instance details

Defined in GI.Dazzle.Structs.Ring

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

newZeroRing :: MonadIO m => m Ring Source #

Construct a Ring struct initialized to zero.

Methods

Click to display all available methods, including inherited ones

Expand

Methods

appendVals, foreach, ref, unref.

Getters

None.

Setters

None.

appendVals

ringAppendVals Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Ring

ring: A Ring.

-> Ptr ()

data: A pointer to the array of values.

-> Word32

len: The number of values.

-> m Word32

Returns: the index of the first item.

Appends len values located at data.

foreach

ringForeach Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Ring

ring: A Ring.

-> Func

func: A Func to call for each element.

-> m () 

Calls func for every item in the Ring starting from the most recently inserted element to the least recently inserted.

ref

ringRef Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Ring

ring: A Ring.

-> m Ring

Returns: The ring pointer.

Atomically increments the reference count of ring by one.

sizedNew

ringSizedNew Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Word32

elementSize: The size per element.

-> Word32

reservedSize: The number of elements to allocate.

-> DestroyNotify

elementDestroy: Notification called when removing an element.

-> m Ring

Returns: A new Ring.

Creates a new instance of Ring with the given number of elements.

unref

ringUnref Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Ring

ring: A Ring.

-> m () 

Atomically decrements the reference count of ring by one. When the reference count reaches zero, the structure is freed.

Properties

data

No description available in the introspection data.

getRingData :: MonadIO m => Ring -> m Word8 Source #

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

get ring #data

setRingData :: MonadIO m => Ring -> Word8 -> m () Source #

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

set ring [ #data := value ]

len

No description available in the introspection data.

getRingLen :: MonadIO m => Ring -> m Word32 Source #

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

get ring #len

setRingLen :: MonadIO m => Ring -> Word32 -> m () Source #

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

set ring [ #len := value ]

pos

No description available in the introspection data.

getRingPos :: MonadIO m => Ring -> m Word32 Source #

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

get ring #pos

setRingPos :: MonadIO m => Ring -> Word32 -> m () Source #

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

set ring [ #pos := value ]