gi-glib-2.0.24: GLib bindings
CopyrightWill Thompson Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellNone
LanguageHaskell2010

GI.GLib.Structs.TrashStack

Description

Each piece of memory that is pushed onto the stack is cast to a GTrashStack*.

Synopsis

Exported types

newtype TrashStack Source #

Memory-managed wrapper type.

newZeroTrashStack :: MonadIO m => m TrashStack Source #

Construct a TrashStack struct initialized to zero.

Methods

Overloaded methods

height

trashStackHeight Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> TrashStack

stackP: a TrashStack

-> m Word32

Returns: the height of the stack

Deprecated: (Since version 2.48)tTrashStack is deprecated without replacement

Returns the height of a TrashStack.

Note that execution of this function is of O(N) complexity where N denotes the number of items on the stack.

peek

trashStackPeek Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> TrashStack

stackP: a TrashStack

-> m (Ptr ())

Returns: the element at the top of the stack

Deprecated: (Since version 2.48)tTrashStack is deprecated without replacement

Returns the element at the top of a TrashStack which may be Nothing.

pop

trashStackPop Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> TrashStack

stackP: a TrashStack

-> m (Ptr ())

Returns: the element at the top of the stack

Deprecated: (Since version 2.48)tTrashStack is deprecated without replacement

Pops a piece of memory off a TrashStack.

push

trashStackPush Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> TrashStack

stackP: a TrashStack

-> Ptr ()

dataP: the piece of memory to push on the stack

-> m () 

Deprecated: (Since version 2.48)tTrashStack is deprecated without replacement

Pushes a piece of memory onto a TrashStack.

Properties

next

pointer to the previous element of the stack, gets stored in the first sizeof (gpointer) bytes of the element

clearTrashStackNext :: MonadIO m => TrashStack -> m () Source #

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

clear #next

getTrashStackNext :: MonadIO m => TrashStack -> m (Maybe TrashStack) Source #

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

get trashStack #next

setTrashStackNext :: MonadIO m => TrashStack -> Ptr TrashStack -> m () Source #

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

set trashStack [ #next := value ]