summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/app.h22
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()