static Policy_Ext_Rotation* _policy_ext_rotation_get(E_Pixmap *ep);
/* local subsystem wayland rotation protocol related functions */
+static void _e_tizen_rotation_destroy_cb(struct wl_client *client, struct wl_resource *resource);
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);
/* local subsystem wayland rotation protocol related variables */
static const struct tizen_rotation_interface _e_tizen_rotation_interface =
{
+ _e_tizen_rotation_destroy_cb,
_e_tizen_rotation_set_available_angles_cb,
_e_tizen_rotation_set_preferred_angle_cb,
_e_tizen_rotation_ack_angle_change_cb,
- /* need rotation destroy request? */
};
static const struct tizen_policy_ext_interface _e_tizen_policy_ext_interface =
{
}
static void
+_e_tizen_rotation_destroy_cb(struct wl_client *client EINA_UNUSED,
+ struct wl_resource *resource)
+{
+ wl_resource_destroy(resource);
+}
+
+static void
_e_tizen_rotation_set_available_angles_cb(struct wl_client *client,
struct wl_resource *resource,
uint32_t angles)
static void
_rot_hook_client_del(void *d EINA_UNUSED, E_Client *ec)
{
+ Policy_Ext_Rotation *ext_rot;
+
_e_client_rotation_list_remove(ec);
if (rot.async_list) rot.async_list = eina_list_remove(rot.async_list, ec);
if (ec->e.state.rot.available_rots)
E_FREE(ec->e.state.rot.available_rots);
+
+ ext_rot = _policy_ext_rotation_get(ec->pixmap);
+ if (ext_rot)
+ E_FREE_LIST(ext_rot->rotation_list, wl_resource_destroy);
}
static void
};
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 },
WL_EXPORT const struct wl_interface tizen_rotation_interface = {
"tizen_rotation", 1,
- 3, tizen_rotation_requests,
+ 4, tizen_rotation_requests,
3, tizen_rotation_events,
};
#include <stdint.h>
#include <stddef.h>
-#include "wayland-server.h"
+#include "wayland-util.h"
struct wl_client;
struct wl_resource;
struct wl_resource *surface);
};
-
#ifndef TIZEN_ROTATION_ANGLE_ENUM
#define TIZEN_ROTATION_ANGLE_ENUM
enum tizen_rotation_angle {
struct tizen_rotation_interface {
/**
+ * destroy - destroy tizen_rotation
+ *
+ *
+ */
+ void (*destroy)(struct wl_client *client,
+ struct wl_resource *resource);
+ /**
* set_available_angles - (none)
* @angles: (none)
*/
#define TIZEN_ROTATION_PREFERRED_ANGLE_DONE 1
#define TIZEN_ROTATION_ANGLE_CHANGE 2
-#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
-
static inline void
tizen_rotation_send_available_angles_done(struct wl_resource *resource_, uint32_t angles)
{
<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>