fi
AM_CONDITIONAL(HAVE_WAYLAND_ONLY, [test "x${have_wayland_only}" = xyes])
-PKG_CHECK_MODULES(ENLIGHTENMENT, [enlightenment, aul, pkgmgr-info])
+PKG_CHECK_MODULES(ENLIGHTENMENT, [enlightenment, aul, pkgmgr-info, tizen-policy-ext-server])
AC_SUBST(ENLIGHTENMENT_CFLAGS)
AC_SUBST(ENLIGHTENMENT_LIBS)
BuildRequires: pkgconfig(capi-system-info)
BuildRequires: pkgconfig(aul)
BuildRequires: pkgconfig(pkgmgr-info)
+BuildRequires: pkgconfig(tizen-policy-ext-server)
%if 0%{?TZ_SYS_RO_SHARE:1}
# TZ_SYS_RO_SHARE is defined
rotation/e_mod_sensord.h
endif
-WL_SRC += tizen_policy_ext-protocol.c \
- tizen_policy_ext-server-protocol.h
-
ROT_SRC += rotation/e_mod_rotation_wl.c \
rotation/e_mod_rotation_wl.h
#include "e_mod_rotation_wl.h"
#include "e_mod_rotation_private.h"
#include <wayland-server.h>
-#include "tizen_policy_ext-server-protocol.h"
+#include "tizen-policy-ext-server-protocol.h"
#ifdef HAVE_AUTO_ROTATION
#include "e_mod_sensord.h"
{
struct wl_resource *res;
- if (!(res = wl_resource_create(client, &tizen_policy_ext_interface3, version, id)))
+ if (!(res = wl_resource_create(client, &tizen_policy_ext_interface, version, id)))
{
ERR("Could not create scaler resource: %m");
wl_client_post_no_memory(client);
EINA_SAFETY_ON_NULL_RETURN_VAL(e_comp_wl, EINA_FALSE);
EINA_SAFETY_ON_NULL_RETURN_VAL(e_comp_wl->wl.disp, EINA_FALSE);
- if (!wl_global_create(e_comp_wl->wl.disp, &tizen_policy_ext_interface3, 3,
+ if (!wl_global_create(e_comp_wl->wl.disp, &tizen_policy_ext_interface, 3,
NULL, _e_tizen_policy_ext_bind_cb))
{
ERR("Could not add tizen_policy_ext to wayland globals: %m");
+++ /dev/null
-#include <stdlib.h>
-#include <stdint.h>
-#include "wayland-util.h"
-
-extern const struct wl_interface tizen_rotation_interface;
-extern const struct wl_interface wl_surface_interface;
-
-static const struct wl_interface *types[] = {
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- &tizen_rotation_interface,
- &wl_surface_interface,
- &wl_surface_interface,
-};
-
-static const struct wl_message tizen_policy_ext_requests[] = {
- { "get_rotation", "no", types + 5 },
- { "get_active_angle", "?o", types + 7 },
-};
-
-static const struct wl_message tizen_policy_ext_events[] = {
- { "active_angle", "u", types + 0 },
-};
-
-WL_EXPORT const struct wl_interface tizen_policy_ext_interface3 = {
- "tizen_policy_ext", 3,
- 2, tizen_policy_ext_requests,
- 1, tizen_policy_ext_events,
-};
-
-static const struct wl_message tizen_rotation_requests[] = {
- { "destroy", "", types + 0 },
- { "set_available_angles", "u", types + 0 },
- { "set_preferred_angle", "u", types + 0 },
- { "ack_angle_change", "u", types + 0 },
- { "set_geometry_hint", "3uuuuu", types + 0 },
-};
-
-static const struct wl_message tizen_rotation_events[] = {
- { "available_angles_done", "u", types + 0 },
- { "preferred_angle_done", "u", types + 0 },
- { "angle_change", "uu", types + 0 },
- { "angle_change_with_resize", "2uuuu", types + 0 },
-};
-
-WL_EXPORT const struct wl_interface tizen_rotation_interface = {
- "tizen_rotation", 3,
- 5, tizen_rotation_requests,
- 4, tizen_rotation_events,
-};
-
+++ /dev/null
-#ifndef TIZEN_POLICY_EXT_SERVER_PROTOCOL_H
-#define TIZEN_POLICY_EXT_SERVER_PROTOCOL_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <stdint.h>
-#include <stddef.h>
-#include "wayland-server.h"
-
-struct wl_client;
-struct wl_resource;
-
-struct tizen_policy_ext;
-struct tizen_rotation;
-struct wl_surface;
-
-extern const struct wl_interface tizen_policy_ext_interface3;
-extern const struct wl_interface tizen_rotation_interface;
-
-struct tizen_policy_ext_interface {
- /**
- * get_rotation - (none)
- * @id: new rotation object
- * @surface: surface object
- */
- void (*get_rotation)(struct wl_client *client,
- struct wl_resource *resource,
- uint32_t id,
- struct wl_resource *surface);
- /**
- * get_active_angle - get a current active angle
- * @surface: (none)
- *
- *
- */
- void (*get_active_angle)(struct wl_client *client,
- struct wl_resource *resource,
- struct wl_resource *surface);
-};
-
-#define TIZEN_POLICY_EXT_ACTIVE_ANGLE 0
-
-#define TIZEN_POLICY_EXT_ACTIVE_ANGLE_SINCE_VERSION 1
-
-static inline void
-tizen_policy_ext_send_active_angle(struct wl_resource *resource_, uint32_t angle)
-{
- wl_resource_post_event(resource_, TIZEN_POLICY_EXT_ACTIVE_ANGLE, angle);
-}
-
-#ifndef TIZEN_ROTATION_ANGLE_ENUM
-#define TIZEN_ROTATION_ANGLE_ENUM
-enum tizen_rotation_angle {
- TIZEN_ROTATION_ANGLE_NONE = 0,
- TIZEN_ROTATION_ANGLE_0 = 1,
- TIZEN_ROTATION_ANGLE_90 = 2,
- TIZEN_ROTATION_ANGLE_180 = 4,
- TIZEN_ROTATION_ANGLE_270 = 8,
-};
-#endif /* TIZEN_ROTATION_ANGLE_ENUM */
-
-struct tizen_rotation_interface {
- /**
- * destroy - destroy tizen_rotation
- *
- *
- */
- void (*destroy)(struct wl_client *client,
- struct wl_resource *resource);
- /**
- * set_available_angles - (none)
- * @angles: (none)
- */
- void (*set_available_angles)(struct wl_client *client,
- struct wl_resource *resource,
- uint32_t angles);
- /**
- * set_preferred_angle - (none)
- * @angle: (none)
- */
- void (*set_preferred_angle)(struct wl_client *client,
- struct wl_resource *resource,
- uint32_t angle);
- /**
- * ack_angle_change - ack a angle_change
- * @serial: a serial to angle_change for
- *
- *
- */
- void (*ack_angle_change)(struct wl_client *client,
- struct wl_resource *resource,
- uint32_t serial);
- /**
- * set_geometry_hint - (none)
- * @angle: (none)
- * @x: (none)
- * @y: (none)
- * @width: (none)
- * @height: (none)
- * @since: 3
- */
- void (*set_geometry_hint)(struct wl_client *client,
- struct wl_resource *resource,
- uint32_t angle,
- uint32_t x,
- uint32_t y,
- uint32_t w,
- uint32_t h);
-};
-
-#define TIZEN_ROTATION_AVAILABLE_ANGLES_DONE 0
-#define TIZEN_ROTATION_PREFERRED_ANGLE_DONE 1
-#define TIZEN_ROTATION_ANGLE_CHANGE 2
-#define TIZEN_ROTATION_ANGLE_CHANGE_WITH_RESIZE 3
-
-#define TIZEN_ROTATION_AVAILABLE_ANGLES_DONE_SINCE_VERSION 1
-#define TIZEN_ROTATION_PREFERRED_ANGLE_DONE_SINCE_VERSION 1
-#define TIZEN_ROTATION_ANGLE_CHANGE_SINCE_VERSION 1
-#define TIZEN_ROTATION_ANGLE_CHANGE_WITH_RESIZE_SINCE_VERSION 2
-
-static inline void
-tizen_rotation_send_available_angles_done(struct wl_resource *resource_, uint32_t angles)
-{
- wl_resource_post_event(resource_, TIZEN_ROTATION_AVAILABLE_ANGLES_DONE, angles);
-}
-
-static inline void
-tizen_rotation_send_preferred_angle_done(struct wl_resource *resource_, uint32_t angle)
-{
- wl_resource_post_event(resource_, TIZEN_ROTATION_PREFERRED_ANGLE_DONE, angle);
-}
-
-static inline void
-tizen_rotation_send_angle_change(struct wl_resource *resource_, uint32_t angle, uint32_t serial)
-{
- wl_resource_post_event(resource_, TIZEN_ROTATION_ANGLE_CHANGE, angle, serial);
-}
-
-static inline void
-tizen_rotation_send_angle_change_with_resize(struct wl_resource *resource_, uint32_t angle, uint32_t serial, uint32_t width, uint32_t height)
-{
- wl_resource_post_event(resource_, TIZEN_ROTATION_ANGLE_CHANGE_WITH_RESIZE, angle, serial, width, height);
-}
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
+++ /dev/null
-<protocol name="tizen_policy_ext">
- <interface name="tizen_policy_ext" version="3">
- <request name="get_rotation">
- <arg name="id" type="new_id" interface="tizen_rotation" summary="new rotation object"/>
- <arg name="surface" type="object" interface="wl_surface" summary="surface object"/>
- </request>
- <request name="get_active_angle">
- <description summary="get a current active angle"/>
- <arg name="surface" type="object" interface="wl_surface" allow-null="true"/>
- </request>
- <event name="active_angle">
- <arg name="angle" type="uint"/>
- </event>
- </interface>
- <interface name="tizen_rotation" version="3">
- <enum name="angle">
- <entry name="none" value = "0"/>
- <entry name="0" value = "1"/>
- <entry name="90" value = "2"/>
- <entry name="180" value = "4"/>
- <entry name="270" value = "8"/>
- </enum>
- <request name="destroy" type="destructor">
- <description summary="destroy tizen_rotation"/>
- </request>
- <request name="set_available_angles">
- <arg name="angles" type="uint"/>
- </request>
- <event name="available_angles_done">
- <arg name="angles" type="uint"/>
- </event>
- <request name="set_preferred_angle">
- <arg name="angle" type="uint"/>
- </request>
- <event name="preferred_angle_done">
- <arg name="angle" type="uint"/>
- </event>
- <event name="angle_change">
- <description summary="suggest a angle_change"/>
- <arg name="angle" type="uint"/>
- <arg name="serial" type="uint"/>
- </event>
- <request name="ack_angle_change">
- <description summary="ack a angle_change"/>
- <arg name="serial" type="uint" summary="a serial to angle_change for"/>
- </request>
-
- <!-- Version 2 addtions -->
- <event name="angle_change_with_resize" since="2">
- <description summary="suggest a angle change with resize of window"/>
- <arg name="angle" type="uint"/>
- <arg name="serial" type="uint"/>
- <arg name="width" type="uint"/>
- <arg name="height" type="uint"/>
- </event>
- <request name="set_geometry_hint" since="3">
- <arg name="angle" type="uint"/>
- <arg name="x" type="uint"/>
- <arg name="y" type="uint"/>
- <arg name="w" type="uint"/>
- <arg name="h" type="uint"/>
- </request>
- </interface>
-</protocol>