summaryrefslogtreecommitdiff
path: root/src/lib/efl_wl
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@samsung.com>2020-03-12 12:15:27 -0400
committerMike Blumenkrantz <zmike@samsung.com>2020-03-12 12:17:07 -0400
commite6573154dcb291dc38099fba1055293b1e7b85d7 (patch)
treec690ee18cf8dc9f578f4345b0877be3b5e671f04 /src/lib/efl_wl
parent798fdfbc70a8160d7ec89a5829c01a0fccb40dd9 (diff)
efl-wl: start conversion to eo
Summary: this converts the main efl-wl object to an eo-based canvas group object Depends on D11465 Reviewers: segfaultxavi, bu5hm4n Reviewed By: bu5hm4n Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D11454
Diffstat (limited to 'src/lib/efl_wl')
-rw-r--r--src/lib/efl_wl/Efl_Wl.h58
-rw-r--r--src/lib/efl_wl/efl_wl.c440
-rw-r--r--src/lib/efl_wl/efl_wl.eo99
-rw-r--r--src/lib/efl_wl/meson.build37
4 files changed, 333 insertions, 301 deletions
diff --git a/src/lib/efl_wl/Efl_Wl.h b/src/lib/efl_wl/Efl_Wl.h
index a866a4ee13..ee36eb74bb 100644
--- a/src/lib/efl_wl/Efl_Wl.h
+++ b/src/lib/efl_wl/Efl_Wl.h
@@ -1,24 +1,35 @@
1#ifdef EFL_BETA_API_SUPPORT
2
3#ifndef EFL_WL_H 1#ifndef EFL_WL_H
4# define EFL_WL_H 2# define EFL_WL_H
5#include <Evas.h> 3#include <Evas.h>
6#include <Ecore.h> 4#include <Efl_Core.h>
7 5
8#ifdef EAPI 6#ifdef EAPI
9# undef EAPI 7# undef EAPI
10#endif 8#endif
9#ifdef EAPI_WEAK
10# undef EAPI_WEAK
11#endif
11 12
12#ifdef __GNUC__ 13# ifdef __GNUC__
13# if __GNUC__ >= 4 14# if __GNUC__ >= 4
14# define EAPI __attribute__ ((visibility("default"))) 15# define EAPI __attribute__ ((visibility("default")))
15# else 16# define EAPI_WEAK
16# define EAPI 17# else
18# define EAPI
19# define EAPI_WEAK
20# endif
17# endif 21# endif
18#else
19# define EAPI
20#endif
21 22
23#define EWAPI EAPI EAPI_WEAK
24
25
26typedef struct Efl_Wl_Wl_Surface Efl_Wl_Wl_Surface;
27typedef struct Efl_Wl_Wl_Global Efl_Wl_Wl_Global;
28typedef struct Efl_Wl_Wl_Interface Efl_Wl_Wl_Interface;
29typedef void * Efl_Wl_Wl_Interface_Data;
30typedef void * Efl_Wl_Wl_Interface_Bind_Cb;
31
32#include <efl_wl.eo.h>
22/** 33/**
23 * @defgroup Efl_Wl_Group EFL Wayland 34 * @defgroup Efl_Wl_Group EFL Wayland
24 * 35 *
@@ -27,19 +38,7 @@
27 * @since 1.20 38 * @since 1.20
28 * @{ 39 * @{
29 */ 40 */
30 41#if 0
31/**
32 * @typedef Efl_Wl_Rotation
33 * The rotation to apply to the compositor's internal wl_output
34 */
35typedef enum
36{
37 EFL_WL_ROTATION_0,
38 EFL_WL_ROTATION_90,
39 EFL_WL_ROTATION_180,
40 EFL_WL_ROTATION_270
41} Efl_Wl_Rotation;
42
43/** 42/**
44 * Add a compositor widget to the given canvas. 43 * Add a compositor widget to the given canvas.
45 * 44 *
@@ -103,7 +102,7 @@ EAPI void efl_wl_pid_del(Evas_Object *obj, int32_t pid);
103 * @param obj The compositor widget 102 * @param obj The compositor widget
104 * @return EINA_TRUE if the window stacking was changed 103 * @return EINA_TRUE if the window stacking was changed
105 */ 104 */
106EAPI Eina_Bool efl_wl_next(Evas_Object *obj); 105EAPI Eina_Bool efl_wl_surface_next(Evas_Object *obj);
107 106
108/** 107/**
109 * Put the second top-most toplevel window on top and apply focus to it 108 * Put the second top-most toplevel window on top and apply focus to it
@@ -111,7 +110,7 @@ EAPI Eina_Bool efl_wl_next(Evas_Object *obj);
111 * @param obj The compositor widget 110 * @param obj The compositor widget
112 * @return EINA_TRUE if the window stacking was changed 111 * @return EINA_TRUE if the window stacking was changed
113 */ 112 */
114EAPI Eina_Bool efl_wl_prev(Evas_Object *obj); 113EAPI Eina_Bool efl_wl_surface_prev(Evas_Object *obj);
115 114
116/** 115/**
117 * Set rotation and flip for the compositor's output 116 * Set rotation and flip for the compositor's output
@@ -165,7 +164,7 @@ EAPI void efl_wl_minmax_set(Evas_Object *obj, Eina_Bool set);
165 * @since 1.21 164 * @since 1.21
166 */ 165 */
167EAPI void *efl_wl_global_add(Evas_Object *obj, const void *interface, uint32_t version, void *data, void *bind_cb); 166EAPI void *efl_wl_global_add(Evas_Object *obj, const void *interface, uint32_t version, void *data, void *bind_cb);
168 167#endif
169/** 168/**
170 * Extract a child surface from the compositor 169 * Extract a child surface from the compositor
171 * 170 *
@@ -236,6 +235,9 @@ EAPI void efl_wl_seat_keymap_set(Evas_Object *obj, Eo *seat, void *state, char *
236 * @since 1.21 235 * @since 1.21
237 */ 236 */
238EAPI void efl_wl_seat_key_repeat_set(Evas_Object *obj, Eo *seat, int repeat_rate, int repeat_delay); 237EAPI void efl_wl_seat_key_repeat_set(Evas_Object *obj, Eo *seat, int repeat_rate, int repeat_delay);
239#endif
240 238
239#undef EAPI
240#define EAPI
241#undef EAPI_WEAK
242#define EAPI_WEAK
241#endif 243#endif
diff --git a/src/lib/efl_wl/efl_wl.c b/src/lib/efl_wl/efl_wl.c
index 2aef1368ce..defa800066 100644
--- a/src/lib/efl_wl/efl_wl.c
+++ b/src/lib/efl_wl/efl_wl.c
@@ -1,3 +1,6 @@
1#define EFL_INTERNAL_UNSTABLE
2#define EFL_CANVAS_GROUP_PROTECTED
3
1#ifdef HAVE_CONFIG_H 4#ifdef HAVE_CONFIG_H
2# include "config.h" 5# include "config.h"
3#endif 6#endif
@@ -34,7 +37,8 @@
34# ifdef HAVE_ECORE_X 37# ifdef HAVE_ECORE_X
35#include "Ecore_X.h" 38#include "Ecore_X.h"
36#endif 39#endif
37 40#include "Evas_Internal.h"
41#include "canvas/evas_canvas_eo.h"
38#include "Efl_Wl.h" 42#include "Efl_Wl.h"
39 43
40#undef COORDS_INSIDE 44#undef COORDS_INSIDE
@@ -84,6 +88,7 @@
84 WL_DATA_DEVICE_MANAGER_DND_ACTION_MOVE | \ 88 WL_DATA_DEVICE_MANAGER_DND_ACTION_MOVE | \
85 WL_DATA_DEVICE_MANAGER_DND_ACTION_ASK) 89 WL_DATA_DEVICE_MANAGER_DND_ACTION_ASK)
86 90
91#define MY_CLASS EFL_WL_CLASS
87 92
88typedef struct Input_Sequence 93typedef struct Input_Sequence
89{ 94{
@@ -124,12 +129,11 @@ typedef struct Comp
124 struct wl_display *display; 129 struct wl_display *display;
125 130
126 double wayland_time_base; 131 double wayland_time_base;
127 Evas_Object *obj; 132 Eo *obj;
128 Evas_Object *clip; 133 Eo *clip;
129 Evas_Object *events; 134 Eo *events;
130 135
131 Eina_Hash *exes; 136 Eina_Hash *exes;
132 Ecore_Event_Handler *exe_handler;
133 137
134 Eina_Inlist *surfaces; 138 Eina_Inlist *surfaces;
135 unsigned int surfaces_count; 139 unsigned int surfaces_count;
@@ -229,7 +233,7 @@ typedef struct Comp_Seat
229 } cursor; 233 } cursor;
230 struct 234 struct
231 { 235 {
232 Evas_Object *obj; 236 Eo *obj;
233 int layer; 237 int layer;
234 int x, y; 238 int x, y;
235 } efl; 239 } efl;
@@ -294,9 +298,9 @@ struct Comp_Surface
294{ 298{
295 EINA_INLIST; 299 EINA_INLIST;
296 Comp *c; 300 Comp *c;
297 Evas_Object *obj; 301 Eo *obj;
298 Evas_Object *clip; 302 Eo *clip;
299 Evas_Object *img; 303 Eo *img;
300 Eina_Array *input_rects; 304 Eina_Array *input_rects;
301 Eina_Array *opaque_rects; 305 Eina_Array *opaque_rects;
302 Eina_List *proxies; 306 Eina_List *proxies;
@@ -571,12 +575,12 @@ seat_tch_resources_get(Comp_Seat *s, struct wl_client *client)
571 return s->tch.resources ? eina_hash_find(s->tch.resources, &client) : NULL; 575 return s->tch.resources ? eina_hash_find(s->tch.resources, &client) : NULL;
572} 576}
573 577
574static void comp_render_pre_proxied(Evas_Object *o, Evas *e, void *event_info); 578static void comp_render_pre_proxied(Eo *o, Evas *e, void *event_info);
575static void comp_render_post_proxied(Comp_Surface *cs, Evas *e, void *event_info); 579static void comp_render_post_proxied(Comp_Surface *cs, Evas *e, void *event_info);
576static void comp_surface_commit_image_state(Comp_Surface *cs, Comp_Buffer *buffer, Evas_Object *o); 580static void comp_surface_commit_image_state(Comp_Surface *cs, Comp_Buffer *buffer, Eo *o);
577 581
578static void 582static void
579comp_surface_proxy_del(void *data, Evas *e, Evas_Object *obj, void *event_info EINA_UNUSED) 583comp_surface_proxy_del(void *data, Evas *e, Eo *obj, void *event_info EINA_UNUSED)
580{ 584{
581 Comp_Surface *cs = data; 585 Comp_Surface *cs = data;
582 int i; 586 int i;
@@ -598,7 +602,7 @@ comp_surface_proxy_del(void *data, Evas *e, Evas_Object *obj, void *event_info E
598} 602}
599 603
600static void 604static void
601comp_surface_proxy_resize(void *data, Evas *e EINA_UNUSED, Evas_Object *obj, void *event_info EINA_UNUSED) 605comp_surface_proxy_resize(void *data, Evas *e EINA_UNUSED, Eo *obj, void *event_info EINA_UNUSED)
602{ 606{
603 int w, h; 607 int w, h;
604 608
@@ -643,7 +647,7 @@ comp_surface_proxy_win_del(Ecore_Evas *ee)
643static void 647static void
644seat_drag_proxy_win_add(Comp_Seat *s) 648seat_drag_proxy_win_add(Comp_Seat *s)
645{ 649{
646 Evas_Object *o; 650 Eo *o;
647 651
648 if (s->drag.proxy_win) abort(); 652 if (s->drag.proxy_win) abort();
649 evas_object_hide(s->drag.surface->obj); 653 evas_object_hide(s->drag.surface->obj);
@@ -1344,7 +1348,7 @@ comp_surface_buffer_post_render(Comp_Surface *cs)
1344} 1348}
1345 1349
1346static void 1350static void
1347comp_surface_pixels_get(void *data, Evas_Object *obj) 1351comp_surface_pixels_get(void *data, Eo *obj)
1348{ 1352{
1349 Comp_Surface *cs = data; 1353 Comp_Surface *cs = data;
1350 Comp_Buffer *buffer; 1354 Comp_Buffer *buffer;
@@ -1358,7 +1362,7 @@ comp_surface_pixels_get(void *data, Evas_Object *obj)
1358} 1362}
1359 1363
1360static void 1364static void
1361comp_surface_commit_image_state(Comp_Surface *cs, Comp_Buffer *buffer, Evas_Object *o) 1365comp_surface_commit_image_state(Comp_Surface *cs, Comp_Buffer *buffer, Eo *o)
1362{ 1366{
1363 if ((!buffer->renders) || (!eina_list_data_find(buffer->renders, evas_object_evas_get(o)))) 1367 if ((!buffer->renders) || (!eina_list_data_find(buffer->renders, evas_object_evas_get(o))))
1364 buffer->renders = eina_list_append(buffer->renders, evas_object_evas_get(o)); 1368 buffer->renders = eina_list_append(buffer->renders, evas_object_evas_get(o));
@@ -1410,7 +1414,7 @@ comp_surface_commit_state(Comp_Surface *cs, Comp_Buffer_State *state)
1410{ 1414{
1411 int x, y; 1415 int x, y;
1412 Eina_List *l; 1416 Eina_List *l;
1413 Evas_Object *o; 1417 Eo *o;
1414 Comp_Buffer *buffer = NULL; 1418 Comp_Buffer *buffer = NULL;
1415 Eina_Bool newly_new = EINA_FALSE; 1419 Eina_Bool newly_new = EINA_FALSE;
1416 1420
@@ -1513,7 +1517,7 @@ comp_surface_commit_state(Comp_Surface *cs, Comp_Buffer_State *state)
1513 { 1517 {
1514 Eina_Iterator *it; 1518 Eina_Iterator *it;
1515 Eina_Rectangle *rect; 1519 Eina_Rectangle *rect;
1516 Evas_Object *r; 1520 Eo *r;
1517 1521
1518 it = eina_tiler_iterator_new(state->opaque); 1522 it = eina_tiler_iterator_new(state->opaque);
1519 cs->opaque_rects = eina_array_new(1); 1523 cs->opaque_rects = eina_array_new(1);
@@ -1550,7 +1554,7 @@ comp_surface_commit_state(Comp_Surface *cs, Comp_Buffer_State *state)
1550 { 1554 {
1551 Eina_Iterator *it; 1555 Eina_Iterator *it;
1552 Eina_Rectangle *rect; 1556 Eina_Rectangle *rect;
1553 Evas_Object *r; 1557 Eo *r;
1554 1558
1555 array_clear(&cs->input_rects); 1559 array_clear(&cs->input_rects);
1556 it = eina_tiler_iterator_new(state->input); 1560 it = eina_tiler_iterator_new(state->input);
@@ -1906,7 +1910,7 @@ comp_surface_impl_destroy(struct wl_resource *resource)
1906 if (cs->post_render_queue && (!cs->dead)) 1910 if (cs->post_render_queue && (!cs->dead))
1907 { 1911 {
1908 Eina_List *l; 1912 Eina_List *l;
1909 Evas_Object *o; 1913 Eo *o;
1910 1914
1911 cs->dead = 1; 1915 cs->dead = 1;
1912 evas_object_hide(cs->obj); 1916 evas_object_hide(cs->obj);
@@ -2017,7 +2021,7 @@ comp_surface_send_pointer_enter(Comp_Surface *cs, Comp_Seat *s, int cx, int cy)
2017} 2021}
2018 2022
2019static void 2023static void
2020comp_surface_mouse_in(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info) 2024comp_surface_mouse_in(void *data, Evas *e EINA_UNUSED, Eo *obj EINA_UNUSED, void *event_info)
2021{ 2025{
2022 Evas_Event_Mouse_In *ev = event_info; 2026 Evas_Event_Mouse_In *ev = event_info;
2023 Comp_Seat *s; 2027 Comp_Seat *s;
@@ -2071,7 +2075,7 @@ comp_surface_send_pointer_leave(Comp_Surface *cs, Comp_Seat *s)
2071} 2075}
2072 2076
2073static void 2077static void
2074comp_surface_mouse_out(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info) 2078comp_surface_mouse_out(void *data, Evas *e EINA_UNUSED, Eo *obj EINA_UNUSED, void *event_info)
2075{ 2079{
2076 Evas_Event_Mouse_Out *ev = event_info; 2080 Evas_Event_Mouse_Out *ev = event_info;
2077 Comp_Seat *s; 2081 Comp_Seat *s;
@@ -2154,7 +2158,7 @@ comp_surface_mouse_button(Comp_Surface *cs, Comp_Seat *s, uint32_t timestamp, ui
2154} 2158}
2155 2159
2156static void 2160static void
2157comp_surface_mouse_down(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info) 2161comp_surface_mouse_down(void *data, Evas *e EINA_UNUSED, Eo *obj EINA_UNUSED, void *event_info)
2158{ 2162{
2159 Evas_Event_Mouse_Down *ev = event_info; 2163 Evas_Event_Mouse_Down *ev = event_info;
2160 Comp_Seat *s; 2164 Comp_Seat *s;
@@ -2169,7 +2173,7 @@ comp_surface_mouse_down(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_U
2169} 2173}
2170 2174
2171static void 2175static void
2172comp_surface_mouse_up(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info) 2176comp_surface_mouse_up(void *data, Evas *e EINA_UNUSED, Eo *obj EINA_UNUSED, void *event_info)
2173{ 2177{
2174 Evas_Event_Mouse_Down *ev = event_info; 2178 Evas_Event_Mouse_Down *ev = event_info;
2175 Comp_Seat *s; 2179 Comp_Seat *s;
@@ -2184,7 +2188,7 @@ comp_surface_mouse_up(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNU
2184} 2188}
2185 2189
2186static void 2190static void
2187comp_surface_mouse_move(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info) 2191comp_surface_mouse_move(void *data, Evas *e EINA_UNUSED, Eo *obj EINA_UNUSED, void *event_info)
2188{ 2192{
2189 Evas_Event_Mouse_Move *ev = event_info; 2193 Evas_Event_Mouse_Move *ev = event_info;
2190 Comp_Surface *cs = data; 2194 Comp_Surface *cs = data;
@@ -2229,7 +2233,7 @@ comp_surface_mouse_move(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_U
2229} 2233}
2230 2234
2231static void 2235static void
2232comp_surface_mouse_wheel(void *data, Evas *evas EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event) 2236comp_surface_mouse_wheel(void *data, Evas *evas EINA_UNUSED, Eo *obj EINA_UNUSED, void *event)
2233{ 2237{
2234 Evas_Event_Mouse_Wheel *ev = event; 2238 Evas_Event_Mouse_Wheel *ev = event;
2235 Comp_Surface *cs = data; 2239 Comp_Surface *cs = data;
@@ -2262,7 +2266,7 @@ comp_surface_mouse_wheel(void *data, Evas *evas EINA_UNUSED, Evas_Object *obj EI
2262} 2266}
2263 2267
2264static void 2268static void
2265comp_surface_multi_down(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info) 2269comp_surface_multi_down(void *data, Evas *e EINA_UNUSED, Eo *obj EINA_UNUSED, void *event_info)
2266{ 2270{
2267 Evas_Event_Multi_Down *ev = event_info; 2271 Evas_Event_Multi_Down *ev = event_info;
2268 Comp_Surface *cs = data; 2272 Comp_Surface *cs = data;
@@ -2296,7 +2300,7 @@ comp_surface_multi_down(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_U
2296} 2300}
2297 2301
2298static void 2302static void
2299comp_surface_multi_up(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info) 2303comp_surface_multi_up(void *data, Evas *e EINA_UNUSED, Eo *obj EINA_UNUSED, void *event_info)
2300{ 2304{
2301 Evas_Event_Multi_Up *ev = event_info; 2305 Evas_Event_Multi_Up *ev = event_info;
2302 Comp_Surface *cs = data; 2306 Comp_Surface *cs = data;
@@ -2335,7 +2339,7 @@ comp_surface_multi_up(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNU
2335} 2339}
2336 2340
2337static void 2341static void
2338comp_surface_multi_move(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info) 2342comp_surface_multi_move(void *data, Evas *e EINA_UNUSED, Eo *obj EINA_UNUSED, void *event_info)
2339{ 2343{
2340 Evas_Event_Multi_Move *ev = event_info; 2344 Evas_Event_Multi_Move *ev = event_info;
2341 Comp_Surface *cs = data; 2345 Comp_Surface *cs = data;
@@ -2376,7 +2380,7 @@ comp_surface_multi_move(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_U
2376} 2380}
2377 2381
2378static void 2382static void
2379comp_surface_smart_add(Evas_Object *obj) 2383comp_surface_smart_add(Eo *obj)
2380{ 2384{
2381 Comp_Surface *cs; 2385 Comp_Surface *cs;
2382 Evas *e; 2386 Evas *e;
@@ -2405,7 +2409,7 @@ comp_surface_smart_add(Evas_Object *obj)
2405} 2409}
2406 2410
2407static void 2411static void
2408comp_surface_smart_del(Evas_Object *obj) 2412comp_surface_smart_del(Eo *obj)
2409{ 2413{
2410 Comp_Surface *cs = evas_object_smart_data_get(obj); 2414 Comp_Surface *cs = evas_object_smart_data_get(obj);
2411 2415
@@ -2435,10 +2439,10 @@ comp_surface_smart_del(Evas_Object *obj)
2435} 2439}
2436 2440
2437static void 2441static void
2438comp_surface_smart_move(Evas_Object *obj, int x, int y) 2442comp_surface_smart_move(Eo *obj, int x, int y)
2439{ 2443{
2440 Eina_List *l; 2444 Eina_List *l;
2441 Evas_Object *o; 2445 Eo *o;
2442 int px, py, cx, cy; 2446 int px, py, cx, cy;
2443 2447
2444 evas_object_geometry_get(obj, &px, &py, NULL, NULL); 2448 evas_object_geometry_get(obj, &px, &py, NULL, NULL);
@@ -2457,7 +2461,7 @@ comp_surface_smart_move(Evas_Object *obj, int x, int y)
2457} 2461}
2458 2462
2459static void 2463static void
2460comp_surface_smart_resize(Evas_Object *obj, int w, int h) 2464comp_surface_smart_resize(Eo *obj, int w, int h)
2461{ 2465{
2462 Comp_Surface *cs = evas_object_smart_data_get(obj); 2466 Comp_Surface *cs = evas_object_smart_data_get(obj);
2463 evas_object_resize(cs->clip, w, h); 2467 evas_object_resize(cs->clip, w, h);
@@ -2467,7 +2471,7 @@ comp_surface_smart_resize(Evas_Object *obj, int w, int h)
2467} 2471}
2468 2472
2469static void 2473static void
2470comp_surface_smart_show(Evas_Object *obj) 2474comp_surface_smart_show(Eo *obj)
2471{ 2475{
2472 Comp_Surface *cs = evas_object_smart_data_get(obj); 2476 Comp_Surface *cs = evas_object_smart_data_get(obj);
2473 evas_object_show(cs->clip); 2477 evas_object_show(cs->clip);
@@ -2475,7 +2479,7 @@ comp_surface_smart_show(Evas_Object *obj)
2475} 2479}
2476 2480
2477static void 2481static void
2478comp_surface_smart_hide(Evas_Object *obj) 2482comp_surface_smart_hide(Eo *obj)
2479{ 2483{
2480 Comp_Surface *pcs = NULL, *lcs, *cs = evas_object_smart_data_get(obj); 2484 Comp_Surface *pcs = NULL, *lcs, *cs = evas_object_smart_data_get(obj);
2481 2485
@@ -2516,28 +2520,28 @@ comp_surface_smart_hide(Evas_Object *obj)
2516} 2520}
2517 2521
2518static void 2522static void
2519comp_surface_smart_clip_set(Evas_Object *obj, Evas_Object *clip) 2523comp_surface_smart_clip_set(Eo *obj, Eo *clip)
2520{ 2524{
2521 Comp_Surface *cs = evas_object_smart_data_get(obj); 2525 Comp_Surface *cs = evas_object_smart_data_get(obj);
2522 evas_object_clip_set(cs->clip, clip); 2526 evas_object_clip_set(cs->clip, clip);
2523} 2527}
2524 2528
2525static void 2529static void
2526comp_surface_smart_clip_unset(Evas_Object *obj) 2530comp_surface_smart_clip_unset(Eo *obj)
2527{ 2531{
2528 Comp_Surface *cs = evas_object_smart_data_get(obj); 2532 Comp_Surface *cs = evas_object_smart_data_get(obj);
2529 evas_object_clip_unset(cs->clip); 2533 evas_object_clip_unset(cs->clip);
2530} 2534}
2531 2535
2532static void 2536static void
2533comp_surface_smart_member_add(Evas_Object *obj, Evas_Object *child) 2537comp_surface_smart_member_add(Eo *obj, Eo *child)
2534{ 2538{
2535 Comp_Surface *cs = evas_object_smart_data_get(obj); 2539 Comp_Surface *cs = evas_object_smart_data_get(obj);
2536 if (child != cs->clip) evas_object_clip_set(child, cs->clip); 2540 if (child != cs->clip) evas_object_clip_set(child, cs->clip);
2537} 2541}
2538 2542
2539static void 2543static void
2540comp_surface_smart_member_del(Evas_Object *obj, Evas_Object *child) 2544comp_surface_smart_member_del(Eo *obj, Eo *child)
2541{ 2545{
2542 Comp_Surface *cs = evas_object_smart_data_get(obj); 2546 Comp_Surface *cs = evas_object_smart_data_get(obj);
2543 if (child != cs->clip) evas_object_clip_unset(child); 2547 if (child != cs->clip) evas_object_clip_unset(child);
@@ -2580,7 +2584,7 @@ comp_surface_create(struct wl_client *client, struct wl_resource *resource, uint
2580 struct wl_resource *res; 2584 struct wl_resource *res;
2581 Comp_Surface *cs; 2585 Comp_Surface *cs;
2582 Comp *c = wl_resource_get_user_data(resource); 2586 Comp *c = wl_resource_get_user_data(resource);
2583 Evas_Object *obj; 2587 Eo *obj;
2584 int x, y; 2588 int x, y;
2585 2589
2586 res = wl_resource_create(client, &wl_surface_interface, wl_resource_get_version(resource), id); 2590 res = wl_resource_create(client, &wl_surface_interface, wl_resource_get_version(resource), id);
@@ -3164,16 +3168,16 @@ output_resize(Comp *c, struct wl_resource *res)
3164 int rot[][4] = 3168 int rot[][4] =
3165 { 3169 {
3166 { 3170 {
3167 [EFL_WL_ROTATION_0] = WL_OUTPUT_TRANSFORM_NORMAL, 3171 [EFL_WL_ROTATION_ROTATE_0] = WL_OUTPUT_TRANSFORM_NORMAL,
3168 [EFL_WL_ROTATION_90] = WL_OUTPUT_TRANSFORM_90, 3172 [EFL_WL_ROTATION_ROTATE_90] = WL_OUTPUT_TRANSFORM_90,
3169 [EFL_WL_ROTATION_180] = WL_OUTPUT_TRANSFORM_180, 3173 [EFL_WL_ROTATION_ROTATE_180] = WL_OUTPUT_TRANSFORM_180,
3170 [EFL_WL_ROTATION_270] = WL_OUTPUT_TRANSFORM_270, 3174 [EFL_WL_ROTATION_ROTATE_270] = WL_OUTPUT_TRANSFORM_270,
3171 }, 3175 },
3172 { 3176 {
3173 [EFL_WL_ROTATION_0] = WL_OUTPUT_TRANSFORM_FLIPPED, 3177 [EFL_WL_ROTATION_ROTATE_0] = WL_OUTPUT_TRANSFORM_FLIPPED,
3174 [EFL_WL_ROTATION_90] = WL_OUTPUT_TRANSFORM_FLIPPED_90, 3178 [EFL_WL_ROTATION_ROTATE_90] = WL_OUTPUT_TRANSFORM_FLIPPED_90,
3175 [EFL_WL_ROTATION_180] = WL_OUTPUT_TRANSFORM_FLIPPED_180, 3179 [EFL_WL_ROTATION_ROTATE_180] = WL_OUTPUT_TRANSFORM_FLIPPED_180,
3176 [EFL_WL_ROTATION_270] = WL_OUTPUT_TRANSFORM_FLIPPED_270, 3180 [EFL_WL_ROTATION_ROTATE_270] = WL_OUTPUT_TRANSFORM_FLIPPED_270,
3177 }, 3181 },
3178 }; 3182 };
3179 3183
@@ -3240,7 +3244,7 @@ shell_surface_toplevel_set_parent(struct wl_client *client EINA_UNUSED, struct w
3240 3244
3241 comp_surface_reparent(cs, pcs); 3245 comp_surface_reparent(cs, pcs);
3242 if (parent_resource) 3246 if (parent_resource)
3243 evas_object_smart_callback_call(cs->c->obj, "child_added", cs->obj); 3247 efl_event_callback_call(cs->c->obj, EFL_WL_EVENT_CHILD_ADDED, cs->obj);
3244} 3248}
3245 3249
3246static void 3250static void
@@ -3334,7 +3338,7 @@ shell_surface_toplevel_create(struct wl_client *client EINA_UNUSED, struct wl_re
3334 cs->role = wl_resource_create(client, &xdg_toplevel_interface, 1, id); 3338 cs->role = wl_resource_create(client, &xdg_toplevel_interface, 1, id);
3335 wl_resource_set_implementation(cs->role, &shell_surface_toplevel_interface, cs, shell_surface_toplevel_impl_destroy); 3339 wl_resource_set_implementation(cs->role, &shell_surface_toplevel_interface, cs, shell_surface_toplevel_impl_destroy);
3336 cs->shell.new = 1; 3340 cs->shell.new = 1;
3337 evas_object_smart_callback_call(cs->c->obj, "toplevel_added", cs->obj); 3341 efl_event_callback_call(cs->c->obj, EFL_WL_EVENT_TOPLEVEL_ADDED, cs->obj);
3338} 3342}
3339 3343
3340static void 3344static void
@@ -3423,7 +3427,7 @@ shell_surface_popup_create(struct wl_client *client, struct wl_resource *resourc
3423 comp_surface_reparent(cs, wl_resource_get_user_data(parent_resource)); 3427 comp_surface_reparent(cs, wl_resource_get_user_data(parent_resource));
3424 cs->shell.positioner = wl_resource_get_user_data(positioner_resource); 3428 cs->shell.positioner = wl_resource_get_user_data(positioner_resource);
3425 _apply_positioner(cs, cs->shell.positioner); 3429 _apply_positioner(cs, cs->shell.positioner);
3426 evas_object_smart_callback_call(cs->c->obj, "popup_added", cs->obj); 3430 efl_event_callback_call(cs->c->obj, EFL_WL_EVENT_POPUP_ADDED, cs->obj);
3427} 3431}
3428 3432
3429static void 3433static void
@@ -3894,7 +3898,7 @@ seat_kbd_create(struct wl_client *client, struct wl_resource *resource, uint32_t
3894} 3898}
3895 3899
3896static void 3900static void
3897seat_ptr_del(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) 3901seat_ptr_del(void *data, Evas *e EINA_UNUSED, Eo *obj EINA_UNUSED, void *event_info EINA_UNUSED)
3898{ 3902{
3899 Comp_Seat *s = data; 3903 Comp_Seat *s = data;
3900 3904
@@ -4206,7 +4210,7 @@ comp_render_pre(Comp *c, Evas *e EINA_UNUSED, void *event_info EINA_UNUSED)
4206 4210
4207 if (cs->opaque_rects && (eina_array_count(cs->opaque_rects) == 1)) 4211 if (cs->opaque_rects && (eina_array_count(cs->opaque_rects) == 1))
4208 { 4212 {
4209 Evas_Object *r = eina_array_data_get(cs->opaque_rects, 0); 4213 Eo *r = eina_array_data_get(cs->opaque_rects, 0);
4210 int x, y, w, h, ox, oy, ow, oh; 4214 int x, y, w, h, ox, oy, ow, oh;
4211 4215
4212 evas_object_geometry_get(cs->img, &x, &y, &w, &h); 4216 evas_object_geometry_get(cs->img, &x, &y, &w, &h);
@@ -4228,7 +4232,7 @@ comp_render_pre(Comp *c, Evas *e EINA_UNUSED, void *event_info EINA_UNUSED)
4228} 4232}
4229 4233
4230static void 4234static void
4231comp_render_pre_proxied(Evas_Object *o, Evas *e, void *event_info) 4235comp_render_pre_proxied(Eo *o, Evas *e, void *event_info)
4232{ 4236{
4233 Comp_Surface *cs = evas_object_data_get(o, "comp_surface"); 4237 Comp_Surface *cs = evas_object_data_get(o, "comp_surface");
4234 Comp_Buffer *buffer = cs->buffer[!cs->render_queue]; 4238 Comp_Buffer *buffer = cs->buffer[!cs->render_queue];
@@ -4302,8 +4306,6 @@ comp_render_post(Comp *c, Evas *e, void *event_info EINA_UNUSED)
4302 } 4306 }
4303} 4307}
4304 4308
4305static Evas_Smart *comp_smart = NULL;
4306
4307static void 4309static void
4308comp_seat_selection_update(Comp_Seat *s) 4310comp_seat_selection_update(Comp_Seat *s)
4309{ 4311{
@@ -4541,7 +4543,7 @@ comp_seats_proxy(Comp *c)
4541 else if (!c->parent_disp) 4543 else if (!c->parent_disp)
4542 comp_device_caps_update(s); 4544 comp_device_caps_update(s);
4543 s->global = wl_global_create(c->display, &wl_seat_interface, 4, s, seat_bind); 4545 s->global = wl_global_create(c->display, &wl_seat_interface, 4, s, seat_bind);
4544 evas_object_smart_callback_call(s->c->obj, "seat_added", dev); 4546 efl_event_callback_call(s->c->obj, EFL_WL_EVENT_SEAT_ADDED, dev);
4545 if (ecore_wl2_display_sync_is_done(c->client_disp)) 4547 if (ecore_wl2_display_sync_is_done(c->client_disp))
4546 seat_proxy_update(s); 4548 seat_proxy_update(s);
4547 } 4549 }
@@ -5081,7 +5083,7 @@ comp_handlers_init(void)
5081} 5083}
5082 5084
5083static void 5085static void
5084comp_focus_in(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) 5086comp_focus_in(void *data, Evas *e EINA_UNUSED, Eo *obj EINA_UNUSED, void *event_info EINA_UNUSED)
5085{ 5087{
5086 Comp *c = data; 5088 Comp *c = data;
5087 //Efl_Input_Focus_Data *ev = event_info; 5089 //Efl_Input_Focus_Data *ev = event_info;
@@ -5128,7 +5130,7 @@ comp_focus_in(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, voi
5128} 5130}
5129 5131
5130static void 5132static void
5131comp_focus_out(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) 5133comp_focus_out(void *data, Evas *e EINA_UNUSED, Eo *obj EINA_UNUSED, void *event_info EINA_UNUSED)
5132{ 5134{
5133 Comp *c = data; 5135 Comp *c = data;
5134 //Efl_Input_Focus_Data *ev = event_info; 5136 //Efl_Input_Focus_Data *ev = event_info;
@@ -5143,7 +5145,7 @@ comp_focus_out(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, vo
5143} 5145}
5144 5146
5145static void 5147static void
5146comp_mouse_in(void *data, Evas *e, Evas_Object *obj, void *event_info) 5148comp_mouse_in(void *data, Evas *e, Eo *obj, void *event_info)
5147{ 5149{
5148 Comp *c = data; 5150 Comp *c = data;
5149 Evas_Event_Mouse_In *ev = event_info; 5151 Evas_Event_Mouse_In *ev = event_info;
@@ -5181,7 +5183,7 @@ comp_mouse_in(void *data, Evas *e, Evas_Object *obj, void *event_info)
5181} 5183}
5182 5184
5183static void 5185static void
5184comp_multi_move(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info) 5186comp_multi_move(void *data, Evas *e EINA_UNUSED, Eo *obj EINA_UNUSED, void *event_info)
5185{ 5187{
5186 Comp *c = data; 5188 Comp *c = data;
5187 Evas_Event_Multi_Move *ev = event_info; 5189 Evas_Event_Multi_Move *ev = event_info;
@@ -5202,7 +5204,7 @@ comp_multi_move(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, v
5202} 5204}
5203 5205
5204static void 5206static void
5205comp_mouse_move(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info) 5207comp_mouse_move(void *data, Evas *e EINA_UNUSED, Eo *obj EINA_UNUSED, void *event_info)
5206{ 5208{
5207 Comp *c = data; 5209 Comp *c = data;
5208 Evas_Event_Mouse_Move *ev = event_info; 5210 Evas_Event_Mouse_Move *ev = event_info;
@@ -5223,7 +5225,7 @@ comp_mouse_move(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, v
5223} 5225}
5224 5226
5225static void 5227static void
5226comp_mouse_out(void *data, Evas *e EINA_UNUSED, Evas_Object *obj, void *event_info) 5228comp_mouse_out(void *data, Evas *e EINA_UNUSED, Eo *obj, void *event_info)
5227{ 5229{
5228 Comp *c = data; 5230 Comp *c = data;
5229 Evas_Event_Mouse_Out *ev = event_info; 5231 Evas_Event_Mouse_Out *ev = event_info;
@@ -5337,18 +5339,22 @@ efl_hints_bind(struct wl_client *client, void *data, uint32_t version, uint32_t
5337 wl_resource_set_implementation(res, &hints_interface, data, NULL); 5339 wl_resource_set_implementation(res, &hints_interface, data, NULL);
5338} 5340}
5339 5341
5342EOLIAN static Eo *
5343_efl_wl_efl_object_constructor(Eo *obj, Comp *c)
5344{
5345 efl_canvas_group_clipped_set(obj, EINA_TRUE);
5346 EINA_SAFETY_ON_TRUE_RETURN_VAL(!ecore_wl2_init(), NULL);
5347 return efl_constructor(efl_super(obj, MY_CLASS));
5348}
5340 5349
5341 5350EOLIAN static void
5342static void 5351_efl_wl_efl_canvas_group_group_add(Eo *obj, Comp *c)
5343comp_smart_add(Evas_Object *obj)
5344{ 5352{
5345 Comp *c;
5346 char *env, *dbg = NULL; 5353 char *env, *dbg = NULL;
5347 5354
5348 c = calloc(1, sizeof(Comp)); 5355 efl_canvas_group_add(efl_super(obj, MY_CLASS));
5349 c->wayland_time_base = ecore_loop_time_get(); 5356 c->wayland_time_base = ecore_loop_time_get();
5350 c->obj = obj; 5357 c->obj = obj;
5351 evas_object_smart_data_set(obj, c);
5352 env = getenv("WAYLAND_DISPLAY"); 5358 env = getenv("WAYLAND_DISPLAY");
5353 if (env) env = strdup(env); 5359 if (env) env = strdup(env);
5354 5360
@@ -5369,9 +5375,9 @@ comp_smart_add(Evas_Object *obj)
5369 else unsetenv("WAYLAND_DISPLAY"); 5375 else unsetenv("WAYLAND_DISPLAY");
5370 c->display = ecore_wl2_display_get(c->disp); 5376 c->display = ecore_wl2_display_get(c->disp);
5371 c->client_surfaces = eina_hash_pointer_new(NULL); 5377 c->client_surfaces = eina_hash_pointer_new(NULL);
5372 c->evas = evas_object_evas_get(obj); 5378 c->evas = efl_provider_find(obj, EVAS_CANVAS_CLASS);
5373 c->clip = evas_object_rectangle_add(c->evas); 5379 c->clip = (Eo*)efl_canvas_group_clipper_get(obj);
5374 evas_object_smart_member_add(c->clip, obj); 5380 efl_gfx_entity_geometry_set(c->clip, efl_gfx_entity_geometry_get(obj));
5375 c->events = evas_object_rectangle_add(c->evas); 5381 c->events = evas_object_rectangle_add(c->evas);
5376 evas_object_event_callback_add(obj, EVAS_CALLBACK_MOUSE_IN, comp_mouse_in, c); 5382 evas_object_event_callback_add(obj, EVAS_CALLBACK_MOUSE_IN, comp_mouse_in, c);
5377 evas_object_event_callback_add(obj, EVAS_CALLBACK_MOUSE_MOVE, comp_mouse_move, c); 5383 evas_object_event_callback_add(obj, EVAS_CALLBACK_MOUSE_MOVE, comp_mouse_move, c);
@@ -5429,11 +5435,9 @@ comp_smart_add(Evas_Object *obj)
5429 free(env); 5435 free(env);
5430} 5436}
5431 5437
5432static void 5438EOLIAN static void
5433comp_smart_del(Evas_Object *obj) 5439_efl_wl_efl_canvas_group_group_del(Eo *obj, Comp *c)
5434{ 5440{
5435 Comp *c = evas_object_smart_data_get(obj);
5436
5437 evas_object_del(c->clip); 5441 evas_object_del(c->clip);
5438 evas_object_del(c->events); 5442 evas_object_del(c->events);
5439 free(c->env); 5443 free(c->env);
@@ -5461,10 +5465,8 @@ comp_smart_del(Evas_Object *obj)
5461 evas_event_callback_del_full(c->evas, EVAS_CALLBACK_RENDER_PRE, (Evas_Event_Cb)comp_render_pre, c); 5465 evas_event_callback_del_full(c->evas, EVAS_CALLBACK_RENDER_PRE, (Evas_Event_Cb)comp_render_pre, c);
5462 evas_event_callback_del_full(c->evas, EVAS_CALLBACK_RENDER_POST, (Evas_Event_Cb)comp_render_post, c); 5466 evas_event_callback_del_full(c->evas, EVAS_CALLBACK_RENDER_POST, (Evas_Event_Cb)comp_render_post, c);
5463 efl_event_callback_array_del(c->evas, comp_device_cbs(), c); 5467 efl_event_callback_array_del(c->evas, comp_device_cbs(), c);
5464 ecore_event_handler_del(c->exe_handler);
5465 eina_hash_free(c->exes); 5468 eina_hash_free(c->exes);
5466 comps = eina_list_remove(comps, c); 5469 comps = eina_list_remove(comps, c);
5467 free(c);
5468 if (!comps) 5470 if (!comps)
5469 { 5471 {
5470 void *h; 5472 void *h;
@@ -5475,35 +5477,25 @@ comp_smart_del(Evas_Object *obj)
5475#endif 5477#endif
5476 } 5478 }
5477 ecore_wl2_shutdown(); 5479 ecore_wl2_shutdown();
5480 efl_canvas_group_del(efl_super(obj, MY_CLASS));
5478} 5481}
5479 5482
5480static void 5483static void
5481comp_smart_move(Evas_Object *obj, int x, int y) 5484_efl_wl_efl_gfx_entity_position_set(Eo *obj, Comp *c, Eina_Position2D pos)
5482{ 5485{
5483 Comp_Surface *cs; 5486 efl_gfx_entity_position_set(efl_super(obj, MY_CLASS), pos);
5484 Comp *c = evas_object_smart_data_get(obj); 5487 efl_gfx_entity_position_set(c->clip, pos);
5485 int dx, dy;
5486 evas_object_geometry_get(obj, &dx, &dy, NULL, NULL);
5487 dx = x - dx;
5488 dy = y - dy;
5489 evas_object_move(c->clip, x, y);
5490 evas_object_move(c->events, x, y);
5491 EINA_INLIST_FOREACH(c->surfaces, cs)
5492 {
5493 int cx, cy;
5494 evas_object_geometry_get(cs->obj, &cx, &cy, NULL, NULL);
5495 evas_object_move(cs->obj, cx + dx, cy + dy);
5496 }
5497} 5488}
5498 5489
5499static void 5490static void
5500comp_smart_resize(Evas_Object *obj, int w, int h) 5491_efl_wl_efl_gfx_entity_size_set(Eo *obj, Comp *c, Eina_Size2D sz)
5501{ 5492{
5502 Comp *c = evas_object_smart_data_get(obj);
5503 Eina_List *l; 5493 Eina_List *l;
5504 Comp_Surface *cs; 5494 Comp_Surface *cs;
5505 struct wl_resource *res; 5495 struct wl_resource *res;
5496 int w = sz.w, h = sz.h;
5506 5497
5498 efl_gfx_entity_size_set(efl_super(obj, MY_CLASS), sz);
5507 evas_object_resize(c->clip, w, h); 5499 evas_object_resize(c->clip, w, h);
5508 evas_object_resize(c->events, w, h); 5500 evas_object_resize(c->events, w, h);
5509 EINA_LIST_FOREACH(c->output_resources, l, res) 5501 EINA_LIST_FOREACH(c->output_resources, l, res)
@@ -5515,101 +5507,25 @@ comp_smart_resize(Evas_Object *obj, int w, int h)
5515} 5507}
5516 5508
5517static void 5509static void
5518comp_smart_show(Evas_Object *obj) 5510_efl_wl_efl_gfx_entity_visible_set(Eo *obj, Comp *c, Eina_Bool vis)
5519{ 5511{
5520 Comp *c = evas_object_smart_data_get(obj);
5521 Comp_Surface *cs; 5512 Comp_Surface *cs;
5522 5513
5523 evas_object_show(c->clip); 5514 efl_gfx_entity_visible_set(efl_super(obj, MY_CLASS), vis);
5524 EINA_INLIST_FOREACH(c->surfaces, cs) 5515 EINA_INLIST_FOREACH(c->surfaces, cs)
5525 comp_surface_output_enter(cs); 5516 if (vis)
5526} 5517 comp_surface_output_enter(cs);
5527 5518 else
5528static void 5519 comp_surface_output_leave(cs);
5529comp_smart_hide(Evas_Object *obj)
5530{
5531 Comp *c = evas_object_smart_data_get(obj);
5532 Comp_Surface *cs;
5533
5534 evas_object_hide(c->clip);
5535 EINA_INLIST_FOREACH(c->surfaces, cs)
5536 comp_surface_output_leave(cs);
5537}
5538
5539static void
5540comp_smart_color_set(Evas_Object *obj, int r, int g, int b, int a)
5541{
5542 Comp *c = evas_object_smart_data_get(obj);
5543 evas_object_color_set(c->clip, r, g, b, a);
5544}
5545
5546static void
5547comp_smart_clip_set(Evas_Object *obj, Evas_Object *clip)
5548{
5549 Comp *c = evas_object_smart_data_get(obj);
5550 evas_object_clip_set(c->clip, clip);
5551}
5552
5553static void
5554comp_smart_clip_unset(Evas_Object *obj)
5555{
5556 Comp *c = evas_object_smart_data_get(obj);
5557 evas_object_clip_unset(c->clip);
5558} 5520}
5559 5521
5560static void 5522static void
5561comp_smart_member_add(Evas_Object *obj, Evas_Object *child) 5523exe_event_del(void *data, const Efl_Event *ev)
5562{
5563 Comp *c = evas_object_smart_data_get(obj);
5564 if (child != c->clip) evas_object_clip_set(child, c->clip);
5565}
5566
5567static void
5568comp_smart_member_del(Evas_Object *obj, Evas_Object *child)
5569{
5570 Comp *c = evas_object_smart_data_get(obj);
5571 if (child != c->clip) evas_object_clip_unset(child);
5572}
5573
5574static void
5575comp_smart_init(void)
5576{
5577 if (comp_smart) return;
5578 {
5579 static const Evas_Smart_Class sc =
5580 {
5581 "comp",
5582 EVAS_SMART_CLASS_VERSION,
5583 comp_smart_add,
5584 comp_smart_del,
5585 comp_smart_move,
5586 comp_smart_resize,
5587 comp_smart_show,
5588 comp_smart_hide,
5589 comp_smart_color_set,
5590 comp_smart_clip_set,
5591 comp_smart_clip_unset,
5592 NULL,
5593 comp_smart_member_add,
5594 comp_smart_member_del,
5595
5596 NULL,
5597 NULL,
5598 NULL,
5599 NULL
5600 };
5601 comp_smart = evas_smart_class_new(&sc);
5602 }
5603}
5604
5605static Eina_Bool
5606exe_event_del(void *data, int t EINA_UNUSED, Ecore_Exe_Event_Del *ev)
5607{ 5524{
5608 Comp *c = data; 5525 Comp *c = data;
5609 int32_t pid = ev->pid; 5526 int32_t pid = efl_exe_pid_get(ev->object);
5610 5527
5611 eina_hash_del_by_key(c->exes, &pid); 5528 eina_hash_del_by_key(c->exes, &pid);
5612 return ECORE_CALLBACK_RENEW;
5613} 5529}
5614 5530
5615# ifdef __GNUC__ 5531# ifdef __GNUC__
@@ -5621,7 +5537,7 @@ Eina_Bool
5621comp_dmabuf_test(struct linux_dmabuf_buffer *dmabuf) 5537comp_dmabuf_test(struct linux_dmabuf_buffer *dmabuf)
5622{ 5538{
5623 Evas_Native_Surface ns; 5539 Evas_Native_Surface ns;
5624 Evas_Object *test; 5540 Eo *test;
5625 int size; 5541 int size;
5626 void *data; 5542 void *data;
5627 Comp *c = dmabuf->compositor; 5543 Comp *c = dmabuf->compositor;
@@ -5669,28 +5585,14 @@ comp_dmabuf_modifiers_query(void *compositor EINA_UNUSED, int format EINA_UNUSED
5669 *num_modifiers = 0; 5585 *num_modifiers = 0;
5670} 5586}
5671 5587
5672Evas_Object * 5588Eo *
5673efl_wl_add(Evas *e) 5589comp_run(Eo *obj, Comp *c, const char *cmd, Efl_Exe_Flags flags)
5674{
5675 comp_smart_init();
5676 EINA_SAFETY_ON_TRUE_RETURN_VAL(!ecore_wl2_init(), NULL);
5677 return evas_object_smart_add(e, comp_smart);
5678}
5679
5680Ecore_Exe *
5681comp_run(Evas_Object *obj, const char *cmd, Ecore_Exe_Flags flags)
5682{ 5590{
5683 char *env, *disp, *gl = NULL; 5591 char *env, *disp, *gl = NULL;
5684 Comp *c; 5592 Efl_Exe *exe;
5685 Ecore_Exe *exe;
5686 5593
5687 if (!eina_streq(evas_object_type_get(obj), "comp")) abort();
5688 c = evas_object_smart_data_get(obj);
5689 if (!c->exes) 5594 if (!c->exes)
5690 c->exes = eina_hash_int32_new(NULL); 5595 c->exes = eina_hash_int32_new(NULL);
5691 if (!c->exe_handler)
5692 c->exe_handler =
5693 ecore_event_handler_add(ECORE_EXE_EVENT_DEL, (Ecore_Event_Handler_Cb)exe_event_del, c);
5694 disp = getenv("DISPLAY"); 5596 disp = getenv("DISPLAY");
5695 if (disp) disp = strdup(disp); 5597 if (disp) disp = strdup(disp);
5696 unsetenv("DISPLAY"); 5598 unsetenv("DISPLAY");
@@ -5703,7 +5605,10 @@ comp_run(Evas_Object *obj, const char *cmd, Ecore_Exe_Flags flags)
5703 if (gl) gl = strdup(gl); 5605 if (gl) gl = strdup(gl);
5704 setenv("ELM_ACCEL", "gl", 1); 5606 setenv("ELM_ACCEL", "gl", 1);
5705 } 5607 }
5706 exe = ecore_exe_pipe_run(cmd, flags, c); 5608 exe = efl_add(EFL_EXE_CLASS, obj,
5609 efl_core_command_line_command_string_set(efl_added, cmd),
5610 efl_exe_flags_set(efl_added, flags),
5611 efl_task_run(efl_added));
5707 if (disp) setenv("DISPLAY", disp, 1); 5612 if (disp) setenv("DISPLAY", disp, 1);
5708 if (env) setenv("WAYLAND_DISPLAY", env, 1); 5613 if (env) setenv("WAYLAND_DISPLAY", env, 1);
5709 else unsetenv("WAYLAND_DISPLAY"); 5614 else unsetenv("WAYLAND_DISPLAY");
@@ -5717,55 +5622,45 @@ comp_run(Evas_Object *obj, const char *cmd, Ecore_Exe_Flags flags)
5717 free(disp); 5622 free(disp);
5718 if (exe) 5623 if (exe)
5719 { 5624 {
5720 int32_t pid = ecore_exe_pid_get(exe); 5625 int32_t pid = efl_exe_pid_get(exe);
5721 eina_hash_add(c->exes, &pid, (void*)1); 5626 eina_hash_add(c->exes, &pid, (void*)1);
5627 efl_event_callback_add(exe, EFL_TASK_EVENT_EXIT, exe_event_del, c);
5722 } 5628 }
5723 return exe; 5629 return exe;
5724} 5630}
5725 5631
5726Ecore_Exe * 5632EOLIAN static Efl_Exe *
5727efl_wl_run(Evas_Object *obj, const char *cmd) 5633_efl_wl_run(Eo *obj, Comp *c, const char *cmd)
5728{ 5634{
5729 return comp_run(obj, cmd, ECORE_EXE_TERM_WITH_PARENT); 5635 return comp_run(obj, c, cmd, EFL_EXE_FLAGS_TERM_WITH_PARENT);
5730} 5636}
5731 5637
5732Ecore_Exe * 5638EOLIAN static Eo *
5733efl_wl_flags_run(Evas_Object *obj, const char *cmd, Ecore_Exe_Flags flags) 5639_efl_wl_flags_run(Eo *obj, Comp *c, const char *cmd, Efl_Exe_Flags flags)
5734{ 5640{
5735 return comp_run(obj, cmd, flags); 5641 return comp_run(obj, c, cmd, flags);
5736} 5642}
5737 5643
5738void 5644EOLIAN static void
5739efl_wl_pid_add(Evas_Object *obj, int32_t pid) 5645_efl_wl_allowed_pid_add(Eo *obj, Comp *c, int32_t pid)
5740{ 5646{
5741 Comp *c;
5742
5743 if (!eina_streq(evas_object_type_get(obj), "comp")) abort();
5744 c = evas_object_smart_data_get(obj);
5745 if (!c->exes) 5647 if (!c->exes)
5746 c->exes = eina_hash_int32_new(NULL); 5648 c->exes = eina_hash_int32_new(NULL);
5747 eina_hash_add(c->exes, &pid, (void*)1); 5649 eina_hash_add(c->exes, &pid, (void*)1);
5748} 5650}
5749 5651
5750void 5652EOLIAN static void
5751efl_wl_pid_del(Evas_Object *obj, int32_t pid) 5653_efl_wl_allowed_pid_del(Eo *obj, Comp *c, int32_t pid)
5752{ 5654{
5753 Comp *c;
5754
5755 if (!eina_streq(evas_object_type_get(obj), "comp")) abort();
5756 c = evas_object_smart_data_get(obj);
5757 if (!c->exes) return; 5655 if (!c->exes) return;
5758 eina_hash_del_by_key(c->exes, &pid); 5656 eina_hash_del_by_key(c->exes, &pid);
5759} 5657}
5760 5658
5761Eina_Bool 5659EOLIAN static Eina_Bool
5762efl_wl_next(Evas_Object *obj) 5660_efl_wl_surface_next(Eo *obj, Comp *c)
5763{ 5661{
5764 Comp *c;
5765 Comp_Surface *cs; 5662 Comp_Surface *cs;
5766 5663
5767 if (!eina_streq(evas_object_type_get(obj), "comp")) abort();
5768 c = evas_object_smart_data_get(obj);
5769 if (c->surfaces_count < 2) return EINA_FALSE; 5664 if (c->surfaces_count < 2) return EINA_FALSE;
5770 EINA_INLIST_REVERSE_FOREACH(c->surfaces, cs) 5665 EINA_INLIST_REVERSE_FOREACH(c->surfaces, cs)
5771 { 5666 {
@@ -5779,14 +5674,11 @@ efl_wl_next(Evas_Object *obj)
5779 return EINA_FALSE; 5674 return EINA_FALSE;
5780} 5675}
5781 5676
5782Eina_Bool 5677EOLIAN static Eina_Bool
5783efl_wl_prev(Evas_Object *obj) 5678_efl_wl_surface_prev(Eo *obj, Comp *c)
5784{ 5679{
5785 Comp *c;
5786 Comp_Surface *cs; 5680 Comp_Surface *cs;
5787 5681
5788 if (!eina_streq(evas_object_type_get(obj), "comp")) abort();
5789 c = evas_object_smart_data_get(obj);
5790 if (c->surfaces_count < 2) return EINA_FALSE; 5682 if (c->surfaces_count < 2) return EINA_FALSE;
5791 EINA_INLIST_FOREACH(c->surfaces, cs) 5683 EINA_INLIST_FOREACH(c->surfaces, cs)
5792 { 5684 {
@@ -5800,30 +5692,37 @@ efl_wl_prev(Evas_Object *obj)
5800 return EINA_FALSE; 5692 return EINA_FALSE;
5801} 5693}
5802 5694
5803void 5695EOLIAN static void
5804efl_wl_rotate(Evas_Object *obj, Efl_Wl_Rotation rot, Eina_Bool rtl) 5696_efl_wl_rotation_get(const Eo *obj EINA_UNUSED, Comp *c, Efl_Wl_Rotation *rotation, Eina_Bool *rtl)
5697{
5698 if (rotation) *rotation = c->rotation;
5699 if (rtl) *rtl = c->rtl;
5700}
5701
5702EOLIAN static void
5703_efl_wl_rotation_set(Eo *obj EINA_UNUSED, Comp *c, Efl_Wl_Rotation rot, Eina_Bool rtl)
5805{ 5704{
5806 Comp *c;
5807 Eina_List *l; 5705 Eina_List *l;
5808 struct wl_resource *res; 5706 struct wl_resource *res;
5809 5707
5810 if (!eina_streq(evas_object_type_get(obj), "comp")) abort();
5811 c = evas_object_smart_data_get(obj);
5812 c->rtl = !!rtl; 5708 c->rtl = !!rtl;
5813 c->rotation = rot; 5709 c->rotation = rot;
5814 EINA_LIST_FOREACH(c->output_resources, l, res) 5710 EINA_LIST_FOREACH(c->output_resources, l, res)
5815 output_resize(c, res); 5711 output_resize(c, res);
5816} 5712}
5817 5713
5818void 5714EOLIAN static double
5819efl_wl_scale_set(Evas_Object *obj, double scale) 5715_efl_wl_efl_gfx_entity_scale_get(const Eo *obj EINA_UNUSED, Comp *c)
5716{
5717 return c->scale;
5718}
5719
5720EOLIAN static void
5721_efl_wl_efl_gfx_entity_scale_set(Eo *obj EINA_UNUSED, Comp *c, double scale)
5820{ 5722{
5821 Comp *c;
5822 Eina_List *l; 5723 Eina_List *l;
5823 struct wl_resource *res; 5724 struct wl_resource *res;
5824 5725
5825 if (!eina_streq(evas_object_type_get(obj), "comp")) abort();
5826 c = evas_object_smart_data_get(obj);
5827 c->scale = scale; 5726 c->scale = scale;
5828 5727
5829 EINA_LIST_FOREACH(c->output_resources, l, res) 5728 EINA_LIST_FOREACH(c->output_resources, l, res)
@@ -5831,13 +5730,15 @@ efl_wl_scale_set(Evas_Object *obj, double scale)
5831 wl_output_send_scale(res, lround(c->scale)); 5730 wl_output_send_scale(res, lround(c->scale));
5832} 5731}
5833 5732
5834void 5733EOLIAN static Eina_Bool
5835efl_wl_aspect_set(Evas_Object *obj, Eina_Bool set) 5734_efl_wl_aspect_get(const Eo *obj EINA_UNUSED, Comp *c)
5836{ 5735{
5837 Comp *c; 5736 return c->aspect;
5737}
5838 5738
5839 if (!eina_streq(evas_object_type_get(obj), "comp")) abort(); 5739EOLIAN static void
5840 c = evas_object_smart_data_get(obj); 5740_efl_wl_aspect_set(Eo *obj, Comp *c, Eina_Bool set)
5741{
5841 if (c->aspect == (!!set)) return; 5742 if (c->aspect == (!!set)) return;
5842 c->aspect = !!set; 5743 c->aspect = !!set;
5843 if (c->aspect) 5744 if (c->aspect)
@@ -5846,13 +5747,15 @@ efl_wl_aspect_set(Evas_Object *obj, Eina_Bool set)
5846 evas_object_size_hint_aspect_set(obj, EVAS_ASPECT_CONTROL_NONE, 0, 0); 5747 evas_object_size_hint_aspect_set(obj, EVAS_ASPECT_CONTROL_NONE, 0, 0);
5847} 5748}
5848 5749
5849void 5750EOLIAN static Eina_Bool
5850efl_wl_minmax_set(Evas_Object *obj, Eina_Bool set) 5751_efl_wl_minmax_get(const Eo *obj EINA_UNUSED, Comp *c)
5851{ 5752{
5852 Comp *c; 5753 return c->minmax;
5754}
5853 5755
5854 if (!eina_streq(evas_object_type_get(obj), "comp")) abort(); 5756EOLIAN static void
5855 c = evas_object_smart_data_get(obj); 5757_efl_wl_minmax_set(Eo *obj, Comp *c, Eina_Bool set)
5758{
5856 if (c->minmax == (!!set)) return; 5759 if (c->minmax == (!!set)) return;
5857 c->minmax = !!set; 5760 c->minmax = !!set;
5858 if (c->minmax) 5761 if (c->minmax)
@@ -5864,19 +5767,15 @@ efl_wl_minmax_set(Evas_Object *obj, Eina_Bool set)
5864 } 5767 }
5865} 5768}
5866 5769
5867void * 5770EOLIAN static Efl_Wl_Global *
5868efl_wl_global_add(Evas_Object *obj, const void *interface, uint32_t version, void *data, void *bind_cb) 5771_efl_wl_global_add(Eo *obj, Comp *c, const Efl_Wl_Interface *interface, uint32_t version, Efl_Wl_Interface_Data *data, Efl_Wl_Interface_Bind_Cb *bind_cb)
5869{ 5772{
5870 Comp *c;
5871
5872 if (!eina_streq(evas_object_type_get(obj), "comp")) abort();
5873 EINA_SAFETY_ON_NULL_RETURN_VAL(interface, NULL); 5773 EINA_SAFETY_ON_NULL_RETURN_VAL(interface, NULL);
5874 c = evas_object_smart_data_get(obj); 5774 return (void*)wl_global_create(c->display, (void*)interface, version, (void*)data, (void*)bind_cb);
5875 return wl_global_create(c->display, interface, version, data, bind_cb);
5876} 5775}
5877 5776
5878static void 5777static void
5879extracted_focus(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) 5778extracted_focus(void *data, Evas *e EINA_UNUSED, Eo *obj EINA_UNUSED, void *event_info EINA_UNUSED)
5880{ 5779{
5881 Comp_Surface *cs = data; 5780 Comp_Surface *cs = data;
5882 5781
@@ -5890,10 +5789,10 @@ extracted_focus(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, v
5890} 5789}
5891 5790
5892static void 5791static void
5893extracted_unfocus(void *data, Evas *e EINA_UNUSED, Evas_Object *obj, void *event_info EINA_UNUSED) 5792extracted_unfocus(void *data, Evas *e EINA_UNUSED, Eo *obj, void *event_info EINA_UNUSED)
5894{ 5793{
5895 Comp_Surface *cs = data; 5794 Comp_Surface *cs = data;
5896 Evas_Object *focus; 5795 Eo *focus;
5897 5796
5898 if (cs->dead) return; 5797 if (cs->dead) return;
5899 focus = evas_focus_get(cs->c->evas); 5798 focus = evas_focus_get(cs->c->evas);
@@ -5903,7 +5802,7 @@ extracted_unfocus(void *data, Evas *e EINA_UNUSED, Evas_Object *obj, void *event
5903} 5802}
5904 5803
5905static void 5804static void
5906extracted_changed(void *data, Evas *e EINA_UNUSED, Evas_Object *obj, void *event_info EINA_UNUSED) 5805extracted_changed(void *data, Evas *e EINA_UNUSED, Eo *obj, void *event_info EINA_UNUSED)
5907{ 5806{
5908 Comp_Surface *cs = data; 5807 Comp_Surface *cs = data;
5909 5808
@@ -5912,7 +5811,7 @@ extracted_changed(void *data, Evas *e EINA_UNUSED, Evas_Object *obj, void *event
5912} 5811}
5913 5812
5914int32_t 5813int32_t
5915efl_wl_surface_pid_get(Evas_Object *surface) 5814efl_wl_surface_pid_get(Eo *surface)
5916{ 5815{
5917 Comp_Surface *cs; 5816 Comp_Surface *cs;
5918 int32_t pid; 5817 int32_t pid;
@@ -5924,7 +5823,7 @@ efl_wl_surface_pid_get(Evas_Object *surface)
5924} 5823}
5925 5824
5926Eina_Bool 5825Eina_Bool
5927efl_wl_surface_extract(Evas_Object *surface) 5826efl_wl_surface_extract(Eo *surface)
5928{ 5827{
5929 Comp_Surface *cs; 5828 Comp_Surface *cs;
5930 if (!eina_streq(evas_object_type_get(surface), "comp_surface")) abort(); 5829 if (!eina_streq(evas_object_type_get(surface), "comp_surface")) abort();
@@ -5940,7 +5839,7 @@ efl_wl_surface_extract(Evas_Object *surface)
5940 return EINA_TRUE; 5839 return EINA_TRUE;
5941} 5840}
5942 5841
5943Evas_Object * 5842Eo *
5944efl_wl_extracted_surface_object_find(void *surface_resource) 5843efl_wl_extracted_surface_object_find(void *surface_resource)
5945{ 5844{
5946 Comp_Surface *cs = wl_resource_get_user_data(surface_resource); 5845 Comp_Surface *cs = wl_resource_get_user_data(surface_resource);
@@ -5952,8 +5851,8 @@ efl_wl_extracted_surface_object_find(void *surface_resource)
5952 return cs->obj; 5851 return cs->obj;
5953} 5852}
5954 5853
5955Evas_Object * 5854Eo *
5956efl_wl_extracted_surface_extracted_parent_get(Evas_Object *surface) 5855efl_wl_extracted_surface_extracted_parent_get(Eo *surface)
5957{ 5856{
5958 Comp_Surface *cs; 5857 Comp_Surface *cs;
5959 5858
@@ -5973,13 +5872,13 @@ efl_wl_extracted_surface_extracted_parent_get(Evas_Object *surface)
5973} 5872}
5974 5873
5975void 5874void
5976efl_wl_seat_keymap_set(Evas_Object *obj, Eo *seat, void *state, char *str, void *key_array) 5875efl_wl_seat_keymap_set(Eo *obj, Eo *seat, void *state, char *str, void *key_array)
5977{ 5876{
5978 Comp *c; 5877 Comp *c;
5979 Comp_Seat *s; 5878 Comp_Seat *s;
5980 5879
5981 if (!eina_streq(evas_object_type_get(obj), "comp")) abort(); 5880 if (!eina_streq(evas_object_type_get(obj), "comp")) abort();
5982 c = evas_object_smart_data_get(obj); 5881 c = efl_data_scope_get(obj, MY_CLASS);
5983 EINA_INLIST_FOREACH(c->seats, s) 5882 EINA_INLIST_FOREACH(c->seats, s)
5984 { 5883 {
5985 if (!seat) efl_wl_seat_keymap_set(obj, s->dev, state, str, key_array); 5884 if (!seat) efl_wl_seat_keymap_set(obj, s->dev, state, str, key_array);
@@ -6003,13 +5902,13 @@ efl_wl_seat_keymap_set(Evas_Object *obj, Eo *seat, void *state, char *str, void
6003} 5902}
6004 5903
6005void 5904void
6006efl_wl_seat_key_repeat_set(Evas_Object *obj, Eo *seat, int repeat_rate, int repeat_delay) 5905efl_wl_seat_key_repeat_set(Eo *obj, Eo *seat, int repeat_rate, int repeat_delay)
6007{ 5906{
6008 Comp *c; 5907 Comp *c;
6009 Comp_Seat *s; 5908 Comp_Seat *s;
6010 5909
6011 if (!eina_streq(evas_object_type_get(obj), "comp")) abort(); 5910 if (!eina_streq(evas_object_type_get(obj), "comp")) abort();
6012 c = evas_object_smart_data_get(obj); 5911 c = efl_data_scope_get(obj, MY_CLASS);
6013 EINA_INLIST_FOREACH(c->seats, s) 5912 EINA_INLIST_FOREACH(c->seats, s)
6014 { 5913 {
6015 if (!seat) efl_wl_seat_key_repeat_set(obj, s->dev, repeat_rate, repeat_delay); 5914 if (!seat) efl_wl_seat_key_repeat_set(obj, s->dev, repeat_rate, repeat_delay);
@@ -6021,3 +5920,8 @@ efl_wl_seat_key_repeat_set(Evas_Object *obj, Eo *seat, int repeat_rate, int repe
6021 s->kbd.repeat_delay = repeat_delay; 5920 s->kbd.repeat_delay = repeat_delay;
6022 seat_kbd_repeat_rate_send(s); 5921 seat_kbd_repeat_rate_send(s);
6023} 5922}
5923
5924#define EFL_WL_EXTRA_OPS \
5925 EFL_CANVAS_GROUP_ADD_DEL_OPS(efl_wl), \
5926
5927#include "efl_wl.eo.c"
diff --git a/src/lib/efl_wl/efl_wl.eo b/src/lib/efl_wl/efl_wl.eo
new file mode 100644
index 0000000000..1f28738c49
--- /dev/null
+++ b/src/lib/efl_wl/efl_wl.eo
@@ -0,0 +1,99 @@
1import efl_exe;
2import efl_input_device;
3import efl_wl_surface;
4
5struct @beta @extern Efl.Wl_Wl_Surface; [[ struct wl_surface. @since 1.24 ]]
6struct @beta @extern Efl.Wl_Wl_Global; [[ struct wl_global. @since 1.24 ]]
7struct @beta @extern Efl.Wl_Wl_Interface; [[ A libwayland callback interface struct. @since 1.24 ]]
8struct @beta @extern Efl.Wl_Wl_Interface_Data; [[ A data pointer to send with the bind callback. @since 1.24 ]]
9struct @beta @extern Efl.Wl_Wl_Interface_Bind_Cb; [[ A callback with the type (*void)(struct wl_client *client, void *data, uint32_t version, uint32_t id). @since 1.24 ]]
10
11
12enum @beta Efl.Wl.Rotation
13{
14 [[Orientation of the internal compositor object in degrees. These values are COUNTER-CLOCKWISE.
15 ]]
16 rotate_0 = 0,
17 rotate_90 = 1,
18 rotate_180 = 2,
19 rotate_270 = 3
20}
21
22class @beta Efl.Wl extends Efl.Canvas.Group
23{
24 [[
25 @since 1.24
26 ]]
27 data: Comp;
28 methods {
29 run {
30 [[This runs a command in the compositor using the @Efl.Exe_Flags.term_with_parent flag.
31 ]]
32 params {
33 cmd: string;
34 }
35 return: Efl.Exe;
36 }
37 flags_run {
38 params {
39 cmd: string;
40 flags: Efl.Exe_Flags;
41 }
42 return: Efl.Exe;
43 }
44 allowed_pid_add {
45 params {
46 pid: int;
47 }
48 }
49 allowed_pid_del {
50 params {
51 pid: int;
52 }
53 }
54 surface_next {
55 return: bool;
56 }
57 surface_prev {
58 return: bool;
59 }
60 @property aspect {
61 values {
62 set: bool;
63 }
64 }
65 @property minmax {
66 values {
67 set: bool;
68 }
69 }
70 @property rotation {
71 values {
72 rotation: Efl.Wl.Rotation;
73 rtl: bool;
74 }
75 }
76 global_add {
77 params {
78 interface: const(Efl.Wl_Wl_Interface) @by_ref;
79 version: uint;
80 data: Efl.Wl_Wl_Interface_Data @by_ref;
81 bind_cb: Efl.Wl_Wl_Interface_Bind_Cb @by_ref;
82 }
83 return: Efl.Wl_Wl_Global @by_ref;
84 }
85 }
86 implements {
87 Efl.Object.constructor;
88 Efl.Gfx.Entity.visible { set; }
89 Efl.Gfx.Entity.size { set; }
90 Efl.Gfx.Entity.position { set; }
91 Efl.Gfx.Entity.scale { get; set; }
92 }
93 events {
94 toplevel,added: Efl.Gfx.Entity; [[]]
95 child,added: Efl.Gfx.Entity; [[]]
96 popup,added: Efl.Gfx.Entity; [[]]
97 seat,added: Efl.Input.Device; [[The seat object added.]]
98 }
99}
diff --git a/src/lib/efl_wl/meson.build b/src/lib/efl_wl/meson.build
index 35f20ec404..3976b97ab0 100644
--- a/src/lib/efl_wl/meson.build
+++ b/src/lib/efl_wl/meson.build
@@ -1,32 +1,59 @@
1efl_wl_deps = [ecore_wl2, ecore_input, ecore, ecore_evas, evas, emile, eo, efl, eina] 1efl_wl_deps = [ecore_wl2, ecore_input, ecore, ecore_evas, evas, emile, eina]
2efl_wl_pub_deps = [evas, dependency('wayland-server', version : '>= 1.11.0'), dependency('xkbcommon', version : '>= 0.6.0')] 2efl_wl_pub_deps = [eo, efl, evas, dependency('wayland-server', version : '>= 1.11.0'), dependency('xkbcommon', version : '>= 0.6.0')]
3 3
4if (get_option('x11')) 4if (get_option('x11'))
5 efl_wl_deps += [ecore_x] 5 efl_wl_deps += [ecore_x]
6 efl_wl_pub_deps += [dependency('xkbcommon-x11')] 6 efl_wl_pub_deps += [dependency('xkbcommon-x11')]
7endif 7endif
8 8
9pub_eo_files = [
10 'efl_wl.eo',
11]
12
13foreach eo_file : pub_eo_files
14 pub_eo_file_target += custom_target('eolian_gen_' + eo_file,
15 input : eo_file,
16 output : [eo_file + '.h'],
17 depfile : eo_file + '.d',
18 install : true,
19 install_dir : dir_package_include,
20 command : eolian_gen + [ '-I', meson.current_source_dir(), eolian_include_directories,
21 '-o', 'h:' + join_paths(meson.current_build_dir(), eo_file + '.h'),
22 '-o', 'c:' + join_paths(meson.current_build_dir(), eo_file + '.c'),
23 '-o', 'd:' + join_paths(meson.current_build_dir(), eo_file + '.d'),
24 '-gchd', '@INPUT@'])
25endforeach
26
9efl_wl_src = [ 27efl_wl_src = [
10 'dmabuf.c', 28 'dmabuf.c',
11 'efl_wl.c' 29 'efl_wl.c',
12] 30]
13efl_wl_header_src = ['Efl_Wl.h'] 31efl_wl_header_src = ['Efl_Wl.h']
14 32eolian_include_directories += ['-I', meson.current_source_dir()]
15 33
16efl_wl_lib = library('efl_wl', 34efl_wl_lib = library('efl_wl',
17 efl_wl_src, 35 efl_wl_src, pub_eo_file_target,
18 dependencies: [m, dl] + efl_wl_deps + efl_wl_pub_deps, 36 dependencies: [m, dl] + efl_wl_deps + efl_wl_pub_deps,
19 include_directories : config_dir + [include_directories(join_paths('..','..'))], 37 include_directories : config_dir + [include_directories(join_paths('..','..'))],
20 install: true, 38 install: true,
39 c_args : package_c_args,
21 version : meson.project_version() 40 version : meson.project_version()
22) 41)
23 42
24efl_wl = declare_dependency( 43efl_wl = declare_dependency(
25 include_directories: [include_directories('.')], 44 include_directories: [include_directories('.')],
26 link_with: efl_wl_lib, 45 link_with: efl_wl_lib,
46 sources: pub_eo_file_target,
27 dependencies: efl_wl_pub_deps, 47 dependencies: efl_wl_pub_deps,
28) 48)
29 49
30install_headers(efl_wl_header_src, 50install_headers(efl_wl_header_src,
31 install_dir : dir_package_include, 51 install_dir : dir_package_include,
32) 52)
53
54eolian_efl_wl_dir = join_paths(eolian_include_dir, package_version_name)
55if get_option('install-eo-files')
56 install_data(pub_eo_files,
57 install_dir: eolian_efl_wl_dir
58 )
59endif