AUL_WIDGET_INSTANCE_EVENT_CREATE_ABORTED = 11
} aul_widget_instance_event_e;
+typedef enum _aul_process_status {
+ AUL_PROC_STATUS_LAUNCH = 0,
+ AUL_PROC_STATUS_FG = 3,
+ AUL_PROC_STATUS_BG = 4,
+ AUL_PROC_STATUS_FOCUS = 5,
+ AUL_PROC_STATUS_HIDE = 7
+} aul_process_status_e;
+
/** AUL public key - To check caller's secuirty */
#define AUL_K_CALLER_PID "__AUL_CALLER_PID__"
/** AUL public key - To check callee's secuirty */
* @par Purpose:
* This API is for monitoring the status of all applications.
*
- * @param[in] func callback function
+ * @param[in] func callback function. Please refer to 'app_status_handler' below.
* @param[in] data user data
* @return 0 if success, negative value if fail
* @retval AUL_R_OK - success
* @retval AUL_R_ERROR - general error
+ * @remark
+ * The callback will be invoked asynchronously.
+ * It can't guarantee that the real status would not be changed during the callback is called.
*
* @code
* #include <aul.h>
* const char *app_status;
*
* switch (status) {
- * case 0:
- * app_status = "STATUS_LAUNCHING";
+ * case AUL_PROC_STATUS_LAUNCH:
+ * app_status = "LAUNCHING";
+ * break;
+ * case AUL_PROC_STATUS_FG:
+ * app_status = "VISIBLE";
* break;
- * case 3:
- * app_status = "STATUS_VISIBLE";
+ * case AUL_PROC_STATUS_BG:
+ * app_status = "BACKGROUND";
* break;
- * case 4:
- * app_status = "STATUS_BACKGROUND";
+ * case AUL_PROC_STATUS_FOCUS:
+ * app_status = "FOCUS";
* break;
- * case 5:
- * app_status = "STATUS_FOCUS";
+ * case AUL_PROC_STATUS_HIDE:
+ * app_status = "HIDE";
* break;
* default:
- * app_status = "STATUS_UNKNOWN";
+ * app_status = "UNKNOWN";
* }
*
* printf("pid: %d, status: %s", pid, status);