summaryrefslogtreecommitdiff
path: root/src/tests/eo/function_overrides
diff options
context:
space:
mode:
authorTom Hacohen <tom@stosb.com>2016-08-15 14:44:41 +0100
committerTom Hacohen <tom@stosb.com>2016-08-15 15:07:42 +0100
commite65aae994e72c1d3f8ac6b5360d3772f177b77ef (patch)
tree7ecaf136e45470635889191aded2b47057720a98 /src/tests/eo/function_overrides
parent35abb3c34d10a4826c98055fb85ecf93915e5ea8 (diff)
Eo: Finish the renaming of Eo to the EFL.
This renames all the rest of the API to the EFL namespace except for Eo_Event that will follow soon. Obviously breaks both API and ABI.
Diffstat (limited to 'src/tests/eo/function_overrides')
-rw-r--r--src/tests/eo/function_overrides/function_overrides_inherit.c6
-rw-r--r--src/tests/eo/function_overrides/function_overrides_inherit2.c32
-rw-r--r--src/tests/eo/function_overrides/function_overrides_inherit3.c12
-rw-r--r--src/tests/eo/function_overrides/function_overrides_main.c28
-rw-r--r--src/tests/eo/function_overrides/function_overrides_simple.c34
5 files changed, 56 insertions, 56 deletions
diff --git a/src/tests/eo/function_overrides/function_overrides_inherit.c b/src/tests/eo/function_overrides/function_overrides_inherit.c
index 845515128c..a473a89f3e 100644
--- a/src/tests/eo/function_overrides/function_overrides_inherit.c
+++ b/src/tests/eo/function_overrides/function_overrides_inherit.c
@@ -11,12 +11,12 @@
11static const Efl_Class_Description class_desc = { 11static const Efl_Class_Description class_desc = {
12 EO_VERSION, 12 EO_VERSION,
13 "Inherit", 13 "Inherit",
14 EO_CLASS_TYPE_REGULAR, 14 EFL_CLASS_TYPE_REGULAR,
15 EO_CLASS_DESCRIPTION_NOOPS(), 15 EFL_CLASS_DESCRIPTION_NOOPS(),
16 NULL, 16 NULL,
17 0, 17 0,
18 NULL, 18 NULL,
19 NULL 19 NULL
20}; 20};
21 21
22EO_DEFINE_CLASS(inherit_class_get, &class_desc, SIMPLE_CLASS, NULL); 22EFL_DEFINE_CLASS(inherit_class_get, &class_desc, SIMPLE_CLASS, NULL);
diff --git a/src/tests/eo/function_overrides/function_overrides_inherit2.c b/src/tests/eo/function_overrides/function_overrides_inherit2.c
index 26e92e5212..7bae304b4c 100644
--- a/src/tests/eo/function_overrides/function_overrides_inherit2.c
+++ b/src/tests/eo/function_overrides/function_overrides_inherit2.c
@@ -14,12 +14,12 @@
14static void 14static void
15_a_set(Eo *obj, void *class_data EINA_UNUSED, int a) 15_a_set(Eo *obj, void *class_data EINA_UNUSED, int a)
16{ 16{
17 printf("%s %d\n", eo_class_name_get(MY_CLASS), a); 17 printf("%s %d\n", efl_class_name_get(MY_CLASS), a);
18 simple_a_print(obj); 18 simple_a_print(obj);
19 simple_a_set(eo_super(obj, MY_CLASS), a + 1); 19 simple_a_set(efl_super(obj, MY_CLASS), a + 1);
20 20
21 Eina_Bool called = EINA_FALSE; 21 Eina_Bool called = EINA_FALSE;
22 called = simple_a_print(eo_super(obj, MY_CLASS)); 22 called = simple_a_print(efl_super(obj, MY_CLASS));
23 fail_if(!called); 23 fail_if(!called);
24} 24}
25 25
@@ -28,7 +28,7 @@ _print(Eo *obj, void *class_data EINA_UNUSED)
28{ 28{
29 Eina_Bool called = EINA_FALSE; 29 Eina_Bool called = EINA_FALSE;
30 printf("Hey\n"); 30 printf("Hey\n");
31 called = inherit2_print(eo_super(obj, MY_CLASS)); 31 called = inherit2_print(efl_super(obj, MY_CLASS));
32 fail_if(called); 32 fail_if(called);
33 33
34 return EINA_TRUE; 34 return EINA_TRUE;
@@ -46,36 +46,36 @@ static Eina_Bool
46_class_print(Efl_Class *klass, void *data EINA_UNUSED) 46_class_print(Efl_Class *klass, void *data EINA_UNUSED)
47{ 47{
48 Eina_Bool called = EINA_FALSE; 48 Eina_Bool called = EINA_FALSE;
49 printf("Print %s-%s\n", eo_class_name_get(klass), eo_class_name_get(MY_CLASS)); 49 printf("Print %s-%s\n", efl_class_name_get(klass), efl_class_name_get(MY_CLASS));
50 called = simple_class_print(eo_super(klass, MY_CLASS)); 50 called = simple_class_print(efl_super(klass, MY_CLASS));
51 fail_if(!called); 51 fail_if(!called);
52 52
53 called = simple_class_print2(eo_super(klass, MY_CLASS)); 53 called = simple_class_print2(efl_super(klass, MY_CLASS));
54 fail_if(!called); 54 fail_if(!called);
55 55
56 return EINA_TRUE; 56 return EINA_TRUE;
57} 57}
58 58
59EAPI EO_FUNC_BODY(inherit2_print, Eina_Bool, EINA_FALSE); 59EAPI EFL_FUNC_BODY(inherit2_print, Eina_Bool, EINA_FALSE);
60EAPI EO_FUNC_BODY(inherit2_print2, Eina_Bool, EINA_FALSE); 60EAPI EFL_FUNC_BODY(inherit2_print2, Eina_Bool, EINA_FALSE);
61 61
62static Efl_Op_Description op_descs[] = { 62static Efl_Op_Description op_descs[] = {
63 EO_OP_FUNC(inherit2_print, _print), 63 EFL_OBJECT_OP_FUNC(inherit2_print, _print),
64 EO_OP_FUNC(inherit2_print2, _print2), 64 EFL_OBJECT_OP_FUNC(inherit2_print2, _print2),
65 EO_OP_CLASS_FUNC_OVERRIDE(simple_class_print, _class_print), 65 EFL_OBJECT_OP_CLASS_FUNC_OVERRIDE(simple_class_print, _class_print),
66 EO_OP_FUNC_OVERRIDE(simple_a_set, _a_set), 66 EFL_OBJECT_OP_FUNC_OVERRIDE(simple_a_set, _a_set),
67}; 67};
68 68
69static const Efl_Class_Description class_desc = { 69static const Efl_Class_Description class_desc = {
70 EO_VERSION, 70 EO_VERSION,
71 "Inherit2", 71 "Inherit2",
72 EO_CLASS_TYPE_REGULAR, 72 EFL_CLASS_TYPE_REGULAR,
73 EO_CLASS_DESCRIPTION_OPS(op_descs), 73 EFL_CLASS_DESCRIPTION_OPS(op_descs),
74 NULL, 74 NULL,
75 0, 75 0,
76 NULL, 76 NULL,
77 NULL 77 NULL
78}; 78};
79 79
80EO_DEFINE_CLASS(inherit2_class_get, &class_desc, INHERIT_CLASS, NULL); 80EFL_DEFINE_CLASS(inherit2_class_get, &class_desc, INHERIT_CLASS, NULL);
81 81
diff --git a/src/tests/eo/function_overrides/function_overrides_inherit3.c b/src/tests/eo/function_overrides/function_overrides_inherit3.c
index 3f09b19e78..2a66926f2d 100644
--- a/src/tests/eo/function_overrides/function_overrides_inherit3.c
+++ b/src/tests/eo/function_overrides/function_overrides_inherit3.c
@@ -12,24 +12,24 @@
12static void 12static void
13_a_set(Eo *obj, void *class_data EINA_UNUSED, int a) 13_a_set(Eo *obj, void *class_data EINA_UNUSED, int a)
14{ 14{
15 printf("%s %d\n", eo_class_name_get(MY_CLASS), a); 15 printf("%s %d\n", efl_class_name_get(MY_CLASS), a);
16 simple_a_set(eo_super(obj, MY_CLASS), a + 1); 16 simple_a_set(efl_super(obj, MY_CLASS), a + 1);
17} 17}
18 18
19static Efl_Op_Description op_descs[] = { 19static Efl_Op_Description op_descs[] = {
20 EO_OP_FUNC_OVERRIDE(simple_a_set, _a_set), 20 EFL_OBJECT_OP_FUNC_OVERRIDE(simple_a_set, _a_set),
21}; 21};
22 22
23static const Efl_Class_Description class_desc = { 23static const Efl_Class_Description class_desc = {
24 EO_VERSION, 24 EO_VERSION,
25 "Inherit3", 25 "Inherit3",
26 EO_CLASS_TYPE_REGULAR, 26 EFL_CLASS_TYPE_REGULAR,
27 EO_CLASS_DESCRIPTION_OPS(op_descs), 27 EFL_CLASS_DESCRIPTION_OPS(op_descs),
28 NULL, 28 NULL,
29 0, 29 0,
30 NULL, 30 NULL,
31 NULL 31 NULL
32}; 32};
33 33
34EO_DEFINE_CLASS(inherit3_class_get, &class_desc, INHERIT2_CLASS, NULL); 34EFL_DEFINE_CLASS(inherit3_class_get, &class_desc, INHERIT2_CLASS, NULL);
35 35
diff --git a/src/tests/eo/function_overrides/function_overrides_main.c b/src/tests/eo/function_overrides/function_overrides_main.c
index d5fc195d23..091af5ebe1 100644
--- a/src/tests/eo/function_overrides/function_overrides_main.c
+++ b/src/tests/eo/function_overrides/function_overrides_main.c
@@ -15,34 +15,34 @@ main(int argc, char *argv[])
15{ 15{
16 (void) argc; 16 (void) argc;
17 (void) argv; 17 (void) argv;
18 eo_init(); 18 efl_object_init();
19 19
20 Eina_Bool called = EINA_FALSE; 20 Eina_Bool called = EINA_FALSE;
21 Eo *obj = eo_add(INHERIT2_CLASS, NULL); 21 Eo *obj = efl_add(INHERIT2_CLASS, NULL);
22 22
23 simple_a_set(obj, 1); 23 simple_a_set(obj, 1);
24 Simple_Public_Data *pd = eo_data_scope_get(obj, SIMPLE_CLASS); 24 Simple_Public_Data *pd = efl_data_scope_get(obj, SIMPLE_CLASS);
25 fail_if(pd->a != 2); 25 fail_if(pd->a != 2);
26 26
27 eo_unref(obj); 27 efl_unref(obj);
28 28
29 obj = eo_add(INHERIT3_CLASS, NULL); 29 obj = efl_add(INHERIT3_CLASS, NULL);
30 30
31 simple_a_set(obj, 1); 31 simple_a_set(obj, 1);
32 pd = eo_data_scope_get(obj, SIMPLE_CLASS); 32 pd = efl_data_scope_get(obj, SIMPLE_CLASS);
33 fail_if(pd->a != 3); 33 fail_if(pd->a != 3);
34 34
35 eo_unref(obj); 35 efl_unref(obj);
36 36
37 obj = eo_add(INHERIT2_CLASS, NULL); 37 obj = efl_add(INHERIT2_CLASS, NULL);
38 called = inherit2_print(obj); 38 called = inherit2_print(obj);
39 fail_if(!called); 39 fail_if(!called);
40 called = inherit2_print(obj); 40 called = inherit2_print(obj);
41 called = inherit2_print(obj); 41 called = inherit2_print(obj);
42 fail_if(!called); 42 fail_if(!called);
43 eo_unref(obj); 43 efl_unref(obj);
44 44
45 obj = eo_add(SIMPLE_CLASS, NULL); 45 obj = efl_add(SIMPLE_CLASS, NULL);
46 called = inherit2_print(obj); 46 called = inherit2_print(obj);
47 fail_if(called); 47 fail_if(called);
48 48
@@ -68,12 +68,12 @@ main(int argc, char *argv[])
68 fail_if(called); 68 fail_if(called);
69#endif 69#endif
70 70
71 efl_constructor(eo_super(obj, SIMPLE_CLASS)); 71 efl_constructor(efl_super(obj, SIMPLE_CLASS));
72 efl_destructor(eo_super(obj, SIMPLE_CLASS)); 72 efl_destructor(efl_super(obj, SIMPLE_CLASS));
73 73
74 eo_unref(obj); 74 efl_unref(obj);
75 75
76 eo_shutdown(); 76 efl_object_shutdown();
77 return 0; 77 return 0;
78} 78}
79 79
diff --git a/src/tests/eo/function_overrides/function_overrides_simple.c b/src/tests/eo/function_overrides/function_overrides_simple.c
index dbdd935a10..45d19d2838 100644
--- a/src/tests/eo/function_overrides/function_overrides_simple.c
+++ b/src/tests/eo/function_overrides/function_overrides_simple.c
@@ -16,7 +16,7 @@ static void
16_a_set(Eo *obj EINA_UNUSED, void *class_data, int a) 16_a_set(Eo *obj EINA_UNUSED, void *class_data, int a)
17{ 17{
18 Simple_Public_Data *pd = class_data; 18 Simple_Public_Data *pd = class_data;
19 printf("%s %d\n", eo_class_name_get(MY_CLASS), a); 19 printf("%s %d\n", efl_class_name_get(MY_CLASS), a);
20 pd->a = a; 20 pd->a = a;
21} 21}
22 22
@@ -24,7 +24,7 @@ static Eina_Bool
24_a_print(Eo *obj EINA_UNUSED, void *class_data) 24_a_print(Eo *obj EINA_UNUSED, void *class_data)
25{ 25{
26 Simple_Public_Data *pd = class_data; 26 Simple_Public_Data *pd = class_data;
27 printf("Print %s %d\n", eo_class_name_get(MY_CLASS), pd->a); 27 printf("Print %s %d\n", efl_class_name_get(MY_CLASS), pd->a);
28 28
29 return EINA_TRUE; 29 return EINA_TRUE;
30} 30}
@@ -32,12 +32,12 @@ _a_print(Eo *obj EINA_UNUSED, void *class_data)
32static Eina_Bool 32static Eina_Bool
33_class_print(Efl_Class *klass, void *class_data EINA_UNUSED) 33_class_print(Efl_Class *klass, void *class_data EINA_UNUSED)
34{ 34{
35 printf("Print %s-%s\n", eo_class_name_get(klass), eo_class_name_get(MY_CLASS)); 35 printf("Print %s-%s\n", efl_class_name_get(klass), efl_class_name_get(MY_CLASS));
36 Eina_Bool called = EINA_FALSE; 36 Eina_Bool called = EINA_FALSE;
37 called = simple_class_print(eo_super(klass, MY_CLASS)); 37 called = simple_class_print(efl_super(klass, MY_CLASS));
38 fail_if(called); 38 fail_if(called);
39 39
40 called = simple_class_print2(eo_super(klass, MY_CLASS)); 40 called = simple_class_print2(efl_super(klass, MY_CLASS));
41 fail_if(called); 41 fail_if(called);
42 42
43 return EINA_TRUE; 43 return EINA_TRUE;
@@ -46,33 +46,33 @@ _class_print(Efl_Class *klass, void *class_data EINA_UNUSED)
46static Eina_Bool 46static Eina_Bool
47_class_print2(Efl_Class *klass, void *class_data EINA_UNUSED) 47_class_print2(Efl_Class *klass, void *class_data EINA_UNUSED)
48{ 48{
49 printf("Print %s-%s\n", eo_class_name_get(klass), eo_class_name_get(MY_CLASS)); 49 printf("Print %s-%s\n", efl_class_name_get(klass), efl_class_name_get(MY_CLASS));
50 50
51 return EINA_TRUE; 51 return EINA_TRUE;
52} 52}
53 53
54EAPI EO_VOID_FUNC_BODYV(simple_a_set, EO_FUNC_CALL(a), int a); 54EAPI EFL_VOID_FUNC_BODYV(simple_a_set, EFL_FUNC_CALL(a), int a);
55EAPI EO_FUNC_BODY(simple_a_print, Eina_Bool, EINA_FALSE); 55EAPI EFL_FUNC_BODY(simple_a_print, Eina_Bool, EINA_FALSE);
56EAPI EO_FUNC_BODY_CONST(simple_class_print, Eina_Bool, EINA_FALSE); 56EAPI EFL_FUNC_BODY_CONST(simple_class_print, Eina_Bool, EINA_FALSE);
57EAPI EO_FUNC_BODY_CONST(simple_class_print2, Eina_Bool, EINA_FALSE); 57EAPI EFL_FUNC_BODY_CONST(simple_class_print2, Eina_Bool, EINA_FALSE);
58 58
59static Efl_Op_Description op_descs[] = { 59static Efl_Op_Description op_descs[] = {
60 EO_OP_FUNC(simple_a_set, _a_set), 60 EFL_OBJECT_OP_FUNC(simple_a_set, _a_set),
61 EO_OP_FUNC(simple_a_print, _a_print), 61 EFL_OBJECT_OP_FUNC(simple_a_print, _a_print),
62 EO_OP_FUNC(simple_class_print, _class_print), 62 EFL_OBJECT_OP_FUNC(simple_class_print, _class_print),
63 EO_OP_FUNC(simple_class_print2, _class_print2), 63 EFL_OBJECT_OP_FUNC(simple_class_print2, _class_print2),
64}; 64};
65 65
66static const Efl_Class_Description class_desc = { 66static const Efl_Class_Description class_desc = {
67 EO_VERSION, 67 EO_VERSION,
68 "Simple", 68 "Simple",
69 EO_CLASS_TYPE_REGULAR, 69 EFL_CLASS_TYPE_REGULAR,
70 EO_CLASS_DESCRIPTION_OPS(op_descs), 70 EFL_CLASS_DESCRIPTION_OPS(op_descs),
71 NULL, 71 NULL,
72 sizeof(Simple_Public_Data), 72 sizeof(Simple_Public_Data),
73 NULL, 73 NULL,
74 NULL 74 NULL
75}; 75};
76 76
77EO_DEFINE_CLASS(simple_class_get, &class_desc, EO_CLASS, NULL); 77EFL_DEFINE_CLASS(simple_class_get, &class_desc, EO_CLASS, NULL);
78 78