* @since_tizen 7.5
*/
#define AUL_K_MOUNT_RES_PKGIDS "__AUL_MOUNT_RES_PKGIDS__"
+
+/**
+ * @brief Definition for AUL: X position of the window.
+ * @since_tizen 7.5
+ */
+#define AUL_K_HINT_SCREEN_POS_X "__K_HINT_SCREEN_POS_X"
+
+/**
+ * @brief Definition for AUL: Y position of the window.
+ * @since_tizen 7.5
+ */
+#define AUL_K_HINT_SCREEN_POS_Y "__K_HINT_SCREEN_POS_Y"
+
+/**
+ * @brief Definition for AUL: Width of the window.
+ * @since_tizen 7.5
+ */
+#define AUL_K_HINT_SCREEN_WIDTH "__K_HINT_SCREEN_WIDTH"
+
+/**
+ * @brief Definition for AUL: Height of the window.
+ * @since_tizen 7.5
+ */
+#define AUL_K_HINT_SCREEN_HEIGHT "__K_HINT_SCREEN_HEIGHT"
aul_svc_err_cb err_cb, void *user_data, uid_t uid);
/**
+ * @par Description:
+ * This function sets window position into bundle.
+ *
+ * @param[in] b Bundle object
+ * @param[in] x x position of window
+ * @param[in] y y position of window
+ * @param[in] w width of window
+ * @param[in] h height of window
+ *
+ * @return 0 if success, negative value(<0) if fail
+ * @see aul_svc_get_window_position
+ * @remarks This API is only for Appfw internally.
+ */
+int aul_svc_set_window_position(bundle *b, int x, int y, int w, int h);
+
+/**
+ * @par Description:
+ * This function gets window position into bundle.
+ *
+ * @param[in] b Bundle object
+ * @param[out] x x position of window
+ * @param[out] y y position of window
+ * @param[out] w width of window
+ * @param[out] h height of window
+ *
+ * @return 0 if success, negative value(<0) if fail
+ * @see aul_svc_set_window_position
+ * @remarks This API is only for Appfw internally.
+ */
+int aul_svc_get_window_position(bundle* b, int *x, int *y, int *w, int *h);
+
+/**
* @deprecated Deprecated since 6.5.
*/
int aul_svc_set_defapp(const char *op, const char *mime_type,
free(appid_array);
}
+extern "C" API int aul_svc_set_window_position(bundle* b,
+ int x, int y, int w, int h) {
+ if (b == nullptr) {
+ _E("Invalid parameter");
+ return AUL_SVC_RET_EINVAL;
+ }
+
+ ::SetBundle(b, AUL_K_HINT_SCREEN_POS_X, std::to_string(x).c_str());
+ ::SetBundle(b, AUL_K_HINT_SCREEN_POS_Y, std::to_string(y).c_str());
+ ::SetBundle(b, AUL_K_HINT_SCREEN_WIDTH, std::to_string(w).c_str());
+ ::SetBundle(b, AUL_K_HINT_SCREEN_HEIGHT, std::to_string(h).c_str());
+
+ return AUL_SVC_RET_OK;
+}
+
+extern "C" API int aul_svc_get_window_position(bundle* b,
+ int* x, int* y, int* w, int* h) {
+ if (b == nullptr ||
+ x == nullptr ||
+ y == nullptr ||
+ w == nullptr ||
+ h == nullptr) {
+ _E("Invalid parameter");
+ return AUL_SVC_RET_EINVAL;
+ }
+
+ char* x_str = nullptr;
+ char* y_str = nullptr;
+ char* w_str = nullptr;
+ char* h_str = nullptr;
+
+ bundle_get_str(b , AUL_K_HINT_SCREEN_POS_X, &x_str);
+ bundle_get_str(b , AUL_K_HINT_SCREEN_POS_Y, &y_str);
+ bundle_get_str(b , AUL_K_HINT_SCREEN_WIDTH, &w_str);
+ bundle_get_str(b , AUL_K_HINT_SCREEN_HEIGHT, &h_str);
+
+ if (x_str == nullptr ||
+ y_str == nullptr ||
+ w_str == nullptr ||
+ h_str == nullptr) {
+ _E("failed to get position");
+ return AUL_SVC_RET_ERROR;
+ }
+
+ *x = atoi(x_str);
+ *y = atoi(y_str);
+ *w = atoi(w_str);
+ *h = atoi(h_str);
+
+ return AUL_SVC_RET_OK;
+}
+
extern "C" API int aul_svc_set_defapp(const char* op, const char* mime_type,
const char* uri, const char* defapp) {
DEPRECATION_WARNING();