summaryrefslogtreecommitdiff
path: root/include/app.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/app.h')
-rw-r--r--include/app.h47
1 files changed, 14 insertions, 33 deletions
diff --git a/include/app.h b/include/app.h
index 10a262b..0794ae2 100644
--- a/include/app.h
+++ b/include/app.h
@@ -27,6 +27,7 @@
extern "C" {
#endif
+
/**
* @addtogroup CAPI_APPLICATION_MODULE
* @{
@@ -35,12 +36,10 @@ extern "C" {
/**
* @brief Called when the application starts.
- *
* @details The callback function is called before the main loop of the application starts.
* In this callback, you can initialize application resources like window creation, data structure, and so on.
* After this callback function returns @c true, the main loop starts up and app_control_cb() is subsequently called.
* If this callback function returns @c false, the main loop doesn't start and app_terminate_cb() is subsequently called.
- *
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @param[in] user_data The user data passed from the callback registration function
* @return @c true on success,
@@ -54,9 +53,7 @@ typedef bool (*app_create_cb) (void *user_data);
/**
* @brief Called when the application is completely obscured by another application and becomes invisible.
- *
* @details The application is not terminated and still running in the paused state.
- *
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @param[in] user_data The user data passed from the callback registration function
* @see ui_app_main()
@@ -67,9 +64,7 @@ typedef void (*app_pause_cb) (void *user_data);
/**
* @brief Called when the application becomes visible.
- *
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- *
* @param[in] user_data The user data passed from the callback registration function
* @see ui_app_main()
* @see #ui_app_lifecycle_callback_s
@@ -80,7 +75,6 @@ typedef void (*app_resume_cb) (void *user_data);
/**
* @brief Called when the application's main loop exits.
* @details You should release the application's resources in this function.
- *
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @param[in] user_data The user data passed from the callback registration function
* @see ui_app_main()
@@ -91,23 +85,19 @@ typedef void (*app_terminate_cb) (void *user_data);
/**
* @brief Called when another application sends a launch request to the application.
- *
* @details When the application is launched, this callback function is called after the main loop of the application starts up.
* The passed app_control handle describes the launch request and contains the information about why the application is launched.
* If the launch request is sent to the application in the running or pause state,
* this callback function can be called again to notify that the application has been asked to launch.
- *
* The application could be explicitly launched by the user from the application launcher or be launched to perform the specific operation by another application.
* The application is responsible for handling each launch request and responding appropriately.
* Using the App Control API, the application can get information about what is to be performed.
* If the application is launched from the application launcher or explicitly launched by another application,
* the passed app_control handle may include only the default operation (#APP_CONTROL_OPERATION_DEFAULT) without any data.
* For more information, see The @ref CAPI_APP_CONTROL_MODULE API description.
- *
+ * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @remarks After this callback returns, the handle of the app_control is freed.
* Therefore, if you want to use the handle after returning this callback, you MUST copy it by using app_control_clone() API.
- *
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @param[in] app_control The handle to the app_control
* @param[in] user_data The user data passed from the callback registration function
* @see ui_app_main()
@@ -119,7 +109,6 @@ typedef void (*app_control_cb) (app_control_h app_control, void *user_data);
/**
* @brief The structure type containing the set of callback functions for handling application lifecycle events.
* @details It is one of the input parameters of the ui_app_main() function.
- *
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @see ui_app_main()
* @see app_create_cb()
@@ -136,35 +125,33 @@ typedef struct {
app_control_cb app_control; /**< This callback function is called when another application sends the launch request to the application. */
} ui_app_lifecycle_callback_s;
+
/**
* @brief Gets the current device orientation.
- *
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @return The current device orientation
*/
app_device_orientation_e app_get_device_orientation(void);
+
/**
* @brief Runs the application's main loop until ui_app_exit() is called.
- *
* @details This function is the main entry point of the Tizen application.
* The app_create_cb() callback function is called to initialize the application before the main loop of application starts up.
* After the app_create_cb() callback function returns true, the main loop starts up and the app_control_cb() callback function is subsequently called.
* If the app_create_cb() callback function returns false, the main loop doesn't start up and app_terminate_cb() callback function is called.
* This main loop supports event handling for the Ecore Main Loop.
- *
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @param[in] argc The argument count
* @param[in] argv The argument vector
* @param[in] callback The set of callback functions to handle application lifecycle events
* @param[in] user_data The user data to be passed to the callback functions
- *
- * @return 0 on success, otherwise a negative error value
+ * @return @c 0 on success,
+ * otherwise a negative error value
* @retval #APP_ERROR_NONE Successful
* @retval #APP_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #APP_ERROR_INVALID_CONTEXT The application is illegally launched, not launched by the launch system
- * @retval #APP_ERROR_ALREADY_RUNNING The main loop already starts
- *
+ * @retval #APP_ERROR_INVALID_CONTEXT The application is launched illegally, not launched by the launch system
+ * @retval #APP_ERROR_ALREADY_RUNNING The main loop already started
* @see app_create_cb()
* @see app_terminate_cb()
* @see app_pause_cb()
@@ -178,10 +165,8 @@ int ui_app_main(int argc, char **argv, ui_app_lifecycle_callback_s *callback, vo
/**
* @brief Exits the main loop of application.
- *
* @details The main loop of application stops and app_terminate_cb() is invoked.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- *
* @see ui_app_main()
* @see app_terminate_cb()
*/
@@ -189,19 +174,17 @@ void ui_app_exit(void);
/**
- * @brief Adds the system event handler
- *
+ * @brief Adds the system event handler.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @param[out] event_handler The event handler
* @param[in] event_type The system event type
* @param[in] callback The callback function
* @param[in] user_data The user data to be passed to the callback functions
- *
- * @return 0 on success, otherwise a negative error value
+ * @return @c 0 on success,
+ * otherwise a negative error value
* @retval #APP_ERROR_NONE Successful
* @retval #APP_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #APP_ERROR_OUT_OF_MEMORY Out of memory
- *
* @see app_event_type_e
* @see app_event_cb
* @see ui_app_remove_event_handler
@@ -210,15 +193,13 @@ int ui_app_add_event_handler(app_event_handler_h *event_handler, app_event_type_
/**
- * @brief Removes registered event handler
- *
+ * @brief Removes registered event handler.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @param[in] event_handler The event handler
- *
- * @return 0 on success, otherwise a negative error value
+ * @return @c 0 on success,
+ * otherwise a negative error value
* @retval #APP_ERROR_NONE Successful
* @retval #APP_ERROR_INVALID_PARAMETER Invalid parameter
- *
* @see ui_app_add_event_handler
*/
int ui_app_remove_event_handler(app_event_handler_h event_handler);