tizen 2.3 release
[framework/uifw/elementary.git] / src / modules / test_map_engine / mod.c
1 #include "Elementary.h"
2 #include <Eina.h>
3 #ifdef HAVE_CONFIG_H
4 # include "elementary_config.h"
5 #endif
6
7 static Evas_Object *view;
8
9 EAPI const char *
10 map_module_name_get(void)
11 {
12    return "Test Map Engine";
13 }
14
15 EAPI Evas_Object *
16 map_module_add(Evas_Object *parent __UNUSED__)
17 {
18    if (!view)
19      {
20         view = evas_object_rectangle_add(evas_object_evas_get(parent));
21         evas_object_color_set(view, 0, 50, 0, 50);
22         evas_object_repeat_events_set(view, EINA_TRUE);
23      }
24    evas_object_show(view);
25    return view;
26 }
27
28 EAPI void
29 map_module_del(Evas_Object *parent __UNUSED__)
30 {
31    if (view) evas_object_hide(view);
32 }
33
34 EAPI void
35 map_module_resize(Evas_Object *parent __UNUSED__, int w __UNUSED__, int h __UNUSED__)
36 {
37    evas_object_resize(view, w, h);
38 }
39
40 EAPI int
41 map_module_zoom_min_get()
42 {
43    return 0;
44 }
45
46 EAPI int
47 map_module_zoom_max_get()
48 {
49    return 18;
50 }
51
52 EAPI void
53 map_module_show(Evas_Object *obj __UNUSED__, double lon __UNUSED__, double lat __UNUSED__, int animation __UNUSED__)
54 {
55    if (view) evas_object_color_set(view, 0, 0, 50, 50);
56 }
57
58 EAPI void
59 map_module_zoom(Evas_Object *obj __UNUSED__, double zoom __UNUSED__, int animation __UNUSED__)
60 {
61    if (view) evas_object_color_set(view, 50, 0, 0, 50);
62 }
63
64 EAPI void
65 map_module_rotate(Evas_Object *obj __UNUSED__, double angle __UNUSED__, int x __UNUSED__, int y __UNUSED__, int animation __UNUSED__)
66 {
67    if (view) evas_object_color_set(view, 0, 0, 50, 50);
68 }
69
70 EAPI void
71 map_module_region_get(Evas_Object *obj __UNUSED__, double *lon __UNUSED__, double *lat __UNUSED__)
72 {
73    return;
74 }
75
76 EAPI void
77 map_module_rotate_get(const Evas_Object *obj __UNUSED__, double *angle __UNUSED__, int *x __UNUSED__, int *y __UNUSED__)
78 {
79    return;
80 }
81
82 EAPI void
83 map_module_perpective_set(Evas_Object *obj __UNUSED__, double perspective __UNUSED__, int animation __UNUSED__)
84 {
85    if (view) evas_object_color_set(view, 50, 50, 50, 50);
86 }
87
88 EAPI void
89 map_module_canvas_to_region(const Evas_Object *obj __UNUSED__, int x __UNUSED__, int y __UNUSED__, double *lon __UNUSED__, double *lat __UNUSED__)
90 {
91    return;
92 }
93
94 EAPI void
95 map_module_region_to_canvas(const Evas_Object *obj __UNUSED__, double lon __UNUSED__, double lat __UNUSED__, int *x __UNUSED__, int *y __UNUSED__)
96 {
97    return;
98 }
99
100 EAPI void
101 map_module_pan(Evas_Object *obj __UNUSED__, int x_1 __UNUSED__, int y_1 __UNUSED__, int x_2 __UNUSED__, int y_2 __UNUSED__)
102 {
103    if (view) evas_object_color_set(view, 128, 128,128, 128);
104 }
105
106 static Eina_Bool
107 _module_init(void)
108 {
109    return EINA_TRUE;
110 }
111
112 static void
113 _module_shutdown()
114 {
115 }
116
117 EINA_MODULE_INIT(_module_init);
118 EINA_MODULE_SHUTDOWN(_module_shutdown);
119