From: Changgyu Choi Date: Mon, 13 May 2024 03:39:12 +0000 (+0900) Subject: Modify api documentation X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=HEAD;p=platform%2Fcore%2Fapi%2Fapplication.git Modify api documentation Changes: - Adds a remark section for memory management. Change-Id: Id8dcd5e4edf603ae83e3b65cd30614de723070dc Signed-off-by: Changgyu Choi --- 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 + +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()