diff options
author | Changgyu Choi <changyu.choi@samsung.com> | 2024-05-13 12:39:12 +0900 |
---|---|---|
committer | Changgyu Choi <changyu.choi@samsung.com> | 2024-05-13 16:54:15 +0900 |
commit | bb778880d5b4ec4aa6186c45471e56a599caf1ed (patch) | |
tree | 8684ede6247e723562d4a0a37ee4b958bdef69aa | |
parent | 9d29cf6a673a88d16172b32da5a654127d0693d2 (diff) | |
download | application-tizen.tar.gz application-tizen.tar.bz2 application-tizen.zip |
Changes:
- Adds a remark section for memory management.
Change-Id: Id8dcd5e4edf603ae83e3b65cd30614de723070dc
Signed-off-by: Changgyu Choi <changyu.choi@samsung.com>
-rw-r--r-- | include/app.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/include/app.h b/include/app.h index 9333ad1..47fd5f7 100644 --- a/include/app.h +++ b/include/app.h @@ -176,6 +176,7 @@ void ui_app_exit(void); /** * @brief Adds the system event handler. * @since_tizen 2.3 + * @remarks The @a event_handler should be released using ui_app_remove_event_handler(). * @param[out] event_handler The event handler * @param[in] event_type The system event type * @param[in] callback The callback function @@ -185,6 +186,27 @@ void ui_app_exit(void); * @retval #APP_ERROR_NONE Successful * @retval #APP_ERROR_INVALID_PARAMETER Invalid parameter * @retval #APP_ERROR_OUT_OF_MEMORY Out of memory + * @par Example + * @code +#include <app.h> + +static void +ui_app_low_battery(app_event_info_h event_info, void *user_data) +{ +} +... +int main() +{ + int r; + app_event_handler_h handler = NULL; + + r = ui_app_add_event_handler(&handler, APP_EVENT_LOW_MEMORY, ui_app_low_memory, NULL); + ... + r = ui_app_remove_event_handler(handler); + + return 0; +} + * @endcode * @see app_event_type_e * @see app_event_cb * @see ui_app_remove_event_handler() |