#include <tizen-extension-server-protocol.h>
+typedef struct _E_Subsurface E_Subsurface;
+
+struct _E_Subsurface
+{
+ /* NOTE
+ * DO NOT move 'base' from first field.
+ * The address of it is assigned to ec->comp_data->sub.data and be used
+ * to access not only E_Comp_Wl_Subsurf_Data, but also E_Subsurface. */
+ E_Comp_Wl_Subsurf_Data base;
+};
+
static struct wl_global *global = NULL;
static Eina_List *hooks = NULL;
static Eina_List *handlers = NULL;
{
struct wl_client *client;
struct wl_resource *res;
+ E_Subsurface *sub;
E_Comp_Wl_Subsurf_Data *sdata;
E_Client *offscreen_parent = NULL;
* to not post error to wl_client. */
e_comp_wl_surface_role_set(ec, e_comp_wl_subsurface_role_name, NULL, 0);
- /* try to allocate subsurface data */
- if (!(sdata = E_NEW(E_Comp_Wl_Subsurf_Data, 1)))
+ sub = E_NEW(E_Subsurface, 1);
+ if (!sub)
{
- ERR("Could not allocate space for subsurface data");
+ ERR("Could not allocate space for E_Subsurface");
wl_resource_destroy(res);
return EINA_FALSE;
}
_e_comp_wl_subsurface_destroy);
e_object_ref(E_OBJECT(ec));
+ sdata = &sub->base;
e_comp_wl_surface_state_init(&sdata->cached, ec->w, ec->h);
/* set subsurface data properties */