The application can add a new app group to the app group.
The window will be attached to the app group of the main window.
Adds:
- aul_app_group_add()
- aul_app_group_remove()
Change-Id: I5432e2fa5d3e6354d4e6e4c2d2b70034cdfc6113
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
*/
int aul_app_group_lower_v2(const char *id, bool *exit);
+/**
+ * @brief Adds a new app group to the app group.
+ * @details A new app group will be added using the given window ID.
+ * @since_tizen 6.0
+ *
+ * @param[in] wid The window(surface) ID
+ * @return @c 0 on success,
+ * otherwise a negatvie error value
+ *
+ * @remarks This function is only for App Framework internally.
+ */
+int aul_app_group_add(int wid);
+
+/**
+ * @brief Removes the app group using the given window ID.
+ * @since_tizen 6.0
+ *
+ * @param[in] wid The window(surface) ID
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ *
+ * @remarks This function is only for App Framework internally.
+ */
+int aul_app_group_remove(int wid);
+
#ifdef __cplusplus
}
#endif
APP_CONTEXT_GET = 146,
APP_CONTEXT_GET_BY_INSTANCE_ID = 147,
APP_CONTEXT_GET_BY_PID = 148,
+ APP_GROUP_ADD = 149,
+ APP_GROUP_REMOVE = 150,
APP_CMD_MAX
};
* @since_tizen 5.5
*/
#define AUL_K_EVENT_DATA "__AUL_EVENT_DATA__"
+
+/**
+ * @brief Definition for AUL: The value for supporting positioning of the app group.
+ * @details If the key exists, the callee app group will be inserted into
+ * the app group before the given position.
+ * @since_tizen 6.0
+ */
+#define AUL_K_INSERT_BEFORE_WINDOW "__K_INSERT_BEFORE_WINDOW"
return AUL_R_OK;
}
+
+static int __send_cmd_with_wid(int cmd, int wid)
+{
+ char buf[12];
+ bundle *b;
+ int ret;
+
+ if (wid <= 0) {
+ _E("Invalid parameter");
+ return AUL_R_EINVAL;
+ }
+
+ b = bundle_create();
+ if (!b) {
+ _E("Out of memory");
+ return AUL_R_ENOMEM;
+ }
+
+ snprintf(buf, sizeof(buf), "%d", wid);
+ bundle_add(b, AUL_K_WID, buf);
+
+ ret = app_send_cmd_with_noreply(AUL_UTIL_PID, cmd, b);
+ bundle_free(b);
+ return ret;
+}
+
+API int aul_app_group_add(int wid)
+{
+ return __send_cmd_with_wid(APP_GROUP_ADD, wid);
+}
+
+API int aul_app_group_remove(int wid)
+{
+ return __send_cmd_with_wid(APP_GROUP_REMOVE, wid);
+}
"APP_CONTEXT_GET",
"APP_CONTEXT_GET_BY_INSTANCE_ID",
"APP_CONTEXT_GET_BY_PID",
+ "APP_GROUP_ADD",
+ "APP_GROUP_REMOVE",
"CUSTOM_COMMAND"
};