*/
int aul_window_info_get_opaque(aul_window_info_h info, bool *opaque);
+/**
+ * @brief Attach the window below the window of the parent application.
+ * @since_tizen 6.5
+ * @remarks This function is only available for platform level signed applications.
+ *
+ * @param[in] parent_appid The application ID of the parent
+ * @param[in] child_appid The application ID of the child
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ * @remarks This function is only for App Framework internally.
+ */
+int aul_window_attach_below(const char *parent_appid, const char *child_appid);
+
#ifdef __cplusplus
}
#endif
return AUL_R_OK;
}
+
+extern "C" API int aul_window_attach_below(const char* parent_appid,
+ const char* child_appid) {
+ if (parent_appid == nullptr || child_appid == nullptr) {
+ _E("Invalid parameter");
+ return AUL_R_EINVAL;
+ }
+
+ tizen_base::Bundle b {
+ { AUL_K_PARENT_APPID, parent_appid },
+ { AUL_K_CHILD_APPID, child_appid }
+ };
+ int ret = AppRequest(APP_WINDOW_ATTACH_BELOW, getuid())
+ .With(b)
+ .SendSimply();
+ if (ret < 0) {
+ _E("Failed to send request. error(%d)", ret);
+ return ret;
+ }
+
+ return AUL_R_OK;
+}
printf(" get_focused_pid\n");
printf(" attach_window <parent_appid> <child_appid>\n");
printf(" detach_window <child_appid>\n");
+ printf(" attach_window_below <parent_appid> <child_appid>\n");
}
const char* GetNotificationLevelString(aul_window_notification_level_e level) {
return ret;
}
+int HandleAttachWindowBelow(int argc, char** argv) {
+ if (argc < 4) {
+ PrintUsage(argv[0]);
+ return -1;
+ }
+
+ printf("[%s] parent_appid(%s), child_appid(%s)\n", argv[1], argv[2], argv[3]);
+ int ret = aul_window_attach_below(argv[2], argv[3]);
+ printf("[%s] result: %d\n", argv[1], ret);
+ return ret;
+}
+
std::map<std::string, HandleFunc> handlers = {
{ "foreach_window_stack", HandleForeachWindowStack },
{ "get_focused_pid", HandleGetFocusedPid },
{ "attach_window", HandleAttachWindow },
{ "detach_window", HandleDetachWindow },
+ { "attach_window_below", HandleAttachWindowBelow },
};
} // namespace