gi-glib-2.0.24: GLib bindings

Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte
License | LGPL-2.1
Maintainer | Iñaki García Etxebarria
Safe Haskell | None
Language | Haskell2010

GI.GLib.Structs.MemVTable

Contents

- Exported types
- Methods
  - Overloaded methods
- Properties
  - calloc
  - free
  - malloc
  - realloc
  - tryMalloc
  - tryRealloc

Description

A set of functions used to perform memory allocation. The same `MemVTable` must be used for all allocations in the same program; a call to `memSetVtable`, if it exists, should be prior to any use of GLib.

This functions related to this has been deprecated in 2.46, and no longer work.

Synopsis

- newtype MemVTable = MemVTable (ManagedPtr MemVTable)
- newZeroMemVTable :: MonadIO m => m MemVTable
- clearMemVTableCalloc :: MonadIO m => MemVTable -> m ()
- getMemVTableCalloc :: MonadIO m => MemVTable -> m (Maybe MemVTableCallocFieldCallback)
- setMemVTableCalloc :: MonadIO m => MemVTable -> FunPtr C_MemVTableCallocFieldCallback -> m ()
- clearMemVTableFree :: MonadIO m => MemVTable -> m ()
- getMemVTableFree :: MonadIO m => MemVTable -> m (Maybe MemVTableFreeFieldCallback)
- setMemVTableFree :: MonadIO m => MemVTable -> FunPtr C_MemVTableFreeFieldCallback -> m ()
- clearMemVTableMalloc :: MonadIO m => MemVTable -> m ()
- getMemVTableMalloc :: MonadIO m => MemVTable -> m (Maybe MemVTableMallocFieldCallback)
- setMemVTableMalloc :: MonadIO m => MemVTable -> FunPtr C_MemVTableMallocFieldCallback -> m ()
- clearMemVTableRealloc :: MonadIO m => MemVTable -> m ()
- getMemVTableRealloc :: MonadIO m => MemVTable -> m (Maybe MemVTableReallocFieldCallback)
- setMemVTableRealloc :: MonadIO m => MemVTable -> FunPtr C_MemVTableReallocFieldCallback -> m ()
- clearMemVTableTryMalloc :: MonadIO m => MemVTable -> m ()
- getMemVTableTryMalloc :: MonadIO m => MemVTable -> m (Maybe MemVTableTryMallocFieldCallback)
- setMemVTableTryMalloc :: MonadIO m => MemVTable -> FunPtr C_MemVTableTryMallocFieldCallback -> m ()
- clearMemVTableTryRealloc :: MonadIO m => MemVTable -> m ()
- getMemVTableTryRealloc :: MonadIO m => MemVTable -> m (Maybe MemVTableTryReallocFieldCallback)
- setMemVTableTryRealloc :: MonadIO m => MemVTable -> FunPtr C_MemVTableTryReallocFieldCallback -> m ()

# Exported types

newtype MemVTable Source #

Memory-managed wrapper type.

Constructors

MemVTable (ManagedPtr MemVTable) |

#### Instances

Instances details

Eq MemVTable Source # |
Instance details Defined in GI.GLib.Structs.MemVTable Methods (==) :: MemVTable -> MemVTable -> Bool # (/=) :: MemVTable -> MemVTable -> Bool #
ManagedPtrNewtype MemVTable Source # |
Instance details Defined in GI.GLib.Structs.MemVTable Methods toManagedPtr :: MemVTable -> ManagedPtr MemVTable Source #
BoxedPtr MemVTable Source # |
Instance details Defined in GI.GLib.Structs.MemVTable Methods boxedPtrCopy :: MemVTable -> IO MemVTable Source # boxedPtrFree :: MemVTable -> IO () Source #
CallocPtr MemVTable Source # |
Instance details Defined in GI.GLib.Structs.MemVTable Methods boxedPtrCalloc :: IO (Ptr MemVTable) Source #
tag ~ 'AttrSet => Constructible MemVTable tag Source # |
Instance details Defined in GI.GLib.Structs.MemVTable Methods new :: MonadIO m => (ManagedPtr MemVTable -> MemVTable) -> [AttrOp MemVTable tag] -> m MemVTable Source #

newZeroMemVTable :: MonadIO m => m MemVTable Source #

Construct a `MemVTable` struct initialized to zero.

# Methods

## Overloaded methods

# Properties

## calloc

No description available in the introspection data.

clearMemVTableCalloc :: MonadIO m => MemVTable -> m () Source #

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

    clear #calloc

getMemVTableCalloc :: MonadIO m => MemVTable -> m (Maybe MemVTableCallocFieldCallback) Source #

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

    get memVTable #calloc

setMemVTableCalloc :: MonadIO m => MemVTable -> FunPtr C_MemVTableCallocFieldCallback -> m () Source #

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

    set memVTable [ #calloc := value ]

## free

No description available in the introspection data.

clearMemVTableFree :: MonadIO m => MemVTable -> m () Source #

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

    clear #free

getMemVTableFree :: MonadIO m => MemVTable -> m (Maybe MemVTableFreeFieldCallback) Source #

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

    get memVTable #free

setMemVTableFree :: MonadIO m => MemVTable -> FunPtr C_MemVTableFreeFieldCallback -> m () Source #

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

    set memVTable [ #free := value ]

## malloc

No description available in the introspection data.

clearMemVTableMalloc :: MonadIO m => MemVTable -> m () Source #

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

    clear #malloc

getMemVTableMalloc :: MonadIO m => MemVTable -> m (Maybe MemVTableMallocFieldCallback) Source #

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

    get memVTable #malloc

setMemVTableMalloc :: MonadIO m => MemVTable -> FunPtr C_MemVTableMallocFieldCallback -> m () Source #

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

    set memVTable [ #malloc := value ]

## realloc

No description available in the introspection data.

clearMemVTableRealloc :: MonadIO m => MemVTable -> m () Source #

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

    clear #realloc

getMemVTableRealloc :: MonadIO m => MemVTable -> m (Maybe MemVTableReallocFieldCallback) Source #

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

    get memVTable #realloc

setMemVTableRealloc :: MonadIO m => MemVTable -> FunPtr C_MemVTableReallocFieldCallback -> m () Source #

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

    set memVTable [ #realloc := value ]

## tryMalloc

No description available in the introspection data.

clearMemVTableTryMalloc :: MonadIO m => MemVTable -> m () Source #

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

    clear #tryMalloc

getMemVTableTryMalloc :: MonadIO m => MemVTable -> m (Maybe MemVTableTryMallocFieldCallback) Source #

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

    get memVTable #tryMalloc

setMemVTableTryMalloc :: MonadIO m => MemVTable -> FunPtr C_MemVTableTryMallocFieldCallback -> m () Source #

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

    set memVTable [ #tryMalloc := value ]

## tryRealloc

No description available in the introspection data.

clearMemVTableTryRealloc :: MonadIO m => MemVTable -> m () Source #

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

    clear #tryRealloc

getMemVTableTryRealloc :: MonadIO m => MemVTable -> m (Maybe MemVTableTryReallocFieldCallback) Source #

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

    get memVTable #tryRealloc

setMemVTableTryRealloc :: MonadIO m => MemVTable -> FunPtr C_MemVTableTryReallocFieldCallback -> m () Source #

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

    set memVTable [ #tryRealloc := value ]