int app_manager_get_focused_app_context(app_context_h *app_context);
/**
+ * @brief Attaches the window of the child application to the window of the parent application.
+ * @since_tizen 3.0
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/internal/default/platform
+ * @param[in] parent_app_id The ID of the parent application
+ * @param[in] child_app_id The ID of the child applicatio
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ * @retval #APP_MANAGER_ERROR_NONE Successful
+ * @retval #APP_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #APP_MANAGER_ERROR_IO_ERROR Internal I/O error
+ */
+int app_manager_attach_window(const char *parent_app_id, const char *child_app_id);
+
+/**
+ * @brief Detaches the window of the application from its parent window.
+ * @since_tizen 3.0
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/internal/default/platform
+ * @param[in] app_id The ID of the application
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ * @retval #APP_MANAGER_ERROR_NONE Successful
+ * @retval #APP_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #APP_MANAGER_ERROR_IO_ERROR Internal I/O error
+ */
+int app_manager_detach_window(const char *app_id);
+
+/**
* @}
*/
return APP_MANAGER_ERROR_NONE;
}
+
+API int app_manager_attach_window(const char *parent_app_id, const char *child_app_id)
+{
+ int ret;
+
+ if (parent_app_id == NULL || child_app_id == NULL)
+ return app_manager_error(APP_MANAGER_ERROR_INVALID_PARAMETER, __FUNCTION__, NULL);
+
+ ret = aul_window_attach(parent_app_id, child_app_id);
+ if (ret != 0)
+ return app_manager_error(APP_MANAGER_ERROR_IO_ERROR, __FUNCTION__, NULL);
+
+ return APP_MANAGER_ERROR_NONE;
+}
+
+API int app_manager_detach_window(const char *app_id)
+{
+ int ret;
+
+ if (app_id == NULL)
+ return app_manager_error(APP_MANAGER_ERROR_INVALID_PARAMETER, __FUNCTION__, NULL);
+
+ ret = aul_window_detach(app_id);
+ if (ret != 0)
+ return app_manager_error(APP_MANAGER_ERROR_IO_ERROR, __FUNCTION__, NULL);
+
+ return APP_MANAGER_ERROR_NONE;
+}