summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHermet Park <chuneon.park@samsung.com>2020-03-13 10:26:14 +0900
committerHermet Park <chuneon.park@samsung.com>2020-03-13 10:26:14 +0900
commitb932fe8430697a973cf96ec226a3a56a196bd19c (patch)
tree8d5dae6e24083f1eee77a97231bdf243ab82fd89
parentfe4ee6bb9af005674b4d0beb01c89663ccef2589 (diff)
parente8100fa8b004f6344a765c623e883ccb60bda88c (diff)
Merge branch 'master' into devs/hermet/lottie
-rw-r--r--doc/Doxyfile.in3
-rw-r--r--doc/eo_tutorial.dox4
-rw-r--r--meson.build2
-rw-r--r--src/bin/edje/edje_cc_handlers.c2
-rw-r--r--src/bin/edje/edje_cc_out.c3
-rw-r--r--src/bin/edje/edje_cc_parse.c4
-rw-r--r--src/bin/efl_canvas_wl/efl_canvas_wl_test.c (renamed from src/bin/efl_wl/efl_wl_test.c)21
-rw-r--r--src/bin/efl_canvas_wl/efl_canvas_wl_test_stack.c (renamed from src/bin/efl_wl/efl_wl_test_stack.c)10
-rw-r--r--src/bin/efl_canvas_wl/meson.build13
-rw-r--r--src/bin/efl_wl/meson.build13
-rw-r--r--src/bin/exactness/common.c14
-rw-r--r--src/bin/exactness/common.h100
-rw-r--r--src/bin/exactness/exactness.c40
-rw-r--r--src/bin/exactness/injector.c117
-rw-r--r--src/bin/exactness/inspect.c2
-rw-r--r--src/bin/exactness/meson.build16
-rw-r--r--src/bin/exactness/player.c147
-rw-r--r--src/bin/exactness/recorder.c33
-rw-r--r--src/lib/ecore/efl_exe.c35
-rw-r--r--src/lib/ecore/efl_exe.eo12
-rw-r--r--src/lib/edje/edje_textblock.c26
-rw-r--r--src/lib/edje/edje_util.c1
-rw-r--r--src/lib/efl/Efl.h9
-rw-r--r--src/lib/efl_canvas_wl/Efl_Canvas_Wl.h (renamed from src/lib/efl_wl/Efl_Wl.h)116
-rw-r--r--src/lib/efl_canvas_wl/copiedfromweston.x (renamed from src/lib/efl_wl/copiedfromweston.x)0
-rw-r--r--src/lib/efl_canvas_wl/dmabuf.c (renamed from src/lib/efl_wl/dmabuf.c)0
-rw-r--r--src/lib/efl_canvas_wl/dmabuf.h (renamed from src/lib/efl_wl/dmabuf.h)0
-rw-r--r--src/lib/efl_canvas_wl/efl_canvas_wl.c (renamed from src/lib/efl_wl/efl_wl.c)652
-rw-r--r--src/lib/efl_canvas_wl/efl_canvas_wl.eo123
-rw-r--r--src/lib/efl_canvas_wl/efl_canvas_wl_surface.eo34
-rw-r--r--src/lib/efl_canvas_wl/meson.build60
-rw-r--r--src/lib/efl_canvas_wl/x11.x (renamed from src/lib/efl_wl/x11.x)0
-rw-r--r--src/lib/efl_wl/meson.build32
-rw-r--r--src/lib/eina/eina_abstract_content.c7
-rw-r--r--src/lib/eina/eina_log.c2
-rw-r--r--src/lib/eina/eina_value.h4
-rw-r--r--src/lib/eina/meson.build1
-rw-r--r--src/lib/elementary/efl_ui_layout.c5
-rw-r--r--src/lib/elementary/efl_ui_textbox.c142
-rw-r--r--src/lib/elementary/efl_ui_textbox.eo20
-rw-r--r--src/lib/elementary/elm_diskselector.h2
-rw-r--r--src/lib/elementary/elm_entry.h2
-rw-r--r--src/lib/elementary/elm_gengrid.h2
-rw-r--r--src/lib/elementary/elm_genlist.h2
-rw-r--r--src/lib/elementary/elm_list.h2
-rw-r--r--src/lib/elementary/elm_map.h2
-rw-r--r--src/lib/elementary/elm_photocam.h2
-rw-r--r--src/lib/elementary/elm_toolbar.h2
-rw-r--r--src/lib/evas/canvas/efl_canvas_vg_shape.c2
-rw-r--r--src/lib/evas/canvas/evas_canvas_eo.h2
-rw-r--r--src/lib/evas/canvas/evas_object_box.c4
-rw-r--r--src/lib/evas/canvas/evas_object_textblock.c28
-rw-r--r--src/lib/evas/canvas/evas_render.c3
-rw-r--r--src/lib/evas/filters/evas_filter_parser.c44
-rw-r--r--src/lib/evas/gesture/efl_canvas_gesture_manager.c10
55 files changed, 1074 insertions, 860 deletions
diff --git a/doc/Doxyfile.in b/doc/Doxyfile.in
index 0a62bfdec7..17f86aec5e 100644
--- a/doc/Doxyfile.in
+++ b/doc/Doxyfile.in
@@ -666,7 +666,8 @@ EXCLUDE_PATTERNS = *_private* \
666 */efl_*.eo.c \ 666 */efl_*.eo.c \
667 */efl_*.eo.h \ 667 */efl_*.eo.h \
668 */efl_*.eot.h \ 668 */efl_*.eot.h \
669 */Efl_* 669 */Efl_* \
670 */Eo.h
670 671
671# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names 672# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
672# (namespaces, classes, functions, etc.) that should be excluded from the 673# (namespaces, classes, functions, etc.) that should be excluded from the
diff --git a/doc/eo_tutorial.dox b/doc/eo_tutorial.dox
index d8e7d7fb8d..baeb10d857 100644
--- a/doc/eo_tutorial.dox
+++ b/doc/eo_tutorial.dox
@@ -120,11 +120,11 @@
120 * 120 *
121 * @section create_class_h_side How to create a class - H side? 121 * @section create_class_h_side How to create a class - H side?
122 * - If the object is new, establish the public APIs 122 * - If the object is new, establish the public APIs
123 * - #define \$(CLASS_NAME) \$(class_name)_class_get(): will be used to access data/inherit from this class... 123 * - \#define \$(CLASS_NAME) \$(class_name)_class_get(): will be used to access data/inherit from this class...
124 * - const Eo_Class *\$(class_name)_class_get(void) EINA_CONST: declaration of the function that will create the class (not the instance), i.e virtual table... 124 * - const Eo_Class *\$(class_name)_class_get(void) EINA_CONST: declaration of the function that will create the class (not the instance), i.e virtual table...
125 * - extern EAPI Eo_Op \$(CLASS_NAME)_BASE_ID: class id that will be essentially used to identify functions set of this class 125 * - extern EAPI Eo_Op \$(CLASS_NAME)_BASE_ID: class id that will be essentially used to identify functions set of this class
126 * - enum of the function ids of the class in the form \$(CLASS_NAME)_SUB_ID: used to identify the function inside the class; function id is unique per class but (class id, function id) is unique per system.. 126 * - enum of the function ids of the class in the form \$(CLASS_NAME)_SUB_ID: used to identify the function inside the class; function id is unique per class but (class id, function id) is unique per system..
127 * - #define \$(CLASS_NAME)_ID(sub_id) (\$(CLASS_NAME)_BASE_ID + sub_id): formula to calculate the system function id 127 * - \#define \$(CLASS_NAME)_ID(sub_id) (\$(CLASS_NAME)_BASE_ID + sub_id): formula to calculate the system function id
128 * - define of each function consists of: 128 * - define of each function consists of:
129 * - the name of the function that will be used in eo_do 129 * - the name of the function that will be used in eo_do
130 * - parameters without types 130 * - parameters without types
diff --git a/meson.build b/meson.build
index 29123222a3..6ad0419631 100644
--- a/meson.build
+++ b/meson.build
@@ -331,7 +331,7 @@ subprojects = [
331['ethumb' ,[] , true, true, true, false, false, false, ['eina', 'efl', 'eo'], []], 331['ethumb' ,[] , true, true, true, false, false, false, ['eina', 'efl', 'eo'], []],
332['ethumb_client' ,[] , false, true, true, false, false, true, ['eina', 'efl', 'eo', 'ethumb'], []], 332['ethumb_client' ,[] , false, true, true, false, false, true, ['eina', 'efl', 'eo', 'ethumb'], []],
333['elementary' ,[] , true, true, true, true, true, true, ['eina', 'efl', 'eo', 'eet', 'evas', 'ecore', 'ecore-evas', 'ecore-file', 'ecore-input', 'edje', 'ethumb-client', 'emotion', 'ecore-imf', 'ecore-con', 'eldbus', 'efreet', 'efreet-mime', 'efreet-trash', 'eio'], ['atspi']], 333['elementary' ,[] , true, true, true, true, true, true, ['eina', 'efl', 'eo', 'eet', 'evas', 'ecore', 'ecore-evas', 'ecore-file', 'ecore-input', 'edje', 'ethumb-client', 'emotion', 'ecore-imf', 'ecore-con', 'eldbus', 'efreet', 'efreet-mime', 'efreet-trash', 'eio'], ['atspi']],
334['efl_wl' ,['wl'] , false, true, true, false, false, false, ['evas', 'ecore'], []], 334['efl_canvas_wl' ,['wl'] , false, true, true, false, false, false, ['eina', 'efl', 'eo', 'evas', 'ecore'], []],
335['elua' ,['elua'] , false, true, true, false, true, false, ['eina', 'luajit'], []], 335['elua' ,['elua'] , false, true, true, false, true, false, ['eina', 'luajit'], []],
336['ecore_wayland' ,['wl-deprecated'] , false, true, false, false, false, false, ['eina'], []], 336['ecore_wayland' ,['wl-deprecated'] , false, true, false, false, false, false, ['eina'], []],
337['ecore_drm' ,['drm-deprecated'] , false, true, false, false, false, false, ['eina'], []], 337['ecore_drm' ,['drm-deprecated'] , false, true, false, false, false, false, ['eina'], []],
diff --git a/src/bin/edje/edje_cc_handlers.c b/src/bin/edje/edje_cc_handlers.c
index 431dea7bdb..913a749d54 100644
--- a/src/bin/edje/edje_cc_handlers.c
+++ b/src/bin/edje/edje_cc_handlers.c
@@ -4562,7 +4562,7 @@ st_collections_group_name(void)
4562 This property can be inherited. 4562 This property can be inherited.
4563 Defaults: 0 4563 Defaults: 0
4564 4564
4565 @warning Your edc file should always wrap this keyword with #ifdef HAVE_SKIP_NAMESPACE_VALIDATION 4565 @warning Your edc file should always wrap this keyword with <tt>\#ifdef HAVE_SKIP_NAMESPACE_VALIDATION</tt>
4566 @since 1.21 4566 @since 1.21
4567 @endproperty 4567 @endproperty
4568 */ 4568 */
diff --git a/src/bin/edje/edje_cc_out.c b/src/bin/edje/edje_cc_out.c
index b3549f2ea6..7c9c67ea25 100644
--- a/src/bin/edje/edje_cc_out.c
+++ b/src/bin/edje/edje_cc_out.c
@@ -744,7 +744,8 @@ check_program(Edje_Part_Collection *pc, Edje_Program *ep, Eet_File *ef)
744 744
745 if (et->id >= (int) pc->parts_count) 745 if (et->id >= (int) pc->parts_count)
746 { 746 {
747 ERR("Target id '%d' greater than possible index '%d'.", et->id, (int) pc->parts_count - 1); 747 ERR("In group '%s' program '%s', target id '%d' greater than possible index '%d'.",
748 pc->part ? pc->part : "", ep->name ? ep->name : "", et->id, (int) pc->parts_count - 1);
748 exit(-1); 749 exit(-1);
749 } 750 }
750 751
diff --git a/src/bin/edje/edje_cc_parse.c b/src/bin/edje/edje_cc_parse.c
index ad1a2c95ac..e6db4f5840 100644
--- a/src/bin/edje/edje_cc_parse.c
+++ b/src/bin/edje/edje_cc_parse.c
@@ -30,6 +30,7 @@
30#define EDJE_1_21_SUPPORTED " -DEFL_VERSION_1_21=1 " 30#define EDJE_1_21_SUPPORTED " -DEFL_VERSION_1_21=1 "
31#define EDJE_1_22_SUPPORTED " -DEFL_VERSION_1_22=1 " 31#define EDJE_1_22_SUPPORTED " -DEFL_VERSION_1_22=1 "
32#define EDJE_1_23_SUPPORTED " -DEFL_VERSION_1_23=1 " 32#define EDJE_1_23_SUPPORTED " -DEFL_VERSION_1_23=1 "
33#define EDJE_1_24_SUPPORTED " -DEFL_VERSION_1_24=1 "
33 34
34#define EDJE_CC_EFL_VERSION_SUPPORTED \ 35#define EDJE_CC_EFL_VERSION_SUPPORTED \
35 EDJE_1_18_SUPPORTED \ 36 EDJE_1_18_SUPPORTED \
@@ -37,7 +38,8 @@
37 EDJE_1_20_SUPPORTED \ 38 EDJE_1_20_SUPPORTED \
38 EDJE_1_21_SUPPORTED \ 39 EDJE_1_21_SUPPORTED \
39 EDJE_1_22_SUPPORTED \ 40 EDJE_1_22_SUPPORTED \
40 EDJE_1_23_SUPPORTED 41 EDJE_1_23_SUPPORTED \
42 EDJE_1_24_SUPPORTED
41 43
42static void new_object(void); 44static void new_object(void);
43static void new_statement(void); 45static void new_statement(void);
diff --git a/src/bin/efl_wl/efl_wl_test.c b/src/bin/efl_canvas_wl/efl_canvas_wl_test.c
index bf5b2ad4d1..4bb7e616af 100644
--- a/src/bin/efl_wl/efl_wl_test.c
+++ b/src/bin/efl_canvas_wl/efl_canvas_wl_test.c
@@ -1,18 +1,17 @@
1#ifdef HAVE_CONFIG_H 1#ifdef HAVE_CONFIG_H
2# include "config.h" 2# include "config.h"
3#endif 3#endif
4#include "Efl_Wl.h" 4#include "Efl_Canvas_Wl.h"
5#include "Elementary.h" 5#include "Elementary.h"
6 6
7static Evas_Object *win; 7static Evas_Object *win;
8static Eina_Strbuf *buf; 8static Eina_Strbuf *buf;
9static Ecore_Exe *exe; 9static Eo *exe;
10 10
11static Eina_Bool 11static void
12del_handler(void *d EINA_UNUSED, int t EINA_UNUSED, Ecore_Exe_Event_Del *ev) 12del_handler(void *d EINA_UNUSED, const Efl_Event *ev)
13{ 13{
14 if (ev->exe == exe) ecore_main_loop_quit(); 14 if (ev->object == exe) ecore_main_loop_quit();
15 return ECORE_CALLBACK_RENEW;
16} 15}
17 16
18static void 17static void
@@ -24,8 +23,8 @@ focus_in(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *ev
24static Eina_Bool 23static Eina_Bool
25dostuff(void *data) 24dostuff(void *data)
26{ 25{
27 exe = efl_wl_run(data, eina_strbuf_string_get(buf)); 26 exe = efl_canvas_wl_run(data, eina_strbuf_string_get(buf));
28 ecore_event_handler_add(ECORE_EXE_EVENT_DEL, (Ecore_Event_Handler_Cb)del_handler, NULL); 27 efl_event_callback_add(exe, EFL_TASK_EVENT_EXIT, del_handler, NULL);
29 evas_object_focus_set(data, 1); 28 evas_object_focus_set(data, 1);
30 return EINA_FALSE; 29 return EINA_FALSE;
31} 30}
@@ -63,9 +62,9 @@ main(int argc, char *argv[])
63 elm_win_autodel_set(win, 1); 62 elm_win_autodel_set(win, 1);
64 elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED); 63 elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
65 64
66 o = efl_wl_add(evas_object_evas_get(win)); 65 o = efl_add(EFL_CANVAS_WL_CLASS, win);
67 efl_wl_aspect_set(o, 1); 66 efl_canvas_wl_aspect_set(o, 1);
68 efl_wl_minmax_set(o, 1); 67 efl_canvas_wl_minmax_set(o, 1);
69 evas_object_size_hint_align_set(o, EVAS_HINT_FILL, EVAS_HINT_FILL); 68 evas_object_size_hint_align_set(o, EVAS_HINT_FILL, EVAS_HINT_FILL);
70 evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); 69 evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
71 evas_object_event_callback_add(o, EVAS_CALLBACK_CHANGED_SIZE_HINTS, hints_changed, win); 70 evas_object_event_callback_add(o, EVAS_CALLBACK_CHANGED_SIZE_HINTS, hints_changed, win);
diff --git a/src/bin/efl_wl/efl_wl_test_stack.c b/src/bin/efl_canvas_wl/efl_canvas_wl_test_stack.c
index 51cd598984..49849e07e8 100644
--- a/src/bin/efl_wl/efl_wl_test_stack.c
+++ b/src/bin/efl_canvas_wl/efl_canvas_wl_test_stack.c
@@ -1,7 +1,7 @@
1#ifdef HAVE_CONFIG_H 1#ifdef HAVE_CONFIG_H
2# include "config.h" 2# include "config.h"
3#endif 3#endif
4#include "Efl_Wl.h" 4#include "Efl_Canvas_Wl.h"
5#include "Elementary.h" 5#include "Elementary.h"
6 6
7static Evas_Object *win; 7static Evas_Object *win;
@@ -18,7 +18,7 @@ static unsigned int n;
18static Eina_Bool 18static Eina_Bool
19dostuff(void *data) 19dostuff(void *data)
20{ 20{
21 efl_wl_run(data, cmds[n++]); 21 efl_canvas_wl_run(data, cmds[n++]);
22 evas_object_focus_set(data, 1); 22 evas_object_focus_set(data, 1);
23 return n != num_cmds; 23 return n != num_cmds;
24} 24}
@@ -26,13 +26,13 @@ dostuff(void *data)
26static void 26static void
27prev_clicked(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) 27prev_clicked(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
28{ 28{
29 efl_wl_prev(data); 29 efl_canvas_wl_surface_prev(data);
30} 30}
31 31
32static void 32static void
33next_clicked(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) 33next_clicked(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
34{ 34{
35 efl_wl_next(data); 35 efl_canvas_wl_surface_next(data);
36} 36}
37 37
38int 38int
@@ -69,7 +69,7 @@ main(int argc, char *argv[])
69 evas_object_show(next); 69 evas_object_show(next);
70 elm_table_pack(o, next, 1, 0, 1, 1); 70 elm_table_pack(o, next, 1, 0, 1, 1);
71 71
72 comp = efl_wl_add(evas_object_evas_get(win)); 72 comp = efl_add(EFL_CANVAS_WL_CLASS, win);
73 evas_object_size_hint_min_set(comp, 640, 480); 73 evas_object_size_hint_min_set(comp, 640, 480);
74 elm_table_pack(o, comp, 0, 1, 2, 1); 74 elm_table_pack(o, comp, 0, 1, 2, 1);
75 evas_object_size_hint_align_set(comp, EVAS_HINT_FILL, EVAS_HINT_FILL); 75 evas_object_size_hint_align_set(comp, EVAS_HINT_FILL, EVAS_HINT_FILL);
diff --git a/src/bin/efl_canvas_wl/meson.build b/src/bin/efl_canvas_wl/meson.build
new file mode 100644
index 0000000000..278a2c58db
--- /dev/null
+++ b/src/bin/efl_canvas_wl/meson.build
@@ -0,0 +1,13 @@
1executable('efl_canvas_wl_test',
2 'efl_canvas_wl_test.c',
3 include_directories : config_dir,
4 dependencies: [efl_canvas_wl, efl_canvas_wl_deps, efl_canvas_wl_pub_deps, elementary],
5 install: true,
6)
7
8executable('efl_canvas_wl_test_stack',
9 'efl_canvas_wl_test_stack.c',
10 include_directories : config_dir,
11 dependencies: [efl_canvas_wl, efl_canvas_wl_deps, efl_canvas_wl_pub_deps, elementary],
12 install: true,
13)
diff --git a/src/bin/efl_wl/meson.build b/src/bin/efl_wl/meson.build
deleted file mode 100644
index c95cd0e767..0000000000
--- a/src/bin/efl_wl/meson.build
+++ /dev/null
@@ -1,13 +0,0 @@
1executable('efl_wl_test',
2 'efl_wl_test.c',
3 include_directories : config_dir,
4 dependencies: [efl_wl, elementary],
5 install: true,
6)
7
8executable('efl_wl_test_stack',
9 'efl_wl_test_stack.c',
10 include_directories : config_dir,
11 dependencies: [efl_wl, elementary],
12 install: true,
13)
diff --git a/src/bin/exactness/common.c b/src/bin/exactness/common.c
new file mode 100644
index 0000000000..17983cdbc6
--- /dev/null
+++ b/src/bin/exactness/common.c
@@ -0,0 +1,14 @@
1#include "common.h"
2
3static int _verbose = 0;
4
5void
6ex_printf(int verbose, const char *fmt, ...)
7{
8 va_list ap;
9 if (!_verbose || verbose > _verbose) return;
10
11 va_start(ap, fmt);
12 vprintf(fmt, ap);
13 va_end(ap);
14}
diff --git a/src/bin/exactness/common.h b/src/bin/exactness/common.h
new file mode 100644
index 0000000000..2581c63392
--- /dev/null
+++ b/src/bin/exactness/common.h
@@ -0,0 +1,100 @@
1#ifdef HAVE_CONFIG_H
2# include <config.h>
3#endif
4
5#include <Elementary.h>
6#include <Exactness.h>
7#include <exactness_private.h>
8
9typedef struct
10{
11 Eina_Debug_Session *session;
12 int srcid;
13 void *buffer;
14 unsigned int size;
15} _Main_Loop_Info;
16
17#define WRAPPER_TO_XFER_MAIN_LOOP(foo) \
18static void \
19_intern_main_loop ## foo(void *data) \
20{ \
21 _Main_Loop_Info *info = data; \
22 _main_loop ## foo(info->session, info->srcid, info->buffer, info->size); \
23 free(info->buffer); \
24 free(info); \
25} \
26static Eina_Bool \
27foo(Eina_Debug_Session *session, int srcid, void *buffer, int size) \
28{ \
29 _Main_Loop_Info *info = calloc(1, sizeof(*info)); \
30 info->session = session; \
31 info->srcid = srcid; \
32 info->size = size; \
33 if (info->size) \
34 { \
35 info->buffer = malloc(info->size); \
36 memcpy(info->buffer, buffer, info->size); \
37 } \
38 ecore_main_loop_thread_safe_call_async(_intern_main_loop ## foo, info); \
39 return EINA_TRUE; \
40}
41
42#ifndef WORDS_BIGENDIAN
43#define SWAP_64(x) x
44#define SWAP_32(x) x
45#define SWAP_16(x) x
46#define SWAP_DBL(x) x
47#else
48#define SWAP_64(x) eina_swap64(x)
49#define SWAP_32(x) eina_swap32(x)
50#define SWAP_16(x) eina_swap16(x)
51#define SWAP_DBL(x) SWAP_64(x)
52#endif
53
54#define EXTRACT_INT(_buf) \
55({ \
56 int __i; \
57 memcpy(&__i, _buf, sizeof(int)); \
58 _buf += sizeof(int); \
59 SWAP_32(__i); \
60})
61
62#define EXTRACT_DOUBLE(_buf) \
63({ \
64 double __d; \
65 memcpy(&__d, _buf, sizeof(double)); \
66 _buf += sizeof(double); \
67 SWAP_DBL(__d); \
68})
69
70#define EXTRACT_STRING(_buf) \
71({ \
72 char *__s = _buf ? strdup(_buf) : NULL; \
73 int __len = (__s ? strlen(__s) : 0) + 1; \
74 _buf += __len; \
75 __s; \
76})
77
78#define STORE_INT(_buf, __i) \
79({ \
80 int __si = SWAP_32(__i); \
81 memcpy(_buf, &__si, sizeof(int)); \
82 _buf += sizeof(int); \
83})
84
85#define STORE_DOUBLE(_buf, __d) \
86{ \
87 double __d2 = SWAP_DBL(__d); \
88 memcpy(_buf, &__d2, sizeof(double)); \
89 _buf += sizeof(double); \
90}
91
92#define STORE_STRING(_buf, __s) \
93{ \
94 int __len = (__s ? strlen(__s) : 0) + 1; \
95 if (__s) memcpy(_buf, __s, __len); \
96 else *_buf = '\0'; \
97 _buf += __len; \
98}
99
100void ex_printf(int verbose, const char *fmt, ...);
diff --git a/src/bin/exactness/exactness.c b/src/bin/exactness/exactness.c
index 9214236045..c594b28a60 100644
--- a/src/bin/exactness/exactness.c
+++ b/src/bin/exactness/exactness.c
@@ -8,6 +8,7 @@
8#include <Ecore_File.h> 8#include <Ecore_File.h>
9 9
10#include "exactness_private.h" 10#include "exactness_private.h"
11#include "common.h"
11 12
12#ifdef _WIN32 13#ifdef _WIN32
13# include <evil_private.h> /* mkdir */ 14# include <evil_private.h> /* mkdir */
@@ -18,8 +19,6 @@
18#define ORIG_SUBDIR "orig" 19#define ORIG_SUBDIR "orig"
19#define CURRENT_SUBDIR "current" 20#define CURRENT_SUBDIR "current"
20 21
21#define EXACTNESS_PATH_MAX 1024
22
23#define BUF_SIZE 1024 22#define BUF_SIZE 1024
24 23
25typedef struct 24typedef struct
@@ -52,17 +51,6 @@ static Eina_List *_compare_errors;
52 51
53static Eina_Bool _job_consume(); 52static Eina_Bool _job_consume();
54 53
55static void
56_printf(int verbose, const char *fmt, ...)
57{
58 va_list ap;
59 if (!_verbose || verbose > _verbose) return;
60
61 va_start(ap, fmt);
62 vprintf(fmt, ap);
63 va_end(ap);
64}
65
66static Exactness_Image * 54static Exactness_Image *
67_image_load(const char *filename) 55_image_load(const char *filename)
68{ 56{
@@ -154,7 +142,7 @@ _exu_imgs_unpack(const char *exu_path, const char *dir, const char *ent_name)
154 { 142 {
155 Eo *o = evas_object_image_add(e); 143 Eo *o = evas_object_image_add(e);
156 char *filename = alloca(strlen(dir) + strlen(ent_name) + 20); 144 char *filename = alloca(strlen(dir) + strlen(ent_name) + 20);
157 snprintf(filename, EXACTNESS_PATH_MAX, "%s/%s%c%.3d.png", 145 snprintf(filename, PATH_MAX, "%s/%s%c%.3d.png",
158 dir, ent_name, SHOT_DELIMITER, n++); 146 dir, ent_name, SHOT_DELIMITER, n++);
159 evas_object_image_size_set(o, img->w, img->h); 147 evas_object_image_size_set(o, img->w, img->h);
160 evas_object_image_data_set(o, img->pixels); 148 evas_object_image_data_set(o, img->pixels);
@@ -171,7 +159,7 @@ _exu_imgs_unpack(const char *exu_path, const char *dir, const char *ent_name)
171static void 159static void
172_run_test_compare(const List_Entry *ent) 160_run_test_compare(const List_Entry *ent)
173{ 161{
174 char *path = alloca(EXACTNESS_PATH_MAX); 162 char *path = alloca(PATH_MAX);
175 char *origdir = alloca(strlen(_dest_dir) + 20); 163 char *origdir = alloca(strlen(_dest_dir) + 20);
176 const char *base_dir; 164 const char *base_dir;
177 Eina_List *itr; 165 Eina_List *itr;
@@ -228,7 +216,7 @@ found:
228static Eina_Bool 216static Eina_Bool
229_run_command_prepare(const List_Entry *ent, char *buf) 217_run_command_prepare(const List_Entry *ent, char *buf)
230{ 218{
231 char scn_path[EXACTNESS_PATH_MAX]; 219 char scn_path[PATH_MAX];
232 Eina_Strbuf *sbuf; 220 Eina_Strbuf *sbuf;
233 const char *base_dir; 221 const char *base_dir;
234 Eina_List *itr; 222 Eina_List *itr;
@@ -283,7 +271,7 @@ ok:
283 } 271 }
284 strncpy(buf, eina_strbuf_string_get(sbuf), SCHEDULER_CMD_SIZE-1); 272 strncpy(buf, eina_strbuf_string_get(sbuf), SCHEDULER_CMD_SIZE-1);
285 eina_strbuf_free(sbuf); 273 eina_strbuf_free(sbuf);
286 _printf(1, "Command: %s\n", buf); 274 ex_printf(1, "Command: %s\n", buf);
287 return EINA_TRUE; 275 return EINA_TRUE;
288} 276}
289 277
@@ -474,7 +462,7 @@ main(int argc, char *argv[])
474 const char *list_file; 462 const char *list_file;
475 Eina_List *itr; 463 Eina_List *itr;
476 const char *base_dir; 464 const char *base_dir;
477 char tmp[EXACTNESS_PATH_MAX]; 465 char tmp[PATH_MAX];
478 Eina_Bool mode_play = EINA_FALSE, mode_init = EINA_FALSE, mode_simulation = EINA_FALSE; 466 Eina_Bool mode_play = EINA_FALSE, mode_init = EINA_FALSE, mode_simulation = EINA_FALSE;
479 Eina_Bool want_quit = EINA_FALSE, scan_objs = EINA_FALSE; 467 Eina_Bool want_quit = EINA_FALSE, scan_objs = EINA_FALSE;
480 Ecore_Getopt_Value values[] = { 468 Ecore_Getopt_Value values[] = {
@@ -558,8 +546,8 @@ main(int argc, char *argv[])
558 if (mode_play) 546 if (mode_play)
559 { 547 {
560 _mode = RUN_PLAY; 548 _mode = RUN_PLAY;
561 if (snprintf(tmp, EXACTNESS_PATH_MAX, "%s/%s", _dest_dir, CURRENT_SUBDIR) 549 if (snprintf(tmp, PATH_MAX, "%s/%s", _dest_dir, CURRENT_SUBDIR)
562 >= EXACTNESS_PATH_MAX) 550 >= PATH_MAX)
563 { 551 {
564 fprintf(stderr, "Path too long: %s", tmp); 552 fprintf(stderr, "Path too long: %s", tmp);
565 ret = 1; 553 ret = 1;
@@ -575,8 +563,8 @@ main(int argc, char *argv[])
575 else if (mode_init) 563 else if (mode_init)
576 { 564 {
577 _mode = RUN_INIT; 565 _mode = RUN_INIT;
578 if (snprintf(tmp, EXACTNESS_PATH_MAX, "%s/%s", _dest_dir, ORIG_SUBDIR) 566 if (snprintf(tmp, PATH_MAX, "%s/%s", _dest_dir, ORIG_SUBDIR)
579 >= EXACTNESS_PATH_MAX) 567 >= PATH_MAX)
580 { 568 {
581 fprintf(stderr, "Path too long: %s", tmp); 569 fprintf(stderr, "Path too long: %s", tmp);
582 ret = 1; 570 ret = 1;
@@ -624,9 +612,9 @@ main(int argc, char *argv[])
624 if (_errors || _compare_errors) 612 if (_errors || _compare_errors)
625 { 613 {
626 FILE *report_file; 614 FILE *report_file;
627 char report_filename[EXACTNESS_PATH_MAX] = ""; 615 char report_filename[PATH_MAX] = "";
628 /* Generate the filename. */ 616 /* Generate the filename. */
629 snprintf(report_filename, EXACTNESS_PATH_MAX, 617 snprintf(report_filename, PATH_MAX,
630 "%s/%s/errors.html", 618 "%s/%s/errors.html",
631 _dest_dir, mode_init ? ORIG_SUBDIR : CURRENT_SUBDIR); 619 _dest_dir, mode_init ? ORIG_SUBDIR : CURRENT_SUBDIR);
632 report_file = fopen(report_filename, "w+"); 620 report_file = fopen(report_filename, "w+");
@@ -660,8 +648,8 @@ main(int argc, char *argv[])
660 EINA_LIST_FREE(_compare_errors, test_name) 648 EINA_LIST_FREE(_compare_errors, test_name)
661 { 649 {
662 Eina_Bool is_from_exu; 650 Eina_Bool is_from_exu;
663 char origpath[EXACTNESS_PATH_MAX]; 651 char origpath[PATH_MAX];
664 snprintf(origpath, EXACTNESS_PATH_MAX, "%s/%s/orig/%s", 652 snprintf(origpath, PATH_MAX, "%s/%s/orig/%s",
665 _dest_dir, CURRENT_SUBDIR, test_name); 653 _dest_dir, CURRENT_SUBDIR, test_name);
666 is_from_exu = ecore_file_exists(origpath); 654 is_from_exu = ecore_file_exists(origpath);
667 printf("\t* %s\n", test_name); 655 printf("\t* %s\n", test_name);
diff --git a/src/bin/exactness/injector.c b/src/bin/exactness/injector.c
index d2b29d014b..928de47a62 100644
--- a/src/bin/exactness/injector.c
+++ b/src/bin/exactness/injector.c
@@ -14,81 +14,7 @@
14#include <Elementary.h> 14#include <Elementary.h>
15 15
16#include <Exactness.h> 16#include <Exactness.h>
17 17#include "common.h"
18typedef struct
19{
20 Eina_Debug_Session *session;
21 int srcid;
22 void *buffer;
23 unsigned int size;
24} _Main_Loop_Info;
25
26#define WRAPPER_TO_XFER_MAIN_LOOP(foo) \
27static void \
28_intern_main_loop ## foo(void *data) \
29{ \
30 _Main_Loop_Info *info = data; \
31 _main_loop ## foo(info->session, info->srcid, info->buffer, info->size); \
32 free(info->buffer); \
33 free(info); \
34} \
35static Eina_Bool \
36foo(Eina_Debug_Session *session, int srcid, void *buffer, int size) \
37{ \
38 _Main_Loop_Info *info = calloc(1, sizeof(*info)); \
39 info->session = session; \
40 info->srcid = srcid; \
41 info->size = size; \
42 if (info->size) \
43 { \
44 info->buffer = malloc(info->size); \
45 memcpy(info->buffer, buffer, info->size); \
46 } \
47 ecore_main_loop_thread_safe_call_async(_intern_main_loop ## foo, info); \
48 return EINA_TRUE; \
49}
50
51#ifndef WORDS_BIGENDIAN
52#define SWAP_64(x) x
53#define SWAP_32(x) x
54#define SWAP_16(x) x
55#define SWAP_DBL(x) x
56#else
57#define SWAP_64(x) eina_swap64(x)
58#define SWAP_32(x) eina_swap32(x)
59#define SWAP_16(x) eina_swap16(x)
60#define SWAP_DBL(x) SWAP_64(x)
61#endif
62
63#define EXTRACT_INT(_buf) \
64({ \
65 int __i; \
66 memcpy(&__i, _buf, sizeof(int)); \
67 _buf += sizeof(int); \
68 SWAP_32(__i); \
69})
70
71#define STORE_INT(_buf, __i) \
72{ \
73 int __i2 = SWAP_32(__i); \
74 memcpy(_buf, &__i2, sizeof(int)); \
75 _buf += sizeof(int); \
76}
77
78#define STORE_DOUBLE(_buf, __d) \
79{ \
80 double __d2 = SWAP_DBL(__d); \
81 memcpy(_buf, &__d2, sizeof(double)); \
82 _buf += sizeof(double); \
83}
84
85#define STORE_STRING(_buf, __s) \
86{ \
87 int __len = (__s ? strlen(__s) : 0) + 1; \
88 if (__s) memcpy(_buf, __s, __len); \
89 else *_buf = '\0'; \
90 _buf += __len; \
91}
92 18
93static Eina_Stringshare *_src_filename = NULL; 19static Eina_Stringshare *_src_filename = NULL;
94static Exactness_Unit *_src_unit = NULL; 20static Exactness_Unit *_src_unit = NULL;
@@ -135,32 +61,21 @@ EINA_DEBUG_OPCODES_ARRAY_DEFINE(_debug_ops,
135 ); 61 );
136 62
137static void 63static void
138_printf(int verbose, const char *fmt, ...)
139{
140 va_list ap;
141 if (!_verbose || verbose > _verbose) return;
142
143 va_start(ap, fmt);
144 vprintf(fmt, ap);
145 va_end(ap);
146}
147
148static void
149_feed_event(Exactness_Action_Type type, unsigned int n_evas, void *data) 64_feed_event(Exactness_Action_Type type, unsigned int n_evas, void *data)
150{ 65{
151 switch (type) 66 switch (type)
152 { 67 {
153 case EXACTNESS_ACTION_MOUSE_IN: 68 case EXACTNESS_ACTION_MOUSE_IN:
154 { 69 {
155 _printf(1, "Mouse in\n"); 70 ex_printf(1, "Mouse in\n");
156 _printf(2, "%s evas_event_feed_mouse_in n_evas=<%d>\n", __func__, n_evas); 71 ex_printf(2, "%s evas_event_feed_mouse_in n_evas=<%d>\n", __func__, n_evas);
157 eina_debug_session_send(_session, _cid, _mouse_in_op, &n_evas, sizeof(int)); 72 eina_debug_session_send(_session, _cid, _mouse_in_op, &n_evas, sizeof(int));
158 break; 73 break;
159 } 74 }
160 case EXACTNESS_ACTION_MOUSE_OUT: 75 case EXACTNESS_ACTION_MOUSE_OUT:
161 { 76 {
162 _printf(1, "Mouse out\n"); 77 ex_printf(1, "Mouse out\n");
163 _printf(2, "%s evas_event_feed_mouse_out n_evas=<%d>\n", __func__, n_evas); 78 ex_printf(2, "%s evas_event_feed_mouse_out n_evas=<%d>\n", __func__, n_evas);
164 eina_debug_session_send(_session, _cid, _mouse_out_op, &n_evas, sizeof(int)); 79 eina_debug_session_send(_session, _cid, _mouse_out_op, &n_evas, sizeof(int));
165 break; 80 break;
166 } 81 }
@@ -169,8 +84,8 @@ _feed_event(Exactness_Action_Type type, unsigned int n_evas, void *data)
169 Exactness_Action_Mouse_Wheel *t = data; 84 Exactness_Action_Mouse_Wheel *t = data;
170 int len = 3*sizeof(int); 85 int len = 3*sizeof(int);
171 char *buf = malloc(len), *tmp = buf; 86 char *buf = malloc(len), *tmp = buf;
172 _printf(1, "Mouse wheel\n"); 87 ex_printf(1, "Mouse wheel\n");
173 _printf(2, "%s evas_event_feed_mouse_wheel n_evas=<%d>\n", __func__, n_evas); 88 ex_printf(2, "%s evas_event_feed_mouse_wheel n_evas=<%d>\n", __func__, n_evas);
174 STORE_INT(tmp, n_evas); 89 STORE_INT(tmp, n_evas);
175 STORE_INT(tmp, t->direction); 90 STORE_INT(tmp, t->direction);
176 STORE_INT(tmp, t->z); 91 STORE_INT(tmp, t->z);
@@ -184,7 +99,7 @@ _feed_event(Exactness_Action_Type type, unsigned int n_evas, void *data)
184 Exactness_Action_Multi_Event *t = data; 99 Exactness_Action_Multi_Event *t = data;
185 int len = 5*sizeof(int)+7*sizeof(double)+sizeof(int); 100 int len = 5*sizeof(int)+7*sizeof(double)+sizeof(int);
186 char *buf = malloc(len), *tmp = buf; 101 char *buf = malloc(len), *tmp = buf;
187 _printf(2, "%s %s n_evas=<%d>\n", __func__, 102 ex_printf(2, "%s %s n_evas=<%d>\n", __func__,
188 type == EXACTNESS_ACTION_MULTI_DOWN ? "evas_event_feed_multi_down" : 103 type == EXACTNESS_ACTION_MULTI_DOWN ? "evas_event_feed_multi_down" :
189 "evas_event_feed_multi_up", n_evas); 104 "evas_event_feed_multi_up", n_evas);
190 STORE_INT(tmp, n_evas); 105 STORE_INT(tmp, n_evas);
@@ -211,7 +126,7 @@ _feed_event(Exactness_Action_Type type, unsigned int n_evas, void *data)
211 Exactness_Action_Multi_Move *t = data; 126 Exactness_Action_Multi_Move *t = data;
212 int len = 4*sizeof(int)+7*sizeof(double); 127 int len = 4*sizeof(int)+7*sizeof(double);
213 char *buf = malloc(len), *tmp = buf; 128 char *buf = malloc(len), *tmp = buf;
214 _printf(2, "%s evas_event_feed_multi_move n_evas=<%d>\n", __func__, n_evas); 129 ex_printf(2, "%s evas_event_feed_multi_move n_evas=<%d>\n", __func__, n_evas);
215 STORE_INT(tmp, n_evas); 130 STORE_INT(tmp, n_evas);
216 STORE_INT(tmp, t->d); 131 STORE_INT(tmp, t->d);
217 STORE_INT(tmp, t->x); 132 STORE_INT(tmp, t->x);
@@ -237,7 +152,7 @@ _feed_event(Exactness_Action_Type type, unsigned int n_evas, void *data)
237 len += t->string ? strlen(t->string) : 0; 152 len += t->string ? strlen(t->string) : 0;
238 len += t->compose ? strlen(t->compose) : 0; 153 len += t->compose ? strlen(t->compose) : 0;
239 char *buf = malloc(len), *tmp = buf; 154 char *buf = malloc(len), *tmp = buf;
240 _printf(2, "%s %s n_evas=<%d>\n", __func__, 155 ex_printf(2, "%s %s n_evas=<%d>\n", __func__,
241 type == EXACTNESS_ACTION_KEY_DOWN ? "evas_event_feed_key_down " : 156 type == EXACTNESS_ACTION_KEY_DOWN ? "evas_event_feed_key_down " :
242 "evas_event_feed_key_up", n_evas); 157 "evas_event_feed_key_up", n_evas);
243 STORE_INT(tmp, n_evas); 158 STORE_INT(tmp, n_evas);
@@ -254,7 +169,7 @@ _feed_event(Exactness_Action_Type type, unsigned int n_evas, void *data)
254 } 169 }
255 case EXACTNESS_ACTION_TAKE_SHOT: 170 case EXACTNESS_ACTION_TAKE_SHOT:
256 { 171 {
257 _printf(2, "%s take shot n_evas=<%d>\n", __func__, n_evas); 172 ex_printf(2, "%s take shot n_evas=<%d>\n", __func__, n_evas);
258 eina_debug_session_send(_session, _cid, _take_shot_op, &n_evas, sizeof(int)); 173 eina_debug_session_send(_session, _cid, _take_shot_op, &n_evas, sizeof(int));
259 break; 174 break;
260 } 175 }
@@ -265,7 +180,7 @@ _feed_event(Exactness_Action_Type type, unsigned int n_evas, void *data)
265 len += t->wdg_name ? strlen(t->wdg_name) : 0; 180 len += t->wdg_name ? strlen(t->wdg_name) : 0;
266 len += t->event_name ? strlen(t->event_name) : 0; 181 len += t->event_name ? strlen(t->event_name) : 0;
267 char *buf = malloc(len), *tmp = buf; 182 char *buf = malloc(len), *tmp = buf;
268 _printf(2, "%s %s\n", __func__, "EFL event"); 183 ex_printf(2, "%s %s\n", __func__, "EFL event");
269 STORE_STRING(tmp, t->wdg_name); 184 STORE_STRING(tmp, t->wdg_name);
270 STORE_STRING(tmp, t->event_name); 185 STORE_STRING(tmp, t->event_name);
271 eina_debug_session_send(_session, _cid, _efl_event_op, buf, len); 186 eina_debug_session_send(_session, _cid, _efl_event_op, buf, len);
@@ -278,7 +193,7 @@ _feed_event(Exactness_Action_Type type, unsigned int n_evas, void *data)
278 int len = 0; 193 int len = 0;
279 len += t->wdg_name ? strlen(t->wdg_name) : 0; 194 len += t->wdg_name ? strlen(t->wdg_name) : 0;
280 char *buf = malloc(len), *tmp = buf; 195 char *buf = malloc(len), *tmp = buf;
281 _printf(2, "%s %s\n", __func__, "Click On"); 196 ex_printf(2, "%s %s\n", __func__, "Click On");
282 STORE_STRING(tmp, t->wdg_name); 197 STORE_STRING(tmp, t->wdg_name);
283 eina_debug_session_send(_session, _cid, _click_on_op, buf, len); 198 eina_debug_session_send(_session, _cid, _click_on_op, buf, len);
284 free(buf); 199 free(buf);
@@ -286,7 +201,7 @@ _feed_event(Exactness_Action_Type type, unsigned int n_evas, void *data)
286 } 201 }
287 case EXACTNESS_ACTION_STABILIZE: 202 case EXACTNESS_ACTION_STABILIZE:
288 { 203 {
289 _printf(2, "%s stabilize\n", __func__); 204 ex_printf(2, "%s stabilize\n", __func__);
290 eina_debug_session_send(_session, _cid, _stabilize_op, NULL, 0); 205 eina_debug_session_send(_session, _cid, _stabilize_op, NULL, 0);
291 break; 206 break;
292 } 207 }
@@ -321,7 +236,7 @@ _src_open()
321{ 236{
322 double diff_time = 0; /* Time to wait before feeding the first event */ 237 double diff_time = 0; /* Time to wait before feeding the first event */
323 238
324 _printf(2, "<%s> Source file is <%s>\n", __func__, _src_filename); 239 ex_printf(2, "<%s> Source file is <%s>\n", __func__, _src_filename);
325 if (!strcmp(_src_filename + strlen(_src_filename) - 4,".exu")) 240 if (!strcmp(_src_filename + strlen(_src_filename) - 4,".exu"))
326 { 241 {
327 _src_unit = exactness_unit_file_read(_src_filename); 242 _src_unit = exactness_unit_file_read(_src_filename);
@@ -336,7 +251,7 @@ _src_open()
336 251
337 if (act->delay_ms) 252 if (act->delay_ms)
338 { 253 {
339 _printf(2, " Waiting <%f>\n", diff_time); 254 ex_printf(2, " Waiting <%f>\n", diff_time);
340 ecore_timer_add(act->delay_ms / 1000.0, _feed_event_timer_cb, NULL); 255 ecore_timer_add(act->delay_ms / 1000.0, _feed_event_timer_cb, NULL);
341 } 256 }
342 else 257 else
diff --git a/src/bin/exactness/inspect.c b/src/bin/exactness/inspect.c
index a04a5217df..384cda81b6 100644
--- a/src/bin/exactness/inspect.c
+++ b/src/bin/exactness/inspect.c
@@ -9,6 +9,8 @@
9#include <Exactness.h> 9#include <Exactness.h>
10#include <Efl_Ui.h> 10#include <Efl_Ui.h>
11 11
12#include "common.h"
13
12#define LDIFF(x) "<b><color=#F0F>"#x"</color></b>" 14#define LDIFF(x) "<b><color=#F0F>"#x"</color></b>"
13#define RDIFF(x) "<b><color=#0FF>"#x"</color></b>" 15#define RDIFF(x) "<b><color=#0FF>"#x"</color></b>"
14 16
diff --git a/src/bin/exactness/meson.build b/src/bin/exactness/meson.build
index b01c77de1e..f835cd40ea 100644
--- a/src/bin/exactness/meson.build
+++ b/src/bin/exactness/meson.build
@@ -1,18 +1,21 @@
1exactness_bin = executable('exactness', 1exactness_bin = executable('exactness',
2 [ 'exactness.c' ], 2 [ 'exactness.c', 'common.c', 'common.h' ],
3 dependencies: [ ecore, ecore_evas, ecore_file, exactness ], 3 dependencies: [ ecore, ecore_evas, ecore_file, elementary, exactness ],
4 c_args: '-DDATA_DIR="'+join_paths(dir_data, 'exactness')+'"',
4 install: true, 5 install: true,
5 ) 6 )
6 7
7exactness_inject_bin = executable('exactness_inject', 8exactness_inject_bin = executable('exactness_inject',
8 [ 'injector.c' ], 9 [ 'injector.c', 'common.c', 'common.h' ],
9 dependencies: [ elementary, exactness ], 10 dependencies: [ elementary, exactness ],
11 c_args: '-DDATA_DIR="'+join_paths(dir_data, 'exactness')+'"',
10 install: true, 12 install: true,
11 ) 13 )
12 14
13exactness_inspect_bin = executable('exactness_inspect', 15exactness_inspect_bin = executable('exactness_inspect',
14 [ 'inspect.c' ], 16 [ 'inspect.c', 'common.c', 'common.h' ],
15 dependencies: [ elementary, exactness ], 17 dependencies: [ elementary, exactness ],
18 c_args: '-DDATA_DIR="'+join_paths(dir_data, 'exactness')+'"',
16 install: true, 19 install: true,
17 ) 20 )
18 21
@@ -28,15 +31,16 @@ edjs = custom_target('player_entry',
28 depends : edje_depends) 31 depends : edje_depends)
29 32
30exactness_play_bin = executable('exactness_play', 33exactness_play_bin = executable('exactness_play',
31 [ 'player.c', edjs ], 34 [ 'player.c', 'common.c', 'common.h', edjs ],
32 dependencies: [ elementary, exactness ], 35 dependencies: [ elementary, exactness ],
33 c_args: '-DDATA_DIR="'+join_paths(dir_data, 'exactness')+'"', 36 c_args: '-DDATA_DIR="'+join_paths(dir_data, 'exactness')+'"',
34 install: true, 37 install: true,
35 ) 38 )
36 39
37exactness_record_bin = executable('exactness_record', 40exactness_record_bin = executable('exactness_record',
38 [ 'recorder.c' ], 41 [ 'recorder.c', 'common.c', 'common.h' ],
39 dependencies: [ elementary, exactness ], 42 dependencies: [ elementary, exactness ],
43 c_args: '-DDATA_DIR="'+join_paths(dir_data, 'exactness')+'"',
40 install: true, 44 install: true,
41 ) 45 )
42 46
diff --git a/src/bin/exactness/player.c b/src/bin/exactness/player.c
index 260d433b46..fa9f0c63d3 100644
--- a/src/bin/exactness/player.c
+++ b/src/bin/exactness/player.c
@@ -30,88 +30,12 @@
30#include <Exactness.h> 30#include <Exactness.h>
31 31
32#include "exactness_private.h" 32#include "exactness_private.h"
33#include "common.h"
33 34
34#define PATH_ 1024
35#define CMD_LINE_MAX 256 35#define CMD_LINE_MAX 256
36#define IMAGE_FILENAME_EXT ".png" 36#define IMAGE_FILENAME_EXT ".png"
37#define PAUSE_KEY_STR "F2" 37#define PAUSE_KEY_STR "F2"
38 38
39typedef struct
40{
41 Eina_Debug_Session *session;
42 int srcid;
43 void *buffer;
44 unsigned int size;
45} _Main_Loop_Info;
46
47#define WRAPPER_TO_XFER_MAIN_LOOP(foo) \
48static void \
49_intern_main_loop ## foo(void *data) \
50{ \
51 _Main_Loop_Info *info = data; \
52 _main_loop ## foo(info->session, info->srcid, info->buffer, info->size); \
53 free(info->buffer); \
54 free(info); \
55} \
56static Eina_Bool \
57foo(Eina_Debug_Session *session, int srcid, void *buffer, int size) \
58{ \
59 _Main_Loop_Info *info = calloc(1, sizeof(*info)); \
60 info->session = session; \
61 info->srcid = srcid; \
62 info->size = size; \
63 if (info->size) \
64 { \
65 info->buffer = malloc(info->size); \
66 memcpy(info->buffer, buffer, info->size); \
67 } \
68 ecore_main_loop_thread_safe_call_async(_intern_main_loop ## foo, info); \
69 return EINA_TRUE; \
70}
71
72#ifndef WORDS_BIGENDIAN
73#define SWAP_64(x) x
74#define SWAP_32(x) x
75#define SWAP_16(x) x
76#define SWAP_DBL(x) x
77#else
78#define SWAP_64(x) eina_swap64(x)
79#define SWAP_32(x) eina_swap32(x)
80#define SWAP_16(x) eina_swap16(x)
81#define SWAP_DBL(x) SWAP_64(x)
82#endif
83
84#define EXTRACT_INT(_buf) \
85({ \
86 int __i; \
87 memcpy(&__i, _buf, sizeof(int)); \
88 _buf += sizeof(int); \
89 SWAP_32(__i); \
90})
91
92#define EXTRACT_DOUBLE(_buf) \
93({ \
94 double __d; \
95 memcpy(&__d, _buf, sizeof(double)); \
96 _buf += sizeof(double); \
97 SWAP_DBL(__d); \
98})
99
100#define EXTRACT_STRING(_buf) \
101({ \
102 char *__s = _buf ? strdup(_buf) : NULL; \
103 int __len = (__s ? strlen(__s) : 0) + 1; \
104 _buf += __len; \
105 __s; \
106})
107
108#define STORE_INT(_buf, __i) \
109({ \
110 int __si = SWAP_32(__i); \
111 memcpy(_buf, &__si, sizeof(int)); \
112 _buf += sizeof(int); \
113})
114
115typedef enum 39typedef enum
116{ 40{
117 FTYPE_UNKNOWN, 41 FTYPE_UNKNOWN,
@@ -152,17 +76,6 @@ static Eina_Bool _exit_required = EINA_FALSE;
152static Eina_Bool _pause_request = EINA_FALSE; 76static Eina_Bool _pause_request = EINA_FALSE;
153static Eina_Bool _playing_status = EINA_FALSE; 77static Eina_Bool _playing_status = EINA_FALSE;
154 78
155static void
156_printf(int verbose, const char *fmt, ...)
157{
158 va_list ap;
159 if (!_verbose || verbose > _verbose) return;
160
161 va_start(ap, fmt);
162 vprintf(fmt, ap);
163 va_end(ap);
164}
165
166static Exactness_Image * 79static Exactness_Image *
167_snapshot_shot_get(Evas *e) 80_snapshot_shot_get(Evas *e)
168{ 81{
@@ -226,7 +139,7 @@ _evas_render_post_cb(void *data EINA_UNUSED, const Efl_Event *event)
226 Eo *o = evas_object_image_add(event->object); 139 Eo *o = evas_object_image_add(event->object);
227 evas_object_image_size_set(o, ex_shot->w, ex_shot->h); 140 evas_object_image_size_set(o, ex_shot->w, ex_shot->h);
228 evas_object_image_data_set(o, ex_shot->pixels); 141 evas_object_image_data_set(o, ex_shot->pixels);
229 _printf(1, "Shot taken (%s).\n", filename); 142 ex_printf(1, "Shot taken (%s).\n", filename);
230 if (!evas_object_image_save(o, filename, NULL, NULL)) 143 if (!evas_object_image_save(o, filename, NULL, NULL))
231 { 144 {
232 printf("Cannot save widget to <%s>\n", filename); 145 printf("Cannot save widget to <%s>\n", filename);
@@ -238,7 +151,7 @@ _evas_render_post_cb(void *data EINA_UNUSED, const Efl_Event *event)
238 Exactness_Image *ex_img = e_data; 151 Exactness_Image *ex_img = e_data;
239 memcpy(ex_img, ex_shot, sizeof(Exactness_Image)); 152 memcpy(ex_img, ex_shot, sizeof(Exactness_Image));
240 ex_shot->pixels = NULL; 153 ex_shot->pixels = NULL;
241 _printf(1, "Shot taken (in %s).\n", _dest); 154 ex_printf(1, "Shot taken (in %s).\n", _dest);
242 } 155 }
243 else if (_dest_type == FTYPE_REMOTE) 156 else if (_dest_type == FTYPE_REMOTE)
244 { 157 {
@@ -369,23 +282,23 @@ _feed_event(Exactness_Action_Type type, unsigned int n_evas, void *data)
369 { 282 {
370 case EXACTNESS_ACTION_MOUSE_IN: 283 case EXACTNESS_ACTION_MOUSE_IN:
371 { 284 {
372 _printf(1, "Mouse in\n"); 285 ex_printf(1, "Mouse in\n");
373 _printf(2, "%s evas_event_feed_mouse_in n_evas=<%d>\n", __func__, n_evas); 286 ex_printf(2, "%s evas_event_feed_mouse_in n_evas=<%d>\n", __func__, n_evas);
374 if (e) evas_event_feed_mouse_in(e, time(NULL), NULL); 287 if (e) evas_event_feed_mouse_in(e, time(NULL), NULL);
375 break; 288 break;
376 } 289 }
377 case EXACTNESS_ACTION_MOUSE_OUT: 290 case EXACTNESS_ACTION_MOUSE_OUT:
378 { 291 {
379 _printf(1, "Mouse out\n"); 292 ex_printf(1, "Mouse out\n");
380 _printf(2, "%s evas_event_feed_mouse_out n_evas=<%d>\n", __func__, n_evas); 293 ex_printf(2, "%s evas_event_feed_mouse_out n_evas=<%d>\n", __func__, n_evas);
381 if (e) evas_event_feed_mouse_out(e, time(NULL), NULL); 294 if (e) evas_event_feed_mouse_out(e, time(NULL), NULL);
382 break; 295 break;
383 } 296 }
384 case EXACTNESS_ACTION_MOUSE_WHEEL: 297 case EXACTNESS_ACTION_MOUSE_WHEEL:
385 { 298 {
386 Exactness_Action_Mouse_Wheel *t = data; 299 Exactness_Action_Mouse_Wheel *t = data;
387 _printf(1, "Mouse wheel\n"); 300 ex_printf(1, "Mouse wheel\n");
388 _printf(2, "%s evas_event_feed_mouse_wheel n_evas=<%d>\n", __func__, n_evas); 301 ex_printf(2, "%s evas_event_feed_mouse_wheel n_evas=<%d>\n", __func__, n_evas);
389 if (e) evas_event_feed_mouse_wheel(e, t->direction, t->z, time(NULL), NULL); 302 if (e) evas_event_feed_mouse_wheel(e, t->direction, t->z, time(NULL), NULL);
390 303
391 break; 304 break;
@@ -393,7 +306,7 @@ _feed_event(Exactness_Action_Type type, unsigned int n_evas, void *data)
393 case EXACTNESS_ACTION_MULTI_DOWN: 306 case EXACTNESS_ACTION_MULTI_DOWN:
394 { 307 {
395 Exactness_Action_Multi_Event *t = data; 308 Exactness_Action_Multi_Event *t = data;
396 _printf(2, "%s evas_event_feed_multi_down n_evas=<%d>\n", __func__, n_evas); 309 ex_printf(2, "%s evas_event_feed_multi_down n_evas=<%d>\n", __func__, n_evas);
397 if (!t->d) 310 if (!t->d)
398 { 311 {
399 if (e) evas_event_feed_mouse_down(e, t->b, t->flags, time(NULL), NULL); 312 if (e) evas_event_feed_mouse_down(e, t->b, t->flags, time(NULL), NULL);
@@ -412,7 +325,7 @@ _feed_event(Exactness_Action_Type type, unsigned int n_evas, void *data)
412 case EXACTNESS_ACTION_MULTI_UP: 325 case EXACTNESS_ACTION_MULTI_UP:
413 { 326 {
414 Exactness_Action_Multi_Event *t = data; 327 Exactness_Action_Multi_Event *t = data;
415 _printf(2, "%s evas_event_feed_multi_up n_evas=<%d>\n", __func__, n_evas); 328 ex_printf(2, "%s evas_event_feed_multi_up n_evas=<%d>\n", __func__, n_evas);
416 if (!t->d) 329 if (!t->d)
417 { 330 {
418 if (e) evas_event_feed_mouse_up(e, t->b, t->flags, time(NULL), NULL); 331 if (e) evas_event_feed_mouse_up(e, t->b, t->flags, time(NULL), NULL);
@@ -431,7 +344,7 @@ _feed_event(Exactness_Action_Type type, unsigned int n_evas, void *data)
431 case EXACTNESS_ACTION_MULTI_MOVE: 344 case EXACTNESS_ACTION_MULTI_MOVE:
432 { 345 {
433 Exactness_Action_Multi_Move *t = data; 346 Exactness_Action_Multi_Move *t = data;
434 _printf(2, "%s evas_event_feed_multi_move n_evas=<%d>\n", __func__, n_evas); 347 ex_printf(2, "%s evas_event_feed_multi_move n_evas=<%d>\n", __func__, n_evas);
435 if (!t->d) 348 if (!t->d)
436 { 349 {
437 if (e) evas_event_feed_mouse_move(e, t->x, t->y, time(NULL), NULL); 350 if (e) evas_event_feed_mouse_move(e, t->x, t->y, time(NULL), NULL);
@@ -454,7 +367,7 @@ _feed_event(Exactness_Action_Type type, unsigned int n_evas, void *data)
454 case EXACTNESS_ACTION_KEY_DOWN: 367 case EXACTNESS_ACTION_KEY_DOWN:
455 { 368 {
456 Exactness_Action_Key_Down_Up *t = data; 369 Exactness_Action_Key_Down_Up *t = data;
457 _printf(2, "%s evas_event_feed_key_down n_evas=<%d>\n", __func__, n_evas); 370 ex_printf(2, "%s evas_event_feed_key_down n_evas=<%d>\n", __func__, n_evas);
458 if (e) 371 if (e)
459 evas_event_feed_key_down_with_keycode(e, 372 evas_event_feed_key_down_with_keycode(e,
460 t->keyname, t->key, t->string, 373 t->keyname, t->key, t->string,
@@ -464,7 +377,7 @@ _feed_event(Exactness_Action_Type type, unsigned int n_evas, void *data)
464 case EXACTNESS_ACTION_KEY_UP: 377 case EXACTNESS_ACTION_KEY_UP:
465 { 378 {
466 Exactness_Action_Key_Down_Up *t = data; 379 Exactness_Action_Key_Down_Up *t = data;
467 _printf(2, "%s evas_event_feed_key_up n_evas=<%d>\n", __func__, n_evas); 380 ex_printf(2, "%s evas_event_feed_key_up n_evas=<%d>\n", __func__, n_evas);
468 if (e) evas_event_feed_key_up_with_keycode(e, 381 if (e) evas_event_feed_key_up_with_keycode(e,
469 t->keyname, t->key, t->string, 382 t->keyname, t->key, t->string,
470 t->compose, time(NULL), NULL, t->keycode); 383 t->compose, time(NULL), NULL, t->keycode);
@@ -473,7 +386,7 @@ _feed_event(Exactness_Action_Type type, unsigned int n_evas, void *data)
473 } 386 }
474 case EXACTNESS_ACTION_TAKE_SHOT: 387 case EXACTNESS_ACTION_TAKE_SHOT:
475 { 388 {
476 _printf(2, "%s take shot n_evas=<%d>\n", __func__, n_evas); 389 ex_printf(2, "%s take shot n_evas=<%d>\n", __func__, n_evas);
477 if (rect) evas_object_color_set(rect, 0, 0, 255, 255); 390 if (rect) evas_object_color_set(rect, 0, 0, 255, 255);
478 _cur_shot_id++; 391 _cur_shot_id++;
479 if (_dest_type != FTYPE_UNKNOWN && e) _shot_do(e); 392 if (_dest_type != FTYPE_UNKNOWN && e) _shot_do(e);
@@ -489,7 +402,7 @@ _feed_event(Exactness_Action_Type type, unsigned int n_evas, void *data)
489 Eo *o = efl_name_find(e, t->wdg_name); 402 Eo *o = efl_name_find(e, t->wdg_name);
490 if (o) 403 if (o)
491 { 404 {
492 _printf(2, "%s EFL event invoke %s on %s\n", 405 ex_printf(2, "%s EFL event invoke %s on %s\n",
493 __func__, t->event_name, t->wdg_name); 406 __func__, t->event_name, t->wdg_name);
494 Efl_Event_Description d; 407 Efl_Event_Description d;
495 found = EINA_TRUE; 408 found = EINA_TRUE;
@@ -526,7 +439,7 @@ wdg_found:
526 Exactness_Action_Multi_Event *d_event = calloc(1, sizeof(*d_event)); 439 Exactness_Action_Multi_Event *d_event = calloc(1, sizeof(*d_event));
527 Exactness_Action *act, *prev_act = eina_list_data_get(_cur_event_list); 440 Exactness_Action *act, *prev_act = eina_list_data_get(_cur_event_list);
528 441
529 _printf(2, "%s click on %s\n", __func__, t->wdg_name); 442 ex_printf(2, "%s click on %s\n", __func__, t->wdg_name);
530 act = calloc(1, sizeof(*act)); 443 act = calloc(1, sizeof(*act));
531 act->type = EXACTNESS_ACTION_MULTI_MOVE; 444 act->type = EXACTNESS_ACTION_MULTI_MOVE;
532 act->delay_ms = 100; 445 act->delay_ms = 100;
@@ -563,7 +476,7 @@ wdg_found:
563 } 476 }
564 case EXACTNESS_ACTION_STABILIZE: 477 case EXACTNESS_ACTION_STABILIZE:
565 { 478 {
566 _printf(2, "%s stabilize\n", __func__); 479 ex_printf(2, "%s stabilize\n", __func__);
567 if (rect) evas_object_color_set(rect, 255, 165, 0, 255); 480 if (rect) evas_object_color_set(rect, 255, 165, 0, 255);
568 ecore_timer_add(0.1, _stabilization_timer_cb, NULL); 481 ecore_timer_add(0.1, _stabilization_timer_cb, NULL);
569 break; 482 break;
@@ -591,7 +504,7 @@ _feed_event_timer_cb(void *data EINA_UNUSED)
591 if (act->type != EXACTNESS_ACTION_STABILIZE) 504 if (act->type != EXACTNESS_ACTION_STABILIZE)
592 { 505 {
593 act = eina_list_data_get(_cur_event_list); 506 act = eina_list_data_get(_cur_event_list);
594 _printf(2, " %s timer_time=<%f>\n", __func__, act->delay_ms / 1000.0); 507 ex_printf(2, " %s timer_time=<%f>\n", __func__, act->delay_ms / 1000.0);
595 ecore_timer_add(act->delay_ms / 1000.0, _feed_event_timer_cb, NULL); 508 ecore_timer_add(act->delay_ms / 1000.0, _feed_event_timer_cb, NULL);
596 } 509 }
597 } 510 }
@@ -605,7 +518,7 @@ _stabilization_timer_cb(void *data EINA_UNUSED)
605 Evas *e; 518 Evas *e;
606#define STAB_MAX 5 519#define STAB_MAX 5
607 static int need_more = STAB_MAX; 520 static int need_more = STAB_MAX;
608 _printf(2, "Not stable yet!\n"); 521 ex_printf(2, "Not stable yet!\n");
609 EINA_LIST_FOREACH(_evas_list, itr, e) 522 EINA_LIST_FOREACH(_evas_list, itr, e)
610 { 523 {
611 if (!e) continue; 524 if (!e) continue;
@@ -629,7 +542,7 @@ _stabilization_timer_cb(void *data EINA_UNUSED)
629 if (_src_type != FTYPE_REMOTE && !_pause_request) 542 if (_src_type != FTYPE_REMOTE && !_pause_request)
630 { 543 {
631 Exactness_Action *act = eina_list_data_get(_cur_event_list); 544 Exactness_Action *act = eina_list_data_get(_cur_event_list);
632 _printf(2, " %s timer_time=<%f>\n", __func__, act->delay_ms / 1000.0); 545 ex_printf(2, " %s timer_time=<%f>\n", __func__, act->delay_ms / 1000.0);
633 ecore_timer_add(act->delay_ms / 1000.0, _feed_event_timer_cb, NULL); 546 ecore_timer_add(act->delay_ms / 1000.0, _feed_event_timer_cb, NULL);
634 } 547 }
635 need_more = STAB_MAX; 548 need_more = STAB_MAX;
@@ -836,7 +749,7 @@ _src_feed(void *data EINA_UNUSED)
836 749
837 if (act && act->delay_ms) 750 if (act && act->delay_ms)
838 { 751 {
839 _printf(2, " Waiting <%f>\n", act->delay_ms / 1000.0); 752 ex_printf(2, " Waiting <%f>\n", act->delay_ms / 1000.0);
840 ecore_timer_add(act->delay_ms / 1000.0, _feed_event_timer_cb, NULL); 753 ecore_timer_add(act->delay_ms / 1000.0, _feed_event_timer_cb, NULL);
841 } 754 }
842 else 755 else
@@ -853,7 +766,7 @@ _src_open()
853 { 766 {
854 Eina_List *itr, *itr2; 767 Eina_List *itr, *itr2;
855 Exactness_Action *act; 768 Exactness_Action *act;
856 _printf(2, "<%s> Source file is <%s>\n", __func__, _src_filename); 769 ex_printf(2, "<%s> Source file is <%s>\n", __func__, _src_filename);
857 if (_src_type == FTYPE_EXU) 770 if (_src_type == FTYPE_EXU)
858 { 771 {
859 _src_unit = exactness_unit_file_read(_src_filename); 772 _src_unit = exactness_unit_file_read(_src_filename);
@@ -951,7 +864,7 @@ _prg_invoke(const char *full_path, int argc, char **argv)
951static Eina_Stringshare * 864static Eina_Stringshare *
952_prg_full_path_guess(const char *prg) 865_prg_full_path_guess(const char *prg)
953{ 866{
954 char full_path[PATH_]; 867 char full_path[PATH_MAX];
955 if (strchr(prg, '/')) return eina_stringshare_add(prg); 868 if (strchr(prg, '/')) return eina_stringshare_add(prg);
956 char *env_path = eina_strdup(getenv("PATH")); 869 char *env_path = eina_strdup(getenv("PATH"));
957 Eina_Stringshare *ret = NULL; 870 Eina_Stringshare *ret = NULL;
@@ -1035,10 +948,10 @@ _event_key_cb(void *data EINA_UNUSED, const Efl_Event *event)
1035 if (!strcmp(key, PAUSE_KEY_STR) && efl_input_key_pressed_get(evk)) 948 if (!strcmp(key, PAUSE_KEY_STR) && efl_input_key_pressed_get(evk))
1036 { 949 {
1037 _pause_request = !_pause_request; 950 _pause_request = !_pause_request;
1038 if (_pause_request) _printf(1, "Pausing scenario\n"); 951 if (_pause_request) ex_printf(1, "Pausing scenario\n");
1039 else 952 else
1040 { 953 {
1041 _printf(1, "Playing scenario\n"); 954 ex_printf(1, "Playing scenario\n");
1042 if (!_playing_status) 955 if (!_playing_status)
1043 _feed_event_timer_cb(NULL); 956 _feed_event_timer_cb(NULL);
1044 } 957 }
@@ -1060,7 +973,7 @@ _my_evas_new(int w EINA_UNUSED, int h EINA_UNUSED)
1060 e = _evas_new(); 973 e = _evas_new();
1061 if (e) 974 if (e)
1062 { 975 {
1063 _printf(1, "New Evas\n"); 976 ex_printf(1, "New Evas\n");
1064 _evas_list = eina_list_append(_evas_list, e); 977 _evas_list = eina_list_append(_evas_list, e);
1065 efl_event_callback_array_add(e, _evas_callbacks(), NULL); 978 efl_event_callback_array_add(e, _evas_callbacks(), NULL);
1066 } 979 }
@@ -1242,7 +1155,7 @@ int main(int argc, char **argv)
1242 if (!show_on_screen) setenv("ELM_ENGINE", "buffer", 1); 1155 if (!show_on_screen) setenv("ELM_ENGINE", "buffer", 1);
1243 if (_src_unit && _src_unit->fonts_path) 1156 if (_src_unit && _src_unit->fonts_path)
1244 { 1157 {
1245 char buf[PATH_]; 1158 char buf[PATH_MAX];
1246 if (!fonts_dir) fonts_dir = "./fonts"; 1159 if (!fonts_dir) fonts_dir = "./fonts";
1247 sprintf(buf, "%s/%s", fonts_dir, _src_unit->fonts_path); 1160 sprintf(buf, "%s/%s", fonts_dir, _src_unit->fonts_path);
1248 if (!ecore_file_exists(buf)) 1161 if (!ecore_file_exists(buf))
@@ -1297,9 +1210,9 @@ int main(int argc, char **argv)
1297 { 1210 {
1298 argv[i - opt_args] = argv[0] + (argv[i] - argv[opt_args]); 1211 argv[i - opt_args] = argv[0] + (argv[i] - argv[opt_args]);
1299 } 1212 }
1300 _printf(1, "%s ", argv[i - opt_args]); 1213 ex_printf(1, "%s ", argv[i - opt_args]);
1301 } 1214 }
1302 _printf(1, "\n"); 1215 ex_printf(1, "\n");
1303 } 1216 }
1304 else 1217 else
1305 { 1218 {
diff --git a/src/bin/exactness/recorder.c b/src/bin/exactness/recorder.c
index 59a4d3106e..f8eefe591e 100644
--- a/src/bin/exactness/recorder.c
+++ b/src/bin/exactness/recorder.c
@@ -23,8 +23,8 @@
23#include <Exactness.h> 23#include <Exactness.h>
24 24
25#include <exactness_private.h> 25#include <exactness_private.h>
26#include "common.h"
26 27
27#define MAX_PATH 1024
28#define STABILIZE_KEY_STR "F1" 28#define STABILIZE_KEY_STR "F1"
29#define SHOT_KEY_STR "F2" 29#define SHOT_KEY_STR "F2"
30#define SAVE_KEY_STR "F3" 30#define SAVE_KEY_STR "F3"
@@ -42,17 +42,6 @@ static Exactness_Unit *_unit = NULL;
42static char *_shot_key = NULL; 42static char *_shot_key = NULL;
43static unsigned int _last_timestamp = 0.0; 43static unsigned int _last_timestamp = 0.0;
44 44
45static void
46_printf(int verbose, const char *fmt, ...)
47{
48 va_list ap;
49 if (!_verbose || verbose > _verbose) return;
50
51 va_start(ap, fmt);
52 vprintf(fmt, ap);
53 va_end(ap);
54}
55
56static Exactness_Action_Type 45static Exactness_Action_Type
57_event_pointer_type_get(Efl_Pointer_Action t) 46_event_pointer_type_get(Efl_Pointer_Action t)
58{ 47{
@@ -87,7 +76,7 @@ _add_to_list(Exactness_Action_Type type, unsigned int n_evas, unsigned int times
87 prev_v->n_evas == n_evas && 76 prev_v->n_evas == n_evas &&
88 (!len || !memcmp(prev_v->data, data, len))) return; 77 (!len || !memcmp(prev_v->data, data, len))) return;
89 } 78 }
90 _printf(1, "Recording %s\n", _exactness_action_type_to_string_get(type)); 79 ex_printf(1, "Recording %s\n", _exactness_action_type_to_string_get(type));
91 Exactness_Action *act = malloc(sizeof(*act)); 80 Exactness_Action *act = malloc(sizeof(*act));
92 act->type = type; 81 act->type = type;
93 act->n_evas = n_evas; 82 act->n_evas = n_evas;
@@ -122,7 +111,7 @@ _event_pointer_cb(void *data, const Efl_Event *event)
122 111
123 if (!timestamp) return; 112 if (!timestamp) return;
124 113
125 _printf(2, "Calling \"%s\" timestamp=<%u>\n", _exactness_action_type_to_string_get(evt), timestamp); 114 ex_printf(2, "Calling \"%s\" timestamp=<%u>\n", _exactness_action_type_to_string_get(evt), timestamp);
126 115
127 switch (action) 116 switch (action)
128 { 117 {
@@ -182,20 +171,20 @@ _event_key_cb(void *data, const Efl_Event *event)
182 { 171 {
183 if (!strcmp(key, _shot_key)) 172 if (!strcmp(key, _shot_key))
184 { 173 {
185 _printf(2, "Take Screenshot: %s timestamp=<%u>\n", __func__, timestamp); 174 ex_printf(2, "Take Screenshot: %s timestamp=<%u>\n", __func__, timestamp);
186 _add_to_list(EXACTNESS_ACTION_TAKE_SHOT, n_evas, timestamp, NULL, 0); 175 _add_to_list(EXACTNESS_ACTION_TAKE_SHOT, n_evas, timestamp, NULL, 0);
187 return; 176 return;
188 } 177 }
189 if (!strcmp(key, STABILIZE_KEY_STR)) 178 if (!strcmp(key, STABILIZE_KEY_STR))
190 { 179 {
191 _printf(2, "Stabilize: %s timestamp=<%u>\n", __func__, timestamp); 180 ex_printf(2, "Stabilize: %s timestamp=<%u>\n", __func__, timestamp);
192 _add_to_list(EXACTNESS_ACTION_STABILIZE, n_evas, timestamp, NULL, 0); 181 _add_to_list(EXACTNESS_ACTION_STABILIZE, n_evas, timestamp, NULL, 0);
193 return; 182 return;
194 } 183 }
195 if (!strcmp(key, SAVE_KEY_STR)) 184 if (!strcmp(key, SAVE_KEY_STR))
196 { 185 {
197 _output_write(); 186 _output_write();
198 _printf(2, "Save events: %s timestamp=<%u>\n", __func__, timestamp); 187 ex_printf(2, "Save events: %s timestamp=<%u>\n", __func__, timestamp);
199 return; 188 return;
200 } 189 }
201 evt = EXACTNESS_ACTION_KEY_DOWN; 190 evt = EXACTNESS_ACTION_KEY_DOWN;
@@ -239,7 +228,7 @@ _my_evas_new(int w EINA_UNUSED, int h EINA_UNUSED)
239 e = _evas_new(); 228 e = _evas_new();
240 if (e) 229 if (e)
241 { 230 {
242 _printf(1, "New Evas\n"); 231 ex_printf(1, "New Evas\n");
243 _evas_list = eina_list_append(_evas_list, e); 232 _evas_list = eina_list_append(_evas_list, e);
244 efl_key_data_set(e, "__evas_id", (void *)(intptr_t)_last_evas_id++); 233 efl_key_data_set(e, "__evas_id", (void *)(intptr_t)_last_evas_id++);
245 efl_event_callback_array_add(e, _event_pointer_callbacks(), e); 234 efl_event_callback_array_add(e, _event_pointer_callbacks(), e);
@@ -303,7 +292,7 @@ _prg_invoke(const char *full_path, int argc, char **argv)
303static Eina_Stringshare * 292static Eina_Stringshare *
304_prg_full_path_guess(const char *prg) 293_prg_full_path_guess(const char *prg)
305{ 294{
306 char full_path[MAX_PATH]; 295 char full_path[PATH_MAX];
307 if (strchr(prg, '/')) return eina_stringshare_add(prg); 296 if (strchr(prg, '/')) return eina_stringshare_add(prg);
308 char *env_path = eina_strdup(getenv("PATH")); 297 char *env_path = eina_strdup(getenv("PATH"));
309 Eina_Stringshare *ret = NULL; 298 Eina_Stringshare *ret = NULL;
@@ -493,7 +482,7 @@ int main(int argc, char **argv)
493 /* Replace the current command line to hide the Exactness part */ 482 /* Replace the current command line to hide the Exactness part */
494 int len = argv[argc - 1] + strlen(argv[argc - 1]) - argv[opt_args]; 483 int len = argv[argc - 1] + strlen(argv[argc - 1]) - argv[opt_args];
495 memcpy(argv[0], argv[opt_args], len); 484 memcpy(argv[0], argv[opt_args], len);
496 memset(argv[0] + len, 0, MAX_PATH - len); 485 memset(argv[0] + len, 0, PATH_MAX - len);
497 486
498 int i; 487 int i;
499 for (i = opt_args; i < argc; i++) 488 for (i = opt_args; i < argc; i++)
@@ -502,9 +491,9 @@ int main(int argc, char **argv)
502 { 491 {
503 argv[i - opt_args] = argv[0] + (argv[i] - argv[opt_args]); 492 argv[i - opt_args] = argv[0] + (argv[i] - argv[opt_args]);
504 } 493 }
505 _printf(1, "%s ", argv[i - opt_args]); 494 ex_printf(1, "%s ", argv[i - opt_args]);
506 } 495 }
507 _printf(1, "\n"); 496 ex_printf(1, "\n");
508 497
509 if (!_shot_key) _shot_key = getenv("SHOT_KEY"); 498 if (!_shot_key) _shot_key = getenv("SHOT_KEY");
510 if (!_shot_key) _shot_key = SHOT_KEY_STR; 499 if (!_shot_key) _shot_key = SHOT_KEY_STR;
diff --git a/src/lib/ecore/efl_exe.c b/src/lib/ecore/efl_exe.c
index b2c6341523..c5a2f57343 100644
--- a/src/lib/ecore/efl_exe.c
+++ b/src/lib/ecore/efl_exe.c
@@ -69,6 +69,7 @@ struct _Efl_Exe_Data
69 } fd; 69 } fd;
70#endif 70#endif
71 Eina_Bool exit_called : 1; 71 Eina_Bool exit_called : 1;
72 Eina_Bool exit_signalled : 1;
72 Eina_Bool run : 1; 73 Eina_Bool run : 1;
73}; 74};
74 75
@@ -269,10 +270,10 @@ _efl_exe_signal(Eo *obj EINA_UNUSED, Efl_Exe_Data *pd, Efl_Exe_Signal sig)
269 270
270 switch (sig) 271 switch (sig)
271 { 272 {
272 case EFL_EXE_SIGNAL_INT: s = SIGINT; break; 273 case EFL_EXE_SIGNAL_INT: s = SIGINT; pd->exit_signalled = EINA_TRUE; break;
273 case EFL_EXE_SIGNAL_QUIT: s = SIGQUIT; break; 274 case EFL_EXE_SIGNAL_QUIT: s = SIGQUIT; pd->exit_signalled = EINA_TRUE; break;
274 case EFL_EXE_SIGNAL_TERM: s = SIGTERM; break; 275 case EFL_EXE_SIGNAL_TERM: s = SIGTERM; pd->exit_signalled = EINA_TRUE; break;
275 case EFL_EXE_SIGNAL_KILL: s = SIGKILL; break; 276 case EFL_EXE_SIGNAL_KILL: s = SIGKILL; pd->exit_signalled = EINA_TRUE; break;
276 case EFL_EXE_SIGNAL_CONT: s = SIGCONT; break; 277 case EFL_EXE_SIGNAL_CONT: s = SIGCONT; break;
277 case EFL_EXE_SIGNAL_STOP: s = SIGSTOP; break; 278 case EFL_EXE_SIGNAL_STOP: s = SIGSTOP; break;
278 case EFL_EXE_SIGNAL_HUP: s = SIGHUP; break; 279 case EFL_EXE_SIGNAL_HUP: s = SIGHUP; break;
@@ -552,7 +553,18 @@ _efl_exe_efl_task_run(Eo *obj, Efl_Exe_Data *pd)
552 int except[2] = { 0, -1 }; 553 int except[2] = { 0, -1 };
553 except[0] = pd->fd.exited_write; 554 except[0] = pd->fd.exited_write;
554 eina_file_close_from(3, except); 555 eina_file_close_from(3, except);
555 556#ifdef HAVE_PRCTL
557 if ((pd->flags & EFL_EXE_FLAGS_TERM_WITH_PARENT))
558 {
559 prctl(PR_SET_PDEATHSIG, SIGTERM);
560 }
561#elif defined(HAVE_PROCCTL)
562 if ((pd->flags & EFL_EXE_FLAGS_TERM_WITH_PARENT))
563 {
564 int sig = SIGTERM;
565 procctl(P_PID, 0, PROC_PDEATHSIG_CTL, &sig);
566 }
567#endif
556 // actually execute! 568 // actually execute!
557 _exec(cmd, pd->flags, td->flags); 569 _exec(cmd, pd->flags, td->flags);
558 // we couldn't exec... uh oh. HAAAAAAAALP! 570 // we couldn't exec... uh oh. HAAAAAAAALP!
@@ -570,6 +582,7 @@ _efl_exe_efl_task_end(Eo *obj EINA_UNUSED, Efl_Exe_Data *pd)
570#ifdef _WIN32 582#ifdef _WIN32
571#else 583#else
572 if (pd->pid == -1) return; 584 if (pd->pid == -1) return;
585 pd->exit_signalled = EINA_TRUE;
573 kill(pd->pid, SIGINT); 586 kill(pd->pid, SIGINT);
574#endif 587#endif
575} 588}
@@ -580,6 +593,16 @@ _efl_exe_exit_signal_get(const Eo *obj EINA_UNUSED, Efl_Exe_Data *pd)
580 return pd->exit_signal; 593 return pd->exit_signal;
581} 594}
582 595
596EOLIAN static int
597_efl_exe_pid_get(const Eo *obj EINA_UNUSED, Efl_Exe_Data *pd)
598{
599#ifndef _WIN32
600 if (pd->pid != -1)
601 return pd->pid;
602#endif
603 return 0;
604}
605
583EOLIAN static Efl_Object * 606EOLIAN static Efl_Object *
584_efl_exe_efl_object_constructor(Eo *obj, Efl_Exe_Data *pd) 607_efl_exe_efl_object_constructor(Eo *obj, Efl_Exe_Data *pd)
585{ 608{
@@ -602,7 +625,7 @@ _efl_exe_efl_object_destructor(Eo *obj, Efl_Exe_Data *pd)
602{ 625{
603#ifdef _WIN32 626#ifdef _WIN32
604#else 627#else
605 if (!pd->exit_called) 628 if ((!pd->exit_called) && (!pd->exit_signalled))
606 ERR("Exe being destroyed while child has not exited yet."); 629 ERR("Exe being destroyed while child has not exited yet.");
607 if (pd->fd.exited_read >= 0) 630 if (pd->fd.exited_read >= 0)
608 { 631 {
diff --git a/src/lib/ecore/efl_exe.eo b/src/lib/ecore/efl_exe.eo
index 23b68935e4..c4cc2d7ebf 100644
--- a/src/lib/ecore/efl_exe.eo
+++ b/src/lib/ecore/efl_exe.eo
@@ -18,7 +18,8 @@ enum @beta Efl.Exe_Flags {
18 [[Flags to customize process behavior.]] 18 [[Flags to customize process behavior.]]
19 none = 0, [[No special flags.]] 19 none = 0, [[No special flags.]]
20 group_leader = 1, [[Process will be executed in its own session.]] 20 group_leader = 1, [[Process will be executed in its own session.]]
21 hide_io = 4 [[All console IO will be hidden.]] 21 hide_io = 4, [[All console IO will be hidden.]]
22 term_with_parent = 8, [[Makes child receive SIGTERM when parent dies.]]
22} 23}
23 24
24class @beta Efl.Exe extends Efl.Task implements Efl.Io.Reader, Efl.Io.Writer, Efl.Io.Closer, Efl.Core.Command_Line 25class @beta Efl.Exe extends Efl.Task implements Efl.Io.Reader, Efl.Io.Writer, Efl.Io.Closer, Efl.Core.Command_Line
@@ -51,6 +52,15 @@ class @beta Efl.Exe extends Efl.Task implements Efl.Io.Reader, Efl.Io.Writer, Ef
51 sig: int; [[The exit signal, or -1 if no exit signal happened.]] 52 sig: int; [[The exit signal, or -1 if no exit signal happened.]]
52 } 53 }
53 } 54 }
55 @property pid {
56 [[The pid of the process, which is only accessible after the object has been finalized.
57 @since 1.24
58 ]]
59 get { }
60 values {
61 pid: int; [[The pid, or 0 on failure.]]
62 }
63 }
54 @property env { 64 @property env {
55 [[If $env is $NULL then the process created by this object is 65 [[If $env is $NULL then the process created by this object is
56 going to inherit the environment of this process. 66 going to inherit the environment of this process.
diff --git a/src/lib/edje/edje_textblock.c b/src/lib/edje/edje_textblock.c
index d0c5c6d30d..fe3ec439fb 100644
--- a/src/lib/edje/edje_textblock.c
+++ b/src/lib/edje/edje_textblock.c
@@ -493,6 +493,20 @@ _edje_part_textblock_style_text_set(Edje *ed,
493 return EINA_FALSE; 493 return EINA_FALSE;
494} 494}
495 495
496static char*
497strrstr(const char* haystack, const char* violate)
498{
499 char *s_ret = NULL;
500 char *tmp = NULL;
501 const char *_haystack = haystack;
502 size_t len = strlen(violate);
503 while((tmp = strstr(_haystack, violate))){
504 s_ret = tmp;
505 _haystack = tmp + len;
506 }
507 return s_ret;
508}
509
496void 510void
497_edje_part_recalc_single_textblock(FLOAT_T sc, 511_edje_part_recalc_single_textblock(FLOAT_T sc,
498 Edje *ed, 512 Edje *ed,
@@ -522,11 +536,21 @@ _edje_part_recalc_single_textblock(FLOAT_T sc,
522 size_t size_array_len = 0; 536 size_t size_array_len = 0;
523 Eina_List *l; 537 Eina_List *l;
524 unsigned int *value; 538 unsigned int *value;
539 Evas_Textblock_Style *st = _edje_textblock_style_get(ed, chosen_desc->text.style.str);
540 const char *text_style = evas_textblock_style_get(st);
541 char *s_font_size = (text_style) ? strrstr(text_style,"font_size=") : NULL;
542 if (s_font_size)
543 {
544 int font_size = strtol(&s_font_size[10], NULL, 10);
545 chosen_desc->text.size_range_max = font_size;
546 if (chosen_desc->text.size_range_min > chosen_desc->text.size_range_max)
547 chosen_desc->text.size_range_min = chosen_desc->text.size_range_max;
548 }
525 EINA_LIST_FOREACH(chosen_desc->text.fit_size_array, l, value) 549 EINA_LIST_FOREACH(chosen_desc->text.fit_size_array, l, value)
526 { 550 {
527 size_array[size_array_len++] = *value; 551 size_array[size_array_len++] = *value;
528 } 552 }
529 unsigned int mode = TEXTBLOCK_FIT_MODE_NONE; 553 unsigned int mode = TEXTBLOCK_FIT_MODE_NONE;
530 554
531 if (chosen_desc->text.fit_x) 555 if (chosen_desc->text.fit_x)
532 mode |= TEXTBLOCK_FIT_MODE_WIDTH; 556 mode |= TEXTBLOCK_FIT_MODE_WIDTH;
diff --git a/src/lib/edje/edje_util.c b/src/lib/edje/edje_util.c
index 67b458495d..a8071531e1 100644
--- a/src/lib/edje/edje_util.c
+++ b/src/lib/edje/edje_util.c
@@ -326,6 +326,7 @@ edje_language_set(const char *locale)
326 char *loc; 326 char *loc;
327 int length; 327 int length;
328 328
329 if (!locale) return;
329 lookup = strstr(locale, "."); 330 lookup = strstr(locale, ".");
330 length = lookup ? lookup - locale : (int)strlen(locale); 331 length = lookup ? lookup - locale : (int)strlen(locale);
331 loc = alloca(length + 1); 332 loc = alloca(length + 1);
diff --git a/src/lib/efl/Efl.h b/src/lib/efl/Efl.h
index ea891223e9..ec6f168a8b 100644
--- a/src/lib/efl/Efl.h
+++ b/src/lib/efl/Efl.h
@@ -52,6 +52,7 @@ extern "C" {
52#define EFL_VERSION_1_21 1 52#define EFL_VERSION_1_21 1
53#define EFL_VERSION_1_22 1 53#define EFL_VERSION_1_22 1
54#define EFL_VERSION_1_23 1 54#define EFL_VERSION_1_23 1
55#define EFL_VERSION_1_24 1
55 56
56/* Add here all the required ifdef for any @protected method */ 57/* Add here all the required ifdef for any @protected method */
57#ifdef EFL_BUILD 58#ifdef EFL_BUILD
@@ -252,7 +253,7 @@ efl_config_bool_get(const Efl_Config *obj, const char * name)
252{ 253{
253 Eina_Value *v = efl_config_get(obj, name); 254 Eina_Value *v = efl_config_get(obj, name);
254 Eina_Bool b = 0; 255 Eina_Bool b = 0;
255 if (eina_value_type_get(v) == EINA_VALUE_TYPE_UCHAR) 256 if (v && eina_value_type_get(v) == EINA_VALUE_TYPE_UCHAR)
256 eina_value_get(v, &b); 257 eina_value_get(v, &b);
257 eina_value_free(v); 258 eina_value_free(v);
258 return b; 259 return b;
@@ -274,7 +275,7 @@ efl_config_int_get(const Efl_Config *obj, const char * name)
274{ 275{
275 Eina_Value *v = efl_config_get(obj, name); 276 Eina_Value *v = efl_config_get(obj, name);
276 int b = 0; 277 int b = 0;
277 if (eina_value_type_get(v) == EINA_VALUE_TYPE_INT) 278 if (v && eina_value_type_get(v) == EINA_VALUE_TYPE_INT)
278 eina_value_get(v, &b); 279 eina_value_get(v, &b);
279 eina_value_free(v); 280 eina_value_free(v);
280 return b; 281 return b;
@@ -296,7 +297,7 @@ efl_config_double_get(const Efl_Config *obj, const char * name)
296{ 297{
297 Eina_Value *v = efl_config_get(obj, name); 298 Eina_Value *v = efl_config_get(obj, name);
298 double b = 0; 299 double b = 0;
299 if (eina_value_type_get(v) == EINA_VALUE_TYPE_DOUBLE) 300 if (v && eina_value_type_get(v) == EINA_VALUE_TYPE_DOUBLE)
300 eina_value_get(v, &b); 301 eina_value_get(v, &b);
301 eina_value_free(v); 302 eina_value_free(v);
302 return b; 303 return b;
@@ -318,7 +319,7 @@ efl_config_string_get(const Efl_Config *obj, const char *name)
318{ 319{
319 Eina_Value *v = efl_config_get(obj, name); 320 Eina_Value *v = efl_config_get(obj, name);
320 Eina_Stringshare *s = 0; 321 Eina_Stringshare *s = 0;
321 if (eina_value_type_get(v) == EINA_VALUE_TYPE_STRING) 322 if (v && eina_value_type_get(v) == EINA_VALUE_TYPE_STRING)
322 { 323 {
323 const char *b = 0; 324 const char *b = 0;
324 eina_value_get(v, &b); 325 eina_value_get(v, &b);
diff --git a/src/lib/efl_wl/Efl_Wl.h b/src/lib/efl_canvas_wl/Efl_Canvas_Wl.h
index a866a4ee13..0fae48a3a9 100644
--- a/src/lib/efl_wl/Efl_Wl.h
+++ b/src/lib/efl_canvas_wl/Efl_Canvas_Wl.h
@@ -1,24 +1,49 @@
1#ifdef EFL_BETA_API_SUPPORT 1#ifndef EFL_CANVAS_WL_H
2 2# define EFL_CANVAS_WL_H
3#ifndef EFL_WL_H
4# 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
22
23#define EWAPI EAPI EAPI_WEAK
24
25#ifdef WAYLAND_UTIL_H
26typedef struct wl_surface Efl_Canvas_Wl_Wl_Surface;
27typedef struct wl_global Efl_Canvas_Wl_Wl_Global;
28typedef struct wl_interface Efl_Canvas_Wl_Wl_Interface;
29typedef struct wl_array Efl_Canvas_Wl_Wl_Array;
30typedef void Efl_Canvas_Wl_Wl_Interface_Data;
31typedef void Efl_Canvas_Wl_Wl_Interface_Bind_Cb;
18#else 32#else
19# define EAPI 33typedef struct Efl_Canvas_Wl_Wl_Surface Efl_Canvas_Wl_Wl_Surface;
34typedef struct Efl_Canvas_Wl_Wl_Global Efl_Canvas_Wl_Wl_Global;
35typedef struct Efl_Canvas_Wl_Wl_Interface Efl_Canvas_Wl_Wl_Interface;
36typedef struct Efl_Canvas_Wl_Wl_Array Efl_Canvas_Wl_Wl_Array;
37typedef void * Efl_Canvas_Wl_Wl_Interface_Data;
38typedef void * Efl_Canvas_Wl_Wl_Interface_Bind_Cb;
20#endif 39#endif
21 40#ifdef _XKBCOMMON_H_
41typedef struct xkb_state Efl_Canvas_Wl_Xkb_State;
42#else
43typedef struct Efl_Canvas_Wl_Xkb_State Efl_Canvas_Wl_Xkb_State;
44#endif
45#include <efl_canvas_wl_surface.eo.h>
46#include <efl_canvas_wl.eo.h>
22/** 47/**
23 * @defgroup Efl_Wl_Group EFL Wayland 48 * @defgroup Efl_Wl_Group EFL Wayland
24 * 49 *
@@ -27,19 +52,7 @@
27 * @since 1.20 52 * @since 1.20
28 * @{ 53 * @{
29 */ 54 */
30 55#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/** 56/**
44 * Add a compositor widget to the given canvas. 57 * Add a compositor widget to the given canvas.
45 * 58 *
@@ -52,7 +65,7 @@ typedef enum
52 * @param e The canvas 65 * @param e The canvas
53 * @return The compositor object, @c NULL on failure 66 * @return The compositor object, @c NULL on failure
54 */ 67 */
55EAPI Evas_Object *efl_wl_add(Evas *e); 68EAPI Evas_Object *efl_canvas_wl_add(Evas *e);
56 69
57/** 70/**
58 * Run a command in the compositor widget. 71 * Run a command in the compositor widget.
@@ -64,7 +77,7 @@ EAPI Evas_Object *efl_wl_add(Evas *e);
64 * @param cmd The command to run 77 * @param cmd The command to run
65 * @return The Ecore_Exe from the executed process, @c NULL on failure 78 * @return The Ecore_Exe from the executed process, @c NULL on failure
66 */ 79 */
67EAPI Ecore_Exe *efl_wl_run(Evas_Object *obj, const char *cmd); 80EAPI Ecore_Exe *efl_canvas_wl_run(Evas_Object *obj, const char *cmd);
68 81
69/** 82/**
70 * Run a command in the compositor widget with specified flags. 83 * Run a command in the compositor widget with specified flags.
@@ -77,7 +90,7 @@ EAPI Ecore_Exe *efl_wl_run(Evas_Object *obj, const char *cmd);
77 * @param flags The flags to use 90 * @param flags The flags to use
78 * @return The Ecore_Exe from the executed process, @c NULL on failure 91 * @return The Ecore_Exe from the executed process, @c NULL on failure
79 */ 92 */
80Ecore_Exe *efl_wl_flags_run(Evas_Object *obj, const char *cmd, Ecore_Exe_Flags flags); 93Ecore_Exe *efl_canvas_wl_flags_run(Evas_Object *obj, const char *cmd, Ecore_Exe_Flags flags);
81 94
82/** 95/**
83 * Add a process to the list of allowed clients for the compositor widget 96 * Add a process to the list of allowed clients for the compositor widget
@@ -86,7 +99,7 @@ Ecore_Exe *efl_wl_flags_run(Evas_Object *obj, const char *cmd, Ecore_Exe_Flags f
86 * @param pid The process to allow 99 * @param pid The process to allow
87 * @since 1.21 100 * @since 1.21
88 */ 101 */
89EAPI void efl_wl_pid_add(Evas_Object *obj, int32_t pid); 102EAPI void efl_canvas_wl_pid_add(Evas_Object *obj, int32_t pid);
90 103
91/** 104/**
92 * Remove a process from the list of allowed clients for the compositor widget 105 * Remove a process from the list of allowed clients for the compositor widget
@@ -95,7 +108,7 @@ EAPI void efl_wl_pid_add(Evas_Object *obj, int32_t pid);
95 * @param pid The process to deny 108 * @param pid The process to deny
96 * @since 1.21 109 * @since 1.21
97 */ 110 */
98EAPI void efl_wl_pid_del(Evas_Object *obj, int32_t pid); 111EAPI void efl_canvas_wl_pid_del(Evas_Object *obj, int32_t pid);
99 112
100/** 113/**
101 * Put the bottom-most toplevel window on top and apply focus to it 114 * Put the bottom-most toplevel window on top and apply focus to it
@@ -103,7 +116,7 @@ EAPI void efl_wl_pid_del(Evas_Object *obj, int32_t pid);
103 * @param obj The compositor widget 116 * @param obj The compositor widget
104 * @return EINA_TRUE if the window stacking was changed 117 * @return EINA_TRUE if the window stacking was changed
105 */ 118 */
106EAPI Eina_Bool efl_wl_next(Evas_Object *obj); 119EAPI Eina_Bool efl_canvas_wl_surface_next(Evas_Object *obj);
107 120
108/** 121/**
109 * Put the second top-most toplevel window on top and apply focus to it 122 * Put the second top-most toplevel window on top and apply focus to it
@@ -111,7 +124,7 @@ EAPI Eina_Bool efl_wl_next(Evas_Object *obj);
111 * @param obj The compositor widget 124 * @param obj The compositor widget
112 * @return EINA_TRUE if the window stacking was changed 125 * @return EINA_TRUE if the window stacking was changed
113 */ 126 */
114EAPI Eina_Bool efl_wl_prev(Evas_Object *obj); 127EAPI Eina_Bool efl_canvas_wl_surface_prev(Evas_Object *obj);
115 128
116/** 129/**
117 * Set rotation and flip for the compositor's output 130 * Set rotation and flip for the compositor's output
@@ -122,7 +135,7 @@ EAPI Eina_Bool efl_wl_prev(Evas_Object *obj);
122 * @note rtl is equivalent to WL_OUTPUT_TRANSFORM_FLIPPED and rotations are applied 135 * @note rtl is equivalent to WL_OUTPUT_TRANSFORM_FLIPPED and rotations are applied
123 * on top 136 * on top
124 */ 137 */
125EAPI void efl_wl_rotate(Evas_Object *obj, Efl_Wl_Rotation rot, Eina_Bool rtl); 138EAPI void efl_canvas_wl_rotate(Evas_Object *obj, Efl_Wl_Rotation rot, Eina_Bool rtl);
126 139
127/** 140/**
128 * Set the scale factor for the compositor's output 141 * Set the scale factor for the compositor's output
@@ -130,25 +143,25 @@ EAPI void efl_wl_rotate(Evas_Object *obj, Efl_Wl_Rotation rot, Eina_Bool rtl);
130 * @param obj The compositor widget 143 * @param obj The compositor widget
131 * @param scale The scale factor to set 144 * @param scale The scale factor to set
132 */ 145 */
133EAPI void efl_wl_scale_set(Evas_Object *obj, double scale); 146EAPI void efl_canvas_wl_scale_set(Evas_Object *obj, double scale);
134 147
135/** 148/**
136 * Transfer aspect hints from top-most surface onto the efl_wl object 149 * Transfer aspect hints from top-most surface onto the efl_canvas_wl object
137 * 150 *
138 * @param obj The compositor widget 151 * @param obj The compositor widget
139 * @param set Whether to enable aspect setting 152 * @param set Whether to enable aspect setting
140 * @since 1.21 153 * @since 1.21
141 */ 154 */
142EAPI void efl_wl_aspect_set(Evas_Object *obj, Eina_Bool set); 155EAPI void efl_canvas_wl_aspect_set(Evas_Object *obj, Eina_Bool set);
143 156
144/** 157/**
145 * Transfer min/max hints from top-most surface onto the efl_wl object 158 * Transfer min/max hints from top-most surface onto the efl_canvas_wl object
146 * 159 *
147 * @param obj The compositor widget 160 * @param obj The compositor widget
148 * @param set Whether to enable min/max setting 161 * @param set Whether to enable min/max setting
149 * @since 1.21 162 * @since 1.21
150 */ 163 */
151EAPI void efl_wl_minmax_set(Evas_Object *obj, Eina_Bool set); 164EAPI void efl_canvas_wl_minmax_set(Evas_Object *obj, Eina_Bool set);
152 165
153/** 166/**
154 * Add an externally-managed global to the compositor 167 * Add an externally-managed global to the compositor
@@ -164,7 +177,7 @@ EAPI void efl_wl_minmax_set(Evas_Object *obj, Eina_Bool set);
164 * @return The created global (struct wl_global), or NULL on failure 177 * @return The created global (struct wl_global), or NULL on failure
165 * @since 1.21 178 * @since 1.21
166 */ 179 */
167EAPI void *efl_wl_global_add(Evas_Object *obj, const void *interface, uint32_t version, void *data, void *bind_cb); 180EAPI void *efl_canvas_wl_global_add(Evas_Object *obj, const void *interface, uint32_t version, void *data, void *bind_cb);
168 181
169/** 182/**
170 * Extract a child surface from the compositor 183 * Extract a child surface from the compositor
@@ -176,7 +189,7 @@ EAPI void *efl_wl_global_add(Evas_Object *obj, const void *interface, uint32_t v
176 * @return True if the surface was successfully extracted 189 * @return True if the surface was successfully extracted
177 * @since 1.21 190 * @since 1.21
178 */ 191 */
179EAPI Eina_Bool efl_wl_surface_extract(Evas_Object *surface); 192EAPI Eina_Bool efl_canvas_wl_surface_extract(Evas_Object *surface);
180 193
181/** 194/**
182 * Return the pid for the surface's client 195 * Return the pid for the surface's client
@@ -187,19 +200,19 @@ EAPI Eina_Bool efl_wl_surface_extract(Evas_Object *surface);
187 * @return The pid of the surface, or -1 on failure 200 * @return The pid of the surface, or -1 on failure
188 * @since 1.24 201 * @since 1.24
189 */ 202 */
190EAPI int32_t efl_wl_surface_pid_get(Evas_Object *surface); 203EAPI int32_t efl_canvas_wl_surface_pid_get(Evas_Object *surface);
191 204#endif
192/** 205/**
193 * Get the Evas_Object for an extracted wl_surface resource created by an efl_wl object 206 * Get the Evas_Object for an extracted wl_surface resource created by an efl_canvas_wl object
194 * 207 *
195 * @note Passing anything other than a valid wl_surface resource from an efl_wl object will guarantee a crash. 208 * @note Passing anything other than a valid wl_surface resource from an efl_canvas_wl object will guarantee a crash.
196 * 209 *
197 * @param surface_resource The wl_resource for a wl_surface 210 * @param surface_resource The wl_resource for a wl_surface
198 * @return The Evas_Object of the surface, NULL on failure 211 * @return The Evas_Object of the surface, NULL on failure
199 * @since 1.21 212 * @since 1.21
200 */ 213 */
201EAPI Evas_Object *efl_wl_extracted_surface_object_find(void *surface_resource); 214EAPI Evas_Object *efl_canvas_wl_extracted_surface_object_find(void *surface_resource);
202 215#if 0
203/** 216/**
204 * Get the Evas_Object for an extracted surface's parent, or NULL if the parent is not extracted 217 * Get the Evas_Object for an extracted surface's parent, or NULL if the parent is not extracted
205 * 218 *
@@ -209,7 +222,7 @@ EAPI Evas_Object *efl_wl_extracted_surface_object_find(void *surface_resource);
209 * @return The Evas_Object of the parent surface, NULL on failure or if there is no parent 222 * @return The Evas_Object of the parent surface, NULL on failure or if there is no parent
210 * @since 1.21 223 * @since 1.21
211 */ 224 */
212EAPI Evas_Object *efl_wl_extracted_surface_extracted_parent_get(Evas_Object *surface); 225EAPI Evas_Object *efl_canvas_wl_extracted_surface_extracted_parent_get(Evas_Object *surface);
213 226
214/** 227/**
215 * Set external xkbcommon resources to be used read-only by the compositor object 228 * Set external xkbcommon resources to be used read-only by the compositor object
@@ -227,7 +240,7 @@ EAPI Evas_Object *efl_wl_extracted_surface_extracted_parent_get(Evas_Object *sur
227 * @param wl_key_array A pointer to the wl_array in which keys are stored 240 * @param wl_key_array A pointer to the wl_array in which keys are stored
228 * @since 1.21 241 * @since 1.21
229 */ 242 */
230EAPI void efl_wl_seat_keymap_set(Evas_Object *obj, Eo *seat, void *state, char *str, void *wl_key_array); 243EAPI void efl_canvas_wl_seat_keymap_set(Evas_Object *obj, Eo *seat, void *state, char *str, void *wl_key_array);
231 244
232/** 245/**
233 * Set the key repeat rate for a seat in the compositor 246 * Set the key repeat rate for a seat in the compositor
@@ -235,7 +248,10 @@ EAPI void efl_wl_seat_keymap_set(Evas_Object *obj, Eo *seat, void *state, char *
235 * @param obj The compositor widget 248 * @param obj The compositor widget
236 * @since 1.21 249 * @since 1.21
237 */ 250 */
238EAPI void efl_wl_seat_key_repeat_set(Evas_Object *obj, Eo *seat, int repeat_rate, int repeat_delay); 251EAPI void efl_canvas_wl_seat_key_repeat_set(Evas_Object *obj, Eo *seat, int repeat_rate, int repeat_delay);
239#endif 252#endif
240 253#undef EAPI
254#define EAPI
255#undef EAPI_WEAK
256#define EAPI_WEAK
241#endif 257#endif
diff --git a/src/lib/efl_wl/copiedfromweston.x b/src/lib/efl_canvas_wl/copiedfromweston.x
index d5c35eee75..d5c35eee75 100644
--- a/src/lib/efl_wl/copiedfromweston.x
+++ b/src/lib/efl_canvas_wl/copiedfromweston.x
diff --git a/src/lib/efl_wl/dmabuf.c b/src/lib/efl_canvas_wl/dmabuf.c
index 273d141b05..273d141b05 100644
--- a/src/lib/efl_wl/dmabuf.c
+++ b/src/lib/efl_canvas_wl/dmabuf.c
diff --git a/src/lib/efl_wl/dmabuf.h b/src/lib/efl_canvas_wl/dmabuf.h
index 72f42816a3..72f42816a3 100644
--- a/src/lib/efl_wl/dmabuf.h
+++ b/src/lib/efl_canvas_wl/dmabuf.h
diff --git a/src/lib/efl_wl/efl_wl.c b/src/lib/efl_canvas_wl/efl_canvas_wl.c
index 2aef1368ce..997703299f 100644
--- a/src/lib/efl_wl/efl_wl.c
+++ b/src/lib/efl_canvas_wl/efl_canvas_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,8 +37,9 @@
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"
38#include "Efl_Wl.h" 41#include "canvas/evas_canvas_eo.h"
42#include "Efl_Canvas_Wl.h"
39 43
40#undef COORDS_INSIDE 44#undef COORDS_INSIDE
41#define COORDS_INSIDE(x, y, xx, yy, ww, hh) \ 45#define COORDS_INSIDE(x, y, xx, yy, ww, hh) \
@@ -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_CANVAS_WL_CLASS
87 92
88typedef struct Input_Sequence 93typedef struct Input_Sequence
89{ 94{
@@ -115,21 +120,21 @@ typedef struct Comp_Buffer
115 120
116typedef struct Comp 121typedef struct Comp
117{ 122{
118 Efl_Wl_Rotation rotation; 123 Efl_Canvas_Wl_Rotation rotation;
119 double scale; 124 double scale;
120 char *env; 125 char *env;
126 Efl_Exe_Flags flags;
121 Ecore_Wl2_Display *disp; 127 Ecore_Wl2_Display *disp;
122 Ecore_Wl2_Display *parent_disp; 128 Ecore_Wl2_Display *parent_disp;
123 Ecore_Wl2_Display *client_disp; 129 Ecore_Wl2_Display *client_disp;
124 struct wl_display *display; 130 struct wl_display *display;
125 131
126 double wayland_time_base; 132 double wayland_time_base;
127 Evas_Object *obj; 133 Eo *obj;
128 Evas_Object *clip; 134 Eo *clip;
129 Evas_Object *events; 135 Eo *events;
130 136
131 Eina_Hash *exes; 137 Eina_Hash *exes;
132 Ecore_Event_Handler *exe_handler;
133 138
134 Eina_Inlist *surfaces; 139 Eina_Inlist *surfaces;
135 unsigned int surfaces_count; 140 unsigned int surfaces_count;
@@ -206,7 +211,7 @@ typedef struct Comp_Seat
206 struct xkb_context *context; 211 struct xkb_context *context;
207 struct xkb_keymap *keymap; 212 struct xkb_keymap *keymap;
208 struct xkb_state *state; 213 struct xkb_state *state;
209 char *keymap_str; 214 const char *keymap_str;
210 int keymap_str_size; 215 int keymap_str_size;
211 int repeat_rate; 216 int repeat_rate;
212 int repeat_delay; 217 int repeat_delay;
@@ -229,7 +234,7 @@ typedef struct Comp_Seat
229 } cursor; 234 } cursor;
230 struct 235 struct
231 { 236 {
232 Evas_Object *obj; 237 Eo *obj;
233 int layer; 238 int layer;
234 int x, y; 239 int x, y;
235 } efl; 240 } efl;
@@ -294,9 +299,9 @@ struct Comp_Surface
294{ 299{
295 EINA_INLIST; 300 EINA_INLIST;
296 Comp *c; 301 Comp *c;
297 Evas_Object *obj; 302 Eo *obj;
298 Evas_Object *clip; 303 Eo *clip;
299 Evas_Object *img; 304 Eo *img;
300 Eina_Array *input_rects; 305 Eina_Array *input_rects;
301 Eina_Array *opaque_rects; 306 Eina_Array *opaque_rects;
302 Eina_List *proxies; 307 Eina_List *proxies;
@@ -571,12 +576,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; 576 return s->tch.resources ? eina_hash_find(s->tch.resources, &client) : NULL;
572} 577}
573 578
574static void comp_render_pre_proxied(Evas_Object *o, Evas *e, void *event_info); 579static 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); 580static 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); 581static void comp_surface_commit_image_state(Comp_Surface *cs, Comp_Buffer *buffer, Eo *o);
577 582
578static void 583static void
579comp_surface_proxy_del(void *data, Evas *e, Evas_Object *obj, void *event_info EINA_UNUSED) 584comp_surface_proxy_del(void *data, Evas *e, Eo *obj, void *event_info EINA_UNUSED)
580{ 585{
581 Comp_Surface *cs = data; 586 Comp_Surface *cs = data;
582 int i; 587 int i;
@@ -598,7 +603,7 @@ comp_surface_proxy_del(void *data, Evas *e, Evas_Object *obj, void *event_info E
598} 603}
599 604
600static void 605static void
601comp_surface_proxy_resize(void *data, Evas *e EINA_UNUSED, Evas_Object *obj, void *event_info EINA_UNUSED) 606comp_surface_proxy_resize(void *data, Evas *e EINA_UNUSED, Eo *obj, void *event_info EINA_UNUSED)
602{ 607{
603 int w, h; 608 int w, h;
604 609
@@ -643,7 +648,7 @@ comp_surface_proxy_win_del(Ecore_Evas *ee)
643static void 648static void
644seat_drag_proxy_win_add(Comp_Seat *s) 649seat_drag_proxy_win_add(Comp_Seat *s)
645{ 650{
646 Evas_Object *o; 651 Eo *o;
647 652
648 if (s->drag.proxy_win) abort(); 653 if (s->drag.proxy_win) abort();
649 evas_object_hide(s->drag.surface->obj); 654 evas_object_hide(s->drag.surface->obj);
@@ -1344,7 +1349,7 @@ comp_surface_buffer_post_render(Comp_Surface *cs)
1344} 1349}
1345 1350
1346static void 1351static void
1347comp_surface_pixels_get(void *data, Evas_Object *obj) 1352comp_surface_pixels_get(void *data, Eo *obj)
1348{ 1353{
1349 Comp_Surface *cs = data; 1354 Comp_Surface *cs = data;
1350 Comp_Buffer *buffer; 1355 Comp_Buffer *buffer;
@@ -1358,7 +1363,7 @@ comp_surface_pixels_get(void *data, Evas_Object *obj)
1358} 1363}
1359 1364
1360static void 1365static void
1361comp_surface_commit_image_state(Comp_Surface *cs, Comp_Buffer *buffer, Evas_Object *o) 1366comp_surface_commit_image_state(Comp_Surface *cs, Comp_Buffer *buffer, Eo *o)
1362{ 1367{
1363 if ((!buffer->renders) || (!eina_list_data_find(buffer->renders, evas_object_evas_get(o)))) 1368 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)); 1369 buffer->renders = eina_list_append(buffer->renders, evas_object_evas_get(o));
@@ -1410,7 +1415,7 @@ comp_surface_commit_state(Comp_Surface *cs, Comp_Buffer_State *state)
1410{ 1415{
1411 int x, y; 1416 int x, y;
1412 Eina_List *l; 1417 Eina_List *l;
1413 Evas_Object *o; 1418 Eo *o;
1414 Comp_Buffer *buffer = NULL; 1419 Comp_Buffer *buffer = NULL;
1415 Eina_Bool newly_new = EINA_FALSE; 1420 Eina_Bool newly_new = EINA_FALSE;
1416 1421
@@ -1513,7 +1518,7 @@ comp_surface_commit_state(Comp_Surface *cs, Comp_Buffer_State *state)
1513 { 1518 {
1514 Eina_Iterator *it; 1519 Eina_Iterator *it;
1515 Eina_Rectangle *rect; 1520 Eina_Rectangle *rect;
1516 Evas_Object *r; 1521 Eo *r;
1517 1522
1518 it = eina_tiler_iterator_new(state->opaque); 1523 it = eina_tiler_iterator_new(state->opaque);
1519 cs->opaque_rects = eina_array_new(1); 1524 cs->opaque_rects = eina_array_new(1);
@@ -1550,7 +1555,7 @@ comp_surface_commit_state(Comp_Surface *cs, Comp_Buffer_State *state)
1550 { 1555 {
1551 Eina_Iterator *it; 1556 Eina_Iterator *it;
1552 Eina_Rectangle *rect; 1557 Eina_Rectangle *rect;
1553 Evas_Object *r; 1558 Eo *r;
1554 1559
1555 array_clear(&cs->input_rects); 1560 array_clear(&cs->input_rects);
1556 it = eina_tiler_iterator_new(state->input); 1561 it = eina_tiler_iterator_new(state->input);
@@ -1906,7 +1911,7 @@ comp_surface_impl_destroy(struct wl_resource *resource)
1906 if (cs->post_render_queue && (!cs->dead)) 1911 if (cs->post_render_queue && (!cs->dead))
1907 { 1912 {
1908 Eina_List *l; 1913 Eina_List *l;
1909 Evas_Object *o; 1914 Eo *o;
1910 1915
1911 cs->dead = 1; 1916 cs->dead = 1;
1912 evas_object_hide(cs->obj); 1917 evas_object_hide(cs->obj);
@@ -1921,8 +1926,6 @@ comp_surface_impl_destroy(struct wl_resource *resource)
1921} 1926}
1922 1927
1923 1928
1924static Evas_Smart *comp_surface_smart = NULL;
1925
1926static inline Eina_Bool 1929static inline Eina_Bool
1927comp_surface_check_grab(Comp_Surface *cs, Comp_Seat *s) 1930comp_surface_check_grab(Comp_Surface *cs, Comp_Seat *s)
1928{ 1931{
@@ -2017,7 +2020,7 @@ comp_surface_send_pointer_enter(Comp_Surface *cs, Comp_Seat *s, int cx, int cy)
2017} 2020}
2018 2021
2019static void 2022static void
2020comp_surface_mouse_in(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info) 2023comp_surface_mouse_in(void *data, Evas *e EINA_UNUSED, Eo *obj EINA_UNUSED, void *event_info)
2021{ 2024{
2022 Evas_Event_Mouse_In *ev = event_info; 2025 Evas_Event_Mouse_In *ev = event_info;
2023 Comp_Seat *s; 2026 Comp_Seat *s;
@@ -2071,7 +2074,7 @@ comp_surface_send_pointer_leave(Comp_Surface *cs, Comp_Seat *s)
2071} 2074}
2072 2075
2073static void 2076static void
2074comp_surface_mouse_out(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info) 2077comp_surface_mouse_out(void *data, Evas *e EINA_UNUSED, Eo *obj EINA_UNUSED, void *event_info)
2075{ 2078{
2076 Evas_Event_Mouse_Out *ev = event_info; 2079 Evas_Event_Mouse_Out *ev = event_info;
2077 Comp_Seat *s; 2080 Comp_Seat *s;
@@ -2154,7 +2157,7 @@ comp_surface_mouse_button(Comp_Surface *cs, Comp_Seat *s, uint32_t timestamp, ui
2154} 2157}
2155 2158
2156static void 2159static void
2157comp_surface_mouse_down(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info) 2160comp_surface_mouse_down(void *data, Evas *e EINA_UNUSED, Eo *obj EINA_UNUSED, void *event_info)
2158{ 2161{
2159 Evas_Event_Mouse_Down *ev = event_info; 2162 Evas_Event_Mouse_Down *ev = event_info;
2160 Comp_Seat *s; 2163 Comp_Seat *s;
@@ -2169,7 +2172,7 @@ comp_surface_mouse_down(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_U
2169} 2172}
2170 2173
2171static void 2174static void
2172comp_surface_mouse_up(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info) 2175comp_surface_mouse_up(void *data, Evas *e EINA_UNUSED, Eo *obj EINA_UNUSED, void *event_info)
2173{ 2176{
2174 Evas_Event_Mouse_Down *ev = event_info; 2177 Evas_Event_Mouse_Down *ev = event_info;
2175 Comp_Seat *s; 2178 Comp_Seat *s;
@@ -2184,7 +2187,7 @@ comp_surface_mouse_up(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNU
2184} 2187}
2185 2188
2186static void 2189static void
2187comp_surface_mouse_move(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info) 2190comp_surface_mouse_move(void *data, Evas *e EINA_UNUSED, Eo *obj EINA_UNUSED, void *event_info)
2188{ 2191{
2189 Evas_Event_Mouse_Move *ev = event_info; 2192 Evas_Event_Mouse_Move *ev = event_info;
2190 Comp_Surface *cs = data; 2193 Comp_Surface *cs = data;
@@ -2229,7 +2232,7 @@ comp_surface_mouse_move(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_U
2229} 2232}
2230 2233
2231static void 2234static void
2232comp_surface_mouse_wheel(void *data, Evas *evas EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event) 2235comp_surface_mouse_wheel(void *data, Evas *evas EINA_UNUSED, Eo *obj EINA_UNUSED, void *event)
2233{ 2236{
2234 Evas_Event_Mouse_Wheel *ev = event; 2237 Evas_Event_Mouse_Wheel *ev = event;
2235 Comp_Surface *cs = data; 2238 Comp_Surface *cs = data;
@@ -2262,7 +2265,7 @@ comp_surface_mouse_wheel(void *data, Evas *evas EINA_UNUSED, Evas_Object *obj EI
2262} 2265}
2263 2266
2264static void 2267static void
2265comp_surface_multi_down(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info) 2268comp_surface_multi_down(void *data, Evas *e EINA_UNUSED, Eo *obj EINA_UNUSED, void *event_info)
2266{ 2269{
2267 Evas_Event_Multi_Down *ev = event_info; 2270 Evas_Event_Multi_Down *ev = event_info;
2268 Comp_Surface *cs = data; 2271 Comp_Surface *cs = data;
@@ -2296,7 +2299,7 @@ comp_surface_multi_down(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_U
2296} 2299}
2297 2300
2298static void 2301static void
2299comp_surface_multi_up(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info) 2302comp_surface_multi_up(void *data, Evas *e EINA_UNUSED, Eo *obj EINA_UNUSED, void *event_info)
2300{ 2303{
2301 Evas_Event_Multi_Up *ev = event_info; 2304 Evas_Event_Multi_Up *ev = event_info;
2302 Comp_Surface *cs = data; 2305 Comp_Surface *cs = data;
@@ -2335,7 +2338,7 @@ comp_surface_multi_up(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNU
2335} 2338}
2336 2339
2337static void 2340static void
2338comp_surface_multi_move(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info) 2341comp_surface_multi_move(void *data, Evas *e EINA_UNUSED, Eo *obj EINA_UNUSED, void *event_info)
2339{ 2342{
2340 Evas_Event_Multi_Move *ev = event_info; 2343 Evas_Event_Multi_Move *ev = event_info;
2341 Comp_Surface *cs = data; 2344 Comp_Surface *cs = data;
@@ -2375,14 +2378,19 @@ comp_surface_multi_move(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_U
2375 } 2378 }
2376} 2379}
2377 2380
2381EOLIAN static Eo *
2382_efl_canvas_wl_surface_efl_object_constructor(Eo *obj, Comp_Surface *cs EINA_UNUSED)
2383{
2384 efl_canvas_group_clipped_set(obj, EINA_TRUE);
2385 return efl_constructor(efl_super(obj, EFL_CANVAS_WL_SURFACE_CLASS));
2386}
2387
2378static void 2388static void
2379comp_surface_smart_add(Evas_Object *obj) 2389_efl_canvas_wl_surface_efl_canvas_group_group_add(Eo *obj, Comp_Surface *cs)
2380{ 2390{
2381 Comp_Surface *cs;
2382 Evas *e; 2391 Evas *e;
2383 2392
2384 cs = calloc(1, sizeof(Comp_Surface)); 2393 efl_canvas_group_add(efl_super(obj, EFL_CANVAS_WL_SURFACE_CLASS));
2385 evas_object_smart_data_set(obj, cs);
2386 cs->obj = obj; 2394 cs->obj = obj;
2387 evas_object_event_callback_add(cs->obj, EVAS_CALLBACK_MOUSE_DOWN, comp_surface_mouse_down, cs); 2395 evas_object_event_callback_add(cs->obj, EVAS_CALLBACK_MOUSE_DOWN, comp_surface_mouse_down, cs);
2388 evas_object_event_callback_add(cs->obj, EVAS_CALLBACK_MOUSE_UP, comp_surface_mouse_up, cs); 2396 evas_object_event_callback_add(cs->obj, EVAS_CALLBACK_MOUSE_UP, comp_surface_mouse_up, cs);
@@ -2396,19 +2404,17 @@ comp_surface_smart_add(Evas_Object *obj)
2396 e = evas_object_evas_get(obj); 2404 e = evas_object_evas_get(obj);
2397 cs->img = evas_object_image_filled_add(e); 2405 cs->img = evas_object_image_filled_add(e);
2398 evas_object_show(cs->img); 2406 evas_object_show(cs->img);
2399 cs->clip = evas_object_rectangle_add(e); 2407 cs->clip = (Eo*)efl_canvas_group_clipper_get(obj);
2408 efl_gfx_entity_geometry_set(cs->clip, efl_gfx_entity_geometry_get(obj));
2400 2409
2401 evas_object_smart_member_add(cs->img, cs->obj); 2410 evas_object_smart_member_add(cs->img, cs->obj);
2402 evas_object_smart_member_add(cs->clip, cs->obj);
2403 evas_object_image_border_center_fill_set(cs->img, EVAS_BORDER_FILL_SOLID); 2411 evas_object_image_border_center_fill_set(cs->img, EVAS_BORDER_FILL_SOLID);
2404 evas_object_image_colorspace_set(cs->img, EVAS_COLORSPACE_ARGB8888); 2412 evas_object_image_colorspace_set(cs->img, EVAS_COLORSPACE_ARGB8888);
2405} 2413}
2406 2414
2407static void 2415static void
2408comp_surface_smart_del(Evas_Object *obj) 2416_efl_canvas_wl_surface_efl_canvas_group_group_del(Eo *obj, Comp_Surface *cs)
2409{ 2417{
2410 Comp_Surface *cs = evas_object_smart_data_get(obj);
2411
2412 array_clear(&cs->input_rects); 2418 array_clear(&cs->input_rects);
2413 array_clear(&cs->opaque_rects); 2419 array_clear(&cs->opaque_rects);
2414 eina_tiler_free(cs->opaque); 2420 eina_tiler_free(cs->opaque);
@@ -2422,7 +2428,6 @@ comp_surface_smart_del(Evas_Object *obj)
2422 wl_resource_destroy(cs->res); 2428 wl_resource_destroy(cs->res);
2423 } 2429 }
2424 evas_object_del(cs->img); 2430 evas_object_del(cs->img);
2425 evas_object_del(cs->clip);
2426 if (cs->shell.surface) 2431 if (cs->shell.surface)
2427 { 2432 {
2428 if (cs->role) 2433 if (cs->role)
@@ -2431,54 +2436,42 @@ comp_surface_smart_del(Evas_Object *obj)
2431 } 2436 }
2432 cs->c->surfaces = eina_inlist_remove(cs->c->surfaces, EINA_INLIST_GET(cs)); 2437 cs->c->surfaces = eina_inlist_remove(cs->c->surfaces, EINA_INLIST_GET(cs));
2433 cs->c->surfaces_count--; 2438 cs->c->surfaces_count--;
2434 free(cs); 2439 efl_canvas_group_del(efl_super(obj, EFL_CANVAS_WL_SURFACE_CLASS));
2435} 2440}
2436 2441
2437static void 2442static void
2438comp_surface_smart_move(Evas_Object *obj, int x, int y) 2443_efl_canvas_wl_surface_efl_gfx_entity_position_set(Eo *obj, Comp_Surface *cs, Eina_Position2D pos)
2439{ 2444{
2440 Eina_List *l; 2445 efl_gfx_entity_position_set(efl_super(obj, EFL_CANVAS_WL_SURFACE_CLASS), pos);
2441 Evas_Object *o; 2446 efl_gfx_entity_position_set(cs->clip, pos);
2442 int px, py, cx, cy;
2443 2447
2444 evas_object_geometry_get(obj, &px, &py, NULL, NULL);
2445 //{ 2448 //{
2446 //Comp_Surface *cs = evas_object_smart_data_get(obj);
2447 //if (cs->cursor) 2449 //if (cs->cursor)
2448 //fprintf(stderr, "COMP %sSURFACE(%p) %d,%d\n", cs->subsurface ? "SUB" : "", cs, x, y); 2450 //fprintf(stderr, "COMP %sSURFACE(%p) %d,%d\n", cs->subsurface ? "SUB" : "", cs, x, y);
2449 //} 2451 //}
2450 l = evas_object_smart_members_get(obj);
2451 EINA_LIST_FREE(l, o)
2452 {
2453 evas_object_geometry_get(o, &cx, &cy, NULL, NULL);
2454 evas_object_move(o, x + (cx - px), y + (cy - py));
2455 //fprintf(stderr, "SUBOBJ %d,%d\n", x + (cx - px), y + (cy - py));
2456 }
2457} 2452}
2458 2453
2459static void 2454static void
2460comp_surface_smart_resize(Evas_Object *obj, int w, int h) 2455_efl_canvas_wl_surface_efl_gfx_entity_size_set(Eo *obj, Comp_Surface *cs, Eina_Size2D sz)
2461{ 2456{
2462 Comp_Surface *cs = evas_object_smart_data_get(obj); 2457 efl_gfx_entity_size_set(efl_super(obj, EFL_CANVAS_WL_SURFACE_CLASS), sz);
2463 evas_object_resize(cs->clip, w, h); 2458 evas_object_resize(cs->clip, sz.w, sz.h);
2464 //if (cs->cursor) fprintf(stderr, "COMP %sSURFACE(%p) %dx%d\n", cs->subsurface ? "SUB" : "", cs, w, h); 2459 //if (cs->cursor) fprintf(stderr, "COMP %sSURFACE(%p) %dx%d\n", cs->subsurface ? "SUB" : "", cs, w, h);
2465 if (cs->drag) 2460 if (cs->drag)
2466 evas_object_move(cs->obj, cs->drag->ptr.pos.x, cs->drag->ptr.pos.y); 2461 evas_object_move(cs->obj, cs->drag->ptr.pos.x, cs->drag->ptr.pos.y);
2467} 2462}
2468 2463
2469static void 2464static void
2470comp_surface_smart_show(Evas_Object *obj) 2465_efl_canvas_wl_surface_efl_gfx_entity_visible_set(Eo *obj, Comp_Surface *cs, Eina_Bool vis)
2471{
2472 Comp_Surface *cs = evas_object_smart_data_get(obj);
2473 evas_object_show(cs->clip);
2474 cs->mapped = 1;
2475}
2476
2477static void
2478comp_surface_smart_hide(Evas_Object *obj)
2479{ 2466{
2480 Comp_Surface *pcs = NULL, *lcs, *cs = evas_object_smart_data_get(obj); 2467 Comp_Surface *pcs = NULL, *lcs;
2481 2468 efl_gfx_entity_visible_set(efl_super(obj, EFL_CANVAS_WL_SURFACE_CLASS), vis);
2469 if (vis)
2470 {
2471 evas_object_show(cs->clip);
2472 cs->mapped = 1;
2473 return;
2474 }
2482 evas_object_hide(cs->clip); 2475 evas_object_hide(cs->clip);
2483 cs->mapped = 0; 2476 cs->mapped = 0;
2484 2477
@@ -2516,77 +2509,18 @@ comp_surface_smart_hide(Evas_Object *obj)
2516} 2509}
2517 2510
2518static void 2511static void
2519comp_surface_smart_clip_set(Evas_Object *obj, Evas_Object *clip)
2520{
2521 Comp_Surface *cs = evas_object_smart_data_get(obj);
2522 evas_object_clip_set(cs->clip, clip);
2523}
2524
2525static void
2526comp_surface_smart_clip_unset(Evas_Object *obj)
2527{
2528 Comp_Surface *cs = evas_object_smart_data_get(obj);
2529 evas_object_clip_unset(cs->clip);
2530}
2531
2532static void
2533comp_surface_smart_member_add(Evas_Object *obj, Evas_Object *child)
2534{
2535 Comp_Surface *cs = evas_object_smart_data_get(obj);
2536 if (child != cs->clip) evas_object_clip_set(child, cs->clip);
2537}
2538
2539static void
2540comp_surface_smart_member_del(Evas_Object *obj, Evas_Object *child)
2541{
2542 Comp_Surface *cs = evas_object_smart_data_get(obj);
2543 if (child != cs->clip) evas_object_clip_unset(child);
2544}
2545
2546static void
2547comp_surface_smart_init(void)
2548{
2549 if (comp_surface_smart) return;
2550 {
2551 static const Evas_Smart_Class sc =
2552 {
2553 "comp_surface",
2554 EVAS_SMART_CLASS_VERSION,
2555 comp_surface_smart_add,
2556 comp_surface_smart_del,
2557 comp_surface_smart_move,
2558 comp_surface_smart_resize,
2559 comp_surface_smart_show,
2560 comp_surface_smart_hide,
2561 NULL, //color_set
2562 comp_surface_smart_clip_set,
2563 comp_surface_smart_clip_unset,
2564 NULL,
2565 comp_surface_smart_member_add,
2566 comp_surface_smart_member_del,
2567
2568 NULL,
2569 NULL,
2570 NULL,
2571 NULL
2572 };
2573 comp_surface_smart = evas_smart_class_new(&sc);
2574 }
2575}
2576
2577static void
2578comp_surface_create(struct wl_client *client, struct wl_resource *resource, uint32_t id) 2512comp_surface_create(struct wl_client *client, struct wl_resource *resource, uint32_t id)
2579{ 2513{
2580 struct wl_resource *res; 2514 struct wl_resource *res;
2581 Comp_Surface *cs; 2515 Comp_Surface *cs;
2582 Comp *c = wl_resource_get_user_data(resource); 2516 Comp *c = wl_resource_get_user_data(resource);
2583 Evas_Object *obj; 2517 Eo *obj;
2584 int x, y; 2518 int x, y;
2585 2519
2586 res = wl_resource_create(client, &wl_surface_interface, wl_resource_get_version(resource), id); 2520 res = wl_resource_create(client, &wl_surface_interface, wl_resource_get_version(resource), id);
2587 comp_surface_smart_init(); 2521 obj = efl_add(EFL_CANVAS_WL_SURFACE_CLASS, c->obj);
2588 obj = evas_object_smart_add(c->evas, comp_surface_smart); 2522 efl_gfx_entity_visible_set(obj, EINA_FALSE);
2589 cs = evas_object_smart_data_get(obj); 2523 cs = efl_data_scope_get(obj, EFL_CANVAS_WL_SURFACE_CLASS);
2590 cs->res = res; 2524 cs->res = res;
2591 evas_object_smart_member_add(cs->obj, c->obj); 2525 evas_object_smart_member_add(cs->obj, c->obj);
2592 cs->c = c; 2526 cs->c = c;
@@ -3164,16 +3098,16 @@ output_resize(Comp *c, struct wl_resource *res)
3164 int rot[][4] = 3098 int rot[][4] =
3165 { 3099 {
3166 { 3100 {
3167 [EFL_WL_ROTATION_0] = WL_OUTPUT_TRANSFORM_NORMAL, 3101 [EFL_CANVAS_WL_ROTATION_ROTATE_0] = WL_OUTPUT_TRANSFORM_NORMAL,
3168 [EFL_WL_ROTATION_90] = WL_OUTPUT_TRANSFORM_90, 3102 [EFL_CANVAS_WL_ROTATION_ROTATE_90] = WL_OUTPUT_TRANSFORM_90,
3169 [EFL_WL_ROTATION_180] = WL_OUTPUT_TRANSFORM_180, 3103 [EFL_CANVAS_WL_ROTATION_ROTATE_180] = WL_OUTPUT_TRANSFORM_180,
3170 [EFL_WL_ROTATION_270] = WL_OUTPUT_TRANSFORM_270, 3104 [EFL_CANVAS_WL_ROTATION_ROTATE_270] = WL_OUTPUT_TRANSFORM_270,
3171 }, 3105 },
3172 { 3106 {
3173 [EFL_WL_ROTATION_0] = WL_OUTPUT_TRANSFORM_FLIPPED, 3107 [EFL_CANVAS_WL_ROTATION_ROTATE_0] = WL_OUTPUT_TRANSFORM_FLIPPED,
3174 [EFL_WL_ROTATION_90] = WL_OUTPUT_TRANSFORM_FLIPPED_90, 3108 [EFL_CANVAS_WL_ROTATION_ROTATE_90] = WL_OUTPUT_TRANSFORM_FLIPPED_90,
3175 [EFL_WL_ROTATION_180] = WL_OUTPUT_TRANSFORM_FLIPPED_180, 3109 [EFL_CANVAS_WL_ROTATION_ROTATE_180] = WL_OUTPUT_TRANSFORM_FLIPPED_180,
3176 [EFL_WL_ROTATION_270] = WL_OUTPUT_TRANSFORM_FLIPPED_270, 3110 [EFL_CANVAS_WL_ROTATION_ROTATE_270] = WL_OUTPUT_TRANSFORM_FLIPPED_270,
3177 }, 3111 },
3178 }; 3112 };
3179 3113
@@ -3240,7 +3174,7 @@ shell_surface_toplevel_set_parent(struct wl_client *client EINA_UNUSED, struct w
3240 3174
3241 comp_surface_reparent(cs, pcs); 3175 comp_surface_reparent(cs, pcs);
3242 if (parent_resource) 3176 if (parent_resource)
3243 evas_object_smart_callback_call(cs->c->obj, "child_added", cs->obj); 3177 efl_event_callback_call(cs->c->obj, EFL_CANVAS_WL_EVENT_CHILD_ADDED, cs->obj);
3244} 3178}
3245 3179
3246static void 3180static void
@@ -3334,7 +3268,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); 3268 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); 3269 wl_resource_set_implementation(cs->role, &shell_surface_toplevel_interface, cs, shell_surface_toplevel_impl_destroy);
3336 cs->shell.new = 1; 3270 cs->shell.new = 1;
3337 evas_object_smart_callback_call(cs->c->obj, "toplevel_added", cs->obj); 3271 efl_event_callback_call(cs->c->obj, EFL_CANVAS_WL_EVENT_TOPLEVEL_ADDED, cs->obj);
3338} 3272}
3339 3273
3340static void 3274static void
@@ -3423,7 +3357,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)); 3357 comp_surface_reparent(cs, wl_resource_get_user_data(parent_resource));
3424 cs->shell.positioner = wl_resource_get_user_data(positioner_resource); 3358 cs->shell.positioner = wl_resource_get_user_data(positioner_resource);
3425 _apply_positioner(cs, cs->shell.positioner); 3359 _apply_positioner(cs, cs->shell.positioner);
3426 evas_object_smart_callback_call(cs->c->obj, "popup_added", cs->obj); 3360 efl_event_callback_call(cs->c->obj, EFL_CANVAS_WL_EVENT_POPUP_ADDED, cs->obj);
3427} 3361}
3428 3362
3429static void 3363static void
@@ -3894,7 +3828,7 @@ seat_kbd_create(struct wl_client *client, struct wl_resource *resource, uint32_t
3894} 3828}
3895 3829
3896static void 3830static void
3897seat_ptr_del(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) 3831seat_ptr_del(void *data, Evas *e EINA_UNUSED, Eo *obj EINA_UNUSED, void *event_info EINA_UNUSED)
3898{ 3832{
3899 Comp_Seat *s = data; 3833 Comp_Seat *s = data;
3900 3834
@@ -4206,7 +4140,7 @@ comp_render_pre(Comp *c, Evas *e EINA_UNUSED, void *event_info EINA_UNUSED)
4206 4140
4207 if (cs->opaque_rects && (eina_array_count(cs->opaque_rects) == 1)) 4141 if (cs->opaque_rects && (eina_array_count(cs->opaque_rects) == 1))
4208 { 4142 {
4209 Evas_Object *r = eina_array_data_get(cs->opaque_rects, 0); 4143 Eo *r = eina_array_data_get(cs->opaque_rects, 0);
4210 int x, y, w, h, ox, oy, ow, oh; 4144 int x, y, w, h, ox, oy, ow, oh;
4211 4145
4212 evas_object_geometry_get(cs->img, &x, &y, &w, &h); 4146 evas_object_geometry_get(cs->img, &x, &y, &w, &h);
@@ -4228,7 +4162,7 @@ comp_render_pre(Comp *c, Evas *e EINA_UNUSED, void *event_info EINA_UNUSED)
4228} 4162}
4229 4163
4230static void 4164static void
4231comp_render_pre_proxied(Evas_Object *o, Evas *e, void *event_info) 4165comp_render_pre_proxied(Eo *o, Evas *e, void *event_info)
4232{ 4166{
4233 Comp_Surface *cs = evas_object_data_get(o, "comp_surface"); 4167 Comp_Surface *cs = evas_object_data_get(o, "comp_surface");
4234 Comp_Buffer *buffer = cs->buffer[!cs->render_queue]; 4168 Comp_Buffer *buffer = cs->buffer[!cs->render_queue];
@@ -4302,8 +4236,6 @@ comp_render_post(Comp *c, Evas *e, void *event_info EINA_UNUSED)
4302 } 4236 }
4303} 4237}
4304 4238
4305static Evas_Smart *comp_smart = NULL;
4306
4307static void 4239static void
4308comp_seat_selection_update(Comp_Seat *s) 4240comp_seat_selection_update(Comp_Seat *s)
4309{ 4241{
@@ -4541,7 +4473,7 @@ comp_seats_proxy(Comp *c)
4541 else if (!c->parent_disp) 4473 else if (!c->parent_disp)
4542 comp_device_caps_update(s); 4474 comp_device_caps_update(s);
4543 s->global = wl_global_create(c->display, &wl_seat_interface, 4, s, seat_bind); 4475 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); 4476 efl_event_callback_call(s->c->obj, EFL_CANVAS_WL_EVENT_SEAT_ADDED, dev);
4545 if (ecore_wl2_display_sync_is_done(c->client_disp)) 4477 if (ecore_wl2_display_sync_is_done(c->client_disp))
4546 seat_proxy_update(s); 4478 seat_proxy_update(s);
4547 } 4479 }
@@ -5081,7 +5013,7 @@ comp_handlers_init(void)
5081} 5013}
5082 5014
5083static void 5015static void
5084comp_focus_in(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) 5016comp_focus_in(void *data, Evas *e EINA_UNUSED, Eo *obj EINA_UNUSED, void *event_info EINA_UNUSED)
5085{ 5017{
5086 Comp *c = data; 5018 Comp *c = data;
5087 //Efl_Input_Focus_Data *ev = event_info; 5019 //Efl_Input_Focus_Data *ev = event_info;
@@ -5128,7 +5060,7 @@ comp_focus_in(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, voi
5128} 5060}
5129 5061
5130static void 5062static void
5131comp_focus_out(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) 5063comp_focus_out(void *data, Evas *e EINA_UNUSED, Eo *obj EINA_UNUSED, void *event_info EINA_UNUSED)
5132{ 5064{
5133 Comp *c = data; 5065 Comp *c = data;
5134 //Efl_Input_Focus_Data *ev = event_info; 5066 //Efl_Input_Focus_Data *ev = event_info;
@@ -5143,7 +5075,7 @@ comp_focus_out(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, vo
5143} 5075}
5144 5076
5145static void 5077static void
5146comp_mouse_in(void *data, Evas *e, Evas_Object *obj, void *event_info) 5078comp_mouse_in(void *data, Evas *e, Eo *obj, void *event_info)
5147{ 5079{
5148 Comp *c = data; 5080 Comp *c = data;
5149 Evas_Event_Mouse_In *ev = event_info; 5081 Evas_Event_Mouse_In *ev = event_info;
@@ -5181,7 +5113,7 @@ comp_mouse_in(void *data, Evas *e, Evas_Object *obj, void *event_info)
5181} 5113}
5182 5114
5183static void 5115static void
5184comp_multi_move(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info) 5116comp_multi_move(void *data, Evas *e EINA_UNUSED, Eo *obj EINA_UNUSED, void *event_info)
5185{ 5117{
5186 Comp *c = data; 5118 Comp *c = data;
5187 Evas_Event_Multi_Move *ev = event_info; 5119 Evas_Event_Multi_Move *ev = event_info;
@@ -5202,7 +5134,7 @@ comp_multi_move(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, v
5202} 5134}
5203 5135
5204static void 5136static void
5205comp_mouse_move(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info) 5137comp_mouse_move(void *data, Evas *e EINA_UNUSED, Eo *obj EINA_UNUSED, void *event_info)
5206{ 5138{
5207 Comp *c = data; 5139 Comp *c = data;
5208 Evas_Event_Mouse_Move *ev = event_info; 5140 Evas_Event_Mouse_Move *ev = event_info;
@@ -5223,7 +5155,7 @@ comp_mouse_move(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, v
5223} 5155}
5224 5156
5225static void 5157static void
5226comp_mouse_out(void *data, Evas *e EINA_UNUSED, Evas_Object *obj, void *event_info) 5158comp_mouse_out(void *data, Evas *e EINA_UNUSED, Eo *obj, void *event_info)
5227{ 5159{
5228 Comp *c = data; 5160 Comp *c = data;
5229 Evas_Event_Mouse_Out *ev = event_info; 5161 Evas_Event_Mouse_Out *ev = event_info;
@@ -5337,28 +5269,33 @@ efl_hints_bind(struct wl_client *client, void *data, uint32_t version, uint32_t
5337 wl_resource_set_implementation(res, &hints_interface, data, NULL); 5269 wl_resource_set_implementation(res, &hints_interface, data, NULL);
5338} 5270}
5339 5271
5272EOLIAN static Eo *
5273_efl_canvas_wl_efl_object_constructor(Eo *obj, Comp *c)
5274{
5275 efl_canvas_group_clipped_set(obj, EINA_TRUE);
5276 EINA_SAFETY_ON_TRUE_RETURN_VAL(!ecore_wl2_init(), NULL);
5277 return efl_constructor(efl_super(obj, MY_CLASS));
5278}
5340 5279
5341 5280EOLIAN static void
5342static void 5281_efl_canvas_wl_efl_canvas_group_group_add(Eo *obj, Comp *c)
5343comp_smart_add(Evas_Object *obj)
5344{ 5282{
5345 Comp *c;
5346 char *env, *dbg = NULL; 5283 char *env, *dbg = NULL;
5347 5284
5348 c = calloc(1, sizeof(Comp)); 5285 efl_canvas_group_add(efl_super(obj, MY_CLASS));
5349 c->wayland_time_base = ecore_loop_time_get(); 5286 c->wayland_time_base = ecore_loop_time_get();
5350 c->obj = obj; 5287 c->obj = obj;
5351 evas_object_smart_data_set(obj, c); 5288 c->flags = EFL_EXE_FLAGS_TERM_WITH_PARENT;
5352 env = getenv("WAYLAND_DISPLAY"); 5289 env = getenv("WAYLAND_DISPLAY");
5353 if (env) env = strdup(env); 5290 if (env) env = strdup(env);
5354 5291
5355 if (getenv("EFL_WL_DEBUG")) 5292 if (getenv("EFL_CANVAS_WL_DEBUG"))
5356 { 5293 {
5357 dbg = eina_strdup(getenv("WAYLAND_DEBUG")); 5294 dbg = eina_strdup(getenv("WAYLAND_DEBUG"));
5358 setenv("WAYLAND_DEBUG", "1", 1); 5295 setenv("WAYLAND_DEBUG", "1", 1);
5359 } 5296 }
5360 c->disp = ecore_wl2_display_create(NULL); 5297 c->disp = ecore_wl2_display_create(NULL);
5361 if (getenv("EFL_WL_DEBUG")) 5298 if (getenv("EFL_CANVAS_WL_DEBUG"))
5362 { 5299 {
5363 if (dbg) setenv("WAYLAND_DEBUG", dbg, 1); 5300 if (dbg) setenv("WAYLAND_DEBUG", dbg, 1);
5364 else unsetenv("WAYLAND_DEBUG"); 5301 else unsetenv("WAYLAND_DEBUG");
@@ -5369,9 +5306,9 @@ comp_smart_add(Evas_Object *obj)
5369 else unsetenv("WAYLAND_DISPLAY"); 5306 else unsetenv("WAYLAND_DISPLAY");
5370 c->display = ecore_wl2_display_get(c->disp); 5307 c->display = ecore_wl2_display_get(c->disp);
5371 c->client_surfaces = eina_hash_pointer_new(NULL); 5308 c->client_surfaces = eina_hash_pointer_new(NULL);
5372 c->evas = evas_object_evas_get(obj); 5309 c->evas = efl_provider_find(obj, EVAS_CANVAS_CLASS);
5373 c->clip = evas_object_rectangle_add(c->evas); 5310 c->clip = (Eo*)efl_canvas_group_clipper_get(obj);
5374 evas_object_smart_member_add(c->clip, obj); 5311 efl_gfx_entity_geometry_set(c->clip, efl_gfx_entity_geometry_get(obj));
5375 c->events = evas_object_rectangle_add(c->evas); 5312 c->events = evas_object_rectangle_add(c->evas);
5376 evas_object_event_callback_add(obj, EVAS_CALLBACK_MOUSE_IN, comp_mouse_in, c); 5313 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); 5314 evas_object_event_callback_add(obj, EVAS_CALLBACK_MOUSE_MOVE, comp_mouse_move, c);
@@ -5429,11 +5366,9 @@ comp_smart_add(Evas_Object *obj)
5429 free(env); 5366 free(env);
5430} 5367}
5431 5368
5432static void 5369EOLIAN static void
5433comp_smart_del(Evas_Object *obj) 5370_efl_canvas_wl_efl_canvas_group_group_del(Eo *obj, Comp *c)
5434{ 5371{
5435 Comp *c = evas_object_smart_data_get(obj);
5436
5437 evas_object_del(c->clip); 5372 evas_object_del(c->clip);
5438 evas_object_del(c->events); 5373 evas_object_del(c->events);
5439 free(c->env); 5374 free(c->env);
@@ -5461,10 +5396,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); 5396 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); 5397 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); 5398 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); 5399 eina_hash_free(c->exes);
5466 comps = eina_list_remove(comps, c); 5400 comps = eina_list_remove(comps, c);
5467 free(c);
5468 if (!comps) 5401 if (!comps)
5469 { 5402 {
5470 void *h; 5403 void *h;
@@ -5475,35 +5408,25 @@ comp_smart_del(Evas_Object *obj)
5475#endif 5408#endif
5476 } 5409 }
5477 ecore_wl2_shutdown(); 5410 ecore_wl2_shutdown();
5411 efl_canvas_group_del(efl_super(obj, MY_CLASS));
5478} 5412}
5479 5413
5480static void 5414static void
5481comp_smart_move(Evas_Object *obj, int x, int y) 5415_efl_canvas_wl_efl_gfx_entity_position_set(Eo *obj, Comp *c, Eina_Position2D pos)
5482{ 5416{
5483 Comp_Surface *cs; 5417 efl_gfx_entity_position_set(efl_super(obj, MY_CLASS), pos);
5484 Comp *c = evas_object_smart_data_get(obj); 5418 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} 5419}
5498 5420
5499static void 5421static void
5500comp_smart_resize(Evas_Object *obj, int w, int h) 5422_efl_canvas_wl_efl_gfx_entity_size_set(Eo *obj, Comp *c, Eina_Size2D sz)
5501{ 5423{
5502 Comp *c = evas_object_smart_data_get(obj);
5503 Eina_List *l; 5424 Eina_List *l;
5504 Comp_Surface *cs; 5425 Comp_Surface *cs;
5505 struct wl_resource *res; 5426 struct wl_resource *res;
5427 int w = sz.w, h = sz.h;
5506 5428
5429 efl_gfx_entity_size_set(efl_super(obj, MY_CLASS), sz);
5507 evas_object_resize(c->clip, w, h); 5430 evas_object_resize(c->clip, w, h);
5508 evas_object_resize(c->events, w, h); 5431 evas_object_resize(c->events, w, h);
5509 EINA_LIST_FOREACH(c->output_resources, l, res) 5432 EINA_LIST_FOREACH(c->output_resources, l, res)
@@ -5515,101 +5438,25 @@ comp_smart_resize(Evas_Object *obj, int w, int h)
5515} 5438}
5516 5439
5517static void 5440static void
5518comp_smart_show(Evas_Object *obj) 5441_efl_canvas_wl_efl_gfx_entity_visible_set(Eo *obj, Comp *c, Eina_Bool vis)
5519{
5520 Comp *c = evas_object_smart_data_get(obj);
5521 Comp_Surface *cs;
5522
5523 evas_object_show(c->clip);
5524 EINA_INLIST_FOREACH(c->surfaces, cs)
5525 comp_surface_output_enter(cs);
5526}
5527
5528static void
5529comp_smart_hide(Evas_Object *obj)
5530{ 5442{
5531 Comp *c = evas_object_smart_data_get(obj);
5532 Comp_Surface *cs; 5443 Comp_Surface *cs;
5533 5444
5534 evas_object_hide(c->clip); 5445 efl_gfx_entity_visible_set(efl_super(obj, MY_CLASS), vis);
5535 EINA_INLIST_FOREACH(c->surfaces, cs) 5446 EINA_INLIST_FOREACH(c->surfaces, cs)
5536 comp_surface_output_leave(cs); 5447 if (vis)
5537} 5448 comp_surface_output_enter(cs);
5538 5449 else
5539static void 5450 comp_surface_output_leave(cs);
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}
5559
5560static void
5561comp_smart_member_add(Evas_Object *obj, Evas_Object *child)
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} 5451}
5573 5452
5574static void 5453static void
5575comp_smart_init(void) 5454exe_event_del(void *data, const Efl_Event *ev)
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{ 5455{
5608 Comp *c = data; 5456 Comp *c = data;
5609 int32_t pid = ev->pid; 5457 int32_t pid = efl_exe_pid_get(ev->object);
5610 5458
5611 eina_hash_del_by_key(c->exes, &pid); 5459 eina_hash_del_by_key(c->exes, &pid);
5612 return ECORE_CALLBACK_RENEW;
5613} 5460}
5614 5461
5615# ifdef __GNUC__ 5462# ifdef __GNUC__
@@ -5621,7 +5468,7 @@ Eina_Bool
5621comp_dmabuf_test(struct linux_dmabuf_buffer *dmabuf) 5468comp_dmabuf_test(struct linux_dmabuf_buffer *dmabuf)
5622{ 5469{
5623 Evas_Native_Surface ns; 5470 Evas_Native_Surface ns;
5624 Evas_Object *test; 5471 Eo *test;
5625 int size; 5472 int size;
5626 void *data; 5473 void *data;
5627 Comp *c = dmabuf->compositor; 5474 Comp *c = dmabuf->compositor;
@@ -5669,28 +5516,14 @@ comp_dmabuf_modifiers_query(void *compositor EINA_UNUSED, int format EINA_UNUSED
5669 *num_modifiers = 0; 5516 *num_modifiers = 0;
5670} 5517}
5671 5518
5672Evas_Object * 5519Eo *
5673efl_wl_add(Evas *e) 5520comp_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{ 5521{
5683 char *env, *disp, *gl = NULL; 5522 char *env, *disp, *gl = NULL;
5684 Comp *c; 5523 Efl_Exe *exe;
5685 Ecore_Exe *exe;
5686 5524
5687 if (!eina_streq(evas_object_type_get(obj), "comp")) abort();
5688 c = evas_object_smart_data_get(obj);
5689 if (!c->exes) 5525 if (!c->exes)
5690 c->exes = eina_hash_int32_new(NULL); 5526 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"); 5527 disp = getenv("DISPLAY");
5695 if (disp) disp = strdup(disp); 5528 if (disp) disp = strdup(disp);
5696 unsetenv("DISPLAY"); 5529 unsetenv("DISPLAY");
@@ -5703,7 +5536,10 @@ comp_run(Evas_Object *obj, const char *cmd, Ecore_Exe_Flags flags)
5703 if (gl) gl = strdup(gl); 5536 if (gl) gl = strdup(gl);
5704 setenv("ELM_ACCEL", "gl", 1); 5537 setenv("ELM_ACCEL", "gl", 1);
5705 } 5538 }
5706 exe = ecore_exe_pipe_run(cmd, flags, c); 5539 exe = efl_add(EFL_EXE_CLASS, obj,
5540 efl_core_command_line_command_string_set(efl_added, cmd),
5541 efl_exe_flags_set(efl_added, flags),
5542 efl_task_run(efl_added));
5707 if (disp) setenv("DISPLAY", disp, 1); 5543 if (disp) setenv("DISPLAY", disp, 1);
5708 if (env) setenv("WAYLAND_DISPLAY", env, 1); 5544 if (env) setenv("WAYLAND_DISPLAY", env, 1);
5709 else unsetenv("WAYLAND_DISPLAY"); 5545 else unsetenv("WAYLAND_DISPLAY");
@@ -5717,113 +5553,135 @@ comp_run(Evas_Object *obj, const char *cmd, Ecore_Exe_Flags flags)
5717 free(disp); 5553 free(disp);
5718 if (exe) 5554 if (exe)
5719 { 5555 {
5720 int32_t pid = ecore_exe_pid_get(exe); 5556 int32_t pid = efl_exe_pid_get(exe);
5721 eina_hash_add(c->exes, &pid, (void*)1); 5557 eina_hash_add(c->exes, &pid, (void*)1);
5558 efl_event_callback_add(exe, EFL_TASK_EVENT_EXIT, exe_event_del, c);
5722 } 5559 }
5723 return exe; 5560 return exe;
5724} 5561}
5725 5562
5726Ecore_Exe * 5563EOLIAN static Efl_Exe *
5727efl_wl_run(Evas_Object *obj, const char *cmd) 5564_efl_canvas_wl_run(Eo *obj, Comp *c, const char *cmd)
5728{ 5565{
5729 return comp_run(obj, cmd, ECORE_EXE_TERM_WITH_PARENT); 5566 return comp_run(obj, c, cmd, EFL_EXE_FLAGS_TERM_WITH_PARENT);
5730} 5567}
5731 5568
5732Ecore_Exe * 5569EOLIAN static Efl_Exe_Flags
5733efl_wl_flags_run(Evas_Object *obj, const char *cmd, Ecore_Exe_Flags flags) 5570_efl_canvas_wl_exec_flags_get(const Eo *obj, Comp *c)
5734{ 5571{
5735 return comp_run(obj, cmd, flags); 5572 return c->flags;
5736} 5573}
5737 5574
5738void 5575EOLIAN static void
5739efl_wl_pid_add(Evas_Object *obj, int32_t pid) 5576_efl_canvas_wl_exec_flags_set(Eo *obj, Comp *c, Efl_Exe_Flags flags)
5740{ 5577{
5741 Comp *c; 5578 c->flags = flags;
5579}
5742 5580
5743 if (!eina_streq(evas_object_type_get(obj), "comp")) abort(); 5581EOLIAN static void
5744 c = evas_object_smart_data_get(obj); 5582_efl_canvas_wl_allowed_pid_add(Eo *obj, Comp *c, int32_t pid)
5583{
5745 if (!c->exes) 5584 if (!c->exes)
5746 c->exes = eina_hash_int32_new(NULL); 5585 c->exes = eina_hash_int32_new(NULL);
5747 eina_hash_add(c->exes, &pid, (void*)1); 5586 eina_hash_add(c->exes, &pid, (void*)1);
5748} 5587}
5749 5588
5750void 5589EOLIAN static void
5751efl_wl_pid_del(Evas_Object *obj, int32_t pid) 5590_efl_canvas_wl_allowed_pid_del(Eo *obj, Comp *c, int32_t pid)
5752{ 5591{
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; 5592 if (!c->exes) return;
5758 eina_hash_del_by_key(c->exes, &pid); 5593 eina_hash_del_by_key(c->exes, &pid);
5759} 5594}
5760 5595
5761Eina_Bool 5596EOLIAN static Eo *
5762efl_wl_next(Evas_Object *obj) 5597_efl_canvas_wl_surface_next(Eo *obj, Comp *c)
5763{ 5598{
5764 Comp *c;
5765 Comp_Surface *cs; 5599 Comp_Surface *cs;
5766 5600
5767 if (!eina_streq(evas_object_type_get(obj), "comp")) abort(); 5601 if (c->surfaces_count < 2) return NULL;
5768 c = evas_object_smart_data_get(obj);
5769 if (c->surfaces_count < 2) return EINA_FALSE;
5770 EINA_INLIST_REVERSE_FOREACH(c->surfaces, cs) 5602 EINA_INLIST_REVERSE_FOREACH(c->surfaces, cs)
5771 { 5603 {
5772 if (cs->shell.activated) continue; 5604 if (cs->shell.activated) continue;
5773 if ((!cs->role) || (!cs->shell.surface) || cs->dead) continue; 5605 if ((!cs->role) || (!cs->shell.surface) || cs->dead) continue;
5774 cs->shell.activated = 1; 5606 cs->shell.activated = 1;
5775 shell_surface_send_configure(cs); 5607 shell_surface_send_configure(cs);
5776 return EINA_TRUE; 5608 return cs->obj;
5777 } 5609 }
5778 5610
5779 return EINA_FALSE; 5611 return NULL;
5780} 5612}
5781 5613
5782Eina_Bool 5614EOLIAN static Eo *
5783efl_wl_prev(Evas_Object *obj) 5615_efl_canvas_wl_surface_prev(Eo *obj, Comp *c)
5784{ 5616{
5785 Comp *c;
5786 Comp_Surface *cs; 5617 Comp_Surface *cs;
5787 5618
5788 if (!eina_streq(evas_object_type_get(obj), "comp")) abort(); 5619 if (c->surfaces_count < 2) return NULL;
5789 c = evas_object_smart_data_get(obj);
5790 if (c->surfaces_count < 2) return EINA_FALSE;
5791 EINA_INLIST_FOREACH(c->surfaces, cs) 5620 EINA_INLIST_FOREACH(c->surfaces, cs)
5792 { 5621 {
5793 if (cs->shell.activated) continue; 5622 if (cs->shell.activated) continue;
5794 if ((!cs->role) || (!cs->shell.surface) || cs->dead) continue; 5623 if ((!cs->role) || (!cs->shell.surface) || cs->dead) continue;
5795 cs->shell.activated = 1; 5624 cs->shell.activated = 1;
5796 shell_surface_send_configure(cs); 5625 shell_surface_send_configure(cs);
5797 return EINA_TRUE; 5626 return cs->obj;
5798 } 5627 }
5799 5628
5800 return EINA_FALSE; 5629 return NULL;
5801} 5630}
5802 5631
5803void 5632EOLIAN static Eo *
5804efl_wl_rotate(Evas_Object *obj, Efl_Wl_Rotation rot, Eina_Bool rtl) 5633_efl_canvas_wl_active_surface_get(const Eo *obj, Comp *c)
5634{
5635 if (c->active_surface && (!c->active_surface->dead))
5636 return c->active_surface->obj;
5637 return NULL;
5638}
5639
5640EOLIAN static Eina_Bool
5641_efl_canvas_wl_active_surface_set(Eo *obj, Comp *c, Eo *surface)
5642{
5643 Comp_Surface *cs = efl_data_scope_get(surface, EFL_CANVAS_WL_SURFACE_CLASS);
5644 EINA_SAFETY_ON_NULL_RETURN_VAL(cs, EINA_FALSE);
5645 if (cs->dead) return EINA_FALSE;
5646 if (c->active_surface == cs) return EINA_TRUE;
5647 /* can't activate a popup */
5648 if (cs->shell.popup) return EINA_FALSE;
5649 cs->shell.activated = 1;
5650 shell_surface_send_configure(cs);
5651 return EINA_TRUE;
5652}
5653
5654EOLIAN static void
5655_efl_canvas_wl_rotation_get(const Eo *obj EINA_UNUSED, Comp *c, Efl_Canvas_Wl_Rotation *rotation, Eina_Bool *rtl)
5656{
5657 if (rotation) *rotation = c->rotation;
5658 if (rtl) *rtl = c->rtl;
5659}
5660
5661EOLIAN static void
5662_efl_canvas_wl_rotation_set(Eo *obj EINA_UNUSED, Comp *c, Efl_Canvas_Wl_Rotation rot, Eina_Bool rtl)
5805{ 5663{
5806 Comp *c;
5807 Eina_List *l; 5664 Eina_List *l;
5808 struct wl_resource *res; 5665 struct wl_resource *res;
5809 5666
5810 if (!eina_streq(evas_object_type_get(obj), "comp")) abort();
5811 c = evas_object_smart_data_get(obj);
5812 c->rtl = !!rtl; 5667 c->rtl = !!rtl;
5813 c->rotation = rot; 5668 c->rotation = rot;
5814 EINA_LIST_FOREACH(c->output_resources, l, res) 5669 EINA_LIST_FOREACH(c->output_resources, l, res)
5815 output_resize(c, res); 5670 output_resize(c, res);
5816} 5671}
5817 5672
5818void 5673EOLIAN static double
5819efl_wl_scale_set(Evas_Object *obj, double scale) 5674_efl_canvas_wl_efl_gfx_entity_scale_get(const Eo *obj EINA_UNUSED, Comp *c)
5675{
5676 return c->scale;
5677}
5678
5679EOLIAN static void
5680_efl_canvas_wl_efl_gfx_entity_scale_set(Eo *obj EINA_UNUSED, Comp *c, double scale)
5820{ 5681{
5821 Comp *c;
5822 Eina_List *l; 5682 Eina_List *l;
5823 struct wl_resource *res; 5683 struct wl_resource *res;
5824 5684
5825 if (!eina_streq(evas_object_type_get(obj), "comp")) abort();
5826 c = evas_object_smart_data_get(obj);
5827 c->scale = scale; 5685 c->scale = scale;
5828 5686
5829 EINA_LIST_FOREACH(c->output_resources, l, res) 5687 EINA_LIST_FOREACH(c->output_resources, l, res)
@@ -5831,13 +5689,15 @@ efl_wl_scale_set(Evas_Object *obj, double scale)
5831 wl_output_send_scale(res, lround(c->scale)); 5689 wl_output_send_scale(res, lround(c->scale));
5832} 5690}
5833 5691
5834void 5692EOLIAN static Eina_Bool
5835efl_wl_aspect_set(Evas_Object *obj, Eina_Bool set) 5693_efl_canvas_wl_aspect_get(const Eo *obj EINA_UNUSED, Comp *c)
5836{ 5694{
5837 Comp *c; 5695 return c->aspect;
5696}
5838 5697
5839 if (!eina_streq(evas_object_type_get(obj), "comp")) abort(); 5698EOLIAN static void
5840 c = evas_object_smart_data_get(obj); 5699_efl_canvas_wl_aspect_set(Eo *obj, Comp *c, Eina_Bool set)
5700{
5841 if (c->aspect == (!!set)) return; 5701 if (c->aspect == (!!set)) return;
5842 c->aspect = !!set; 5702 c->aspect = !!set;
5843 if (c->aspect) 5703 if (c->aspect)
@@ -5846,13 +5706,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); 5706 evas_object_size_hint_aspect_set(obj, EVAS_ASPECT_CONTROL_NONE, 0, 0);
5847} 5707}
5848 5708
5849void 5709EOLIAN static Eina_Bool
5850efl_wl_minmax_set(Evas_Object *obj, Eina_Bool set) 5710_efl_canvas_wl_minmax_get(const Eo *obj EINA_UNUSED, Comp *c)
5851{ 5711{
5852 Comp *c; 5712 return c->minmax;
5713}
5853 5714
5854 if (!eina_streq(evas_object_type_get(obj), "comp")) abort(); 5715EOLIAN static void
5855 c = evas_object_smart_data_get(obj); 5716_efl_canvas_wl_minmax_set(Eo *obj, Comp *c, Eina_Bool set)
5717{
5856 if (c->minmax == (!!set)) return; 5718 if (c->minmax == (!!set)) return;
5857 c->minmax = !!set; 5719 c->minmax = !!set;
5858 if (c->minmax) 5720 if (c->minmax)
@@ -5864,19 +5726,15 @@ efl_wl_minmax_set(Evas_Object *obj, Eina_Bool set)
5864 } 5726 }
5865} 5727}
5866 5728
5867void * 5729EOLIAN static Efl_Canvas_Wl_Wl_Global *
5868efl_wl_global_add(Evas_Object *obj, const void *interface, uint32_t version, void *data, void *bind_cb) 5730_efl_canvas_wl_global_add(Eo *obj, Comp *c, const Efl_Canvas_Wl_Wl_Interface *interface, uint32_t version, Efl_Canvas_Wl_Wl_Interface_Data *data, Efl_Canvas_Wl_Wl_Interface_Bind_Cb *bind_cb)
5869{ 5731{
5870 Comp *c;
5871
5872 if (!eina_streq(evas_object_type_get(obj), "comp")) abort();
5873 EINA_SAFETY_ON_NULL_RETURN_VAL(interface, NULL); 5732 EINA_SAFETY_ON_NULL_RETURN_VAL(interface, NULL);
5874 c = evas_object_smart_data_get(obj); 5733 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} 5734}
5877 5735
5878static void 5736static void
5879extracted_focus(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) 5737extracted_focus(void *data, Evas *e EINA_UNUSED, Eo *obj EINA_UNUSED, void *event_info EINA_UNUSED)
5880{ 5738{
5881 Comp_Surface *cs = data; 5739 Comp_Surface *cs = data;
5882 5740
@@ -5890,10 +5748,10 @@ extracted_focus(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, v
5890} 5748}
5891 5749
5892static void 5750static void
5893extracted_unfocus(void *data, Evas *e EINA_UNUSED, Evas_Object *obj, void *event_info EINA_UNUSED) 5751extracted_unfocus(void *data, Evas *e EINA_UNUSED, Eo *obj, void *event_info EINA_UNUSED)
5894{ 5752{
5895 Comp_Surface *cs = data; 5753 Comp_Surface *cs = data;
5896 Evas_Object *focus; 5754 Eo *focus;
5897 5755
5898 if (cs->dead) return; 5756 if (cs->dead) return;
5899 focus = evas_focus_get(cs->c->evas); 5757 focus = evas_focus_get(cs->c->evas);
@@ -5903,7 +5761,7 @@ extracted_unfocus(void *data, Evas *e EINA_UNUSED, Evas_Object *obj, void *event
5903} 5761}
5904 5762
5905static void 5763static void
5906extracted_changed(void *data, Evas *e EINA_UNUSED, Evas_Object *obj, void *event_info EINA_UNUSED) 5764extracted_changed(void *data, Evas *e EINA_UNUSED, Eo *obj, void *event_info EINA_UNUSED)
5907{ 5765{
5908 Comp_Surface *cs = data; 5766 Comp_Surface *cs = data;
5909 5767
@@ -5911,24 +5769,18 @@ extracted_changed(void *data, Evas *e EINA_UNUSED, Evas_Object *obj, void *event
5911 shell_surface_send_configure(data); 5769 shell_surface_send_configure(data);
5912} 5770}
5913 5771
5914int32_t 5772static EOLIAN int32_t
5915efl_wl_surface_pid_get(Evas_Object *surface) 5773_efl_canvas_wl_surface_pid_get(const Eo *surface, Comp_Surface *cs)
5916{ 5774{
5917 Comp_Surface *cs;
5918 int32_t pid; 5775 int32_t pid;
5919 if (!eina_streq(evas_object_type_get(surface), "comp_surface")) abort();
5920 cs = evas_object_smart_data_get(surface);
5921 EINA_SAFETY_ON_TRUE_RETURN_VAL(cs->dead, -1); 5776 EINA_SAFETY_ON_TRUE_RETURN_VAL(cs->dead, -1);
5922 wl_client_get_credentials(wl_resource_get_client(cs->res), &pid, NULL, NULL); 5777 wl_client_get_credentials(wl_resource_get_client(cs->res), &pid, NULL, NULL);
5923 return pid; 5778 return pid;
5924} 5779}
5925 5780
5926Eina_Bool 5781static EOLIAN Eina_Bool
5927efl_wl_surface_extract(Evas_Object *surface) 5782_efl_canvas_wl_surface_extract(Eo *surface, Comp_Surface *cs)
5928{ 5783{
5929 Comp_Surface *cs;
5930 if (!eina_streq(evas_object_type_get(surface), "comp_surface")) abort();
5931 cs = evas_object_smart_data_get(surface);
5932 EINA_SAFETY_ON_TRUE_RETURN_VAL(cs->extracted, EINA_FALSE); 5784 EINA_SAFETY_ON_TRUE_RETURN_VAL(cs->extracted, EINA_FALSE);
5933 EINA_SAFETY_ON_TRUE_RETURN_VAL(cs->dead, EINA_FALSE); 5785 EINA_SAFETY_ON_TRUE_RETURN_VAL(cs->dead, EINA_FALSE);
5934 cs->extracted = 1; 5786 cs->extracted = 1;
@@ -5940,8 +5792,8 @@ efl_wl_surface_extract(Evas_Object *surface)
5940 return EINA_TRUE; 5792 return EINA_TRUE;
5941} 5793}
5942 5794
5943Evas_Object * 5795Eo *
5944efl_wl_extracted_surface_object_find(void *surface_resource) 5796efl_canvas_wl_extracted_surface_object_find(void *surface_resource)
5945{ 5797{
5946 Comp_Surface *cs = wl_resource_get_user_data(surface_resource); 5798 Comp_Surface *cs = wl_resource_get_user_data(surface_resource);
5947 5799
@@ -5952,45 +5804,39 @@ efl_wl_extracted_surface_object_find(void *surface_resource)
5952 return cs->obj; 5804 return cs->obj;
5953} 5805}
5954 5806
5955Evas_Object * 5807static EOLIAN Eo *
5956efl_wl_extracted_surface_extracted_parent_get(Evas_Object *surface) 5808_efl_canvas_wl_surface_parent_surface_get(const Eo *surface, Comp_Surface *cs)
5957{ 5809{
5958 Comp_Surface *cs;
5959
5960 EINA_SAFETY_ON_NULL_RETURN_VAL(surface, NULL);
5961 if (!eina_streq(evas_object_type_get(surface), "comp_surface")) abort();
5962
5963 cs = evas_object_smart_data_get(surface);
5964 EINA_SAFETY_ON_TRUE_RETURN_VAL(!cs->extracted, NULL);
5965 EINA_SAFETY_ON_TRUE_RETURN_VAL(cs->dead, NULL); 5810 EINA_SAFETY_ON_TRUE_RETURN_VAL(cs->dead, NULL);
5966 5811
5967 if (cs->parent) 5812 if (cs->parent && cs->role) return cs->parent->obj;
5968 {
5969 if (!cs->parent->extracted) return NULL;
5970 return cs->parent->obj;
5971 }
5972 return NULL; 5813 return NULL;
5973} 5814}
5974 5815
5975void 5816static EOLIAN Eina_Bool
5976efl_wl_seat_keymap_set(Evas_Object *obj, Eo *seat, void *state, char *str, void *key_array) 5817_efl_canvas_wl_surface_extracted_get(const Eo *surface EINA_UNUSED, Comp_Surface *cs)
5818{
5819 EINA_SAFETY_ON_TRUE_RETURN_VAL(cs->dead, EINA_FALSE);
5820
5821 return cs->extracted;
5822}
5823
5824static EOLIAN void
5825_efl_canvas_wl_seat_keymap_set(Eo *obj, Comp *c, Eo *seat, Efl_Canvas_Wl_Xkb_State *state, const char *str, Efl_Canvas_Wl_Wl_Array *key_array)
5977{ 5826{
5978 Comp *c;
5979 Comp_Seat *s; 5827 Comp_Seat *s;
5980 5828
5981 if (!eina_streq(evas_object_type_get(obj), "comp")) abort();
5982 c = evas_object_smart_data_get(obj);
5983 EINA_INLIST_FOREACH(c->seats, s) 5829 EINA_INLIST_FOREACH(c->seats, s)
5984 { 5830 {
5985 if (!seat) efl_wl_seat_keymap_set(obj, s->dev, state, str, key_array); 5831 if (!seat) efl_canvas_wl_seat_keymap_set(obj, s->dev, state, str, key_array);
5986 else if (s->dev == seat) break; 5832 else if (s->dev == seat) break;
5987 } 5833 }
5988 if (!seat) return; 5834 if (!seat) return;
5989 EINA_SAFETY_ON_NULL_RETURN(s); 5835 EINA_SAFETY_ON_NULL_RETURN(s);
5990 seat_kbd_destroy(s); 5836 seat_kbd_destroy(s);
5991 s->kbd.external = 1; 5837 s->kbd.external = 1;
5992 s->kbd.keys_external = key_array; 5838 s->kbd.keys_external = (void*)key_array;
5993 s->kbd.state = state; 5839 s->kbd.state = (void*)state;
5994 s->kbd.keymap_str = str; 5840 s->kbd.keymap_str = str;
5995 if (str) 5841 if (str)
5996 s->kbd.keymap_str_size = strlen(str) + 1; 5842 s->kbd.keymap_str_size = strlen(str) + 1;
@@ -6002,17 +5848,14 @@ efl_wl_seat_keymap_set(Evas_Object *obj, Eo *seat, void *state, char *str, void
6002 seat_kbd_external_init(s); 5848 seat_kbd_external_init(s);
6003} 5849}
6004 5850
6005void 5851static EOLIAN void
6006efl_wl_seat_key_repeat_set(Evas_Object *obj, Eo *seat, int repeat_rate, int repeat_delay) 5852_efl_canvas_wl_seat_key_repeat_set(Eo *obj, Comp *c, Eo *seat, int repeat_rate, int repeat_delay)
6007{ 5853{
6008 Comp *c;
6009 Comp_Seat *s; 5854 Comp_Seat *s;
6010 5855
6011 if (!eina_streq(evas_object_type_get(obj), "comp")) abort();
6012 c = evas_object_smart_data_get(obj);
6013 EINA_INLIST_FOREACH(c->seats, s) 5856 EINA_INLIST_FOREACH(c->seats, s)
6014 { 5857 {
6015 if (!seat) efl_wl_seat_key_repeat_set(obj, s->dev, repeat_rate, repeat_delay); 5858 if (!seat) efl_canvas_wl_seat_key_repeat_set(obj, s->dev, repeat_rate, repeat_delay);
6016 else if (s->dev == seat) break; 5859 else if (s->dev == seat) break;
6017 } 5860 }
6018 if (!seat) return; 5861 if (!seat) return;
@@ -6021,3 +5864,12 @@ efl_wl_seat_key_repeat_set(Evas_Object *obj, Eo *seat, int repeat_rate, int repe
6021 s->kbd.repeat_delay = repeat_delay; 5864 s->kbd.repeat_delay = repeat_delay;
6022 seat_kbd_repeat_rate_send(s); 5865 seat_kbd_repeat_rate_send(s);
6023} 5866}
5867
5868#define EFL_CANVAS_WL_EXTRA_OPS \
5869 EFL_CANVAS_GROUP_ADD_DEL_OPS(efl_canvas_wl), \
5870
5871#define EFL_CANVAS_WL_SURFACE_EXTRA_OPS \
5872 EFL_CANVAS_GROUP_ADD_DEL_OPS(efl_canvas_wl_surface), \
5873
5874#include "efl_canvas_wl.eo.c"
5875#include "efl_canvas_wl_surface.eo.c"
diff --git a/src/lib/efl_canvas_wl/efl_canvas_wl.eo b/src/lib/efl_canvas_wl/efl_canvas_wl.eo
new file mode 100644
index 0000000000..9924ce9a1f
--- /dev/null
+++ b/src/lib/efl_canvas_wl/efl_canvas_wl.eo
@@ -0,0 +1,123 @@
1import efl_exe;
2import efl_input_device;
3import efl_canvas_wl_surface;
4
5struct @beta @extern Efl.Canvas.Wl_Wl_Surface; [[ struct wl_surface. @since 1.24 ]]
6struct @beta @extern Efl.Canvas.Wl_Wl_Global; [[ struct wl_global. @since 1.24 ]]
7struct @beta @extern Efl.Canvas.Wl_Wl_Interface; [[ A libwayland callback interface struct. @since 1.24 ]]
8struct @beta @extern Efl.Canvas.Wl_Wl_Interface_Data; [[ A data pointer to send with the bind callback. @since 1.24 ]]
9struct @beta @extern Efl.Canvas.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 ]]
10struct @beta @extern Efl.Canvas.Wl_Xkb_State; [[ struct xkb_state. @since 1.24 ]]
11struct @beta @extern Efl.Canvas.Wl_Wl_Array; [[ struct wl_array. @since 1.24 ]]
12
13
14enum @beta Efl.Canvas.Wl.Rotation
15{
16 [[Orientation of the internal compositor object in degrees. These values are COUNTER-CLOCKWISE.
17 ]]
18 rotate_0 = 0,
19 rotate_90 = 1,
20 rotate_180 = 2,
21 rotate_270 = 3
22}
23
24class @beta Efl.Canvas.Wl extends Efl.Canvas.Group
25{
26 [[
27 @since 1.24
28 ]]
29 data: Comp;
30 methods {
31 run {
32 [[This runs a command in the compositor using the @Efl.Exe_Flags.term_with_parent flag.
33 ]]
34 params {
35 cmd: string;
36 }
37 return: Efl.Exe;
38 }
39 @property exec_flags {
40 values {
41 flags: Efl.Exe_Flags;
42 }
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: Efl.Canvas.Wl.Surface;
56 }
57 surface_prev {
58 return: Efl.Canvas.Wl.Surface;
59 }
60 @property active_surface {
61 get {}
62 set {
63 return: bool;
64 }
65 values {
66 surface: Efl.Canvas.Wl.Surface;
67 }
68 }
69 @property aspect {
70 values {
71 set: bool;
72 }
73 }
74 @property minmax {
75 values {
76 set: bool;
77 }
78 }
79 @property rotation {
80 values {
81 rotation: Efl.Canvas.Wl.Rotation;
82 rtl: bool;
83 }
84 }
85 global_add {
86 params {
87 interface: const(Efl.Canvas.Wl_Wl_Interface) @by_ref;
88 version: uint;
89 data: Efl.Canvas.Wl_Wl_Interface_Data @by_ref;
90 bind_cb: Efl.Canvas.Wl_Wl_Interface_Bind_Cb @by_ref;
91 }
92 return: Efl.Canvas.Wl_Wl_Global @by_ref;
93 }
94 seat_keymap_set {
95 params {
96 seat: Efl.Input.Device;
97 state: Efl.Canvas.Wl_Xkb_State @by_ref;
98 keymap_str: string;
99 key_array: Efl.Canvas.Wl_Wl_Array @by_ref;
100 }
101 }
102 seat_key_repeat_set {
103 params {
104 seat: Efl.Input.Device;
105 repeat_rate: int;
106 repeat_delay: int;
107 }
108 }
109 }
110 implements {
111 Efl.Object.constructor;
112 Efl.Gfx.Entity.visible { set; }
113 Efl.Gfx.Entity.size { set; }
114 Efl.Gfx.Entity.position { set; }
115 Efl.Gfx.Entity.scale { get; set; }
116 }
117 events {
118 toplevel,added: Efl.Canvas.Wl.Surface; [[]]
119 child,added: Efl.Canvas.Wl.Surface; [[]]
120 popup,added: Efl.Canvas.Wl.Surface; [[]]
121 seat,added: Efl.Input.Device; [[The seat object added.]]
122 }
123}
diff --git a/src/lib/efl_canvas_wl/efl_canvas_wl_surface.eo b/src/lib/efl_canvas_wl/efl_canvas_wl_surface.eo
new file mode 100644
index 0000000000..f2a351becc
--- /dev/null
+++ b/src/lib/efl_canvas_wl/efl_canvas_wl_surface.eo
@@ -0,0 +1,34 @@
1class @beta Efl.Canvas.Wl.Surface extends Efl.Canvas.Group
2{
3 [[@since 1.24]]
4 data: Comp_Surface;
5 methods {
6 extract {
7 return: bool;
8 }
9 @property pid {
10 get {}
11 values {
12 pid: int;
13 }
14 }
15 @property parent_surface {
16 get {}
17 values {
18 parent: Efl.Canvas.Wl.Surface;
19 }
20 }
21 @property extracted {
22 get {}
23 values {
24 extracted: bool;
25 }
26 }
27 }