summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukasz Stanislawski <l.stanislaws@samsung.com>2014-03-24 15:19:06 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2014-03-24 15:19:06 +0900
commit60343f93caf47a306748c4bfe000e8c995cb62d4 (patch)
tree64507a096d0cd2b8fc19005c0cddafaa057d4775
parent7f4444459b083221f3afa289cba2aab2b2dd4088 (diff)
atspi: move component interface implementation to separate file.
Summary: After eolian integration component interface declaration was moved to separate ".eo" file. However its implemetation was not. This patch adds new "elm_interface_atspi_compoment.c" with interface implementation. Reviewers: raster, seoz, JackDanielZ Reviewed By: JackDanielZ Differential Revision: https://phab.enlightenment.org/D648
-rw-r--r--src/lib/Makefile.am1
-rw-r--r--src/lib/elm_atspi_object.c49
-rw-r--r--src/lib/elm_interface_atspi_component.c60
3 files changed, 61 insertions, 49 deletions
diff --git a/src/lib/Makefile.am b/src/lib/Makefile.am
index 10ed4b729..923f1fcf6 100644
--- a/src/lib/Makefile.am
+++ b/src/lib/Makefile.am
@@ -449,6 +449,7 @@ elm_hover.c \
449elm_icon.c \ 449elm_icon.c \
450elm_image.c \ 450elm_image.c \
451elm_index.c \ 451elm_index.c \
452elm_interface_atspi_component.c \
452elm_interface_fileselector.c \ 453elm_interface_fileselector.c \
453elm_interface_scrollable.c \ 454elm_interface_scrollable.c \
454elm_inwin.c \ 455elm_inwin.c \
diff --git a/src/lib/elm_atspi_object.c b/src/lib/elm_atspi_object.c
index 6c90c7c62..75ca0670f 100644
--- a/src/lib/elm_atspi_object.c
+++ b/src/lib/elm_atspi_object.c
@@ -394,54 +394,6 @@ _elm_atspi_object_elm_interface_atspi_component_alpha_get(Eo *obj, void *_pd EIN
394 return (double)alpha / 255.0; 394 return (double)alpha / 255.0;
395} 395}
396 396
397// Component interface
398EOLIAN static void
399_elm_interface_atspi_component_position_get(Eo *obj EINA_UNUSED, void *_pd EINA_UNUSED,int *x, int *y, AtspiCoordType type)
400{
401 eo_do(obj, elm_interface_atspi_component_extents_get(x, y, NULL, NULL, type));
402}
403
404EOLIAN static Eina_Bool
405_elm_interface_atspi_component_position_set(Eo *obj EINA_UNUSED, void *_pd EINA_UNUSED, int x, int y, AtspiCoordType type)
406{
407 Eina_Bool ret = EINA_FALSE;
408 int c_w, c_h;
409
410 eo_do(obj, elm_interface_atspi_component_extents_get(NULL, NULL, &c_w, &c_h, type));
411 eo_do(obj, elm_interface_atspi_component_extents_set(x, y, c_w, c_h, type, &ret));
412 return ret;
413}
414
415EOLIAN static Eina_Bool
416_elm_interface_atspi_component_size_set(Eo *obj EINA_UNUSED, void *_pd EINA_UNUSED, int w, int h)
417{
418 Eina_Bool ret = EINA_FALSE;
419 int c_x, c_y;
420
421 eo_do(obj, elm_interface_atspi_component_extents_get(&c_x, &c_y, NULL, NULL, ATSPI_COORD_TYPE_WINDOW));
422 eo_do(obj, elm_interface_atspi_component_extents_set(c_x, c_y, w, h, ATSPI_COORD_TYPE_WINDOW, &ret));
423 return ret;
424}
425
426EOLIAN static void
427_elm_interface_atspi_component_size_get(Eo *obj EINA_UNUSED, void *_pd EINA_UNUSED, int *w, int *h)
428{
429 eo_do(obj, elm_interface_atspi_component_extents_get(NULL, NULL, w, h, ATSPI_COORD_TYPE_WINDOW));
430}
431
432EOLIAN static Eina_Bool
433_elm_interface_atspi_component_contains(Eo *obj EINA_UNUSED, void *_pd EINA_UNUSED,
434 int x, int y, AtspiCoordType type)
435{
436 int w_x, w_y, w_w, w_h;
437
438 if (!eo_do(obj, elm_interface_atspi_component_extents_get(&w_x, &w_y, &w_w, &w_h, type)))
439 return EINA_FALSE;
440
441 if ((x >= w_x) && (x <= w_x + w_w) && (y >= w_y) && (y <= w_y + w_h))
442 return EINA_TRUE;
443 return EINA_FALSE;
444}
445 397
446#include "elm_interface_atspi_window.eo.c" 398#include "elm_interface_atspi_window.eo.c"
447 399
@@ -867,5 +819,4 @@ void _elm_atspi_object_global_callback_del(Eo_Event_Cb cb)
867 } 819 }
868} 820}
869 821
870#include "elm_interface_atspi_component.eo.c"
871#include "elm_atspi_object.eo.c" 822#include "elm_atspi_object.eo.c"
diff --git a/src/lib/elm_interface_atspi_component.c b/src/lib/elm_interface_atspi_component.c
new file mode 100644
index 000000000..6c1f3512d
--- /dev/null
+++ b/src/lib/elm_interface_atspi_component.c
@@ -0,0 +1,60 @@
1#ifdef HAVE_CONFIG_H
2# include "elementary_config.h"
3#endif
4
5#include <Elementary.h>
6
7#include "elm_priv.h"
8#include "elm_interface_atspi_component.eo.h"
9
10#include "atspi/atspi-constants.h"
11
12EOLIAN static void
13_elm_interface_atspi_component_position_get(Eo *obj EINA_UNUSED, void *_pd EINA_UNUSED,int *x, int *y, AtspiCoordType type)
14{
15 eo_do(obj, elm_interface_atspi_component_extents_get(x, y, NULL, NULL, type));
16}
17
18EOLIAN static Eina_Bool
19_elm_interface_atspi_component_position_set(Eo *obj EINA_UNUSED, void *_pd EINA_UNUSED, int x, int y, AtspiCoordType type)
20{
21 Eina_Bool ret = EINA_FALSE;
22 int c_w, c_h;
23
24 eo_do(obj, elm_interface_atspi_component_extents_get(NULL, NULL, &c_w, &c_h, type));
25 eo_do(obj, elm_interface_atspi_component_extents_set(x, y, c_w, c_h, type, &ret));
26 return ret;
27}
28
29EOLIAN static Eina_Bool
30_elm_interface_atspi_component_size_set(Eo *obj EINA_UNUSED, void *_pd EINA_UNUSED, int w, int h)
31{
32 Eina_Bool ret = EINA_FALSE;
33 int c_x, c_y;
34
35 eo_do(obj, elm_interface_atspi_component_extents_get(&c_x, &c_y, NULL, NULL, ATSPI_COORD_TYPE_WINDOW));
36 eo_do(obj, elm_interface_atspi_component_extents_set(c_x, c_y, w, h, ATSPI_COORD_TYPE_WINDOW, &ret));
37 return ret;
38}
39
40EOLIAN static void
41_elm_interface_atspi_component_size_get(Eo *obj EINA_UNUSED, void *_pd EINA_UNUSED, int *w, int *h)
42{
43 eo_do(obj, elm_interface_atspi_component_extents_get(NULL, NULL, w, h, ATSPI_COORD_TYPE_WINDOW));
44}
45
46EOLIAN static Eina_Bool
47_elm_interface_atspi_component_contains(Eo *obj EINA_UNUSED, void *_pd EINA_UNUSED,
48 int x, int y, AtspiCoordType type)
49{
50 int w_x, w_y, w_w, w_h;
51
52 if (!eo_do(obj, elm_interface_atspi_component_extents_get(&w_x, &w_y, &w_w, &w_h, type)))
53 return EINA_FALSE;
54
55 if ((x >= w_x) && (x <= w_x + w_w) && (y >= w_y) && (y <= w_y + w_h))
56 return EINA_TRUE;
57 return EINA_FALSE;
58}
59
60#include "elm_interface_atspi_component.eo.c"