summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSubhransu Mohanty <sub.mohanty@samsung.com>2016-10-13 17:09:39 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2016-10-13 17:09:39 +0900
commit45b103eb0a3a91238f6ee1d66ccb2614925a2e64 (patch)
tree1d8011321a05170eddd9d2e92f2e8ca100abff5c
parentc5ffad3731e91bddc2f524b5272f99b7f130f98b (diff)
evas/module: add a new module in vg_loader for eet
Reviewers: jpeg Subscribers: cedric, jpeg Differential Revision: https://phab.enlightenment.org/D4347
-rw-r--r--configure.ac3
-rw-r--r--m4/evas_check_loader.m416
-rw-r--r--src/Makefile_Evas.am31
-rw-r--r--src/lib/evas/file/evas_module.c4
-rw-r--r--src/modules/evas/vg_loaders/eet/evas_vg_load_eet.c60
5 files changed, 110 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac
index 0b7adbae18..079485232f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2391,6 +2391,8 @@ case "$host_os" in
2391esac 2391esac
2392 2392
2393ARG_ENABLE_EVAS_VG_LOADER(SVG, static) 2393ARG_ENABLE_EVAS_VG_LOADER(SVG, static)
2394ARG_ENABLE_EVAS_VG_LOADER(EET, static)
2395
2394 2396
2395ARG_ENABLE_EVAS_IMAGE_LOADER(BMP, static) 2397ARG_ENABLE_EVAS_IMAGE_LOADER(BMP, static)
2396ARG_ENABLE_EVAS_IMAGE_LOADER(Eet, static) 2398ARG_ENABLE_EVAS_IMAGE_LOADER(Eet, static)
@@ -2713,6 +2715,7 @@ AM_CONDITIONAL([EVAS_STATIC_BUILD_GL_COMMON], [test "x${have_static_evas_engine_
2713## Vg Loaders 2715## Vg Loaders
2714 2716
2715EVAS_CHECK_VG_LOADER([SVG], [${want_evas_vg_loader_svg}]) 2717EVAS_CHECK_VG_LOADER([SVG], [${want_evas_vg_loader_svg}])
2718EVAS_CHECK_VG_LOADER([EET], [${want_evas_vg_loader_eet}])
2716 2719
2717## Image Loaders 2720## Image Loaders
2718 2721
diff --git a/m4/evas_check_loader.m4 b/m4/evas_check_loader.m4
index 5bf9277059..b574931c27 100644
--- a/m4/evas_check_loader.m4
+++ b/m4/evas_check_loader.m4
@@ -42,6 +42,22 @@ AS_IF([test "x${have_dep}" = "xyes"], [$3], [$4])
42 42
43]) 43])
44 44
45dnl use: EVAS_CHECK_VG_LOADER_DEP_EET(loader, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
46
47AC_DEFUN([EVAS_CHECK_VG_LOADER_DEP_EET],
48[
49
50have_dep="yes"
51evas_vg_loader_[]$1[]_cflags=""
52evas_vg_loader_[]$1[]_libs=""
53
54AC_SUBST([evas_vg_loader_$1_cflags])
55AC_SUBST([evas_vg_loader_$1_libs])
56
57AS_IF([test "x${have_dep}" = "xyes"], [$3], [$4])
58
59])
60
45dnl use: ARG_ENABLE_EVAS_IMAGE_LOADER(loader, default_value) 61dnl use: ARG_ENABLE_EVAS_IMAGE_LOADER(loader, default_value)
46 62
47AC_DEFUN([ARG_ENABLE_EVAS_IMAGE_LOADER], 63AC_DEFUN([ARG_ENABLE_EVAS_IMAGE_LOADER],
diff --git a/src/Makefile_Evas.am b/src/Makefile_Evas.am
index 369e3ebc34..0b9e79ebe1 100644
--- a/src/Makefile_Evas.am
+++ b/src/Makefile_Evas.am
@@ -1531,10 +1531,6 @@ if EVAS_STATIC_BUILD_VG_SVG
1531lib_evas_libevas_la_SOURCES += modules/evas/vg_loaders/svg/evas_vg_load_svg.c 1531lib_evas_libevas_la_SOURCES += modules/evas/vg_loaders/svg/evas_vg_load_svg.c
1532lib_evas_libevas_la_CPPFLAGS += @evas_vg_loader_svg_cflags@ 1532lib_evas_libevas_la_CPPFLAGS += @evas_vg_loader_svg_cflags@
1533lib_evas_libevas_la_LIBADD += @evas_vg_loader_svg_libs@ 1533lib_evas_libevas_la_LIBADD += @evas_vg_loader_svg_libs@
1534if EVAS_CSERVE2
1535bin_evas_evas_cserve2_slave_CPPFLAGS += @evas_vg_loader_svg_cflags@
1536bin_evas_evas_cserve2_slave_LDADD += @evas_vg_loader_svg_libs@
1537endif
1538else 1534else
1539vgloadersvgpkgdir = $(libdir)/evas/modules/vg_loaders/svg/$(MODULE_ARCH) 1535vgloadersvgpkgdir = $(libdir)/evas/modules/vg_loaders/svg/$(MODULE_ARCH)
1540vgloadersvgpkg_LTLIBRARIES = modules/evas/vg_loaders/svg/module.la 1536vgloadersvgpkg_LTLIBRARIES = modules/evas/vg_loaders/svg/module.la
@@ -1558,6 +1554,33 @@ modules_evas_vg_loaders_svg_module_la_LIBTOOLFLAGS = --tag=disable-static
1558endif 1554endif
1559endif 1555endif
1560 1556
1557if BUILD_VG_LOADER_EET
1558if EVAS_STATIC_BUILD_VG_EET
1559lib_evas_libevas_la_SOURCES += modules/evas/vg_loaders/eet/evas_vg_load_eet.c
1560lib_evas_libevas_la_CPPFLAGS += @evas_vg_loader_eet_cflags@
1561lib_evas_libevas_la_LIBADD += @evas_vg_loader_eet_libs@
1562else
1563vgloadereetpkgdir = $(libdir)/evas/modules/vg_loaders/eet/$(MODULE_ARCH)
1564vgloadereetpkg_LTLIBRARIES = modules/evas/vg_loaders/eet/module.la
1565
1566# Workaround for broken parallel install support in automake (relink issue)
1567# http://debbugs.gnu.org/cgi/bugreport.cgi?bug=7328
1568install_vgloadereetpkgLTLIBRARIES = install-vgloadereetpkgLTLIBRARIES
1569$(install_vgloadereetpkgLTLIBRARIES): install-libLTLIBRARIES
1570
1571modules_evas_vg_loaders_eet_module_la_SOURCES = modules/evas/vg_loaders/eet/evas_vg_load_eet.c
1572modules_evas_vg_loaders_eet_module_la_CPPFLAGS = -I$(top_builddir)/src/lib/efl \
1573-I$(top_srcdir)/src/lib/evas/include \
1574@EVAS_CFLAGS@ \
1575@evas_vg_loader_eet_cflags@
1576modules_evas_vg_loaders_eet_module_la_LIBADD = \
1577@USE_EVAS_LIBS@ \
1578@evas_vg_loader_eet_libs@
1579modules_evas_vg_loaders_eet_module_la_DEPENDENCIES = @USE_EVAS_INTERNAL_LIBS@
1580modules_evas_vg_loaders_eet_module_la_LDFLAGS = -module @EFL_LTMODULE_FLAGS@
1581modules_evas_vg_loaders_eet_module_la_LIBTOOLFLAGS = --tag=disable-static
1582endif
1583endif
1561 1584
1562 1585
1563if BUILD_LOADER_BMP 1586if BUILD_LOADER_BMP
diff --git a/src/lib/evas/file/evas_module.c b/src/lib/evas/file/evas_module.c
index f8d2787ccc..ea4f5c2739 100644
--- a/src/lib/evas/file/evas_module.c
+++ b/src/lib/evas/file/evas_module.c
@@ -130,6 +130,7 @@ EVAS_EINA_STATIC_MODULE_DEFINE(engine, software_x11);
130#endif 130#endif
131 131
132#if !EVAS_MODULE_NO_VG_LOADERS 132#if !EVAS_MODULE_NO_VG_LOADERS
133EVAS_EINA_STATIC_MODULE_DEFINE(vg_loader, eet);
133EVAS_EINA_STATIC_MODULE_DEFINE(vg_loader, svg); 134EVAS_EINA_STATIC_MODULE_DEFINE(vg_loader, svg);
134#endif 135#endif
135 136
@@ -203,6 +204,9 @@ static const struct {
203#ifdef EVAS_STATIC_BUILD_VG_SVG 204#ifdef EVAS_STATIC_BUILD_VG_SVG
204 EVAS_EINA_STATIC_MODULE_USE(vg_loader, svg), 205 EVAS_EINA_STATIC_MODULE_USE(vg_loader, svg),
205#endif 206#endif
207#ifdef EVAS_STATIC_BUILD_VG_EET
208 EVAS_EINA_STATIC_MODULE_USE(vg_loader, eet),
209#endif
206#endif 210#endif
207#if !EVAS_MODULE_NO_IMAGE_LOADERS 211#if !EVAS_MODULE_NO_IMAGE_LOADERS
208#ifdef EVAS_STATIC_BUILD_BMP 212#ifdef EVAS_STATIC_BUILD_BMP
diff --git a/src/modules/evas/vg_loaders/eet/evas_vg_load_eet.c b/src/modules/evas/vg_loaders/eet/evas_vg_load_eet.c
new file mode 100644
index 0000000000..485157add2
--- /dev/null
+++ b/src/modules/evas/vg_loaders/eet/evas_vg_load_eet.c
@@ -0,0 +1,60 @@
1#ifdef HAVE_CONFIG_H
2# include <config.h>
3#endif
4
5#include "evas_common_private.h"
6#include "evas_private.h"
7
8static int _evas_vg_loader_eet_log_dom = -1;
9
10#ifdef ERR
11# undef ERR
12#endif
13#define ERR(...) EINA_LOG_DOM_ERR(_evas_vg_loader_eet_log_dom, __VA_ARGS__)
14
15#ifdef INF
16# undef INF
17#endif
18#define INF(...) EINA_LOG_DOM_INFO(_evas_vg_loader_eet_log_dom, __VA_ARGS__)
19
20static void*
21evas_vg_load_file_data_eet(Eina_File *f EINA_UNUSED, Eina_Stringshare *key EINA_UNUSED, int *error EINA_UNUSED)
22{
23 INF("No Implementation Yet");
24 return NULL;
25}
26
27static Evas_Vg_Load_Func evas_vg_load_eet_func =
28{
29 evas_vg_load_file_data_eet
30};
31
32static int
33module_open(Evas_Module *em)
34{
35 if (!em) return 0;
36 em->functions = (void *)(&evas_vg_load_eet_func);
37 return 1;
38}
39
40static void
41module_close(Evas_Module *em EINA_UNUSED)
42{
43}
44
45static Evas_Module_Api evas_modapi =
46{
47 EVAS_MODULE_API_VERSION,
48 "eet",
49 "none",
50 {
51 module_open,
52 module_close
53 }
54};
55
56EVAS_MODULE_DEFINE(EVAS_MODULE_TYPE_VG_LOADER, vg_loader, eet);
57
58#ifndef EVAS_STATIC_BUILD_VG_EET
59EVAS_EINA_MODULE_DEFINE(vg_loader, eet);
60#endif \ No newline at end of file