{
int i = 0;
int rotation = 0;
+ enum tizen_rotation_angle angle = TIZEN_ROTATION_ANGLE_NONE;
+
if (!win) return;
if ((rot % 90 != 0) || (rot / 90 > 3) || (rot < 0)) return;
win->rotation_geometry_hints[i].valid = EINA_TRUE;
if (!win->tz_rot.resource) return;
+ switch (rot)
+ {
+ case 0:
+ angle = TIZEN_ROTATION_ANGLE_0;
+ break;
+ case 90:
+ angle = TIZEN_ROTATION_ANGLE_90;
+ break;
+ case 180:
+ angle = TIZEN_ROTATION_ANGLE_180;
+ break;
+ case 270:
+ angle = TIZEN_ROTATION_ANGLE_270;
+ break;
+ default:
+ break;
+ }
+ tizen_rotation_set_geometry_hint(win->tz_rot.resource,
+ (uint32_t)angle, x, y, w, h);
+
rotation = ecore_wl_window_rotation_get(win);
if ((rotation % 90 != 0) || (rotation / 90 > 3) || (rotation < 0)) return;
if ((i == (rotation / 90)) &&
#define TIZEN_ROTATION_SET_AVAILABLE_ANGLES 1
#define TIZEN_ROTATION_SET_PREFERRED_ANGLE 2
#define TIZEN_ROTATION_ACK_ANGLE_CHANGE 3
+#define TIZEN_ROTATION_SET_GEOMETRY_HINT 4
#define TIZEN_ROTATION_DESTROY_SINCE_VERSION 1
#define TIZEN_ROTATION_SET_AVAILABLE_ANGLES_SINCE_VERSION 1
TIZEN_ROTATION_ACK_ANGLE_CHANGE, serial);
}
+static inline void
+tizen_rotation_set_geometry_hint(struct tizen_rotation *tizen_rotation, uint32_t angle, uint32_t x, uint32_t y, uint32_t w, uint32_t h)
+{
+ wl_proxy_marshal((struct wl_proxy *) tizen_rotation,
+ TIZEN_ROTATION_SET_GEOMETRY_HINT, angle, x, y, w, h);
+}
+
#ifdef __cplusplus
}
#endif
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[] = {
};
WL_EXPORT const struct wl_interface tizen_policy_ext_interface = {
- "tizen_policy_ext", 2,
+ "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,
};