static void _e_tizen_rotation_set_available_angles_cb(struct wl_client *client, struct wl_resource *resource, uint32_t angles);
static void _e_tizen_rotation_set_preferred_angle_cb(struct wl_client *client, struct wl_resource *resource, uint32_t angle);
static void _e_tizen_rotation_ack_angle_change_cb(struct wl_client *client, struct wl_resource *resource, uint32_t serial);
+static void _e_tizen_rotation_set_geometry_hint_cb(struct wl_client *client, struct wl_resource *resource, uint32_t angle, uint32_t x, uint32_t y, uint32_t w, uint32_t h);
static void _e_tizen_rotation_destroy(struct wl_resource *resource);
static void _e_tizen_rotation_send_angle_change(E_Client *ec, int angle);
static void _e_tizen_policy_ext_get_rotation_cb(struct wl_client *client, struct wl_resource *resource, uint32_t id, struct wl_resource *surface);
_e_tizen_rotation_set_available_angles_cb,
_e_tizen_rotation_set_preferred_angle_cb,
_e_tizen_rotation_ack_angle_change_cb,
+ _e_tizen_rotation_set_geometry_hint_cb,
};
static const struct tizen_policy_ext_interface _e_tizen_policy_ext_interface =
{
}
static void
+_e_tizen_rotation_set_geometry_hint_cb(struct wl_client *client,
+ struct wl_resource *resource,
+ uint32_t angle,
+ uint32_t x, uint32_t y, uint32_t w, uint32_t h)
+{
+ E_Client *ec;
+ Policy_Ext_Rotation *rot;
+ int i = -1;
+
+ rot = wl_resource_get_user_data(resource);
+ EINA_SAFETY_ON_NULL_RETURN(rot);
+
+ ec = rot->ec;
+ if (!ec)
+ return;
+
+ switch (angle)
+ {
+ case TIZEN_ROTATION_ANGLE_0:
+ i = 0;
+ break;
+ case TIZEN_ROTATION_ANGLE_90:
+ i = 1;
+ break;
+ case TIZEN_ROTATION_ANGLE_180:
+ i = 2;
+ break;
+ case TIZEN_ROTATION_ANGLE_270:
+ i = 3;
+ break;
+ default:
+ return;
+ }
+
+ ec->e.state.rot.geom[i].x = x;
+ ec->e.state.rot.geom[i].y = y;
+ ec->e.state.rot.geom[i].w = w;
+ ec->e.state.rot.geom[i].h = h;
+}
+
+static void
_e_tizen_rotation_destroy(struct wl_resource *resource)
{
Policy_Ext_Rotation *ext_rot;
{
struct wl_resource *res;
- if (!(res = wl_resource_create(client, &tizen_policy_ext_interface2, version, id)))
+ if (!(res = wl_resource_create(client, &tizen_policy_ext_interface3, 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_interface2, 2,
+ if (!wl_global_create(e_comp_wl->wl.disp, &tizen_policy_ext_interface3, 3,
NULL, _e_tizen_policy_ext_bind_cb))
{
ERR("Could not add tizen_policy_ext to wayland globals: %m");
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 + 4 },
- { "get_active_angle", "?o", types + 6 },
+ { "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_interface2 = {
- "tizen_policy_ext", 2,
+WL_EXPORT const struct wl_interface tizen_policy_ext_interface3 = {
+ "tizen_policy_ext", 3,
2, tizen_policy_ext_requests,
1, tizen_policy_ext_events,
};
{ "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[] = {
};
WL_EXPORT const struct wl_interface tizen_rotation_interface = {
- "tizen_rotation", 2,
- 4, tizen_rotation_requests,
+ "tizen_rotation", 3,
+ 5, tizen_rotation_requests,
4, tizen_rotation_events,
};
struct tizen_rotation;
struct wl_surface;
-extern const struct wl_interface tizen_policy_ext_interface2;
+extern const struct wl_interface tizen_policy_ext_interface3;
extern const struct wl_interface tizen_rotation_interface;
struct tizen_policy_ext_interface {
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
<protocol name="tizen_policy_ext">
- <interface name="tizen_policy_ext" version="2">
+ <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"/>
<arg name="angle" type="uint"/>
</event>
</interface>
- <interface name="tizen_rotation" version="2">
+ <interface name="tizen_rotation" version="3">
<enum name="angle">
<entry name="none" value = "0"/>
<entry name="0" value = "1"/>
<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>