liblightify
Library Context

Functions

int lightify_new (struct lightify_ctx **ctx, void *reserved)
 
int lightify_free (struct lightify_ctx *ctx)
 
void * lightify_get_userdata (struct lightify_ctx *ctx)
 
int lightify_set_userdata (struct lightify_ctx *ctx, void *userdata)
 

Detailed Description

Function Documentation

int lightify_free ( struct lightify_ctx ctx)

Free the context structure including all data objects associated.

Parameters
ctx
Returns
0 on success, negative on errors (e.g wrong parameter)

Definition at line 488 of file context.c.

void* lightify_get_userdata ( struct lightify_ctx ctx)

Get the stored userdata

Parameters
ctxcontext
Returns
>=0 on success
See also
lightify_set_userdata

Definition at line 411 of file context.c.

int lightify_new ( struct lightify_ctx **  ctx,
void *  reserved 
)

Create a new library context object

Parameters
ctxwhere to store the pointer of the object
reservedThe second parameter, a pointer, is reserved for future use. Until then, provide NULL.
Returns
0 on success, negative value on error.

Definition at line 439 of file context.c.

int lightify_set_userdata ( struct lightify_ctx ctx,
void *  userdata 
)

Store a pointer in the library context.

This can be used for user-data to be associated with the context.

Parameters
ctxcontext
userdatapointer to be stored
Returns
>=0 on success
See also
lightify_get_userdata

Definition at line 417 of file context.c.