aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/libraries/evas/src/lib/file
diff options
context:
space:
mode:
Diffstat (limited to 'libraries/evas/src/lib/file')
-rw-r--r--libraries/evas/src/lib/file/Makefile.am25
-rw-r--r--libraries/evas/src/lib/file/Makefile.in680
-rw-r--r--libraries/evas/src/lib/file/evas_module.c586
-rw-r--r--libraries/evas/src/lib/file/evas_module.h94
-rw-r--r--libraries/evas/src/lib/file/evas_path.c154
-rw-r--r--libraries/evas/src/lib/file/evas_path.h15
6 files changed, 1554 insertions, 0 deletions
diff --git a/libraries/evas/src/lib/file/Makefile.am b/libraries/evas/src/lib/file/Makefile.am
new file mode 100644
index 0000000..7875fbe
--- /dev/null
+++ b/libraries/evas/src/lib/file/Makefile.am
@@ -0,0 +1,25 @@
1
2MAINTAINERCLEANFILES = Makefile.in
3
4AM_CPPFLAGS = \
5-I. \
6-I$(top_srcdir)/src/lib \
7-I$(top_srcdir)/src/lib/include \
8-DPACKAGE_BIN_DIR=\"$(bindir)\" \
9-DPACKAGE_LIB_DIR=\"$(libdir)\" \
10-DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \
11@FREETYPE_CFLAGS@ \
12@EINA_CFLAGS@ \
13@EVIL_CFLAGS@ \
14@WIN32_CPPFLAGS@ \
15@PIXMAN_CFLAGS@
16
17AM_CFLAGS = @WIN32_CFLAGS@
18
19noinst_LTLIBRARIES = libevas_file.la
20libevas_file_la_SOURCES = \
21evas_path.c \
22evas_module.c
23libevas_file_la_LIBADD = @EINA_LIBS@ @EVIL_LIBS@
24
25EXTRA_DIST = evas_module.h evas_path.h
diff --git a/libraries/evas/src/lib/file/Makefile.in b/libraries/evas/src/lib/file/Makefile.in
new file mode 100644
index 0000000..599d980
--- /dev/null
+++ b/libraries/evas/src/lib/file/Makefile.in
@@ -0,0 +1,680 @@
1# Makefile.in generated by automake 1.11.1 from Makefile.am.
2# @configure_input@
3
4# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
5# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
6# Inc.
7# This Makefile.in is free software; the Free Software Foundation
8# gives unlimited permission to copy and/or distribute it,
9# with or without modifications, as long as this notice is preserved.
10
11# This program is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
13# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
14# PARTICULAR PURPOSE.
15
16@SET_MAKE@
17
18VPATH = @srcdir@
19pkgdatadir = $(datadir)/@PACKAGE@
20pkgincludedir = $(includedir)/@PACKAGE@
21pkglibdir = $(libdir)/@PACKAGE@
22pkglibexecdir = $(libexecdir)/@PACKAGE@
23am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
24install_sh_DATA = $(install_sh) -c -m 644
25install_sh_PROGRAM = $(install_sh) -c
26install_sh_SCRIPT = $(install_sh) -c
27INSTALL_HEADER = $(INSTALL_DATA)
28transform = $(program_transform_name)
29NORMAL_INSTALL = :
30PRE_INSTALL = :
31POST_INSTALL = :
32NORMAL_UNINSTALL = :
33PRE_UNINSTALL = :
34POST_UNINSTALL = :
35build_triplet = @build@
36host_triplet = @host@
37subdir = src/lib/file
38DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
39ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
40am__aclocal_m4_deps = $(top_srcdir)/m4/efl_attribute.m4 \
41 $(top_srcdir)/m4/efl_coverage.m4 \
42 $(top_srcdir)/m4/efl_doxygen.m4 \
43 $(top_srcdir)/m4/efl_fnmatch.m4 \
44 $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \
45 $(top_srcdir)/m4/evas_check_engine.m4 \
46 $(top_srcdir)/m4/evas_check_loader.m4 \
47 $(top_srcdir)/m4/evas_converter.m4 \
48 $(top_srcdir)/m4/evas_dither.m4 \
49 $(top_srcdir)/m4/evas_scaler.m4 $(top_srcdir)/m4/libtool.m4 \
50 $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
51 $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
52 $(top_srcdir)/configure.ac
53am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
54 $(ACLOCAL_M4)
55mkinstalldirs = $(install_sh) -d
56CONFIG_HEADER = $(top_builddir)/config.h
57CONFIG_CLEAN_FILES =
58CONFIG_CLEAN_VPATH_FILES =
59LTLIBRARIES = $(noinst_LTLIBRARIES)
60libevas_file_la_DEPENDENCIES =
61am_libevas_file_la_OBJECTS = evas_path.lo evas_module.lo
62libevas_file_la_OBJECTS = $(am_libevas_file_la_OBJECTS)
63AM_V_lt = $(am__v_lt_$(V))
64am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
65am__v_lt_0 = --silent
66DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
67depcomp = $(SHELL) $(top_srcdir)/depcomp
68am__depfiles_maybe = depfiles
69am__mv = mv -f
70COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
71 $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
72LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
73 $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
74 $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
75 $(AM_CFLAGS) $(CFLAGS)
76AM_V_CC = $(am__v_CC_$(V))
77am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
78am__v_CC_0 = @echo " CC " $@;
79AM_V_at = $(am__v_at_$(V))
80am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
81am__v_at_0 = @
82CCLD = $(CC)
83LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
84 $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
85 $(AM_LDFLAGS) $(LDFLAGS) -o $@
86AM_V_CCLD = $(am__v_CCLD_$(V))
87am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
88am__v_CCLD_0 = @echo " CCLD " $@;
89AM_V_GEN = $(am__v_GEN_$(V))
90am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
91am__v_GEN_0 = @echo " GEN " $@;
92SOURCES = $(libevas_file_la_SOURCES)
93DIST_SOURCES = $(libevas_file_la_SOURCES)
94ETAGS = etags
95CTAGS = ctags
96DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
97ACLOCAL = @ACLOCAL@
98ALLOCA = @ALLOCA@
99AMTAR = @AMTAR@
100AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
101AR = @AR@
102AS = @AS@
103AUTOCONF = @AUTOCONF@
104AUTOHEADER = @AUTOHEADER@
105AUTOMAKE = @AUTOMAKE@
106AWK = @AWK@
107CC = @CC@
108CCDEPMODE = @CCDEPMODE@
109CFLAGS = @CFLAGS@
110CHECK_CFLAGS = @CHECK_CFLAGS@
111CHECK_LIBS = @CHECK_LIBS@
112CPP = @CPP@
113CPPFLAGS = @CPPFLAGS@
114CXX = @CXX@
115CXXCPP = @CXXCPP@
116CXXDEPMODE = @CXXDEPMODE@
117CXXFLAGS = @CXXFLAGS@
118CYGPATH_W = @CYGPATH_W@
119DEFS = @DEFS@
120DEPDIR = @DEPDIR@
121DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@
122DIRECTFB_LIBS = @DIRECTFB_LIBS@
123DLLTOOL = @DLLTOOL@
124DSYMUTIL = @DSYMUTIL@
125DUMPBIN = @DUMPBIN@
126ECHO_C = @ECHO_C@
127ECHO_N = @ECHO_N@
128ECHO_T = @ECHO_T@
129ECORE_EVAS_CFLAGS = @ECORE_EVAS_CFLAGS@
130ECORE_EVAS_LIBS = @ECORE_EVAS_LIBS@
131EDB_CFLAGS = @EDB_CFLAGS@
132EDB_LIBS = @EDB_LIBS@
133EDJE_CFLAGS = @EDJE_CFLAGS@
134EDJE_LIBS = @EDJE_LIBS@
135EET_CFLAGS = @EET_CFLAGS@
136EET_LIBS = @EET_LIBS@
137EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@
138EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@
139EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@
140EGREP = @EGREP@
141EINA_CFLAGS = @EINA_CFLAGS@
142EINA_LIBS = @EINA_LIBS@
143EVAS_CFLAGS = @EVAS_CFLAGS@
144EVAS_LIBS = @EVAS_LIBS@
145EVAS_SSE3_CFLAGS = @EVAS_SSE3_CFLAGS@
146EVIL_CFLAGS = @EVIL_CFLAGS@
147EVIL_LIBS = @EVIL_LIBS@
148EXEEXT = @EXEEXT@
149FGREP = @FGREP@
150FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@
151FONTCONFIG_LIBS = @FONTCONFIG_LIBS@
152FREETYPE_CFLAGS = @FREETYPE_CFLAGS@
153FREETYPE_LIBS = @FREETYPE_LIBS@
154FRIBIDI_CFLAGS = @FRIBIDI_CFLAGS@
155FRIBIDI_LIBS = @FRIBIDI_LIBS@
156GL_EET_CFLAGS = @GL_EET_CFLAGS@
157GL_EET_LIBS = @GL_EET_LIBS@
158GREP = @GREP@
159HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@
160HARFBUZZ_LIBS = @HARFBUZZ_LIBS@
161INSTALL = @INSTALL@
162INSTALL_DATA = @INSTALL_DATA@
163INSTALL_PROGRAM = @INSTALL_PROGRAM@
164INSTALL_SCRIPT = @INSTALL_SCRIPT@
165INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
166LD = @LD@
167LDFLAGS = @LDFLAGS@
168LIBOBJS = @LIBOBJS@
169LIBS = @LIBS@
170LIBTOOL = @LIBTOOL@
171LINEBREAK_CFLAGS = @LINEBREAK_CFLAGS@
172LINEBREAK_LIBS = @LINEBREAK_LIBS@
173LIPO = @LIPO@
174LN_S = @LN_S@
175LTLIBOBJS = @LTLIBOBJS@
176MAKEINFO = @MAKEINFO@
177MKDIR_P = @MKDIR_P@
178MODULE_ARCH = @MODULE_ARCH@
179NM = @NM@
180NMEDIT = @NMEDIT@
181OBJC = @OBJC@
182OBJCDEPMODE = @OBJCDEPMODE@
183OBJCFLAGS = @OBJCFLAGS@
184OBJDUMP = @OBJDUMP@
185OBJEXT = @OBJEXT@
186OTOOL = @OTOOL@
187OTOOL64 = @OTOOL64@
188PACKAGE = @PACKAGE@
189PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
190PACKAGE_NAME = @PACKAGE_NAME@
191PACKAGE_STRING = @PACKAGE_STRING@
192PACKAGE_TARNAME = @PACKAGE_TARNAME@
193PACKAGE_URL = @PACKAGE_URL@
194PACKAGE_VERSION = @PACKAGE_VERSION@
195PATH_SEPARATOR = @PATH_SEPARATOR@
196PIXMAN_CFLAGS = @PIXMAN_CFLAGS@
197PIXMAN_LIBS = @PIXMAN_LIBS@
198PKG_CONFIG = @PKG_CONFIG@
199PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
200PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
201PNG_CFLAGS = @PNG_CFLAGS@
202PNG_LIBS = @PNG_LIBS@
203RANLIB = @RANLIB@
204SDL_CFLAGS = @SDL_CFLAGS@
205SDL_LIBS = @SDL_LIBS@
206SED = @SED@
207SET_MAKE = @SET_MAKE@
208SHELL = @SHELL@
209SHM_OPEN_LINK = @SHM_OPEN_LINK@
210STRIP = @STRIP@
211SVG_CFLAGS = @SVG_CFLAGS@
212SVG_LIBS = @SVG_LIBS@
213VALGRIND_CFLAGS = @VALGRIND_CFLAGS@
214VALGRIND_LIBS = @VALGRIND_LIBS@
215VERSION = @VERSION@
216VMAJ = @VMAJ@
217WIN32_CFLAGS = @WIN32_CFLAGS@
218WIN32_CPPFLAGS = @WIN32_CPPFLAGS@
219XCB_CFLAGS = @XCB_CFLAGS@
220XCB_GL_CFLAGS = @XCB_GL_CFLAGS@
221XCB_GL_LIBS = @XCB_GL_LIBS@
222XCB_LIBS = @XCB_LIBS@
223XEXT_CFLAGS = @XEXT_CFLAGS@
224XEXT_LIBS = @XEXT_LIBS@
225XMKMF = @XMKMF@
226X_CFLAGS = @X_CFLAGS@
227X_EXTRA_LIBS = @X_EXTRA_LIBS@
228X_LIBS = @X_LIBS@
229X_PRE_LIBS = @X_PRE_LIBS@
230abs_builddir = @abs_builddir@
231abs_srcdir = @abs_srcdir@
232abs_top_builddir = @abs_top_builddir@
233abs_top_srcdir = @abs_top_srcdir@
234ac_ct_CC = @ac_ct_CC@
235ac_ct_CXX = @ac_ct_CXX@
236ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
237ac_ct_OBJC = @ac_ct_OBJC@
238altivec_cflags = @altivec_cflags@
239am__include = @am__include@
240am__leading_dot = @am__leading_dot@
241am__quote = @am__quote@
242am__tar = @am__tar@
243am__untar = @am__untar@
244bindir = @bindir@
245build = @build@
246build_alias = @build_alias@
247build_cpu = @build_cpu@
248build_os = @build_os@
249build_vendor = @build_vendor@
250builddir = @builddir@
251datadir = @datadir@
252datarootdir = @datarootdir@
253dlopen_libs = @dlopen_libs@
254docdir = @docdir@
255dvidir = @dvidir@
256edje_cc = @edje_cc@
257efl_doxygen = @efl_doxygen@
258efl_have_doxygen = @efl_have_doxygen@
259evas_engine_buffer_cflags = @evas_engine_buffer_cflags@
260evas_engine_buffer_libs = @evas_engine_buffer_libs@
261evas_engine_direct3d_cflags = @evas_engine_direct3d_cflags@
262evas_engine_direct3d_libs = @evas_engine_direct3d_libs@
263evas_engine_directfb_cflags = @evas_engine_directfb_cflags@
264evas_engine_directfb_libs = @evas_engine_directfb_libs@
265evas_engine_fb_cflags = @evas_engine_fb_cflags@
266evas_engine_fb_libs = @evas_engine_fb_libs@
267evas_engine_gl_cocoa_cflags = @evas_engine_gl_cocoa_cflags@
268evas_engine_gl_cocoa_libs = @evas_engine_gl_cocoa_libs@
269evas_engine_gl_common_libs = @evas_engine_gl_common_libs@
270evas_engine_gl_sdl_cflags = @evas_engine_gl_sdl_cflags@
271evas_engine_gl_sdl_libs = @evas_engine_gl_sdl_libs@
272evas_engine_gl_xcb_cflags = @evas_engine_gl_xcb_cflags@
273evas_engine_gl_xcb_libs = @evas_engine_gl_xcb_libs@
274evas_engine_gl_xlib_cflags = @evas_engine_gl_xlib_cflags@
275evas_engine_gl_xlib_libs = @evas_engine_gl_xlib_libs@
276evas_engine_psl1ght_cflags = @evas_engine_psl1ght_cflags@
277evas_engine_psl1ght_libs = @evas_engine_psl1ght_libs@
278evas_engine_software_16_ddraw_cflags = @evas_engine_software_16_ddraw_cflags@
279evas_engine_software_16_ddraw_libs = @evas_engine_software_16_ddraw_libs@
280evas_engine_software_16_sdl_cflags = @evas_engine_software_16_sdl_cflags@
281evas_engine_software_16_sdl_libs = @evas_engine_software_16_sdl_libs@
282evas_engine_software_16_wince_cflags = @evas_engine_software_16_wince_cflags@
283evas_engine_software_16_wince_libs = @evas_engine_software_16_wince_libs@
284evas_engine_software_16_x11_cflags = @evas_engine_software_16_x11_cflags@
285evas_engine_software_16_x11_libs = @evas_engine_software_16_x11_libs@
286evas_engine_software_8_x11_cflags = @evas_engine_software_8_x11_cflags@
287evas_engine_software_8_x11_libs = @evas_engine_software_8_x11_libs@
288evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@
289evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@
290evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@
291evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@
292evas_engine_software_sdl_cflags = @evas_engine_software_sdl_cflags@
293evas_engine_software_sdl_libs = @evas_engine_software_sdl_libs@
294evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@
295evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@
296evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@
297evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@
298evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@
299evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@
300evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@
301evas_image_loader_edb_libs = @evas_image_loader_edb_libs@
302evas_image_loader_eet_cflags = @evas_image_loader_eet_cflags@
303evas_image_loader_eet_libs = @evas_image_loader_eet_libs@
304evas_image_loader_generic_cflags = @evas_image_loader_generic_cflags@
305evas_image_loader_generic_libs = @evas_image_loader_generic_libs@
306evas_image_loader_gif_cflags = @evas_image_loader_gif_cflags@
307evas_image_loader_gif_libs = @evas_image_loader_gif_libs@
308evas_image_loader_ico_cflags = @evas_image_loader_ico_cflags@
309evas_image_loader_ico_libs = @evas_image_loader_ico_libs@
310evas_image_loader_jpeg_cflags = @evas_image_loader_jpeg_cflags@
311evas_image_loader_jpeg_libs = @evas_image_loader_jpeg_libs@
312evas_image_loader_pmaps_cflags = @evas_image_loader_pmaps_cflags@
313evas_image_loader_pmaps_libs = @evas_image_loader_pmaps_libs@
314evas_image_loader_png_cflags = @evas_image_loader_png_cflags@
315evas_image_loader_png_libs = @evas_image_loader_png_libs@
316evas_image_loader_psd_cflags = @evas_image_loader_psd_cflags@
317evas_image_loader_psd_libs = @evas_image_loader_psd_libs@
318evas_image_loader_svg_cflags = @evas_image_loader_svg_cflags@
319evas_image_loader_svg_libs = @evas_image_loader_svg_libs@
320evas_image_loader_tga_cflags = @evas_image_loader_tga_cflags@
321evas_image_loader_tga_libs = @evas_image_loader_tga_libs@
322evas_image_loader_tiff_cflags = @evas_image_loader_tiff_cflags@
323evas_image_loader_tiff_libs = @evas_image_loader_tiff_libs@
324evas_image_loader_wbmp_cflags = @evas_image_loader_wbmp_cflags@
325evas_image_loader_wbmp_libs = @evas_image_loader_wbmp_libs@
326evas_image_loader_xpm_cflags = @evas_image_loader_xpm_cflags@
327evas_image_loader_xpm_libs = @evas_image_loader_xpm_libs@
328exec_prefix = @exec_prefix@
329have_evas_engine_gl_x11 = @have_evas_engine_gl_x11@
330have_evas_engine_gl_xcb = @have_evas_engine_gl_xcb@
331have_evas_engine_gl_xlib = @have_evas_engine_gl_xlib@
332have_evas_engine_software_x11 = @have_evas_engine_software_x11@
333have_evas_engine_software_xcb = @have_evas_engine_software_xcb@
334have_evas_engine_software_xlib = @have_evas_engine_software_xlib@
335have_lcov = @have_lcov@
336host = @host@
337host_alias = @host_alias@
338host_cpu = @host_cpu@
339host_os = @host_os@
340host_vendor = @host_vendor@
341htmldir = @htmldir@
342includedir = @includedir@
343infodir = @infodir@
344install_sh = @install_sh@
345libdir = @libdir@
346libexecdir = @libexecdir@
347localedir = @localedir@
348localstatedir = @localstatedir@
349lt_ECHO = @lt_ECHO@
350lt_enable_auto_import = @lt_enable_auto_import@
351mandir = @mandir@
352mkdir_p = @mkdir_p@
353oldincludedir = @oldincludedir@
354pdfdir = @pdfdir@
355pkgconfig_requires_private = @pkgconfig_requires_private@
356prefix = @prefix@
357program_transform_name = @program_transform_name@
358psdir = @psdir@
359pthread_cflags = @pthread_cflags@
360pthread_libs = @pthread_libs@
361release_info = @release_info@
362requirement_evas = @requirement_evas@
363sbindir = @sbindir@
364sharedstatedir = @sharedstatedir@
365srcdir = @srcdir@
366sysconfdir = @sysconfdir@
367target_alias = @target_alias@
368top_build_prefix = @top_build_prefix@
369top_builddir = @top_builddir@
370top_srcdir = @top_srcdir@
371version_info = @version_info@
372MAINTAINERCLEANFILES = Makefile.in
373AM_CPPFLAGS = \
374-I. \
375-I$(top_srcdir)/src/lib \
376-I$(top_srcdir)/src/lib/include \
377-DPACKAGE_BIN_DIR=\"$(bindir)\" \
378-DPACKAGE_LIB_DIR=\"$(libdir)\" \
379-DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \
380@FREETYPE_CFLAGS@ \
381@EINA_CFLAGS@ \
382@EVIL_CFLAGS@ \
383@WIN32_CPPFLAGS@ \
384@PIXMAN_CFLAGS@
385
386AM_CFLAGS = @WIN32_CFLAGS@
387noinst_LTLIBRARIES = libevas_file.la
388libevas_file_la_SOURCES = \
389evas_path.c \
390evas_module.c
391
392libevas_file_la_LIBADD = @EINA_LIBS@ @EVIL_LIBS@
393EXTRA_DIST = evas_module.h evas_path.h
394all: all-am
395
396.SUFFIXES:
397.SUFFIXES: .c .lo .o .obj
398$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
399 @for dep in $?; do \
400 case '$(am__configure_deps)' in \
401 *$$dep*) \
402 ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
403 && { if test -f $@; then exit 0; else break; fi; }; \
404 exit 1;; \
405 esac; \
406 done; \
407 echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/lib/file/Makefile'; \
408 $(am__cd) $(top_srcdir) && \
409 $(AUTOMAKE) --gnu src/lib/file/Makefile
410.PRECIOUS: Makefile
411Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
412 @case '$?' in \
413 *config.status*) \
414 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
415 *) \
416 echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
417 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
418 esac;
419
420$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
421 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
422
423$(top_srcdir)/configure: $(am__configure_deps)
424 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
425$(ACLOCAL_M4): $(am__aclocal_m4_deps)
426 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
427$(am__aclocal_m4_deps):
428
429clean-noinstLTLIBRARIES:
430 -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
431 @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \
432 dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
433 test "$$dir" != "$$p" || dir=.; \
434 echo "rm -f \"$${dir}/so_locations\""; \
435 rm -f "$${dir}/so_locations"; \
436 done
437libevas_file.la: $(libevas_file_la_OBJECTS) $(libevas_file_la_DEPENDENCIES)
438 $(AM_V_CCLD)$(LINK) $(libevas_file_la_OBJECTS) $(libevas_file_la_LIBADD) $(LIBS)
439
440mostlyclean-compile:
441 -rm -f *.$(OBJEXT)
442
443distclean-compile:
444 -rm -f *.tab.c
445
446@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_module.Plo@am__quote@
447@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_path.Plo@am__quote@
448
449.c.o:
450@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
451@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
452@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
453@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
454@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
455@am__fastdepCC_FALSE@ $(COMPILE) -c $<
456
457.c.obj:
458@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
459@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
460@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
461@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
462@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
463@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
464
465.c.lo:
466@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
467@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
468@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
469@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
470@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
471@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
472
473mostlyclean-libtool:
474 -rm -f *.lo
475
476clean-libtool:
477 -rm -rf .libs _libs
478
479ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
480 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
481 unique=`for i in $$list; do \
482 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
483 done | \
484 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
485 END { if (nonempty) { for (i in files) print i; }; }'`; \
486 mkid -fID $$unique
487tags: TAGS
488
489TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
490 $(TAGS_FILES) $(LISP)
491 set x; \
492 here=`pwd`; \
493 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
494 unique=`for i in $$list; do \
495 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
496 done | \
497 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
498 END { if (nonempty) { for (i in files) print i; }; }'`; \
499 shift; \
500 if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
501 test -n "$$unique" || unique=$$empty_fix; \
502 if test $$# -gt 0; then \
503 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
504 "$$@" $$unique; \
505 else \
506 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
507 $$unique; \
508 fi; \
509 fi
510ctags: CTAGS
511CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
512 $(TAGS_FILES) $(LISP)
513 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
514 unique=`for i in $$list; do \
515 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
516 done | \
517 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
518 END { if (nonempty) { for (i in files) print i; }; }'`; \
519 test -z "$(CTAGS_ARGS)$$unique" \
520 || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
521 $$unique
522
523GTAGS:
524 here=`$(am__cd) $(top_builddir) && pwd` \
525 && $(am__cd) $(top_srcdir) \
526 && gtags -i $(GTAGS_ARGS) "$$here"
527
528distclean-tags:
529 -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
530
531distdir: $(DISTFILES)
532 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
533 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
534 list='$(DISTFILES)'; \
535 dist_files=`for file in $$list; do echo $$file; done | \
536 sed -e "s|^$$srcdirstrip/||;t" \
537 -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
538 case $$dist_files in \
539 */*) $(MKDIR_P) `echo "$$dist_files" | \
540 sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
541 sort -u` ;; \
542 esac; \
543 for file in $$dist_files; do \
544 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
545 if test -d $$d/$$file; then \
546 dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
547 if test -d "$(distdir)/$$file"; then \
548 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
549 fi; \
550 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
551 cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
552 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
553 fi; \
554 cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
555 else \
556 test -f "$(distdir)/$$file" \
557 || cp -p $$d/$$file "$(distdir)/$$file" \
558 || exit 1; \
559 fi; \
560 done
561check-am: all-am
562check: check-am
563all-am: Makefile $(LTLIBRARIES)
564installdirs:
565install: install-am
566install-exec: install-exec-am
567install-data: install-data-am
568uninstall: uninstall-am
569
570install-am: all-am
571 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
572
573installcheck: installcheck-am
574install-strip:
575 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
576 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
577 `test -z '$(STRIP)' || \
578 echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
579mostlyclean-generic:
580
581clean-generic:
582
583distclean-generic:
584 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
585 -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
586
587maintainer-clean-generic:
588 @echo "This command is intended for maintainers to use"
589 @echo "it deletes files that may require special tools to rebuild."
590 -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
591clean: clean-am
592
593clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \
594 mostlyclean-am
595
596distclean: distclean-am
597 -rm -rf ./$(DEPDIR)
598 -rm -f Makefile
599distclean-am: clean-am distclean-compile distclean-generic \
600 distclean-tags
601
602dvi: dvi-am
603
604dvi-am:
605
606html: html-am
607
608html-am:
609
610info: info-am
611
612info-am:
613
614install-data-am:
615
616install-dvi: install-dvi-am
617
618install-dvi-am:
619
620install-exec-am:
621
622install-html: install-html-am
623
624install-html-am:
625
626install-info: install-info-am
627
628install-info-am:
629
630install-man:
631
632install-pdf: install-pdf-am
633
634install-pdf-am:
635
636install-ps: install-ps-am
637
638install-ps-am:
639
640installcheck-am:
641
642maintainer-clean: maintainer-clean-am
643 -rm -rf ./$(DEPDIR)
644 -rm -f Makefile
645maintainer-clean-am: distclean-am maintainer-clean-generic
646
647mostlyclean: mostlyclean-am
648
649mostlyclean-am: mostlyclean-compile mostlyclean-generic \
650 mostlyclean-libtool
651
652pdf: pdf-am
653
654pdf-am:
655
656ps: ps-am
657
658ps-am:
659
660uninstall-am:
661
662.MAKE: install-am install-strip
663
664.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
665 clean-libtool clean-noinstLTLIBRARIES ctags distclean \
666 distclean-compile distclean-generic distclean-libtool \
667 distclean-tags distdir dvi dvi-am html html-am info info-am \
668 install install-am install-data install-data-am install-dvi \
669 install-dvi-am install-exec install-exec-am install-html \
670 install-html-am install-info install-info-am install-man \
671 install-pdf install-pdf-am install-ps install-ps-am \
672 install-strip installcheck installcheck-am installdirs \
673 maintainer-clean maintainer-clean-generic mostlyclean \
674 mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
675 pdf pdf-am ps ps-am tags uninstall uninstall-am
676
677
678# Tell versions [3.59,3.63) of GNU make to not export all variables.
679# Otherwise a system limit (for SysV at least) may be exceeded.
680.NOEXPORT:
diff --git a/libraries/evas/src/lib/file/evas_module.c b/libraries/evas/src/lib/file/evas_module.c
new file mode 100644
index 0000000..6b4d4f6
--- /dev/null
+++ b/libraries/evas/src/lib/file/evas_module.c
@@ -0,0 +1,586 @@
1#ifdef HAVE_CONFIG_H
2# include <config.h>
3#endif
4
5#include <string.h>
6
7#include <evas_common.h>
8#include <evas_private.h>
9#include <evas_module.h>
10
11
12static Eina_Hash *evas_modules[4] = {
13 NULL,
14 NULL,
15 NULL,
16 NULL
17};
18
19static Eina_List *eina_evas_modules = NULL;
20static Eina_List *evas_module_paths = NULL;
21static Eina_Array *evas_engines = NULL;
22
23static Eina_List *
24_evas_module_append(Eina_List *list, char *path)
25{
26 if (path)
27 {
28 if (evas_file_path_exists(path))
29 list = eina_list_append(list, path);
30 else
31 free(path);
32 }
33 return list;
34}
35
36/* this will alloc a list of paths to search for the modules */
37/* by now these are: */
38/* 1. ~/.evas/modules/ */
39/* 2. $(EVAS_MODULE_DIR)/evas/modules/ */
40/* 3. dladdr/evas/modules/ */
41/* 4. PREFIX/evas/modules/ */
42void
43evas_module_paths_init(void)
44{
45 char *path;
46
47 /* 1. ~/.evas/modules/ */
48 path = eina_module_environment_path_get("HOME", "/.evas/modules");
49 evas_module_paths = _evas_module_append(evas_module_paths, path);
50
51 /* 2. $(EVAS_MODULE_DIR)/evas/modules/ */
52 path = eina_module_environment_path_get("EVAS_MODULES_DIR", "/evas/modules");
53 if (eina_list_search_unsorted(evas_module_paths, (Eina_Compare_Cb) strcmp, path))
54 free(path);
55 else
56 evas_module_paths = _evas_module_append(evas_module_paths, path);
57
58 /* 3. libevas.so/../evas/modules/ */
59 path = eina_module_symbol_path_get(evas_module_paths_init, "/evas/modules");
60 if (eina_list_search_unsorted(evas_module_paths, (Eina_Compare_Cb) strcmp, path))
61 free(path);
62 else
63 evas_module_paths = _evas_module_append(evas_module_paths, path);
64
65 /* 4. PREFIX/evas/modules/ */
66#ifndef _MSC_VER
67 path = PACKAGE_LIB_DIR "/evas/modules";
68 if (!eina_list_search_unsorted(evas_module_paths, (Eina_Compare_Cb) strcmp, path))
69 {
70 path = strdup(path);
71 if (path)
72 evas_module_paths = _evas_module_append(evas_module_paths, path);
73 }
74#endif
75}
76
77#define EVAS_EINA_STATIC_MODULE_DEFINE(Tn, Name) \
78 Eina_Bool evas_##Tn##_##Name##_init(void); \
79 void evas_##Tn##_##Name##_shutdown(void);
80
81#define EVAS_EINA_STATIC_MODULE_USE(Tn, Name) \
82 { evas_##Tn##_##Name##_init, evas_##Tn##_##Name##_shutdown }
83
84EVAS_EINA_STATIC_MODULE_DEFINE(engine, buffer);
85EVAS_EINA_STATIC_MODULE_DEFINE(engine, direct3d);
86EVAS_EINA_STATIC_MODULE_DEFINE(engine, directfb);
87EVAS_EINA_STATIC_MODULE_DEFINE(engine, fb);
88EVAS_EINA_STATIC_MODULE_DEFINE(engine, gl_x11);
89EVAS_EINA_STATIC_MODULE_DEFINE(engine, gl_sdl);
90EVAS_EINA_STATIC_MODULE_DEFINE(engine, psl1ght);
91EVAS_EINA_STATIC_MODULE_DEFINE(engine, software_16);
92EVAS_EINA_STATIC_MODULE_DEFINE(engine, software_16_ddraw);
93EVAS_EINA_STATIC_MODULE_DEFINE(engine, software_16_sdl);
94EVAS_EINA_STATIC_MODULE_DEFINE(engine, software_16_wince);
95EVAS_EINA_STATIC_MODULE_DEFINE(engine, software_16_x11);
96EVAS_EINA_STATIC_MODULE_DEFINE(engine, software_8);
97EVAS_EINA_STATIC_MODULE_DEFINE(engine, software_8_x11);
98EVAS_EINA_STATIC_MODULE_DEFINE(engine, software_ddraw);
99EVAS_EINA_STATIC_MODULE_DEFINE(engine, software_gdi);
100EVAS_EINA_STATIC_MODULE_DEFINE(engine, software_generic);
101EVAS_EINA_STATIC_MODULE_DEFINE(engine, software_sdl);
102EVAS_EINA_STATIC_MODULE_DEFINE(engine, software_x11);
103EVAS_EINA_STATIC_MODULE_DEFINE(image_loader, bmp);
104EVAS_EINA_STATIC_MODULE_DEFINE(image_loader, edb);
105EVAS_EINA_STATIC_MODULE_DEFINE(image_loader, eet);
106EVAS_EINA_STATIC_MODULE_DEFINE(image_loader, generic);
107EVAS_EINA_STATIC_MODULE_DEFINE(image_loader, gif);
108EVAS_EINA_STATIC_MODULE_DEFINE(image_loader, ico);
109EVAS_EINA_STATIC_MODULE_DEFINE(image_loader, jpeg);
110EVAS_EINA_STATIC_MODULE_DEFINE(image_loader, pmaps);
111EVAS_EINA_STATIC_MODULE_DEFINE(image_loader, png);
112EVAS_EINA_STATIC_MODULE_DEFINE(image_loader, psd);
113EVAS_EINA_STATIC_MODULE_DEFINE(image_loader, svg);
114EVAS_EINA_STATIC_MODULE_DEFINE(image_loader, tga);
115EVAS_EINA_STATIC_MODULE_DEFINE(image_loader, tiff);
116EVAS_EINA_STATIC_MODULE_DEFINE(image_loader, wbmp);
117EVAS_EINA_STATIC_MODULE_DEFINE(image_loader, xpm);
118EVAS_EINA_STATIC_MODULE_DEFINE(image_saver, edb);
119EVAS_EINA_STATIC_MODULE_DEFINE(image_saver, eet);
120EVAS_EINA_STATIC_MODULE_DEFINE(image_saver, jpeg);
121EVAS_EINA_STATIC_MODULE_DEFINE(image_saver, png);
122EVAS_EINA_STATIC_MODULE_DEFINE(image_saver, tiff);
123
124static const struct {
125 Eina_Bool (*init)(void);
126 void (*shutdown)(void);
127} evas_static_module[] = {
128#ifdef EVAS_STATIC_BUILD_BUFFER
129 EVAS_EINA_STATIC_MODULE_USE(engine, buffer),
130#endif
131#ifdef EVAS_STATIC_BUILD_DIRECT3D
132 EVAS_EINA_STATIC_MODULE_USE(engine, direct3d),
133#endif
134#ifdef EVAS_STATIC_BUILD_DIRECTFB
135 EVAS_EINA_STATIC_MODULE_USE(engine, directfb),
136#endif
137#ifdef EVAS_STATIC_BUILD_FB
138 EVAS_EINA_STATIC_MODULE_USE(engine, fb),
139#endif
140#ifdef EVAS_STATIC_BUILD_GL_X11
141 EVAS_EINA_STATIC_MODULE_USE(engine, gl_x11),
142#endif
143#ifdef EVAS_STATIC_BUILD_GL_SDL
144 EVAS_EINA_STATIC_MODULE_USE(engine, gl_sdl),
145#endif
146#ifdef EVAS_STATIC_BUILD_PSL1GHT
147 EVAS_EINA_STATIC_MODULE_USE(engine, psl1ght),
148#endif
149#ifdef EVAS_STATIC_BUILD_SOFTWARE_16
150 EVAS_EINA_STATIC_MODULE_USE(engine, software_16),
151#endif
152#ifdef EVAS_STATIC_BUILD_SOFTWARE_16_DDRAW
153 EVAS_EINA_STATIC_MODULE_USE(engine, software_16_ddraw),
154#endif
155#ifdef EVAS_STATIC_BUILD_SOFTWARE_16_SDL
156 EVAS_EINA_STATIC_MODULE_USE(engine, software_16_sdl),
157#endif
158#ifdef EVAS_STATIC_BUILD_SOFTWARE_16_WINCE
159 EVAS_EINA_STATIC_MODULE_USE(engine, software_16_wince),
160#endif
161#ifdef EVAS_STATIC_BUILD_SOFTWARE_16_X11
162 EVAS_EINA_STATIC_MODULE_USE(engine, software_16_x11),
163#endif
164#ifdef EVAS_STATIC_BUILD_SOFTWARE_16_DDRAW
165 EVAS_EINA_STATIC_MODULE_USE(engine, software_ddraw),
166#endif
167#ifdef EVAS_STATIC_BUILD_SOFTWARE_16_GDI
168 EVAS_EINA_STATIC_MODULE_USE(engine, software_gdi),
169#endif
170#ifdef EVAS_STATIC_BUILD_SOFTWARE_8
171 EVAS_EINA_STATIC_MODULE_USE(engine, software_8),
172#endif
173#ifdef EVAS_STATIC_BUILD_SOFTWARE_8_X11
174 EVAS_EINA_STATIC_MODULE_USE(engine, software_8_x11),
175#endif
176#ifdef EVAS_STATIC_BUILD_SOFTWARE_GENERIC
177 EVAS_EINA_STATIC_MODULE_USE(engine, software_generic),
178#endif
179#ifdef EVAS_STATIC_BUILD_SOFTWARE_SDL
180 EVAS_EINA_STATIC_MODULE_USE(engine, software_sdl),
181#endif
182#ifdef EVAS_STATIC_BUILD_SOFTWARE_X11
183 EVAS_EINA_STATIC_MODULE_USE(engine, software_x11),
184#endif
185#ifdef EVAS_STATIC_BUILD_BMP
186 EVAS_EINA_STATIC_MODULE_USE(image_loader, bmp),
187#endif
188#ifdef EVAS_STATIC_BUILD_EDB
189 EVAS_EINA_STATIC_MODULE_USE(image_loader, edb),
190#endif
191#ifdef EVAS_STATIC_BUILD_EET
192 EVAS_EINA_STATIC_MODULE_USE(image_loader, eet),
193#endif
194#ifdef EVAS_STATIC_BUILD_GENERIC
195 EVAS_EINA_STATIC_MODULE_USE(image_loader, generic),
196#endif
197#ifdef EVAS_STATIC_BUILD_GIF
198 EVAS_EINA_STATIC_MODULE_USE(image_loader, gif),
199#endif
200#ifdef EVAS_STATIC_BUILD_ICO
201 EVAS_EINA_STATIC_MODULE_USE(image_loader, ico),
202#endif
203#ifdef EVAS_STATIC_BUILD_JPEG
204 EVAS_EINA_STATIC_MODULE_USE(image_loader, jpeg),
205#endif
206#ifdef EVAS_STATIC_BUILD_PMAPS
207 EVAS_EINA_STATIC_MODULE_USE(image_loader, pmaps),
208#endif
209#ifdef EVAS_STATIC_BUILD_PNG
210 EVAS_EINA_STATIC_MODULE_USE(image_loader, png),
211#endif
212#ifdef EVAS_STATIC_BUILD_PSD
213 EVAS_EINA_STATIC_MODULE_USE(image_loader, psd),
214#endif
215#ifdef EVAS_STATIC_BUILD_SVG
216 EVAS_EINA_STATIC_MODULE_USE(image_loader, svg),
217#endif
218#ifdef EVAS_STATIC_BUILD_TGA
219 EVAS_EINA_STATIC_MODULE_USE(image_loader, tga),
220#endif
221#ifdef EVAS_STATIC_BUILD_TIFF
222 EVAS_EINA_STATIC_MODULE_USE(image_loader, tiff),
223#endif
224#ifdef EVAS_STATIC_BUILD_WBMP
225 EVAS_EINA_STATIC_MODULE_USE(image_loader, wbmp),
226#endif
227#ifdef EVAS_STATIC_BUILD_XPM
228 EVAS_EINA_STATIC_MODULE_USE(image_loader, xpm),
229#endif
230#ifdef EVAS_STATIC_BUILD_EDB
231 EVAS_EINA_STATIC_MODULE_USE(image_saver, edb),
232#endif
233#ifdef EVAS_STATIC_BUILD_EET
234 EVAS_EINA_STATIC_MODULE_USE(image_saver, eet),
235#endif
236#if defined (EVAS_BUILD_SAVER_JPEG) && defined (EVAS_STATIC_BUILD_JPEG)
237 EVAS_EINA_STATIC_MODULE_USE(image_saver, jpeg),
238#endif
239#ifdef EVAS_STATIC_BUILD_PNG
240 EVAS_EINA_STATIC_MODULE_USE(image_saver, png),
241#endif
242#ifdef EVAS_STATIC_BUILD_TIFF
243 EVAS_EINA_STATIC_MODULE_USE(image_saver, tiff),
244#endif
245 { NULL, NULL }
246};
247
248/* this will alloc an Evas_Module struct for each module
249 * it finds on the paths */
250void
251evas_module_init(void)
252{
253 int i;
254
255 evas_module_paths_init();
256
257 evas_modules[EVAS_MODULE_TYPE_ENGINE] = eina_hash_string_small_new(/* FIXME: Add a function to cleanup stuff. */ NULL);
258 evas_modules[EVAS_MODULE_TYPE_IMAGE_LOADER] = eina_hash_string_small_new(/* FIXME: Add a function to cleanup stuff. */ NULL);
259 evas_modules[EVAS_MODULE_TYPE_IMAGE_SAVER] = eina_hash_string_small_new(/* FIXME: Add a function to cleanup stuff. */ NULL);
260 evas_modules[EVAS_MODULE_TYPE_OBJECT] = eina_hash_string_small_new(/* FIXME: Add a function to cleanup stuff. */ NULL);
261
262 evas_engines = eina_array_new(4);
263
264 for (i = 0; evas_static_module[i].init; ++i)
265 evas_static_module[i].init();
266}
267
268Eina_Bool
269evas_module_register(const Evas_Module_Api *module, Evas_Module_Type type)
270{
271 Evas_Module *em;
272
273 if ((unsigned int)type > 3) return EINA_FALSE;
274 if (!module) return EINA_FALSE;
275 if (module->version != EVAS_MODULE_API_VERSION) return EINA_FALSE;
276
277 em = eina_hash_find(evas_modules[type], module->name);
278 if (em) return EINA_FALSE;
279
280 em = calloc(1, sizeof (Evas_Module));
281 if (!em) return EINA_FALSE;
282
283 em->definition = module;
284
285 if (type == EVAS_MODULE_TYPE_ENGINE)
286 {
287 eina_array_push(evas_engines, em);
288 em->id_engine = eina_array_count_get(evas_engines);
289 }
290
291 eina_hash_direct_add(evas_modules[type], module->name, em);
292
293 return EINA_TRUE;
294}
295
296Eina_List *
297evas_module_engine_list(void)
298{
299 Evas_Module *em;
300 Eina_List *r = NULL;
301 Eina_Array_Iterator iterator;
302 unsigned int i;
303
304 EINA_ARRAY_ITER_NEXT(evas_engines, i, em, iterator)
305 r = eina_list_append(r, em->definition->name);
306
307 return r;
308}
309
310Eina_Bool
311evas_module_unregister(const Evas_Module_Api *module, Evas_Module_Type type)
312{
313 Evas_Module *em;
314
315 if ((unsigned int)type > 3) return EINA_FALSE;
316 if (!module) return EINA_FALSE;
317
318 em = eina_hash_find(evas_modules[type], module->name);
319 if (!em || em->definition != module) return EINA_FALSE;
320
321 if (type == EVAS_MODULE_TYPE_ENGINE)
322 eina_array_data_set(evas_engines, em->id_engine, NULL);
323
324 eina_hash_del(evas_modules[type], module->name, em);
325 free(em);
326
327 return EINA_TRUE;
328}
329
330#if defined(__CEGCC__) || defined(__MINGW32CE__)
331# define EVAS_MODULE_NAME_IMAGE_SAVER "saver_%s.dll"
332# define EVAS_MODULE_NAME_IMAGE_LOADER "loader_%s.dll"
333# define EVAS_MODULE_NAME_ENGINE "engine_%s.dll"
334# define EVAS_MODULE_NAME_OBJECT "object_%s.dll"
335#elif _WIN32
336# define EVAS_MODULE_NAME_IMAGE_SAVER "module.dll"
337# define EVAS_MODULE_NAME_IMAGE_LOADER "module.dll"
338# define EVAS_MODULE_NAME_ENGINE "module.dll"
339# define EVAS_MODULE_NAME_OBJECT "module.dll"
340#else
341# define EVAS_MODULE_NAME_IMAGE_SAVER "module.so"
342# define EVAS_MODULE_NAME_IMAGE_LOADER "module.so"
343# define EVAS_MODULE_NAME_ENGINE "module.so"
344# define EVAS_MODULE_NAME_OBJECT "module.so"
345#endif
346
347Evas_Module *
348evas_module_find_type(Evas_Module_Type type, const char *name)
349{
350 const char *path;
351 const char *format = NULL;
352 char buffer[4096];
353 Evas_Module *em;
354 Eina_Module *en;
355 Eina_List *l;
356
357 if ((unsigned int)type > 3) return NULL;
358
359 em = eina_hash_find(evas_modules[type], name);
360 if (em) return em;
361
362 EINA_LIST_FOREACH(evas_module_paths, l, path)
363 {
364 switch (type)
365 {
366 case EVAS_MODULE_TYPE_ENGINE: format = "%s/engines/%s/%s/" EVAS_MODULE_NAME_ENGINE; break;
367 case EVAS_MODULE_TYPE_IMAGE_LOADER: format = "%s/loaders/%s/%s/" EVAS_MODULE_NAME_IMAGE_LOADER; break;
368 case EVAS_MODULE_TYPE_IMAGE_SAVER: format = "%s/savers/%s/%s/" EVAS_MODULE_NAME_IMAGE_SAVER; break;
369 case EVAS_MODULE_TYPE_OBJECT: format = "%s/object/%s/%s/" EVAS_MODULE_NAME_OBJECT; break;
370 }
371
372 snprintf(buffer, sizeof (buffer), format, path, name, MODULE_ARCH, name);
373 if (!evas_file_path_is_file(buffer)) continue;
374
375 en = eina_module_new(buffer);
376 if (!en) continue;
377
378 if (!eina_module_load(en))
379 {
380 eina_module_free(en);
381 continue;
382 }
383
384 em = eina_hash_find(evas_modules[type], name);
385 if (em)
386 {
387 eina_evas_modules = eina_list_append(eina_evas_modules, en);
388 return em;
389 }
390
391 eina_module_free(en);
392 }
393
394 return NULL;
395}
396
397Evas_Module *
398evas_module_engine_get(int render_method)
399{
400 if ((render_method <= 0) ||
401 ((unsigned int)render_method > eina_array_count_get(evas_engines)))
402 return NULL;
403 return eina_array_data_get(evas_engines, render_method - 1);
404}
405
406void
407evas_module_foreach_image_loader(Eina_Hash_Foreach cb, const void *fdata)
408{
409 eina_hash_foreach(evas_modules[EVAS_MODULE_TYPE_IMAGE_LOADER], cb, fdata);
410}
411
412int
413evas_module_load(Evas_Module *em)
414{
415 if (em->loaded) return 1;
416 if (!em->definition) return 0;
417
418 if (!em->definition->func.open(em)) return 0;
419 em->loaded = 1;
420
421#ifdef BUILD_ASYNC_PRELOAD
422 LKI(em->lock);
423#endif
424 return 1;
425}
426
427void
428evas_module_unload(Evas_Module *em)
429{
430 if (!em->loaded)
431 return;
432 if (!em->definition)
433 return ;
434
435// for now lets not unload modules - they may still be in use.
436// em->definition->func.close(em);
437// em->loaded = 0;
438
439#ifdef BUILD_ASYNC_PRELOAD
440 LKD(em->lock);
441#endif
442}
443
444void
445evas_module_ref(Evas_Module *em)
446{
447#ifdef BUILD_ASYNC_PRELOAD
448 LKL(em->lock);
449#endif
450 em->ref++;
451#ifdef BUILD_ASYNC_PRELOAD
452 LKU(em->lock);
453#endif
454}
455
456void
457evas_module_unref(Evas_Module *em)
458{
459#ifdef BUILD_ASYNC_PRELOAD
460 LKL(em->lock);
461#endif
462 em->ref--;
463#ifdef BUILD_ASYNC_PRELOAD
464 LKU(em->lock);
465#endif
466}
467
468static int use_count = 0;
469
470void
471evas_module_use(Evas_Module *em)
472{
473 em->last_used = use_count;
474}
475
476void
477evas_module_clean(void)
478{
479 static int call_count = 0;
480/* int ago; */
481 int noclean = -1;
482/* Eina_List *l; */
483/* Evas_Module *em; */
484
485 /* only clean modules every 256 calls */
486 call_count++;
487 if (call_count <= 256) return;
488 call_count = 0;
489
490 if (noclean == -1)
491 {
492 if (getenv("EVAS_NOCLEAN"))
493 noclean = 1;
494 else
495 noclean = 0;
496 }
497 if (noclean == 1) return;
498
499 /* disable module cleaning for now - may cause instability with some modules */
500 return;
501
502 /* FIXME: Don't know what it is supposed to do. */
503/* /\* incriment use counter = 28bits *\/ */
504/* use_count++; */
505/* if (use_count > 0x0fffffff) use_count = 0; */
506
507/* /\* printf("CLEAN!\n"); *\/ */
508/* /\* go through all modules *\/ */
509/* EINA_LIST_FOREACH(evas_modules, l, em) */
510/* { */
511/* /\* printf("M %s %i %i\n", em->name, em->ref, em->loaded); *\/ */
512/* /\* if the module is refernced - skip *\/ */
513/* if ((em->ref > 0) || (!em->loaded)) continue; */
514/* /\* how many clean cycles ago was this module last used *\/ */
515/* ago = use_count - em->last_used; */
516/* if (em->last_used > use_count) ago += 0x10000000; */
517/* /\* if it was used last more than N clean cycles ago - unload *\/ */
518/* if (ago > 5) */
519/* { */
520/* /\* printf(" UNLOAD %s\n", em->name); *\/ */
521/* evas_module_unload(em); */
522/* } */
523/* } */
524}
525
526/* will dlclose all the modules loaded and free all the structs */
527void
528evas_module_shutdown(void)
529{
530 Eina_Module *en;
531 char *path;
532 int i;
533
534 for (i = 0; evas_static_module[i].shutdown; ++i)
535 evas_static_module[i].shutdown();
536
537 EINA_LIST_FREE(eina_evas_modules, en)
538 eina_module_free(en);
539
540 eina_hash_free(evas_modules[EVAS_MODULE_TYPE_ENGINE]);
541 evas_modules[EVAS_MODULE_TYPE_ENGINE] = NULL;
542 eina_hash_free(evas_modules[EVAS_MODULE_TYPE_IMAGE_LOADER]);
543 evas_modules[EVAS_MODULE_TYPE_IMAGE_LOADER] = NULL;
544 eina_hash_free(evas_modules[EVAS_MODULE_TYPE_IMAGE_SAVER]);
545 evas_modules[EVAS_MODULE_TYPE_IMAGE_SAVER] = NULL;
546 eina_hash_free(evas_modules[EVAS_MODULE_TYPE_OBJECT]);
547 evas_modules[EVAS_MODULE_TYPE_OBJECT] = NULL;
548
549 EINA_LIST_FREE(evas_module_paths, path)
550 free(path);
551
552 eina_array_free(evas_engines);
553 evas_engines = NULL;
554}
555
556EAPI int
557_evas_module_engine_inherit(Evas_Func *funcs, char *name)
558{
559 Evas_Module *em;
560
561 em = evas_module_find_type(EVAS_MODULE_TYPE_ENGINE, name);
562 if (em)
563 {
564 if (evas_module_load(em))
565 {
566 /* FIXME: no way to unref */
567 evas_module_ref(em);
568 evas_module_use(em);
569 *funcs = *((Evas_Func *)(em->functions));
570 return 1;
571 }
572 }
573 return 0;
574}
575
576static Eina_Prefix *pfx = NULL;
577
578EAPI const char *
579_evas_module_libdir_get(void)
580{
581 if (!pfx) pfx = eina_prefix_new
582 (NULL, _evas_module_libdir_get, "EVAS", "evas", NULL,
583 PACKAGE_BIN_DIR, PACKAGE_LIB_DIR, PACKAGE_DATA_DIR, PACKAGE_DATA_DIR);
584 if (!pfx) return NULL;
585 return eina_prefix_lib_get(pfx);
586}
diff --git a/libraries/evas/src/lib/file/evas_module.h b/libraries/evas/src/lib/file/evas_module.h
new file mode 100644
index 0000000..8699b6b
--- /dev/null
+++ b/libraries/evas/src/lib/file/evas_module.h
@@ -0,0 +1,94 @@
1#ifndef _EVAS_MODULE_H
2#define _EVAS_MODULE_H
3
4
5/* the module api version */
6#define EVAS_MODULE_API_VERSION 2
7
8
9/* the module types */
10typedef enum _Evas_Module_Type
11{
12 EVAS_MODULE_TYPE_ENGINE = 0,
13 EVAS_MODULE_TYPE_IMAGE_LOADER = 1,
14 EVAS_MODULE_TYPE_IMAGE_SAVER = 2,
15 EVAS_MODULE_TYPE_OBJECT = 3
16} Evas_Module_Type;
17
18
19typedef struct _Evas_Module_Api Evas_Module_Api;
20typedef struct _Evas_Module Evas_Module;
21typedef struct _Evas_Module_Path Evas_Module_Path;
22typedef struct _Evas_Module_Engine Evas_Module_Engine;
23typedef struct _Evas_Module_Public Evas_Module_Public;
24
25/* the module api structure, all modules should define this struct */
26struct _Evas_Module_Api
27{
28 int version;
29 const char *name;
30 const char *author;
31
32 struct
33 {
34 int (*open)(Evas_Module *);
35 void (*close)(Evas_Module *);
36 } func;
37};
38
39/* the module structure */
40struct _Evas_Module
41{
42 const Evas_Module_Api *definition;
43
44 void *functions; /* this are the functions exported by the module */
45 int id_engine; /* some internal data for the module i.e the id for engines */
46
47 int ref; /* how many refs */
48 int last_used; /* the cycle count when it was last used */
49
50 LK(lock);
51
52 unsigned char loaded : 1;
53};
54
55
56/* the internals of the module api use this struct to reference a path with a module type
57 * instead of deduce the type from the path.
58 * */
59struct _Evas_Module_Path
60{
61 Evas_Module_Type type;
62 char *path;
63};
64
65void evas_module_paths_init (void);
66void evas_module_init (void);
67Evas_Module *evas_module_find_type (Evas_Module_Type type, const char *name);
68Evas_Module *evas_module_engine_get(int render_method);
69void evas_module_foreach_image_loader(Eina_Hash_Foreach cb, const void *fdata);
70int evas_module_load (Evas_Module *em);
71void evas_module_unload (Evas_Module *em);
72void evas_module_ref (Evas_Module *em);
73void evas_module_unref (Evas_Module *em);
74void evas_module_use (Evas_Module *em);
75void evas_module_clean (void);
76void evas_module_shutdown (void);
77EAPI Eina_Bool evas_module_register (const Evas_Module_Api *module, Evas_Module_Type type);
78EAPI Eina_Bool evas_module_unregister (const Evas_Module_Api *module, Evas_Module_Type type);
79
80#define EVAS_MODULE_DEFINE(Type, Tn, Name) \
81 Eina_Bool evas_##Tn##_##Name##_init(void) \
82 { \
83 return evas_module_register(&evas_modapi, Type); \
84 } \
85 void evas_##Tn##_##Name##_shutdown(void) \
86 { \
87 evas_module_unregister(&evas_modapi, Type); \
88 }
89
90#define EVAS_EINA_MODULE_DEFINE(Tn, Name) \
91 EINA_MODULE_INIT(evas_##Tn##_##Name##_init); \
92 EINA_MODULE_SHUTDOWN(evas_##Tn##_##Name##_shutdown);
93
94#endif /* _EVAS_MODULE_H */
diff --git a/libraries/evas/src/lib/file/evas_path.c b/libraries/evas/src/lib/file/evas_path.c
new file mode 100644
index 0000000..ff13e20
--- /dev/null
+++ b/libraries/evas/src/lib/file/evas_path.c
@@ -0,0 +1,154 @@
1/* os dependent file code. for unix-y like fs's only for now */
2/* if your os doesn't use unix-like fs starting with "/" for the root and */
3/* the file path separator isn't "/" then you may need to help out by */
4/* adding in a new set of functions here */
5
6#ifdef HAVE_CONFIG_H
7# include <config.h>
8#endif
9
10#include <limits.h>
11#include <stdlib.h>
12#include <sys/types.h>
13#include <sys/stat.h>
14/* get the casefold feature! */
15#include <fnmatch.h>
16#ifndef _MSC_VER
17# include <unistd.h>
18# include <sys/param.h>
19#endif
20
21#ifdef HAVE_EVIL
22# include <Evil.h>
23#endif
24
25#include "evas_common.h"
26#include "evas_private.h"
27
28#ifdef _WIN32
29# define EVAS_PATH_SEPARATOR "\\"
30#else
31# define EVAS_PATH_SEPARATOR "/"
32#endif
33
34int
35evas_file_path_is_full_path(const char *path)
36{
37 if (!path) return 0;
38#if defined _WIN32_WCE
39 if (path[0] == '\\') return 1;
40#elif defined _WIN32
41 if ((path[0] == '\0') || (path[1] == '\0'))
42 return 0;
43 if (path[1] == ':') return 1;
44#else
45 if (path[0] == '/') return 1;
46#endif
47 return 0;
48}
49
50char *
51evas_file_path_join(const char *path, const char *end)
52{
53 char *res = NULL;
54 size_t len;
55
56 if ((!path) && (!end)) return NULL;
57 if (!path) return strdup(end);
58 if (!end) return strdup(path);
59 len = strlen(path);
60 len += strlen(end);
61 len += strlen(EVAS_PATH_SEPARATOR);
62 res = malloc(len + 1);
63 if (!res) return NULL;
64 strcpy(res, path);
65 strcat(res, EVAS_PATH_SEPARATOR);
66 strcat(res, end);
67 return res;
68}
69
70int
71evas_file_path_exists(const char *path)
72{
73 struct stat st;
74
75 if (!stat(path, &st)) return 1;
76 return 0;
77}
78
79int
80evas_file_path_is_file(const char *path)
81{
82 struct stat st;
83
84 if (stat(path, &st) == -1) return 0;
85 if (S_ISREG(st.st_mode)) return 1;
86 return 0;
87}
88
89int
90evas_file_path_is_dir(const char *path)
91{
92 struct stat st;
93
94 if (stat(path, &st) == -1) return 0;
95 if (S_ISDIR(st.st_mode)) return 1;
96 return 0;
97}
98
99Eina_List *
100evas_file_path_list(char *path, const char *match, int match_case)
101{
102 Eina_File_Direct_Info *info;
103 Eina_Iterator *it;
104 Eina_List *files = NULL;
105 int flags;
106
107 flags = FNM_PATHNAME;
108#ifdef FNM_CASEFOLD
109 if (!match_case)
110 flags |= FNM_CASEFOLD;
111#else
112/*#warning "Your libc does not provide case-insensitive matching!"*/
113#endif
114
115 it = eina_file_direct_ls(path);
116 EINA_ITERATOR_FOREACH(it, info)
117 {
118 if (match)
119 {
120 if (fnmatch(match, info->path + info->name_start, flags) == 0)
121 files = eina_list_append(files, strdup(info->path + info->name_start));
122 }
123 else
124 files = eina_list_append(files, strdup(info->path + info->name_start));
125 }
126 eina_iterator_free(it);
127 return files;
128}
129
130DATA64
131evas_file_modified_time(const char *file)
132{
133 struct stat st;
134
135 if (stat(file, &st) < 0) return 0;
136 if (st.st_ctime > st.st_mtime) return (DATA64)st.st_ctime;
137 else return (DATA64)st.st_mtime;
138 return 0;
139}
140
141char *
142evas_file_path_resolve(const char *file)
143{
144#if 0
145 char buf[PATH_MAX], *buf2;
146#endif
147
148 return strdup(file);
149#if 0
150 if (!realpath(file, buf)) return NULL;
151 buf2 = strdup(buf);
152 return buf2;
153#endif
154}
diff --git a/libraries/evas/src/lib/file/evas_path.h b/libraries/evas/src/lib/file/evas_path.h
new file mode 100644
index 0000000..e0aa6bb
--- /dev/null
+++ b/libraries/evas/src/lib/file/evas_path.h
@@ -0,0 +1,15 @@
1#ifndef _EVAS_PATH_H
2#define _EVAS_PATH_H
3
4
5int evas_file_path_is_full_path (const char *path);
6char *evas_file_path_join (const char *path, const char *end);
7int evas_file_path_exists (const char *path);
8int evas_file_path_is_file (const char *path);
9int evas_file_path_is_dir (const char *path);
10Eina_List *evas_file_path_list (char *path, const char *match, int match_case);
11DATA64 evas_file_modified_time (const char *file);
12char *evas_file_path_resolve (const char *file);
13
14
15#endif /* _EVAS_PATH_H */