summaryrefslogtreecommitdiff
path: root/src/modules/test_map
diff options
context:
space:
mode:
authorsangho park <gouache95@gmail.com>2010-12-21 09:14:47 +0000
committerCarsten Haitzler <raster@rasterman.com>2010-12-21 09:14:47 +0000
commit5c199c5748e82042b24db0125a785baac33eb807 (patch)
treed2321e3ca0f4878e7d61cad12e507bbc5dc461bb /src/modules/test_map
parenta651fa411781533809dae3ca5f9ff5075c5256d4 (diff)
From: sangho park <gouache95@gmail.com>
Subject: [E-devel] [Patch] elm_map module patch This is a patch for elm_map module. when app developers or companies want to use specific license map (i.e google map), module is needed. - add new map provider for module "ELM_MAP_SOURCE_MODULE". - add test_map module. - add test code for module provider. - add my name to AUTHORS. SVN revision: 55684
Diffstat (limited to 'src/modules/test_map')
-rw-r--r--src/modules/test_map/Makefile.am32
-rw-r--r--src/modules/test_map/mod.c50
2 files changed, 82 insertions, 0 deletions
diff --git a/src/modules/test_map/Makefile.am b/src/modules/test_map/Makefile.am
new file mode 100644
index 000000000..d789ce998
--- /dev/null
+++ b/src/modules/test_map/Makefile.am
@@ -0,0 +1,32 @@
1
2MAINTAINERCLEANFILES = Makefile.in
3
4AM_CPPFLAGS = \
5-I. \
6-I$(top_builddir) \
7-I$(top_srcdir) \
8-I$(top_srcdir)/src/lib \
9-I$(top_builddir)/src/lib \
10-DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \
11-DPACKAGE_LIB_DIR=\"$(libdir)\" \
12@ELEMENTARY_CFLAGS@ \
13@ELEMENTARY_X_CFLAGS@ \
14@ELEMENTARY_FB_CFLAGS@ \
15@ELEMENTARY_WIN32_CFLAGS@ \
16@ELEMENTARY_WINCE_CFLAGS@ \
17@ELEMENTARY_EDBUS_CFLAGS@ \
18@ELEMENTARY_EFREET_CFLAGS@ \
19@ELEMENTARY_ETHUMB_CFLAGS@
20
21if ELEMENTARY_WINDOWS_BUILD
22AM_CPPFLAGS += -DELEMENTARY_BUILD
23endif
24
25pkgdir = $(libdir)/elementary/modules/test_map/$(MODULE_ARCH)
26pkg_LTLIBRARIES = module.la
27
28module_la_SOURCES = mod.c
29
30module_la_LIBADD = $(top_builddir)/src/lib/libelementary.la
31module_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -module -avoid-version
32module_la_LIBTOOLFLAGS = --tag=disable-static
diff --git a/src/modules/test_map/mod.c b/src/modules/test_map/mod.c
new file mode 100644
index 000000000..8b94996f1
--- /dev/null
+++ b/src/modules/test_map/mod.c
@@ -0,0 +1,50 @@
1#include <Elementary.h>
2#ifdef HAVE_CONFIG_H
3# include "elementary_config.h"
4#endif
5
6EAPI int
7elm_modapi_init(void *m)
8{
9 return 1; // succeed always
10}
11
12EAPI int
13elm_modapi_shutdown(void *m)
14{
15 return 1; // succeed always
16}
17
18EAPI Eina_Bool
19obj_hook(Evas_Object *obj)
20{
21 return EINA_TRUE;
22}
23
24EAPI Eina_Bool
25obj_unhook(Evas_Object *obj)
26{
27 return EINA_TRUE;
28}
29
30EAPI Eina_Bool
31obj_convert_geo_into_coord(const Evas_Object *obj, int zoom, double lon, double lat, int size, int *x, int *y)
32{
33 return EINA_FALSE;
34}
35
36EAPI Eina_Bool
37obj_convert_coord_into_geo(const Evas_Object *obj, int zoom, int x, int y, int size, double *lon, double *lat)
38{
39 return EINA_FALSE;
40}
41
42EAPI char*
43obj_url_request(Evas_Object *obj, int x, int y, int zoom)
44{
45 char buf[PATH_MAX];
46 snprintf(buf, sizeof(buf), "http://tile.openstreetmap.org/%d/%d/%d.png",
47 zoom, x, y);
48 return strdup(buf);
49}
50