Go to the source code of this file.
◆ NContext
Internal context structure.
◆ NContextValueChangeFunc
| typedef void(* NContextValueChangeFunc) (NContext *context, const char *key, const NValue *old_value, const NValue *new_value, void *userdata) |
Context value change callback function.
◆ n_context_get_value()
| const NValue * n_context_get_value |
( |
NContext * |
context, |
|
|
const char * |
key |
|
) |
| |
Get value by key from context.
- Parameters
-
| context | NContext structure. |
| key | Key. |
- Returns
- Value as NValue or NULL if no value associated with key is found.
◆ n_context_set_value()
| void n_context_set_value |
( |
NContext * |
context, |
|
|
const char * |
key, |
|
|
NValue * |
value |
|
) |
| |
Change or add key/value pair to context.
- Parameters
-
| context | NContext structure. |
| key | Key. |
| value | Values as NValue type. |
◆ n_context_subscribe_value_change()
Subscribe callback function to key in context structure.
- Parameters
-
| context | NContext structure. |
| key | Key. |
| callback | Callback function. |
| userdata | Userdata. |
- Returns
- TRUE is successful.
- See also
- NContextValueChangeFunc
◆ n_context_unsubscribe_value_change()
Unsubscribe value change callback.
- Parameters
-
| context | NContext structure. |
| key | Key. |
| callback | Callback function, |
- See also
- NContextValueChangeFunc