|
rlib
Convenience library for useful things
|
(function, data, user, datanotify, usernotify) tuples used by the callback-flavoured lists and queues to store deferred work without losing track of ownership.
More...
Files | |
| file | rcbctx.h |
| Callback + data + user-data + per-side destroy-notify tuples used by Linked lists, Queues and Timeout callback list to store deferred callbacks. | |
Data Structures | |
| struct | RFuncCallbackCtx |
Callback context for a void-returning function. More... | |
| struct | RFuncReturnCallbackCtx |
Callback context for a function that returns rboolean. More... | |
Functions | |
| static void | r_func_callback_ctx_init (RFuncCallbackCtx *ctx, RFunc cb, rpointer data, RDestroyNotify datanotify, rpointer user, RDestroyNotify usernotify) |
| static void | r_func_callback_ctx_clear (RFuncCallbackCtx *ctx) |
| static void | r_func_callback_ctx_call (RFuncCallbackCtx *ctx) |
| static void | r_func_return_callback_ctx_init (RFuncReturnCallbackCtx *ctx, RFuncReturn cb, rpointer data, RDestroyNotify datanotify, rpointer user, RDestroyNotify usernotify) |
| static void | r_func_return_callback_ctx_clear (RFuncReturnCallbackCtx *ctx) |
| static rboolean | r_func_return_callback_ctx_call (RFuncReturnCallbackCtx *ctx) |
(function, data, user, datanotify, usernotify) tuples used by the callback-flavoured lists and queues to store deferred work without losing track of ownership.
Two variants are provided: RFuncCallbackCtx for callbacks returning void and RFuncReturnCallbackCtx for callbacks returning rboolean. The r_func_callback_ctx_* / r_func_return_callback_ctx_* inline accessors initialise the tuple, invoke its destroy notifiers, and call the wrapped function with the correct argument order.