aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/libraries/evas/src/lib/include
diff options
context:
space:
mode:
authorDavid Walter Seikel2012-01-04 18:41:13 +1000
committerDavid Walter Seikel2012-01-04 18:41:13 +1000
commitdd7595a3475407a7fa96a97393bae8c5220e8762 (patch)
treee341e911d7eb911a51684a7412ef7f7c7605d28e /libraries/evas/src/lib/include
parentAdd the skeleton. (diff)
downloadSledjHamr-dd7595a3475407a7fa96a97393bae8c5220e8762.zip
SledjHamr-dd7595a3475407a7fa96a97393bae8c5220e8762.tar.gz
SledjHamr-dd7595a3475407a7fa96a97393bae8c5220e8762.tar.bz2
SledjHamr-dd7595a3475407a7fa96a97393bae8c5220e8762.tar.xz
Add the base Enlightenment Foundation Libraries - eina, eet, evas, ecore, embryo, and edje.
Note that embryo wont be used, but I'm not sure yet if you can build edje without it.
Diffstat (limited to 'libraries/evas/src/lib/include')
-rw-r--r--libraries/evas/src/lib/include/Makefile.am13
-rw-r--r--libraries/evas/src/lib/include/Makefile.in542
-rw-r--r--libraries/evas/src/lib/include/evas_blend_ops.h378
-rw-r--r--libraries/evas/src/lib/include/evas_common.h1242
-rw-r--r--libraries/evas/src/lib/include/evas_common_soft16.h100
-rw-r--r--libraries/evas/src/lib/include/evas_common_soft8.h184
-rw-r--r--libraries/evas/src/lib/include/evas_inline.x259
-rw-r--r--libraries/evas/src/lib/include/evas_macros.h217
-rw-r--r--libraries/evas/src/lib/include/evas_mmx.h735
-rw-r--r--libraries/evas/src/lib/include/evas_options.h69
-rw-r--r--libraries/evas/src/lib/include/evas_private.h1107
11 files changed, 4846 insertions, 0 deletions
diff --git a/libraries/evas/src/lib/include/Makefile.am b/libraries/evas/src/lib/include/Makefile.am
new file mode 100644
index 0000000..5c986c2
--- /dev/null
+++ b/libraries/evas/src/lib/include/Makefile.am
@@ -0,0 +1,13 @@
1
2MAINTAINERCLEANFILES = Makefile.in
3
4EXTRA_DIST = \
5evas_inline.x \
6evas_private.h \
7evas_options.h \
8evas_macros.h \
9evas_mmx.h \
10evas_common.h \
11evas_common_soft8.h \
12evas_common_soft16.h \
13evas_blend_ops.h
diff --git a/libraries/evas/src/lib/include/Makefile.in b/libraries/evas/src/lib/include/Makefile.in
new file mode 100644
index 0000000..9d5c371
--- /dev/null
+++ b/libraries/evas/src/lib/include/Makefile.in
@@ -0,0 +1,542 @@
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@
17VPATH = @srcdir@
18pkgdatadir = $(datadir)/@PACKAGE@
19pkgincludedir = $(includedir)/@PACKAGE@
20pkglibdir = $(libdir)/@PACKAGE@
21pkglibexecdir = $(libexecdir)/@PACKAGE@
22am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
23install_sh_DATA = $(install_sh) -c -m 644
24install_sh_PROGRAM = $(install_sh) -c
25install_sh_SCRIPT = $(install_sh) -c
26INSTALL_HEADER = $(INSTALL_DATA)
27transform = $(program_transform_name)
28NORMAL_INSTALL = :
29PRE_INSTALL = :
30POST_INSTALL = :
31NORMAL_UNINSTALL = :
32PRE_UNINSTALL = :
33POST_UNINSTALL = :
34build_triplet = @build@
35host_triplet = @host@
36subdir = src/lib/include
37DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
38ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
39am__aclocal_m4_deps = $(top_srcdir)/m4/efl_attribute.m4 \
40 $(top_srcdir)/m4/efl_coverage.m4 \
41 $(top_srcdir)/m4/efl_doxygen.m4 \
42 $(top_srcdir)/m4/efl_fnmatch.m4 \
43 $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \
44 $(top_srcdir)/m4/evas_check_engine.m4 \
45 $(top_srcdir)/m4/evas_check_loader.m4 \
46 $(top_srcdir)/m4/evas_converter.m4 \
47 $(top_srcdir)/m4/evas_dither.m4 \
48 $(top_srcdir)/m4/evas_scaler.m4 $(top_srcdir)/m4/libtool.m4 \
49 $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
50 $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
51 $(top_srcdir)/configure.ac
52am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
53 $(ACLOCAL_M4)
54mkinstalldirs = $(install_sh) -d
55CONFIG_HEADER = $(top_builddir)/config.h
56CONFIG_CLEAN_FILES =
57CONFIG_CLEAN_VPATH_FILES =
58AM_V_GEN = $(am__v_GEN_$(V))
59am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
60am__v_GEN_0 = @echo " GEN " $@;
61AM_V_at = $(am__v_at_$(V))
62am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
63am__v_at_0 = @
64SOURCES =
65DIST_SOURCES =
66DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
67ACLOCAL = @ACLOCAL@
68ALLOCA = @ALLOCA@
69AMTAR = @AMTAR@
70AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
71AR = @AR@
72AS = @AS@
73AUTOCONF = @AUTOCONF@
74AUTOHEADER = @AUTOHEADER@
75AUTOMAKE = @AUTOMAKE@
76AWK = @AWK@
77CC = @CC@
78CCDEPMODE = @CCDEPMODE@
79CFLAGS = @CFLAGS@
80CHECK_CFLAGS = @CHECK_CFLAGS@
81CHECK_LIBS = @CHECK_LIBS@
82CPP = @CPP@
83CPPFLAGS = @CPPFLAGS@
84CXX = @CXX@
85CXXCPP = @CXXCPP@
86CXXDEPMODE = @CXXDEPMODE@
87CXXFLAGS = @CXXFLAGS@
88CYGPATH_W = @CYGPATH_W@
89DEFS = @DEFS@
90DEPDIR = @DEPDIR@
91DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@
92DIRECTFB_LIBS = @DIRECTFB_LIBS@
93DLLTOOL = @DLLTOOL@
94DSYMUTIL = @DSYMUTIL@
95DUMPBIN = @DUMPBIN@
96ECHO_C = @ECHO_C@
97ECHO_N = @ECHO_N@
98ECHO_T = @ECHO_T@
99ECORE_EVAS_CFLAGS = @ECORE_EVAS_CFLAGS@
100ECORE_EVAS_LIBS = @ECORE_EVAS_LIBS@
101EDB_CFLAGS = @EDB_CFLAGS@
102EDB_LIBS = @EDB_LIBS@
103EDJE_CFLAGS = @EDJE_CFLAGS@
104EDJE_LIBS = @EDJE_LIBS@
105EET_CFLAGS = @EET_CFLAGS@
106EET_LIBS = @EET_LIBS@
107EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@
108EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@
109EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@
110EGREP = @EGREP@
111EINA_CFLAGS = @EINA_CFLAGS@
112EINA_LIBS = @EINA_LIBS@
113EVAS_CFLAGS = @EVAS_CFLAGS@
114EVAS_LIBS = @EVAS_LIBS@
115EVAS_SSE3_CFLAGS = @EVAS_SSE3_CFLAGS@
116EVIL_CFLAGS = @EVIL_CFLAGS@
117EVIL_LIBS = @EVIL_LIBS@
118EXEEXT = @EXEEXT@
119FGREP = @FGREP@
120FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@
121FONTCONFIG_LIBS = @FONTCONFIG_LIBS@
122FREETYPE_CFLAGS = @FREETYPE_CFLAGS@
123FREETYPE_LIBS = @FREETYPE_LIBS@
124FRIBIDI_CFLAGS = @FRIBIDI_CFLAGS@
125FRIBIDI_LIBS = @FRIBIDI_LIBS@
126GL_EET_CFLAGS = @GL_EET_CFLAGS@
127GL_EET_LIBS = @GL_EET_LIBS@
128GREP = @GREP@
129HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@
130HARFBUZZ_LIBS = @HARFBUZZ_LIBS@
131INSTALL = @INSTALL@
132INSTALL_DATA = @INSTALL_DATA@
133INSTALL_PROGRAM = @INSTALL_PROGRAM@
134INSTALL_SCRIPT = @INSTALL_SCRIPT@
135INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
136LD = @LD@
137LDFLAGS = @LDFLAGS@
138LIBOBJS = @LIBOBJS@
139LIBS = @LIBS@
140LIBTOOL = @LIBTOOL@
141LINEBREAK_CFLAGS = @LINEBREAK_CFLAGS@
142LINEBREAK_LIBS = @LINEBREAK_LIBS@
143LIPO = @LIPO@
144LN_S = @LN_S@
145LTLIBOBJS = @LTLIBOBJS@
146MAKEINFO = @MAKEINFO@
147MKDIR_P = @MKDIR_P@
148MODULE_ARCH = @MODULE_ARCH@
149NM = @NM@
150NMEDIT = @NMEDIT@
151OBJC = @OBJC@
152OBJCDEPMODE = @OBJCDEPMODE@
153OBJCFLAGS = @OBJCFLAGS@
154OBJDUMP = @OBJDUMP@
155OBJEXT = @OBJEXT@
156OTOOL = @OTOOL@
157OTOOL64 = @OTOOL64@
158PACKAGE = @PACKAGE@
159PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
160PACKAGE_NAME = @PACKAGE_NAME@
161PACKAGE_STRING = @PACKAGE_STRING@
162PACKAGE_TARNAME = @PACKAGE_TARNAME@
163PACKAGE_URL = @PACKAGE_URL@
164PACKAGE_VERSION = @PACKAGE_VERSION@
165PATH_SEPARATOR = @PATH_SEPARATOR@
166PIXMAN_CFLAGS = @PIXMAN_CFLAGS@
167PIXMAN_LIBS = @PIXMAN_LIBS@
168PKG_CONFIG = @PKG_CONFIG@
169PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
170PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
171PNG_CFLAGS = @PNG_CFLAGS@
172PNG_LIBS = @PNG_LIBS@
173RANLIB = @RANLIB@
174SDL_CFLAGS = @SDL_CFLAGS@
175SDL_LIBS = @SDL_LIBS@
176SED = @SED@
177SET_MAKE = @SET_MAKE@
178SHELL = @SHELL@
179SHM_OPEN_LINK = @SHM_OPEN_LINK@
180STRIP = @STRIP@
181SVG_CFLAGS = @SVG_CFLAGS@
182SVG_LIBS = @SVG_LIBS@
183VALGRIND_CFLAGS = @VALGRIND_CFLAGS@
184VALGRIND_LIBS = @VALGRIND_LIBS@
185VERSION = @VERSION@
186VMAJ = @VMAJ@
187WIN32_CFLAGS = @WIN32_CFLAGS@
188WIN32_CPPFLAGS = @WIN32_CPPFLAGS@
189XCB_CFLAGS = @XCB_CFLAGS@
190XCB_GL_CFLAGS = @XCB_GL_CFLAGS@
191XCB_GL_LIBS = @XCB_GL_LIBS@
192XCB_LIBS = @XCB_LIBS@
193XEXT_CFLAGS = @XEXT_CFLAGS@
194XEXT_LIBS = @XEXT_LIBS@
195XMKMF = @XMKMF@
196X_CFLAGS = @X_CFLAGS@
197X_EXTRA_LIBS = @X_EXTRA_LIBS@
198X_LIBS = @X_LIBS@
199X_PRE_LIBS = @X_PRE_LIBS@
200abs_builddir = @abs_builddir@
201abs_srcdir = @abs_srcdir@
202abs_top_builddir = @abs_top_builddir@
203abs_top_srcdir = @abs_top_srcdir@
204ac_ct_CC = @ac_ct_CC@
205ac_ct_CXX = @ac_ct_CXX@
206ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
207ac_ct_OBJC = @ac_ct_OBJC@
208altivec_cflags = @altivec_cflags@
209am__include = @am__include@
210am__leading_dot = @am__leading_dot@
211am__quote = @am__quote@
212am__tar = @am__tar@
213am__untar = @am__untar@
214bindir = @bindir@
215build = @build@
216build_alias = @build_alias@
217build_cpu = @build_cpu@
218build_os = @build_os@
219build_vendor = @build_vendor@
220builddir = @builddir@
221datadir = @datadir@
222datarootdir = @datarootdir@
223dlopen_libs = @dlopen_libs@
224docdir = @docdir@
225dvidir = @dvidir@
226edje_cc = @edje_cc@
227efl_doxygen = @efl_doxygen@
228efl_have_doxygen = @efl_have_doxygen@
229evas_engine_buffer_cflags = @evas_engine_buffer_cflags@
230evas_engine_buffer_libs = @evas_engine_buffer_libs@
231evas_engine_direct3d_cflags = @evas_engine_direct3d_cflags@
232evas_engine_direct3d_libs = @evas_engine_direct3d_libs@
233evas_engine_directfb_cflags = @evas_engine_directfb_cflags@
234evas_engine_directfb_libs = @evas_engine_directfb_libs@
235evas_engine_fb_cflags = @evas_engine_fb_cflags@
236evas_engine_fb_libs = @evas_engine_fb_libs@
237evas_engine_gl_cocoa_cflags = @evas_engine_gl_cocoa_cflags@
238evas_engine_gl_cocoa_libs = @evas_engine_gl_cocoa_libs@
239evas_engine_gl_common_libs = @evas_engine_gl_common_libs@
240evas_engine_gl_sdl_cflags = @evas_engine_gl_sdl_cflags@
241evas_engine_gl_sdl_libs = @evas_engine_gl_sdl_libs@
242evas_engine_gl_xcb_cflags = @evas_engine_gl_xcb_cflags@
243evas_engine_gl_xcb_libs = @evas_engine_gl_xcb_libs@
244evas_engine_gl_xlib_cflags = @evas_engine_gl_xlib_cflags@
245evas_engine_gl_xlib_libs = @evas_engine_gl_xlib_libs@
246evas_engine_psl1ght_cflags = @evas_engine_psl1ght_cflags@
247evas_engine_psl1ght_libs = @evas_engine_psl1ght_libs@
248evas_engine_software_16_ddraw_cflags = @evas_engine_software_16_ddraw_cflags@
249evas_engine_software_16_ddraw_libs = @evas_engine_software_16_ddraw_libs@
250evas_engine_software_16_sdl_cflags = @evas_engine_software_16_sdl_cflags@
251evas_engine_software_16_sdl_libs = @evas_engine_software_16_sdl_libs@
252evas_engine_software_16_wince_cflags = @evas_engine_software_16_wince_cflags@
253evas_engine_software_16_wince_libs = @evas_engine_software_16_wince_libs@
254evas_engine_software_16_x11_cflags = @evas_engine_software_16_x11_cflags@
255evas_engine_software_16_x11_libs = @evas_engine_software_16_x11_libs@
256evas_engine_software_8_x11_cflags = @evas_engine_software_8_x11_cflags@
257evas_engine_software_8_x11_libs = @evas_engine_software_8_x11_libs@
258evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@
259evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@
260evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@
261evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@
262evas_engine_software_sdl_cflags = @evas_engine_software_sdl_cflags@
263evas_engine_software_sdl_libs = @evas_engine_software_sdl_libs@
264evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@
265evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@
266evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@
267evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@
268evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@
269evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@
270evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@
271evas_image_loader_edb_libs = @evas_image_loader_edb_libs@
272evas_image_loader_eet_cflags = @evas_image_loader_eet_cflags@
273evas_image_loader_eet_libs = @evas_image_loader_eet_libs@
274evas_image_loader_generic_cflags = @evas_image_loader_generic_cflags@
275evas_image_loader_generic_libs = @evas_image_loader_generic_libs@
276evas_image_loader_gif_cflags = @evas_image_loader_gif_cflags@
277evas_image_loader_gif_libs = @evas_image_loader_gif_libs@
278evas_image_loader_ico_cflags = @evas_image_loader_ico_cflags@
279evas_image_loader_ico_libs = @evas_image_loader_ico_libs@
280evas_image_loader_jpeg_cflags = @evas_image_loader_jpeg_cflags@
281evas_image_loader_jpeg_libs = @evas_image_loader_jpeg_libs@
282evas_image_loader_pmaps_cflags = @evas_image_loader_pmaps_cflags@
283evas_image_loader_pmaps_libs = @evas_image_loader_pmaps_libs@
284evas_image_loader_png_cflags = @evas_image_loader_png_cflags@
285evas_image_loader_png_libs = @evas_image_loader_png_libs@
286evas_image_loader_psd_cflags = @evas_image_loader_psd_cflags@
287evas_image_loader_psd_libs = @evas_image_loader_psd_libs@
288evas_image_loader_svg_cflags = @evas_image_loader_svg_cflags@
289evas_image_loader_svg_libs = @evas_image_loader_svg_libs@
290evas_image_loader_tga_cflags = @evas_image_loader_tga_cflags@
291evas_image_loader_tga_libs = @evas_image_loader_tga_libs@
292evas_image_loader_tiff_cflags = @evas_image_loader_tiff_cflags@
293evas_image_loader_tiff_libs = @evas_image_loader_tiff_libs@
294evas_image_loader_wbmp_cflags = @evas_image_loader_wbmp_cflags@
295evas_image_loader_wbmp_libs = @evas_image_loader_wbmp_libs@
296evas_image_loader_xpm_cflags = @evas_image_loader_xpm_cflags@
297evas_image_loader_xpm_libs = @evas_image_loader_xpm_libs@
298exec_prefix = @exec_prefix@
299have_evas_engine_gl_x11 = @have_evas_engine_gl_x11@
300have_evas_engine_gl_xcb = @have_evas_engine_gl_xcb@
301have_evas_engine_gl_xlib = @have_evas_engine_gl_xlib@
302have_evas_engine_software_x11 = @have_evas_engine_software_x11@
303have_evas_engine_software_xcb = @have_evas_engine_software_xcb@
304have_evas_engine_software_xlib = @have_evas_engine_software_xlib@
305have_lcov = @have_lcov@
306host = @host@
307host_alias = @host_alias@
308host_cpu = @host_cpu@
309host_os = @host_os@
310host_vendor = @host_vendor@
311htmldir = @htmldir@
312includedir = @includedir@
313infodir = @infodir@
314install_sh = @install_sh@
315libdir = @libdir@
316libexecdir = @libexecdir@
317localedir = @localedir@
318localstatedir = @localstatedir@
319lt_ECHO = @lt_ECHO@
320lt_enable_auto_import = @lt_enable_auto_import@
321mandir = @mandir@
322mkdir_p = @mkdir_p@
323oldincludedir = @oldincludedir@
324pdfdir = @pdfdir@
325pkgconfig_requires_private = @pkgconfig_requires_private@
326prefix = @prefix@
327program_transform_name = @program_transform_name@
328psdir = @psdir@
329pthread_cflags = @pthread_cflags@
330pthread_libs = @pthread_libs@
331release_info = @release_info@
332requirement_evas = @requirement_evas@
333sbindir = @sbindir@
334sharedstatedir = @sharedstatedir@
335srcdir = @srcdir@
336sysconfdir = @sysconfdir@
337target_alias = @target_alias@
338top_build_prefix = @top_build_prefix@
339top_builddir = @top_builddir@
340top_srcdir = @top_srcdir@
341version_info = @version_info@
342MAINTAINERCLEANFILES = Makefile.in
343EXTRA_DIST = \
344evas_inline.x \
345evas_private.h \
346evas_options.h \
347evas_macros.h \
348evas_mmx.h \
349evas_common.h \
350evas_common_soft8.h \
351evas_common_soft16.h \
352evas_blend_ops.h
353
354all: all-am
355
356.SUFFIXES:
357$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
358 @for dep in $?; do \
359 case '$(am__configure_deps)' in \
360 *$$dep*) \
361 ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
362 && { if test -f $@; then exit 0; else break; fi; }; \
363 exit 1;; \
364 esac; \
365 done; \
366 echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/lib/include/Makefile'; \
367 $(am__cd) $(top_srcdir) && \
368 $(AUTOMAKE) --gnu src/lib/include/Makefile
369.PRECIOUS: Makefile
370Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
371 @case '$?' in \
372 *config.status*) \
373 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
374 *) \
375 echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
376 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
377 esac;
378
379$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
380 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
381
382$(top_srcdir)/configure: $(am__configure_deps)
383 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
384$(ACLOCAL_M4): $(am__aclocal_m4_deps)
385 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
386$(am__aclocal_m4_deps):
387
388mostlyclean-libtool:
389 -rm -f *.lo
390
391clean-libtool:
392 -rm -rf .libs _libs
393tags: TAGS
394TAGS:
395
396ctags: CTAGS
397CTAGS:
398
399
400distdir: $(DISTFILES)
401 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
402 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
403 list='$(DISTFILES)'; \
404 dist_files=`for file in $$list; do echo $$file; done | \
405 sed -e "s|^$$srcdirstrip/||;t" \
406 -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
407 case $$dist_files in \
408 */*) $(MKDIR_P) `echo "$$dist_files" | \
409 sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
410 sort -u` ;; \
411 esac; \
412 for file in $$dist_files; do \
413 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
414 if test -d $$d/$$file; then \
415 dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
416 if test -d "$(distdir)/$$file"; then \
417 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
418 fi; \
419 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
420 cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
421 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
422 fi; \
423 cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
424 else \
425 test -f "$(distdir)/$$file" \
426 || cp -p $$d/$$file "$(distdir)/$$file" \
427 || exit 1; \
428 fi; \
429 done
430check-am: all-am
431check: check-am
432all-am: Makefile
433installdirs:
434install: install-am
435install-exec: install-exec-am
436install-data: install-data-am
437uninstall: uninstall-am
438
439install-am: all-am
440 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
441
442installcheck: installcheck-am
443install-strip:
444 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
445 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
446 `test -z '$(STRIP)' || \
447 echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
448mostlyclean-generic:
449
450clean-generic:
451
452distclean-generic:
453 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
454 -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
455
456maintainer-clean-generic:
457 @echo "This command is intended for maintainers to use"
458 @echo "it deletes files that may require special tools to rebuild."
459 -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
460clean: clean-am
461
462clean-am: clean-generic clean-libtool mostlyclean-am
463
464distclean: distclean-am
465 -rm -f Makefile
466distclean-am: clean-am distclean-generic
467
468dvi: dvi-am
469
470dvi-am:
471
472html: html-am
473
474html-am:
475
476info: info-am
477
478info-am:
479
480install-data-am:
481
482install-dvi: install-dvi-am
483
484install-dvi-am:
485
486install-exec-am:
487
488install-html: install-html-am
489
490install-html-am:
491
492install-info: install-info-am
493
494install-info-am:
495
496install-man:
497
498install-pdf: install-pdf-am
499
500install-pdf-am:
501
502install-ps: install-ps-am
503
504install-ps-am:
505
506installcheck-am:
507
508maintainer-clean: maintainer-clean-am
509 -rm -f Makefile
510maintainer-clean-am: distclean-am maintainer-clean-generic
511
512mostlyclean: mostlyclean-am
513
514mostlyclean-am: mostlyclean-generic mostlyclean-libtool
515
516pdf: pdf-am
517
518pdf-am:
519
520ps: ps-am
521
522ps-am:
523
524uninstall-am:
525
526.MAKE: install-am install-strip
527
528.PHONY: all all-am check check-am clean clean-generic clean-libtool \
529 distclean distclean-generic distclean-libtool distdir dvi \
530 dvi-am html html-am info info-am install install-am \
531 install-data install-data-am install-dvi install-dvi-am \
532 install-exec install-exec-am install-html install-html-am \
533 install-info install-info-am install-man install-pdf \
534 install-pdf-am install-ps install-ps-am install-strip \
535 installcheck installcheck-am installdirs maintainer-clean \
536 maintainer-clean-generic mostlyclean mostlyclean-generic \
537 mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am
538
539
540# Tell versions [3.59,3.63) of GNU make to not export all variables.
541# Otherwise a system limit (for SysV at least) may be exceeded.
542.NOEXPORT:
diff --git a/libraries/evas/src/lib/include/evas_blend_ops.h b/libraries/evas/src/lib/include/evas_blend_ops.h
new file mode 100644
index 0000000..1ada384
--- /dev/null
+++ b/libraries/evas/src/lib/include/evas_blend_ops.h
@@ -0,0 +1,378 @@
1#ifndef EVAS_BLEND_OPS_H
2#define EVAS_BLEND_OPS_H
3
4#if defined BUILD_MMX || defined BUILD_SSE
5#include "evas_mmx.h"
6#endif
7
8#include "config.h"
9
10#ifdef NEED_SSE3
11# if defined BUILD_SSE3
12# include <immintrin.h>
13# endif
14#endif
15
16/* src pixel flags: */
17
18/* pixels none */
19#define SP_N 0
20/* pixels (argb default) */
21#define SP 1
22/* pixels are rgb (ie. alphas == 255) */
23#define SP_AN 2
24/* pixels alpha are sparse */
25#define SP_AS 3
26/* src pixels flags count */
27#define SP_LAST 4
28
29/* src mask flags: */
30
31/* mask none */
32#define SM_N 0
33/* mask (alpha) */
34#define SM 1
35/* mask alphas are 'trivial - ie. only 0 or 255 */
36#define SM_AT 2
37/* mask alphas are sparse */
38#define SM_AS 3
39/* src mask flags count */
40#define SM_LAST 4
41
42/* src color flags: */
43
44/* color is 0xffffffff */
45#define SC_N 0
46/* color (argb default) */
47#define SC 1
48/* color is rgb (ie. 0xffrrggbb) */
49#define SC_AN 2
50/* color is 'alpha' (ie. 0xaaaaaaaa) */
51#define SC_AA 3
52/* src color flags count */
53#define SC_LAST 4
54
55/* dst pixels flags: */
56
57/* pixels (argb default) */
58#define DP 0
59/* pixels are rgb (ie. alphas == 255) */
60#define DP_AN 1
61/* dst pixels flags count */
62#define DP_LAST 2
63
64/* cpu types flags */
65
66/* none, bad news */
67#define CPU_N 0
68/* cpu C */
69#define CPU_C 1
70/* cpu MMX */
71#define CPU_MMX 2
72/* cpu SSE */
73#define CPU_SSE 3
74/* cpu SSE2 */
75#define CPU_SSE2 4
76/* cpu flags count */
77#define CPU_NEON 5
78/* CPU SSE3 */
79#define CPU_SSE3 6
80/* cpu flags count */
81#define CPU_LAST 7
82
83
84/* some useful constants */
85
86extern const DATA32 ALPHA_255;
87extern const DATA32 ALPHA_256;
88
89/* some useful C macros */
90
91#define MUL4_256(a, r, g, b, c) \
92 ( (((((c) >> 8) & 0xff0000) * (a)) & 0xff000000) + \
93 (((((c) & 0xff0000) * (r)) >> 8) & 0xff0000) + \
94 (((((c) & 0xff00) * (g)) >> 8) & 0xff00) + \
95 ((((c) & 0xff) * (b)) >> 8) )
96
97#define MUL3_256(r, g, b, c) \
98 ( (((((c) & 0xff0000) * (r)) >> 8) & 0xff0000) + \
99 (((((c) & 0xff00) * (g)) >> 8) & 0xff00) + \
100 ((((c) & 0xff) * (b)) >> 8) )
101
102#define MUL_256(a, c) \
103 ( (((((c) >> 8) & 0x00ff00ff) * (a)) & 0xff00ff00) + \
104 (((((c) & 0x00ff00ff) * (a)) >> 8) & 0x00ff00ff) )
105
106#define MUL4_SYM(x, y) \
107 ( ((((((x) >> 16) & 0xff00) * (((y) >> 16) & 0xff00)) + 0xff0000) & 0xff000000) + \
108 ((((((x) >> 8) & 0xff00) * (((y) >> 16) & 0xff)) + 0xff00) & 0xff0000) + \
109 ((((((x) & 0xff00) * ((y) & 0xff00)) + 0xff00) >> 16) & 0xff00) + \
110 (((((x) & 0xff) * ((y) & 0xff)) + 0xff) >> 8) )
111
112#define MUL3_SYM(x, y) \
113 ( ((((((x) >> 8) & 0xff00) * (((y) >> 16) & 0xff)) + 0xff00) & 0xff0000) + \
114 ((((((x) & 0xff00) * ((y) & 0xff00)) + 0xff00) >> 16) & 0xff00) + \
115 (((((x) & 0xff) * ((y) & 0xff)) + 0xff) >> 8) )
116
117#define MUL_SYM(a, x) \
118 ( (((((x) >> 8) & 0x00ff00ff) * (a) + 0xff00ff) & 0xff00ff00) + \
119 (((((x) & 0x00ff00ff) * (a) + 0xff00ff) >> 8) & 0x00ff00ff) )
120
121#define MUL_A_256(a, c) \
122 ( ((((c) >> 8) & 0x00ff0000) * (a)) & 0xff000000 )
123
124#define MUL_A_SYM(a, c) \
125 ( (((((c) >> 8) & 0x00ff0000) * (a)) + 0x00ff0000) & 0xff000000 )
126
127#define INTERP_256(a, c0, c1) \
128 ( (((((((c0) >> 8) & 0xff00ff) - (((c1) >> 8) & 0xff00ff)) * (a)) \
129 + ((c1) & 0xff00ff00)) & 0xff00ff00) + \
130 (((((((c0) & 0xff00ff) - ((c1) & 0xff00ff)) * (a)) >> 8) \
131 + ((c1) & 0xff00ff)) & 0xff00ff) )
132
133#define INTERP_RGB_256(a, c0, c1) \
134 ( (((((((c0) >> 8) & 0xff) - (((c1) >> 8) & 0xff)) * (a)) \
135 + ((c1) & 0xff00)) & 0xff00) + \
136 (((((((c0) & 0xff00ff) - ((c1) & 0xff00ff)) * (a)) >> 8) \
137 + ((c1) & 0xff00ff)) & 0xff00ff) )
138
139#define INTERP_A_256(a, c0, c1) \
140 ( (((((((c0) >> 8) & 0xff0000) - (((c1) >> 8) & 0xff0000)) * (a)) \
141 + ((c1) & 0xff000000)) & 0xff000000) )
142
143
144/* some useful MMX macros */
145
146#ifdef BUILD_MMX
147#define MOV_A2R(a, mma) \
148 movd_m2r(a, mma); \
149 punpcklwd_r2r(mma, mma); \
150 punpckldq_r2r(mma, mma);
151
152#define MOV_P2R(c, mmc, mmz) \
153 movd_m2r(c, mmc); \
154 punpcklbw_r2r(mmz, mmc);
155
156#define MOV_R2P(mmc, c, mmz) \
157 packuswb_r2r(mmz, mmc); \
158 movd_r2m(mmc, c);
159
160#define MUL4_256_R2R(mmx, mmy) \
161 pmullw_r2r(mmx, mmy); \
162 psrlw_i2r(8, mmy);
163
164#define MUL4_SYM_R2R(mmx, mmy, mm255) \
165 pmullw_r2r(mmx, mmy); \
166 paddw_r2r(mm255, mmy); \
167 psrlw_i2r(8, mmy);
168
169#define MOV_RA2R(mmx, mma) \
170 movq_r2r(mmx, mma); \
171 punpckhwd_r2r(mma, mma); \
172 punpckhdq_r2r(mma, mma);
173
174#define MOV_PA2R(c, mma) \
175 movd_m2r(c, mma); \
176 punpcklbw_r2r(mma, mma); \
177 punpckhwd_r2r(mma, mma); \
178 punpckhdq_r2r(mma, mma);
179
180#define INTERP_256_R2R(mma, mmx, mmy, mm255) \
181 psubw_r2r(mmy, mmx); \
182 pmullw_r2r(mma, mmx); \
183 psrlw_i2r(8, mmx); \
184 paddw_r2r(mmx, mmy); \
185 pand_r2r(mm255, mmy);
186
187#endif
188
189
190/* some useful SSE3 inline functions */
191
192#ifdef NEED_SSE3
193#ifdef BUILD_SSE3
194
195static __m128i GA_MASK_SSE3;
196static __m128i RB_MASK_SSE3;
197static __m128i SYM4_MASK_SSE3;
198static __m128i RGB_MASK_SSE3;
199//static __m128i A_MASK_SSE3;
200
201static __m128i ALPHA_SSE3;
202
203EFL_ALWAYS_INLINE __m128i
204mul_256_sse3(__m128i a, __m128i c) {
205
206 /* prepare alpha for word multiplication */
207 __m128i a_l = a;
208 __m128i a_h = a;
209 a_l = _mm_unpacklo_epi16(a_l, a_l);
210 a_h = _mm_unpackhi_epi16(a_h, a_h);
211 __m128i a0 = (__m128i) _mm_shuffle_ps( (__m128)a_l, (__m128)a_h, 0x88);
212
213 /* first half of calc */
214 __m128i c0 = c;
215 c0 = _mm_srli_epi32(c0, 8);
216 c0 = _mm_and_si128(GA_MASK_SSE3, c0);
217 c0 = _mm_mullo_epi16(a0, c0);
218 c0 = _mm_and_si128(RB_MASK_SSE3, c0);
219
220 /* second half of calc */
221 __m128i c1 = c;
222 c1 = _mm_and_si128(GA_MASK_SSE3, c1);
223 c1 = _mm_mullo_epi16(a0, c1);
224 c1 = _mm_srli_epi32(c1, 8);
225 c1 = _mm_and_si128(GA_MASK_SSE3, c1);
226
227 /* combine */
228 return _mm_add_epi32(c0, c1);
229}
230
231EFL_ALWAYS_INLINE __m128i
232sub4_alpha_sse3(__m128i c) {
233
234 __m128i c0 = c;
235
236 c0 = _mm_srli_epi32(c0, 24);
237 return _mm_sub_epi32(ALPHA_SSE3, c0);
238}
239
240EFL_ALWAYS_INLINE __m128i
241interp4_256_sse3(__m128i a, __m128i c0, __m128i c1)
242{
243 const __m128i zero = _mm_setzero_si128();
244
245 __m128i a_l = a;
246 __m128i a_h = a;
247 a_l = _mm_unpacklo_epi16(a_l, a_l);
248 a_h = _mm_unpackhi_epi16(a_h, a_h);
249
250 __m128i a_t = _mm_slli_epi64(a_l, 32);
251 __m128i a_t0 = _mm_slli_epi64(a_h, 32);
252
253 a_l = _mm_add_epi32(a_l, a_t);
254 a_h = _mm_add_epi32(a_h, a_t0);
255
256 __m128i c0_l = c0;
257 __m128i c0_h = c0;
258
259 c0_l = _mm_unpacklo_epi8(c0_l, zero);
260 c0_h = _mm_unpackhi_epi8(c0_h, zero);
261
262 __m128i c1_l = c1;
263 __m128i c1_h = c1;
264
265 c1_l = _mm_unpacklo_epi8(c1_l, zero);
266 c1_h = _mm_unpackhi_epi8(c1_h, zero);
267
268 __m128i cl_sub = _mm_sub_epi16(c0_l, c1_l);
269 __m128i ch_sub = _mm_sub_epi16(c0_h, c1_h);
270
271 cl_sub = _mm_mullo_epi16(cl_sub, a_l);
272 ch_sub = _mm_mullo_epi16(ch_sub, a_h);
273
274 __m128i c1ls = _mm_slli_epi16(c1_l, 8);
275 __m128i c1hs = _mm_slli_epi16(c1_h, 8);
276
277 cl_sub = _mm_add_epi16(cl_sub, c1ls);
278 ch_sub = _mm_add_epi16(ch_sub, c1hs);
279
280 cl_sub = _mm_and_si128(cl_sub, RB_MASK_SSE3);
281 ch_sub = _mm_and_si128(ch_sub, RB_MASK_SSE3);
282
283 cl_sub = _mm_srli_epi64(cl_sub, 8);
284 ch_sub = _mm_srli_epi64(ch_sub, 8);
285
286 cl_sub = _mm_packus_epi16(cl_sub, cl_sub);
287 ch_sub = _mm_packus_epi16(ch_sub, ch_sub);
288
289 return (__m128i) _mm_shuffle_ps( (__m128)cl_sub, (__m128)ch_sub, 0x44);
290}
291
292EFL_ALWAYS_INLINE __m128i
293mul_sym_sse3(__m128i a, __m128i c) {
294
295 /* Prepare alpha for word mult */
296 __m128i a_l = a;
297 __m128i a_h = a;
298 a_l = _mm_unpacklo_epi16(a_l, a_l);
299 a_h = _mm_unpackhi_epi16(a_h, a_h);
300 __m128i a0 = (__m128i) _mm_shuffle_ps( (__m128)a_l, (__m128)a_h, 0x88);
301
302 /* first part */
303 __m128i c0 = c;
304 c0 = _mm_srli_epi32(c0, 8);
305 c0 = _mm_and_si128(GA_MASK_SSE3, c0);
306 c0 = _mm_mullo_epi16(a0, c0);
307 c0 = _mm_add_epi32(c0, GA_MASK_SSE3);
308 c0 = _mm_and_si128(RB_MASK_SSE3, c0);
309
310 /* second part */
311 __m128i c1 = c;
312 c1 = _mm_and_si128(GA_MASK_SSE3, c1);
313 c1 = _mm_mullo_epi16(a0, c1);
314 c1 = _mm_add_epi32(c1, GA_MASK_SSE3);
315 c1 = _mm_srli_epi32(c1, 8);
316 c1 = _mm_and_si128(GA_MASK_SSE3, c1);
317
318 return _mm_add_epi32(c0, c1);
319}
320
321EFL_ALWAYS_INLINE __m128i
322mul4_sym_sse3(__m128i x, __m128i y) {
323
324 const __m128i zero = _mm_setzero_si128();
325
326 __m128i x_l = _mm_unpacklo_epi8(x, zero);
327 __m128i x_h = _mm_unpackhi_epi8(x, zero);
328
329 __m128i y_l = _mm_unpacklo_epi8(y, zero);
330 __m128i y_h = _mm_unpackhi_epi8(y, zero);
331
332 __m128i r_l = _mm_mullo_epi16(x_l, y_l);
333 __m128i r_h = _mm_mullo_epi16(x_h, y_h);
334
335 r_l = _mm_add_epi16(r_l, SYM4_MASK_SSE3);
336 r_h = _mm_add_epi16(r_h, SYM4_MASK_SSE3);
337
338 r_l = _mm_srli_epi16(r_l, 8);
339 r_h = _mm_srli_epi16(r_h, 8);
340
341 return _mm_packus_epi16(r_l, r_h);
342}
343
344EFL_ALWAYS_INLINE __m128i
345mul3_sym_sse3(__m128i x, __m128i y) {
346
347 __m128i res = mul4_sym_sse3(x, y);
348 return _mm_and_si128(res, RGB_MASK_SSE3);
349}
350
351#define LOOP_ALIGNED_U1_A48_SSE3(DEST, LENGTH, UOP, A4OP, A8OP) \
352 { \
353 while((uintptr_t)DEST & 0xF && LENGTH) UOP \
354 \
355 while(LENGTH) { \
356 switch(LENGTH) { \
357 case 3: UOP \
358 case 2: UOP \
359 case 1: UOP \
360 break; \
361 case 7: \
362 case 6: \
363 case 5: \
364 case 4: \
365 A4OP \
366 break; \
367 default: \
368 A8OP \
369 break; \
370 } \
371 } \
372 }
373
374
375#endif
376#endif
377
378#endif
diff --git a/libraries/evas/src/lib/include/evas_common.h b/libraries/evas/src/lib/include/evas_common.h
new file mode 100644
index 0000000..f817202
--- /dev/null
+++ b/libraries/evas/src/lib/include/evas_common.h
@@ -0,0 +1,1242 @@
1#ifndef EVAS_COMMON_H
2#define EVAS_COMMON_H
3
4#ifdef HAVE_CONFIG_H
5# include "config.h" /* so that EAPI in Evas.h is correctly defined */
6#endif
7
8#ifdef HAVE_EVIL
9# include <Evil.h>
10#endif
11
12#ifdef HAVE_ESCAPE
13# include <Escape.h>
14#endif
15
16#include <Eina.h>
17#include "Evas.h"
18//#include "Evas_GL.h"
19
20#ifdef HAVE_PIXMAN
21#include <pixman.h>
22#endif
23
24#include <sys/types.h>
25#include <sys/stat.h>
26#include <unistd.h>
27
28#ifndef HAVE_LROUND
29/* right now i dont care about rendering bugs on platforms without lround
30 (e.g. windows/vc++... yay!)
31 FIXME: http://cgit.freedesktop.org/cairo/tree/src/cairo-misc.c#n487
32*/
33#define lround(x) (((x) < 0) ? (long int)ceil((x) - 0.5) : (long int)floor((x) + 0.5))
34#endif
35
36/* macros needed to log message through eina_log */
37extern EAPI int _evas_log_dom_global;
38#ifdef _EVAS_DEFAULT_LOG_DOM
39# undef _EVAS_DEFAULT_LOG_DOM
40#endif
41#define _EVAS_DEFAULT_LOG_DOM _evas_log_dom_global
42
43#ifdef EVAS_DEFAULT_LOG_COLOR
44# undef EVAS_DEFAULT_LOG_COLOR
45#endif
46#define EVAS_DEFAULT_LOG_COLOR EINA_COLOR_BLUE
47
48#ifdef ERR
49# undef ERR
50#endif
51#define ERR(...) EINA_LOG_DOM_ERR(_EVAS_DEFAULT_LOG_DOM, __VA_ARGS__)
52
53#ifdef DBG
54# undef DBG
55#endif
56#define DBG(...) EINA_LOG_DOM_DBG(_EVAS_DEFAULT_LOG_DOM, __VA_ARGS__)
57
58#ifdef INF
59# undef INF
60#endif
61#define INF(...) EINA_LOG_DOM_INFO(_EVAS_DEFAULT_LOG_DOM, __VA_ARGS__)
62
63#ifdef WRN
64# undef WRN
65#endif
66#define WRN(...) EINA_LOG_DOM_WARN(_EVAS_DEFAULT_LOG_DOM, __VA_ARGS__)
67
68#ifdef CRIT
69# undef CRIT
70#endif
71#define CRIT(...) EINA_LOG_DOM_CRIT(_EVAS_DEFAULT_LOG_DOM, __VA_ARGS__)
72
73#include "evas_options.h"
74
75#if defined(__ARM_ARCH_3M__)
76# define __ARM_ARCH__ 40
77#endif
78#if defined(__ARM_ARCH_4__)
79# define __ARM_ARCH__ 40
80#endif
81#if defined(__ARM_ARCH_4T__)
82# define __ARM_ARCH__ 41
83#endif
84
85#if defined(__ARM_ARCH_5__)
86# define __ARM_ARCH__ 50
87#endif
88#if defined(__ARM_ARCH_5T__)
89# define __ARM_ARCH__ 51
90#endif
91#if defined(__ARM_ARCH_5E__)
92# define __ARM_ARCH__ 52
93#endif
94#if defined(__ARM_ARCH_5TE__)
95# define __ARM_ARCH__ 53
96#endif
97#if defined(__ARM_ARCH_5TEJ__)
98# define __ARM_ARCH__ 54
99#endif
100
101#if defined(__ARM_ARCH_6__)
102# define __ARM_ARCH__ 60
103#endif
104#if defined(__ARM_ARCH_6J__)
105# define __ARM_ARCH__ 61
106#endif
107#if defined(__ARM_ARCH_6K__)
108# define __ARM_ARCH__ 62
109#endif
110#if defined(__ARM_ARCH_6Z__)
111# define __ARM_ARCH__ 63
112#endif
113#if defined(__ARM_ARCH_6ZK__)
114# define __ARM_ARCH__ 64
115#endif
116#if defined(__ARM_ARCH_6T2__)
117# define __ARM_ARCH__ 65
118#endif
119
120#if defined(__ARM_ARCH_7__)
121# define __ARM_ARCH__ 70
122#endif
123#if defined(__ARM_ARCH_7A__)
124# define __ARM_ARCH__ 71
125#endif
126#if defined(__ARM_ARCH_7R__)
127# define __ARM_ARCH__ 72
128#endif
129#if defined(__ARM_ARCH_7M__)
130# define __ARM_ARCH__ 73
131#endif
132
133#ifndef BUILD_PTHREAD
134# undef BUILD_PIPE_RENDER
135#endif
136
137#if defined(BUILD_ASYNC_PRELOAD) && !defined(BUILD_PTHREAD)
138# define BUILD_PTHREAD
139#endif
140
141#ifdef BUILD_PTHREAD
142
143#define LK(x) Eina_Lock x
144#define LKI(x) eina_lock_new(&(x))
145#define LKD(x) eina_lock_free(&(x))
146#define LKL(x) eina_lock_take(&(x))
147#define LKT(x) eina_lock_take_try(&(x))
148#define LKU(x) eina_lock_release(&(x))
149#define LKDBG(x) eina_lock_debug(&(x))
150
151# define TH(x) pthread_t x
152# define THI(x) int x
153# define TH_MAX 8
154
155/* for rwlocks */
156#define RWLK(x) pthread_rwlock_t x
157#define RWLKI(x) pthread_rwlock_init(&(x), NULL)
158#define RWLKD(x) pthread_rwlock_destroy(&(x))
159#define RDLKL(x) pthread_rwlock_rdlock(&(x))
160#define WRLKL(x) pthread_rwlock_wrlock(&(x))
161#define RWLKU(x) pthread_rwlock_unlock(&(x))
162
163
164// even though in theory having every Nth rendered line done by a different
165// thread might even out load across threads - it actually slows things down.
166//#define EVAS_SLI 1
167
168#else
169# define LK(x)
170# define LKI(x)
171# define LKD(x)
172# define LKL(x)
173# define LKT(x) 1
174# define LKU(x)
175# define TH(x)
176# define THI(x)
177# define TH_MAX 0
178# define LKDBG(x)
179
180/* for rwlocks */
181#define RWLK(x)
182#define RWLKI(x)
183#define RWLKD(x)
184#define RDLKL(x)
185#define WRLKL(x)
186#define RWLKU(x)
187
188#endif
189
190#ifdef HAVE_ALLOCA_H
191# include <alloca.h>
192#elif defined __GNUC__
193# define alloca __builtin_alloca
194#elif defined _AIX
195# define alloca __alloca
196#elif defined _MSC_VER
197# include <malloc.h>
198# define alloca _alloca
199#else
200# include <stddef.h>
201# ifdef __cplusplus
202extern "C"
203# endif
204void *alloca (size_t);
205#endif
206
207#include <stdio.h>
208#include <stdlib.h>
209#include <string.h>
210#include <sys/types.h>
211#include <sys/stat.h>
212#include <time.h>
213#include <ctype.h>
214
215#ifndef _MSC_VER
216# include <stdint.h>
217#endif
218
219#include <ft2build.h>
220#include FT_FREETYPE_H
221#include FT_GLYPH_H
222#include FT_SIZES_H
223#include FT_MODULE_H
224
225#ifdef __GNUC__
226# if __GNUC__ >= 4
227// BROKEN in gcc 4 on amd64
228//# pragma GCC visibility push(hidden)
229# endif
230#define LIKELY(x) __builtin_expect(!!(x), 1)
231#define UNLIKELY(x) __builtin_expect(!!(x), 0)
232#else
233#define LIKELY(x) (x)
234#define UNLIKELY(x) (x)
235#endif
236
237/*****************************************************************************/
238
239/* use exact rects for updates not tiles */
240/* #define RECTUPDATE */
241#define TILESIZE 8
242#define IMG_MAX_SIZE 65000
243
244#define IMG_TOO_BIG(w, h) \
245 ((((unsigned long long)w) * ((unsigned long long)h)) >= \
246 ((1ULL << (29 * (sizeof(void *) / 4))) - 2048))
247
248#ifdef BUILD_SMALL_DITHER_MASK
249# define DM_TABLE _evas_dither_44
250# define DM_SIZE 4
251# define DM_BITS 4
252# define DM_DIV 16
253# define USE_DITHER_44 1
254#else
255# define DM_TABLE _evas_dither_128128
256# define DM_SIZE 128
257# define DM_BITS 6
258# define DM_DIV 64
259# define USE_DITHER_128128 1
260#endif
261
262#define DM_MSK (DM_SIZE - 1)
263#define DM_SHF(_b) (DM_BITS - (8 - _b))
264/* Supports negative right shifts */
265#define DM_SHR(x, _b) ((DM_SHF(_b) >= 0) ? \
266 ((x) >> DM_SHF(_b)) : ((x) << -DM_SHF(_b)))
267
268/* if more than 1/ALPHA_SPARSE_INV_FRACTION is "alpha" (1-254) then sparse
269 * alpha flag gets set */
270#define ALPHA_SPARSE_INV_FRACTION 3
271
272/*****************************************************************************/
273
274#if defined(__ARM_ARCH_3M__)
275# define __ARM_ARCH__ 40
276#endif
277#if defined(__ARM_ARCH_4__)
278# define __ARM_ARCH__ 40
279#endif
280#if defined(__ARM_ARCH_4T__)
281# define __ARM_ARCH__ 41
282#endif
283
284#if defined(__ARM_ARCH_5__)
285# define __ARM_ARCH__ 50
286#endif
287#if defined(__ARM_ARCH_5T__)
288# define __ARM_ARCH__ 51
289#endif
290#if defined(__ARM_ARCH_5E__)
291# define __ARM_ARCH__ 52
292#endif
293#if defined(__ARM_ARCH_5TE__)
294# define __ARM_ARCH__ 53
295#endif
296#if defined(__ARM_ARCH_5TEJ__)
297# define __ARM_ARCH__ 54
298#endif
299
300#if defined(__ARM_ARCH_6__)
301# define __ARM_ARCH__ 60
302#endif
303#if defined(__ARM_ARCH_6J__)
304# define __ARM_ARCH__ 61
305#endif
306#if defined(__ARM_ARCH_6K__)
307# define __ARM_ARCH__ 62
308#endif
309#if defined(__ARM_ARCH_6Z__)
310# define __ARM_ARCH__ 63
311#endif
312#if defined(__ARM_ARCH_6ZK__)
313# define __ARM_ARCH__ 64
314#endif
315#if defined(__ARM_ARCH_6T2__)
316# define __ARM_ARCH__ 65
317#endif
318
319#if defined(__ARM_ARCH_7__)
320# define __ARM_ARCH__ 70
321#endif
322#if defined(__ARM_ARCH_7A__)
323# define __ARM_ARCH__ 71
324#endif
325#if defined(__ARM_ARCH_7R__)
326# define __ARM_ARCH__ 72
327#endif
328#if defined(__ARM_ARCH_7M__)
329# define __ARM_ARCH__ 73
330#endif
331
332#if defined(__ARM_ARCH__) && (__ARM_ARCH__ >= 52)
333/* tested on ARMv6 (arm1136j-s), Nokia N800 CPU */
334#define pld(addr, off) \
335 __asm__("pld [%[address], %[offset]]":: \
336 [address] "r" (addr), [offset] "i" (off))
337#else
338#define pld(addr, off)
339#endif /* __ARMEL__ */
340
341/*****************************************************************************/
342
343#define UNROLL2(op...) op op
344#define UNROLL4(op...) UNROLL2(op) UNROLL2(op)
345#define UNROLL8(op...) UNROLL4(op) UNROLL4(op)
346#define UNROLL16(op...) UNROLL8(op) UNROLL8(op)
347
348#define UNROLL8_PLD_WHILE(start, size, end, op) \
349 pld(start, 0); \
350 end = start + (size & ~7); \
351 while (start < end) \
352 { \
353 pld(start, 32); \
354 UNROLL8(op); \
355 } \
356 end += (size & 7); \
357 pld(start, 32); \
358 while (start < end) \
359 { \
360 op; \
361 }
362
363/*****************************************************************************/
364
365typedef unsigned long long DATA64;
366typedef unsigned int DATA32;
367typedef unsigned short DATA16;
368typedef unsigned char DATA8;
369
370typedef struct _Image_Entry Image_Entry;
371typedef struct _Image_Entry_Flags Image_Entry_Flags;
372typedef struct _Image_Entry_Frame Image_Entry_Frame;
373typedef struct _Image_Timestamp Image_Timestamp;
374typedef struct _Engine_Image_Entry Engine_Image_Entry;
375typedef struct _Evas_Cache_Target Evas_Cache_Target;
376typedef struct _Evas_Preload_Pthread Evas_Preload_Pthread;
377
378typedef struct _RGBA_Image_Loadopts RGBA_Image_Loadopts;
379#ifdef BUILD_PIPE_RENDER
380typedef struct _RGBA_Pipe_Op RGBA_Pipe_Op;
381typedef struct _RGBA_Pipe RGBA_Pipe;
382typedef struct _RGBA_Pipe_Thread_Info RGBA_Pipe_Thread_Info;
383#endif
384typedef struct _RGBA_Image RGBA_Image;
385typedef struct _RGBA_Image_Span RGBA_Image_Span;
386typedef struct _RGBA_Draw_Context RGBA_Draw_Context;
387typedef struct _RGBA_Polygon_Point RGBA_Polygon_Point;
388typedef struct _RGBA_Map_Point RGBA_Map_Point;
389typedef struct _RGBA_Font RGBA_Font;
390typedef struct _RGBA_Font_Int RGBA_Font_Int;
391typedef struct _RGBA_Font_Source RGBA_Font_Source;
392typedef struct _RGBA_Font_Glyph RGBA_Font_Glyph;
393typedef struct _RGBA_Gfx_Compositor RGBA_Gfx_Compositor;
394
395typedef struct _Cutout_Rect Cutout_Rect;
396typedef struct _Cutout_Rects Cutout_Rects;
397
398typedef struct _Convert_Pal Convert_Pal;
399
400typedef struct _Tilebuf Tilebuf;
401typedef struct _Tilebuf_Tile Tilebuf_Tile;
402typedef struct _Tilebuf_Rect Tilebuf_Rect;
403
404typedef struct _Evas_Common_Transform Evas_Common_Transform;
405
406// RGBA_Map_Point
407// all coords are 20.12
408// fp type - an int for now
409typedef int FPc;
410// fp # of bits of float accuracy
411#define FP 8
412// fp half (half of an fp unit)
413#define FPH (1 << (FP - 1))
414// one fp unit
415#define FP1 (1 << (FP))
416
417/*
418typedef struct _Regionbuf Regionbuf;
419typedef struct _Regionspan Regionspan;
420*/
421
422typedef void (*RGBA_Gfx_Func) (DATA32 *src, DATA8 *mask, DATA32 col, DATA32 *dst, int len);
423typedef void (*RGBA_Gfx_Pt_Func) (DATA32 src, DATA8 mask, DATA32 col, DATA32 *dst);
424typedef void (*Gfx_Func_Copy) (DATA32 *src, DATA32 *dst, int len);
425
426typedef void (*Gfx_Func_Convert) (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal);
427
428#include "../cache/evas_cache.h"
429
430/*****************************************************************************/
431
432typedef enum _RGBA_Image_Flags
433{
434 RGBA_IMAGE_NOTHING = (0),
435/* RGBA_IMAGE_HAS_ALPHA = (1 << 0), */
436 RGBA_IMAGE_IS_DIRTY = (1 << 1),
437 RGBA_IMAGE_INDEXED = (1 << 2),
438 RGBA_IMAGE_ALPHA_ONLY = (1 << 3),
439 RGBA_IMAGE_ALPHA_TILES = (1 << 4),
440/* RGBA_IMAGE_ALPHA_SPARSE = (1 << 5), */
441/* RGBA_IMAGE_LOADED = (1 << 6), */
442/* RGBA_IMAGE_NEED_DATA = (1 << 7) */
443 RGBA_IMAGE_TODO_LOAD = (1 << 8),
444} RGBA_Image_Flags;
445
446typedef enum _Convert_Pal_Mode
447{
448 PAL_MODE_NONE,
449 PAL_MODE_MONO,
450 PAL_MODE_GRAY4,
451 PAL_MODE_GRAY16,
452 PAL_MODE_GRAY64,
453 PAL_MODE_GRAY256,
454 PAL_MODE_RGB111,
455 PAL_MODE_RGB121,
456 PAL_MODE_RGB221,
457 PAL_MODE_RGB222,
458 PAL_MODE_RGB232,
459 PAL_MODE_RGB332,
460 PAL_MODE_RGB666,
461 PAL_MODE_LAST
462} Convert_Pal_Mode;
463
464typedef enum _CPU_Features
465{
466 CPU_FEATURE_C = 0,
467 CPU_FEATURE_MMX = (1 << 0),
468 CPU_FEATURE_MMX2 = (1 << 1),
469 CPU_FEATURE_SSE = (1 << 2),
470 CPU_FEATURE_ALTIVEC = (1 << 3),
471 CPU_FEATURE_VIS = (1 << 4),
472 CPU_FEATURE_VIS2 = (1 << 5),
473 CPU_FEATURE_NEON = (1 << 6),
474 CPU_FEATURE_SSE3 = (1 << 7)
475} CPU_Features;
476
477typedef enum _Font_Hint_Flags
478{
479 FONT_NO_HINT,
480 FONT_AUTO_HINT,
481 FONT_BYTECODE_HINT
482} Font_Hint_Flags;
483
484typedef enum _Font_Rend_Flags
485{
486 FONT_REND_REGULAR = 0,
487 FONT_REND_SLANT = (1 << 0),
488 FONT_REND_WEIGHT = (1 << 1),
489} Font_Rend_Flags;
490
491/*****************************************************************************/
492
493#if 0 // filtering disabled
494typedef struct _Filtered_Image Filtered_Image;
495#endif
496
497struct _RGBA_Image_Loadopts
498{
499 int scale_down_by; // if > 1 then use this
500 double dpi; // if > 0.0 use this
501 unsigned int w, h; // if > 0 use this
502 unsigned int degree;//if>0 there is some info related with rotation
503 struct {
504 unsigned int x, y, w, h;
505 } region;
506
507 Eina_Bool orientation; // if EINA_TRUE => should honor orientation information provided by file (like jpeg exif info)
508};
509
510struct _Image_Entry_Flags
511{
512 Eina_Bool loaded : 1;
513 Eina_Bool in_progress : 1;
514 Eina_Bool dirty : 1;
515 Eina_Bool activ : 1;
516
517 Eina_Bool need_data : 1;
518 Eina_Bool lru_nodata : 1;
519 Eina_Bool cached : 1;
520 Eina_Bool alpha : 1;
521
522 Eina_Bool lru : 1;
523 Eina_Bool alpha_sparse : 1;
524#ifdef BUILD_ASYNC_PRELOAD
525 Eina_Bool preload_done : 1;
526 Eina_Bool delete_me : 1;
527 Eina_Bool pending : 1;
528#endif
529 Eina_Bool animated : 1;
530 Eina_Bool rotated : 1;
531};
532
533struct _Image_Entry_Frame
534{
535 int index;
536 DATA32 *data; /* frame decoding data */
537 void *info; /* special image type info */
538 Eina_Bool loaded : 1;
539};
540
541struct _Evas_Cache_Target
542{
543 EINA_INLIST;
544 const void *target;
545 void *data;
546};
547
548struct _Image_Timestamp
549{
550 time_t mtime;
551 off_t size;
552 ino_t ino;
553#ifdef _STAT_VER_LINUX
554 unsigned long int mtime_nsec;
555#endif
556};
557
558struct _Image_Entry
559{
560 EINA_INLIST;
561
562 Evas_Cache_Image *cache;
563
564 const char *cache_key;
565
566 const char *file;
567 const char *key;
568
569 Evas_Cache_Target *targets;
570 Evas_Preload_Pthread *preload;
571
572 Image_Timestamp tstamp;
573
574 int references;
575#ifdef EVAS_FRAME_QUEUING
576 LK(lock_references); // needed for accessing references
577#endif
578
579#ifdef BUILD_PIPE_RENDER
580 RGBA_Pipe *pipe;
581#ifdef EVAS_FRAME_QUEUING
582 LK(ref_fq_add);
583 LK(ref_fq_del);
584 Eina_Condition cond_fq_del;
585 int ref_fq[2]; // ref_fq[0] is for addition, ref_fq[1] is for deletion
586#endif
587#endif
588
589 unsigned char scale;
590
591 RGBA_Image_Loadopts load_opts;
592 int space;
593 unsigned int w;
594 unsigned int h;
595
596 struct
597 {
598 unsigned int w;
599 unsigned int h;
600 } allocated;
601
602 struct
603 {
604 void *module;
605 void *loader;
606 } info;
607
608#ifdef BUILD_ASYNC_PRELOAD
609 LK(lock);
610 LK(lock_cancel);
611 Eina_Bool unload_cancel : 1;
612#endif
613
614 Image_Entry_Flags flags;
615 Evas_Image_Scale_Hint scale_hint;
616 void *data1, *data2;
617 int server_id;
618 int connect_num;
619 int channel;
620 int load_error;
621
622 /* for animation feature */
623 int frame_count;
624 Evas_Image_Animated_Loop_Hint loop_hint;
625 int loop_count;
626 int cur_frame;
627 Eina_List *frames;
628};
629
630struct _Engine_Image_Entry
631{
632 EINA_INLIST;
633
634 /* Upper Engine data. */
635 Image_Entry *src;
636
637 /* Cache stuff. */
638 Evas_Cache_Engine_Image *cache;
639 const char *cache_key;
640
641 struct
642 {
643 Eina_Bool cached : 1;
644 Eina_Bool activ : 1;
645 Eina_Bool dirty : 1;
646 Eina_Bool loaded : 1;
647 Eina_Bool need_parent : 1;
648 } flags;
649
650 int references;
651 int w;
652 int h;
653};
654
655struct _Cutout_Rect
656{
657 int x, y, w, h;
658};
659
660struct _Cutout_Rects
661{
662 Cutout_Rect* rects;
663 int active;
664 int max;
665};
666
667struct _Evas_Common_Transform
668{
669 float mxx, mxy, mxz;
670 float myx, myy, myz;
671 float mzx, mzy, mzz;
672};
673
674struct _RGBA_Draw_Context
675{
676 struct {
677 Eina_Bool use : 1;
678 DATA32 col;
679 } mul;
680 struct {
681 DATA32 col;
682 } col;
683 struct RGBA_Draw_Context_clip {
684 int x, y, w, h;
685 Eina_Bool use : 1;
686 } clip;
687 struct {
688 int x, y, w, h;
689 RGBA_Image *mask;
690 } mask;
691 Cutout_Rects cutout;
692 struct {
693 struct {
694 void *(*gl_new) (void *data, RGBA_Font_Glyph *fg);
695 void (*gl_free) (void *ext_dat);
696 void (*gl_draw) (void *data, void *dest, void *context, RGBA_Font_Glyph *fg, int x, int y);
697 } func;
698 void *data;
699 } font_ext;
700 struct {
701 int color_space;
702 } interpolation;
703 struct {
704 int y, h;
705 } sli;
706 int render_op;
707 Eina_Bool anti_alias : 1;
708};
709
710#ifdef BUILD_PIPE_RENDER
711#include "../engines/common/evas_map_image.h"
712#include "../engines/common/evas_text_utils.h"
713
714struct _RGBA_Pipe_Op
715{
716 RGBA_Draw_Context context;
717 void (*op_func) (RGBA_Image *dst, RGBA_Pipe_Op *op, RGBA_Pipe_Thread_Info *info);
718 void (*free_func) (RGBA_Pipe_Op *op);
719
720 union {
721 struct {
722 int x, y, w, h;
723 } rect;
724 struct {
725 int x0, y0, x1, y1;
726 } line;
727 struct {
728 RGBA_Polygon_Point *points;
729 } poly;
730 struct {
731 RGBA_Font *font;
732 int x, y;
733 Evas_Text_Props intl_props;
734 } text;
735 struct {
736 RGBA_Image *src;
737 int sx, sy, sw, sh, dx, dy, dw, dh;
738 int smooth;
739 char *text;
740 } image;
741 struct {
742 RGBA_Image *src;
743 RGBA_Map_Point *p;
744 int npoints;
745 int smooth;
746 int level;
747 } map;
748 } op;
749};
750
751#define PIPE_LEN 256
752
753struct _RGBA_Pipe
754{
755 EINA_INLIST;
756 int op_num;
757 RGBA_Pipe_Op op[PIPE_LEN];
758};
759
760struct _RGBA_Pipe_Thread_Info
761{
762 RGBA_Image *im;
763 int x, y, w, h;
764};
765#endif
766
767struct _RGBA_Image
768{
769 Image_Entry cache_entry;
770
771 RGBA_Image_Flags flags;
772 struct
773 {
774/* void *module; */
775/* void *loader; */
776/* char *real_file; */
777 char *comment;
778// int format;
779 } info;
780
781 void *extended_info;
782 int ref;
783
784/* unsigned char scale; */
785
786 /* Colorspace stuff. */
787 struct {
788 void *data;
789 Eina_Bool no_free : 1;
790 Eina_Bool dirty : 1;
791 } cs;
792
793 /* RGBA stuff */
794 struct {
795 DATA32 *data;
796 Eina_Bool no_free : 1;
797 } image;
798
799 struct {
800 DATA8 *mask;
801 Eina_Bool dirty: 1;
802 } mask;
803
804#if 0 // filtering disabled
805 Eina_List *filtered;
806#endif
807
808 struct {
809 LK(lock);
810 Eina_List *list;
811 unsigned long long orig_usage;
812 unsigned long long usage_count;
813 int populate_count;
814 unsigned long long newest_usage;
815 unsigned long long newest_usage_count;
816 } cache;
817
818#ifdef HAVE_PIXMAN
819 struct {
820 pixman_image_t *im;
821 } pixman;
822#endif
823};
824
825struct _RGBA_Polygon_Point
826{
827 EINA_INLIST;
828 int x, y;
829};
830
831struct _RGBA_Map_Point
832{
833 FPc x, y; // x, y screenspace
834 float fx, fy, fz; // x, y, z in floats
835// FPc x3, y3; // x, y 3d space
836 FPc z; // z in world space. optional
837 FPc u, v; // u, v in tex coords
838 DATA32 col; // color at this point
839 // for perspective correctness - only point 0 has relevant info
840 FPc px, py, z0, foc;
841};
842
843#if 0 // filtering disabled
844struct _Filtered_Image
845{
846 void *key;
847 size_t keylen;
848 RGBA_Image *image;
849 int ref;
850};
851#endif
852
853// for fonts...
854/////
855typedef struct _Fash_Item_Index_Map Fash_Item_Index_Map;
856typedef struct _Fash_Int_Map Fash_Int_Map;
857typedef struct _Fash_Int_Map2 Fash_Int_Map2;
858typedef struct _Fash_Int Fash_Int;
859struct _Fash_Item_Index_Map
860{
861 RGBA_Font_Int *fint;
862 int index;
863};
864struct _Fash_Int_Map
865{
866 Fash_Item_Index_Map item[256];
867};
868struct _Fash_Int_Map2
869{
870 Fash_Int_Map *bucket[256];
871};
872struct _Fash_Int
873{
874 Fash_Int_Map2 *bucket[256];
875 void (*freeme) (Fash_Int *fash);
876};
877
878/////
879typedef struct _Fash_Glyph_Map Fash_Glyph_Map;
880typedef struct _Fash_Glyph_Map2 Fash_Glyph_Map2;
881typedef struct _Fash_Glyph Fash_Glyph;
882struct _Fash_Glyph_Map
883{
884 RGBA_Font_Glyph *item[256];
885};
886struct _Fash_Glyph_Map2
887{
888 Fash_Glyph_Map *bucket[256];
889};
890struct _Fash_Glyph
891{
892 Fash_Glyph_Map2 *bucket[256];
893 void (*freeme) (Fash_Glyph *fash);
894};
895/////
896
897struct _RGBA_Font
898{
899 Eina_List *fonts;
900 Fash_Int *fash;
901 Font_Hint_Flags hinting;
902 int references;
903#ifdef EVAS_FRAME_QUEUING
904 int ref_fq[2]; //ref_fq[0] is for addition, ref_fq[1] is for deletion
905 Eina_Condition cond_fq_del;
906 LK(ref_fq_add);
907 LK(ref_fq_del);
908#endif
909 LK(lock);
910 unsigned char sizeok : 1;
911};
912
913#include "../engines/common/evas_font_ot.h"
914
915struct _RGBA_Font_Int
916{
917 EINA_INLIST;
918 RGBA_Font_Source *src;
919 Eina_Hash *kerning;
920 Fash_Glyph *fash;
921 unsigned int size;
922 int real_size;
923 int max_h;
924 int references;
925 int usage;
926 struct {
927 FT_Size size;
928#ifdef USE_HARFBUZZ
929 void *hb_font;
930#endif
931 } ft;
932 LK(ft_mutex);
933 Font_Hint_Flags hinting;
934 Font_Rend_Flags wanted_rend; /* The wanted rendering style */
935 Font_Rend_Flags runtime_rend; /* The rendering we need to do on runtime
936 in order to comply with the wanted_rend. */
937 unsigned char sizeok : 1;
938 unsigned char inuse : 1;
939};
940
941struct _RGBA_Font_Source
942{
943 const char *name;
944 const char *file;
945 void *data;
946 unsigned int current_size;
947 int data_size;
948 int references;
949 struct {
950 int orig_upem;
951 FT_Face face;
952 } ft;
953};
954
955struct _RGBA_Font_Glyph
956{
957 FT_UInt index;
958 FT_Glyph glyph;
959 FT_BitmapGlyph glyph_out;
960 /* this is a problem - only 1 engine at a time can extend such a font... grrr */
961 void *ext_dat;
962 void (*ext_dat_free) (void *ext_dat);
963 RGBA_Font_Int *fi;
964};
965
966struct _RGBA_Gfx_Compositor
967{
968 const char *name;
969
970 void (*init)(void);
971 void (*shutdown)(void);
972
973 RGBA_Gfx_Func (*composite_pixel_span_get)(RGBA_Image *src, RGBA_Image *dst, int pixels);
974 RGBA_Gfx_Func (*composite_color_span_get)(DATA32 col, RGBA_Image *dst, int pixels);
975 RGBA_Gfx_Func (*composite_pixel_color_span_get)(RGBA_Image *src, DATA32 col, RGBA_Image *dst, int pixels);
976 RGBA_Gfx_Func (*composite_mask_color_span_get)(DATA32 col, RGBA_Image *dst, int pixels);
977 RGBA_Gfx_Func (*composite_pixel_mask_span_get)(RGBA_Image *src, RGBA_Image *dst, int pixels);
978
979 RGBA_Gfx_Pt_Func (*composite_pixel_pt_get)(Image_Entry_Flags src_flags, RGBA_Image *dst);
980 RGBA_Gfx_Pt_Func (*composite_color_pt_get)(DATA32 col, RGBA_Image *dst);
981 RGBA_Gfx_Pt_Func (*composite_pixel_color_pt_get)(Image_Entry_Flags src_flags, DATA32 col, RGBA_Image *dst);
982 RGBA_Gfx_Pt_Func (*composite_mask_color_pt_get)(DATA32 col, RGBA_Image *dst);
983 RGBA_Gfx_Pt_Func (*composite_pixel_mask_pt_get)(Image_Entry_Flags src_flags, RGBA_Image *dst);
984};
985
986#define EVAS_RECT_SPLIT 1
987#ifdef EVAS_RECT_SPLIT
988typedef struct list_node list_node_t;
989typedef struct list list_t;
990typedef struct rect rect_t;
991typedef struct rect_node rect_node_t;
992
993struct list_node
994{
995 struct list_node *next;
996};
997
998struct list
999{
1000 struct list_node *head;
1001 struct list_node *tail;
1002};
1003
1004struct rect
1005{
1006 short left;
1007 short top;
1008 short right;
1009 short bottom;
1010 short width;
1011 short height;
1012 int area;
1013};
1014
1015struct rect_node
1016{
1017 struct list_node _lst;
1018 struct rect rect;
1019};
1020#endif /* EVAS_RECT_SPLIT */
1021
1022struct _Tilebuf
1023{
1024 int outbuf_w;
1025 int outbuf_h;
1026
1027 struct {
1028 int w, h;
1029 } tile_size;
1030
1031 struct {
1032 int x, y, w, h;
1033 } prev_add, prev_del;
1034#ifdef RECTUPDATE
1035/*
1036 Regionbuf *rb;
1037 */
1038#elif defined(EVAS_RECT_SPLIT)
1039 int need_merge;
1040 list_t rects;
1041#else
1042/*
1043 struct {
1044 int w, h;
1045 Tilebuf_Tile *tiles;
1046 } tiles;
1047 */
1048#endif
1049};
1050
1051struct _Tilebuf_Tile
1052{
1053 Eina_Bool redraw : 1;
1054/* FIXME: need these flags later - but not now */
1055/*
1056 Eina_Bool done : 1;
1057 Eina_Bool edge : 1;
1058 Eina_Bool from : 1;
1059
1060 struct {
1061 int dx, dy;
1062 } vector;
1063 */
1064};
1065
1066struct _Tilebuf_Rect
1067{
1068 EINA_INLIST;
1069 int x, y, w, h;
1070};
1071/*
1072struct _Regionbuf
1073{
1074 int w, h;
1075 Regionspan **spans;
1076};
1077
1078struct _Regionspan
1079{
1080 EINA_INLIST;
1081 int x1, x2;
1082};
1083*/
1084
1085struct _Convert_Pal
1086{
1087 int references;
1088 int count;
1089 Convert_Pal_Mode colors;
1090 DATA8 *lookup;
1091 void *data;
1092};
1093
1094/****/
1095
1096/*****************************************************************************/
1097#include "evas_macros.h"
1098
1099#ifndef WORDS_BIGENDIAN
1100/* x86 */
1101#define A_VAL(p) (((DATA8 *)(p))[3])
1102#define R_VAL(p) (((DATA8 *)(p))[2])
1103#define G_VAL(p) (((DATA8 *)(p))[1])
1104#define B_VAL(p) (((DATA8 *)(p))[0])
1105#define AR_VAL(p) ((DATA16 *)(p)[1])
1106#define GB_VAL(p) ((DATA16 *)(p)[0])
1107#else
1108/* ppc */
1109#define A_VAL(p) (((DATA8 *)(p))[0])
1110#define R_VAL(p) (((DATA8 *)(p))[1])
1111#define G_VAL(p) (((DATA8 *)(p))[2])
1112#define B_VAL(p) (((DATA8 *)(p))[3])
1113#define AR_VAL(p) ((DATA16 *)(p)[0])
1114#define GB_VAL(p) ((DATA16 *)(p)[1])
1115#endif
1116
1117#define RGB_JOIN(r,g,b) \
1118 (((r) << 16) + ((g) << 8) + (b))
1119
1120#define ARGB_JOIN(a,r,g,b) \
1121 (((a) << 24) + ((r) << 16) + ((g) << 8) + (b))
1122
1123#include "evas_blend_ops.h"
1124
1125#define _EVAS_RENDER_FILL -1
1126#define _EVAS_RENDER_BLEND 0
1127#define _EVAS_RENDER_BLEND_REL 1
1128#define _EVAS_RENDER_COPY 2
1129#define _EVAS_RENDER_COPY_REL 3
1130#define _EVAS_RENDER_ADD 4
1131#define _EVAS_RENDER_ADD_REL 5
1132#define _EVAS_RENDER_SUB 6
1133#define _EVAS_RENDER_SUB_REL 7
1134#define _EVAS_RENDER_TINT 8
1135#define _EVAS_RENDER_TINT_REL 9
1136#define _EVAS_RENDER_MASK 10
1137#define _EVAS_RENDER_MUL 11
1138#define _EVAS_RENDER_CLIP 12
1139
1140#define _EVAS_TEXTURE_REFLECT 0
1141#define _EVAS_TEXTURE_REPEAT 1
1142#define _EVAS_TEXTURE_RESTRICT 2
1143#define _EVAS_TEXTURE_RESTRICT_REFLECT 3
1144#define _EVAS_TEXTURE_RESTRICT_REPEAT 4
1145#define _EVAS_TEXTURE_PAD 5
1146
1147#define _EVAS_COLOR_SPACE_ARGB 0
1148#define _EVAS_COLOR_SPACE_AHSV 1
1149
1150/*****************************************************************************/
1151
1152#define SCALE_SIZE_MAX ((1 << 15) - 1)
1153
1154#ifdef __cplusplus
1155extern "C" {
1156#endif
1157
1158/****/
1159void evas_common_init (void);
1160void evas_common_shutdown (void);
1161
1162EAPI void evas_common_cpu_init (void);
1163
1164int evas_common_cpu_have_cpuid (void);
1165int evas_common_cpu_has_feature (unsigned int feature);
1166EAPI void evas_common_cpu_can_do (int *mmx, int *sse, int *sse2);
1167EAPI void evas_common_cpu_end_opt (void);
1168
1169/****/
1170#include "../engines/common/evas_blend.h"
1171
1172EAPI Gfx_Func_Copy evas_common_draw_func_copy_get (int pixels, int reverse);
1173
1174/****/
1175#include "../engines/common/evas_convert_color.h"
1176#include "../engines/common/evas_convert_colorspace.h"
1177#include "../engines/common/evas_convert_main.h"
1178#include "../engines/common/evas_convert_yuv.h"
1179#include "../engines/common/evas_scale_main.h"
1180#include "../engines/common/evas_scale_smooth.h"
1181#include "../engines/common/evas_scale_span.h"
1182
1183/****/
1184#include "../engines/common/evas_image.h"
1185
1186/****/
1187#include "../engines/common/evas_line.h"
1188#include "../engines/common/evas_polygon.h"
1189#include "../engines/common/evas_rectangle.h"
1190
1191/****/
1192EAPI void evas_common_blit_init (void);
1193
1194EAPI void evas_common_blit_rectangle (const RGBA_Image *src, RGBA_Image *dst, int src_x, int src_y, int w, int h, int dst_x, int dst_y);
1195
1196/****/
1197#include "../engines/common/evas_font.h"
1198
1199/****/
1200EAPI void evas_common_tilebuf_init (void);
1201
1202EAPI Tilebuf *evas_common_tilebuf_new (int w, int h);
1203EAPI void evas_common_tilebuf_free (Tilebuf *tb);
1204EAPI void evas_common_tilebuf_set_tile_size (Tilebuf *tb, int tw, int th);
1205EAPI void evas_common_tilebuf_get_tile_size (Tilebuf *tb, int *tw, int *th);
1206EAPI int evas_common_tilebuf_add_redraw (Tilebuf *tb, int x, int y, int w, int h);
1207EAPI int evas_common_tilebuf_del_redraw (Tilebuf *tb, int x, int y, int w, int h);
1208EAPI int evas_common_tilebuf_add_motion_vector (Tilebuf *tb, int x, int y, int w, int h, int dx, int dy, int alpha);
1209EAPI void evas_common_tilebuf_clear (Tilebuf *tb);
1210EAPI Tilebuf_Rect *evas_common_tilebuf_get_render_rects (Tilebuf *tb);
1211EAPI void evas_common_tilebuf_free_render_rects (Tilebuf_Rect *rects);
1212
1213/*
1214Regionbuf *evas_common_regionbuf_new (int w, int h);
1215void evas_common_regionbuf_free (Regionbuf *rb);
1216void evas_common_regionbuf_clear (Regionbuf *rb);
1217void evas_common_regionbuf_span_add (Regionbuf *rb, int x1, int x2, int y);
1218void evas_common_regionbuf_span_del (Regionbuf *rb, int x1, int x2, int y);
1219Tilebuf_Rect *evas_common_regionbuf_rects_get (Regionbuf *rb);
1220*/
1221
1222/****/
1223#include "../engines/common/evas_draw.h"
1224
1225#include "../engines/common/evas_map_image.h"
1226
1227/****/
1228#ifdef BUILD_PIPE_RENDER
1229# include "../engines/common/evas_pipe.h"
1230#endif
1231
1232void evas_font_dir_cache_free(void);
1233
1234/****/
1235
1236/*****************************************************************************/
1237
1238#ifdef __cplusplus
1239}
1240#endif
1241
1242#endif
diff --git a/libraries/evas/src/lib/include/evas_common_soft16.h b/libraries/evas/src/lib/include/evas_common_soft16.h
new file mode 100644
index 0000000..446319e
--- /dev/null
+++ b/libraries/evas/src/lib/include/evas_common_soft16.h
@@ -0,0 +1,100 @@
1#ifndef EVAS_COMMON_SOFT16_H
2#define EVAS_COMMON_SOFT16_H
3
4#include "evas_common.h"
5#include "evas_private.h"
6
7#ifdef __cplusplus
8extern "C" {
9#endif
10
11#define RGB_565_UNPACKED_MASK 0x07e0f81f
12#define RGB_565_UNPACK(rgb) \
13 (((rgb) | ((rgb) << 16)) & RGB_565_UNPACKED_MASK)
14#define RGB_565_PACK(rgb) \
15 ((((rgb) & RGB_565_UNPACKED_MASK) | \
16 ((rgb) & RGB_565_UNPACKED_MASK) >> 16) & 0xffff)
17#define RGB_565_UNPACKED_BLEND(a, b, alpha) \
18 ((b) + (a) - ((((b) * (alpha)) >> 5) & RGB_565_UNPACKED_MASK))
19#define RGB_565_UNPACKED_BLEND_UNMUL(a, b, alpha) \
20 ((b) + ((((a) - (b)) * (alpha)) >> 5))
21
22#define RGB_565_FROM_COMPONENTS(r, g, b) \
23 (((((r) >> 3) & 0x1f) << 11) | \
24 ((((g) >> 2) & 0x3f) << 5) | \
25 (((b) >> 3) & 0x1f))
26
27static inline unsigned int
28_calc_stride(unsigned int w)
29{
30 unsigned int pad = w % 4;
31 if (!pad) return w;
32 else return w + 4 - pad;
33}
34
35#define IMG_BYTE_SIZE(stride, height, has_alpha) \
36 ((stride) * (height) * (!(has_alpha) ? 2 : 3))
37
38typedef struct _Soft16_Image Soft16_Image;
39struct _Soft16_Image
40{
41 Image_Entry cache_entry;
42
43 RGBA_Image *source;
44
45 int stride; // pixel stride - likely a multiple of 2
46 DATA16 *pixels; // 16bpp pixels rgb565
47 DATA8 *alpha; // 8bit alpha mask - optional. points into pixels
48
49 struct
50 {
51/* unsigned char have_alpha : 1; // 1 if we have halpha */
52 unsigned char free_pixels : 1; // 1 if pixels should be freed
53 unsigned char free_alpha : 1; // 1 if alpha mask should be freed
54 } flags;
55};
56
57/**
58 * Image (evas_soft16_main.c)
59 */
60EAPI void evas_common_soft16_image_init(void);
61EAPI void evas_common_soft16_image_shutdown(void);
62EAPI Evas_Cache_Image *evas_common_soft16_image_cache_get(void);
63
64EAPI void evas_common_soft16_image_draw(Soft16_Image *src, Soft16_Image *dst, RGBA_Draw_Context *dc, int src_region_x, int src_region_y, int src_region_w, int src_region_h, int dst_region_x, int dst_region_y, int dst_region_w, int dst_region_h, int smooth);
65EAPI Soft16_Image *evas_common_soft16_image_alpha_set(Soft16_Image *im, int have_alpha);
66
67void evas_common_soft16_image_draw_unscaled(Soft16_Image *src, Soft16_Image *dst, RGBA_Draw_Context *dc, const Eina_Rectangle sr, const Eina_Rectangle dr, const Eina_Rectangle cr);
68void evas_common_soft16_image_draw_scaled_sampled(Soft16_Image *src, Soft16_Image *dst, RGBA_Draw_Context *dc, const Eina_Rectangle sr, const Eina_Rectangle dr, const Eina_Rectangle cr);
69
70/* convert/dither functions */
71void evas_common_soft16_image_convert_from_rgb(Soft16_Image *im, const DATA32 *src);
72void evas_common_soft16_image_convert_from_rgba(Soft16_Image *im, const DATA32 *src);
73
74/**
75 * Rectangle (evas_soft16_rectangle.c)
76 */
77EAPI void evas_common_soft16_rectangle_draw(Soft16_Image *dst, RGBA_Draw_Context *dc, int x, int y, int w, int h);
78
79/**
80 * Polygon (evas_soft16_polygon.c)
81 */
82 EAPI void evas_common_soft16_polygon_draw(Soft16_Image *dst, RGBA_Draw_Context *dc, RGBA_Polygon_Point *points, int x, int y);
83
84/**
85 * Line (evas_soft16_line.c)
86 */
87EAPI void evas_common_soft16_line_draw(Soft16_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, int x1, int y1);
88
89/**
90 * Font (evas_soft16_font.c)
91 */
92EAPI void *evas_common_soft16_font_glyph_new(void *data, RGBA_Font_Glyph *fg);
93EAPI void evas_common_soft16_font_glyph_free(void *ext_dat);
94EAPI void evas_common_soft16_font_glyph_draw(void *data, void *dest, void *context, RGBA_Font_Glyph *fg, int x, int y);
95
96#ifdef __cplusplus
97}
98#endif
99
100#endif
diff --git a/libraries/evas/src/lib/include/evas_common_soft8.h b/libraries/evas/src/lib/include/evas_common_soft8.h
new file mode 100644
index 0000000..d701842
--- /dev/null
+++ b/libraries/evas/src/lib/include/evas_common_soft8.h
@@ -0,0 +1,184 @@
1#ifndef EVAS_COMMON_SOFT8_H
2#define EVAS_COMMON_SOFT8_H
3
4#include "evas_common.h"
5#include "evas_private.h"
6
7#ifdef __cplusplus
8extern "C" {
9#endif
10
11#define GRY_8_BLEND(a, b, alpha) \
12 ((b) + (a) - ((((b) * ((alpha) + 1)) >> 8) & 0xff))
13
14#define GRY_8_BLEND_UNMUL(a, b, alpha) \
15 ((b) + ((((a) - (b)) * ((alpha) + 1)) >> 8))
16
17#if 0
18#define GRY_8_FROM_COMPONENTS(r, g, b) \
19 (((307 * (r)) + \
20 (604 * (g)) + \
21 (113 * (b))) >> 10)
22
23#define GRY_8_FROM_RGB(rgb) \
24 GRY_8_FROM_COMPONENTS(R_VAL(rgb), G_VAL(rgb), B_VAL(rgb))
25#endif
26
27//Y = R * 0.2126 + G * 0.7152 + B * 0.0722
28
29#define GRY_8_FROM_COMPONENTS(r, g, b) \
30 (((218 * (r)) + \
31 (732 * (g)) + \
32 (74 * (b))) >> 10)
33
34#define GRY_8_FROM_RGB(rgb) \
35 GRY_8_FROM_COMPONENTS(R_VAL(rgb), G_VAL(rgb), B_VAL(rgb))
36
37#define UNROLL2(op...) op op
38#define UNROLL4(op...) UNROLL2(op) UNROLL2(op)
39#define UNROLL8(op...) UNROLL4(op) UNROLL4(op)
40#define UNROLL16(op...) UNROLL8(op) UNROLL8(op)
41
42#if defined(__ARM_ARCH_3M__)
43# define __ARM_ARCH__ 40
44#endif
45#if defined(__ARM_ARCH_4__)
46# define __ARM_ARCH__ 40
47#endif
48#if defined(__ARM_ARCH_4T__)
49# define __ARM_ARCH__ 41
50#endif
51
52#if defined(__ARM_ARCH_5__)
53# define __ARM_ARCH__ 50
54#endif
55#if defined(__ARM_ARCH_5T__)
56# define __ARM_ARCH__ 51
57#endif
58#if defined(__ARM_ARCH_5E__)
59# define __ARM_ARCH__ 52
60#endif
61#if defined(__ARM_ARCH_5TE__)
62# define __ARM_ARCH__ 53
63#endif
64#if defined(__ARM_ARCH_5TEJ__)
65# define __ARM_ARCH__ 54
66#endif
67
68#if defined(__ARM_ARCH_6__)
69# define __ARM_ARCH__ 60
70#endif
71#if defined(__ARM_ARCH_6J__)
72# define __ARM_ARCH__ 61
73#endif
74#if defined(__ARM_ARCH_6K__)
75# define __ARM_ARCH__ 62
76#endif
77#if defined(__ARM_ARCH_6Z__)
78# define __ARM_ARCH__ 63
79#endif
80#if defined(__ARM_ARCH_6ZK__)
81# define __ARM_ARCH__ 64
82#endif
83#if defined(__ARM_ARCH_6T2__)
84# define __ARM_ARCH__ 65
85#endif
86
87#if defined(__ARM_ARCH_7__)
88# define __ARM_ARCH__ 70
89#endif
90#if defined(__ARM_ARCH_7A__)
91# define __ARM_ARCH__ 71
92#endif
93#if defined(__ARM_ARCH_7R__)
94# define __ARM_ARCH__ 72
95#endif
96#if defined(__ARM_ARCH_7M__)
97# define __ARM_ARCH__ 73
98#endif
99
100#if defined(__ARM_ARCH__) && (__ARM_ARCH__ >= 52)
101/* tested on ARMv6 (arm1136j-s), Nokia N800 CPU */
102#define pld(addr, off) \
103 __asm__("pld [%[address], %[offset]]":: \
104 [address] "r" (addr), [offset] "i" (off))
105#else
106#define pld(addr, off)
107#endif /* __ARMEL__ */
108
109static inline unsigned int
110_calc_stride(unsigned int w)
111{
112 unsigned int pad = w % 4;
113 if (!pad) return w;
114 else return w + 4 - pad;
115}
116
117#define IMG_BYTE_SIZE(stride, height, has_alpha) \
118 ((stride) * (height) * (!(has_alpha) ? 1 : 2))
119
120typedef struct _Soft8_Image Soft8_Image;
121struct _Soft8_Image
122{
123 Image_Entry cache_entry;
124
125 RGBA_Image *source;
126
127 int stride; // pixel stride
128 DATA8 *pixels; // 8bpp pixels gry8
129 DATA8 *alpha; // 8bit alpha mask - optional. points into pixels
130
131 void *extended_info;
132
133 struct
134 {
135/* unsigned char have_alpha : 1; // 1 if we have halpha */
136 unsigned char free_pixels : 1; // 1 if pixels should be freed
137 unsigned char free_alpha : 1; // 1 if alpha mask should be freed
138 } flags;
139};
140
141/**
142 * Image (evas_soft8_main.c)
143 */
144EAPI void evas_common_soft8_image_init(void);
145EAPI void evas_common_soft8_image_shutdown(void);
146EAPI Evas_Cache_Image *evas_common_soft8_image_cache_get(void);
147
148EAPI void evas_common_soft8_image_draw(Soft8_Image *src, Soft8_Image *dst, RGBA_Draw_Context *dc, int src_region_x, int src_region_y, int src_region_w, int src_region_h, int dst_region_x, int dst_region_y, int dst_region_w, int dst_region_h, int smooth);
149EAPI Soft8_Image *evas_common_soft8_image_alpha_set(Soft8_Image *im, int have_alpha);
150
151void evas_common_soft8_image_draw_unscaled(Soft8_Image *src, Soft8_Image *dst, RGBA_Draw_Context *dc, const Eina_Rectangle sr, const Eina_Rectangle dr, const Eina_Rectangle cr);
152void evas_common_soft8_image_draw_scaled_sampled(Soft8_Image *src, Soft8_Image *dst, RGBA_Draw_Context *dc, const Eina_Rectangle sr, const Eina_Rectangle dr, const Eina_Rectangle cr);
153
154/* convert/dither functions */
155void evas_common_soft8_image_convert_from_rgb(Soft8_Image *im, const DATA32 *src);
156void evas_common_soft8_image_convert_from_rgba(Soft8_Image *im, const DATA32 *src);
157
158/**
159 * Rectangle (evas_soft8_rectangle.c)
160 */
161EAPI void evas_common_soft8_rectangle_draw(Soft8_Image *dst, RGBA_Draw_Context *dc, int x, int y, int w, int h);
162
163/**
164 * Polygon (evas_soft8_polygon.c)
165 */
166EAPI void evas_common_soft8_polygon_draw(Soft8_Image *dst, RGBA_Draw_Context *dc, RGBA_Polygon_Point *points, int x, int y);
167
168/**
169 * Line (evas_soft8_line.c)
170 */
171EAPI void evas_common_soft8_line_draw(Soft8_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, int x1, int y1);
172
173/**
174 * Font (evas_soft8_font.c)
175 */
176EAPI void *evas_common_soft8_font_glyph_new(void *data, RGBA_Font_Glyph *fg);
177EAPI void evas_common_soft8_font_glyph_free(void *ext_dat);
178EAPI void evas_common_soft8_font_glyph_draw(void *data, void *dest, void *context, RGBA_Font_Glyph *fg, int x, int y);
179
180#ifdef __cplusplus
181}
182#endif
183
184#endif
diff --git a/libraries/evas/src/lib/include/evas_inline.x b/libraries/evas/src/lib/include/evas_inline.x
new file mode 100644
index 0000000..45f2b1f
--- /dev/null
+++ b/libraries/evas/src/lib/include/evas_inline.x
@@ -0,0 +1,259 @@
1#ifndef EVAS_INLINE_H
2#define EVAS_INLINE_H
3
4static inline void
5_evas_object_event_new(void)
6{
7 _evas_event_counter++;
8}
9
10static inline int
11evas_object_was_visible(Evas_Object *obj)
12{
13 if ((obj->prev.visible) &&
14 ((obj->prev.cache.clip.visible) || (obj->smart.smart)) &&
15 ((obj->prev.cache.clip.a > 0 && obj->prev.render_op == EVAS_RENDER_BLEND)
16 || obj->prev.render_op != EVAS_RENDER_BLEND))
17 {
18 if (obj->func->was_visible)
19 return obj->func->was_visible(obj);
20 return 1;
21 }
22 return 0;
23}
24
25static inline void
26evas_add_rect(Eina_Array *rects, int x, int y, int w, int h)
27{
28 Eina_Rectangle *r;
29
30 NEW_RECT(r, x, y, w, h);
31 if (r) eina_array_push(rects, r);
32}
33
34static inline Cutout_Rect*
35evas_common_draw_context_cutouts_add(Cutout_Rects* rects,
36 int x, int y, int w, int h)
37{
38 Cutout_Rect* rect;
39
40 if (rects->max < (rects->active + 1))
41 {
42 rects->max += 128;
43 rects->rects = (Cutout_Rect *)realloc(rects->rects, sizeof(Cutout_Rect) * rects->max);
44 }
45
46 rect = rects->rects + rects->active;
47 rect->x = x;
48 rect->y = y;
49 rect->w = w;
50 rect->h = h;
51 rects->active++;
52
53 return rect;
54}
55
56static inline int
57evas_object_is_opaque(Evas_Object *obj)
58{
59 if (obj->smart.smart) return 0;
60 /* If a mask: Assume alpha */
61 if (obj->cur.mask) return 0;
62 if (obj->cur.cache.clip.a == 255)
63 {
64 if (obj->func->is_opaque)
65 return obj->func->is_opaque(obj);
66 return 1;
67 }
68 if (obj->cur.render_op == EVAS_RENDER_COPY)
69 return 1;
70 return 0;
71}
72
73static inline int
74evas_event_freezes_through(Evas_Object *obj)
75{
76 if (obj->freeze_events) return 1;
77 if (obj->parent_cache.freeze_events_valid)
78 return obj->parent_cache.freeze_events;
79 if (!obj->smart.parent) return 0;
80 obj->parent_cache.freeze_events =
81 evas_event_freezes_through(obj->smart.parent);
82 obj->parent_cache.freeze_events_valid = EINA_TRUE;
83 return obj->parent_cache.freeze_events;
84}
85
86static inline int
87evas_event_passes_through(Evas_Object *obj)
88{
89 if (obj->pass_events) return 1;
90 if (obj->parent_cache.pass_events_valid)
91 return obj->parent_cache.pass_events;
92 if (!obj->smart.parent) return 0;
93 obj->parent_cache.pass_events =
94 evas_event_passes_through(obj->smart.parent);
95 obj->parent_cache.pass_events_valid = EINA_TRUE;
96 return obj->parent_cache.pass_events;
97}
98
99static inline int
100evas_object_is_visible(Evas_Object *obj)
101{ /* post 1.0 -> enable? */
102 if ((obj->cur.visible)/* && (obj->cur.color.a > 0)*/ &&
103 ((obj->cur.cache.clip.visible) || (obj->smart.smart)) &&
104 ((obj->cur.cache.clip.a > 0 && obj->cur.render_op == EVAS_RENDER_BLEND)
105 || obj->cur.render_op != EVAS_RENDER_BLEND))
106 {
107 if (obj->func->is_visible)
108 return obj->func->is_visible(obj);
109 return 1;
110 }
111 return 0;
112}
113
114static inline int
115evas_object_clippers_is_visible(Evas_Object *obj)
116{
117 if (obj->cur.visible)
118 {
119 if (obj->cur.clipper)
120 return evas_object_clippers_is_visible(obj->cur.clipper);
121 return 1;
122 }
123 return 0;
124}
125
126static inline int
127evas_object_is_in_output_rect(Evas_Object *obj, int x, int y, int w, int h)
128{
129 /* assumes coords have been recalced */
130 if ((RECTS_INTERSECT(x, y, w, h,
131 obj->cur.cache.clip.x,
132 obj->cur.cache.clip.y,
133 obj->cur.cache.clip.w,
134 obj->cur.cache.clip.h)))
135 return 1;
136 return 0;
137}
138
139static inline int
140evas_object_is_active(Evas_Object *obj)
141{
142 if (evas_object_is_visible(obj) || evas_object_was_visible(obj))
143 {
144 if (obj->smart.smart)
145 {
146 int mapsmt = 0;
147 if (obj->smart.smart && (obj->cur.map && obj->cur.usemap)) mapsmt = 1;
148 if (!mapsmt) return 1;
149 if (evas_object_is_in_output_rect(obj, 0, 0, obj->layer->evas->output.w,
150 obj->layer->evas->output.h) ||
151 evas_object_was_in_output_rect(obj, 0, 0, obj->layer->evas->output.w,
152 obj->layer->evas->output.h))
153 return 1;
154 }
155 else
156 {
157 if (evas_object_is_in_output_rect(obj, 0, 0, obj->layer->evas->output.w,
158 obj->layer->evas->output.h) ||
159 evas_object_was_in_output_rect(obj, 0, 0, obj->layer->evas->output.w,
160 obj->layer->evas->output.h))
161 return 1;
162 }
163 }
164 return 0;
165}
166
167static inline void
168evas_object_coords_recalc(Evas_Object *obj)
169{
170//// if (obj->cur.cache.geometry.validity == obj->layer->evas->output_validity)
171//// return;
172//// obj->cur.cache.geometry.x =
173//// evas_coord_world_x_to_screen(obj->layer->evas, obj->cur.geometry.x);
174//// obj->cur.cache.geometry.y =
175//// evas_coord_world_y_to_screen(obj->layer->evas, obj->cur.geometry.y);
176//// obj->cur.cache.geometry.w =
177//// evas_coord_world_x_to_screen(obj->layer->evas, obj->cur.geometry.w) -
178//// evas_coord_world_x_to_screen(obj->layer->evas, 0);
179//// obj->cur.cache.geometry.h =
180//// evas_coord_world_y_to_screen(obj->layer->evas, obj->cur.geometry.h) -
181//// evas_coord_world_y_to_screen(obj->layer->evas, 0);
182 if (obj->func->coords_recalc) obj->func->coords_recalc(obj);
183//// obj->cur.cache.geometry.validity = obj->layer->evas->output_validity;
184}
185
186static inline void
187evas_object_clip_recalc(Evas_Object *obj)
188{
189 int cx, cy, cw, ch, cvis, cr, cg, cb, ca;
190 int nx, ny, nw, nh, nvis, nr, ng, nb, na;
191
192 if ((!obj->cur.cache.clip.dirty) &&
193 !(!obj->cur.clipper || obj->cur.clipper->cur.cache.clip.dirty))
194 return;
195 if (obj->layer->evas->events_frozen > 0) return;
196 evas_object_coords_recalc(obj);
197 if ((obj->cur.map) && (obj->cur.usemap))
198 {
199 cx = obj->cur.map->normal_geometry.x;
200 cy = obj->cur.map->normal_geometry.y;
201 cw = obj->cur.map->normal_geometry.w;
202 ch = obj->cur.map->normal_geometry.h;
203 }
204 else
205 {
206 cx = obj->cur.geometry.x;
207 cy = obj->cur.geometry.y;
208 cw = obj->cur.geometry.w;
209 ch = obj->cur.geometry.h;
210 }
211//// cx = obj->cur.cache.geometry.x; cy = obj->cur.cache.geometry.y;
212//// cw = obj->cur.cache.geometry.w; ch = obj->cur.cache.geometry.h;
213 if (obj->cur.color.a == 0 && obj->cur.render_op == EVAS_RENDER_BLEND) cvis = 0;
214 else cvis = obj->cur.visible;
215 cr = obj->cur.color.r; cg = obj->cur.color.g;
216 cb = obj->cur.color.b; ca = obj->cur.color.a;
217 if (obj->cur.clipper)
218 {
219// this causes problems... hmmm ?????
220 if (obj->cur.clipper->cur.cache.clip.dirty)
221 evas_object_clip_recalc(obj->cur.clipper);
222
223 // I don't know why this test was here in the first place. As I have
224 // no issue showing up due to this, I keep it and move color out of it.
225// breaks cliping of mapped images!!!
226 if (obj->cur.clipper->cur.map_parent == obj->cur.map_parent)
227 {
228 nx = obj->cur.clipper->cur.cache.clip.x;
229 ny = obj->cur.clipper->cur.cache.clip.y;
230 nw = obj->cur.clipper->cur.cache.clip.w;
231 nh = obj->cur.clipper->cur.cache.clip.h;
232 RECTS_CLIP_TO_RECT(cx, cy, cw, ch, nx, ny, nw, nh);
233 }
234
235 nvis = obj->cur.clipper->cur.cache.clip.visible;
236 nr = obj->cur.clipper->cur.cache.clip.r;
237 ng = obj->cur.clipper->cur.cache.clip.g;
238 nb = obj->cur.clipper->cur.cache.clip.b;
239 na = obj->cur.clipper->cur.cache.clip.a;
240 cvis = cvis * nvis;
241 cr = (cr * (nr + 1)) >> 8;
242 cg = (cg * (ng + 1)) >> 8;
243 cb = (cb * (nb + 1)) >> 8;
244 ca = (ca * (na + 1)) >> 8;
245 }
246 if ((ca == 0 && obj->cur.render_op == EVAS_RENDER_BLEND) || (cw <= 0) || (ch <= 0)) cvis = 0;
247 obj->cur.cache.clip.x = cx;
248 obj->cur.cache.clip.y = cy;
249 obj->cur.cache.clip.w = cw;
250 obj->cur.cache.clip.h = ch;
251 obj->cur.cache.clip.visible = cvis;
252 obj->cur.cache.clip.r = cr;
253 obj->cur.cache.clip.g = cg;
254 obj->cur.cache.clip.b = cb;
255 obj->cur.cache.clip.a = ca;
256 obj->cur.cache.clip.dirty = 0;
257}
258
259#endif
diff --git a/libraries/evas/src/lib/include/evas_macros.h b/libraries/evas/src/lib/include/evas_macros.h
new file mode 100644
index 0000000..ed29dbd
--- /dev/null
+++ b/libraries/evas/src/lib/include/evas_macros.h
@@ -0,0 +1,217 @@
1#ifndef EVAS_MACROS_H
2#define EVAS_MACROS_H
3
4#undef ABS
5#define ABS(x) (((x) < 0) ? -(x) : (x))
6
7#undef SGN
8#define SGN(x) (((x) < 0) ? -1 : 1)
9
10#undef MIN
11#define MIN(x, y) (((x) < (y)) ? (x) : (y))
12
13#undef MAX
14#define MAX(x, y) (((x) > (y)) ? (x) : (y))
15
16#define SWAP32(x) (x) = \
17 ((((x) & 0x000000ff ) << 24) | \
18 (((x) & 0x0000ff00 ) << 8) | \
19 (((x) & 0x00ff0000 ) >> 8) | \
20 (((x) & 0xff000000 ) >> 24))
21
22#define SWAP16(x) (x) = \
23 ((((x) & 0x00ff ) << 8) | \
24 (((x) & 0xff00 ) >> 8))
25
26#define SPANS_COMMON(x1, w1, x2, w2) \
27(!(( (int)((x2) + (int)(w2)) <= (int)(x1)) || (int)((x2) >= (int)((x1) + (int)(w1)))))
28
29#define RECTS_INTERSECT(x, y, w, h, xx, yy, ww, hh) \
30((SPANS_COMMON((x), (w), (xx), (ww))) && (SPANS_COMMON((y), (h), (yy), (hh))))
31
32#define RECTS_CLIP_TO_RECT(_x, _y, _w, _h, _cx, _cy, _cw, _ch) \
33{ \
34 if (RECTS_INTERSECT(_x, _y, _w, _h, _cx, _cy, _cw, _ch)) \
35 { \
36 if ((int)_x < (int)(_cx)) \
37 { \
38 if ((int)_w + ((int)_x - (int)(_cx)) < 0) _w = 0; \
39 else _w += ((int)_x - (int)(_cx)); \
40 _x = (_cx); \
41 } \
42 if ((int)(_x + _w) > (int)((_cx) + (_cw))) \
43 _w = (_cx) + (_cw) - _x; \
44 if ((int)_y < (int)(_cy)) \
45 { \
46 if ((int)_h + ((int)_y - (int)(_cy)) < 0) _h = 0; \
47 else _h += ((int)_y - (int)(_cy)); \
48 _y = (_cy); \
49 } \
50 if ((int)(_y + _h) > (int)((_cy) + (_ch))) \
51 _h = (_cy) + (_ch) - _y; \
52 } \
53 else \
54 { \
55 _w = 0; _h = 0; \
56 } \
57}
58
59
60#define INTERP_VAL(out, in1, in2, in3, in4, interp_x, interp_y) \
61 { \
62 int _v, _vv; \
63 \
64 _v = (256 - (interp_x)) * (in1); \
65 if ((interp_x) > 0) _v += (interp_x) * (in2); \
66 _v *= (256 - (interp_y)); \
67 if ((interp_y) > 0) \
68 { \
69 _vv = (256 - (interp_x)) * (in3); \
70 if ((interp_x) > 0) _vv += (interp_x) * (in4); \
71 _vv *= (interp_y); \
72 (out) = ((_v + _vv) >> 16); \
73 } \
74 else (out) = (_v >> 16); \
75 }
76
77#define INTERP_2(in1, in2, interp, interp_inv) \
78 ((in1 * interp_inv) + (in2 * interp)) >> 8
79
80
81#define CONVERT_LOOP_START_ROT_0() \
82 src_ptr = src; \
83 for (y = 0; y < h; y++) \
84 { \
85 for (x = 0; x < w; x++) \
86 {
87
88#define CONVERT_LOOP_END_ROT_0() \
89 dst_ptr++; \
90 src_ptr++; \
91 } \
92 src_ptr += src_jump; \
93 dst_ptr += dst_jump; \
94 }
95
96#define CONVERT_LOOP_START_ROT_180() \
97 src_ptr = src + (w - 1) + ((h - 1) * (w + src_jump)); \
98 for (y = 0; y < h; y++) \
99 { \
100 for (x = 0; x < w; x++) \
101 {
102
103#define CONVERT_LOOP_END_ROT_180() \
104 dst_ptr++; \
105 src_ptr--; \
106 } \
107 src_ptr = src + (w - 1) + ((h - y - 2) * (w + src_jump)); \
108 dst_ptr += dst_jump; \
109 }
110
111#define CONVERT_LOOP_START_ROT_270() \
112 src_ptr = src + ((w - 1) * (h + src_jump)); \
113 for (y = 0; y < h; y++) \
114 { \
115 for (x = 0; x < w; x++) \
116 {
117
118#define CONVERT_LOOP_END_ROT_270() \
119 dst_ptr++; \
120 src_ptr -= (h + src_jump); \
121 } \
122 src_ptr = src + ((w - 1) * (h + src_jump)) + (y + 1); \
123 dst_ptr += dst_jump; \
124 }
125
126#define CONVERT_LOOP_START_ROT_90() \
127 src_ptr = src + (h - 1); \
128 for (y = 0; y < h; y++) \
129 { \
130 for (x = 0; x < w; x++) \
131 {
132
133#define CONVERT_LOOP_END_ROT_90() \
134 dst_ptr++; \
135 src_ptr += (h + src_jump); \
136 } \
137 src_ptr = src + (h - 1) - y - 1; \
138 dst_ptr += dst_jump; \
139 }
140
141#define CONVERT_LOOP2_START_ROT_0() \
142 src_ptr = src; \
143 for (y = 0; y < h; y++) \
144 { \
145 for (x = 0; x < w; x++) \
146 {
147
148#define CONVERT_LOOP2_INC_ROT_0() \
149src_ptr++; \
150x++;
151
152#define CONVERT_LOOP2_END_ROT_0() \
153 dst_ptr+=2; \
154 src_ptr++; \
155 } \
156 src_ptr += src_jump; \
157 dst_ptr += dst_jump; \
158 }
159
160#define CONVERT_LOOP2_START_ROT_180() \
161 src_ptr = src + (w - 1) + ((h - 1) * (w + src_jump)); \
162 for (y = 0; y < h; y++) \
163 { \
164 for (x = 0; x < w; x++) \
165 {
166
167#define CONVERT_LOOP2_INC_ROT_180() \
168src_ptr--; \
169x++;
170
171#define CONVERT_LOOP2_END_ROT_180() \
172 dst_ptr+=2; \
173 src_ptr--; \
174 } \
175 src_ptr = src + (w - 1) + ((h - y - 2) * (w + src_jump)); \
176 dst_ptr += dst_jump; \
177 }
178
179#define CONVERT_LOOP2_START_ROT_270() \
180 src_ptr = src + ((w - 1) * (h + src_jump)); \
181 for (y = 0; y < h; y++) \
182 { \
183 for (x = 0; x < w; x++) \
184 {
185
186#define CONVERT_LOOP2_INC_ROT_270() \
187src_ptr -= (h + src_jump); \
188x++;
189
190#define CONVERT_LOOP2_END_ROT_270() \
191 dst_ptr+=2; \
192 src_ptr -= (h + src_jump); \
193 } \
194 src_ptr = src + ((w - 1) * (h + src_jump)) + (y + 1); \
195 dst_ptr += dst_jump; \
196 }
197
198#define CONVERT_LOOP2_START_ROT_90() \
199 src_ptr = src + (h - 1); \
200 for (y = 0; y < h; y++) \
201 { \
202 for (x = 0; x < w; x++) \
203 {
204
205#define CONVERT_LOOP2_INC_ROT_90() \
206src_ptr += (h + src_jump); \
207x++;
208
209#define CONVERT_LOOP2_END_ROT_90() \
210 dst_ptr+=2; \
211 src_ptr += (h + src_jump); \
212 } \
213 src_ptr = src + (h - 1) - y - 1; \
214 dst_ptr += dst_jump; \
215 }
216
217#endif
diff --git a/libraries/evas/src/lib/include/evas_mmx.h b/libraries/evas/src/lib/include/evas_mmx.h
new file mode 100644
index 0000000..e1095e1
--- /dev/null
+++ b/libraries/evas/src/lib/include/evas_mmx.h
@@ -0,0 +1,735 @@
1/* mmx.h
2
3 MultiMedia eXtensions GCC interface library for IA32.
4
5 To use this library, simply include this header file
6 and compile with GCC. You MUST have inlining enabled
7 in order for mmx_ok() to work; this can be done by
8 simply using -O on the GCC command line.
9
10 Compiling with -DMMX_TRACE will cause detailed trace
11 output to be sent to stderr for each mmx operation.
12 This adds lots of code, and obviously slows execution to
13 a crawl, but can be very useful for debugging.
14
15 THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY
16 EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT
17 LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY
18 AND FITNESS FOR ANY PARTICULAR PURPOSE.
19
20 1997-98 by H. Dietz and R. Fisher
21
22 History:
23 97-98* R.Fisher Early versions
24 980501 R.Fisher Original Release
25 980611* H.Dietz Rewrite, correctly implementing inlines, and
26 R.Fisher including direct register accesses.
27 980616 R.Fisher Release of 980611 as 980616.
28 980714 R.Fisher Minor corrections to Makefile, etc.
29 980715 R.Fisher mmx_ok() now prevents optimizer from using
30 clobbered values.
31 mmx_ok() now checks if cpuid instruction is
32 available before trying to use it.
33 980726* R.Fisher mm_support() searches for AMD 3DNow, Cyrix
34 Extended MMX, and standard MMX. It returns a
35 value which is positive if any of these are
36 supported, and can be masked with constants to
37 see which. mmx_ok() is now a call to this
38 980726* R.Fisher Added i2r support for shift functions
39 980919 R.Fisher Fixed AMD extended feature recognition bug.
40 980921 R.Fisher Added definition/check for _MMX_H.
41 Added "float s[2]" to mmx_t for use with
42 3DNow and EMMX. So same mmx_t can be used.
43 981013 R.Fisher Fixed cpuid function 1 bug (looked at wrong reg)
44 Fixed psllq_i2r error in mmxtest.c
45
46 * Unreleased (internal or interim) versions
47
48 Notes:
49 It appears that the latest gas has the pand problem fixed, therefore
50 I'll undefine BROKEN_PAND by default.
51 String compares may be quicker than the multiple test/jumps in vendor
52 test sequence in mmx_ok(), but I'm not concerned with that right now.
53
54 Acknowledgments:
55 Jussi Laako for pointing out the errors ultimately found to be
56 connected to the failure to notify the optimizer of clobbered values.
57 Roger Hardiman for reminding us that CPUID isn't everywhere, and that
58 someone may actually try to use this on a machine without CPUID.
59 Also for suggesting code for checking this.
60 Robert Dale for pointing out the AMD recognition bug.
61 Jimmy Mayfield and Carl Witty for pointing out the Intel recognition
62 bug.
63 Carl Witty for pointing out the psllq_i2r test bug.
64*/
65
66#ifndef _MMX_H
67#define _MMX_H
68
69/* Warning: at this writing, the version of GAS packaged
70 with most Linux distributions does not handle the
71 parallel AND operation mnemonic correctly. If the
72 symbol BROKEN_PAND is defined, a slower alternative
73 coding will be used. If execution of mmxtest results
74 in an illegal instruction fault, define this symbol.
75*/
76#undef BROKEN_PAND
77
78
79/* The type of an value that fits in an MMX register
80 (note that long long constant values MUST be suffixed
81 by LL and unsigned long long values by ULL, lest
82 they be truncated by the compiler)
83*/
84typedef union {
85 long long q; /* Quadword (64-bit) value */
86 unsigned long long uq; /* Unsigned Quadword */
87 int d[2]; /* 2 Doubleword (32-bit) values */
88 unsigned int ud[2]; /* 2 Unsigned Doubleword */
89 short w[4]; /* 4 Word (16-bit) values */
90 unsigned short uw[4]; /* 4 Unsigned Word */
91 char b[8]; /* 8 Byte (8-bit) values */
92 unsigned char ub[8]; /* 8 Unsigned Byte */
93 float s[2]; /* Single-precision (32-bit) value */
94} __attribute__ ((aligned (8))) mmx_t;
95
96/* Helper functions for the instruction macros that follow...
97 (note that memory-to-register, m2r, instructions are nearly
98 as efficient as register-to-register, r2r, instructions;
99 however, memory-to-memory instructions are really simulated
100 as a convenience, and are only 1/3 as efficient)
101*/
102
103/* These macros are a lot simpler without the tracing...
104*/
105
106#define mmx_i2r(op, imm, reg) \
107 __asm__ __volatile__ (#op " $" #imm ", %%" #reg \
108 : /* nothing */ \
109 : /* nothing */);
110
111#define mmx_m2r(op, mem, reg) \
112 __asm__ __volatile__ (#op " %0, %%" #reg \
113 : /* nothing */ \
114 : "m" (mem))
115
116#define mmx_r2m(op, reg, mem) \
117 __asm__ __volatile__ (#op " %%" #reg ", %0" \
118 : "=m" (mem) \
119 : /* nothing */ )
120
121#define mmx_a2r(op, mem, reg) \
122 __asm__ __volatile__ (#op " %0, %%" #reg \
123 : /* nothing */ \
124 : "m" (mem))
125
126#define mmx_r2a(op, reg, mem) \
127 __asm__ __volatile__ (#op " %%" #reg ", %0" \
128 : "=m" (mem) \
129 : /* nothing */ )
130
131#define mmx_r2r(op, regs, regd) \
132 __asm__ __volatile__ (#op " %" #regs ", %" #regd)
133
134#define mmx_m2m(op, mems, memd) \
135 __asm__ __volatile__ ("movq %0, %%mm0\n\t" \
136 #op " %1, %%mm0\n\t" \
137 "movq %%mm0, %0" \
138 : "=X" (memd) \
139 : "X" (mems))
140
141/* 1x64 MOVE Quadword
142 (this is both a load and a store...
143 in fact, it is the only way to store)
144*/
145#define movq_m2r(var, reg) mmx_m2r(movq, var, reg)
146#define movq_r2m(reg, var) mmx_r2m(movq, reg, var)
147#define movq_r2r(regs, regd) mmx_r2r(movq, regs, regd)
148#define movq(vars, vard) \
149 __asm__ __volatile__ ("movq %1, %%mm0\n\t" \
150 "movq %%mm0, %0" \
151 : "=X" (vard) \
152 : "X" (vars))
153#define movntq_r2m(reg, var) mmx_r2m(movntq, reg, var)
154
155
156/* 1x32 MOVE Doubleword
157 (like movq, this is both load and store...
158 but is most useful for moving things between
159 mmx registers and ordinary registers)
160*/
161#define movd_m2r(var, reg) mmx_a2r(movd, var, reg)
162#define movd_r2m(reg, var) mmx_r2a(movd, reg, var)
163#define movd_r2r(regs, regd) mmx_r2r(movd, regs, regd)
164#define movd(vars, vard) \
165 __asm__ __volatile__ ("movd %1, %%mm0\n\t" \
166 "movd %%mm0, %0" \
167 : "=X" (vard) \
168 : "X" (vars))
169
170
171/* 2x32, 4x16, and 8x8 Parallel ADDs
172*/
173#define paddd_m2r(var, reg) mmx_m2r(paddd, var, reg)
174#define paddd_r2r(regs, regd) mmx_r2r(paddd, regs, regd)
175#define paddd(vars, vard) mmx_m2m(paddd, vars, vard)
176
177#define paddw_m2r(var, reg) mmx_m2r(paddw, var, reg)
178#define paddw_r2r(regs, regd) mmx_r2r(paddw, regs, regd)
179#define paddw(vars, vard) mmx_m2m(paddw, vars, vard)
180
181#define paddb_m2r(var, reg) mmx_m2r(paddb, var, reg)
182#define paddb_r2r(regs, regd) mmx_r2r(paddb, regs, regd)
183#define paddb(vars, vard) mmx_m2m(paddb, vars, vard)
184
185
186/* 4x16 and 8x8 Parallel ADDs using Saturation arithmetic
187*/
188#define paddsw_m2r(var, reg) mmx_m2r(paddsw, var, reg)
189#define paddsw_r2r(regs, regd) mmx_r2r(paddsw, regs, regd)
190#define paddsw(vars, vard) mmx_m2m(paddsw, vars, vard)
191
192#define paddsb_m2r(var, reg) mmx_m2r(paddsb, var, reg)
193#define paddsb_r2r(regs, regd) mmx_r2r(paddsb, regs, regd)
194#define paddsb(vars, vard) mmx_m2m(paddsb, vars, vard)
195
196
197/* 4x16 and 8x8 Parallel ADDs using Unsigned Saturation arithmetic
198*/
199#define paddusw_m2r(var, reg) mmx_m2r(paddusw, var, reg)
200#define paddusw_r2r(regs, regd) mmx_r2r(paddusw, regs, regd)
201#define paddusw(vars, vard) mmx_m2m(paddusw, vars, vard)
202
203#define paddusb_m2r(var, reg) mmx_m2r(paddusb, var, reg)
204#define paddusb_r2r(regs, regd) mmx_r2r(paddusb, regs, regd)
205#define paddusb(vars, vard) mmx_m2m(paddusb, vars, vard)
206
207
208/* 2x32, 4x16, and 8x8 Parallel SUBs
209*/
210#define psubd_m2r(var, reg) mmx_m2r(psubd, var, reg)
211#define psubd_r2r(regs, regd) mmx_r2r(psubd, regs, regd)
212#define psubd(vars, vard) mmx_m2m(psubd, vars, vard)
213
214#define psubw_m2r(var, reg) mmx_m2r(psubw, var, reg)
215#define psubw_r2r(regs, regd) mmx_r2r(psubw, regs, regd)
216#define psubw(vars, vard) mmx_m2m(psubw, vars, vard)
217
218#define psubb_m2r(var, reg) mmx_m2r(psubb, var, reg)
219#define psubb_r2r(regs, regd) mmx_r2r(psubb, regs, regd)
220#define psubb(vars, vard) mmx_m2m(psubb, vars, vard)
221
222
223/* 4x16 and 8x8 Parallel SUBs using Saturation arithmetic
224*/
225#define psubsw_m2r(var, reg) mmx_m2r(psubsw, var, reg)
226#define psubsw_r2r(regs, regd) mmx_r2r(psubsw, regs, regd)
227#define psubsw(vars, vard) mmx_m2m(psubsw, vars, vard)
228
229#define psubsb_m2r(var, reg) mmx_m2r(psubsb, var, reg)
230#define psubsb_r2r(regs, regd) mmx_r2r(psubsb, regs, regd)
231#define psubsb(vars, vard) mmx_m2m(psubsb, vars, vard)
232
233
234/* 4x16 and 8x8 Parallel SUBs using Unsigned Saturation arithmetic
235*/
236#define psubusw_m2r(var, reg) mmx_m2r(psubusw, var, reg)
237#define psubusw_r2r(regs, regd) mmx_r2r(psubusw, regs, regd)
238#define psubusw(vars, vard) mmx_m2m(psubusw, vars, vard)
239
240#define psubusb_m2r(var, reg) mmx_m2r(psubusb, var, reg)
241#define psubusb_r2r(regs, regd) mmx_r2r(psubusb, regs, regd)
242#define psubusb(vars, vard) mmx_m2m(psubusb, vars, vard)
243
244
245/* 4x16 Parallel MULs giving Low 4x16 portions of results
246*/
247#define pmullw_m2r(var, reg) mmx_m2r(pmullw, var, reg)
248#define pmullw_r2r(regs, regd) mmx_r2r(pmullw, regs, regd)
249#define pmullw(vars, vard) mmx_m2m(pmullw, vars, vard)
250
251
252/* 4x16 Parallel MULs giving High 4x16 portions of results
253*/
254#define pmulhw_m2r(var, reg) mmx_m2r(pmulhw, var, reg)
255#define pmulhw_r2r(regs, regd) mmx_r2r(pmulhw, regs, regd)
256#define pmulhw(vars, vard) mmx_m2m(pmulhw, vars, vard)
257
258
259/* 4x16->2x32 Parallel Mul-ADD
260 (muls like pmullw, then adds adjacent 16-bit fields
261 in the multiply result to make the final 2x32 result)
262*/
263#define pmaddwd_m2r(var, reg) mmx_m2r(pmaddwd, var, reg)
264#define pmaddwd_r2r(regs, regd) mmx_r2r(pmaddwd, regs, regd)
265#define pmaddwd(vars, vard) mmx_m2m(pmaddwd, vars, vard)
266
267
268/* 1x64 bitwise AND
269*/
270#ifdef BROKEN_PAND
271#define pand_m2r(var, reg) \
272 { \
273 mmx_m2r(pandn, (mmx_t) -1LL, reg); \
274 mmx_m2r(pandn, var, reg); \
275 }
276#define pand_r2r(regs, regd) \
277 { \
278 mmx_m2r(pandn, (mmx_t) -1LL, regd); \
279 mmx_r2r(pandn, regs, regd) \
280 }
281#define pand(vars, vard) \
282 { \
283 movq_m2r(vard, mm0); \
284 mmx_m2r(pandn, (mmx_t) -1LL, mm0); \
285 mmx_m2r(pandn, vars, mm0); \
286 movq_r2m(mm0, vard); \
287 }
288#else
289#define pand_m2r(var, reg) mmx_m2r(pand, var, reg)
290#define pand_r2r(regs, regd) mmx_r2r(pand, regs, regd)
291#define pand(vars, vard) mmx_m2m(pand, vars, vard)
292#endif
293
294
295/* 1x64 bitwise AND with Not the destination
296*/
297#define pandn_m2r(var, reg) mmx_m2r(pandn, var, reg)
298#define pandn_r2r(regs, regd) mmx_r2r(pandn, regs, regd)
299#define pandn(vars, vard) mmx_m2m(pandn, vars, vard)
300
301
302/* 1x64 bitwise OR
303*/
304#define por_m2r(var, reg) mmx_m2r(por, var, reg)
305#define por_r2r(regs, regd) mmx_r2r(por, regs, regd)
306#define por(vars, vard) mmx_m2m(por, vars, vard)
307
308
309/* 1x64 bitwise eXclusive OR
310*/
311#define pxor_m2r(var, reg) mmx_m2r(pxor, var, reg)
312#define pxor_r2r(regs, regd) mmx_r2r(pxor, regs, regd)
313#define pxor(vars, vard) mmx_m2m(pxor, vars, vard)
314
315
316/* 2x32, 4x16, and 8x8 Parallel CoMPare for EQuality
317 (resulting fields are either 0 or -1)
318*/
319#define pcmpeqd_m2r(var, reg) mmx_m2r(pcmpeqd, var, reg)
320#define pcmpeqd_r2r(regs, regd) mmx_r2r(pcmpeqd, regs, regd)
321#define pcmpeqd(vars, vard) mmx_m2m(pcmpeqd, vars, vard)
322
323#define pcmpeqw_m2r(var, reg) mmx_m2r(pcmpeqw, var, reg)
324#define pcmpeqw_r2r(regs, regd) mmx_r2r(pcmpeqw, regs, regd)
325#define pcmpeqw(vars, vard) mmx_m2m(pcmpeqw, vars, vard)
326
327#define pcmpeqb_m2r(var, reg) mmx_m2r(pcmpeqb, var, reg)
328#define pcmpeqb_r2r(regs, regd) mmx_r2r(pcmpeqb, regs, regd)
329#define pcmpeqb(vars, vard) mmx_m2m(pcmpeqb, vars, vard)
330
331
332/* 2x32, 4x16, and 8x8 Parallel CoMPare for Greater Than
333 (resulting fields are either 0 or -1)
334*/
335#define pcmpgtd_m2r(var, reg) mmx_m2r(pcmpgtd, var, reg)
336#define pcmpgtd_r2r(regs, regd) mmx_r2r(pcmpgtd, regs, regd)
337#define pcmpgtd(vars, vard) mmx_m2m(pcmpgtd, vars, vard)
338
339#define pcmpgtw_m2r(var, reg) mmx_m2r(pcmpgtw, var, reg)
340#define pcmpgtw_r2r(regs, regd) mmx_r2r(pcmpgtw, regs, regd)
341#define pcmpgtw(vars, vard) mmx_m2m(pcmpgtw, vars, vard)
342
343#define pcmpgtb_m2r(var, reg) mmx_m2r(pcmpgtb, var, reg)
344#define pcmpgtb_r2r(regs, regd) mmx_r2r(pcmpgtb, regs, regd)
345#define pcmpgtb(vars, vard) mmx_m2m(pcmpgtb, vars, vard)
346
347
348/* 1x64, 2x32, and 4x16 Parallel Shift Left Logical
349*/
350#define psllq_i2r(imm, reg) mmx_i2r(psllq, imm, reg)
351#define psllq_m2r(var, reg) mmx_m2r(psllq, var, reg)
352#define psllq_r2r(regs, regd) mmx_r2r(psllq, regs, regd)
353#define psllq(vars, vard) mmx_m2m(psllq, vars, vard)
354
355#define pslld_i2r(imm, reg) mmx_i2r(pslld, imm, reg)
356#define pslld_m2r(var, reg) mmx_m2r(pslld, var, reg)
357#define pslld_r2r(regs, regd) mmx_r2r(pslld, regs, regd)
358#define pslld(vars, vard) mmx_m2m(pslld, vars, vard)
359
360#define psllw_i2r(imm, reg) mmx_i2r(psllw, imm, reg)
361#define psllw_m2r(var, reg) mmx_m2r(psllw, var, reg)
362#define psllw_r2r(regs, regd) mmx_r2r(psllw, regs, regd)
363#define psllw(vars, vard) mmx_m2m(psllw, vars, vard)
364
365
366/* 1x64, 2x32, and 4x16 Parallel Shift Right Logical
367*/
368#define psrlq_i2r(imm, reg) mmx_i2r(psrlq, imm, reg)
369#define psrlq_m2r(var, reg) mmx_m2r(psrlq, var, reg)
370#define psrlq_r2r(regs, regd) mmx_r2r(psrlq, regs, regd)
371#define psrlq(vars, vard) mmx_m2m(psrlq, vars, vard)
372
373#define psrld_i2r(imm, reg) mmx_i2r(psrld, imm, reg)
374#define psrld_m2r(var, reg) mmx_m2r(psrld, var, reg)
375#define psrld_r2r(regs, regd) mmx_r2r(psrld, regs, regd)
376#define psrld(vars, vard) mmx_m2m(psrld, vars, vard)
377
378#define psrlw_i2r(imm, reg) mmx_i2r(psrlw, imm, reg)
379#define psrlw_m2r(var, reg) mmx_m2r(psrlw, var, reg)
380#define psrlw_r2r(regs, regd) mmx_r2r(psrlw, regs, regd)
381#define psrlw(vars, vard) mmx_m2m(psrlw, vars, vard)
382
383
384/* 2x32 and 4x16 Parallel Shift Right Arithmetic
385*/
386#define psrad_i2r(imm, reg) mmx_i2r(psrad, imm, reg)
387#define psrad_m2r(var, reg) mmx_m2r(psrad, var, reg)
388#define psrad_r2r(regs, regd) mmx_r2r(psrad, regs, regd)
389#define psrad(vars, vard) mmx_m2m(psrad, vars, vard)
390
391#define psraw_i2r(imm, reg) mmx_i2r(psraw, imm, reg)
392#define psraw_m2r(var, reg) mmx_m2r(psraw, var, reg)
393#define psraw_r2r(regs, regd) mmx_r2r(psraw, regs, regd)
394#define psraw(vars, vard) mmx_m2m(psraw, vars, vard)
395
396
397/* 2x32->4x16 and 4x16->8x8 PACK and Signed Saturate
398 (packs source and dest fields into dest in that order)
399*/
400#define packssdw_m2r(var, reg) mmx_m2r(packssdw, var, reg)
401#define packssdw_r2r(regs, regd) mmx_r2r(packssdw, regs, regd)
402#define packssdw(vars, vard) mmx_m2m(packssdw, vars, vard)
403
404#define packsswb_m2r(var, reg) mmx_m2r(packsswb, var, reg)
405#define packsswb_r2r(regs, regd) mmx_r2r(packsswb, regs, regd)
406#define packsswb(vars, vard) mmx_m2m(packsswb, vars, vard)
407
408
409/* 4x16->8x8 PACK and Unsigned Saturate
410 (packs source and dest fields into dest in that order)
411*/
412#define packuswb_m2r(var, reg) mmx_m2r(packuswb, var, reg)
413#define packuswb_r2r(regs, regd) mmx_r2r(packuswb, regs, regd)
414#define packuswb(vars, vard) mmx_m2m(packuswb, vars, vard)
415
416
417/* 2x32->1x64, 4x16->2x32, and 8x8->4x16 UNPaCK Low
418 (interleaves low half of dest with low half of source
419 as padding in each result field)
420*/
421#define punpckldq_m2r(var, reg) mmx_m2r(punpckldq, var, reg)
422#define punpckldq_r2r(regs, regd) mmx_r2r(punpckldq, regs, regd)
423#define punpckldq(vars, vard) mmx_m2m(punpckldq, vars, vard)
424
425#define punpcklwd_m2r(var, reg) mmx_m2r(punpcklwd, var, reg)
426#define punpcklwd_r2r(regs, regd) mmx_r2r(punpcklwd, regs, regd)
427#define punpcklwd(vars, vard) mmx_m2m(punpcklwd, vars, vard)
428
429#define punpcklbw_m2r(var, reg) mmx_m2r(punpcklbw, var, reg)
430#define punpcklbw_r2r(regs, regd) mmx_r2r(punpcklbw, regs, regd)
431#define punpcklbw(vars, vard) mmx_m2m(punpcklbw, vars, vard)
432
433
434/* 2x32->1x64, 4x16->2x32, and 8x8->4x16 UNPaCK High
435 (interleaves high half of dest with high half of source
436 as padding in each result field)
437*/
438#define punpckhdq_m2r(var, reg) mmx_m2r(punpckhdq, var, reg)
439#define punpckhdq_r2r(regs, regd) mmx_r2r(punpckhdq, regs, regd)
440#define punpckhdq(vars, vard) mmx_m2m(punpckhdq, vars, vard)
441
442#define punpckhwd_m2r(var, reg) mmx_m2r(punpckhwd, var, reg)
443#define punpckhwd_r2r(regs, regd) mmx_r2r(punpckhwd, regs, regd)
444#define punpckhwd(vars, vard) mmx_m2m(punpckhwd, vars, vard)
445
446#define punpckhbw_m2r(var, reg) mmx_m2r(punpckhbw, var, reg)
447#define punpckhbw_r2r(regs, regd) mmx_r2r(punpckhbw, regs, regd)
448#define punpckhbw(vars, vard) mmx_m2m(punpckhbw, vars, vard)
449
450#define MOVE_8DWORDS_MMX(src,dst) \
451 __asm__ ( \
452 "movq (%1), %%mm0 \n" \
453 "movq 0x8(%1), %%mm1 \n" \
454 "movq 0x10(%1), %%mm2 \n" \
455 "movq 0x18(%1), %%mm3 \n" \
456 "movq %%mm0, (%0) \n" \
457 "movq %%mm1, 0x8(%0) \n" \
458 "movq %%mm2, 0x10(%0) \n" \
459 "movq %%mm3, 0x18(%0) \n" \
460 : \
461 : "q" (dst), "r" (src) \
462 : "memory", "st");
463
464#define MOVE_10DWORDS_MMX(src,dst) \
465 __asm__ ( \
466 "movq (%1), %%mm0 \n" \
467 "movq 0x8(%1), %%mm1 \n" \
468 "movq 0x10(%1), %%mm2 \n" \
469 "movq 0x18(%1), %%mm3 \n" \
470 "movq 0x20(%1), %%mm4 \n" \
471 "movq %%mm0, (%0) \n" \
472 "movq %%mm1, 0x8(%0) \n" \
473 "movq %%mm2, 0x10(%0) \n" \
474 "movq %%mm3, 0x18(%0) \n" \
475 "movq %%mm4, 0x20(%0) \n" \
476 : \
477 : "q" (dst), "r" (src) \
478 : "memory", "st");
479
480#define MOVE_16DWORDS_MMX(src,dst) \
481 __asm__ ( \
482 "movq (%1), %%mm0 \n" \
483 "movq 0x8(%1), %%mm1 \n" \
484 "movq 0x10(%1), %%mm2 \n" \
485 "movq 0x18(%1), %%mm3 \n" \
486 "movq 0x20(%1), %%mm4 \n" \
487 "movq 0x28(%1), %%mm5 \n" \
488 "movq 0x30(%1), %%mm6 \n" \
489 "movq 0x38(%1), %%mm7 \n" \
490 "movq %%mm0, (%0) \n" \
491 "movq %%mm1, 0x8(%0) \n" \
492 "movq %%mm2, 0x10(%0) \n" \
493 "movq %%mm3, 0x18(%0) \n" \
494 "movq %%mm4, 0x20(%0) \n" \
495 "movq %%mm5, 0x28(%0) \n" \
496 "movq %%mm6, 0x30(%0) \n" \
497 "movq %%mm7, 0x38(%0) \n" \
498 : \
499 : "q" (dst), "r" (src) \
500 : "memory", "st");
501
502#define MOVE_16DWORDS_MMX2(src,dst) \
503 __asm__ ( \
504 "movq (%1), %%mm0 \n" \
505 "movq 0x8(%1), %%mm1 \n" \
506 "movq 0x10(%1), %%mm2 \n" \
507 "movq 0x18(%1), %%mm3 \n" \
508 "movq 0x20(%1), %%mm4 \n" \
509 "movq 0x28(%1), %%mm5 \n" \
510 "movq 0x30(%1), %%mm6 \n" \
511 "movq 0x38(%1), %%mm7 \n" \
512 "movntq %%mm0, (%0) \n" \
513 "movntq %%mm1, 0x8(%0) \n" \
514 "movntq %%mm2, 0x10(%0) \n" \
515 "movntq %%mm3, 0x18(%0) \n" \
516 "movntq %%mm4, 0x20(%0) \n" \
517 "movntq %%mm5, 0x28(%0) \n" \
518 "movntq %%mm6, 0x30(%0) \n" \
519 "movntq %%mm7, 0x38(%0) \n" \
520 : \
521 : "q" (dst), "r" (src) \
522 : "memory", "st");
523
524#define MOVE_32DWORDS_SSE2(src,dst) \
525 __asm__ ( \
526 "movdqu (%1), %%xmm0 \n" \
527 "movdqu 0x10(%1), %%xmm1 \n" \
528 "movdqu 0x20(%1), %%xmm2 \n" \
529 "movdqu 0x30(%1), %%xmm3 \n" \
530 "movdqu 0x40(%1), %%xmm4 \n" \
531 "movdqu 0x50(%1), %%xmm5 \n" \
532 "movdqu 0x60(%1), %%xmm6 \n" \
533 "movdqu 0x70(%1), %%xmm7 \n" \
534 "movntdq %%xmm0, (%0) \n" \
535 "movntdq %%xmm1, 0x10(%0) \n" \
536 "movntdq %%xmm2, 0x20(%0) \n" \
537 "movntdq %%xmm3, 0x30(%0) \n" \
538 "movntdq %%xmm4, 0x40(%0) \n" \
539 "movntdq %%xmm5, 0x50(%0) \n" \
540 "movntdq %%xmm6, 0x60(%0) \n" \
541 "movntdq %%xmm7, 0x70(%0) \n" \
542 : \
543 : "q" (dst), "r" (src) \
544 : "memory", "st");
545
546#define MOVE_32DWORDS_ALIGNED_SSE2(src,dst) \
547 __asm__ ( \
548 "movdqa (%1), %%xmm0 \n" \
549 "movdqa 0x10(%1), %%xmm1 \n" \
550 "movdqa 0x20(%1), %%xmm2 \n" \
551 "movdqa 0x30(%1), %%xmm3 \n" \
552 "movdqa 0x40(%1), %%xmm4 \n" \
553 "movdqa 0x50(%1), %%xmm5 \n" \
554 "movdqa 0x60(%1), %%xmm6 \n" \
555 "movdqa 0x70(%1), %%xmm7 \n" \
556 "movntdq %%xmm0, (%0) \n" \
557 "movntdq %%xmm1, 0x10(%0) \n" \
558 "movntdq %%xmm2, 0x20(%0) \n" \
559 "movntdq %%xmm3, 0x30(%0) \n" \
560 "movntdq %%xmm4, 0x40(%0) \n" \
561 "movntdq %%xmm5, 0x50(%0) \n" \
562 "movntdq %%xmm6, 0x60(%0) \n" \
563 "movntdq %%xmm7, 0x70(%0) \n" \
564 : \
565 : "q" (dst), "r" (src) \
566 : "memory", "st");
567
568/* Empty MMx State
569 (used to clean-up when going from mmx to float use
570 of the registers that are shared by both; note that
571 there is no float-to-mmx operation needed, because
572 only the float tag word info is corruptible)
573*/
574
575#define emms() __asm__ __volatile__ ("emms":::"memory")
576#define sfence() __asm__ __volatile__ ("sfence":::"memory")
577
578/* additions to detect mmx - */
579/* Raster <raster@rasterman.com> */
580
581#define CPUID_MMX (1 << 23) /* flags: mmx */
582#define CPUID_SSE (1 << 25) /* flags: xmm */
583#define CPUID_SSE2 (1 << 26) /* flags: ? */
584
585/*
586#ifdef __amd64
587#define have_cpuid(cpuid_ret) \
588 __asm__ __volatile__ ( \
589 ".align 32 \n" \
590 " pushq %%rbx \n" \
591 " pushfq \n" \
592 " popq %%rax \n" \
593 " movq %%rax, %%rbx \n" \
594 " xorq $0x200000, %%rax \n" \
595 " pushq %%rax \n" \
596 " popfq \n" \
597 " pushfq \n" \
598 " popq %%rax \n" \
599 " cmpq %%rax, %%rbx \n" \
600 " je 1f \n" \
601 " movl $1, %0 \n" \
602 " jmp 2f \n" \
603 "1: \n" \
604 " movl $0, %0 \n" \
605 "2: \n" \
606 " popq %%rbx \n" \
607 : "=m" (cpuid_ret) \
608 );
609
610#define get_cpuid(cpuid_ret) \
611 __asm__ __volatile__ ( \
612 ".align 32 \n" \
613 " pushq %%rax \n" \
614 " movl $1, %%eax \n" \
615 " cpuid \n" \
616 " test $0x00800000, %%edx\n" \
617 "1: \n" \
618 " movl %%edx, %0 \n" \
619 " jmp 2f \n" \
620 "2: \n" \
621 " movl $0, %0 \n" \
622 " popq %%rax \n" \
623 : "=m" (cpuid_ret) \
624 );
625#else
626#define have_cpuid(cpuid_ret) \
627 __asm__ __volatile__ ( \
628 ".align 32 \n" \
629 " pushl %%ebx \n" \
630 " pushfl \n" \
631 " popl %%eax \n" \
632 " movl %%eax, %%ebx \n" \
633 " xorl $0x200000, %%eax \n" \
634 " pushl %%eax \n" \
635 " popfl \n" \
636 " pushfl \n" \
637 " popl %%eax \n" \
638 " cmpl %%eax, %%ebx \n" \
639 " je 1f \n" \
640 " movl $1, %0 \n" \
641 " jmp 2f \n" \
642 "1: \n" \
643 " movl $0, %0 \n" \
644 "2: \n" \
645 " popl %%ebx \n" \
646 : "=m" (cpuid_ret) \
647 );
648
649#define get_cpuid(cpuid_ret) \
650 __asm__ __volatile__ ( \
651 ".align 32 \n" \
652 " pushl %%eax \n" \
653 " movl $1, %%eax \n" \
654 " cpuid \n" \
655 " test $0x00800000, %%edx\n" \
656 "1: \n" \
657 " movl %%edx, %0 \n" \
658 " jmp 2f \n" \
659 "2: \n" \
660 " movl $0, %0 \n" \
661 " popl %%eax \n" \
662 : "=m" (cpuid_ret) \
663 );
664#endif
665 */
666
667#define prefetch(var) \
668 __asm__ __volatile__ ( \
669 "prefetchnta (%0) \n" \
670 : \
671 : "r" (var) \
672 );
673#define prefetch0(var) \
674 __asm__ __volatile__ ( \
675 "prefetcht0 (%0) \n" \
676 : \
677 : "r" (var) \
678 );
679#define prefetch1(var) \
680 __asm__ __volatile__ ( \
681 "prefetcht1 (%0) \n" \
682 : \
683 : "r" (var) \
684 );
685#define prefetch2(var) \
686 __asm__ __volatile__ ( \
687 "prefetcht2 (%0) \n" \
688 : \
689 : "r" (var) \
690 );
691#define pshufw(r1, r2, imm) \
692 __asm__ __volatile__ ( \
693 "pshufw $" #imm ", %" #r1 ", %" #r2 " \n" \
694 );
695
696#define pshufhw(r1, r2, imm) \
697 __asm__ __volatile__ ( \
698 "pshufhw $" #imm ", %" #r1 ", %" #r2 " \n" \
699 );
700
701#define pshuflw(r1, r2, imm) \
702 __asm__ __volatile__ ( \
703 "pshuflw $" #imm ", %" #r1 ", %" #r2 " \n" \
704 );
705#define pshufd(r1, r2, imm) \
706 __asm__ __volatile__ ( \
707 "pshufd $" #imm ", %" #r1 ", %" #r2 " \n" \
708 );
709
710/* 1x238 MOVE Doouble Quadword
711 (this is both a load and a store...
712 in fact, it is the only way to store)
713*/
714#define movdqu_m2r(var, reg) mmx_m2r(movdqu, var, reg)
715#define movdqu_r2m(reg, var) mmx_r2m(movdqu, reg, var)
716#define movdqu_r2r(regs, regd) mmx_r2r(movdqu, regs, regd)
717#define movdqu(vars, vard) \
718 __asm__ __volatile__ ("movdqu %1, %%xmm0\n\t" \
719 "movdqu %%xmm0, %0" \
720 : "=X" (vard) \
721 : "X" (vars))
722#define movdqa_m2r(var, reg) mmx_m2r(movdqa, var, reg)
723#define movdqa_r2m(reg, var) mmx_r2m(movdqa, reg, var)
724#define movdqa_r2r(regs, regd) mmx_r2r(movdqa, regs, regd)
725#define movdqa(vars, vard) \
726 __asm__ __volatile__ ("movdqa %1, %%xmm0\n\t" \
727 "movdqa %%xmm0, %0" \
728 : "=X" (vard) \
729 : "X" (vars))
730#define movntdq_r2m(reg, var) mmx_r2m(movntdq, reg, var)
731
732
733/* end additions */
734
735#endif
diff --git a/libraries/evas/src/lib/include/evas_options.h b/libraries/evas/src/lib/include/evas_options.h
new file mode 100644
index 0000000..f6739c0
--- /dev/null
+++ b/libraries/evas/src/lib/include/evas_options.h
@@ -0,0 +1,69 @@
1#ifndef EVAS_OPTIONS_H
2#define EVAS_OPTIONS_H 1
3
4/* these may vary per OS */
5
6/* what to build *//* small dither table is MUCH faster on ipaq */
7/*#define BUILD_SMALL_DITHER_MASK*/
8
9/*#define HARD_CODED_P3*/
10/*#define HARD_CODED_P2*/
11
12/*#define BUILD_CONVERT_1_GRY_1*/
13/*#define BUILD_CONVERT_4_GRY_1*/
14/*#define BUILD_CONVERT_4_GRY_4*/
15/*#define BUILD_CONVERT_8_GRY_1*/
16/*#define BUILD_CONVERT_8_GRY_4*/
17/*#define BUILD_CONVERT_8_GRY_16*/
18/*#define BUILD_CONVERT_8_GRY_64*/
19/*#define BUILD_CONVERT_8_GRY_256*/
20/*#define BUILD_CONVERT_8_RGB_332*/
21/*#define BUILD_CONVERT_8_RGB_666*/
22/*#define BUILD_CONVERT_8_RGB_232*/
23/*#define BUILD_CONVERT_8_RGB_222*/
24/*#define BUILD_CONVERT_8_RGB_221*/
25/*#define BUILD_CONVERT_8_RGB_121*/
26/*#define BUILD_CONVERT_8_RGB_111*/
27/*#define BUILD_CONVERT_16_RGB_565*/
28/*#define BUILD_CONVERT_16_RGB_555*/
29/*#define BUILD_CONVERT_16_RGB_444*/
30/*#define BUILD_CONVERT_16_RGB_454645*/
31/*#define BUILD_CONVERT_16_RGB_ROT0*/
32/*#define BUILD_CONVERT_16_RGB_ROT270*/
33/*#define BUILD_CONVERT_24_RGB_888*/
34/*#define BUILD_CONVERT_24_BGR_888*/
35/*#define BUILD_CONVERT_32_RGB_8888*/
36/*#define BUILD_CONVERT_32_BGR_8888*/
37/*#define BUILD_CONVERT_32_RGB_ROT0*/
38/*#define BUILD_CONVERT_32_RGB_ROT270*/
39
40/*#define BUILD_SCALE_SAMPLE*/
41/*#define BUILD_SCALE_SMOOTH*/
42/*#define BUILD_SCALE_TRILINEAR*/
43
44/*#define BUILD_MMX*/
45/*#define BUILD_SSE*/
46/*#define BUILD_SSE3*/
47/*#define BUILD_C*/
48
49/*#define BUILD_LOADER_PNG*/
50/*#define BUILD_LOADER_JPEG*/
51/*#define BUILD_LOADER_EET*/
52/*#define BUILD_LOADER_EDB*/
53
54/*#define BUILD_FMEMOPEN*/
55
56/* check in that the user configured it right */
57#ifndef BUILD_MMX
58# ifndef BUILD_SSE3
59# ifndef BUILD_SSE
60# ifndef BUILD_C
61# error "Please Read the README"
62 #endif
63# endif
64# endif
65#endif
66
67#define DIRECT_SCALE
68
69#endif
diff --git a/libraries/evas/src/lib/include/evas_private.h b/libraries/evas/src/lib/include/evas_private.h
new file mode 100644
index 0000000..90498d0
--- /dev/null
+++ b/libraries/evas/src/lib/include/evas_private.h
@@ -0,0 +1,1107 @@
1#ifndef EVAS_PRIVATE_H
2#define EVAS_PRIVATE_H
3
4#ifdef HAVE_CONFIG_H
5# include <config.h>
6#endif
7
8#include <Eina.h>
9#include <eina_safety_checks.h>
10#include "Evas.h"
11
12#include "../file/evas_module.h"
13#include "../file/evas_path.h"
14#include "../engines/common/evas_text_utils.h"
15#include "../engines/common/language/evas_bidi_utils.h"
16#include "../engines/common/language/evas_language_utils.h"
17
18#ifdef EVAS_MAGIC_DEBUG
19/* complain when peole pass in wrong object types etc. */
20# define MAGIC_DEBUG
21#endif
22
23#define RENDER_METHOD_INVALID 0x00000000
24
25typedef struct _Evas_Layer Evas_Layer;
26typedef struct _Evas_Size Evas_Size;
27typedef struct _Evas_Aspect Evas_Aspect;
28typedef struct _Evas_Border Evas_Border;
29typedef struct _Evas_Double_Pair Evas_Double_Pair;
30typedef struct _Evas_Size_Hints Evas_Size_Hints;
31typedef struct _Evas_Font_Dir Evas_Font_Dir;
32typedef struct _Evas_Font Evas_Font;
33typedef struct _Evas_Font_Alias Evas_Font_Alias;
34typedef struct _Evas_Font_Description Evas_Font_Description;
35typedef struct _Evas_Data_Node Evas_Data_Node;
36typedef struct _Evas_Func_Node Evas_Func_Node;
37typedef RGBA_Image_Loadopts Evas_Image_Load_Opts;
38typedef struct _Evas_Func Evas_Func;
39typedef struct _Evas_Image_Load_Func Evas_Image_Load_Func;
40typedef struct _Evas_Image_Save_Func Evas_Image_Save_Func;
41typedef struct _Evas_Object_Func Evas_Object_Func;
42typedef struct _Evas_Intercept_Func Evas_Intercept_Func;
43typedef struct _Evas_Key_Grab Evas_Key_Grab;
44typedef struct _Evas_Callbacks Evas_Callbacks;
45typedef struct _Evas_Format Evas_Format;
46typedef struct _Evas_Map_Point Evas_Map_Point;
47typedef struct _Evas_Smart_Cb_Description_Array Evas_Smart_Cb_Description_Array;
48typedef struct _Evas_Post_Callback Evas_Post_Callback;
49typedef struct _Evas_Coord_Touch_Point Evas_Coord_Touch_Point;
50
51enum _Evas_Font_Style
52{
53 EVAS_FONT_STYLE_SLANT,
54 EVAS_FONT_STYLE_WEIGHT,
55 EVAS_FONT_STYLE_WIDTH
56};
57
58enum _Evas_Font_Slant
59{
60 EVAS_FONT_SLANT_NORMAL,
61 EVAS_FONT_SLANT_OBLIQUE,
62 EVAS_FONT_SLANT_ITALIC
63};
64
65enum _Evas_Font_Weight
66{
67 EVAS_FONT_WEIGHT_NORMAL,
68 EVAS_FONT_WEIGHT_THIN,
69 EVAS_FONT_WEIGHT_ULTRALIGHT,
70 EVAS_FONT_WEIGHT_LIGHT,
71 EVAS_FONT_WEIGHT_BOOK,
72 EVAS_FONT_WEIGHT_MEDIUM,
73 EVAS_FONT_WEIGHT_SEMIBOLD,
74 EVAS_FONT_WEIGHT_BOLD,
75 EVAS_FONT_WEIGHT_ULTRABOLD,
76 EVAS_FONT_WEIGHT_BLACK,
77 EVAS_FONT_WEIGHT_EXTRABLACK
78};
79
80enum _Evas_Font_Width
81{
82 EVAS_FONT_WIDTH_NORMAL,
83 EVAS_FONT_WIDTH_ULTRACONDENSED,
84 EVAS_FONT_WIDTH_EXTRACONDENSED,
85 EVAS_FONT_WIDTH_CONDENSED,
86 EVAS_FONT_WIDTH_SEMICONDENSED,
87 EVAS_FONT_WIDTH_SEMIEXPANDED,
88 EVAS_FONT_WIDTH_EXPANDED,
89 EVAS_FONT_WIDTH_EXTRAEXPANDED,
90 EVAS_FONT_WIDTH_ULTRAEXPANDED
91};
92
93typedef enum _Evas_Font_Style Evas_Font_Style;
94typedef enum _Evas_Font_Slant Evas_Font_Slant;
95typedef enum _Evas_Font_Weight Evas_Font_Weight;
96typedef enum _Evas_Font_Width Evas_Font_Width;
97
98/* General types - used for script type chceking */
99#define OPAQUE_TYPE(type) struct __##type { int a; }; \
100 typedef struct __##type type
101
102OPAQUE_TYPE(Evas_Font_Set); /* General type for RGBA_Font */
103OPAQUE_TYPE(Evas_Font_Instance); /* General type for RGBA_Font_Int */
104/* End of general types */
105
106#define MAGIC_EVAS 0x70777770
107#define MAGIC_OBJ 0x71777770
108#define MAGIC_OBJ_RECTANGLE 0x71777771
109#define MAGIC_OBJ_LINE 0x71777772
110#define MAGIC_OBJ_POLYGON 0x71777774
111#define MAGIC_OBJ_IMAGE 0x71777775
112#define MAGIC_OBJ_TEXT 0x71777776
113#define MAGIC_OBJ_SMART 0x71777777
114#define MAGIC_OBJ_TEXTBLOCK 0x71777778
115#define MAGIC_SMART 0x72777770
116#define MAGIC_OBJ_SHAPE 0x72777773
117#define MAGIC_OBJ_CONTAINER 0x72777774
118#define MAGIC_OBJ_CUSTOM 0x72777775
119#define MAGIC_EVAS_GL 0x72777776
120#define MAGIC_MAP 0x72777777
121
122#ifdef MAGIC_DEBUG
123# define MAGIC_CHECK_FAILED(o, t, m) \
124{evas_debug_error(); \
125 if (!o) evas_debug_input_null(); \
126 else if (((t *)o)->magic == 0) evas_debug_magic_null(); \
127 else evas_debug_magic_wrong((m), ((t *)o)->magic); \
128}
129# define MAGIC_CHECK(o, t, m) \
130{if ((!o) || (!(((t *)o)->magic == (m)))) { \
131MAGIC_CHECK_FAILED(o, t, m)
132# define MAGIC_CHECK_END() }}
133#else
134# define MAGIC_CHECK_FAILED(o, t, m)
135# define MAGIC_CHECK(o, t, m) { if (!o) {
136# define MAGIC_CHECK_END() }}
137#endif
138
139#define NEW_RECT(_r, _x, _y, _w, _h) (_r) = eina_rectangle_new(_x, _y, _w, _h);
140
141#define MERR_NONE() _evas_alloc_error = EVAS_ALLOC_ERROR_NONE
142#define MERR_FATAL() _evas_alloc_error = EVAS_ALLOC_ERROR_FATAL
143#define MERR_BAD() _evas_alloc_error = EVAS_ALLOC_ERROR_RECOVERED
144
145#define EVAS_OBJECT_IMAGE_FREE_FILE_AND_KEY(o) \
146 if ((o)->cur.file) \
147 { \
148 eina_stringshare_del((o)->cur.file); \
149 if ((o)->prev.file == (o)->cur.file) \
150 (o)->prev.file = NULL; \
151 (o)->cur.file = NULL; \
152 } \
153 if ((o)->cur.key) \
154 { \
155 eina_stringshare_del((o)->cur.key); \
156 if ((o)->prev.key == (o)->cur.key) \
157 (o)->prev.key = NULL; \
158 (o)->cur.key = NULL; \
159 } \
160 if ((o)->prev.file) \
161 { \
162 eina_stringshare_del((o)->prev.file); \
163 (o)->prev.file = NULL; \
164 } \
165 if ((o)->prev.key) \
166 { \
167 eina_stringshare_del((o)->prev.key); \
168 (o)->prev.key = NULL; \
169 }
170
171struct _Evas_Coord_Touch_Point
172{
173 Evas_Coord x, y; // point's x, y position
174 int id; // id in order to distinguish each point
175 Evas_Touch_Point_State state;
176};
177
178struct _Evas_Key_Grab
179{
180 char *keyname;
181 Evas_Modifier_Mask modifiers;
182 Evas_Modifier_Mask not_modifiers;
183 Evas_Object *object;
184 Eina_Bool exclusive : 1;
185 Eina_Bool just_added : 1;
186 Eina_Bool delete_me : 1;
187};
188
189struct _Evas_Intercept_Func
190{
191 struct {
192 Evas_Object_Intercept_Show_Cb func;
193 void *data;
194 } show;
195 struct {
196 Evas_Object_Intercept_Hide_Cb func;
197 void *data;
198 } hide;
199 struct {
200 Evas_Object_Intercept_Move_Cb func;
201 void *data;
202 } move;
203 struct {
204 Evas_Object_Intercept_Resize_Cb func;
205 void *data;
206 } resize;
207 struct {
208 Evas_Object_Intercept_Raise_Cb func;
209 void *data;
210 } raise;
211 struct {
212 Evas_Object_Intercept_Lower_Cb func;
213 void *data;
214 } lower;
215 struct {
216 Evas_Object_Intercept_Stack_Above_Cb func;
217 void *data;
218 } stack_above;
219 struct {
220 Evas_Object_Intercept_Stack_Below_Cb func;
221 void *data;
222 } stack_below;
223 struct {
224 Evas_Object_Intercept_Layer_Set_Cb func;
225 void *data;
226 } layer_set;
227 struct {
228 Evas_Object_Intercept_Color_Set_Cb func;
229 void *data;
230 } color_set;
231 struct {
232 Evas_Object_Intercept_Clip_Set_Cb func;
233 void *data;
234 } clip_set;
235 struct {
236 Evas_Object_Intercept_Clip_Unset_Cb func;
237 void *data;
238 } clip_unset;
239};
240
241struct _Evas_Smart_Cb_Description_Array
242{
243 unsigned int size;
244 const Evas_Smart_Cb_Description **array;
245};
246
247struct _Evas_Smart
248{
249 DATA32 magic;
250
251 int usage;
252
253 const Evas_Smart_Class *smart_class;
254
255 Evas_Smart_Cb_Description_Array callbacks;
256
257 unsigned char delete_me : 1;
258 unsigned char class_allocated : 1;
259
260};
261
262struct _Evas_Modifier
263{
264 struct {
265 int count;
266 char **list;
267 } mod;
268 Evas_Modifier_Mask mask; /* ok we have a max of 64 modifiers */
269};
270
271struct _Evas_Lock
272{
273 struct {
274 int count;
275 char **list;
276 } lock;
277 Evas_Modifier_Mask mask; /* we have a max of 64 locks */
278};
279
280struct _Evas_Post_Callback
281{
282 Evas_Object *obj;
283 Evas_Object_Event_Post_Cb func;
284 const void *data;
285 unsigned char delete_me : 1;
286};
287
288struct _Evas_Callbacks
289{
290 Eina_Inlist *callbacks;
291 int walking_list;
292 unsigned char deletions_waiting : 1;
293};
294
295struct _Evas
296{
297 EINA_INLIST;
298
299 DATA32 magic;
300
301 struct {
302 unsigned char inside : 1;
303 int mouse_grabbed;
304 DATA32 button;
305 Evas_Coord x, y;
306 struct {
307 Eina_List *in;
308 } object;
309
310 } pointer;
311
312 struct {
313 Evas_Coord x, y, w, h;
314 unsigned char changed : 1;
315 } viewport;
316
317 struct {
318 int w, h;
319 DATA32 render_method;
320 unsigned char changed : 1;
321 } output;
322
323 Eina_List *damages;
324 Eina_List *obscures;
325
326 Evas_Layer *layers;
327
328 Eina_Hash *name_hash;
329
330 int output_validity;
331
332 int walking_list;
333 int events_frozen;
334
335 struct {
336 Evas_Module *module;
337 Evas_Func *func;
338 struct {
339 void *output;
340
341 void *context;
342 } data;
343
344 void *info;
345 int info_magic;
346 } engine;
347
348 Eina_Array delete_objects;
349 Eina_Array active_objects;
350 Eina_Array restack_objects;
351 Eina_Array render_objects;
352 Eina_Array pending_objects;
353 Eina_Array obscuring_objects;
354 Eina_Array temporary_objects;
355 Eina_Array calculate_objects;
356 Eina_Array clip_changes;
357
358 Eina_Clist calc_list;
359 Eina_Clist calc_done;
360 Eina_List *video_objects;
361
362 Eina_List *post_events; // free me on evas_free
363
364 Evas_Callbacks *callbacks;
365
366 int delete_grabs;
367 int walking_grabs;
368 Eina_List *grabs;
369
370 Eina_List *font_path;
371
372 int in_smart_calc;
373 int smart_calc_count;
374
375 Evas_Object *focused;
376 void *attach_data;
377 Evas_Modifier modifiers;
378 Evas_Lock locks;
379 unsigned int last_timestamp;
380 int last_mouse_down_counter;
381 int last_mouse_up_counter;
382 int nochange;
383 Evas_Font_Hinting_Flags hinting;
384 unsigned char changed : 1;
385 unsigned char delete_me : 1;
386 unsigned char invalidate : 1;
387 unsigned char cleanup : 1;
388 unsigned char focus : 1;
389
390 Eina_List *touch_points;
391};
392
393struct _Evas_Layer
394{
395 EINA_INLIST;
396
397 short layer;
398 Evas_Object *objects;
399
400 Evas *evas;
401
402 void *engine_data;
403 int usage;
404 unsigned char delete_me : 1;
405};
406
407struct _Evas_Size
408{
409 Evas_Coord w, h;
410};
411
412struct _Evas_Aspect
413{
414 Evas_Aspect_Control mode;
415 Evas_Size size;
416};
417
418struct _Evas_Border
419{
420 Evas_Coord l, r, t, b;
421};
422
423struct _Evas_Double_Pair
424{
425 double x, y;
426};
427
428struct _Evas_Size_Hints
429{
430 Evas_Size min, max, request;
431 Evas_Aspect aspect;
432 Evas_Double_Pair align, weight;
433 Evas_Border padding;
434};
435
436struct _Evas_Map_Point
437{
438 double x, y, z, px, py;
439 double u, v;
440 unsigned char r, g, b, a;
441};
442
443struct _Evas_Map
444{
445 DATA32 magic;
446 int count; // num of points
447 Evas_Coord_Rectangle normal_geometry; // bounding box of map geom actually
448 void *surface; // surface holding map if needed
449 int surface_w, surface_h; // current surface w & h alloc
450 Evas_Coord mx, my; // mouse x, y after conversion to map space
451 struct {
452 Evas_Coord px, py, z0, foc;
453 } persp;
454 Eina_Bool alpha : 1;
455 Eina_Bool smooth : 1;
456 Evas_Map_Point points[]; // actual points
457};
458
459#if 0 // filtering disabled
460/* nash: Split into two bits */
461typedef struct Evas_Filter_Info
462{
463 Evas_Filter filter;
464 Evas_Filter_Mode mode;
465
466 Eina_Bool dirty : 1;
467
468 int datalen;
469 void *data;
470 void (*data_free)(void *);
471
472 uint8_t *key;
473 uint32_t len;
474 Filtered_Image *cached;
475} Evas_Filter_Info;
476
477typedef Eina_Bool (*Evas_Software_Filter_Fn)(Evas_Filter_Info *, RGBA_Image *, RGBA_Image *);
478
479int evas_filter_get_size(Evas_Filter_Info *info, int inw, int inh,
480 int *outw, int *outh, Eina_Bool inv);
481Eina_Bool evas_filter_always_alpha(Evas_Filter_Info *info);
482uint8_t *evas_filter_key_get(const Evas_Filter_Info *info, uint32_t *lenp);
483// expose for use in engines
484EAPI Evas_Software_Filter_Fn evas_filter_software_get(Evas_Filter_Info *info);
485void evas_filter_free(Evas_Object *o);
486#endif
487
488struct _Evas_Object
489{
490 EINA_INLIST;
491
492 DATA32 magic;
493
494 const char *type;
495 Evas_Layer *layer;
496
497 struct {
498 Evas_Map *map;
499 Evas_Object *clipper;
500 Evas_Object *mask;
501 Evas_Object *map_parent;
502 double scale;
503 Evas_Coord_Rectangle geometry;
504 struct {
505 struct {
506 Evas_Coord x, y, w, h;
507 unsigned char r, g, b, a;
508 Eina_Bool visible : 1;
509 Eina_Bool dirty : 1;
510 } clip;
511 } cache;
512 short layer;
513 struct {
514 unsigned char r, g, b, a;
515 } color;
516 Eina_Bool usemap : 1;
517 Eina_Bool visible : 1;
518 Eina_Bool have_clipees : 1;
519 Eina_Bool anti_alias : 1;
520 Evas_Render_Op render_op : 4;
521 } cur, prev;
522
523 char *name;
524
525 Evas_Intercept_Func *interceptors;
526
527 struct {
528 Eina_List *elements;
529 } data;
530
531 Eina_List *grabs;
532
533 Evas_Callbacks *callbacks;
534
535 struct {
536 Eina_List *clipees;
537 Eina_List *changes;
538 } clip;
539
540 const Evas_Object_Func *func;
541
542 void *object_data;
543
544 struct {
545 Evas_Smart *smart;
546 Evas_Object *parent;
547 } smart;
548
549 struct {
550 Eina_List *proxies;
551 void *surface;
552 int w,h;
553 Eina_Bool redraw;
554 } proxy;
555
556#if 0 // filtering disabled
557 Evas_Filter_Info *filter;
558#endif
559
560 Evas_Size_Hints *size_hints;
561
562 int last_mouse_down_counter;
563 int last_mouse_up_counter;
564 int mouse_grabbed;
565
566 int last_event;
567 Evas_Callback_Type last_event_type;
568
569 struct {
570 int in_move, in_resize;
571 } doing;
572
573 unsigned int ref;
574
575 unsigned char delete_me;
576
577 unsigned char recalculate_cycle;
578 Eina_Clist calc_entry;
579
580 Evas_Object_Pointer_Mode pointer_mode : 1;
581
582 Eina_Bool store : 1;
583 Eina_Bool pass_events : 1;
584 Eina_Bool freeze_events : 1;
585 Eina_Bool repeat_events : 1;
586 struct {
587 Eina_Bool pass_events : 1;
588 Eina_Bool pass_events_valid : 1;
589 Eina_Bool freeze_events : 1;
590 Eina_Bool freeze_events_valid : 1;
591 } parent_cache;
592 Eina_Bool restack : 1;
593 Eina_Bool is_active : 1;
594 Eina_Bool precise_is_inside : 1;
595 Eina_Bool is_static_clip : 1;
596
597 Eina_Bool render_pre : 1;
598 Eina_Bool rect_del : 1;
599 Eina_Bool mouse_in : 1;
600 Eina_Bool pre_render_done : 1;
601 Eina_Bool intercepted : 1;
602 Eina_Bool focused : 1;
603 Eina_Bool in_layer : 1;
604 Eina_Bool no_propagate : 1;
605
606 Eina_Bool changed : 1;
607 Eina_Bool changed_move : 1;
608 Eina_Bool changed_move_only : 1;
609 Eina_Bool changed_nomove : 1;
610 Eina_Bool del_ref : 1;
611};
612
613struct _Evas_Func_Node
614{
615 EINA_INLIST;
616 void (*func) ();
617 void *data;
618 Evas_Callback_Type type;
619 Evas_Callback_Priority priority;
620 unsigned char delete_me : 1;
621};
622
623struct _Evas_Data_Node
624{
625 char *key;
626 void *data;
627};
628
629struct _Evas_Font_Dir
630{
631 Eina_Hash *lookup;
632 Eina_List *fonts;
633 Eina_List *aliases;
634 DATA64 dir_mod_time;
635 DATA64 fonts_dir_mod_time;
636 DATA64 fonts_alias_mod_time;
637};
638
639struct _Evas_Font
640{
641 struct {
642 const char *prop[14];
643 } x;
644 struct {
645 const char *name;
646 } simple;
647 const char *path;
648 char type;
649};
650
651struct _Evas_Font_Alias
652{
653 const char *alias;
654 Evas_Font *fn;
655};
656
657struct _Evas_Font_Description
658{
659 int ref;
660 /* We assume everywhere this is stringshared */
661 const char *name;
662 const char *fallbacks;
663 const char *lang;
664
665 Evas_Font_Slant slant;
666 Evas_Font_Weight weight;
667 Evas_Font_Width width;
668
669 Eina_Bool is_new : 1;
670};
671
672struct _Evas_Object_Func
673{
674 void (*free) (Evas_Object *obj);
675 void (*render) (Evas_Object *obj, void *output, void *context, void *surface, int x, int y);
676 void (*render_pre) (Evas_Object *obj);
677 void (*render_post) (Evas_Object *obj);
678
679 unsigned int (*type_id_get) (Evas_Object *obj);
680 unsigned int (*visual_id_get) (Evas_Object *obj);
681 void *(*engine_data_get) (Evas_Object *obj);
682
683 void (*store) (Evas_Object *obj);
684 void (*unstore) (Evas_Object *obj);
685
686 int (*is_visible) (Evas_Object *obj);
687 int (*was_visible) (Evas_Object *obj);
688
689 int (*is_opaque) (Evas_Object *obj);
690 int (*was_opaque) (Evas_Object *obj);
691
692 int (*is_inside) (Evas_Object *obj, Evas_Coord x, Evas_Coord y);
693 int (*was_inside) (Evas_Object *obj, Evas_Coord x, Evas_Coord y);
694
695 void (*coords_recalc) (Evas_Object *obj);
696
697 void (*scale_update) (Evas_Object *obj);
698
699 int (*has_opaque_rect) (Evas_Object *obj);
700 int (*get_opaque_rect) (Evas_Object *obj, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h);
701
702 int (*can_map) (Evas_Object *obj);
703};
704
705struct _Evas_Func
706{
707 void *(*info) (Evas *e);
708 void (*info_free) (Evas *e, void *info);
709 int (*setup) (Evas *e, void *info);
710
711 void (*output_free) (void *data);
712 void (*output_resize) (void *data, int w, int h);
713 void (*output_tile_size_set) (void *data, int w, int h);
714 void (*output_redraws_rect_add) (void *data, int x, int y, int w, int h);
715 void (*output_redraws_rect_del) (void *data, int x, int y, int w, int h);
716 void (*output_redraws_clear) (void *data);
717 void *(*output_redraws_next_update_get) (void *data, int *x, int *y, int *w, int *h, int *cx, int *cy, int *cw, int *ch);
718 void (*output_redraws_next_update_push) (void *data, void *surface, int x, int y, int w, int h);
719 void (*output_flush) (void *data);
720 void (*output_idle_flush) (void *data);
721 void (*output_dump) (void *data);
722
723 void *(*context_new) (void *data);
724 Eina_Bool (*canvas_alpha_get) (void *data, void *context);
725 void (*context_free) (void *data, void *context);
726 void (*context_clip_set) (void *data, void *context, int x, int y, int w, int h);
727 void (*context_clip_clip) (void *data, void *context, int x, int y, int w, int h);
728 void (*context_clip_unset) (void *data, void *context);
729 int (*context_clip_get) (void *data, void *context, int *x, int *y, int *w, int *h);
730 void (*context_mask_set) (void *data, void *context, void *mask, int x, int y, int w, int h);
731 void (*context_mask_unset) (void *data, void *context);
732 void (*context_color_set) (void *data, void *context, int r, int g, int b, int a);
733 int (*context_color_get) (void *data, void *context, int *r, int *g, int *b, int *a);
734 void (*context_multiplier_set) (void *data, void *context, int r, int g, int b, int a);
735 void (*context_multiplier_unset) (void *data, void *context);
736 int (*context_multiplier_get) (void *data, void *context, int *r, int *g, int *b, int *a);
737 void (*context_cutout_add) (void *data, void *context, int x, int y, int w, int h);
738 void (*context_cutout_clear) (void *data, void *context);
739 void (*context_anti_alias_set) (void *data, void *context, unsigned char aa);
740 unsigned char (*context_anti_alias_get) (void *data, void *context);
741 void (*context_color_interpolation_set) (void *data, void *context, int color_space);
742 int (*context_color_interpolation_get) (void *data, void *context);
743 void (*context_render_op_set) (void *data, void *context, int render_op);
744 int (*context_render_op_get) (void *data, void *context);
745
746 void (*rectangle_draw) (void *data, void *context, void *surface, int x, int y, int w, int h);
747
748 void (*line_draw) (void *data, void *context, void *surface, int x1, int y1, int x2, int y2);
749
750 void *(*polygon_point_add) (void *data, void *context, void *polygon, int x, int y);
751 void *(*polygon_points_clear) (void *data, void *context, void *polygon);
752 void (*polygon_draw) (void *data, void *context, void *surface, void *polygon, int x, int y);
753
754 void *(*image_load) (void *data, const char *file, const char *key, int *error, Evas_Image_Load_Opts *lo);
755 void *(*image_new_from_data) (void *data, int w, int h, DATA32 *image_data, int alpha, int cspace);
756 void *(*image_new_from_copied_data) (void *data, int w, int h, DATA32 *image_data, int alpha, int cspace);
757 void (*image_free) (void *data, void *image);
758 void (*image_size_get) (void *data, void *image, int *w, int *h);
759 void *(*image_size_set) (void *data, void *image, int w, int h);
760 void (*image_stride_get) (void *data, void *image, int *stride);
761 void *(*image_dirty_region) (void *data, void *image, int x, int y, int w, int h);
762 void *(*image_data_get) (void *data, void *image, int to_write, DATA32 **image_data, int *err);
763 void *(*image_data_put) (void *data, void *image, DATA32 *image_data);
764 void (*image_data_preload_request) (void *data, void *image, const void *target);
765 void (*image_data_preload_cancel) (void *data, void *image, const void *target);
766 void *(*image_alpha_set) (void *data, void *image, int has_alpha);
767 int (*image_alpha_get) (void *data, void *image);
768 void *(*image_border_set) (void *data, void *image, int l, int r, int t, int b);
769 void (*image_border_get) (void *data, void *image, int *l, int *r, int *t, int *b);
770 void (*image_draw) (void *data, void *context, void *surface, void *image, int src_x, int src_y, int src_w, int src_h, int dst_x, int dst_y, int dst_w, int dst_h, int smooth);
771 char *(*image_comment_get) (void *data, void *image, char *key);
772 char *(*image_format_get) (void *data, void *image);
773 void (*image_colorspace_set) (void *data, void *image, int cspace);
774 int (*image_colorspace_get) (void *data, void *image);
775 void (*image_mask_create) (void *data, void *image);
776 void *(*image_native_set) (void *data, void *image, void *native);
777 void *(*image_native_get) (void *data, void *image);
778
779 void (*image_cache_flush) (void *data);
780 void (*image_cache_set) (void *data, int bytes);
781 int (*image_cache_get) (void *data);
782
783 Evas_Font_Set *(*font_load) (void *data, const char *name, int size, Font_Rend_Flags wanted_rend);
784 Evas_Font_Set *(*font_memory_load) (void *data, char *name, int size, const void *fdata, int fdata_size, Font_Rend_Flags wanted_rend);
785 Evas_Font_Set *(*font_add) (void *data, Evas_Font_Set *font, const char *name, int size, Font_Rend_Flags wanted_rend);
786 Evas_Font_Set *(*font_memory_add) (void *data, Evas_Font_Set *font, char *name, int size, const void *fdata, int fdata_size, Font_Rend_Flags wanted_rend);
787 void (*font_free) (void *data, Evas_Font_Set *font);
788 int (*font_ascent_get) (void *data, Evas_Font_Set *font);
789 int (*font_descent_get) (void *data, Evas_Font_Set *font);
790 int (*font_max_ascent_get) (void *data, Evas_Font_Set *font);
791 int (*font_max_descent_get) (void *data, Evas_Font_Set *font);
792 void (*font_string_size_get) (void *data, Evas_Font_Set *font, const Evas_Text_Props *intl_props, int *w, int *h);
793 int (*font_inset_get) (void *data, Evas_Font_Set *font, const Evas_Text_Props *text_props);
794 int (*font_h_advance_get) (void *data, Evas_Font_Set *font, const Evas_Text_Props *intl_props);
795 int (*font_v_advance_get) (void *data, Evas_Font_Set *font, const Evas_Text_Props *intl_props);
796 int (*font_char_coords_get) (void *data, Evas_Font_Set *font, const Evas_Text_Props *intl_props, int pos, int *cx, int *cy, int *cw, int *ch);
797 int (*font_char_at_coords_get) (void *data, Evas_Font_Set *font, const Evas_Text_Props *intl_props, int x, int y, int *cx, int *cy, int *cw, int *ch);
798 void (*font_draw) (void *data, void *context, void *surface, Evas_Font_Set *font, int x, int y, int w, int h, int ow, int oh, const Evas_Text_Props *intl_props);
799
800 void (*font_cache_flush) (void *data);
801 void (*font_cache_set) (void *data, int bytes);
802 int (*font_cache_get) (void *data);
803
804 /* Engine functions will over time expand from here */
805
806 void (*font_hinting_set) (void *data, Evas_Font_Set *font, int hinting);
807 int (*font_hinting_can_hint) (void *data, int hinting);
808
809/* void (*image_rotation_set) (void *data, void *image); */
810
811 void (*image_scale_hint_set) (void *data, void *image, int hint);
812 int (*image_scale_hint_get) (void *data, void *image);
813 int (*font_last_up_to_pos) (void *data, Evas_Font_Set *font, const Evas_Text_Props *intl_props, int x, int y);
814
815 void (*image_map_draw) (void *data, void *context, void *surface, void *image, int npoints, RGBA_Map_Point *p, int smooth, int level);
816 void *(*image_map_surface_new) (void *data, int w, int h, int alpha);
817 void (*image_map_surface_free) (void *data, void *surface);
818
819 void (*image_content_hint_set) (void *data, void *surface, int hint);
820 int (*image_content_hint_get) (void *data, void *surface);
821 int (*font_pen_coords_get) (void *data, Evas_Font_Set *font, const Evas_Text_Props *intl_props, int pos, int *cpen_x, int *cy, int *cadv, int *ch);
822 Eina_Bool (*font_text_props_info_create) (void *data __UNUSED__, Evas_Font_Instance *fi, const Eina_Unicode *text, Evas_Text_Props *intl_props, const Evas_BiDi_Paragraph_Props *par_props, size_t pos, size_t len);
823 int (*font_right_inset_get) (void *data, Evas_Font_Set *font, const Evas_Text_Props *text_props);
824
825#if 0 // filtering disabled
826 void (*image_draw_filtered) (void *data, void *context, void *surface, void *image, Evas_Filter_Info *filter);
827 Filtered_Image *(*image_filtered_get) (void *image, uint8_t *key, size_t len);
828 Filtered_Image *(*image_filtered_save) (void *image, void *filtered, uint8_t *key, size_t len);
829 void (*image_filtered_free) (void *image, Filtered_Image *);
830#endif
831
832 /* EFL-GL Glue Layer */
833 void *(*gl_surface_create) (void *data, void *config, int w, int h);
834 int (*gl_surface_destroy) (void *data, void *surface);
835 void *(*gl_context_create) (void *data, void *share_context);
836 int (*gl_context_destroy) (void *data, void *context);
837 int (*gl_make_current) (void *data, void *surface, void *context);
838 void *(*gl_string_query) (void *data, int name);
839 void *(*gl_proc_address_get) (void *data, const char *name);
840 int (*gl_native_surface_get) (void *data, void *surface, void *native_surface);
841 void *(*gl_api_get) (void *data);
842
843 int (*image_load_error_get) (void *data, void *image);
844 int (*font_run_end_get) (void *data, Evas_Font_Set *font, Evas_Font_Instance **script_fi, Evas_Font_Instance **cur_fi, Evas_Script_Type script, const Eina_Unicode *text, int run_len);
845
846 /* animated feature */
847 Eina_Bool (*image_animated_get) (void *data, void *image);
848 int (*image_animated_frame_count_get) (void *data, void *image);
849 Evas_Image_Animated_Loop_Hint (*image_animated_loop_type_get) (void *data, void *image);
850 int (*image_animated_loop_count_get) (void *data, void *image);
851 double (*image_animated_frame_duration_get) (void *data, void *image, int start_frame, int frame_num);
852 Eina_Bool (*image_animated_frame_set) (void *data, void *image, int frame_index);
853
854 /* max size query */
855 void (*image_max_size_get) (void *data, int *maxw, int *maxh);
856};
857
858struct _Evas_Image_Load_Func
859{
860 Eina_Bool threadable;
861 Eina_Bool (*file_head) (Image_Entry *ie, const char *file, const char *key, int *error);
862 Eina_Bool (*file_data) (Image_Entry *ie, const char *file, const char *key, int *error);
863 double (*frame_duration) (Image_Entry *ie, const char *file, const int start, const int frame_num);
864};
865
866struct _Evas_Image_Save_Func
867{
868 int (*image_save) (RGBA_Image *im, const char *file, const char *key, int quality, int compress);
869};
870
871#ifdef __cplusplus
872extern "C" {
873#endif
874
875Evas_Object *evas_object_new(Evas *e);
876void evas_object_free(Evas_Object *obj, int clean_layer);
877void evas_object_inject(Evas_Object *obj, Evas *e);
878void evas_object_release(Evas_Object *obj, int clean_layer);
879void evas_object_change(Evas_Object *obj);
880void evas_object_clip_changes_clean(Evas_Object *obj);
881void evas_object_render_pre_visible_change(Eina_Array *rects, Evas_Object *obj, int is_v, int was_v);
882void evas_object_render_pre_clipper_change(Eina_Array *rects, Evas_Object *obj);
883void evas_object_render_pre_prev_cur_add(Eina_Array *rects, Evas_Object *obj);
884void evas_object_render_pre_effect_updates(Eina_Array *rects, Evas_Object *obj, int is_v, int was_v);
885void evas_rects_return_difference_rects(Eina_Array *rects, int x, int y, int w, int h, int xx, int yy, int ww, int hh);
886
887void evas_object_clip_dirty(Evas_Object *obj);
888void evas_object_recalc_clippees(Evas_Object *obj);
889Evas_Layer *evas_layer_new(Evas *e);
890void evas_layer_pre_free(Evas_Layer *lay);
891void evas_layer_free_objects(Evas_Layer *lay);
892void evas_layer_clean(Evas *e);
893Evas_Layer *evas_layer_find(Evas *e, short layer_num);
894void evas_layer_add(Evas_Layer *lay);
895void evas_layer_del(Evas_Layer *lay);
896
897int evas_object_was_in_output_rect(Evas_Object *obj, int x, int y, int w, int h);
898
899int evas_object_was_opaque(Evas_Object *obj);
900int evas_object_is_inside(Evas_Object *obj, Evas_Coord x, Evas_Coord y);
901int evas_object_was_inside(Evas_Object *obj, Evas_Coord x, Evas_Coord y);
902int evas_object_clippers_was_visible(Evas_Object *obj);
903void evas_object_clip_across_check(Evas_Object *obj);
904void evas_object_clip_across_clippees_check(Evas_Object *obj);
905void evas_object_mapped_clip_across_mark(Evas_Object *obj);
906void evas_event_callback_call(Evas *e, Evas_Callback_Type type, void *event_info);
907void evas_object_event_callback_call(Evas_Object *obj, Evas_Callback_Type type, void *event_info);
908Eina_List *evas_event_objects_event_list(Evas *e, Evas_Object *stop, int x, int y);
909int evas_mem_free(int mem_required);
910int evas_mem_degrade(int mem_required);
911void evas_debug_error(void);
912void evas_debug_input_null(void);
913void evas_debug_magic_null(void);
914void evas_debug_magic_wrong(DATA32 expected, DATA32 supplied);
915void evas_debug_generic(const char *str);
916const char *evas_debug_magic_string_get(DATA32 magic);
917void evas_object_smart_use(Evas_Smart *s);
918void evas_object_smart_unuse(Evas_Smart *s);
919void evas_smart_cb_descriptions_fix(Evas_Smart_Cb_Description_Array *a) EINA_ARG_NONNULL(1);
920Eina_Bool evas_smart_cb_descriptions_resize(Evas_Smart_Cb_Description_Array *a, unsigned int size) EINA_ARG_NONNULL(1);
921const Evas_Smart_Cb_Description *evas_smart_cb_description_find(const Evas_Smart_Cb_Description_Array *a, const char *name) EINA_ARG_NONNULL(1, 2) EINA_PURE;
922
923Eina_Bool _evas_object_image_preloading_get(const Evas_Object *obj);
924void _evas_object_image_preloading_set(Evas_Object *obj, Eina_Bool preloading);
925void _evas_object_image_preloading_check(Evas_Object *obj);
926Evas_Object *_evas_object_image_video_parent_get(Evas_Object *obj);
927void _evas_object_image_video_overlay_show(Evas_Object *obj);
928void _evas_object_image_video_overlay_hide(Evas_Object *obj);
929void evas_object_smart_del(Evas_Object *obj);
930void evas_object_smart_cleanup(Evas_Object *obj);
931void evas_object_smart_member_raise(Evas_Object *member);
932void evas_object_smart_member_lower(Evas_Object *member);
933void evas_object_smart_member_stack_above(Evas_Object *member, Evas_Object *other);
934void evas_object_smart_member_stack_below(Evas_Object *member, Evas_Object *other);
935const Eina_Inlist *evas_object_smart_members_get_direct(const Evas_Object *obj);
936void _evas_object_smart_members_all_del(Evas_Object *obj);
937void evas_call_smarts_calculate(Evas *e);
938void *evas_mem_calloc(int size);
939void _evas_post_event_callback_call(Evas *e);
940void _evas_post_event_callback_free(Evas *e);
941void evas_event_callback_list_post_free(Eina_Inlist **list);
942void evas_object_event_callback_all_del(Evas_Object *obj);
943void evas_object_event_callback_cleanup(Evas_Object *obj);
944void evas_event_callback_all_del(Evas *e);
945void evas_event_callback_cleanup(Evas *e);
946void evas_object_inform_call_show(Evas_Object *obj);
947void evas_object_inform_call_hide(Evas_Object *obj);
948void evas_object_inform_call_move(Evas_Object *obj);
949void evas_object_inform_call_resize(Evas_Object *obj);
950void evas_object_inform_call_restack(Evas_Object *obj);
951void evas_object_inform_call_changed_size_hints(Evas_Object *obj);
952void evas_object_inform_call_image_preloaded(Evas_Object *obj);
953void evas_object_inform_call_image_unloaded(Evas_Object *obj);
954void evas_object_intercept_cleanup(Evas_Object *obj);
955int evas_object_intercept_call_show(Evas_Object *obj);
956int evas_object_intercept_call_hide(Evas_Object *obj);
957int evas_object_intercept_call_move(Evas_Object *obj, Evas_Coord x, Evas_Coord y);
958int evas_object_intercept_call_resize(Evas_Object *obj, Evas_Coord w, Evas_Coord h);
959int evas_object_intercept_call_raise(Evas_Object *obj);
960int evas_object_intercept_call_lower(Evas_Object *obj);
961int evas_object_intercept_call_stack_above(Evas_Object *obj, Evas_Object *above);
962int evas_object_intercept_call_stack_below(Evas_Object *obj, Evas_Object *below);
963int evas_object_intercept_call_layer_set(Evas_Object *obj, int l);
964int evas_object_intercept_call_color_set(Evas_Object *obj, int r, int g, int b, int a);
965int evas_object_intercept_call_clip_set(Evas_Object *obj, Evas_Object *clip);
966int evas_object_intercept_call_clip_unset(Evas_Object *obj);
967void evas_object_grabs_cleanup(Evas_Object *obj);
968void evas_key_grab_free(Evas_Object *obj, const char *keyname, Evas_Modifier_Mask modifiers, Evas_Modifier_Mask not_modifiers);
969void evas_font_dir_cache_free(void);
970const char *evas_font_dir_cache_find(char *dir, char *font);
971Eina_List *evas_font_dir_available_list(const Evas* evas);
972void evas_font_dir_available_list_free(Eina_List *available);
973void evas_font_free(Evas *evas, void *font);
974void evas_fonts_zero_free(Evas *evas);
975void evas_fonts_zero_presure(Evas *evas);
976void evas_font_name_parse(Evas_Font_Description *fdesc, const char *name);
977int evas_font_style_find(const char *start, const char *end, Evas_Font_Style style);
978Evas_Font_Description *evas_font_desc_new(void);
979Evas_Font_Description *evas_font_desc_dup(const Evas_Font_Description *fdesc);
980void evas_font_desc_unref(Evas_Font_Description *fdesc);
981int evas_font_desc_cmp(const Evas_Font_Description *a, const Evas_Font_Description *b);
982Evas_Font_Description *evas_font_desc_ref(Evas_Font_Description *fdesc);
983void * evas_font_load(Evas *evas, Evas_Font_Description *fdesc, const char *source, Evas_Font_Size size);
984void evas_font_load_hinting_set(Evas *evas, void *font, int hinting);
985void evas_object_smart_member_cache_invalidate(Evas_Object *obj, Eina_Bool pass_events, Eina_Bool freeze_events);
986void evas_text_style_pad_get(Evas_Text_Style_Type style, int *l, int *r, int *t, int *b);
987void _evas_object_text_rehint(Evas_Object *obj);
988void _evas_object_textblock_rehint(Evas_Object *obj);
989
990extern int _evas_alloc_error;
991extern int _evas_event_counter;
992
993struct _Evas_Imaging_Image
994{
995 RGBA_Image *image;
996};
997
998struct _Evas_Imaging_Font
999{
1000 RGBA_Font *font;
1001};
1002
1003int evas_async_events_init(void);
1004int evas_async_events_shutdown(void);
1005int evas_async_target_del(const void *target);
1006
1007void _evas_preload_thread_init(void);
1008void _evas_preload_thread_shutdown(void);
1009Evas_Preload_Pthread *evas_preload_thread_run(void (*func_heavy)(void *data),
1010 void (*func_end)(void *data),
1011 void (*func_cancel)(void *data),
1012 const void *data);
1013Eina_Bool evas_preload_thread_cancel(Evas_Preload_Pthread *thread);
1014
1015void _evas_walk(Evas *e);
1016void _evas_unwalk(Evas *e);
1017
1018// expose for use in engines
1019EAPI int _evas_module_engine_inherit(Evas_Func *funcs, char *name);
1020EAPI const char *_evas_module_libdir_get(void);
1021
1022Eina_Bool evas_render_mapped(Evas *e, Evas_Object *obj,
1023 void *context, void *surface,
1024 int off_x, int off_y, int mapped,
1025 int ecx, int ecy, int ecw, int ech);
1026void evas_render_invalidate(Evas *e);
1027void evas_render_object_recalc(Evas_Object *obj);
1028
1029Eina_Bool evas_map_inside_get(const Evas_Map *m, Evas_Coord x, Evas_Coord y);
1030Eina_Bool evas_map_coords_get(const Evas_Map *m, Evas_Coord x, Evas_Coord y, Evas_Coord *mx, Evas_Coord *my, int grab);
1031
1032Eina_List *evas_module_engine_list(void);
1033
1034/* for updating touch point list */
1035void _evas_touch_point_append(Evas *e, int id, Evas_Coord x, Evas_Coord y);
1036void _evas_touch_point_update(Evas *e, int id, Evas_Coord x, Evas_Coord y, Evas_Touch_Point_State state);
1037void _evas_touch_point_remove(Evas *e, int id);
1038
1039/****************************************************************************/
1040/*****************************************/
1041/********************/
1042#define MPOOL 1
1043
1044#ifdef MPOOL
1045typedef struct _Evas_Mempool Evas_Mempool;
1046
1047struct _Evas_Mempool
1048{
1049 int count;
1050 int num_allocs;
1051 int num_frees;
1052 Eina_Mempool *mp;
1053};
1054# define EVAS_MEMPOOL(x) \
1055 static Evas_Mempool x = {0, 0, 0, NULL}
1056# define EVAS_MEMPOOL_INIT(x, nam, siz, cnt, ret) \
1057 do { \
1058 if (!x.mp) { \
1059 x.mp = eina_mempool_add("chained_mempool", nam, NULL, sizeof(siz), cnt); \
1060 if (!x.mp) { \
1061 return ret; \
1062 } \
1063 } \
1064 } while (0)
1065# define EVAS_MEMPOOL_ALLOC(x, siz) \
1066 eina_mempool_malloc(x.mp, sizeof(siz))
1067# define EVAS_MEMPOOL_PREP(x, p, siz) \
1068 do { \
1069 x.count++; \
1070 x.num_allocs++; \
1071 memset(p, 0, sizeof(siz)); \
1072 } while (0)
1073# define EVAS_MEMPOOL_FREE(x, p) \
1074 do { \
1075 eina_mempool_free(x.mp, p); \
1076 x.count--; \
1077 x.num_frees++; \
1078 if (x.count <= 0) { \
1079 eina_mempool_del(x.mp); \
1080 x.mp = NULL; \
1081 x.count = 0; \
1082 } \
1083 } while (0)
1084#else
1085# define EVAS_MEMPOOL(x)
1086# define EVAS_MEMPOOL_INIT(x, nam, siz, cnt, ret)
1087# define EVAS_MEMPOOL_PREP(x, p, siz)
1088# define EVAS_MEMPOOL_ALLOC(x, siz) \
1089 calloc(1, sizeof(siz))
1090# define EVAS_MEMPOOL_FREE(x, p) \
1091 free(p)
1092#endif
1093/********************/
1094/*****************************************/
1095/****************************************************************************/
1096
1097#define EVAS_API_OVERRIDE(func, api, prefix) \
1098 (api)->func = prefix##func
1099#define EVAS_API_RESET(func, api) \
1100 (api)->func = NULL
1101
1102#include "evas_inline.x"
1103
1104#ifdef __cplusplus
1105}
1106#endif
1107#endif