SET(AUL-1_LIB_PKG_CHECK_MODULES dlog bundle dbus-glib-1 ail xdgmime app-checker libtzplatform-config pkgmgr-info libsystemd-daemon security-manager)
IF (with_wayland)
- pkg_check_modules(libpkgs REQUIRED ${AUL-1_LIB_PKG_CHECK_MODULES} wayland-client)
+ pkg_check_modules(libpkgs REQUIRED ${AUL-1_LIB_PKG_CHECK_MODULES} wayland-client tizen-extension-client)
ENDIF (with_wayland)
IF (with_x11)
pkg_check_modules(libpkgs REQUIRED ${AUL-1_LIB_PKG_CHECK_MODULES})
# aul_mods : modules (static library)
SET(SRCS_aul_mods src/app_sock.c src/simple_util.c)
-IF (with_wayland)
- SET(SRCS_aul_mods ${SRCS_aul_mods} src/tizen-transient-for-protocol.c)
-ENDIF (with_wayland)
add_library(aul_mods STATIC
${SRCS_aul_mods}
)
+++ /dev/null
-#ifndef TIZEN_TRANSIENT_FOR_CLIENT_PROTOCOL_H
-#define TIZEN_TRANSIENT_FOR_CLIENT_PROTOCOL_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <stdint.h>
-#include <stddef.h>
-#include "wayland-client.h"
-
-struct wl_client;
-struct wl_resource;
-
-struct tizen_transient_for;
-
-extern const struct wl_interface tizen_transient_for_interface;
-
-struct tizen_transient_for_listener {
- /**
- * done - (none)
- * @child_id: (none)
- */
- void (*done)(void *data,
- struct tizen_transient_for *tizen_transient_for,
- uint32_t child_id);
-};
-
-static inline int
-tizen_transient_for_add_listener(struct tizen_transient_for *tizen_transient_for,
- const struct tizen_transient_for_listener *listener, void *data)
-{
- return wl_proxy_add_listener((struct wl_proxy *) tizen_transient_for,
- (void (**)(void)) listener, data);
-}
-
-#define TIZEN_TRANSIENT_FOR_SET 0
-#define TIZEN_TRANSIENT_FOR_UNSET 1
-
-static inline void
-tizen_transient_for_set_user_data(struct tizen_transient_for *tizen_transient_for, void *user_data)
-{
- wl_proxy_set_user_data((struct wl_proxy *) tizen_transient_for, user_data);
-}
-
-static inline void *
-tizen_transient_for_get_user_data(struct tizen_transient_for *tizen_transient_for)
-{
- return wl_proxy_get_user_data((struct wl_proxy *) tizen_transient_for);
-}
-
-static inline void
-tizen_transient_for_destroy(struct tizen_transient_for *tizen_transient_for)
-{
- wl_proxy_destroy((struct wl_proxy *) tizen_transient_for);
-}
-
-static inline void
-tizen_transient_for_set(struct tizen_transient_for *tizen_transient_for, uint32_t child_id, uint32_t parent_id)
-{
- wl_proxy_marshal((struct wl_proxy *) tizen_transient_for,
- TIZEN_TRANSIENT_FOR_SET, child_id, parent_id);
-}
-
-static inline void
-tizen_transient_for_unset(struct tizen_transient_for *tizen_transient_for, uint32_t child_id)
-{
- wl_proxy_marshal((struct wl_proxy *) tizen_transient_for,
- TIZEN_TRANSIENT_FOR_UNSET, child_id);
-}
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
BuildRequires: pkgconfig(libsystemd-daemon)
%if %{with wayland}
BuildRequires: pkgconfig(wayland-client)
+BuildRequires: pkgconfig(tizen-extension-client)
%endif
%description
#ifdef WAYLAND
#include <wayland-client.h>
-#include "tizen-transient-for-client-protocol.h"
-static struct tizen_transient_for *tz_transient_for = NULL;
+#include <tizen-extension-client-protocol.h>
+static struct tizen_policy *tz_policy = NULL;
static void
_reg_handle_global(void *data, struct wl_registry *reg, uint32_t id, const char *interface, uint32_t ver)
{
- if (!strcmp(interface, "tizen_transient_for"))
+ if (!strcmp(interface, "tizen_policy"))
{
- tz_transient_for = wl_registry_bind(reg,
+ tz_policy = wl_registry_bind(reg,
id,
- &tizen_transient_for_interface,
+ &tizen_policy_interface,
1);
}
}
wl_registry_add_listener(reg, ®_listener, NULL);
wl_display_roundtrip(dpy);
- if (!tz_transient_for)
+ if (!tz_policy)
{
- _E("ERR: no tizen_surface_extension global interface");
+ _E("ERR: no tizen_policy global interface");
wl_registry_destroy(reg);
wl_display_disconnect(dpy);
return;
}
- tizen_transient_for_set(tz_transient_for, child_wid, parent_wid);
+ tizen_policy_set_transient_for(tz_policy, child_wid, parent_wid);
wl_display_roundtrip(dpy);
- tizen_transient_for_destroy(tz_transient_for);
+ tizen_policy_destroy(tz_policy);
wl_registry_destroy(reg);
wl_display_disconnect(dpy);
#else
wl_registry_add_listener(reg, ®_listener, NULL);
wl_display_roundtrip(dpy);
- if (!tz_transient_for)
+ if (!tz_policy)
{
- _E("ERR: no tizen_surface_extension global interface");
+ _E("ERR: no tz_policy global interface");
wl_registry_destroy(reg);
wl_display_disconnect(dpy);
return;
}
- tizen_transient_for_unset(tz_transient_for, child_wid);
+ tizen_policy_unset_transient_for(tz_policy, child_wid);
wl_display_roundtrip(dpy);
- tizen_transient_for_destroy(tz_transient_for);
+ tizen_policy_destroy(tz_policy);
wl_registry_destroy(reg);
wl_display_disconnect(dpy);
#else
+++ /dev/null
-#include <stdlib.h>
-#include <stdint.h>
-#include "wayland-util.h"
-
-
-static const struct wl_interface *types[] = {
- NULL,
- NULL,
-};
-
-static const struct wl_message tizen_transient_for_requests[] = {
- { "set", "uu", types + 0 },
- { "unset", "u", types + 0 },
-};
-
-static const struct wl_message tizen_transient_for_events[] = {
- { "done", "u", types + 0 },
-};
-
-WL_EXPORT const struct wl_interface tizen_transient_for_interface = {
- "tizen_transient_for", 1,
- 2, tizen_transient_for_requests,
- 1, tizen_transient_for_events,
-};
-