aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/libraries/evas/src/lib/include
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--libraries/evas/src/lib/include/Makefile.am13
-rw-r--r--libraries/evas/src/lib/include/Makefile.in546
-rw-r--r--libraries/evas/src/lib/include/evas_blend_ops.h378
-rw-r--r--libraries/evas/src/lib/include/evas_common.h1258
-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.h1122
11 files changed, 0 insertions, 4881 deletions
diff --git a/libraries/evas/src/lib/include/Makefile.am b/libraries/evas/src/lib/include/Makefile.am
deleted file mode 100644
index 5c986c2..0000000
--- a/libraries/evas/src/lib/include/Makefile.am
+++ /dev/null
@@ -1,13 +0,0 @@
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
deleted file mode 100644
index 8060178..0000000
--- a/libraries/evas/src/lib/include/Makefile.in
+++ /dev/null
@@ -1,546 +0,0 @@
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@
119EXOTIC_CFLAGS = @EXOTIC_CFLAGS@
120EXOTIC_LIBS = @EXOTIC_LIBS@
121FGREP = @FGREP@
122FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@
123FONTCONFIG_LIBS = @FONTCONFIG_LIBS@
124FREETYPE_CFLAGS = @FREETYPE_CFLAGS@
125FREETYPE_LIBS = @FREETYPE_LIBS@
126FRIBIDI_CFLAGS = @FRIBIDI_CFLAGS@
127FRIBIDI_LIBS = @FRIBIDI_LIBS@
128GL_EET_CFLAGS = @GL_EET_CFLAGS@
129GL_EET_LIBS = @GL_EET_LIBS@
130GREP = @GREP@
131HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@
132HARFBUZZ_LIBS = @HARFBUZZ_LIBS@
133INSTALL = @INSTALL@
134INSTALL_DATA = @INSTALL_DATA@
135INSTALL_PROGRAM = @INSTALL_PROGRAM@
136INSTALL_SCRIPT = @INSTALL_SCRIPT@
137INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
138LD = @LD@
139LDFLAGS = @LDFLAGS@
140LIBOBJS = @LIBOBJS@
141LIBS = @LIBS@
142LIBTOOL = @LIBTOOL@
143LINEBREAK_CFLAGS = @LINEBREAK_CFLAGS@
144LINEBREAK_LIBS = @LINEBREAK_LIBS@
145LIPO = @LIPO@
146LN_S = @LN_S@
147LTLIBOBJS = @LTLIBOBJS@
148MAKEINFO = @MAKEINFO@
149MKDIR_P = @MKDIR_P@
150MODULE_ARCH = @MODULE_ARCH@
151NM = @NM@
152NMEDIT = @NMEDIT@
153OBJC = @OBJC@
154OBJCDEPMODE = @OBJCDEPMODE@
155OBJCFLAGS = @OBJCFLAGS@
156OBJDUMP = @OBJDUMP@
157OBJEXT = @OBJEXT@
158OTOOL = @OTOOL@
159OTOOL64 = @OTOOL64@
160PACKAGE = @PACKAGE@
161PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
162PACKAGE_NAME = @PACKAGE_NAME@
163PACKAGE_STRING = @PACKAGE_STRING@
164PACKAGE_TARNAME = @PACKAGE_TARNAME@
165PACKAGE_URL = @PACKAGE_URL@
166PACKAGE_VERSION = @PACKAGE_VERSION@
167PATH_SEPARATOR = @PATH_SEPARATOR@
168PIXMAN_CFLAGS = @PIXMAN_CFLAGS@
169PIXMAN_LIBS = @PIXMAN_LIBS@
170PKG_CONFIG = @PKG_CONFIG@
171PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
172PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
173PNG_CFLAGS = @PNG_CFLAGS@
174PNG_LIBS = @PNG_LIBS@
175RANLIB = @RANLIB@
176SDL_CFLAGS = @SDL_CFLAGS@
177SDL_LIBS = @SDL_LIBS@
178SED = @SED@
179SET_MAKE = @SET_MAKE@
180SHELL = @SHELL@
181SHM_OPEN_LINK = @SHM_OPEN_LINK@
182STRIP = @STRIP@
183SVG_CFLAGS = @SVG_CFLAGS@
184SVG_LIBS = @SVG_LIBS@
185VALGRIND_CFLAGS = @VALGRIND_CFLAGS@
186VALGRIND_LIBS = @VALGRIND_LIBS@
187VERSION = @VERSION@
188VMAJ = @VMAJ@
189WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@
190WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@
191XCB_CFLAGS = @XCB_CFLAGS@
192XCB_GL_CFLAGS = @XCB_GL_CFLAGS@
193XCB_GL_LIBS = @XCB_GL_LIBS@
194XCB_LIBS = @XCB_LIBS@
195XEXT_CFLAGS = @XEXT_CFLAGS@
196XEXT_LIBS = @XEXT_LIBS@
197XMKMF = @XMKMF@
198X_CFLAGS = @X_CFLAGS@
199X_EXTRA_LIBS = @X_EXTRA_LIBS@
200X_LIBS = @X_LIBS@
201X_PRE_LIBS = @X_PRE_LIBS@
202abs_builddir = @abs_builddir@
203abs_srcdir = @abs_srcdir@
204abs_top_builddir = @abs_top_builddir@
205abs_top_srcdir = @abs_top_srcdir@
206ac_ct_CC = @ac_ct_CC@
207ac_ct_CXX = @ac_ct_CXX@
208ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
209ac_ct_OBJC = @ac_ct_OBJC@
210altivec_cflags = @altivec_cflags@
211am__include = @am__include@
212am__leading_dot = @am__leading_dot@
213am__quote = @am__quote@
214am__tar = @am__tar@
215am__untar = @am__untar@
216bindir = @bindir@
217build = @build@
218build_alias = @build_alias@
219build_cpu = @build_cpu@
220build_os = @build_os@
221build_vendor = @build_vendor@
222builddir = @builddir@
223datadir = @datadir@
224datarootdir = @datarootdir@
225dlopen_libs = @dlopen_libs@
226docdir = @docdir@
227dvidir = @dvidir@
228edje_cc = @edje_cc@
229efl_doxygen = @efl_doxygen@
230efl_have_doxygen = @efl_have_doxygen@
231evas_engine_buffer_cflags = @evas_engine_buffer_cflags@
232evas_engine_buffer_libs = @evas_engine_buffer_libs@
233evas_engine_direct3d_cflags = @evas_engine_direct3d_cflags@
234evas_engine_direct3d_libs = @evas_engine_direct3d_libs@
235evas_engine_directfb_cflags = @evas_engine_directfb_cflags@
236evas_engine_directfb_libs = @evas_engine_directfb_libs@
237evas_engine_fb_cflags = @evas_engine_fb_cflags@
238evas_engine_fb_libs = @evas_engine_fb_libs@
239evas_engine_gl_cocoa_cflags = @evas_engine_gl_cocoa_cflags@
240evas_engine_gl_cocoa_libs = @evas_engine_gl_cocoa_libs@
241evas_engine_gl_common_libs = @evas_engine_gl_common_libs@
242evas_engine_gl_sdl_cflags = @evas_engine_gl_sdl_cflags@
243evas_engine_gl_sdl_libs = @evas_engine_gl_sdl_libs@
244evas_engine_gl_xcb_cflags = @evas_engine_gl_xcb_cflags@
245evas_engine_gl_xcb_libs = @evas_engine_gl_xcb_libs@
246evas_engine_gl_xlib_cflags = @evas_engine_gl_xlib_cflags@
247evas_engine_gl_xlib_libs = @evas_engine_gl_xlib_libs@
248evas_engine_psl1ght_cflags = @evas_engine_psl1ght_cflags@
249evas_engine_psl1ght_libs = @evas_engine_psl1ght_libs@
250evas_engine_software_16_ddraw_cflags = @evas_engine_software_16_ddraw_cflags@
251evas_engine_software_16_ddraw_libs = @evas_engine_software_16_ddraw_libs@
252evas_engine_software_16_sdl_cflags = @evas_engine_software_16_sdl_cflags@
253evas_engine_software_16_sdl_libs = @evas_engine_software_16_sdl_libs@
254evas_engine_software_16_wince_cflags = @evas_engine_software_16_wince_cflags@
255evas_engine_software_16_wince_libs = @evas_engine_software_16_wince_libs@
256evas_engine_software_16_x11_cflags = @evas_engine_software_16_x11_cflags@
257evas_engine_software_16_x11_libs = @evas_engine_software_16_x11_libs@
258evas_engine_software_8_x11_cflags = @evas_engine_software_8_x11_cflags@
259evas_engine_software_8_x11_libs = @evas_engine_software_8_x11_libs@
260evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@
261evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@
262evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@
263evas_engine_software_gdi_libs = @evas_engine_software_gdi_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_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@
269evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@
270evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@
271evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@
272evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@
273evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@
274evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@
275evas_image_loader_edb_libs = @evas_image_loader_edb_libs@
276evas_image_loader_eet_cflags = @evas_image_loader_eet_cflags@
277evas_image_loader_eet_libs = @evas_image_loader_eet_libs@
278evas_image_loader_generic_cflags = @evas_image_loader_generic_cflags@
279evas_image_loader_generic_libs = @evas_image_loader_generic_libs@
280evas_image_loader_gif_cflags = @evas_image_loader_gif_cflags@
281evas_image_loader_gif_libs = @evas_image_loader_gif_libs@
282evas_image_loader_ico_cflags = @evas_image_loader_ico_cflags@
283evas_image_loader_ico_libs = @evas_image_loader_ico_libs@
284evas_image_loader_jpeg_cflags = @evas_image_loader_jpeg_cflags@
285evas_image_loader_jpeg_libs = @evas_image_loader_jpeg_libs@
286evas_image_loader_pmaps_cflags = @evas_image_loader_pmaps_cflags@
287evas_image_loader_pmaps_libs = @evas_image_loader_pmaps_libs@
288evas_image_loader_png_cflags = @evas_image_loader_png_cflags@
289evas_image_loader_png_libs = @evas_image_loader_png_libs@
290evas_image_loader_psd_cflags = @evas_image_loader_psd_cflags@
291evas_image_loader_psd_libs = @evas_image_loader_psd_libs@
292evas_image_loader_svg_cflags = @evas_image_loader_svg_cflags@
293evas_image_loader_svg_libs = @evas_image_loader_svg_libs@
294evas_image_loader_tga_cflags = @evas_image_loader_tga_cflags@
295evas_image_loader_tga_libs = @evas_image_loader_tga_libs@
296evas_image_loader_tiff_cflags = @evas_image_loader_tiff_cflags@
297evas_image_loader_tiff_libs = @evas_image_loader_tiff_libs@
298evas_image_loader_wbmp_cflags = @evas_image_loader_wbmp_cflags@
299evas_image_loader_wbmp_libs = @evas_image_loader_wbmp_libs@
300evas_image_loader_xpm_cflags = @evas_image_loader_xpm_cflags@
301evas_image_loader_xpm_libs = @evas_image_loader_xpm_libs@
302exec_prefix = @exec_prefix@
303have_evas_engine_gl_x11 = @have_evas_engine_gl_x11@
304have_evas_engine_gl_xcb = @have_evas_engine_gl_xcb@
305have_evas_engine_gl_xlib = @have_evas_engine_gl_xlib@
306have_evas_engine_software_x11 = @have_evas_engine_software_x11@
307have_evas_engine_software_xcb = @have_evas_engine_software_xcb@
308have_evas_engine_software_xlib = @have_evas_engine_software_xlib@
309have_lcov = @have_lcov@
310host = @host@
311host_alias = @host_alias@
312host_cpu = @host_cpu@
313host_os = @host_os@
314host_vendor = @host_vendor@
315htmldir = @htmldir@
316includedir = @includedir@
317infodir = @infodir@
318install_sh = @install_sh@
319libdir = @libdir@
320libexecdir = @libexecdir@
321localedir = @localedir@
322localstatedir = @localstatedir@
323lt_ECHO = @lt_ECHO@
324lt_enable_auto_import = @lt_enable_auto_import@
325mandir = @mandir@
326mkdir_p = @mkdir_p@
327oldincludedir = @oldincludedir@
328pdfdir = @pdfdir@
329pkgconfig_requires_private = @pkgconfig_requires_private@
330prefix = @prefix@
331program_transform_name = @program_transform_name@
332psdir = @psdir@
333pthread_cflags = @pthread_cflags@
334pthread_libs = @pthread_libs@
335release_info = @release_info@
336requirement_evas = @requirement_evas@
337sbindir = @sbindir@
338sharedstatedir = @sharedstatedir@
339srcdir = @srcdir@
340sysconfdir = @sysconfdir@
341target_alias = @target_alias@
342top_build_prefix = @top_build_prefix@
343top_builddir = @top_builddir@
344top_srcdir = @top_srcdir@
345version_info = @version_info@
346MAINTAINERCLEANFILES = Makefile.in
347EXTRA_DIST = \
348evas_inline.x \
349evas_private.h \
350evas_options.h \
351evas_macros.h \
352evas_mmx.h \
353evas_common.h \
354evas_common_soft8.h \
355evas_common_soft16.h \
356evas_blend_ops.h
357
358all: all-am
359
360.SUFFIXES:
361$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
362 @for dep in $?; do \
363 case '$(am__configure_deps)' in \
364 *$$dep*) \
365 ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
366 && { if test -f $@; then exit 0; else break; fi; }; \
367 exit 1;; \
368 esac; \
369 done; \
370 echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/lib/include/Makefile'; \
371 $(am__cd) $(top_srcdir) && \
372 $(AUTOMAKE) --gnu src/lib/include/Makefile
373.PRECIOUS: Makefile
374Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
375 @case '$?' in \
376 *config.status*) \
377 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
378 *) \
379 echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
380 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
381 esac;
382
383$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
384 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
385
386$(top_srcdir)/configure: $(am__configure_deps)
387 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
388$(ACLOCAL_M4): $(am__aclocal_m4_deps)
389 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
390$(am__aclocal_m4_deps):
391
392mostlyclean-libtool:
393 -rm -f *.lo
394
395clean-libtool:
396 -rm -rf .libs _libs
397tags: TAGS
398TAGS:
399
400ctags: CTAGS
401CTAGS:
402
403
404distdir: $(DISTFILES)
405 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
406 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
407 list='$(DISTFILES)'; \
408 dist_files=`for file in $$list; do echo $$file; done | \
409 sed -e "s|^$$srcdirstrip/||;t" \
410 -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
411 case $$dist_files in \
412 */*) $(MKDIR_P) `echo "$$dist_files" | \
413 sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
414 sort -u` ;; \
415 esac; \
416 for file in $$dist_files; do \
417 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
418 if test -d $$d/$$file; then \
419 dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
420 if test -d "$(distdir)/$$file"; then \
421 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
422 fi; \
423 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
424 cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
425 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
426 fi; \
427 cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
428 else \
429 test -f "$(distdir)/$$file" \
430 || cp -p $$d/$$file "$(distdir)/$$file" \
431 || exit 1; \
432 fi; \
433 done
434check-am: all-am
435check: check-am
436all-am: Makefile
437installdirs:
438install: install-am
439install-exec: install-exec-am
440install-data: install-data-am
441uninstall: uninstall-am
442
443install-am: all-am
444 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
445
446installcheck: installcheck-am
447install-strip:
448 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
449 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
450 `test -z '$(STRIP)' || \
451 echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
452mostlyclean-generic:
453
454clean-generic:
455
456distclean-generic:
457 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
458 -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
459
460maintainer-clean-generic:
461 @echo "This command is intended for maintainers to use"
462 @echo "it deletes files that may require special tools to rebuild."
463 -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
464clean: clean-am
465
466clean-am: clean-generic clean-libtool mostlyclean-am
467
468distclean: distclean-am
469 -rm -f Makefile
470distclean-am: clean-am distclean-generic
471
472dvi: dvi-am
473
474dvi-am:
475
476html: html-am
477
478html-am:
479
480info: info-am
481
482info-am:
483
484install-data-am:
485
486install-dvi: install-dvi-am
487
488install-dvi-am:
489
490install-exec-am:
491
492install-html: install-html-am
493
494install-html-am:
495
496install-info: install-info-am
497
498install-info-am:
499
500install-man:
501
502install-pdf: install-pdf-am
503
504install-pdf-am:
505
506install-ps: install-ps-am
507
508install-ps-am:
509
510installcheck-am:
511
512maintainer-clean: maintainer-clean-am
513 -rm -f Makefile
514maintainer-clean-am: distclean-am maintainer-clean-generic
515
516mostlyclean: mostlyclean-am
517
518mostlyclean-am: mostlyclean-generic mostlyclean-libtool
519
520pdf: pdf-am
521
522pdf-am:
523
524ps: ps-am
525
526ps-am:
527
528uninstall-am:
529
530.MAKE: install-am install-strip
531
532.PHONY: all all-am check check-am clean clean-generic clean-libtool \
533 distclean distclean-generic distclean-libtool distdir dvi \
534 dvi-am html html-am info info-am install install-am \
535 install-data install-data-am install-dvi install-dvi-am \
536 install-exec install-exec-am install-html install-html-am \
537 install-info install-info-am install-man install-pdf \
538 install-pdf-am install-ps install-ps-am install-strip \
539 installcheck installcheck-am installdirs maintainer-clean \
540 maintainer-clean-generic mostlyclean mostlyclean-generic \
541 mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am
542
543
544# Tell versions [3.59,3.63) of GNU make to not export all variables.
545# Otherwise a system limit (for SysV at least) may be exceeded.
546.NOEXPORT:
diff --git a/libraries/evas/src/lib/include/evas_blend_ops.h b/libraries/evas/src/lib/include/evas_blend_ops.h
deleted file mode 100644
index 6bd1f16..0000000
--- a/libraries/evas/src/lib/include/evas_blend_ops.h
+++ /dev/null
@@ -1,378 +0,0 @@
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
203static EFL_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
231static EFL_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
240static EFL_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
292static EFL_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
321static EFL_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
344static EFL_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
deleted file mode 100644
index e853064..0000000
--- a/libraries/evas/src/lib/include/evas_common.h
+++ /dev/null
@@ -1,1258 +0,0 @@
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 STDC_HEADERS
9# include <stdlib.h>
10# include <stddef.h>
11#else
12# ifdef HAVE_STDLIB_H
13# include <stdlib.h>
14# endif
15#endif
16#ifdef HAVE_ALLOCA_H
17# include <alloca.h>
18#elif !defined alloca
19# ifdef __GNUC__
20# define alloca __builtin_alloca
21# elif defined _AIX
22# define alloca __alloca
23# elif defined _MSC_VER
24# include <malloc.h>
25# define alloca _alloca
26# elif !defined HAVE_ALLOCA
27# ifdef __cplusplus
28extern "C"
29# endif
30void *alloca (size_t);
31# endif
32#endif
33
34#include <stdio.h>
35#include <stdlib.h>
36#include <string.h>
37#include <sys/types.h>
38#include <sys/stat.h>
39#include <time.h>
40#include <ctype.h>
41
42#ifndef _MSC_VER
43# include <stdint.h>
44#include <unistd.h>
45#endif
46
47#ifdef HAVE_EVIL
48# include <Evil.h>
49#endif
50
51#ifdef HAVE_ESCAPE
52# include <Escape.h>
53#endif
54
55#ifdef HAVE_PIXMAN
56#include <pixman.h>
57#endif
58
59#include <sys/types.h>
60#include <sys/stat.h>
61#include <unistd.h>
62
63#ifdef HAVE_EXOTIC
64# include <Exotic.h>
65#endif
66
67#include <Eina.h>
68#include "Evas.h"
69//#include "Evas_GL.h"
70
71#ifndef HAVE_LROUND
72/* right now i dont care about rendering bugs on platforms without lround
73 (e.g. windows/vc++... yay!)
74 FIXME: http://cgit.freedesktop.org/cairo/tree/src/cairo-misc.c#n487
75*/
76#define lround(x) (((x) < 0) ? (long int)ceil((x) - 0.5) : (long int)floor((x) + 0.5))
77#endif
78
79/* macros needed to log message through eina_log */
80extern EAPI int _evas_log_dom_global;
81#ifdef _EVAS_DEFAULT_LOG_DOM
82# undef _EVAS_DEFAULT_LOG_DOM
83#endif
84#define _EVAS_DEFAULT_LOG_DOM _evas_log_dom_global
85
86#ifdef EVAS_DEFAULT_LOG_COLOR
87# undef EVAS_DEFAULT_LOG_COLOR
88#endif
89#define EVAS_DEFAULT_LOG_COLOR EINA_COLOR_BLUE
90
91#ifdef ERR
92# undef ERR
93#endif
94#define ERR(...) EINA_LOG_DOM_ERR(_EVAS_DEFAULT_LOG_DOM, __VA_ARGS__)
95
96#ifdef DBG
97# undef DBG
98#endif
99#define DBG(...) EINA_LOG_DOM_DBG(_EVAS_DEFAULT_LOG_DOM, __VA_ARGS__)
100
101#ifdef INF
102# undef INF
103#endif
104#define INF(...) EINA_LOG_DOM_INFO(_EVAS_DEFAULT_LOG_DOM, __VA_ARGS__)
105
106#ifdef WRN
107# undef WRN
108#endif
109#define WRN(...) EINA_LOG_DOM_WARN(_EVAS_DEFAULT_LOG_DOM, __VA_ARGS__)
110
111#ifdef CRIT
112# undef CRIT
113#endif
114#define CRIT(...) EINA_LOG_DOM_CRIT(_EVAS_DEFAULT_LOG_DOM, __VA_ARGS__)
115
116#include "evas_options.h"
117
118#if defined(__ARM_ARCH_3M__)
119# define __ARM_ARCH__ 40
120#endif
121#if defined(__ARM_ARCH_4__)
122# define __ARM_ARCH__ 40
123#endif
124#if defined(__ARM_ARCH_4T__)
125# define __ARM_ARCH__ 41
126#endif
127
128#if defined(__ARM_ARCH_5__)
129# define __ARM_ARCH__ 50
130#endif
131#if defined(__ARM_ARCH_5T__)
132# define __ARM_ARCH__ 51
133#endif
134#if defined(__ARM_ARCH_5E__)
135# define __ARM_ARCH__ 52
136#endif
137#if defined(__ARM_ARCH_5TE__)
138# define __ARM_ARCH__ 53
139#endif
140#if defined(__ARM_ARCH_5TEJ__)
141# define __ARM_ARCH__ 54
142#endif
143
144#if defined(__ARM_ARCH_6__)
145# define __ARM_ARCH__ 60
146#endif
147#if defined(__ARM_ARCH_6J__)
148# define __ARM_ARCH__ 61
149#endif
150#if defined(__ARM_ARCH_6K__)
151# define __ARM_ARCH__ 62
152#endif
153#if defined(__ARM_ARCH_6Z__)
154# define __ARM_ARCH__ 63
155#endif
156#if defined(__ARM_ARCH_6ZK__)
157# define __ARM_ARCH__ 64
158#endif
159#if defined(__ARM_ARCH_6T2__)
160# define __ARM_ARCH__ 65
161#endif
162
163#if defined(__ARM_ARCH_7__)
164# define __ARM_ARCH__ 70
165#endif
166#if defined(__ARM_ARCH_7A__)
167# define __ARM_ARCH__ 71
168#endif
169#if defined(__ARM_ARCH_7R__)
170# define __ARM_ARCH__ 72
171#endif
172#if defined(__ARM_ARCH_7M__)
173# define __ARM_ARCH__ 73
174#endif
175
176#ifndef BUILD_PTHREAD
177# undef BUILD_PIPE_RENDER
178#endif
179
180#if defined(BUILD_ASYNC_PRELOAD) && !defined(BUILD_PTHREAD)
181# define BUILD_PTHREAD
182#endif
183
184#define LK(x) Eina_Lock x
185#define LKI(x) eina_lock_new(&(x))
186#define LKD(x) eina_lock_free(&(x))
187#define LKL(x) eina_lock_take(&(x))
188#define LKT(x) eina_lock_take_try(&(x))
189#define LKU(x) eina_lock_release(&(x))
190#define LKDBG(x) eina_lock_debug(&(x))
191
192/* for rwlocks */
193#define RWLK(x) Eina_RWLock x
194#define RWLKI(x) eina_rwlock_new(&(x))
195#define RWLKD(x) eina_rwlock_free(&(x))
196#define RDLKL(x) eina_rwlock_take_read(&(x))
197#define WRLKL(x) eina_rwlock_take_write(&(x))
198#define RWLKU(x) eina_rwlock_release(&(x))
199
200#ifdef BUILD_PTHREAD
201
202# define TH(x) pthread_t x
203# define THI(x) int x
204# define TH_MAX 8
205
206// even though in theory having every Nth rendered line done by a different
207// thread might even out load across threads - it actually slows things down.
208//#define EVAS_SLI 1
209
210#else
211# define TH(x)
212# define THI(x)
213# define TH_MAX 0
214
215#endif
216
217#include <ft2build.h>
218#include FT_FREETYPE_H
219#include FT_GLYPH_H
220#include FT_SIZES_H
221#include FT_MODULE_H
222
223#ifdef __GNUC__
224# if __GNUC__ >= 4
225// BROKEN in gcc 4 on amd64
226//# pragma GCC visibility push(hidden)
227# endif
228#define LIKELY(x) __builtin_expect(!!(x), 1)
229#define UNLIKELY(x) __builtin_expect(!!(x), 0)
230#else
231#define LIKELY(x) (x)
232#define UNLIKELY(x) (x)
233#endif
234
235/*****************************************************************************/
236
237/* use exact rects for updates not tiles */
238/* #define RECTUPDATE */
239#define TILESIZE 8
240#define IMG_MAX_SIZE 65000
241
242#define IMG_TOO_BIG(w, h) \
243 ((((unsigned long long)w) * ((unsigned long long)h)) >= \
244 ((1ULL << (29 * (sizeof(void *) / 4))) - 2048))
245
246#ifdef BUILD_SMALL_DITHER_MASK
247# define DM_TABLE _evas_dither_44
248# define DM_SIZE 4
249# define DM_BITS 4
250# define DM_DIV 16
251# define USE_DITHER_44 1
252#else
253# define DM_TABLE _evas_dither_128128
254# define DM_SIZE 128
255# define DM_BITS 6
256# define DM_DIV 64
257# define USE_DITHER_128128 1
258#endif
259
260#define DM_MSK (DM_SIZE - 1)
261#define DM_SHF(_b) (DM_BITS - (8 - _b))
262/* Supports negative right shifts */
263#define DM_SHR(x, _b) ((DM_SHF(_b) >= 0) ? \
264 ((x) >> DM_SHF(_b)) : ((x) << -DM_SHF(_b)))
265
266/* if more than 1/ALPHA_SPARSE_INV_FRACTION is "alpha" (1-254) then sparse
267 * alpha flag gets set */
268#define ALPHA_SPARSE_INV_FRACTION 3
269
270/*****************************************************************************/
271
272#if defined(__ARM_ARCH_3M__)
273# define __ARM_ARCH__ 40
274#endif
275#if defined(__ARM_ARCH_4__)
276# define __ARM_ARCH__ 40
277#endif
278#if defined(__ARM_ARCH_4T__)
279# define __ARM_ARCH__ 41
280#endif
281
282#if defined(__ARM_ARCH_5__)
283# define __ARM_ARCH__ 50
284#endif
285#if defined(__ARM_ARCH_5T__)
286# define __ARM_ARCH__ 51
287#endif
288#if defined(__ARM_ARCH_5E__)
289# define __ARM_ARCH__ 52
290#endif
291#if defined(__ARM_ARCH_5TE__)
292# define __ARM_ARCH__ 53
293#endif
294#if defined(__ARM_ARCH_5TEJ__)
295# define __ARM_ARCH__ 54
296#endif
297
298#if defined(__ARM_ARCH_6__)
299# define __ARM_ARCH__ 60
300#endif
301#if defined(__ARM_ARCH_6J__)
302# define __ARM_ARCH__ 61
303#endif
304#if defined(__ARM_ARCH_6K__)
305# define __ARM_ARCH__ 62
306#endif
307#if defined(__ARM_ARCH_6Z__)
308# define __ARM_ARCH__ 63
309#endif
310#if defined(__ARM_ARCH_6ZK__)
311# define __ARM_ARCH__ 64
312#endif
313#if defined(__ARM_ARCH_6T2__)
314# define __ARM_ARCH__ 65
315#endif
316
317#if defined(__ARM_ARCH_7__)
318# define __ARM_ARCH__ 70
319#endif
320#if defined(__ARM_ARCH_7A__)
321# define __ARM_ARCH__ 71
322#endif
323#if defined(__ARM_ARCH_7R__)
324# define __ARM_ARCH__ 72
325#endif
326#if defined(__ARM_ARCH_7M__)
327# define __ARM_ARCH__ 73
328#endif
329
330#if defined(__ARM_ARCH__) && (__ARM_ARCH__ >= 52)
331/* tested on ARMv6 (arm1136j-s), Nokia N800 CPU */
332#define pld(addr, off) \
333 __asm__("pld [%[address], %[offset]]":: \
334 [address] "r" (addr), [offset] "i" (off))
335#else
336#define pld(addr, off)
337#endif /* __ARMEL__ */
338
339// these here are in config.h - just here for documentation
340//#ifdef __ARM_ARCH__
341// *IF* you enable pixman, this determines which things pixman will do
342////#define PIXMAN_FONT 1
343////#define PIXMAN_RECT 1
344////#define PIXMAN_LINE 1
345////#define PIXMAN_POLY 1
346//#define PIXMAN_IMAGE 1
347//#define PIXMAN_IMAGE_SCALE_SAMPLE 1
348//#endif
349// not related to pixman but an alternate rotate code
350//#define TILE_ROTATE 1
351
352#define TILE_CACHE_LINE_SIZE 64
353
354/*****************************************************************************/
355
356#define UNROLL2(op...) op op
357#define UNROLL4(op...) UNROLL2(op) UNROLL2(op)
358#define UNROLL8(op...) UNROLL4(op) UNROLL4(op)
359#define UNROLL16(op...) UNROLL8(op) UNROLL8(op)
360
361#define UNROLL8_PLD_WHILE(start, size, end, op) \
362 pld(start, 0); \
363 end = start + (size & ~7); \
364 while (start < end) \
365 { \
366 pld(start, 32); \
367 UNROLL8(op); \
368 } \
369 end += (size & 7); \
370 pld(start, 32); \
371 while (start < end) \
372 { \
373 op; \
374 }
375
376/*****************************************************************************/
377
378typedef unsigned long long DATA64;
379typedef unsigned int DATA32;
380typedef unsigned short DATA16;
381typedef unsigned char DATA8;
382
383typedef struct _Image_Entry Image_Entry;
384typedef struct _Image_Entry_Flags Image_Entry_Flags;
385typedef struct _Image_Entry_Frame Image_Entry_Frame;
386typedef struct _Image_Timestamp Image_Timestamp;
387typedef struct _Engine_Image_Entry Engine_Image_Entry;
388typedef struct _Evas_Cache_Target Evas_Cache_Target;
389typedef struct _Evas_Preload_Pthread Evas_Preload_Pthread;
390
391typedef struct _RGBA_Image_Loadopts RGBA_Image_Loadopts;
392#ifdef BUILD_PIPE_RENDER
393typedef struct _RGBA_Pipe_Op RGBA_Pipe_Op;
394typedef struct _RGBA_Pipe RGBA_Pipe;
395typedef struct _RGBA_Pipe_Thread_Info RGBA_Pipe_Thread_Info;
396#endif
397typedef struct _RGBA_Image RGBA_Image;
398typedef struct _RGBA_Image_Span RGBA_Image_Span;
399typedef struct _RGBA_Draw_Context RGBA_Draw_Context;
400typedef struct _RGBA_Polygon_Point RGBA_Polygon_Point;
401typedef struct _RGBA_Map_Point RGBA_Map_Point;
402typedef struct _RGBA_Font RGBA_Font;
403typedef struct _RGBA_Font_Int RGBA_Font_Int;
404typedef struct _RGBA_Font_Source RGBA_Font_Source;
405typedef struct _RGBA_Font_Glyph RGBA_Font_Glyph;
406typedef struct _RGBA_Gfx_Compositor RGBA_Gfx_Compositor;
407
408typedef struct _Cutout_Rect Cutout_Rect;
409typedef struct _Cutout_Rects Cutout_Rects;
410
411typedef struct _Convert_Pal Convert_Pal;
412
413typedef struct _Tilebuf Tilebuf;
414typedef struct _Tilebuf_Tile Tilebuf_Tile;
415typedef struct _Tilebuf_Rect Tilebuf_Rect;
416
417typedef struct _Evas_Common_Transform Evas_Common_Transform;
418
419// RGBA_Map_Point
420// all coords are 20.12
421// fp type - an int for now
422typedef int FPc;
423// fp # of bits of float accuracy
424#define FP 8
425// fp half (half of an fp unit)
426#define FPH (1 << (FP - 1))
427// one fp unit
428#define FP1 (1 << (FP))
429
430/*
431typedef struct _Regionbuf Regionbuf;
432typedef struct _Regionspan Regionspan;
433*/
434
435typedef void (*RGBA_Gfx_Func) (DATA32 *src, DATA8 *mask, DATA32 col, DATA32 *dst, int len);
436typedef void (*RGBA_Gfx_Pt_Func) (DATA32 src, DATA8 mask, DATA32 col, DATA32 *dst);
437typedef void (*Gfx_Func_Copy) (DATA32 *src, DATA32 *dst, int len);
438
439typedef 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);
440
441#include "../cache/evas_cache.h"
442
443/*****************************************************************************/
444
445typedef enum _RGBA_Image_Flags
446{
447 RGBA_IMAGE_NOTHING = (0),
448/* RGBA_IMAGE_HAS_ALPHA = (1 << 0), */
449 RGBA_IMAGE_IS_DIRTY = (1 << 1),
450 RGBA_IMAGE_INDEXED = (1 << 2),
451 RGBA_IMAGE_ALPHA_ONLY = (1 << 3),
452 RGBA_IMAGE_ALPHA_TILES = (1 << 4),
453/* RGBA_IMAGE_ALPHA_SPARSE = (1 << 5), */
454/* RGBA_IMAGE_LOADED = (1 << 6), */
455/* RGBA_IMAGE_NEED_DATA = (1 << 7) */
456 RGBA_IMAGE_TODO_LOAD = (1 << 8),
457} RGBA_Image_Flags;
458
459typedef enum _Convert_Pal_Mode
460{
461 PAL_MODE_NONE,
462 PAL_MODE_MONO,
463 PAL_MODE_GRAY4,
464 PAL_MODE_GRAY16,
465 PAL_MODE_GRAY64,
466 PAL_MODE_GRAY256,
467 PAL_MODE_RGB111,
468 PAL_MODE_RGB121,
469 PAL_MODE_RGB221,
470 PAL_MODE_RGB222,
471 PAL_MODE_RGB232,
472 PAL_MODE_RGB332,
473 PAL_MODE_RGB666,
474 PAL_MODE_LAST
475} Convert_Pal_Mode;
476
477typedef enum _CPU_Features
478{
479 CPU_FEATURE_C = 0,
480 CPU_FEATURE_MMX = (1 << 0),
481 CPU_FEATURE_MMX2 = (1 << 1),
482 CPU_FEATURE_SSE = (1 << 2),
483 CPU_FEATURE_ALTIVEC = (1 << 3),
484 CPU_FEATURE_VIS = (1 << 4),
485 CPU_FEATURE_VIS2 = (1 << 5),
486 CPU_FEATURE_NEON = (1 << 6),
487 CPU_FEATURE_SSE3 = (1 << 7)
488} CPU_Features;
489
490typedef enum _Font_Hint_Flags
491{
492 FONT_NO_HINT,
493 FONT_AUTO_HINT,
494 FONT_BYTECODE_HINT
495} Font_Hint_Flags;
496
497typedef enum _Font_Rend_Flags
498{
499 FONT_REND_REGULAR = 0,
500 FONT_REND_SLANT = (1 << 0),
501 FONT_REND_WEIGHT = (1 << 1),
502} Font_Rend_Flags;
503
504/*****************************************************************************/
505
506#if 0 // filtering disabled
507typedef struct _Filtered_Image Filtered_Image;
508#endif
509
510struct _RGBA_Image_Loadopts
511{
512 int scale_down_by; // if > 1 then use this
513 double dpi; // if > 0.0 use this
514 unsigned int w, h; // if > 0 use this
515 unsigned int degree;//if>0 there is some info related with rotation
516 struct {
517 unsigned int x, y, w, h;
518 } region;
519
520 Eina_Bool orientation; // if EINA_TRUE => should honor orientation information provided by file (like jpeg exif info)
521};
522
523struct _Image_Entry_Flags
524{
525 Eina_Bool loaded : 1;
526 Eina_Bool in_progress : 1;
527 Eina_Bool dirty : 1;
528 Eina_Bool activ : 1;
529
530 Eina_Bool need_data : 1;
531 Eina_Bool lru_nodata : 1;
532 Eina_Bool cached : 1;
533 Eina_Bool alpha : 1;
534
535 Eina_Bool lru : 1;
536 Eina_Bool alpha_sparse : 1;
537#ifdef BUILD_ASYNC_PRELOAD
538 Eina_Bool preload_done : 1;
539 Eina_Bool delete_me : 1;
540 Eina_Bool pending : 1;
541#endif
542 Eina_Bool animated : 1;
543 Eina_Bool rotated : 1;
544};
545
546struct _Image_Entry_Frame
547{
548 int index;
549 DATA32 *data; /* frame decoding data */
550 void *info; /* special image type info */
551 Eina_Bool loaded : 1;
552};
553
554struct _Evas_Cache_Target
555{
556 EINA_INLIST;
557 const void *target;
558 void *data;
559};
560
561struct _Image_Timestamp
562{
563 time_t mtime;
564 off_t size;
565 ino_t ino;
566#ifdef _STAT_VER_LINUX
567 unsigned long int mtime_nsec;
568#endif
569};
570
571struct _Image_Entry
572{
573 EINA_INLIST;
574
575 Evas_Cache_Image *cache;
576
577 const char *cache_key;
578
579 const char *file;
580 const char *key;
581
582 Evas_Cache_Target *targets;
583 Evas_Preload_Pthread *preload;
584
585 Image_Timestamp tstamp;
586
587 int references;
588#ifdef EVAS_FRAME_QUEUING
589 LK(lock_references); // needed for accessing references
590#endif
591
592#ifdef BUILD_PIPE_RENDER
593 RGBA_Pipe *pipe;
594#ifdef EVAS_FRAME_QUEUING
595 LK(ref_fq_add);
596 LK(ref_fq_del);
597 Eina_Condition cond_fq_del;
598 int ref_fq[2]; // ref_fq[0] is for addition, ref_fq[1] is for deletion
599#endif
600#endif
601
602 unsigned char scale;
603
604 RGBA_Image_Loadopts load_opts;
605 int space;
606 unsigned int w;
607 unsigned int h;
608
609 struct
610 {
611 unsigned int w;
612 unsigned int h;
613 } allocated;
614
615 struct
616 {
617 void *module;
618 void *loader;
619 } info;
620
621#ifdef BUILD_ASYNC_PRELOAD
622 LK(lock);
623 LK(lock_cancel);
624 Eina_Bool unload_cancel : 1;
625#endif
626
627 Image_Entry_Flags flags;
628 Evas_Image_Scale_Hint scale_hint;
629 void *data1, *data2;
630 int server_id;
631 int connect_num;
632 int channel;
633 int load_error;
634
635 /* for animation feature */
636 int frame_count;
637 Evas_Image_Animated_Loop_Hint loop_hint;
638 int loop_count;
639 int cur_frame;
640 Eina_List *frames;
641};
642
643struct _Engine_Image_Entry
644{
645 EINA_INLIST;
646
647 /* Upper Engine data. */
648 Image_Entry *src;
649
650 /* Cache stuff. */
651 Evas_Cache_Engine_Image *cache;
652 const char *cache_key;
653
654 struct
655 {
656 Eina_Bool cached : 1;
657 Eina_Bool activ : 1;
658 Eina_Bool dirty : 1;
659 Eina_Bool loaded : 1;
660 Eina_Bool need_parent : 1;
661 } flags;
662
663 int references;
664 int w;
665 int h;
666};
667
668struct _Cutout_Rect
669{
670 int x, y, w, h;
671};
672
673struct _Cutout_Rects
674{
675 Cutout_Rect* rects;
676 int active;
677 int max;
678};
679
680struct _Evas_Common_Transform
681{
682 float mxx, mxy, mxz;
683 float myx, myy, myz;
684 float mzx, mzy, mzz;
685};
686
687struct _RGBA_Draw_Context
688{
689 struct {
690 Eina_Bool use : 1;
691 DATA32 col;
692 } mul;
693 struct {
694#ifdef HAVE_PIXMAN
695 pixman_image_t *pixman_color_image;
696#endif
697 DATA32 col;
698 } col;
699 struct RGBA_Draw_Context_clip {
700 int x, y, w, h;
701 Eina_Bool use : 1;
702 } clip;
703 struct {
704 int x, y, w, h;
705 RGBA_Image *mask;
706 } mask;
707 Cutout_Rects cutout;
708 struct {
709 struct {
710 void *(*gl_new) (void *data, RGBA_Font_Glyph *fg);
711 void (*gl_free) (void *ext_dat);
712 void (*gl_draw) (void *data, void *dest, void *context, RGBA_Font_Glyph *fg, int x, int y);
713 } func;
714 void *data;
715 } font_ext;
716 struct {
717 int color_space;
718 } interpolation;
719 struct {
720 int y, h;
721 } sli;
722 int render_op;
723 Eina_Bool anti_alias : 1;
724};
725
726#ifdef BUILD_PIPE_RENDER
727#include "../engines/common/evas_map_image.h"
728#include "../engines/common/evas_text_utils.h"
729
730struct _RGBA_Pipe_Op
731{
732 RGBA_Draw_Context context;
733 void (*op_func) (RGBA_Image *dst, RGBA_Pipe_Op *op, RGBA_Pipe_Thread_Info *info);
734 void (*free_func) (RGBA_Pipe_Op *op);
735
736 union {
737 struct {
738 int x, y, w, h;
739 } rect;
740 struct {
741 int x0, y0, x1, y1;
742 } line;
743 struct {
744 RGBA_Polygon_Point *points;
745 } poly;
746 struct {
747 RGBA_Font *font;
748 int x, y;
749 Evas_Text_Props intl_props;
750 } text;
751 struct {
752 RGBA_Image *src;
753 int sx, sy, sw, sh, dx, dy, dw, dh;
754 int smooth;
755 char *text;
756 } image;
757 struct {
758 RGBA_Image *src;
759 RGBA_Map_Point *p;
760 int npoints;
761 int smooth;
762 int level;
763 } map;
764 } op;
765};
766
767#define PIPE_LEN 256
768
769struct _RGBA_Pipe
770{
771 EINA_INLIST;
772 int op_num;
773 RGBA_Pipe_Op op[PIPE_LEN];
774};
775
776struct _RGBA_Pipe_Thread_Info
777{
778 RGBA_Image *im;
779 int x, y, w, h;
780};
781#endif
782
783struct _RGBA_Image
784{
785 Image_Entry cache_entry;
786
787 RGBA_Image_Flags flags;
788 struct
789 {
790/* void *module; */
791/* void *loader; */
792/* char *real_file; */
793 char *comment;
794// int format;
795 } info;
796
797 void *extended_info;
798 int ref;
799
800/* unsigned char scale; */
801
802 /* Colorspace stuff. */
803 struct {
804 void *data;
805 Eina_Bool no_free : 1;
806 Eina_Bool dirty : 1;
807 } cs;
808
809 /* RGBA stuff */
810 struct {
811 DATA32 *data;
812 Eina_Bool no_free : 1;
813 } image;
814
815 struct {
816 DATA8 *mask;
817 Eina_Bool dirty: 1;
818 } mask;
819
820#if 0 // filtering disabled
821 Eina_List *filtered;
822#endif
823
824 struct {
825 LK(lock);
826 Eina_List *list;
827 unsigned long long orig_usage;
828 unsigned long long usage_count;
829 int populate_count;
830 unsigned long long newest_usage;
831 unsigned long long newest_usage_count;
832 } cache;
833
834#ifdef HAVE_PIXMAN
835 struct {
836 pixman_image_t *im;
837 } pixman;
838#endif
839};
840
841struct _RGBA_Polygon_Point
842{
843 EINA_INLIST;
844 int x, y;
845};
846
847struct _RGBA_Map_Point
848{
849 FPc x, y; // x, y screenspace
850 float fx, fy, fz; // x, y, z in floats
851// FPc x3, y3; // x, y 3d space
852 FPc z; // z in world space. optional
853 FPc u, v; // u, v in tex coords
854 DATA32 col; // color at this point
855 // for perspective correctness - only point 0 has relevant info
856 FPc px, py, z0, foc;
857};
858
859#if 0 // filtering disabled
860struct _Filtered_Image
861{
862 void *key;
863 size_t keylen;
864 RGBA_Image *image;
865 int ref;
866};
867#endif
868
869// for fonts...
870/////
871typedef struct _Fash_Item_Index_Map Fash_Item_Index_Map;
872typedef struct _Fash_Int_Map Fash_Int_Map;
873typedef struct _Fash_Int_Map2 Fash_Int_Map2;
874typedef struct _Fash_Int Fash_Int;
875struct _Fash_Item_Index_Map
876{
877 RGBA_Font_Int *fint;
878 int index;
879};
880struct _Fash_Int_Map
881{
882 Fash_Item_Index_Map item[256];
883};
884struct _Fash_Int_Map2
885{
886 Fash_Int_Map *bucket[256];
887};
888struct _Fash_Int
889{
890 Fash_Int_Map2 *bucket[256];
891 void (*freeme) (Fash_Int *fash);
892};
893
894/////
895typedef struct _Fash_Glyph_Map Fash_Glyph_Map;
896typedef struct _Fash_Glyph_Map2 Fash_Glyph_Map2;
897typedef struct _Fash_Glyph Fash_Glyph;
898struct _Fash_Glyph_Map
899{
900 RGBA_Font_Glyph *item[256];
901};
902struct _Fash_Glyph_Map2
903{
904 Fash_Glyph_Map *bucket[256];
905};
906struct _Fash_Glyph
907{
908 Fash_Glyph_Map2 *bucket[256];
909 void (*freeme) (Fash_Glyph *fash);
910};
911/////
912
913struct _RGBA_Font
914{
915 Eina_List *fonts;
916 Fash_Int *fash;
917 Font_Hint_Flags hinting;
918 int references;
919#ifdef EVAS_FRAME_QUEUING
920 int ref_fq[2]; //ref_fq[0] is for addition, ref_fq[1] is for deletion
921 Eina_Condition cond_fq_del;
922 LK(ref_fq_add);
923 LK(ref_fq_del);
924#endif
925 LK(lock);
926 unsigned char sizeok : 1;
927};
928
929#include "../engines/common/evas_font_ot.h"
930
931struct _RGBA_Font_Int
932{
933 EINA_INLIST;
934 RGBA_Font_Source *src;
935 Eina_Hash *kerning;
936 Fash_Glyph *fash;
937 unsigned int size;
938 int real_size;
939 int max_h;
940 int references;
941 int usage;
942 struct {
943 FT_Size size;
944#ifdef USE_HARFBUZZ
945 void *hb_font;
946#endif
947 } ft;
948 LK(ft_mutex);
949 Font_Hint_Flags hinting;
950 Font_Rend_Flags wanted_rend; /* The wanted rendering style */
951 Font_Rend_Flags runtime_rend; /* The rendering we need to do on runtime
952 in order to comply with the wanted_rend. */
953 unsigned char sizeok : 1;
954 unsigned char inuse : 1;
955};
956
957struct _RGBA_Font_Source
958{
959 const char *name;
960 const char *file;
961 void *data;
962 unsigned int current_size;
963 int data_size;
964 int references;
965 struct {
966 int orig_upem;
967 FT_Face face;
968 } ft;
969};
970
971struct _RGBA_Font_Glyph
972{
973 FT_UInt index;
974 FT_Glyph glyph;
975 FT_BitmapGlyph glyph_out;
976 /* this is a problem - only 1 engine at a time can extend such a font... grrr */
977 void *ext_dat;
978 void (*ext_dat_free) (void *ext_dat);
979 RGBA_Font_Int *fi;
980};
981
982struct _RGBA_Gfx_Compositor
983{
984 const char *name;
985
986 void (*init)(void);
987 void (*shutdown)(void);
988
989 RGBA_Gfx_Func (*composite_pixel_span_get)(RGBA_Image *src, RGBA_Image *dst, int pixels);
990 RGBA_Gfx_Func (*composite_color_span_get)(DATA32 col, RGBA_Image *dst, int pixels);
991 RGBA_Gfx_Func (*composite_pixel_color_span_get)(RGBA_Image *src, DATA32 col, RGBA_Image *dst, int pixels);
992 RGBA_Gfx_Func (*composite_mask_color_span_get)(DATA32 col, RGBA_Image *dst, int pixels);
993 RGBA_Gfx_Func (*composite_pixel_mask_span_get)(RGBA_Image *src, RGBA_Image *dst, int pixels);
994
995 RGBA_Gfx_Pt_Func (*composite_pixel_pt_get)(Image_Entry_Flags src_flags, RGBA_Image *dst);
996 RGBA_Gfx_Pt_Func (*composite_color_pt_get)(DATA32 col, RGBA_Image *dst);
997 RGBA_Gfx_Pt_Func (*composite_pixel_color_pt_get)(Image_Entry_Flags src_flags, DATA32 col, RGBA_Image *dst);
998 RGBA_Gfx_Pt_Func (*composite_mask_color_pt_get)(DATA32 col, RGBA_Image *dst);
999 RGBA_Gfx_Pt_Func (*composite_pixel_mask_pt_get)(Image_Entry_Flags src_flags, RGBA_Image *dst);
1000};
1001
1002#define EVAS_RECT_SPLIT 1
1003#ifdef EVAS_RECT_SPLIT
1004typedef struct list_node list_node_t;
1005typedef struct list list_t;
1006typedef struct rect rect_t;
1007typedef struct rect_node rect_node_t;
1008
1009struct list_node
1010{
1011 struct list_node *next;
1012};
1013
1014struct list
1015{
1016 struct list_node *head;
1017 struct list_node *tail;
1018};
1019
1020struct rect
1021{
1022 int left;
1023 int top;
1024 int right;
1025 int bottom;
1026 int width;
1027 int height;
1028 int area;
1029};
1030
1031struct rect_node
1032{
1033 struct list_node _lst;
1034 struct rect rect;
1035};
1036#endif /* EVAS_RECT_SPLIT */
1037
1038struct _Tilebuf
1039{
1040 int outbuf_w;
1041 int outbuf_h;
1042
1043 struct {
1044 int w, h;
1045 } tile_size;
1046
1047 struct {
1048 int x, y, w, h;
1049 } prev_add, prev_del;
1050#ifdef RECTUPDATE
1051/*
1052 Regionbuf *rb;
1053 */
1054#elif defined(EVAS_RECT_SPLIT)
1055 int need_merge;
1056 list_t rects;
1057#else
1058/*
1059 struct {
1060 int w, h;
1061 Tilebuf_Tile *tiles;
1062 } tiles;
1063 */
1064#endif
1065};
1066
1067struct _Tilebuf_Tile
1068{
1069 Eina_Bool redraw : 1;
1070/* FIXME: need these flags later - but not now */
1071/*
1072 Eina_Bool done : 1;
1073 Eina_Bool edge : 1;
1074 Eina_Bool from : 1;
1075
1076 struct {
1077 int dx, dy;
1078 } vector;
1079 */
1080};
1081
1082struct _Tilebuf_Rect
1083{
1084 EINA_INLIST;
1085 int x, y, w, h;
1086};
1087/*
1088struct _Regionbuf
1089{
1090 int w, h;
1091 Regionspan **spans;
1092};
1093
1094struct _Regionspan
1095{
1096 EINA_INLIST;
1097 int x1, x2;
1098};
1099*/
1100
1101struct _Convert_Pal
1102{
1103 int references;
1104 int count;
1105 Convert_Pal_Mode colors;
1106 DATA8 *lookup;
1107 void *data;
1108};
1109
1110/****/
1111
1112/*****************************************************************************/
1113#include "evas_macros.h"
1114
1115#ifndef WORDS_BIGENDIAN
1116/* x86 */
1117#define A_VAL(p) (((DATA8 *)(p))[3])
1118#define R_VAL(p) (((DATA8 *)(p))[2])
1119#define G_VAL(p) (((DATA8 *)(p))[1])
1120#define B_VAL(p) (((DATA8 *)(p))[0])
1121#define AR_VAL(p) ((DATA16 *)(p)[1])
1122#define GB_VAL(p) ((DATA16 *)(p)[0])
1123#else
1124/* ppc */
1125#define A_VAL(p) (((DATA8 *)(p))[0])
1126#define R_VAL(p) (((DATA8 *)(p))[1])
1127#define G_VAL(p) (((DATA8 *)(p))[2])
1128#define B_VAL(p) (((DATA8 *)(p))[3])
1129#define AR_VAL(p) ((DATA16 *)(p)[0])
1130#define GB_VAL(p) ((DATA16 *)(p)[1])
1131#endif
1132
1133#define RGB_JOIN(r,g,b) \
1134 (((r) << 16) + ((g) << 8) + (b))
1135
1136#define ARGB_JOIN(a,r,g,b) \
1137 (((a) << 24) + ((r) << 16) + ((g) << 8) + (b))
1138
1139#include "evas_blend_ops.h"
1140
1141#define _EVAS_RENDER_FILL -1
1142#define _EVAS_RENDER_BLEND 0
1143#define _EVAS_RENDER_BLEND_REL 1
1144#define _EVAS_RENDER_COPY 2
1145#define _EVAS_RENDER_COPY_REL 3
1146#define _EVAS_RENDER_ADD 4
1147#define _EVAS_RENDER_ADD_REL 5
1148#define _EVAS_RENDER_SUB 6
1149#define _EVAS_RENDER_SUB_REL 7
1150#define _EVAS_RENDER_TINT 8
1151#define _EVAS_RENDER_TINT_REL 9
1152#define _EVAS_RENDER_MASK 10
1153#define _EVAS_RENDER_MUL 11
1154#define _EVAS_RENDER_CLIP 12
1155
1156#define _EVAS_TEXTURE_REFLECT 0
1157#define _EVAS_TEXTURE_REPEAT 1
1158#define _EVAS_TEXTURE_RESTRICT 2
1159#define _EVAS_TEXTURE_RESTRICT_REFLECT 3
1160#define _EVAS_TEXTURE_RESTRICT_REPEAT 4
1161#define _EVAS_TEXTURE_PAD 5
1162
1163#define _EVAS_COLOR_SPACE_ARGB 0
1164#define _EVAS_COLOR_SPACE_AHSV 1
1165
1166/*****************************************************************************/
1167
1168#define SCALE_SIZE_MAX ((1 << 15) - 1)
1169
1170#ifdef __cplusplus
1171extern "C" {
1172#endif
1173
1174/****/
1175void evas_common_init (void);
1176void evas_common_shutdown (void);
1177
1178EAPI void evas_common_cpu_init (void);
1179
1180int evas_common_cpu_have_cpuid (void);
1181int evas_common_cpu_has_feature (unsigned int feature);
1182EAPI void evas_common_cpu_can_do (int *mmx, int *sse, int *sse2);
1183EAPI void evas_common_cpu_end_opt (void);
1184
1185/****/
1186#include "../engines/common/evas_blend.h"
1187
1188EAPI Gfx_Func_Copy evas_common_draw_func_copy_get (int pixels, int reverse);
1189
1190/****/
1191#include "../engines/common/evas_convert_color.h"
1192#include "../engines/common/evas_convert_colorspace.h"
1193#include "../engines/common/evas_convert_main.h"
1194#include "../engines/common/evas_convert_yuv.h"
1195#include "../engines/common/evas_scale_main.h"
1196#include "../engines/common/evas_scale_smooth.h"
1197#include "../engines/common/evas_scale_span.h"
1198
1199/****/
1200#include "../engines/common/evas_image.h"
1201
1202/****/
1203#include "../engines/common/evas_line.h"
1204#include "../engines/common/evas_polygon.h"
1205#include "../engines/common/evas_rectangle.h"
1206
1207/****/
1208EAPI void evas_common_blit_init (void);
1209
1210EAPI 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);
1211
1212/****/
1213#include "../engines/common/evas_font.h"
1214
1215/****/
1216EAPI void evas_common_tilebuf_init (void);
1217
1218EAPI Tilebuf *evas_common_tilebuf_new (int w, int h);
1219EAPI void evas_common_tilebuf_free (Tilebuf *tb);
1220EAPI void evas_common_tilebuf_set_tile_size (Tilebuf *tb, int tw, int th);
1221EAPI void evas_common_tilebuf_get_tile_size (Tilebuf *tb, int *tw, int *th);
1222EAPI int evas_common_tilebuf_add_redraw (Tilebuf *tb, int x, int y, int w, int h);
1223EAPI int evas_common_tilebuf_del_redraw (Tilebuf *tb, int x, int y, int w, int h);
1224EAPI int evas_common_tilebuf_add_motion_vector (Tilebuf *tb, int x, int y, int w, int h, int dx, int dy, int alpha);
1225EAPI void evas_common_tilebuf_clear (Tilebuf *tb);
1226EAPI Tilebuf_Rect *evas_common_tilebuf_get_render_rects (Tilebuf *tb);
1227EAPI void evas_common_tilebuf_free_render_rects (Tilebuf_Rect *rects);
1228
1229/*
1230Regionbuf *evas_common_regionbuf_new (int w, int h);
1231void evas_common_regionbuf_free (Regionbuf *rb);
1232void evas_common_regionbuf_clear (Regionbuf *rb);
1233void evas_common_regionbuf_span_add (Regionbuf *rb, int x1, int x2, int y);
1234void evas_common_regionbuf_span_del (Regionbuf *rb, int x1, int x2, int y);
1235Tilebuf_Rect *evas_common_regionbuf_rects_get (Regionbuf *rb);
1236*/
1237
1238/****/
1239#include "../engines/common/evas_draw.h"
1240
1241#include "../engines/common/evas_map_image.h"
1242
1243/****/
1244#ifdef BUILD_PIPE_RENDER
1245# include "../engines/common/evas_pipe.h"
1246#endif
1247
1248void evas_font_dir_cache_free(void);
1249
1250/****/
1251
1252/*****************************************************************************/
1253
1254#ifdef __cplusplus
1255}
1256#endif
1257
1258#endif
diff --git a/libraries/evas/src/lib/include/evas_common_soft16.h b/libraries/evas/src/lib/include/evas_common_soft16.h
deleted file mode 100644
index 446319e..0000000
--- a/libraries/evas/src/lib/include/evas_common_soft16.h
+++ /dev/null
@@ -1,100 +0,0 @@
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
deleted file mode 100644
index d701842..0000000
--- a/libraries/evas/src/lib/include/evas_common_soft8.h
+++ /dev/null
@@ -1,184 +0,0 @@
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
deleted file mode 100644
index 45f2b1f..0000000
--- a/libraries/evas/src/lib/include/evas_inline.x
+++ /dev/null
@@ -1,259 +0,0 @@
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
deleted file mode 100644
index ed29dbd..0000000
--- a/libraries/evas/src/lib/include/evas_macros.h
+++ /dev/null
@@ -1,217 +0,0 @@
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
deleted file mode 100644
index e1095e1..0000000
--- a/libraries/evas/src/lib/include/evas_mmx.h
+++ /dev/null
@@ -1,735 +0,0 @@
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
deleted file mode 100644
index f6739c0..0000000
--- a/libraries/evas/src/lib/include/evas_options.h
+++ /dev/null
@@ -1,69 +0,0 @@
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
deleted file mode 100644
index bf0cfc5..0000000
--- a/libraries/evas/src/lib/include/evas_private.h
+++ /dev/null
@@ -1,1122 +0,0 @@
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 int downs;
305 DATA32 button;
306 Evas_Coord x, y;
307 int nogrep;
308 struct {
309 Eina_List *in;
310 } object;
311 } pointer;
312
313 struct {
314 Evas_Coord x, y, w, h;
315 unsigned char changed : 1;
316 } viewport;
317
318 struct {
319 int w, h;
320 DATA32 render_method;
321 unsigned char changed : 1;
322 } output;
323
324 struct
325 {
326 Evas_Coord x, y, w, h;
327 Eina_Bool changed : 1;
328 } framespace;
329
330 Eina_List *damages;
331 Eina_List *obscures;
332
333 Evas_Layer *layers;
334
335 Eina_Hash *name_hash;
336
337 int output_validity;
338
339 int walking_list;
340 int events_frozen;
341 Evas_Event_Flags default_event_flags;
342
343 struct {
344 Evas_Module *module;
345 Evas_Func *func;
346 struct {
347 void *output;
348
349 void *context;
350 } data;
351
352 void *info;
353 int info_magic;
354 } engine;
355
356 Eina_Array delete_objects;
357 Eina_Array active_objects;
358 Eina_Array restack_objects;
359 Eina_Array render_objects;
360 Eina_Array pending_objects;
361 Eina_Array obscuring_objects;
362 Eina_Array temporary_objects;
363 Eina_Array calculate_objects;
364 Eina_Array clip_changes;
365
366 Eina_Clist calc_list;
367 Eina_Clist calc_done;
368 Eina_List *video_objects;
369
370 Eina_List *post_events; // free me on evas_free
371
372 Evas_Callbacks *callbacks;
373
374 int delete_grabs;
375 int walking_grabs;
376 Eina_List *grabs;
377
378 Eina_List *font_path;
379
380 int in_smart_calc;
381 int smart_calc_count;
382
383 Evas_Object *focused;
384 void *attach_data;
385 Evas_Modifier modifiers;
386 Evas_Lock locks;
387 unsigned int last_timestamp;
388 int last_mouse_down_counter;
389 int last_mouse_up_counter;
390 int nochange;
391 Evas_Font_Hinting_Flags hinting;
392 unsigned char changed : 1;
393 unsigned char delete_me : 1;
394 unsigned char invalidate : 1;
395 unsigned char cleanup : 1;
396 unsigned char focus : 1;
397
398 Eina_List *touch_points;
399};
400
401struct _Evas_Layer
402{
403 EINA_INLIST;
404
405 short layer;
406 Evas_Object *objects;
407
408 Evas *evas;
409
410 void *engine_data;
411 int usage;
412 unsigned char delete_me : 1;
413};
414
415struct _Evas_Size
416{
417 Evas_Coord w, h;
418};
419
420struct _Evas_Aspect
421{
422 Evas_Aspect_Control mode;
423 Evas_Size size;
424};
425
426struct _Evas_Border
427{
428 Evas_Coord l, r, t, b;
429};
430
431struct _Evas_Double_Pair
432{
433 double x, y;
434};
435
436struct _Evas_Size_Hints
437{
438 Evas_Size min, max, request;
439 Evas_Aspect aspect;
440 Evas_Double_Pair align, weight;
441 Evas_Border padding;
442};
443
444struct _Evas_Map_Point
445{
446 double x, y, z, px, py;
447 double u, v;
448 unsigned char r, g, b, a;
449};
450
451struct _Evas_Map
452{
453 DATA32 magic;
454 int count; // num of points
455 Evas_Coord_Rectangle normal_geometry; // bounding box of map geom actually
456 void *surface; // surface holding map if needed
457 int surface_w, surface_h; // current surface w & h alloc
458 Evas_Coord mx, my; // mouse x, y after conversion to map space
459 struct {
460 Evas_Coord px, py, z0, foc;
461 } persp;
462 Eina_Bool alpha : 1;
463 Eina_Bool smooth : 1;
464 Evas_Map_Point points[]; // actual points
465};
466
467#if 0 // filtering disabled
468/* nash: Split into two bits */
469typedef struct Evas_Filter_Info
470{
471 Evas_Filter filter;
472 Evas_Filter_Mode mode;
473
474 Eina_Bool dirty : 1;
475
476 int datalen;
477 void *data;
478 void (*data_free)(void *);
479
480 uint8_t *key;
481 uint32_t len;
482 Filtered_Image *cached;
483} Evas_Filter_Info;
484
485typedef Eina_Bool (*Evas_Software_Filter_Fn)(Evas_Filter_Info *, RGBA_Image *, RGBA_Image *);
486
487int evas_filter_get_size(Evas_Filter_Info *info, int inw, int inh,
488 int *outw, int *outh, Eina_Bool inv);
489Eina_Bool evas_filter_always_alpha(Evas_Filter_Info *info);
490uint8_t *evas_filter_key_get(const Evas_Filter_Info *info, uint32_t *lenp);
491// expose for use in engines
492EAPI Evas_Software_Filter_Fn evas_filter_software_get(Evas_Filter_Info *info);
493void evas_filter_free(Evas_Object *o);
494#endif
495
496struct _Evas_Object
497{
498 EINA_INLIST;
499
500 DATA32 magic;
501
502 const char *type;
503 Evas_Layer *layer;
504
505 struct {
506 Evas_Map *map;
507 Evas_Object *clipper;
508 Evas_Object *mask;
509 Evas_Object *map_parent;
510 double scale;
511 Evas_Coord_Rectangle geometry;
512 struct {
513 struct {
514 Evas_Coord x, y, w, h;
515 unsigned char r, g, b, a;
516 Eina_Bool visible : 1;
517 Eina_Bool dirty : 1;
518 } clip;
519 } cache;
520 short layer;
521 struct {
522 unsigned char r, g, b, a;
523 } color;
524 Eina_Bool usemap : 1;
525 Eina_Bool visible : 1;
526 Eina_Bool have_clipees : 1;
527 Eina_Bool anti_alias : 1;
528 Evas_Render_Op render_op : 4;
529 } cur, prev;
530
531 char *name;
532
533 Evas_Intercept_Func *interceptors;
534
535 struct {
536 Eina_List *elements;
537 } data;
538
539 Eina_List *grabs;
540
541 Evas_Callbacks *callbacks;
542
543 struct {
544 Eina_List *clipees;
545 Eina_List *changes;
546 } clip;
547
548 const Evas_Object_Func *func;
549
550 void *object_data;
551
552 struct {
553 Evas_Smart *smart;
554 Evas_Object *parent;
555 } smart;
556
557 struct {
558 Eina_List *proxies;
559 void *surface;
560 int w,h;
561 Eina_Bool redraw;
562 } proxy;
563
564#if 0 // filtering disabled
565 Evas_Filter_Info *filter;
566#endif
567
568 Evas_Size_Hints *size_hints;
569
570 int last_mouse_down_counter;
571 int last_mouse_up_counter;
572 int mouse_grabbed;
573
574 int last_event;
575 Evas_Callback_Type last_event_type;
576
577 struct {
578 int in_move, in_resize;
579 } doing;
580
581 unsigned int ref;
582
583 unsigned char delete_me;
584
585 unsigned char recalculate_cycle;
586 Eina_Clist calc_entry;
587
588 Evas_Object_Pointer_Mode pointer_mode : 2;
589
590 Eina_Bool store : 1;
591 Eina_Bool pass_events : 1;
592 Eina_Bool freeze_events : 1;
593 Eina_Bool repeat_events : 1;
594 struct {
595 Eina_Bool pass_events : 1;
596 Eina_Bool pass_events_valid : 1;
597 Eina_Bool freeze_events : 1;
598 Eina_Bool freeze_events_valid : 1;
599 } parent_cache;
600 Eina_Bool restack : 1;
601 Eina_Bool is_active : 1;
602 Eina_Bool precise_is_inside : 1;
603 Eina_Bool is_static_clip : 1;
604
605 Eina_Bool render_pre : 1;
606 Eina_Bool rect_del : 1;
607 Eina_Bool mouse_in : 1;
608 Eina_Bool pre_render_done : 1;
609 Eina_Bool intercepted : 1;
610 Eina_Bool focused : 1;
611 Eina_Bool in_layer : 1;
612 Eina_Bool no_propagate : 1;
613
614 Eina_Bool changed : 1;
615 Eina_Bool changed_move : 1;
616 Eina_Bool changed_move_only : 1;
617 Eina_Bool changed_nomove : 1;
618 Eina_Bool changed_map : 1;
619 Eina_Bool changed_pchange : 1;
620 Eina_Bool del_ref : 1;
621
622 Eina_Bool is_frame : 1;
623};
624
625struct _Evas_Func_Node
626{
627 EINA_INLIST;
628 void (*func) ();
629 void *data;
630 Evas_Callback_Type type;
631 Evas_Callback_Priority priority;
632 unsigned char delete_me : 1;
633};
634
635struct _Evas_Data_Node
636{
637 char *key;
638 void *data;
639};
640
641struct _Evas_Font_Dir
642{
643 Eina_Hash *lookup;
644 Eina_List *fonts;
645 Eina_List *aliases;
646 DATA64 dir_mod_time;
647 DATA64 fonts_dir_mod_time;
648 DATA64 fonts_alias_mod_time;
649};
650
651struct _Evas_Font
652{
653 struct {
654 const char *prop[14];
655 } x;
656 struct {
657 const char *name;
658 } simple;
659 const char *path;
660 char type;
661};
662
663struct _Evas_Font_Alias
664{
665 const char *alias;
666 Evas_Font *fn;
667};
668
669struct _Evas_Font_Description
670{
671 int ref;
672 /* We assume everywhere this is stringshared */
673 const char *name;
674 const char *fallbacks;
675 const char *lang;
676
677 Evas_Font_Slant slant;
678 Evas_Font_Weight weight;
679 Evas_Font_Width width;
680
681 Eina_Bool is_new : 1;
682};
683
684struct _Evas_Object_Func
685{
686 void (*free) (Evas_Object *obj);
687 void (*render) (Evas_Object *obj, void *output, void *context, void *surface, int x, int y);
688 void (*render_pre) (Evas_Object *obj);
689 void (*render_post) (Evas_Object *obj);
690
691 unsigned int (*type_id_get) (Evas_Object *obj);
692 unsigned int (*visual_id_get) (Evas_Object *obj);
693 void *(*engine_data_get) (Evas_Object *obj);
694
695 void (*store) (Evas_Object *obj);
696 void (*unstore) (Evas_Object *obj);
697
698 int (*is_visible) (Evas_Object *obj);
699 int (*was_visible) (Evas_Object *obj);
700
701 int (*is_opaque) (Evas_Object *obj);
702 int (*was_opaque) (Evas_Object *obj);
703
704 int (*is_inside) (Evas_Object *obj, Evas_Coord x, Evas_Coord y);
705 int (*was_inside) (Evas_Object *obj, Evas_Coord x, Evas_Coord y);
706
707 void (*coords_recalc) (Evas_Object *obj);
708
709 void (*scale_update) (Evas_Object *obj);
710
711 int (*has_opaque_rect) (Evas_Object *obj);
712 int (*get_opaque_rect) (Evas_Object *obj, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h);
713
714 int (*can_map) (Evas_Object *obj);
715};
716
717struct _Evas_Func
718{
719 void *(*info) (Evas *e);
720 void (*info_free) (Evas *e, void *info);
721 int (*setup) (Evas *e, void *info);
722
723 void (*output_free) (void *data);
724 void (*output_resize) (void *data, int w, int h);
725 void (*output_tile_size_set) (void *data, int w, int h);
726 void (*output_redraws_rect_add) (void *data, int x, int y, int w, int h);
727 void (*output_redraws_rect_del) (void *data, int x, int y, int w, int h);
728 void (*output_redraws_clear) (void *data);
729 void *(*output_redraws_next_update_get) (void *data, int *x, int *y, int *w, int *h, int *cx, int *cy, int *cw, int *ch);
730 void (*output_redraws_next_update_push) (void *data, void *surface, int x, int y, int w, int h);
731 void (*output_flush) (void *data);
732 void (*output_idle_flush) (void *data);
733 void (*output_dump) (void *data);
734
735 void *(*context_new) (void *data);
736 Eina_Bool (*canvas_alpha_get) (void *data, void *context);
737 void (*context_free) (void *data, void *context);
738 void (*context_clip_set) (void *data, void *context, int x, int y, int w, int h);
739 void (*context_clip_clip) (void *data, void *context, int x, int y, int w, int h);
740 void (*context_clip_unset) (void *data, void *context);
741 int (*context_clip_get) (void *data, void *context, int *x, int *y, int *w, int *h);
742 void (*context_mask_set) (void *data, void *context, void *mask, int x, int y, int w, int h);
743 void (*context_mask_unset) (void *data, void *context);
744 void (*context_color_set) (void *data, void *context, int r, int g, int b, int a);
745 int (*context_color_get) (void *data, void *context, int *r, int *g, int *b, int *a);
746 void (*context_multiplier_set) (void *data, void *context, int r, int g, int b, int a);
747 void (*context_multiplier_unset) (void *data, void *context);
748 int (*context_multiplier_get) (void *data, void *context, int *r, int *g, int *b, int *a);
749 void (*context_cutout_add) (void *data, void *context, int x, int y, int w, int h);
750 void (*context_cutout_clear) (void *data, void *context);
751 void (*context_anti_alias_set) (void *data, void *context, unsigned char aa);
752 unsigned char (*context_anti_alias_get) (void *data, void *context);
753 void (*context_color_interpolation_set) (void *data, void *context, int color_space);
754 int (*context_color_interpolation_get) (void *data, void *context);
755 void (*context_render_op_set) (void *data, void *context, int render_op);
756 int (*context_render_op_get) (void *data, void *context);
757
758 void (*rectangle_draw) (void *data, void *context, void *surface, int x, int y, int w, int h);
759
760 void (*line_draw) (void *data, void *context, void *surface, int x1, int y1, int x2, int y2);
761
762 void *(*polygon_point_add) (void *data, void *context, void *polygon, int x, int y);
763 void *(*polygon_points_clear) (void *data, void *context, void *polygon);
764 void (*polygon_draw) (void *data, void *context, void *surface, void *polygon, int x, int y);
765
766 void *(*image_load) (void *data, const char *file, const char *key, int *error, Evas_Image_Load_Opts *lo);
767 void *(*image_new_from_data) (void *data, int w, int h, DATA32 *image_data, int alpha, int cspace);
768 void *(*image_new_from_copied_data) (void *data, int w, int h, DATA32 *image_data, int alpha, int cspace);
769 void (*image_free) (void *data, void *image);
770 void (*image_size_get) (void *data, void *image, int *w, int *h);
771 void *(*image_size_set) (void *data, void *image, int w, int h);
772 void (*image_stride_get) (void *data, void *image, int *stride);
773 void *(*image_dirty_region) (void *data, void *image, int x, int y, int w, int h);
774 void *(*image_data_get) (void *data, void *image, int to_write, DATA32 **image_data, int *err);
775 void *(*image_data_put) (void *data, void *image, DATA32 *image_data);
776 void (*image_data_preload_request) (void *data, void *image, const void *target);
777 void (*image_data_preload_cancel) (void *data, void *image, const void *target);
778 void *(*image_alpha_set) (void *data, void *image, int has_alpha);
779 int (*image_alpha_get) (void *data, void *image);
780 void *(*image_border_set) (void *data, void *image, int l, int r, int t, int b);
781 void (*image_border_get) (void *data, void *image, int *l, int *r, int *t, int *b);
782 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);
783 char *(*image_comment_get) (void *data, void *image, char *key);
784 char *(*image_format_get) (void *data, void *image);
785 void (*image_colorspace_set) (void *data, void *image, int cspace);
786 int (*image_colorspace_get) (void *data, void *image);
787 Eina_Bool (*image_can_region_get) (void *data, void *image);
788 void (*image_mask_create) (void *data, void *image);
789 void *(*image_native_set) (void *data, void *image, void *native);
790 void *(*image_native_get) (void *data, void *image);
791
792 void (*image_cache_flush) (void *data);
793 void (*image_cache_set) (void *data, int bytes);
794 int (*image_cache_get) (void *data);
795
796 Evas_Font_Set *(*font_load) (void *data, const char *name, int size, Font_Rend_Flags wanted_rend);
797 Evas_Font_Set *(*font_memory_load) (void *data, char *name, int size, const void *fdata, int fdata_size, Font_Rend_Flags wanted_rend);
798 Evas_Font_Set *(*font_add) (void *data, Evas_Font_Set *font, const char *name, int size, Font_Rend_Flags wanted_rend);
799 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);
800 void (*font_free) (void *data, Evas_Font_Set *font);
801 int (*font_ascent_get) (void *data, Evas_Font_Set *font);
802 int (*font_descent_get) (void *data, Evas_Font_Set *font);
803 int (*font_max_ascent_get) (void *data, Evas_Font_Set *font);
804 int (*font_max_descent_get) (void *data, Evas_Font_Set *font);
805 void (*font_string_size_get) (void *data, Evas_Font_Set *font, const Evas_Text_Props *intl_props, int *w, int *h);
806 int (*font_inset_get) (void *data, Evas_Font_Set *font, const Evas_Text_Props *text_props);
807 int (*font_h_advance_get) (void *data, Evas_Font_Set *font, const Evas_Text_Props *intl_props);
808 int (*font_v_advance_get) (void *data, Evas_Font_Set *font, const Evas_Text_Props *intl_props);
809 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);
810 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);
811 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);
812
813 void (*font_cache_flush) (void *data);
814 void (*font_cache_set) (void *data, int bytes);
815 int (*font_cache_get) (void *data);
816
817 /* Engine functions will over time expand from here */
818
819 void (*font_hinting_set) (void *data, Evas_Font_Set *font, int hinting);
820 int (*font_hinting_can_hint) (void *data, int hinting);
821
822/* void (*image_rotation_set) (void *data, void *image); */
823
824 void (*image_scale_hint_set) (void *data, void *image, int hint);
825 int (*image_scale_hint_get) (void *data, void *image);
826 int (*font_last_up_to_pos) (void *data, Evas_Font_Set *font, const Evas_Text_Props *intl_props, int x, int y);
827
828 void (*image_map_draw) (void *data, void *context, void *surface, void *image, int npoints, RGBA_Map_Point *p, int smooth, int level);
829 void *(*image_map_surface_new) (void *data, int w, int h, int alpha);
830 void (*image_map_surface_free) (void *data, void *surface);
831
832 void (*image_content_hint_set) (void *data, void *surface, int hint);
833 int (*image_content_hint_get) (void *data, void *surface);
834 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);
835 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);
836 int (*font_right_inset_get) (void *data, Evas_Font_Set *font, const Evas_Text_Props *text_props);
837
838#if 0 // filtering disabled
839 void (*image_draw_filtered) (void *data, void *context, void *surface, void *image, Evas_Filter_Info *filter);
840 Filtered_Image *(*image_filtered_get) (void *image, uint8_t *key, size_t len);
841 Filtered_Image *(*image_filtered_save) (void *image, void *filtered, uint8_t *key, size_t len);
842 void (*image_filtered_free) (void *image, Filtered_Image *);
843#endif
844
845 /* EFL-GL Glue Layer */
846 void *(*gl_surface_create) (void *data, void *config, int w, int h);
847 int (*gl_surface_destroy) (void *data, void *surface);
848 void *(*gl_context_create) (void *data, void *share_context);
849 int (*gl_context_destroy) (void *data, void *context);
850 int (*gl_make_current) (void *data, void *surface, void *context);
851 void *(*gl_string_query) (void *data, int name);
852 void *(*gl_proc_address_get) (void *data, const char *name);
853 int (*gl_native_surface_get) (void *data, void *surface, void *native_surface);
854 void *(*gl_api_get) (void *data);
855 void (*gl_img_obj_set) (void *data, void *image, int has_alpha);
856
857 int (*image_load_error_get) (void *data, void *image);
858 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);
859
860 /* animated feature */
861 Eina_Bool (*image_animated_get) (void *data, void *image);
862 int (*image_animated_frame_count_get) (void *data, void *image);
863 Evas_Image_Animated_Loop_Hint (*image_animated_loop_type_get) (void *data, void *image);
864 int (*image_animated_loop_count_get) (void *data, void *image);
865 double (*image_animated_frame_duration_get) (void *data, void *image, int start_frame, int frame_num);
866 Eina_Bool (*image_animated_frame_set) (void *data, void *image, int frame_index);
867
868 /* max size query */
869 void (*image_max_size_get) (void *data, int *maxw, int *maxh);
870};
871
872struct _Evas_Image_Load_Func
873{
874 Eina_Bool threadable;
875 Eina_Bool (*file_head) (Image_Entry *ie, const char *file, const char *key, int *error);
876 Eina_Bool (*file_data) (Image_Entry *ie, const char *file, const char *key, int *error);
877 double (*frame_duration) (Image_Entry *ie, const char *file, const int start, const int frame_num);
878 Eina_Bool do_region;
879};
880
881struct _Evas_Image_Save_Func
882{
883 int (*image_save) (RGBA_Image *im, const char *file, const char *key, int quality, int compress);
884};
885
886#ifdef __cplusplus
887extern "C" {
888#endif
889
890Evas_Object *evas_object_new(Evas *e);
891void evas_object_free(Evas_Object *obj, int clean_layer);
892void evas_object_inject(Evas_Object *obj, Evas *e);
893void evas_object_release(Evas_Object *obj, int clean_layer);
894void evas_object_change(Evas_Object *obj);
895void evas_object_clip_changes_clean(Evas_Object *obj);
896void evas_object_render_pre_visible_change(Eina_Array *rects, Evas_Object *obj, int is_v, int was_v);
897void evas_object_render_pre_clipper_change(Eina_Array *rects, Evas_Object *obj);
898void evas_object_render_pre_prev_cur_add(Eina_Array *rects, Evas_Object *obj);
899void evas_object_render_pre_effect_updates(Eina_Array *rects, Evas_Object *obj, int is_v, int was_v);
900void evas_rects_return_difference_rects(Eina_Array *rects, int x, int y, int w, int h, int xx, int yy, int ww, int hh);
901
902void evas_object_clip_dirty(Evas_Object *obj);
903void evas_object_recalc_clippees(Evas_Object *obj);
904Evas_Layer *evas_layer_new(Evas *e);
905void evas_layer_pre_free(Evas_Layer *lay);
906void evas_layer_free_objects(Evas_Layer *lay);
907void evas_layer_clean(Evas *e);
908Evas_Layer *evas_layer_find(Evas *e, short layer_num);
909void evas_layer_add(Evas_Layer *lay);
910void evas_layer_del(Evas_Layer *lay);
911
912int evas_object_was_in_output_rect(Evas_Object *obj, int x, int y, int w, int h);
913
914int evas_object_was_opaque(Evas_Object *obj);
915int evas_object_is_inside(Evas_Object *obj, Evas_Coord x, Evas_Coord y);
916int evas_object_was_inside(Evas_Object *obj, Evas_Coord x, Evas_Coord y);
917int evas_object_clippers_was_visible(Evas_Object *obj);
918void evas_object_clip_across_check(Evas_Object *obj);
919void evas_object_clip_across_clippees_check(Evas_Object *obj);
920void evas_object_mapped_clip_across_mark(Evas_Object *obj);
921void evas_event_callback_call(Evas *e, Evas_Callback_Type type, void *event_info);
922void evas_object_event_callback_call(Evas_Object *obj, Evas_Callback_Type type, void *event_info, int event_id);
923Eina_List *evas_event_objects_event_list(Evas *e, Evas_Object *stop, int x, int y);
924int evas_mem_free(int mem_required);
925int evas_mem_degrade(int mem_required);
926void evas_debug_error(void);
927void evas_debug_input_null(void);
928void evas_debug_magic_null(void);
929void evas_debug_magic_wrong(DATA32 expected, DATA32 supplied);
930void evas_debug_generic(const char *str);
931const char *evas_debug_magic_string_get(DATA32 magic);
932void evas_object_smart_use(Evas_Smart *s);
933void evas_object_smart_unuse(Evas_Smart *s);
934void evas_smart_cb_descriptions_fix(Evas_Smart_Cb_Description_Array *a) EINA_ARG_NONNULL(1);
935Eina_Bool evas_smart_cb_descriptions_resize(Evas_Smart_Cb_Description_Array *a, unsigned int size) EINA_ARG_NONNULL(1);
936const 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;
937
938Eina_Bool _evas_object_image_preloading_get(const Evas_Object *obj);
939void _evas_object_image_preloading_set(Evas_Object *obj, Eina_Bool preloading);
940void _evas_object_image_preloading_check(Evas_Object *obj);
941Evas_Object *_evas_object_image_video_parent_get(Evas_Object *obj);
942void _evas_object_image_video_overlay_show(Evas_Object *obj);
943void _evas_object_image_video_overlay_hide(Evas_Object *obj);
944void evas_object_smart_del(Evas_Object *obj);
945void evas_object_smart_cleanup(Evas_Object *obj);
946void evas_object_smart_member_raise(Evas_Object *member);
947void evas_object_smart_member_lower(Evas_Object *member);
948void evas_object_smart_member_stack_above(Evas_Object *member, Evas_Object *other);
949void evas_object_smart_member_stack_below(Evas_Object *member, Evas_Object *other);
950const Eina_Inlist *evas_object_smart_members_get_direct(const Evas_Object *obj);
951void _evas_object_smart_members_all_del(Evas_Object *obj);
952void evas_call_smarts_calculate(Evas *e);
953void *evas_mem_calloc(int size);
954void _evas_post_event_callback_call(Evas *e);
955void _evas_post_event_callback_free(Evas *e);
956void evas_event_callback_list_post_free(Eina_Inlist **list);
957void evas_object_event_callback_all_del(Evas_Object *obj);
958void evas_object_event_callback_cleanup(Evas_Object *obj);
959void evas_event_callback_all_del(Evas *e);
960void evas_event_callback_cleanup(Evas *e);
961void evas_object_inform_call_show(Evas_Object *obj);
962void evas_object_inform_call_hide(Evas_Object *obj);
963void evas_object_inform_call_move(Evas_Object *obj);
964void evas_object_inform_call_resize(Evas_Object *obj);
965void evas_object_inform_call_restack(Evas_Object *obj);
966void evas_object_inform_call_changed_size_hints(Evas_Object *obj);
967void evas_object_inform_call_image_preloaded(Evas_Object *obj);
968void evas_object_inform_call_image_unloaded(Evas_Object *obj);
969void evas_object_intercept_cleanup(Evas_Object *obj);
970int evas_object_intercept_call_show(Evas_Object *obj);
971int evas_object_intercept_call_hide(Evas_Object *obj);
972int evas_object_intercept_call_move(Evas_Object *obj, Evas_Coord x, Evas_Coord y);
973int evas_object_intercept_call_resize(Evas_Object *obj, Evas_Coord w, Evas_Coord h);
974int evas_object_intercept_call_raise(Evas_Object *obj);
975int evas_object_intercept_call_lower(Evas_Object *obj);
976int evas_object_intercept_call_stack_above(Evas_Object *obj, Evas_Object *above);
977int evas_object_intercept_call_stack_below(Evas_Object *obj, Evas_Object *below);
978int evas_object_intercept_call_layer_set(Evas_Object *obj, int l);
979int evas_object_intercept_call_color_set(Evas_Object *obj, int r, int g, int b, int a);
980int evas_object_intercept_call_clip_set(Evas_Object *obj, Evas_Object *clip);
981int evas_object_intercept_call_clip_unset(Evas_Object *obj);
982void evas_object_grabs_cleanup(Evas_Object *obj);
983void evas_key_grab_free(Evas_Object *obj, const char *keyname, Evas_Modifier_Mask modifiers, Evas_Modifier_Mask not_modifiers);
984void evas_font_dir_cache_free(void);
985const char *evas_font_dir_cache_find(char *dir, char *font);
986Eina_List *evas_font_dir_available_list(const Evas* evas);
987void evas_font_dir_available_list_free(Eina_List *available);
988void evas_font_free(Evas *evas, void *font);
989void evas_fonts_zero_free(Evas *evas);
990void evas_fonts_zero_presure(Evas *evas);
991void evas_font_name_parse(Evas_Font_Description *fdesc, const char *name);
992int evas_font_style_find(const char *start, const char *end, Evas_Font_Style style);
993Evas_Font_Description *evas_font_desc_new(void);
994Evas_Font_Description *evas_font_desc_dup(const Evas_Font_Description *fdesc);
995void evas_font_desc_unref(Evas_Font_Description *fdesc);
996int evas_font_desc_cmp(const Evas_Font_Description *a, const Evas_Font_Description *b);
997Evas_Font_Description *evas_font_desc_ref(Evas_Font_Description *fdesc);
998void * evas_font_load(Evas *evas, Evas_Font_Description *fdesc, const char *source, Evas_Font_Size size);
999void evas_font_load_hinting_set(Evas *evas, void *font, int hinting);
1000void evas_object_smart_member_cache_invalidate(Evas_Object *obj, Eina_Bool pass_events, Eina_Bool freeze_events);
1001void evas_text_style_pad_get(Evas_Text_Style_Type style, int *l, int *r, int *t, int *b);
1002void _evas_object_text_rehint(Evas_Object *obj);
1003void _evas_object_textblock_rehint(Evas_Object *obj);
1004
1005extern int _evas_alloc_error;
1006extern int _evas_event_counter;
1007
1008struct _Evas_Imaging_Image
1009{
1010 RGBA_Image *image;
1011};
1012
1013struct _Evas_Imaging_Font
1014{
1015 RGBA_Font *font;
1016};
1017
1018int evas_async_events_init(void);
1019int evas_async_events_shutdown(void);
1020int evas_async_target_del(const void *target);
1021
1022void _evas_preload_thread_init(void);
1023void _evas_preload_thread_shutdown(void);
1024Evas_Preload_Pthread *evas_preload_thread_run(void (*func_heavy)(void *data),
1025 void (*func_end)(void *data),
1026 void (*func_cancel)(void *data),
1027 const void *data);
1028Eina_Bool evas_preload_thread_cancel(Evas_Preload_Pthread *thread);
1029
1030void _evas_walk(Evas *e);
1031void _evas_unwalk(Evas *e);
1032
1033// expose for use in engines
1034EAPI int _evas_module_engine_inherit(Evas_Func *funcs, char *name);
1035EAPI const char *_evas_module_libdir_get(void);
1036
1037Eina_Bool evas_render_mapped(Evas *e, Evas_Object *obj,
1038 void *context, void *surface,
1039 int off_x, int off_y, int mapped,
1040 int ecx, int ecy, int ecw, int ech);
1041void evas_render_invalidate(Evas *e);
1042void evas_render_object_recalc(Evas_Object *obj);
1043
1044Eina_Bool evas_map_inside_get(const Evas_Map *m, Evas_Coord x, Evas_Coord y);
1045Eina_Bool evas_map_coords_get(const Evas_Map *m, Evas_Coord x, Evas_Coord y, Evas_Coord *mx, Evas_Coord *my, int grab);
1046
1047Eina_List *evas_module_engine_list(void);
1048
1049/* for updating touch point list */
1050void _evas_touch_point_append(Evas *e, int id, Evas_Coord x, Evas_Coord y);
1051void _evas_touch_point_update(Evas *e, int id, Evas_Coord x, Evas_Coord y, Evas_Touch_Point_State state);
1052void _evas_touch_point_remove(Evas *e, int id);
1053
1054/****************************************************************************/
1055/*****************************************/
1056/********************/
1057#define MPOOL 1
1058
1059#ifdef MPOOL
1060typedef struct _Evas_Mempool Evas_Mempool;
1061
1062struct _Evas_Mempool
1063{
1064 int count;
1065 int num_allocs;
1066 int num_frees;
1067 Eina_Mempool *mp;
1068};
1069# define EVAS_MEMPOOL(x) \
1070 static Evas_Mempool x = {0, 0, 0, NULL}
1071# define EVAS_MEMPOOL_INIT(x, nam, siz, cnt, ret) \
1072 do { \
1073 if (!x.mp) { \
1074 x.mp = eina_mempool_add("chained_mempool", nam, NULL, sizeof(siz), cnt); \
1075 if (!x.mp) { \
1076 return ret; \
1077 } \
1078 } \
1079 } while (0)
1080# define EVAS_MEMPOOL_ALLOC(x, siz) \
1081 eina_mempool_malloc(x.mp, sizeof(siz))
1082# define EVAS_MEMPOOL_PREP(x, p, siz) \
1083 do { \
1084 x.count++; \
1085 x.num_allocs++; \
1086 memset(p, 0, sizeof(siz)); \
1087 } while (0)
1088# define EVAS_MEMPOOL_FREE(x, p) \
1089 do { \
1090 eina_mempool_free(x.mp, p); \
1091 x.count--; \
1092 x.num_frees++; \
1093 if (x.count <= 0) { \
1094 eina_mempool_del(x.mp); \
1095 x.mp = NULL; \
1096 x.count = 0; \
1097 } \
1098 } while (0)
1099#else
1100# define EVAS_MEMPOOL(x)
1101# define EVAS_MEMPOOL_INIT(x, nam, siz, cnt, ret)
1102# define EVAS_MEMPOOL_PREP(x, p, siz)
1103# define EVAS_MEMPOOL_ALLOC(x, siz) \
1104 calloc(1, sizeof(siz))
1105# define EVAS_MEMPOOL_FREE(x, p) \
1106 free(p)
1107#endif
1108/********************/
1109/*****************************************/
1110/****************************************************************************/
1111
1112#define EVAS_API_OVERRIDE(func, api, prefix) \
1113 (api)->func = prefix##func
1114#define EVAS_API_RESET(func, api) \
1115 (api)->func = NULL
1116
1117#include "evas_inline.x"
1118
1119#ifdef __cplusplus
1120}
1121#endif
1122#endif