enesim  0.0.23.1
Drawinglibrary
Typedefs | Functions
Context
Image

Asynchronous context. More...

Typedefs

typedef struct
_Enesim_Image_Context 
Enesim_Image_Context

Functions

EAPI Enesim_Image_Context * enesim_image_context_new (void)
 Create a new context.
EAPI void enesim_image_context_free (Enesim_Image_Context *thiz)
 Free a context.
EAPI void enesim_image_context_load_async (Enesim_Image_Context *thiz, Enesim_Stream *data, const char *mime, Enesim_Buffer *b, Enesim_Pool *mpool, Enesim_Image_Callback cb, void *user_data, const char *options)
EAPI void enesim_image_context_save_async (Enesim_Image_Context *thiz, Enesim_Stream *data, const char *mime, Enesim_Buffer *b, Enesim_Image_Callback cb, void *user_data, const char *options)
EAPI void enesim_image_context_dispatch (Enesim_Image_Context *thiz)
 Dispatch every asynchronous callback set.

Detailed Description

Asynchronous context.


Function Documentation

EAPI Enesim_Image_Context* enesim_image_context_new ( void  )

Create a new context.

Create a new context. A context is the holder of every asynchronous operation done.

EAPI void enesim_image_context_free ( Enesim_Image_Context *  thiz)

Free a context.

EAPI void enesim_image_context_load_async ( Enesim_Image_Context *  thiz,
Enesim_Stream s,
const char *  mime,
Enesim_Buffer b,
Enesim_Pool mpool,
Enesim_Image_Callback  cb,
void *  data,
const char *  options 
)

Load an image asynchronously

Parameters:
thizThe context to use for loading
sThe image data to load
mimeThe image mime
bThe buffer to write the image pixels to. It must not be NULL.
mpoolThe mempool that will create the buffer in case the buffer reference is NULL
cbThe function that will get called once the load is done
dataUser provided data
optionsAny option the provider might require
EAPI void enesim_image_context_save_async ( Enesim_Image_Context *  thiz,
Enesim_Stream s,
const char *  mime,
Enesim_Buffer b,
Enesim_Image_Callback  cb,
void *  data,
const char *  options 
)

Save an image asynchronously

Parameters:
thizThe context to use for loading
sThe image data to load
mimeThe image mime
bThe buffer to read the image pixels from. It must not be NULL.
cbThe function that will get called once the save is done
dataUser provided data
optionsAny option the provider might require
EAPI void enesim_image_context_dispatch ( Enesim_Image_Context *  thiz)

Dispatch every asynchronous callback set.

In case of requesting some asynchronous load or save, you must call this function to get the status of such process

Parameters:
thizThe context to dispatch
 All Data Structures Variables