evas-1.7.9/0000775000175000017500000000000012234557320007474 500000000000000evas-1.7.9/data/0000775000175000017500000000000012234557320010405 500000000000000evas-1.7.9/data/Makefile.in0000664000175000017500000005230012234557300012370 00000000000000# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = data DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/efl_attribute.m4 \ $(top_srcdir)/m4/efl_coverage.m4 \ $(top_srcdir)/m4/efl_doxygen.m4 \ $(top_srcdir)/m4/efl_fnmatch.m4 \ $(top_srcdir)/m4/efl_path_max.m4 \ $(top_srcdir)/m4/efl_shm_open.m4 $(top_srcdir)/m4/efl_tests.m4 \ $(top_srcdir)/m4/evas_check_engine.m4 \ $(top_srcdir)/m4/evas_check_loader.m4 \ $(top_srcdir)/m4/evas_converter.m4 \ $(top_srcdir)/m4/evas_dither.m4 \ $(top_srcdir)/m4/evas_scaler.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(filesdir)" DATA = $(files_DATA) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHECK_CFLAGS = @CHECK_CFLAGS@ CHECK_LIBS = @CHECK_LIBS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@ DIRECTFB_LIBS = @DIRECTFB_LIBS@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ ECORE_EVAS_CFLAGS = @ECORE_EVAS_CFLAGS@ ECORE_EVAS_LIBS = @ECORE_EVAS_LIBS@ EDB_CFLAGS = @EDB_CFLAGS@ EDB_LIBS = @EDB_LIBS@ EDJE_CFLAGS = @EDJE_CFLAGS@ EDJE_LIBS = @EDJE_LIBS@ EET_CFLAGS = @EET_CFLAGS@ EET_LIBS = @EET_LIBS@ EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@ EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@ EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@ EFL_SHM_OPEN_LIBS = @EFL_SHM_OPEN_LIBS@ EGREP = @EGREP@ EINA_CFLAGS = @EINA_CFLAGS@ EINA_LIBS = @EINA_LIBS@ EVAS_CFLAGS = @EVAS_CFLAGS@ EVAS_GENERAL_CFLAGS = @EVAS_GENERAL_CFLAGS@ EVAS_GENERAL_LIBS = @EVAS_GENERAL_LIBS@ EVAS_LIBS = @EVAS_LIBS@ EVAS_SSE3_CFLAGS = @EVAS_SSE3_CFLAGS@ EVIL_CFLAGS = @EVIL_CFLAGS@ EVIL_LIBS = @EVIL_LIBS@ EXEEXT = @EXEEXT@ EXOTIC_CFLAGS = @EXOTIC_CFLAGS@ EXOTIC_LIBS = @EXOTIC_LIBS@ FGREP = @FGREP@ FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@ FONTCONFIG_LIBS = @FONTCONFIG_LIBS@ FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ FREETYPE_LIBS = @FREETYPE_LIBS@ FRIBIDI_CFLAGS = @FRIBIDI_CFLAGS@ FRIBIDI_LIBS = @FRIBIDI_LIBS@ GL_EET_CFLAGS = @GL_EET_CFLAGS@ GL_EET_LIBS = @GL_EET_LIBS@ GREP = @GREP@ HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@ HARFBUZZ_LIBS = @HARFBUZZ_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LINEBREAK_CFLAGS = @LINEBREAK_CFLAGS@ LINEBREAK_LIBS = @LINEBREAK_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MODULE_ARCH = @MODULE_ARCH@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ SDL_CFLAGS = @SDL_CFLAGS@ SDL_LIBS = @SDL_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ SVG_CFLAGS = @SVG_CFLAGS@ SVG_LIBS = @SVG_LIBS@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ XCB_CFLAGS = @XCB_CFLAGS@ XCB_GL_CFLAGS = @XCB_GL_CFLAGS@ XCB_GL_LIBS = @XCB_GL_LIBS@ XCB_LIBS = @XCB_LIBS@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_ct_OBJC = @ac_ct_OBJC@ altivec_cflags = @altivec_cflags@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ dlopen_libs = @dlopen_libs@ docdir = @docdir@ dvidir = @dvidir@ edje_cc = @edje_cc@ efl_doxygen = @efl_doxygen@ efl_have_doxygen = @efl_have_doxygen@ evas_engine_buffer_cflags = @evas_engine_buffer_cflags@ evas_engine_buffer_libs = @evas_engine_buffer_libs@ evas_engine_direct3d_cflags = @evas_engine_direct3d_cflags@ evas_engine_direct3d_libs = @evas_engine_direct3d_libs@ evas_engine_directfb_cflags = @evas_engine_directfb_cflags@ evas_engine_directfb_libs = @evas_engine_directfb_libs@ evas_engine_fb_cflags = @evas_engine_fb_cflags@ evas_engine_fb_libs = @evas_engine_fb_libs@ evas_engine_gl_cocoa_cflags = @evas_engine_gl_cocoa_cflags@ evas_engine_gl_cocoa_libs = @evas_engine_gl_cocoa_libs@ evas_engine_gl_common_libs = @evas_engine_gl_common_libs@ evas_engine_gl_sdl_cflags = @evas_engine_gl_sdl_cflags@ evas_engine_gl_sdl_libs = @evas_engine_gl_sdl_libs@ evas_engine_gl_xcb_cflags = @evas_engine_gl_xcb_cflags@ evas_engine_gl_xcb_libs = @evas_engine_gl_xcb_libs@ evas_engine_gl_xlib_cflags = @evas_engine_gl_xlib_cflags@ evas_engine_gl_xlib_libs = @evas_engine_gl_xlib_libs@ evas_engine_psl1ght_cflags = @evas_engine_psl1ght_cflags@ evas_engine_psl1ght_libs = @evas_engine_psl1ght_libs@ evas_engine_software_16_sdl_cflags = @evas_engine_software_16_sdl_cflags@ evas_engine_software_16_sdl_libs = @evas_engine_software_16_sdl_libs@ evas_engine_software_16_wince_cflags = @evas_engine_software_16_wince_cflags@ evas_engine_software_16_wince_libs = @evas_engine_software_16_wince_libs@ evas_engine_software_16_x11_cflags = @evas_engine_software_16_x11_cflags@ evas_engine_software_16_x11_libs = @evas_engine_software_16_x11_libs@ evas_engine_software_8_x11_cflags = @evas_engine_software_8_x11_cflags@ evas_engine_software_8_x11_libs = @evas_engine_software_8_x11_libs@ evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@ evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@ evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@ evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ evas_image_loader_edb_libs = @evas_image_loader_edb_libs@ evas_image_loader_eet_cflags = @evas_image_loader_eet_cflags@ evas_image_loader_eet_libs = @evas_image_loader_eet_libs@ evas_image_loader_generic_cflags = @evas_image_loader_generic_cflags@ evas_image_loader_generic_libs = @evas_image_loader_generic_libs@ evas_image_loader_gif_cflags = @evas_image_loader_gif_cflags@ evas_image_loader_gif_libs = @evas_image_loader_gif_libs@ evas_image_loader_ico_cflags = @evas_image_loader_ico_cflags@ evas_image_loader_ico_libs = @evas_image_loader_ico_libs@ evas_image_loader_jpeg_cflags = @evas_image_loader_jpeg_cflags@ evas_image_loader_jpeg_libs = @evas_image_loader_jpeg_libs@ evas_image_loader_pmaps_cflags = @evas_image_loader_pmaps_cflags@ evas_image_loader_pmaps_libs = @evas_image_loader_pmaps_libs@ evas_image_loader_png_cflags = @evas_image_loader_png_cflags@ evas_image_loader_png_libs = @evas_image_loader_png_libs@ evas_image_loader_psd_cflags = @evas_image_loader_psd_cflags@ evas_image_loader_psd_libs = @evas_image_loader_psd_libs@ evas_image_loader_svg_cflags = @evas_image_loader_svg_cflags@ evas_image_loader_svg_libs = @evas_image_loader_svg_libs@ evas_image_loader_tga_cflags = @evas_image_loader_tga_cflags@ evas_image_loader_tga_libs = @evas_image_loader_tga_libs@ evas_image_loader_tiff_cflags = @evas_image_loader_tiff_cflags@ evas_image_loader_tiff_libs = @evas_image_loader_tiff_libs@ evas_image_loader_wbmp_cflags = @evas_image_loader_wbmp_cflags@ evas_image_loader_wbmp_libs = @evas_image_loader_wbmp_libs@ evas_image_loader_xpm_cflags = @evas_image_loader_xpm_cflags@ evas_image_loader_xpm_libs = @evas_image_loader_xpm_libs@ exec_prefix = @exec_prefix@ have_evas_engine_gl_x11 = @have_evas_engine_gl_x11@ have_evas_engine_gl_xcb = @have_evas_engine_gl_xcb@ have_evas_engine_gl_xlib = @have_evas_engine_gl_xlib@ have_evas_engine_software_x11 = @have_evas_engine_software_x11@ have_evas_engine_software_xcb = @have_evas_engine_software_xcb@ have_evas_engine_software_xlib = @have_evas_engine_software_xlib@ have_lcov = @have_lcov@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_enable_auto_import = @lt_enable_auto_import@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgconfig_requires_private = @pkgconfig_requires_private@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pthread_cflags = @pthread_cflags@ pthread_libs = @pthread_libs@ release_info = @release_info@ requirement_evas = @requirement_evas@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ shm_open_libs = @shm_open_libs@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ version_info = @version_info@ MAINTAINERCLEANFILES = Makefile.in filesdir = $(datadir)/evas files_DATA = checkme EXTRA_DIST = $(files_DATA) all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu data/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu data/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-filesDATA: $(files_DATA) @$(NORMAL_INSTALL) @list='$(files_DATA)'; test -n "$(filesdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(filesdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(filesdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(filesdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(filesdir)" || exit $$?; \ done uninstall-filesDATA: @$(NORMAL_UNINSTALL) @list='$(files_DATA)'; test -n "$(filesdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(filesdir)'; $(am__uninstall_files_from_dir) tags TAGS: ctags CTAGS: cscope cscopelist: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(DATA) installdirs: for dir in "$(DESTDIR)$(filesdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-filesDATA install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-filesDATA .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ cscopelist-am ctags-am distclean distclean-generic \ distclean-libtool distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-filesDATA \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ ps ps-am tags-am uninstall uninstall-am uninstall-filesDATA # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: evas-1.7.9/data/checkme0000664000175000017500000000011212175475547011657 00000000000000This is just a test file used to help evas determine its prefix location. evas-1.7.9/data/Makefile.am0000664000175000017500000000016012175475547012374 00000000000000MAINTAINERCLEANFILES = Makefile.in filesdir = $(datadir)/evas files_DATA = checkme EXTRA_DIST = $(files_DATA) evas-1.7.9/Makefile.in0000664000175000017500000012660212234557300011466 00000000000000# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ @BUILD_ENGINE_SOFTWARE_X11_TRUE@am__append_1 = evas-software-x11.pc @BUILD_ENGINE_SOFTWARE_16_X11_TRUE@am__append_2 = evas-software-16-x11.pc @BUILD_ENGINE_SOFTWARE_8_X11_TRUE@am__append_3 = evas-software-8-x11.pc @BUILD_ENGINE_DIRECTFB_TRUE@am__append_4 = evas-directfb.pc @BUILD_ENGINE_FB_TRUE@am__append_5 = evas-fb.pc @BUILD_ENGINE_BUFFER_TRUE@am__append_6 = evas-software-buffer.pc @BUILD_ENGINE_GL_X11_TRUE@am__append_7 = evas-opengl-x11.pc @BUILD_ENGINE_GL_SDL_TRUE@am__append_8 = evas-opengl-sdl.pc @BUILD_ENGINE_GL_COCOA_TRUE@am__append_9 = evas-opengl-cocoa.pc @BUILD_ENGINE_SOFTWARE_GDI_TRUE@am__append_10 = evas-software-gdi.pc @BUILD_ENGINE_SOFTWARE_DDRAW_TRUE@am__append_11 = evas-software-ddraw.pc @BUILD_ENGINE_DIRECT3D_TRUE@am__append_12 = evas-direct3d.pc @BUILD_ENGINE_SOFTWARE_16_WINCE_TRUE@am__append_13 = evas-software-16-wince.pc @BUILD_ENGINE_SOFTWARE_16_SDL_TRUE@am__append_14 = evas-software-sdl.pc @BUILD_ENGINE_PSL1GHT_TRUE@am__append_15 = evas-psl1ght.pc @BUILD_ENGINE_WAYLAND_SHM_TRUE@am__append_16 = evas-wayland-shm.pc @BUILD_ENGINE_WAYLAND_EGL_TRUE@am__append_17 = evas-wayland-egl.pc subdir = . DIST_COMMON = INSTALL NEWS README AUTHORS ChangeLog \ $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/configure $(am__configure_deps) \ $(srcdir)/config.h.in $(srcdir)/evas-directfb.pc.in \ $(srcdir)/evas-fb.pc.in $(srcdir)/evas-opengl-x11.pc.in \ $(srcdir)/evas-opengl-sdl.pc.in \ $(srcdir)/evas-opengl-cocoa.pc.in \ $(srcdir)/evas-software-buffer.pc.in \ $(srcdir)/evas-software-x11.pc.in \ $(srcdir)/evas-software-8-x11.pc.in \ $(srcdir)/evas-software-16-x11.pc.in \ $(srcdir)/evas-software-gdi.pc.in \ $(srcdir)/evas-software-ddraw.pc.in \ $(srcdir)/evas-direct3d.pc.in \ $(srcdir)/evas-software-16-wince.pc.in \ $(srcdir)/evas-software-sdl.pc.in $(srcdir)/evas-psl1ght.pc.in \ $(srcdir)/evas-wayland-shm.pc.in \ $(srcdir)/evas-wayland-egl.pc.in $(srcdir)/evas.pc.in \ $(srcdir)/evas.spec.in ABOUT-NLS COPYING config.guess \ config.sub depcomp install-sh missing ltmain.sh ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/efl_attribute.m4 \ $(top_srcdir)/m4/efl_coverage.m4 \ $(top_srcdir)/m4/efl_doxygen.m4 \ $(top_srcdir)/m4/efl_fnmatch.m4 \ $(top_srcdir)/m4/efl_path_max.m4 \ $(top_srcdir)/m4/efl_shm_open.m4 $(top_srcdir)/m4/efl_tests.m4 \ $(top_srcdir)/m4/evas_check_engine.m4 \ $(top_srcdir)/m4/evas_check_loader.m4 \ $(top_srcdir)/m4/evas_converter.m4 \ $(top_srcdir)/m4/evas_dither.m4 \ $(top_srcdir)/m4/evas_scaler.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(install_sh) -d CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = evas-directfb.pc evas-fb.pc evas-opengl-x11.pc \ evas-opengl-sdl.pc evas-opengl-cocoa.pc \ evas-software-buffer.pc evas-software-x11.pc \ evas-software-8-x11.pc evas-software-16-x11.pc \ evas-software-gdi.pc evas-software-ddraw.pc evas-direct3d.pc \ evas-software-16-wince.pc evas-software-sdl.pc evas-psl1ght.pc \ evas-wayland-shm.pc evas-wayland-egl.pc evas.pc evas.spec CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(pkgconfigdir)" SCRIPTS = $(bin_SCRIPTS) AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-recursive dvi-recursive html-recursive info-recursive \ install-data-recursive install-dvi-recursive \ install-exec-recursive install-html-recursive \ install-info-recursive install-pdf-recursive \ install-ps-recursive install-recursive installcheck-recursive \ installdirs-recursive pdf-recursive ps-recursive \ tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac DATA = $(pkgconfig_DATA) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ $(RECURSIVE_TARGETS) \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ cscope distdir dist dist-all distcheck am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \ $(LISP)config.h.in # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags CSCOPE = cscope DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ if test -d "$(distdir)"; then \ find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ && rm -rf "$(distdir)" \ || { sleep 5 && rm -rf "$(distdir)"; }; \ else :; fi am__post_remove_distdir = $(am__remove_distdir) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.bz2 GZIP_ENV = --best DIST_TARGETS = dist-bzip2 dist-gzip distuninstallcheck_listfiles = find . -type f -print am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHECK_CFLAGS = @CHECK_CFLAGS@ CHECK_LIBS = @CHECK_LIBS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@ DIRECTFB_LIBS = @DIRECTFB_LIBS@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ ECORE_EVAS_CFLAGS = @ECORE_EVAS_CFLAGS@ ECORE_EVAS_LIBS = @ECORE_EVAS_LIBS@ EDB_CFLAGS = @EDB_CFLAGS@ EDB_LIBS = @EDB_LIBS@ EDJE_CFLAGS = @EDJE_CFLAGS@ EDJE_LIBS = @EDJE_LIBS@ EET_CFLAGS = @EET_CFLAGS@ EET_LIBS = @EET_LIBS@ EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@ EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@ EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@ EFL_SHM_OPEN_LIBS = @EFL_SHM_OPEN_LIBS@ EGREP = @EGREP@ EINA_CFLAGS = @EINA_CFLAGS@ EINA_LIBS = @EINA_LIBS@ EVAS_CFLAGS = @EVAS_CFLAGS@ EVAS_GENERAL_CFLAGS = @EVAS_GENERAL_CFLAGS@ EVAS_GENERAL_LIBS = @EVAS_GENERAL_LIBS@ EVAS_LIBS = @EVAS_LIBS@ EVAS_SSE3_CFLAGS = @EVAS_SSE3_CFLAGS@ EVIL_CFLAGS = @EVIL_CFLAGS@ EVIL_LIBS = @EVIL_LIBS@ EXEEXT = @EXEEXT@ EXOTIC_CFLAGS = @EXOTIC_CFLAGS@ EXOTIC_LIBS = @EXOTIC_LIBS@ FGREP = @FGREP@ FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@ FONTCONFIG_LIBS = @FONTCONFIG_LIBS@ FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ FREETYPE_LIBS = @FREETYPE_LIBS@ FRIBIDI_CFLAGS = @FRIBIDI_CFLAGS@ FRIBIDI_LIBS = @FRIBIDI_LIBS@ GL_EET_CFLAGS = @GL_EET_CFLAGS@ GL_EET_LIBS = @GL_EET_LIBS@ GREP = @GREP@ HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@ HARFBUZZ_LIBS = @HARFBUZZ_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LINEBREAK_CFLAGS = @LINEBREAK_CFLAGS@ LINEBREAK_LIBS = @LINEBREAK_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MODULE_ARCH = @MODULE_ARCH@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ SDL_CFLAGS = @SDL_CFLAGS@ SDL_LIBS = @SDL_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ SVG_CFLAGS = @SVG_CFLAGS@ SVG_LIBS = @SVG_LIBS@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ XCB_CFLAGS = @XCB_CFLAGS@ XCB_GL_CFLAGS = @XCB_GL_CFLAGS@ XCB_GL_LIBS = @XCB_GL_LIBS@ XCB_LIBS = @XCB_LIBS@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_ct_OBJC = @ac_ct_OBJC@ altivec_cflags = @altivec_cflags@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ dlopen_libs = @dlopen_libs@ docdir = @docdir@ dvidir = @dvidir@ edje_cc = @edje_cc@ efl_doxygen = @efl_doxygen@ efl_have_doxygen = @efl_have_doxygen@ evas_engine_buffer_cflags = @evas_engine_buffer_cflags@ evas_engine_buffer_libs = @evas_engine_buffer_libs@ evas_engine_direct3d_cflags = @evas_engine_direct3d_cflags@ evas_engine_direct3d_libs = @evas_engine_direct3d_libs@ evas_engine_directfb_cflags = @evas_engine_directfb_cflags@ evas_engine_directfb_libs = @evas_engine_directfb_libs@ evas_engine_fb_cflags = @evas_engine_fb_cflags@ evas_engine_fb_libs = @evas_engine_fb_libs@ evas_engine_gl_cocoa_cflags = @evas_engine_gl_cocoa_cflags@ evas_engine_gl_cocoa_libs = @evas_engine_gl_cocoa_libs@ evas_engine_gl_common_libs = @evas_engine_gl_common_libs@ evas_engine_gl_sdl_cflags = @evas_engine_gl_sdl_cflags@ evas_engine_gl_sdl_libs = @evas_engine_gl_sdl_libs@ evas_engine_gl_xcb_cflags = @evas_engine_gl_xcb_cflags@ evas_engine_gl_xcb_libs = @evas_engine_gl_xcb_libs@ evas_engine_gl_xlib_cflags = @evas_engine_gl_xlib_cflags@ evas_engine_gl_xlib_libs = @evas_engine_gl_xlib_libs@ evas_engine_psl1ght_cflags = @evas_engine_psl1ght_cflags@ evas_engine_psl1ght_libs = @evas_engine_psl1ght_libs@ evas_engine_software_16_sdl_cflags = @evas_engine_software_16_sdl_cflags@ evas_engine_software_16_sdl_libs = @evas_engine_software_16_sdl_libs@ evas_engine_software_16_wince_cflags = @evas_engine_software_16_wince_cflags@ evas_engine_software_16_wince_libs = @evas_engine_software_16_wince_libs@ evas_engine_software_16_x11_cflags = @evas_engine_software_16_x11_cflags@ evas_engine_software_16_x11_libs = @evas_engine_software_16_x11_libs@ evas_engine_software_8_x11_cflags = @evas_engine_software_8_x11_cflags@ evas_engine_software_8_x11_libs = @evas_engine_software_8_x11_libs@ evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@ evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@ evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@ evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ evas_image_loader_edb_libs = @evas_image_loader_edb_libs@ evas_image_loader_eet_cflags = @evas_image_loader_eet_cflags@ evas_image_loader_eet_libs = @evas_image_loader_eet_libs@ evas_image_loader_generic_cflags = @evas_image_loader_generic_cflags@ evas_image_loader_generic_libs = @evas_image_loader_generic_libs@ evas_image_loader_gif_cflags = @evas_image_loader_gif_cflags@ evas_image_loader_gif_libs = @evas_image_loader_gif_libs@ evas_image_loader_ico_cflags = @evas_image_loader_ico_cflags@ evas_image_loader_ico_libs = @evas_image_loader_ico_libs@ evas_image_loader_jpeg_cflags = @evas_image_loader_jpeg_cflags@ evas_image_loader_jpeg_libs = @evas_image_loader_jpeg_libs@ evas_image_loader_pmaps_cflags = @evas_image_loader_pmaps_cflags@ evas_image_loader_pmaps_libs = @evas_image_loader_pmaps_libs@ evas_image_loader_png_cflags = @evas_image_loader_png_cflags@ evas_image_loader_png_libs = @evas_image_loader_png_libs@ evas_image_loader_psd_cflags = @evas_image_loader_psd_cflags@ evas_image_loader_psd_libs = @evas_image_loader_psd_libs@ evas_image_loader_svg_cflags = @evas_image_loader_svg_cflags@ evas_image_loader_svg_libs = @evas_image_loader_svg_libs@ evas_image_loader_tga_cflags = @evas_image_loader_tga_cflags@ evas_image_loader_tga_libs = @evas_image_loader_tga_libs@ evas_image_loader_tiff_cflags = @evas_image_loader_tiff_cflags@ evas_image_loader_tiff_libs = @evas_image_loader_tiff_libs@ evas_image_loader_wbmp_cflags = @evas_image_loader_wbmp_cflags@ evas_image_loader_wbmp_libs = @evas_image_loader_wbmp_libs@ evas_image_loader_xpm_cflags = @evas_image_loader_xpm_cflags@ evas_image_loader_xpm_libs = @evas_image_loader_xpm_libs@ exec_prefix = @exec_prefix@ have_evas_engine_gl_x11 = @have_evas_engine_gl_x11@ have_evas_engine_gl_xcb = @have_evas_engine_gl_xcb@ have_evas_engine_gl_xlib = @have_evas_engine_gl_xlib@ have_evas_engine_software_x11 = @have_evas_engine_software_x11@ have_evas_engine_software_xcb = @have_evas_engine_software_xcb@ have_evas_engine_software_xlib = @have_evas_engine_software_xlib@ have_lcov = @have_lcov@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_enable_auto_import = @lt_enable_auto_import@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgconfig_requires_private = @pkgconfig_requires_private@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pthread_cflags = @pthread_cflags@ pthread_libs = @pthread_libs@ release_info = @release_info@ requirement_evas = @requirement_evas@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ shm_open_libs = @shm_open_libs@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ version_info = @version_info@ ACLOCAL_AMFLAGS = -I m4 SUBDIRS = src doc data MAINTAINERCLEANFILES = \ Makefile.in \ aclocal.m4 \ config.guess \ config.h.in \ config.h.in~ \ config.sub \ configure \ depcomp \ install-sh \ ltmain.sh \ missing \ $(PACKAGE_TARNAME)-$(PACKAGE_VERSION).tar.gz \ $(PACKAGE_TARNAME)-$(PACKAGE_VERSION).tar.bz2 \ $(PACKAGE_TARNAME)-$(PACKAGE_VERSION)-doc.tar.bz2 \ m4/libtool.m4 \ m4/lt~obsolete.m4 \ m4/ltoptions.m4 \ m4/ltsugar.m4 \ m4/ltversion.m4 bin_SCRIPTS = EXTRA_DIST = \ AUTHORS \ COPYING \ autogen.sh \ evas.pc.in \ evas-directfb.pc.in \ evas-fb.pc.in \ evas-opengl-x11.pc.in \ evas-opengl-sdl.pc.in \ evas-software-buffer.pc.in \ evas-software-x11.pc.in \ evas-software-16-x11.pc.in \ evas-software-8-x11.pc.in \ evas-software-gdi.pc.in \ evas-software-ddraw.pc.in \ evas-direct3d.pc.in \ evas-software-16-wince.pc.in \ evas-psl1ght.pc.in \ evas-wayland-shm.pc.in \ evas-wayland-egl.pc.in \ evas.spec.in \ evas.spec \ m4/efl_attribute.m4 \ m4/efl_coverage.m4 \ m4/efl_doxygen.m4 \ m4/efl_fnmatch.m4 \ m4/efl_path_max.m4 \ m4/efl_pthread.m4 \ m4/efl_shm_open.m4 \ m4/efl_tests.m4 \ m4/evas_check_engine.m4 \ m4/evas_check_loader.m4 \ m4/evas_converter.m4 \ m4/evas_dither.m4 \ m4/evas_scaler.m4 pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = evas.pc $(am__append_1) $(am__append_2) \ $(am__append_3) $(am__append_4) $(am__append_5) \ $(am__append_6) $(am__append_7) $(am__append_8) \ $(am__append_9) $(am__append_10) $(am__append_11) \ $(am__append_12) $(am__append_13) $(am__append_14) \ $(am__append_15) $(am__append_16) $(am__append_17) all: config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive .SUFFIXES: am--refresh: Makefile @: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ echo ' cd $(srcdir) && $(AUTOMAKE) --gnu'; \ $(am__cd) $(srcdir) && $(AUTOMAKE) --gnu \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ echo ' $(SHELL) ./config.status'; \ $(SHELL) ./config.status;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(top_srcdir)/configure: $(am__configure_deps) $(am__cd) $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): $(am__aclocal_m4_deps) $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) $(am__aclocal_m4_deps): config.h: stamp-h1 @if test ! -f $@; then rm -f stamp-h1; else :; fi @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) stamp-h1; else :; fi stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status @rm -f stamp-h1 cd $(top_builddir) && $(SHELL) ./config.status config.h $(srcdir)/config.h.in: $(am__configure_deps) ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) rm -f stamp-h1 touch $@ distclean-hdr: -rm -f config.h stamp-h1 evas-directfb.pc: $(top_builddir)/config.status $(srcdir)/evas-directfb.pc.in cd $(top_builddir) && $(SHELL) ./config.status $@ evas-fb.pc: $(top_builddir)/config.status $(srcdir)/evas-fb.pc.in cd $(top_builddir) && $(SHELL) ./config.status $@ evas-opengl-x11.pc: $(top_builddir)/config.status $(srcdir)/evas-opengl-x11.pc.in cd $(top_builddir) && $(SHELL) ./config.status $@ evas-opengl-sdl.pc: $(top_builddir)/config.status $(srcdir)/evas-opengl-sdl.pc.in cd $(top_builddir) && $(SHELL) ./config.status $@ evas-opengl-cocoa.pc: $(top_builddir)/config.status $(srcdir)/evas-opengl-cocoa.pc.in cd $(top_builddir) && $(SHELL) ./config.status $@ evas-software-buffer.pc: $(top_builddir)/config.status $(srcdir)/evas-software-buffer.pc.in cd $(top_builddir) && $(SHELL) ./config.status $@ evas-software-x11.pc: $(top_builddir)/config.status $(srcdir)/evas-software-x11.pc.in cd $(top_builddir) && $(SHELL) ./config.status $@ evas-software-8-x11.pc: $(top_builddir)/config.status $(srcdir)/evas-software-8-x11.pc.in cd $(top_builddir) && $(SHELL) ./config.status $@ evas-software-16-x11.pc: $(top_builddir)/config.status $(srcdir)/evas-software-16-x11.pc.in cd $(top_builddir) && $(SHELL) ./config.status $@ evas-software-gdi.pc: $(top_builddir)/config.status $(srcdir)/evas-software-gdi.pc.in cd $(top_builddir) && $(SHELL) ./config.status $@ evas-software-ddraw.pc: $(top_builddir)/config.status $(srcdir)/evas-software-ddraw.pc.in cd $(top_builddir) && $(SHELL) ./config.status $@ evas-direct3d.pc: $(top_builddir)/config.status $(srcdir)/evas-direct3d.pc.in cd $(top_builddir) && $(SHELL) ./config.status $@ evas-software-16-wince.pc: $(top_builddir)/config.status $(srcdir)/evas-software-16-wince.pc.in cd $(top_builddir) && $(SHELL) ./config.status $@ evas-software-sdl.pc: $(top_builddir)/config.status $(srcdir)/evas-software-sdl.pc.in cd $(top_builddir) && $(SHELL) ./config.status $@ evas-psl1ght.pc: $(top_builddir)/config.status $(srcdir)/evas-psl1ght.pc.in cd $(top_builddir) && $(SHELL) ./config.status $@ evas-wayland-shm.pc: $(top_builddir)/config.status $(srcdir)/evas-wayland-shm.pc.in cd $(top_builddir) && $(SHELL) ./config.status $@ evas-wayland-egl.pc: $(top_builddir)/config.status $(srcdir)/evas-wayland-egl.pc.in cd $(top_builddir) && $(SHELL) ./config.status $@ evas.pc: $(top_builddir)/config.status $(srcdir)/evas.pc.in cd $(top_builddir) && $(SHELL) ./config.status $@ evas.spec: $(top_builddir)/config.status $(srcdir)/evas.spec.in cd $(top_builddir) && $(SHELL) ./config.status $@ install-binSCRIPTS: $(bin_SCRIPTS) @$(NORMAL_INSTALL) @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n' \ -e 'h;s|.*|.|' \ -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) { files[d] = files[d] " " $$1; \ if (++n[d] == $(am__install_max)) { \ print "f", d, files[d]; n[d] = 0; files[d] = "" } } \ else { print "f", d "/" $$4, $$1 } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binSCRIPTS: @$(NORMAL_UNINSTALL) @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 's,.*/,,;$(transform)'`; \ dir='$(DESTDIR)$(bindir)'; $(am__uninstall_files_from_dir) mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool config.lt install-pkgconfigDATA: $(pkgconfig_DATA) @$(NORMAL_INSTALL) @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(pkgconfigdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgconfigdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgconfigdir)" || exit $$?; \ done uninstall-pkgconfigDATA: @$(NORMAL_UNINSTALL) @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(pkgconfigdir)'; $(am__uninstall_files_from_dir) # This directory's subdirectories are mostly independent; you can cd # into them and run 'make' without going through this Makefile. # To change the values of 'make' variables: instead of editing Makefiles, # (1) if the variable is set in 'config.status', edit 'config.status' # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. $(am__recursive_targets): @fail=; \ if $(am__make_keepgoing); then \ failcom='fail=yes'; \ else \ failcom='exit 1'; \ fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-recursive TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-recursive CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscope: cscope.files test ! -s cscope.files \ || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS) clean-cscope: -rm -f cscope.files cscope.files: clean-cscope cscopelist cscopelist: cscopelist-recursive cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -rm -f cscope.out cscope.in.out cscope.po.out cscope.files distdir: $(DISTFILES) $(am__remove_distdir) test -d "$(distdir)" || mkdir "$(distdir)" @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done -test -n "$(am__skip_mode_fix)" \ || find "$(distdir)" -type d ! -perm -755 \ -exec chmod u+rwx,go+rx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r "$(distdir)" dist-gzip: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__post_remove_distdir) dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 $(am__post_remove_distdir) dist-lzip: distdir tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz $(am__post_remove_distdir) dist-xz: distdir tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz $(am__post_remove_distdir) dist-tarZ: distdir tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__post_remove_distdir) dist-shar: distdir shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz $(am__post_remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) $(am__post_remove_distdir) dist dist-all: $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:' $(am__post_remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another # tarfile. distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lz*) \ lzip -dc $(distdir).tar.lz | $(am__untar) ;;\ *.tar.xz*) \ xz -dc $(distdir).tar.xz | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac chmod -R a-w $(distdir) chmod u+w $(distdir) mkdir $(distdir)/_build $(distdir)/_inst chmod a-w $(distdir) test -d $(distdir)/_build || exit 0; \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && am__cwd=`pwd` \ && $(am__cd) $(distdir)/_build \ && ../configure --srcdir=.. --prefix="$$dc_install_base" \ $(AM_DISTCHECK_CONFIGURE_FLAGS) \ $(DISTCHECK_CONFIGURE_FLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ && $(MAKE) $(AM_MAKEFLAGS) uninstall \ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ distuninstallcheck \ && chmod -R a-w "$$dc_install_base" \ && ({ \ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ } || { rm -rf "$$dc_destdir"; exit 1; }) \ && rm -rf "$$dc_destdir" \ && $(MAKE) $(AM_MAKEFLAGS) dist \ && rm -rf $(DIST_ARCHIVES) \ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ && cd "$$am__cwd" \ || exit 1 $(am__post_remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' distuninstallcheck: @test -n '$(distuninstallcheck_dir)' || { \ echo 'ERROR: trying to run $@ with an empty' \ '$$(distuninstallcheck_dir)' >&2; \ exit 1; \ }; \ $(am__cd) '$(distuninstallcheck_dir)' || { \ echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \ exit 1; \ }; \ test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ fi ; \ $(distuninstallcheck_listfiles) ; \ exit 1; } >&2 distcleancheck: distclean @if test '$(srcdir)' = . ; then \ echo "ERROR: distcleancheck can only run from a VPATH build" ; \ exit 1 ; \ fi @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left in build directory after distclean:" ; \ $(distcleancheck_listfiles) ; \ exit 1; } >&2 check-am: all-am $(MAKE) $(AM_MAKEFLAGS) check-local check: check-recursive all-am: Makefile $(SCRIPTS) $(DATA) config.h installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(pkgconfigdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -f Makefile distclean-am: clean-am distclean-generic distclean-hdr \ distclean-libtool distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-pkgconfigDATA install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-binSCRIPTS install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic \ maintainer-clean-local mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-binSCRIPTS uninstall-pkgconfigDATA .MAKE: $(am__recursive_targets) all check-am install-am install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \ am--refresh check check-am check-local clean clean-cscope \ clean-generic clean-libtool cscope cscopelist-am ctags \ ctags-am dist dist-all dist-bzip2 dist-gzip dist-lzip \ dist-shar dist-tarZ dist-xz dist-zip distcheck distclean \ distclean-generic distclean-hdr distclean-libtool \ distclean-tags distcleancheck distdir distuninstallcheck dvi \ dvi-am html html-am info info-am install install-am \ install-binSCRIPTS install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-pkgconfigDATA install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs installdirs-am maintainer-clean \ maintainer-clean-generic maintainer-clean-local mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am uninstall-binSCRIPTS \ uninstall-pkgconfigDATA .PHONY: doc install-doc coverage doc: @echo "entering doc/" $(MAKE) -C doc doc install-doc: @echo "entering doc/" make -C doc install-doc # Unit tests @EFL_ENABLE_TESTS_TRUE@check-local: @EFL_ENABLE_TESTS_TRUE@ @./src/tests/evas_suite @EFL_ENABLE_TESTS_FALSE@check-local: @EFL_ENABLE_TESTS_FALSE@ @echo "reconfigure with --enable-tests" # Coverage report @EFL_ENABLE_COVERAGE_TRUE@lcov-reset: @EFL_ENABLE_COVERAGE_TRUE@ @rm -rf $(top_builddir)/coverage @EFL_ENABLE_COVERAGE_TRUE@ @find $(top_builddir) -name "*.gcda" -delete @EFL_ENABLE_COVERAGE_TRUE@ @lcov --zerocounters --directory $(top_builddir) @EFL_ENABLE_COVERAGE_TRUE@lcov-report: @EFL_ENABLE_COVERAGE_TRUE@ @mkdir $(top_builddir)/coverage @EFL_ENABLE_COVERAGE_TRUE@ lcov --capture --compat-libtool --output-file $(top_builddir)/coverage/coverage.info --directory $(top_builddir) @EFL_ENABLE_COVERAGE_TRUE@ lcov --remove $(top_builddir)/coverage/coverage.info '*.h' --output-file $(top_builddir)/coverage/coverage.cleaned.info @EFL_ENABLE_COVERAGE_TRUE@ genhtml -t "$(PACKAGE_STRING)" -o $(top_builddir)/coverage/html $(top_builddir)/coverage/coverage.cleaned.info @EFL_ENABLE_COVERAGE_TRUE@ @echo "Coverage Report at $(top_builddir)/coverage/html" @EFL_ENABLE_COVERAGE_TRUE@coverage: @EFL_ENABLE_COVERAGE_TRUE@ @$(MAKE) lcov-reset @EFL_ENABLE_COVERAGE_TRUE@ @$(MAKE) check @EFL_ENABLE_COVERAGE_TRUE@ @$(MAKE) lcov-report @EFL_ENABLE_COVERAGE_FALSE@lcov-reset: @EFL_ENABLE_COVERAGE_FALSE@ @echo "reconfigure with --enable-coverage" @EFL_ENABLE_COVERAGE_FALSE@lcov-report: @EFL_ENABLE_COVERAGE_FALSE@ @echo "reconfigure with --enable-coverage" @EFL_ENABLE_COVERAGE_FALSE@coverage: @EFL_ENABLE_COVERAGE_FALSE@ @echo "reconfigure with --enable-tests --enable-coverage" maintainer-clean-local: rm -rf coverage # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: evas-1.7.9/evas-software-sdl.pc.in0000664000175000017500000000012112175475547013723 00000000000000Name: evas-software-sdl Description: Evas software SDL engine Version: @VERSION@ evas-1.7.9/evas-software-ddraw.pc.in0000664000175000017500000000013112175475547014243 00000000000000Name: evas-software-ddraw Description: Evas software DirectDaw engine Version: @VERSION@ evas-1.7.9/evas-direct3d.pc.in0000664000175000017500000000011112175475547013011 00000000000000Name: evas-direct3d Description: Evas Direct3D engine Version: @VERSION@ evas-1.7.9/config.h.in0000664000175000017500000004006012234557315011443 00000000000000/* config.h.in. Generated from configure.ac by autoheader. */ #ifndef EFL_CONFIG_H__ #define EFL_CONFIG_H__ /* Define if building universal (internal helper macro) */ #undef AC_APPLE_UNIVERSAL_BUILD /* Build Altivec Code */ #undef BUILD_ALTIVEC /* Build async events support */ #undef BUILD_ASYNC_EVENTS /* Build async image preload support */ #undef BUILD_ASYNC_PRELOAD /* Build plain C code */ #undef BUILD_C /* 16bpp BGR 565 Converter Support */ #undef BUILD_CONVERT_16_BGR_565 /* 16bpp RGB 444 Converter Support */ #undef BUILD_CONVERT_16_RGB_444 /* 16bpp 565 (444 ipaq) Converter Support */ #undef BUILD_CONVERT_16_RGB_454645 /* 16bpp RGB 555 Converter Support */ #undef BUILD_CONVERT_16_RGB_555 /* 16bpp RGB 565 Converter Support */ #undef BUILD_CONVERT_16_RGB_565 /* 16bpp RGB Rotation 0 Converter Support */ #undef BUILD_CONVERT_16_RGB_ROT0 /* 16bpp RGB Rotation 180 Converter Support */ #undef BUILD_CONVERT_16_RGB_ROT180 /* 16bpp RGB Rotation 270 Converter Support */ #undef BUILD_CONVERT_16_RGB_ROT270 /* 16bpp RGB Rotation 90 Converter Support */ #undef BUILD_CONVERT_16_RGB_ROT90 /* 24bpp BGR 888 Converter Support */ #undef BUILD_CONVERT_24_BGR_888 /* 24bpp 666 (666 ezx) Converter Support */ #undef BUILD_CONVERT_24_RGB_666 /* 24bpp RGB 888 Converter Support */ #undef BUILD_CONVERT_24_RGB_888 /* 32bpp BGRX 8888 Converter Support */ #undef BUILD_CONVERT_32_BGRX_8888 /* 32bpp BGR 8888 Converter Support */ #undef BUILD_CONVERT_32_BGR_8888 /* 32bpp RGBX 8888 Converter Support */ #undef BUILD_CONVERT_32_RGBX_8888 /* 32bpp 666 (666 ezx) Converter Support */ #undef BUILD_CONVERT_32_RGB_666 /* 32bpp RGB 8888 Converter Support */ #undef BUILD_CONVERT_32_RGB_8888 /* 32bpp RGB Rotation 0 Converter Support */ #undef BUILD_CONVERT_32_RGB_ROT0 /* 32bpp RGB Rotation 180 Converter Support */ #undef BUILD_CONVERT_32_RGB_ROT180 /* 32bpp RGB Rotation 270 Converter Support */ #undef BUILD_CONVERT_32_RGB_ROT270 /* 32bpp RGB Rotation 90 Converter Support */ #undef BUILD_CONVERT_32_RGB_ROT90 /* 32bpp Grayscale 64-palette Converter Support */ #undef BUILD_CONVERT_8_GRAYSCALE_64 /* 8bpp GRY 1 Converter Support */ #undef BUILD_CONVERT_8_GRY_1 /* 8bpp GRY 16 Converter Support */ #undef BUILD_CONVERT_8_GRY_16 /* 8bpp RGB 111 Converter Support */ #undef BUILD_CONVERT_8_RGB_111 /* 8bpp RGB 121 Converter Support */ #undef BUILD_CONVERT_8_RGB_121 /* 8bpp RGB 221 Converter Support */ #undef BUILD_CONVERT_8_RGB_221 /* 8bpp RGB 222 Converter Support */ #undef BUILD_CONVERT_8_RGB_222 /* 8bpp RGB 232 Converter Support */ #undef BUILD_CONVERT_8_RGB_232 /* 8bpp RGB 332 Converter Support */ #undef BUILD_CONVERT_8_RGB_332 /* 8bpp RGB 666 Converter Support */ #undef BUILD_CONVERT_8_RGB_666 /* YUV Converter Support */ #undef BUILD_CONVERT_YUV /* Buffer rendering backend */ #undef BUILD_ENGINE_BUFFER /* Direct3D rendering backend */ #undef BUILD_ENGINE_DIRECT3D /* DirectFB rendering backend */ #undef BUILD_ENGINE_DIRECTFB /* Framebuffer rendering backend */ #undef BUILD_ENGINE_FB /* OpenGL Cocoa rendering backend */ #undef BUILD_ENGINE_GL_COCOA /* Generic OpenGL Rendering Support */ #undef BUILD_ENGINE_GL_COMMON /* OpenGL SDL rendering backend */ #undef BUILD_ENGINE_GL_SDL /* Build OpenGL X11 engine */ #undef BUILD_ENGINE_GL_X11 /* Build GL Xcb backend */ #undef BUILD_ENGINE_GL_XCB /* Build OpenGL Xlib backend */ #undef BUILD_ENGINE_GL_XLIB /* PSL1GHT rendering backend */ #undef BUILD_ENGINE_PSL1GHT /* Software SDL 16 bits rendering backend */ #undef BUILD_ENGINE_SOFTWARE_16_SDL /* Software Windows CE 16 bits rendering backend */ #undef BUILD_ENGINE_SOFTWARE_16_WINCE /* Software X11 16 bits rendering backend */ #undef BUILD_ENGINE_SOFTWARE_16_X11 /* Software X11 8 bits grayscale rendering backend */ #undef BUILD_ENGINE_SOFTWARE_8_X11 /* Software DirectDraw rendering backend */ #undef BUILD_ENGINE_SOFTWARE_DDRAW /* Software GDI rendering backend */ #undef BUILD_ENGINE_SOFTWARE_GDI /* Build software X11 engine */ #undef BUILD_ENGINE_SOFTWARE_X11 /* Build software XCB backend */ #undef BUILD_ENGINE_SOFTWARE_XCB /* Build software Xlib backend */ #undef BUILD_ENGINE_SOFTWARE_XLIB /* Wayland Egl rendering backend */ #undef BUILD_ENGINE_WAYLAND_EGL /* Wayland Shm rendering backend */ #undef BUILD_ENGINE_WAYLAND_SHM /* EET Font Loader Support */ #undef BUILD_FONT_LOADER_EET /* define to 1 if you have the line dither mask support */ #undef BUILD_LINE_DITHER_MASK /* UP Image Loader Support */ #undef BUILD_LOADER_BMP /* UP Image Loader Support */ #undef BUILD_LOADER_EDB /* UP Image Loader Support */ #undef BUILD_LOADER_EET /* UP Image Loader Support */ #undef BUILD_LOADER_GENERIC /* UP Image Loader Support */ #undef BUILD_LOADER_GIF /* UP Image Loader Support */ #undef BUILD_LOADER_ICO /* UP Image Loader Support */ #undef BUILD_LOADER_JPEG /* JPEG Region Decode Support */ #undef BUILD_LOADER_JPEG_REGION /* UP Image Loader Support */ #undef BUILD_LOADER_PMAPS /* UP Image Loader Support */ #undef BUILD_LOADER_PNG /* UP Image Loader Support */ #undef BUILD_LOADER_PSD /* UP Image Loader Support */ #undef BUILD_LOADER_SVG /* UP Image Loader Support */ #undef BUILD_LOADER_TGA /* UP Image Loader Support */ #undef BUILD_LOADER_TIFF /* UP Image Loader Support */ #undef BUILD_LOADER_WBMP /* UP Image Loader Support */ #undef BUILD_LOADER_XPM /* Build MMX Code */ #undef BUILD_MMX /* Build NEON Code */ #undef BUILD_NEON /* define to 1 if you have the conversion to 16bpp without dither mask support */ #undef BUILD_NO_DITHER_MASK /* Build Threaded Rendering */ #undef BUILD_PTHREAD /* define to 1 if you have the sampling scaler support */ #undef BUILD_SCALE_SAMPLE /* define to 1 if you have the smooth scaler support */ #undef BUILD_SCALE_SMOOTH /* define to 1 if you have the small dither mask support */ #undef BUILD_SMALL_DITHER_MASK /* Build SSE Code */ #undef BUILD_SSE /* Build SSE3 Code */ #undef BUILD_SSE3 /* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP systems. This function is required for `alloca.c' support on those systems. */ #undef CRAY_STACKSEG_END /* Define to 1 if using `alloca.c'. */ #undef C_ALLOCA /* Macro declaring a function to always be inlined. */ #undef EFL_ALWAYS_INLINE /* Define to mention that evas is built */ #undef EFL_EVAS_BUILD /* Use SDL primitive when possible */ #undef ENGINE_SDL_PRIMITIVE /* Build JPEG saver */ #undef EVAS_BUILD_SAVER_JPEG /* Shared cache server. */ #undef EVAS_CSERVE /* Shared cache server. */ #undef EVAS_CSERVE2 /* complain when people pass in wrong object types etc. */ #undef EVAS_MAGIC_DEBUG /* Build BMP image loader inside libevas */ #undef EVAS_STATIC_BUILD_BMP /* Build buffer engine inside libevas */ #undef EVAS_STATIC_BUILD_BUFFER /* Build direct3d engine inside libevas */ #undef EVAS_STATIC_BUILD_DIRECT3D /* Build directfb engine inside libevas */ #undef EVAS_STATIC_BUILD_DIRECTFB /* Build Edb image loader inside libevas */ #undef EVAS_STATIC_BUILD_EDB /* Build Eet image loader inside libevas */ #undef EVAS_STATIC_BUILD_EET /* Build fb engine inside libevas */ #undef EVAS_STATIC_BUILD_FB /* Build GENERIC image loader inside libevas */ #undef EVAS_STATIC_BUILD_GENERIC /* Build Gif image loader inside libevas */ #undef EVAS_STATIC_BUILD_GIF /* Build gl-cocoa engine inside libevas */ #undef EVAS_STATIC_BUILD_GL_COCOA /* Build GL generic engine as part of libevas */ #undef EVAS_STATIC_BUILD_GL_COMMON /* Build gl-sdl engine inside libevas */ #undef EVAS_STATIC_BUILD_GL_SDL /* Build OpenGL X11 engine as part of libevas */ #undef EVAS_STATIC_BUILD_GL_X11 /* Build gl-xcb engine inside libevas */ #undef EVAS_STATIC_BUILD_GL_XCB /* Build gl-xlib engine inside libevas */ #undef EVAS_STATIC_BUILD_GL_XLIB /* Build ICO image loader inside libevas */ #undef EVAS_STATIC_BUILD_ICO /* Build Jpeg image loader inside libevas */ #undef EVAS_STATIC_BUILD_JPEG /* Build PMAPS image loader inside libevas */ #undef EVAS_STATIC_BUILD_PMAPS /* Build PNG image loader inside libevas */ #undef EVAS_STATIC_BUILD_PNG /* Build PSD image loader inside libevas */ #undef EVAS_STATIC_BUILD_PSD /* Build psl1ght engine inside libevas */ #undef EVAS_STATIC_BUILD_PSL1GHT /* Build software 16 engine as part of libevas */ #undef EVAS_STATIC_BUILD_SOFTWARE_16 /* Build software-16-sdl engine inside libevas */ #undef EVAS_STATIC_BUILD_SOFTWARE_16_SDL /* Build software-16-wince engine inside libevas */ #undef EVAS_STATIC_BUILD_SOFTWARE_16_WINCE /* Build software-16-x11 engine inside libevas */ #undef EVAS_STATIC_BUILD_SOFTWARE_16_X11 /* Build software 8 engine as part of libevas */ #undef EVAS_STATIC_BUILD_SOFTWARE_8 /* Build software-8-x11 engine inside libevas */ #undef EVAS_STATIC_BUILD_SOFTWARE_8_X11 /* Build software-ddraw engine inside libevas */ #undef EVAS_STATIC_BUILD_SOFTWARE_DDRAW /* Build software-gdi engine inside libevas */ #undef EVAS_STATIC_BUILD_SOFTWARE_GDI /* Build software generic engine as part of libevas */ #undef EVAS_STATIC_BUILD_SOFTWARE_GENERIC /* Build software X11 engine as part of libevas */ #undef EVAS_STATIC_BUILD_SOFTWARE_X11 /* Build software-xcb engine inside libevas */ #undef EVAS_STATIC_BUILD_SOFTWARE_XCB /* Build software-xlib engine inside libevas */ #undef EVAS_STATIC_BUILD_SOFTWARE_XLIB /* Build SVG image loader inside libevas */ #undef EVAS_STATIC_BUILD_SVG /* Build TGA image loader inside libevas */ #undef EVAS_STATIC_BUILD_TGA /* Build Tiff image loader inside libevas */ #undef EVAS_STATIC_BUILD_TIFF /* Build wayland-egl engine inside libevas */ #undef EVAS_STATIC_BUILD_WAYLAND_EGL /* Build wayland-shm engine inside libevas */ #undef EVAS_STATIC_BUILD_WAYLAND_SHM /* Build WBMP image loader inside libevas */ #undef EVAS_STATIC_BUILD_WBMP /* Build XPM image loader inside libevas */ #undef EVAS_STATIC_BUILD_XPM /* Samsung S3c6410 GLES2 support */ #undef GLES_VARIETY_S3C6410 /* Imagination SGX GLES2 support */ #undef GLES_VARIETY_SGX /* Define to 1 if you have `alloca', as a function or macro. */ #undef HAVE_ALLOCA /* Define to 1 if you have and it should be used (not on Ultrix). */ #undef HAVE_ALLOCA_H /* Have altivec.h header file */ #undef HAVE_ALTIVEC_H /* Define to 1 if you have the header file. */ #undef HAVE_D3D9_H /* Define to 1 if you have the header file. */ #undef HAVE_D3DX9_H /* Define to 1 if you have the header file. */ #undef HAVE_DLFCN_H /* Define to 1 if you have the `dlsym' function. */ #undef HAVE_DLSYM /* Set to 1 if evil package is installed */ #undef HAVE_EVIL /* Define to 1 if you have Exotic. */ #undef HAVE_EXOTIC /* Define to 1 if you have the `fcntl' function. */ #undef HAVE_FCNTL /* have fontconfig searching capabilities */ #undef HAVE_FONTCONFIG /* have fribidi support */ #undef HAVE_FRIBIDI /* Define to 1 if your compiler supports __attribute__ ((vector)). */ #undef HAVE_GCC_ATTRIBUTE_VECTOR /* have harfbuzz support */ #undef HAVE_HARFBUZZ /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H /* have liblinebreak support */ #undef HAVE_LINEBREAK /* C99 lround function exists */ #undef HAVE_LROUND /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H /* Define to 1 if you have the header file. */ #undef HAVE_NETINET_IN_H /* have pixman for rendering */ #undef HAVE_PIXMAN /* Define to 1 if you have the header file. */ #undef HAVE_PTHREAD_H /* Define to 1 if you have the header file. */ #undef HAVE_SCHED_H /* SDL_OPENGLES flag is present */ #undef HAVE_SDL_FLAG_OPENGLES /* SDL_GL version attributes present */ #undef HAVE_SDL_GL_CONTEXT_VERSION /* Define to 1 if you have the `shm_open' function. */ #undef HAVE_SHM_OPEN /* Define to 1 if you have the `siglongjmp' function. */ #undef HAVE_SIGLONGJMP /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H /* Define to 1 if you have the header file. */ #undef HAVE_STRINGS_H /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H /* Define to 1 if the system has the type `struct sigaction'. */ #undef HAVE_STRUCT_SIGACTION /* Define to 1 if you have the header file. */ #undef HAVE_SYS_EPOLL_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_INOTIFY_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_MMAN_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_PARAM_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_SIGNALFD_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H /* Set to 1 if we enabled unit testing. */ #undef HAVE_TESTS /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H /* Valgrind support */ #undef HAVE_VALGRIND /* Define to the sub-directory in which libtool stores uninstalled libraries. */ #undef LT_OBJDIR /* "Module architecture" */ #undef MODULE_ARCH /* Name of package */ #undef PACKAGE /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT /* Define to the full name of this package. */ #undef PACKAGE_NAME /* Define to the full name and version of this package. */ #undef PACKAGE_STRING /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME /* Define to the home page for this package. */ #undef PACKAGE_URL /* Define to the version of this package. */ #undef PACKAGE_VERSION /* default value since PATH_MAX is not defined */ #undef PATH_MAX /* Allow pixman to render fonts */ #undef PIXMAN_FONT /* Allow pixman to render images */ #undef PIXMAN_IMAGE /* Allow pixman to render image sampled scaling */ #undef PIXMAN_IMAGE_SCALE_SAMPLE /* Allow pixman to render lines */ #undef PIXMAN_LINE /* Allow pixman to render polys */ #undef PIXMAN_POLY /* Allow pixman to render rects */ #undef PIXMAN_RECT /* The size of `Eina_Unicode', as computed by sizeof. */ #undef SIZEOF_EINA_UNICODE /* The size of `FriBidiChar', as computed by sizeof. */ #undef SIZEOF_FRIBIDICHAR /* If using the C implementation of alloca, define if you know the direction of stack growth for your system; otherwise it will be automatically deduced at runtime. STACK_DIRECTION > 0 => grows toward higher addresses STACK_DIRECTION < 0 => grows toward lower addresses STACK_DIRECTION = 0 => direction of growth unknown */ #undef STACK_DIRECTION /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS /* Enable tiled rotate algorithm */ #undef TILE_ROTATE /* Enable extensions on AIX 3, Interix. */ #ifndef _ALL_SOURCE # undef _ALL_SOURCE #endif /* Enable GNU extensions on systems that have them. */ #ifndef _GNU_SOURCE # undef _GNU_SOURCE #endif /* Enable threading extensions on Solaris. */ #ifndef _POSIX_PTHREAD_SEMANTICS # undef _POSIX_PTHREAD_SEMANTICS #endif /* Enable extensions on HP NonStop. */ #ifndef _TANDEM_SOURCE # undef _TANDEM_SOURCE #endif /* Enable general extensions on Solaris. */ #ifndef __EXTENSIONS__ # undef __EXTENSIONS__ #endif /* Version number of package */ #undef VERSION /* Major version */ #undef VMAJ /* Micro version */ #undef VMIC /* Minor version */ #undef VMIN /* Revison */ #undef VREV /* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most significant byte first (like Motorola and SPARC, unlike Intel). */ #if defined AC_APPLE_UNIVERSAL_BUILD # if defined __BIG_ENDIAN__ # define WORDS_BIGENDIAN 1 # endif #else # ifndef WORDS_BIGENDIAN # undef WORDS_BIGENDIAN # endif #endif /* Define to 1 if the X Window System is missing or not being used. */ #undef X_DISPLAY_MISSING /* Define to 1 if on MINIX. */ #undef _MINIX /* Define to 2 if the system does not provide POSIX.1 features except with this defined. */ #undef _POSIX_1_SOURCE /* Define to 1 if you need to in order for `stat' and other things to work. */ #undef _POSIX_SOURCE /* __attribute__ ((unused)) is not supported. */ #undef __UNUSED__ /* Define to empty if `const' does not conform to ANSI C. */ #undef const /* Define to `unsigned int' if does not define. */ #undef size_t #endif /* EFL_CONFIG_H__ */ evas-1.7.9/NEWS0000664000175000017500000003635712230264345010127 00000000000000Evas 1.7.9 Changes since Evas 1.7.8: ------------------------- Fixes: * Evas textblock: Fixed issue when parsing formats with quotes. * Evas textblock: Make the ellipsis format the same as the surrounding. * evas/wayland_egl: Skip makecurrent if re->win is NULL. * Evas textblock: Added proper size adjustments for "high" shaped texts. * Evas bidi: Fixed a bug causing BiDi not to work in some cases. * Evas textblock: fixed an issue with markup_get and markup_to_utf8 behaving differently (markup_get was misbehaving). * evas/wayland_egl: Do not create a new surface if we already have one. * Fixed the textblock format to be drawn according to the glyph's horizontal advance width. Evas 1.7.8 Changes since Evas 1.7.7: ------------------------- Fixes: * Correctly detect if a loader support asynchronous preloading. * Fix memory leak in evas textgrid * Evas: Fix evas_common_convert_yuv_42* functions to actually return the converted data. Evas 1.7.7 Changes since Evas 1.7.6: ------------------------- Fixes: * Fix over redrawing of Evas_Map when applied on smart object. * Evas font: Fix a bug with cluster size calculation with texts ending with ligatures. * Evas map: don't be crashed even if image size is 0. * Evas: Don't update evas update area by the clipper if the image obj visible is changed. * Evas textblock: Fixed a bug with deletion of ranges that end just before a visual format. * Evas: If an object goes to be hidden without replacing the cur/prev state info, the object context can be corrupted at the next show time. Now it replaces the cur/prev in that rare case. * Fix recursive proxy image rendering to just render black * Evas text: Fixed line size calculation when using multiple fonts. * Revert "Fix memory usage spike when rotating with the software_x11 engine." Evas 1.7.6 Changes since Evas 1.7.5: ------------------------- Fixes: * Fix SIGFPE in evas map update if image is 0. * Evas textblock: Fixed issue and simplified cursor_geometry_get. * Evas text: Fixed issue with horiz advance. * Evas text utils: Fixed issue with no-harfbuzz bidi. * Fixed pixman surface alloc where allocated and image size differ. * Stop initializing and shutting Fontconfig down * Evas textblock: Fixed a selection issue with different scripts and bidi. * Fix memory usage spike when rotating with the software_x11 engine. * Fix bmp portability issue on some 64bits system. * Fix textgrid portability issue on some 64bits system. * Evas text: Fixed bug with the text object direction detection. * Evas font: Fixed font run detection for specific cases with 2 different fonts in the middle of a run. * Evas cache: remove the freed worker from the pthread worker list when it's failed to create a new thread so as not to access it if a thread is working newly. * Fix evas word start/end find in textblock to be consistent with other toolkit logic on the matter * Fix crash in Evas Buffer engine when using output with no alpha. * Evas textblock: Fixed line size calculation when using multiple fonts. Changes since Evas 1.7.5: ------------------------- Fixes: * Fix SIGFPE in evas map update if image is 0. * Evas textblock: Fixed issue and simplified cursor_geometry_get. * Evas text: Fixed issue with horiz advance. * Evas text utils: Fixed issue with no-harfbuzz bidi. * Fixed pixman surface alloc where allocated and image size differ. * Stop initializing and shutting Fontconfig down * Evas textblock: Fixed a selection issue with different scripts and bidi. * Fix memory usage spike when rotating with the software_x11 engine. * Fix bmp portability issue on some 64bits system. * Fix textgrid portability issue on some 64bits system. * Evas text: Fixed bug with the text object direction detection. * Evas font: Fixed font run detection for specific cases with 2 different fonts in the middle of a run. * Evas cache: remove the freed worker from the pthread worker list when it's failed to create a new thread so as not to access it if a thread is working newly. * Fix evas word start/end find in textblock to be consistent with other toolkit logic on the matter * Fix crash in Evas Buffer engine when using output with no alpha. * Evas font: If OS/2 table is available and the font is demi-bold, don't do runtime emboldment. * Fix build of Evas XCB backend. * Fix evas bmp loader code which deal with image size. * Fix not up to date clip cache for Evas_Object_Text. * Evas texblock: Fixed a bug with breaking after format items. * Evas textblock: Fixed issue with line height when breaking on a format. * Evas: add pixels_alpha_get to evas engine. Changes since Evas 1.7.4: ------------------------- * Fix mask write lines to not choose too small segments Changes since Evas 1.7.3: ------------------------- Fixes: * Fix the gl line incorrect position drawing. * Fix uninitialized data in Evas_Smart initialization code. * Fix potential segv in software engine native_set call. * Fix uninitialized data in OpenGL engine native_set call. * Fix crash when precise_is_inside is set on an image, and events are generated from it. * Properly close async pipe fd on exec. * Fix the line drawing clipping problem on arm gl driver. * Fix big rendering/conversion problem in kvm/qemu 24bpp. * Fix Evas RGBA_Image->flags.loaded for copied images. * Fix evas_object_image_is_inside() * Fix small memory leak in evas_bidi_utils error path Changes since Evas 1.7.2 ------------------------- Fixes: * Fixed evas_object_box to reset size_hint_min to zero when no child. * Don't leak fd on exec. Changes since Evas 1.7.1 ------------------------- Fixes: * Fix evas textblock tag parser to respect escaped spaces and escaped single quotes * Fixed longstanding memset bug in evas box. * Fixed GLX native surface handling (fixes new mesa+intel comp bug). * Fixed textblock textprop leak. Changes since Evas 1.7.0: ------------------------- Improvements: * make xpm loader faster (from O(N) to O(log(N))). Fixes: * Fix EGL/GLES dest alpha rendering bug (no rendering). * Fix evas_object_image_alpha_set when image data not loaded yet. * Fix map surface leak. * Fix native surface set to null crash bug in gl engine. * Fix font sizing issue with some rare sizes and fonts when rounding wrong. * Fix software line drawing c fallback code. * Update move event when object freeze event is off. * coordinate compute bug for Evas GL direct rendering. Evas 1.7.0 Changes since Evas 1.2.0: ------------------------- Additions: * Textgrid object. * Evas_Smart_Interface type, which brings simple interfaces support to smart objects. Improvements: * Lock less font rendering. * Reduce cost of propagating event by limiting the object we explore by using a bouncing box. * Don't wake up prepare thread if there is nothing to prepare. * Limit the updated region to fit in CPU cache for Pipe rendering. * Cache convertion from Evas_Map to RGBA_Map. * evas_object_smart_members_get() now returns NULL on non-smart objects. * Pipeline rendering use prepare stage more extensively. * Properly warn when user try to link object from different canvas. Fixes: * Add missing files in the tarball. * Add svg rendering with Esvg * Don't accept broken map. * Fix garbage left by mapped smart object when they fly away from the canvas. * Fix map life cycle. * Don't crash when calling evas_object_smart_type_check without type. * Handle proxy with the right context. * Force proxied object to stay active to keep track of change in them. * Fix evas_gl's internal resource surface bug when evas' window is deleted/recreated. * Fix evas_gl current_context update issue when evas_gl context is deleted. Removal: * Remove EVAS_FRAME_QUEUING, EVAS_SLI, METRIC_CACHE and WORD_CACHE. * Remove librsvg svg loader (If you want to use it, use the evas_generic_loader variant). * Remove software DirectDraw 16 bits engine * Pipe rendering now need a patch to be turned on. Evas 1.2.0 Changes since Evas 1.1.0: ------------------------- Additions: * Textblock now supports self-closing tags, i.e
. Those should be used instead of the old
way. * Shm engine for drawing in Wayland. * evas_object_smart_callback_del_full API. * Add double buffer support to the buffer engine. * evas_textblock_cursor_word_start/end. * evas_textblock_text_utf8_to_markup. * textblock b and i tags able to be overriden by style. * new api to set and get event flags * events just before/after canvas rendering * frame object set/get API's * evas_object_name_child_find. * evas_gl_config_new/free. * evas_object_smart_callback_del_full. * EVAS_OBJECT_POINTER_MODE_NOGRAB_NO_REPEAT_UPDOWN. * EVAS_GL_OPTIONS_DIRECT. * evas_object_textblock_style_user_pop/push. * evas_object_ref_get * Evas_GL_Multisample_Bits MSAA surface config option for supported devices. Fixes: * don't enable SSE3 if immintrin.h isn't there. * clip bounds calculation rounding error. * grab count negative values with weird multi-finger press/release usage. * clip bug that shows up in buffer engine. * disabled buggy SSE3 routines. * repeat events passing between layers within the same object. * uninitialized value when running generic loader. * rounding of update regions in scaled image objects. * handling of layouts where weights have sub integer values. * gl engine cliupping bug when rendering maps to fbo's. * liblinebreak disabled compilation bug. * color multiplier staying set when rendering map. * shader binary now saves if shader dir exists already. Improvements: * use Eina_File mmap for bmp, ico, pmaps, psd, wbmp and xpm file access. * textblock br and tab tags now default for newline and tab. * extended pixman routine support for most software rendering routines. * added tiled rotator for 32bit displays (faster). * work around nvidia driver spin-using-cpu and don't use glXWaitGL() * evasgl back-end for software using OSMesa. Removal: * Software_SDL engine is gone, use buffer engine directly. Evas 1.1.0 Changes since Evas 1.0.0: ------------------------- Additions: * auto-align feature to textblock * mixedwrap wrap mode to textblock * harfbuzz support for shaping * WBMP loader * mirror mode for tables * proxy abilities to image objects to choose source ro mirror * speculative texture cache to the OpenGL engine to avoid texture uploads * newline policy setting API to textblock * evas_object_ref and evas_object_unref to defer object deletions * ICO loader * evas_object_image_memfile_set to load images from memory * vertical alignment to textblock * more shadow directions for text rendering * runtime italicizing and boldening of fonts that don't have their own * more bidi API support * PSD loader * generic external-process loader for thins like xcf, pdf, video, ps * password mode to textblock * GL shader disk cache to avoid re-compilng on start * evas_textblock_node_format_list_get. API * smart class usage count get API * grid layout smart object and API * evas_event_thaw_eval to help evaluate state and events on event thaw * textblock support for numeric escapes like "<" in markup * evas_object_image_extension_can_load_get API * evas_object_image_extension_can_load_fast_get API * evas_object_image_load_orientation_get API * evas_object_image_load_orientation_set API * feature to allow tables to repack the same object without error * API to get child packing from table * is_inside implementation for polygon objects * out-of-order open/close tag support in textblock markup * support for quoted parameters in tags in textblock markup * font_weight and font_style formats * font_width font format * markup tag to specify language * evas_textblock_cursor_range_formats_get API * evas_textblock_cursor_visible_range_get API * callback prioritization support * YUV 601 input support for evas_object_image_data_convert * NV12 colorspace for evas image objects * MT12 colorspace for evas image objects * underline dashing support to textblock * API to get largest image size * GL Cocoa engine * Evas GL support in software backend through OSMesa * API to new/free Evas_GL_Config rather than user declaring it * Evas GL Direct rendering option hint to allow rendering to evas' window when possible Fixes: * cursor and selection handling with bidi text * many general bid issues with text * free bug in key grabs * bug when images are scaled to massive sizes (like 1 billion pixels) * BMP decode for have more pixels per line than the image does * font string parsing bug if font element is too long * crash bug in argb8888 to a8 conversion * textblock bug with cursors in empty textblocks * bug in smart calc array where some objects would be skipped * static linking of BMP and TGA loaders * bug when GL viewport was set with a NULL context * bug when looking for vsync API due to SGI vs EXT differences * bug in evas_object_del where DEL callback happened before HIDE * yinversion bug on some GL surfaces * BMP loader to handle alpha BMPS as solid where all alpha values are 0 * clipping with evas map issues * bug where wrong call was used for freeing a mempool object * static linking of GL engine * GL engine to handle if someone uses GL contexts outside of evas * bug in evas_object_textblock_text_markup_prepend that broke cursors * lack of calling pre/post swap callbacks when using OpenGL-ES2 * some crashes with load options scaling of SVGs in 2nd pass decode * segfault with evas_textblock_cursor_content_get * libjpeg 8 compilation support on windows * evas table to handle weighting correctly and expansion * evas table to allow fractional weights, not just 0/1 * glyph search bug causing inconsitent return values in some cases * compile when --disable-async-preload is used * callback counter bug * grab count and hide bug * infinite loop bug when re-inserting objects during pre-render calc * evas_object_image_data_convert * TGA loader detects false positives less and handles alpha TGAs better * repeat event flag not inherited from parent smart like pass events Improvements: * pre-render speed for rectangles if they are invisible * code of textblock and font engine * textblock layout speed * speed and memory usage of textblock * cache handler to also use file size, mode and sub-second timestamp * textblock to re-layout only paragraphs that have changed * homogenous table layout alignment and sizing * textblock linebreaking by using liblinebreak * image loader to drop out instantly if image file is a directory * object allocation to use mempools * font engine to use string objects not strings for caching purposes * text to display missing unicode char instead of missing glyphs * internal file code to use eina_file more * jpeg loader to use eina_file * jpeg encode and decode quality improved at expense of speed Removals: * removed quartz, cairo, qtopia and xrender engines. dead. evas-1.7.9/INSTALL0000664000175000017500000002243212175475547010466 00000000000000Installation Instructions ************************* Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005 Free Software Foundation, Inc. This file is free documentation; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. Basic Installation ================== These are generic installation instructions. The `configure' shell script attempts to guess correct values for various system-dependent variables used during compilation. It uses those values to create a `Makefile' in each directory of the package. It may also create one or more `.h' files containing system-dependent definitions. Finally, it creates a shell script `config.status' that you can run in the future to recreate the current configuration, and a file `config.log' containing compiler output (useful mainly for debugging `configure'). It can also use an optional file (typically called `config.cache' and enabled with `--cache-file=config.cache' or simply `-C') that saves the results of its tests to speed up reconfiguring. (Caching is disabled by default to prevent problems with accidental use of stale cache files.) If you need to do unusual things to compile the package, please try to figure out how `configure' could check whether to do them, and mail diffs or instructions to the address given in the `README' so they can be considered for the next release. If you are using the cache, and at some point `config.cache' contains results you don't want to keep, you may remove or edit it. The file `configure.ac' (or `configure.in') is used to create `configure' by a program called `autoconf'. You only need `configure.ac' if you want to change it or regenerate `configure' using a newer version of `autoconf'. The simplest way to compile this package is: 1. `cd' to the directory containing the package's source code and type `./configure' to configure the package for your system. If you're using `csh' on an old version of System V, you might need to type `sh ./configure' instead to prevent `csh' from trying to execute `configure' itself. Running `configure' takes awhile. While running, it prints some messages telling which features it is checking for. 2. Type `make' to compile the package. 3. Optionally, type `make check' to run any self-tests that come with the package. 4. Type `make install' to install the programs and any data files and documentation. 5. You can remove the program binaries and object files from the source code directory by typing `make clean'. To also remove the files that `configure' created (so you can compile the package for a different kind of computer), type `make distclean'. There is also a `make maintainer-clean' target, but that is intended mainly for the package's developers. If you use it, you may have to get all sorts of other programs in order to regenerate files that came with the distribution. Compilers and Options ===================== Some systems require unusual options for compilation or linking that the `configure' script does not know about. Run `./configure --help' for details on some of the pertinent environment variables. You can give `configure' initial values for configuration parameters by setting variables in the command line or in the environment. Here is an example: ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix *Note Defining Variables::, for more details. Compiling For Multiple Architectures ==================================== You can compile the package for more than one kind of computer at the same time, by placing the object files for each architecture in their own directory. To do this, you must use a version of `make' that supports the `VPATH' variable, such as GNU `make'. `cd' to the directory where you want the object files and executables to go and run the `configure' script. `configure' automatically checks for the source code in the directory that `configure' is in and in `..'. If you have to use a `make' that does not support the `VPATH' variable, you have to compile the package for one architecture at a time in the source code directory. After you have installed the package for one architecture, use `make distclean' before reconfiguring for another architecture. Installation Names ================== By default, `make install' installs the package's commands under `/usr/local/bin', include files under `/usr/local/include', etc. You can specify an installation prefix other than `/usr/local' by giving `configure' the option `--prefix=PREFIX'. You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you pass the option `--exec-prefix=PREFIX' to `configure', the package uses PREFIX as the prefix for installing programs and libraries. Documentation and other data files still use the regular prefix. In addition, if you use an unusual directory layout you can give options like `--bindir=DIR' to specify different values for particular kinds of files. Run `configure --help' for a list of the directories you can set and what kinds of files go in them. If the package supports it, you can cause programs to be installed with an extra prefix or suffix on their names by giving `configure' the option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. Optional Features ================= Some packages pay attention to `--enable-FEATURE' options to `configure', where FEATURE indicates an optional part of the package. They may also pay attention to `--with-PACKAGE' options, where PACKAGE is something like `gnu-as' or `x' (for the X Window System). The `README' should mention any `--enable-' and `--with-' options that the package recognizes. For packages that use the X Window System, `configure' can usually find the X include and library files automatically, but if it doesn't, you can use the `configure' options `--x-includes=DIR' and `--x-libraries=DIR' to specify their locations. Specifying the System Type ========================== There may be some features `configure' cannot figure out automatically, but needs to determine by the type of machine the package will run on. Usually, assuming the package is built to be run on the _same_ architectures, `configure' can figure that out, but if it prints a message saying it cannot guess the machine type, give it the `--build=TYPE' option. TYPE can either be a short name for the system type, such as `sun4', or a canonical name which has the form: CPU-COMPANY-SYSTEM where SYSTEM can have one of these forms: OS KERNEL-OS See the file `config.sub' for the possible values of each field. If `config.sub' isn't included in this package, then this package doesn't need to know the machine type. If you are _building_ compiler tools for cross-compiling, you should use the option `--target=TYPE' to select the type of system they will produce code for. If you want to _use_ a cross compiler, that generates code for a platform different from the build platform, you should specify the "host" platform (i.e., that on which the generated programs will eventually be run) with `--host=TYPE'. Sharing Defaults ================ If you want to set default values for `configure' scripts to share, you can create a site shell script called `config.site' that gives default values for variables like `CC', `cache_file', and `prefix'. `configure' looks for `PREFIX/share/config.site' if it exists, then `PREFIX/etc/config.site' if it exists. Or, you can set the `CONFIG_SITE' environment variable to the location of the site script. A warning: not all `configure' scripts look for a site script. Defining Variables ================== Variables not defined in a site shell script can be set in the environment passed to `configure'. However, some packages may run configure again during the build, and the customized values of these variables may be lost. In order to avoid this problem, you should set them in the `configure' command line, using `VAR=value'. For example: ./configure CC=/usr/local2/bin/gcc causes the specified `gcc' to be used as the C compiler (unless it is overridden in the site shell script). Here is a another example: /bin/bash ./configure CONFIG_SHELL=/bin/bash Here the `CONFIG_SHELL=/bin/bash' operand causes subsequent configuration-related scripts to be executed by `/bin/bash'. `configure' Invocation ====================== `configure' recognizes the following options to control how it operates. `--help' `-h' Print a summary of the options to `configure', and exit. `--version' `-V' Print the version of Autoconf used to generate the `configure' script, and exit. `--cache-file=FILE' Enable the cache: use and save the results of the tests in FILE, traditionally `config.cache'. FILE defaults to `/dev/null' to disable caching. `--config-cache' `-C' Alias for `--cache-file=config.cache'. `--quiet' `--silent' `-q' Do not print messages saying which checks are being made. To suppress all normal output, redirect it to `/dev/null' (any error messages will still be shown). `--srcdir=DIR' Look for the package's source code in directory DIR. Usually `configure' can determine that directory automatically. `configure' also accepts some other, not widely useful, options. Run `configure --help' for more details. evas-1.7.9/src/0000775000175000017500000000000012234557320010263 500000000000000evas-1.7.9/src/Makefile.in0000664000175000017500000006237312234557300012261 00000000000000# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/efl_attribute.m4 \ $(top_srcdir)/m4/efl_coverage.m4 \ $(top_srcdir)/m4/efl_doxygen.m4 \ $(top_srcdir)/m4/efl_fnmatch.m4 \ $(top_srcdir)/m4/efl_path_max.m4 \ $(top_srcdir)/m4/efl_shm_open.m4 $(top_srcdir)/m4/efl_tests.m4 \ $(top_srcdir)/m4/evas_check_engine.m4 \ $(top_srcdir)/m4/evas_check_loader.m4 \ $(top_srcdir)/m4/evas_converter.m4 \ $(top_srcdir)/m4/evas_dither.m4 \ $(top_srcdir)/m4/evas_scaler.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-recursive dvi-recursive html-recursive info-recursive \ install-data-recursive install-dvi-recursive \ install-exec-recursive install-html-recursive \ install-info-recursive install-pdf-recursive \ install-ps-recursive install-recursive installcheck-recursive \ installdirs-recursive pdf-recursive ps-recursive \ tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ $(RECURSIVE_TARGETS) \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ distdir am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHECK_CFLAGS = @CHECK_CFLAGS@ CHECK_LIBS = @CHECK_LIBS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@ DIRECTFB_LIBS = @DIRECTFB_LIBS@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ ECORE_EVAS_CFLAGS = @ECORE_EVAS_CFLAGS@ ECORE_EVAS_LIBS = @ECORE_EVAS_LIBS@ EDB_CFLAGS = @EDB_CFLAGS@ EDB_LIBS = @EDB_LIBS@ EDJE_CFLAGS = @EDJE_CFLAGS@ EDJE_LIBS = @EDJE_LIBS@ EET_CFLAGS = @EET_CFLAGS@ EET_LIBS = @EET_LIBS@ EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@ EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@ EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@ EFL_SHM_OPEN_LIBS = @EFL_SHM_OPEN_LIBS@ EGREP = @EGREP@ EINA_CFLAGS = @EINA_CFLAGS@ EINA_LIBS = @EINA_LIBS@ EVAS_CFLAGS = @EVAS_CFLAGS@ EVAS_GENERAL_CFLAGS = @EVAS_GENERAL_CFLAGS@ EVAS_GENERAL_LIBS = @EVAS_GENERAL_LIBS@ EVAS_LIBS = @EVAS_LIBS@ EVAS_SSE3_CFLAGS = @EVAS_SSE3_CFLAGS@ EVIL_CFLAGS = @EVIL_CFLAGS@ EVIL_LIBS = @EVIL_LIBS@ EXEEXT = @EXEEXT@ EXOTIC_CFLAGS = @EXOTIC_CFLAGS@ EXOTIC_LIBS = @EXOTIC_LIBS@ FGREP = @FGREP@ FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@ FONTCONFIG_LIBS = @FONTCONFIG_LIBS@ FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ FREETYPE_LIBS = @FREETYPE_LIBS@ FRIBIDI_CFLAGS = @FRIBIDI_CFLAGS@ FRIBIDI_LIBS = @FRIBIDI_LIBS@ GL_EET_CFLAGS = @GL_EET_CFLAGS@ GL_EET_LIBS = @GL_EET_LIBS@ GREP = @GREP@ HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@ HARFBUZZ_LIBS = @HARFBUZZ_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LINEBREAK_CFLAGS = @LINEBREAK_CFLAGS@ LINEBREAK_LIBS = @LINEBREAK_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MODULE_ARCH = @MODULE_ARCH@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ SDL_CFLAGS = @SDL_CFLAGS@ SDL_LIBS = @SDL_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ SVG_CFLAGS = @SVG_CFLAGS@ SVG_LIBS = @SVG_LIBS@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ XCB_CFLAGS = @XCB_CFLAGS@ XCB_GL_CFLAGS = @XCB_GL_CFLAGS@ XCB_GL_LIBS = @XCB_GL_LIBS@ XCB_LIBS = @XCB_LIBS@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_ct_OBJC = @ac_ct_OBJC@ altivec_cflags = @altivec_cflags@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ dlopen_libs = @dlopen_libs@ docdir = @docdir@ dvidir = @dvidir@ edje_cc = @edje_cc@ efl_doxygen = @efl_doxygen@ efl_have_doxygen = @efl_have_doxygen@ evas_engine_buffer_cflags = @evas_engine_buffer_cflags@ evas_engine_buffer_libs = @evas_engine_buffer_libs@ evas_engine_direct3d_cflags = @evas_engine_direct3d_cflags@ evas_engine_direct3d_libs = @evas_engine_direct3d_libs@ evas_engine_directfb_cflags = @evas_engine_directfb_cflags@ evas_engine_directfb_libs = @evas_engine_directfb_libs@ evas_engine_fb_cflags = @evas_engine_fb_cflags@ evas_engine_fb_libs = @evas_engine_fb_libs@ evas_engine_gl_cocoa_cflags = @evas_engine_gl_cocoa_cflags@ evas_engine_gl_cocoa_libs = @evas_engine_gl_cocoa_libs@ evas_engine_gl_common_libs = @evas_engine_gl_common_libs@ evas_engine_gl_sdl_cflags = @evas_engine_gl_sdl_cflags@ evas_engine_gl_sdl_libs = @evas_engine_gl_sdl_libs@ evas_engine_gl_xcb_cflags = @evas_engine_gl_xcb_cflags@ evas_engine_gl_xcb_libs = @evas_engine_gl_xcb_libs@ evas_engine_gl_xlib_cflags = @evas_engine_gl_xlib_cflags@ evas_engine_gl_xlib_libs = @evas_engine_gl_xlib_libs@ evas_engine_psl1ght_cflags = @evas_engine_psl1ght_cflags@ evas_engine_psl1ght_libs = @evas_engine_psl1ght_libs@ evas_engine_software_16_sdl_cflags = @evas_engine_software_16_sdl_cflags@ evas_engine_software_16_sdl_libs = @evas_engine_software_16_sdl_libs@ evas_engine_software_16_wince_cflags = @evas_engine_software_16_wince_cflags@ evas_engine_software_16_wince_libs = @evas_engine_software_16_wince_libs@ evas_engine_software_16_x11_cflags = @evas_engine_software_16_x11_cflags@ evas_engine_software_16_x11_libs = @evas_engine_software_16_x11_libs@ evas_engine_software_8_x11_cflags = @evas_engine_software_8_x11_cflags@ evas_engine_software_8_x11_libs = @evas_engine_software_8_x11_libs@ evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@ evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@ evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@ evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ evas_image_loader_edb_libs = @evas_image_loader_edb_libs@ evas_image_loader_eet_cflags = @evas_image_loader_eet_cflags@ evas_image_loader_eet_libs = @evas_image_loader_eet_libs@ evas_image_loader_generic_cflags = @evas_image_loader_generic_cflags@ evas_image_loader_generic_libs = @evas_image_loader_generic_libs@ evas_image_loader_gif_cflags = @evas_image_loader_gif_cflags@ evas_image_loader_gif_libs = @evas_image_loader_gif_libs@ evas_image_loader_ico_cflags = @evas_image_loader_ico_cflags@ evas_image_loader_ico_libs = @evas_image_loader_ico_libs@ evas_image_loader_jpeg_cflags = @evas_image_loader_jpeg_cflags@ evas_image_loader_jpeg_libs = @evas_image_loader_jpeg_libs@ evas_image_loader_pmaps_cflags = @evas_image_loader_pmaps_cflags@ evas_image_loader_pmaps_libs = @evas_image_loader_pmaps_libs@ evas_image_loader_png_cflags = @evas_image_loader_png_cflags@ evas_image_loader_png_libs = @evas_image_loader_png_libs@ evas_image_loader_psd_cflags = @evas_image_loader_psd_cflags@ evas_image_loader_psd_libs = @evas_image_loader_psd_libs@ evas_image_loader_svg_cflags = @evas_image_loader_svg_cflags@ evas_image_loader_svg_libs = @evas_image_loader_svg_libs@ evas_image_loader_tga_cflags = @evas_image_loader_tga_cflags@ evas_image_loader_tga_libs = @evas_image_loader_tga_libs@ evas_image_loader_tiff_cflags = @evas_image_loader_tiff_cflags@ evas_image_loader_tiff_libs = @evas_image_loader_tiff_libs@ evas_image_loader_wbmp_cflags = @evas_image_loader_wbmp_cflags@ evas_image_loader_wbmp_libs = @evas_image_loader_wbmp_libs@ evas_image_loader_xpm_cflags = @evas_image_loader_xpm_cflags@ evas_image_loader_xpm_libs = @evas_image_loader_xpm_libs@ exec_prefix = @exec_prefix@ have_evas_engine_gl_x11 = @have_evas_engine_gl_x11@ have_evas_engine_gl_xcb = @have_evas_engine_gl_xcb@ have_evas_engine_gl_xlib = @have_evas_engine_gl_xlib@ have_evas_engine_software_x11 = @have_evas_engine_software_x11@ have_evas_engine_software_xcb = @have_evas_engine_software_xcb@ have_evas_engine_software_xlib = @have_evas_engine_software_xlib@ have_lcov = @have_lcov@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_enable_auto_import = @lt_enable_auto_import@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgconfig_requires_private = @pkgconfig_requires_private@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pthread_cflags = @pthread_cflags@ pthread_libs = @pthread_libs@ release_info = @release_info@ requirement_evas = @requirement_evas@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ shm_open_libs = @shm_open_libs@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ version_info = @version_info@ MAINTAINERCLEANFILES = Makefile.in SUBDIRS = static_deps lib bin modules tests examples all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs # This directory's subdirectories are mostly independent; you can cd # into them and run 'make' without going through this Makefile. # To change the values of 'make' variables: instead of editing Makefiles, # (1) if the variable is set in 'config.status', edit 'config.status' # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. $(am__recursive_targets): @fail=; \ if $(am__make_keepgoing); then \ failcom='fail=yes'; \ else \ failcom='exit 1'; \ fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-recursive TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-recursive CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-recursive cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: .MAKE: $(am__recursive_targets) install-am install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \ check-am clean clean-generic clean-libtool cscopelist-am ctags \ ctags-am distclean distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ installdirs-am maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: evas-1.7.9/src/static_deps/0000775000175000017500000000000012234557316012572 500000000000000evas-1.7.9/src/static_deps/Makefile.in0000664000175000017500000006247312234557306014572 00000000000000# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ @EVAS_USE_LINEBREAK_TRUE@am__append_1 = liblinebreak subdir = src/static_deps DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/efl_attribute.m4 \ $(top_srcdir)/m4/efl_coverage.m4 \ $(top_srcdir)/m4/efl_doxygen.m4 \ $(top_srcdir)/m4/efl_fnmatch.m4 \ $(top_srcdir)/m4/efl_path_max.m4 \ $(top_srcdir)/m4/efl_shm_open.m4 $(top_srcdir)/m4/efl_tests.m4 \ $(top_srcdir)/m4/evas_check_engine.m4 \ $(top_srcdir)/m4/evas_check_loader.m4 \ $(top_srcdir)/m4/evas_converter.m4 \ $(top_srcdir)/m4/evas_dither.m4 \ $(top_srcdir)/m4/evas_scaler.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-recursive dvi-recursive html-recursive info-recursive \ install-data-recursive install-dvi-recursive \ install-exec-recursive install-html-recursive \ install-info-recursive install-pdf-recursive \ install-ps-recursive install-recursive installcheck-recursive \ installdirs-recursive pdf-recursive ps-recursive \ tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ $(RECURSIVE_TARGETS) \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ distdir am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DIST_SUBDIRS = liblinebreak DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHECK_CFLAGS = @CHECK_CFLAGS@ CHECK_LIBS = @CHECK_LIBS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@ DIRECTFB_LIBS = @DIRECTFB_LIBS@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ ECORE_EVAS_CFLAGS = @ECORE_EVAS_CFLAGS@ ECORE_EVAS_LIBS = @ECORE_EVAS_LIBS@ EDB_CFLAGS = @EDB_CFLAGS@ EDB_LIBS = @EDB_LIBS@ EDJE_CFLAGS = @EDJE_CFLAGS@ EDJE_LIBS = @EDJE_LIBS@ EET_CFLAGS = @EET_CFLAGS@ EET_LIBS = @EET_LIBS@ EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@ EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@ EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@ EFL_SHM_OPEN_LIBS = @EFL_SHM_OPEN_LIBS@ EGREP = @EGREP@ EINA_CFLAGS = @EINA_CFLAGS@ EINA_LIBS = @EINA_LIBS@ EVAS_CFLAGS = @EVAS_CFLAGS@ EVAS_GENERAL_CFLAGS = @EVAS_GENERAL_CFLAGS@ EVAS_GENERAL_LIBS = @EVAS_GENERAL_LIBS@ EVAS_LIBS = @EVAS_LIBS@ EVAS_SSE3_CFLAGS = @EVAS_SSE3_CFLAGS@ EVIL_CFLAGS = @EVIL_CFLAGS@ EVIL_LIBS = @EVIL_LIBS@ EXEEXT = @EXEEXT@ EXOTIC_CFLAGS = @EXOTIC_CFLAGS@ EXOTIC_LIBS = @EXOTIC_LIBS@ FGREP = @FGREP@ FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@ FONTCONFIG_LIBS = @FONTCONFIG_LIBS@ FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ FREETYPE_LIBS = @FREETYPE_LIBS@ FRIBIDI_CFLAGS = @FRIBIDI_CFLAGS@ FRIBIDI_LIBS = @FRIBIDI_LIBS@ GL_EET_CFLAGS = @GL_EET_CFLAGS@ GL_EET_LIBS = @GL_EET_LIBS@ GREP = @GREP@ HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@ HARFBUZZ_LIBS = @HARFBUZZ_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LINEBREAK_CFLAGS = @LINEBREAK_CFLAGS@ LINEBREAK_LIBS = @LINEBREAK_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MODULE_ARCH = @MODULE_ARCH@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ SDL_CFLAGS = @SDL_CFLAGS@ SDL_LIBS = @SDL_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ SVG_CFLAGS = @SVG_CFLAGS@ SVG_LIBS = @SVG_LIBS@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ XCB_CFLAGS = @XCB_CFLAGS@ XCB_GL_CFLAGS = @XCB_GL_CFLAGS@ XCB_GL_LIBS = @XCB_GL_LIBS@ XCB_LIBS = @XCB_LIBS@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_ct_OBJC = @ac_ct_OBJC@ altivec_cflags = @altivec_cflags@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ dlopen_libs = @dlopen_libs@ docdir = @docdir@ dvidir = @dvidir@ edje_cc = @edje_cc@ efl_doxygen = @efl_doxygen@ efl_have_doxygen = @efl_have_doxygen@ evas_engine_buffer_cflags = @evas_engine_buffer_cflags@ evas_engine_buffer_libs = @evas_engine_buffer_libs@ evas_engine_direct3d_cflags = @evas_engine_direct3d_cflags@ evas_engine_direct3d_libs = @evas_engine_direct3d_libs@ evas_engine_directfb_cflags = @evas_engine_directfb_cflags@ evas_engine_directfb_libs = @evas_engine_directfb_libs@ evas_engine_fb_cflags = @evas_engine_fb_cflags@ evas_engine_fb_libs = @evas_engine_fb_libs@ evas_engine_gl_cocoa_cflags = @evas_engine_gl_cocoa_cflags@ evas_engine_gl_cocoa_libs = @evas_engine_gl_cocoa_libs@ evas_engine_gl_common_libs = @evas_engine_gl_common_libs@ evas_engine_gl_sdl_cflags = @evas_engine_gl_sdl_cflags@ evas_engine_gl_sdl_libs = @evas_engine_gl_sdl_libs@ evas_engine_gl_xcb_cflags = @evas_engine_gl_xcb_cflags@ evas_engine_gl_xcb_libs = @evas_engine_gl_xcb_libs@ evas_engine_gl_xlib_cflags = @evas_engine_gl_xlib_cflags@ evas_engine_gl_xlib_libs = @evas_engine_gl_xlib_libs@ evas_engine_psl1ght_cflags = @evas_engine_psl1ght_cflags@ evas_engine_psl1ght_libs = @evas_engine_psl1ght_libs@ evas_engine_software_16_sdl_cflags = @evas_engine_software_16_sdl_cflags@ evas_engine_software_16_sdl_libs = @evas_engine_software_16_sdl_libs@ evas_engine_software_16_wince_cflags = @evas_engine_software_16_wince_cflags@ evas_engine_software_16_wince_libs = @evas_engine_software_16_wince_libs@ evas_engine_software_16_x11_cflags = @evas_engine_software_16_x11_cflags@ evas_engine_software_16_x11_libs = @evas_engine_software_16_x11_libs@ evas_engine_software_8_x11_cflags = @evas_engine_software_8_x11_cflags@ evas_engine_software_8_x11_libs = @evas_engine_software_8_x11_libs@ evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@ evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@ evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@ evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ evas_image_loader_edb_libs = @evas_image_loader_edb_libs@ evas_image_loader_eet_cflags = @evas_image_loader_eet_cflags@ evas_image_loader_eet_libs = @evas_image_loader_eet_libs@ evas_image_loader_generic_cflags = @evas_image_loader_generic_cflags@ evas_image_loader_generic_libs = @evas_image_loader_generic_libs@ evas_image_loader_gif_cflags = @evas_image_loader_gif_cflags@ evas_image_loader_gif_libs = @evas_image_loader_gif_libs@ evas_image_loader_ico_cflags = @evas_image_loader_ico_cflags@ evas_image_loader_ico_libs = @evas_image_loader_ico_libs@ evas_image_loader_jpeg_cflags = @evas_image_loader_jpeg_cflags@ evas_image_loader_jpeg_libs = @evas_image_loader_jpeg_libs@ evas_image_loader_pmaps_cflags = @evas_image_loader_pmaps_cflags@ evas_image_loader_pmaps_libs = @evas_image_loader_pmaps_libs@ evas_image_loader_png_cflags = @evas_image_loader_png_cflags@ evas_image_loader_png_libs = @evas_image_loader_png_libs@ evas_image_loader_psd_cflags = @evas_image_loader_psd_cflags@ evas_image_loader_psd_libs = @evas_image_loader_psd_libs@ evas_image_loader_svg_cflags = @evas_image_loader_svg_cflags@ evas_image_loader_svg_libs = @evas_image_loader_svg_libs@ evas_image_loader_tga_cflags = @evas_image_loader_tga_cflags@ evas_image_loader_tga_libs = @evas_image_loader_tga_libs@ evas_image_loader_tiff_cflags = @evas_image_loader_tiff_cflags@ evas_image_loader_tiff_libs = @evas_image_loader_tiff_libs@ evas_image_loader_wbmp_cflags = @evas_image_loader_wbmp_cflags@ evas_image_loader_wbmp_libs = @evas_image_loader_wbmp_libs@ evas_image_loader_xpm_cflags = @evas_image_loader_xpm_cflags@ evas_image_loader_xpm_libs = @evas_image_loader_xpm_libs@ exec_prefix = @exec_prefix@ have_evas_engine_gl_x11 = @have_evas_engine_gl_x11@ have_evas_engine_gl_xcb = @have_evas_engine_gl_xcb@ have_evas_engine_gl_xlib = @have_evas_engine_gl_xlib@ have_evas_engine_software_x11 = @have_evas_engine_software_x11@ have_evas_engine_software_xcb = @have_evas_engine_software_xcb@ have_evas_engine_software_xlib = @have_evas_engine_software_xlib@ have_lcov = @have_lcov@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_enable_auto_import = @lt_enable_auto_import@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgconfig_requires_private = @pkgconfig_requires_private@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pthread_cflags = @pthread_cflags@ pthread_libs = @pthread_libs@ release_info = @release_info@ requirement_evas = @requirement_evas@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ shm_open_libs = @shm_open_libs@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ version_info = @version_info@ MAINTAINERCLEANFILES = Makefile.in SUBDIRS = $(am__append_1) all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/static_deps/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/static_deps/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs # This directory's subdirectories are mostly independent; you can cd # into them and run 'make' without going through this Makefile. # To change the values of 'make' variables: instead of editing Makefiles, # (1) if the variable is set in 'config.status', edit 'config.status' # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. $(am__recursive_targets): @fail=; \ if $(am__make_keepgoing); then \ failcom='fail=yes'; \ else \ failcom='exit 1'; \ fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-recursive TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-recursive CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-recursive cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: .MAKE: $(am__recursive_targets) install-am install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \ check-am clean clean-generic clean-libtool cscopelist-am ctags \ ctags-am distclean distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ installdirs-am maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: evas-1.7.9/src/static_deps/liblinebreak/0000775000175000017500000000000012234557316015215 500000000000000evas-1.7.9/src/static_deps/liblinebreak/Makefile.in0000664000175000017500000006215212234557306017207 00000000000000# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/static_deps/liblinebreak DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/depcomp $(noinst_HEADERS) AUTHORS ChangeLog NEWS \ README ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/efl_attribute.m4 \ $(top_srcdir)/m4/efl_coverage.m4 \ $(top_srcdir)/m4/efl_doxygen.m4 \ $(top_srcdir)/m4/efl_fnmatch.m4 \ $(top_srcdir)/m4/efl_path_max.m4 \ $(top_srcdir)/m4/efl_shm_open.m4 $(top_srcdir)/m4/efl_tests.m4 \ $(top_srcdir)/m4/evas_check_engine.m4 \ $(top_srcdir)/m4/evas_check_loader.m4 \ $(top_srcdir)/m4/evas_converter.m4 \ $(top_srcdir)/m4/evas_dither.m4 \ $(top_srcdir)/m4/evas_scaler.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) liblinebreak_la_LIBADD = am_liblinebreak_la_OBJECTS = linebreak.lo linebreakdata.lo \ linebreakdef.lo wordbreak.lo liblinebreak_la_OBJECTS = $(am_liblinebreak_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(liblinebreak_la_SOURCES) DIST_SOURCES = $(liblinebreak_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac HEADERS = $(noinst_HEADERS) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHECK_CFLAGS = @CHECK_CFLAGS@ CHECK_LIBS = @CHECK_LIBS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@ DIRECTFB_LIBS = @DIRECTFB_LIBS@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ ECORE_EVAS_CFLAGS = @ECORE_EVAS_CFLAGS@ ECORE_EVAS_LIBS = @ECORE_EVAS_LIBS@ EDB_CFLAGS = @EDB_CFLAGS@ EDB_LIBS = @EDB_LIBS@ EDJE_CFLAGS = @EDJE_CFLAGS@ EDJE_LIBS = @EDJE_LIBS@ EET_CFLAGS = @EET_CFLAGS@ EET_LIBS = @EET_LIBS@ EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@ EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@ EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@ EFL_SHM_OPEN_LIBS = @EFL_SHM_OPEN_LIBS@ EGREP = @EGREP@ EINA_CFLAGS = @EINA_CFLAGS@ EINA_LIBS = @EINA_LIBS@ EVAS_CFLAGS = @EVAS_CFLAGS@ EVAS_GENERAL_CFLAGS = @EVAS_GENERAL_CFLAGS@ EVAS_GENERAL_LIBS = @EVAS_GENERAL_LIBS@ EVAS_LIBS = @EVAS_LIBS@ EVAS_SSE3_CFLAGS = @EVAS_SSE3_CFLAGS@ EVIL_CFLAGS = @EVIL_CFLAGS@ EVIL_LIBS = @EVIL_LIBS@ EXEEXT = @EXEEXT@ EXOTIC_CFLAGS = @EXOTIC_CFLAGS@ EXOTIC_LIBS = @EXOTIC_LIBS@ FGREP = @FGREP@ FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@ FONTCONFIG_LIBS = @FONTCONFIG_LIBS@ FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ FREETYPE_LIBS = @FREETYPE_LIBS@ FRIBIDI_CFLAGS = @FRIBIDI_CFLAGS@ FRIBIDI_LIBS = @FRIBIDI_LIBS@ GL_EET_CFLAGS = @GL_EET_CFLAGS@ GL_EET_LIBS = @GL_EET_LIBS@ GREP = @GREP@ HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@ HARFBUZZ_LIBS = @HARFBUZZ_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LINEBREAK_CFLAGS = @LINEBREAK_CFLAGS@ LINEBREAK_LIBS = @LINEBREAK_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MODULE_ARCH = @MODULE_ARCH@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ SDL_CFLAGS = @SDL_CFLAGS@ SDL_LIBS = @SDL_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ SVG_CFLAGS = @SVG_CFLAGS@ SVG_LIBS = @SVG_LIBS@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ XCB_CFLAGS = @XCB_CFLAGS@ XCB_GL_CFLAGS = @XCB_GL_CFLAGS@ XCB_GL_LIBS = @XCB_GL_LIBS@ XCB_LIBS = @XCB_LIBS@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_ct_OBJC = @ac_ct_OBJC@ altivec_cflags = @altivec_cflags@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ dlopen_libs = @dlopen_libs@ docdir = @docdir@ dvidir = @dvidir@ edje_cc = @edje_cc@ efl_doxygen = @efl_doxygen@ efl_have_doxygen = @efl_have_doxygen@ evas_engine_buffer_cflags = @evas_engine_buffer_cflags@ evas_engine_buffer_libs = @evas_engine_buffer_libs@ evas_engine_direct3d_cflags = @evas_engine_direct3d_cflags@ evas_engine_direct3d_libs = @evas_engine_direct3d_libs@ evas_engine_directfb_cflags = @evas_engine_directfb_cflags@ evas_engine_directfb_libs = @evas_engine_directfb_libs@ evas_engine_fb_cflags = @evas_engine_fb_cflags@ evas_engine_fb_libs = @evas_engine_fb_libs@ evas_engine_gl_cocoa_cflags = @evas_engine_gl_cocoa_cflags@ evas_engine_gl_cocoa_libs = @evas_engine_gl_cocoa_libs@ evas_engine_gl_common_libs = @evas_engine_gl_common_libs@ evas_engine_gl_sdl_cflags = @evas_engine_gl_sdl_cflags@ evas_engine_gl_sdl_libs = @evas_engine_gl_sdl_libs@ evas_engine_gl_xcb_cflags = @evas_engine_gl_xcb_cflags@ evas_engine_gl_xcb_libs = @evas_engine_gl_xcb_libs@ evas_engine_gl_xlib_cflags = @evas_engine_gl_xlib_cflags@ evas_engine_gl_xlib_libs = @evas_engine_gl_xlib_libs@ evas_engine_psl1ght_cflags = @evas_engine_psl1ght_cflags@ evas_engine_psl1ght_libs = @evas_engine_psl1ght_libs@ evas_engine_software_16_sdl_cflags = @evas_engine_software_16_sdl_cflags@ evas_engine_software_16_sdl_libs = @evas_engine_software_16_sdl_libs@ evas_engine_software_16_wince_cflags = @evas_engine_software_16_wince_cflags@ evas_engine_software_16_wince_libs = @evas_engine_software_16_wince_libs@ evas_engine_software_16_x11_cflags = @evas_engine_software_16_x11_cflags@ evas_engine_software_16_x11_libs = @evas_engine_software_16_x11_libs@ evas_engine_software_8_x11_cflags = @evas_engine_software_8_x11_cflags@ evas_engine_software_8_x11_libs = @evas_engine_software_8_x11_libs@ evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@ evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@ evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@ evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ evas_image_loader_edb_libs = @evas_image_loader_edb_libs@ evas_image_loader_eet_cflags = @evas_image_loader_eet_cflags@ evas_image_loader_eet_libs = @evas_image_loader_eet_libs@ evas_image_loader_generic_cflags = @evas_image_loader_generic_cflags@ evas_image_loader_generic_libs = @evas_image_loader_generic_libs@ evas_image_loader_gif_cflags = @evas_image_loader_gif_cflags@ evas_image_loader_gif_libs = @evas_image_loader_gif_libs@ evas_image_loader_ico_cflags = @evas_image_loader_ico_cflags@ evas_image_loader_ico_libs = @evas_image_loader_ico_libs@ evas_image_loader_jpeg_cflags = @evas_image_loader_jpeg_cflags@ evas_image_loader_jpeg_libs = @evas_image_loader_jpeg_libs@ evas_image_loader_pmaps_cflags = @evas_image_loader_pmaps_cflags@ evas_image_loader_pmaps_libs = @evas_image_loader_pmaps_libs@ evas_image_loader_png_cflags = @evas_image_loader_png_cflags@ evas_image_loader_png_libs = @evas_image_loader_png_libs@ evas_image_loader_psd_cflags = @evas_image_loader_psd_cflags@ evas_image_loader_psd_libs = @evas_image_loader_psd_libs@ evas_image_loader_svg_cflags = @evas_image_loader_svg_cflags@ evas_image_loader_svg_libs = @evas_image_loader_svg_libs@ evas_image_loader_tga_cflags = @evas_image_loader_tga_cflags@ evas_image_loader_tga_libs = @evas_image_loader_tga_libs@ evas_image_loader_tiff_cflags = @evas_image_loader_tiff_cflags@ evas_image_loader_tiff_libs = @evas_image_loader_tiff_libs@ evas_image_loader_wbmp_cflags = @evas_image_loader_wbmp_cflags@ evas_image_loader_wbmp_libs = @evas_image_loader_wbmp_libs@ evas_image_loader_xpm_cflags = @evas_image_loader_xpm_cflags@ evas_image_loader_xpm_libs = @evas_image_loader_xpm_libs@ exec_prefix = @exec_prefix@ have_evas_engine_gl_x11 = @have_evas_engine_gl_x11@ have_evas_engine_gl_xcb = @have_evas_engine_gl_xcb@ have_evas_engine_gl_xlib = @have_evas_engine_gl_xlib@ have_evas_engine_software_x11 = @have_evas_engine_software_x11@ have_evas_engine_software_xcb = @have_evas_engine_software_xcb@ have_evas_engine_software_xlib = @have_evas_engine_software_xlib@ have_lcov = @have_lcov@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_enable_auto_import = @lt_enable_auto_import@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgconfig_requires_private = @pkgconfig_requires_private@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pthread_cflags = @pthread_cflags@ pthread_libs = @pthread_libs@ release_info = @release_info@ requirement_evas = @requirement_evas@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ shm_open_libs = @shm_open_libs@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ version_info = @version_info@ MAINTAINERCLEANFILES = Makefile.in #noinst_PROGRAMS = filter_dup noinst_HEADERS = linebreak.h linebreakdef.h wordbreakdef.h wordbreak.h noinst_LTLIBRARIES = liblinebreak.la liblinebreak_la_SOURCES = \ linebreak.c \ linebreakdata.c \ linebreakdef.c \ wordbreak.c \ wordbreakdata.x EXTRA_DIST = \ LineBreak1.sed \ LineBreak2.sed \ linebreakdata1.tmpl \ linebreakdata2.tmpl \ linebreakdata3.tmpl \ LICENCE all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/static_deps/liblinebreak/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/static_deps/liblinebreak/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } liblinebreak.la: $(liblinebreak_la_OBJECTS) $(liblinebreak_la_DEPENDENCIES) $(EXTRA_liblinebreak_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(liblinebreak_la_OBJECTS) $(liblinebreak_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/linebreak.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/linebreakdata.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/linebreakdef.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wordbreak.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(HEADERS) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES cscopelist-am ctags \ ctags-am distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: evas-1.7.9/src/static_deps/liblinebreak/wordbreak.c0000664000175000017500000002503512175475547017277 00000000000000/* vim: set tabstop=4 shiftwidth=4: */ /* * Word breaking in a Unicode sequence. Designed to be used in a * generic text renderer. * * Copyright (C) 2011-2011 Tom Hacohen * * This software is provided 'as-is', without any express or implied * warranty. In no event will the author be held liable for any damages * arising from the use of this software. * * Permission is granted to anyone to use this software for any purpose, * including commercial applications, and to alter it and redistribute * it freely, subject to the following restrictions: * * 1. The origin of this software must not be misrepresented; you must * not claim that you wrote the original software. If you use this * software in a product, an acknowledgement in the product * documentation would be appreciated but is not required. * 2. Altered source versions must be plainly marked as such, and must * not be misrepresented as being the original software. * 3. This notice may not be removed or altered from any source * distribution. * * The main reference is Unicode Standard Annex 29 (UAX #29): * * * When this library was designed, this annex was at Revision 17, for * Unicode 6.0.0: * * * The Unicode Terms of Use are available at * */ /** * @file wordbreak.c * * Implementation of the word breaking algorithm as described in Unicode * Standard Annex 29. * * @version 2.0, 2011/12/12 * @author Tom Hacohen */ #include #include #include #include "linebreak.h" #include "linebreakdef.h" #include "wordbreak.h" #include "wordbreakdata.x" #define ARRAY_LEN(x) (sizeof(x) / sizeof(x[0])) /* Init the wordbreak internals. */ void init_wordbreak(void) { /* Currently does nothing, may be needed in the future. */ return; } /** * Gets the word breaking class of a character. * * @param ch character to check * @param wbp pointer to the wbp breaking properties array * @param len the size of the wbp array in number of items. * @return the word breaking class if found; \c WBP_Any otherwise */ static enum WordBreakClass get_char_wb_class( utf32_t ch, struct WordBreakProperties *wbp, size_t len) { int min = 0; int max = len - 1; int mid; do { mid = (min + max) / 2; if (ch < wbp[mid].start) max = mid - 1; else if (ch > wbp[mid].end) min = mid + 1; else return wbp[mid].prop; } while (min <= max); return WBP_Any; } /** * Sets the break types in brks starting from posLast up to posStop. * * It sets the inside chars to #WORDBREAK_INSIDECHAR and the rest to brkType. * Assumes brks is initialized - all the cells with #WORDBREAK_NOBREAK are * cells that we really don't want to break after. * * @param s the string * @param brks[out] the breaks array to fill. * @param posStart the start position * @param posEnd the end position * @param len the length of the string * @param brkType the breaks type to use * @param get_next_char function to get the next UTF-32 character */ static void set_brks_to(const void *s, char *brks, size_t posStart, size_t posEnd, size_t len, char brkType, get_next_char_t get_next_char) { size_t posCur = posStart; while (posCur < posEnd) { get_next_char(s, len, &posCur); for ( ; posStart < posCur - 1; ++posStart) { brks[posStart] = WORDBREAK_INSIDECHAR; } assert(posStart == posCur - 1); /* Only set it if we haven't set it not to break before. */ if (brks[posStart] != WORDBREAK_NOBREAK) brks[posStart] = brkType; posStart = posCur; } } /* Checks to see if newline, cr, or lf. for WB3a and b */ #define IS_WB3ab(cls) ((cls == WBP_Newline) || (cls == WBP_CR) || \ (cls == WBP_LF)) /** * Sets the word breaking information for a generic input string. * * @param[in] s input string * @param[in] len length of the input * @param[in] lang language of the input * @param[out] brks pointer to the output breaking data, containing * #WORDBREAK_BREAK, #WORDBREAK_NOBREAK, or * #WORDBREAK_INSIDEACHAR * @param[in] get_next_char function to get the next UTF-32 character */ static void set_wordbreaks( const void *s, size_t len, const char *lang, char *brks, get_next_char_t get_next_char) { /* Previous class */ enum WordBreakClass p_cls = WBP_Undefined; /* Strong previous class. */ enum WordBreakClass sp_cls = WBP_Undefined; utf32_t ch; size_t posCur = 0; size_t posCurSt = 0; size_t posLast = 0; /* FIXME: unused atm. */ (void) lang; /* Init brks */ memset(brks, WORDBREAK_BREAK, len); ch = get_next_char(s, len, &posCur); /* WB3a, WB3b are implied. */ for ( ; ch != EOS ; ) { /* Current class */ enum WordBreakClass c_cls; c_cls = get_char_wb_class(ch, wb_prop_default, ARRAY_LEN(wb_prop_default)); switch (c_cls) { case WBP_CR: set_brks_to(s, brks, posLast, posCurSt, len, WORDBREAK_BREAK, get_next_char); sp_cls = c_cls; posLast = posCurSt; break; case WBP_LF: if (sp_cls == WBP_CR) /* WB3 */ { set_brks_to(s, brks, posLast, posCurSt, len, WORDBREAK_NOBREAK, get_next_char); sp_cls = c_cls; posLast = posCurSt; } sp_cls = c_cls; posLast = posCurSt; break; case WBP_Newline: /* WB3a, WB3b */ set_brks_to(s, brks, posLast, posCurSt, len, WORDBREAK_BREAK, get_next_char); sp_cls = c_cls; posLast = posCurSt; break; case WBP_Extend: case WBP_Format: /* WB4 - If not the first char/after a newline (W3ab), * skip this class, set it to be the same as the prev, and mark * brks not to break before them. */ if ((sp_cls == WBP_Undefined) || IS_WB3ab(sp_cls)) { set_brks_to(s, brks, posLast, posCurSt, len, WORDBREAK_BREAK, get_next_char); sp_cls = c_cls; } else { /* It's surely not the first */ brks[posCurSt - 1] = WORDBREAK_NOBREAK; /* "inherit" the previous class. */ c_cls = p_cls; } break; case WBP_Katakana: if ((sp_cls == WBP_Katakana) || /* WB13 */ (sp_cls == WBP_ExtendNumLet)) /* WB13b */ { set_brks_to(s, brks, posLast, posCurSt, len, WORDBREAK_NOBREAK, get_next_char); } /* No rule found, reset */ else { set_brks_to(s, brks, posLast, posCurSt, len, WORDBREAK_BREAK, get_next_char); } sp_cls = c_cls; posLast = posCurSt; break; case WBP_ALetter: if ((sp_cls == WBP_ALetter) || /* WB5,6,7 */ ((sp_cls == WBP_Numeric) && (p_cls == WBP_Numeric)) || /* WB10 */ (sp_cls == WBP_ExtendNumLet)) /* WB13b */ { set_brks_to(s, brks, posLast, posCurSt, len, WORDBREAK_NOBREAK, get_next_char); } /* No rule found, reset */ else { set_brks_to(s, brks, posLast, posCurSt, len, WORDBREAK_BREAK, get_next_char); } sp_cls = c_cls; posLast = posCurSt; break; case WBP_MidNumLet: if ((p_cls == WBP_ALetter) || /* WBP6,7 */ (p_cls == WBP_Numeric)) /* WBP11,12 */ { /* Go on */ } else { set_brks_to(s, brks, posLast, posCurSt, len, WORDBREAK_BREAK, get_next_char); sp_cls = c_cls; posLast = posCurSt; } break; case WBP_MidLetter: if (p_cls == WBP_ALetter) /* WBP6,7 */ { /* Go on */ } else { set_brks_to(s, brks, posLast, posCurSt, len, WORDBREAK_BREAK, get_next_char); sp_cls = c_cls; posLast = posCurSt; } break; case WBP_MidNum: if (p_cls == WBP_Numeric) /* WBP11,12 */ { /* Go on */ } else { set_brks_to(s, brks, posLast, posCurSt, len, WORDBREAK_BREAK, get_next_char); sp_cls = c_cls; posLast = posCurSt; } break; case WBP_Numeric: if ((sp_cls == WBP_Numeric) || /* WB8,11,12 */ ((sp_cls == WBP_ALetter) && (p_cls == WBP_ALetter)) || /* WB9 */ (sp_cls == WBP_ExtendNumLet)) /* WB13b */ { set_brks_to(s, brks, posLast, posCurSt, len, WORDBREAK_NOBREAK, get_next_char); } /* No rule found, reset */ else { set_brks_to(s, brks, posLast, posCurSt, len, WORDBREAK_BREAK, get_next_char); } sp_cls = c_cls; posLast = posCurSt; break; case WBP_ExtendNumLet: /* WB13a,13b */ if ((sp_cls == p_cls) && ((p_cls == WBP_ALetter) || (p_cls == WBP_Numeric) || (p_cls == WBP_Katakana) || (p_cls == WBP_ExtendNumLet))) { set_brks_to(s, brks, posLast, posCurSt, len, WORDBREAK_NOBREAK, get_next_char); } /* No rule found, reset */ else { set_brks_to(s, brks, posLast, posCurSt, len, WORDBREAK_BREAK, get_next_char); } sp_cls = c_cls; posLast = posCurSt; break; case WBP_Any: /* Allow breaks and reset */ set_brks_to(s, brks, posLast, posCurSt, len, WORDBREAK_BREAK, get_next_char); sp_cls = c_cls; posLast = posCurSt; break; default: /* Error, should never get here! */ assert(0); break; } p_cls = c_cls; posCurSt = posCur; ch = get_next_char(s, len, &posCur); } /* WB2 */ set_brks_to(s, brks, posLast, posCur, len, WORDBREAK_BREAK, get_next_char); } /** * Sets the word breaking information for a UTF-8 input string. * * @param[in] s input UTF-8 string * @param[in] len length of the input * @param[in] lang language of the input * @param[out] brks pointer to the output breaking data, containing * #WORDBREAK_BREAK, #WORDBREAK_NOBREAK, or * #WORDBREAK_INSIDEACHAR */ void set_wordbreaks_utf8( const utf8_t *s, size_t len, const char *lang, char *brks) { set_wordbreaks(s, len, lang, brks, (get_next_char_t)lb_get_next_char_utf8); } /** * Sets the word breaking information for a UTF-16 input string. * * @param[in] s input UTF-16 string * @param[in] len length of the input * @param[in] lang language of the input * @param[out] brks pointer to the output breaking data, containing * #WORDBREAK_BREAK, #WORDBREAK_NOBREAK, or * #WORDBREAK_INSIDEACHAR */ void set_wordbreaks_utf16( const utf16_t *s, size_t len, const char *lang, char *brks) { set_wordbreaks(s, len, lang, brks, (get_next_char_t)lb_get_next_char_utf16); } /** * Sets the word breaking information for a UTF-32 input string. * * @param[in] s input UTF-32 string * @param[in] len length of the input * @param[in] lang language of the input * @param[out] brks pointer to the output breaking data, containing * #WORDBREAK_BREAK, #WORDBREAK_NOBREAK, or * #WORDBREAK_INSIDEACHAR */ void set_wordbreaks_utf32( const utf32_t *s, size_t len, const char *lang, char *brks) { set_wordbreaks(s, len, lang, brks, (get_next_char_t)lb_get_next_char_utf32); } evas-1.7.9/src/static_deps/liblinebreak/NEWS0000664000175000017500000000232312175475547015645 00000000000000New in 2.0 - Update the algorithm and data according to UAX #14-24 and LineBreak-5.2.0.txt - Rename some functions to reduce namespace pollution - Make Doxygen documentation better New in 1.2 - Fix the bug that an assertion in code can fail if an invalid UTF-8 or UTF-16 sequence is encountered near the end of input - Remove the specialization of right single quotation mark as closing punctuation mark in English, French, and Spanish, because it can be used as apostrophe - Make Doxygen documentation better New in 1.1 - Make get_lb_prop_lang static and not an exported symbol - Define is_line_breakable to alias to is_breakable - Declare get_next_char_utf* will be changed to lb_get_next_char_utf* - Move the declarations of get_next_char_utf* from linebreak.h to linebreakdef.h - Add the function documentation comments to the header files New in 1.0 - Update the line breaking data according to UAX #14-22 and LineBreak-5.1.0.txt - Add autoconfiscation support (./configure, make, make install) - Add Makefile for MSVC First public release (0.9.6, or 20080421) - Implement line breaking algorithm according to UAX #14-19 - Line breaking data is generated from LineBreak-5.0.0.txt - Makefile only supports GCC evas-1.7.9/src/static_deps/liblinebreak/README0000664000175000017500000000451612175475547016034 00000000000000NOTICE: This is the original version, that was adapted a bit (mostly build related) in order to work nicely with Evas. L I B L I N E B R E A K ======================= Overview -------- This is the README file for liblinebreak, an implementation of the line breaking algorithm as described in Unicode 5.2.0 Standard Annex 14, Revision 24, available at Check this URL for up-to-date information: Licence ------- This library is released under an open-source licence, the zlib/libpng licence. Please check the file LICENCE for details. Apart from using the algorithm, part of the code is derived from the data provided under And the Unicode Terms of Use may apply: Installation ------------ There are three ways to build the library: 1) On *NIX systems supported by the autoconfiscation tools, do the normal ./configure make sudo make install to build and install both the dynamic and static libraries. In addition, one may - type `make doc' to generate the doxygen documentation; or - type `make linebreakdata' to regenerate linebreakdata.c from LineBreak.txt. 2) On systems where GCC and Binutils are supported, one can type cp -p Makefile.gcc Makefile make to build the static library. In addition, one may - type `make debug' or `make release' to explicitly generate the debug or release build; - type `make doc' to generate the doxygen documentation; or - type `make linebreakdata' to regenerate linebreakdata.c from LineBreak.txt. 3) On Windows, apart from using method 1 (Cygwin/MSYS) and method 2 (MinGW), MSVC can also be used. Type nmake -f Makefile.msvc to build the static library. By default the debug release is built. To build the release version nmake -f Makefile.msvc CFG="linebreak - Win32 Release" Documentation ------------- Check the generated document doc/html/linebreak_8h.html for the public interfaces exposed to applications. $Id: README,v 1.6 2009/11/29 08:09:13 adah Exp $ vim:autoindent:expandtab:formatoptions=tcqlmn:textwidth=72: evas-1.7.9/src/static_deps/liblinebreak/linebreakdata2.tmpl0000664000175000017500000000025512175475547020716 00000000000000*/ #include "linebreak.h" #include "linebreakdef.h" /** Default line breaking properties as from the Unicode Web site. */ struct LineBreakProperties lb_prop_default[] = { evas-1.7.9/src/static_deps/liblinebreak/linebreakdata1.tmpl0000664000175000017500000000005712175475547020715 00000000000000/* The content of this file is generated from: evas-1.7.9/src/static_deps/liblinebreak/ChangeLog0000664000175000017500000003161312175475547016724 000000000000002010-01-03 Wu Yongwei * LICENCE: Update the copyright year. 2010-01-03 Wu Yongwei * NEWS: Add information about the 2.0 release. 2010-01-03 Wu Yongwei * Doxyfile (PROJECT_NUMBER): Set to `2.0'. (HAVE_DOT): Set to `YES'. 2010-01-03 Wu Yongwei * linebreak.c: Update the version number in comment to 2.0. * linebreak.h: Ditto. * linebreakdef.c: Ditto. * linebreakdef.h: Ditto. 2009-12-17 Wu Yongwei Change the values of enum BreakAction to the same length. * linebreak.c (DIRECT_BRK): Rename to DIR_BRK. (INDIRECT_BRK): Rename to IND_BRK. (CM_INDIRECT_BRK): Rename to CMI_BRK. (CM_PROHIBITED_BRK): Rename to CMP_BRK. (PROHIBITED_BRK): Rename to PRH_BRK. 2009-11-29 Wu Yongwei * Doxyfile (TAB_SIZE): Set to the correct size `4', as used in the source files. 2009-11-29 Wu Yongwei Update files according to UAX #14-24, for Unicode 5.2.0. * linebreak.c: Update comments about UAX #14. * linebreak.h: Ditto. * linebreakdef.c: Ditto. * linebreakdef.h: Ditto. (LBP_CP): New enumerator for the new `CP' class as defined in UAX #14-24. * linebreak.c (baTable): Update for the new class `CP'. * linebreakdata.c: Regenerate from LineBreak-5.2.0.txt. * README: Update the reference to UAX #14-24, for Unicode 5.2.0. 2009-05-03 Wu Yongwei * NEWS: Add information about the 1.2 release. 2009-04-30 Wu Yongwei Optimize the Doxygen output. * linebreak.c (lb_prop_index): Adjust its definition format slightly. 2009-04-30 Wu Yongwei * Doxyfile (USE_WINDOWS_ENCODING): Remove obsolete tag. (DETAILS_AT_TOP): Ditto. (MAX_DOT_GRAPH_WIDTH): Ditto. (MAX_DOT_GRAPH_HEIGHT): Ditto. (REFERENCED_BY_RELATION): Set to `NO'. (REFERENCES_RELATION): Ditto. (EXCLUDE): Add `filter_dup.c'. 2009-04-28 Wu Yongwei * linebreak.c (lb_get_next_char_utf8): Fix the issue that the index can point to the middle of a UTF-8 sequence if End of String (EOS) is encountered prematurely (thanks to Nikolay Pultsin and Rick Xu). (lb_get_next_char_utf16): Fix the issue that the index can point to the middle of a UTF-16 surrogate pair if EOS is encountered prematurely. 2009-04-20 Wu Yongwei * linebreakdef.c (lb_prop_English): Remove the specialization of right single quotation mark as closing punctuation mark, because it can be used as apostrophe. (lb_prop_Spanish): Ditto. (lb_prop_French): Ditto. 2009-04-09 Wu Yongwei * Makefile.msvc: Make the `clean' target work on MSVC versions other than 6.0; do not use precompiled header. 2009-03-07 Wu Yongwei * linebreak.h: Correct the wrong date in the documentation comment. * linebreakdef.h: Ditto. 2009-02-10 Wu Yongwei * configure.ac (AC_INIT): Increase the version to 2.0. * Makefile.am (liblinebreak_la_LDFLAGS): Set the version-info to `2:0'. 2009-02-10 Wu Yongwei * linebreak.h (LINEBREAK_VERSION): New macro. (linebreak_version): New global constant declaration. * linebreak.c (linebreak_version): New global constant definition. 2009-02-10 Wu Yongwei Reduce namespace pollution. * linebreak.c (get_lb_prop_lang): Mark as static. (get_next_char_utf8): Rename to lb_get_next_char_utf8. (get_next_char_utf16): Rename to lb_get_next_char_utf32. (get_next_char_utf32): Rename to lb_get_next_char_utf32. (is_breakable): Rename to is_line_breakable. * linebreak.h (get_next_char_utf8): Remove the function prototype declaration. (get_next_char_utf16): Ditto. (get_next_char_utf32): Ditto. (is_breakable): Rename to is_line_breakable. * linebreakdef.h (lb_get_next_char_utf8): Add the function prototype declaration. (lb_get_next_char_utf16): Ditto. (lb_get_next_char_utf32): Ditto. 2009-02-06 Wu Yongwei * NEWS: Add information about the 1.1 release. 2009-01-02 Wu Yongwei * Makefile.am (EXTRA_DIST): Add the missing `LICENCE' file. 2008-12-31 Wu Yongwei * linebreak.c: Update the version number in comment to 1.0. * linebreak.h: Ditto. * linebreakdef.c: Ditto. * linebreakdef.h: Ditto. 2008-12-31 Wu Yongwei * NEWS: Update for the 1.0 release. 2008-12-31 Wu Yongwei * README: Correct two typos. 2008-12-31 Wu Yongwei * README: Add the online URL reference. 2008-12-30 Wu Yongwei * README: Update the reference to UAX #14-22, for Unicode 5.1.0. 2008-12-13 Wu Yongwei Update files according to UAX #14-22, for Unicode 5.1.0. * linebreak.c (baTable): Update according to Table 2 of UAX #14-22. * linebreakdef.c (lb_prop_Spanish): Remove the unnecessary customization for inverted marks in Spanish. * linebreakdata.c: Regenerate from LineBreak-5.1.0.txt. * linebreak.h: Update comment only. * linebreakdef.h: Ditto. 2008-12-12 Wu Yongwei * README: Update for the new build methods and better readability. 2008-12-12 Wu Yongwei * Makefile.msvc: Correct the inconsistent naming in the output message. 2008-12-12 Wu Yongwei * configure.ac (AM_INIT_AUTOMAKE): Mark `foreign'. * bootstrap: New file. * purge: New file. * Makefile.gcc (purge): Remove this target. 2008-12-10 Wu Yongwei * NEWS: New file. 2008-12-10 Wu Yongwei * AUTHORS: New file. 2008-12-10 Wu Yongwei * Makefile.gcc (purge): New phony target to purge files generated by autoconfiscation. 2008-12-10 Thomas Klausner * configure.ac: New file. * Makefile.am: New file. 2008-12-10 Wu Yongwei * Doxyfile (OUTPUT_DIRECTORY): Set to `doc'. (ALPHABETICAL_INDEX): Set to `YES'. 2008-12-09 Wu Yongwei * Makefile.msvc: New file. 2008-12-09 Wu Yongwei * Makefile: Remove (to become Makefile.gcc). * Makefile.gcc: New file (was Makefile). 2008-12-07 Wu Yongwei * linebreak.c: Adjust the comment that refers to Unicode Annex 14. * linebreak.h: Ditto. * linebreakdef.c: Ditto. * linebreakdef.h: Ditto. 2008-12-07 Wu Yongwei Use only POSIX basic regexp to ensure maximum portability (issues have been found on Mac OS X, where GNU extensions do not work). * LineBreak1.sed: Replace `[:xdigit:]' with `0-9A-F', and `\+' with `\{1,\}'. * LineBreak2.sed: Ditto. 2008-12-07 Wu Yongwei * Makefile: Replace `*.exe' with `filter_dup$(EXEEXT)', since the extension `.exe' is specific to Windows. 2008-04-20 Wu Yongwei Add README and LICENCE files, as well as a Doxyfile to generate documents. * README: New file. * LICENCE: New file. * Doxyfile: New file. * Makefile (doc): Add new phony target. 2008-04-04 Wu Yongwei Remove the English override for plus sign: it is better treated in the text breaking program (see ../breaktext/ for an example). * linebreakdef.c (lb_prop_English): Remove the line for plus sign. 2008-03-29 Wu Yongwei * Makefile: Correct the dependency-making rules when OLDGCC=Y. 2008-03-23 Wu Yongwei * Makefile (clean): Do not remove *.exe and tags here. (distclean): Remove *.exe and tags. 2008-03-23 Wu Yongwei Remove the English override for solidus: it is better treated in the text breaking program (see ../breaktext/ for an example). * linebreakdef.c (lb_prop_English): Remove the line for solidus. 2008-03-16 Wu Yongwei Rename init_linebreak_prop_index to init_linebreak for future safety; make visible certain functions that are potentially useful. * linebreak.c (init_linebreak_prop_index): Rename to init_linebreak. (get_next_char_t): Move to linebreakdef.h. (get_next_char_utf8): Make non-static. (get_next_char_utf16): Ditto. (get_next_char_utf32): Ditto. (set_linebreaks): Ditto. * linebreak.h (init_linebreak_prop_index): Rename to init_linebreak. (get_next_char_utf8): Add the function prototype. (get_next_char_utf16): Ditto. (get_next_char_utf32): Ditto. * linebreakdef.h (get_next_char_t): Add the typedef. (set_linebreaks): Add the function prototype. 2008-03-16 Wu Yongwei * Makefile (OLDGCC): Add support for GCC 2.95.3 (when OLDGCC=Y). 2008-03-15 Wu Yongwei * linebreak.c (set_linebreaks): Fix a bug that `==' was wrongly used for `='. 2008-03-05 Wu Yongwei Improve the performance by reducing the look-ups of the language-specific line breaking properties array from the language name (thanks to Nikolay Pultsin). * linebreak.c (get_lb_prop_lang): New function. (get_char_lb_class_lang): Change the second parameter from the language name to the line breaking properties array. (set_linebreaks): Look up the language-specific line breaking properties array from the language name only once in one function call. 2008-03-03 Wu Yongwei Make minor adjustments in code and comments. * linebreak.c: Adjust the doc comments. (init_linebreak_prop_index): Modify a conditional to make it more robust and consistent. * linebreakdef.c (lb_prop_lang_map): Replace the pointer lb_prop_default with NULL, since the value is never used. 2008-03-03 Wu Yongwei Accelerate get_char_lb_class for invalid Unicode code points. * linebreak.c (get_char_lb_class): Adjust the conditionals so that getting the line breaking class for an invalid code point is much faster, which requires the array of line breaking properties be sorted. * linebreakdef.h: Adjust a comment that the array of line break properties must be sorted. 2008-03-02 Wu Yongwei Change the values of enum BreakAction to more complete forms. * linebreak.c (INDRCT_BRK): Rename to INDIRECT_BRK. (CM_INDRCT_BRK): Rename to CM_INDIRECT_BRK. (CM_PROHIBTD_BRK): Rename to CM_PROHIBITED_BRK. (PROHIBTD_BRK): Rename to PROHIBITED_BRK. 2008-03-02 Wu Yongwei Implement a two-stage search in get_char_lb_class_default to accelerate the overall performance, especially for non-Latin languages. * linebreak.c (LINEBREAK_INDEX_SIZE): New constant macro. (struct LineBreakPropertiesIndex): New struct. (lb_prop_index): New static variable. (init_linebreak_prop_index): New function. (get_char_lb_class_default): New function. (get_char_lb_class_lang): Use get_char_lb_class_default. * linebreak.h: Detect C++ and add extern "C" guard if necessary. (init_linebreak_prop_index): Add the prototype declaration. * linebreakdef.h: Adjust a comment. 2008-03-02 Wu Yongwei Split/refactor the code; add (doc) comments. * Makefile (CFILES): Add linebreakdata.c and linebreakdef.c. * linebreak.c: Add and adjust comments. (linebreakdef.h): Add include file. (linebreakdata.c): Remove include file. (EOS): Remove (now in linebreakdef.h). (enum LineBreakClass): Ditto. (struct LineBreakProperties): Ditto. (lbpEnglish): Remove (now in linebreakdef.c as lb_prop_English). (lbpGerman): Remove (now in linebreakdef.c as lb_prop_German). (lbpSpanish): Remove (now in linebreakdef.c as lb_prop_Spanish). (lbpFrench): Remove (now in linebreakdef.c as lb_prop_French). (lbpRussian): Remove (now in linebreakdef.c as lb_prop_Russian). (lbpChinese): Remove (now in linebreakdef.c as lb_prop_Chinese). (struct LineBreakPropertiesLang): Remove (now in linebreakdef.h). (lbpLangs): Remove (now in linebreakdef.c as lb_prop_lang_map). (get_next_char_utf16): Make sure memory access not go beyond len. * linebreak.h: Add copyright information and adjust comments. (stddef.h): Add include file. * linebreakdata.c (linebreak.h): Add include file. (linebreakdef.h): Add include file. (lbpDefault): Make global and rename to lb_prop_default. * linebreakdata2.tmpl: Add two include files, a comment line, and remove `static'. * linebreakdef.c: New file. * linebreakdef.h: New file. 2008-02-26 Wu Yongwei * linebreak.c (lbpSpanish): New array for Spanish-specific data. (lbpLangs): Update the index array for Spanish. (resolve_lb_class): Resolve AmbIguous class to IDeographic in Chinese, Japanese, and Korean. 2008-02-26 Wu Yongwei * Makefile (LineBreak.txt): Add new rule to retrieve it from the Web if it is not already there. 2008-02-23 Wu Yongwei Add files for linebreak. * LineBreak1.sed: New file. * LineBreak2.sed: New file. * Makefile: New file. * filter_dup.c: New file. * linebreak.c: New file. * linebreak.h: New file. * linebreakdata.c: New file. * linebreakdata1.tmpl: New file. * linebreakdata2.tmpl: New file. * linebreakdata3.tmpl: New file. evas-1.7.9/src/static_deps/liblinebreak/linebreakdef.h0000664000175000017500000001134612175475547017737 00000000000000/* vim: set tabstop=4 shiftwidth=4: */ /* * Line breaking in a Unicode sequence. Designed to be used in a * generic text renderer. * * Copyright (C) 2008-2010 Wu Yongwei * * This software is provided 'as-is', without any express or implied * warranty. In no event will the author be held liable for any damages * arising from the use of this software. * * Permission is granted to anyone to use this software for any purpose, * including commercial applications, and to alter it and redistribute * it freely, subject to the following restrictions: * * 1. The origin of this software must not be misrepresented; you must * not claim that you wrote the original software. If you use this * software in a product, an acknowledgement in the product * documentation would be appreciated but is not required. * 2. Altered source versions must be plainly marked as such, and must * not be misrepresented as being the original software. * 3. This notice may not be removed or altered from any source * distribution. * * The main reference is Unicode Standard Annex 14 (UAX #14): * * * When this library was designed, this annex was at Revision 19, for * Unicode 5.0.0: * * * This library has been updated according to Revision 24, for * Unicode 5.2.0: * * * The Unicode Terms of Use are available at * */ /** * @file linebreakdef.h * * Definitions of internal data structures, declarations of global * variables, and function prototypes for the line breaking algorithm. * * @version 2.0, 2010/01/03 * @author Wu Yongwei */ /** * Constant value to mark the end of string. It is not a valid Unicode * character. */ #define EOS 0xFFFF /** * Line break classes. This is a direct mapping of Table 1 of Unicode * Standard Annex 14, Revision 19. */ enum LineBreakClass { /* This is used to signal an error condition. */ LBP_Undefined, /**< Undefined */ /* The following break classes are treated in the pair table. */ LBP_OP, /**< Opening punctuation */ LBP_CL, /**< Closing punctuation */ LBP_CP, /**< Closing parenthesis */ LBP_QU, /**< Ambiguous quotation */ LBP_GL, /**< Glue */ LBP_NS, /**< Non-starters */ LBP_EX, /**< Exclamation/Interrogation */ LBP_SY, /**< Symbols allowing break after */ LBP_IS, /**< Infix separator */ LBP_PR, /**< Prefix */ LBP_PO, /**< Postfix */ LBP_NU, /**< Numeric */ LBP_AL, /**< Alphabetic */ LBP_ID, /**< Ideographic */ LBP_IN, /**< Inseparable characters */ LBP_HY, /**< Hyphen */ LBP_BA, /**< Break after */ LBP_BB, /**< Break before */ LBP_B2, /**< Break on either side (but not pair) */ LBP_ZW, /**< Zero-width space */ LBP_CM, /**< Combining marks */ LBP_WJ, /**< Word joiner */ LBP_H2, /**< Hangul LV */ LBP_H3, /**< Hangul LVT */ LBP_JL, /**< Hangul L Jamo */ LBP_JV, /**< Hangul V Jamo */ LBP_JT, /**< Hangul T Jamo */ /* The following break classes are not treated in the pair table */ LBP_AI, /**< Ambiguous (alphabetic or ideograph) */ LBP_BK, /**< Break (mandatory) */ LBP_CB, /**< Contingent break */ LBP_CR, /**< Carriage return */ LBP_LF, /**< Line feed */ LBP_NL, /**< Next line */ LBP_SA, /**< South-East Asian */ LBP_SG, /**< Surrogates */ LBP_SP, /**< Space */ LBP_XX /**< Unknown */ }; /** * Struct for entries of line break properties. The array of the * entries \e must be sorted. */ struct LineBreakProperties { utf32_t start; /**< Starting coding point */ utf32_t end; /**< End coding point */ enum LineBreakClass prop; /**< The line breaking property */ }; /** * Struct for association of language-specific line breaking properties * with language names. */ struct LineBreakPropertiesLang { const char *lang; /**< Language name */ size_t namelen; /**< Length of name to match */ struct LineBreakProperties *lbp; /**< Pointer to associated data */ }; /** * Abstract function interface for #lb_get_next_char_utf8, * #lb_get_next_char_utf16, and #lb_get_next_char_utf32. */ typedef utf32_t (*get_next_char_t)(const void *, size_t, size_t *); /* Declarations */ extern struct LineBreakProperties lb_prop_default[]; extern struct LineBreakPropertiesLang lb_prop_lang_map[]; /* Function Prototype */ utf32_t lb_get_next_char_utf8(const utf8_t *s, size_t len, size_t *ip); utf32_t lb_get_next_char_utf16(const utf16_t *s, size_t len, size_t *ip); utf32_t lb_get_next_char_utf32(const utf32_t *s, size_t len, size_t *ip); void set_linebreaks( const void *s, size_t len, const char *lang, char *brks, get_next_char_t get_next_char); evas-1.7.9/src/static_deps/liblinebreak/linebreak.h0000664000175000017500000000547612175475547017267 00000000000000/* vim: set tabstop=4 shiftwidth=4: */ /* * Line breaking in a Unicode sequence. Designed to be used in a * generic text renderer. * * Copyright (C) 2008-2010 Wu Yongwei * * This software is provided 'as-is', without any express or implied * warranty. In no event will the author be held liable for any damages * arising from the use of this software. * * Permission is granted to anyone to use this software for any purpose, * including commercial applications, and to alter it and redistribute * it freely, subject to the following restrictions: * * 1. The origin of this software must not be misrepresented; you must * not claim that you wrote the original software. If you use this * software in a product, an acknowledgement in the product * documentation would be appreciated but is not required. * 2. Altered source versions must be plainly marked as such, and must * not be misrepresented as being the original software. * 3. This notice may not be removed or altered from any source * distribution. * * The main reference is Unicode Standard Annex 14 (UAX #14): * * * When this library was designed, this annex was at Revision 19, for * Unicode 5.0.0: * * * This library has been updated according to Revision 24, for * Unicode 5.2.0: * * * The Unicode Terms of Use are available at * */ /** * @file linebreak.h * * Header file for the line breaking algorithm. * * @version 2.0, 2010/01/03 * @author Wu Yongwei */ #ifndef LINEBREAK_H #define LINEBREAK_H #include #ifdef __cplusplus extern "C" { #endif #define LINEBREAK_VERSION 0x0200 /**< Version of the library linebreak */ extern const int linebreak_version; #ifndef LINEBREAK_UTF_TYPES_DEFINED #define LINEBREAK_UTF_TYPES_DEFINED typedef unsigned char utf8_t; /**< Type for UTF-8 data points */ typedef unsigned short utf16_t; /**< Type for UTF-16 data points */ typedef unsigned int utf32_t; /**< Type for UTF-32 data points */ #endif #define LINEBREAK_MUSTBREAK 0 /**< Break is mandatory */ #define LINEBREAK_ALLOWBREAK 1 /**< Break is allowed */ #define LINEBREAK_NOBREAK 2 /**< No break is possible */ #define LINEBREAK_INSIDEACHAR 3 /**< A UTF-8/16 sequence is unfinished */ void init_linebreak(void); void set_linebreaks_utf8( const utf8_t *s, size_t len, const char* lang, char *brks); void set_linebreaks_utf16( const utf16_t *s, size_t len, const char* lang, char *brks); void set_linebreaks_utf32( const utf32_t *s, size_t len, const char* lang, char *brks); int is_line_breakable(utf32_t char1, utf32_t char2, const char* lang); #ifdef __cplusplus } #endif #endif /* LINEBREAK_H */ evas-1.7.9/src/static_deps/liblinebreak/wordbreak.h0000664000175000017500000000423012175475547017276 00000000000000/* vim: set tabstop=4 shiftwidth=4: */ /* * Word breaking in a Unicode sequence. Designed to be used in a * generic text renderer. * * Copyright (C) 2011-2011 Tom Hacohen * * This software is provided 'as-is', without any express or implied * warranty. In no event will the author be held liable for any damages * arising from the use of this software. * * Permission is granted to anyone to use this software for any purpose, * including commercial applications, and to alter it and redistribute * it freely, subject to the following restrictions: * * 1. The origin of this software must not be misrepresented; you must * not claim that you wrote the original software. If you use this * software in a product, an acknowledgement in the product * documentation would be appreciated but is not required. * 2. Altered source versions must be plainly marked as such, and must * not be misrepresented as being the original software. * 3. This notice may not be removed or altered from any source * distribution. * * The main reference is Unicode Standard Annex 29 (UAX #29): * * * When this library was designed, this annex was at Revision 17, for * Unicode 6.0.0: * * * The Unicode Terms of Use are available at * */ /** * @file wordbreak.h * * Header file for the word breaking (segmentation) algorithm. * * @version 2.0, 2011/12/12 * @author Tom Hacohen */ #ifndef WORDBREAK_H #define WORDBREAK_H #include #include #ifdef __cplusplus extern "C" { #endif #define WORDBREAK_BREAK 0 /* Break found */ #define WORDBREAK_NOBREAK 1 /**< Break not found */ #define WORDBREAK_INSIDECHAR 2 /**< A UTF-8/16 sequence is unfinished */ void init_wordbreak(void); void set_wordbreaks_utf8( const utf8_t *s, size_t len, const char* lang, char *brks); void set_wordbreaks_utf16( const utf16_t *s, size_t len, const char* lang, char *brks); void set_wordbreaks_utf32( const utf32_t *s, size_t len, const char* lang, char *brks); #ifdef __cplusplus } #endif #endif evas-1.7.9/src/static_deps/liblinebreak/linebreakdata.c0000664000175000017500000015203112175475547020102 00000000000000/* The content of this file is generated from: # LineBreak-6.0.0.txt # Date: 2010-08-18, 17:25:00 PDT [KW] */ #include "linebreak.h" #include "linebreakdef.h" /** Default line breaking properties as from the Unicode Web site. */ struct LineBreakProperties lb_prop_default[] = { { 0x0000, 0x0008, LBP_CM }, { 0x0009, 0x0009, LBP_BA }, { 0x000A, 0x000A, LBP_LF }, { 0x000B, 0x000C, LBP_BK }, { 0x000D, 0x000D, LBP_CR }, { 0x000E, 0x001F, LBP_CM }, { 0x0020, 0x0020, LBP_SP }, { 0x0021, 0x0021, LBP_EX }, { 0x0022, 0x0022, LBP_QU }, { 0x0023, 0x0023, LBP_AL }, { 0x0024, 0x0024, LBP_PR }, { 0x0025, 0x0025, LBP_PO }, { 0x0026, 0x0026, LBP_AL }, { 0x0027, 0x0027, LBP_QU }, { 0x0028, 0x0028, LBP_OP }, { 0x0029, 0x0029, LBP_CP }, { 0x002A, 0x002A, LBP_AL }, { 0x002B, 0x002B, LBP_PR }, { 0x002C, 0x002C, LBP_IS }, { 0x002D, 0x002D, LBP_HY }, { 0x002E, 0x002E, LBP_IS }, { 0x002F, 0x002F, LBP_SY }, { 0x0030, 0x0039, LBP_NU }, { 0x003A, 0x003B, LBP_IS }, { 0x003C, 0x003E, LBP_AL }, { 0x003F, 0x003F, LBP_EX }, { 0x0040, 0x005A, LBP_AL }, { 0x005B, 0x005B, LBP_OP }, { 0x005C, 0x005C, LBP_PR }, { 0x005D, 0x005D, LBP_CP }, { 0x005E, 0x007A, LBP_AL }, { 0x007B, 0x007B, LBP_OP }, { 0x007C, 0x007C, LBP_BA }, { 0x007D, 0x007D, LBP_CL }, { 0x007E, 0x007E, LBP_AL }, { 0x007F, 0x0084, LBP_CM }, { 0x0085, 0x0085, LBP_NL }, { 0x0086, 0x009F, LBP_CM }, { 0x00A0, 0x00A0, LBP_GL }, { 0x00A1, 0x00A1, LBP_OP }, { 0x00A2, 0x00A2, LBP_PO }, { 0x00A3, 0x00A5, LBP_PR }, { 0x00A6, 0x00A6, LBP_AL }, { 0x00A7, 0x00A8, LBP_AI }, { 0x00A9, 0x00A9, LBP_AL }, { 0x00AA, 0x00AA, LBP_AI }, { 0x00AB, 0x00AB, LBP_QU }, { 0x00AC, 0x00AC, LBP_AL }, { 0x00AD, 0x00AD, LBP_BA }, { 0x00AE, 0x00AF, LBP_AL }, { 0x00B0, 0x00B0, LBP_PO }, { 0x00B1, 0x00B1, LBP_PR }, { 0x00B2, 0x00B3, LBP_AI }, { 0x00B4, 0x00B4, LBP_BB }, { 0x00B5, 0x00B5, LBP_AL }, { 0x00B6, 0x00BA, LBP_AI }, { 0x00BB, 0x00BB, LBP_QU }, { 0x00BC, 0x00BE, LBP_AI }, { 0x00BF, 0x00BF, LBP_OP }, { 0x00C0, 0x00D6, LBP_AL }, { 0x00D7, 0x00D7, LBP_AI }, { 0x00D8, 0x00F6, LBP_AL }, { 0x00F7, 0x00F7, LBP_AI }, { 0x00F8, 0x02C6, LBP_AL }, { 0x02C7, 0x02C7, LBP_AI }, { 0x02C8, 0x02C8, LBP_BB }, { 0x02C9, 0x02CB, LBP_AI }, { 0x02CC, 0x02CC, LBP_BB }, { 0x02CD, 0x02CD, LBP_AI }, { 0x02CE, 0x02CF, LBP_AL }, { 0x02D0, 0x02D0, LBP_AI }, { 0x02D1, 0x02D7, LBP_AL }, { 0x02D8, 0x02DB, LBP_AI }, { 0x02DC, 0x02DC, LBP_AL }, { 0x02DD, 0x02DD, LBP_AI }, { 0x02DE, 0x02DE, LBP_AL }, { 0x02DF, 0x02DF, LBP_BB }, { 0x02E0, 0x02FF, LBP_AL }, { 0x0300, 0x034E, LBP_CM }, { 0x034F, 0x034F, LBP_GL }, { 0x0350, 0x035B, LBP_CM }, { 0x035C, 0x0362, LBP_GL }, { 0x0363, 0x036F, LBP_CM }, { 0x0370, 0x037D, LBP_AL }, { 0x037E, 0x037E, LBP_IS }, { 0x0384, 0x0482, LBP_AL }, { 0x0483, 0x0489, LBP_CM }, { 0x048A, 0x0587, LBP_AL }, { 0x0589, 0x0589, LBP_IS }, { 0x058A, 0x058A, LBP_BA }, { 0x0591, 0x05BD, LBP_CM }, { 0x05BE, 0x05BE, LBP_BA }, { 0x05BF, 0x05BF, LBP_CM }, { 0x05C0, 0x05C0, LBP_AL }, { 0x05C1, 0x05C2, LBP_CM }, { 0x05C3, 0x05C3, LBP_AL }, { 0x05C4, 0x05C5, LBP_CM }, { 0x05C6, 0x05C6, LBP_EX }, { 0x05C7, 0x05C7, LBP_CM }, { 0x05D0, 0x0608, LBP_AL }, { 0x0609, 0x060B, LBP_PO }, { 0x060C, 0x060D, LBP_IS }, { 0x060E, 0x060F, LBP_AL }, { 0x0610, 0x061A, LBP_CM }, { 0x061B, 0x061F, LBP_EX }, { 0x0620, 0x064A, LBP_AL }, { 0x064B, 0x065F, LBP_CM }, { 0x0660, 0x0669, LBP_NU }, { 0x066A, 0x066A, LBP_PO }, { 0x066B, 0x066C, LBP_NU }, { 0x066D, 0x066F, LBP_AL }, { 0x0670, 0x0670, LBP_CM }, { 0x0671, 0x06D3, LBP_AL }, { 0x06D4, 0x06D4, LBP_EX }, { 0x06D5, 0x06D5, LBP_AL }, { 0x06D6, 0x06DC, LBP_CM }, { 0x06DD, 0x06DE, LBP_AL }, { 0x06DF, 0x06E4, LBP_CM }, { 0x06E5, 0x06E6, LBP_AL }, { 0x06E7, 0x06E8, LBP_CM }, { 0x06E9, 0x06E9, LBP_AL }, { 0x06EA, 0x06ED, LBP_CM }, { 0x06EE, 0x06EF, LBP_AL }, { 0x06F0, 0x06F9, LBP_NU }, { 0x06FA, 0x0710, LBP_AL }, { 0x0711, 0x0711, LBP_CM }, { 0x0712, 0x072F, LBP_AL }, { 0x0730, 0x074A, LBP_CM }, { 0x074D, 0x07A5, LBP_AL }, { 0x07A6, 0x07B0, LBP_CM }, { 0x07B1, 0x07B1, LBP_AL }, { 0x07C0, 0x07C9, LBP_NU }, { 0x07CA, 0x07EA, LBP_AL }, { 0x07EB, 0x07F3, LBP_CM }, { 0x07F4, 0x07F7, LBP_AL }, { 0x07F8, 0x07F8, LBP_IS }, { 0x07F9, 0x07F9, LBP_EX }, { 0x07FA, 0x0815, LBP_AL }, { 0x0816, 0x0819, LBP_CM }, { 0x081A, 0x081A, LBP_AL }, { 0x081B, 0x0823, LBP_CM }, { 0x0824, 0x0824, LBP_AL }, { 0x0825, 0x0827, LBP_CM }, { 0x0828, 0x0828, LBP_AL }, { 0x0829, 0x082D, LBP_CM }, { 0x0830, 0x0858, LBP_AL }, { 0x0859, 0x085B, LBP_CM }, { 0x085E, 0x085E, LBP_AL }, { 0x0900, 0x0903, LBP_CM }, { 0x0904, 0x0939, LBP_AL }, { 0x093A, 0x093C, LBP_CM }, { 0x093D, 0x093D, LBP_AL }, { 0x093E, 0x094F, LBP_CM }, { 0x0950, 0x0950, LBP_AL }, { 0x0951, 0x0957, LBP_CM }, { 0x0958, 0x0961, LBP_AL }, { 0x0962, 0x0963, LBP_CM }, { 0x0964, 0x0965, LBP_BA }, { 0x0966, 0x096F, LBP_NU }, { 0x0970, 0x097F, LBP_AL }, { 0x0981, 0x0983, LBP_CM }, { 0x0985, 0x09B9, LBP_AL }, { 0x09BC, 0x09BC, LBP_CM }, { 0x09BD, 0x09BD, LBP_AL }, { 0x09BE, 0x09CD, LBP_CM }, { 0x09CE, 0x09CE, LBP_AL }, { 0x09D7, 0x09D7, LBP_CM }, { 0x09DC, 0x09E1, LBP_AL }, { 0x09E2, 0x09E3, LBP_CM }, { 0x09E6, 0x09EF, LBP_NU }, { 0x09F0, 0x09F1, LBP_AL }, { 0x09F2, 0x09F3, LBP_PO }, { 0x09F4, 0x09F8, LBP_AL }, { 0x09F9, 0x09F9, LBP_PO }, { 0x09FA, 0x09FA, LBP_AL }, { 0x09FB, 0x09FB, LBP_PR }, { 0x0A01, 0x0A03, LBP_CM }, { 0x0A05, 0x0A39, LBP_AL }, { 0x0A3C, 0x0A51, LBP_CM }, { 0x0A59, 0x0A5E, LBP_AL }, { 0x0A66, 0x0A6F, LBP_NU }, { 0x0A70, 0x0A71, LBP_CM }, { 0x0A72, 0x0A74, LBP_AL }, { 0x0A75, 0x0A83, LBP_CM }, { 0x0A85, 0x0AB9, LBP_AL }, { 0x0ABC, 0x0ABC, LBP_CM }, { 0x0ABD, 0x0ABD, LBP_AL }, { 0x0ABE, 0x0ACD, LBP_CM }, { 0x0AD0, 0x0AE1, LBP_AL }, { 0x0AE2, 0x0AE3, LBP_CM }, { 0x0AE6, 0x0AEF, LBP_NU }, { 0x0AF1, 0x0AF1, LBP_PR }, { 0x0B01, 0x0B03, LBP_CM }, { 0x0B05, 0x0B39, LBP_AL }, { 0x0B3C, 0x0B3C, LBP_CM }, { 0x0B3D, 0x0B3D, LBP_AL }, { 0x0B3E, 0x0B57, LBP_CM }, { 0x0B5C, 0x0B61, LBP_AL }, { 0x0B62, 0x0B63, LBP_CM }, { 0x0B66, 0x0B6F, LBP_NU }, { 0x0B70, 0x0B77, LBP_AL }, { 0x0B82, 0x0B82, LBP_CM }, { 0x0B83, 0x0BB9, LBP_AL }, { 0x0BBE, 0x0BCD, LBP_CM }, { 0x0BD0, 0x0BD0, LBP_AL }, { 0x0BD7, 0x0BD7, LBP_CM }, { 0x0BE6, 0x0BEF, LBP_NU }, { 0x0BF0, 0x0BF8, LBP_AL }, { 0x0BF9, 0x0BF9, LBP_PR }, { 0x0BFA, 0x0BFA, LBP_AL }, { 0x0C01, 0x0C03, LBP_CM }, { 0x0C05, 0x0C3D, LBP_AL }, { 0x0C3E, 0x0C56, LBP_CM }, { 0x0C58, 0x0C61, LBP_AL }, { 0x0C62, 0x0C63, LBP_CM }, { 0x0C66, 0x0C6F, LBP_NU }, { 0x0C78, 0x0C7F, LBP_AL }, { 0x0C82, 0x0C83, LBP_CM }, { 0x0C85, 0x0CB9, LBP_AL }, { 0x0CBC, 0x0CBC, LBP_CM }, { 0x0CBD, 0x0CBD, LBP_AL }, { 0x0CBE, 0x0CD6, LBP_CM }, { 0x0CDE, 0x0CE1, LBP_AL }, { 0x0CE2, 0x0CE3, LBP_CM }, { 0x0CE6, 0x0CEF, LBP_NU }, { 0x0CF1, 0x0CF2, LBP_AL }, { 0x0D02, 0x0D03, LBP_CM }, { 0x0D05, 0x0D3D, LBP_AL }, { 0x0D3E, 0x0D4D, LBP_CM }, { 0x0D4E, 0x0D4E, LBP_AL }, { 0x0D57, 0x0D57, LBP_CM }, { 0x0D60, 0x0D61, LBP_AL }, { 0x0D62, 0x0D63, LBP_CM }, { 0x0D66, 0x0D6F, LBP_NU }, { 0x0D70, 0x0D75, LBP_AL }, { 0x0D79, 0x0D79, LBP_PO }, { 0x0D7A, 0x0D7F, LBP_AL }, { 0x0D82, 0x0D83, LBP_CM }, { 0x0D85, 0x0DC6, LBP_AL }, { 0x0DCA, 0x0DF3, LBP_CM }, { 0x0DF4, 0x0DF4, LBP_AL }, { 0x0E01, 0x0E3A, LBP_SA }, { 0x0E3F, 0x0E3F, LBP_PR }, { 0x0E40, 0x0E4E, LBP_SA }, { 0x0E4F, 0x0E4F, LBP_AL }, { 0x0E50, 0x0E59, LBP_NU }, { 0x0E5A, 0x0E5B, LBP_BA }, { 0x0E81, 0x0ECD, LBP_SA }, { 0x0ED0, 0x0ED9, LBP_NU }, { 0x0EDC, 0x0EDD, LBP_SA }, { 0x0F00, 0x0F00, LBP_AL }, { 0x0F01, 0x0F04, LBP_BB }, { 0x0F05, 0x0F05, LBP_AL }, { 0x0F06, 0x0F07, LBP_BB }, { 0x0F08, 0x0F08, LBP_GL }, { 0x0F09, 0x0F0A, LBP_BB }, { 0x0F0B, 0x0F0B, LBP_BA }, { 0x0F0C, 0x0F0C, LBP_GL }, { 0x0F0D, 0x0F11, LBP_EX }, { 0x0F12, 0x0F12, LBP_GL }, { 0x0F13, 0x0F13, LBP_AL }, { 0x0F14, 0x0F14, LBP_EX }, { 0x0F15, 0x0F17, LBP_AL }, { 0x0F18, 0x0F19, LBP_CM }, { 0x0F1A, 0x0F1F, LBP_AL }, { 0x0F20, 0x0F29, LBP_NU }, { 0x0F2A, 0x0F33, LBP_AL }, { 0x0F34, 0x0F34, LBP_BA }, { 0x0F35, 0x0F35, LBP_CM }, { 0x0F36, 0x0F36, LBP_AL }, { 0x0F37, 0x0F37, LBP_CM }, { 0x0F38, 0x0F38, LBP_AL }, { 0x0F39, 0x0F39, LBP_CM }, { 0x0F3A, 0x0F3A, LBP_OP }, { 0x0F3B, 0x0F3B, LBP_CL }, { 0x0F3C, 0x0F3C, LBP_OP }, { 0x0F3D, 0x0F3D, LBP_CL }, { 0x0F3E, 0x0F3F, LBP_CM }, { 0x0F40, 0x0F6C, LBP_AL }, { 0x0F71, 0x0F7E, LBP_CM }, { 0x0F7F, 0x0F7F, LBP_BA }, { 0x0F80, 0x0F84, LBP_CM }, { 0x0F85, 0x0F85, LBP_BA }, { 0x0F86, 0x0F87, LBP_CM }, { 0x0F88, 0x0F8C, LBP_AL }, { 0x0F8D, 0x0FBC, LBP_CM }, { 0x0FBE, 0x0FBF, LBP_BA }, { 0x0FC0, 0x0FC5, LBP_AL }, { 0x0FC6, 0x0FC6, LBP_CM }, { 0x0FC7, 0x0FCF, LBP_AL }, { 0x0FD0, 0x0FD1, LBP_BB }, { 0x0FD2, 0x0FD2, LBP_BA }, { 0x0FD3, 0x0FD3, LBP_BB }, { 0x0FD4, 0x0FD8, LBP_AL }, { 0x0FD9, 0x0FDA, LBP_GL }, { 0x1000, 0x103F, LBP_SA }, { 0x1040, 0x1049, LBP_NU }, { 0x104A, 0x104B, LBP_BA }, { 0x104C, 0x104F, LBP_AL }, { 0x1050, 0x108F, LBP_SA }, { 0x1090, 0x1099, LBP_NU }, { 0x109A, 0x109F, LBP_SA }, { 0x10A0, 0x10FC, LBP_AL }, { 0x1100, 0x115F, LBP_JL }, { 0x1160, 0x11A7, LBP_JV }, { 0x11A8, 0x11FF, LBP_JT }, { 0x1200, 0x135A, LBP_AL }, { 0x135D, 0x135F, LBP_CM }, { 0x1360, 0x1360, LBP_AL }, { 0x1361, 0x1361, LBP_BA }, { 0x1362, 0x13F4, LBP_AL }, { 0x1400, 0x1400, LBP_BA }, { 0x1401, 0x167F, LBP_AL }, { 0x1680, 0x1680, LBP_BA }, { 0x1681, 0x169A, LBP_AL }, { 0x169B, 0x169B, LBP_OP }, { 0x169C, 0x169C, LBP_CL }, { 0x16A0, 0x16EA, LBP_AL }, { 0x16EB, 0x16ED, LBP_BA }, { 0x16EE, 0x1711, LBP_AL }, { 0x1712, 0x1714, LBP_CM }, { 0x1720, 0x1731, LBP_AL }, { 0x1732, 0x1734, LBP_CM }, { 0x1735, 0x1736, LBP_BA }, { 0x1740, 0x1751, LBP_AL }, { 0x1752, 0x1753, LBP_CM }, { 0x1760, 0x1770, LBP_AL }, { 0x1772, 0x1773, LBP_CM }, { 0x1780, 0x17D3, LBP_SA }, { 0x17D4, 0x17D5, LBP_BA }, { 0x17D6, 0x17D6, LBP_NS }, { 0x17D7, 0x17D7, LBP_SA }, { 0x17D8, 0x17D8, LBP_BA }, { 0x17D9, 0x17D9, LBP_AL }, { 0x17DA, 0x17DA, LBP_BA }, { 0x17DB, 0x17DB, LBP_PR }, { 0x17DC, 0x17DD, LBP_SA }, { 0x17E0, 0x17E9, LBP_NU }, { 0x17F0, 0x1801, LBP_AL }, { 0x1802, 0x1803, LBP_EX }, { 0x1804, 0x1805, LBP_BA }, { 0x1806, 0x1806, LBP_BB }, { 0x1807, 0x1807, LBP_AL }, { 0x1808, 0x1809, LBP_EX }, { 0x180A, 0x180A, LBP_AL }, { 0x180B, 0x180D, LBP_CM }, { 0x180E, 0x180E, LBP_GL }, { 0x1810, 0x1819, LBP_NU }, { 0x1820, 0x18A8, LBP_AL }, { 0x18A9, 0x18A9, LBP_CM }, { 0x18AA, 0x191C, LBP_AL }, { 0x1920, 0x193B, LBP_CM }, { 0x1940, 0x1940, LBP_AL }, { 0x1944, 0x1945, LBP_EX }, { 0x1946, 0x194F, LBP_NU }, { 0x1950, 0x19C9, LBP_SA }, { 0x19D0, 0x19D9, LBP_NU }, { 0x19DA, 0x19DF, LBP_SA }, { 0x19E0, 0x1A16, LBP_AL }, { 0x1A17, 0x1A1B, LBP_CM }, { 0x1A1E, 0x1A1F, LBP_AL }, { 0x1A20, 0x1A7C, LBP_SA }, { 0x1A7F, 0x1A7F, LBP_CM }, { 0x1A80, 0x1A99, LBP_NU }, { 0x1AA0, 0x1AAD, LBP_SA }, { 0x1B00, 0x1B04, LBP_CM }, { 0x1B05, 0x1B33, LBP_AL }, { 0x1B34, 0x1B44, LBP_CM }, { 0x1B45, 0x1B4B, LBP_AL }, { 0x1B50, 0x1B59, LBP_NU }, { 0x1B5A, 0x1B5B, LBP_BA }, { 0x1B5C, 0x1B5C, LBP_AL }, { 0x1B5D, 0x1B60, LBP_BA }, { 0x1B61, 0x1B6A, LBP_AL }, { 0x1B6B, 0x1B73, LBP_CM }, { 0x1B74, 0x1B7C, LBP_AL }, { 0x1B80, 0x1B82, LBP_CM }, { 0x1B83, 0x1BA0, LBP_AL }, { 0x1BA1, 0x1BAA, LBP_CM }, { 0x1BAE, 0x1BAF, LBP_AL }, { 0x1BB0, 0x1BB9, LBP_NU }, { 0x1BC0, 0x1BE5, LBP_AL }, { 0x1BE6, 0x1BF3, LBP_CM }, { 0x1BFC, 0x1C23, LBP_AL }, { 0x1C24, 0x1C37, LBP_CM }, { 0x1C3B, 0x1C3F, LBP_BA }, { 0x1C40, 0x1C49, LBP_NU }, { 0x1C4D, 0x1C4F, LBP_AL }, { 0x1C50, 0x1C59, LBP_NU }, { 0x1C5A, 0x1C7D, LBP_AL }, { 0x1C7E, 0x1C7F, LBP_BA }, { 0x1CD0, 0x1CD2, LBP_CM }, { 0x1CD3, 0x1CD3, LBP_AL }, { 0x1CD4, 0x1CE8, LBP_CM }, { 0x1CE9, 0x1CEC, LBP_AL }, { 0x1CED, 0x1CED, LBP_CM }, { 0x1CEE, 0x1CF1, LBP_AL }, { 0x1CF2, 0x1CF2, LBP_CM }, { 0x1D00, 0x1DBF, LBP_AL }, { 0x1DC0, 0x1DFF, LBP_CM }, { 0x1E00, 0x1FFC, LBP_AL }, { 0x1FFD, 0x1FFD, LBP_BB }, { 0x1FFE, 0x1FFE, LBP_AL }, { 0x2000, 0x2006, LBP_BA }, { 0x2007, 0x2007, LBP_GL }, { 0x2008, 0x200A, LBP_BA }, { 0x200B, 0x200B, LBP_ZW }, { 0x200C, 0x200F, LBP_CM }, { 0x2010, 0x2010, LBP_BA }, { 0x2011, 0x2011, LBP_GL }, { 0x2012, 0x2013, LBP_BA }, { 0x2014, 0x2014, LBP_B2 }, { 0x2015, 0x2016, LBP_AI }, { 0x2017, 0x2017, LBP_AL }, { 0x2018, 0x2019, LBP_QU }, { 0x201A, 0x201A, LBP_OP }, { 0x201B, 0x201D, LBP_QU }, { 0x201E, 0x201E, LBP_OP }, { 0x201F, 0x201F, LBP_QU }, { 0x2020, 0x2021, LBP_AI }, { 0x2022, 0x2023, LBP_AL }, { 0x2024, 0x2026, LBP_IN }, { 0x2027, 0x2027, LBP_BA }, { 0x2028, 0x2029, LBP_BK }, { 0x202A, 0x202E, LBP_CM }, { 0x202F, 0x202F, LBP_GL }, { 0x2030, 0x2037, LBP_PO }, { 0x2038, 0x2038, LBP_AL }, { 0x2039, 0x203A, LBP_QU }, { 0x203B, 0x203B, LBP_AI }, { 0x203C, 0x203D, LBP_NS }, { 0x203E, 0x2043, LBP_AL }, { 0x2044, 0x2044, LBP_IS }, { 0x2045, 0x2045, LBP_OP }, { 0x2046, 0x2046, LBP_CL }, { 0x2047, 0x2049, LBP_NS }, { 0x204A, 0x2055, LBP_AL }, { 0x2056, 0x2056, LBP_BA }, { 0x2057, 0x2057, LBP_AL }, { 0x2058, 0x205B, LBP_BA }, { 0x205C, 0x205C, LBP_AL }, { 0x205D, 0x205F, LBP_BA }, { 0x2060, 0x2060, LBP_WJ }, { 0x2061, 0x2064, LBP_AL }, { 0x206A, 0x206F, LBP_CM }, { 0x2070, 0x2071, LBP_AL }, { 0x2074, 0x2074, LBP_AI }, { 0x2075, 0x207C, LBP_AL }, { 0x207D, 0x207D, LBP_OP }, { 0x207E, 0x207E, LBP_CL }, { 0x207F, 0x207F, LBP_AI }, { 0x2080, 0x2080, LBP_AL }, { 0x2081, 0x2084, LBP_AI }, { 0x2085, 0x208C, LBP_AL }, { 0x208D, 0x208D, LBP_OP }, { 0x208E, 0x208E, LBP_CL }, { 0x2090, 0x209C, LBP_AL }, { 0x20A0, 0x20A6, LBP_PR }, { 0x20A7, 0x20A7, LBP_PO }, { 0x20A8, 0x20B5, LBP_PR }, { 0x20B6, 0x20B6, LBP_PO }, { 0x20B7, 0x20B9, LBP_PR }, { 0x20D0, 0x20F0, LBP_CM }, { 0x2100, 0x2102, LBP_AL }, { 0x2103, 0x2103, LBP_PO }, { 0x2104, 0x2104, LBP_AL }, { 0x2105, 0x2105, LBP_AI }, { 0x2106, 0x2108, LBP_AL }, { 0x2109, 0x2109, LBP_PO }, { 0x210A, 0x2112, LBP_AL }, { 0x2113, 0x2113, LBP_AI }, { 0x2114, 0x2115, LBP_AL }, { 0x2116, 0x2116, LBP_PR }, { 0x2117, 0x2120, LBP_AL }, { 0x2121, 0x2122, LBP_AI }, { 0x2123, 0x212A, LBP_AL }, { 0x212B, 0x212B, LBP_AI }, { 0x212C, 0x2153, LBP_AL }, { 0x2154, 0x2155, LBP_AI }, { 0x2156, 0x215A, LBP_AL }, { 0x215B, 0x215B, LBP_AI }, { 0x215C, 0x215D, LBP_AL }, { 0x215E, 0x215E, LBP_AI }, { 0x215F, 0x215F, LBP_AL }, { 0x2160, 0x216B, LBP_AI }, { 0x216C, 0x216F, LBP_AL }, { 0x2170, 0x2179, LBP_AI }, { 0x217A, 0x2188, LBP_AL }, { 0x2189, 0x2199, LBP_AI }, { 0x219A, 0x21D1, LBP_AL }, { 0x21D2, 0x21D2, LBP_AI }, { 0x21D3, 0x21D3, LBP_AL }, { 0x21D4, 0x21D4, LBP_AI }, { 0x21D5, 0x21FF, LBP_AL }, { 0x2200, 0x2200, LBP_AI }, { 0x2201, 0x2201, LBP_AL }, { 0x2202, 0x2203, LBP_AI }, { 0x2204, 0x2206, LBP_AL }, { 0x2207, 0x2208, LBP_AI }, { 0x2209, 0x220A, LBP_AL }, { 0x220B, 0x220B, LBP_AI }, { 0x220C, 0x220E, LBP_AL }, { 0x220F, 0x220F, LBP_AI }, { 0x2210, 0x2210, LBP_AL }, { 0x2211, 0x2211, LBP_AI }, { 0x2212, 0x2213, LBP_PR }, { 0x2214, 0x2214, LBP_AL }, { 0x2215, 0x2215, LBP_AI }, { 0x2216, 0x2219, LBP_AL }, { 0x221A, 0x221A, LBP_AI }, { 0x221B, 0x221C, LBP_AL }, { 0x221D, 0x2220, LBP_AI }, { 0x2221, 0x2222, LBP_AL }, { 0x2223, 0x2223, LBP_AI }, { 0x2224, 0x2224, LBP_AL }, { 0x2225, 0x2225, LBP_AI }, { 0x2226, 0x2226, LBP_AL }, { 0x2227, 0x222C, LBP_AI }, { 0x222D, 0x222D, LBP_AL }, { 0x222E, 0x222E, LBP_AI }, { 0x222F, 0x2233, LBP_AL }, { 0x2234, 0x2237, LBP_AI }, { 0x2238, 0x223B, LBP_AL }, { 0x223C, 0x223D, LBP_AI }, { 0x223E, 0x2247, LBP_AL }, { 0x2248, 0x2248, LBP_AI }, { 0x2249, 0x224B, LBP_AL }, { 0x224C, 0x224C, LBP_AI }, { 0x224D, 0x2251, LBP_AL }, { 0x2252, 0x2252, LBP_AI }, { 0x2253, 0x225F, LBP_AL }, { 0x2260, 0x2261, LBP_AI }, { 0x2262, 0x2263, LBP_AL }, { 0x2264, 0x2267, LBP_AI }, { 0x2268, 0x2269, LBP_AL }, { 0x226A, 0x226B, LBP_AI }, { 0x226C, 0x226D, LBP_AL }, { 0x226E, 0x226F, LBP_AI }, { 0x2270, 0x2281, LBP_AL }, { 0x2282, 0x2283, LBP_AI }, { 0x2284, 0x2285, LBP_AL }, { 0x2286, 0x2287, LBP_AI }, { 0x2288, 0x2294, LBP_AL }, { 0x2295, 0x2295, LBP_AI }, { 0x2296, 0x2298, LBP_AL }, { 0x2299, 0x2299, LBP_AI }, { 0x229A, 0x22A4, LBP_AL }, { 0x22A5, 0x22A5, LBP_AI }, { 0x22A6, 0x22BE, LBP_AL }, { 0x22BF, 0x22BF, LBP_AI }, { 0x22C0, 0x2311, LBP_AL }, { 0x2312, 0x2312, LBP_AI }, { 0x2313, 0x2328, LBP_AL }, { 0x2329, 0x2329, LBP_OP }, { 0x232A, 0x232A, LBP_CL }, { 0x232B, 0x244A, LBP_AL }, { 0x2460, 0x24FE, LBP_AI }, { 0x24FF, 0x24FF, LBP_AL }, { 0x2500, 0x254B, LBP_AI }, { 0x254C, 0x254F, LBP_AL }, { 0x2550, 0x2574, LBP_AI }, { 0x2575, 0x257F, LBP_AL }, { 0x2580, 0x258F, LBP_AI }, { 0x2590, 0x2591, LBP_AL }, { 0x2592, 0x2595, LBP_AI }, { 0x2596, 0x259F, LBP_AL }, { 0x25A0, 0x25A1, LBP_AI }, { 0x25A2, 0x25A2, LBP_AL }, { 0x25A3, 0x25A9, LBP_AI }, { 0x25AA, 0x25B1, LBP_AL }, { 0x25B2, 0x25B3, LBP_AI }, { 0x25B4, 0x25B5, LBP_AL }, { 0x25B6, 0x25B7, LBP_AI }, { 0x25B8, 0x25BB, LBP_AL }, { 0x25BC, 0x25BD, LBP_AI }, { 0x25BE, 0x25BF, LBP_AL }, { 0x25C0, 0x25C1, LBP_AI }, { 0x25C2, 0x25C5, LBP_AL }, { 0x25C6, 0x25C8, LBP_AI }, { 0x25C9, 0x25CA, LBP_AL }, { 0x25CB, 0x25CB, LBP_AI }, { 0x25CC, 0x25CD, LBP_AL }, { 0x25CE, 0x25D1, LBP_AI }, { 0x25D2, 0x25E1, LBP_AL }, { 0x25E2, 0x25E5, LBP_AI }, { 0x25E6, 0x25EE, LBP_AL }, { 0x25EF, 0x25EF, LBP_AI }, { 0x25F0, 0x2604, LBP_AL }, { 0x2605, 0x2606, LBP_AI }, { 0x2607, 0x2608, LBP_AL }, { 0x2609, 0x2609, LBP_AI }, { 0x260A, 0x260D, LBP_AL }, { 0x260E, 0x260F, LBP_AI }, { 0x2610, 0x2613, LBP_AL }, { 0x2614, 0x2617, LBP_AI }, { 0x2618, 0x261B, LBP_AL }, { 0x261C, 0x261C, LBP_AI }, { 0x261D, 0x261D, LBP_AL }, { 0x261E, 0x261E, LBP_AI }, { 0x261F, 0x263F, LBP_AL }, { 0x2640, 0x2640, LBP_AI }, { 0x2641, 0x2641, LBP_AL }, { 0x2642, 0x2642, LBP_AI }, { 0x2643, 0x265F, LBP_AL }, { 0x2660, 0x2661, LBP_AI }, { 0x2662, 0x2662, LBP_AL }, { 0x2663, 0x2665, LBP_AI }, { 0x2666, 0x2666, LBP_AL }, { 0x2667, 0x266A, LBP_AI }, { 0x266B, 0x266B, LBP_AL }, { 0x266C, 0x266D, LBP_AI }, { 0x266E, 0x266E, LBP_AL }, { 0x266F, 0x266F, LBP_AI }, { 0x2670, 0x269D, LBP_AL }, { 0x269E, 0x269F, LBP_AI }, { 0x26A0, 0x26BD, LBP_AL }, { 0x26BE, 0x26BF, LBP_AI }, { 0x26C0, 0x26C3, LBP_AL }, { 0x26C4, 0x26CD, LBP_AI }, { 0x26CE, 0x26CE, LBP_AL }, { 0x26CF, 0x26E1, LBP_AI }, { 0x26E2, 0x26E2, LBP_AL }, { 0x26E3, 0x26E3, LBP_AI }, { 0x26E4, 0x26E7, LBP_AL }, { 0x26E8, 0x26FF, LBP_AI }, { 0x2701, 0x2756, LBP_AL }, { 0x2757, 0x2757, LBP_AI }, { 0x2758, 0x275A, LBP_AL }, { 0x275B, 0x275E, LBP_QU }, { 0x275F, 0x2761, LBP_AL }, { 0x2762, 0x2763, LBP_EX }, { 0x2764, 0x2767, LBP_AL }, { 0x2768, 0x2768, LBP_OP }, { 0x2769, 0x2769, LBP_CL }, { 0x276A, 0x276A, LBP_OP }, { 0x276B, 0x276B, LBP_CL }, { 0x276C, 0x276C, LBP_OP }, { 0x276D, 0x276D, LBP_CL }, { 0x276E, 0x276E, LBP_OP }, { 0x276F, 0x276F, LBP_CL }, { 0x2770, 0x2770, LBP_OP }, { 0x2771, 0x2771, LBP_CL }, { 0x2772, 0x2772, LBP_OP }, { 0x2773, 0x2773, LBP_CL }, { 0x2774, 0x2774, LBP_OP }, { 0x2775, 0x2775, LBP_CL }, { 0x2776, 0x2793, LBP_AI }, { 0x2794, 0x27C4, LBP_AL }, { 0x27C5, 0x27C5, LBP_OP }, { 0x27C6, 0x27C6, LBP_CL }, { 0x27C7, 0x27E5, LBP_AL }, { 0x27E6, 0x27E6, LBP_OP }, { 0x27E7, 0x27E7, LBP_CL }, { 0x27E8, 0x27E8, LBP_OP }, { 0x27E9, 0x27E9, LBP_CL }, { 0x27EA, 0x27EA, LBP_OP }, { 0x27EB, 0x27EB, LBP_CL }, { 0x27EC, 0x27EC, LBP_OP }, { 0x27ED, 0x27ED, LBP_CL }, { 0x27EE, 0x27EE, LBP_OP }, { 0x27EF, 0x27EF, LBP_CL }, { 0x27F0, 0x2982, LBP_AL }, { 0x2983, 0x2983, LBP_OP }, { 0x2984, 0x2984, LBP_CL }, { 0x2985, 0x2985, LBP_OP }, { 0x2986, 0x2986, LBP_CL }, { 0x2987, 0x2987, LBP_OP }, { 0x2988, 0x2988, LBP_CL }, { 0x2989, 0x2989, LBP_OP }, { 0x298A, 0x298A, LBP_CL }, { 0x298B, 0x298B, LBP_OP }, { 0x298C, 0x298C, LBP_CL }, { 0x298D, 0x298D, LBP_OP }, { 0x298E, 0x298E, LBP_CL }, { 0x298F, 0x298F, LBP_OP }, { 0x2990, 0x2990, LBP_CL }, { 0x2991, 0x2991, LBP_OP }, { 0x2992, 0x2992, LBP_CL }, { 0x2993, 0x2993, LBP_OP }, { 0x2994, 0x2994, LBP_CL }, { 0x2995, 0x2995, LBP_OP }, { 0x2996, 0x2996, LBP_CL }, { 0x2997, 0x2997, LBP_OP }, { 0x2998, 0x2998, LBP_CL }, { 0x2999, 0x29D7, LBP_AL }, { 0x29D8, 0x29D8, LBP_OP }, { 0x29D9, 0x29D9, LBP_CL }, { 0x29DA, 0x29DA, LBP_OP }, { 0x29DB, 0x29DB, LBP_CL }, { 0x29DC, 0x29FB, LBP_AL }, { 0x29FC, 0x29FC, LBP_OP }, { 0x29FD, 0x29FD, LBP_CL }, { 0x29FE, 0x2B54, LBP_AL }, { 0x2B55, 0x2B59, LBP_AI }, { 0x2C00, 0x2CEE, LBP_AL }, { 0x2CEF, 0x2CF1, LBP_CM }, { 0x2CF9, 0x2CF9, LBP_EX }, { 0x2CFA, 0x2CFC, LBP_BA }, { 0x2CFD, 0x2CFD, LBP_AL }, { 0x2CFE, 0x2CFE, LBP_EX }, { 0x2CFF, 0x2CFF, LBP_BA }, { 0x2D00, 0x2D6F, LBP_AL }, { 0x2D70, 0x2D70, LBP_BA }, { 0x2D7F, 0x2D7F, LBP_CM }, { 0x2D80, 0x2DDE, LBP_AL }, { 0x2DE0, 0x2DFF, LBP_CM }, { 0x2E00, 0x2E0D, LBP_QU }, { 0x2E0E, 0x2E15, LBP_BA }, { 0x2E16, 0x2E16, LBP_AL }, { 0x2E17, 0x2E17, LBP_BA }, { 0x2E18, 0x2E18, LBP_OP }, { 0x2E19, 0x2E19, LBP_BA }, { 0x2E1A, 0x2E1B, LBP_AL }, { 0x2E1C, 0x2E1D, LBP_QU }, { 0x2E1E, 0x2E1F, LBP_AL }, { 0x2E20, 0x2E21, LBP_QU }, { 0x2E22, 0x2E22, LBP_OP }, { 0x2E23, 0x2E23, LBP_CL }, { 0x2E24, 0x2E24, LBP_OP }, { 0x2E25, 0x2E25, LBP_CL }, { 0x2E26, 0x2E26, LBP_OP }, { 0x2E27, 0x2E27, LBP_CL }, { 0x2E28, 0x2E28, LBP_OP }, { 0x2E29, 0x2E29, LBP_CL }, { 0x2E2A, 0x2E2D, LBP_BA }, { 0x2E2E, 0x2E2E, LBP_EX }, { 0x2E2F, 0x2E2F, LBP_AL }, { 0x2E30, 0x2E31, LBP_BA }, { 0x2E80, 0x3000, LBP_ID }, { 0x3001, 0x3002, LBP_CL }, { 0x3003, 0x3004, LBP_ID }, { 0x3005, 0x3005, LBP_NS }, { 0x3006, 0x3007, LBP_ID }, { 0x3008, 0x3008, LBP_OP }, { 0x3009, 0x3009, LBP_CL }, { 0x300A, 0x300A, LBP_OP }, { 0x300B, 0x300B, LBP_CL }, { 0x300C, 0x300C, LBP_OP }, { 0x300D, 0x300D, LBP_CL }, { 0x300E, 0x300E, LBP_OP }, { 0x300F, 0x300F, LBP_CL }, { 0x3010, 0x3010, LBP_OP }, { 0x3011, 0x3011, LBP_CL }, { 0x3012, 0x3013, LBP_ID }, { 0x3014, 0x3014, LBP_OP }, { 0x3015, 0x3015, LBP_CL }, { 0x3016, 0x3016, LBP_OP }, { 0x3017, 0x3017, LBP_CL }, { 0x3018, 0x3018, LBP_OP }, { 0x3019, 0x3019, LBP_CL }, { 0x301A, 0x301A, LBP_OP }, { 0x301B, 0x301B, LBP_CL }, { 0x301C, 0x301C, LBP_NS }, { 0x301D, 0x301D, LBP_OP }, { 0x301E, 0x301F, LBP_CL }, { 0x3020, 0x3029, LBP_ID }, { 0x302A, 0x302F, LBP_CM }, { 0x3030, 0x303A, LBP_ID }, { 0x303B, 0x303C, LBP_NS }, { 0x303D, 0x303F, LBP_ID }, { 0x3041, 0x3041, LBP_NS }, { 0x3042, 0x3042, LBP_ID }, { 0x3043, 0x3043, LBP_NS }, { 0x3044, 0x3044, LBP_ID }, { 0x3045, 0x3045, LBP_NS }, { 0x3046, 0x3046, LBP_ID }, { 0x3047, 0x3047, LBP_NS }, { 0x3048, 0x3048, LBP_ID }, { 0x3049, 0x3049, LBP_NS }, { 0x304A, 0x3062, LBP_ID }, { 0x3063, 0x3063, LBP_NS }, { 0x3064, 0x3082, LBP_ID }, { 0x3083, 0x3083, LBP_NS }, { 0x3084, 0x3084, LBP_ID }, { 0x3085, 0x3085, LBP_NS }, { 0x3086, 0x3086, LBP_ID }, { 0x3087, 0x3087, LBP_NS }, { 0x3088, 0x308D, LBP_ID }, { 0x308E, 0x308E, LBP_NS }, { 0x308F, 0x3094, LBP_ID }, { 0x3095, 0x3096, LBP_NS }, { 0x3099, 0x309A, LBP_CM }, { 0x309B, 0x309E, LBP_NS }, { 0x309F, 0x309F, LBP_ID }, { 0x30A0, 0x30A1, LBP_NS }, { 0x30A2, 0x30A2, LBP_ID }, { 0x30A3, 0x30A3, LBP_NS }, { 0x30A4, 0x30A4, LBP_ID }, { 0x30A5, 0x30A5, LBP_NS }, { 0x30A6, 0x30A6, LBP_ID }, { 0x30A7, 0x30A7, LBP_NS }, { 0x30A8, 0x30A8, LBP_ID }, { 0x30A9, 0x30A9, LBP_NS }, { 0x30AA, 0x30C2, LBP_ID }, { 0x30C3, 0x30C3, LBP_NS }, { 0x30C4, 0x30E2, LBP_ID }, { 0x30E3, 0x30E3, LBP_NS }, { 0x30E4, 0x30E4, LBP_ID }, { 0x30E5, 0x30E5, LBP_NS }, { 0x30E6, 0x30E6, LBP_ID }, { 0x30E7, 0x30E7, LBP_NS }, { 0x30E8, 0x30ED, LBP_ID }, { 0x30EE, 0x30EE, LBP_NS }, { 0x30EF, 0x30F4, LBP_ID }, { 0x30F5, 0x30F6, LBP_NS }, { 0x30F7, 0x30FA, LBP_ID }, { 0x30FB, 0x30FE, LBP_NS }, { 0x30FF, 0x31E3, LBP_ID }, { 0x31F0, 0x31FF, LBP_NS }, { 0x3200, 0x3247, LBP_ID }, { 0x3248, 0x324F, LBP_AI }, { 0x3250, 0x4DBF, LBP_ID }, { 0x4DC0, 0x4DFF, LBP_AL }, { 0x4E00, 0xA014, LBP_ID }, { 0xA015, 0xA015, LBP_NS }, { 0xA016, 0xA4C6, LBP_ID }, { 0xA4D0, 0xA4FD, LBP_AL }, { 0xA4FE, 0xA4FF, LBP_BA }, { 0xA500, 0xA60C, LBP_AL }, { 0xA60D, 0xA60D, LBP_BA }, { 0xA60E, 0xA60E, LBP_EX }, { 0xA60F, 0xA60F, LBP_BA }, { 0xA610, 0xA61F, LBP_AL }, { 0xA620, 0xA629, LBP_NU }, { 0xA62A, 0xA66E, LBP_AL }, { 0xA66F, 0xA672, LBP_CM }, { 0xA673, 0xA673, LBP_AL }, { 0xA67C, 0xA67D, LBP_CM }, { 0xA67E, 0xA6EF, LBP_AL }, { 0xA6F0, 0xA6F1, LBP_CM }, { 0xA6F2, 0xA6F2, LBP_AL }, { 0xA6F3, 0xA6F7, LBP_BA }, { 0xA700, 0xA801, LBP_AL }, { 0xA802, 0xA802, LBP_CM }, { 0xA803, 0xA805, LBP_AL }, { 0xA806, 0xA806, LBP_CM }, { 0xA807, 0xA80A, LBP_AL }, { 0xA80B, 0xA80B, LBP_CM }, { 0xA80C, 0xA822, LBP_AL }, { 0xA823, 0xA827, LBP_CM }, { 0xA828, 0xA837, LBP_AL }, { 0xA838, 0xA838, LBP_PO }, { 0xA839, 0xA873, LBP_AL }, { 0xA874, 0xA875, LBP_BB }, { 0xA876, 0xA877, LBP_EX }, { 0xA880, 0xA881, LBP_CM }, { 0xA882, 0xA8B3, LBP_AL }, { 0xA8B4, 0xA8C4, LBP_CM }, { 0xA8CE, 0xA8CF, LBP_BA }, { 0xA8D0, 0xA8D9, LBP_NU }, { 0xA8E0, 0xA8F1, LBP_CM }, { 0xA8F2, 0xA8FB, LBP_AL }, { 0xA900, 0xA909, LBP_NU }, { 0xA90A, 0xA925, LBP_AL }, { 0xA926, 0xA92D, LBP_CM }, { 0xA92E, 0xA92F, LBP_BA }, { 0xA930, 0xA946, LBP_AL }, { 0xA947, 0xA953, LBP_CM }, { 0xA95F, 0xA95F, LBP_AL }, { 0xA960, 0xA97C, LBP_JL }, { 0xA980, 0xA983, LBP_CM }, { 0xA984, 0xA9B2, LBP_AL }, { 0xA9B3, 0xA9C0, LBP_CM }, { 0xA9C1, 0xA9C6, LBP_AL }, { 0xA9C7, 0xA9C9, LBP_BA }, { 0xA9CA, 0xA9CF, LBP_AL }, { 0xA9D0, 0xA9D9, LBP_NU }, { 0xA9DE, 0xAA28, LBP_AL }, { 0xAA29, 0xAA36, LBP_CM }, { 0xAA40, 0xAA42, LBP_AL }, { 0xAA43, 0xAA43, LBP_CM }, { 0xAA44, 0xAA4B, LBP_AL }, { 0xAA4C, 0xAA4D, LBP_CM }, { 0xAA50, 0xAA59, LBP_NU }, { 0xAA5C, 0xAA5C, LBP_AL }, { 0xAA5D, 0xAA5F, LBP_BA }, { 0xAA60, 0xAADF, LBP_SA }, { 0xAB01, 0xABE2, LBP_AL }, { 0xABE3, 0xABEA, LBP_CM }, { 0xABEB, 0xABEB, LBP_BA }, { 0xABEC, 0xABED, LBP_CM }, { 0xABF0, 0xABF9, LBP_NU }, { 0xAC00, 0xAC00, LBP_H2 }, { 0xAC01, 0xAC1B, LBP_H3 }, { 0xAC1C, 0xAC1C, LBP_H2 }, { 0xAC1D, 0xAC37, LBP_H3 }, { 0xAC38, 0xAC38, LBP_H2 }, { 0xAC39, 0xAC53, LBP_H3 }, { 0xAC54, 0xAC54, LBP_H2 }, { 0xAC55, 0xAC6F, LBP_H3 }, { 0xAC70, 0xAC70, LBP_H2 }, { 0xAC71, 0xAC8B, LBP_H3 }, { 0xAC8C, 0xAC8C, LBP_H2 }, { 0xAC8D, 0xACA7, LBP_H3 }, { 0xACA8, 0xACA8, LBP_H2 }, { 0xACA9, 0xACC3, LBP_H3 }, { 0xACC4, 0xACC4, LBP_H2 }, { 0xACC5, 0xACDF, LBP_H3 }, { 0xACE0, 0xACE0, LBP_H2 }, { 0xACE1, 0xACFB, LBP_H3 }, { 0xACFC, 0xACFC, LBP_H2 }, { 0xACFD, 0xAD17, LBP_H3 }, { 0xAD18, 0xAD18, LBP_H2 }, { 0xAD19, 0xAD33, LBP_H3 }, { 0xAD34, 0xAD34, LBP_H2 }, { 0xAD35, 0xAD4F, LBP_H3 }, { 0xAD50, 0xAD50, LBP_H2 }, { 0xAD51, 0xAD6B, LBP_H3 }, { 0xAD6C, 0xAD6C, LBP_H2 }, { 0xAD6D, 0xAD87, LBP_H3 }, { 0xAD88, 0xAD88, LBP_H2 }, { 0xAD89, 0xADA3, LBP_H3 }, { 0xADA4, 0xADA4, LBP_H2 }, { 0xADA5, 0xADBF, LBP_H3 }, { 0xADC0, 0xADC0, LBP_H2 }, { 0xADC1, 0xADDB, LBP_H3 }, { 0xADDC, 0xADDC, LBP_H2 }, { 0xADDD, 0xADF7, LBP_H3 }, { 0xADF8, 0xADF8, LBP_H2 }, { 0xADF9, 0xAE13, LBP_H3 }, { 0xAE14, 0xAE14, LBP_H2 }, { 0xAE15, 0xAE2F, LBP_H3 }, { 0xAE30, 0xAE30, LBP_H2 }, { 0xAE31, 0xAE4B, LBP_H3 }, { 0xAE4C, 0xAE4C, LBP_H2 }, { 0xAE4D, 0xAE67, LBP_H3 }, { 0xAE68, 0xAE68, LBP_H2 }, { 0xAE69, 0xAE83, LBP_H3 }, { 0xAE84, 0xAE84, LBP_H2 }, { 0xAE85, 0xAE9F, LBP_H3 }, { 0xAEA0, 0xAEA0, LBP_H2 }, { 0xAEA1, 0xAEBB, LBP_H3 }, { 0xAEBC, 0xAEBC, LBP_H2 }, { 0xAEBD, 0xAED7, LBP_H3 }, { 0xAED8, 0xAED8, LBP_H2 }, { 0xAED9, 0xAEF3, LBP_H3 }, { 0xAEF4, 0xAEF4, LBP_H2 }, { 0xAEF5, 0xAF0F, LBP_H3 }, { 0xAF10, 0xAF10, LBP_H2 }, { 0xAF11, 0xAF2B, LBP_H3 }, { 0xAF2C, 0xAF2C, LBP_H2 }, { 0xAF2D, 0xAF47, LBP_H3 }, { 0xAF48, 0xAF48, LBP_H2 }, { 0xAF49, 0xAF63, LBP_H3 }, { 0xAF64, 0xAF64, LBP_H2 }, { 0xAF65, 0xAF7F, LBP_H3 }, { 0xAF80, 0xAF80, LBP_H2 }, { 0xAF81, 0xAF9B, LBP_H3 }, { 0xAF9C, 0xAF9C, LBP_H2 }, { 0xAF9D, 0xAFB7, LBP_H3 }, { 0xAFB8, 0xAFB8, LBP_H2 }, { 0xAFB9, 0xAFD3, LBP_H3 }, { 0xAFD4, 0xAFD4, LBP_H2 }, { 0xAFD5, 0xAFEF, LBP_H3 }, { 0xAFF0, 0xAFF0, LBP_H2 }, { 0xAFF1, 0xB00B, LBP_H3 }, { 0xB00C, 0xB00C, LBP_H2 }, { 0xB00D, 0xB027, LBP_H3 }, { 0xB028, 0xB028, LBP_H2 }, { 0xB029, 0xB043, LBP_H3 }, { 0xB044, 0xB044, LBP_H2 }, { 0xB045, 0xB05F, LBP_H3 }, { 0xB060, 0xB060, LBP_H2 }, { 0xB061, 0xB07B, LBP_H3 }, { 0xB07C, 0xB07C, LBP_H2 }, { 0xB07D, 0xB097, LBP_H3 }, { 0xB098, 0xB098, LBP_H2 }, { 0xB099, 0xB0B3, LBP_H3 }, { 0xB0B4, 0xB0B4, LBP_H2 }, { 0xB0B5, 0xB0CF, LBP_H3 }, { 0xB0D0, 0xB0D0, LBP_H2 }, { 0xB0D1, 0xB0EB, LBP_H3 }, { 0xB0EC, 0xB0EC, LBP_H2 }, { 0xB0ED, 0xB107, LBP_H3 }, { 0xB108, 0xB108, LBP_H2 }, { 0xB109, 0xB123, LBP_H3 }, { 0xB124, 0xB124, LBP_H2 }, { 0xB125, 0xB13F, LBP_H3 }, { 0xB140, 0xB140, LBP_H2 }, { 0xB141, 0xB15B, LBP_H3 }, { 0xB15C, 0xB15C, LBP_H2 }, { 0xB15D, 0xB177, LBP_H3 }, { 0xB178, 0xB178, LBP_H2 }, { 0xB179, 0xB193, LBP_H3 }, { 0xB194, 0xB194, LBP_H2 }, { 0xB195, 0xB1AF, LBP_H3 }, { 0xB1B0, 0xB1B0, LBP_H2 }, { 0xB1B1, 0xB1CB, LBP_H3 }, { 0xB1CC, 0xB1CC, LBP_H2 }, { 0xB1CD, 0xB1E7, LBP_H3 }, { 0xB1E8, 0xB1E8, LBP_H2 }, { 0xB1E9, 0xB203, LBP_H3 }, { 0xB204, 0xB204, LBP_H2 }, { 0xB205, 0xB21F, LBP_H3 }, { 0xB220, 0xB220, LBP_H2 }, { 0xB221, 0xB23B, LBP_H3 }, { 0xB23C, 0xB23C, LBP_H2 }, { 0xB23D, 0xB257, LBP_H3 }, { 0xB258, 0xB258, LBP_H2 }, { 0xB259, 0xB273, LBP_H3 }, { 0xB274, 0xB274, LBP_H2 }, { 0xB275, 0xB28F, LBP_H3 }, { 0xB290, 0xB290, LBP_H2 }, { 0xB291, 0xB2AB, LBP_H3 }, { 0xB2AC, 0xB2AC, LBP_H2 }, { 0xB2AD, 0xB2C7, LBP_H3 }, { 0xB2C8, 0xB2C8, LBP_H2 }, { 0xB2C9, 0xB2E3, LBP_H3 }, { 0xB2E4, 0xB2E4, LBP_H2 }, { 0xB2E5, 0xB2FF, LBP_H3 }, { 0xB300, 0xB300, LBP_H2 }, { 0xB301, 0xB31B, LBP_H3 }, { 0xB31C, 0xB31C, LBP_H2 }, { 0xB31D, 0xB337, LBP_H3 }, { 0xB338, 0xB338, LBP_H2 }, { 0xB339, 0xB353, LBP_H3 }, { 0xB354, 0xB354, LBP_H2 }, { 0xB355, 0xB36F, LBP_H3 }, { 0xB370, 0xB370, LBP_H2 }, { 0xB371, 0xB38B, LBP_H3 }, { 0xB38C, 0xB38C, LBP_H2 }, { 0xB38D, 0xB3A7, LBP_H3 }, { 0xB3A8, 0xB3A8, LBP_H2 }, { 0xB3A9, 0xB3C3, LBP_H3 }, { 0xB3C4, 0xB3C4, LBP_H2 }, { 0xB3C5, 0xB3DF, LBP_H3 }, { 0xB3E0, 0xB3E0, LBP_H2 }, { 0xB3E1, 0xB3FB, LBP_H3 }, { 0xB3FC, 0xB3FC, LBP_H2 }, { 0xB3FD, 0xB417, LBP_H3 }, { 0xB418, 0xB418, LBP_H2 }, { 0xB419, 0xB433, LBP_H3 }, { 0xB434, 0xB434, LBP_H2 }, { 0xB435, 0xB44F, LBP_H3 }, { 0xB450, 0xB450, LBP_H2 }, { 0xB451, 0xB46B, LBP_H3 }, { 0xB46C, 0xB46C, LBP_H2 }, { 0xB46D, 0xB487, LBP_H3 }, { 0xB488, 0xB488, LBP_H2 }, { 0xB489, 0xB4A3, LBP_H3 }, { 0xB4A4, 0xB4A4, LBP_H2 }, { 0xB4A5, 0xB4BF, LBP_H3 }, { 0xB4C0, 0xB4C0, LBP_H2 }, { 0xB4C1, 0xB4DB, LBP_H3 }, { 0xB4DC, 0xB4DC, LBP_H2 }, { 0xB4DD, 0xB4F7, LBP_H3 }, { 0xB4F8, 0xB4F8, LBP_H2 }, { 0xB4F9, 0xB513, LBP_H3 }, { 0xB514, 0xB514, LBP_H2 }, { 0xB515, 0xB52F, LBP_H3 }, { 0xB530, 0xB530, LBP_H2 }, { 0xB531, 0xB54B, LBP_H3 }, { 0xB54C, 0xB54C, LBP_H2 }, { 0xB54D, 0xB567, LBP_H3 }, { 0xB568, 0xB568, LBP_H2 }, { 0xB569, 0xB583, LBP_H3 }, { 0xB584, 0xB584, LBP_H2 }, { 0xB585, 0xB59F, LBP_H3 }, { 0xB5A0, 0xB5A0, LBP_H2 }, { 0xB5A1, 0xB5BB, LBP_H3 }, { 0xB5BC, 0xB5BC, LBP_H2 }, { 0xB5BD, 0xB5D7, LBP_H3 }, { 0xB5D8, 0xB5D8, LBP_H2 }, { 0xB5D9, 0xB5F3, LBP_H3 }, { 0xB5F4, 0xB5F4, LBP_H2 }, { 0xB5F5, 0xB60F, LBP_H3 }, { 0xB610, 0xB610, LBP_H2 }, { 0xB611, 0xB62B, LBP_H3 }, { 0xB62C, 0xB62C, LBP_H2 }, { 0xB62D, 0xB647, LBP_H3 }, { 0xB648, 0xB648, LBP_H2 }, { 0xB649, 0xB663, LBP_H3 }, { 0xB664, 0xB664, LBP_H2 }, { 0xB665, 0xB67F, LBP_H3 }, { 0xB680, 0xB680, LBP_H2 }, { 0xB681, 0xB69B, LBP_H3 }, { 0xB69C, 0xB69C, LBP_H2 }, { 0xB69D, 0xB6B7, LBP_H3 }, { 0xB6B8, 0xB6B8, LBP_H2 }, { 0xB6B9, 0xB6D3, LBP_H3 }, { 0xB6D4, 0xB6D4, LBP_H2 }, { 0xB6D5, 0xB6EF, LBP_H3 }, { 0xB6F0, 0xB6F0, LBP_H2 }, { 0xB6F1, 0xB70B, LBP_H3 }, { 0xB70C, 0xB70C, LBP_H2 }, { 0xB70D, 0xB727, LBP_H3 }, { 0xB728, 0xB728, LBP_H2 }, { 0xB729, 0xB743, LBP_H3 }, { 0xB744, 0xB744, LBP_H2 }, { 0xB745, 0xB75F, LBP_H3 }, { 0xB760, 0xB760, LBP_H2 }, { 0xB761, 0xB77B, LBP_H3 }, { 0xB77C, 0xB77C, LBP_H2 }, { 0xB77D, 0xB797, LBP_H3 }, { 0xB798, 0xB798, LBP_H2 }, { 0xB799, 0xB7B3, LBP_H3 }, { 0xB7B4, 0xB7B4, LBP_H2 }, { 0xB7B5, 0xB7CF, LBP_H3 }, { 0xB7D0, 0xB7D0, LBP_H2 }, { 0xB7D1, 0xB7EB, LBP_H3 }, { 0xB7EC, 0xB7EC, LBP_H2 }, { 0xB7ED, 0xB807, LBP_H3 }, { 0xB808, 0xB808, LBP_H2 }, { 0xB809, 0xB823, LBP_H3 }, { 0xB824, 0xB824, LBP_H2 }, { 0xB825, 0xB83F, LBP_H3 }, { 0xB840, 0xB840, LBP_H2 }, { 0xB841, 0xB85B, LBP_H3 }, { 0xB85C, 0xB85C, LBP_H2 }, { 0xB85D, 0xB877, LBP_H3 }, { 0xB878, 0xB878, LBP_H2 }, { 0xB879, 0xB893, LBP_H3 }, { 0xB894, 0xB894, LBP_H2 }, { 0xB895, 0xB8AF, LBP_H3 }, { 0xB8B0, 0xB8B0, LBP_H2 }, { 0xB8B1, 0xB8CB, LBP_H3 }, { 0xB8CC, 0xB8CC, LBP_H2 }, { 0xB8CD, 0xB8E7, LBP_H3 }, { 0xB8E8, 0xB8E8, LBP_H2 }, { 0xB8E9, 0xB903, LBP_H3 }, { 0xB904, 0xB904, LBP_H2 }, { 0xB905, 0xB91F, LBP_H3 }, { 0xB920, 0xB920, LBP_H2 }, { 0xB921, 0xB93B, LBP_H3 }, { 0xB93C, 0xB93C, LBP_H2 }, { 0xB93D, 0xB957, LBP_H3 }, { 0xB958, 0xB958, LBP_H2 }, { 0xB959, 0xB973, LBP_H3 }, { 0xB974, 0xB974, LBP_H2 }, { 0xB975, 0xB98F, LBP_H3 }, { 0xB990, 0xB990, LBP_H2 }, { 0xB991, 0xB9AB, LBP_H3 }, { 0xB9AC, 0xB9AC, LBP_H2 }, { 0xB9AD, 0xB9C7, LBP_H3 }, { 0xB9C8, 0xB9C8, LBP_H2 }, { 0xB9C9, 0xB9E3, LBP_H3 }, { 0xB9E4, 0xB9E4, LBP_H2 }, { 0xB9E5, 0xB9FF, LBP_H3 }, { 0xBA00, 0xBA00, LBP_H2 }, { 0xBA01, 0xBA1B, LBP_H3 }, { 0xBA1C, 0xBA1C, LBP_H2 }, { 0xBA1D, 0xBA37, LBP_H3 }, { 0xBA38, 0xBA38, LBP_H2 }, { 0xBA39, 0xBA53, LBP_H3 }, { 0xBA54, 0xBA54, LBP_H2 }, { 0xBA55, 0xBA6F, LBP_H3 }, { 0xBA70, 0xBA70, LBP_H2 }, { 0xBA71, 0xBA8B, LBP_H3 }, { 0xBA8C, 0xBA8C, LBP_H2 }, { 0xBA8D, 0xBAA7, LBP_H3 }, { 0xBAA8, 0xBAA8, LBP_H2 }, { 0xBAA9, 0xBAC3, LBP_H3 }, { 0xBAC4, 0xBAC4, LBP_H2 }, { 0xBAC5, 0xBADF, LBP_H3 }, { 0xBAE0, 0xBAE0, LBP_H2 }, { 0xBAE1, 0xBAFB, LBP_H3 }, { 0xBAFC, 0xBAFC, LBP_H2 }, { 0xBAFD, 0xBB17, LBP_H3 }, { 0xBB18, 0xBB18, LBP_H2 }, { 0xBB19, 0xBB33, LBP_H3 }, { 0xBB34, 0xBB34, LBP_H2 }, { 0xBB35, 0xBB4F, LBP_H3 }, { 0xBB50, 0xBB50, LBP_H2 }, { 0xBB51, 0xBB6B, LBP_H3 }, { 0xBB6C, 0xBB6C, LBP_H2 }, { 0xBB6D, 0xBB87, LBP_H3 }, { 0xBB88, 0xBB88, LBP_H2 }, { 0xBB89, 0xBBA3, LBP_H3 }, { 0xBBA4, 0xBBA4, LBP_H2 }, { 0xBBA5, 0xBBBF, LBP_H3 }, { 0xBBC0, 0xBBC0, LBP_H2 }, { 0xBBC1, 0xBBDB, LBP_H3 }, { 0xBBDC, 0xBBDC, LBP_H2 }, { 0xBBDD, 0xBBF7, LBP_H3 }, { 0xBBF8, 0xBBF8, LBP_H2 }, { 0xBBF9, 0xBC13, LBP_H3 }, { 0xBC14, 0xBC14, LBP_H2 }, { 0xBC15, 0xBC2F, LBP_H3 }, { 0xBC30, 0xBC30, LBP_H2 }, { 0xBC31, 0xBC4B, LBP_H3 }, { 0xBC4C, 0xBC4C, LBP_H2 }, { 0xBC4D, 0xBC67, LBP_H3 }, { 0xBC68, 0xBC68, LBP_H2 }, { 0xBC69, 0xBC83, LBP_H3 }, { 0xBC84, 0xBC84, LBP_H2 }, { 0xBC85, 0xBC9F, LBP_H3 }, { 0xBCA0, 0xBCA0, LBP_H2 }, { 0xBCA1, 0xBCBB, LBP_H3 }, { 0xBCBC, 0xBCBC, LBP_H2 }, { 0xBCBD, 0xBCD7, LBP_H3 }, { 0xBCD8, 0xBCD8, LBP_H2 }, { 0xBCD9, 0xBCF3, LBP_H3 }, { 0xBCF4, 0xBCF4, LBP_H2 }, { 0xBCF5, 0xBD0F, LBP_H3 }, { 0xBD10, 0xBD10, LBP_H2 }, { 0xBD11, 0xBD2B, LBP_H3 }, { 0xBD2C, 0xBD2C, LBP_H2 }, { 0xBD2D, 0xBD47, LBP_H3 }, { 0xBD48, 0xBD48, LBP_H2 }, { 0xBD49, 0xBD63, LBP_H3 }, { 0xBD64, 0xBD64, LBP_H2 }, { 0xBD65, 0xBD7F, LBP_H3 }, { 0xBD80, 0xBD80, LBP_H2 }, { 0xBD81, 0xBD9B, LBP_H3 }, { 0xBD9C, 0xBD9C, LBP_H2 }, { 0xBD9D, 0xBDB7, LBP_H3 }, { 0xBDB8, 0xBDB8, LBP_H2 }, { 0xBDB9, 0xBDD3, LBP_H3 }, { 0xBDD4, 0xBDD4, LBP_H2 }, { 0xBDD5, 0xBDEF, LBP_H3 }, { 0xBDF0, 0xBDF0, LBP_H2 }, { 0xBDF1, 0xBE0B, LBP_H3 }, { 0xBE0C, 0xBE0C, LBP_H2 }, { 0xBE0D, 0xBE27, LBP_H3 }, { 0xBE28, 0xBE28, LBP_H2 }, { 0xBE29, 0xBE43, LBP_H3 }, { 0xBE44, 0xBE44, LBP_H2 }, { 0xBE45, 0xBE5F, LBP_H3 }, { 0xBE60, 0xBE60, LBP_H2 }, { 0xBE61, 0xBE7B, LBP_H3 }, { 0xBE7C, 0xBE7C, LBP_H2 }, { 0xBE7D, 0xBE97, LBP_H3 }, { 0xBE98, 0xBE98, LBP_H2 }, { 0xBE99, 0xBEB3, LBP_H3 }, { 0xBEB4, 0xBEB4, LBP_H2 }, { 0xBEB5, 0xBECF, LBP_H3 }, { 0xBED0, 0xBED0, LBP_H2 }, { 0xBED1, 0xBEEB, LBP_H3 }, { 0xBEEC, 0xBEEC, LBP_H2 }, { 0xBEED, 0xBF07, LBP_H3 }, { 0xBF08, 0xBF08, LBP_H2 }, { 0xBF09, 0xBF23, LBP_H3 }, { 0xBF24, 0xBF24, LBP_H2 }, { 0xBF25, 0xBF3F, LBP_H3 }, { 0xBF40, 0xBF40, LBP_H2 }, { 0xBF41, 0xBF5B, LBP_H3 }, { 0xBF5C, 0xBF5C, LBP_H2 }, { 0xBF5D, 0xBF77, LBP_H3 }, { 0xBF78, 0xBF78, LBP_H2 }, { 0xBF79, 0xBF93, LBP_H3 }, { 0xBF94, 0xBF94, LBP_H2 }, { 0xBF95, 0xBFAF, LBP_H3 }, { 0xBFB0, 0xBFB0, LBP_H2 }, { 0xBFB1, 0xBFCB, LBP_H3 }, { 0xBFCC, 0xBFCC, LBP_H2 }, { 0xBFCD, 0xBFE7, LBP_H3 }, { 0xBFE8, 0xBFE8, LBP_H2 }, { 0xBFE9, 0xC003, LBP_H3 }, { 0xC004, 0xC004, LBP_H2 }, { 0xC005, 0xC01F, LBP_H3 }, { 0xC020, 0xC020, LBP_H2 }, { 0xC021, 0xC03B, LBP_H3 }, { 0xC03C, 0xC03C, LBP_H2 }, { 0xC03D, 0xC057, LBP_H3 }, { 0xC058, 0xC058, LBP_H2 }, { 0xC059, 0xC073, LBP_H3 }, { 0xC074, 0xC074, LBP_H2 }, { 0xC075, 0xC08F, LBP_H3 }, { 0xC090, 0xC090, LBP_H2 }, { 0xC091, 0xC0AB, LBP_H3 }, { 0xC0AC, 0xC0AC, LBP_H2 }, { 0xC0AD, 0xC0C7, LBP_H3 }, { 0xC0C8, 0xC0C8, LBP_H2 }, { 0xC0C9, 0xC0E3, LBP_H3 }, { 0xC0E4, 0xC0E4, LBP_H2 }, { 0xC0E5, 0xC0FF, LBP_H3 }, { 0xC100, 0xC100, LBP_H2 }, { 0xC101, 0xC11B, LBP_H3 }, { 0xC11C, 0xC11C, LBP_H2 }, { 0xC11D, 0xC137, LBP_H3 }, { 0xC138, 0xC138, LBP_H2 }, { 0xC139, 0xC153, LBP_H3 }, { 0xC154, 0xC154, LBP_H2 }, { 0xC155, 0xC16F, LBP_H3 }, { 0xC170, 0xC170, LBP_H2 }, { 0xC171, 0xC18B, LBP_H3 }, { 0xC18C, 0xC18C, LBP_H2 }, { 0xC18D, 0xC1A7, LBP_H3 }, { 0xC1A8, 0xC1A8, LBP_H2 }, { 0xC1A9, 0xC1C3, LBP_H3 }, { 0xC1C4, 0xC1C4, LBP_H2 }, { 0xC1C5, 0xC1DF, LBP_H3 }, { 0xC1E0, 0xC1E0, LBP_H2 }, { 0xC1E1, 0xC1FB, LBP_H3 }, { 0xC1FC, 0xC1FC, LBP_H2 }, { 0xC1FD, 0xC217, LBP_H3 }, { 0xC218, 0xC218, LBP_H2 }, { 0xC219, 0xC233, LBP_H3 }, { 0xC234, 0xC234, LBP_H2 }, { 0xC235, 0xC24F, LBP_H3 }, { 0xC250, 0xC250, LBP_H2 }, { 0xC251, 0xC26B, LBP_H3 }, { 0xC26C, 0xC26C, LBP_H2 }, { 0xC26D, 0xC287, LBP_H3 }, { 0xC288, 0xC288, LBP_H2 }, { 0xC289, 0xC2A3, LBP_H3 }, { 0xC2A4, 0xC2A4, LBP_H2 }, { 0xC2A5, 0xC2BF, LBP_H3 }, { 0xC2C0, 0xC2C0, LBP_H2 }, { 0xC2C1, 0xC2DB, LBP_H3 }, { 0xC2DC, 0xC2DC, LBP_H2 }, { 0xC2DD, 0xC2F7, LBP_H3 }, { 0xC2F8, 0xC2F8, LBP_H2 }, { 0xC2F9, 0xC313, LBP_H3 }, { 0xC314, 0xC314, LBP_H2 }, { 0xC315, 0xC32F, LBP_H3 }, { 0xC330, 0xC330, LBP_H2 }, { 0xC331, 0xC34B, LBP_H3 }, { 0xC34C, 0xC34C, LBP_H2 }, { 0xC34D, 0xC367, LBP_H3 }, { 0xC368, 0xC368, LBP_H2 }, { 0xC369, 0xC383, LBP_H3 }, { 0xC384, 0xC384, LBP_H2 }, { 0xC385, 0xC39F, LBP_H3 }, { 0xC3A0, 0xC3A0, LBP_H2 }, { 0xC3A1, 0xC3BB, LBP_H3 }, { 0xC3BC, 0xC3BC, LBP_H2 }, { 0xC3BD, 0xC3D7, LBP_H3 }, { 0xC3D8, 0xC3D8, LBP_H2 }, { 0xC3D9, 0xC3F3, LBP_H3 }, { 0xC3F4, 0xC3F4, LBP_H2 }, { 0xC3F5, 0xC40F, LBP_H3 }, { 0xC410, 0xC410, LBP_H2 }, { 0xC411, 0xC42B, LBP_H3 }, { 0xC42C, 0xC42C, LBP_H2 }, { 0xC42D, 0xC447, LBP_H3 }, { 0xC448, 0xC448, LBP_H2 }, { 0xC449, 0xC463, LBP_H3 }, { 0xC464, 0xC464, LBP_H2 }, { 0xC465, 0xC47F, LBP_H3 }, { 0xC480, 0xC480, LBP_H2 }, { 0xC481, 0xC49B, LBP_H3 }, { 0xC49C, 0xC49C, LBP_H2 }, { 0xC49D, 0xC4B7, LBP_H3 }, { 0xC4B8, 0xC4B8, LBP_H2 }, { 0xC4B9, 0xC4D3, LBP_H3 }, { 0xC4D4, 0xC4D4, LBP_H2 }, { 0xC4D5, 0xC4EF, LBP_H3 }, { 0xC4F0, 0xC4F0, LBP_H2 }, { 0xC4F1, 0xC50B, LBP_H3 }, { 0xC50C, 0xC50C, LBP_H2 }, { 0xC50D, 0xC527, LBP_H3 }, { 0xC528, 0xC528, LBP_H2 }, { 0xC529, 0xC543, LBP_H3 }, { 0xC544, 0xC544, LBP_H2 }, { 0xC545, 0xC55F, LBP_H3 }, { 0xC560, 0xC560, LBP_H2 }, { 0xC561, 0xC57B, LBP_H3 }, { 0xC57C, 0xC57C, LBP_H2 }, { 0xC57D, 0xC597, LBP_H3 }, { 0xC598, 0xC598, LBP_H2 }, { 0xC599, 0xC5B3, LBP_H3 }, { 0xC5B4, 0xC5B4, LBP_H2 }, { 0xC5B5, 0xC5CF, LBP_H3 }, { 0xC5D0, 0xC5D0, LBP_H2 }, { 0xC5D1, 0xC5EB, LBP_H3 }, { 0xC5EC, 0xC5EC, LBP_H2 }, { 0xC5ED, 0xC607, LBP_H3 }, { 0xC608, 0xC608, LBP_H2 }, { 0xC609, 0xC623, LBP_H3 }, { 0xC624, 0xC624, LBP_H2 }, { 0xC625, 0xC63F, LBP_H3 }, { 0xC640, 0xC640, LBP_H2 }, { 0xC641, 0xC65B, LBP_H3 }, { 0xC65C, 0xC65C, LBP_H2 }, { 0xC65D, 0xC677, LBP_H3 }, { 0xC678, 0xC678, LBP_H2 }, { 0xC679, 0xC693, LBP_H3 }, { 0xC694, 0xC694, LBP_H2 }, { 0xC695, 0xC6AF, LBP_H3 }, { 0xC6B0, 0xC6B0, LBP_H2 }, { 0xC6B1, 0xC6CB, LBP_H3 }, { 0xC6CC, 0xC6CC, LBP_H2 }, { 0xC6CD, 0xC6E7, LBP_H3 }, { 0xC6E8, 0xC6E8, LBP_H2 }, { 0xC6E9, 0xC703, LBP_H3 }, { 0xC704, 0xC704, LBP_H2 }, { 0xC705, 0xC71F, LBP_H3 }, { 0xC720, 0xC720, LBP_H2 }, { 0xC721, 0xC73B, LBP_H3 }, { 0xC73C, 0xC73C, LBP_H2 }, { 0xC73D, 0xC757, LBP_H3 }, { 0xC758, 0xC758, LBP_H2 }, { 0xC759, 0xC773, LBP_H3 }, { 0xC774, 0xC774, LBP_H2 }, { 0xC775, 0xC78F, LBP_H3 }, { 0xC790, 0xC790, LBP_H2 }, { 0xC791, 0xC7AB, LBP_H3 }, { 0xC7AC, 0xC7AC, LBP_H2 }, { 0xC7AD, 0xC7C7, LBP_H3 }, { 0xC7C8, 0xC7C8, LBP_H2 }, { 0xC7C9, 0xC7E3, LBP_H3 }, { 0xC7E4, 0xC7E4, LBP_H2 }, { 0xC7E5, 0xC7FF, LBP_H3 }, { 0xC800, 0xC800, LBP_H2 }, { 0xC801, 0xC81B, LBP_H3 }, { 0xC81C, 0xC81C, LBP_H2 }, { 0xC81D, 0xC837, LBP_H3 }, { 0xC838, 0xC838, LBP_H2 }, { 0xC839, 0xC853, LBP_H3 }, { 0xC854, 0xC854, LBP_H2 }, { 0xC855, 0xC86F, LBP_H3 }, { 0xC870, 0xC870, LBP_H2 }, { 0xC871, 0xC88B, LBP_H3 }, { 0xC88C, 0xC88C, LBP_H2 }, { 0xC88D, 0xC8A7, LBP_H3 }, { 0xC8A8, 0xC8A8, LBP_H2 }, { 0xC8A9, 0xC8C3, LBP_H3 }, { 0xC8C4, 0xC8C4, LBP_H2 }, { 0xC8C5, 0xC8DF, LBP_H3 }, { 0xC8E0, 0xC8E0, LBP_H2 }, { 0xC8E1, 0xC8FB, LBP_H3 }, { 0xC8FC, 0xC8FC, LBP_H2 }, { 0xC8FD, 0xC917, LBP_H3 }, { 0xC918, 0xC918, LBP_H2 }, { 0xC919, 0xC933, LBP_H3 }, { 0xC934, 0xC934, LBP_H2 }, { 0xC935, 0xC94F, LBP_H3 }, { 0xC950, 0xC950, LBP_H2 }, { 0xC951, 0xC96B, LBP_H3 }, { 0xC96C, 0xC96C, LBP_H2 }, { 0xC96D, 0xC987, LBP_H3 }, { 0xC988, 0xC988, LBP_H2 }, { 0xC989, 0xC9A3, LBP_H3 }, { 0xC9A4, 0xC9A4, LBP_H2 }, { 0xC9A5, 0xC9BF, LBP_H3 }, { 0xC9C0, 0xC9C0, LBP_H2 }, { 0xC9C1, 0xC9DB, LBP_H3 }, { 0xC9DC, 0xC9DC, LBP_H2 }, { 0xC9DD, 0xC9F7, LBP_H3 }, { 0xC9F8, 0xC9F8, LBP_H2 }, { 0xC9F9, 0xCA13, LBP_H3 }, { 0xCA14, 0xCA14, LBP_H2 }, { 0xCA15, 0xCA2F, LBP_H3 }, { 0xCA30, 0xCA30, LBP_H2 }, { 0xCA31, 0xCA4B, LBP_H3 }, { 0xCA4C, 0xCA4C, LBP_H2 }, { 0xCA4D, 0xCA67, LBP_H3 }, { 0xCA68, 0xCA68, LBP_H2 }, { 0xCA69, 0xCA83, LBP_H3 }, { 0xCA84, 0xCA84, LBP_H2 }, { 0xCA85, 0xCA9F, LBP_H3 }, { 0xCAA0, 0xCAA0, LBP_H2 }, { 0xCAA1, 0xCABB, LBP_H3 }, { 0xCABC, 0xCABC, LBP_H2 }, { 0xCABD, 0xCAD7, LBP_H3 }, { 0xCAD8, 0xCAD8, LBP_H2 }, { 0xCAD9, 0xCAF3, LBP_H3 }, { 0xCAF4, 0xCAF4, LBP_H2 }, { 0xCAF5, 0xCB0F, LBP_H3 }, { 0xCB10, 0xCB10, LBP_H2 }, { 0xCB11, 0xCB2B, LBP_H3 }, { 0xCB2C, 0xCB2C, LBP_H2 }, { 0xCB2D, 0xCB47, LBP_H3 }, { 0xCB48, 0xCB48, LBP_H2 }, { 0xCB49, 0xCB63, LBP_H3 }, { 0xCB64, 0xCB64, LBP_H2 }, { 0xCB65, 0xCB7F, LBP_H3 }, { 0xCB80, 0xCB80, LBP_H2 }, { 0xCB81, 0xCB9B, LBP_H3 }, { 0xCB9C, 0xCB9C, LBP_H2 }, { 0xCB9D, 0xCBB7, LBP_H3 }, { 0xCBB8, 0xCBB8, LBP_H2 }, { 0xCBB9, 0xCBD3, LBP_H3 }, { 0xCBD4, 0xCBD4, LBP_H2 }, { 0xCBD5, 0xCBEF, LBP_H3 }, { 0xCBF0, 0xCBF0, LBP_H2 }, { 0xCBF1, 0xCC0B, LBP_H3 }, { 0xCC0C, 0xCC0C, LBP_H2 }, { 0xCC0D, 0xCC27, LBP_H3 }, { 0xCC28, 0xCC28, LBP_H2 }, { 0xCC29, 0xCC43, LBP_H3 }, { 0xCC44, 0xCC44, LBP_H2 }, { 0xCC45, 0xCC5F, LBP_H3 }, { 0xCC60, 0xCC60, LBP_H2 }, { 0xCC61, 0xCC7B, LBP_H3 }, { 0xCC7C, 0xCC7C, LBP_H2 }, { 0xCC7D, 0xCC97, LBP_H3 }, { 0xCC98, 0xCC98, LBP_H2 }, { 0xCC99, 0xCCB3, LBP_H3 }, { 0xCCB4, 0xCCB4, LBP_H2 }, { 0xCCB5, 0xCCCF, LBP_H3 }, { 0xCCD0, 0xCCD0, LBP_H2 }, { 0xCCD1, 0xCCEB, LBP_H3 }, { 0xCCEC, 0xCCEC, LBP_H2 }, { 0xCCED, 0xCD07, LBP_H3 }, { 0xCD08, 0xCD08, LBP_H2 }, { 0xCD09, 0xCD23, LBP_H3 }, { 0xCD24, 0xCD24, LBP_H2 }, { 0xCD25, 0xCD3F, LBP_H3 }, { 0xCD40, 0xCD40, LBP_H2 }, { 0xCD41, 0xCD5B, LBP_H3 }, { 0xCD5C, 0xCD5C, LBP_H2 }, { 0xCD5D, 0xCD77, LBP_H3 }, { 0xCD78, 0xCD78, LBP_H2 }, { 0xCD79, 0xCD93, LBP_H3 }, { 0xCD94, 0xCD94, LBP_H2 }, { 0xCD95, 0xCDAF, LBP_H3 }, { 0xCDB0, 0xCDB0, LBP_H2 }, { 0xCDB1, 0xCDCB, LBP_H3 }, { 0xCDCC, 0xCDCC, LBP_H2 }, { 0xCDCD, 0xCDE7, LBP_H3 }, { 0xCDE8, 0xCDE8, LBP_H2 }, { 0xCDE9, 0xCE03, LBP_H3 }, { 0xCE04, 0xCE04, LBP_H2 }, { 0xCE05, 0xCE1F, LBP_H3 }, { 0xCE20, 0xCE20, LBP_H2 }, { 0xCE21, 0xCE3B, LBP_H3 }, { 0xCE3C, 0xCE3C, LBP_H2 }, { 0xCE3D, 0xCE57, LBP_H3 }, { 0xCE58, 0xCE58, LBP_H2 }, { 0xCE59, 0xCE73, LBP_H3 }, { 0xCE74, 0xCE74, LBP_H2 }, { 0xCE75, 0xCE8F, LBP_H3 }, { 0xCE90, 0xCE90, LBP_H2 }, { 0xCE91, 0xCEAB, LBP_H3 }, { 0xCEAC, 0xCEAC, LBP_H2 }, { 0xCEAD, 0xCEC7, LBP_H3 }, { 0xCEC8, 0xCEC8, LBP_H2 }, { 0xCEC9, 0xCEE3, LBP_H3 }, { 0xCEE4, 0xCEE4, LBP_H2 }, { 0xCEE5, 0xCEFF, LBP_H3 }, { 0xCF00, 0xCF00, LBP_H2 }, { 0xCF01, 0xCF1B, LBP_H3 }, { 0xCF1C, 0xCF1C, LBP_H2 }, { 0xCF1D, 0xCF37, LBP_H3 }, { 0xCF38, 0xCF38, LBP_H2 }, { 0xCF39, 0xCF53, LBP_H3 }, { 0xCF54, 0xCF54, LBP_H2 }, { 0xCF55, 0xCF6F, LBP_H3 }, { 0xCF70, 0xCF70, LBP_H2 }, { 0xCF71, 0xCF8B, LBP_H3 }, { 0xCF8C, 0xCF8C, LBP_H2 }, { 0xCF8D, 0xCFA7, LBP_H3 }, { 0xCFA8, 0xCFA8, LBP_H2 }, { 0xCFA9, 0xCFC3, LBP_H3 }, { 0xCFC4, 0xCFC4, LBP_H2 }, { 0xCFC5, 0xCFDF, LBP_H3 }, { 0xCFE0, 0xCFE0, LBP_H2 }, { 0xCFE1, 0xCFFB, LBP_H3 }, { 0xCFFC, 0xCFFC, LBP_H2 }, { 0xCFFD, 0xD017, LBP_H3 }, { 0xD018, 0xD018, LBP_H2 }, { 0xD019, 0xD033, LBP_H3 }, { 0xD034, 0xD034, LBP_H2 }, { 0xD035, 0xD04F, LBP_H3 }, { 0xD050, 0xD050, LBP_H2 }, { 0xD051, 0xD06B, LBP_H3 }, { 0xD06C, 0xD06C, LBP_H2 }, { 0xD06D, 0xD087, LBP_H3 }, { 0xD088, 0xD088, LBP_H2 }, { 0xD089, 0xD0A3, LBP_H3 }, { 0xD0A4, 0xD0A4, LBP_H2 }, { 0xD0A5, 0xD0BF, LBP_H3 }, { 0xD0C0, 0xD0C0, LBP_H2 }, { 0xD0C1, 0xD0DB, LBP_H3 }, { 0xD0DC, 0xD0DC, LBP_H2 }, { 0xD0DD, 0xD0F7, LBP_H3 }, { 0xD0F8, 0xD0F8, LBP_H2 }, { 0xD0F9, 0xD113, LBP_H3 }, { 0xD114, 0xD114, LBP_H2 }, { 0xD115, 0xD12F, LBP_H3 }, { 0xD130, 0xD130, LBP_H2 }, { 0xD131, 0xD14B, LBP_H3 }, { 0xD14C, 0xD14C, LBP_H2 }, { 0xD14D, 0xD167, LBP_H3 }, { 0xD168, 0xD168, LBP_H2 }, { 0xD169, 0xD183, LBP_H3 }, { 0xD184, 0xD184, LBP_H2 }, { 0xD185, 0xD19F, LBP_H3 }, { 0xD1A0, 0xD1A0, LBP_H2 }, { 0xD1A1, 0xD1BB, LBP_H3 }, { 0xD1BC, 0xD1BC, LBP_H2 }, { 0xD1BD, 0xD1D7, LBP_H3 }, { 0xD1D8, 0xD1D8, LBP_H2 }, { 0xD1D9, 0xD1F3, LBP_H3 }, { 0xD1F4, 0xD1F4, LBP_H2 }, { 0xD1F5, 0xD20F, LBP_H3 }, { 0xD210, 0xD210, LBP_H2 }, { 0xD211, 0xD22B, LBP_H3 }, { 0xD22C, 0xD22C, LBP_H2 }, { 0xD22D, 0xD247, LBP_H3 }, { 0xD248, 0xD248, LBP_H2 }, { 0xD249, 0xD263, LBP_H3 }, { 0xD264, 0xD264, LBP_H2 }, { 0xD265, 0xD27F, LBP_H3 }, { 0xD280, 0xD280, LBP_H2 }, { 0xD281, 0xD29B, LBP_H3 }, { 0xD29C, 0xD29C, LBP_H2 }, { 0xD29D, 0xD2B7, LBP_H3 }, { 0xD2B8, 0xD2B8, LBP_H2 }, { 0xD2B9, 0xD2D3, LBP_H3 }, { 0xD2D4, 0xD2D4, LBP_H2 }, { 0xD2D5, 0xD2EF, LBP_H3 }, { 0xD2F0, 0xD2F0, LBP_H2 }, { 0xD2F1, 0xD30B, LBP_H3 }, { 0xD30C, 0xD30C, LBP_H2 }, { 0xD30D, 0xD327, LBP_H3 }, { 0xD328, 0xD328, LBP_H2 }, { 0xD329, 0xD343, LBP_H3 }, { 0xD344, 0xD344, LBP_H2 }, { 0xD345, 0xD35F, LBP_H3 }, { 0xD360, 0xD360, LBP_H2 }, { 0xD361, 0xD37B, LBP_H3 }, { 0xD37C, 0xD37C, LBP_H2 }, { 0xD37D, 0xD397, LBP_H3 }, { 0xD398, 0xD398, LBP_H2 }, { 0xD399, 0xD3B3, LBP_H3 }, { 0xD3B4, 0xD3B4, LBP_H2 }, { 0xD3B5, 0xD3CF, LBP_H3 }, { 0xD3D0, 0xD3D0, LBP_H2 }, { 0xD3D1, 0xD3EB, LBP_H3 }, { 0xD3EC, 0xD3EC, LBP_H2 }, { 0xD3ED, 0xD407, LBP_H3 }, { 0xD408, 0xD408, LBP_H2 }, { 0xD409, 0xD423, LBP_H3 }, { 0xD424, 0xD424, LBP_H2 }, { 0xD425, 0xD43F, LBP_H3 }, { 0xD440, 0xD440, LBP_H2 }, { 0xD441, 0xD45B, LBP_H3 }, { 0xD45C, 0xD45C, LBP_H2 }, { 0xD45D, 0xD477, LBP_H3 }, { 0xD478, 0xD478, LBP_H2 }, { 0xD479, 0xD493, LBP_H3 }, { 0xD494, 0xD494, LBP_H2 }, { 0xD495, 0xD4AF, LBP_H3 }, { 0xD4B0, 0xD4B0, LBP_H2 }, { 0xD4B1, 0xD4CB, LBP_H3 }, { 0xD4CC, 0xD4CC, LBP_H2 }, { 0xD4CD, 0xD4E7, LBP_H3 }, { 0xD4E8, 0xD4E8, LBP_H2 }, { 0xD4E9, 0xD503, LBP_H3 }, { 0xD504, 0xD504, LBP_H2 }, { 0xD505, 0xD51F, LBP_H3 }, { 0xD520, 0xD520, LBP_H2 }, { 0xD521, 0xD53B, LBP_H3 }, { 0xD53C, 0xD53C, LBP_H2 }, { 0xD53D, 0xD557, LBP_H3 }, { 0xD558, 0xD558, LBP_H2 }, { 0xD559, 0xD573, LBP_H3 }, { 0xD574, 0xD574, LBP_H2 }, { 0xD575, 0xD58F, LBP_H3 }, { 0xD590, 0xD590, LBP_H2 }, { 0xD591, 0xD5AB, LBP_H3 }, { 0xD5AC, 0xD5AC, LBP_H2 }, { 0xD5AD, 0xD5C7, LBP_H3 }, { 0xD5C8, 0xD5C8, LBP_H2 }, { 0xD5C9, 0xD5E3, LBP_H3 }, { 0xD5E4, 0xD5E4, LBP_H2 }, { 0xD5E5, 0xD5FF, LBP_H3 }, { 0xD600, 0xD600, LBP_H2 }, { 0xD601, 0xD61B, LBP_H3 }, { 0xD61C, 0xD61C, LBP_H2 }, { 0xD61D, 0xD637, LBP_H3 }, { 0xD638, 0xD638, LBP_H2 }, { 0xD639, 0xD653, LBP_H3 }, { 0xD654, 0xD654, LBP_H2 }, { 0xD655, 0xD66F, LBP_H3 }, { 0xD670, 0xD670, LBP_H2 }, { 0xD671, 0xD68B, LBP_H3 }, { 0xD68C, 0xD68C, LBP_H2 }, { 0xD68D, 0xD6A7, LBP_H3 }, { 0xD6A8, 0xD6A8, LBP_H2 }, { 0xD6A9, 0xD6C3, LBP_H3 }, { 0xD6C4, 0xD6C4, LBP_H2 }, { 0xD6C5, 0xD6DF, LBP_H3 }, { 0xD6E0, 0xD6E0, LBP_H2 }, { 0xD6E1, 0xD6FB, LBP_H3 }, { 0xD6FC, 0xD6FC, LBP_H2 }, { 0xD6FD, 0xD717, LBP_H3 }, { 0xD718, 0xD718, LBP_H2 }, { 0xD719, 0xD733, LBP_H3 }, { 0xD734, 0xD734, LBP_H2 }, { 0xD735, 0xD74F, LBP_H3 }, { 0xD750, 0xD750, LBP_H2 }, { 0xD751, 0xD76B, LBP_H3 }, { 0xD76C, 0xD76C, LBP_H2 }, { 0xD76D, 0xD787, LBP_H3 }, { 0xD788, 0xD788, LBP_H2 }, { 0xD789, 0xD7A3, LBP_H3 }, { 0xD7B0, 0xD7C6, LBP_JV }, { 0xD7CB, 0xD7FB, LBP_JT }, { 0xD800, 0xDFFF, LBP_SG }, { 0xE000, 0xF8FF, LBP_XX }, { 0xF900, 0xFAFF, LBP_ID }, { 0xFB00, 0xFB1D, LBP_AL }, { 0xFB1E, 0xFB1E, LBP_CM }, { 0xFB1F, 0xFD3D, LBP_AL }, { 0xFD3E, 0xFD3E, LBP_OP }, { 0xFD3F, 0xFD3F, LBP_CL }, { 0xFD50, 0xFDFB, LBP_AL }, { 0xFDFC, 0xFDFC, LBP_PO }, { 0xFDFD, 0xFDFD, LBP_AL }, { 0xFE00, 0xFE0F, LBP_CM }, { 0xFE10, 0xFE10, LBP_IS }, { 0xFE11, 0xFE12, LBP_CL }, { 0xFE13, 0xFE14, LBP_IS }, { 0xFE15, 0xFE16, LBP_EX }, { 0xFE17, 0xFE17, LBP_OP }, { 0xFE18, 0xFE18, LBP_CL }, { 0xFE19, 0xFE19, LBP_IN }, { 0xFE20, 0xFE26, LBP_CM }, { 0xFE30, 0xFE34, LBP_ID }, { 0xFE35, 0xFE35, LBP_OP }, { 0xFE36, 0xFE36, LBP_CL }, { 0xFE37, 0xFE37, LBP_OP }, { 0xFE38, 0xFE38, LBP_CL }, { 0xFE39, 0xFE39, LBP_OP }, { 0xFE3A, 0xFE3A, LBP_CL }, { 0xFE3B, 0xFE3B, LBP_OP }, { 0xFE3C, 0xFE3C, LBP_CL }, { 0xFE3D, 0xFE3D, LBP_OP }, { 0xFE3E, 0xFE3E, LBP_CL }, { 0xFE3F, 0xFE3F, LBP_OP }, { 0xFE40, 0xFE40, LBP_CL }, { 0xFE41, 0xFE41, LBP_OP }, { 0xFE42, 0xFE42, LBP_CL }, { 0xFE43, 0xFE43, LBP_OP }, { 0xFE44, 0xFE44, LBP_CL }, { 0xFE45, 0xFE46, LBP_ID }, { 0xFE47, 0xFE47, LBP_OP }, { 0xFE48, 0xFE48, LBP_CL }, { 0xFE49, 0xFE4F, LBP_ID }, { 0xFE50, 0xFE50, LBP_CL }, { 0xFE51, 0xFE51, LBP_ID }, { 0xFE52, 0xFE52, LBP_CL }, { 0xFE54, 0xFE55, LBP_NS }, { 0xFE56, 0xFE57, LBP_EX }, { 0xFE58, 0xFE58, LBP_ID }, { 0xFE59, 0xFE59, LBP_OP }, { 0xFE5A, 0xFE5A, LBP_CL }, { 0xFE5B, 0xFE5B, LBP_OP }, { 0xFE5C, 0xFE5C, LBP_CL }, { 0xFE5D, 0xFE5D, LBP_OP }, { 0xFE5E, 0xFE5E, LBP_CL }, { 0xFE5F, 0xFE68, LBP_ID }, { 0xFE69, 0xFE69, LBP_PR }, { 0xFE6A, 0xFE6A, LBP_PO }, { 0xFE6B, 0xFE6B, LBP_ID }, { 0xFE70, 0xFEFC, LBP_AL }, { 0xFEFF, 0xFEFF, LBP_WJ }, { 0xFF01, 0xFF01, LBP_EX }, { 0xFF02, 0xFF03, LBP_ID }, { 0xFF04, 0xFF04, LBP_PR }, { 0xFF05, 0xFF05, LBP_PO }, { 0xFF06, 0xFF07, LBP_ID }, { 0xFF08, 0xFF08, LBP_OP }, { 0xFF09, 0xFF09, LBP_CL }, { 0xFF0A, 0xFF0B, LBP_ID }, { 0xFF0C, 0xFF0C, LBP_CL }, { 0xFF0D, 0xFF0D, LBP_ID }, { 0xFF0E, 0xFF0E, LBP_CL }, { 0xFF0F, 0xFF19, LBP_ID }, { 0xFF1A, 0xFF1B, LBP_NS }, { 0xFF1C, 0xFF1E, LBP_ID }, { 0xFF1F, 0xFF1F, LBP_EX }, { 0xFF20, 0xFF3A, LBP_ID }, { 0xFF3B, 0xFF3B, LBP_OP }, { 0xFF3C, 0xFF3C, LBP_ID }, { 0xFF3D, 0xFF3D, LBP_CL }, { 0xFF3E, 0xFF5A, LBP_ID }, { 0xFF5B, 0xFF5B, LBP_OP }, { 0xFF5C, 0xFF5C, LBP_ID }, { 0xFF5D, 0xFF5D, LBP_CL }, { 0xFF5E, 0xFF5E, LBP_ID }, { 0xFF5F, 0xFF5F, LBP_OP }, { 0xFF60, 0xFF61, LBP_CL }, { 0xFF62, 0xFF62, LBP_OP }, { 0xFF63, 0xFF64, LBP_CL }, { 0xFF65, 0xFF65, LBP_NS }, { 0xFF66, 0xFF66, LBP_AL }, { 0xFF67, 0xFF70, LBP_NS }, { 0xFF71, 0xFF9D, LBP_AL }, { 0xFF9E, 0xFF9F, LBP_NS }, { 0xFFA0, 0xFFDC, LBP_AL }, { 0xFFE0, 0xFFE0, LBP_PO }, { 0xFFE1, 0xFFE1, LBP_PR }, { 0xFFE2, 0xFFE4, LBP_ID }, { 0xFFE5, 0xFFE6, LBP_PR }, { 0xFFE8, 0xFFEE, LBP_AL }, { 0xFFF9, 0xFFFB, LBP_CM }, { 0xFFFC, 0xFFFC, LBP_CB }, { 0xFFFD, 0xFFFD, LBP_AI }, { 0x10000, 0x100FA, LBP_AL }, { 0x10100, 0x10102, LBP_BA }, { 0x10107, 0x101FC, LBP_AL }, { 0x101FD, 0x101FD, LBP_CM }, { 0x10280, 0x1039D, LBP_AL }, { 0x1039F, 0x1039F, LBP_BA }, { 0x103A0, 0x103CF, LBP_AL }, { 0x103D0, 0x103D0, LBP_BA }, { 0x103D1, 0x1049D, LBP_AL }, { 0x104A0, 0x104A9, LBP_NU }, { 0x10800, 0x10855, LBP_AL }, { 0x10857, 0x10857, LBP_BA }, { 0x10858, 0x1091B, LBP_AL }, { 0x1091F, 0x1091F, LBP_BA }, { 0x10920, 0x10A00, LBP_AL }, { 0x10A01, 0x10A0F, LBP_CM }, { 0x10A10, 0x10A33, LBP_AL }, { 0x10A38, 0x10A3F, LBP_CM }, { 0x10A40, 0x10A47, LBP_AL }, { 0x10A50, 0x10A57, LBP_BA }, { 0x10A58, 0x10B35, LBP_AL }, { 0x10B39, 0x10B3F, LBP_BA }, { 0x10B40, 0x10E7E, LBP_AL }, { 0x11000, 0x11002, LBP_CM }, { 0x11003, 0x11037, LBP_AL }, { 0x11038, 0x11046, LBP_CM }, { 0x11047, 0x11048, LBP_BA }, { 0x11049, 0x11065, LBP_AL }, { 0x11066, 0x1106F, LBP_NU }, { 0x11080, 0x11082, LBP_CM }, { 0x11083, 0x110AF, LBP_AL }, { 0x110B0, 0x110BA, LBP_CM }, { 0x110BB, 0x110BD, LBP_AL }, { 0x110BE, 0x110C1, LBP_BA }, { 0x12000, 0x12462, LBP_AL }, { 0x12470, 0x12473, LBP_BA }, { 0x13000, 0x13257, LBP_AL }, { 0x13258, 0x1325A, LBP_OP }, { 0x1325B, 0x1325D, LBP_CL }, { 0x1325E, 0x13281, LBP_AL }, { 0x13282, 0x13282, LBP_CL }, { 0x13283, 0x13285, LBP_AL }, { 0x13286, 0x13286, LBP_OP }, { 0x13287, 0x13287, LBP_CL }, { 0x13288, 0x13288, LBP_OP }, { 0x13289, 0x13289, LBP_CL }, { 0x1328A, 0x13378, LBP_AL }, { 0x13379, 0x13379, LBP_OP }, { 0x1337A, 0x1337B, LBP_CL }, { 0x1337C, 0x16A38, LBP_AL }, { 0x1B000, 0x1B001, LBP_ID }, { 0x1D000, 0x1D164, LBP_AL }, { 0x1D165, 0x1D169, LBP_CM }, { 0x1D16A, 0x1D16C, LBP_AL }, { 0x1D16D, 0x1D182, LBP_CM }, { 0x1D183, 0x1D184, LBP_AL }, { 0x1D185, 0x1D18B, LBP_CM }, { 0x1D18C, 0x1D1A9, LBP_AL }, { 0x1D1AA, 0x1D1AD, LBP_CM }, { 0x1D1AE, 0x1D241, LBP_AL }, { 0x1D242, 0x1D244, LBP_CM }, { 0x1D245, 0x1D7CB, LBP_AL }, { 0x1D7CE, 0x1D7FF, LBP_NU }, { 0x1F000, 0x1F0DF, LBP_AL }, { 0x1F100, 0x1F12D, LBP_AI }, { 0x1F12E, 0x1F12E, LBP_AL }, { 0x1F130, 0x1F19A, LBP_AI }, { 0x1F1E6, 0x1F1FF, LBP_AL }, { 0x1F200, 0x1F251, LBP_ID }, { 0x1F300, 0x1F773, LBP_AL }, { 0x20000, 0x3FFFD, LBP_ID }, { 0xE0001, 0xE01EF, LBP_CM }, { 0xF0000, 0x10FFFD, LBP_XX }, { 0xFFFFFFFF, 0xFFFFFFFF, LBP_Undefined } }; evas-1.7.9/src/static_deps/liblinebreak/linebreakdef.c0000664000175000017500000001246612175475547017736 00000000000000/* vim: set tabstop=4 shiftwidth=4: */ /* * Line breaking in a Unicode sequence. Designed to be used in a * generic text renderer. * * Copyright (C) 2008-2010 Wu Yongwei * * This software is provided 'as-is', without any express or implied * warranty. In no event will the author be held liable for any damages * arising from the use of this software. * * Permission is granted to anyone to use this software for any purpose, * including commercial applications, and to alter it and redistribute * it freely, subject to the following restrictions: * * 1. The origin of this software must not be misrepresented; you must * not claim that you wrote the original software. If you use this * software in a product, an acknowledgement in the product * documentation would be appreciated but is not required. * 2. Altered source versions must be plainly marked as such, and must * not be misrepresented as being the original software. * 3. This notice may not be removed or altered from any source * distribution. * * The main reference is Unicode Standard Annex 14 (UAX #14): * * * When this library was designed, this annex was at Revision 19, for * Unicode 5.0.0: * * * This library has been updated according to Revision 24, for * Unicode 5.2.0: * * * The Unicode Terms of Use are available at * */ /** * @file linebreakdef.c * * Definition of language-specific data. * * @version 2.0, 2010/01/03 * @author Wu Yongwei */ #include "linebreak.h" #include "linebreakdef.h" /** * English-specifc data over the default Unicode rules. */ static struct LineBreakProperties lb_prop_English[] = { { 0x2018, 0x2018, LBP_OP }, /* Left single quotation mark: opening */ { 0x201C, 0x201C, LBP_OP }, /* Left double quotation mark: opening */ { 0x201D, 0x201D, LBP_CL }, /* Right double quotation mark: closing */ { 0, 0, LBP_Undefined } }; /** * German-specifc data over the default Unicode rules. */ static struct LineBreakProperties lb_prop_German[] = { { 0x00AB, 0x00AB, LBP_CL }, /* Left double angle quotation mark: closing */ { 0x00BB, 0x00BB, LBP_OP }, /* Right double angle quotation mark: opening */ { 0x2018, 0x2018, LBP_CL }, /* Left single quotation mark: closing */ { 0x201C, 0x201C, LBP_CL }, /* Left double quotation mark: closing */ { 0x2039, 0x2039, LBP_CL }, /* Left single angle quotation mark: closing */ { 0x203A, 0x203A, LBP_OP }, /* Right single angle quotation mark: opening */ { 0, 0, LBP_Undefined } }; /** * Spanish-specifc data over the default Unicode rules. */ static struct LineBreakProperties lb_prop_Spanish[] = { { 0x00AB, 0x00AB, LBP_OP }, /* Left double angle quotation mark: opening */ { 0x00BB, 0x00BB, LBP_CL }, /* Right double angle quotation mark: closing */ { 0x2018, 0x2018, LBP_OP }, /* Left single quotation mark: opening */ { 0x201C, 0x201C, LBP_OP }, /* Left double quotation mark: opening */ { 0x201D, 0x201D, LBP_CL }, /* Right double quotation mark: closing */ { 0x2039, 0x2039, LBP_OP }, /* Left single angle quotation mark: opening */ { 0x203A, 0x203A, LBP_CL }, /* Right single angle quotation mark: closing */ { 0, 0, LBP_Undefined } }; /** * French-specifc data over the default Unicode rules. */ static struct LineBreakProperties lb_prop_French[] = { { 0x00AB, 0x00AB, LBP_OP }, /* Left double angle quotation mark: opening */ { 0x00BB, 0x00BB, LBP_CL }, /* Right double angle quotation mark: closing */ { 0x2018, 0x2018, LBP_OP }, /* Left single quotation mark: opening */ { 0x201C, 0x201C, LBP_OP }, /* Left double quotation mark: opening */ { 0x201D, 0x201D, LBP_CL }, /* Right double quotation mark: closing */ { 0x2039, 0x2039, LBP_OP }, /* Left single angle quotation mark: opening */ { 0x203A, 0x203A, LBP_CL }, /* Right single angle quotation mark: closing */ { 0, 0, LBP_Undefined } }; /** * Russian-specifc data over the default Unicode rules. */ static struct LineBreakProperties lb_prop_Russian[] = { { 0x00AB, 0x00AB, LBP_OP }, /* Left double angle quotation mark: opening */ { 0x00BB, 0x00BB, LBP_CL }, /* Right double angle quotation mark: closing */ { 0x201C, 0x201C, LBP_CL }, /* Left double quotation mark: closing */ { 0, 0, LBP_Undefined } }; /** * Chinese-specifc data over the default Unicode rules. */ static struct LineBreakProperties lb_prop_Chinese[] = { { 0x2018, 0x2018, LBP_OP }, /* Left single quotation mark: opening */ { 0x2019, 0x2019, LBP_CL }, /* Right single quotation mark: closing */ { 0x201C, 0x201C, LBP_OP }, /* Left double quotation mark: opening */ { 0x201D, 0x201D, LBP_CL }, /* Right double quotation mark: closing */ { 0, 0, LBP_Undefined } }; /** * Association data of language-specific line breaking properties with * language names. This is the definition for the static data in this * file. If you want more flexibility, or do not need the data here, * you may want to redefine \e lb_prop_lang_map in your C source file. */ struct LineBreakPropertiesLang lb_prop_lang_map[] = { { "en", 2, lb_prop_English }, { "de", 2, lb_prop_German }, { "es", 2, lb_prop_Spanish }, { "fr", 2, lb_prop_French }, { "ru", 2, lb_prop_Russian }, { "zh", 2, lb_prop_Chinese }, { NULL, 0, NULL } }; evas-1.7.9/src/static_deps/liblinebreak/LineBreak2.sed0000664000175000017500000000017012175475547017557 00000000000000s/^\([0-9A-F]\{1,\}\);/\1..\1;/ s/^\([0-9A-F]\{1,\}\)\.\.\([0-9A-F]\{1,\}\);\([A-Z][A-Z0-9]\)/ { 0x\1, 0x\2, LBP_\3 },/ evas-1.7.9/src/static_deps/liblinebreak/linebreakdata3.tmpl0000664000175000017500000000005612175475547020716 00000000000000 { 0xFFFFFFFF, 0xFFFFFFFF, LBP_Undefined } }; evas-1.7.9/src/static_deps/liblinebreak/wordbreakdata.x0000664000175000017500000006534112175475547020162 00000000000000/* The content of this file is generated from: # WordBreakProperty-6.0.0.txt # Date: 2010-08-19, 00:48:48 GMT [MD] */ #include "linebreak.h" #include "wordbreakdef.h" static struct WordBreakProperties wb_prop_default[] = { {0x000A, 0x000A, WBP_LF}, {0x000B, 0x000C, WBP_Newline}, {0x000D, 0x000D, WBP_CR}, {0x0027, 0x0027, WBP_MidNumLet}, {0x002C, 0x002C, WBP_MidNum}, {0x002E, 0x002E, WBP_MidNumLet}, {0x0030, 0x0039, WBP_Numeric}, {0x003A, 0x003A, WBP_MidLetter}, {0x003B, 0x003B, WBP_MidNum}, {0x0041, 0x005A, WBP_ALetter}, {0x005F, 0x005F, WBP_ExtendNumLet}, {0x0061, 0x007A, WBP_ALetter}, {0x0085, 0x0085, WBP_Newline}, {0x00AA, 0x00AA, WBP_ALetter}, {0x00AD, 0x00AD, WBP_Format}, {0x00B5, 0x00B5, WBP_ALetter}, {0x00B7, 0x00B7, WBP_MidLetter}, {0x00BA, 0x00BA, WBP_ALetter}, {0x00C0, 0x00D6, WBP_ALetter}, {0x00D8, 0x00F6, WBP_ALetter}, {0x00F8, 0x01BA, WBP_ALetter}, {0x01BB, 0x01BB, WBP_ALetter}, {0x01BC, 0x01BF, WBP_ALetter}, {0x01C0, 0x01C3, WBP_ALetter}, {0x01C4, 0x0293, WBP_ALetter}, {0x0294, 0x0294, WBP_ALetter}, {0x0295, 0x02AF, WBP_ALetter}, {0x02B0, 0x02C1, WBP_ALetter}, {0x02C6, 0x02D1, WBP_ALetter}, {0x02E0, 0x02E4, WBP_ALetter}, {0x02EC, 0x02EC, WBP_ALetter}, {0x02EE, 0x02EE, WBP_ALetter}, {0x0300, 0x036F, WBP_Extend}, {0x0370, 0x0373, WBP_ALetter}, {0x0374, 0x0374, WBP_ALetter}, {0x0376, 0x0377, WBP_ALetter}, {0x037A, 0x037A, WBP_ALetter}, {0x037B, 0x037D, WBP_ALetter}, {0x037E, 0x037E, WBP_MidNum}, {0x0386, 0x0386, WBP_ALetter}, {0x0387, 0x0387, WBP_MidLetter}, {0x0388, 0x038A, WBP_ALetter}, {0x038C, 0x038C, WBP_ALetter}, {0x038E, 0x03A1, WBP_ALetter}, {0x03A3, 0x03F5, WBP_ALetter}, {0x03F7, 0x0481, WBP_ALetter}, {0x0483, 0x0487, WBP_Extend}, {0x0488, 0x0489, WBP_Extend}, {0x048A, 0x0527, WBP_ALetter}, {0x0531, 0x0556, WBP_ALetter}, {0x0559, 0x0559, WBP_ALetter}, {0x0561, 0x0587, WBP_ALetter}, {0x0589, 0x0589, WBP_MidNum}, {0x0591, 0x05BD, WBP_Extend}, {0x05BF, 0x05BF, WBP_Extend}, {0x05C1, 0x05C2, WBP_Extend}, {0x05C4, 0x05C5, WBP_Extend}, {0x05C7, 0x05C7, WBP_Extend}, {0x05D0, 0x05EA, WBP_ALetter}, {0x05F0, 0x05F2, WBP_ALetter}, {0x05F3, 0x05F3, WBP_ALetter}, {0x05F4, 0x05F4, WBP_MidLetter}, {0x0600, 0x0603, WBP_Format}, {0x060C, 0x060D, WBP_MidNum}, {0x0610, 0x061A, WBP_Extend}, {0x0620, 0x063F, WBP_ALetter}, {0x0640, 0x0640, WBP_ALetter}, {0x0641, 0x064A, WBP_ALetter}, {0x064B, 0x065F, WBP_Extend}, {0x0660, 0x0669, WBP_Numeric}, {0x066B, 0x066B, WBP_Numeric}, {0x066C, 0x066C, WBP_MidNum}, {0x066E, 0x066F, WBP_ALetter}, {0x0670, 0x0670, WBP_Extend}, {0x0671, 0x06D3, WBP_ALetter}, {0x06D5, 0x06D5, WBP_ALetter}, {0x06D6, 0x06DC, WBP_Extend}, {0x06DD, 0x06DD, WBP_Format}, {0x06DF, 0x06E4, WBP_Extend}, {0x06E5, 0x06E6, WBP_ALetter}, {0x06E7, 0x06E8, WBP_Extend}, {0x06EA, 0x06ED, WBP_Extend}, {0x06EE, 0x06EF, WBP_ALetter}, {0x06F0, 0x06F9, WBP_Numeric}, {0x06FA, 0x06FC, WBP_ALetter}, {0x06FF, 0x06FF, WBP_ALetter}, {0x070F, 0x070F, WBP_Format}, {0x0710, 0x0710, WBP_ALetter}, {0x0711, 0x0711, WBP_Extend}, {0x0712, 0x072F, WBP_ALetter}, {0x0730, 0x074A, WBP_Extend}, {0x074D, 0x07A5, WBP_ALetter}, {0x07A6, 0x07B0, WBP_Extend}, {0x07B1, 0x07B1, WBP_ALetter}, {0x07C0, 0x07C9, WBP_Numeric}, {0x07CA, 0x07EA, WBP_ALetter}, {0x07EB, 0x07F3, WBP_Extend}, {0x07F4, 0x07F5, WBP_ALetter}, {0x07F8, 0x07F8, WBP_MidNum}, {0x07FA, 0x07FA, WBP_ALetter}, {0x0800, 0x0815, WBP_ALetter}, {0x0816, 0x0819, WBP_Extend}, {0x081A, 0x081A, WBP_ALetter}, {0x081B, 0x0823, WBP_Extend}, {0x0824, 0x0824, WBP_ALetter}, {0x0825, 0x0827, WBP_Extend}, {0x0828, 0x0828, WBP_ALetter}, {0x0829, 0x082D, WBP_Extend}, {0x0840, 0x0858, WBP_ALetter}, {0x0859, 0x085B, WBP_Extend}, {0x0900, 0x0902, WBP_Extend}, {0x0903, 0x0903, WBP_Extend}, {0x0904, 0x0939, WBP_ALetter}, {0x093A, 0x093A, WBP_Extend}, {0x093B, 0x093B, WBP_Extend}, {0x093C, 0x093C, WBP_Extend}, {0x093D, 0x093D, WBP_ALetter}, {0x093E, 0x0940, WBP_Extend}, {0x0941, 0x0948, WBP_Extend}, {0x0949, 0x094C, WBP_Extend}, {0x094D, 0x094D, WBP_Extend}, {0x094E, 0x094F, WBP_Extend}, {0x0950, 0x0950, WBP_ALetter}, {0x0951, 0x0957, WBP_Extend}, {0x0958, 0x0961, WBP_ALetter}, {0x0962, 0x0963, WBP_Extend}, {0x0966, 0x096F, WBP_Numeric}, {0x0971, 0x0971, WBP_ALetter}, {0x0972, 0x0977, WBP_ALetter}, {0x0979, 0x097F, WBP_ALetter}, {0x0981, 0x0981, WBP_Extend}, {0x0982, 0x0983, WBP_Extend}, {0x0985, 0x098C, WBP_ALetter}, {0x098F, 0x0990, WBP_ALetter}, {0x0993, 0x09A8, WBP_ALetter}, {0x09AA, 0x09B0, WBP_ALetter}, {0x09B2, 0x09B2, WBP_ALetter}, {0x09B6, 0x09B9, WBP_ALetter}, {0x09BC, 0x09BC, WBP_Extend}, {0x09BD, 0x09BD, WBP_ALetter}, {0x09BE, 0x09C0, WBP_Extend}, {0x09C1, 0x09C4, WBP_Extend}, {0x09C7, 0x09C8, WBP_Extend}, {0x09CB, 0x09CC, WBP_Extend}, {0x09CD, 0x09CD, WBP_Extend}, {0x09CE, 0x09CE, WBP_ALetter}, {0x09D7, 0x09D7, WBP_Extend}, {0x09DC, 0x09DD, WBP_ALetter}, {0x09DF, 0x09E1, WBP_ALetter}, {0x09E2, 0x09E3, WBP_Extend}, {0x09E6, 0x09EF, WBP_Numeric}, {0x09F0, 0x09F1, WBP_ALetter}, {0x0A01, 0x0A02, WBP_Extend}, {0x0A03, 0x0A03, WBP_Extend}, {0x0A05, 0x0A0A, WBP_ALetter}, {0x0A0F, 0x0A10, WBP_ALetter}, {0x0A13, 0x0A28, WBP_ALetter}, {0x0A2A, 0x0A30, WBP_ALetter}, {0x0A32, 0x0A33, WBP_ALetter}, {0x0A35, 0x0A36, WBP_ALetter}, {0x0A38, 0x0A39, WBP_ALetter}, {0x0A3C, 0x0A3C, WBP_Extend}, {0x0A3E, 0x0A40, WBP_Extend}, {0x0A41, 0x0A42, WBP_Extend}, {0x0A47, 0x0A48, WBP_Extend}, {0x0A4B, 0x0A4D, WBP_Extend}, {0x0A51, 0x0A51, WBP_Extend}, {0x0A59, 0x0A5C, WBP_ALetter}, {0x0A5E, 0x0A5E, WBP_ALetter}, {0x0A66, 0x0A6F, WBP_Numeric}, {0x0A70, 0x0A71, WBP_Extend}, {0x0A72, 0x0A74, WBP_ALetter}, {0x0A75, 0x0A75, WBP_Extend}, {0x0A81, 0x0A82, WBP_Extend}, {0x0A83, 0x0A83, WBP_Extend}, {0x0A85, 0x0A8D, WBP_ALetter}, {0x0A8F, 0x0A91, WBP_ALetter}, {0x0A93, 0x0AA8, WBP_ALetter}, {0x0AAA, 0x0AB0, WBP_ALetter}, {0x0AB2, 0x0AB3, WBP_ALetter}, {0x0AB5, 0x0AB9, WBP_ALetter}, {0x0ABC, 0x0ABC, WBP_Extend}, {0x0ABD, 0x0ABD, WBP_ALetter}, {0x0ABE, 0x0AC0, WBP_Extend}, {0x0AC1, 0x0AC5, WBP_Extend}, {0x0AC7, 0x0AC8, WBP_Extend}, {0x0AC9, 0x0AC9, WBP_Extend}, {0x0ACB, 0x0ACC, WBP_Extend}, {0x0ACD, 0x0ACD, WBP_Extend}, {0x0AD0, 0x0AD0, WBP_ALetter}, {0x0AE0, 0x0AE1, WBP_ALetter}, {0x0AE2, 0x0AE3, WBP_Extend}, {0x0AE6, 0x0AEF, WBP_Numeric}, {0x0B01, 0x0B01, WBP_Extend}, {0x0B02, 0x0B03, WBP_Extend}, {0x0B05, 0x0B0C, WBP_ALetter}, {0x0B0F, 0x0B10, WBP_ALetter}, {0x0B13, 0x0B28, WBP_ALetter}, {0x0B2A, 0x0B30, WBP_ALetter}, {0x0B32, 0x0B33, WBP_ALetter}, {0x0B35, 0x0B39, WBP_ALetter}, {0x0B3C, 0x0B3C, WBP_Extend}, {0x0B3D, 0x0B3D, WBP_ALetter}, {0x0B3E, 0x0B3E, WBP_Extend}, {0x0B3F, 0x0B3F, WBP_Extend}, {0x0B40, 0x0B40, WBP_Extend}, {0x0B41, 0x0B44, WBP_Extend}, {0x0B47, 0x0B48, WBP_Extend}, {0x0B4B, 0x0B4C, WBP_Extend}, {0x0B4D, 0x0B4D, WBP_Extend}, {0x0B56, 0x0B56, WBP_Extend}, {0x0B57, 0x0B57, WBP_Extend}, {0x0B5C, 0x0B5D, WBP_ALetter}, {0x0B5F, 0x0B61, WBP_ALetter}, {0x0B62, 0x0B63, WBP_Extend}, {0x0B66, 0x0B6F, WBP_Numeric}, {0x0B71, 0x0B71, WBP_ALetter}, {0x0B82, 0x0B82, WBP_Extend}, {0x0B83, 0x0B83, WBP_ALetter}, {0x0B85, 0x0B8A, WBP_ALetter}, {0x0B8E, 0x0B90, WBP_ALetter}, {0x0B92, 0x0B95, WBP_ALetter}, {0x0B99, 0x0B9A, WBP_ALetter}, {0x0B9C, 0x0B9C, WBP_ALetter}, {0x0B9E, 0x0B9F, WBP_ALetter}, {0x0BA3, 0x0BA4, WBP_ALetter}, {0x0BA8, 0x0BAA, WBP_ALetter}, {0x0BAE, 0x0BB9, WBP_ALetter}, {0x0BBE, 0x0BBF, WBP_Extend}, {0x0BC0, 0x0BC0, WBP_Extend}, {0x0BC1, 0x0BC2, WBP_Extend}, {0x0BC6, 0x0BC8, WBP_Extend}, {0x0BCA, 0x0BCC, WBP_Extend}, {0x0BCD, 0x0BCD, WBP_Extend}, {0x0BD0, 0x0BD0, WBP_ALetter}, {0x0BD7, 0x0BD7, WBP_Extend}, {0x0BE6, 0x0BEF, WBP_Numeric}, {0x0C01, 0x0C03, WBP_Extend}, {0x0C05, 0x0C0C, WBP_ALetter}, {0x0C0E, 0x0C10, WBP_ALetter}, {0x0C12, 0x0C28, WBP_ALetter}, {0x0C2A, 0x0C33, WBP_ALetter}, {0x0C35, 0x0C39, WBP_ALetter}, {0x0C3D, 0x0C3D, WBP_ALetter}, {0x0C3E, 0x0C40, WBP_Extend}, {0x0C41, 0x0C44, WBP_Extend}, {0x0C46, 0x0C48, WBP_Extend}, {0x0C4A, 0x0C4D, WBP_Extend}, {0x0C55, 0x0C56, WBP_Extend}, {0x0C58, 0x0C59, WBP_ALetter}, {0x0C60, 0x0C61, WBP_ALetter}, {0x0C62, 0x0C63, WBP_Extend}, {0x0C66, 0x0C6F, WBP_Numeric}, {0x0C82, 0x0C83, WBP_Extend}, {0x0C85, 0x0C8C, WBP_ALetter}, {0x0C8E, 0x0C90, WBP_ALetter}, {0x0C92, 0x0CA8, WBP_ALetter}, {0x0CAA, 0x0CB3, WBP_ALetter}, {0x0CB5, 0x0CB9, WBP_ALetter}, {0x0CBC, 0x0CBC, WBP_Extend}, {0x0CBD, 0x0CBD, WBP_ALetter}, {0x0CBE, 0x0CBE, WBP_Extend}, {0x0CBF, 0x0CBF, WBP_Extend}, {0x0CC0, 0x0CC4, WBP_Extend}, {0x0CC6, 0x0CC6, WBP_Extend}, {0x0CC7, 0x0CC8, WBP_Extend}, {0x0CCA, 0x0CCB, WBP_Extend}, {0x0CCC, 0x0CCD, WBP_Extend}, {0x0CD5, 0x0CD6, WBP_Extend}, {0x0CDE, 0x0CDE, WBP_ALetter}, {0x0CE0, 0x0CE1, WBP_ALetter}, {0x0CE2, 0x0CE3, WBP_Extend}, {0x0CE6, 0x0CEF, WBP_Numeric}, {0x0CF1, 0x0CF2, WBP_ALetter}, {0x0D02, 0x0D03, WBP_Extend}, {0x0D05, 0x0D0C, WBP_ALetter}, {0x0D0E, 0x0D10, WBP_ALetter}, {0x0D12, 0x0D3A, WBP_ALetter}, {0x0D3D, 0x0D3D, WBP_ALetter}, {0x0D3E, 0x0D40, WBP_Extend}, {0x0D41, 0x0D44, WBP_Extend}, {0x0D46, 0x0D48, WBP_Extend}, {0x0D4A, 0x0D4C, WBP_Extend}, {0x0D4D, 0x0D4D, WBP_Extend}, {0x0D4E, 0x0D4E, WBP_ALetter}, {0x0D57, 0x0D57, WBP_Extend}, {0x0D60, 0x0D61, WBP_ALetter}, {0x0D62, 0x0D63, WBP_Extend}, {0x0D66, 0x0D6F, WBP_Numeric}, {0x0D7A, 0x0D7F, WBP_ALetter}, {0x0D82, 0x0D83, WBP_Extend}, {0x0D85, 0x0D96, WBP_ALetter}, {0x0D9A, 0x0DB1, WBP_ALetter}, {0x0DB3, 0x0DBB, WBP_ALetter}, {0x0DBD, 0x0DBD, WBP_ALetter}, {0x0DC0, 0x0DC6, WBP_ALetter}, {0x0DCA, 0x0DCA, WBP_Extend}, {0x0DCF, 0x0DD1, WBP_Extend}, {0x0DD2, 0x0DD4, WBP_Extend}, {0x0DD6, 0x0DD6, WBP_Extend}, {0x0DD8, 0x0DDF, WBP_Extend}, {0x0DF2, 0x0DF3, WBP_Extend}, {0x0E31, 0x0E31, WBP_Extend}, {0x0E34, 0x0E3A, WBP_Extend}, {0x0E47, 0x0E4E, WBP_Extend}, {0x0E50, 0x0E59, WBP_Numeric}, {0x0EB1, 0x0EB1, WBP_Extend}, {0x0EB4, 0x0EB9, WBP_Extend}, {0x0EBB, 0x0EBC, WBP_Extend}, {0x0EC8, 0x0ECD, WBP_Extend}, {0x0ED0, 0x0ED9, WBP_Numeric}, {0x0F00, 0x0F00, WBP_ALetter}, {0x0F18, 0x0F19, WBP_Extend}, {0x0F20, 0x0F29, WBP_Numeric}, {0x0F35, 0x0F35, WBP_Extend}, {0x0F37, 0x0F37, WBP_Extend}, {0x0F39, 0x0F39, WBP_Extend}, {0x0F3E, 0x0F3F, WBP_Extend}, {0x0F40, 0x0F47, WBP_ALetter}, {0x0F49, 0x0F6C, WBP_ALetter}, {0x0F71, 0x0F7E, WBP_Extend}, {0x0F7F, 0x0F7F, WBP_Extend}, {0x0F80, 0x0F84, WBP_Extend}, {0x0F86, 0x0F87, WBP_Extend}, {0x0F88, 0x0F8C, WBP_ALetter}, {0x0F8D, 0x0F97, WBP_Extend}, {0x0F99, 0x0FBC, WBP_Extend}, {0x0FC6, 0x0FC6, WBP_Extend}, {0x102B, 0x102C, WBP_Extend}, {0x102D, 0x1030, WBP_Extend}, {0x1031, 0x1031, WBP_Extend}, {0x1032, 0x1037, WBP_Extend}, {0x1038, 0x1038, WBP_Extend}, {0x1039, 0x103A, WBP_Extend}, {0x103B, 0x103C, WBP_Extend}, {0x103D, 0x103E, WBP_Extend}, {0x1040, 0x1049, WBP_Numeric}, {0x1056, 0x1057, WBP_Extend}, {0x1058, 0x1059, WBP_Extend}, {0x105E, 0x1060, WBP_Extend}, {0x1062, 0x1064, WBP_Extend}, {0x1067, 0x106D, WBP_Extend}, {0x1071, 0x1074, WBP_Extend}, {0x1082, 0x1082, WBP_Extend}, {0x1083, 0x1084, WBP_Extend}, {0x1085, 0x1086, WBP_Extend}, {0x1087, 0x108C, WBP_Extend}, {0x108D, 0x108D, WBP_Extend}, {0x108F, 0x108F, WBP_Extend}, {0x1090, 0x1099, WBP_Numeric}, {0x109A, 0x109C, WBP_Extend}, {0x109D, 0x109D, WBP_Extend}, {0x10A0, 0x10C5, WBP_ALetter}, {0x10D0, 0x10FA, WBP_ALetter}, {0x10FC, 0x10FC, WBP_ALetter}, {0x1100, 0x1248, WBP_ALetter}, {0x124A, 0x124D, WBP_ALetter}, {0x1250, 0x1256, WBP_ALetter}, {0x1258, 0x1258, WBP_ALetter}, {0x125A, 0x125D, WBP_ALetter}, {0x1260, 0x1288, WBP_ALetter}, {0x128A, 0x128D, WBP_ALetter}, {0x1290, 0x12B0, WBP_ALetter}, {0x12B2, 0x12B5, WBP_ALetter}, {0x12B8, 0x12BE, WBP_ALetter}, {0x12C0, 0x12C0, WBP_ALetter}, {0x12C2, 0x12C5, WBP_ALetter}, {0x12C8, 0x12D6, WBP_ALetter}, {0x12D8, 0x1310, WBP_ALetter}, {0x1312, 0x1315, WBP_ALetter}, {0x1318, 0x135A, WBP_ALetter}, {0x135D, 0x135F, WBP_Extend}, {0x1380, 0x138F, WBP_ALetter}, {0x13A0, 0x13F4, WBP_ALetter}, {0x1401, 0x166C, WBP_ALetter}, {0x166F, 0x167F, WBP_ALetter}, {0x1681, 0x169A, WBP_ALetter}, {0x16A0, 0x16EA, WBP_ALetter}, {0x16EE, 0x16F0, WBP_ALetter}, {0x1700, 0x170C, WBP_ALetter}, {0x170E, 0x1711, WBP_ALetter}, {0x1712, 0x1714, WBP_Extend}, {0x1720, 0x1731, WBP_ALetter}, {0x1732, 0x1734, WBP_Extend}, {0x1740, 0x1751, WBP_ALetter}, {0x1752, 0x1753, WBP_Extend}, {0x1760, 0x176C, WBP_ALetter}, {0x176E, 0x1770, WBP_ALetter}, {0x1772, 0x1773, WBP_Extend}, {0x17B4, 0x17B5, WBP_Format}, {0x17B6, 0x17B6, WBP_Extend}, {0x17B7, 0x17BD, WBP_Extend}, {0x17BE, 0x17C5, WBP_Extend}, {0x17C6, 0x17C6, WBP_Extend}, {0x17C7, 0x17C8, WBP_Extend}, {0x17C9, 0x17D3, WBP_Extend}, {0x17DD, 0x17DD, WBP_Extend}, {0x17E0, 0x17E9, WBP_Numeric}, {0x180B, 0x180D, WBP_Extend}, {0x1810, 0x1819, WBP_Numeric}, {0x1820, 0x1842, WBP_ALetter}, {0x1843, 0x1843, WBP_ALetter}, {0x1844, 0x1877, WBP_ALetter}, {0x1880, 0x18A8, WBP_ALetter}, {0x18A9, 0x18A9, WBP_Extend}, {0x18AA, 0x18AA, WBP_ALetter}, {0x18B0, 0x18F5, WBP_ALetter}, {0x1900, 0x191C, WBP_ALetter}, {0x1920, 0x1922, WBP_Extend}, {0x1923, 0x1926, WBP_Extend}, {0x1927, 0x1928, WBP_Extend}, {0x1929, 0x192B, WBP_Extend}, {0x1930, 0x1931, WBP_Extend}, {0x1932, 0x1932, WBP_Extend}, {0x1933, 0x1938, WBP_Extend}, {0x1939, 0x193B, WBP_Extend}, {0x1946, 0x194F, WBP_Numeric}, {0x19B0, 0x19C0, WBP_Extend}, {0x19C8, 0x19C9, WBP_Extend}, {0x19D0, 0x19D9, WBP_Numeric}, {0x1A00, 0x1A16, WBP_ALetter}, {0x1A17, 0x1A18, WBP_Extend}, {0x1A19, 0x1A1B, WBP_Extend}, {0x1A55, 0x1A55, WBP_Extend}, {0x1A56, 0x1A56, WBP_Extend}, {0x1A57, 0x1A57, WBP_Extend}, {0x1A58, 0x1A5E, WBP_Extend}, {0x1A60, 0x1A60, WBP_Extend}, {0x1A61, 0x1A61, WBP_Extend}, {0x1A62, 0x1A62, WBP_Extend}, {0x1A63, 0x1A64, WBP_Extend}, {0x1A65, 0x1A6C, WBP_Extend}, {0x1A6D, 0x1A72, WBP_Extend}, {0x1A73, 0x1A7C, WBP_Extend}, {0x1A7F, 0x1A7F, WBP_Extend}, {0x1A80, 0x1A89, WBP_Numeric}, {0x1A90, 0x1A99, WBP_Numeric}, {0x1B00, 0x1B03, WBP_Extend}, {0x1B04, 0x1B04, WBP_Extend}, {0x1B05, 0x1B33, WBP_ALetter}, {0x1B34, 0x1B34, WBP_Extend}, {0x1B35, 0x1B35, WBP_Extend}, {0x1B36, 0x1B3A, WBP_Extend}, {0x1B3B, 0x1B3B, WBP_Extend}, {0x1B3C, 0x1B3C, WBP_Extend}, {0x1B3D, 0x1B41, WBP_Extend}, {0x1B42, 0x1B42, WBP_Extend}, {0x1B43, 0x1B44, WBP_Extend}, {0x1B45, 0x1B4B, WBP_ALetter}, {0x1B50, 0x1B59, WBP_Numeric}, {0x1B6B, 0x1B73, WBP_Extend}, {0x1B80, 0x1B81, WBP_Extend}, {0x1B82, 0x1B82, WBP_Extend}, {0x1B83, 0x1BA0, WBP_ALetter}, {0x1BA1, 0x1BA1, WBP_Extend}, {0x1BA2, 0x1BA5, WBP_Extend}, {0x1BA6, 0x1BA7, WBP_Extend}, {0x1BA8, 0x1BA9, WBP_Extend}, {0x1BAA, 0x1BAA, WBP_Extend}, {0x1BAE, 0x1BAF, WBP_ALetter}, {0x1BB0, 0x1BB9, WBP_Numeric}, {0x1BC0, 0x1BE5, WBP_ALetter}, {0x1BE6, 0x1BE6, WBP_Extend}, {0x1BE7, 0x1BE7, WBP_Extend}, {0x1BE8, 0x1BE9, WBP_Extend}, {0x1BEA, 0x1BEC, WBP_Extend}, {0x1BED, 0x1BED, WBP_Extend}, {0x1BEE, 0x1BEE, WBP_Extend}, {0x1BEF, 0x1BF1, WBP_Extend}, {0x1BF2, 0x1BF3, WBP_Extend}, {0x1C00, 0x1C23, WBP_ALetter}, {0x1C24, 0x1C2B, WBP_Extend}, {0x1C2C, 0x1C33, WBP_Extend}, {0x1C34, 0x1C35, WBP_Extend}, {0x1C36, 0x1C37, WBP_Extend}, {0x1C40, 0x1C49, WBP_Numeric}, {0x1C4D, 0x1C4F, WBP_ALetter}, {0x1C50, 0x1C59, WBP_Numeric}, {0x1C5A, 0x1C77, WBP_ALetter}, {0x1C78, 0x1C7D, WBP_ALetter}, {0x1CD0, 0x1CD2, WBP_Extend}, {0x1CD4, 0x1CE0, WBP_Extend}, {0x1CE1, 0x1CE1, WBP_Extend}, {0x1CE2, 0x1CE8, WBP_Extend}, {0x1CE9, 0x1CEC, WBP_ALetter}, {0x1CED, 0x1CED, WBP_Extend}, {0x1CEE, 0x1CF1, WBP_ALetter}, {0x1CF2, 0x1CF2, WBP_Extend}, {0x1D00, 0x1D2B, WBP_ALetter}, {0x1D2C, 0x1D61, WBP_ALetter}, {0x1D62, 0x1D77, WBP_ALetter}, {0x1D78, 0x1D78, WBP_ALetter}, {0x1D79, 0x1D9A, WBP_ALetter}, {0x1D9B, 0x1DBF, WBP_ALetter}, {0x1DC0, 0x1DE6, WBP_Extend}, {0x1DFC, 0x1DFF, WBP_Extend}, {0x1E00, 0x1F15, WBP_ALetter}, {0x1F18, 0x1F1D, WBP_ALetter}, {0x1F20, 0x1F45, WBP_ALetter}, {0x1F48, 0x1F4D, WBP_ALetter}, {0x1F50, 0x1F57, WBP_ALetter}, {0x1F59, 0x1F59, WBP_ALetter}, {0x1F5B, 0x1F5B, WBP_ALetter}, {0x1F5D, 0x1F5D, WBP_ALetter}, {0x1F5F, 0x1F7D, WBP_ALetter}, {0x1F80, 0x1FB4, WBP_ALetter}, {0x1FB6, 0x1FBC, WBP_ALetter}, {0x1FBE, 0x1FBE, WBP_ALetter}, {0x1FC2, 0x1FC4, WBP_ALetter}, {0x1FC6, 0x1FCC, WBP_ALetter}, {0x1FD0, 0x1FD3, WBP_ALetter}, {0x1FD6, 0x1FDB, WBP_ALetter}, {0x1FE0, 0x1FEC, WBP_ALetter}, {0x1FF2, 0x1FF4, WBP_ALetter}, {0x1FF6, 0x1FFC, WBP_ALetter}, {0x200C, 0x200D, WBP_Extend}, {0x200E, 0x200F, WBP_Format}, {0x2018, 0x2018, WBP_MidNumLet}, {0x2019, 0x2019, WBP_MidNumLet}, {0x2024, 0x2024, WBP_MidNumLet}, {0x2027, 0x2027, WBP_MidLetter}, {0x2028, 0x2028, WBP_Newline}, {0x2029, 0x2029, WBP_Newline}, {0x202A, 0x202E, WBP_Format}, {0x203F, 0x2040, WBP_ExtendNumLet}, {0x2044, 0x2044, WBP_MidNum}, {0x2054, 0x2054, WBP_ExtendNumLet}, {0x2060, 0x2064, WBP_Format}, {0x206A, 0x206F, WBP_Format}, {0x2071, 0x2071, WBP_ALetter}, {0x207F, 0x207F, WBP_ALetter}, {0x2090, 0x209C, WBP_ALetter}, {0x20D0, 0x20DC, WBP_Extend}, {0x20DD, 0x20E0, WBP_Extend}, {0x20E1, 0x20E1, WBP_Extend}, {0x20E2, 0x20E4, WBP_Extend}, {0x20E5, 0x20F0, WBP_Extend}, {0x2102, 0x2102, WBP_ALetter}, {0x2107, 0x2107, WBP_ALetter}, {0x210A, 0x2113, WBP_ALetter}, {0x2115, 0x2115, WBP_ALetter}, {0x2119, 0x211D, WBP_ALetter}, {0x2124, 0x2124, WBP_ALetter}, {0x2126, 0x2126, WBP_ALetter}, {0x2128, 0x2128, WBP_ALetter}, {0x212A, 0x212D, WBP_ALetter}, {0x212F, 0x2134, WBP_ALetter}, {0x2135, 0x2138, WBP_ALetter}, {0x2139, 0x2139, WBP_ALetter}, {0x213C, 0x213F, WBP_ALetter}, {0x2145, 0x2149, WBP_ALetter}, {0x214E, 0x214E, WBP_ALetter}, {0x2160, 0x2182, WBP_ALetter}, {0x2183, 0x2184, WBP_ALetter}, {0x2185, 0x2188, WBP_ALetter}, {0x24B6, 0x24E9, WBP_ALetter}, {0x2C00, 0x2C2E, WBP_ALetter}, {0x2C30, 0x2C5E, WBP_ALetter}, {0x2C60, 0x2C7C, WBP_ALetter}, {0x2C7D, 0x2C7D, WBP_ALetter}, {0x2C7E, 0x2CE4, WBP_ALetter}, {0x2CEB, 0x2CEE, WBP_ALetter}, {0x2CEF, 0x2CF1, WBP_Extend}, {0x2D00, 0x2D25, WBP_ALetter}, {0x2D30, 0x2D65, WBP_ALetter}, {0x2D6F, 0x2D6F, WBP_ALetter}, {0x2D7F, 0x2D7F, WBP_Extend}, {0x2D80, 0x2D96, WBP_ALetter}, {0x2DA0, 0x2DA6, WBP_ALetter}, {0x2DA8, 0x2DAE, WBP_ALetter}, {0x2DB0, 0x2DB6, WBP_ALetter}, {0x2DB8, 0x2DBE, WBP_ALetter}, {0x2DC0, 0x2DC6, WBP_ALetter}, {0x2DC8, 0x2DCE, WBP_ALetter}, {0x2DD0, 0x2DD6, WBP_ALetter}, {0x2DD8, 0x2DDE, WBP_ALetter}, {0x2DE0, 0x2DFF, WBP_Extend}, {0x2E2F, 0x2E2F, WBP_ALetter}, {0x3005, 0x3005, WBP_ALetter}, {0x302A, 0x302F, WBP_Extend}, {0x3031, 0x3035, WBP_Katakana}, {0x303B, 0x303B, WBP_ALetter}, {0x303C, 0x303C, WBP_ALetter}, {0x3099, 0x309A, WBP_Extend}, {0x309B, 0x309C, WBP_Katakana}, {0x30A0, 0x30A0, WBP_Katakana}, {0x30A1, 0x30FA, WBP_Katakana}, {0x30FC, 0x30FE, WBP_Katakana}, {0x30FF, 0x30FF, WBP_Katakana}, {0x3105, 0x312D, WBP_ALetter}, {0x3131, 0x318E, WBP_ALetter}, {0x31A0, 0x31BA, WBP_ALetter}, {0x31F0, 0x31FF, WBP_Katakana}, {0x32D0, 0x32FE, WBP_Katakana}, {0x3300, 0x3357, WBP_Katakana}, {0xA000, 0xA014, WBP_ALetter}, {0xA015, 0xA015, WBP_ALetter}, {0xA016, 0xA48C, WBP_ALetter}, {0xA4D0, 0xA4F7, WBP_ALetter}, {0xA4F8, 0xA4FD, WBP_ALetter}, {0xA500, 0xA60B, WBP_ALetter}, {0xA60C, 0xA60C, WBP_ALetter}, {0xA610, 0xA61F, WBP_ALetter}, {0xA620, 0xA629, WBP_Numeric}, {0xA62A, 0xA62B, WBP_ALetter}, {0xA640, 0xA66D, WBP_ALetter}, {0xA66E, 0xA66E, WBP_ALetter}, {0xA66F, 0xA66F, WBP_Extend}, {0xA670, 0xA672, WBP_Extend}, {0xA67C, 0xA67D, WBP_Extend}, {0xA67F, 0xA67F, WBP_ALetter}, {0xA680, 0xA697, WBP_ALetter}, {0xA6A0, 0xA6E5, WBP_ALetter}, {0xA6E6, 0xA6EF, WBP_ALetter}, {0xA6F0, 0xA6F1, WBP_Extend}, {0xA717, 0xA71F, WBP_ALetter}, {0xA722, 0xA76F, WBP_ALetter}, {0xA770, 0xA770, WBP_ALetter}, {0xA771, 0xA787, WBP_ALetter}, {0xA788, 0xA788, WBP_ALetter}, {0xA78B, 0xA78E, WBP_ALetter}, {0xA790, 0xA791, WBP_ALetter}, {0xA7A0, 0xA7A9, WBP_ALetter}, {0xA7FA, 0xA7FA, WBP_ALetter}, {0xA7FB, 0xA801, WBP_ALetter}, {0xA802, 0xA802, WBP_Extend}, {0xA803, 0xA805, WBP_ALetter}, {0xA806, 0xA806, WBP_Extend}, {0xA807, 0xA80A, WBP_ALetter}, {0xA80B, 0xA80B, WBP_Extend}, {0xA80C, 0xA822, WBP_ALetter}, {0xA823, 0xA824, WBP_Extend}, {0xA825, 0xA826, WBP_Extend}, {0xA827, 0xA827, WBP_Extend}, {0xA840, 0xA873, WBP_ALetter}, {0xA880, 0xA881, WBP_Extend}, {0xA882, 0xA8B3, WBP_ALetter}, {0xA8B4, 0xA8C3, WBP_Extend}, {0xA8C4, 0xA8C4, WBP_Extend}, {0xA8D0, 0xA8D9, WBP_Numeric}, {0xA8E0, 0xA8F1, WBP_Extend}, {0xA8F2, 0xA8F7, WBP_ALetter}, {0xA8FB, 0xA8FB, WBP_ALetter}, {0xA900, 0xA909, WBP_Numeric}, {0xA90A, 0xA925, WBP_ALetter}, {0xA926, 0xA92D, WBP_Extend}, {0xA930, 0xA946, WBP_ALetter}, {0xA947, 0xA951, WBP_Extend}, {0xA952, 0xA953, WBP_Extend}, {0xA960, 0xA97C, WBP_ALetter}, {0xA980, 0xA982, WBP_Extend}, {0xA983, 0xA983, WBP_Extend}, {0xA984, 0xA9B2, WBP_ALetter}, {0xA9B3, 0xA9B3, WBP_Extend}, {0xA9B4, 0xA9B5, WBP_Extend}, {0xA9B6, 0xA9B9, WBP_Extend}, {0xA9BA, 0xA9BB, WBP_Extend}, {0xA9BC, 0xA9BC, WBP_Extend}, {0xA9BD, 0xA9C0, WBP_Extend}, {0xA9CF, 0xA9CF, WBP_ALetter}, {0xA9D0, 0xA9D9, WBP_Numeric}, {0xAA00, 0xAA28, WBP_ALetter}, {0xAA29, 0xAA2E, WBP_Extend}, {0xAA2F, 0xAA30, WBP_Extend}, {0xAA31, 0xAA32, WBP_Extend}, {0xAA33, 0xAA34, WBP_Extend}, {0xAA35, 0xAA36, WBP_Extend}, {0xAA40, 0xAA42, WBP_ALetter}, {0xAA43, 0xAA43, WBP_Extend}, {0xAA44, 0xAA4B, WBP_ALetter}, {0xAA4C, 0xAA4C, WBP_Extend}, {0xAA4D, 0xAA4D, WBP_Extend}, {0xAA50, 0xAA59, WBP_Numeric}, {0xAA7B, 0xAA7B, WBP_Extend}, {0xAAB0, 0xAAB0, WBP_Extend}, {0xAAB2, 0xAAB4, WBP_Extend}, {0xAAB7, 0xAAB8, WBP_Extend}, {0xAABE, 0xAABF, WBP_Extend}, {0xAAC1, 0xAAC1, WBP_Extend}, {0xAB01, 0xAB06, WBP_ALetter}, {0xAB09, 0xAB0E, WBP_ALetter}, {0xAB11, 0xAB16, WBP_ALetter}, {0xAB20, 0xAB26, WBP_ALetter}, {0xAB28, 0xAB2E, WBP_ALetter}, {0xABC0, 0xABE2, WBP_ALetter}, {0xABE3, 0xABE4, WBP_Extend}, {0xABE5, 0xABE5, WBP_Extend}, {0xABE6, 0xABE7, WBP_Extend}, {0xABE8, 0xABE8, WBP_Extend}, {0xABE9, 0xABEA, WBP_Extend}, {0xABEC, 0xABEC, WBP_Extend}, {0xABED, 0xABED, WBP_Extend}, {0xABF0, 0xABF9, WBP_Numeric}, {0xAC00, 0xD7A3, WBP_ALetter}, {0xD7B0, 0xD7C6, WBP_ALetter}, {0xD7CB, 0xD7FB, WBP_ALetter}, {0xFB00, 0xFB06, WBP_ALetter}, {0xFB13, 0xFB17, WBP_ALetter}, {0xFB1D, 0xFB1D, WBP_ALetter}, {0xFB1E, 0xFB1E, WBP_Extend}, {0xFB1F, 0xFB28, WBP_ALetter}, {0xFB2A, 0xFB36, WBP_ALetter}, {0xFB38, 0xFB3C, WBP_ALetter}, {0xFB3E, 0xFB3E, WBP_ALetter}, {0xFB40, 0xFB41, WBP_ALetter}, {0xFB43, 0xFB44, WBP_ALetter}, {0xFB46, 0xFBB1, WBP_ALetter}, {0xFBD3, 0xFD3D, WBP_ALetter}, {0xFD50, 0xFD8F, WBP_ALetter}, {0xFD92, 0xFDC7, WBP_ALetter}, {0xFDF0, 0xFDFB, WBP_ALetter}, {0xFE00, 0xFE0F, WBP_Extend}, {0xFE10, 0xFE10, WBP_MidNum}, {0xFE13, 0xFE13, WBP_MidLetter}, {0xFE14, 0xFE14, WBP_MidNum}, {0xFE20, 0xFE26, WBP_Extend}, {0xFE33, 0xFE34, WBP_ExtendNumLet}, {0xFE4D, 0xFE4F, WBP_ExtendNumLet}, {0xFE50, 0xFE50, WBP_MidNum}, {0xFE52, 0xFE52, WBP_MidNumLet}, {0xFE54, 0xFE54, WBP_MidNum}, {0xFE55, 0xFE55, WBP_MidLetter}, {0xFE70, 0xFE74, WBP_ALetter}, {0xFE76, 0xFEFC, WBP_ALetter}, {0xFEFF, 0xFEFF, WBP_Format}, {0xFF07, 0xFF07, WBP_MidNumLet}, {0xFF0C, 0xFF0C, WBP_MidNum}, {0xFF0E, 0xFF0E, WBP_MidNumLet}, {0xFF1A, 0xFF1A, WBP_MidLetter}, {0xFF1B, 0xFF1B, WBP_MidNum}, {0xFF21, 0xFF3A, WBP_ALetter}, {0xFF3F, 0xFF3F, WBP_ExtendNumLet}, {0xFF41, 0xFF5A, WBP_ALetter}, {0xFF66, 0xFF6F, WBP_Katakana}, {0xFF70, 0xFF70, WBP_Katakana}, {0xFF71, 0xFF9D, WBP_Katakana}, {0xFF9E, 0xFF9F, WBP_Extend}, {0xFFA0, 0xFFBE, WBP_ALetter}, {0xFFC2, 0xFFC7, WBP_ALetter}, {0xFFCA, 0xFFCF, WBP_ALetter}, {0xFFD2, 0xFFD7, WBP_ALetter}, {0xFFDA, 0xFFDC, WBP_ALetter}, {0xFFF9, 0xFFFB, WBP_Format}, {0x10000, 0x1000B, WBP_ALetter}, {0x1000D, 0x10026, WBP_ALetter}, {0x10028, 0x1003A, WBP_ALetter}, {0x1003C, 0x1003D, WBP_ALetter}, {0x1003F, 0x1004D, WBP_ALetter}, {0x10050, 0x1005D, WBP_ALetter}, {0x10080, 0x100FA, WBP_ALetter}, {0x10140, 0x10174, WBP_ALetter}, {0x101FD, 0x101FD, WBP_Extend}, {0x10280, 0x1029C, WBP_ALetter}, {0x102A0, 0x102D0, WBP_ALetter}, {0x10300, 0x1031E, WBP_ALetter}, {0x10330, 0x10340, WBP_ALetter}, {0x10341, 0x10341, WBP_ALetter}, {0x10342, 0x10349, WBP_ALetter}, {0x1034A, 0x1034A, WBP_ALetter}, {0x10380, 0x1039D, WBP_ALetter}, {0x103A0, 0x103C3, WBP_ALetter}, {0x103C8, 0x103CF, WBP_ALetter}, {0x103D1, 0x103D5, WBP_ALetter}, {0x10400, 0x1044F, WBP_ALetter}, {0x10450, 0x1049D, WBP_ALetter}, {0x104A0, 0x104A9, WBP_Numeric}, {0x10800, 0x10805, WBP_ALetter}, {0x10808, 0x10808, WBP_ALetter}, {0x1080A, 0x10835, WBP_ALetter}, {0x10837, 0x10838, WBP_ALetter}, {0x1083C, 0x1083C, WBP_ALetter}, {0x1083F, 0x10855, WBP_ALetter}, {0x10900, 0x10915, WBP_ALetter}, {0x10920, 0x10939, WBP_ALetter}, {0x10A00, 0x10A00, WBP_ALetter}, {0x10A01, 0x10A03, WBP_Extend}, {0x10A05, 0x10A06, WBP_Extend}, {0x10A0C, 0x10A0F, WBP_Extend}, {0x10A10, 0x10A13, WBP_ALetter}, {0x10A15, 0x10A17, WBP_ALetter}, {0x10A19, 0x10A33, WBP_ALetter}, {0x10A38, 0x10A3A, WBP_Extend}, {0x10A3F, 0x10A3F, WBP_Extend}, {0x10A60, 0x10A7C, WBP_ALetter}, {0x10B00, 0x10B35, WBP_ALetter}, {0x10B40, 0x10B55, WBP_ALetter}, {0x10B60, 0x10B72, WBP_ALetter}, {0x10C00, 0x10C48, WBP_ALetter}, {0x11000, 0x11000, WBP_Extend}, {0x11001, 0x11001, WBP_Extend}, {0x11002, 0x11002, WBP_Extend}, {0x11003, 0x11037, WBP_ALetter}, {0x11038, 0x11046, WBP_Extend}, {0x11066, 0x1106F, WBP_Numeric}, {0x11080, 0x11081, WBP_Extend}, {0x11082, 0x11082, WBP_Extend}, {0x11083, 0x110AF, WBP_ALetter}, {0x110B0, 0x110B2, WBP_Extend}, {0x110B3, 0x110B6, WBP_Extend}, {0x110B7, 0x110B8, WBP_Extend}, {0x110B9, 0x110BA, WBP_Extend}, {0x110BD, 0x110BD, WBP_Format}, {0x12000, 0x1236E, WBP_ALetter}, {0x12400, 0x12462, WBP_ALetter}, {0x13000, 0x1342E, WBP_ALetter}, {0x16800, 0x16A38, WBP_ALetter}, {0x1B000, 0x1B000, WBP_Katakana}, {0x1D165, 0x1D166, WBP_Extend}, {0x1D167, 0x1D169, WBP_Extend}, {0x1D16D, 0x1D172, WBP_Extend}, {0x1D173, 0x1D17A, WBP_Format}, {0x1D17B, 0x1D182, WBP_Extend}, {0x1D185, 0x1D18B, WBP_Extend}, {0x1D1AA, 0x1D1AD, WBP_Extend}, {0x1D242, 0x1D244, WBP_Extend}, {0x1D400, 0x1D454, WBP_ALetter}, {0x1D456, 0x1D49C, WBP_ALetter}, {0x1D49E, 0x1D49F, WBP_ALetter}, {0x1D4A2, 0x1D4A2, WBP_ALetter}, {0x1D4A5, 0x1D4A6, WBP_ALetter}, {0x1D4A9, 0x1D4AC, WBP_ALetter}, {0x1D4AE, 0x1D4B9, WBP_ALetter}, {0x1D4BB, 0x1D4BB, WBP_ALetter}, {0x1D4BD, 0x1D4C3, WBP_ALetter}, {0x1D4C5, 0x1D505, WBP_ALetter}, {0x1D507, 0x1D50A, WBP_ALetter}, {0x1D50D, 0x1D514, WBP_ALetter}, {0x1D516, 0x1D51C, WBP_ALetter}, {0x1D51E, 0x1D539, WBP_ALetter}, {0x1D53B, 0x1D53E, WBP_ALetter}, {0x1D540, 0x1D544, WBP_ALetter}, {0x1D546, 0x1D546, WBP_ALetter}, {0x1D54A, 0x1D550, WBP_ALetter}, {0x1D552, 0x1D6A5, WBP_ALetter}, {0x1D6A8, 0x1D6C0, WBP_ALetter}, {0x1D6C2, 0x1D6DA, WBP_ALetter}, {0x1D6DC, 0x1D6FA, WBP_ALetter}, {0x1D6FC, 0x1D714, WBP_ALetter}, {0x1D716, 0x1D734, WBP_ALetter}, {0x1D736, 0x1D74E, WBP_ALetter}, {0x1D750, 0x1D76E, WBP_ALetter}, {0x1D770, 0x1D788, WBP_ALetter}, {0x1D78A, 0x1D7A8, WBP_ALetter}, {0x1D7AA, 0x1D7C2, WBP_ALetter}, {0x1D7C4, 0x1D7CB, WBP_ALetter}, {0x1D7CE, 0x1D7FF, WBP_Numeric}, {0xE0001, 0xE0001, WBP_Format}, {0xE0020, 0xE007F, WBP_Format}, {0xE0100, 0xE01EF, WBP_Extend}, {0xFFFFFFFF, 0xFFFFFFFF, WBP_Undefined} }; evas-1.7.9/src/static_deps/liblinebreak/LineBreak1.sed0000664000175000017500000000005612175475547017561 00000000000000s/\(^[0-9A-F.]\{1,\};[A-Z][A-Z0-9]\) #.*/\1/p evas-1.7.9/src/static_deps/liblinebreak/wordbreakdef.h0000664000175000017500000000447512175475547017770 00000000000000/* vim: set tabstop=4 shiftwidth=4: */ /* * Word breaking in a Unicode sequence. Designed to be used in a * generic text renderer. * * Copyright (C) 2011-2011 Tom Hacohen * * This software is provided 'as-is', without any express or implied * warranty. In no event will the author be held liable for any damages * arising from the use of this software. * * Permission is granted to anyone to use this software for any purpose, * including commercial applications, and to alter it and redistribute * it freely, subject to the following restrictions: * * 1. The origin of this software must not be misrepresented; you must * not claim that you wrote the original software. If you use this * software in a product, an acknowledgement in the product * documentation would be appreciated but is not required. * 2. Altered source versions must be plainly marked as such, and must * not be misrepresented as being the original software. * 3. This notice may not be removed or altered from any source * distribution. * * The main reference is Unicode Standard Annex 29 (UAX #29): * * * When this library was designed, this annex was at Revision 17, for * Unicode 6.0.0: * * * The Unicode Terms of Use are available at * */ /** * @file wordbreakdef.h * * Definitions of internal data structures, declarations of global * variables, and function prototypes for the word breaking algorithm. * * @version 2.0, 2011/12/12 * @author Tom Hacohen */ /** * Word break classes. This is a direct mapping of Table 3 of Unicode * Standard Annex 29, Revision 17. */ enum WordBreakClass { WBP_Undefined, /* The following break classes are treated in the pair table. */ WBP_CR, WBP_LF, WBP_Newline, WBP_Extend, WBP_Format, WBP_Katakana, WBP_ALetter, WBP_MidNumLet, WBP_MidLetter, WBP_MidNum, WBP_Numeric, WBP_ExtendNumLet, WBP_Any }; /** * Struct for entries of word break properties. The array of the * entries \e must be sorted. */ struct WordBreakProperties { utf32_t start; /**< Starting coding point */ utf32_t end; /**< End coding point */ enum WordBreakClass prop; /**< The word breaking property */ }; evas-1.7.9/src/static_deps/liblinebreak/linebreak.c0000664000175000017500000005364712175475547017265 00000000000000/* vim: set tabstop=4 shiftwidth=4: */ /* * Line breaking in a Unicode sequence. Designed to be used in a * generic text renderer. * * Copyright (C) 2008-2010 Wu Yongwei * * This software is provided 'as-is', without any express or implied * warranty. In no event will the author be held liable for any damages * arising from the use of this software. * * Permission is granted to anyone to use this software for any purpose, * including commercial applications, and to alter it and redistribute * it freely, subject to the following restrictions: * * 1. The origin of this software must not be misrepresented; you must * not claim that you wrote the original software. If you use this * software in a product, an acknowledgement in the product * documentation would be appreciated but is not required. * 2. Altered source versions must be plainly marked as such, and must * not be misrepresented as being the original software. * 3. This notice may not be removed or altered from any source * distribution. * * The main reference is Unicode Standard Annex 14 (UAX #14): * * * When this library was designed, this annex was at Revision 19, for * Unicode 5.0.0: * * * This library has been updated according to Revision 24, for * Unicode 5.2.0: * * * The Unicode Terms of Use are available at * */ /** * @file linebreak.c * * Implementation of the line breaking algorithm as described in Unicode * Standard Annex 14. * * @version 2.0, 2010/01/03 * @author Wu Yongwei */ #include #include #include #include "linebreak.h" #include "linebreakdef.h" /** * Size of the second-level index to the line breaking properties. */ #define LINEBREAK_INDEX_SIZE 40 /** * Version number of the library. */ const int linebreak_version = LINEBREAK_VERSION; /** * Enumeration of break actions. They are used in the break action * pair table below. */ enum BreakAction { DIR_BRK, /**< Direct break opportunity */ IND_BRK, /**< Indirect break opportunity */ CMI_BRK, /**< Indirect break opportunity for combining marks */ CMP_BRK, /**< Prohibited break for combining marks */ PRH_BRK /**< Prohibited break */ }; /** * Break action pair table. This is a direct mapping of Table 2 of * Unicode Standard Annex 14, Revision 24. */ static enum BreakAction baTable[LBP_JT][LBP_JT] = { { /* OP */ PRH_BRK, PRH_BRK, PRH_BRK, PRH_BRK, PRH_BRK, PRH_BRK, PRH_BRK, PRH_BRK, PRH_BRK, PRH_BRK, PRH_BRK, PRH_BRK, PRH_BRK, PRH_BRK, PRH_BRK, PRH_BRK, PRH_BRK, PRH_BRK, PRH_BRK, PRH_BRK, CMP_BRK, PRH_BRK, PRH_BRK, PRH_BRK, PRH_BRK, PRH_BRK, PRH_BRK }, { /* CL */ DIR_BRK, PRH_BRK, PRH_BRK, IND_BRK, IND_BRK, PRH_BRK, PRH_BRK, PRH_BRK, PRH_BRK, IND_BRK, IND_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK, IND_BRK, IND_BRK, DIR_BRK, DIR_BRK, PRH_BRK, CMI_BRK, PRH_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK }, { /* CP */ DIR_BRK, PRH_BRK, PRH_BRK, IND_BRK, IND_BRK, PRH_BRK, PRH_BRK, PRH_BRK, PRH_BRK, IND_BRK, IND_BRK, IND_BRK, IND_BRK, DIR_BRK, DIR_BRK, IND_BRK, IND_BRK, DIR_BRK, DIR_BRK, PRH_BRK, CMI_BRK, PRH_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK }, { /* QU */ PRH_BRK, PRH_BRK, PRH_BRK, IND_BRK, IND_BRK, IND_BRK, PRH_BRK, PRH_BRK, PRH_BRK, IND_BRK, IND_BRK, IND_BRK, IND_BRK, IND_BRK, IND_BRK, IND_BRK, IND_BRK, IND_BRK, IND_BRK, PRH_BRK, CMI_BRK, PRH_BRK, IND_BRK, IND_BRK, IND_BRK, IND_BRK, IND_BRK }, { /* GL */ IND_BRK, PRH_BRK, PRH_BRK, IND_BRK, IND_BRK, IND_BRK, PRH_BRK, PRH_BRK, PRH_BRK, IND_BRK, IND_BRK, IND_BRK, IND_BRK, IND_BRK, IND_BRK, IND_BRK, IND_BRK, IND_BRK, IND_BRK, PRH_BRK, CMI_BRK, PRH_BRK, IND_BRK, IND_BRK, IND_BRK, IND_BRK, IND_BRK }, { /* NS */ DIR_BRK, PRH_BRK, PRH_BRK, IND_BRK, IND_BRK, IND_BRK, PRH_BRK, PRH_BRK, PRH_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK, IND_BRK, IND_BRK, DIR_BRK, DIR_BRK, PRH_BRK, CMI_BRK, PRH_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK }, { /* EX */ DIR_BRK, PRH_BRK, PRH_BRK, IND_BRK, IND_BRK, IND_BRK, PRH_BRK, PRH_BRK, PRH_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK, IND_BRK, IND_BRK, DIR_BRK, DIR_BRK, PRH_BRK, CMI_BRK, PRH_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK }, { /* SY */ DIR_BRK, PRH_BRK, PRH_BRK, IND_BRK, IND_BRK, IND_BRK, PRH_BRK, PRH_BRK, PRH_BRK, DIR_BRK, DIR_BRK, IND_BRK, DIR_BRK, DIR_BRK, DIR_BRK, IND_BRK, IND_BRK, DIR_BRK, DIR_BRK, PRH_BRK, CMI_BRK, PRH_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK }, { /* IS */ DIR_BRK, PRH_BRK, PRH_BRK, IND_BRK, IND_BRK, IND_BRK, PRH_BRK, PRH_BRK, PRH_BRK, DIR_BRK, DIR_BRK, IND_BRK, IND_BRK, DIR_BRK, DIR_BRK, IND_BRK, IND_BRK, DIR_BRK, DIR_BRK, PRH_BRK, CMI_BRK, PRH_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK }, { /* PR */ IND_BRK, PRH_BRK, PRH_BRK, IND_BRK, IND_BRK, IND_BRK, PRH_BRK, PRH_BRK, PRH_BRK, DIR_BRK, DIR_BRK, IND_BRK, IND_BRK, IND_BRK, DIR_BRK, IND_BRK, IND_BRK, DIR_BRK, DIR_BRK, PRH_BRK, CMI_BRK, PRH_BRK, IND_BRK, IND_BRK, IND_BRK, IND_BRK, IND_BRK }, { /* PO */ IND_BRK, PRH_BRK, PRH_BRK, IND_BRK, IND_BRK, IND_BRK, PRH_BRK, PRH_BRK, PRH_BRK, DIR_BRK, DIR_BRK, IND_BRK, IND_BRK, DIR_BRK, DIR_BRK, IND_BRK, IND_BRK, DIR_BRK, DIR_BRK, PRH_BRK, CMI_BRK, PRH_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK }, { /* NU */ IND_BRK, PRH_BRK, PRH_BRK, IND_BRK, IND_BRK, IND_BRK, PRH_BRK, PRH_BRK, PRH_BRK, IND_BRK, IND_BRK, IND_BRK, IND_BRK, DIR_BRK, IND_BRK, IND_BRK, IND_BRK, DIR_BRK, DIR_BRK, PRH_BRK, CMI_BRK, PRH_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK }, { /* AL */ IND_BRK, PRH_BRK, PRH_BRK, IND_BRK, IND_BRK, IND_BRK, PRH_BRK, PRH_BRK, PRH_BRK, DIR_BRK, DIR_BRK, IND_BRK, IND_BRK, DIR_BRK, IND_BRK, IND_BRK, IND_BRK, DIR_BRK, DIR_BRK, PRH_BRK, CMI_BRK, PRH_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK }, { /* ID */ DIR_BRK, PRH_BRK, PRH_BRK, IND_BRK, IND_BRK, IND_BRK, PRH_BRK, PRH_BRK, PRH_BRK, DIR_BRK, IND_BRK, DIR_BRK, DIR_BRK, DIR_BRK, IND_BRK, IND_BRK, IND_BRK, DIR_BRK, DIR_BRK, PRH_BRK, CMI_BRK, PRH_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK }, { /* IN */ DIR_BRK, PRH_BRK, PRH_BRK, IND_BRK, IND_BRK, IND_BRK, PRH_BRK, PRH_BRK, PRH_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK, IND_BRK, IND_BRK, IND_BRK, DIR_BRK, DIR_BRK, PRH_BRK, CMI_BRK, PRH_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK }, { /* HY */ DIR_BRK, PRH_BRK, PRH_BRK, IND_BRK, DIR_BRK, IND_BRK, PRH_BRK, PRH_BRK, PRH_BRK, DIR_BRK, DIR_BRK, IND_BRK, DIR_BRK, DIR_BRK, DIR_BRK, IND_BRK, IND_BRK, DIR_BRK, DIR_BRK, PRH_BRK, CMI_BRK, PRH_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK }, { /* BA */ DIR_BRK, PRH_BRK, PRH_BRK, IND_BRK, DIR_BRK, IND_BRK, PRH_BRK, PRH_BRK, PRH_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK, IND_BRK, IND_BRK, DIR_BRK, DIR_BRK, PRH_BRK, CMI_BRK, PRH_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK }, { /* BB */ IND_BRK, PRH_BRK, PRH_BRK, IND_BRK, IND_BRK, IND_BRK, PRH_BRK, PRH_BRK, PRH_BRK, IND_BRK, IND_BRK, IND_BRK, IND_BRK, IND_BRK, IND_BRK, IND_BRK, IND_BRK, IND_BRK, IND_BRK, PRH_BRK, CMI_BRK, PRH_BRK, IND_BRK, IND_BRK, IND_BRK, IND_BRK, IND_BRK }, { /* B2 */ DIR_BRK, PRH_BRK, PRH_BRK, IND_BRK, IND_BRK, IND_BRK, PRH_BRK, PRH_BRK, PRH_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK, IND_BRK, IND_BRK, DIR_BRK, PRH_BRK, PRH_BRK, CMI_BRK, PRH_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK }, { /* ZW */ DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK, PRH_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK }, { /* CM */ IND_BRK, PRH_BRK, PRH_BRK, IND_BRK, IND_BRK, IND_BRK, PRH_BRK, PRH_BRK, PRH_BRK, DIR_BRK, DIR_BRK, IND_BRK, IND_BRK, DIR_BRK, IND_BRK, IND_BRK, IND_BRK, DIR_BRK, DIR_BRK, PRH_BRK, CMI_BRK, PRH_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK }, { /* WJ */ IND_BRK, PRH_BRK, PRH_BRK, IND_BRK, IND_BRK, IND_BRK, PRH_BRK, PRH_BRK, PRH_BRK, IND_BRK, IND_BRK, IND_BRK, IND_BRK, IND_BRK, IND_BRK, IND_BRK, IND_BRK, IND_BRK, IND_BRK, PRH_BRK, CMI_BRK, PRH_BRK, IND_BRK, IND_BRK, IND_BRK, IND_BRK, IND_BRK }, { /* H2 */ DIR_BRK, PRH_BRK, PRH_BRK, IND_BRK, IND_BRK, IND_BRK, PRH_BRK, PRH_BRK, PRH_BRK, DIR_BRK, IND_BRK, DIR_BRK, DIR_BRK, DIR_BRK, IND_BRK, IND_BRK, IND_BRK, DIR_BRK, DIR_BRK, PRH_BRK, CMI_BRK, PRH_BRK, DIR_BRK, DIR_BRK, DIR_BRK, IND_BRK, IND_BRK }, { /* H3 */ DIR_BRK, PRH_BRK, PRH_BRK, IND_BRK, IND_BRK, IND_BRK, PRH_BRK, PRH_BRK, PRH_BRK, DIR_BRK, IND_BRK, DIR_BRK, DIR_BRK, DIR_BRK, IND_BRK, IND_BRK, IND_BRK, DIR_BRK, DIR_BRK, PRH_BRK, CMI_BRK, PRH_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK, IND_BRK }, { /* JL */ DIR_BRK, PRH_BRK, PRH_BRK, IND_BRK, IND_BRK, IND_BRK, PRH_BRK, PRH_BRK, PRH_BRK, DIR_BRK, IND_BRK, DIR_BRK, DIR_BRK, DIR_BRK, IND_BRK, IND_BRK, IND_BRK, DIR_BRK, DIR_BRK, PRH_BRK, CMI_BRK, PRH_BRK, IND_BRK, IND_BRK, IND_BRK, IND_BRK, DIR_BRK }, { /* JV */ DIR_BRK, PRH_BRK, PRH_BRK, IND_BRK, IND_BRK, IND_BRK, PRH_BRK, PRH_BRK, PRH_BRK, DIR_BRK, IND_BRK, DIR_BRK, DIR_BRK, DIR_BRK, IND_BRK, IND_BRK, IND_BRK, DIR_BRK, DIR_BRK, PRH_BRK, CMI_BRK, PRH_BRK, DIR_BRK, DIR_BRK, DIR_BRK, IND_BRK, IND_BRK }, { /* JT */ DIR_BRK, PRH_BRK, PRH_BRK, IND_BRK, IND_BRK, IND_BRK, PRH_BRK, PRH_BRK, PRH_BRK, DIR_BRK, IND_BRK, DIR_BRK, DIR_BRK, DIR_BRK, IND_BRK, IND_BRK, IND_BRK, DIR_BRK, DIR_BRK, PRH_BRK, CMI_BRK, PRH_BRK, DIR_BRK, DIR_BRK, DIR_BRK, DIR_BRK, IND_BRK } }; /** * Struct for the second-level index to the line breaking properties. */ struct LineBreakPropertiesIndex { utf32_t end; /**< End coding point */ struct LineBreakProperties *lbp;/**< Pointer to line breaking properties */ }; /** * Second-level index to the line breaking properties. */ static struct LineBreakPropertiesIndex lb_prop_index[LINEBREAK_INDEX_SIZE] = { { 0xFFFFFFFF, lb_prop_default } }; /** * Initializes the second-level index to the line breaking properties. * If it is not called, the performance of #get_char_lb_class_lang (and * thus the main functionality) can be pretty bad, especially for big * code points like those of Chinese. */ void init_linebreak(void) { size_t i; size_t iPropDefault; size_t len; size_t step; len = 0; while (lb_prop_default[len].prop != LBP_Undefined) ++len; step = len / LINEBREAK_INDEX_SIZE; iPropDefault = 0; for (i = 0; i < LINEBREAK_INDEX_SIZE; ++i) { lb_prop_index[i].lbp = lb_prop_default + iPropDefault; iPropDefault += step; lb_prop_index[i].end = lb_prop_default[iPropDefault].start - 1; } lb_prop_index[--i].end = 0xFFFFFFFF; } /** * Gets the language-specific line breaking properties. * * @param lang language of the text * @return pointer to the language-specific line breaking * properties array if found; \c NULL otherwise */ static struct LineBreakProperties *get_lb_prop_lang(const char *lang) { struct LineBreakPropertiesLang *lbplIter; if (lang != NULL) { for (lbplIter = lb_prop_lang_map; lbplIter->lang != NULL; ++lbplIter) { if (strncmp(lang, lbplIter->lang, lbplIter->namelen) == 0) { return lbplIter->lbp; } } } return NULL; } /** * Gets the line breaking class of a character from a line breaking * properties array. * * @param ch character to check * @param lbp pointer to the line breaking properties array * @return the line breaking class if found; \c LBP_XX otherwise */ static enum LineBreakClass get_char_lb_class( utf32_t ch, struct LineBreakProperties *lbp) { while (lbp->prop != LBP_Undefined && ch >= lbp->start) { if (ch <= lbp->end) return lbp->prop; ++lbp; } return LBP_XX; } /** * Gets the line breaking class of a character from the default line * breaking properties array. * * @param ch character to check * @return the line breaking class if found; \c LBP_XX otherwise */ static enum LineBreakClass get_char_lb_class_default( utf32_t ch) { size_t i = 0; while (ch > lb_prop_index[i].end) ++i; assert(i < LINEBREAK_INDEX_SIZE); return get_char_lb_class(ch, lb_prop_index[i].lbp); } /** * Gets the line breaking class of a character for a specific * language. This function will check the language-specific data first, * and then the default data if there is no language-specific property * available for the character. * * @param ch character to check * @param lbpLang pointer to the language-specific line breaking * properties array * @return the line breaking class if found; \c LBP_XX * otherwise */ static enum LineBreakClass get_char_lb_class_lang( utf32_t ch, struct LineBreakProperties *lbpLang) { enum LineBreakClass lbcResult; /* Find the language-specific line breaking class for a character */ if (lbpLang) { lbcResult = get_char_lb_class(ch, lbpLang); if (lbcResult != LBP_XX) return lbcResult; } /* Find the generic language-specific line breaking class, if no * language context is provided, or language-specific data are not * available for the specific character in the specified language */ return get_char_lb_class_default(ch); } /** * Resolves the line breaking class for certain ambiguous or complicated * characters. They are treated in a simplistic way in this * implementation. * * @param lbc line breaking class to resolve * @param lang language of the text * @return the resolved line breaking class */ static enum LineBreakClass resolve_lb_class( enum LineBreakClass lbc, const char *lang) { switch (lbc) { case LBP_AI: if (lang != NULL && (strncmp(lang, "zh", 2) == 0 || /* Chinese */ strncmp(lang, "ja", 2) == 0 || /* Japanese */ strncmp(lang, "ko", 2) == 0)) /* Korean */ { return LBP_ID; } /* Fall through */ case LBP_SA: case LBP_SG: case LBP_XX: return LBP_AL; default: return lbc; } } /** * Gets the next Unicode character in a UTF-8 sequence. The index will * be advanced to the next complete character, unless the end of string * is reached in the middle of a UTF-8 sequence. * * @param[in] s input UTF-8 string * @param[in] len length of the string in bytes * @param[in,out] ip pointer to the index * @return the Unicode character beginning at the index; or * #EOS if end of input is encountered */ utf32_t lb_get_next_char_utf8( const utf8_t *s, size_t len, size_t *ip) { utf8_t ch; utf32_t res; assert(*ip <= len); if (*ip == len) return EOS; ch = s[*ip]; if (ch < 0xC2 || ch > 0xF4) { /* One-byte sequence, tail (should not occur), or invalid */ *ip += 1; return ch; } else if (ch < 0xE0) { /* Two-byte sequence */ if (*ip + 2 > len) return EOS; res = ((ch & 0x1F) << 6) + (s[*ip + 1] & 0x3F); *ip += 2; return res; } else if (ch < 0xF0) { /* Three-byte sequence */ if (*ip + 3 > len) return EOS; res = ((ch & 0x0F) << 12) + ((s[*ip + 1] & 0x3F) << 6) + ((s[*ip + 2] & 0x3F)); *ip += 3; return res; } else { /* Four-byte sequence */ if (*ip + 4 > len) return EOS; res = ((ch & 0x07) << 18) + ((s[*ip + 1] & 0x3F) << 12) + ((s[*ip + 2] & 0x3F) << 6) + ((s[*ip + 3] & 0x3F)); *ip += 4; return res; } } /** * Gets the next Unicode character in a UTF-16 sequence. The index will * be advanced to the next complete character, unless the end of string * is reached in the middle of a UTF-16 surrogate pair. * * @param[in] s input UTF-16 string * @param[in] len length of the string in words * @param[in,out] ip pointer to the index * @return the Unicode character beginning at the index; or * #EOS if end of input is encountered */ utf32_t lb_get_next_char_utf16( const utf16_t *s, size_t len, size_t *ip) { utf16_t ch; assert(*ip <= len); if (*ip == len) return EOS; ch = s[(*ip)++]; if (ch < 0xD800 || ch > 0xDBFF) { /* If the character is not a high surrogate */ return ch; } if (*ip == len) { /* If the input ends here (an error) */ --(*ip); return EOS; } if (s[*ip] < 0xDC00 || s[*ip] > 0xDFFF) { /* If the next character is not the low surrogate (an error) */ return ch; } /* Return the constructed character and advance the index again */ return (((utf32_t)ch & 0x3FF) << 10) + (s[(*ip)++] & 0x3FF) + 0x10000; } /** * Gets the next Unicode character in a UTF-32 sequence. The index will * be advanced to the next character. * * @param[in] s input UTF-32 string * @param[in] len length of the string in dwords * @param[in,out] ip pointer to the index * @return the Unicode character beginning at the index; or * #EOS if end of input is encountered */ utf32_t lb_get_next_char_utf32( const utf32_t *s, size_t len, size_t *ip) { assert(*ip <= len); if (*ip == len) return EOS; return s[(*ip)++]; } /** * Sets the line breaking information for a generic input string. * * @param[in] s input string * @param[in] len length of the input * @param[in] lang language of the input * @param[out] brks pointer to the output breaking data, * containing #LINEBREAK_MUSTBREAK, * #LINEBREAK_ALLOWBREAK, #LINEBREAK_NOBREAK, * or #LINEBREAK_INSIDEACHAR * @param[in] get_next_char function to get the next UTF-32 character */ void set_linebreaks( const void *s, size_t len, const char *lang, char *brks, get_next_char_t get_next_char) { utf32_t ch; enum LineBreakClass lbcCur; enum LineBreakClass lbcNew; enum LineBreakClass lbcLast; struct LineBreakProperties *lbpLang; size_t posCur = 0; size_t posLast = 0; --posLast; /* To be ++'d later */ ch = get_next_char(s, len, &posCur); if (ch == EOS) return; lbpLang = get_lb_prop_lang(lang); lbcCur = resolve_lb_class(get_char_lb_class_lang(ch, lbpLang), lang); lbcNew = LBP_Undefined; nextline: /* Special treatment for the first character */ switch (lbcCur) { case LBP_LF: case LBP_NL: lbcCur = LBP_BK; break; case LBP_CB: lbcCur = LBP_BA; break; case LBP_SP: lbcCur = LBP_WJ; break; default: break; } /* Process a line till an explicit break or end of string */ for (;;) { for (++posLast; posLast < posCur - 1; ++posLast) { brks[posLast] = LINEBREAK_INSIDEACHAR; } assert(posLast == posCur - 1); lbcLast = lbcNew; ch = get_next_char(s, len, &posCur); if (ch == EOS) break; lbcNew = get_char_lb_class_lang(ch, lbpLang); if (lbcCur == LBP_BK || (lbcCur == LBP_CR && lbcNew != LBP_LF)) { brks[posLast] = LINEBREAK_MUSTBREAK; lbcCur = resolve_lb_class(lbcNew, lang); goto nextline; } switch (lbcNew) { case LBP_SP: brks[posLast] = LINEBREAK_NOBREAK; continue; case LBP_BK: case LBP_LF: case LBP_NL: brks[posLast] = LINEBREAK_NOBREAK; lbcCur = LBP_BK; continue; case LBP_CR: brks[posLast] = LINEBREAK_NOBREAK; lbcCur = LBP_CR; continue; case LBP_CB: brks[posLast] = LINEBREAK_ALLOWBREAK; lbcCur = LBP_BA; continue; default: break; } lbcNew = resolve_lb_class(lbcNew, lang); assert(lbcCur <= LBP_JT); assert(lbcNew <= LBP_JT); switch (baTable[lbcCur - 1][lbcNew - 1]) { case DIR_BRK: brks[posLast] = LINEBREAK_ALLOWBREAK; break; case CMI_BRK: case IND_BRK: if (lbcLast == LBP_SP) { brks[posLast] = LINEBREAK_ALLOWBREAK; } else { brks[posLast] = LINEBREAK_NOBREAK; } break; case CMP_BRK: brks[posLast] = LINEBREAK_NOBREAK; if (lbcLast != LBP_SP) continue; break; case PRH_BRK: brks[posLast] = LINEBREAK_NOBREAK; break; } lbcCur = lbcNew; } assert(posLast == posCur - 1 && posCur <= len); /* Break after the last character */ brks[posLast] = LINEBREAK_MUSTBREAK; /* When the input contains incomplete sequences */ while (posCur < len) { brks[posCur++] = LINEBREAK_INSIDEACHAR; } } /** * Sets the line breaking information for a UTF-8 input string. * * @param[in] s input UTF-8 string * @param[in] len length of the input * @param[in] lang language of the input * @param[out] brks pointer to the output breaking data, containing * #LINEBREAK_MUSTBREAK, #LINEBREAK_ALLOWBREAK, * #LINEBREAK_NOBREAK, or #LINEBREAK_INSIDEACHAR */ void set_linebreaks_utf8( const utf8_t *s, size_t len, const char *lang, char *brks) { set_linebreaks(s, len, lang, brks, (get_next_char_t)lb_get_next_char_utf8); } /** * Sets the line breaking information for a UTF-16 input string. * * @param[in] s input UTF-16 string * @param[in] len length of the input * @param[in] lang language of the input * @param[out] brks pointer to the output breaking data, containing * #LINEBREAK_MUSTBREAK, #LINEBREAK_ALLOWBREAK, * #LINEBREAK_NOBREAK, or #LINEBREAK_INSIDEACHAR */ void set_linebreaks_utf16( const utf16_t *s, size_t len, const char *lang, char *brks) { set_linebreaks(s, len, lang, brks, (get_next_char_t)lb_get_next_char_utf16); } /** * Sets the line breaking information for a UTF-32 input string. * * @param[in] s input UTF-32 string * @param[in] len length of the input * @param[in] lang language of the input * @param[out] brks pointer to the output breaking data, containing * #LINEBREAK_MUSTBREAK, #LINEBREAK_ALLOWBREAK, * #LINEBREAK_NOBREAK, or #LINEBREAK_INSIDEACHAR */ void set_linebreaks_utf32( const utf32_t *s, size_t len, const char *lang, char *brks) { set_linebreaks(s, len, lang, brks, (get_next_char_t)lb_get_next_char_utf32); } /** * Tells whether a line break can occur between two Unicode characters. * This is a wrapper function to expose a simple interface. Generally * speaking, it is better to use #set_linebreaks_utf32 instead, since * complicated cases involving combining marks, spaces, etc. cannot be * correctly processed. * * @param char1 the first Unicode character * @param char2 the second Unicode character * @param lang language of the input * @return one of #LINEBREAK_MUSTBREAK, #LINEBREAK_ALLOWBREAK, * #LINEBREAK_NOBREAK, or #LINEBREAK_INSIDEACHAR */ int is_line_breakable( utf32_t char1, utf32_t char2, const char* lang) { utf32_t s[2]; char brks[2]; s[0] = char1; s[1] = char2; set_linebreaks_utf32(s, 2, lang, brks); return brks[0]; } evas-1.7.9/src/static_deps/liblinebreak/AUTHORS0000664000175000017500000000046512175475547016223 00000000000000Wu Yongwei. Designed and implemented liblinebreak. Nikolay Pultsin. Put forward the original requirements on liblinebreak, performed tests, and made a lot of suggestions on the initial versions. Thomas Klausner. Autoconfiscated and libtoolized liblinebreak. Tom Hacohen. Added word boundaries support. evas-1.7.9/src/static_deps/liblinebreak/Makefile.am0000664000175000017500000000064212175475547017204 00000000000000MAINTAINERCLEANFILES = Makefile.in #noinst_PROGRAMS = filter_dup noinst_HEADERS = linebreak.h linebreakdef.h wordbreakdef.h wordbreak.h noinst_LTLIBRARIES = liblinebreak.la liblinebreak_la_SOURCES = \ linebreak.c \ linebreakdata.c \ linebreakdef.c \ wordbreak.c \ wordbreakdata.x EXTRA_DIST = \ LineBreak1.sed \ LineBreak2.sed \ linebreakdata1.tmpl \ linebreakdata2.tmpl \ linebreakdata3.tmpl \ LICENCE evas-1.7.9/src/static_deps/liblinebreak/LICENCE0000664000175000017500000000157012175475547016136 00000000000000Copyright (C) 2008-2010 Wu Yongwei This software is provided 'as-is', without any express or implied warranty. In no event will the author be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgement in the product documentation would be appreciated but is not required. 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. evas-1.7.9/src/static_deps/Makefile.am0000664000175000017500000000014312175475547014555 00000000000000MAINTAINERCLEANFILES = Makefile.in SUBDIRS = if EVAS_USE_LINEBREAK SUBDIRS += liblinebreak endif evas-1.7.9/src/tests/0000775000175000017500000000000012234557320011425 500000000000000evas-1.7.9/src/tests/evas_test_text.c0000664000175000017500000003661712175475547014605 00000000000000 #ifdef HAVE_CONFIG_H # include "config.h" #endif #include #include "evas_suite.h" #include "Evas.h" #include "evas_tests_helpers.h" #define START_TEXT_TEST() \ Evas *evas; \ Evas_Object *to; \ evas = EVAS_TEST_INIT_EVAS(); \ evas_font_hinting_set(evas, EVAS_FONT_HINTING_AUTO); \ to = evas_object_text_add(evas); \ do \ { \ } \ while (0) #define END_TEXT_TEST() \ do \ { \ evas_object_del(to); \ evas_free(evas); \ evas_shutdown(); \ } \ while (0) START_TEST(evas_text_simple) { START_TEXT_TEST(); const char *buf = "Test - בדיקה"; evas_object_text_text_set(to, buf); fail_if(strcmp(evas_object_text_text_get(to), buf)); END_TEXT_TEST(); } END_TEST /* Various text related geometries */ START_TEST(evas_text_geometries) { START_TEXT_TEST(); const char *buf = "Tests"; const char *font = "Sans"; Evas_Font_Size size = 14; Evas_Coord prev; int i; Evas_Coord x, y, w, h, px; evas_object_text_text_set(to, buf); /* All should be 0 without a font set */ fail_if(evas_object_text_ascent_get(to) != 0); fail_if(evas_object_text_descent_get(to) != 0); fail_if(evas_object_text_max_ascent_get(to) != 0); fail_if(evas_object_text_max_descent_get(to) != 0); fail_if(evas_object_text_horiz_advance_get(to) != 0); fail_if(evas_object_text_vert_advance_get(to) != 0); evas_object_text_font_set(to, font, size); /* Check that they are bigger than 0. */ fail_if(evas_object_text_ascent_get(to) <= 0); fail_if(evas_object_text_descent_get(to) <= 0); fail_if(evas_object_text_max_ascent_get(to) <= 0); fail_if(evas_object_text_max_descent_get(to) <= 0); fail_if(evas_object_text_horiz_advance_get(to) <= 0); fail_if(evas_object_text_vert_advance_get(to) <= 0); /* Check that expanding the text does what we expect it */ evas_object_text_text_set(to, "Test"); prev = evas_object_text_ascent_get(to); evas_object_text_text_set(to, "Testing"); fail_if(evas_object_text_ascent_get(to) != prev); evas_object_text_text_set(to, "Test"); prev = evas_object_text_descent_get(to); evas_object_text_text_set(to, "Testing"); fail_if(evas_object_text_descent_get(to) != prev); evas_object_text_text_set(to, "Test"); prev = evas_object_text_max_ascent_get(to); evas_object_text_text_set(to, "Testing"); fail_if(evas_object_text_max_ascent_get(to) != prev); evas_object_text_text_set(to, "Test"); prev = evas_object_text_max_descent_get(to); evas_object_text_text_set(to, "Testing"); fail_if(evas_object_text_max_descent_get(to) != prev); evas_object_text_text_set(to, "Test"); prev = evas_object_text_horiz_advance_get(to); evas_object_text_text_set(to, "Testing"); fail_if(evas_object_text_horiz_advance_get(to) <= prev); evas_object_text_text_set(to, "Test"); prev = evas_object_text_vert_advance_get(to); evas_object_text_text_set(to, "Testing"); fail_if(evas_object_text_vert_advance_get(to) != prev); /* Go through all the characters, making sure the geometries we get * are in a monotonically increasing order and that all sizes are * bigger than 0. */ evas_object_text_text_set(to, "Testing..."); x = 0; px = -100; for (i = 0 ; i < eina_unicode_utf8_get_len("Testing...") ; i++) { fail_if(!evas_object_text_char_pos_get(to, i, &x, &y, &w, &h)); fail_if(x <= px); px = x; /* Get back the coords */ fail_if(i != evas_object_text_char_coords_get(to, x + (w / 2), y + (h / 2), &x, &y, &w, &h)); } /* Last up to pos */ Evas_Coord adv; int pos, prev_pos; evas_object_text_text_set(to, "Test - 유니코드"); adv = evas_object_text_horiz_advance_get(to); pos = prev_pos = 0; for (x = 0 ; x <= (adv - 1) ; x++) { pos = evas_object_text_last_up_to_pos(to, x, 0); fail_if(pos < prev_pos); prev_pos = pos; } pos = evas_object_text_last_up_to_pos(to, x, 0); fail_if(pos != -1); pos = evas_object_text_last_up_to_pos(to, -50, 0); fail_if(pos != -1); END_TEXT_TEST(); } END_TEST /* Various evas stuff, such as scale */ START_TEST(evas_text_evas) { Evas_Coord w, h, bw, bh; START_TEXT_TEST(); const char *buf = "Test - בדיקה"; const char *font = "Sans"; Evas_Font_Size size = 14; evas_object_text_font_set(to, font, size); evas_object_text_text_set(to, buf); evas_object_geometry_get(to, NULL, NULL, &bw, &bh); evas_object_scale_set(to, 3.0); evas_object_geometry_get(to, NULL, NULL, &w, &h); fail_if((w <= bw) || (h <= bh)); evas_object_scale_set(to, 0.5); evas_object_geometry_get(to, NULL, NULL, &w, &h); fail_if((w >= bw) || (h >= bh)); END_TEXT_TEST(); } END_TEST /* Tests for functions that are in evas_object_text.c but * don't really have anything to do with it. */ START_TEST(evas_text_unrelated) { START_TEXT_TEST(); const char *buf = "נסיון"; int pos; int value; /* Actually, they are tested in eina, just doing it for completeness. */ fail_if(evas_string_char_len_get(buf) != 5); pos = 0; fail_if(2 != evas_string_char_next_get(buf, pos, &value)); fail_if(value != L'נ'); pos = 2; fail_if(0 != evas_string_char_prev_get(buf, pos, &value)); fail_if(value != L'ס'); END_TEXT_TEST(); } END_TEST #define _CHECK_SET_GET(x) \ do \ { \ Evas_Coord r, g, b, a; \ evas_object_text_##x##_set(to, 100, 150, 125, 12); \ evas_object_text_##x##_get(to, &r, &g, &b, &a); \ fail_if((r != 100) || (g != 150) || (b != 125) || (a != 12)); \ /* Set to the same value */ \ evas_object_text_##x##_set(to, 100, 150, 125, 12); \ evas_object_text_##x##_get(to, &r, &g, &b, &a); \ fail_if((r != 100) || (g != 150) || (b != 125) || (a != 12)); \ } \ while (0) START_TEST(evas_text_set_get) { START_TEXT_TEST(); const char *buf = "Test - בדיקה"; /* Text */ evas_object_text_text_set(to, buf); fail_if(strcmp(evas_object_text_text_get(to), buf)); /* Colors */ _CHECK_SET_GET(shadow_color); _CHECK_SET_GET(glow_color); _CHECK_SET_GET(glow2_color); _CHECK_SET_GET(outline_color); /* Font and size */ const char *font = "Sans"; Evas_Font_Size size = 14; evas_object_text_font_set(to, font, size); font = NULL; size = 0; evas_object_text_font_get(to, &font, &size); fail_if(strcmp(font, "Sans")); fail_if(size != 14); evas_object_text_font_set(to, font, size); font = NULL; size = 0; evas_object_text_font_get(to, &font, &size); fail_if(strcmp(font, "Sans")); fail_if(size != 14); font = "NON-EXISTING-FONT"; size = 14; evas_object_text_font_set(to, font, size); font = NULL; size = 0; evas_object_text_font_get(to, &font, &size); fail_if(strcmp(font, "NON-EXISTING-FONT")); font = "Serif"; size = 2; evas_object_text_font_set(to, font, size); font = NULL; size = 0; evas_object_text_font_get(to, &font, &size); fail_if(strcmp(font, "Serif")); fail_if(size != 2); evas_object_text_font_source_set(to, "/usr/share/fonts/Sans.ttf"); font = evas_object_text_font_source_get(to); fail_if(strcmp(font, "/usr/share/fonts/Sans.ttf")); evas_object_text_font_source_set(to, "/usr/share/fonts/Sans.ttf"); font = evas_object_text_font_source_get(to); fail_if(strcmp(font, "/usr/share/fonts/Sans.ttf")); /* BiDi Delimiters */ evas_object_text_bidi_delimiters_set(to, ",.|"); fail_if(strcmp(evas_object_text_bidi_delimiters_get(to), ",.|")); evas_object_text_bidi_delimiters_set(to, ",|"); fail_if(strcmp(evas_object_text_bidi_delimiters_get(to), ",|")); evas_object_text_bidi_delimiters_set(to, NULL); fail_if(evas_object_text_bidi_delimiters_get(to)); evas_object_text_bidi_delimiters_set(to, ",|"); fail_if(strcmp(evas_object_text_bidi_delimiters_get(to), ",|")); /* Style */ evas_object_text_text_set(to, ""); evas_object_text_style_set(to, EVAS_TEXT_STYLE_SHADOW); fail_if(evas_object_text_style_get(to) != EVAS_TEXT_STYLE_SHADOW); evas_object_text_style_set(to, EVAS_TEXT_STYLE_OUTLINE); fail_if(evas_object_text_style_get(to) != EVAS_TEXT_STYLE_OUTLINE); /* Rehinting */ evas_object_text_text_set(to, "Bla"); evas_font_hinting_set(evas, EVAS_FONT_HINTING_NONE); evas_font_hinting_set(evas, EVAS_FONT_HINTING_AUTO); evas_font_hinting_set(evas, EVAS_FONT_HINTING_BYTECODE); /* Direction of an empty text should be NEUTRAL */ evas_object_text_text_set(to, ""); fail_if(evas_object_text_direction_get(to) != EVAS_BIDI_DIRECTION_NEUTRAL); END_TEXT_TEST(); } END_TEST START_TEST(evas_text_style) { Evas_Coord l, r, t, b; START_TEXT_TEST(); const char *buf = "Test"; evas_object_text_text_set(to, buf); evas_object_text_style_set(to, EVAS_TEXT_STYLE_PLAIN); evas_object_text_style_pad_get(to, &l, &r, &t, &b); fail_if((l != 0) || (r != 0) || (t != 0) || (b != 0)); evas_object_text_style_set(to, EVAS_TEXT_STYLE_SHADOW); evas_object_text_style_pad_get(to, &l, &r, &t, &b); fail_if((l != 0) || (r != 1) || (t != 0) || (b != 1)); evas_object_text_style_set(to, EVAS_TEXT_STYLE_OUTLINE); evas_object_text_style_pad_get(to, &l, &r, &t, &b); fail_if((l != 1) || (r != 1) || (t != 1) || (b != 1)); evas_object_text_style_set(to, EVAS_TEXT_STYLE_SOFT_OUTLINE); evas_object_text_style_pad_get(to, &l, &r, &t, &b); fail_if((l != 2) || (r != 2) || (t != 2) || (b != 2)); evas_object_text_style_set(to, EVAS_TEXT_STYLE_GLOW); evas_object_text_style_pad_get(to, &l, &r, &t, &b); fail_if((l != 2) || (r != 2) || (t != 2) || (b != 2)); evas_object_text_style_set(to, EVAS_TEXT_STYLE_OUTLINE_SHADOW); evas_object_text_style_pad_get(to, &l, &r, &t, &b); fail_if((l != 1) || (r != 2) || (t != 1) || (b != 2)); evas_object_text_style_set(to, EVAS_TEXT_STYLE_FAR_SHADOW); evas_object_text_style_pad_get(to, &l, &r, &t, &b); fail_if((l != 1) || (r != 2) || (t != 1) || (b != 2)); evas_object_text_style_set(to, EVAS_TEXT_STYLE_OUTLINE_SOFT_SHADOW); evas_object_text_style_pad_get(to, &l, &r, &t, &b); fail_if((l != 1) || (r != 3) || (t != 1) || (b != 3)); evas_object_text_style_set(to, EVAS_TEXT_STYLE_SOFT_SHADOW); evas_object_text_style_pad_get(to, &l, &r, &t, &b); fail_if((l != 1) || (r != 3) || (t != 1) || (b != 3)); evas_object_text_style_set(to, EVAS_TEXT_STYLE_FAR_SOFT_SHADOW); evas_object_text_style_pad_get(to, &l, &r, &t, &b); fail_if((l != 0) || (r != 4) || (t != 0) || (b != 4)); fail_if(strcmp(evas_object_text_text_get(to), buf)); END_TEXT_TEST(); } END_TEST #ifdef HAVE_FRIBIDI START_TEST(evas_text_bidi) { START_TEXT_TEST(); const char *buf = "Test - בדיקה"; int i; Evas_Coord x, y, w, h, px; const char *font = "Sans"; Evas_Font_Size size = 14; evas_object_text_font_set(to, font, size); evas_object_text_text_set(to, buf); fail_if(evas_object_text_direction_get(to) != EVAS_BIDI_DIRECTION_LTR); evas_object_text_text_set(to, "בדיקה"); fail_if(evas_object_text_direction_get(to) != EVAS_BIDI_DIRECTION_RTL); /* With RTL text coords should be monotontically decreasing. */ evas_object_text_text_set(to, "נסיון..."); x = 0; px = 200; for (i = 0 ; i < eina_unicode_utf8_get_len("נסיון...") ; i++) { fail_if(!evas_object_text_char_pos_get(to, i, &x, &y, &w, &h)); fail_if(x >= px); px = x; /* Get back the coords */ fail_if(i != evas_object_text_char_coords_get(to, x + (w / 2), y + (h / 2), &x, &y, &w, &h)); } /* Bidi text is a bit more complex */ evas_object_text_text_set(to, "Test - נסיון..."); x = 0; px = -100; for (i = 0 ; i < eina_unicode_utf8_get_len("Test - ") ; i++) { fail_if(!evas_object_text_char_pos_get(to, i, &x, &y, &w, &h)); fail_if(x <= px); px = x; /* Get back the coords */ fail_if(i != evas_object_text_char_coords_get(to, x + (w / 2), y + (h / 2), &x, &y, &w, &h)); } /* First rtl char requires more specific handling */ fail_if(!evas_object_text_char_pos_get(to, i, &x, &y, &w, &h)); fail_if(x <= px); px = x; fail_if(i != evas_object_text_char_coords_get(to, x + (w / 2), y + (h / 2), &x, &y, &w, &h)); i++; for ( ; i < eina_unicode_utf8_get_len("Test - נסיון") ; i++) { fail_if(!evas_object_text_char_pos_get(to, i, &x, &y, &w, &h)); fail_if(x >= px); px = x; /* Get back the coords */ fail_if(i != evas_object_text_char_coords_get(to, x + (w / 2), y + (h / 2), &x, &y, &w, &h)); } /* First ltr char requires more specific handling */ fail_if(!evas_object_text_char_pos_get(to, i, &x, &y, &w, &h)); fail_if(x <= px); px = x; i++; for ( ; i < eina_unicode_utf8_get_len("Test - נסיון...") ; i++) { fail_if(!evas_object_text_char_pos_get(to, i, &x, &y, &w, &h)); fail_if(x <= px); px = x; /* Get back the coords */ fail_if(i != evas_object_text_char_coords_get(to, x + (w / 2), y + (h / 2), &x, &y, &w, &h)); } /* And with an rtl text */ evas_object_text_text_set(to, "נסיון - test..."); x = 0; px = 100; for (i = 0 ; i < eina_unicode_utf8_get_len("נסיון - ") ; i++) { fail_if(!evas_object_text_char_pos_get(to, i, &x, &y, &w, &h)); fail_if(x >= px); px = x; /* Get back the coords */ fail_if(i != evas_object_text_char_coords_get(to, x + (w / 2), y + (h / 2), &x, &y, &w, &h)); } /* First ltr char requires more specific handling */ fail_if(!evas_object_text_char_pos_get(to, i, &x, &y, &w, &h)); fail_if(x >= px); px = x; fail_if(i != evas_object_text_char_coords_get(to, x + (w / 2), y + (h / 2), &x, &y, &w, &h)); i++; for ( ; i < eina_unicode_utf8_get_len("נסיון - test") ; i++) { fail_if(!evas_object_text_char_pos_get(to, i, &x, &y, &w, &h)); fail_if(x <= px); px = x; /* Get back the coords */ fail_if(i != evas_object_text_char_coords_get(to, x + (w / 2), y + (h / 2), &x, &y, &w, &h)); } /* First rtl char requires more specific handling */ fail_if(!evas_object_text_char_pos_get(to, i, &x, &y, &w, &h)); fail_if(x >= px); px = x; i++; for ( ; i < eina_unicode_utf8_get_len("נסיון - test...") ; i++) { fail_if(!evas_object_text_char_pos_get(to, i, &x, &y, &w, &h)); fail_if(x >= px); px = x; /* Get back the coords */ fail_if(i != evas_object_text_char_coords_get(to, x + (w / 2), y + (h / 2), &x, &y, &w, &h)); } /* And some last up to pos tests */ Evas_Coord adv; int pos, prev_pos; evas_object_text_text_set(to, "Test - נסיון..."); adv = evas_object_text_horiz_advance_get(to); pos = prev_pos = 0; for (x = 0 ; x <= (adv - 1) ; x++) { pos = evas_object_text_last_up_to_pos(to, x, 0); fail_if(pos < prev_pos); prev_pos = pos; } pos = evas_object_text_last_up_to_pos(to, x, 0); fail_if(pos != -1); pos = evas_object_text_last_up_to_pos(to, -50, 0); fail_if(pos != -1); END_TEXT_TEST(); } END_TEST #endif void evas_test_text(TCase *tc) { tcase_add_test(tc, evas_text_simple); tcase_add_test(tc, evas_text_style); tcase_add_test(tc, evas_text_set_get); tcase_add_test(tc, evas_text_geometries); tcase_add_test(tc, evas_text_evas); #ifdef HAVE_FRIBIDI tcase_add_test(tc, evas_text_bidi); #endif tcase_add_test(tc, evas_text_unrelated); } evas-1.7.9/src/tests/Makefile.in0000664000175000017500000006351212234557306013425 00000000000000# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ @EFL_ENABLE_TESTS_TRUE@check_PROGRAMS = evas_suite$(EXEEXT) subdir = src/tests DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/efl_attribute.m4 \ $(top_srcdir)/m4/efl_coverage.m4 \ $(top_srcdir)/m4/efl_doxygen.m4 \ $(top_srcdir)/m4/efl_fnmatch.m4 \ $(top_srcdir)/m4/efl_path_max.m4 \ $(top_srcdir)/m4/efl_shm_open.m4 $(top_srcdir)/m4/efl_tests.m4 \ $(top_srcdir)/m4/evas_check_engine.m4 \ $(top_srcdir)/m4/evas_check_loader.m4 \ $(top_srcdir)/m4/evas_converter.m4 \ $(top_srcdir)/m4/evas_dither.m4 \ $(top_srcdir)/m4/evas_scaler.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__evas_suite_SOURCES_DIST = evas_suite.c evas_test_init.c \ evas_test_textblock.c evas_test_text.c evas_test_callbacks.c \ evas_tests_helpers.h evas_suite.h @EFL_ENABLE_TESTS_TRUE@am_evas_suite_OBJECTS = evas_suite.$(OBJEXT) \ @EFL_ENABLE_TESTS_TRUE@ evas_test_init.$(OBJEXT) \ @EFL_ENABLE_TESTS_TRUE@ evas_test_textblock.$(OBJEXT) \ @EFL_ENABLE_TESTS_TRUE@ evas_test_text.$(OBJEXT) \ @EFL_ENABLE_TESTS_TRUE@ evas_test_callbacks.$(OBJEXT) evas_suite_OBJECTS = $(am_evas_suite_OBJECTS) @EFL_ENABLE_TESTS_TRUE@evas_suite_DEPENDENCIES = \ @EFL_ENABLE_TESTS_TRUE@ $(top_builddir)/src/lib/libevas.la AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(evas_suite_SOURCES) DIST_SOURCES = $(am__evas_suite_SOURCES_DIST) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHECK_CFLAGS = @CHECK_CFLAGS@ CHECK_LIBS = @CHECK_LIBS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@ DIRECTFB_LIBS = @DIRECTFB_LIBS@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ ECORE_EVAS_CFLAGS = @ECORE_EVAS_CFLAGS@ ECORE_EVAS_LIBS = @ECORE_EVAS_LIBS@ EDB_CFLAGS = @EDB_CFLAGS@ EDB_LIBS = @EDB_LIBS@ EDJE_CFLAGS = @EDJE_CFLAGS@ EDJE_LIBS = @EDJE_LIBS@ EET_CFLAGS = @EET_CFLAGS@ EET_LIBS = @EET_LIBS@ EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@ EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@ EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@ EFL_SHM_OPEN_LIBS = @EFL_SHM_OPEN_LIBS@ EGREP = @EGREP@ EINA_CFLAGS = @EINA_CFLAGS@ EINA_LIBS = @EINA_LIBS@ EVAS_CFLAGS = @EVAS_CFLAGS@ EVAS_GENERAL_CFLAGS = @EVAS_GENERAL_CFLAGS@ EVAS_GENERAL_LIBS = @EVAS_GENERAL_LIBS@ EVAS_LIBS = @EVAS_LIBS@ EVAS_SSE3_CFLAGS = @EVAS_SSE3_CFLAGS@ EVIL_CFLAGS = @EVIL_CFLAGS@ EVIL_LIBS = @EVIL_LIBS@ EXEEXT = @EXEEXT@ EXOTIC_CFLAGS = @EXOTIC_CFLAGS@ EXOTIC_LIBS = @EXOTIC_LIBS@ FGREP = @FGREP@ FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@ FONTCONFIG_LIBS = @FONTCONFIG_LIBS@ FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ FREETYPE_LIBS = @FREETYPE_LIBS@ FRIBIDI_CFLAGS = @FRIBIDI_CFLAGS@ FRIBIDI_LIBS = @FRIBIDI_LIBS@ GL_EET_CFLAGS = @GL_EET_CFLAGS@ GL_EET_LIBS = @GL_EET_LIBS@ GREP = @GREP@ HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@ HARFBUZZ_LIBS = @HARFBUZZ_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LINEBREAK_CFLAGS = @LINEBREAK_CFLAGS@ LINEBREAK_LIBS = @LINEBREAK_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MODULE_ARCH = @MODULE_ARCH@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ SDL_CFLAGS = @SDL_CFLAGS@ SDL_LIBS = @SDL_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ SVG_CFLAGS = @SVG_CFLAGS@ SVG_LIBS = @SVG_LIBS@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ XCB_CFLAGS = @XCB_CFLAGS@ XCB_GL_CFLAGS = @XCB_GL_CFLAGS@ XCB_GL_LIBS = @XCB_GL_LIBS@ XCB_LIBS = @XCB_LIBS@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_ct_OBJC = @ac_ct_OBJC@ altivec_cflags = @altivec_cflags@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ dlopen_libs = @dlopen_libs@ docdir = @docdir@ dvidir = @dvidir@ edje_cc = @edje_cc@ efl_doxygen = @efl_doxygen@ efl_have_doxygen = @efl_have_doxygen@ evas_engine_buffer_cflags = @evas_engine_buffer_cflags@ evas_engine_buffer_libs = @evas_engine_buffer_libs@ evas_engine_direct3d_cflags = @evas_engine_direct3d_cflags@ evas_engine_direct3d_libs = @evas_engine_direct3d_libs@ evas_engine_directfb_cflags = @evas_engine_directfb_cflags@ evas_engine_directfb_libs = @evas_engine_directfb_libs@ evas_engine_fb_cflags = @evas_engine_fb_cflags@ evas_engine_fb_libs = @evas_engine_fb_libs@ evas_engine_gl_cocoa_cflags = @evas_engine_gl_cocoa_cflags@ evas_engine_gl_cocoa_libs = @evas_engine_gl_cocoa_libs@ evas_engine_gl_common_libs = @evas_engine_gl_common_libs@ evas_engine_gl_sdl_cflags = @evas_engine_gl_sdl_cflags@ evas_engine_gl_sdl_libs = @evas_engine_gl_sdl_libs@ evas_engine_gl_xcb_cflags = @evas_engine_gl_xcb_cflags@ evas_engine_gl_xcb_libs = @evas_engine_gl_xcb_libs@ evas_engine_gl_xlib_cflags = @evas_engine_gl_xlib_cflags@ evas_engine_gl_xlib_libs = @evas_engine_gl_xlib_libs@ evas_engine_psl1ght_cflags = @evas_engine_psl1ght_cflags@ evas_engine_psl1ght_libs = @evas_engine_psl1ght_libs@ evas_engine_software_16_sdl_cflags = @evas_engine_software_16_sdl_cflags@ evas_engine_software_16_sdl_libs = @evas_engine_software_16_sdl_libs@ evas_engine_software_16_wince_cflags = @evas_engine_software_16_wince_cflags@ evas_engine_software_16_wince_libs = @evas_engine_software_16_wince_libs@ evas_engine_software_16_x11_cflags = @evas_engine_software_16_x11_cflags@ evas_engine_software_16_x11_libs = @evas_engine_software_16_x11_libs@ evas_engine_software_8_x11_cflags = @evas_engine_software_8_x11_cflags@ evas_engine_software_8_x11_libs = @evas_engine_software_8_x11_libs@ evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@ evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@ evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@ evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ evas_image_loader_edb_libs = @evas_image_loader_edb_libs@ evas_image_loader_eet_cflags = @evas_image_loader_eet_cflags@ evas_image_loader_eet_libs = @evas_image_loader_eet_libs@ evas_image_loader_generic_cflags = @evas_image_loader_generic_cflags@ evas_image_loader_generic_libs = @evas_image_loader_generic_libs@ evas_image_loader_gif_cflags = @evas_image_loader_gif_cflags@ evas_image_loader_gif_libs = @evas_image_loader_gif_libs@ evas_image_loader_ico_cflags = @evas_image_loader_ico_cflags@ evas_image_loader_ico_libs = @evas_image_loader_ico_libs@ evas_image_loader_jpeg_cflags = @evas_image_loader_jpeg_cflags@ evas_image_loader_jpeg_libs = @evas_image_loader_jpeg_libs@ evas_image_loader_pmaps_cflags = @evas_image_loader_pmaps_cflags@ evas_image_loader_pmaps_libs = @evas_image_loader_pmaps_libs@ evas_image_loader_png_cflags = @evas_image_loader_png_cflags@ evas_image_loader_png_libs = @evas_image_loader_png_libs@ evas_image_loader_psd_cflags = @evas_image_loader_psd_cflags@ evas_image_loader_psd_libs = @evas_image_loader_psd_libs@ evas_image_loader_svg_cflags = @evas_image_loader_svg_cflags@ evas_image_loader_svg_libs = @evas_image_loader_svg_libs@ evas_image_loader_tga_cflags = @evas_image_loader_tga_cflags@ evas_image_loader_tga_libs = @evas_image_loader_tga_libs@ evas_image_loader_tiff_cflags = @evas_image_loader_tiff_cflags@ evas_image_loader_tiff_libs = @evas_image_loader_tiff_libs@ evas_image_loader_wbmp_cflags = @evas_image_loader_wbmp_cflags@ evas_image_loader_wbmp_libs = @evas_image_loader_wbmp_libs@ evas_image_loader_xpm_cflags = @evas_image_loader_xpm_cflags@ evas_image_loader_xpm_libs = @evas_image_loader_xpm_libs@ exec_prefix = @exec_prefix@ have_evas_engine_gl_x11 = @have_evas_engine_gl_x11@ have_evas_engine_gl_xcb = @have_evas_engine_gl_xcb@ have_evas_engine_gl_xlib = @have_evas_engine_gl_xlib@ have_evas_engine_software_x11 = @have_evas_engine_software_x11@ have_evas_engine_software_xcb = @have_evas_engine_software_xcb@ have_evas_engine_software_xlib = @have_evas_engine_software_xlib@ have_lcov = @have_lcov@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_enable_auto_import = @lt_enable_auto_import@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgconfig_requires_private = @pkgconfig_requires_private@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pthread_cflags = @pthread_cflags@ pthread_libs = @pthread_libs@ release_info = @release_info@ requirement_evas = @requirement_evas@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ shm_open_libs = @shm_open_libs@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ version_info = @version_info@ MAINTAINERCLEANFILES = Makefile.in AM_CPPFLAGS = \ -I$(top_srcdir)/src/lib \ -I$(top_srcdir)/src/include \ -I$(top_builddir)/src/include \ -I$(top_builddir)/src/lib \ -DPACKAGE_BIN_DIR=\"$(bindir)\" \ -DPACKAGE_LIB_DIR=\"$(libdir)\" \ -DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \ @EVAS_GENERAL_CFLAGS@ \ @CHECK_CFLAGS@ @EFL_ENABLE_TESTS_TRUE@evas_suite_SOURCES = \ @EFL_ENABLE_TESTS_TRUE@evas_suite.c \ @EFL_ENABLE_TESTS_TRUE@evas_test_init.c \ @EFL_ENABLE_TESTS_TRUE@evas_test_textblock.c \ @EFL_ENABLE_TESTS_TRUE@evas_test_text.c \ @EFL_ENABLE_TESTS_TRUE@evas_test_callbacks.c \ @EFL_ENABLE_TESTS_TRUE@evas_tests_helpers.h \ @EFL_ENABLE_TESTS_TRUE@evas_suite.h @EFL_ENABLE_TESTS_TRUE@evas_suite_LDADD = @CHECK_LIBS@ $(top_builddir)/src/lib/libevas.la @EVAS_GENERAL_LIBS@ all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/tests/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/tests/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-checkPROGRAMS: @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list evas_suite$(EXEEXT): $(evas_suite_OBJECTS) $(evas_suite_DEPENDENCIES) $(EXTRA_evas_suite_DEPENDENCIES) @rm -f evas_suite$(EXEEXT) $(AM_V_CCLD)$(LINK) $(evas_suite_OBJECTS) $(evas_suite_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_suite.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_test_callbacks.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_test_init.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_test_text.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_test_textblock.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: check-am install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ clean-checkPROGRAMS clean-generic clean-libtool cscopelist-am \ ctags ctags-am distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: evas-1.7.9/src/tests/evas_test_textblock.c0000664000175000017500000024773112220105003015561 00000000000000#ifdef HAVE_CONFIG_H # include "config.h" #endif #include #include #include "evas_suite.h" #include "Evas.h" #include "evas_tests_helpers.h" /* Functions defined in evas_object_textblock.c */ EAPI Eina_Bool _evas_textblock_check_item_node_link(Evas_Object *obj); EAPI int _evas_textblock_format_offset_get(const Evas_Object_Textblock_Node_Format *n); /* end of functions defined in evas_object_textblock.c */ static const char *style_buf = "DEFAULT='font=Sans font_size=10 color=#000 text_class=entry'" "newline='br'" "b='+ font=Sans:style=bold'"; #define START_TB_TEST() \ Evas *evas; \ Evas_Object *tb; \ Evas_Textblock_Style *st; \ Evas_Textblock_Cursor *cur; \ evas = EVAS_TEST_INIT_EVAS(); \ evas_font_hinting_set(evas, EVAS_FONT_HINTING_AUTO); \ tb = evas_object_textblock_add(evas); \ fail_if(!tb); \ evas_object_textblock_legacy_newline_set(tb, EINA_FALSE); \ st = evas_textblock_style_new(); \ fail_if(!st); \ evas_textblock_style_set(st, style_buf); \ fail_if(strcmp(style_buf, evas_textblock_style_get(st))); \ evas_object_textblock_style_set(tb, st); \ cur = evas_object_textblock_cursor_new(tb); \ do \ { \ } \ while (0) #define END_TB_TEST() \ do \ { \ evas_textblock_cursor_free(cur); \ evas_object_del(tb); \ evas_textblock_style_free(st); \ evas_free(evas); \ evas_shutdown(); \ } \ while (0) START_TEST(evas_textblock_simple) { START_TB_TEST(); const char *buf = "This is a
test."; evas_object_textblock_text_markup_set(tb, buf); fail_if(strcmp(evas_object_textblock_text_markup_get(tb), buf)); END_TB_TEST(); } END_TEST #define _CHECK_CURSOR_COORDS() \ do \ { \ Evas_Coord cx, cy, cw, ch; \ int ret; \ ret = evas_textblock_cursor_geometry_get(cur, &cx, &cy, &cw, &ch, \ NULL, EVAS_TEXTBLOCK_CURSOR_UNDER); \ fail_if(ret == -1); \ ret = evas_textblock_cursor_geometry_get(cur, &cx, &cy, &cw, &ch, \ NULL, EVAS_TEXTBLOCK_CURSOR_BEFORE); \ fail_if(ret == -1); \ ret = evas_textblock_cursor_char_geometry_get(cur, \ &cx, &cy, &cw, &ch); \ fail_if(ret == -1); \ ret = evas_textblock_cursor_pen_geometry_get(cur, &cx, &cy, &cw, &ch); \ fail_if(ret == -1); \ ret = evas_textblock_cursor_line_geometry_get(cur, \ &cx, &cy, &cw, &ch); \ fail_if(ret == -1); \ } \ while (0) START_TEST(evas_textblock_cursor) { START_TB_TEST(); Evas_Coord x, y, w, h; size_t i, len; Evas_Coord nw, nh; const char *buf = "This is a
test.Lets see if this works.עוד פסקה."; /* Walk the textblock using cursor_char_next */ evas_object_textblock_text_markup_set(tb, buf); fail_if(strcmp(evas_object_textblock_text_markup_get(tb), buf)); len = eina_unicode_utf8_get_len(buf) - 12; /* 12 because len(
) == 1 and len() == 1 */ for (i = 0 ; i < len ; i++) { _CHECK_CURSOR_COORDS(); fail_if(evas_textblock_cursor_pos_get(cur) != (int) i); fail_if(!evas_textblock_cursor_char_next(cur) && (i < len - 1)); } fail_if(evas_textblock_cursor_char_next(cur)); /* Jump to positions all aronud the textblock */ evas_textblock_cursor_pos_set(cur, -1); fail_if(evas_textblock_cursor_pos_get(cur) != 0); evas_textblock_cursor_pos_set(cur, len + 5); fail_if(evas_textblock_cursor_pos_get(cur) != (int) len); for (i = 0 ; i < len ; i++) { evas_textblock_cursor_pos_set(cur, i); _CHECK_CURSOR_COORDS(); fail_if(evas_textblock_cursor_pos_get(cur) != (int) i); } /* Create another cursor and insert text, making sure everything * is in sync. */ evas_object_textblock_clear(tb); Evas_Textblock_Cursor *main_cur = evas_object_textblock_cursor_get(tb); evas_textblock_cursor_copy(main_cur, cur); fail_if(evas_textblock_cursor_pos_get(cur) != evas_textblock_cursor_pos_get(main_cur)); evas_textblock_cursor_text_prepend(main_cur, "a"); fail_if(evas_textblock_cursor_pos_get(cur) == evas_textblock_cursor_pos_get(main_cur)); evas_textblock_cursor_text_prepend(main_cur, "a"); fail_if(evas_textblock_cursor_pos_get(cur) == evas_textblock_cursor_pos_get(main_cur)); /* Insert text to a non-empty textblock */ evas_object_textblock_clear(tb); evas_object_textblock_text_markup_set(tb, buf); evas_textblock_cursor_copy(main_cur, cur); fail_if(evas_textblock_cursor_pos_get(cur) != evas_textblock_cursor_pos_get(main_cur)); evas_textblock_cursor_text_prepend(main_cur, "a"); fail_if(evas_textblock_cursor_pos_get(cur) == evas_textblock_cursor_pos_get(main_cur)); evas_textblock_cursor_text_prepend(main_cur, "a"); fail_if(evas_textblock_cursor_pos_get(cur) == evas_textblock_cursor_pos_get(main_cur)); /* Make sure append works */ evas_textblock_cursor_copy(main_cur, cur); fail_if(evas_textblock_cursor_pos_get(cur) != evas_textblock_cursor_pos_get(main_cur)); evas_textblock_cursor_text_append(main_cur, "a"); fail_if(evas_textblock_cursor_pos_get(cur) != evas_textblock_cursor_pos_get(main_cur)); /* Cursor comparison */ evas_textblock_cursor_pos_set(cur, 1); evas_textblock_cursor_pos_set(main_cur, 2); fail_if(evas_textblock_cursor_compare(cur, main_cur) != -1); evas_textblock_cursor_pos_set(cur, 2); evas_textblock_cursor_pos_set(main_cur, 2); fail_if(evas_textblock_cursor_compare(cur, main_cur) != 0); evas_textblock_cursor_pos_set(cur, 3); evas_textblock_cursor_pos_set(main_cur, 2); fail_if(evas_textblock_cursor_compare(cur, main_cur) != 1); /* Paragraph first */ evas_object_textblock_text_markup_set(tb, buf); for (i = 0 ; i < len ; i++) { evas_textblock_cursor_pos_set(cur, i); evas_textblock_cursor_paragraph_first(cur); fail_if(evas_textblock_cursor_pos_get(cur) != 0); } /* Paragraph last */ for (i = 0 ; i < len ; i++) { evas_textblock_cursor_pos_set(cur, i); evas_textblock_cursor_paragraph_last(cur); fail_if(evas_textblock_cursor_pos_get(cur) != (int) len); } /* Paragraph next */ evas_textblock_cursor_paragraph_last(cur); fail_if(evas_textblock_cursor_paragraph_next(cur)); evas_textblock_cursor_paragraph_first(cur); fail_if(!evas_textblock_cursor_paragraph_next(cur)); fail_if(!evas_textblock_cursor_paragraph_next(cur)); /* Paragraph prev */ evas_textblock_cursor_paragraph_first(cur); fail_if(evas_textblock_cursor_paragraph_prev(cur)); evas_textblock_cursor_paragraph_last(cur); fail_if(!evas_textblock_cursor_paragraph_prev(cur)); fail_if(!evas_textblock_cursor_paragraph_prev(cur)); /* Cher next */ evas_textblock_cursor_paragraph_last(cur); fail_if(evas_textblock_cursor_char_next(cur)); evas_textblock_cursor_paragraph_first(cur); fail_if(!evas_textblock_cursor_char_next(cur)); fail_if(!evas_textblock_cursor_paragraph_next(cur)); fail_if(!evas_textblock_cursor_char_next(cur)); fail_if(!evas_textblock_cursor_paragraph_next(cur)); fail_if(!evas_textblock_cursor_char_next(cur)); /* Cher prev */ evas_textblock_cursor_paragraph_first(cur); fail_if(evas_textblock_cursor_char_prev(cur)); evas_textblock_cursor_paragraph_last(cur); fail_if(!evas_textblock_cursor_char_prev(cur)); fail_if(!evas_textblock_cursor_paragraph_prev(cur)); fail_if(!evas_textblock_cursor_char_prev(cur)); /* Paragraph char first */ evas_textblock_cursor_paragraph_first(main_cur); evas_textblock_cursor_paragraph_first(cur); fail_if(!evas_textblock_cursor_char_next(cur)); evas_textblock_cursor_paragraph_char_first(cur); fail_if(evas_textblock_cursor_compare(cur, main_cur)); /* Paragraph char last */ evas_textblock_cursor_paragraph_last(main_cur); evas_textblock_cursor_paragraph_last(cur); fail_if(!evas_textblock_cursor_char_prev(cur)); evas_textblock_cursor_paragraph_char_last(cur); fail_if(evas_textblock_cursor_compare(cur, main_cur)); /* Line char first */ evas_textblock_cursor_paragraph_first(main_cur); evas_textblock_cursor_paragraph_first(cur); fail_if(!evas_textblock_cursor_char_next(cur)); evas_textblock_cursor_line_char_first(cur); fail_if(evas_textblock_cursor_compare(cur, main_cur)); evas_textblock_cursor_pos_set(cur, 12); evas_textblock_cursor_line_char_first(cur); fail_if(evas_textblock_cursor_pos_get(cur) != 10); /* Line char first */ evas_textblock_cursor_paragraph_last(main_cur); evas_textblock_cursor_paragraph_last(cur); fail_if(!evas_textblock_cursor_char_prev(cur)); evas_textblock_cursor_line_char_last(cur); fail_if(evas_textblock_cursor_compare(cur, main_cur)); evas_textblock_cursor_pos_set(cur, 12); evas_textblock_cursor_line_char_last(cur); fail_if(evas_textblock_cursor_pos_get(cur) != 16); /* Line set */ evas_textblock_cursor_paragraph_first(main_cur); evas_textblock_cursor_paragraph_last(cur); fail_if(!evas_textblock_cursor_line_set(cur, 0)); fail_if(evas_textblock_cursor_compare(cur, main_cur)); fail_if(!evas_textblock_cursor_line_set(cur, 1)); fail_if(!evas_textblock_cursor_line_set(cur, 2)); fail_if(!evas_textblock_cursor_line_set(cur, 3)); fail_if(evas_textblock_cursor_line_set(cur, -1)); fail_if(evas_textblock_cursor_line_set(cur, 99)); /* Paragraph text get */ evas_textblock_cursor_paragraph_first(cur); fail_if(strcmp(evas_textblock_cursor_paragraph_text_get(cur), "This is a
test.")); evas_textblock_cursor_paragraph_next(cur); fail_if(strcmp(evas_textblock_cursor_paragraph_text_get(cur), "Lets see if this works.")); evas_textblock_cursor_paragraph_next(cur); fail_if(strcmp(evas_textblock_cursor_paragraph_text_get(cur), "עוד פסקה.")); /* Paragraph length get */ evas_textblock_cursor_paragraph_first(cur); /* -4 because len(
) == 1 */ fail_if(evas_textblock_cursor_paragraph_text_length_get(cur) != eina_unicode_utf8_get_len("This is a
test.") - 4); evas_textblock_cursor_paragraph_next(cur); fail_if(evas_textblock_cursor_paragraph_text_length_get(cur) != eina_unicode_utf8_get_len("Lets see if this works.")); evas_textblock_cursor_paragraph_next(cur); fail_if(evas_textblock_cursor_paragraph_text_length_get(cur) != eina_unicode_utf8_get_len("עוד פסקה.")); /* Cursor content get */ evas_textblock_cursor_pos_set(cur, 0); fail_if(strcmp(evas_textblock_cursor_content_get(cur), "T")); evas_textblock_cursor_pos_set(cur, 9); fail_if(strcmp(evas_textblock_cursor_content_get(cur), "
")); evas_textblock_cursor_pos_set(cur, 43); fail_if(strcmp(evas_textblock_cursor_content_get(cur), "ד")); /* Eol get */ for (i = 0 ; i < len ; i++) { evas_textblock_cursor_pos_set(cur, i); evas_textblock_cursor_copy(cur, main_cur); evas_textblock_cursor_line_char_last(main_cur); if (!evas_textblock_cursor_compare(cur, main_cur)) { fail_if(!evas_textblock_cursor_eol_get(cur)); } else { fail_if(evas_textblock_cursor_eol_get(cur)); } } /* Format positions */ const Evas_Object_Textblock_Node_Format *fnode; fnode = evas_textblock_node_format_first_get(tb); fail_if(!fnode); evas_textblock_cursor_at_format_set(cur, fnode); evas_textblock_cursor_copy(cur, main_cur); fail_if(evas_textblock_cursor_pos_get(cur) != 9); fail_if(evas_textblock_cursor_format_get(cur) != fnode); fnode = evas_textblock_node_format_next_get(fnode); fail_if(!fnode); evas_textblock_cursor_at_format_set(cur, fnode); fail_if(evas_textblock_cursor_pos_get(cur) != 16); fail_if(evas_textblock_cursor_format_get(cur) != fnode); evas_textblock_cursor_format_next(main_cur); fail_if(evas_textblock_cursor_compare(main_cur, cur)); fnode = evas_textblock_node_format_prev_get(fnode); fail_if(!fnode); evas_textblock_cursor_at_format_set(cur, fnode); fail_if(evas_textblock_cursor_pos_get(cur) != 9); fail_if(evas_textblock_cursor_format_get(cur) != fnode); evas_textblock_cursor_format_prev(main_cur); fail_if(evas_textblock_cursor_compare(main_cur, cur)); evas_textblock_cursor_char_next(main_cur); evas_textblock_cursor_format_prev(main_cur); fail_if(evas_textblock_cursor_compare(main_cur, cur)); evas_object_textblock_text_markup_set(tb, buf); /* Check that pen geometry and getting char at coord are in sync. */ do { int cur_pos; /* Check if it's the last char, if it is, break, otherwise, go back * to the current char because our test advanced the cursor. */ if (!evas_textblock_cursor_char_next(cur)) break; else evas_textblock_cursor_char_prev(cur); cur_pos = evas_textblock_cursor_pos_get(cur); evas_textblock_cursor_pen_geometry_get(cur, &x, &y, &w, &h); evas_textblock_cursor_char_coord_set(cur, x + (w / 2), y + (h / 2)); fail_if(cur_pos != evas_textblock_cursor_pos_get(cur)); } while (evas_textblock_cursor_char_next(cur)); /* Try positions before the first paragraph, and after the last paragraph */ evas_object_textblock_text_markup_set(tb, buf); evas_object_textblock_size_native_get(tb, &nw, &nh); evas_object_resize(tb, nw, nh); evas_textblock_cursor_pos_set(cur, 5); evas_textblock_cursor_char_coord_set(cur, nw / 2, -50); evas_textblock_cursor_paragraph_first(main_cur); fail_if(evas_textblock_cursor_compare(cur, main_cur)); evas_textblock_cursor_pos_set(cur, 5); evas_textblock_cursor_char_coord_set(cur, nw / 2, nh + 50); evas_textblock_cursor_paragraph_last(main_cur); fail_if(evas_textblock_cursor_compare(cur, main_cur)); /* Try positions beyond the left/right limits of lines. */ for (i = 0 ; i < 2 ; i++) { evas_textblock_cursor_line_set(cur, i); evas_textblock_cursor_line_geometry_get(cur, &x, &y, &w, &h); evas_textblock_cursor_pos_set(main_cur, 5); evas_textblock_cursor_char_coord_set(main_cur, x - 50, y); fail_if(evas_textblock_cursor_compare(main_cur, cur)); evas_textblock_cursor_line_char_last(cur); evas_textblock_cursor_pos_set(main_cur, 5); evas_textblock_cursor_char_coord_set(main_cur, x + w + 50, y); fail_if(evas_textblock_cursor_compare(main_cur, cur)); } #ifdef HAVE_FRIBIDI evas_object_textblock_text_markup_set(tb, "testנסיוןtestנסיון" "נסיוןtestנסיוןtest" "testנסיוןtest" "נסיוןtestנסיון" "testנסיון
נסיון" "נסיוןtest
test" ); for (i = 0 ; i < 8 ; i++) { evas_textblock_cursor_line_set(cur, i); evas_textblock_cursor_line_geometry_get(cur, &x, &y, &w, &h); switch (i) { case 0: case 2: case 4: case 5: /* Ltr paragraph */ evas_textblock_cursor_pos_set(main_cur, 7); evas_textblock_cursor_char_coord_set(main_cur, x - 50, y); fail_if(evas_textblock_cursor_compare(main_cur, cur)); evas_textblock_cursor_line_char_last(cur); evas_textblock_cursor_pos_set(main_cur, 7); evas_textblock_cursor_char_coord_set(main_cur, x + w + 50, y); fail_if(evas_textblock_cursor_compare(main_cur, cur)); break; case 1: case 3: case 6: case 7: /* Rtl paragraph */ evas_textblock_cursor_line_char_last(cur); evas_textblock_cursor_pos_set(main_cur, 7); evas_textblock_cursor_char_coord_set(main_cur, x - 50, y); fail_if(evas_textblock_cursor_compare(main_cur, cur)); evas_textblock_cursor_line_char_first(cur); evas_textblock_cursor_pos_set(main_cur, 7); evas_textblock_cursor_char_coord_set(main_cur, x + w + 50, y); fail_if(evas_textblock_cursor_compare(main_cur, cur)); break; } } #endif evas_object_textblock_text_markup_set(tb, buf); /* Testing line geometry.*/ { Evas_Coord lx, ly, lw, lh; Evas_Coord plx, ply, plw, plh; evas_textblock_cursor_line_set(cur, 0); evas_textblock_cursor_copy(cur, main_cur); evas_textblock_cursor_line_char_last(main_cur); evas_textblock_cursor_line_geometry_get(cur, &plx, &ply, &plw, &plh); while (evas_textblock_cursor_compare(cur, main_cur) <= 0) { evas_textblock_cursor_pen_geometry_get(cur, &x, &y, &w, &h); fail_if(0 != evas_textblock_cursor_line_geometry_get( cur, &lx, &ly, &lw, &lh)); fail_if((x < lx) || (x + w > lx + lw) || (y < ly) || (y + h > ly + lh)); fail_if((lx != plx) || (ly != ply) || (lw != plw) || (lh != plh)); plx = lx; ply = ly; plw = lw; plh = lh; evas_textblock_cursor_char_next(cur); } evas_textblock_cursor_line_set(cur, 1); evas_textblock_cursor_copy(cur, main_cur); evas_textblock_cursor_line_char_last(main_cur); evas_textblock_cursor_line_geometry_get(cur, &plx, &ply, &plw, &plh); while (evas_textblock_cursor_compare(cur, main_cur) <= 0) { evas_textblock_cursor_pen_geometry_get(cur, &x, &y, &w, &h); fail_if(1 != evas_textblock_cursor_line_geometry_get( cur, &lx, &ly, &lw, &lh)); fail_if((x < lx) || (x + w > lx + lw) || (y < ly) || (y + h > ly + lh)); fail_if((lx != plx) || (ly != ply) || (lw != plw) || (lh != plh)); plx = lx; ply = ly; plw = lw; plh = lh; evas_textblock_cursor_char_next(cur); } evas_textblock_cursor_paragraph_last(cur); evas_textblock_cursor_line_set(cur, 0); evas_textblock_cursor_line_geometry_get(cur, &plx, &ply, &plw, &plh); evas_object_textblock_line_number_geometry_get(tb, 0, &lx, &ly, &lw, &lh); fail_if((lx != plx) || (ly != ply) || (lw != plw) || (lh != plh)); fail_if(0 != evas_textblock_cursor_line_coord_set(cur, ly + (lh / 2))); evas_textblock_cursor_line_set(cur, 1); evas_textblock_cursor_line_geometry_get(cur, &plx, &ply, &plw, &plh); evas_object_textblock_line_number_geometry_get(tb, 1, &lx, &ly, &lw, &lh); fail_if((lx != plx) || (ly != ply) || (lw != plw) || (lh != plh)); fail_if(1 != evas_textblock_cursor_line_coord_set(cur, ly + (lh / 2))); /* Before the start of the textblock */ fail_if(0 != evas_textblock_cursor_line_coord_set(cur, -50)); fail_if(3 != evas_textblock_cursor_line_coord_set(cur, 100000)); /* And now with a valigned textblock. */ evas_object_textblock_text_markup_set(tb, buf); evas_object_textblock_size_native_get(tb, &nw, &nh); evas_object_resize(tb, 2 * nw, 2 * nh); evas_object_textblock_valign_set(tb, 0.5); evas_textblock_cursor_paragraph_first(cur); evas_textblock_cursor_pen_geometry_get(cur, &x, &y, &w, &h); fail_if(y <= 0); evas_textblock_cursor_paragraph_last(main_cur); evas_textblock_cursor_char_coord_set(main_cur, x + w, y / 2); fail_if(evas_textblock_cursor_compare(main_cur, cur)); evas_textblock_cursor_paragraph_last(main_cur); evas_textblock_cursor_line_coord_set(main_cur, y / 2); fail_if(evas_textblock_cursor_compare(main_cur, cur)); /* Fail if they are equal, i.e if it for some reason thinks it should * go to the end. */ evas_textblock_cursor_paragraph_first(main_cur); evas_textblock_cursor_paragraph_last(cur); evas_textblock_cursor_char_coord_set(main_cur, x + w, nh + 1); fail_if(!evas_textblock_cursor_compare(main_cur, cur)); evas_textblock_cursor_paragraph_first(main_cur); evas_textblock_cursor_paragraph_last(cur); evas_textblock_cursor_line_coord_set(main_cur, nh + 1); fail_if(!evas_textblock_cursor_compare(main_cur, cur)); /* Fail if it doesn't go to the end. */ evas_textblock_cursor_paragraph_last(cur); evas_textblock_cursor_paragraph_first(main_cur); evas_textblock_cursor_char_coord_set(main_cur, x + w, (2 * nh) - 1); fail_if(evas_textblock_cursor_compare(main_cur, cur)); evas_textblock_cursor_paragraph_first(main_cur); evas_textblock_cursor_line_coord_set(main_cur, (2 * nh) - 1); fail_if(evas_textblock_cursor_compare(main_cur, cur)); } { const char *buf_wb = "a This is_a t:e.s't a"; evas_object_textblock_text_markup_set(tb, buf_wb); /* Word start/end */ evas_textblock_cursor_pos_set(cur, 3); evas_textblock_cursor_word_start(cur); fail_if(2 != evas_textblock_cursor_pos_get(cur)); evas_textblock_cursor_word_end(cur); fail_if(5 != evas_textblock_cursor_pos_get(cur)); evas_textblock_cursor_pos_set(cur, 13); evas_textblock_cursor_word_end(cur); fail_if(18 != evas_textblock_cursor_pos_get(cur)); evas_textblock_cursor_word_start(cur); fail_if(12 != evas_textblock_cursor_pos_get(cur)); evas_textblock_cursor_word_start(cur); fail_if(12 != evas_textblock_cursor_pos_get(cur)); evas_textblock_cursor_word_start(cur); fail_if(12 != evas_textblock_cursor_pos_get(cur)); evas_textblock_cursor_word_end(cur); fail_if(18 != evas_textblock_cursor_pos_get(cur)); evas_textblock_cursor_word_end(cur); fail_if(21 != evas_textblock_cursor_pos_get(cur)); /* Bug with 1 char word separators at paragraph start. */ evas_object_textblock_text_markup_set(tb, "=test"); evas_textblock_cursor_pos_set(cur, 4); evas_textblock_cursor_word_start(cur); fail_if(1 != evas_textblock_cursor_pos_get(cur)); } /* Make sure coords are correct for ligatures */ { evas_object_textblock_text_markup_set(tb, "fi
fii"); for (i = 0 ; i < 2 ; i++) { evas_textblock_cursor_pen_geometry_get(cur, NULL, NULL, &w, NULL); ck_assert_int_eq(w, 3); evas_textblock_cursor_char_next(cur); } evas_textblock_cursor_char_next(cur); for (i = 0 ; i < 3 ; i++) { evas_textblock_cursor_pen_geometry_get(cur, NULL, NULL, &w, NULL); ck_assert_int_eq(w, 3); evas_textblock_cursor_char_next(cur); } } END_TB_TEST(); } END_TEST START_TEST(evas_textblock_format_removal) { START_TB_TEST(); int i; const char *buf = "This atesst."; const Evas_Object_Textblock_Node_Format *fnode; Evas_Textblock_Cursor *main_cur = evas_object_textblock_cursor_get(tb); evas_object_textblock_text_markup_set(tb, buf); /* Remove the "b" pair. */ fnode = evas_textblock_node_format_first_get(tb); evas_textblock_node_format_remove_pair(tb, (Evas_Object_Textblock_Node_Format *) fnode); fnode = evas_textblock_node_format_first_get(tb); fail_if (!fnode); fail_if(strcmp(evas_textblock_node_format_text_get(fnode), "+ a")); fnode = evas_textblock_node_format_next_get(fnode); fail_if (!fnode); fail_if(strcmp(evas_textblock_node_format_text_get(fnode), "- a")); fnode = evas_textblock_node_format_next_get(fnode); fail_if (fnode); /* Now also remove the a pair */ fnode = evas_textblock_node_format_first_get(tb); evas_textblock_node_format_remove_pair(tb, (Evas_Object_Textblock_Node_Format *) fnode); fnode = evas_textblock_node_format_first_get(tb); fail_if (fnode); /* Remove the "a" pair. */ evas_object_textblock_text_markup_set(tb, buf); fnode = evas_textblock_node_format_first_get(tb); fnode = evas_textblock_node_format_next_get(fnode); evas_textblock_node_format_remove_pair(tb, (Evas_Object_Textblock_Node_Format *) fnode); fnode = evas_textblock_node_format_first_get(tb); fail_if (!fnode); fail_if(strcmp(evas_textblock_node_format_text_get(fnode), "+ b")); fnode = evas_textblock_node_format_next_get(fnode); fail_if (!fnode); fail_if(strcmp(evas_textblock_node_format_text_get(fnode), "- b")); fnode = evas_textblock_node_format_next_get(fnode); fail_if (fnode); /* Now also remove the b pair */ fnode = evas_textblock_node_format_first_get(tb); evas_textblock_node_format_remove_pair(tb, (Evas_Object_Textblock_Node_Format *) fnode); fnode = evas_textblock_node_format_first_get(tb); fail_if (fnode); /* Now remove formats by removing text */ evas_object_textblock_text_markup_set(tb, buf); evas_textblock_cursor_pos_set(cur, 6); evas_textblock_cursor_char_delete(cur); evas_textblock_cursor_char_delete(cur); evas_textblock_cursor_char_delete(cur); /* Only b formats should remain */ fnode = evas_textblock_node_format_first_get(tb); fail_if (!fnode); fail_if(strcmp(evas_textblock_node_format_text_get(fnode), "+ b")); fnode = evas_textblock_node_format_next_get(fnode); fail_if (!fnode); fail_if(strcmp(evas_textblock_node_format_text_get(fnode), "- b")); fnode = evas_textblock_node_format_next_get(fnode); fail_if (fnode); /* No formats should remain. */ evas_textblock_cursor_pos_set(cur, 2); evas_textblock_cursor_char_delete(cur); evas_textblock_cursor_char_delete(cur); evas_textblock_cursor_char_delete(cur); evas_textblock_cursor_char_delete(cur); evas_textblock_cursor_char_delete(cur); evas_textblock_cursor_char_delete(cur); fnode = evas_textblock_node_format_first_get(tb); fail_if (fnode); /* Try to remove the formats in a way that shouldn't remove them */ evas_object_textblock_text_markup_set(tb, buf); evas_textblock_cursor_pos_set(cur, 7); evas_textblock_cursor_char_delete(cur); evas_textblock_cursor_char_delete(cur); evas_textblock_cursor_char_delete(cur); evas_textblock_cursor_char_delete(cur); fnode = evas_textblock_node_format_first_get(tb); fail_if (!fnode); fail_if(strcmp(evas_textblock_node_format_text_get(fnode), "+ b")); fnode = evas_textblock_node_format_next_get(fnode); fail_if (!fnode); fail_if(strcmp(evas_textblock_node_format_text_get(fnode), "+ a")); fnode = evas_textblock_node_format_next_get(fnode); fail_if (!fnode); fail_if(strcmp(evas_textblock_node_format_text_get(fnode), "- a")); fnode = evas_textblock_node_format_next_get(fnode); fail_if (!fnode); fail_if(strcmp(evas_textblock_node_format_text_get(fnode), "- b")); fnode = evas_textblock_node_format_next_get(fnode); fail_if (fnode); /* Try range deletion to delete a */ evas_object_textblock_text_markup_set(tb, buf); evas_textblock_cursor_pos_set(cur, 6); evas_textblock_cursor_pos_set(main_cur, 9); evas_textblock_cursor_range_delete(cur, main_cur); fnode = evas_textblock_node_format_first_get(tb); fail_if (!fnode); fail_if(strcmp(evas_textblock_node_format_text_get(fnode), "+ b")); fnode = evas_textblock_node_format_next_get(fnode); fail_if (!fnode); fail_if(strcmp(evas_textblock_node_format_text_get(fnode), "- b")); fnode = evas_textblock_node_format_next_get(fnode); fail_if (fnode); /* Range deletion to delete both */ evas_object_textblock_text_markup_set(tb, buf); evas_textblock_cursor_pos_set(cur, 2); evas_textblock_cursor_pos_set(main_cur, 11); evas_textblock_cursor_range_delete(cur, main_cur); fnode = evas_textblock_node_format_first_get(tb); fail_if (fnode); /* Range deletion across paragraphs */ evas_object_textblock_text_markup_set(tb, "This ate" "sst."); evas_textblock_cursor_pos_set(cur, 6); evas_textblock_cursor_pos_set(main_cur, 10); evas_textblock_cursor_range_delete(cur, main_cur); fnode = evas_textblock_node_format_first_get(tb); fail_if (!fnode); fail_if(strcmp(evas_textblock_node_format_text_get(fnode), "+ b")); fnode = evas_textblock_node_format_next_get(fnode); fail_if (!fnode); fail_if(strcmp(evas_textblock_node_format_text_get(fnode), "- b")); fnode = evas_textblock_node_format_next_get(fnode); fail_if (fnode); /* Range deletion across paragraph - a bug found in elm. */ evas_object_textblock_text_markup_set(tb, "This is an entry widget in this window that" "uses markup like this for styling and" "formatting like this, as well as" "links in the text, so enter text" "in here to edit it. By the way, links are" "called Anchors so you will need" "to refer to them this way." "" "Also you can stick in items with (relsize + ascent): " "" " (full) " "" " (to the left)" "Also (size + ascent): " "" " (full) " "" " (before this)" "And as well (absize + ascent): " "" " (full) " "" " or even paths to image files on disk too like: " "" " ... end."); evas_textblock_cursor_paragraph_first(cur); evas_textblock_cursor_paragraph_last(main_cur); evas_textblock_cursor_range_delete(cur, main_cur); fnode = evas_textblock_node_format_first_get(tb); fail_if(fnode); /* Two formats in the same place. */ evas_object_textblock_text_markup_set(tb, "abb"); evas_textblock_cursor_pos_set(cur, 1); evas_textblock_cursor_char_delete(cur); fnode = evas_textblock_node_format_first_get(tb); fail_if (fnode); /* Two formats across different paragraphs with notihng in between. */ evas_object_textblock_text_markup_set(tb, ""); evas_textblock_cursor_pos_set(cur, 0); evas_textblock_cursor_char_delete(cur); fnode = evas_textblock_node_format_first_get(tb); fail_if (fnode); /* Try with range */ evas_object_textblock_text_markup_set(tb, ""); evas_textblock_cursor_pos_set(cur, 0); evas_textblock_cursor_pos_set(main_cur, 1); evas_textblock_cursor_range_delete(cur, main_cur); fnode = evas_textblock_node_format_first_get(tb); fail_if (fnode); /* Range delete with empty paragraphs. */ evas_object_textblock_text_markup_set(tb, ""); evas_textblock_cursor_pos_set(cur, 2); evas_textblock_cursor_pos_set(main_cur, 3); evas_textblock_cursor_range_delete(cur, main_cur); ck_assert_str_eq(evas_object_textblock_text_markup_get(tb), ""); /* Verify fmt position and REP_CHAR positions are the same */ evas_object_textblock_text_markup_set(tb, "This isan a."); evas_textblock_cursor_pos_set(cur, 7); evas_textblock_cursor_char_delete(cur); fnode = evas_textblock_node_format_first_get(tb); fail_if(_evas_textblock_format_offset_get(fnode) != 10); /* Out of order mixes. */ evas_object_textblock_text_markup_set(tb, "abcde"); evas_textblock_cursor_pos_set(cur, 2); for (i = 0 ; i < 2 ; i++) { fnode = evas_textblock_node_format_first_get(tb); fail_if (!fnode); fail_if(strcmp(evas_textblock_node_format_text_get(fnode), "+ b")); fnode = evas_textblock_node_format_next_get(fnode); fail_if (!fnode); fail_if(strcmp(evas_textblock_node_format_text_get(fnode), "+ i")); fnode = evas_textblock_node_format_next_get(fnode); fail_if (!fnode); fail_if(strcmp(evas_textblock_node_format_text_get(fnode), "- b")); fnode = evas_textblock_node_format_next_get(fnode); fail_if (!fnode); fail_if(strcmp(evas_textblock_node_format_text_get(fnode), "- i")); fnode = evas_textblock_node_format_next_get(fnode); fail_if (fnode); evas_textblock_cursor_char_delete(cur); } fnode = evas_textblock_node_format_first_get(tb); fail_if (!fnode); fail_if(strcmp(evas_textblock_node_format_text_get(fnode), "+ b")); fnode = evas_textblock_node_format_next_get(fnode); fail_if (!fnode); fail_if(strcmp(evas_textblock_node_format_text_get(fnode), "- b")); fnode = evas_textblock_node_format_next_get(fnode); fail_if (fnode); /* This time with a generic closer */ evas_object_textblock_text_markup_set(tb, "abcde"); evas_textblock_cursor_pos_set(cur, 2); for (i = 0 ; i < 2 ; i++) { fnode = evas_textblock_node_format_first_get(tb); fail_if (!fnode); fail_if(strcmp(evas_textblock_node_format_text_get(fnode), "+ b")); fnode = evas_textblock_node_format_next_get(fnode); fail_if (!fnode); fail_if(strcmp(evas_textblock_node_format_text_get(fnode), "+ i")); fnode = evas_textblock_node_format_next_get(fnode); fail_if (!fnode); fail_if(strcmp(evas_textblock_node_format_text_get(fnode), "- b")); fnode = evas_textblock_node_format_next_get(fnode); fail_if (!fnode); fail_if(strcmp(evas_textblock_node_format_text_get(fnode), "- ")); fnode = evas_textblock_node_format_next_get(fnode); fail_if (fnode); evas_textblock_cursor_char_delete(cur); } fnode = evas_textblock_node_format_first_get(tb); fail_if (!fnode); fail_if(strcmp(evas_textblock_node_format_text_get(fnode), "+ b")); fnode = evas_textblock_node_format_next_get(fnode); fail_if (!fnode); fail_if(strcmp(evas_textblock_node_format_text_get(fnode), "- b")); fnode = evas_textblock_node_format_next_get(fnode); fail_if (fnode); /* And now with remove pair. */ evas_object_textblock_text_markup_set(tb, "abcde"); evas_textblock_cursor_pos_set(cur, 2); fnode = evas_textblock_node_format_first_get(tb); evas_textblock_node_format_remove_pair(tb, (Evas_Object_Textblock_Node_Format *) fnode); fnode = evas_textblock_node_format_first_get(tb); fail_if (!fnode); fail_if(strcmp(evas_textblock_node_format_text_get(fnode), "+ i")); fnode = evas_textblock_node_format_next_get(fnode); fail_if (!fnode); fail_if(strcmp(evas_textblock_node_format_text_get(fnode), "- i")); fnode = evas_textblock_node_format_next_get(fnode); fail_if (fnode); /* Remove the other pair */ evas_object_textblock_text_markup_set(tb, "abcde"); evas_textblock_cursor_pos_set(cur, 2); fnode = evas_textblock_node_format_first_get(tb); fnode = evas_textblock_node_format_next_get(fnode); evas_textblock_node_format_remove_pair(tb, (Evas_Object_Textblock_Node_Format *) fnode); fnode = evas_textblock_node_format_first_get(tb); fail_if (!fnode); fail_if(strcmp(evas_textblock_node_format_text_get(fnode), "+ b")); fnode = evas_textblock_node_format_next_get(fnode); fail_if (!fnode); fail_if(strcmp(evas_textblock_node_format_text_get(fnode), "- i")); fnode = evas_textblock_node_format_next_get(fnode); fail_if (fnode); /* Remove two pairs with the same name and same positions. */ evas_object_textblock_text_markup_set(tb, "A"); evas_textblock_cursor_pos_set(cur, 0); evas_textblock_cursor_char_delete(cur); fnode = evas_textblock_node_format_first_get(tb); fail_if (fnode); /* Try to remove a format that doesn't have a pair (with a bad mkup) */ evas_object_textblock_text_markup_set(tb, "abcde"); evas_textblock_cursor_pos_set(cur, 2); fnode = evas_textblock_node_format_first_get(tb); evas_textblock_node_format_remove_pair(tb, (Evas_Object_Textblock_Node_Format *) fnode); fnode = evas_textblock_node_format_first_get(tb); fail_if (!fnode); fail_if(strcmp(evas_textblock_node_format_text_get(fnode), "+ i")); fnode = evas_textblock_node_format_next_get(fnode); fail_if (!fnode); fail_if(strcmp(evas_textblock_node_format_text_get(fnode), "- ")); fnode = evas_textblock_node_format_next_get(fnode); fail_if (!fnode); fail_if(strcmp(evas_textblock_node_format_text_get(fnode), "- i")); fnode = evas_textblock_node_format_next_get(fnode); fail_if (fnode); END_TB_TEST(); } END_TEST /* Testing items */ START_TEST(evas_textblock_items) { Evas_Coord w, h, w2, h2, nw, nh, ih; START_TB_TEST(); const char *buf = "This is an ."; /* Absolute item size */ buf = "This is an ."; evas_object_textblock_text_markup_set(tb, buf); evas_object_textblock_size_formatted_get(tb, &w, &h); fail_if((w < 93) || (h < 153)); evas_textblock_cursor_pos_set(cur, 11); evas_textblock_cursor_format_item_geometry_get(cur, NULL, NULL, &w, &h); fail_if((w != 93) || (h != 152)); buf = "This is an ."; evas_object_textblock_text_markup_set(tb, buf); evas_object_textblock_size_formatted_get(tb, &w, &h); fail_if((w < 93) || (h <= 153)); evas_textblock_cursor_pos_set(cur, 11); evas_textblock_cursor_format_item_geometry_get(cur, NULL, NULL, &w, &h); fail_if((w != 93) || (h != 152)); /* Size is the same as abssize, unless there's scaling applied. */ buf = "This is an ."; evas_object_textblock_text_markup_set(tb, buf); evas_object_textblock_size_formatted_get(tb, &w, &h); fail_if((w < 93) || (h < 153)); evas_textblock_cursor_pos_set(cur, 11); evas_textblock_cursor_format_item_geometry_get(cur, NULL, NULL, &w, &h); fail_if((w != 93) || (h != 152)); buf = "This is an ."; evas_object_textblock_text_markup_set(tb, buf); evas_object_textblock_size_formatted_get(tb, &w, &h); fail_if((w < 93) || (h <= 153)); evas_textblock_cursor_pos_set(cur, 11); evas_textblock_cursor_format_item_geometry_get(cur, NULL, NULL, &w, &h); fail_if((w != 93) || (h != 152)); evas_object_scale_set(tb, 2.0); buf = "This is an ."; evas_object_textblock_text_markup_set(tb, buf); evas_object_textblock_size_formatted_get(tb, &w, &h); fail_if((w < (2 * 93)) || (h < (2 * 154))); evas_textblock_cursor_pos_set(cur, 11); evas_textblock_cursor_format_item_geometry_get(cur, NULL, NULL, &w, &h); fail_if((w != (2 * 93)) || (h != (2 * 152))); evas_textblock_cursor_pos_set(cur, 11); evas_textblock_cursor_format_item_geometry_get(cur, NULL, NULL, &w, &h); fail_if((w != (2 * 93)) || (h != (2 * 152))); buf = "This is an ."; evas_object_textblock_text_markup_set(tb, buf); evas_object_textblock_size_formatted_get(tb, &w, &h); fail_if((w < (2 * 93)) || (h <= (2 * 154))); evas_textblock_cursor_pos_set(cur, 11); evas_textblock_cursor_format_item_geometry_get(cur, NULL, NULL, &w, &h); fail_if((w != (2 * 93)) || (h != (2 * 152))); evas_object_scale_set(tb, 1.0); /* Relsize */ /* relsize means it should adjust itself to the size of the line */ buf = "This is an ."; evas_object_textblock_text_markup_set(tb, buf); evas_object_textblock_size_formatted_get(tb, &w, &h); fail_if((w >= 93) || (h >= 153)); evas_textblock_cursor_pos_set(cur, 11); evas_textblock_cursor_format_item_geometry_get(cur, NULL, NULL, &w, &ih); fail_if((w > 90) || (h <= ih)); buf = "This is an ."; evas_object_textblock_text_markup_set(tb, buf); evas_object_textblock_size_formatted_get(tb, &w, &h); fail_if((w >= 93) || (h >= 152)); evas_textblock_cursor_pos_set(cur, 11); evas_textblock_cursor_format_item_geometry_get(cur, NULL, NULL, &w, &ih); fail_if((w > 90) || (h <= ih)); /* Relsize and abs size in the same line, all should be the same size */ buf = ""; evas_object_textblock_text_markup_set(tb, buf); evas_object_textblock_size_formatted_get(tb, &w, &h); evas_object_textblock_size_native_get(tb, &nw, &nh); fail_if((nw != w) || (nh != h)); evas_textblock_cursor_format_item_geometry_get(cur, NULL, NULL, &w, &h); evas_textblock_cursor_char_next(cur); evas_textblock_cursor_format_item_geometry_get(cur, NULL, NULL, &w2, &h2); fail_if((w != w2) || (h != h2)); evas_textblock_cursor_format_item_geometry_get(cur, NULL, NULL, &w, &h); evas_textblock_cursor_char_next(cur); evas_textblock_cursor_format_item_geometry_get(cur, NULL, NULL, &w2, &h2); fail_if((w != w2) || (h != h2)); /* FIXME: Also verify x,y positions of the item. */ /* FIXME We need some item tests that involve line wrapping that make the * items move between lines that are in different sizes. * Also, tests that involve wrapping positions with relsized items. We * want to make sure the item gets a relsize on the correct time (before * the wrapping, and then is updated after the wrapping) and that * all the lines have the correct sizes afterwards. */ END_TB_TEST(); } END_TEST /* Wrapping tests */ START_TEST(evas_textblock_wrapping) { Evas_Coord bw, bh, w, h, nw, nh; int i; START_TB_TEST(); evas_object_textblock_text_markup_set(tb, "a"); evas_object_textblock_size_formatted_get(tb, &bw, &bh); /* Char wrap */ evas_object_textblock_text_markup_set(tb, "aaaaaaa"); evas_textblock_cursor_format_prepend(cur, "+ wrap=char"); evas_object_resize(tb, bw, bh); evas_object_textblock_size_formatted_get(tb, &w, &h); /* Wrap to minimum */ fail_if(w != bw); fail_if(h <= bh); /* Mixed - fallback to char wrap */ evas_object_textblock_text_markup_set(tb, "aaaaaaa"); evas_textblock_cursor_format_prepend(cur, "+ wrap=mixed"); evas_object_resize(tb, bw, bh); evas_object_textblock_size_formatted_get(tb, &w, &h); /* Wrap to minimum */ fail_if(w != bw); fail_if(h <= bh); /* Basic Word wrap */ evas_object_textblock_text_markup_set(tb, "aaaa"); evas_object_textblock_size_formatted_get(tb, &bw, &bh); evas_object_textblock_text_markup_set(tb, "aaaa aa"); evas_textblock_cursor_format_prepend(cur, "+ wrap=word"); evas_object_resize(tb, bw, bh); evas_object_textblock_size_formatted_get(tb, &w, &h); /* Wrap to minimum */ fail_if(w != bw); fail_if(h <= bh); /* Mixed - fallback to word wrap */ evas_object_textblock_text_markup_set(tb, "aaaa aa"); evas_textblock_cursor_format_prepend(cur, "+ wrap=mixed"); evas_object_resize(tb, bw + 1, bh); evas_object_textblock_size_formatted_get(tb, &w, &h); /* Wrap to minimum */ fail_if(w != bw); fail_if(h <= bh); /* Wrap and then expand again. */ evas_object_textblock_text_markup_set(tb, "aaaa aa"); evas_textblock_cursor_format_prepend(cur, "+ wrap=word"); evas_object_resize(tb, bw, bh); evas_object_textblock_size_formatted_get(tb, &w, &h); evas_object_textblock_size_native_get(tb, &nw, &nh); evas_object_resize(tb, nw, nh); evas_object_textblock_size_formatted_get(tb, &w, &h); fail_if((w != nw) || (h != nh)); /* Reduce size until reaching the minimum, making sure we don't * get something wrong along the way */ /* Char wrap */ evas_object_textblock_text_markup_set(tb, "a"); evas_object_textblock_size_formatted_get(tb, &bw, &bh); evas_object_textblock_text_markup_set(tb, "aaaa aaaa aaa aa aaa" "aaaa aaa aaa aaa aaa" "a aaaaa aaaaaaaaaaaaaa
aaaaa" "aaaaaa" ); evas_textblock_cursor_format_prepend(cur, "+ wrap=char"); evas_object_textblock_size_native_get(tb, &nw, &nh); Evas_Coord iw; for (iw = nw ; iw >= bw ; iw--) { evas_object_resize(tb, iw, 1000); evas_object_textblock_size_formatted_get(tb, &w, &h); fail_if(w < bw); fail_if(w > iw); } fail_if(w != bw); /* Word wrap */ evas_object_textblock_text_markup_set(tb, "aaaaaa"); evas_object_textblock_size_formatted_get(tb, &bw, &bh); evas_object_textblock_text_markup_set(tb, "aaaa aaaa aaa aa aaa" "aaaa aaa aaa aaa aaa" "a aaaaa aaaaaa
aaaaa" "aaaaa" ); evas_textblock_cursor_format_prepend(cur, "+ wrap=word"); evas_object_textblock_size_native_get(tb, &nw, &nh); for (iw = nw ; iw >= bw ; iw--) { evas_object_resize(tb, iw, 1000); evas_object_textblock_size_formatted_get(tb, &w, &h); fail_if(w < bw); fail_if(w > iw); } fail_if(w != bw); /* Mixed wrap */ evas_object_textblock_text_markup_set(tb, "a"); evas_object_textblock_size_formatted_get(tb, &bw, &bh); evas_object_textblock_text_markup_set(tb, "aaaa aaaa aaa aa aaa" "aaaa aaa aaa aaa aaa" "a aaaaa aaaaaa
aaaaa" "aaaaa" ); evas_textblock_cursor_format_prepend(cur, "+ wrap=mixed"); evas_object_textblock_size_native_get(tb, &nw, &nh); for (iw = nw ; iw >= bw ; iw--) { evas_object_resize(tb, iw, 1000); evas_object_textblock_size_formatted_get(tb, &w, &h); fail_if(w < bw); fail_if(w > iw); } fail_if(w != bw); /* Resize, making sure we keep going down in the minimum size. */ char *wrap_style[] = { "+ wrap=word", "+ wrap=char", "+ wrap=mixed" }; int wrap_items = sizeof(wrap_style) / sizeof(*wrap_style); evas_object_textblock_text_markup_set(tb, "This is an entry widget in this window that
" "uses markup like this for styling and
" "formatting like this, as well as
" "links in the text, so enter text
" "in here to edit it. By the way, links are
" "called Anchors so you will need
" "to refer to them this way.
" "
" "Also you can stick in items with (relsize + ascent): " "" " (full) " "" " (to the left)
" "Also (size + ascent): " "" " (full) " "" " (before this)
" "And as well (absize + ascent): " "" " (full) " "" " or even paths to image files on disk too like: " "" " ... end." ); /* Get minimum size */ evas_object_textblock_size_native_get(tb, &nw, &nh); for (i = 0 ; i < wrap_items ; i++) { evas_textblock_cursor_format_prepend(cur, wrap_style[i]); evas_object_resize(tb, 0, 0); evas_object_textblock_size_formatted_get(tb, &bw, &bh); for (iw = nw ; iw >= bw ; iw--) { evas_object_resize(tb, iw, 1000); evas_object_textblock_size_formatted_get(tb, &w, &h); fail_if(w < bw); fail_if(w > iw); } fail_if(w != bw); } /* Ellipsis */ evas_object_textblock_text_markup_set(tb, "aaaaaaaaaa"); evas_textblock_cursor_format_prepend(cur, "+ ellipsis=1.0"); evas_object_textblock_size_native_get(tb, &nw, &nh); evas_object_resize(tb, nw / 2, nh); evas_object_textblock_size_formatted_get(tb, &w, &h); fail_if((w > (nw / 2)) || (h != nh)); evas_object_textblock_text_markup_set(tb, "aaaaaaaaaaaaaaaaaa
b"); evas_textblock_cursor_format_prepend(cur, "+ ellipsis=1.0 wrap=word"); evas_object_textblock_size_native_get(tb, &nw, &nh); evas_object_resize(tb, nw / 2, nh * 2); evas_object_textblock_size_formatted_get(tb, &w, &h); fail_if(w > (nw / 2)); END_TB_TEST(); } END_TEST /* Various textblock stuff */ START_TEST(evas_textblock_various) { Evas_Coord w, h, bw, bh; START_TB_TEST(); const char *buf = "Thistextblockhasalotoflines."; evas_object_textblock_text_markup_set(tb, buf); evas_object_textblock_size_formatted_get(tb, &w, &h); /* Move outside of the screen so it'll have to search for the correct * paragraph and etc. */ evas_object_move(tb, -(w / 2), -(h / 2)); /* Replacement char */ evas_object_textblock_text_markup_set(tb, "*"); evas_object_textblock_size_formatted_get(tb, &bw, &bh); evas_object_textblock_replace_char_set(tb, "*"); evas_object_textblock_text_markup_set(tb, "|"); evas_object_textblock_size_formatted_get(tb, &w, &h); fail_if((w != bw) || (h != bh)); /* Items have correct text node information */ evas_object_textblock_text_markup_set(tb, ""); fail_if(!_evas_textblock_check_item_node_link(tb)); evas_object_textblock_text_markup_set(tb, ""); fail_if(!_evas_textblock_check_item_node_link(tb)); evas_object_textblock_text_markup_set(tb, "a"); fail_if(!_evas_textblock_check_item_node_link(tb)); evas_object_textblock_text_markup_set(tb, "aa"); fail_if(!_evas_textblock_check_item_node_link(tb)); evas_object_textblock_text_markup_set(tb, "aa"); fail_if(!_evas_textblock_check_item_node_link(tb)); evas_object_textblock_text_markup_set(tb, "aaa"); fail_if(!_evas_textblock_check_item_node_link(tb)); /* These shouldn't crash (although the desired outcome is not yet defined) */ evas_object_textblock_text_markup_set(tb, ""); evas_textblock_cursor_pos_set(cur, 0); evas_textblock_cursor_char_delete(cur); evas_object_textblock_text_markup_set(tb, "\xEF\xBF\xBC"); evas_textblock_cursor_pos_set(cur, 0); evas_textblock_cursor_char_delete(cur); END_TB_TEST(); } END_TEST /* Various geometries. e.g. range geometry. */ START_TEST(evas_textblock_geometries) { START_TB_TEST(); const char *buf = "This is a
test."; evas_object_textblock_text_markup_set(tb, buf); /* Single line range */ Evas_Textblock_Cursor *main_cur = evas_object_textblock_cursor_get(tb); evas_textblock_cursor_pos_set(cur, 0); evas_textblock_cursor_pos_set(main_cur, 6); Eina_List *rects, *rects2; Evas_Textblock_Rectangle *tr, *tr2; rects = evas_textblock_cursor_range_geometry_get(cur, main_cur); fail_if(!rects); rects2 = evas_textblock_cursor_range_geometry_get(main_cur, cur); fail_if(!rects2); fail_if(eina_list_count(rects) != 1); fail_if(eina_list_count(rects2) != 1); tr = eina_list_data_get(rects); fail_if((tr->h <= 0) || (tr->w <= 0)); tr2 = eina_list_data_get(rects2); fail_if((tr2->h <= 0) || (tr2->w <= 0)); fail_if((tr->x != tr2->x) || (tr->y != tr2->y) || (tr->w != tr2->w) || (tr->h != tr2->h)); EINA_LIST_FREE(rects, tr) free(tr); EINA_LIST_FREE(rects2, tr2) free(tr2); /* Multiline range */ evas_textblock_cursor_pos_set(cur, 0); evas_textblock_cursor_pos_set(main_cur, 14); rects = evas_textblock_cursor_range_geometry_get(cur, main_cur); fail_if(!rects); rects2 = evas_textblock_cursor_range_geometry_get(main_cur, cur); fail_if(!rects2); fail_if(eina_list_count(rects) != 2); fail_if(eina_list_count(rects2) != 2); tr = eina_list_data_get(rects); fail_if((tr->h <= 0) || (tr->w <= 0)); tr2 = eina_list_data_get(rects2); fail_if((tr2->h <= 0) || (tr2->w <= 0)); fail_if((tr->x != tr2->x) || (tr->y != tr2->y) || (tr->w != tr2->w) || (tr->h != tr2->h)); tr = eina_list_data_get(eina_list_next(rects)); fail_if((tr->h <= 0) || (tr->w <= 0)); tr2 = eina_list_data_get(eina_list_next(rects2)); fail_if((tr2->h <= 0) || (tr2->w <= 0)); fail_if((tr->x != tr2->x) || (tr->y != tr2->y) || (tr->w != tr2->w) || (tr->h != tr2->h)); /* Check that the second line is positioned below the first */ tr = eina_list_data_get(rects); tr2 = eina_list_data_get(eina_list_next(rects)); fail_if(tr->y >= tr2->y); EINA_LIST_FREE(rects, tr) free(tr); EINA_LIST_FREE(rects2, tr2) free(tr2); /* Same run different scripts */ evas_object_textblock_text_markup_set(tb, "עבריתenglishрусскийעברית"); evas_textblock_cursor_pos_set(cur, 3); evas_textblock_cursor_pos_set(main_cur, 7); rects = evas_textblock_cursor_range_geometry_get(cur, main_cur); fail_if(eina_list_count(rects) != 2); EINA_LIST_FREE(rects, tr) free(tr); /* Same run different styles */ evas_object_textblock_text_markup_set(tb, "testtest2test3"); evas_textblock_cursor_pos_set(cur, 3); evas_textblock_cursor_pos_set(main_cur, 11); rects = evas_textblock_cursor_range_geometry_get(cur, main_cur); fail_if(eina_list_count(rects) != 3); EINA_LIST_FREE(rects, tr) free(tr); END_TB_TEST(); } END_TEST /* Should handle all the text editing. */ START_TEST(evas_textblock_editing) { START_TB_TEST(); const char *buf = "First par.Second par."; evas_object_textblock_text_markup_set(tb, buf); Evas_Textblock_Cursor *main_cur = evas_object_textblock_cursor_get(tb); /* Check deletion works */ /* Try deleting after the end of the textblock */ { char *content; evas_textblock_cursor_paragraph_last(cur); content = strdup(evas_object_textblock_text_markup_get(tb)); evas_textblock_cursor_char_delete(cur); fail_if(strcmp(content, evas_object_textblock_text_markup_get(tb))); free(content); } /* Delete the first char */ evas_textblock_cursor_paragraph_first(cur); evas_textblock_cursor_char_delete(cur); fail_if(strcmp(evas_object_textblock_text_markup_get(tb), "irst par.Second par.")); /* Delete some arbitrary char */ evas_textblock_cursor_char_next(cur); evas_textblock_cursor_char_next(cur); evas_textblock_cursor_char_next(cur); evas_textblock_cursor_char_delete(cur); fail_if(strcmp(evas_object_textblock_text_markup_get(tb), "irs par.Second par.")); /* Delete a range */ evas_textblock_cursor_pos_set(main_cur, 1); evas_textblock_cursor_pos_set(cur, 6); evas_textblock_cursor_range_delete(cur, main_cur); fail_if(strcmp(evas_object_textblock_text_markup_get(tb), "ir.Second par.")); evas_textblock_cursor_paragraph_char_first(main_cur); evas_textblock_cursor_paragraph_char_last(cur); evas_textblock_cursor_char_next(cur); evas_textblock_cursor_range_delete(cur, main_cur); fail_if(strcmp(evas_object_textblock_text_markup_get(tb), "Second par.")); evas_object_textblock_text_markup_set(tb, buf); evas_textblock_cursor_paragraph_last(main_cur); evas_object_textblock_text_markup_prepend(main_cur, "Testblabla."); evas_textblock_cursor_paragraph_last(cur); evas_textblock_cursor_paragraph_char_first(main_cur); evas_textblock_cursor_range_delete(cur, main_cur); fail_if(strcmp(evas_object_textblock_text_markup_get(tb), "First par.")); /* Merging paragraphs */ evas_object_textblock_text_markup_set(tb, buf); evas_textblock_cursor_paragraph_char_last(cur); evas_textblock_cursor_copy(cur, main_cur); evas_textblock_cursor_char_delete(cur); evas_textblock_cursor_paragraph_first(cur); fail_if(evas_textblock_cursor_paragraph_next(cur)); /* Split paragraphs */ evas_textblock_cursor_format_prepend(cur, "ps"); evas_textblock_cursor_paragraph_first(cur); fail_if(!evas_textblock_cursor_paragraph_next(cur)); fail_if(evas_textblock_cursor_paragraph_next(cur)); /* Merge paragraphs using range deletion */ evas_object_textblock_text_markup_set(tb, buf); evas_textblock_cursor_paragraph_first(cur); evas_textblock_cursor_paragraph_char_last(cur); evas_textblock_cursor_copy(cur, main_cur); evas_textblock_cursor_char_prev(cur); evas_textblock_cursor_char_next(main_cur); evas_textblock_cursor_range_delete(cur, main_cur); evas_textblock_cursor_paragraph_first(cur); fail_if(evas_textblock_cursor_paragraph_next(cur)); { /* Limit to 1000 iterations so we'll never get into an infinite loop, * even if broken */ int limit = 1000; evas_object_textblock_text_markup_set(tb, "this is a test eauoeuaouthis is a test1this is a test 3"); evas_textblock_cursor_paragraph_last(cur); while (evas_textblock_cursor_pos_get(cur) > 0) { limit--; fail_if(limit <= 0); evas_textblock_cursor_copy(cur, main_cur); evas_textblock_cursor_char_prev(cur); evas_textblock_cursor_word_start(cur); evas_textblock_cursor_range_delete(cur, main_cur); } } /* Insert illegal characters inside the format. */ { const char *content; evas_object_textblock_text_markup_set(tb, "a\n"); evas_textblock_cursor_pos_set(cur, 1); content = evas_textblock_cursor_content_get(cur); evas_object_textblock_text_markup_set(tb, "a\t"); evas_textblock_cursor_pos_set(cur, 1); content = evas_textblock_cursor_content_get(cur); evas_object_textblock_text_markup_set(tb, "a\xEF\xBF\xBC"); evas_textblock_cursor_pos_set(cur, 1); content = evas_textblock_cursor_content_get(cur); evas_object_textblock_text_markup_set(tb, "a\xE2\x80\xA9"); evas_textblock_cursor_pos_set(cur, 1); content = evas_textblock_cursor_content_get(cur); (void) content; } /* FIXME: Also add text appending/prepending */ END_TB_TEST(); } END_TEST /* Text getters */ START_TEST(evas_textblock_text_getters) { START_TB_TEST(); const char *buf = "This is a
test." "טקסט בעבריתand now in english."; evas_object_textblock_text_markup_set(tb, buf); evas_textblock_cursor_paragraph_first(cur); fail_if(strcmp(evas_textblock_cursor_paragraph_text_get(cur), "This is a
test.")); evas_textblock_cursor_paragraph_next(cur); fail_if(strcmp(evas_textblock_cursor_paragraph_text_get(cur), "טקסט בעברית")); evas_textblock_cursor_paragraph_next(cur); fail_if(strcmp(evas_textblock_cursor_paragraph_text_get(cur), "and now in english.")); /* Range get */ Evas_Textblock_Cursor *main_cur = evas_object_textblock_cursor_get(tb); evas_textblock_cursor_pos_set(main_cur, 2); evas_textblock_cursor_pos_set(cur, 2); fail_if(*evas_textblock_cursor_range_text_get(main_cur, cur, EVAS_TEXTBLOCK_TEXT_MARKUP)); evas_textblock_cursor_pos_set(main_cur, 2); evas_textblock_cursor_pos_set(cur, 6); fail_if(strcmp(evas_textblock_cursor_range_text_get(main_cur, cur, EVAS_TEXTBLOCK_TEXT_MARKUP), "is i")); evas_textblock_cursor_pos_set(main_cur, 5); evas_textblock_cursor_pos_set(cur, 14); fail_if(strcmp(evas_textblock_cursor_range_text_get(main_cur, cur, EVAS_TEXTBLOCK_TEXT_MARKUP), "is a
te")); evas_textblock_cursor_pos_set(main_cur, 14); evas_textblock_cursor_pos_set(cur, 20); fail_if(strcmp(evas_textblock_cursor_range_text_get(main_cur, cur, EVAS_TEXTBLOCK_TEXT_MARKUP), "st.טק")); evas_textblock_cursor_pos_set(main_cur, 14); evas_textblock_cursor_pos_set(cur, 32); fail_if(strcmp(evas_textblock_cursor_range_text_get(main_cur, cur, EVAS_TEXTBLOCK_TEXT_MARKUP), "st.טקסט בעבריתan")); /* Backward range get */ evas_textblock_cursor_pos_set(main_cur, 2); evas_textblock_cursor_pos_set(cur, 2); fail_if(*evas_textblock_cursor_range_text_get(cur, main_cur, EVAS_TEXTBLOCK_TEXT_MARKUP)); evas_textblock_cursor_pos_set(main_cur, 2); evas_textblock_cursor_pos_set(cur, 6); fail_if(strcmp(evas_textblock_cursor_range_text_get(cur, main_cur, EVAS_TEXTBLOCK_TEXT_MARKUP), "is i")); evas_textblock_cursor_pos_set(main_cur, 5); evas_textblock_cursor_pos_set(cur, 14); fail_if(strcmp(evas_textblock_cursor_range_text_get(cur, main_cur, EVAS_TEXTBLOCK_TEXT_MARKUP), "is a
te")); evas_textblock_cursor_pos_set(main_cur, 14); evas_textblock_cursor_pos_set(cur, 20); fail_if(strcmp(evas_textblock_cursor_range_text_get(cur, main_cur, EVAS_TEXTBLOCK_TEXT_MARKUP), "st.טק")); evas_textblock_cursor_pos_set(main_cur, 14); evas_textblock_cursor_pos_set(cur, 32); fail_if(strcmp(evas_textblock_cursor_range_text_get(cur, main_cur, EVAS_TEXTBLOCK_TEXT_MARKUP), "st.טקסט בעבריתan")); /* Uninit cursors and other weird cases */ evas_object_textblock_clear(tb); evas_textblock_cursor_copy(main_cur, cur); evas_textblock_cursor_text_prepend(main_cur, "aaa"); fail_if(strcmp(evas_textblock_cursor_range_text_get(cur, main_cur, EVAS_TEXTBLOCK_TEXT_MARKUP), "aaa")); /* Markup to plain and vice versa */ { char *tmp, *tmp2; /* Real textblock object */ tmp = evas_textblock_text_markup_to_utf8(tb, "
aa<\n/>bb<\t/>"); fail_if(strcmp(tmp, "\naa\nbb\t")); tmp2 = evas_textblock_text_utf8_to_markup(tb, tmp); fail_if(strcmp(tmp2, "
aa
bb")); free(tmp2); free(tmp); tmp = evas_textblock_text_markup_to_utf8(tb, "a"); fail_if(strcmp(tmp, "a\xEF\xBF\xBC")); tmp2 = evas_textblock_text_utf8_to_markup(tb, tmp); fail_if(strcmp(tmp2, "a")); free(tmp2); free(tmp); tmp = evas_textblock_text_markup_to_utf8(tb, "a "); fail_if(strcmp(tmp, "a\xC2\xA0")); tmp2 = evas_textblock_text_utf8_to_markup(tb, tmp); fail_if(strcmp(tmp2, "a\xC2\xA0")); free(tmp2); free(tmp); tmp = evas_textblock_text_markup_to_utf8(tb, "aba"); fail_if(strcmp(tmp, "aba")); tmp2 = evas_textblock_text_utf8_to_markup(tb, tmp); fail_if(strcmp(tmp2, "aba")); free(tmp2); free(tmp); tmp = evas_textblock_text_markup_to_utf8(tb, "a&a"); fail_if(strcmp(tmp, "a&a")); tmp2 = evas_textblock_text_utf8_to_markup(tb, tmp); fail_if(strcmp(tmp2, "a&a")); free(tmp2); free(tmp); tmp = evas_textblock_text_markup_to_utf8(tb, "aa"); fail_if(strcmp(tmp, "a\na")); tmp2 = evas_textblock_text_utf8_to_markup(tb, tmp); fail_if(strcmp(tmp2, "a
a")); free(tmp2); free(tmp); /* NULL textblock object */ tmp = evas_textblock_text_markup_to_utf8(NULL, "
aa<\n/>bb<\t/>"); fail_if(strcmp(tmp, "\naa\nbb\t")); tmp2 = evas_textblock_text_utf8_to_markup(NULL, tmp); fail_if(strcmp(tmp2, "
aa
bb")); free(tmp2); free(tmp); tmp = evas_textblock_text_markup_to_utf8(NULL, "a"); fail_if(strcmp(tmp, "a\xEF\xBF\xBC")); tmp2 = evas_textblock_text_utf8_to_markup(NULL, tmp); fail_if(strcmp(tmp2, "a")); free(tmp2); free(tmp); tmp = evas_textblock_text_markup_to_utf8(NULL, "a "); fail_if(strcmp(tmp, "a\xC2\xA0")); tmp2 = evas_textblock_text_utf8_to_markup(NULL, tmp); fail_if(strcmp(tmp2, "a\xC2\xA0")); free(tmp2); free(tmp); tmp = evas_textblock_text_markup_to_utf8(NULL, "aba"); fail_if(strcmp(tmp, "aba")); tmp2 = evas_textblock_text_utf8_to_markup(NULL, tmp); fail_if(strcmp(tmp2, "aba")); free(tmp2); free(tmp); tmp = evas_textblock_text_markup_to_utf8(tb, "a&a"); fail_if(strcmp(tmp, "a&a")); tmp2 = evas_textblock_text_utf8_to_markup(tb, tmp); fail_if(strcmp(tmp2, "a&a")); free(tmp2); free(tmp); tmp = evas_textblock_text_markup_to_utf8(NULL, "aa"); fail_if(strcmp(tmp, "aa")); tmp2 = evas_textblock_text_utf8_to_markup(NULL, tmp); fail_if(strcmp(tmp2, "aa")); free(tmp2); free(tmp); } END_TB_TEST(); } END_TEST /* Formats */ START_TEST(evas_textblock_formats) { START_TB_TEST(); const char *buf = "This is a
test."; const Evas_Object_Textblock_Node_Format *fnode; evas_object_textblock_text_markup_set(tb, buf); /* Walk from the start */ fnode = evas_textblock_node_format_first_get(tb); fail_if(!fnode); fail_if(strcmp(evas_textblock_node_format_text_get(fnode), "+ b")); fnode = evas_textblock_node_format_next_get(fnode); fail_if(!fnode); fail_if(strcmp(evas_textblock_node_format_text_get(fnode), "+ font_size=15 wrap=none")); fnode = evas_textblock_node_format_next_get(fnode); fail_if(!fnode); fail_if(strcmp(evas_textblock_node_format_text_get(fnode), "- font_size=13")); fnode = evas_textblock_node_format_next_get(fnode); fail_if(!fnode); fail_if(strcmp(evas_textblock_node_format_text_get(fnode), "- ")); fnode = evas_textblock_node_format_next_get(fnode); fail_if(!fnode); fail_if(strcmp(evas_textblock_node_format_text_get(fnode), "br")); fnode = evas_textblock_node_format_next_get(fnode); fail_if(!fnode); fail_if(strcmp(evas_textblock_node_format_text_get(fnode), "ps")); fnode = evas_textblock_node_format_next_get(fnode); fail_if(!fnode); fail_if(strcmp(evas_textblock_node_format_text_get(fnode), "+ item")); fnode = evas_textblock_node_format_next_get(fnode); fail_if(!fnode); fail_if(strcmp(evas_textblock_node_format_text_get(fnode), "- ")); fnode = evas_textblock_node_format_next_get(fnode); fail_if(fnode); /* Walk backwards */ fnode = evas_textblock_node_format_last_get(tb); fail_if(!fnode); fail_if(strcmp(evas_textblock_node_format_text_get(fnode), "- ")); fnode = evas_textblock_node_format_prev_get(fnode); fail_if(!fnode); fail_if(strcmp(evas_textblock_node_format_text_get(fnode), "+ item")); fnode = evas_textblock_node_format_prev_get(fnode); fail_if(!fnode); fail_if(strcmp(evas_textblock_node_format_text_get(fnode), "ps")); fnode = evas_textblock_node_format_prev_get(fnode); fail_if(!fnode); fail_if(strcmp(evas_textblock_node_format_text_get(fnode), "br")); fnode = evas_textblock_node_format_prev_get(fnode); fail_if(!fnode); fail_if(strcmp(evas_textblock_node_format_text_get(fnode), "- ")); fnode = evas_textblock_node_format_prev_get(fnode); fail_if(!fnode); fail_if(strcmp(evas_textblock_node_format_text_get(fnode), "- font_size=13")); fnode = evas_textblock_node_format_prev_get(fnode); fail_if(!fnode); fail_if(strcmp(evas_textblock_node_format_text_get(fnode), "+ font_size=15 wrap=none")); fnode = evas_textblock_node_format_prev_get(fnode); fail_if(!fnode); fail_if(strcmp(evas_textblock_node_format_text_get(fnode), "+ b")); fnode = evas_textblock_node_format_prev_get(fnode); fail_if(fnode); /* Cursor and format detection */ fnode = evas_textblock_node_format_first_get(tb); fail_if(!fnode); evas_textblock_cursor_at_format_set(cur, fnode); fail_if(evas_textblock_cursor_format_is_visible_get(cur)); fnode = evas_textblock_node_format_next_get(fnode); fail_if(!fnode); evas_textblock_cursor_at_format_set(cur, fnode); fail_if(evas_textblock_cursor_format_is_visible_get(cur)); fnode = evas_textblock_node_format_next_get(fnode); fail_if(!fnode); evas_textblock_cursor_at_format_set(cur, fnode); fail_if(evas_textblock_cursor_format_is_visible_get(cur)); fnode = evas_textblock_node_format_next_get(fnode); fail_if(!fnode); evas_textblock_cursor_at_format_set(cur, fnode); fail_if(evas_textblock_cursor_format_is_visible_get(cur)); fnode = evas_textblock_node_format_next_get(fnode); fail_if(!fnode); evas_textblock_cursor_at_format_set(cur, fnode); fail_if(!evas_textblock_cursor_format_is_visible_get(cur)); fnode = evas_textblock_node_format_next_get(fnode); fail_if(!fnode); evas_textblock_cursor_at_format_set(cur, fnode); fail_if(!evas_textblock_cursor_format_is_visible_get(cur)); size_t i = 0; evas_textblock_cursor_paragraph_first(cur); do { switch (i) { case 2: case 3: case 6: case 7: case 10: case 14: case 17: case 18: fail_if(!evas_textblock_cursor_is_format(cur)); break; default: fail_if(evas_textblock_cursor_is_format(cur)); fail_if(evas_textblock_cursor_format_is_visible_get(cur)); break; } i++; } while (evas_textblock_cursor_char_next(cur)); /* Format text nodes invalidation */ { Evas_Coord w, h, nw, nh; evas_object_textblock_text_markup_set(tb, "Test"); evas_object_textblock_size_formatted_get(tb, &w, &h); evas_textblock_cursor_paragraph_first(cur); evas_textblock_cursor_format_prepend(cur, "+ font_size=40"); evas_object_textblock_size_formatted_get(tb, &nw, &nh); fail_if((w >= nw) || (h >= nh)); } /* FIXME: Should extend invalidation tests. */ /* Various formats, just verify there's no seg, we can't really * verify them visually, well, we can some of them. Possibly in the * future we will */ evas_object_textblock_text_markup_set(tb, "font_size=40" "color=#F210B3FF" "underline=single underline_color=#A2B3C4" "underline=double underline_color=#F00 underline2_color=#00F" "underline=dashed underline_dash_color=#0F0 underline_dash_width=2 underline_dash_gap=1" "style=outline outline_color=#F0FA" "style=shadow shadow_color=#F0F" "style=glow glow_color=#BBB" "style=glow glow2_color=#0F0" "style=glow color=#fff glow2_color=#fe87 glow_color=#f214" "backing=on backing_color=#00F" "strikethrough=on strikethrough_color=#FF0" "align=right" "valign=0.0" "tabstops=<\\t>50" "linesize=40" "linerelsize=200%" "linegap=20" "linerelgap=100%"); /* Force a relayout */ evas_object_textblock_size_formatted_get(tb, NULL, NULL); /* Removing paired formats. */ evas_object_textblock_text_markup_set(tb, "aabbcc"); fnode = evas_textblock_node_format_first_get(tb); evas_textblock_node_format_remove_pair(tb, (Evas_Object_Textblock_Node_Format *) fnode); fnode = evas_textblock_node_format_first_get(tb); fail_if(!fnode); fail_if(strcmp(evas_textblock_node_format_text_get(fnode), "+ b")); fnode = evas_textblock_node_format_next_get(fnode); fail_if(!fnode); fail_if(strcmp(evas_textblock_node_format_text_get(fnode), "- b")); evas_object_textblock_text_markup_set(tb, "aabbcc"); fnode = evas_textblock_node_format_first_get(tb); fnode = evas_textblock_node_format_next_get(fnode); evas_textblock_node_format_remove_pair(tb, (Evas_Object_Textblock_Node_Format *) fnode); fnode = evas_textblock_node_format_first_get(tb); fail_if(!fnode); fail_if(strcmp(evas_textblock_node_format_text_get(fnode), "+ a")); fnode = evas_textblock_node_format_next_get(fnode); fail_if(!fnode); fail_if(strcmp(evas_textblock_node_format_text_get(fnode), "- a")); /* Format list get */ evas_object_textblock_text_markup_set(tb, "aab" "bbcc"); const Eina_List *flist = evas_textblock_node_format_list_get(tb, "a"); const Eina_List *itr; EINA_LIST_FOREACH(flist, itr, fnode) { fail_if(strcmp(evas_textblock_node_format_text_get(fnode), "+ a")); } flist = evas_textblock_node_format_list_get(tb, "item"); EINA_LIST_FOREACH(flist, itr, fnode) { fail_if(strcmp(evas_textblock_node_format_text_get(fnode), "+ item")); } /* Make sure we get all the types of visible formats correctly. */ evas_object_textblock_text_markup_set(tb, "a
aa"); fail_if(strcmp(evas_textblock_node_format_text_get( evas_textblock_cursor_format_get(cur)), "ps")); fail_if(strcmp(evas_textblock_cursor_content_get(cur), "")); fail_if(!evas_textblock_cursor_format_is_visible_get(cur)); fail_if(!evas_textblock_cursor_char_next(cur)); fail_if(!evas_textblock_cursor_char_next(cur)); fail_if(strcmp(evas_textblock_node_format_text_get( evas_textblock_cursor_format_get(cur)), "br")); fail_if(strcmp(evas_textblock_cursor_content_get(cur), "
")); fail_if(!evas_textblock_cursor_format_is_visible_get(cur)); fail_if(!evas_textblock_cursor_char_next(cur)); fail_if(!evas_textblock_cursor_char_next(cur)); fail_if(strcmp(evas_textblock_node_format_text_get( evas_textblock_cursor_format_get(cur)), "tab")); fail_if(strcmp(evas_textblock_cursor_content_get(cur), "")); fail_if(!evas_textblock_cursor_format_is_visible_get(cur)); fail_if(!evas_textblock_cursor_char_next(cur)); fail_if(!evas_textblock_cursor_char_next(cur)); fail_if(strcmp(evas_textblock_node_format_text_get( evas_textblock_cursor_format_get(cur)), "+ item")); fail_if(strcmp(evas_textblock_cursor_content_get(cur), "")); fail_if(!evas_textblock_cursor_format_is_visible_get(cur)); END_TB_TEST(); } END_TEST /* Different text styles, for example, shadow. */ START_TEST(evas_textblock_style) { Evas_Coord w, h, nw, nh; Evas_Coord l, r, t, b; START_TB_TEST(); Evas_Textblock_Style *newst; const char *buf = "TestTest2נסיון"; evas_object_textblock_text_markup_set(tb, buf); fail_if(strcmp(evas_object_textblock_text_markup_get(tb), buf)); evas_object_textblock_size_formatted_get(tb, &w, &h); newst = evas_textblock_style_new(); fail_if(!newst); evas_textblock_style_set(newst, "DEFAULT='font=Sans font_size=20 color=#000 text_class=entry'" "br='\n'" "ps='ps'" "tab='\t'"); evas_object_textblock_style_set(tb, newst); evas_object_textblock_size_formatted_get(tb, &nw, &nh); fail_if((w >= nw) || (h >= nh)); /* Style padding. */ evas_object_textblock_text_markup_set(tb, "Test"); evas_object_textblock_style_insets_get(tb, &l, &r, &t, &b); fail_if((l != 0) || (r != 0) || (t != 0) || (b != 0)); evas_object_textblock_text_markup_set(tb, "Test"); evas_object_textblock_style_insets_get(tb, &l, &r, &t, &b); fail_if((l != 0) || (r != 1) || (t != 0) || (b != 1)); evas_object_textblock_text_markup_set(tb, "Test"); evas_object_textblock_style_insets_get(tb, &l, &r, &t, &b); fail_if((l != 1) || (r != 1) || (t != 1) || (b != 1)); evas_object_textblock_text_markup_set(tb, "Test"); evas_object_textblock_style_insets_get(tb, &l, &r, &t, &b); fail_if((l != 2) || (r != 2) || (t != 2) || (b != 2)); evas_object_textblock_text_markup_set(tb, "Test"); evas_object_textblock_style_insets_get(tb, &l, &r, &t, &b); fail_if((l != 2) || (r != 2) || (t != 2) || (b != 2)); evas_object_textblock_text_markup_set(tb, "Test"); evas_object_textblock_style_insets_get(tb, &l, &r, &t, &b); fail_if((l != 1) || (r != 2) || (t != 1) || (b != 2)); evas_object_textblock_text_markup_set(tb, "Test"); evas_object_textblock_style_insets_get(tb, &l, &r, &t, &b); fail_if((l != 1) || (r != 2) || (t != 1) || (b != 2)); evas_object_textblock_text_markup_set(tb, "Test"); evas_object_textblock_style_insets_get(tb, &l, &r, &t, &b); fail_if((l != 1) || (r != 3) || (t != 1) || (b != 3)); evas_object_textblock_text_markup_set(tb, "Test"); evas_object_textblock_style_insets_get(tb, &l, &r, &t, &b); fail_if((l != 1) || (r != 3) || (t != 1) || (b != 3)); evas_object_textblock_text_markup_set(tb, "Test"); evas_object_textblock_style_insets_get(tb, &l, &r, &t, &b); fail_if((l != 0) || (r != 4) || (t != 0) || (b != 4)); /* Mixed style padding */ evas_object_textblock_text_markup_set(tb, "TestTest"); evas_object_textblock_style_insets_get(tb, &l, &r, &t, &b); fail_if((l != 1) || (r != 4) || (t != 1) || (b != 4)); END_TB_TEST(); } END_TEST /* Various setters and getters */ START_TEST(evas_textblock_set_get) { START_TB_TEST(); const char *buf = ""; evas_object_textblock_text_markup_set(tb, buf); fail_if(strcmp(evas_textblock_style_get(st), style_buf)); fail_if(evas_object_textblock_style_get(tb) != st); evas_object_textblock_replace_char_set(tb, "|"); fail_if(strcmp(evas_object_textblock_replace_char_get(tb), "|")); evas_object_textblock_replace_char_set(tb, "ש"); fail_if(strcmp(evas_object_textblock_replace_char_get(tb), "ש")); evas_object_textblock_valign_set(tb, -1.0); fail_if(evas_object_textblock_valign_get(tb) != 0.0); evas_object_textblock_valign_set(tb, 0.0); fail_if(evas_object_textblock_valign_get(tb) != 0.0); evas_object_textblock_valign_set(tb, 0.432); fail_if(evas_object_textblock_valign_get(tb) != 0.432); evas_object_textblock_valign_set(tb, 1.0); fail_if(evas_object_textblock_valign_get(tb) != 1.0); evas_object_textblock_valign_set(tb, 1.5); fail_if(evas_object_textblock_valign_get(tb) != 1.0); evas_object_textblock_bidi_delimiters_set(tb, ",.|"); fail_if(strcmp(evas_object_textblock_bidi_delimiters_get(tb), ",.|")); evas_object_textblock_bidi_delimiters_set(tb, ",|"); fail_if(strcmp(evas_object_textblock_bidi_delimiters_get(tb), ",|")); evas_object_textblock_bidi_delimiters_set(tb, NULL); fail_if(evas_object_textblock_bidi_delimiters_get(tb)); evas_object_textblock_bidi_delimiters_set(tb, ",|"); fail_if(strcmp(evas_object_textblock_bidi_delimiters_get(tb), ",|")); /* Hinting */ evas_object_textblock_text_markup_set(tb, "This isa test
bla"); /* Force relayout */ evas_object_textblock_size_formatted_get(tb, NULL, NULL); evas_font_hinting_set(evas, EVAS_FONT_HINTING_NONE); evas_font_hinting_set(evas, EVAS_FONT_HINTING_AUTO); evas_font_hinting_set(evas, EVAS_FONT_HINTING_BYTECODE); END_TB_TEST(); } END_TEST /* Aux evas stuff, such as scale. */ START_TEST(evas_textblock_evas) { Evas_Coord w, h, sw, sh; START_TB_TEST(); const char *buf = "Test"; evas_object_textblock_text_markup_set(tb, buf); evas_object_textblock_size_formatted_get(tb, &w, &h); evas_object_scale_set(tb, 3.0); evas_object_textblock_size_formatted_get(tb, &sw, &sh); fail_if((sw <= w) || (sh <= h)); evas_object_scale_set(tb, 0.5); evas_object_textblock_size_formatted_get(tb, &sw, &sh); fail_if((sw >= w) || (sh >= h)); END_TB_TEST(); } END_TEST /* All the string escaping stuff */ START_TEST(evas_textblock_escaping) { int len; START_TB_TEST(); fail_if(strcmp(evas_textblock_escape_string_get("&"), "&")); fail_if(strcmp(evas_textblock_string_escape_get("&", &len), "&")); fail_if(len != 1); fail_if(strcmp(evas_textblock_escape_string_get("·"), "\xc2\xb7")); fail_if(strcmp(evas_textblock_string_escape_get("\xc2\xb7", &len), "·")); fail_if(len != 2); fail_if(strcmp(evas_textblock_escape_string_get("👙"), "\xF0\x9F\x91\x99")); fail_if(strcmp(evas_textblock_escape_string_get("👙"), "\xF0\x9F\x91\x99")); fail_if(evas_textblock_escape_string_get("·aa")); const char *tmp = "·aa"; fail_if(strcmp(evas_textblock_escape_string_range_get(tmp, tmp + 8), "\xc2\xb7")); fail_if(evas_textblock_escape_string_range_get(tmp, tmp + 9)); fail_if(evas_textblock_escape_string_range_get(tmp, tmp + 7)); fail_if(evas_textblock_escape_string_range_get(tmp, tmp + 5)); const char *buf = "This · is"; evas_object_textblock_text_markup_set(tb, buf); fail_if(strcmp(evas_object_textblock_text_markup_get(tb), "This \xc2\xb7 is")); buf = "This   is"; evas_object_textblock_text_markup_set(tb, buf); fail_if(strcmp(evas_object_textblock_text_markup_get(tb), "This \xc2\xa0 is")); END_TB_TEST(); } END_TEST START_TEST(evas_textblock_size) { START_TB_TEST(); Evas_Coord w, h, h2, nw, nh; const char *buf = "This is a
test.
גם בעברית"; /* Empty textblock */ evas_object_textblock_size_formatted_get(tb, &w, &h); evas_object_textblock_size_native_get(tb, &nw, &nh); ck_assert_int_eq(w, nw); ck_assert_int_eq(h, nh); fail_if(w != 0); /* When wrapping is off, native size should be the same as formatted * size */ evas_object_textblock_text_markup_set(tb, buf); evas_object_textblock_size_formatted_get(tb, &w, &h); evas_object_textblock_size_native_get(tb, &nw, &nh); fail_if((w != nw) || (h != nh)); evas_object_textblock_text_markup_set(tb, "a
a"); evas_object_textblock_size_formatted_get(tb, &w, &h2); evas_object_textblock_size_native_get(tb, &nw, &nh); fail_if((w != nw) || (h2 != nh)); /* Two lines != double the height */ fail_if(h * 2 == h2); evas_object_textblock_text_markup_set(tb, buf); evas_object_textblock_size_formatted_get(tb, &w, &h); evas_object_textblock_size_native_get(tb, &nw, &nh); fail_if((w != nw) || (h != nh)); fail_if(w <= 0); /* This time with margins. */ { Evas_Textblock_Style *newst; Evas_Coord oldw, oldh, oldnw, oldnh; evas_object_textblock_text_markup_set(tb, buf); evas_object_textblock_size_formatted_get(tb, &oldw, &oldh); evas_object_textblock_size_native_get(tb, &oldnw, &oldnh); newst = evas_textblock_style_new(); fail_if(!newst); evas_textblock_style_set(newst, "DEFAULT='left_margin=4 right_margin=4'"); evas_object_textblock_style_user_push(tb, newst); evas_object_textblock_size_formatted_get(tb, &w, &h); evas_object_textblock_size_native_get(tb, &nw, &nh); fail_if((w != oldw + 8) || (h != oldh) || (nw != oldnw + 8) || (nh != oldnh)); } /* FIXME: There is a lot more to be done. */ END_TB_TEST(); } END_TEST void evas_test_textblock(TCase *tc) { tcase_add_test(tc, evas_textblock_simple); tcase_add_test(tc, evas_textblock_cursor); tcase_add_test(tc, evas_textblock_size); tcase_add_test(tc, evas_textblock_editing); tcase_add_test(tc, evas_textblock_style); tcase_add_test(tc, evas_textblock_evas); tcase_add_test(tc, evas_textblock_text_getters); tcase_add_test(tc, evas_textblock_formats); tcase_add_test(tc, evas_textblock_format_removal); tcase_add_test(tc, evas_textblock_escaping); tcase_add_test(tc, evas_textblock_set_get); tcase_add_test(tc, evas_textblock_geometries); tcase_add_test(tc, evas_textblock_various); tcase_add_test(tc, evas_textblock_wrapping); tcase_add_test(tc, evas_textblock_items); } evas-1.7.9/src/tests/evas_suite.h0000664000175000017500000000035012175475547013701 00000000000000#ifndef _EVAS_SUITE_H #define _EVAS_SUITE_H #include void evas_test_init(TCase *tc); void evas_test_textblock(TCase *tc); void evas_test_text(TCase *tc); void evas_test_callbacks(TCase *tc); #endif /* _EVAS_SUITE_H */ evas-1.7.9/src/tests/evas_test_callbacks.c0000664000175000017500000000727512175475547015536 00000000000000 #ifdef HAVE_CONFIG_H # include "config.h" #endif #include #include "evas_suite.h" #include "Evas.h" #include "evas_tests_helpers.h" #define START_CALLBACK_TEST() \ Evas *evas; \ Evas_Object *rect; \ evas = EVAS_TEST_INIT_EVAS(); \ rect = evas_object_rectangle_add(evas); \ do \ { \ } \ while (0) #define END_CALLBACK_TEST() \ do \ { \ evas_object_del(rect); \ evas_free(evas); \ evas_shutdown(); \ } \ while (0) static uintptr_t counter = 1; static void _obj_event_cb(void *data, Evas *e, Evas_Object *obj, void *event_info) { (void) e; (void) obj; (void) event_info; fail_if(((uintptr_t) data) != counter); counter++; } START_TEST(evas_object_event_callbacks_priority) { START_CALLBACK_TEST(); counter = 1; evas_object_event_callback_priority_add(rect, EVAS_CALLBACK_MOVE, -10, _obj_event_cb, (void *) 1); evas_object_event_callback_priority_add(rect, EVAS_CALLBACK_MOVE, 0, _obj_event_cb, (void *) 2); evas_object_event_callback_priority_add(rect, EVAS_CALLBACK_MOVE, 10, _obj_event_cb, (void *) 3); evas_object_move(rect, 2, 2); /* Make sure we got through all the callbacks */ fail_if(counter != 4); /* Delete _obj_event_cb 3 times */ evas_object_event_callback_del(rect, EVAS_CALLBACK_MOVE, _obj_event_cb); evas_object_event_callback_del(rect, EVAS_CALLBACK_MOVE, _obj_event_cb); evas_object_event_callback_del(rect, EVAS_CALLBACK_MOVE, _obj_event_cb); counter = 1; evas_object_event_callback_priority_add(rect, EVAS_CALLBACK_MOVE, 0, _obj_event_cb, (void *) 2); evas_object_event_callback_priority_add(rect, EVAS_CALLBACK_MOVE, -10, _obj_event_cb, (void *) 1); evas_object_event_callback_priority_add(rect, EVAS_CALLBACK_MOVE, 10, _obj_event_cb, (void *) 3); evas_object_move(rect, 3, 3); /* Make sure we got through all the callbacks */ fail_if(counter != 4); END_CALLBACK_TEST(); } END_TEST static void _event_cb(void *data, Evas *e, void *event_info) { (void) e; (void) event_info; fail_if(((uintptr_t) data) != counter); counter++; } START_TEST(evas_event_callbacks_priority) { START_CALLBACK_TEST(); evas_object_focus_set(rect, EINA_FALSE); counter = 1; evas_event_callback_priority_add(evas, EVAS_CALLBACK_CANVAS_OBJECT_FOCUS_IN, -10, _event_cb, (void *) 1); evas_event_callback_priority_add(evas, EVAS_CALLBACK_CANVAS_OBJECT_FOCUS_IN, 0, _event_cb, (void *) 2); evas_event_callback_priority_add(evas, EVAS_CALLBACK_CANVAS_OBJECT_FOCUS_IN, 10, _event_cb, (void *) 3); evas_object_focus_set(rect, EINA_TRUE); /* Make sure we got through all the callbacks */ fail_if(counter != 4); /* Delete _event_cb 3 times */ evas_event_callback_del(evas, EVAS_CALLBACK_CANVAS_OBJECT_FOCUS_IN, _event_cb); evas_event_callback_del(evas, EVAS_CALLBACK_CANVAS_OBJECT_FOCUS_IN, _event_cb); evas_event_callback_del(evas, EVAS_CALLBACK_CANVAS_OBJECT_FOCUS_IN, _event_cb); evas_object_focus_set(rect, EINA_FALSE); counter = 1; evas_event_callback_priority_add(evas, EVAS_CALLBACK_CANVAS_OBJECT_FOCUS_IN, 0, _event_cb, (void *) 2); evas_event_callback_priority_add(evas, EVAS_CALLBACK_CANVAS_OBJECT_FOCUS_IN, -10, _event_cb, (void *) 1); evas_event_callback_priority_add(evas, EVAS_CALLBACK_CANVAS_OBJECT_FOCUS_IN, 10, _event_cb, (void *) 3); evas_object_focus_set(rect, EINA_TRUE); /* Make sure we got through all the callbacks */ fail_if(counter != 4); END_CALLBACK_TEST(); } END_TEST void evas_test_callbacks(TCase *tc) { tcase_add_test(tc, evas_object_event_callbacks_priority); tcase_add_test(tc, evas_event_callbacks_priority); } evas-1.7.9/src/tests/evas_test_init.c0000664000175000017500000000047412175475547014554 00000000000000 #ifdef HAVE_CONFIG_H # include "config.h" #endif #include #include "evas_suite.h" #include "Evas.h" START_TEST(evas_simple) { fail_if(evas_init() != 1); /* one init by test suite */ fail_if(evas_shutdown() != 0); } END_TEST void evas_test_init(TCase *tc) { tcase_add_test(tc, evas_simple); } evas-1.7.9/src/tests/evas_suite.c0000664000175000017500000000366212175475547013705 00000000000000#ifdef HAVE_CONFIG_H # include #endif #include #include #include #include "evas_suite.h" typedef struct _Evas_Test_Case Evas_Test_Case; struct _Evas_Test_Case { const char *test_case; void (*build)(TCase *tc); }; static const Evas_Test_Case etc[] = { { "Evas", evas_test_init }, { "Object Textblock", evas_test_textblock }, { "Object Text", evas_test_text }, { "Callbacks", evas_test_callbacks }, { NULL, NULL } }; static void _list_tests(void) { const Evas_Test_Case *itr; itr = etc; fputs("Available Test Cases:\n", stderr); for (; itr->test_case; itr++) fprintf(stderr, "\t%s\n", itr->test_case); } static Eina_Bool _use_test(int argc, const char **argv, const char *test_case) { if (argc < 1) return 1; for (; argc > 0; argc--, argv++) if (strcmp(test_case, *argv) == 0) return 1; return 0; } static Suite * evas_suite_build(int argc, const char **argv) { TCase *tc; Suite *s; int i; s = suite_create("Evas"); for (i = 0; etc[i].test_case; ++i) { if (!_use_test(argc, argv, etc[i].test_case)) continue; tc = tcase_create(etc[i].test_case); etc[i].build(tc); suite_add_tcase(s, tc); tcase_set_timeout(tc, 0); } return s; } int main(int argc, char **argv) { Suite *s; SRunner *sr; int i, failed_count; for (i = 1; i < argc; i++) if ((strcmp(argv[i], "-h") == 0) || (strcmp(argv[i], "--help") == 0)) { fprintf(stderr, "Usage:\n\t%s [test_case1 .. [test_caseN]]\n", argv[0]); _list_tests(); return 0; } else if ((strcmp(argv[i], "-l") == 0) || (strcmp(argv[i], "--list") == 0)) { _list_tests(); return 0; } s = evas_suite_build(argc - 1, (const char **)argv + 1); sr = srunner_create(s); srunner_run_all(sr, CK_ENV); failed_count = srunner_ntests_failed(sr); srunner_free(sr); return (failed_count == 0) ? 0 : 255; } evas-1.7.9/src/tests/evas_tests_helpers.h0000664000175000017500000000140312175475547015434 00000000000000#ifndef EVAS_TEST_HELPERS_H #define EVAS_TEST_HELPERS_H /* FIXME: Currently depends on the buffer engine, should we do anything * fancier? */ #define EVAS_TEST_INIT_EVAS() _setup_evas() #define EVAS_TEST_FREE_EVAS() \ do \ { \ evas_textblock_cursor_free(cur); \ evas_object_del(tb); \ evas_textblock_style_free(st); \ evas_free(evas); \ evas_shutdown(); \ } \ while (0) static Evas * _setup_evas() { Evas *evas; Evas_Engine_Info *einfo; evas_init(); evas = evas_new(); evas_output_method_set(evas, evas_render_method_lookup("buffer")); einfo = evas_engine_info_get(evas); evas_engine_info_set(evas, einfo); evas_output_size_set(evas, 500, 500); evas_output_viewport_set(evas, 0, 0, 500, 500); return evas; } #endif evas-1.7.9/src/tests/Makefile.am0000664000175000017500000000116512175475547013422 00000000000000MAINTAINERCLEANFILES = Makefile.in AM_CPPFLAGS = \ -I$(top_srcdir)/src/lib \ -I$(top_srcdir)/src/include \ -I$(top_builddir)/src/include \ -I$(top_builddir)/src/lib \ -DPACKAGE_BIN_DIR=\"$(bindir)\" \ -DPACKAGE_LIB_DIR=\"$(libdir)\" \ -DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \ @EVAS_GENERAL_CFLAGS@ \ @CHECK_CFLAGS@ if EFL_ENABLE_TESTS check_PROGRAMS = evas_suite evas_suite_SOURCES = \ evas_suite.c \ evas_test_init.c \ evas_test_textblock.c \ evas_test_text.c \ evas_test_callbacks.c \ evas_tests_helpers.h \ evas_suite.h evas_suite_LDADD = @CHECK_LIBS@ $(top_builddir)/src/lib/libevas.la @EVAS_GENERAL_LIBS@ endif evas-1.7.9/src/bin/0000775000175000017500000000000012234557316011040 500000000000000evas-1.7.9/src/bin/Makefile.in0000664000175000017500000012542212234557300013024 00000000000000# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ @EVAS_CSERVE2_FALSE@@EVAS_CSERVE_TRUE@bin_PROGRAMS = \ @EVAS_CSERVE2_FALSE@@EVAS_CSERVE_TRUE@ evas_cserve$(EXEEXT) \ @EVAS_CSERVE2_FALSE@@EVAS_CSERVE_TRUE@ evas_cserve_tool$(EXEEXT) @EVAS_CSERVE2_TRUE@bin_PROGRAMS = evas_cserve2_client$(EXEEXT) \ @EVAS_CSERVE2_TRUE@ evas_cserve2_usage$(EXEEXT) \ @EVAS_CSERVE2_TRUE@ evas_cserve2_debug$(EXEEXT) @EVAS_CSERVE2_TRUE@libexec_PROGRAMS = evas_cserve2$(EXEEXT) \ @EVAS_CSERVE2_TRUE@ evas_cserve2_slave$(EXEEXT) \ @EVAS_CSERVE2_TRUE@ dummy_slave$(EXEEXT) subdir = src/bin DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/efl_attribute.m4 \ $(top_srcdir)/m4/efl_coverage.m4 \ $(top_srcdir)/m4/efl_doxygen.m4 \ $(top_srcdir)/m4/efl_fnmatch.m4 \ $(top_srcdir)/m4/efl_path_max.m4 \ $(top_srcdir)/m4/efl_shm_open.m4 $(top_srcdir)/m4/efl_tests.m4 \ $(top_srcdir)/m4/evas_check_engine.m4 \ $(top_srcdir)/m4/evas_check_loader.m4 \ $(top_srcdir)/m4/evas_converter.m4 \ $(top_srcdir)/m4/evas_dither.m4 \ $(top_srcdir)/m4/evas_scaler.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(libexecdir)" PROGRAMS = $(bin_PROGRAMS) $(libexec_PROGRAMS) am__dummy_slave_SOURCES_DIST = dummy_slave.c @EVAS_CSERVE2_TRUE@am_dummy_slave_OBJECTS = dummy_slave.$(OBJEXT) dummy_slave_OBJECTS = $(am_dummy_slave_OBJECTS) dummy_slave_DEPENDENCIES = AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = am__evas_cserve_SOURCES_DIST = evas_cserve_main.c @EVAS_CSERVE_TRUE@am_evas_cserve_OBJECTS = evas_cserve_main.$(OBJEXT) evas_cserve_OBJECTS = $(am_evas_cserve_OBJECTS) @EVAS_CSERVE_TRUE@evas_cserve_DEPENDENCIES = \ @EVAS_CSERVE_TRUE@ $(top_builddir)/src/lib/libevas.la am__evas_cserve2_SOURCES_DIST = evas_cserve2.h evas_cserve2_slave.h \ evas_cserve2_main.c evas_cserve2_slaves.c \ evas_cserve2_messages.c evas_cserve2_shm.c \ evas_cserve2_cache.c evas_cserve2_requests.c \ evas_cserve2_fonts.c evas_cserve2_main_loop_linux.c @EVAS_CSERVE2_TRUE@am_evas_cserve2_OBJECTS = \ @EVAS_CSERVE2_TRUE@ evas_cserve2_main.$(OBJEXT) \ @EVAS_CSERVE2_TRUE@ evas_cserve2_slaves.$(OBJEXT) \ @EVAS_CSERVE2_TRUE@ evas_cserve2_messages.$(OBJEXT) \ @EVAS_CSERVE2_TRUE@ evas_cserve2_shm.$(OBJEXT) \ @EVAS_CSERVE2_TRUE@ evas_cserve2_cache.$(OBJEXT) \ @EVAS_CSERVE2_TRUE@ evas_cserve2_requests.$(OBJEXT) \ @EVAS_CSERVE2_TRUE@ evas_cserve2_fonts.$(OBJEXT) \ @EVAS_CSERVE2_TRUE@ evas_cserve2_main_loop_linux.$(OBJEXT) evas_cserve2_OBJECTS = $(am_evas_cserve2_OBJECTS) @EVAS_CSERVE2_TRUE@evas_cserve2_DEPENDENCIES = \ @EVAS_CSERVE2_TRUE@ $(libevas_cserve2_utils_la) am__evas_cserve2_client_SOURCES_DIST = evas_cserve2_client.c @EVAS_CSERVE2_TRUE@am_evas_cserve2_client_OBJECTS = \ @EVAS_CSERVE2_TRUE@ evas_cserve2_client.$(OBJEXT) evas_cserve2_client_OBJECTS = $(am_evas_cserve2_client_OBJECTS) evas_cserve2_client_LDADD = $(LDADD) am__evas_cserve2_debug_SOURCES_DIST = evas_cserve2_debug.c @EVAS_CSERVE2_TRUE@am_evas_cserve2_debug_OBJECTS = \ @EVAS_CSERVE2_TRUE@ evas_cserve2_debug.$(OBJEXT) evas_cserve2_debug_OBJECTS = $(am_evas_cserve2_debug_OBJECTS) evas_cserve2_debug_DEPENDENCIES = am__evas_cserve2_slave_SOURCES_DIST = evas_cserve2_slave.c \ evas_cserve2_utils.c @EVAS_CSERVE2_TRUE@am_evas_cserve2_slave_OBJECTS = \ @EVAS_CSERVE2_TRUE@ evas_cserve2_slave.$(OBJEXT) \ @EVAS_CSERVE2_TRUE@ evas_cserve2_utils.$(OBJEXT) evas_cserve2_slave_OBJECTS = $(am_evas_cserve2_slave_OBJECTS) evas_cserve2_slave_DEPENDENCIES = evas_cserve2_slave_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(AM_CFLAGS) $(CFLAGS) $(evas_cserve2_slave_LDFLAGS) \ $(LDFLAGS) -o $@ am__evas_cserve2_usage_SOURCES_DIST = evas_cserve2_usage.c @EVAS_CSERVE2_TRUE@am_evas_cserve2_usage_OBJECTS = \ @EVAS_CSERVE2_TRUE@ evas_cserve2_usage.$(OBJEXT) evas_cserve2_usage_OBJECTS = $(am_evas_cserve2_usage_OBJECTS) evas_cserve2_usage_DEPENDENCIES = am__evas_cserve_tool_SOURCES_DIST = evas_cserve_tool.c @EVAS_CSERVE_TRUE@am_evas_cserve_tool_OBJECTS = \ @EVAS_CSERVE_TRUE@ evas_cserve_tool.$(OBJEXT) evas_cserve_tool_OBJECTS = $(am_evas_cserve_tool_OBJECTS) @EVAS_CSERVE_TRUE@evas_cserve_tool_DEPENDENCIES = \ @EVAS_CSERVE_TRUE@ $(top_builddir)/src/lib/libevas.la evas_cserve_tool_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(AM_CFLAGS) $(CFLAGS) $(evas_cserve_tool_LDFLAGS) $(LDFLAGS) \ -o $@ AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(dummy_slave_SOURCES) $(evas_cserve_SOURCES) \ $(evas_cserve2_SOURCES) $(evas_cserve2_client_SOURCES) \ $(evas_cserve2_debug_SOURCES) $(evas_cserve2_slave_SOURCES) \ $(evas_cserve2_usage_SOURCES) $(evas_cserve_tool_SOURCES) DIST_SOURCES = $(am__dummy_slave_SOURCES_DIST) \ $(am__evas_cserve_SOURCES_DIST) \ $(am__evas_cserve2_SOURCES_DIST) \ $(am__evas_cserve2_client_SOURCES_DIST) \ $(am__evas_cserve2_debug_SOURCES_DIST) \ $(am__evas_cserve2_slave_SOURCES_DIST) \ $(am__evas_cserve2_usage_SOURCES_DIST) \ $(am__evas_cserve_tool_SOURCES_DIST) RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-recursive dvi-recursive html-recursive info-recursive \ install-data-recursive install-dvi-recursive \ install-exec-recursive install-html-recursive \ install-info-recursive install-pdf-recursive \ install-ps-recursive install-recursive installcheck-recursive \ installdirs-recursive pdf-recursive ps-recursive \ tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ $(RECURSIVE_TARGETS) \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ distdir am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DIST_SUBDIRS = loaders DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHECK_CFLAGS = @CHECK_CFLAGS@ CHECK_LIBS = @CHECK_LIBS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@ DIRECTFB_LIBS = @DIRECTFB_LIBS@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ ECORE_EVAS_CFLAGS = @ECORE_EVAS_CFLAGS@ ECORE_EVAS_LIBS = @ECORE_EVAS_LIBS@ EDB_CFLAGS = @EDB_CFLAGS@ EDB_LIBS = @EDB_LIBS@ EDJE_CFLAGS = @EDJE_CFLAGS@ EDJE_LIBS = @EDJE_LIBS@ EET_CFLAGS = @EET_CFLAGS@ EET_LIBS = @EET_LIBS@ EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@ EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@ EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@ EFL_SHM_OPEN_LIBS = @EFL_SHM_OPEN_LIBS@ EGREP = @EGREP@ EINA_CFLAGS = @EINA_CFLAGS@ EINA_LIBS = @EINA_LIBS@ EVAS_CFLAGS = @EVAS_CFLAGS@ EVAS_GENERAL_CFLAGS = @EVAS_GENERAL_CFLAGS@ EVAS_GENERAL_LIBS = @EVAS_GENERAL_LIBS@ EVAS_LIBS = @EVAS_LIBS@ EVAS_SSE3_CFLAGS = @EVAS_SSE3_CFLAGS@ EVIL_CFLAGS = @EVIL_CFLAGS@ EVIL_LIBS = @EVIL_LIBS@ EXEEXT = @EXEEXT@ EXOTIC_CFLAGS = @EXOTIC_CFLAGS@ EXOTIC_LIBS = @EXOTIC_LIBS@ FGREP = @FGREP@ FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@ FONTCONFIG_LIBS = @FONTCONFIG_LIBS@ FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ FREETYPE_LIBS = @FREETYPE_LIBS@ FRIBIDI_CFLAGS = @FRIBIDI_CFLAGS@ FRIBIDI_LIBS = @FRIBIDI_LIBS@ GL_EET_CFLAGS = @GL_EET_CFLAGS@ GL_EET_LIBS = @GL_EET_LIBS@ GREP = @GREP@ HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@ HARFBUZZ_LIBS = @HARFBUZZ_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LINEBREAK_CFLAGS = @LINEBREAK_CFLAGS@ LINEBREAK_LIBS = @LINEBREAK_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MODULE_ARCH = @MODULE_ARCH@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ SDL_CFLAGS = @SDL_CFLAGS@ SDL_LIBS = @SDL_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ SVG_CFLAGS = @SVG_CFLAGS@ SVG_LIBS = @SVG_LIBS@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ XCB_CFLAGS = @XCB_CFLAGS@ XCB_GL_CFLAGS = @XCB_GL_CFLAGS@ XCB_GL_LIBS = @XCB_GL_LIBS@ XCB_LIBS = @XCB_LIBS@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_ct_OBJC = @ac_ct_OBJC@ altivec_cflags = @altivec_cflags@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ dlopen_libs = @dlopen_libs@ docdir = @docdir@ dvidir = @dvidir@ edje_cc = @edje_cc@ efl_doxygen = @efl_doxygen@ efl_have_doxygen = @efl_have_doxygen@ evas_engine_buffer_cflags = @evas_engine_buffer_cflags@ evas_engine_buffer_libs = @evas_engine_buffer_libs@ evas_engine_direct3d_cflags = @evas_engine_direct3d_cflags@ evas_engine_direct3d_libs = @evas_engine_direct3d_libs@ evas_engine_directfb_cflags = @evas_engine_directfb_cflags@ evas_engine_directfb_libs = @evas_engine_directfb_libs@ evas_engine_fb_cflags = @evas_engine_fb_cflags@ evas_engine_fb_libs = @evas_engine_fb_libs@ evas_engine_gl_cocoa_cflags = @evas_engine_gl_cocoa_cflags@ evas_engine_gl_cocoa_libs = @evas_engine_gl_cocoa_libs@ evas_engine_gl_common_libs = @evas_engine_gl_common_libs@ evas_engine_gl_sdl_cflags = @evas_engine_gl_sdl_cflags@ evas_engine_gl_sdl_libs = @evas_engine_gl_sdl_libs@ evas_engine_gl_xcb_cflags = @evas_engine_gl_xcb_cflags@ evas_engine_gl_xcb_libs = @evas_engine_gl_xcb_libs@ evas_engine_gl_xlib_cflags = @evas_engine_gl_xlib_cflags@ evas_engine_gl_xlib_libs = @evas_engine_gl_xlib_libs@ evas_engine_psl1ght_cflags = @evas_engine_psl1ght_cflags@ evas_engine_psl1ght_libs = @evas_engine_psl1ght_libs@ evas_engine_software_16_sdl_cflags = @evas_engine_software_16_sdl_cflags@ evas_engine_software_16_sdl_libs = @evas_engine_software_16_sdl_libs@ evas_engine_software_16_wince_cflags = @evas_engine_software_16_wince_cflags@ evas_engine_software_16_wince_libs = @evas_engine_software_16_wince_libs@ evas_engine_software_16_x11_cflags = @evas_engine_software_16_x11_cflags@ evas_engine_software_16_x11_libs = @evas_engine_software_16_x11_libs@ evas_engine_software_8_x11_cflags = @evas_engine_software_8_x11_cflags@ evas_engine_software_8_x11_libs = @evas_engine_software_8_x11_libs@ evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@ evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@ evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@ evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ evas_image_loader_edb_libs = @evas_image_loader_edb_libs@ evas_image_loader_eet_cflags = @evas_image_loader_eet_cflags@ evas_image_loader_eet_libs = @evas_image_loader_eet_libs@ evas_image_loader_generic_cflags = @evas_image_loader_generic_cflags@ evas_image_loader_generic_libs = @evas_image_loader_generic_libs@ evas_image_loader_gif_cflags = @evas_image_loader_gif_cflags@ evas_image_loader_gif_libs = @evas_image_loader_gif_libs@ evas_image_loader_ico_cflags = @evas_image_loader_ico_cflags@ evas_image_loader_ico_libs = @evas_image_loader_ico_libs@ evas_image_loader_jpeg_cflags = @evas_image_loader_jpeg_cflags@ evas_image_loader_jpeg_libs = @evas_image_loader_jpeg_libs@ evas_image_loader_pmaps_cflags = @evas_image_loader_pmaps_cflags@ evas_image_loader_pmaps_libs = @evas_image_loader_pmaps_libs@ evas_image_loader_png_cflags = @evas_image_loader_png_cflags@ evas_image_loader_png_libs = @evas_image_loader_png_libs@ evas_image_loader_psd_cflags = @evas_image_loader_psd_cflags@ evas_image_loader_psd_libs = @evas_image_loader_psd_libs@ evas_image_loader_svg_cflags = @evas_image_loader_svg_cflags@ evas_image_loader_svg_libs = @evas_image_loader_svg_libs@ evas_image_loader_tga_cflags = @evas_image_loader_tga_cflags@ evas_image_loader_tga_libs = @evas_image_loader_tga_libs@ evas_image_loader_tiff_cflags = @evas_image_loader_tiff_cflags@ evas_image_loader_tiff_libs = @evas_image_loader_tiff_libs@ evas_image_loader_wbmp_cflags = @evas_image_loader_wbmp_cflags@ evas_image_loader_wbmp_libs = @evas_image_loader_wbmp_libs@ evas_image_loader_xpm_cflags = @evas_image_loader_xpm_cflags@ evas_image_loader_xpm_libs = @evas_image_loader_xpm_libs@ exec_prefix = @exec_prefix@ have_evas_engine_gl_x11 = @have_evas_engine_gl_x11@ have_evas_engine_gl_xcb = @have_evas_engine_gl_xcb@ have_evas_engine_gl_xlib = @have_evas_engine_gl_xlib@ have_evas_engine_software_x11 = @have_evas_engine_software_x11@ have_evas_engine_software_xcb = @have_evas_engine_software_xcb@ have_evas_engine_software_xlib = @have_evas_engine_software_xlib@ have_lcov = @have_lcov@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_enable_auto_import = @lt_enable_auto_import@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgconfig_requires_private = @pkgconfig_requires_private@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pthread_cflags = @pthread_cflags@ pthread_libs = @pthread_libs@ release_info = @release_info@ requirement_evas = @requirement_evas@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ shm_open_libs = @shm_open_libs@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ version_info = @version_info@ MAINTAINERCLEANFILES = Makefile.in @EVAS_CSERVE2_TRUE@AM_CPPFLAGS = \ @EVAS_CSERVE2_TRUE@-I. \ @EVAS_CSERVE2_TRUE@-I$(top_srcdir)/src/lib \ @EVAS_CSERVE2_TRUE@-I$(top_srcdir)/src/lib/include \ @EVAS_CSERVE2_TRUE@-I$(top_srcdir)/src/lib/cserve2 \ @EVAS_CSERVE2_TRUE@-DPACKAGE_BIN_DIR=\"$(bindir)\" \ @EVAS_CSERVE2_TRUE@-DPACKAGE_LIB_DIR=\"$(libdir)\" \ @EVAS_CSERVE2_TRUE@-DPACKAGE_LIBEXEC_DIR=\"$(libexecdir)\" \ @EVAS_CSERVE2_TRUE@@FREETYPE_CFLAGS@ \ @EVAS_CSERVE2_TRUE@@EVAS_GENERAL_CFLAGS@ \ @EVAS_CSERVE2_TRUE@@EET_CFLAGS@ @EVAS_CSERVE_TRUE@AM_CPPFLAGS = \ @EVAS_CSERVE_TRUE@-I. \ @EVAS_CSERVE_TRUE@-I$(top_srcdir)/src/lib \ @EVAS_CSERVE_TRUE@-I$(top_srcdir)/src/lib/include \ @EVAS_CSERVE_TRUE@-I$(top_srcdir)/src/lib/cserve \ @EVAS_CSERVE_TRUE@-DPACKAGE_BIN_DIR=\"$(bindir)\" \ @EVAS_CSERVE_TRUE@-DPACKAGE_LIB_DIR=\"$(libdir)\" \ @EVAS_CSERVE_TRUE@-DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \ @EVAS_CSERVE_TRUE@@EVAS_GENERAL_CFLAGS@ \ @EVAS_CSERVE_TRUE@@FREETYPE_CFLAGS@ \ @EVAS_CSERVE_TRUE@@FRIBIDI_CFLAGS@ \ @EVAS_CSERVE_TRUE@@EET_CFLAGS@ \ @EVAS_CSERVE_TRUE@@FONTCONFIG_CFLAGS@ \ @EVAS_CSERVE_TRUE@@pthread_cflags@ \ @EVAS_CSERVE_TRUE@@PIXMAN_CFLAGS@ @EVAS_CSERVE_TRUE@evas_cserve_SOURCES = \ @EVAS_CSERVE_TRUE@evas_cserve_main.c @EVAS_CSERVE_TRUE@evas_cserve_LDADD = \ @EVAS_CSERVE_TRUE@$(top_builddir)/src/lib/libevas.la \ @EVAS_CSERVE_TRUE@@pthread_libs@ \ @EVAS_CSERVE_TRUE@@EVAS_GENERAL_LIBS@ @EVAS_CSERVE_TRUE@evas_cserve_tool_LDFLAGS = @EVAS_CSERVE_TRUE@evas_cserve_tool_SOURCES = \ @EVAS_CSERVE_TRUE@evas_cserve_tool.c @EVAS_CSERVE_TRUE@evas_cserve_tool_LDADD = \ @EVAS_CSERVE_TRUE@$(top_builddir)/src/lib/libevas.la \ @EVAS_CSERVE_TRUE@@pthread_libs@ \ @EVAS_CSERVE_TRUE@@EVAS_GENERAL_LIBS@ @EVAS_CSERVE2_TRUE@SUBDIRS = loaders @EVAS_CSERVE2_TRUE@evas_cserve2_SOURCES = \ @EVAS_CSERVE2_TRUE@evas_cserve2.h \ @EVAS_CSERVE2_TRUE@evas_cserve2_slave.h \ @EVAS_CSERVE2_TRUE@evas_cserve2_main.c \ @EVAS_CSERVE2_TRUE@evas_cserve2_slaves.c \ @EVAS_CSERVE2_TRUE@evas_cserve2_messages.c \ @EVAS_CSERVE2_TRUE@evas_cserve2_shm.c \ @EVAS_CSERVE2_TRUE@evas_cserve2_cache.c \ @EVAS_CSERVE2_TRUE@evas_cserve2_requests.c \ @EVAS_CSERVE2_TRUE@evas_cserve2_fonts.c \ @EVAS_CSERVE2_TRUE@evas_cserve2_main_loop_linux.c @EVAS_CSERVE2_TRUE@libevas_cserve2_utils_la = $(top_builddir)/src/lib/cserve2/libevas_cserve2_utils.la @EVAS_CSERVE2_TRUE@evas_cserve2_LDADD = \ @EVAS_CSERVE2_TRUE@@FREETYPE_LIBS@ \ @EVAS_CSERVE2_TRUE@@EVAS_GENERAL_LIBS@ \ @EVAS_CSERVE2_TRUE@@EFL_SHM_OPEN_LIBS@ \ @EVAS_CSERVE2_TRUE@@EET_LIBS@ \ @EVAS_CSERVE2_TRUE@$(libevas_cserve2_utils_la) @EVAS_CSERVE2_TRUE@evas_cserve2_client_SOURCES = \ @EVAS_CSERVE2_TRUE@evas_cserve2_client.c @EVAS_CSERVE2_TRUE@evas_cserve2_usage_SOURCES = \ @EVAS_CSERVE2_TRUE@evas_cserve2_usage.c @EVAS_CSERVE2_TRUE@evas_cserve2_debug_SOURCES = \ @EVAS_CSERVE2_TRUE@evas_cserve2_debug.c @EVAS_CSERVE2_TRUE@evas_cserve2_usage_LDADD = \ @EVAS_CSERVE2_TRUE@@EVAS_GENERAL_LIBS@ @EVAS_CSERVE2_TRUE@evas_cserve2_debug_LDADD = \ @EVAS_CSERVE2_TRUE@@EVAS_GENERAL_LIBS@ @EVAS_CSERVE2_TRUE@evas_cserve2_slave_SOURCES = \ @EVAS_CSERVE2_TRUE@evas_cserve2_slave.c \ @EVAS_CSERVE2_TRUE@evas_cserve2_utils.c @EVAS_CSERVE2_TRUE@evas_cserve2_slave_LDFLAGS = -export-dynamic @EVAS_CSERVE2_TRUE@evas_cserve2_slave_LDADD = \ @EVAS_CSERVE2_TRUE@@EVAS_GENERAL_LIBS@ \ @EVAS_CSERVE2_TRUE@@EFL_SHM_OPEN_LIBS@ @EVAS_CSERVE2_TRUE@dummy_slave_SOURCES = \ @EVAS_CSERVE2_TRUE@dummy_slave.c @EVAS_CSERVE2_TRUE@dummy_slave_LDADD = \ @EVAS_CSERVE2_TRUE@@EVAS_GENERAL_LIBS@ \ @EVAS_CSERVE2_TRUE@@EFL_SHM_OPEN_LIBS@ all: all-recursive .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/bin/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/bin/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ || test -f $$p1 \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list install-libexecPROGRAMS: $(libexec_PROGRAMS) @$(NORMAL_INSTALL) @list='$(libexec_PROGRAMS)'; test -n "$(libexecdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(libexecdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(libexecdir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ || test -f $$p1 \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(libexecdir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(libexecdir)$$dir" || exit $$?; \ } \ ; done uninstall-libexecPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(libexec_PROGRAMS)'; test -n "$(libexecdir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(libexecdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(libexecdir)" && rm -f $$files clean-libexecPROGRAMS: @list='$(libexec_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list dummy_slave$(EXEEXT): $(dummy_slave_OBJECTS) $(dummy_slave_DEPENDENCIES) $(EXTRA_dummy_slave_DEPENDENCIES) @rm -f dummy_slave$(EXEEXT) $(AM_V_CCLD)$(LINK) $(dummy_slave_OBJECTS) $(dummy_slave_LDADD) $(LIBS) evas_cserve$(EXEEXT): $(evas_cserve_OBJECTS) $(evas_cserve_DEPENDENCIES) $(EXTRA_evas_cserve_DEPENDENCIES) @rm -f evas_cserve$(EXEEXT) $(AM_V_CCLD)$(LINK) $(evas_cserve_OBJECTS) $(evas_cserve_LDADD) $(LIBS) evas_cserve2$(EXEEXT): $(evas_cserve2_OBJECTS) $(evas_cserve2_DEPENDENCIES) $(EXTRA_evas_cserve2_DEPENDENCIES) @rm -f evas_cserve2$(EXEEXT) $(AM_V_CCLD)$(LINK) $(evas_cserve2_OBJECTS) $(evas_cserve2_LDADD) $(LIBS) evas_cserve2_client$(EXEEXT): $(evas_cserve2_client_OBJECTS) $(evas_cserve2_client_DEPENDENCIES) $(EXTRA_evas_cserve2_client_DEPENDENCIES) @rm -f evas_cserve2_client$(EXEEXT) $(AM_V_CCLD)$(LINK) $(evas_cserve2_client_OBJECTS) $(evas_cserve2_client_LDADD) $(LIBS) evas_cserve2_debug$(EXEEXT): $(evas_cserve2_debug_OBJECTS) $(evas_cserve2_debug_DEPENDENCIES) $(EXTRA_evas_cserve2_debug_DEPENDENCIES) @rm -f evas_cserve2_debug$(EXEEXT) $(AM_V_CCLD)$(LINK) $(evas_cserve2_debug_OBJECTS) $(evas_cserve2_debug_LDADD) $(LIBS) evas_cserve2_slave$(EXEEXT): $(evas_cserve2_slave_OBJECTS) $(evas_cserve2_slave_DEPENDENCIES) $(EXTRA_evas_cserve2_slave_DEPENDENCIES) @rm -f evas_cserve2_slave$(EXEEXT) $(AM_V_CCLD)$(evas_cserve2_slave_LINK) $(evas_cserve2_slave_OBJECTS) $(evas_cserve2_slave_LDADD) $(LIBS) evas_cserve2_usage$(EXEEXT): $(evas_cserve2_usage_OBJECTS) $(evas_cserve2_usage_DEPENDENCIES) $(EXTRA_evas_cserve2_usage_DEPENDENCIES) @rm -f evas_cserve2_usage$(EXEEXT) $(AM_V_CCLD)$(LINK) $(evas_cserve2_usage_OBJECTS) $(evas_cserve2_usage_LDADD) $(LIBS) evas_cserve_tool$(EXEEXT): $(evas_cserve_tool_OBJECTS) $(evas_cserve_tool_DEPENDENCIES) $(EXTRA_evas_cserve_tool_DEPENDENCIES) @rm -f evas_cserve_tool$(EXEEXT) $(AM_V_CCLD)$(evas_cserve_tool_LINK) $(evas_cserve_tool_OBJECTS) $(evas_cserve_tool_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dummy_slave.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_cserve2_cache.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_cserve2_client.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_cserve2_debug.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_cserve2_fonts.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_cserve2_main.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_cserve2_main_loop_linux.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_cserve2_messages.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_cserve2_requests.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_cserve2_shm.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_cserve2_slave.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_cserve2_slaves.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_cserve2_usage.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_cserve2_utils.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_cserve_main.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_cserve_tool.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs # This directory's subdirectories are mostly independent; you can cd # into them and run 'make' without going through this Makefile. # To change the values of 'make' variables: instead of editing Makefiles, # (1) if the variable is set in 'config.status', edit 'config.status' # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. $(am__recursive_targets): @fail=; \ if $(am__make_keepgoing); then \ failcom='fail=yes'; \ else \ failcom='exit 1'; \ fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-recursive TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-recursive CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-recursive cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile $(PROGRAMS) installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(libexecdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-recursive clean-am: clean-binPROGRAMS clean-generic clean-libexecPROGRAMS \ clean-libtool mostlyclean-am distclean: distclean-recursive -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-binPROGRAMS install-libexecPROGRAMS install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-binPROGRAMS uninstall-libexecPROGRAMS .MAKE: $(am__recursive_targets) install-am install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \ check-am clean clean-binPROGRAMS clean-generic \ clean-libexecPROGRAMS clean-libtool cscopelist-am ctags \ ctags-am distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-binPROGRAMS \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-libexecPROGRAMS \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am uninstall-binPROGRAMS \ uninstall-libexecPROGRAMS # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: evas-1.7.9/src/bin/evas_cserve2_requests.c0000664000175000017500000003327212175475547015466 00000000000000#ifdef HAVE_CONFIG_H # include "config.h" #endif #include "evas_cserve2.h" #define MAX_SLAVES 1 typedef enum { SLAVE_IMAGE, SLAVE_FONT, SLAVE_NONE } Slave_Type; struct _Slave_Worker { Slave_Type type; void *data; Slave *slave; Eina_Binbuf *ret; int ret_size; Eina_Bool done; Eina_Bool delete_me; }; typedef struct _Slave_Worker Slave_Worker; /* This struct is used to match font request types to the respective slave * type, and the message type that will be used for that request. The order * of the request types on it is the order in which these requests will * be processed. */ static struct _Request_Match { Slave_Request_Type rtype; Slave_Type stype; Slave_Command ctype; int require_spares; /* for speculative operations, will require to leave at least this number of slaves always available */ } _request_match[] = { { CSERVE2_REQ_IMAGE_OPEN, SLAVE_IMAGE, IMAGE_OPEN, 0 }, { CSERVE2_REQ_IMAGE_LOAD, SLAVE_IMAGE, IMAGE_LOAD, 0 }, { CSERVE2_REQ_IMAGE_SPEC_LOAD, SLAVE_IMAGE, IMAGE_LOAD, 1 }, { CSERVE2_REQ_FONT_LOAD, SLAVE_FONT, FONT_LOAD, 0 }, { CSERVE2_REQ_FONT_GLYPHS_LOAD, SLAVE_FONT, FONT_GLYPHS_LOAD, 0 }, { CSERVE2_REQ_LAST, 0, 0, 0 } }; static Slave *_create_image_slave(void *data); static Slave *_create_font_slave(void *data); static struct _Worker { Slave_Type type; unsigned int max; Eina_List *idle; Eina_List *working; Slave *(*create_slave)(void *data); } _workers[] = { { SLAVE_IMAGE, 3, NULL, NULL, _create_image_slave }, { SLAVE_FONT, 1, NULL, NULL, _create_font_slave }, }; struct _Slave_Request { EINA_INLIST; Slave_Request_Type type; void *data; void *msg; Eina_List *waiters; Eina_Bool processing; Slave_Request_Funcs *funcs; Slave_Request *dependency; Eina_List *dependents; /* list of requests that depend on this one finishing */ Eina_Bool locked : 1; /* locked waiting for a dependency request to finish */ Eina_Bool cancelled : 1; }; struct _Waiter { unsigned int rid; Client *client; }; typedef struct _Waiter Waiter; struct _Request_Queue { Eina_Inlist *waiting; Eina_Inlist *processing; // TODO: Check if is there any use for this list. }; typedef struct _Request_Queue Request_Queue; static Request_Queue *requests = NULL; // static Eina_List *processing = NULL; static void _cserve2_requests_process(void); static void _request_waiter_add(Slave_Request *req, Client *client, unsigned int rid) { Waiter *w = malloc(sizeof(*w)); DBG("Add waiter to request. Client: %d, rid: %d", client->id, rid); w->client = client; w->rid = rid; req->waiters = eina_list_append(req->waiters, w); } Slave_Request * cserve2_request_add(Slave_Request_Type type, unsigned int rid, Client *client, Slave_Request *dep, Slave_Request_Funcs *funcs, void *data) { Slave_Request *req, *r; req = NULL; /* Check if this request was already being processed. */ EINA_INLIST_FOREACH(requests[type].processing, r) { if (r->data != data) continue; req = r; break; } /* Check if this request was already waiting to be processed. */ if (!req) { EINA_INLIST_FOREACH(requests[type].waiting, r) { if (r->data != data) continue; req = r; break; } } /* create new request */ if (!req) { DBG("Add request for rid: %d", rid); req = calloc(1, sizeof(*req)); req->type = type; req->data = data; req->waiters = NULL; req->processing = EINA_FALSE; req->funcs = funcs; requests[type].waiting = eina_inlist_append(requests[type].waiting, EINA_INLIST_GET(req)); } if (dep && !req->dependency) { req->locked = EINA_TRUE; dep->dependents = eina_list_append(dep->dependents, req); req->dependency = dep; } if (client && rid) _request_waiter_add(req, client, rid); _cserve2_requests_process(); return req; } void cserve2_request_waiter_add(Slave_Request *req, unsigned int rid, Client *client) { _request_waiter_add(req, client, rid); } void cserve2_request_type_set(Slave_Request *req, Slave_Request_Type type) { Eina_Inlist **from, **to; if (req->processing || (type == req->type)) return; from = &requests[req->type].waiting; to = &requests[type].waiting; req->type = type; *from = eina_inlist_remove(*from, EINA_INLIST_GET(req)); *to = eina_inlist_append(*to, EINA_INLIST_GET(req)); } static void _request_dependents_cancel(Slave_Request *req, Error_Type err) { Slave_Request *dep; EINA_LIST_FREE(req->dependents, dep) { dep->locked = EINA_FALSE; dep->dependency = NULL; /* Maybe we need a better way to inform the creator of the request * that it was cancelled because its dependency failed? */ cserve2_request_cancel_all(dep, err); } } void cserve2_request_cancel(Slave_Request *req, Client *client, Error_Type err) { Eina_List *l, *l_next; Waiter *w; if (req->funcs && req->funcs->error) req->funcs->error(req->data, err); EINA_LIST_FOREACH_SAFE(req->waiters, l, l_next, w) { if (w->client->id == client->id) { DBG("Removing answer from waiter client: %d, rid: %d", client->id, w->rid); cserve2_client_error_send(w->client, w->rid, err); req->waiters = eina_list_remove_list(req->waiters, l); free(w); } } // TODO: When we have speculative preload, there may be no waiters, // so we need a flag or something else to make things still load. if ((!req->waiters) && (!req->processing)) { Eina_Inlist **reqlist = &requests[req->type].waiting; *reqlist = eina_inlist_remove(*reqlist, EINA_INLIST_GET(req)); // TODO: If the request is being processed, it can't be deleted. Must // be marked as delete_me instead. req->funcs->msg_free(req->msg, req->data); if (req->dependency) req->dependency->dependents = eina_list_remove( req->dependency->dependents, req); _request_dependents_cancel(req, err); free(req); } else if (!req->waiters) req->cancelled = EINA_TRUE; } void cserve2_request_cancel_all(Slave_Request *req, Error_Type err) { Waiter *w; DBG("Removing all answers."); if (req->funcs && req->funcs->error) req->funcs->error(req->data, err); EINA_LIST_FREE(req->waiters, w) { DBG("Removing answer from waiter client: %d, rid: %d", w->client->id, w->rid); cserve2_client_error_send(w->client, w->rid, err); free(w); } _request_dependents_cancel(req, err); if (req->processing) { req->cancelled = EINA_TRUE; return; } if (req->dependency) req->dependency->dependents = eina_list_remove( req->dependency->dependents, req); requests[req->type].waiting = eina_inlist_remove( requests[req->type].waiting, EINA_INLIST_GET(req)); req->funcs->msg_free(req->msg, req->data); free(req); } void cserve2_requests_init(void) { DBG("Initializing requests."); requests = calloc(CSERVE2_REQ_LAST, sizeof(*requests)); } void cserve2_requests_shutdown(void) { DBG("Shutting down requests."); free(requests); } static void _cserve2_request_failed(Slave_Request *req, Error_Type type) { Waiter *w; req->funcs->error(req->data, type); EINA_LIST_FREE(req->waiters, w) { cserve2_client_error_send(w->client, w->rid, type); free(w); } req->funcs->msg_free(req->msg, req->data); requests[req->type].processing = eina_inlist_remove( requests[req->type].processing, EINA_INLIST_GET(req)); _request_dependents_cancel(req, type); free(req); } static void _slave_read_cb(Slave *s __UNUSED__, Slave_Command cmd, void *msg, void *data) { Slave_Worker *sw = data; Slave_Request *dep, *req = sw->data; Eina_List **working, **idle; Waiter *w; Msg_Base *resp = NULL; int resp_size; if (req->cancelled) goto free_it; if (cmd == ERROR) { Error_Type *err = msg; WRN("Received error %d from slave, for request type %d.", *err, req->type); req->funcs->error(req->data, *err); } else { DBG("Received response from slave for message type %d.", req->type); resp = req->funcs->response(req->data, msg, &resp_size); } EINA_LIST_FREE(req->waiters, w) { if (cmd == ERROR) { Error_Type *err = msg; cserve2_client_error_send(w->client, w->rid, *err); } else { resp->rid = w->rid; cserve2_client_send(w->client, &resp_size, sizeof(resp_size)); cserve2_client_send(w->client, resp, resp_size); } free(w); } free(resp); free_it: req->funcs->msg_free(req->msg, req->data); // FIXME: We shouldn't free this message directly, it must be freed by a // callback. free(msg); requests[req->type].processing = eina_inlist_remove( requests[req->type].processing, EINA_INLIST_GET(req)); EINA_LIST_FREE(req->dependents, dep) { dep->locked = EINA_FALSE; dep->dependency = NULL; } free(req); sw->data = NULL; working = &_workers[sw->type].working; idle = &_workers[sw->type].idle; *working = eina_list_remove(*working, sw); *idle = eina_list_append(*idle, sw); _cserve2_requests_process(); } static void _slave_dead_cb(Slave *s __UNUSED__, void *data) { Slave_Worker *sw = data; Slave_Request *req = sw->data; Eina_List **working = &_workers[sw->type].working; if (req) _cserve2_request_failed(req, CSERVE2_LOADER_DIED); *working = eina_list_remove(*working, sw); free(sw); } static Slave * _create_image_slave(void *data) { char *exe; Slave *slave; exe = getenv("EVAS_CSERVE2_SLAVE"); if (!exe) exe = "evas_cserve2_slave"; slave = cserve2_slave_run(exe, _slave_read_cb, _slave_dead_cb, data); return slave; } static Slave * _create_font_slave(void *data) { Slave *slave; slave = cserve2_slave_thread_run(cserve2_font_slave_cb, NULL, _slave_read_cb, _slave_dead_cb, data); return slave; } static Slave_Worker * _slave_for_request_create(Slave_Type type) { Slave_Worker *sw; Slave *slave; sw = calloc(1, sizeof(Slave_Worker)); if (!sw) return NULL; slave = _workers[type].create_slave(sw); if (!slave) { ERR("Could not launch slave process"); free(sw); return NULL; } sw->slave = slave; sw->type = type; _workers[type].idle = eina_list_append(_workers[type].idle, sw); return sw; } static Eina_Bool _cserve2_request_dispatch(Slave_Worker *sw, Slave_Command ctype, Slave_Request *req) { int size; char *slave_msg = req->funcs->msg_create(req->data, &size); DBG("dispatching message of type %d to slave.", req->type); if (!slave_msg) { ERR("Could not create slave message for request type %d.", req->type); return EINA_FALSE; } req->msg = slave_msg; sw->data = req; cserve2_slave_send(sw->slave, ctype, slave_msg, size); req->processing = EINA_TRUE; return EINA_TRUE; } static void _cserve2_requests_process(void) { unsigned int rtype, j; for (rtype = 0; rtype < CSERVE2_REQ_LAST; rtype++) { Slave_Type type = SLAVE_NONE; Slave_Command ctype; unsigned int max_workers; Eina_List **idle, **working; Eina_Inlist *itr; Slave_Request *req; for (j = 0; _request_match[j].rtype != CSERVE2_REQ_LAST; j++) { if (_request_match[j].rtype == rtype) { type = _request_match[j].stype; ctype = _request_match[j].ctype; break; } } if (type == SLAVE_NONE) continue; if (!requests[rtype].waiting) continue; /* Now we have the worker type to use (image or font), and the list * of requests to process. Just process as many requests as we can. */ max_workers = _workers[type].max; idle = &_workers[type].idle; working = &_workers[type].working; EINA_INLIST_FOREACH_SAFE(requests[rtype].waiting, itr, req) { Slave_Worker *sw; if (eina_list_count(*working) >= (max_workers - _request_match[j].require_spares)) break; if (req->locked) continue; requests[rtype].waiting = eina_inlist_remove( requests[rtype].waiting, EINA_INLIST_GET(req)); requests[rtype].processing = eina_inlist_append( requests[rtype].processing, EINA_INLIST_GET(req)); if (!(*idle)) sw = _slave_for_request_create(type); if (!(*idle)) { ERR("No idle slave available to process request type %d.", rtype); _cserve2_request_failed(req, CSERVE2_GENERIC); continue; } sw = eina_list_data_get(*idle); if (!_cserve2_request_dispatch(sw, ctype, req)) { ERR("Could not dispatch request."); _cserve2_request_failed(req, CSERVE2_GENERIC); continue; } *idle = eina_list_remove_list(*idle, *idle); *working = eina_list_append(*working, sw); } } } evas-1.7.9/src/bin/evas_cserve2_messages.c0000664000175000017500000001077512175475547015425 00000000000000#ifdef HAVE_CONFIG_H # include "config.h" #endif #include #include #include "evas_cserve2.h" // #define DEBUG_MSG 1 static void debug_msg(const char *typestr, const void *buf, int size) { #ifdef DEBUG_MSG const char *str = buf; int i; printf("message %s: ", typestr); for (i = 0; i < size; i++) printf("%x ", str[i]); printf("\n"); #else (void)typestr; (void)buf; (void)size; #endif } static void _client_msg_allocate_buf(Client *client, int msgsize) { client->msg.reading = EINA_TRUE; client->msg.buf = malloc(msgsize + 1); client->msg.size = msgsize; client->msg.done = 0; } static void _client_msg_free(Client *client) { client->msg.reading = EINA_FALSE; free(client->msg.buf); } static void _client_msg_parse(Client *client) { Msg_Base *msg = (Msg_Base *)client->msg.buf; DBG("Message received. Size: %d; type = %d", client->msg.size, msg->type); cserve2_command_run(client, msg->type); } static void _client_msg_read(Client *client, int done) { client->msg.done += done; if (client->msg.done == client->msg.size) { debug_msg("received", client->msg.buf, client->msg.size); _client_msg_parse(client); _client_msg_free(client); } } void cserve2_message_handler(int fd __UNUSED__, Fd_Flags flags, void *data) { Client *client = data; int len; int msgsize; if (flags & FD_ERROR) { ERR("Error on socket for client: %d", client->id); goto client_close; } if (flags & FD_WRITE) cserve2_client_deliver(client); if (!(flags & FD_READ)) return; if (!client->msg.reading) len = cserve2_client_read(client, &msgsize, sizeof(msgsize)); else len = cserve2_client_read(client, &client->msg.buf[client->msg.done], client->msg.size - client->msg.done); if (!len) { INF("Client %d connection closed.", client->id); goto client_close; } if (len < 0) { if (errno == EAGAIN || errno == EWOULDBLOCK) { WRN("No data to read but the message handler was called."); return; } WRN("Error when reading message from client: \"%s\"", strerror(errno)); // FIXME: Should we close the connection, or just send an ERROR // message? goto client_close; } if (!client->msg.reading) _client_msg_allocate_buf(client, msgsize); else _client_msg_read(client, len); return; client_close: if (client->msg.reading) _client_msg_free(client); cserve2_client_del(client); } void cserve2_client_deliver(Client *client) { size_t sent, size; const char *str; if (!client->msg.pending) { Fd_Flags cur_flags; cserve2_fd_watch_flags_get(client->socket, &cur_flags); cur_flags ^= FD_WRITE; cserve2_fd_watch_flags_set(client->socket, cur_flags); return; } size = eina_binbuf_length_get(client->msg.pending); str = (const char *)eina_binbuf_string_get(client->msg.pending); sent = cserve2_client_write(client, str, size); if (sent == size) { eina_binbuf_free(client->msg.pending); client->msg.pending = NULL; return; } eina_binbuf_remove(client->msg.pending, 0, sent); } ssize_t cserve2_client_send(Client *client, const void *data, size_t size) { ssize_t sent; debug_msg("sent", data, size); if (client->msg.pending) { eina_binbuf_append_length (client->msg.pending, (unsigned char *)data, size); return size; } sent = cserve2_client_write(client, data, size); if ((sent < 0) && ((errno != EAGAIN) && (errno != EWOULDBLOCK))) { // FIXME: Big error when writing on the socket to the client, // so we must close the connection to the client and remove // its references inside our cache. WRN("Error on socket with client %d: %s", client->id, strerror(errno)); if (client->msg.reading) _client_msg_free(client); cserve2_client_del(client); return sent; } if (sent < 0) sent = 0; if (sent < (int)size) { Fd_Flags cur_flags; client->msg.pending = eina_binbuf_new(); eina_binbuf_append_length (client->msg.pending, (unsigned char *)data + sent, size - sent); cserve2_fd_watch_flags_get(client->socket, &cur_flags); cur_flags |= FD_WRITE; cserve2_fd_watch_flags_set(client->socket, cur_flags); } return size; } evas-1.7.9/src/bin/evas_cserve_tool.c0000664000175000017500000001413112175475547014477 00000000000000#ifdef HAVE_CONFIG_H # include "config.h" #endif #include "evas_cs.h" int _cserve_tool_log_dom = -1; int main(int argc, char **argv) { int i; evas_init(); if (!evas_cserve_init()) { printf("ERROR: Cannot connect to cserve. abort\n"); exit(-1); } for (i = 1; i < argc; i++) { if ((!strcmp(argv[i], "-h")) || (!strcmp(argv[i], "-help")) || (!strcmp(argv[i], "--help"))) { printf("Options:\n" "\t-h This help\n" "\tgetconfig Get configuration values\n" "\tsetconfig CSIZE CTIME CTIMECHECK Set the config values\n" "\tgetstats Get current cache statistics\n" "\tgetinfo Get current cache content info\n" ); exit(0); } else if ((!strcmp(argv[i], "getconfig"))) { Op_Getconfig_Reply config; if (!evas_cserve_raw_config_get(&config)) { printf("ERROR: cannot fetch config.\n"); exit(-1); } printf("-REPLY-\n"); printf("csize: %i\n", config.cache_max_usage); printf("ctime: %i\n", config.cache_item_timeout); printf("ctimecheck: %i\n", config.cache_item_timeout_check); printf("-OK-\n"); } else if ((!strcmp(argv[i], "setconfig")) && (i < (argc - 3))) { Op_Setconfig config; i++; config.cache_max_usage = atoi(argv[i]); i++; config.cache_item_timeout = atoi(argv[i]); i++; config.cache_item_timeout_check = atoi(argv[i]); if (!evas_cserve_raw_config_set(&config)) { printf("ERROR: cannot set config.\n"); exit(-1); } } else if ((!strcmp(argv[i], "getstats"))) { Op_Getstats_Reply stats; if (!evas_cserve_raw_stats_get(&stats)) { printf("ERROR: cannot fetch stats.\n"); exit(-1); } printf("-REPLY-\n"); printf("saved_memory: %i Kb\n", stats.saved_memory / 1024); printf("wasted_memory: %i Kb\n", stats.wasted_memory / 1024); printf("saved_memory_peak: %i Kb\n", stats.saved_memory_peak / 1024); printf("wasted_memory_peak: %i Kb\n", stats.wasted_memory_peak / 1024); printf("saved_time_image_header_load: %1.3f sec\n", stats.saved_time_image_header_load); printf("saved_time_image_data_load: %1.3f sec\n", stats.saved_time_image_data_load); printf("-OK-\n"); } else if ((!strcmp(argv[i], "getinfo"))) { Op_Getinfo_Reply *info; unsigned char *p; int h, j; info = evas_cserve_raw_info_get(); if (!info) { printf("ERROR: cannot fetch info.\n"); exit(-1); } j = info->active.count + info->cached.count; printf("-REPLY-\n"); printf("active_count: %i\n", info->active.count); printf("active_memory: %i Kb\n", info->active.mem_total); printf("cache_count: %i\n", info->cached.count); printf("cache_memory: %i Kb\n", info->cached.mem_total); p = (unsigned char *)info; p += sizeof(Op_Getinfo_Reply); for (h = 0; h < j; h++) { Op_Getinfo_Item it; char *file, *key, buf[512]; struct tm *ltm; memcpy(&it, p, sizeof(Op_Getinfo_Item)); file = (char*) (p + sizeof(Op_Getinfo_Item)); key = file + strlen(file) + 1; printf("-IMAGE- [#%i]\n", h); printf(" file : %s\n", file); printf(" key : %s\n", key); printf(" size : %i x %i\n", it.w, it.h); printf(" active : %i\n", (int)it.active); printf(" memory used: %i bytes (%i Kb)\n", it.memory_footprint, (it.memory_footprint + 1023) / 1024); printf(" has alpha : %i\n", (int)it.alpha); printf(" data loaded: %i\n", (int)it.data_loaded); printf(" dead : %i\n", (int)it.dead); printf(" useless : %i\n", (int)it.useless); printf(" image refs : %i\n", it.refcount); printf(" data refs : %i\n", it.data_refcount); printf(" header load: %1.5f sec\n", it.head_load_time); printf(" data load : %1.5f sec\n", it.data_load_time); if (it.cached_time == 0) printf(" cached at : N/A\n"); else { ltm = localtime(&(it.cached_time)); if (ltm) { strftime(buf, sizeof(buf), "%Y.%m.%d %T", ltm); printf(" cached at : %s\n", buf); } } ltm = localtime(&(it.file_mod_time)); if (ltm) { strftime(buf, sizeof(buf), "%Y.%m.%d %T", ltm); printf(" file mod at: %s\n", buf); } ltm = localtime(&(it.file_checked_time)); if (ltm) { strftime(buf, sizeof(buf), "%Y.%m.%d %T", ltm); printf(" file check : %s\n", buf); } p += sizeof(Op_Getinfo_Item) + it.file_key_size; } free(info); printf("-OK-\n"); } } evas_cserve_shutdown(); evas_shutdown(); return 0; } evas-1.7.9/src/bin/loaders/0000775000175000017500000000000012234557317012472 500000000000000evas-1.7.9/src/bin/loaders/tiff/0000775000175000017500000000000012234557316013421 500000000000000evas-1.7.9/src/bin/loaders/tiff/Makefile.in0000664000175000017500000007215212234557301015407 00000000000000# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/bin/loaders/tiff DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/efl_attribute.m4 \ $(top_srcdir)/m4/efl_coverage.m4 \ $(top_srcdir)/m4/efl_doxygen.m4 \ $(top_srcdir)/m4/efl_fnmatch.m4 \ $(top_srcdir)/m4/efl_path_max.m4 \ $(top_srcdir)/m4/efl_shm_open.m4 $(top_srcdir)/m4/efl_tests.m4 \ $(top_srcdir)/m4/evas_check_engine.m4 \ $(top_srcdir)/m4/evas_check_loader.m4 \ $(top_srcdir)/m4/evas_converter.m4 \ $(top_srcdir)/m4/evas_dither.m4 \ $(top_srcdir)/m4/evas_scaler.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(pkgdir)" LTLIBRARIES = $(pkg_LTLIBRARIES) module_la_DEPENDENCIES = am__module_la_SOURCES_DIST = evas_image_load_tiff.c @BUILD_LOADER_TIFF_TRUE@am_module_la_OBJECTS = \ @BUILD_LOADER_TIFF_TRUE@ module_la-evas_image_load_tiff.lo module_la_OBJECTS = $(am_module_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = module_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(AM_CFLAGS) $(CFLAGS) $(module_la_LDFLAGS) $(LDFLAGS) -o $@ @BUILD_LOADER_TIFF_TRUE@am_module_la_rpath = -rpath $(pkgdir) AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(module_la_SOURCES) DIST_SOURCES = $(am__module_la_SOURCES_DIST) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHECK_CFLAGS = @CHECK_CFLAGS@ CHECK_LIBS = @CHECK_LIBS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@ DIRECTFB_LIBS = @DIRECTFB_LIBS@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ ECORE_EVAS_CFLAGS = @ECORE_EVAS_CFLAGS@ ECORE_EVAS_LIBS = @ECORE_EVAS_LIBS@ EDB_CFLAGS = @EDB_CFLAGS@ EDB_LIBS = @EDB_LIBS@ EDJE_CFLAGS = @EDJE_CFLAGS@ EDJE_LIBS = @EDJE_LIBS@ EET_CFLAGS = @EET_CFLAGS@ EET_LIBS = @EET_LIBS@ EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@ EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@ EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@ EFL_SHM_OPEN_LIBS = @EFL_SHM_OPEN_LIBS@ EGREP = @EGREP@ EINA_CFLAGS = @EINA_CFLAGS@ EINA_LIBS = @EINA_LIBS@ EVAS_CFLAGS = @EVAS_CFLAGS@ EVAS_GENERAL_CFLAGS = @EVAS_GENERAL_CFLAGS@ EVAS_GENERAL_LIBS = @EVAS_GENERAL_LIBS@ EVAS_LIBS = @EVAS_LIBS@ EVAS_SSE3_CFLAGS = @EVAS_SSE3_CFLAGS@ EVIL_CFLAGS = @EVIL_CFLAGS@ EVIL_LIBS = @EVIL_LIBS@ EXEEXT = @EXEEXT@ EXOTIC_CFLAGS = @EXOTIC_CFLAGS@ EXOTIC_LIBS = @EXOTIC_LIBS@ FGREP = @FGREP@ FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@ FONTCONFIG_LIBS = @FONTCONFIG_LIBS@ FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ FREETYPE_LIBS = @FREETYPE_LIBS@ FRIBIDI_CFLAGS = @FRIBIDI_CFLAGS@ FRIBIDI_LIBS = @FRIBIDI_LIBS@ GL_EET_CFLAGS = @GL_EET_CFLAGS@ GL_EET_LIBS = @GL_EET_LIBS@ GREP = @GREP@ HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@ HARFBUZZ_LIBS = @HARFBUZZ_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LINEBREAK_CFLAGS = @LINEBREAK_CFLAGS@ LINEBREAK_LIBS = @LINEBREAK_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MODULE_ARCH = @MODULE_ARCH@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ SDL_CFLAGS = @SDL_CFLAGS@ SDL_LIBS = @SDL_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ SVG_CFLAGS = @SVG_CFLAGS@ SVG_LIBS = @SVG_LIBS@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ XCB_CFLAGS = @XCB_CFLAGS@ XCB_GL_CFLAGS = @XCB_GL_CFLAGS@ XCB_GL_LIBS = @XCB_GL_LIBS@ XCB_LIBS = @XCB_LIBS@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_ct_OBJC = @ac_ct_OBJC@ altivec_cflags = @altivec_cflags@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ dlopen_libs = @dlopen_libs@ docdir = @docdir@ dvidir = @dvidir@ edje_cc = @edje_cc@ efl_doxygen = @efl_doxygen@ efl_have_doxygen = @efl_have_doxygen@ evas_engine_buffer_cflags = @evas_engine_buffer_cflags@ evas_engine_buffer_libs = @evas_engine_buffer_libs@ evas_engine_direct3d_cflags = @evas_engine_direct3d_cflags@ evas_engine_direct3d_libs = @evas_engine_direct3d_libs@ evas_engine_directfb_cflags = @evas_engine_directfb_cflags@ evas_engine_directfb_libs = @evas_engine_directfb_libs@ evas_engine_fb_cflags = @evas_engine_fb_cflags@ evas_engine_fb_libs = @evas_engine_fb_libs@ evas_engine_gl_cocoa_cflags = @evas_engine_gl_cocoa_cflags@ evas_engine_gl_cocoa_libs = @evas_engine_gl_cocoa_libs@ evas_engine_gl_common_libs = @evas_engine_gl_common_libs@ evas_engine_gl_sdl_cflags = @evas_engine_gl_sdl_cflags@ evas_engine_gl_sdl_libs = @evas_engine_gl_sdl_libs@ evas_engine_gl_xcb_cflags = @evas_engine_gl_xcb_cflags@ evas_engine_gl_xcb_libs = @evas_engine_gl_xcb_libs@ evas_engine_gl_xlib_cflags = @evas_engine_gl_xlib_cflags@ evas_engine_gl_xlib_libs = @evas_engine_gl_xlib_libs@ evas_engine_psl1ght_cflags = @evas_engine_psl1ght_cflags@ evas_engine_psl1ght_libs = @evas_engine_psl1ght_libs@ evas_engine_software_16_sdl_cflags = @evas_engine_software_16_sdl_cflags@ evas_engine_software_16_sdl_libs = @evas_engine_software_16_sdl_libs@ evas_engine_software_16_wince_cflags = @evas_engine_software_16_wince_cflags@ evas_engine_software_16_wince_libs = @evas_engine_software_16_wince_libs@ evas_engine_software_16_x11_cflags = @evas_engine_software_16_x11_cflags@ evas_engine_software_16_x11_libs = @evas_engine_software_16_x11_libs@ evas_engine_software_8_x11_cflags = @evas_engine_software_8_x11_cflags@ evas_engine_software_8_x11_libs = @evas_engine_software_8_x11_libs@ evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@ evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@ evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@ evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ evas_image_loader_edb_libs = @evas_image_loader_edb_libs@ evas_image_loader_eet_cflags = @evas_image_loader_eet_cflags@ evas_image_loader_eet_libs = @evas_image_loader_eet_libs@ evas_image_loader_generic_cflags = @evas_image_loader_generic_cflags@ evas_image_loader_generic_libs = @evas_image_loader_generic_libs@ evas_image_loader_gif_cflags = @evas_image_loader_gif_cflags@ evas_image_loader_gif_libs = @evas_image_loader_gif_libs@ evas_image_loader_ico_cflags = @evas_image_loader_ico_cflags@ evas_image_loader_ico_libs = @evas_image_loader_ico_libs@ evas_image_loader_jpeg_cflags = @evas_image_loader_jpeg_cflags@ evas_image_loader_jpeg_libs = @evas_image_loader_jpeg_libs@ evas_image_loader_pmaps_cflags = @evas_image_loader_pmaps_cflags@ evas_image_loader_pmaps_libs = @evas_image_loader_pmaps_libs@ evas_image_loader_png_cflags = @evas_image_loader_png_cflags@ evas_image_loader_png_libs = @evas_image_loader_png_libs@ evas_image_loader_psd_cflags = @evas_image_loader_psd_cflags@ evas_image_loader_psd_libs = @evas_image_loader_psd_libs@ evas_image_loader_svg_cflags = @evas_image_loader_svg_cflags@ evas_image_loader_svg_libs = @evas_image_loader_svg_libs@ evas_image_loader_tga_cflags = @evas_image_loader_tga_cflags@ evas_image_loader_tga_libs = @evas_image_loader_tga_libs@ evas_image_loader_tiff_cflags = @evas_image_loader_tiff_cflags@ evas_image_loader_tiff_libs = @evas_image_loader_tiff_libs@ evas_image_loader_wbmp_cflags = @evas_image_loader_wbmp_cflags@ evas_image_loader_wbmp_libs = @evas_image_loader_wbmp_libs@ evas_image_loader_xpm_cflags = @evas_image_loader_xpm_cflags@ evas_image_loader_xpm_libs = @evas_image_loader_xpm_libs@ exec_prefix = @exec_prefix@ have_evas_engine_gl_x11 = @have_evas_engine_gl_x11@ have_evas_engine_gl_xcb = @have_evas_engine_gl_xcb@ have_evas_engine_gl_xlib = @have_evas_engine_gl_xlib@ have_evas_engine_software_x11 = @have_evas_engine_software_x11@ have_evas_engine_software_xcb = @have_evas_engine_software_xcb@ have_evas_engine_software_xlib = @have_evas_engine_software_xlib@ have_lcov = @have_lcov@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_enable_auto_import = @lt_enable_auto_import@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgconfig_requires_private = @pkgconfig_requires_private@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pthread_cflags = @pthread_cflags@ pthread_libs = @pthread_libs@ release_info = @release_info@ requirement_evas = @requirement_evas@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ shm_open_libs = @shm_open_libs@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ version_info = @version_info@ MAINTAINERCLEANFILES = Makefile.in AM_CPPFLAGS = \ -I. \ -I$(top_srcdir)/src/lib \ -I$(top_srcdir)/src/lib/include \ -I$(top_srcdir)/src/lib/cserve2 \ -I$(top_srcdir)/src/bin \ @EVAS_GENERAL_CFLAGS@ \ @evas_image_loader_tiff_cflags@ \ @EVIL_CFLAGS@ #if !EVAS_STATIC_BUILD_TIFF @BUILD_LOADER_TIFF_TRUE@pkgdir = $(libdir)/evas/cserve2/loaders/tiff/$(MODULE_ARCH) @BUILD_LOADER_TIFF_TRUE@pkg_LTLIBRARIES = module.la @BUILD_LOADER_TIFF_TRUE@module_la_SOURCES = evas_image_load_tiff.c @BUILD_LOADER_TIFF_TRUE@module_la_LIBADD = @EVAS_GENERAL_LIBS@ @EVIL_LIBS@ @evas_image_loader_tiff_libs@ @BUILD_LOADER_TIFF_TRUE@module_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -module -avoid-version @BUILD_LOADER_TIFF_TRUE@module_la_LIBTOOLFLAGS = --tag=disable-static all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/bin/loaders/tiff/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/bin/loaders/tiff/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-pkgLTLIBRARIES: $(pkg_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(pkg_LTLIBRARIES)'; test -n "$(pkgdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(pkgdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(pkgdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkgdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkgdir)"; \ } uninstall-pkgLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(pkg_LTLIBRARIES)'; test -n "$(pkgdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkgdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkgdir)/$$f"; \ done clean-pkgLTLIBRARIES: -test -z "$(pkg_LTLIBRARIES)" || rm -f $(pkg_LTLIBRARIES) @list='$(pkg_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } module.la: $(module_la_OBJECTS) $(module_la_DEPENDENCIES) $(EXTRA_module_la_DEPENDENCIES) $(AM_V_CCLD)$(module_la_LINK) $(am_module_la_rpath) $(module_la_OBJECTS) $(module_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/module_la-evas_image_load_tiff.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< module_la-evas_image_load_tiff.lo: evas_image_load_tiff.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT module_la-evas_image_load_tiff.lo -MD -MP -MF $(DEPDIR)/module_la-evas_image_load_tiff.Tpo -c -o module_la-evas_image_load_tiff.lo `test -f 'evas_image_load_tiff.c' || echo '$(srcdir)/'`evas_image_load_tiff.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/module_la-evas_image_load_tiff.Tpo $(DEPDIR)/module_la-evas_image_load_tiff.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='evas_image_load_tiff.c' object='module_la-evas_image_load_tiff.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o module_la-evas_image_load_tiff.lo `test -f 'evas_image_load_tiff.c' || echo '$(srcdir)/'`evas_image_load_tiff.c mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: for dir in "$(DESTDIR)$(pkgdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool clean-pkgLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-pkgLTLIBRARIES install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-pkgLTLIBRARIES .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-libtool clean-pkgLTLIBRARIES cscopelist-am ctags \ ctags-am distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-pkgLTLIBRARIES install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am uninstall-pkgLTLIBRARIES #else #noinst_LTLIBRARIES = libevas_loader_tiff.la #libevas_loader_tiff_la_SOURCES = evas_image_load_tiff.c #libevas_loader_tiff_la_LIBADD = @evas_image_loader_tiff_libs@ #endif # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: evas-1.7.9/src/bin/loaders/tiff/evas_image_load_tiff.c0000664000175000017500000001574412175475547017640 00000000000000#ifdef HAVE_CONFIG_H # include #endif #include #include #include #include #ifdef HAVE_EVIL # include #endif #include "evas_macros.h" #include "evas_cserve2.h" #include "evas_cserve2_slave.h" typedef struct TIFFRGBAImage_Extra TIFFRGBAImage_Extra; struct TIFFRGBAImage_Extra { TIFFRGBAImage rgba; char pper; uint32 num_pixels; uint32 py; }; static Eina_Bool evas_image_load_file_head_tiff(Evas_Img_Load_Params *ilp, const char *file, const char *key __UNUSED__, int *error) { char txt[1024]; TIFFRGBAImage tiff_image; TIFF *tif = NULL; FILE *ffile; int fd; uint16 magic_number; ffile = fopen(file, "rb"); if (!ffile) { *error = EVAS_LOAD_ERROR_DOES_NOT_EXIST; return EINA_FALSE; } if (fread(&magic_number, sizeof(uint16), 1, ffile) != 1) { fclose(ffile); *error = EVAS_LOAD_ERROR_UNKNOWN_FORMAT; return EINA_FALSE; } /* Apparently rewind(f) isn't sufficient */ fseek(ffile, 0, SEEK_SET); if ((magic_number != TIFF_BIGENDIAN) /* Checks if actually tiff file */ && (magic_number != TIFF_LITTLEENDIAN)) { fclose(ffile); *error = EVAS_LOAD_ERROR_UNKNOWN_FORMAT; return EINA_FALSE; } fd = fileno(ffile); fd = dup(fd); lseek(fd, (long)0, SEEK_SET); fclose(ffile); tif = TIFFFdOpen(fd, file, "r"); if (!tif) { *error = EVAS_LOAD_ERROR_CORRUPT_FILE; return EINA_FALSE; } strcpy(txt, "Evas Tiff loader: cannot be processed by libtiff"); if (!TIFFRGBAImageOK(tif, txt)) { TIFFClose(tif); *error = EVAS_LOAD_ERROR_CORRUPT_FILE; return EINA_FALSE; } strcpy(txt, "Evas Tiff loader: cannot begin reading tiff"); if (!TIFFRGBAImageBegin(& tiff_image, tif, 1, txt)) { TIFFClose(tif); *error = EVAS_LOAD_ERROR_CORRUPT_FILE; return EINA_FALSE; } if (tiff_image.alpha != EXTRASAMPLE_UNSPECIFIED) ilp->alpha = 1; if ((tiff_image.width < 1) || (tiff_image.height < 1) || (tiff_image.width > IMG_MAX_SIZE) || (tiff_image.height > IMG_MAX_SIZE) || IMG_TOO_BIG(tiff_image.width, tiff_image.height)) { TIFFClose(tif); if (IMG_TOO_BIG(tiff_image.width, tiff_image.height)) *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; else *error = EVAS_LOAD_ERROR_GENERIC; return EINA_FALSE; } ilp->w = tiff_image.width; ilp->h = tiff_image.height; TIFFRGBAImageEnd(&tiff_image); TIFFClose(tif); *error = EVAS_LOAD_ERROR_NONE; return EINA_TRUE; } static Eina_Bool evas_image_load_file_data_tiff(Evas_Img_Load_Params *ilp, const char *file, const char *key __UNUSED__, int *error) { char txt[1024]; TIFFRGBAImage_Extra rgba_image; TIFF *tif = NULL; FILE *ffile; uint32 *rast = NULL; uint32 num_pixels; int fd, x, y; uint16 magic_number; unsigned int *surface; ffile = fopen(file, "rb"); if (!ffile) { *error = EVAS_LOAD_ERROR_DOES_NOT_EXIST; return EINA_FALSE; } if (fread(&magic_number, sizeof(uint16), 1, ffile) != 1) { fclose(ffile); *error = EVAS_LOAD_ERROR_CORRUPT_FILE; return EINA_FALSE; } /* Apparently rewind(f) isn't sufficient */ fseek(ffile, (long)0, SEEK_SET); if ((magic_number != TIFF_BIGENDIAN) /* Checks if actually tiff file */ && (magic_number != TIFF_LITTLEENDIAN)) { fclose(ffile); *error = EVAS_LOAD_ERROR_CORRUPT_FILE; return EINA_FALSE; } fd = fileno(ffile); fd = dup(fd); lseek(fd, (long)0, SEEK_SET); fclose(ffile); tif = TIFFFdOpen(fd, file, "r"); if (!tif) { *error = EVAS_LOAD_ERROR_CORRUPT_FILE; return EINA_FALSE; } strcpy(txt, "Evas Tiff loader: cannot be processed by libtiff"); if (!TIFFRGBAImageOK(tif, txt)) { TIFFClose(tif); *error = EVAS_LOAD_ERROR_CORRUPT_FILE; return EINA_FALSE; } strcpy(txt, "Evas Tiff loader: cannot begin reading tiff"); if (!TIFFRGBAImageBegin((TIFFRGBAImage *) & rgba_image, tif, 0, txt)) { TIFFClose(tif); *error = EVAS_LOAD_ERROR_CORRUPT_FILE; return EINA_FALSE; } if (rgba_image.rgba.alpha != EXTRASAMPLE_UNSPECIFIED) ilp->alpha = 1; if ((rgba_image.rgba.width != ilp->w) || (rgba_image.rgba.height != ilp->h)) { TIFFClose(tif); *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; return EINA_FALSE; } surface = ilp->buffer; if (!surface) { TIFFRGBAImageEnd((TIFFRGBAImage *) & rgba_image); TIFFClose(tif); *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; return EINA_FALSE; } rgba_image.num_pixels = num_pixels = ilp->w * ilp->h; rgba_image.pper = rgba_image.py = 0; rast = (uint32 *) _TIFFmalloc(sizeof(uint32) * num_pixels); if (!rast) { ERR("Evas Tiff loader: out of memory"); TIFFRGBAImageEnd((TIFFRGBAImage *) & rgba_image); TIFFClose(tif); *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; return EINA_FALSE; } if (rgba_image.rgba.bitspersample == 8) { if (!TIFFRGBAImageGet((TIFFRGBAImage *) &rgba_image, rast, rgba_image.rgba.width, rgba_image.rgba.height)) { _TIFFfree(rast); TIFFRGBAImageEnd((TIFFRGBAImage *) & rgba_image); TIFFClose(tif); *error = EVAS_LOAD_ERROR_CORRUPT_FILE; return EINA_FALSE; } } /* process rast -> image rgba. really same as prior code anyway just simpler */ for (y = 0; y < (int)ilp->h; y++) { DATA32 *pix, *pd; uint32 *ps, pixel; unsigned int a, r, g, b; pix = surface; pd = pix + ((ilp->h - y - 1) * ilp->w); ps = rast + (y * ilp->w); for (x = 0; x < (int)ilp->w; x++) { pixel = *ps; a = TIFFGetA(pixel); r = TIFFGetR(pixel); g = TIFFGetG(pixel); b = TIFFGetB(pixel); if (!ilp->alpha) a = 255; if ((rgba_image.rgba.alpha == EXTRASAMPLE_UNASSALPHA) && (a < 255)) { r = (r * (a + 1)) >> 8; g = (g * (a + 1)) >> 8; b = (b * (a + 1)) >> 8; } *pd = ARGB_JOIN(a, r, g, b); ps++; pd++; } } _TIFFfree(rast); TIFFRGBAImageEnd((TIFFRGBAImage *) & rgba_image); TIFFClose(tif); evas_cserve2_image_alpha_sparse_set(ilp); *error = EVAS_LOAD_ERROR_NONE; return EINA_TRUE; } static Evas_Loader_Module_Api modapi = { EVAS_CSERVE2_MODULE_API_VERSION, "tiff", evas_image_load_file_head_tiff, evas_image_load_file_data_tiff }; static Eina_Bool module_init(void) { return evas_cserve2_loader_register(&modapi); } static void module_shutdown(void) { } EINA_MODULE_INIT(module_init); EINA_MODULE_SHUTDOWN(module_shutdown); evas-1.7.9/src/bin/loaders/tiff/Makefile.am0000664000175000017500000000147712175475547015417 00000000000000 MAINTAINERCLEANFILES = Makefile.in AM_CPPFLAGS = \ -I. \ -I$(top_srcdir)/src/lib \ -I$(top_srcdir)/src/lib/include \ -I$(top_srcdir)/src/lib/cserve2 \ -I$(top_srcdir)/src/bin \ @EVAS_GENERAL_CFLAGS@ \ @evas_image_loader_tiff_cflags@ \ @EVIL_CFLAGS@ if BUILD_LOADER_TIFF #if !EVAS_STATIC_BUILD_TIFF pkgdir = $(libdir)/evas/cserve2/loaders/tiff/$(MODULE_ARCH) pkg_LTLIBRARIES = module.la module_la_SOURCES = evas_image_load_tiff.c module_la_LIBADD = @EVAS_GENERAL_LIBS@ @EVIL_LIBS@ @evas_image_loader_tiff_libs@ module_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -module -avoid-version module_la_LIBTOOLFLAGS = --tag=disable-static #else #noinst_LTLIBRARIES = libevas_loader_tiff.la #libevas_loader_tiff_la_SOURCES = evas_image_load_tiff.c #libevas_loader_tiff_la_LIBADD = @evas_image_loader_tiff_libs@ #endif endif evas-1.7.9/src/bin/loaders/png/0000775000175000017500000000000012234557316013255 500000000000000evas-1.7.9/src/bin/loaders/png/Makefile.in0000664000175000017500000007210212234557301015236 00000000000000# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/bin/loaders/png DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/efl_attribute.m4 \ $(top_srcdir)/m4/efl_coverage.m4 \ $(top_srcdir)/m4/efl_doxygen.m4 \ $(top_srcdir)/m4/efl_fnmatch.m4 \ $(top_srcdir)/m4/efl_path_max.m4 \ $(top_srcdir)/m4/efl_shm_open.m4 $(top_srcdir)/m4/efl_tests.m4 \ $(top_srcdir)/m4/evas_check_engine.m4 \ $(top_srcdir)/m4/evas_check_loader.m4 \ $(top_srcdir)/m4/evas_converter.m4 \ $(top_srcdir)/m4/evas_dither.m4 \ $(top_srcdir)/m4/evas_scaler.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(pkgdir)" LTLIBRARIES = $(pkg_LTLIBRARIES) module_la_DEPENDENCIES = am__module_la_SOURCES_DIST = evas_image_load_png.c @BUILD_LOADER_PNG_TRUE@am_module_la_OBJECTS = \ @BUILD_LOADER_PNG_TRUE@ module_la-evas_image_load_png.lo module_la_OBJECTS = $(am_module_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = module_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(AM_CFLAGS) $(CFLAGS) $(module_la_LDFLAGS) $(LDFLAGS) -o $@ @BUILD_LOADER_PNG_TRUE@am_module_la_rpath = -rpath $(pkgdir) AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(module_la_SOURCES) DIST_SOURCES = $(am__module_la_SOURCES_DIST) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHECK_CFLAGS = @CHECK_CFLAGS@ CHECK_LIBS = @CHECK_LIBS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@ DIRECTFB_LIBS = @DIRECTFB_LIBS@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ ECORE_EVAS_CFLAGS = @ECORE_EVAS_CFLAGS@ ECORE_EVAS_LIBS = @ECORE_EVAS_LIBS@ EDB_CFLAGS = @EDB_CFLAGS@ EDB_LIBS = @EDB_LIBS@ EDJE_CFLAGS = @EDJE_CFLAGS@ EDJE_LIBS = @EDJE_LIBS@ EET_CFLAGS = @EET_CFLAGS@ EET_LIBS = @EET_LIBS@ EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@ EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@ EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@ EFL_SHM_OPEN_LIBS = @EFL_SHM_OPEN_LIBS@ EGREP = @EGREP@ EINA_CFLAGS = @EINA_CFLAGS@ EINA_LIBS = @EINA_LIBS@ EVAS_CFLAGS = @EVAS_CFLAGS@ EVAS_GENERAL_CFLAGS = @EVAS_GENERAL_CFLAGS@ EVAS_GENERAL_LIBS = @EVAS_GENERAL_LIBS@ EVAS_LIBS = @EVAS_LIBS@ EVAS_SSE3_CFLAGS = @EVAS_SSE3_CFLAGS@ EVIL_CFLAGS = @EVIL_CFLAGS@ EVIL_LIBS = @EVIL_LIBS@ EXEEXT = @EXEEXT@ EXOTIC_CFLAGS = @EXOTIC_CFLAGS@ EXOTIC_LIBS = @EXOTIC_LIBS@ FGREP = @FGREP@ FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@ FONTCONFIG_LIBS = @FONTCONFIG_LIBS@ FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ FREETYPE_LIBS = @FREETYPE_LIBS@ FRIBIDI_CFLAGS = @FRIBIDI_CFLAGS@ FRIBIDI_LIBS = @FRIBIDI_LIBS@ GL_EET_CFLAGS = @GL_EET_CFLAGS@ GL_EET_LIBS = @GL_EET_LIBS@ GREP = @GREP@ HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@ HARFBUZZ_LIBS = @HARFBUZZ_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LINEBREAK_CFLAGS = @LINEBREAK_CFLAGS@ LINEBREAK_LIBS = @LINEBREAK_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MODULE_ARCH = @MODULE_ARCH@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ SDL_CFLAGS = @SDL_CFLAGS@ SDL_LIBS = @SDL_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ SVG_CFLAGS = @SVG_CFLAGS@ SVG_LIBS = @SVG_LIBS@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ XCB_CFLAGS = @XCB_CFLAGS@ XCB_GL_CFLAGS = @XCB_GL_CFLAGS@ XCB_GL_LIBS = @XCB_GL_LIBS@ XCB_LIBS = @XCB_LIBS@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_ct_OBJC = @ac_ct_OBJC@ altivec_cflags = @altivec_cflags@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ dlopen_libs = @dlopen_libs@ docdir = @docdir@ dvidir = @dvidir@ edje_cc = @edje_cc@ efl_doxygen = @efl_doxygen@ efl_have_doxygen = @efl_have_doxygen@ evas_engine_buffer_cflags = @evas_engine_buffer_cflags@ evas_engine_buffer_libs = @evas_engine_buffer_libs@ evas_engine_direct3d_cflags = @evas_engine_direct3d_cflags@ evas_engine_direct3d_libs = @evas_engine_direct3d_libs@ evas_engine_directfb_cflags = @evas_engine_directfb_cflags@ evas_engine_directfb_libs = @evas_engine_directfb_libs@ evas_engine_fb_cflags = @evas_engine_fb_cflags@ evas_engine_fb_libs = @evas_engine_fb_libs@ evas_engine_gl_cocoa_cflags = @evas_engine_gl_cocoa_cflags@ evas_engine_gl_cocoa_libs = @evas_engine_gl_cocoa_libs@ evas_engine_gl_common_libs = @evas_engine_gl_common_libs@ evas_engine_gl_sdl_cflags = @evas_engine_gl_sdl_cflags@ evas_engine_gl_sdl_libs = @evas_engine_gl_sdl_libs@ evas_engine_gl_xcb_cflags = @evas_engine_gl_xcb_cflags@ evas_engine_gl_xcb_libs = @evas_engine_gl_xcb_libs@ evas_engine_gl_xlib_cflags = @evas_engine_gl_xlib_cflags@ evas_engine_gl_xlib_libs = @evas_engine_gl_xlib_libs@ evas_engine_psl1ght_cflags = @evas_engine_psl1ght_cflags@ evas_engine_psl1ght_libs = @evas_engine_psl1ght_libs@ evas_engine_software_16_sdl_cflags = @evas_engine_software_16_sdl_cflags@ evas_engine_software_16_sdl_libs = @evas_engine_software_16_sdl_libs@ evas_engine_software_16_wince_cflags = @evas_engine_software_16_wince_cflags@ evas_engine_software_16_wince_libs = @evas_engine_software_16_wince_libs@ evas_engine_software_16_x11_cflags = @evas_engine_software_16_x11_cflags@ evas_engine_software_16_x11_libs = @evas_engine_software_16_x11_libs@ evas_engine_software_8_x11_cflags = @evas_engine_software_8_x11_cflags@ evas_engine_software_8_x11_libs = @evas_engine_software_8_x11_libs@ evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@ evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@ evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@ evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ evas_image_loader_edb_libs = @evas_image_loader_edb_libs@ evas_image_loader_eet_cflags = @evas_image_loader_eet_cflags@ evas_image_loader_eet_libs = @evas_image_loader_eet_libs@ evas_image_loader_generic_cflags = @evas_image_loader_generic_cflags@ evas_image_loader_generic_libs = @evas_image_loader_generic_libs@ evas_image_loader_gif_cflags = @evas_image_loader_gif_cflags@ evas_image_loader_gif_libs = @evas_image_loader_gif_libs@ evas_image_loader_ico_cflags = @evas_image_loader_ico_cflags@ evas_image_loader_ico_libs = @evas_image_loader_ico_libs@ evas_image_loader_jpeg_cflags = @evas_image_loader_jpeg_cflags@ evas_image_loader_jpeg_libs = @evas_image_loader_jpeg_libs@ evas_image_loader_pmaps_cflags = @evas_image_loader_pmaps_cflags@ evas_image_loader_pmaps_libs = @evas_image_loader_pmaps_libs@ evas_image_loader_png_cflags = @evas_image_loader_png_cflags@ evas_image_loader_png_libs = @evas_image_loader_png_libs@ evas_image_loader_psd_cflags = @evas_image_loader_psd_cflags@ evas_image_loader_psd_libs = @evas_image_loader_psd_libs@ evas_image_loader_svg_cflags = @evas_image_loader_svg_cflags@ evas_image_loader_svg_libs = @evas_image_loader_svg_libs@ evas_image_loader_tga_cflags = @evas_image_loader_tga_cflags@ evas_image_loader_tga_libs = @evas_image_loader_tga_libs@ evas_image_loader_tiff_cflags = @evas_image_loader_tiff_cflags@ evas_image_loader_tiff_libs = @evas_image_loader_tiff_libs@ evas_image_loader_wbmp_cflags = @evas_image_loader_wbmp_cflags@ evas_image_loader_wbmp_libs = @evas_image_loader_wbmp_libs@ evas_image_loader_xpm_cflags = @evas_image_loader_xpm_cflags@ evas_image_loader_xpm_libs = @evas_image_loader_xpm_libs@ exec_prefix = @exec_prefix@ have_evas_engine_gl_x11 = @have_evas_engine_gl_x11@ have_evas_engine_gl_xcb = @have_evas_engine_gl_xcb@ have_evas_engine_gl_xlib = @have_evas_engine_gl_xlib@ have_evas_engine_software_x11 = @have_evas_engine_software_x11@ have_evas_engine_software_xcb = @have_evas_engine_software_xcb@ have_evas_engine_software_xlib = @have_evas_engine_software_xlib@ have_lcov = @have_lcov@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_enable_auto_import = @lt_enable_auto_import@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgconfig_requires_private = @pkgconfig_requires_private@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pthread_cflags = @pthread_cflags@ pthread_libs = @pthread_libs@ release_info = @release_info@ requirement_evas = @requirement_evas@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ shm_open_libs = @shm_open_libs@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ version_info = @version_info@ MAINTAINERCLEANFILES = Makefile.in AM_CPPFLAGS = \ -I. \ -I$(top_srcdir)/src/lib \ -I$(top_srcdir)/src/lib/include \ -I$(top_srcdir)/src/lib/cserve2 \ -I$(top_srcdir)/src/bin \ @EVAS_GENERAL_CFLAGS@ \ @evas_image_loader_png_cflags@ \ @EVIL_CFLAGS@ #if !EVAS_STATIC_BUILD_PNG @BUILD_LOADER_PNG_TRUE@pkgdir = $(libdir)/evas/cserve2/loaders/png/$(MODULE_ARCH) @BUILD_LOADER_PNG_TRUE@pkg_LTLIBRARIES = module.la @BUILD_LOADER_PNG_TRUE@module_la_SOURCES = evas_image_load_png.c @BUILD_LOADER_PNG_TRUE@module_la_LIBADD = @EVAS_GENERAL_LIBS@ @evas_image_loader_png_libs@ @EVIL_LIBS@ @BUILD_LOADER_PNG_TRUE@module_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -module -avoid-version @BUILD_LOADER_PNG_TRUE@module_la_LIBTOOLFLAGS = --tag=disable-static all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/bin/loaders/png/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/bin/loaders/png/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-pkgLTLIBRARIES: $(pkg_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(pkg_LTLIBRARIES)'; test -n "$(pkgdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(pkgdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(pkgdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkgdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkgdir)"; \ } uninstall-pkgLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(pkg_LTLIBRARIES)'; test -n "$(pkgdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkgdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkgdir)/$$f"; \ done clean-pkgLTLIBRARIES: -test -z "$(pkg_LTLIBRARIES)" || rm -f $(pkg_LTLIBRARIES) @list='$(pkg_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } module.la: $(module_la_OBJECTS) $(module_la_DEPENDENCIES) $(EXTRA_module_la_DEPENDENCIES) $(AM_V_CCLD)$(module_la_LINK) $(am_module_la_rpath) $(module_la_OBJECTS) $(module_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/module_la-evas_image_load_png.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< module_la-evas_image_load_png.lo: evas_image_load_png.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT module_la-evas_image_load_png.lo -MD -MP -MF $(DEPDIR)/module_la-evas_image_load_png.Tpo -c -o module_la-evas_image_load_png.lo `test -f 'evas_image_load_png.c' || echo '$(srcdir)/'`evas_image_load_png.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/module_la-evas_image_load_png.Tpo $(DEPDIR)/module_la-evas_image_load_png.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='evas_image_load_png.c' object='module_la-evas_image_load_png.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o module_la-evas_image_load_png.lo `test -f 'evas_image_load_png.c' || echo '$(srcdir)/'`evas_image_load_png.c mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: for dir in "$(DESTDIR)$(pkgdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool clean-pkgLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-pkgLTLIBRARIES install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-pkgLTLIBRARIES .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-libtool clean-pkgLTLIBRARIES cscopelist-am ctags \ ctags-am distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-pkgLTLIBRARIES install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am uninstall-pkgLTLIBRARIES #else #noinst_LTLIBRARIES = libevas_loader_png.la #libevas_loader_png_la_SOURCES = evas_image_load_png.c #libevas_loader_png_la_LIBADD = @evas_image_loader_png_libs@ #endif # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: evas-1.7.9/src/bin/loaders/png/evas_image_load_png.c0000664000175000017500000002013112175475547017312 00000000000000#ifdef HAVE_CONFIG_H # include #endif #include #include #include #ifdef HAVE_EVIL # include #endif #ifdef _WIN32_WCE # define E_FOPEN(file, mode) evil_fopen_native((file), (mode)) # define E_FREAD(buffer, size, count, stream) evil_fread_native(buffer, size, count, stream) # define E_FCLOSE(stream) evil_fclose_native(stream) #else # define E_FOPEN(file, mode) fopen((file), (mode)) # define E_FREAD(buffer, size, count, stream) fread(buffer, size, count, stream) # define E_FCLOSE(stream) fclose(stream) #endif #include "evas_macros.h" #include "evas_cserve2.h" #include "evas_cserve2_slave.h" #define PNG_BYTES_TO_CHECK 4 static Eina_Bool evas_image_load_file_head_png(Evas_Img_Load_Params *ilp, const char *file, const char *key __UNUSED__, int *error) { png_uint_32 w32, h32; FILE *f; png_structp png_ptr = NULL; png_infop info_ptr = NULL; int bit_depth, color_type, interlace_type; unsigned char buf[PNG_BYTES_TO_CHECK]; char hasa; hasa = 0; f = E_FOPEN(file, "rb"); if (!f) { *error = CSERVE2_DOES_NOT_EXIST; return EINA_FALSE; } /* if we havent read the header before, set the header data */ if (E_FREAD(buf, PNG_BYTES_TO_CHECK, 1, f) != 1) { *error = CSERVE2_UNKNOWN_FORMAT; goto close_file; } if (png_sig_cmp(buf, 0, PNG_BYTES_TO_CHECK)) { *error = CSERVE2_UNKNOWN_FORMAT; goto close_file; } png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL); if (!png_ptr) { *error = CSERVE2_RESOURCE_ALLOCATION_FAILED; goto close_file; } info_ptr = png_create_info_struct(png_ptr); if (!info_ptr) { png_destroy_read_struct(&png_ptr, NULL, NULL); *error = CSERVE2_RESOURCE_ALLOCATION_FAILED; goto close_file; } if (setjmp(png_jmpbuf(png_ptr))) { png_destroy_read_struct(&png_ptr, &info_ptr, NULL); *error = CSERVE2_CORRUPT_FILE; goto close_file; } png_init_io(png_ptr, f); png_set_sig_bytes(png_ptr, PNG_BYTES_TO_CHECK); png_read_info(png_ptr, info_ptr); png_get_IHDR(png_ptr, info_ptr, (png_uint_32 *) (&w32), (png_uint_32 *) (&h32), &bit_depth, &color_type, &interlace_type, NULL, NULL); if ((w32 < 1) || (h32 < 1) || (w32 > IMG_MAX_SIZE) || (h32 > IMG_MAX_SIZE) || IMG_TOO_BIG(w32, h32)) { png_destroy_read_struct(&png_ptr, &info_ptr, NULL); if (IMG_TOO_BIG(w32, h32)) *error = CSERVE2_RESOURCE_ALLOCATION_FAILED; else *error = CSERVE2_GENERIC; goto close_file; } if (ilp->opts.scale_down_by > 1) { ilp->w = (int) w32 / ilp->opts.scale_down_by; ilp->h = (int) h32 / ilp->opts.scale_down_by; if ((ilp->w < 1) || (ilp->h < 1)) { *error = CSERVE2_GENERIC; goto close_file; } } else { ilp->w = (int) w32; ilp->h = (int) h32; } if (png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS)) hasa = 1; if (color_type == PNG_COLOR_TYPE_RGB_ALPHA) hasa = 1; if (color_type == PNG_COLOR_TYPE_GRAY_ALPHA) hasa = 1; if (hasa) ilp->alpha = 1; png_destroy_read_struct(&png_ptr, &info_ptr, NULL); E_FCLOSE(f); *error = CSERVE2_NONE; return EINA_TRUE; close_file: E_FCLOSE(f); return EINA_FALSE; } static Eina_Bool evas_image_load_file_data_png(Evas_Img_Load_Params *ilp, const char *file, const char *key __UNUSED__, int *error) { unsigned char *surface; png_uint_32 w32, h32; int w, h; FILE *f; png_structp png_ptr = NULL; png_infop info_ptr = NULL; int bit_depth, color_type, interlace_type; unsigned char buf[PNG_BYTES_TO_CHECK]; unsigned char **lines; char hasa; int i, j; int scale_ratio = 1, image_w = 0; unsigned char *tmp_line; DATA32 *src_ptr, *dst_ptr; hasa = 0; f = E_FOPEN(file, "rb"); if (!f) { *error = CSERVE2_DOES_NOT_EXIST; return EINA_FALSE; } /* if we havent read the header before, set the header data */ if (E_FREAD(buf, PNG_BYTES_TO_CHECK, 1, f) != 1) { *error = CSERVE2_CORRUPT_FILE; goto close_file; } if (png_sig_cmp(buf, 0, PNG_BYTES_TO_CHECK)) { *error = CSERVE2_CORRUPT_FILE; goto close_file; } png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL); if (!png_ptr) { *error = CSERVE2_RESOURCE_ALLOCATION_FAILED; goto close_file; } info_ptr = png_create_info_struct(png_ptr); if (!info_ptr) { png_destroy_read_struct(&png_ptr, NULL, NULL); *error = CSERVE2_RESOURCE_ALLOCATION_FAILED; goto close_file; } if (setjmp(png_jmpbuf(png_ptr))) { png_destroy_read_struct(&png_ptr, &info_ptr, NULL); *error = CSERVE2_CORRUPT_FILE; goto close_file; } png_init_io(png_ptr, f); png_set_sig_bytes(png_ptr, PNG_BYTES_TO_CHECK); png_read_info(png_ptr, info_ptr); png_get_IHDR(png_ptr, info_ptr, (png_uint_32 *) (&w32), (png_uint_32 *) (&h32), &bit_depth, &color_type, &interlace_type, NULL, NULL); image_w = w32; if (ilp->opts.scale_down_by > 1) { scale_ratio = ilp->opts.scale_down_by; w32 /= scale_ratio; h32 /= scale_ratio; } surface = (unsigned char *) ilp->buffer; if (!surface) { png_destroy_read_struct(&png_ptr, &info_ptr, NULL); *error = CSERVE2_RESOURCE_ALLOCATION_FAILED; goto close_file; } if ((w32 != ilp->w) || (h32 != ilp->h)) { png_destroy_read_struct(&png_ptr, &info_ptr, NULL); *error = CSERVE2_GENERIC; goto close_file; } if (png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS)) hasa = 1; if (color_type == PNG_COLOR_TYPE_RGB_ALPHA) hasa = 1; if (color_type == PNG_COLOR_TYPE_GRAY_ALPHA) hasa = 1; if (hasa) ilp->alpha = 1; /* Prep for transformations... ultimately we want ARGB */ /* expand palette -> RGB if necessary */ if (color_type == PNG_COLOR_TYPE_PALETTE) png_set_palette_to_rgb(png_ptr); /* expand gray (w/reduced bits) -> 8-bit RGB if necessary */ if ((color_type == PNG_COLOR_TYPE_GRAY) || (color_type == PNG_COLOR_TYPE_GRAY_ALPHA)) { png_set_gray_to_rgb(png_ptr); if (bit_depth < 8) png_set_expand_gray_1_2_4_to_8(png_ptr); } /* expand transparency entry -> alpha channel if present */ if (png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS)) png_set_tRNS_to_alpha(png_ptr); /* reduce 16bit color -> 8bit color if necessary */ if (bit_depth > 8) png_set_strip_16(png_ptr); /* pack all pixels to byte boundaries */ png_set_packing(png_ptr); w = ilp->w; h = ilp->h; /* we want ARGB */ #ifdef WORDS_BIGENDIAN png_set_swap_alpha(png_ptr); if (!hasa) png_set_filler(png_ptr, 0xff, PNG_FILLER_BEFORE); #else png_set_bgr(png_ptr); if (!hasa) png_set_filler(png_ptr, 0xff, PNG_FILLER_AFTER); #endif /* we read image line by line if scale down was set */ if (scale_ratio == 1) { lines = (unsigned char **) alloca(h * sizeof(unsigned char *)); for (i = 0; i < h; i++) lines[i] = surface + (i * w * sizeof(DATA32)); png_read_image(png_ptr, lines); png_read_end(png_ptr, info_ptr); } else { tmp_line = (unsigned char *) alloca(image_w * sizeof(DATA32)); dst_ptr = (DATA32 *)surface; for (i = 0; i < h; i++) { png_read_row(png_ptr, tmp_line, NULL); src_ptr = (DATA32 *)tmp_line; for (j = 0; j < w; j++) { *dst_ptr = *src_ptr; dst_ptr++; src_ptr += scale_ratio; } for (j = 0; j < (scale_ratio - 1); j++) { png_read_row(png_ptr, tmp_line, NULL); } } } png_destroy_read_struct(&png_ptr, &info_ptr, NULL); E_FCLOSE(f); evas_cserve2_image_premul(ilp); *error = CSERVE2_NONE; return EINA_TRUE; close_file: E_FCLOSE(f); return EINA_FALSE; } static Evas_Loader_Module_Api modapi = { EVAS_CSERVE2_MODULE_API_VERSION, "png", evas_image_load_file_head_png, evas_image_load_file_data_png }; static Eina_Bool module_init(void) { return evas_cserve2_loader_register(&modapi); } static void module_shutdown(void) { } EINA_MODULE_INIT(module_init); EINA_MODULE_SHUTDOWN(module_shutdown); evas-1.7.9/src/bin/loaders/png/Makefile.am0000664000175000017500000000146312175475547015246 00000000000000 MAINTAINERCLEANFILES = Makefile.in AM_CPPFLAGS = \ -I. \ -I$(top_srcdir)/src/lib \ -I$(top_srcdir)/src/lib/include \ -I$(top_srcdir)/src/lib/cserve2 \ -I$(top_srcdir)/src/bin \ @EVAS_GENERAL_CFLAGS@ \ @evas_image_loader_png_cflags@ \ @EVIL_CFLAGS@ if BUILD_LOADER_PNG #if !EVAS_STATIC_BUILD_PNG pkgdir = $(libdir)/evas/cserve2/loaders/png/$(MODULE_ARCH) pkg_LTLIBRARIES = module.la module_la_SOURCES = evas_image_load_png.c module_la_LIBADD = @EVAS_GENERAL_LIBS@ @evas_image_loader_png_libs@ @EVIL_LIBS@ module_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -module -avoid-version module_la_LIBTOOLFLAGS = --tag=disable-static #else #noinst_LTLIBRARIES = libevas_loader_png.la #libevas_loader_png_la_SOURCES = evas_image_load_png.c #libevas_loader_png_la_LIBADD = @evas_image_loader_png_libs@ #endif endif evas-1.7.9/src/bin/loaders/jpeg/0000775000175000017500000000000012234557316013416 500000000000000evas-1.7.9/src/bin/loaders/jpeg/Makefile.in0000664000175000017500000007215112234557301015403 00000000000000# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/bin/loaders/jpeg DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/efl_attribute.m4 \ $(top_srcdir)/m4/efl_coverage.m4 \ $(top_srcdir)/m4/efl_doxygen.m4 \ $(top_srcdir)/m4/efl_fnmatch.m4 \ $(top_srcdir)/m4/efl_path_max.m4 \ $(top_srcdir)/m4/efl_shm_open.m4 $(top_srcdir)/m4/efl_tests.m4 \ $(top_srcdir)/m4/evas_check_engine.m4 \ $(top_srcdir)/m4/evas_check_loader.m4 \ $(top_srcdir)/m4/evas_converter.m4 \ $(top_srcdir)/m4/evas_dither.m4 \ $(top_srcdir)/m4/evas_scaler.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(pkgdir)" LTLIBRARIES = $(pkg_LTLIBRARIES) module_la_DEPENDENCIES = am__module_la_SOURCES_DIST = evas_image_load_jpeg.c @BUILD_LOADER_JPEG_TRUE@am_module_la_OBJECTS = \ @BUILD_LOADER_JPEG_TRUE@ module_la-evas_image_load_jpeg.lo module_la_OBJECTS = $(am_module_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = module_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(AM_CFLAGS) $(CFLAGS) $(module_la_LDFLAGS) $(LDFLAGS) -o $@ @BUILD_LOADER_JPEG_TRUE@am_module_la_rpath = -rpath $(pkgdir) AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(module_la_SOURCES) DIST_SOURCES = $(am__module_la_SOURCES_DIST) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHECK_CFLAGS = @CHECK_CFLAGS@ CHECK_LIBS = @CHECK_LIBS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@ DIRECTFB_LIBS = @DIRECTFB_LIBS@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ ECORE_EVAS_CFLAGS = @ECORE_EVAS_CFLAGS@ ECORE_EVAS_LIBS = @ECORE_EVAS_LIBS@ EDB_CFLAGS = @EDB_CFLAGS@ EDB_LIBS = @EDB_LIBS@ EDJE_CFLAGS = @EDJE_CFLAGS@ EDJE_LIBS = @EDJE_LIBS@ EET_CFLAGS = @EET_CFLAGS@ EET_LIBS = @EET_LIBS@ EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@ EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@ EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@ EFL_SHM_OPEN_LIBS = @EFL_SHM_OPEN_LIBS@ EGREP = @EGREP@ EINA_CFLAGS = @EINA_CFLAGS@ EINA_LIBS = @EINA_LIBS@ EVAS_CFLAGS = @EVAS_CFLAGS@ EVAS_GENERAL_CFLAGS = @EVAS_GENERAL_CFLAGS@ EVAS_GENERAL_LIBS = @EVAS_GENERAL_LIBS@ EVAS_LIBS = @EVAS_LIBS@ EVAS_SSE3_CFLAGS = @EVAS_SSE3_CFLAGS@ EVIL_CFLAGS = @EVIL_CFLAGS@ EVIL_LIBS = @EVIL_LIBS@ EXEEXT = @EXEEXT@ EXOTIC_CFLAGS = @EXOTIC_CFLAGS@ EXOTIC_LIBS = @EXOTIC_LIBS@ FGREP = @FGREP@ FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@ FONTCONFIG_LIBS = @FONTCONFIG_LIBS@ FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ FREETYPE_LIBS = @FREETYPE_LIBS@ FRIBIDI_CFLAGS = @FRIBIDI_CFLAGS@ FRIBIDI_LIBS = @FRIBIDI_LIBS@ GL_EET_CFLAGS = @GL_EET_CFLAGS@ GL_EET_LIBS = @GL_EET_LIBS@ GREP = @GREP@ HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@ HARFBUZZ_LIBS = @HARFBUZZ_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LINEBREAK_CFLAGS = @LINEBREAK_CFLAGS@ LINEBREAK_LIBS = @LINEBREAK_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MODULE_ARCH = @MODULE_ARCH@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ SDL_CFLAGS = @SDL_CFLAGS@ SDL_LIBS = @SDL_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ SVG_CFLAGS = @SVG_CFLAGS@ SVG_LIBS = @SVG_LIBS@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ XCB_CFLAGS = @XCB_CFLAGS@ XCB_GL_CFLAGS = @XCB_GL_CFLAGS@ XCB_GL_LIBS = @XCB_GL_LIBS@ XCB_LIBS = @XCB_LIBS@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_ct_OBJC = @ac_ct_OBJC@ altivec_cflags = @altivec_cflags@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ dlopen_libs = @dlopen_libs@ docdir = @docdir@ dvidir = @dvidir@ edje_cc = @edje_cc@ efl_doxygen = @efl_doxygen@ efl_have_doxygen = @efl_have_doxygen@ evas_engine_buffer_cflags = @evas_engine_buffer_cflags@ evas_engine_buffer_libs = @evas_engine_buffer_libs@ evas_engine_direct3d_cflags = @evas_engine_direct3d_cflags@ evas_engine_direct3d_libs = @evas_engine_direct3d_libs@ evas_engine_directfb_cflags = @evas_engine_directfb_cflags@ evas_engine_directfb_libs = @evas_engine_directfb_libs@ evas_engine_fb_cflags = @evas_engine_fb_cflags@ evas_engine_fb_libs = @evas_engine_fb_libs@ evas_engine_gl_cocoa_cflags = @evas_engine_gl_cocoa_cflags@ evas_engine_gl_cocoa_libs = @evas_engine_gl_cocoa_libs@ evas_engine_gl_common_libs = @evas_engine_gl_common_libs@ evas_engine_gl_sdl_cflags = @evas_engine_gl_sdl_cflags@ evas_engine_gl_sdl_libs = @evas_engine_gl_sdl_libs@ evas_engine_gl_xcb_cflags = @evas_engine_gl_xcb_cflags@ evas_engine_gl_xcb_libs = @evas_engine_gl_xcb_libs@ evas_engine_gl_xlib_cflags = @evas_engine_gl_xlib_cflags@ evas_engine_gl_xlib_libs = @evas_engine_gl_xlib_libs@ evas_engine_psl1ght_cflags = @evas_engine_psl1ght_cflags@ evas_engine_psl1ght_libs = @evas_engine_psl1ght_libs@ evas_engine_software_16_sdl_cflags = @evas_engine_software_16_sdl_cflags@ evas_engine_software_16_sdl_libs = @evas_engine_software_16_sdl_libs@ evas_engine_software_16_wince_cflags = @evas_engine_software_16_wince_cflags@ evas_engine_software_16_wince_libs = @evas_engine_software_16_wince_libs@ evas_engine_software_16_x11_cflags = @evas_engine_software_16_x11_cflags@ evas_engine_software_16_x11_libs = @evas_engine_software_16_x11_libs@ evas_engine_software_8_x11_cflags = @evas_engine_software_8_x11_cflags@ evas_engine_software_8_x11_libs = @evas_engine_software_8_x11_libs@ evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@ evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@ evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@ evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ evas_image_loader_edb_libs = @evas_image_loader_edb_libs@ evas_image_loader_eet_cflags = @evas_image_loader_eet_cflags@ evas_image_loader_eet_libs = @evas_image_loader_eet_libs@ evas_image_loader_generic_cflags = @evas_image_loader_generic_cflags@ evas_image_loader_generic_libs = @evas_image_loader_generic_libs@ evas_image_loader_gif_cflags = @evas_image_loader_gif_cflags@ evas_image_loader_gif_libs = @evas_image_loader_gif_libs@ evas_image_loader_ico_cflags = @evas_image_loader_ico_cflags@ evas_image_loader_ico_libs = @evas_image_loader_ico_libs@ evas_image_loader_jpeg_cflags = @evas_image_loader_jpeg_cflags@ evas_image_loader_jpeg_libs = @evas_image_loader_jpeg_libs@ evas_image_loader_pmaps_cflags = @evas_image_loader_pmaps_cflags@ evas_image_loader_pmaps_libs = @evas_image_loader_pmaps_libs@ evas_image_loader_png_cflags = @evas_image_loader_png_cflags@ evas_image_loader_png_libs = @evas_image_loader_png_libs@ evas_image_loader_psd_cflags = @evas_image_loader_psd_cflags@ evas_image_loader_psd_libs = @evas_image_loader_psd_libs@ evas_image_loader_svg_cflags = @evas_image_loader_svg_cflags@ evas_image_loader_svg_libs = @evas_image_loader_svg_libs@ evas_image_loader_tga_cflags = @evas_image_loader_tga_cflags@ evas_image_loader_tga_libs = @evas_image_loader_tga_libs@ evas_image_loader_tiff_cflags = @evas_image_loader_tiff_cflags@ evas_image_loader_tiff_libs = @evas_image_loader_tiff_libs@ evas_image_loader_wbmp_cflags = @evas_image_loader_wbmp_cflags@ evas_image_loader_wbmp_libs = @evas_image_loader_wbmp_libs@ evas_image_loader_xpm_cflags = @evas_image_loader_xpm_cflags@ evas_image_loader_xpm_libs = @evas_image_loader_xpm_libs@ exec_prefix = @exec_prefix@ have_evas_engine_gl_x11 = @have_evas_engine_gl_x11@ have_evas_engine_gl_xcb = @have_evas_engine_gl_xcb@ have_evas_engine_gl_xlib = @have_evas_engine_gl_xlib@ have_evas_engine_software_x11 = @have_evas_engine_software_x11@ have_evas_engine_software_xcb = @have_evas_engine_software_xcb@ have_evas_engine_software_xlib = @have_evas_engine_software_xlib@ have_lcov = @have_lcov@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_enable_auto_import = @lt_enable_auto_import@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgconfig_requires_private = @pkgconfig_requires_private@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pthread_cflags = @pthread_cflags@ pthread_libs = @pthread_libs@ release_info = @release_info@ requirement_evas = @requirement_evas@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ shm_open_libs = @shm_open_libs@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ version_info = @version_info@ MAINTAINERCLEANFILES = Makefile.in AM_CPPFLAGS = \ -I. \ -I$(top_srcdir)/src/lib \ -I$(top_srcdir)/src/lib/include \ -I$(top_srcdir)/src/lib/cserve2 \ -I$(top_srcdir)/src/bin \ @EVAS_GENERAL_CFLAGS@ \ @evas_image_loader_jpeg_cflags@ \ @EVIL_CFLAGS@ #if !EVAS_STATIC_BUILD_JPEG @BUILD_LOADER_JPEG_TRUE@pkgdir = $(libdir)/evas/cserve2/loaders/jpeg/$(MODULE_ARCH) @BUILD_LOADER_JPEG_TRUE@pkg_LTLIBRARIES = module.la @BUILD_LOADER_JPEG_TRUE@module_la_SOURCES = evas_image_load_jpeg.c @BUILD_LOADER_JPEG_TRUE@module_la_LIBADD = @EVAS_GENERAL_LIBS@ @EVIL_LIBS@ @evas_image_loader_jpeg_libs@ @BUILD_LOADER_JPEG_TRUE@module_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -module -avoid-version @BUILD_LOADER_JPEG_TRUE@module_la_LIBTOOLFLAGS = --tag=disable-static all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/bin/loaders/jpeg/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/bin/loaders/jpeg/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-pkgLTLIBRARIES: $(pkg_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(pkg_LTLIBRARIES)'; test -n "$(pkgdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(pkgdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(pkgdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkgdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkgdir)"; \ } uninstall-pkgLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(pkg_LTLIBRARIES)'; test -n "$(pkgdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkgdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkgdir)/$$f"; \ done clean-pkgLTLIBRARIES: -test -z "$(pkg_LTLIBRARIES)" || rm -f $(pkg_LTLIBRARIES) @list='$(pkg_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } module.la: $(module_la_OBJECTS) $(module_la_DEPENDENCIES) $(EXTRA_module_la_DEPENDENCIES) $(AM_V_CCLD)$(module_la_LINK) $(am_module_la_rpath) $(module_la_OBJECTS) $(module_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/module_la-evas_image_load_jpeg.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< module_la-evas_image_load_jpeg.lo: evas_image_load_jpeg.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT module_la-evas_image_load_jpeg.lo -MD -MP -MF $(DEPDIR)/module_la-evas_image_load_jpeg.Tpo -c -o module_la-evas_image_load_jpeg.lo `test -f 'evas_image_load_jpeg.c' || echo '$(srcdir)/'`evas_image_load_jpeg.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/module_la-evas_image_load_jpeg.Tpo $(DEPDIR)/module_la-evas_image_load_jpeg.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='evas_image_load_jpeg.c' object='module_la-evas_image_load_jpeg.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o module_la-evas_image_load_jpeg.lo `test -f 'evas_image_load_jpeg.c' || echo '$(srcdir)/'`evas_image_load_jpeg.c mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: for dir in "$(DESTDIR)$(pkgdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool clean-pkgLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-pkgLTLIBRARIES install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-pkgLTLIBRARIES .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-libtool clean-pkgLTLIBRARIES cscopelist-am ctags \ ctags-am distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-pkgLTLIBRARIES install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am uninstall-pkgLTLIBRARIES #else #noinst_LTLIBRARIES = libevas_loader_jpeg.la #libevas_loader_jpeg_la_SOURCES = evas_image_load_jpeg.c #libevas_loader_jpeg_la_LIBADD = @evas_image_loader_jpeg_libs@ #endif # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: evas-1.7.9/src/bin/loaders/jpeg/evas_image_load_jpeg.c0000664000175000017500000010344112175475547017622 00000000000000#ifdef HAVE_CONFIG_H # include #endif #include #include #include #include "evas_macros.h" #include "evas_cserve2.h" #include "evas_cserve2_slave.h" typedef struct _JPEG_error_mgr *emptr; struct _JPEG_error_mgr { struct jpeg_error_mgr pub; jmp_buf setjmp_buffer; }; static void _JPEGFatalErrorHandler(j_common_ptr cinfo); static void _JPEGErrorHandler(j_common_ptr cinfo); static void _JPEGErrorHandler2(j_common_ptr cinfo, int msg_level); static void _JPEGFatalErrorHandler(j_common_ptr cinfo) { emptr errmgr; errmgr = (emptr) cinfo->err; /* cinfo->err->output_message(cinfo);*/ longjmp(errmgr->setjmp_buffer, 1); return; } static void _JPEGErrorHandler(j_common_ptr cinfo __UNUSED__) { /* emptr errmgr; */ /* errmgr = (emptr) cinfo->err; */ /* cinfo->err->output_message(cinfo);*/ /* longjmp(errmgr->setjmp_buffer, 1);*/ return; } static void _JPEGErrorHandler2(j_common_ptr cinfo __UNUSED__, int msg_level __UNUSED__) { /* emptr errmgr; */ /* errmgr = (emptr) cinfo->err; */ /* cinfo->err->output_message(cinfo);*/ /* longjmp(errmgr->setjmp_buffer, 1);*/ return; } struct jpeg_membuf_src { struct jpeg_source_mgr pub; const unsigned char *buf; size_t len; struct jpeg_membuf_src *self; }; static void _evas_jpeg_membuf_src_init(j_decompress_ptr cinfo __UNUSED__) { } static boolean _evas_jpeg_membuf_src_fill(j_decompress_ptr cinfo) { static const JOCTET jpeg_eoi[2] = { 0xFF, JPEG_EOI }; struct jpeg_membuf_src *src = (struct jpeg_membuf_src *)cinfo->src; src->pub.bytes_in_buffer = sizeof(jpeg_eoi); src->pub.next_input_byte = jpeg_eoi; return TRUE; } static void _evas_jpeg_membuf_src_skip(j_decompress_ptr cinfo, long num_bytes) { struct jpeg_membuf_src *src = (struct jpeg_membuf_src *)cinfo->src; if ((((long)src->pub.bytes_in_buffer - (long)src->len) > num_bytes) || ((long)src->pub.bytes_in_buffer < num_bytes)) { (*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo)); return; } src->pub.bytes_in_buffer -= num_bytes; src->pub.next_input_byte += num_bytes; } static void _evas_jpeg_membuf_src_term(j_decompress_ptr cinfo) { struct jpeg_membuf_src *src = (struct jpeg_membuf_src *)cinfo->src; if (!src) return; free(src); cinfo->src = NULL; } static int _evas_jpeg_membuf_src(j_decompress_ptr cinfo, void *map, size_t length) { struct jpeg_membuf_src *src; src = calloc(1, sizeof(*src)); if (!src) return -1; src->self = src; cinfo->src = &src->pub; src->buf = map; src->len = length; src->pub.init_source = _evas_jpeg_membuf_src_init; src->pub.fill_input_buffer = _evas_jpeg_membuf_src_fill; src->pub.skip_input_data = _evas_jpeg_membuf_src_skip; src->pub.resync_to_restart = jpeg_resync_to_restart; src->pub.term_source = _evas_jpeg_membuf_src_term; src->pub.bytes_in_buffer = src->len; src->pub.next_input_byte = src->buf; return 0; } /*! Magic number for EXIF header & App1*/ static const unsigned char ExifHeader[] = {0x45, 0x78, 0x69, 0x66, 0x00, 0x00}; static const unsigned char App1[] = {0xff, 0xe1}; typedef enum { EXIF_BYTE_ALIGN_II, EXIF_BYTE_ALIGN_MM } ExifByteAlign; static int _get_orientation(void *map, size_t length) { char *buf; char orientation[2]; ExifByteAlign byte_align; unsigned int num_directory = 0; unsigned int i, j; int direction; /* open file and get 22 byte frome file */ if (!map) return 0; /* 1. read 22byte */ if (length < 22) return 0; buf = (char *)map; /* 2. check 2,3 bypte with APP1(0xFFE1) */ if (memcmp(buf + 2, App1, sizeof (App1))) return 0; /* 3. check 6~11bype with Exif Header (0x45786966 0000) */ if (memcmp(buf + 6, ExifHeader, sizeof (ExifHeader))) return 0; /* 4. get 12&13 byte get info of "II(0x4949)" or "MM(0x4d4d)" */ /* 5. get [20]&[21] get directory entry # */ if (!strncmp(buf + 12, "MM", 2)) { byte_align = EXIF_BYTE_ALIGN_MM; num_directory = ((*(buf + 20) << 8) + *(buf + 21)); orientation[0] = 0x01; orientation[1] = 0x12; } else if (!strncmp(buf + 12, "II", 2)) { byte_align = EXIF_BYTE_ALIGN_II; num_directory = ((*(buf + 21) << 8) + *(buf + 20)); orientation[0] = 0x12; orientation[1] = 0x01; } else return 0; buf = map + 22; if (length < (12 * num_directory + 22)) return 0; j = 0; for (i = 0; i < num_directory; i++ ) { if (!strncmp(buf + j, orientation, 2)) { /*get orientation tag */ if (byte_align == EXIF_BYTE_ALIGN_MM) direction = *(buf+ j + 11); else direction = *(buf+ j + 8); switch (direction) { case 3: case 4: return 180; case 6: case 7: return 90; case 5: case 8: return 270; default: return 0; } } else j = j + 12; } return 0; } static Eina_Bool evas_image_load_file_head_jpeg_internal(Evas_Img_Load_Params *ilp, void *map, size_t length, int *error) { unsigned int w, h, scalew, scaleh; struct jpeg_decompress_struct cinfo; struct _JPEG_error_mgr jerr; /* for rotation decoding */ int degree = 0; Eina_Bool change_wh = EINA_FALSE; unsigned int load_opts_w = 0, load_opts_h = 0; cinfo.err = jpeg_std_error(&(jerr.pub)); jerr.pub.error_exit = _JPEGFatalErrorHandler; jerr.pub.emit_message = _JPEGErrorHandler2; jerr.pub.output_message = _JPEGErrorHandler; if (setjmp(jerr.setjmp_buffer)) { jpeg_destroy_decompress(&cinfo); _evas_jpeg_membuf_src_term(&cinfo); if (cinfo.saw_JFIF_marker) *error = CSERVE2_CORRUPT_FILE; else *error = CSERVE2_UNKNOWN_FORMAT; return EINA_FALSE; } degree = 0; change_wh = EINA_FALSE; jpeg_create_decompress(&cinfo); if (_evas_jpeg_membuf_src(&cinfo, map, length)) { jpeg_destroy_decompress(&cinfo); _evas_jpeg_membuf_src_term(&cinfo); *error = CSERVE2_RESOURCE_ALLOCATION_FAILED; return EINA_FALSE; } jpeg_read_header(&cinfo, TRUE); cinfo.do_fancy_upsampling = FALSE; cinfo.do_block_smoothing = FALSE; cinfo.dct_method = JDCT_ISLOW; // JDCT_FLOAT JDCT_IFAST(quality loss) cinfo.dither_mode = JDITHER_ORDERED; jpeg_start_decompress(&cinfo); /* rotation decoding */ if (ilp->opts.orientation) { degree = _get_orientation(map, length); if (degree != 0) { ilp->degree = degree; ilp->rotated = EINA_TRUE; if (degree == 90 || degree == 270) change_wh = EINA_TRUE; } } /* head decoding */ w = cinfo.output_width; h = cinfo.output_height; if ((w < 1) || (h < 1) || (w > IMG_MAX_SIZE) || (h > IMG_MAX_SIZE) || (IMG_TOO_BIG(w, h))) { jpeg_destroy_decompress(&cinfo); _evas_jpeg_membuf_src_term(&cinfo); if (IMG_TOO_BIG(w, h)) *error = CSERVE2_RESOURCE_ALLOCATION_FAILED; else *error = CSERVE2_GENERIC; return EINA_FALSE; } if (ilp->opts.scale_down_by > 1) { w /= ilp->opts.scale_down_by; h /= ilp->opts.scale_down_by; } else if (ilp->opts.dpi > 0.0) { w = (w * ilp->opts.dpi) / 90.0; h = (h * ilp->opts.dpi) / 90.0; } else if ((ilp->opts.w > 0) && (ilp->opts.h > 0)) { unsigned int w2 = w, h2 = h; /* user set load_opts' w,h on the assumption that image already rotated according to it's orientation info */ if (change_wh) { load_opts_w = ilp->opts.w; load_opts_h = ilp->opts.h; ilp->opts.w = load_opts_h; ilp->opts.h = load_opts_w; } if (ilp->opts.w > 0) { w2 = ilp->opts.w; h2 = (ilp->opts.w * h) / w; if ((ilp->opts.h > 0) && (h2 > ilp->opts.h)) { unsigned int w3; h2 = ilp->opts.h; w3 = (ilp->opts.h * w) / h; if (w3 > w2) w2 = w3; } } else if (ilp->opts.h > 0) { h2 = ilp->opts.h; w2 = (ilp->opts.h * w) / h; } w = w2; h = h2; if (change_wh) { ilp->opts.w = load_opts_w; ilp->opts.h = load_opts_h; } } if (w < 1) w = 1; if (h < 1) h = 1; if ((w != cinfo.output_width) || (h != cinfo.output_height)) { scalew = cinfo.output_width / w; scaleh = cinfo.output_height / h; ilp->scale = scalew; if (scaleh < scalew) ilp->scale = scaleh; if (ilp->scale > 8) ilp->scale = 8; else if (ilp->scale < 1) ilp->scale = 1; if (ilp->scale == 3) ilp->scale = 2; else if (ilp->scale == 5) ilp->scale = 4; else if (ilp->scale == 6) ilp->scale = 4; else if (ilp->scale == 7) ilp->scale = 4; } if (ilp->scale > 1) { jpeg_destroy_decompress(&cinfo); _evas_jpeg_membuf_src_term(&cinfo); jpeg_create_decompress(&cinfo); if (_evas_jpeg_membuf_src(&cinfo, map, length)) { jpeg_destroy_decompress(&cinfo); _evas_jpeg_membuf_src_term(&cinfo); *error = CSERVE2_RESOURCE_ALLOCATION_FAILED; return EINA_FALSE; } jpeg_read_header(&cinfo, TRUE); cinfo.do_fancy_upsampling = FALSE; cinfo.do_block_smoothing = FALSE; cinfo.scale_num = 1; cinfo.scale_denom = ilp->scale; jpeg_calc_output_dimensions(&(cinfo)); jpeg_start_decompress(&cinfo); } ilp->w = cinfo.output_width; ilp->h = cinfo.output_height; // be nice and clip region to image. if its totally outside, fail load if ((ilp->opts.rw > 0) && (ilp->opts.rh > 0)) { unsigned int load_region_x = 0, load_region_y = 0; unsigned int load_region_w = 0, load_region_h = 0; if (ilp->rotated) { load_region_x = ilp->opts.rx; load_region_y = ilp->opts.ry; load_region_w = ilp->opts.rw; load_region_h = ilp->opts.rh; switch (degree) { case 90: ilp->opts.rx = load_region_y; ilp->opts.ry = h - (load_region_x + load_region_w); ilp->opts.rw = load_region_h; ilp->opts.rh = load_region_w; break; case 180: ilp->opts.rx = w - (load_region_x+ load_region_w); ilp->opts.ry = h - (load_region_y + load_region_h); break; case 270: ilp->opts.rx = w - (load_region_y + load_region_h); ilp->opts.ry = load_region_x; ilp->opts.rw = load_region_h; ilp->opts.rh = load_region_w; break; default: break; } } RECTS_CLIP_TO_RECT(ilp->opts.rx, ilp->opts.ry, ilp->opts.rw, ilp->opts.rh, 0, 0, ilp->w, ilp->h); if ((ilp->opts.rw <= 0) || (ilp->opts.rh <= 0)) { jpeg_destroy_decompress(&cinfo); _evas_jpeg_membuf_src_term(&cinfo); *error = CSERVE2_GENERIC; return EINA_FALSE; } ilp->w = ilp->opts.rw; ilp->h = ilp->opts.rh; if (ilp->rotated) { ilp->opts.rx = load_region_x; ilp->opts.ry = load_region_y; ilp->opts.rw = load_region_w; ilp->opts.rh = load_region_h; } } /* end head decoding */ if (change_wh) { unsigned int tmp; tmp = ilp->w; ilp->w = ilp->h; ilp->h = tmp; } jpeg_destroy_decompress(&cinfo); _evas_jpeg_membuf_src_term(&cinfo); *error = CSERVE2_NONE; return EINA_TRUE; } /* static double get_time(void) { struct timeval timev; gettimeofday(&timev, NULL); return (double)timev.tv_sec + (((double)timev.tv_usec) / 1000000); } */ static Eina_Bool evas_image_load_file_data_jpeg_internal(Evas_Img_Load_Params *ilp, void *map, size_t size, int *error) { unsigned int w, h; struct jpeg_decompress_struct cinfo; struct _JPEG_error_mgr jerr; DATA8 *ptr, *line[16], *data; DATA32 *ptr2, *ptr_rotate = NULL; unsigned int x, y, l, i, scans; int region = 0; /* rotation setting */ unsigned int tmp; unsigned int load_region_x = 0, load_region_y = 0; unsigned int load_region_w = 0, load_region_h = 0; volatile int degree = 0; volatile Eina_Bool change_wh = EINA_FALSE; Eina_Bool line_done = EINA_FALSE; if (ilp->rotated) { degree = ilp->degree; if (degree == 90 || degree == 270) change_wh = EINA_TRUE; } cinfo.err = jpeg_std_error(&(jerr.pub)); jerr.pub.error_exit = _JPEGFatalErrorHandler; jerr.pub.emit_message = _JPEGErrorHandler2; jerr.pub.output_message = _JPEGErrorHandler; if (setjmp(jerr.setjmp_buffer)) { jpeg_destroy_decompress(&cinfo); _evas_jpeg_membuf_src_term(&cinfo); *error = CSERVE2_CORRUPT_FILE; return EINA_FALSE; } jpeg_create_decompress(&cinfo); if (_evas_jpeg_membuf_src(&cinfo, map, size)) { jpeg_destroy_decompress(&cinfo); _evas_jpeg_membuf_src_term(&cinfo); *error = CSERVE2_RESOURCE_ALLOCATION_FAILED; return 0; } jpeg_read_header(&cinfo, TRUE); cinfo.do_fancy_upsampling = FALSE; cinfo.do_block_smoothing = FALSE; cinfo.dct_method = JDCT_ISLOW; // JDCT_FLOAT JDCT_IFAST(quality loss) cinfo.dither_mode = JDITHER_ORDERED; if (ilp->scale > 1) { cinfo.scale_num = 1; cinfo.scale_denom = ilp->scale; } /* Colorspace conversion options */ /* libjpeg can do the following conversions: */ /* GRAYSCLAE => RGB YCbCr => RGB and YCCK => CMYK */ switch (cinfo.jpeg_color_space) { case JCS_UNKNOWN: break; case JCS_GRAYSCALE: case JCS_RGB: case JCS_YCbCr: cinfo.out_color_space = JCS_RGB; break; case JCS_CMYK: case JCS_YCCK: cinfo.out_color_space = JCS_CMYK; break; default: /* unhandled format, do something */ break; } /* head decoding */ jpeg_calc_output_dimensions(&(cinfo)); jpeg_start_decompress(&cinfo); w = cinfo.output_width; h = cinfo.output_height; if (change_wh) { tmp = ilp->w; ilp->w = ilp->h; ilp->h = tmp; } if ((ilp->opts.rw > 0) && (ilp->opts.rh > 0)) { region = 1; if (ilp->rotated) { load_region_x = ilp->opts.rx; load_region_y = ilp->opts.ry; load_region_w = ilp->opts.rw; load_region_h = ilp->opts.rh; switch (degree) { case 90: ilp->opts.rx = load_region_y; ilp->opts.ry = h - (load_region_x + load_region_w); ilp->opts.rw = load_region_h; ilp->opts.rh = load_region_w; break; case 180: ilp->opts.rx = w - (load_region_x+ load_region_w); ilp->opts.ry = h - (load_region_y + load_region_h); break; case 270: ilp->opts.rx = w - (load_region_y + load_region_h); ilp->opts.ry = load_region_x; ilp->opts.rw = load_region_h; ilp->opts.rh = load_region_w; break; default: break; } } #ifdef BUILD_LOADER_JPEG_REGION cinfo.region_x = ilp->opts.rx; cinfo.region_y = ilp->opts.ry; cinfo.region_w = ilp->opts.rw; cinfo.region_h = ilp->opts.rh; #endif } /* what to do about this? We'll check for this kind of races on loaders * or cache invalidation due to file modification should always be * detected by the server? */ if ((!region) && ((w != ilp->w) || (h != ilp->h))) { // race condition, the file could have change from when we call header // this test will not solve the problem with region code. jpeg_destroy_decompress(&cinfo); _evas_jpeg_membuf_src_term(&cinfo); *error = CSERVE2_GENERIC; return EINA_FALSE; } if ((region) && ((ilp->w != ilp->opts.rw) || (ilp->h != ilp->opts.rh))) { ilp->w = ilp->opts.rw; ilp->h = ilp->opts.rh; } if (!(((cinfo.out_color_space == JCS_RGB) && ((cinfo.output_components == 3) || (cinfo.output_components == 1))) || ((cinfo.out_color_space == JCS_CMYK) && (cinfo.output_components == 4)))) { jpeg_destroy_decompress(&cinfo); _evas_jpeg_membuf_src_term(&cinfo); *error = CSERVE2_UNKNOWN_FORMAT; return EINA_FALSE; } /* end head decoding */ /* data decoding */ if (cinfo.rec_outbuf_height > 16) { jpeg_destroy_decompress(&cinfo); _evas_jpeg_membuf_src_term(&cinfo); *error = CSERVE2_UNKNOWN_FORMAT; return EINA_FALSE; } data = alloca(w * 16 * cinfo.output_components); if ((ilp->rotated) && change_wh) { ptr2 = malloc(ilp->w * ilp->h * sizeof(DATA32)); ptr_rotate = ptr2; } else ptr2 = ilp->buffer;; if (!ptr2) { *error = CSERVE2_RESOURCE_ALLOCATION_FAILED; return EINA_FALSE; } /* We handle first CMYK (4 components) */ if (cinfo.output_components == 4) { // FIXME: handle region for (i = 0; (int)i < cinfo.rec_outbuf_height; i++) line[i] = data + (i * w * 4); for (l = 0; l < h; l += cinfo.rec_outbuf_height) { jpeg_read_scanlines(&cinfo, line, cinfo.rec_outbuf_height); scans = cinfo.rec_outbuf_height; if ((h - l) < scans) scans = h - l; ptr = data; if (!region) { for (y = 0; y < scans; y++) { if (cinfo.saw_Adobe_marker) { for (x = 0; x < w; x++) { /* According to libjpeg doc, Photoshop inverse the values of C, M, Y and K, */ /* that is C is replaces by 255 - C, etc...*/ /* See the comment below for the computation of RGB values from CMYK ones. */ *ptr2 = (0xff000000) | ((ptr[0] * ptr[3] / 255) << 16) | ((ptr[1] * ptr[3] / 255) << 8) | ((ptr[2] * ptr[3] / 255)); ptr += 4; ptr2++; } } else { for (x = 0; x < w; x++) { /* Conversion from CMYK to RGB is done in 2 steps: */ /* CMYK => CMY => RGB (see http://www.easyrgb.com/index.php?X=MATH) */ /* after computation, if C, M, Y and K are between 0 and 1, we have: */ /* R = (1 - C) * (1 - K) * 255 */ /* G = (1 - M) * (1 - K) * 255 */ /* B = (1 - Y) * (1 - K) * 255 */ /* libjpeg stores CMYK values between 0 and 255, */ /* so we replace C by C * 255 / 255, etc... and we obtain: */ /* R = (255 - C) * (255 - K) / 255 */ /* G = (255 - M) * (255 - K) / 255 */ /* B = (255 - Y) * (255 - K) / 255 */ /* with C, M, Y and K between 0 and 255. */ *ptr2 = (0xff000000) | (((255 - ptr[0]) * (255 - ptr[3]) / 255) << 16) | (((255 - ptr[1]) * (255 - ptr[3]) / 255) << 8) | (((255 - ptr[2]) * (255 - ptr[3]) / 255)); ptr += 4; ptr2++; } } } } else { // if line # > region last line, break if (l >= (ilp->opts.ry + ilp->opts.rh)) { line_done = EINA_TRUE; /* if rotation flag is set , we have to rotate image */ goto done; /*jpeg_destroy_decompress(&cinfo); _evas_jpeg_membuf_src_term(&cinfo); *error = NONE; return EINA_FALSE;*/ } // els if scan block intersects region start or later else if ((l + scans) > (ilp->opts.ry)) { for (y = 0; y < scans; y++) { if (((y + l) >= ilp->opts.ry) && ((y + l) < (ilp->opts.ry + ilp->opts.rh))) { ptr += ilp->opts.rx; if (cinfo.saw_Adobe_marker) { for (x = 0; x < ilp->opts.rw; x++) { /* According to libjpeg doc, Photoshop inverse the values of C, M, Y and K, */ /* that is C is replaces by 255 - C, etc...*/ /* See the comment below for the computation of RGB values from CMYK ones. */ *ptr2 = (0xff000000) | ((ptr[0] * ptr[3] / 255) << 16) | ((ptr[1] * ptr[3] / 255) << 8) | ((ptr[2] * ptr[3] / 255)); ptr += 4; ptr2++; } } else { for (x = 0; x < ilp->opts.rw; x++) { /* Conversion from CMYK to RGB is done in 2 steps: */ /* CMYK => CMY => RGB (see http://www.easyrgb.com/index.php?X=MATH) */ /* after computation, if C, M, Y and K are between 0 and 1, we have: */ /* R = (1 - C) * (1 - K) * 255 */ /* G = (1 - M) * (1 - K) * 255 */ /* B = (1 - Y) * (1 - K) * 255 */ /* libjpeg stores CMYK values between 0 and 255, */ /* so we replace C by C * 255 / 255, etc... and we obtain: */ /* R = (255 - C) * (255 - K) / 255 */ /* G = (255 - M) * (255 - K) / 255 */ /* B = (255 - Y) * (255 - K) / 255 */ /* with C, M, Y and K between 0 and 255. */ *ptr2 = (0xff000000) | (((255 - ptr[0]) * (255 - ptr[3]) / 255) << 16) | (((255 - ptr[1]) * (255 - ptr[3]) / 255) << 8) | (((255 - ptr[2]) * (255 - ptr[3]) / 255)); ptr += 4; ptr2++; } } ptr += (4 * (w - (ilp->opts.rx + ilp->opts.rw))); } else ptr += (4 * w); } } } } } /* We handle then RGB with 3 components */ else if (cinfo.output_components == 3) { /* double t; if (region) { // debug for now printf("R| %p %5ix%5i %s: %5i %5i %5ix%5i - ", ie, ie->w, ie->h, ie->file, ilp->opts.rx, ilp->opts.ry, ilp->opts.rw, ilp->opts.rh); } t = get_time(); */ for (i = 0; (int)i < cinfo.rec_outbuf_height; i++) line[i] = data + (i * w * 3); for (l = 0; l < h; l += cinfo.rec_outbuf_height) { jpeg_read_scanlines(&cinfo, line, cinfo.rec_outbuf_height); scans = cinfo.rec_outbuf_height; if ((h - l) < scans) scans = h - l; ptr = data; if (!region) { for (y = 0; y < scans; y++) { for (x = 0; x < w; x++) { *ptr2 = ARGB_JOIN(0xff, ptr[0], ptr[1], ptr[2]); ptr += 3; ptr2++; } } } else { // if line # > region last line, break // but not return immediately for rotation job if (l >= (ilp->opts.ry + ilp->opts.rh)) { line_done = EINA_TRUE; /* if rotation flag is set , we have to rotate image */ goto done; } // else if scan block intersects region start or later else if ((l + scans) > (ilp->opts.ry)) { for (y = 0; y < scans; y++) { if (((y + l) >= ilp->opts.ry) && ((y + l) < (ilp->opts.ry + ilp->opts.rh))) { ptr += (3 * ilp->opts.rx); for (x = 0; x < ilp->opts.rw; x++) { *ptr2 = ARGB_JOIN(0xff, ptr[0], ptr[1], ptr[2]); ptr += 3; ptr2++; } ptr += (3 * (w - (ilp->opts.rx + ilp->opts.rw))); } else ptr += (3 * w); } } } } /* t = get_time() - t; printf("%3.3f\n", t); */ } /* We finally handle RGB with 1 component */ else if (cinfo.output_components == 1) { for (i = 0; (int)i < cinfo.rec_outbuf_height; i++) line[i] = data + (i * w); for (l = 0; l < h; l += cinfo.rec_outbuf_height) { jpeg_read_scanlines(&cinfo, line, cinfo.rec_outbuf_height); scans = cinfo.rec_outbuf_height; if ((h - l) < scans) scans = h - l; ptr = data; if (!region) { for (y = 0; y < scans; y++) { for (x = 0; x < w; x++) { *ptr2 = ARGB_JOIN(0xff, ptr[0], ptr[0], ptr[0]); ptr++; ptr2++; } } } else { // if line # > region last line, break if (l >= (ilp->opts.ry + ilp->opts.rh)) { line_done = EINA_TRUE; /* if rotation flag is set , we have to rotate image */ goto done; /*jpeg_destroy_decompress(&cinfo); _evas_jpeg_membuf_src_term(&cinfo); *error = NONE; return EINA_TRUE;*/ } // els if scan block intersects region start or later else if ((l + scans) > (ilp->opts.ry)) { for (y = 0; y < scans; y++) { if (((y + l) >= ilp->opts.ry) && ((y + l) < (ilp->opts.ry + ilp->opts.rh))) { ptr += ilp->opts.rx; for (x = 0; x < ilp->opts.rw; x++) { *ptr2 = ARGB_JOIN(0xff, ptr[0], ptr[0], ptr[0]); ptr++; ptr2++; } ptr += w - (ilp->opts.rx + ilp->opts.rw); } else ptr += w; } } } } } /* if rotation operation need, rotate it */ done: if (ilp->rotated) { DATA32 *data1, *data2, *to, *from; int lx, ly, lw, lh, hw; if (change_wh) { tmp = ilp->w; ilp->w = ilp->h; ilp->h = tmp; } lw = ilp->w; lh = ilp->h; hw = lw * lh; data1 = ilp->buffer; if (degree == 180) { DATA32 tmpd; data2 = data1 + (lh * lw) -1; for (lx = (lw * lh) / 2; --lx >= 0;) { tmpd = *data1; *data1 = *data2; *data2 = tmpd; data1++; data2--; } } else { data2 = NULL; to = NULL; if (ptr_rotate) data2 = ptr_rotate; if (degree == 90) { to = data1 + lw - 1; hw = -hw - 1; } else if (degree == 270) { to = data1 + hw - lw; lw = -lw; hw = hw + 1; } if (to) { from = data2; for (lx = ilp->w; --lx >= 0;) { for (ly = ilp->h; --ly >= 0;) { *to = *from; from++; to += lw; } to += hw; } } if (ptr_rotate) { free(ptr_rotate); ptr_rotate = NULL; } } if (region) { ilp->opts.rx = load_region_x; ilp->opts.ry = load_region_y; ilp->opts.rw = load_region_w; ilp->opts.rh = load_region_h; } } if (line_done) { jpeg_destroy_decompress(&cinfo); _evas_jpeg_membuf_src_term(&cinfo); *error = CSERVE2_NONE; return EINA_FALSE; } /* end data decoding */ jpeg_finish_decompress(&cinfo); jpeg_destroy_decompress(&cinfo); _evas_jpeg_membuf_src_term(&cinfo); *error = CSERVE2_NONE; return EINA_TRUE; } Eina_Bool evas_image_load_file_head_jpeg(Evas_Img_Load_Params *ilp, const char *file, const char *key __UNUSED__, int *error) { Eina_File *f; void *map; Eina_Bool val = EINA_FALSE; f = eina_file_open(file, EINA_FALSE); if (!f) { *error = CSERVE2_DOES_NOT_EXIST; return EINA_FALSE; } map = eina_file_map_all(f, EINA_FILE_WILLNEED); if (!map) { *error = CSERVE2_DOES_NOT_EXIST; goto on_error; } val = evas_image_load_file_head_jpeg_internal(ilp, map, eina_file_size_get(f), error); eina_file_map_free(f, map); on_error: eina_file_close(f); return val; } static Eina_Bool evas_image_load_file_data_jpeg(Evas_Img_Load_Params *ilp, const char *file, const char *key __UNUSED__, int *error) { Eina_File *f; void *map; Eina_Bool val = EINA_FALSE; f = eina_file_open(file, EINA_FALSE); if (!f) { *error = CSERVE2_DOES_NOT_EXIST; return EINA_FALSE; } map = eina_file_map_all(f, EINA_FILE_WILLNEED); if (!map) { *error = CSERVE2_DOES_NOT_EXIST; goto on_error; } val = evas_image_load_file_data_jpeg_internal(ilp, map, eina_file_size_get(f), error); eina_file_map_free(f, map); on_error: eina_file_close(f); return val; } static Evas_Loader_Module_Api modapi = { EVAS_CSERVE2_MODULE_API_VERSION, "jpeg", evas_image_load_file_head_jpeg, evas_image_load_file_data_jpeg }; static Eina_Bool module_init(void) { return evas_cserve2_loader_register(&modapi); } static void module_shutdown(void) { } EINA_MODULE_INIT(module_init); EINA_MODULE_SHUTDOWN(module_shutdown); evas-1.7.9/src/bin/loaders/jpeg/Makefile.am0000664000175000017500000000147612175475547015413 00000000000000 MAINTAINERCLEANFILES = Makefile.in AM_CPPFLAGS = \ -I. \ -I$(top_srcdir)/src/lib \ -I$(top_srcdir)/src/lib/include \ -I$(top_srcdir)/src/lib/cserve2 \ -I$(top_srcdir)/src/bin \ @EVAS_GENERAL_CFLAGS@ \ @evas_image_loader_jpeg_cflags@ \ @EVIL_CFLAGS@ if BUILD_LOADER_JPEG #if !EVAS_STATIC_BUILD_JPEG pkgdir = $(libdir)/evas/cserve2/loaders/jpeg/$(MODULE_ARCH) pkg_LTLIBRARIES = module.la module_la_SOURCES = evas_image_load_jpeg.c module_la_LIBADD = @EVAS_GENERAL_LIBS@ @EVIL_LIBS@ @evas_image_loader_jpeg_libs@ module_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -module -avoid-version module_la_LIBTOOLFLAGS = --tag=disable-static #else #noinst_LTLIBRARIES = libevas_loader_jpeg.la #libevas_loader_jpeg_la_SOURCES = evas_image_load_jpeg.c #libevas_loader_jpeg_la_LIBADD = @evas_image_loader_jpeg_libs@ #endif endif evas-1.7.9/src/bin/loaders/Makefile.in0000664000175000017500000006365712234557301014471 00000000000000# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ @BUILD_LOADER_BMP_TRUE@am__append_1 = bmp @BUILD_LOADER_EET_TRUE@am__append_2 = eet @BUILD_LOADER_ICO_TRUE@am__append_3 = ico @BUILD_LOADER_JPEG_TRUE@am__append_4 = jpeg @BUILD_LOADER_PMAPS_TRUE@am__append_5 = pmaps @BUILD_LOADER_PNG_TRUE@am__append_6 = png @BUILD_LOADER_PSD_TRUE@am__append_7 = psd @BUILD_LOADER_TGA_TRUE@am__append_8 = tga @BUILD_LOADER_TIFF_TRUE@am__append_9 = tiff @BUILD_LOADER_WBMP_TRUE@am__append_10 = wbmp @BUILD_LOADER_XPM_TRUE@am__append_11 = xpm subdir = src/bin/loaders DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/efl_attribute.m4 \ $(top_srcdir)/m4/efl_coverage.m4 \ $(top_srcdir)/m4/efl_doxygen.m4 \ $(top_srcdir)/m4/efl_fnmatch.m4 \ $(top_srcdir)/m4/efl_path_max.m4 \ $(top_srcdir)/m4/efl_shm_open.m4 $(top_srcdir)/m4/efl_tests.m4 \ $(top_srcdir)/m4/evas_check_engine.m4 \ $(top_srcdir)/m4/evas_check_loader.m4 \ $(top_srcdir)/m4/evas_converter.m4 \ $(top_srcdir)/m4/evas_dither.m4 \ $(top_srcdir)/m4/evas_scaler.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-recursive dvi-recursive html-recursive info-recursive \ install-data-recursive install-dvi-recursive \ install-exec-recursive install-html-recursive \ install-info-recursive install-pdf-recursive \ install-ps-recursive install-recursive installcheck-recursive \ installdirs-recursive pdf-recursive ps-recursive \ tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ $(RECURSIVE_TARGETS) \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ distdir am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DIST_SUBDIRS = bmp eet ico jpeg pmaps png psd tga tiff wbmp xpm DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHECK_CFLAGS = @CHECK_CFLAGS@ CHECK_LIBS = @CHECK_LIBS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@ DIRECTFB_LIBS = @DIRECTFB_LIBS@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ ECORE_EVAS_CFLAGS = @ECORE_EVAS_CFLAGS@ ECORE_EVAS_LIBS = @ECORE_EVAS_LIBS@ EDB_CFLAGS = @EDB_CFLAGS@ EDB_LIBS = @EDB_LIBS@ EDJE_CFLAGS = @EDJE_CFLAGS@ EDJE_LIBS = @EDJE_LIBS@ EET_CFLAGS = @EET_CFLAGS@ EET_LIBS = @EET_LIBS@ EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@ EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@ EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@ EFL_SHM_OPEN_LIBS = @EFL_SHM_OPEN_LIBS@ EGREP = @EGREP@ EINA_CFLAGS = @EINA_CFLAGS@ EINA_LIBS = @EINA_LIBS@ EVAS_CFLAGS = @EVAS_CFLAGS@ EVAS_GENERAL_CFLAGS = @EVAS_GENERAL_CFLAGS@ EVAS_GENERAL_LIBS = @EVAS_GENERAL_LIBS@ EVAS_LIBS = @EVAS_LIBS@ EVAS_SSE3_CFLAGS = @EVAS_SSE3_CFLAGS@ EVIL_CFLAGS = @EVIL_CFLAGS@ EVIL_LIBS = @EVIL_LIBS@ EXEEXT = @EXEEXT@ EXOTIC_CFLAGS = @EXOTIC_CFLAGS@ EXOTIC_LIBS = @EXOTIC_LIBS@ FGREP = @FGREP@ FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@ FONTCONFIG_LIBS = @FONTCONFIG_LIBS@ FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ FREETYPE_LIBS = @FREETYPE_LIBS@ FRIBIDI_CFLAGS = @FRIBIDI_CFLAGS@ FRIBIDI_LIBS = @FRIBIDI_LIBS@ GL_EET_CFLAGS = @GL_EET_CFLAGS@ GL_EET_LIBS = @GL_EET_LIBS@ GREP = @GREP@ HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@ HARFBUZZ_LIBS = @HARFBUZZ_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LINEBREAK_CFLAGS = @LINEBREAK_CFLAGS@ LINEBREAK_LIBS = @LINEBREAK_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MODULE_ARCH = @MODULE_ARCH@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ SDL_CFLAGS = @SDL_CFLAGS@ SDL_LIBS = @SDL_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ SVG_CFLAGS = @SVG_CFLAGS@ SVG_LIBS = @SVG_LIBS@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ XCB_CFLAGS = @XCB_CFLAGS@ XCB_GL_CFLAGS = @XCB_GL_CFLAGS@ XCB_GL_LIBS = @XCB_GL_LIBS@ XCB_LIBS = @XCB_LIBS@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_ct_OBJC = @ac_ct_OBJC@ altivec_cflags = @altivec_cflags@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ dlopen_libs = @dlopen_libs@ docdir = @docdir@ dvidir = @dvidir@ edje_cc = @edje_cc@ efl_doxygen = @efl_doxygen@ efl_have_doxygen = @efl_have_doxygen@ evas_engine_buffer_cflags = @evas_engine_buffer_cflags@ evas_engine_buffer_libs = @evas_engine_buffer_libs@ evas_engine_direct3d_cflags = @evas_engine_direct3d_cflags@ evas_engine_direct3d_libs = @evas_engine_direct3d_libs@ evas_engine_directfb_cflags = @evas_engine_directfb_cflags@ evas_engine_directfb_libs = @evas_engine_directfb_libs@ evas_engine_fb_cflags = @evas_engine_fb_cflags@ evas_engine_fb_libs = @evas_engine_fb_libs@ evas_engine_gl_cocoa_cflags = @evas_engine_gl_cocoa_cflags@ evas_engine_gl_cocoa_libs = @evas_engine_gl_cocoa_libs@ evas_engine_gl_common_libs = @evas_engine_gl_common_libs@ evas_engine_gl_sdl_cflags = @evas_engine_gl_sdl_cflags@ evas_engine_gl_sdl_libs = @evas_engine_gl_sdl_libs@ evas_engine_gl_xcb_cflags = @evas_engine_gl_xcb_cflags@ evas_engine_gl_xcb_libs = @evas_engine_gl_xcb_libs@ evas_engine_gl_xlib_cflags = @evas_engine_gl_xlib_cflags@ evas_engine_gl_xlib_libs = @evas_engine_gl_xlib_libs@ evas_engine_psl1ght_cflags = @evas_engine_psl1ght_cflags@ evas_engine_psl1ght_libs = @evas_engine_psl1ght_libs@ evas_engine_software_16_sdl_cflags = @evas_engine_software_16_sdl_cflags@ evas_engine_software_16_sdl_libs = @evas_engine_software_16_sdl_libs@ evas_engine_software_16_wince_cflags = @evas_engine_software_16_wince_cflags@ evas_engine_software_16_wince_libs = @evas_engine_software_16_wince_libs@ evas_engine_software_16_x11_cflags = @evas_engine_software_16_x11_cflags@ evas_engine_software_16_x11_libs = @evas_engine_software_16_x11_libs@ evas_engine_software_8_x11_cflags = @evas_engine_software_8_x11_cflags@ evas_engine_software_8_x11_libs = @evas_engine_software_8_x11_libs@ evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@ evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@ evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@ evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ evas_image_loader_edb_libs = @evas_image_loader_edb_libs@ evas_image_loader_eet_cflags = @evas_image_loader_eet_cflags@ evas_image_loader_eet_libs = @evas_image_loader_eet_libs@ evas_image_loader_generic_cflags = @evas_image_loader_generic_cflags@ evas_image_loader_generic_libs = @evas_image_loader_generic_libs@ evas_image_loader_gif_cflags = @evas_image_loader_gif_cflags@ evas_image_loader_gif_libs = @evas_image_loader_gif_libs@ evas_image_loader_ico_cflags = @evas_image_loader_ico_cflags@ evas_image_loader_ico_libs = @evas_image_loader_ico_libs@ evas_image_loader_jpeg_cflags = @evas_image_loader_jpeg_cflags@ evas_image_loader_jpeg_libs = @evas_image_loader_jpeg_libs@ evas_image_loader_pmaps_cflags = @evas_image_loader_pmaps_cflags@ evas_image_loader_pmaps_libs = @evas_image_loader_pmaps_libs@ evas_image_loader_png_cflags = @evas_image_loader_png_cflags@ evas_image_loader_png_libs = @evas_image_loader_png_libs@ evas_image_loader_psd_cflags = @evas_image_loader_psd_cflags@ evas_image_loader_psd_libs = @evas_image_loader_psd_libs@ evas_image_loader_svg_cflags = @evas_image_loader_svg_cflags@ evas_image_loader_svg_libs = @evas_image_loader_svg_libs@ evas_image_loader_tga_cflags = @evas_image_loader_tga_cflags@ evas_image_loader_tga_libs = @evas_image_loader_tga_libs@ evas_image_loader_tiff_cflags = @evas_image_loader_tiff_cflags@ evas_image_loader_tiff_libs = @evas_image_loader_tiff_libs@ evas_image_loader_wbmp_cflags = @evas_image_loader_wbmp_cflags@ evas_image_loader_wbmp_libs = @evas_image_loader_wbmp_libs@ evas_image_loader_xpm_cflags = @evas_image_loader_xpm_cflags@ evas_image_loader_xpm_libs = @evas_image_loader_xpm_libs@ exec_prefix = @exec_prefix@ have_evas_engine_gl_x11 = @have_evas_engine_gl_x11@ have_evas_engine_gl_xcb = @have_evas_engine_gl_xcb@ have_evas_engine_gl_xlib = @have_evas_engine_gl_xlib@ have_evas_engine_software_x11 = @have_evas_engine_software_x11@ have_evas_engine_software_xcb = @have_evas_engine_software_xcb@ have_evas_engine_software_xlib = @have_evas_engine_software_xlib@ have_lcov = @have_lcov@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_enable_auto_import = @lt_enable_auto_import@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgconfig_requires_private = @pkgconfig_requires_private@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pthread_cflags = @pthread_cflags@ pthread_libs = @pthread_libs@ release_info = @release_info@ requirement_evas = @requirement_evas@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ shm_open_libs = @shm_open_libs@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ version_info = @version_info@ MAINTAINERCLEANFILES = Makefile.in SUBDIRS = $(am__append_1) $(am__append_2) $(am__append_3) \ $(am__append_4) $(am__append_5) $(am__append_6) \ $(am__append_7) $(am__append_8) $(am__append_9) \ $(am__append_10) $(am__append_11) all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/bin/loaders/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/bin/loaders/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs # This directory's subdirectories are mostly independent; you can cd # into them and run 'make' without going through this Makefile. # To change the values of 'make' variables: instead of editing Makefiles, # (1) if the variable is set in 'config.status', edit 'config.status' # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. $(am__recursive_targets): @fail=; \ if $(am__make_keepgoing); then \ failcom='fail=yes'; \ else \ failcom='exit 1'; \ fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-recursive TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-recursive CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-recursive cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: .MAKE: $(am__recursive_targets) install-am install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \ check-am clean clean-generic clean-libtool cscopelist-am ctags \ ctags-am distclean distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ installdirs-am maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: evas-1.7.9/src/bin/loaders/tga/0000775000175000017500000000000012234557316013244 500000000000000evas-1.7.9/src/bin/loaders/tga/Makefile.in0000664000175000017500000007174712234557301015243 00000000000000# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/bin/loaders/tga DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/efl_attribute.m4 \ $(top_srcdir)/m4/efl_coverage.m4 \ $(top_srcdir)/m4/efl_doxygen.m4 \ $(top_srcdir)/m4/efl_fnmatch.m4 \ $(top_srcdir)/m4/efl_path_max.m4 \ $(top_srcdir)/m4/efl_shm_open.m4 $(top_srcdir)/m4/efl_tests.m4 \ $(top_srcdir)/m4/evas_check_engine.m4 \ $(top_srcdir)/m4/evas_check_loader.m4 \ $(top_srcdir)/m4/evas_converter.m4 \ $(top_srcdir)/m4/evas_dither.m4 \ $(top_srcdir)/m4/evas_scaler.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(pkgdir)" LTLIBRARIES = $(pkg_LTLIBRARIES) module_la_DEPENDENCIES = am__module_la_SOURCES_DIST = evas_image_load_tga.c @BUILD_LOADER_TGA_TRUE@am_module_la_OBJECTS = \ @BUILD_LOADER_TGA_TRUE@ module_la-evas_image_load_tga.lo module_la_OBJECTS = $(am_module_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = module_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(AM_CFLAGS) $(CFLAGS) $(module_la_LDFLAGS) $(LDFLAGS) -o $@ @BUILD_LOADER_TGA_TRUE@am_module_la_rpath = -rpath $(pkgdir) AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(module_la_SOURCES) DIST_SOURCES = $(am__module_la_SOURCES_DIST) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHECK_CFLAGS = @CHECK_CFLAGS@ CHECK_LIBS = @CHECK_LIBS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@ DIRECTFB_LIBS = @DIRECTFB_LIBS@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ ECORE_EVAS_CFLAGS = @ECORE_EVAS_CFLAGS@ ECORE_EVAS_LIBS = @ECORE_EVAS_LIBS@ EDB_CFLAGS = @EDB_CFLAGS@ EDB_LIBS = @EDB_LIBS@ EDJE_CFLAGS = @EDJE_CFLAGS@ EDJE_LIBS = @EDJE_LIBS@ EET_CFLAGS = @EET_CFLAGS@ EET_LIBS = @EET_LIBS@ EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@ EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@ EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@ EFL_SHM_OPEN_LIBS = @EFL_SHM_OPEN_LIBS@ EGREP = @EGREP@ EINA_CFLAGS = @EINA_CFLAGS@ EINA_LIBS = @EINA_LIBS@ EVAS_CFLAGS = @EVAS_CFLAGS@ EVAS_GENERAL_CFLAGS = @EVAS_GENERAL_CFLAGS@ EVAS_GENERAL_LIBS = @EVAS_GENERAL_LIBS@ EVAS_LIBS = @EVAS_LIBS@ EVAS_SSE3_CFLAGS = @EVAS_SSE3_CFLAGS@ EVIL_CFLAGS = @EVIL_CFLAGS@ EVIL_LIBS = @EVIL_LIBS@ EXEEXT = @EXEEXT@ EXOTIC_CFLAGS = @EXOTIC_CFLAGS@ EXOTIC_LIBS = @EXOTIC_LIBS@ FGREP = @FGREP@ FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@ FONTCONFIG_LIBS = @FONTCONFIG_LIBS@ FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ FREETYPE_LIBS = @FREETYPE_LIBS@ FRIBIDI_CFLAGS = @FRIBIDI_CFLAGS@ FRIBIDI_LIBS = @FRIBIDI_LIBS@ GL_EET_CFLAGS = @GL_EET_CFLAGS@ GL_EET_LIBS = @GL_EET_LIBS@ GREP = @GREP@ HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@ HARFBUZZ_LIBS = @HARFBUZZ_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LINEBREAK_CFLAGS = @LINEBREAK_CFLAGS@ LINEBREAK_LIBS = @LINEBREAK_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MODULE_ARCH = @MODULE_ARCH@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ SDL_CFLAGS = @SDL_CFLAGS@ SDL_LIBS = @SDL_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ SVG_CFLAGS = @SVG_CFLAGS@ SVG_LIBS = @SVG_LIBS@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ XCB_CFLAGS = @XCB_CFLAGS@ XCB_GL_CFLAGS = @XCB_GL_CFLAGS@ XCB_GL_LIBS = @XCB_GL_LIBS@ XCB_LIBS = @XCB_LIBS@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_ct_OBJC = @ac_ct_OBJC@ altivec_cflags = @altivec_cflags@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ dlopen_libs = @dlopen_libs@ docdir = @docdir@ dvidir = @dvidir@ edje_cc = @edje_cc@ efl_doxygen = @efl_doxygen@ efl_have_doxygen = @efl_have_doxygen@ evas_engine_buffer_cflags = @evas_engine_buffer_cflags@ evas_engine_buffer_libs = @evas_engine_buffer_libs@ evas_engine_direct3d_cflags = @evas_engine_direct3d_cflags@ evas_engine_direct3d_libs = @evas_engine_direct3d_libs@ evas_engine_directfb_cflags = @evas_engine_directfb_cflags@ evas_engine_directfb_libs = @evas_engine_directfb_libs@ evas_engine_fb_cflags = @evas_engine_fb_cflags@ evas_engine_fb_libs = @evas_engine_fb_libs@ evas_engine_gl_cocoa_cflags = @evas_engine_gl_cocoa_cflags@ evas_engine_gl_cocoa_libs = @evas_engine_gl_cocoa_libs@ evas_engine_gl_common_libs = @evas_engine_gl_common_libs@ evas_engine_gl_sdl_cflags = @evas_engine_gl_sdl_cflags@ evas_engine_gl_sdl_libs = @evas_engine_gl_sdl_libs@ evas_engine_gl_xcb_cflags = @evas_engine_gl_xcb_cflags@ evas_engine_gl_xcb_libs = @evas_engine_gl_xcb_libs@ evas_engine_gl_xlib_cflags = @evas_engine_gl_xlib_cflags@ evas_engine_gl_xlib_libs = @evas_engine_gl_xlib_libs@ evas_engine_psl1ght_cflags = @evas_engine_psl1ght_cflags@ evas_engine_psl1ght_libs = @evas_engine_psl1ght_libs@ evas_engine_software_16_sdl_cflags = @evas_engine_software_16_sdl_cflags@ evas_engine_software_16_sdl_libs = @evas_engine_software_16_sdl_libs@ evas_engine_software_16_wince_cflags = @evas_engine_software_16_wince_cflags@ evas_engine_software_16_wince_libs = @evas_engine_software_16_wince_libs@ evas_engine_software_16_x11_cflags = @evas_engine_software_16_x11_cflags@ evas_engine_software_16_x11_libs = @evas_engine_software_16_x11_libs@ evas_engine_software_8_x11_cflags = @evas_engine_software_8_x11_cflags@ evas_engine_software_8_x11_libs = @evas_engine_software_8_x11_libs@ evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@ evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@ evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@ evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ evas_image_loader_edb_libs = @evas_image_loader_edb_libs@ evas_image_loader_eet_cflags = @evas_image_loader_eet_cflags@ evas_image_loader_eet_libs = @evas_image_loader_eet_libs@ evas_image_loader_generic_cflags = @evas_image_loader_generic_cflags@ evas_image_loader_generic_libs = @evas_image_loader_generic_libs@ evas_image_loader_gif_cflags = @evas_image_loader_gif_cflags@ evas_image_loader_gif_libs = @evas_image_loader_gif_libs@ evas_image_loader_ico_cflags = @evas_image_loader_ico_cflags@ evas_image_loader_ico_libs = @evas_image_loader_ico_libs@ evas_image_loader_jpeg_cflags = @evas_image_loader_jpeg_cflags@ evas_image_loader_jpeg_libs = @evas_image_loader_jpeg_libs@ evas_image_loader_pmaps_cflags = @evas_image_loader_pmaps_cflags@ evas_image_loader_pmaps_libs = @evas_image_loader_pmaps_libs@ evas_image_loader_png_cflags = @evas_image_loader_png_cflags@ evas_image_loader_png_libs = @evas_image_loader_png_libs@ evas_image_loader_psd_cflags = @evas_image_loader_psd_cflags@ evas_image_loader_psd_libs = @evas_image_loader_psd_libs@ evas_image_loader_svg_cflags = @evas_image_loader_svg_cflags@ evas_image_loader_svg_libs = @evas_image_loader_svg_libs@ evas_image_loader_tga_cflags = @evas_image_loader_tga_cflags@ evas_image_loader_tga_libs = @evas_image_loader_tga_libs@ evas_image_loader_tiff_cflags = @evas_image_loader_tiff_cflags@ evas_image_loader_tiff_libs = @evas_image_loader_tiff_libs@ evas_image_loader_wbmp_cflags = @evas_image_loader_wbmp_cflags@ evas_image_loader_wbmp_libs = @evas_image_loader_wbmp_libs@ evas_image_loader_xpm_cflags = @evas_image_loader_xpm_cflags@ evas_image_loader_xpm_libs = @evas_image_loader_xpm_libs@ exec_prefix = @exec_prefix@ have_evas_engine_gl_x11 = @have_evas_engine_gl_x11@ have_evas_engine_gl_xcb = @have_evas_engine_gl_xcb@ have_evas_engine_gl_xlib = @have_evas_engine_gl_xlib@ have_evas_engine_software_x11 = @have_evas_engine_software_x11@ have_evas_engine_software_xcb = @have_evas_engine_software_xcb@ have_evas_engine_software_xlib = @have_evas_engine_software_xlib@ have_lcov = @have_lcov@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_enable_auto_import = @lt_enable_auto_import@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgconfig_requires_private = @pkgconfig_requires_private@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pthread_cflags = @pthread_cflags@ pthread_libs = @pthread_libs@ release_info = @release_info@ requirement_evas = @requirement_evas@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ shm_open_libs = @shm_open_libs@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ version_info = @version_info@ MAINTAINERCLEANFILES = Makefile.in AM_CPPFLAGS = \ -I. \ -I$(top_srcdir)/src/lib \ -I$(top_srcdir)/src/lib/include \ -I$(top_srcdir)/src/lib/cserve2 \ -I$(top_srcdir)/src/bin \ @EVAS_GENERAL_CFLAGS@ \ @EVIL_CFLAGS@ #if !EVAS_STATIC_BUILD_TGA @BUILD_LOADER_TGA_TRUE@pkgdir = $(libdir)/evas/cserve2/loaders/tga/$(MODULE_ARCH) @BUILD_LOADER_TGA_TRUE@pkg_LTLIBRARIES = module.la @BUILD_LOADER_TGA_TRUE@module_la_SOURCES = evas_image_load_tga.c @BUILD_LOADER_TGA_TRUE@module_la_LIBADD = @EVAS_GENERAL_LIBS@ @EVIL_LIBS@ @BUILD_LOADER_TGA_TRUE@module_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -module -avoid-version @BUILD_LOADER_TGA_TRUE@module_la_LIBTOOLFLAGS = --tag=disable-static all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/bin/loaders/tga/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/bin/loaders/tga/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-pkgLTLIBRARIES: $(pkg_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(pkg_LTLIBRARIES)'; test -n "$(pkgdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(pkgdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(pkgdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkgdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkgdir)"; \ } uninstall-pkgLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(pkg_LTLIBRARIES)'; test -n "$(pkgdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkgdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkgdir)/$$f"; \ done clean-pkgLTLIBRARIES: -test -z "$(pkg_LTLIBRARIES)" || rm -f $(pkg_LTLIBRARIES) @list='$(pkg_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } module.la: $(module_la_OBJECTS) $(module_la_DEPENDENCIES) $(EXTRA_module_la_DEPENDENCIES) $(AM_V_CCLD)$(module_la_LINK) $(am_module_la_rpath) $(module_la_OBJECTS) $(module_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/module_la-evas_image_load_tga.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< module_la-evas_image_load_tga.lo: evas_image_load_tga.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT module_la-evas_image_load_tga.lo -MD -MP -MF $(DEPDIR)/module_la-evas_image_load_tga.Tpo -c -o module_la-evas_image_load_tga.lo `test -f 'evas_image_load_tga.c' || echo '$(srcdir)/'`evas_image_load_tga.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/module_la-evas_image_load_tga.Tpo $(DEPDIR)/module_la-evas_image_load_tga.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='evas_image_load_tga.c' object='module_la-evas_image_load_tga.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o module_la-evas_image_load_tga.lo `test -f 'evas_image_load_tga.c' || echo '$(srcdir)/'`evas_image_load_tga.c mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: for dir in "$(DESTDIR)$(pkgdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool clean-pkgLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-pkgLTLIBRARIES install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-pkgLTLIBRARIES .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-libtool clean-pkgLTLIBRARIES cscopelist-am ctags \ ctags-am distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-pkgLTLIBRARIES install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am uninstall-pkgLTLIBRARIES #else #noinst_LTLIBRARIES = libevas_loader_tga.la #libevas_loader_tga_la_SOURCES = evas_image_load_tga.c #libevas_loader_tga_la_LIBADD = #endif # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: evas-1.7.9/src/bin/loaders/tga/evas_image_load_tga.c0000664000175000017500000004631412175475547017303 00000000000000#ifdef HAVE_CONFIG_H # include #endif #include #include #include #ifdef HAVE_EVIL # include #endif #include "evas_macros.h" #include "evas_cserve2.h" #include "evas_cserve2_slave.h" /* TGA pixel formats */ #define TGA_TYPE_MAPPED 1 // handle #define TGA_TYPE_COLOR 2 #define TGA_TYPE_GRAY 3 #define TGA_TYPE_MAPPED_RLE 9 // handle #define TGA_TYPE_COLOR_RLE 10 #define TGA_TYPE_GRAY_RLE 11 /* TGA header flags */ #define TGA_DESC_ABITS 0x0f #define TGA_DESC_HORIZONTAL 0x10 #define TGA_DESC_VERTICAL 0x20 #define TGA_SIGNATURE "TRUEVISION-XFILE" typedef struct _tga_header tga_header; typedef struct _tga_footer tga_footer; struct _tga_header { unsigned char idLength; unsigned char colorMapType; unsigned char imageType; unsigned char colorMapIndexLo, colorMapIndexHi; unsigned char colorMapLengthLo, colorMapLengthHi; unsigned char colorMapSize; unsigned char xOriginLo, xOriginHi; unsigned char yOriginLo, yOriginHi; unsigned char widthLo, widthHi; unsigned char heightLo, heightHi; unsigned char bpp; unsigned char descriptor; } __attribute__((packed)); struct _tga_footer { unsigned int extensionAreaOffset; unsigned int developerDirectoryOffset; char signature[16]; char dot; char null; } __attribute__((packed)); static Eina_Bool evas_image_load_file_head_tga(Evas_Img_Load_Params *ilp, const char *file, const char *key __UNUSED__, int *error) { Eina_File *f; unsigned char *seg = NULL, *filedata; tga_header *header; tga_footer *footer, tfooter; char hasa = 0; int w = 0, h = 0, bpp; int x, y; f = eina_file_open(file, EINA_FALSE); *error = EVAS_LOAD_ERROR_DOES_NOT_EXIST; if (f == NULL) return EINA_FALSE; *error = EVAS_LOAD_ERROR_UNKNOWN_FORMAT; if (eina_file_size_get(f) < (off_t)(sizeof(tga_header) + sizeof(tga_footer))) goto close_file; seg = eina_file_map_all(f, EINA_FILE_SEQUENTIAL); if (seg == NULL) goto close_file; filedata = seg; header = (tga_header *)filedata; // no unaligned data accessed, so ok footer = (tga_footer *)(filedata + (eina_file_size_get(f) - sizeof(tga_footer))); memcpy((unsigned char *)(&tfooter), (unsigned char *)footer, sizeof(tga_footer)); //printf("0\n"); if (!memcmp(tfooter.signature, TGA_SIGNATURE, sizeof(tfooter.signature))) { if ((tfooter.dot == '.') && (tfooter.null == 0)) { // footer is there and matches. this is a tga file - any problems now // are a corrupt file *error = EVAS_LOAD_ERROR_CORRUPT_FILE; } } // else goto close_file; //printf("1\n"); filedata = (unsigned char *)filedata + sizeof(tga_header); switch (header->imageType) { case TGA_TYPE_COLOR_RLE: case TGA_TYPE_GRAY_RLE: // rle = 1; break; case TGA_TYPE_COLOR: case TGA_TYPE_GRAY: // rle = 0; break; default: goto close_file; } bpp = header->bpp; if (!((bpp == 32) || (bpp == 24) || (bpp == 16) || (bpp == 8))) goto close_file; if ((bpp == 32) && (header->descriptor & TGA_DESC_ABITS)) hasa = 1; // don't handle colormapped images if ((header->colorMapType) != 0) goto close_file; // if colormap size is anything other than legal sizes or 0 - not real tga if (!((header->colorMapSize == 0) || (header->colorMapSize == 15) || (header->colorMapSize == 16) || (header->colorMapSize == 24) || (header->colorMapSize == 32))) goto close_file; x = (header->xOriginHi << 8) | (header->xOriginLo); y = (header->yOriginHi << 8) | (header->yOriginLo); w = (header->widthHi << 8) | header->widthLo; h = (header->heightHi << 8) | header->heightLo; // x origin gerater that width, y origin greater than height - wrong file if ((x >= w) || (y >= h)) goto close_file; // if descriptor has either of the top 2 bits set... not tga if (header->descriptor & 0xc0) goto close_file; if ((w < 1) || (h < 1) || (w > IMG_MAX_SIZE) || (h > IMG_MAX_SIZE) || IMG_TOO_BIG(w, h)) goto close_file; ilp->w = w; ilp->h = h; if (hasa) ilp->alpha = 1; eina_file_map_free(f, seg); eina_file_close(f); *error = EVAS_LOAD_ERROR_NONE; return EINA_TRUE; close_file: if (seg != NULL) eina_file_map_free(f, seg); eina_file_close(f); return EINA_FALSE; } static Eina_Bool evas_image_load_file_data_tga(Evas_Img_Load_Params *ilp, const char *file, const char *key __UNUSED__, int *error) { Eina_File *f; unsigned char *seg = NULL, *filedata; tga_header *header; tga_footer *footer, tfooter; char hasa = 0, footer_present = 0, vinverted = 0, rle = 0; int w = 0, h = 0, x, y, bpp; off_t size; unsigned int *surface, *dataptr; unsigned int datasize; unsigned char *bufptr, *bufend; int abits; f = eina_file_open(file, EINA_FALSE); *error = EVAS_LOAD_ERROR_DOES_NOT_EXIST; if (f == NULL) return EINA_FALSE; *error = EVAS_LOAD_ERROR_UNKNOWN_FORMAT; if (eina_file_size_get(f) < (off_t)(sizeof(tga_header) + sizeof(tga_footer))) goto close_file; seg = eina_file_map_all(f, EINA_FILE_SEQUENTIAL); if (seg == NULL) goto close_file; filedata = seg; size = eina_file_size_get(f); header = (tga_header *)filedata; // no unaligned data accessed, so ok footer = (tga_footer *)(filedata + (size - sizeof(tga_footer))); memcpy((unsigned char *)&tfooter, (unsigned char *)footer, sizeof(tga_footer)); if (!memcmp(tfooter.signature, TGA_SIGNATURE, sizeof(tfooter.signature))) { if ((tfooter.dot == '.') && (tfooter.null == 0)) { // footer is there and matches. this is a tga file - any problems now // are a corrupt file *error = EVAS_LOAD_ERROR_CORRUPT_FILE; footer_present = 1; } } filedata = (unsigned char *)filedata + sizeof(tga_header); vinverted = !(header->descriptor & TGA_DESC_VERTICAL); switch (header->imageType) { case TGA_TYPE_COLOR_RLE: case TGA_TYPE_GRAY_RLE: rle = 1; break; case TGA_TYPE_COLOR: case TGA_TYPE_GRAY: rle = 0; break; default: goto close_file; } bpp = header->bpp; if (!((bpp == 32) || (bpp == 24) || (bpp == 16) || (bpp == 8))) goto close_file; if ((bpp == 32) && (header->descriptor & TGA_DESC_ABITS)) hasa = 1; abits = header->descriptor & TGA_DESC_ABITS; // don't handle colormapped images if ((header->colorMapType) != 0) goto close_file; // if colormap size is anything other than legal sizes or 0 - not real tga if (!((header->colorMapSize == 0) || (header->colorMapSize == 15) || (header->colorMapSize == 16) || (header->colorMapSize == 24) || (header->colorMapSize == 32))) goto close_file; x = (header->xOriginHi << 8) | (header->xOriginLo); y = (header->yOriginHi << 8) | (header->yOriginLo); w = (header->widthHi << 8) | header->widthLo; h = (header->heightHi << 8) | header->heightLo; // x origin gerater that width, y origin greater than height - wrong file if ((x >= w) || (y >= h)) goto close_file; // if descriptor has either of the top 2 bits set... not tga if (header->descriptor & 0xc0) goto close_file; if ((w < 1) || (h < 1) || (w > IMG_MAX_SIZE) || (h > IMG_MAX_SIZE) || IMG_TOO_BIG(w, h)) goto close_file; if ((w != (int)ilp->w) || (h != (int)ilp->h)) { *error = EVAS_LOAD_ERROR_GENERIC; goto close_file; } surface = ilp->buffer; if (!surface) { *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; goto close_file; } datasize = size - sizeof(tga_header) - header->idLength; if (footer_present) datasize = size - sizeof(tga_header) - header->idLength - sizeof(tga_footer); bufptr = filedata + header->idLength; bufend = filedata + datasize; if (!rle) { for (y = 0; y < h; y++) { if (vinverted) /* some TGA's are stored upside-down! */ dataptr = surface + ((h - y - 1) * w); else dataptr = surface + (y * w); switch (bpp) { case 32: for (x = 0; (x < w) && ((bufptr + 4) <= bufend); x++) { if (hasa) { int a = bufptr[3]; switch (abits) { case 1: a = (a << 7) | (a << 6) | (a << 5) | (a << 4) | (a << 3) | (a << 2) | (a << 1) | (a); case 2: a = (a << 6) | (a << 4) | (a << 2) | (a); case 3: a = (a << 5) | (a << 2) | (a >> 1); case 4: a = (a << 4) | (a); case 5: a = (a << 3) | (a >> 2); case 6: a = (a << 2) | (a >> 4); case 7: a = (a << 1) | (a >> 6); default: break; } *dataptr = ARGB_JOIN(a, bufptr[2], bufptr[1], bufptr[0]); } else *dataptr = ARGB_JOIN(0xff, bufptr[2], bufptr[1], bufptr[0]); dataptr++; bufptr += 4; } break; case 24: for (x = 0; (x < w) && ((bufptr + 3) <= bufend); x++) { *dataptr = ARGB_JOIN(0xff, bufptr[2], bufptr[1], bufptr[0]); dataptr++; bufptr += 3; } break; case 16: for (x = 0; (x < w) && ((bufptr + 3) <= bufend); x++) { unsigned char r, g, b, a; unsigned short tmp; tmp = (((unsigned short)bufptr[1]) << 8) | (((unsigned short)bufptr[0])); r = (tmp >> 7) & 0xf8; r |= r >> 5; g = (tmp >> 2) & 0xf8; g |= g >> 5; b = (tmp << 3) & 0xf8; b |= b >> 5; a = 0xff; if ((hasa) && (tmp & 0x8000)) a = 0; *dataptr = ARGB_JOIN(a, r, g, b); dataptr++; bufptr += 2; } break; case 8: for (x = 0; (x < w) && ((bufptr + 1) <= bufend); x++) { *dataptr = ARGB_JOIN(0xff, bufptr[0], bufptr[0], bufptr[0]); dataptr++; bufptr += 1; } break; default: break; } } } else { int count, i; unsigned char val; unsigned int *dataend; dataptr = surface; dataend = dataptr + (w * h); while ((bufptr < bufend) && (dataptr < dataend)) { val = *bufptr; bufptr++; count = (val & 0x7f) + 1; if (val & 0x80) // rel packet { switch (bpp) { case 32: if (bufptr < (bufend - 4)) { unsigned char r, g, b; int a = bufptr[3]; switch (abits) { case 1: a = (a << 7) | (a << 6) | (a << 5) | (a << 4) | (a << 3) | (a << 2) | (a << 1) | (a); case 2: a = (a << 6) | (a << 4) | (a << 2) | (a); case 3: a = (a << 5) | (a << 2) | (a >> 1); case 4: a = (a << 4) | (a); case 5: a = (a << 3) | (a >> 2); case 6: a = (a << 2) | (a >> 4); case 7: a = (a << 1) | (a >> 6); default: break; } r = bufptr[2]; g = bufptr[1]; b = bufptr[0]; if (!hasa) a = 0xff; bufptr += 4; for (i = 0; (i < count) && (dataptr < dataend); i++) { *dataptr = ARGB_JOIN(a, r, g, b); dataptr++; } } break; case 24: if (bufptr < (bufend - 3)) { unsigned char r, g, b; r = bufptr[2]; g = bufptr[1]; b = bufptr[0]; bufptr += 3; for (i = 0; (i < count) && (dataptr < dataend); i++) { *dataptr = ARGB_JOIN(0xff, r, g, b); dataptr++; } } break; case 16: if (bufptr < (bufend - 2)) { unsigned char r, g, b, a; unsigned short tmp; tmp = (((unsigned short)bufptr[1]) << 8) | (((unsigned short)bufptr[0])); r = (tmp >> 7) & 0xf8; r |= r >> 5; g = (tmp >> 2) & 0xf8; g |= g >> 5; b = (tmp << 3) & 0xf8; b |= b >> 5; a = 0xff; if ((hasa) && (tmp & 0x8000)) a = 0; bufptr += 2; for (i = 0; (i < count) && (dataptr < dataend); i++) { *dataptr = ARGB_JOIN(a, r, g, b); dataptr++; } } break; case 8: if (bufptr < (bufend - 1)) { unsigned char g; g = bufptr[0]; bufptr += 1; for (i = 0; (i < count) && (dataptr < dataend); i++) { *dataptr = ARGB_JOIN(0xff, g, g, g); dataptr++; } } break; default: break; } } else // raw { switch (bpp) { case 32: for (i = 0; (i < count) && (bufptr < (bufend - 4)) && (dataptr < dataend); i++) { if (hasa) // *dataptr = ARGB_JOIN(255 - bufptr[3], bufptr[2], bufptr[1], bufptr[0]); *dataptr = ARGB_JOIN(bufptr[3], bufptr[2], bufptr[1], bufptr[0]); else *dataptr = ARGB_JOIN(0xff, bufptr[2], bufptr[1], bufptr[0]); dataptr++; bufptr += 4; } break; case 24: for (i = 0; (i < count) && (bufptr < (bufend - 3)) && (dataptr < dataend); i++) { *dataptr = ARGB_JOIN(0xff, bufptr[2], bufptr[1], bufptr[0]); dataptr++; bufptr += 3; } break; case 16: for (i = 0; (i < count) && (bufptr < (bufend - 2)) && (dataptr < dataend); i++) { unsigned char r, g, b, a; unsigned short tmp; tmp = (((unsigned short)bufptr[1]) << 8) | (((unsigned short)bufptr[0])); r = (tmp >> 7) & 0xf8; r |= r >> 5; g = (tmp >> 2) & 0xf8; g |= g >> 5; b = (tmp << 3) & 0xf8; b |= b >> 5; a = 0xff; if ((hasa) && (tmp & 0x8000)) a = 0; *dataptr = ARGB_JOIN(a, r, g, b); dataptr++; bufptr += 2; } break; case 8: for (i = 0; (i < count) && (bufptr < (bufend - 1)) && (dataptr < dataend); i++) { *dataptr = ARGB_JOIN(0xff, bufptr[0], bufptr[0], bufptr[0]); dataptr++; bufptr += 1; } break; default: break; } } } if (vinverted) { unsigned int *adv, *adv2, tmp; adv = surface; adv2 = surface + (w * (h - 1)); for (y = 0; y < (h / 2); y++) { for (x = 0; x < w; x++) { tmp = adv[x]; adv[x] = adv2[x]; adv2[x] = tmp; } adv2 -= w; adv += w; } } } evas_cserve2_image_premul(ilp); eina_file_map_free(f, seg); eina_file_close(f); *error = EVAS_LOAD_ERROR_NONE; return EINA_TRUE; close_file: if (seg != NULL) eina_file_map_free(f, seg); eina_file_close(f); return EINA_FALSE; } static Evas_Loader_Module_Api modapi = { EVAS_CSERVE2_MODULE_API_VERSION, "tga", evas_image_load_file_head_tga, evas_image_load_file_data_tga }; static Eina_Bool module_init(void) { return evas_cserve2_loader_register(&modapi); } static void module_shutdown(void) { } EINA_MODULE_INIT(module_init); EINA_MODULE_SHUTDOWN(module_shutdown); evas-1.7.9/src/bin/loaders/tga/Makefile.am0000664000175000017500000000133012175475547015226 00000000000000 MAINTAINERCLEANFILES = Makefile.in AM_CPPFLAGS = \ -I. \ -I$(top_srcdir)/src/lib \ -I$(top_srcdir)/src/lib/include \ -I$(top_srcdir)/src/lib/cserve2 \ -I$(top_srcdir)/src/bin \ @EVAS_GENERAL_CFLAGS@ \ @EVIL_CFLAGS@ if BUILD_LOADER_TGA #if !EVAS_STATIC_BUILD_TGA pkgdir = $(libdir)/evas/cserve2/loaders/tga/$(MODULE_ARCH) pkg_LTLIBRARIES = module.la module_la_SOURCES = evas_image_load_tga.c module_la_LIBADD = @EVAS_GENERAL_LIBS@ @EVIL_LIBS@ module_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -module -avoid-version module_la_LIBTOOLFLAGS = --tag=disable-static #else #noinst_LTLIBRARIES = libevas_loader_tga.la #libevas_loader_tga_la_SOURCES = evas_image_load_tga.c #libevas_loader_tga_la_LIBADD = #endif endif evas-1.7.9/src/bin/loaders/eet/0000775000175000017500000000000012234557316013246 500000000000000evas-1.7.9/src/bin/loaders/eet/Makefile.in0000664000175000017500000007204712234557301015237 00000000000000# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/bin/loaders/eet DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/efl_attribute.m4 \ $(top_srcdir)/m4/efl_coverage.m4 \ $(top_srcdir)/m4/efl_doxygen.m4 \ $(top_srcdir)/m4/efl_fnmatch.m4 \ $(top_srcdir)/m4/efl_path_max.m4 \ $(top_srcdir)/m4/efl_shm_open.m4 $(top_srcdir)/m4/efl_tests.m4 \ $(top_srcdir)/m4/evas_check_engine.m4 \ $(top_srcdir)/m4/evas_check_loader.m4 \ $(top_srcdir)/m4/evas_converter.m4 \ $(top_srcdir)/m4/evas_dither.m4 \ $(top_srcdir)/m4/evas_scaler.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(pkgdir)" LTLIBRARIES = $(pkg_LTLIBRARIES) module_la_DEPENDENCIES = am__module_la_SOURCES_DIST = evas_image_load_eet.c @BUILD_LOADER_EET_TRUE@am_module_la_OBJECTS = \ @BUILD_LOADER_EET_TRUE@ module_la-evas_image_load_eet.lo module_la_OBJECTS = $(am_module_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = module_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(AM_CFLAGS) $(CFLAGS) $(module_la_LDFLAGS) $(LDFLAGS) -o $@ @BUILD_LOADER_EET_TRUE@am_module_la_rpath = -rpath $(pkgdir) AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(module_la_SOURCES) DIST_SOURCES = $(am__module_la_SOURCES_DIST) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHECK_CFLAGS = @CHECK_CFLAGS@ CHECK_LIBS = @CHECK_LIBS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@ DIRECTFB_LIBS = @DIRECTFB_LIBS@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ ECORE_EVAS_CFLAGS = @ECORE_EVAS_CFLAGS@ ECORE_EVAS_LIBS = @ECORE_EVAS_LIBS@ EDB_CFLAGS = @EDB_CFLAGS@ EDB_LIBS = @EDB_LIBS@ EDJE_CFLAGS = @EDJE_CFLAGS@ EDJE_LIBS = @EDJE_LIBS@ EET_CFLAGS = @EET_CFLAGS@ EET_LIBS = @EET_LIBS@ EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@ EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@ EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@ EFL_SHM_OPEN_LIBS = @EFL_SHM_OPEN_LIBS@ EGREP = @EGREP@ EINA_CFLAGS = @EINA_CFLAGS@ EINA_LIBS = @EINA_LIBS@ EVAS_CFLAGS = @EVAS_CFLAGS@ EVAS_GENERAL_CFLAGS = @EVAS_GENERAL_CFLAGS@ EVAS_GENERAL_LIBS = @EVAS_GENERAL_LIBS@ EVAS_LIBS = @EVAS_LIBS@ EVAS_SSE3_CFLAGS = @EVAS_SSE3_CFLAGS@ EVIL_CFLAGS = @EVIL_CFLAGS@ EVIL_LIBS = @EVIL_LIBS@ EXEEXT = @EXEEXT@ EXOTIC_CFLAGS = @EXOTIC_CFLAGS@ EXOTIC_LIBS = @EXOTIC_LIBS@ FGREP = @FGREP@ FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@ FONTCONFIG_LIBS = @FONTCONFIG_LIBS@ FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ FREETYPE_LIBS = @FREETYPE_LIBS@ FRIBIDI_CFLAGS = @FRIBIDI_CFLAGS@ FRIBIDI_LIBS = @FRIBIDI_LIBS@ GL_EET_CFLAGS = @GL_EET_CFLAGS@ GL_EET_LIBS = @GL_EET_LIBS@ GREP = @GREP@ HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@ HARFBUZZ_LIBS = @HARFBUZZ_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LINEBREAK_CFLAGS = @LINEBREAK_CFLAGS@ LINEBREAK_LIBS = @LINEBREAK_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MODULE_ARCH = @MODULE_ARCH@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ SDL_CFLAGS = @SDL_CFLAGS@ SDL_LIBS = @SDL_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ SVG_CFLAGS = @SVG_CFLAGS@ SVG_LIBS = @SVG_LIBS@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ XCB_CFLAGS = @XCB_CFLAGS@ XCB_GL_CFLAGS = @XCB_GL_CFLAGS@ XCB_GL_LIBS = @XCB_GL_LIBS@ XCB_LIBS = @XCB_LIBS@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_ct_OBJC = @ac_ct_OBJC@ altivec_cflags = @altivec_cflags@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ dlopen_libs = @dlopen_libs@ docdir = @docdir@ dvidir = @dvidir@ edje_cc = @edje_cc@ efl_doxygen = @efl_doxygen@ efl_have_doxygen = @efl_have_doxygen@ evas_engine_buffer_cflags = @evas_engine_buffer_cflags@ evas_engine_buffer_libs = @evas_engine_buffer_libs@ evas_engine_direct3d_cflags = @evas_engine_direct3d_cflags@ evas_engine_direct3d_libs = @evas_engine_direct3d_libs@ evas_engine_directfb_cflags = @evas_engine_directfb_cflags@ evas_engine_directfb_libs = @evas_engine_directfb_libs@ evas_engine_fb_cflags = @evas_engine_fb_cflags@ evas_engine_fb_libs = @evas_engine_fb_libs@ evas_engine_gl_cocoa_cflags = @evas_engine_gl_cocoa_cflags@ evas_engine_gl_cocoa_libs = @evas_engine_gl_cocoa_libs@ evas_engine_gl_common_libs = @evas_engine_gl_common_libs@ evas_engine_gl_sdl_cflags = @evas_engine_gl_sdl_cflags@ evas_engine_gl_sdl_libs = @evas_engine_gl_sdl_libs@ evas_engine_gl_xcb_cflags = @evas_engine_gl_xcb_cflags@ evas_engine_gl_xcb_libs = @evas_engine_gl_xcb_libs@ evas_engine_gl_xlib_cflags = @evas_engine_gl_xlib_cflags@ evas_engine_gl_xlib_libs = @evas_engine_gl_xlib_libs@ evas_engine_psl1ght_cflags = @evas_engine_psl1ght_cflags@ evas_engine_psl1ght_libs = @evas_engine_psl1ght_libs@ evas_engine_software_16_sdl_cflags = @evas_engine_software_16_sdl_cflags@ evas_engine_software_16_sdl_libs = @evas_engine_software_16_sdl_libs@ evas_engine_software_16_wince_cflags = @evas_engine_software_16_wince_cflags@ evas_engine_software_16_wince_libs = @evas_engine_software_16_wince_libs@ evas_engine_software_16_x11_cflags = @evas_engine_software_16_x11_cflags@ evas_engine_software_16_x11_libs = @evas_engine_software_16_x11_libs@ evas_engine_software_8_x11_cflags = @evas_engine_software_8_x11_cflags@ evas_engine_software_8_x11_libs = @evas_engine_software_8_x11_libs@ evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@ evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@ evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@ evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ evas_image_loader_edb_libs = @evas_image_loader_edb_libs@ evas_image_loader_eet_cflags = @evas_image_loader_eet_cflags@ evas_image_loader_eet_libs = @evas_image_loader_eet_libs@ evas_image_loader_generic_cflags = @evas_image_loader_generic_cflags@ evas_image_loader_generic_libs = @evas_image_loader_generic_libs@ evas_image_loader_gif_cflags = @evas_image_loader_gif_cflags@ evas_image_loader_gif_libs = @evas_image_loader_gif_libs@ evas_image_loader_ico_cflags = @evas_image_loader_ico_cflags@ evas_image_loader_ico_libs = @evas_image_loader_ico_libs@ evas_image_loader_jpeg_cflags = @evas_image_loader_jpeg_cflags@ evas_image_loader_jpeg_libs = @evas_image_loader_jpeg_libs@ evas_image_loader_pmaps_cflags = @evas_image_loader_pmaps_cflags@ evas_image_loader_pmaps_libs = @evas_image_loader_pmaps_libs@ evas_image_loader_png_cflags = @evas_image_loader_png_cflags@ evas_image_loader_png_libs = @evas_image_loader_png_libs@ evas_image_loader_psd_cflags = @evas_image_loader_psd_cflags@ evas_image_loader_psd_libs = @evas_image_loader_psd_libs@ evas_image_loader_svg_cflags = @evas_image_loader_svg_cflags@ evas_image_loader_svg_libs = @evas_image_loader_svg_libs@ evas_image_loader_tga_cflags = @evas_image_loader_tga_cflags@ evas_image_loader_tga_libs = @evas_image_loader_tga_libs@ evas_image_loader_tiff_cflags = @evas_image_loader_tiff_cflags@ evas_image_loader_tiff_libs = @evas_image_loader_tiff_libs@ evas_image_loader_wbmp_cflags = @evas_image_loader_wbmp_cflags@ evas_image_loader_wbmp_libs = @evas_image_loader_wbmp_libs@ evas_image_loader_xpm_cflags = @evas_image_loader_xpm_cflags@ evas_image_loader_xpm_libs = @evas_image_loader_xpm_libs@ exec_prefix = @exec_prefix@ have_evas_engine_gl_x11 = @have_evas_engine_gl_x11@ have_evas_engine_gl_xcb = @have_evas_engine_gl_xcb@ have_evas_engine_gl_xlib = @have_evas_engine_gl_xlib@ have_evas_engine_software_x11 = @have_evas_engine_software_x11@ have_evas_engine_software_xcb = @have_evas_engine_software_xcb@ have_evas_engine_software_xlib = @have_evas_engine_software_xlib@ have_lcov = @have_lcov@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_enable_auto_import = @lt_enable_auto_import@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgconfig_requires_private = @pkgconfig_requires_private@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pthread_cflags = @pthread_cflags@ pthread_libs = @pthread_libs@ release_info = @release_info@ requirement_evas = @requirement_evas@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ shm_open_libs = @shm_open_libs@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ version_info = @version_info@ MAINTAINERCLEANFILES = Makefile.in AM_CPPFLAGS = \ -I. \ -I$(top_srcdir)/src/lib \ -I$(top_srcdir)/src/lib/include \ -I$(top_srcdir)/src/lib/cserve2 \ -I$(top_srcdir)/src/bin \ @evas_image_loader_eet_cflags@ \ @EVAS_GENERAL_CFLAGS@ #if !EVAS_STATIC_BUILD_EET @BUILD_LOADER_EET_TRUE@pkgdir = $(libdir)/evas/cserve2/loaders/eet/$(MODULE_ARCH) @BUILD_LOADER_EET_TRUE@pkg_LTLIBRARIES = module.la @BUILD_LOADER_EET_TRUE@module_la_SOURCES = evas_image_load_eet.c @BUILD_LOADER_EET_TRUE@module_la_LIBADD = @EVAS_GENERAL_LIBS@ @evas_image_loader_eet_libs@ @BUILD_LOADER_EET_TRUE@module_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -module -avoid-version @BUILD_LOADER_EET_TRUE@module_la_LIBTOOLFLAGS = --tag=disable-static all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/bin/loaders/eet/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/bin/loaders/eet/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-pkgLTLIBRARIES: $(pkg_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(pkg_LTLIBRARIES)'; test -n "$(pkgdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(pkgdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(pkgdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkgdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkgdir)"; \ } uninstall-pkgLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(pkg_LTLIBRARIES)'; test -n "$(pkgdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkgdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkgdir)/$$f"; \ done clean-pkgLTLIBRARIES: -test -z "$(pkg_LTLIBRARIES)" || rm -f $(pkg_LTLIBRARIES) @list='$(pkg_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } module.la: $(module_la_OBJECTS) $(module_la_DEPENDENCIES) $(EXTRA_module_la_DEPENDENCIES) $(AM_V_CCLD)$(module_la_LINK) $(am_module_la_rpath) $(module_la_OBJECTS) $(module_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/module_la-evas_image_load_eet.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< module_la-evas_image_load_eet.lo: evas_image_load_eet.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT module_la-evas_image_load_eet.lo -MD -MP -MF $(DEPDIR)/module_la-evas_image_load_eet.Tpo -c -o module_la-evas_image_load_eet.lo `test -f 'evas_image_load_eet.c' || echo '$(srcdir)/'`evas_image_load_eet.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/module_la-evas_image_load_eet.Tpo $(DEPDIR)/module_la-evas_image_load_eet.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='evas_image_load_eet.c' object='module_la-evas_image_load_eet.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o module_la-evas_image_load_eet.lo `test -f 'evas_image_load_eet.c' || echo '$(srcdir)/'`evas_image_load_eet.c mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: for dir in "$(DESTDIR)$(pkgdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool clean-pkgLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-pkgLTLIBRARIES install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-pkgLTLIBRARIES .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-libtool clean-pkgLTLIBRARIES cscopelist-am ctags \ ctags-am distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-pkgLTLIBRARIES install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am uninstall-pkgLTLIBRARIES #else #noinst_LTLIBRARIES = libevas_loader_eet.la #libevas_loader_eet_la_SOURCES = evas_image_load_eet.c #libevas_loader_eet_la_LIBADD = @evas_image_loader_eet_libs@ #endif # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: evas-1.7.9/src/bin/loaders/eet/evas_image_load_eet.c0000664000175000017500000000626112175475547017304 00000000000000#ifdef HAVE_CONFIG_H # include "config.h" /* so that EAPI in Eet.h is correctly defined */ #endif #include #include "evas_macros.h" #include "evas_cserve2.h" #include "evas_cserve2_slave.h" static Eina_Bool evas_image_load_file_head_eet(Evas_Img_Load_Params *ilp, const char *file, const char *key, int *error) { int alpha, compression, quality, lossy; unsigned int w, h; Eet_File *ef; int ok; Eina_Bool res = EINA_FALSE; if (!key) { *error = CSERVE2_DOES_NOT_EXIST; return EINA_FALSE; } ef = eet_open((char *)file, EET_FILE_MODE_READ); if (!ef) { *error = CSERVE2_DOES_NOT_EXIST; return EINA_FALSE; } ok = eet_data_image_header_read(ef, key, &w, &h, &alpha, &compression, &quality, &lossy); if (!ok) { *error = CSERVE2_DOES_NOT_EXIST; goto on_error; } if (IMG_TOO_BIG(w, h)) { *error = CSERVE2_RESOURCE_ALLOCATION_FAILED; goto on_error; } if (alpha) ilp->alpha = 1; ilp->w = w; ilp->h = h; res = EINA_TRUE; *error = CSERVE2_NONE; on_error: eet_close(ef); return res; } Eina_Bool evas_image_load_file_data_eet(Evas_Img_Load_Params *ilp, const char *file, const char *key, int *error) { unsigned int w, h; int alpha, compression, quality, lossy, ok; Eet_File *ef; DATA32 *body, *p, *end, *data; DATA32 nas = 0; Eina_Bool res = EINA_FALSE; if (!key) { *error = CSERVE2_DOES_NOT_EXIST; return EINA_FALSE; } ef = eet_open(file, EET_FILE_MODE_READ); if (!ef) { *error = CSERVE2_DOES_NOT_EXIST; return EINA_FALSE; } ok = eet_data_image_header_read(ef, key, &w, &h, &alpha, &compression, &quality, &lossy); if (IMG_TOO_BIG(w, h)) { *error = CSERVE2_RESOURCE_ALLOCATION_FAILED; goto on_error; } if (!ok) { *error = CSERVE2_DOES_NOT_EXIST; goto on_error; } data = ilp->buffer; if (!data) { *error = CSERVE2_RESOURCE_ALLOCATION_FAILED; goto on_error; } ok = eet_data_image_read_to_surface(ef, key, 0, 0, data, w, h, w * 4, &alpha, &compression, &quality, &lossy); if (!ok) { *error = CSERVE2_GENERIC; goto on_error; } if (alpha) { ilp->alpha = 1; body = ilp->buffer; end = body + (w * h); for (p = body; p < end; p++) { DATA32 r, g, b, a; a = A_VAL(p); r = R_VAL(p); g = G_VAL(p); b = B_VAL(p); if ((a == 0) || (a == 255)) nas++; if (r > a) r = a; if (g > a) g = a; if (b > a) b = a; *p = ARGB_JOIN(a, r, g, b); } if ((ALPHA_SPARSE_INV_FRACTION * nas) >= (w * h)) ilp->alpha_sparse = 1; } *error = CSERVE2_NONE; res = EINA_TRUE; on_error: eet_close(ef); return res; } static Evas_Loader_Module_Api modapi = { EVAS_CSERVE2_MODULE_API_VERSION, "eet", evas_image_load_file_head_eet, evas_image_load_file_data_eet }; static Eina_Bool module_init(void) { eet_init(); return evas_cserve2_loader_register(&modapi); } static void module_shutdown(void) { eet_shutdown(); } EINA_MODULE_INIT(module_init); EINA_MODULE_SHUTDOWN(module_shutdown); evas-1.7.9/src/bin/loaders/eet/Makefile.am0000664000175000017500000000143112175475547015232 00000000000000 MAINTAINERCLEANFILES = Makefile.in AM_CPPFLAGS = \ -I. \ -I$(top_srcdir)/src/lib \ -I$(top_srcdir)/src/lib/include \ -I$(top_srcdir)/src/lib/cserve2 \ -I$(top_srcdir)/src/bin \ @evas_image_loader_eet_cflags@ \ @EVAS_GENERAL_CFLAGS@ if BUILD_LOADER_EET #if !EVAS_STATIC_BUILD_EET pkgdir = $(libdir)/evas/cserve2/loaders/eet/$(MODULE_ARCH) pkg_LTLIBRARIES = module.la module_la_SOURCES = evas_image_load_eet.c module_la_LIBADD = @EVAS_GENERAL_LIBS@ @evas_image_loader_eet_libs@ module_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -module -avoid-version module_la_LIBTOOLFLAGS = --tag=disable-static #else #noinst_LTLIBRARIES = libevas_loader_eet.la #libevas_loader_eet_la_SOURCES = evas_image_load_eet.c #libevas_loader_eet_la_LIBADD = @evas_image_loader_eet_libs@ #endif endif evas-1.7.9/src/bin/loaders/pmaps/0000775000175000017500000000000012234557316013611 500000000000000evas-1.7.9/src/bin/loaders/pmaps/Makefile.in0000664000175000017500000007222012234557301015573 00000000000000# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/bin/loaders/pmaps DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/efl_attribute.m4 \ $(top_srcdir)/m4/efl_coverage.m4 \ $(top_srcdir)/m4/efl_doxygen.m4 \ $(top_srcdir)/m4/efl_fnmatch.m4 \ $(top_srcdir)/m4/efl_path_max.m4 \ $(top_srcdir)/m4/efl_shm_open.m4 $(top_srcdir)/m4/efl_tests.m4 \ $(top_srcdir)/m4/evas_check_engine.m4 \ $(top_srcdir)/m4/evas_check_loader.m4 \ $(top_srcdir)/m4/evas_converter.m4 \ $(top_srcdir)/m4/evas_dither.m4 \ $(top_srcdir)/m4/evas_scaler.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(pkgdir)" LTLIBRARIES = $(pkg_LTLIBRARIES) module_la_DEPENDENCIES = am__module_la_SOURCES_DIST = evas_image_load_pmaps.c @BUILD_LOADER_PMAPS_TRUE@am_module_la_OBJECTS = \ @BUILD_LOADER_PMAPS_TRUE@ module_la-evas_image_load_pmaps.lo module_la_OBJECTS = $(am_module_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = module_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(AM_CFLAGS) $(CFLAGS) $(module_la_LDFLAGS) $(LDFLAGS) -o $@ @BUILD_LOADER_PMAPS_TRUE@am_module_la_rpath = -rpath $(pkgdir) AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(module_la_SOURCES) DIST_SOURCES = $(am__module_la_SOURCES_DIST) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHECK_CFLAGS = @CHECK_CFLAGS@ CHECK_LIBS = @CHECK_LIBS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@ DIRECTFB_LIBS = @DIRECTFB_LIBS@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ ECORE_EVAS_CFLAGS = @ECORE_EVAS_CFLAGS@ ECORE_EVAS_LIBS = @ECORE_EVAS_LIBS@ EDB_CFLAGS = @EDB_CFLAGS@ EDB_LIBS = @EDB_LIBS@ EDJE_CFLAGS = @EDJE_CFLAGS@ EDJE_LIBS = @EDJE_LIBS@ EET_CFLAGS = @EET_CFLAGS@ EET_LIBS = @EET_LIBS@ EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@ EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@ EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@ EFL_SHM_OPEN_LIBS = @EFL_SHM_OPEN_LIBS@ EGREP = @EGREP@ EINA_CFLAGS = @EINA_CFLAGS@ EINA_LIBS = @EINA_LIBS@ EVAS_CFLAGS = @EVAS_CFLAGS@ EVAS_GENERAL_CFLAGS = @EVAS_GENERAL_CFLAGS@ EVAS_GENERAL_LIBS = @EVAS_GENERAL_LIBS@ EVAS_LIBS = @EVAS_LIBS@ EVAS_SSE3_CFLAGS = @EVAS_SSE3_CFLAGS@ EVIL_CFLAGS = @EVIL_CFLAGS@ EVIL_LIBS = @EVIL_LIBS@ EXEEXT = @EXEEXT@ EXOTIC_CFLAGS = @EXOTIC_CFLAGS@ EXOTIC_LIBS = @EXOTIC_LIBS@ FGREP = @FGREP@ FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@ FONTCONFIG_LIBS = @FONTCONFIG_LIBS@ FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ FREETYPE_LIBS = @FREETYPE_LIBS@ FRIBIDI_CFLAGS = @FRIBIDI_CFLAGS@ FRIBIDI_LIBS = @FRIBIDI_LIBS@ GL_EET_CFLAGS = @GL_EET_CFLAGS@ GL_EET_LIBS = @GL_EET_LIBS@ GREP = @GREP@ HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@ HARFBUZZ_LIBS = @HARFBUZZ_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LINEBREAK_CFLAGS = @LINEBREAK_CFLAGS@ LINEBREAK_LIBS = @LINEBREAK_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MODULE_ARCH = @MODULE_ARCH@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ SDL_CFLAGS = @SDL_CFLAGS@ SDL_LIBS = @SDL_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ SVG_CFLAGS = @SVG_CFLAGS@ SVG_LIBS = @SVG_LIBS@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ XCB_CFLAGS = @XCB_CFLAGS@ XCB_GL_CFLAGS = @XCB_GL_CFLAGS@ XCB_GL_LIBS = @XCB_GL_LIBS@ XCB_LIBS = @XCB_LIBS@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_ct_OBJC = @ac_ct_OBJC@ altivec_cflags = @altivec_cflags@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ dlopen_libs = @dlopen_libs@ docdir = @docdir@ dvidir = @dvidir@ edje_cc = @edje_cc@ efl_doxygen = @efl_doxygen@ efl_have_doxygen = @efl_have_doxygen@ evas_engine_buffer_cflags = @evas_engine_buffer_cflags@ evas_engine_buffer_libs = @evas_engine_buffer_libs@ evas_engine_direct3d_cflags = @evas_engine_direct3d_cflags@ evas_engine_direct3d_libs = @evas_engine_direct3d_libs@ evas_engine_directfb_cflags = @evas_engine_directfb_cflags@ evas_engine_directfb_libs = @evas_engine_directfb_libs@ evas_engine_fb_cflags = @evas_engine_fb_cflags@ evas_engine_fb_libs = @evas_engine_fb_libs@ evas_engine_gl_cocoa_cflags = @evas_engine_gl_cocoa_cflags@ evas_engine_gl_cocoa_libs = @evas_engine_gl_cocoa_libs@ evas_engine_gl_common_libs = @evas_engine_gl_common_libs@ evas_engine_gl_sdl_cflags = @evas_engine_gl_sdl_cflags@ evas_engine_gl_sdl_libs = @evas_engine_gl_sdl_libs@ evas_engine_gl_xcb_cflags = @evas_engine_gl_xcb_cflags@ evas_engine_gl_xcb_libs = @evas_engine_gl_xcb_libs@ evas_engine_gl_xlib_cflags = @evas_engine_gl_xlib_cflags@ evas_engine_gl_xlib_libs = @evas_engine_gl_xlib_libs@ evas_engine_psl1ght_cflags = @evas_engine_psl1ght_cflags@ evas_engine_psl1ght_libs = @evas_engine_psl1ght_libs@ evas_engine_software_16_sdl_cflags = @evas_engine_software_16_sdl_cflags@ evas_engine_software_16_sdl_libs = @evas_engine_software_16_sdl_libs@ evas_engine_software_16_wince_cflags = @evas_engine_software_16_wince_cflags@ evas_engine_software_16_wince_libs = @evas_engine_software_16_wince_libs@ evas_engine_software_16_x11_cflags = @evas_engine_software_16_x11_cflags@ evas_engine_software_16_x11_libs = @evas_engine_software_16_x11_libs@ evas_engine_software_8_x11_cflags = @evas_engine_software_8_x11_cflags@ evas_engine_software_8_x11_libs = @evas_engine_software_8_x11_libs@ evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@ evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@ evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@ evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ evas_image_loader_edb_libs = @evas_image_loader_edb_libs@ evas_image_loader_eet_cflags = @evas_image_loader_eet_cflags@ evas_image_loader_eet_libs = @evas_image_loader_eet_libs@ evas_image_loader_generic_cflags = @evas_image_loader_generic_cflags@ evas_image_loader_generic_libs = @evas_image_loader_generic_libs@ evas_image_loader_gif_cflags = @evas_image_loader_gif_cflags@ evas_image_loader_gif_libs = @evas_image_loader_gif_libs@ evas_image_loader_ico_cflags = @evas_image_loader_ico_cflags@ evas_image_loader_ico_libs = @evas_image_loader_ico_libs@ evas_image_loader_jpeg_cflags = @evas_image_loader_jpeg_cflags@ evas_image_loader_jpeg_libs = @evas_image_loader_jpeg_libs@ evas_image_loader_pmaps_cflags = @evas_image_loader_pmaps_cflags@ evas_image_loader_pmaps_libs = @evas_image_loader_pmaps_libs@ evas_image_loader_png_cflags = @evas_image_loader_png_cflags@ evas_image_loader_png_libs = @evas_image_loader_png_libs@ evas_image_loader_psd_cflags = @evas_image_loader_psd_cflags@ evas_image_loader_psd_libs = @evas_image_loader_psd_libs@ evas_image_loader_svg_cflags = @evas_image_loader_svg_cflags@ evas_image_loader_svg_libs = @evas_image_loader_svg_libs@ evas_image_loader_tga_cflags = @evas_image_loader_tga_cflags@ evas_image_loader_tga_libs = @evas_image_loader_tga_libs@ evas_image_loader_tiff_cflags = @evas_image_loader_tiff_cflags@ evas_image_loader_tiff_libs = @evas_image_loader_tiff_libs@ evas_image_loader_wbmp_cflags = @evas_image_loader_wbmp_cflags@ evas_image_loader_wbmp_libs = @evas_image_loader_wbmp_libs@ evas_image_loader_xpm_cflags = @evas_image_loader_xpm_cflags@ evas_image_loader_xpm_libs = @evas_image_loader_xpm_libs@ exec_prefix = @exec_prefix@ have_evas_engine_gl_x11 = @have_evas_engine_gl_x11@ have_evas_engine_gl_xcb = @have_evas_engine_gl_xcb@ have_evas_engine_gl_xlib = @have_evas_engine_gl_xlib@ have_evas_engine_software_x11 = @have_evas_engine_software_x11@ have_evas_engine_software_xcb = @have_evas_engine_software_xcb@ have_evas_engine_software_xlib = @have_evas_engine_software_xlib@ have_lcov = @have_lcov@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_enable_auto_import = @lt_enable_auto_import@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgconfig_requires_private = @pkgconfig_requires_private@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pthread_cflags = @pthread_cflags@ pthread_libs = @pthread_libs@ release_info = @release_info@ requirement_evas = @requirement_evas@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ shm_open_libs = @shm_open_libs@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ version_info = @version_info@ MAINTAINERCLEANFILES = Makefile.in AM_CPPFLAGS = \ -I. \ -I$(top_srcdir)/src/lib \ -I$(top_srcdir)/src/lib/include \ -I$(top_srcdir)/src/lib/cserve2 \ -I$(top_srcdir)/src/bin \ @EVAS_GENERAL_CFLAGS@ \ @evas_image_loader_pmaps_cflags@ \ @EVIL_CFLAGS@ #if !EVAS_STATIC_BUILD_PMAPS @BUILD_LOADER_PMAPS_TRUE@pkgdir = $(libdir)/evas/cserve2/loaders/pmaps/$(MODULE_ARCH) @BUILD_LOADER_PMAPS_TRUE@pkg_LTLIBRARIES = module.la @BUILD_LOADER_PMAPS_TRUE@module_la_SOURCES = evas_image_load_pmaps.c @BUILD_LOADER_PMAPS_TRUE@module_la_LIBADD = @evas_image_loader_pmaps_libs@ @EVAS_GENERAL_LIBS@ @EVIL_LIBS@ @BUILD_LOADER_PMAPS_TRUE@module_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -module -avoid-version @BUILD_LOADER_PMAPS_TRUE@module_la_LIBTOOLFLAGS = --tag=disable-static all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/bin/loaders/pmaps/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/bin/loaders/pmaps/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-pkgLTLIBRARIES: $(pkg_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(pkg_LTLIBRARIES)'; test -n "$(pkgdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(pkgdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(pkgdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkgdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkgdir)"; \ } uninstall-pkgLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(pkg_LTLIBRARIES)'; test -n "$(pkgdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkgdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkgdir)/$$f"; \ done clean-pkgLTLIBRARIES: -test -z "$(pkg_LTLIBRARIES)" || rm -f $(pkg_LTLIBRARIES) @list='$(pkg_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } module.la: $(module_la_OBJECTS) $(module_la_DEPENDENCIES) $(EXTRA_module_la_DEPENDENCIES) $(AM_V_CCLD)$(module_la_LINK) $(am_module_la_rpath) $(module_la_OBJECTS) $(module_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/module_la-evas_image_load_pmaps.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< module_la-evas_image_load_pmaps.lo: evas_image_load_pmaps.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT module_la-evas_image_load_pmaps.lo -MD -MP -MF $(DEPDIR)/module_la-evas_image_load_pmaps.Tpo -c -o module_la-evas_image_load_pmaps.lo `test -f 'evas_image_load_pmaps.c' || echo '$(srcdir)/'`evas_image_load_pmaps.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/module_la-evas_image_load_pmaps.Tpo $(DEPDIR)/module_la-evas_image_load_pmaps.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='evas_image_load_pmaps.c' object='module_la-evas_image_load_pmaps.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o module_la-evas_image_load_pmaps.lo `test -f 'evas_image_load_pmaps.c' || echo '$(srcdir)/'`evas_image_load_pmaps.c mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: for dir in "$(DESTDIR)$(pkgdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool clean-pkgLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-pkgLTLIBRARIES install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-pkgLTLIBRARIES .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-libtool clean-pkgLTLIBRARIES cscopelist-am ctags \ ctags-am distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-pkgLTLIBRARIES install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am uninstall-pkgLTLIBRARIES #else #noinst_LTLIBRARIES = libevas_loader_pmaps.la #libevas_loader_pmaps_la_SOURCES = evas_image_load_pmaps.c #libevas_loader_pmaps_la_LIBADD = @evas_image_loader_pmaps_libs@ #endif # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: evas-1.7.9/src/bin/loaders/pmaps/evas_image_load_pmaps.c0000664000175000017500000002657312175475547020222 00000000000000#ifdef HAVE_CONFIG_H # include #endif #ifdef HAVE_EVIL # include #endif #include #include "evas_macros.h" #include "evas_cserve2.h" #include "evas_cserve2_slave.h" #define FILE_BUFFER_SIZE 1024 * 32 #define FILE_BUFFER_UNREAD_SIZE 16 /* The buffer to load pmaps images */ typedef struct Pmaps_Buffer Pmaps_Buffer; struct Pmaps_Buffer { Eina_File *file; void *map; size_t position; /* the buffer */ DATA8 buffer[FILE_BUFFER_SIZE]; DATA8 unread[FILE_BUFFER_UNREAD_SIZE]; DATA8 *current; DATA8 *end; char type[3]; unsigned char unread_len:7; unsigned char last_buffer:1; /* image properties */ int w; int h; int max; /* interface */ int (*int_get) (Pmaps_Buffer *b, int *val); int (*color_get) (Pmaps_Buffer *b, DATA32 *color); }; /* internal used functions */ static Eina_Bool pmaps_buffer_open(Pmaps_Buffer *b, const char *filename, int *error); static void pmaps_buffer_close(Pmaps_Buffer *b); static Eina_Bool pmaps_buffer_header_parse(Pmaps_Buffer *b, int *error); static int pmaps_buffer_plain_int_get(Pmaps_Buffer *b, int *val); static int pmaps_buffer_1byte_int_get(Pmaps_Buffer *b, int *val); static int pmaps_buffer_2byte_int_get(Pmaps_Buffer *b, int *val); static int pmaps_buffer_gray_get(Pmaps_Buffer *b, DATA32 *color); static int pmaps_buffer_rgb_get(Pmaps_Buffer *b, DATA32 *color); static int pmaps_buffer_plain_bw_get(Pmaps_Buffer *b, DATA32 *color); static size_t pmaps_buffer_plain_update(Pmaps_Buffer *b); static size_t pmaps_buffer_raw_update(Pmaps_Buffer *b); static int pmaps_buffer_comment_skip(Pmaps_Buffer *b); static Eina_Bool evas_image_load_file_head_pmaps(Evas_Img_Load_Params *ilp, const char *file, const char *key __UNUSED__, int *error) { Pmaps_Buffer b; if (!pmaps_buffer_open(&b, file, error)) { pmaps_buffer_close(&b); return EINA_FALSE; } if (!pmaps_buffer_header_parse(&b, error)) { pmaps_buffer_close(&b); return EINA_FALSE; } ilp->w = b.w; ilp->h = b.h; pmaps_buffer_close(&b); *error = EVAS_LOAD_ERROR_NONE; return EINA_TRUE; } static Eina_Bool evas_image_load_file_data_pmaps(Evas_Img_Load_Params *ilp, const char *file, const char *key __UNUSED__, int *error) { Pmaps_Buffer b; int pixels; DATA32 *ptr; if (!pmaps_buffer_open(&b, file, error)) { pmaps_buffer_close(&b); return EINA_FALSE; } if (!pmaps_buffer_header_parse(&b, error)) { pmaps_buffer_close(&b); return EINA_FALSE; } pixels = b.w * b.h; ptr = ilp->buffer; if (!ptr) { pmaps_buffer_close(&b); *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; return EINA_FALSE; } if (b.type[1] != '4') { while (pixels > 0 && b.color_get(&b, ptr)) { pixels--; ptr++; } } else { while (pixels > 0 && (b.current != b.end || pmaps_buffer_raw_update(&b))) { int i; for (i = 7; i >= 0 && pixels > 0; i--) { if (*b.current & (1 << i)) *ptr = 0xff000000; else *ptr = 0xffffffff; ptr++; pixels--; } b.current++; } } /* if there are some pix missing, give them a proper default */ memset(ptr, 0xff, 4 * pixels); pmaps_buffer_close(&b); *error = EVAS_LOAD_ERROR_NONE; return EINA_TRUE; } /* internal used functions */ static Eina_Bool pmaps_buffer_open(Pmaps_Buffer *b, const char *filename, int *error) { size_t len; b->file = eina_file_open(filename, EINA_FALSE); if (!b->file) { *error = EVAS_LOAD_ERROR_DOES_NOT_EXIST; return EINA_FALSE; } b->map = eina_file_map_all(b->file, EINA_FILE_SEQUENTIAL); if (!b->map) { *error = EVAS_LOAD_ERROR_DOES_NOT_EXIST; eina_file_close(b->file); b->file = NULL; return EINA_FALSE; } b->position = 0; *b->buffer = 0; *b->unread = 0; b->last_buffer = 0; b->unread_len = 0; len = pmaps_buffer_plain_update(b); if (len < 3) { *error = EVAS_LOAD_ERROR_CORRUPT_FILE; eina_file_map_free(b->file, b->map); eina_file_close(b->file); b->map = NULL; b->file = NULL; return EINA_FALSE; } /* copy the type */ b->type[0] = b->buffer[0]; b->type[1] = b->buffer[1]; b->type[2] = 0; /* skip the PX */ b->current = b->buffer + 2; *error = EVAS_LOAD_ERROR_NONE; return EINA_TRUE; } static void pmaps_buffer_close(Pmaps_Buffer *b) { if (b->file) { if (b->map) eina_file_map_free(b->file, b->map); b->map = NULL; eina_file_close(b->file); b->file = NULL; } } static Eina_Bool pmaps_buffer_header_parse(Pmaps_Buffer *b, int *error) { /* if there is no P at the beginning it is not a file we can parse */ if (b->type[0] != 'P') { *error = EVAS_LOAD_ERROR_UNKNOWN_FORMAT; return EINA_FALSE; } /* get the width */ if (!pmaps_buffer_plain_int_get(b, &(b->w)) || b->w < 1) { *error = EVAS_LOAD_ERROR_CORRUPT_FILE; return EINA_FALSE; } /* get the height */ if (!pmaps_buffer_plain_int_get(b, &(b->h)) || b->h < 1) { *error = EVAS_LOAD_ERROR_CORRUPT_FILE; return EINA_FALSE; } /* get the maximum value. P1 and P4 don't have a maximum value. */ if (!(b->type[1] == '1' || b->type[1] == '4') && (!pmaps_buffer_plain_int_get(b, &(b->max)) || b->max < 1)) { *error = EVAS_LOAD_ERROR_UNKNOWN_FORMAT; return EINA_FALSE; } /* set up the color get callback */ switch (b->type[1]) { /* Black and White */ case '1': b->color_get = pmaps_buffer_plain_bw_get; break; case '4': /* Binary black and white use another format */ b->color_get = NULL; break; case '2': case '5': b->color_get = pmaps_buffer_gray_get; break; case '3': case '6': b->color_get = pmaps_buffer_rgb_get; break; case '7': /* XXX write me */ return 0; break; default: return 0; } /* set up the int get callback */ switch (b->type[1]) { /* RAW */ case '5': case '6': if (b->max < 256) b->int_get = pmaps_buffer_1byte_int_get; else b->int_get = pmaps_buffer_2byte_int_get; if (b->current == b->end && !pmaps_buffer_raw_update(b)) return 0; b->current++; break; /* Plain */ case '2': case '3': b->int_get = pmaps_buffer_plain_int_get; break; /* Black and White Bitmaps don't use that callback */ case '1': case '4': b->int_get = NULL; /* we need to skip the next character fpr P4 it * doesn't hurt if we do it for the P1 as well */ b->current++; break; } return 1; } static size_t pmaps_buffer_plain_update(Pmaps_Buffer *b) { size_t r; size_t max; /* if we already are in the last buffer we can not update it */ if (b->last_buffer) return 0; /* if we have unread bytes we need to put them before the new read * stuff */ if (b->unread_len) memcpy(b->buffer, b->unread, b->unread_len); max = FILE_BUFFER_SIZE - b->unread_len - 1; if (b->position + max > eina_file_size_get(b->file)) max = eina_file_size_get(b->file) - b->position; memcpy(&b->buffer[b->unread_len], b->map + b->position, max); b->position += max; r = max + b->unread_len; /* we haven't read anything nor have we bytes in the unread buffer */ if (r == 0) { b->buffer[0] = '\0'; b->end = b->buffer; b->last_buffer = 1; return 0; } if (r < FILE_BUFFER_SIZE - 1) { /*we reached eof */ ; b->last_buffer = 1; } b->buffer[r] = 0; b->unread[0] = '\0'; b->unread_len = 0; b->buffer[r] = '\0'; b->current = b->buffer; b->end = b->buffer + r; return r; } static size_t pmaps_buffer_raw_update(Pmaps_Buffer *b) { size_t r; size_t max; if (b->last_buffer) return 0; if (b->unread_len) memcpy(b->buffer, b->unread, b->unread_len); max = FILE_BUFFER_SIZE - b->unread_len; if (b->position + max > eina_file_size_get(b->file)) max = eina_file_size_get(b->file) - b->position; memcpy(&b->buffer[b->unread_len], b->map + b->position, max); b->position += max; r = max + b->unread_len; if (r < FILE_BUFFER_SIZE) { /*we reached eof */ b->last_buffer = 1; } b->end = b->buffer + r; b->current = b->buffer; if (b->unread_len) { /* the buffer is now read */ *b->unread = 0; b->unread_len = 0; } return r; } static int pmaps_buffer_plain_int_get(Pmaps_Buffer *b, int *val) { char *start; DATA8 lastc; /* first skip all white space * Note: we are skipping here actually every character than is not * a digit */ while (!isdigit(*b->current)) { if (*b->current == '\0') { if (!pmaps_buffer_plain_update(b)) return 0; continue; } if (*b->current == '#' && !pmaps_buffer_comment_skip(b)) return 0; b->current++; } start = (char *)b->current; /* now find the end of the number */ while (isdigit(*b->current)) b->current++; lastc = *b->current; *b->current = '\0'; *val = atoi(start); *b->current = lastc; return 1; } static int pmaps_buffer_1byte_int_get(Pmaps_Buffer *b, int *val) { /* are we at the end of the buffer? */ if (b->current == b->end && !pmaps_buffer_raw_update(b)) return 0; *val = *b->current; b->current++; return 1; } static int pmaps_buffer_2byte_int_get(Pmaps_Buffer *b, int *val) { /* are we at the end of the buffer? */ if (b->current == b->end && !pmaps_buffer_raw_update(b)) return 0; *val = (int)(*b->current << 8); b->current++; /* are we at the end of the buffer? */ if (b->current == b->end && !pmaps_buffer_raw_update(b)) return 0; *val |= *b->current; b->current++; return 1; } static int pmaps_buffer_comment_skip(Pmaps_Buffer *b) { while (*b->current != '\n') { if (*b->current == '\0') { if (!pmaps_buffer_plain_update(b)) return 0; continue; } b->current++; } return 1; } static int pmaps_buffer_rgb_get(Pmaps_Buffer *b, DATA32 *color) { int vr, vg, vb; if (!b->int_get(b, &vr) || !b->int_get(b, &vg) || !b->int_get(b, &vb)) return 0; if (b->max != 255) { vr = (vr * 255) / b->max; vg = (vg * 255) / b->max; vb = (vb * 255) / b->max; } if (vr > 255) vr = 255; if (vg > 255) vg = 255; if (vb > 255) vb = 255; *color = ARGB_JOIN(0xff, vr, vg, vb); return 1; } static int pmaps_buffer_gray_get(Pmaps_Buffer *b, DATA32 *color) { int val; if (!b->int_get(b, &val)) return 0; if (b->max != 255) val = (val * 255) / b->max; if (val > 255) val = 255; *color = ARGB_JOIN(0xff, val, val, val); return 1; } static int pmaps_buffer_plain_bw_get(Pmaps_Buffer *b, DATA32 *val) { /* first skip all white space * Note: we are skipping here actually every character than is not * a digit */ while (!isdigit(*b->current)) { if (*b->current == '\0') { if (!pmaps_buffer_raw_update(b)) return 0; continue; } if (*b->current == '#' && !pmaps_buffer_comment_skip(b)) return 0; b->current++; } if (*b->current == '0') *val = 0xffffffff; else *val = 0xff000000; b->current++; return 1; } static Evas_Loader_Module_Api modapi = { EVAS_CSERVE2_MODULE_API_VERSION, "pmaps", evas_image_load_file_head_pmaps, evas_image_load_file_data_pmaps }; static Eina_Bool module_init(void) { return evas_cserve2_loader_register(&modapi); } static void module_shutdown(void) { } EINA_MODULE_INIT(module_init); EINA_MODULE_SHUTDOWN(module_shutdown); evas-1.7.9/src/bin/loaders/pmaps/Makefile.am0000664000175000017500000000151112175475547015574 00000000000000 MAINTAINERCLEANFILES = Makefile.in AM_CPPFLAGS = \ -I. \ -I$(top_srcdir)/src/lib \ -I$(top_srcdir)/src/lib/include \ -I$(top_srcdir)/src/lib/cserve2 \ -I$(top_srcdir)/src/bin \ @EVAS_GENERAL_CFLAGS@ \ @evas_image_loader_pmaps_cflags@ \ @EVIL_CFLAGS@ if BUILD_LOADER_PMAPS #if !EVAS_STATIC_BUILD_PMAPS pkgdir = $(libdir)/evas/cserve2/loaders/pmaps/$(MODULE_ARCH) pkg_LTLIBRARIES = module.la module_la_SOURCES = evas_image_load_pmaps.c module_la_LIBADD = @evas_image_loader_pmaps_libs@ @EVAS_GENERAL_LIBS@ @EVIL_LIBS@ module_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -module -avoid-version module_la_LIBTOOLFLAGS = --tag=disable-static #else #noinst_LTLIBRARIES = libevas_loader_pmaps.la #libevas_loader_pmaps_la_SOURCES = evas_image_load_pmaps.c #libevas_loader_pmaps_la_LIBADD = @evas_image_loader_pmaps_libs@ #endif endif evas-1.7.9/src/bin/loaders/psd/0000775000175000017500000000000012234557316013257 500000000000000evas-1.7.9/src/bin/loaders/psd/Makefile.in0000664000175000017500000007174712234557301015256 00000000000000# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/bin/loaders/psd DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/efl_attribute.m4 \ $(top_srcdir)/m4/efl_coverage.m4 \ $(top_srcdir)/m4/efl_doxygen.m4 \ $(top_srcdir)/m4/efl_fnmatch.m4 \ $(top_srcdir)/m4/efl_path_max.m4 \ $(top_srcdir)/m4/efl_shm_open.m4 $(top_srcdir)/m4/efl_tests.m4 \ $(top_srcdir)/m4/evas_check_engine.m4 \ $(top_srcdir)/m4/evas_check_loader.m4 \ $(top_srcdir)/m4/evas_converter.m4 \ $(top_srcdir)/m4/evas_dither.m4 \ $(top_srcdir)/m4/evas_scaler.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(pkgdir)" LTLIBRARIES = $(pkg_LTLIBRARIES) module_la_DEPENDENCIES = am__module_la_SOURCES_DIST = evas_image_load_psd.c @BUILD_LOADER_PSD_TRUE@am_module_la_OBJECTS = \ @BUILD_LOADER_PSD_TRUE@ module_la-evas_image_load_psd.lo module_la_OBJECTS = $(am_module_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = module_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(AM_CFLAGS) $(CFLAGS) $(module_la_LDFLAGS) $(LDFLAGS) -o $@ @BUILD_LOADER_PSD_TRUE@am_module_la_rpath = -rpath $(pkgdir) AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(module_la_SOURCES) DIST_SOURCES = $(am__module_la_SOURCES_DIST) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHECK_CFLAGS = @CHECK_CFLAGS@ CHECK_LIBS = @CHECK_LIBS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@ DIRECTFB_LIBS = @DIRECTFB_LIBS@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ ECORE_EVAS_CFLAGS = @ECORE_EVAS_CFLAGS@ ECORE_EVAS_LIBS = @ECORE_EVAS_LIBS@ EDB_CFLAGS = @EDB_CFLAGS@ EDB_LIBS = @EDB_LIBS@ EDJE_CFLAGS = @EDJE_CFLAGS@ EDJE_LIBS = @EDJE_LIBS@ EET_CFLAGS = @EET_CFLAGS@ EET_LIBS = @EET_LIBS@ EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@ EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@ EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@ EFL_SHM_OPEN_LIBS = @EFL_SHM_OPEN_LIBS@ EGREP = @EGREP@ EINA_CFLAGS = @EINA_CFLAGS@ EINA_LIBS = @EINA_LIBS@ EVAS_CFLAGS = @EVAS_CFLAGS@ EVAS_GENERAL_CFLAGS = @EVAS_GENERAL_CFLAGS@ EVAS_GENERAL_LIBS = @EVAS_GENERAL_LIBS@ EVAS_LIBS = @EVAS_LIBS@ EVAS_SSE3_CFLAGS = @EVAS_SSE3_CFLAGS@ EVIL_CFLAGS = @EVIL_CFLAGS@ EVIL_LIBS = @EVIL_LIBS@ EXEEXT = @EXEEXT@ EXOTIC_CFLAGS = @EXOTIC_CFLAGS@ EXOTIC_LIBS = @EXOTIC_LIBS@ FGREP = @FGREP@ FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@ FONTCONFIG_LIBS = @FONTCONFIG_LIBS@ FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ FREETYPE_LIBS = @FREETYPE_LIBS@ FRIBIDI_CFLAGS = @FRIBIDI_CFLAGS@ FRIBIDI_LIBS = @FRIBIDI_LIBS@ GL_EET_CFLAGS = @GL_EET_CFLAGS@ GL_EET_LIBS = @GL_EET_LIBS@ GREP = @GREP@ HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@ HARFBUZZ_LIBS = @HARFBUZZ_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LINEBREAK_CFLAGS = @LINEBREAK_CFLAGS@ LINEBREAK_LIBS = @LINEBREAK_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MODULE_ARCH = @MODULE_ARCH@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ SDL_CFLAGS = @SDL_CFLAGS@ SDL_LIBS = @SDL_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ SVG_CFLAGS = @SVG_CFLAGS@ SVG_LIBS = @SVG_LIBS@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ XCB_CFLAGS = @XCB_CFLAGS@ XCB_GL_CFLAGS = @XCB_GL_CFLAGS@ XCB_GL_LIBS = @XCB_GL_LIBS@ XCB_LIBS = @XCB_LIBS@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_ct_OBJC = @ac_ct_OBJC@ altivec_cflags = @altivec_cflags@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ dlopen_libs = @dlopen_libs@ docdir = @docdir@ dvidir = @dvidir@ edje_cc = @edje_cc@ efl_doxygen = @efl_doxygen@ efl_have_doxygen = @efl_have_doxygen@ evas_engine_buffer_cflags = @evas_engine_buffer_cflags@ evas_engine_buffer_libs = @evas_engine_buffer_libs@ evas_engine_direct3d_cflags = @evas_engine_direct3d_cflags@ evas_engine_direct3d_libs = @evas_engine_direct3d_libs@ evas_engine_directfb_cflags = @evas_engine_directfb_cflags@ evas_engine_directfb_libs = @evas_engine_directfb_libs@ evas_engine_fb_cflags = @evas_engine_fb_cflags@ evas_engine_fb_libs = @evas_engine_fb_libs@ evas_engine_gl_cocoa_cflags = @evas_engine_gl_cocoa_cflags@ evas_engine_gl_cocoa_libs = @evas_engine_gl_cocoa_libs@ evas_engine_gl_common_libs = @evas_engine_gl_common_libs@ evas_engine_gl_sdl_cflags = @evas_engine_gl_sdl_cflags@ evas_engine_gl_sdl_libs = @evas_engine_gl_sdl_libs@ evas_engine_gl_xcb_cflags = @evas_engine_gl_xcb_cflags@ evas_engine_gl_xcb_libs = @evas_engine_gl_xcb_libs@ evas_engine_gl_xlib_cflags = @evas_engine_gl_xlib_cflags@ evas_engine_gl_xlib_libs = @evas_engine_gl_xlib_libs@ evas_engine_psl1ght_cflags = @evas_engine_psl1ght_cflags@ evas_engine_psl1ght_libs = @evas_engine_psl1ght_libs@ evas_engine_software_16_sdl_cflags = @evas_engine_software_16_sdl_cflags@ evas_engine_software_16_sdl_libs = @evas_engine_software_16_sdl_libs@ evas_engine_software_16_wince_cflags = @evas_engine_software_16_wince_cflags@ evas_engine_software_16_wince_libs = @evas_engine_software_16_wince_libs@ evas_engine_software_16_x11_cflags = @evas_engine_software_16_x11_cflags@ evas_engine_software_16_x11_libs = @evas_engine_software_16_x11_libs@ evas_engine_software_8_x11_cflags = @evas_engine_software_8_x11_cflags@ evas_engine_software_8_x11_libs = @evas_engine_software_8_x11_libs@ evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@ evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@ evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@ evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ evas_image_loader_edb_libs = @evas_image_loader_edb_libs@ evas_image_loader_eet_cflags = @evas_image_loader_eet_cflags@ evas_image_loader_eet_libs = @evas_image_loader_eet_libs@ evas_image_loader_generic_cflags = @evas_image_loader_generic_cflags@ evas_image_loader_generic_libs = @evas_image_loader_generic_libs@ evas_image_loader_gif_cflags = @evas_image_loader_gif_cflags@ evas_image_loader_gif_libs = @evas_image_loader_gif_libs@ evas_image_loader_ico_cflags = @evas_image_loader_ico_cflags@ evas_image_loader_ico_libs = @evas_image_loader_ico_libs@ evas_image_loader_jpeg_cflags = @evas_image_loader_jpeg_cflags@ evas_image_loader_jpeg_libs = @evas_image_loader_jpeg_libs@ evas_image_loader_pmaps_cflags = @evas_image_loader_pmaps_cflags@ evas_image_loader_pmaps_libs = @evas_image_loader_pmaps_libs@ evas_image_loader_png_cflags = @evas_image_loader_png_cflags@ evas_image_loader_png_libs = @evas_image_loader_png_libs@ evas_image_loader_psd_cflags = @evas_image_loader_psd_cflags@ evas_image_loader_psd_libs = @evas_image_loader_psd_libs@ evas_image_loader_svg_cflags = @evas_image_loader_svg_cflags@ evas_image_loader_svg_libs = @evas_image_loader_svg_libs@ evas_image_loader_tga_cflags = @evas_image_loader_tga_cflags@ evas_image_loader_tga_libs = @evas_image_loader_tga_libs@ evas_image_loader_tiff_cflags = @evas_image_loader_tiff_cflags@ evas_image_loader_tiff_libs = @evas_image_loader_tiff_libs@ evas_image_loader_wbmp_cflags = @evas_image_loader_wbmp_cflags@ evas_image_loader_wbmp_libs = @evas_image_loader_wbmp_libs@ evas_image_loader_xpm_cflags = @evas_image_loader_xpm_cflags@ evas_image_loader_xpm_libs = @evas_image_loader_xpm_libs@ exec_prefix = @exec_prefix@ have_evas_engine_gl_x11 = @have_evas_engine_gl_x11@ have_evas_engine_gl_xcb = @have_evas_engine_gl_xcb@ have_evas_engine_gl_xlib = @have_evas_engine_gl_xlib@ have_evas_engine_software_x11 = @have_evas_engine_software_x11@ have_evas_engine_software_xcb = @have_evas_engine_software_xcb@ have_evas_engine_software_xlib = @have_evas_engine_software_xlib@ have_lcov = @have_lcov@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_enable_auto_import = @lt_enable_auto_import@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgconfig_requires_private = @pkgconfig_requires_private@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pthread_cflags = @pthread_cflags@ pthread_libs = @pthread_libs@ release_info = @release_info@ requirement_evas = @requirement_evas@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ shm_open_libs = @shm_open_libs@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ version_info = @version_info@ MAINTAINERCLEANFILES = Makefile.in AM_CPPFLAGS = \ -I. \ -I$(top_srcdir)/src/lib \ -I$(top_srcdir)/src/lib/include \ -I$(top_srcdir)/src/lib/cserve2 \ -I$(top_srcdir)/src/bin \ @EVAS_GENERAL_CFLAGS@ \ @EVIL_CFLAGS@ #if !EVAS_STATIC_BUILD_PSD @BUILD_LOADER_PSD_TRUE@pkgdir = $(libdir)/evas/cserve2/loaders/psd/$(MODULE_ARCH) @BUILD_LOADER_PSD_TRUE@pkg_LTLIBRARIES = module.la @BUILD_LOADER_PSD_TRUE@module_la_SOURCES = evas_image_load_psd.c @BUILD_LOADER_PSD_TRUE@module_la_LIBADD = @EVAS_GENERAL_LIBS@ @EVIL_LIBS@ @BUILD_LOADER_PSD_TRUE@module_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -module -avoid-version @BUILD_LOADER_PSD_TRUE@module_la_LIBTOOLFLAGS = --tag=disable-static all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/bin/loaders/psd/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/bin/loaders/psd/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-pkgLTLIBRARIES: $(pkg_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(pkg_LTLIBRARIES)'; test -n "$(pkgdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(pkgdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(pkgdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkgdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkgdir)"; \ } uninstall-pkgLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(pkg_LTLIBRARIES)'; test -n "$(pkgdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkgdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkgdir)/$$f"; \ done clean-pkgLTLIBRARIES: -test -z "$(pkg_LTLIBRARIES)" || rm -f $(pkg_LTLIBRARIES) @list='$(pkg_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } module.la: $(module_la_OBJECTS) $(module_la_DEPENDENCIES) $(EXTRA_module_la_DEPENDENCIES) $(AM_V_CCLD)$(module_la_LINK) $(am_module_la_rpath) $(module_la_OBJECTS) $(module_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/module_la-evas_image_load_psd.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< module_la-evas_image_load_psd.lo: evas_image_load_psd.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT module_la-evas_image_load_psd.lo -MD -MP -MF $(DEPDIR)/module_la-evas_image_load_psd.Tpo -c -o module_la-evas_image_load_psd.lo `test -f 'evas_image_load_psd.c' || echo '$(srcdir)/'`evas_image_load_psd.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/module_la-evas_image_load_psd.Tpo $(DEPDIR)/module_la-evas_image_load_psd.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='evas_image_load_psd.c' object='module_la-evas_image_load_psd.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o module_la-evas_image_load_psd.lo `test -f 'evas_image_load_psd.c' || echo '$(srcdir)/'`evas_image_load_psd.c mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: for dir in "$(DESTDIR)$(pkgdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool clean-pkgLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-pkgLTLIBRARIES install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-pkgLTLIBRARIES .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-libtool clean-pkgLTLIBRARIES cscopelist-am ctags \ ctags-am distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-pkgLTLIBRARIES install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am uninstall-pkgLTLIBRARIES #else #noinst_LTLIBRARIES = libevas_loader_psd.la #libevas_loader_psd_la_SOURCES = evas_image_load_psd.c #libevas_loader_psd_la_LIBADD = #endif # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: evas-1.7.9/src/bin/loaders/psd/evas_image_load_psd.c0000664000175000017500000006255212175475547017333 00000000000000#define _XOPEN_SOURCE #ifdef HAVE_CONFIG_H # include #endif #include #include #include #include #include #include #include #include #ifdef HAVE_NETINET_IN_H # include #endif #ifdef HAVE_UNISTD_H # include #endif #ifdef HAVE_EVIL # include #endif #include "evas_macros.h" #include "evas_cserve2.h" #include "evas_cserve2_slave.h" typedef struct _PSD_Header PSD_Header; typedef enum _PSD_Mode { PSD_GREYSCALE = 1, PSD_INDEXED = 2, PSD_RGB = 3, PSD_CMYK = 4 } PSD_Mode; struct _PSD_Header { unsigned char signature[4]; unsigned short version; unsigned char reserved[9]; unsigned short channels; unsigned int height; unsigned int width; unsigned short depth; unsigned short channel_num; PSD_Mode mode; }; enum { READ_COMPRESSED_SUCCESS, READ_COMPRESSED_ERROR_FILE_CORRUPT, READ_COMPRESSED_ERROR_FILE_READ_ERROR }; static Eina_Bool get_compressed_channels_length(PSD_Header *Head, const unsigned char *map, size_t length, size_t *position, unsigned short *rle_table, unsigned int *chanlen); static int read_ushort(const unsigned char *map, size_t length, size_t *position, unsigned short *ret) { if (*position + 2 > length) return 0; // FIXME: need to check order *ret = (map[(*position) + 0] << 8) | map[(*position) + 1]; *position += 2; return 1; } static int read_uint(const unsigned char *map, size_t length, size_t *position, unsigned int *ret) { if (*position + 4 > length) return 0; // FIXME: need to check order *ret = ARGB_JOIN(map[(*position) + 0], map[(*position) + 1], map[(*position) + 2], map[(*position) + 3]); *position += 4; return 1; } static int read_block(const unsigned char *map, size_t length, size_t *position, void *target, size_t size) { if (*position + size > length) return 0; memcpy(target, map + *position, size); *position += size; return 1; } // Internal function used to get the Psd header from the current file. Eina_Bool psd_get_header(PSD_Header *header, const unsigned char *map, size_t length, size_t *position) { unsigned short tmp; #define CHECK_RET(Call) \ if (!Call) return EINA_FALSE; CHECK_RET(read_block(map, length, position, header->signature, 4)); CHECK_RET(read_ushort(map, length, position, &header->version)); CHECK_RET(read_block(map, length, position, header->reserved, 6)); CHECK_RET(read_ushort(map, length, position, &header->channels)); CHECK_RET(read_uint(map, length, position, &header->height)); CHECK_RET(read_uint(map, length, position, &header->width)); CHECK_RET(read_ushort(map, length, position, &header->depth)); CHECK_RET(read_ushort(map, length, position, &tmp)); header->mode = tmp; #undef CHECK_RET /* fprintf(stderr, "<<<<<<<<<<<\nsignature : %c%c%c%c\n", */ /* header->signature[0], */ /* header->signature[1], */ /* header->signature[2], */ /* header->signature[3]); */ /* fprintf(stderr, "version : %i\n", header->version); */ /* fprintf(stderr, "channels : %i\n", header->channels); */ /* fprintf(stderr, "width x height : %dx%d\n", header->width, header->height); */ /* fprintf(stderr, "depth : %i\n", header->depth); */ /* fprintf(stderr, "mode : %i\n>>>>>>>>>>>>\n", header->mode); */ return EINA_TRUE; } // Internal function used to check if the HEADER is a valid Psd header. Eina_Bool is_psd(PSD_Header *header) { if (strncmp((char*)header->signature, "8BPS", 4)) return EINA_FALSE; if (header->version != 1) return EINA_FALSE; if (header->channels < 1 || header->channels > 24) return EINA_FALSE; if (header->height < 1 || header->width < 1) return EINA_FALSE; if (header->depth != 1 && header->depth != 8 && header->depth != 16) return EINA_FALSE; return EINA_TRUE; } static Eina_Bool evas_image_load_file_head_psd(Evas_Img_Load_Params *ilp, const char *FileName, const char *key __UNUSED__, int *error) { Eina_File *f; void *map; size_t length; size_t position; PSD_Header header; Eina_Bool correct; *error = EVAS_LOAD_ERROR_NONE; f = eina_file_open(FileName, 0); if (f == NULL) { *error = EVAS_LOAD_ERROR_DOES_NOT_EXIST; return EINA_FALSE; } map = eina_file_map_all(f, EINA_FILE_SEQUENTIAL); length = eina_file_size_get(f); position = 0; if (!map || length < 1) { eina_file_close(f); *error = EVAS_LOAD_ERROR_CORRUPT_FILE; return EINA_FALSE; } correct = psd_get_header(&header, map, length, &position); eina_file_map_free(f, map); eina_file_close(f); if (!correct || !is_psd(&header)) { *error = EVAS_LOAD_ERROR_UNKNOWN_FORMAT; return EINA_FALSE; } ilp->w = header.width; ilp->h = header.height; if (header.channels == 3) ilp->alpha = 0; else ilp->alpha = 1; return EINA_TRUE; } static unsigned int read_compressed_channel(const unsigned char *map, size_t length, size_t *position, const unsigned int channel_length __UNUSED__, unsigned int size, unsigned char* channel) { // FIXME: what does channel_length means, and why is it not used unsigned int i; char headbyte, c; #define CHECK_RET(Call) \ if (!Call) return READ_COMPRESSED_ERROR_FILE_READ_ERROR; \ for (i = 0; i < size; ) { CHECK_RET(read_block(map, length, position, &headbyte, 1)); if (headbyte >= 0) { if (i + headbyte > size) return READ_COMPRESSED_ERROR_FILE_CORRUPT; CHECK_RET(read_block(map, length, position, channel + i, headbyte + 1)); i += headbyte + 1; } else if (headbyte >= -127 && headbyte <= -1) { int run; CHECK_RET(read_block(map, length, position, &c, 1)); run = c; /* if (run == -1) */ /* return READ_COMPRESSED_ERROR_FILE_READ_ERROR; */ if (i + (-headbyte + 1) > size) return READ_COMPRESSED_ERROR_FILE_CORRUPT; memset(channel + i, run, -headbyte + 1); i += -headbyte + 1; } } #undef CHECK_RET return READ_COMPRESSED_SUCCESS; } static Eina_Bool psd_get_data(PSD_Header *head, const unsigned char *map, size_t length, size_t *position, unsigned char *buffer, Eina_Bool compressed, int *error) { unsigned int c, x, y, numchan, bps, bpc, bpp; unsigned int pixels_count; unsigned char *channel = NULL; unsigned char *data = NULL; // Added 01-07-2009: This is needed to correctly load greyscale and // paletted images. switch (head->mode) { case PSD_GREYSCALE: case PSD_INDEXED: numchan = 1; break; default: numchan = 3; } bpp = head->channels; bpc = head->depth / 8; pixels_count = head->width * head->height; data = malloc(sizeof (unsigned char) * pixels_count * bpp); if (!data) return EINA_FALSE; channel = malloc(sizeof (unsigned char) * pixels_count * bpc); if (!channel) { free(data); return EINA_FALSE; } bps = head->width * head->channels * bpc; // @TODO: Add support for this in, though I have yet to run across a .psd // file that uses this. if (compressed && bpc == 2) { free(data); free(channel); *error = EVAS_LOAD_ERROR_UNKNOWN_FORMAT; return EINA_FALSE; } #define CHECK_RET(Call) \ if (!Call) \ { \ free(data); \ free(channel); \ return EINA_FALSE; \ } if (!compressed) { if (bpc == 1) { for (c = 0; c < numchan; c++) { unsigned char *tmp = channel; CHECK_RET(read_block(map, length, position, tmp, pixels_count)); for (y = 0; y < head->height * bps; y += bps) { for (x = 0; x < bps; x += bpp, tmp++) { data[y + x + c] = *tmp; } } } // Accumulate any remaining channels into a single alpha channel //@TODO: This needs to be changed for greyscale images. for (; c < head->channels; c++) { unsigned char *tmp = channel; CHECK_RET(read_block(map, length, position, channel, pixels_count)); for (y = 0; y < head->height * bps; y += bps) { for (x = 0; x < bps; x += bpp, tmp++) { unsigned short newval; // previous formula was : (old / 255 * new / 255) * 255 newval = (*tmp) * data[y + x + 3]; data[y + x + 3] = newval >> 8; } } } } else { int bps2; bps2 = bps / 2; // iCurImage->Bpc == 2 for (c = 0; c < numchan; c++) { unsigned short *shortptr = (unsigned short*) channel; CHECK_RET(read_block(map, length, position, channel, pixels_count * 2)); for (y = 0; y < head->height * bps2; y += bps2) { for (x = 0; x < (unsigned int)bps2; x += bpp, shortptr++) { ((unsigned short*)data)[y + x + c] = *shortptr; } } } // Accumulate any remaining channels into a single alpha channel //@TODO: This needs to be changed for greyscale images. for (; c < head->channels; c++) { unsigned short *shortptr = (unsigned short*) channel; CHECK_RET(read_block(map, length, position, channel, pixels_count * 2)); for (y = 0; y < head->height * bps2; y += bps2) { for (x = 0; x < (unsigned int)bps2; x += bpp, shortptr) { unsigned int newval; newval = *shortptr * ((unsigned short*)data)[y + x + 3]; ((unsigned short*)data)[y + x + 3] = newval >> 16; } } } } } else { unsigned short *rle_table; unsigned int *chanlen; rle_table = alloca(head->height * head->channel_num * sizeof (unsigned short)); chanlen = alloca(head->channel_num * sizeof (unsigned int)); if (!get_compressed_channels_length(head, map, length, position, rle_table, chanlen)) goto file_read_error; for (c = 0; c < numchan; c++) { unsigned char *tmp = channel; int err; err = read_compressed_channel(map, length, position, chanlen[c], pixels_count, channel); if (err == READ_COMPRESSED_ERROR_FILE_CORRUPT) goto file_corrupt; else if (err == READ_COMPRESSED_ERROR_FILE_READ_ERROR) goto file_read_error; for (y = 0; y < head->height * bps; y += bps) { for (x = 0; x < bps; x += bpp, tmp++) { data[y + x + c] = *tmp; } } } // Initialize the alpha channel to solid //@TODO: This needs to be changed for greyscale images. if (head->channels >= 4) { for (y = 0; y < head->height * bps; y += bps) { for (x = 0; x < bps; x += bpp) { data[y + x + 3] = 255; } } for (; c < head->channels; c++) { unsigned char *tmp = channel; int err; err = read_compressed_channel(map, length, position, chanlen[c], pixels_count, channel); if (err == READ_COMPRESSED_ERROR_FILE_CORRUPT) goto file_corrupt; else if (err == READ_COMPRESSED_ERROR_FILE_READ_ERROR) goto file_read_error; for (y = 0; y < head->height * bps; y += bps) { for (x = 0; x < bps; x += bpp, tmp++) { unsigned short newval; newval = *tmp * data[y + x + 3]; data[y + x + 3] = newval >> 8; } } } } } if (bpp == 3) { for (x = 0; x < pixels_count; x++) { buffer[x * 4 + 0] = data[x * 3 + 2]; buffer[x * 4 + 1] = data[x * 3 + 1]; buffer[x * 4 + 2] = data[x * 3 + 0]; buffer[x * 4 + 3] = 255; } } else { // BRGA to RGBA for (x= 0; x < pixels_count; x++) { buffer[x * 4 + 0] = data[x * 4 + 2]; buffer[x * 4 + 1] = data[x * 4 + 1]; buffer[x * 4 + 2] = data[x * 4 + 0]; buffer[x * 4 + 3] = data[x * 4 + 3]; } } free(channel); free(data); return EINA_TRUE; #undef CHECK_RET file_corrupt: *error = EVAS_LOAD_ERROR_CORRUPT_FILE; file_read_error: free(channel); free(data); return EINA_FALSE; } static Eina_Bool get_single_channel(PSD_Header *head, const unsigned char *map, size_t length, size_t *position, unsigned char *buffer, Eina_Bool compressed) { unsigned int i, bpc; char headbyte; int c; int pixels_count; bpc = (head->depth / 8); pixels_count = head->width * head->height; #define CHECK_RET(Call) \ if (!Call) return EINA_FALSE; if (!compressed) { if (bpc == 1) { CHECK_RET(read_block(map, length, position, buffer, pixels_count)); } else { // Bpc == 2 CHECK_RET(read_block(map, length, position, buffer, pixels_count * 2)); } } else { for (i = 0; i < (unsigned int)pixels_count; ) { CHECK_RET(read_block(map, length, position, &headbyte, 1)); if (headbyte >= 0) { // && HeadByte <= 127 CHECK_RET(read_block(map, length, position, buffer + i, headbyte + 1)); i += headbyte + 1; } if (headbyte >= -127 && headbyte <= -1) { int run; CHECK_RET(read_block(map, length, position, &c, 1)); run = c; if (run == -1) return EINA_FALSE; memset(buffer + i, run, -headbyte + 1); i += -headbyte + 1; } } } #undef CHECK_RET return EINA_TRUE; } static Eina_Bool read_psd_grey(Evas_Img_Load_Params *ilp, PSD_Header *head, const unsigned char *map, size_t length, size_t *position, int *error) { unsigned int color_mode, resource_size, misc_info; unsigned short compressed; void *surface = NULL; *error = EVAS_LOAD_ERROR_CORRUPT_FILE; #define CHECK_RET(Call) \ if (!Call) return EINA_FALSE; CHECK_RET(read_uint(map, length, position, &color_mode)); // Skip over the 'color mode data section' *position += color_mode; CHECK_RET(read_uint(map, length, position, &resource_size)); // Read the 'image resources section' *position += resource_size; CHECK_RET(read_uint(map, length, position, &misc_info)); *position += misc_info; CHECK_RET(read_ushort(map, length, position, &compressed)); ilp->w = head->width; ilp->h = head->height; if (head->channels == 3) ilp->alpha = 0; else ilp->alpha = 1; head->channel_num = head->channels; // Temporary to read only one channel...some greyscale .psd files have 2. head->channels = 1; switch (head->depth) { case 8: case 16: break; default: *error = EVAS_LOAD_ERROR_UNKNOWN_FORMAT; return EINA_FALSE; } surface = ilp->buffer; if (!surface) { *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; goto cleanup_error; } if (!psd_get_data(head, map, length, position, surface, compressed, error)) goto cleanup_error; return EINA_TRUE; #undef CHECK_RET cleanup_error: return EINA_FALSE; } Eina_Bool read_psd_indexed(Evas_Img_Load_Params *ilp, PSD_Header *head, const unsigned char *map, size_t length, size_t *position, int *error) { unsigned int color_mode, resource_size, misc_info; unsigned short compressed; void *surface; *error = EVAS_LOAD_ERROR_CORRUPT_FILE; #define CHECK_RET(Call) \ if (!(Call)) return EINA_FALSE; CHECK_RET(read_uint(map, length, position, &color_mode)); CHECK_RET(!(color_mode % 3)); /* Palette = (unsigned char*)malloc(Colormode); if (Palette == NULL) return EINA_FALSE; if (fread(&Palette, 1, Colormode, file) != Colormode) goto cleanup_error; */ // Skip over the 'color mode data section' *position += color_mode; // Read the 'image resources section' CHECK_RET(read_uint(map, length, position, &resource_size)); *position += resource_size; CHECK_RET(read_uint(map, length, position, &misc_info)); *position += misc_info; CHECK_RET(read_ushort(map, length, position, &compressed)); if (head->channels != 1 || head->depth != 8) { *error = EVAS_LOAD_ERROR_UNKNOWN_FORMAT; return EINA_FALSE; } head->channel_num = head->channels; ilp->w = head->width; ilp->h = head->height; if (head->channels == 3) ilp->alpha = 0; else ilp->alpha = 1; surface = ilp->buffer; if (!surface) { *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; return EINA_FALSE; } if (!psd_get_data(head, map, length, position, surface, compressed, error)) return EINA_FALSE; return EINA_TRUE; #undef CHECK_RET } Eina_Bool read_psd_rgb(Evas_Img_Load_Params *ilp, PSD_Header *head, const unsigned char *map, size_t length, size_t *position, int *error) { unsigned int color_mode, resource_size, misc_info; unsigned short compressed; void *surface; #define CHECK_RET(Call) \ if (!Call) return EINA_FALSE; CHECK_RET(read_uint(map, length, position, &color_mode)); // Skip over the 'color mode data section' *position += color_mode; // Read the 'image resources section' CHECK_RET(read_uint(map, length, position, &resource_size)); *position += resource_size; CHECK_RET(read_uint(map, length, position, &misc_info)); *position += misc_info; CHECK_RET(read_ushort(map, length, position, &compressed)); head->channel_num = head->channels; switch (head->depth) { case 8: case 16: break; default: *error = EVAS_LOAD_ERROR_UNKNOWN_FORMAT; return EINA_FALSE; } ilp->w = head->width; ilp->h = head->height; if (head->channels == 3) ilp->alpha = 0; else ilp->alpha = 1; surface = ilp->buffer; if (!surface) { *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; goto cleanup_error; } if (!psd_get_data(head, map, length, position, surface, compressed, error)) goto cleanup_error; evas_cserve2_image_premul(ilp); return EINA_TRUE; #undef CHECK_RET cleanup_error: return EINA_FALSE; } Eina_Bool read_psd_cmyk(Evas_Img_Load_Params *ilp, PSD_Header *head, const unsigned char *map, size_t length, size_t *position, int *error) { unsigned int color_mode, resource_size, misc_info, size, j, data_size; unsigned short compressed; unsigned int format, type; unsigned char *kchannel = NULL; void *surface; *error = EVAS_LOAD_ERROR_CORRUPT_FILE; #define CHECK_RET(Call) \ if (!Call) return EINA_FALSE; CHECK_RET(read_uint(map, length, position, &color_mode)); // Skip over the 'color mode data section' *position += color_mode; CHECK_RET(read_uint(map, length, position, &resource_size)); // Read the 'image resources section' *position += resource_size; CHECK_RET(read_uint(map, length, position, &misc_info)); *position += misc_info; CHECK_RET(read_ushort(map, length, position, &compressed)); switch (head->channels) { case 4: format = 0x1907; head->channel_num = 4; head->channels = 3; break; case 5: format = 0x1908; head->channel_num = 5; head->channels = 4; break; default: *error = EVAS_LOAD_ERROR_UNKNOWN_FORMAT; return EINA_FALSE; } switch (head->depth) { case 8: type = 1; break; case 16: type = 2; break; default: *error = EVAS_LOAD_ERROR_UNKNOWN_FORMAT; return EINA_FALSE; } ilp->w = head->width; ilp->h = head->height; if (head->channels == 3) ilp->alpha = 0; else ilp->alpha = 1; surface = ilp->buffer; if (!surface) { *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; goto cleanup_error; } if (!psd_get_data(head, map, length, position, surface, compressed, error)) goto cleanup_error; size = type * ilp->w * ilp->h; kchannel = malloc(size); if (kchannel == NULL) goto cleanup_error; if (!get_single_channel(head, map, length, position, kchannel, compressed)) goto cleanup_error; data_size = head->channels * type * ilp->w * ilp->h; if (format == 0x1907) { unsigned char *tmp = surface; const unsigned char *limit = tmp + data_size; for (j = 0; tmp < limit; tmp++, j++) { int k; for (k = 0; k < 3; k++) *tmp = (*tmp * kchannel[j]) >> 8; // FIXME: tmp[i+3] = 255; } } else { // RGBA unsigned char *tmp = surface; const unsigned char *limit = tmp + data_size; // The KChannel array really holds the alpha channel on this one. for (j = 0; tmp < limit; tmp += 4, j++) { tmp[0] = (tmp[0] * tmp[3]) >> 8; tmp[1] = (tmp[1] * tmp[3]) >> 8; tmp[2] = (tmp[2] * tmp[3]) >> 8; tmp[3] = kchannel[j]; // Swap 'K' with alpha channel. } } free(kchannel); evas_cserve2_image_premul(ilp); return EINA_TRUE; cleanup_error: free(kchannel); return EINA_FALSE; } static Eina_Bool evas_image_load_file_data_psd(Evas_Img_Load_Params *ilp, const char *file, const char *key __UNUSED__, int *error) { Eina_File *f; void *map; size_t length; size_t position; PSD_Header header; Eina_Bool bpsd = EINA_FALSE; f = eina_file_open(file, 0); if (f == NULL) { *error = EVAS_LOAD_ERROR_DOES_NOT_EXIST; return bpsd; } map = eina_file_map_all(f, EINA_FILE_SEQUENTIAL); length = eina_file_size_get(f); position = 0; if (!map || length < 1) { eina_file_close(f); *error = EVAS_LOAD_ERROR_CORRUPT_FILE; return EINA_FALSE; } if (!psd_get_header(&header, map, length, &position) || !is_psd(&header)) { eina_file_map_free(f, map); eina_file_close(f); *error = EVAS_LOAD_ERROR_GENERIC; return EINA_FALSE; } ilp->w = header.width; ilp->h = header.height; *error = EVAS_LOAD_ERROR_NONE; switch (header.mode) { case PSD_GREYSCALE: // Greyscale bpsd = read_psd_grey(ilp, &header, map, length, &position, error); break; case PSD_INDEXED: // Indexed bpsd = read_psd_indexed(ilp, &header, map, length, &position, error); break; case PSD_RGB: // RGB bpsd = read_psd_rgb(ilp, &header, map, length, &position, error); break; case PSD_CMYK: // CMYK bpsd = read_psd_cmyk(ilp, &header, map, length, &position, error); break; default : *error = EVAS_LOAD_ERROR_UNKNOWN_FORMAT; bpsd = EINA_FALSE; } eina_file_map_free(f, map); eina_file_close(f); return bpsd; } static Eina_Bool get_compressed_channels_length(PSD_Header *head, const unsigned char *map, size_t length, size_t *position, unsigned short *rle_table, unsigned int *chanlen) { unsigned int j; unsigned int c; if (!read_block(map, length, position, rle_table, sizeof (unsigned short) * head->height * head->channel_num)) return EINA_FALSE; memset(chanlen, 0, head->channel_num * sizeof(unsigned int)); for (c = 0; c < head->channel_num; c++) { unsigned int i; j = c * head->height; for (i = 0; i < head->height; i++) { chanlen[c] += rle_table[i + j]; } } return EINA_TRUE; } static Evas_Loader_Module_Api modapi = { EVAS_CSERVE2_MODULE_API_VERSION, "psd", evas_image_load_file_head_psd, evas_image_load_file_data_psd }; static Eina_Bool module_init(void) { return evas_cserve2_loader_register(&modapi); } static void module_shutdown(void) { } EINA_MODULE_INIT(module_init); EINA_MODULE_SHUTDOWN(module_shutdown); evas-1.7.9/src/bin/loaders/psd/Makefile.am0000664000175000017500000000133012175475547015241 00000000000000 MAINTAINERCLEANFILES = Makefile.in AM_CPPFLAGS = \ -I. \ -I$(top_srcdir)/src/lib \ -I$(top_srcdir)/src/lib/include \ -I$(top_srcdir)/src/lib/cserve2 \ -I$(top_srcdir)/src/bin \ @EVAS_GENERAL_CFLAGS@ \ @EVIL_CFLAGS@ if BUILD_LOADER_PSD #if !EVAS_STATIC_BUILD_PSD pkgdir = $(libdir)/evas/cserve2/loaders/psd/$(MODULE_ARCH) pkg_LTLIBRARIES = module.la module_la_SOURCES = evas_image_load_psd.c module_la_LIBADD = @EVAS_GENERAL_LIBS@ @EVIL_LIBS@ module_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -module -avoid-version module_la_LIBTOOLFLAGS = --tag=disable-static #else #noinst_LTLIBRARIES = libevas_loader_psd.la #libevas_loader_psd_la_SOURCES = evas_image_load_psd.c #libevas_loader_psd_la_LIBADD = #endif endif evas-1.7.9/src/bin/loaders/xpm/0000775000175000017500000000000012234557317013276 500000000000000evas-1.7.9/src/bin/loaders/xpm/Makefile.in0000664000175000017500000007210312234557301015257 00000000000000# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/bin/loaders/xpm DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/efl_attribute.m4 \ $(top_srcdir)/m4/efl_coverage.m4 \ $(top_srcdir)/m4/efl_doxygen.m4 \ $(top_srcdir)/m4/efl_fnmatch.m4 \ $(top_srcdir)/m4/efl_path_max.m4 \ $(top_srcdir)/m4/efl_shm_open.m4 $(top_srcdir)/m4/efl_tests.m4 \ $(top_srcdir)/m4/evas_check_engine.m4 \ $(top_srcdir)/m4/evas_check_loader.m4 \ $(top_srcdir)/m4/evas_converter.m4 \ $(top_srcdir)/m4/evas_dither.m4 \ $(top_srcdir)/m4/evas_scaler.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(pkgdir)" LTLIBRARIES = $(pkg_LTLIBRARIES) module_la_DEPENDENCIES = am__module_la_SOURCES_DIST = evas_image_load_xpm.c @BUILD_LOADER_XPM_TRUE@am_module_la_OBJECTS = \ @BUILD_LOADER_XPM_TRUE@ module_la-evas_image_load_xpm.lo module_la_OBJECTS = $(am_module_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = module_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(AM_CFLAGS) $(CFLAGS) $(module_la_LDFLAGS) $(LDFLAGS) -o $@ @BUILD_LOADER_XPM_TRUE@am_module_la_rpath = -rpath $(pkgdir) AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(module_la_SOURCES) DIST_SOURCES = $(am__module_la_SOURCES_DIST) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHECK_CFLAGS = @CHECK_CFLAGS@ CHECK_LIBS = @CHECK_LIBS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@ DIRECTFB_LIBS = @DIRECTFB_LIBS@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ ECORE_EVAS_CFLAGS = @ECORE_EVAS_CFLAGS@ ECORE_EVAS_LIBS = @ECORE_EVAS_LIBS@ EDB_CFLAGS = @EDB_CFLAGS@ EDB_LIBS = @EDB_LIBS@ EDJE_CFLAGS = @EDJE_CFLAGS@ EDJE_LIBS = @EDJE_LIBS@ EET_CFLAGS = @EET_CFLAGS@ EET_LIBS = @EET_LIBS@ EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@ EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@ EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@ EFL_SHM_OPEN_LIBS = @EFL_SHM_OPEN_LIBS@ EGREP = @EGREP@ EINA_CFLAGS = @EINA_CFLAGS@ EINA_LIBS = @EINA_LIBS@ EVAS_CFLAGS = @EVAS_CFLAGS@ EVAS_GENERAL_CFLAGS = @EVAS_GENERAL_CFLAGS@ EVAS_GENERAL_LIBS = @EVAS_GENERAL_LIBS@ EVAS_LIBS = @EVAS_LIBS@ EVAS_SSE3_CFLAGS = @EVAS_SSE3_CFLAGS@ EVIL_CFLAGS = @EVIL_CFLAGS@ EVIL_LIBS = @EVIL_LIBS@ EXEEXT = @EXEEXT@ EXOTIC_CFLAGS = @EXOTIC_CFLAGS@ EXOTIC_LIBS = @EXOTIC_LIBS@ FGREP = @FGREP@ FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@ FONTCONFIG_LIBS = @FONTCONFIG_LIBS@ FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ FREETYPE_LIBS = @FREETYPE_LIBS@ FRIBIDI_CFLAGS = @FRIBIDI_CFLAGS@ FRIBIDI_LIBS = @FRIBIDI_LIBS@ GL_EET_CFLAGS = @GL_EET_CFLAGS@ GL_EET_LIBS = @GL_EET_LIBS@ GREP = @GREP@ HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@ HARFBUZZ_LIBS = @HARFBUZZ_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LINEBREAK_CFLAGS = @LINEBREAK_CFLAGS@ LINEBREAK_LIBS = @LINEBREAK_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MODULE_ARCH = @MODULE_ARCH@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ SDL_CFLAGS = @SDL_CFLAGS@ SDL_LIBS = @SDL_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ SVG_CFLAGS = @SVG_CFLAGS@ SVG_LIBS = @SVG_LIBS@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ XCB_CFLAGS = @XCB_CFLAGS@ XCB_GL_CFLAGS = @XCB_GL_CFLAGS@ XCB_GL_LIBS = @XCB_GL_LIBS@ XCB_LIBS = @XCB_LIBS@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_ct_OBJC = @ac_ct_OBJC@ altivec_cflags = @altivec_cflags@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ dlopen_libs = @dlopen_libs@ docdir = @docdir@ dvidir = @dvidir@ edje_cc = @edje_cc@ efl_doxygen = @efl_doxygen@ efl_have_doxygen = @efl_have_doxygen@ evas_engine_buffer_cflags = @evas_engine_buffer_cflags@ evas_engine_buffer_libs = @evas_engine_buffer_libs@ evas_engine_direct3d_cflags = @evas_engine_direct3d_cflags@ evas_engine_direct3d_libs = @evas_engine_direct3d_libs@ evas_engine_directfb_cflags = @evas_engine_directfb_cflags@ evas_engine_directfb_libs = @evas_engine_directfb_libs@ evas_engine_fb_cflags = @evas_engine_fb_cflags@ evas_engine_fb_libs = @evas_engine_fb_libs@ evas_engine_gl_cocoa_cflags = @evas_engine_gl_cocoa_cflags@ evas_engine_gl_cocoa_libs = @evas_engine_gl_cocoa_libs@ evas_engine_gl_common_libs = @evas_engine_gl_common_libs@ evas_engine_gl_sdl_cflags = @evas_engine_gl_sdl_cflags@ evas_engine_gl_sdl_libs = @evas_engine_gl_sdl_libs@ evas_engine_gl_xcb_cflags = @evas_engine_gl_xcb_cflags@ evas_engine_gl_xcb_libs = @evas_engine_gl_xcb_libs@ evas_engine_gl_xlib_cflags = @evas_engine_gl_xlib_cflags@ evas_engine_gl_xlib_libs = @evas_engine_gl_xlib_libs@ evas_engine_psl1ght_cflags = @evas_engine_psl1ght_cflags@ evas_engine_psl1ght_libs = @evas_engine_psl1ght_libs@ evas_engine_software_16_sdl_cflags = @evas_engine_software_16_sdl_cflags@ evas_engine_software_16_sdl_libs = @evas_engine_software_16_sdl_libs@ evas_engine_software_16_wince_cflags = @evas_engine_software_16_wince_cflags@ evas_engine_software_16_wince_libs = @evas_engine_software_16_wince_libs@ evas_engine_software_16_x11_cflags = @evas_engine_software_16_x11_cflags@ evas_engine_software_16_x11_libs = @evas_engine_software_16_x11_libs@ evas_engine_software_8_x11_cflags = @evas_engine_software_8_x11_cflags@ evas_engine_software_8_x11_libs = @evas_engine_software_8_x11_libs@ evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@ evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@ evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@ evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ evas_image_loader_edb_libs = @evas_image_loader_edb_libs@ evas_image_loader_eet_cflags = @evas_image_loader_eet_cflags@ evas_image_loader_eet_libs = @evas_image_loader_eet_libs@ evas_image_loader_generic_cflags = @evas_image_loader_generic_cflags@ evas_image_loader_generic_libs = @evas_image_loader_generic_libs@ evas_image_loader_gif_cflags = @evas_image_loader_gif_cflags@ evas_image_loader_gif_libs = @evas_image_loader_gif_libs@ evas_image_loader_ico_cflags = @evas_image_loader_ico_cflags@ evas_image_loader_ico_libs = @evas_image_loader_ico_libs@ evas_image_loader_jpeg_cflags = @evas_image_loader_jpeg_cflags@ evas_image_loader_jpeg_libs = @evas_image_loader_jpeg_libs@ evas_image_loader_pmaps_cflags = @evas_image_loader_pmaps_cflags@ evas_image_loader_pmaps_libs = @evas_image_loader_pmaps_libs@ evas_image_loader_png_cflags = @evas_image_loader_png_cflags@ evas_image_loader_png_libs = @evas_image_loader_png_libs@ evas_image_loader_psd_cflags = @evas_image_loader_psd_cflags@ evas_image_loader_psd_libs = @evas_image_loader_psd_libs@ evas_image_loader_svg_cflags = @evas_image_loader_svg_cflags@ evas_image_loader_svg_libs = @evas_image_loader_svg_libs@ evas_image_loader_tga_cflags = @evas_image_loader_tga_cflags@ evas_image_loader_tga_libs = @evas_image_loader_tga_libs@ evas_image_loader_tiff_cflags = @evas_image_loader_tiff_cflags@ evas_image_loader_tiff_libs = @evas_image_loader_tiff_libs@ evas_image_loader_wbmp_cflags = @evas_image_loader_wbmp_cflags@ evas_image_loader_wbmp_libs = @evas_image_loader_wbmp_libs@ evas_image_loader_xpm_cflags = @evas_image_loader_xpm_cflags@ evas_image_loader_xpm_libs = @evas_image_loader_xpm_libs@ exec_prefix = @exec_prefix@ have_evas_engine_gl_x11 = @have_evas_engine_gl_x11@ have_evas_engine_gl_xcb = @have_evas_engine_gl_xcb@ have_evas_engine_gl_xlib = @have_evas_engine_gl_xlib@ have_evas_engine_software_x11 = @have_evas_engine_software_x11@ have_evas_engine_software_xcb = @have_evas_engine_software_xcb@ have_evas_engine_software_xlib = @have_evas_engine_software_xlib@ have_lcov = @have_lcov@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_enable_auto_import = @lt_enable_auto_import@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgconfig_requires_private = @pkgconfig_requires_private@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pthread_cflags = @pthread_cflags@ pthread_libs = @pthread_libs@ release_info = @release_info@ requirement_evas = @requirement_evas@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ shm_open_libs = @shm_open_libs@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ version_info = @version_info@ MAINTAINERCLEANFILES = Makefile.in AM_CPPFLAGS = \ -I. \ -I$(top_srcdir)/src/lib \ -I$(top_srcdir)/src/lib/include \ -I$(top_srcdir)/src/lib/cserve2 \ -I$(top_srcdir)/src/bin \ @EVAS_GENERAL_CFLAGS@ \ @evas_image_loader_xpm_cflags@ \ @EVIL_CFLAGS@ #if !EVAS_STATIC_BUILD_XPM @BUILD_LOADER_XPM_TRUE@pkgdir = $(libdir)/evas/cserve2/loaders/xpm/$(MODULE_ARCH) @BUILD_LOADER_XPM_TRUE@pkg_LTLIBRARIES = module.la @BUILD_LOADER_XPM_TRUE@module_la_SOURCES = evas_image_load_xpm.c @BUILD_LOADER_XPM_TRUE@module_la_LIBADD = @EVAS_GENERAL_LIBS@ @EVIL_LIBS@ @evas_image_loader_xpm_libs@ @BUILD_LOADER_XPM_TRUE@module_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -module -avoid-version @BUILD_LOADER_XPM_TRUE@module_la_LIBTOOLFLAGS = --tag=disable-static all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/bin/loaders/xpm/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/bin/loaders/xpm/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-pkgLTLIBRARIES: $(pkg_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(pkg_LTLIBRARIES)'; test -n "$(pkgdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(pkgdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(pkgdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkgdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkgdir)"; \ } uninstall-pkgLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(pkg_LTLIBRARIES)'; test -n "$(pkgdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkgdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkgdir)/$$f"; \ done clean-pkgLTLIBRARIES: -test -z "$(pkg_LTLIBRARIES)" || rm -f $(pkg_LTLIBRARIES) @list='$(pkg_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } module.la: $(module_la_OBJECTS) $(module_la_DEPENDENCIES) $(EXTRA_module_la_DEPENDENCIES) $(AM_V_CCLD)$(module_la_LINK) $(am_module_la_rpath) $(module_la_OBJECTS) $(module_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/module_la-evas_image_load_xpm.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< module_la-evas_image_load_xpm.lo: evas_image_load_xpm.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT module_la-evas_image_load_xpm.lo -MD -MP -MF $(DEPDIR)/module_la-evas_image_load_xpm.Tpo -c -o module_la-evas_image_load_xpm.lo `test -f 'evas_image_load_xpm.c' || echo '$(srcdir)/'`evas_image_load_xpm.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/module_la-evas_image_load_xpm.Tpo $(DEPDIR)/module_la-evas_image_load_xpm.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='evas_image_load_xpm.c' object='module_la-evas_image_load_xpm.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o module_la-evas_image_load_xpm.lo `test -f 'evas_image_load_xpm.c' || echo '$(srcdir)/'`evas_image_load_xpm.c mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: for dir in "$(DESTDIR)$(pkgdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool clean-pkgLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-pkgLTLIBRARIES install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-pkgLTLIBRARIES .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-libtool clean-pkgLTLIBRARIES cscopelist-am ctags \ ctags-am distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-pkgLTLIBRARIES install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am uninstall-pkgLTLIBRARIES #else #noinst_LTLIBRARIES = libevas_loader_xpm.la #libevas_loader_xpm_la_SOURCES = evas_image_load_xpm.c #libevas_loader_xpm_la_LIBADD = @evas_image_loader_xpm_libs@ #endif # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: evas-1.7.9/src/bin/loaders/xpm/evas_image_load_xpm.c0000664000175000017500000005544112175475547017366 00000000000000#ifdef HAVE_CONFIG_H # include #endif #ifdef HAVE_EVIL # include #endif #include #include "evas_macros.h" #include "evas_cserve2.h" #include "evas_cserve2_slave.h" static Eina_File *rgb_txt; static void *rgb_txt_map; static int _xpm_hexa_int(const char *s, int len) { const char *hexa = "0123456789abcdef"; const char *lookup; int i, c, r; for (r = 0, i = 0; i < len; i++) { c = s[i]; lookup = strchr(hexa, tolower(c)); r = (r << 4) | (lookup ? lookup - hexa : 0); } return r; } static void xpm_parse_color(char *color, int *r, int *g, int *b) { char *tmp; char *max; char *endline; char buf[4096]; /* is a #ff00ff like color */ if (color[0] == '#') { int len; len = strlen(color) - 1; if (len < 96) { len /= 3; *r = _xpm_hexa_int(&(color[1 + (0 * len)]), len); *g = _xpm_hexa_int(&(color[1 + (1 * len)]), len); *b = _xpm_hexa_int(&(color[1 + (2 * len)]), len); if (len == 1) { *r = (*r << 4) | *r; *g = (*g << 4) | *g; *b = (*b << 4) | *b; } else if (len > 2) { *r >>= (len - 2) * 4; *g >>= (len - 2) * 4; *b >>= (len - 2) * 4; } } return; } /* look in rgb txt database */ if (!rgb_txt) return; tmp = rgb_txt_map; max = tmp + eina_file_size_get(rgb_txt); while (tmp < max) { endline = memchr(tmp, '\n', max - tmp); if (!endline) endline = max; if ((*tmp != '!') && ((endline - tmp) < (int) (sizeof(buf) - 1))) { int rr, gg, bb; char name[4096]; /* FIXME: not really efficient, should be loaded once in memory with a lookup table */ memcpy(buf, tmp, endline - tmp); buf[endline - tmp + 1] = '\0'; if (sscanf(buf, "%i %i %i %[^\n]", &rr, &gg, &bb, name) == 4) { if (!strcasecmp(name, color)) { *r = rr; *g = gg; *b = bb; return; } } } tmp = endline + 1; } } typedef struct _CMap CMap; struct _CMap { EINA_RBTREE; short r, g, b; char str[6]; unsigned char transp; }; Eina_Rbtree_Direction _cmap_cmp_node_cb(const Eina_Rbtree *left, const Eina_Rbtree *right, void *data __UNUSED__) { CMap *lcm; CMap *rcm; lcm = EINA_RBTREE_CONTAINER_GET(left, CMap); rcm = EINA_RBTREE_CONTAINER_GET(right, CMap); if (strcmp(lcm->str, rcm->str) < 0) return EINA_RBTREE_LEFT; return EINA_RBTREE_RIGHT; } int _cmap_cmp_key_cb(const Eina_Rbtree *node, const void *key, int length __UNUSED__, void *data __UNUSED__) { CMap *root = EINA_RBTREE_CONTAINER_GET(node, CMap); return strcmp(root->str, key); } /** FIXME: clean this up and make more efficient **/ static Eina_Bool evas_image_load_file_xpm(Evas_Img_Load_Params *ilp, const char *file, const char *key __UNUSED__, int load_data, int *error) { DATA32 *ptr, *end; Eina_File *f; const char *map; size_t length; size_t position; int pc, c, i, j, k, w, h, ncolors, cpp, comment, transp, quote, context, len, done, r, g, b, backslash, lu1, lu2; char *line = NULL; char s[256], tok[128], col[256], *tl; int lsz = 256; CMap *cmap = NULL; Eina_Rbtree *root = NULL; short lookup[128 - 32][128 - 32]; int count, pixels; done = 0; // transp = -1; transp = 1; /* if immediate_load is 1, then dont delay image laoding as below, or */ /* already data in this image - dont load it again */ f = eina_file_open(file, 0); if (!f) { *error = EVAS_LOAD_ERROR_DOES_NOT_EXIST; return EINA_FALSE; } length = eina_file_size_get(f); position = 0; if (length < 9) { eina_file_close(f); *error = EVAS_LOAD_ERROR_CORRUPT_FILE; return EINA_FALSE; } map = eina_file_map_all(f, EINA_FILE_SEQUENTIAL); if (!map) { eina_file_close(f); *error = EVAS_LOAD_ERROR_CORRUPT_FILE; return EINA_FALSE; } if (strncmp("/* XPM */", map, 9)) { *error = EVAS_LOAD_ERROR_UNKNOWN_FORMAT; goto on_error; } i = 0; j = 0; cmap = NULL; w = 10; h = 10; ptr = NULL; end = NULL; c = ' '; comment = 0; quote = 0; context = 0; pixels = 0; count = 0; line = malloc(lsz); if (!line) { *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; goto on_error; } backslash = 0; memset(lookup, 0, sizeof(lookup)); while (!done) { pc = c; if (position == length) break ; c = (char) map[position++]; if (!quote) { if ((pc == '/') && (c == '*')) comment = 1; else if ((pc == '*') && (c == '/') && (comment)) comment = 0; } if (!comment) { if ((!quote) && (c == '"')) { quote = 1; i = 0; } else if ((quote) && (c == '"')) { line[i] = 0; quote = 0; if (context == 0) { /* Header */ if (sscanf(line, "%i %i %i %i", &w, &h, &ncolors, &cpp) != 4) { *error = EVAS_LOAD_ERROR_CORRUPT_FILE; goto on_error; } if ((ncolors > 32766) || (ncolors < 1)) { *error = EVAS_LOAD_ERROR_UNKNOWN_FORMAT; goto on_error; } if ((cpp > 5) || (cpp < 1)) { *error = EVAS_LOAD_ERROR_UNKNOWN_FORMAT; goto on_error; } if ((w > IMG_MAX_SIZE) || (w < 1)) { *error = EVAS_LOAD_ERROR_GENERIC; goto on_error; } if ((h > IMG_MAX_SIZE) || (h < 1)) { *error = EVAS_LOAD_ERROR_GENERIC; goto on_error; } if (IMG_TOO_BIG(w, h)) { *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; goto on_error; } if (!cmap) { cmap = malloc(sizeof(CMap) * ncolors); if (!cmap) { *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; goto on_error; } } ilp->w = w; ilp->h = h; j = 0; context++; } else if (context == 1) { /* Color Table */ if (j < ncolors) { int slen; int hascolor, iscolor; iscolor = 0; hascolor = 0; tok[0] = 0; col[0] = 0; s[0] = 0; len = strlen(line); strncpy(cmap[j].str, line, cpp); cmap[j].str[cpp] = 0; if (load_data) root = eina_rbtree_inline_insert(root, EINA_RBTREE_GET(&cmap[j]), _cmap_cmp_node_cb, NULL); for (slen = 0; slen < cpp; slen++) { /* fix the ascii of the color string - if its < 32 - just limit to 32 */ if (cmap[j].str[slen] < 32) cmap[j].str[slen] = 0; } cmap[j].r = -1; cmap[j].transp = 0; for (k = cpp; k < len; k++) { if (line[k] != ' ') { const char *tmp = strchr(&line[k], ' '); slen = tmp ? tmp - &line[k]: 255; strncpy(s, &line[k], slen); s[slen] = 0; k += slen; if (!strcmp(s, "c")) iscolor = 1; if ((!strcmp(s, "m")) || (!strcmp(s, "s")) || (!strcmp(s, "g4")) || (!strcmp(s, "g")) || (!strcmp(s, "c")) || (k >= len)) { if (k >= len) { if (col[0]) { if (strlen(col) < (sizeof(col) - 2)) strcat(col, " "); else done = 1; } if ((strlen(col) + strlen(s)) < (sizeof(col) - 1)) strcat(col, s); } if (col[0]) { if (!strcasecmp(col, "none")) { transp = 1; cmap[j].transp = 1; cmap[j].r = 0; cmap[j].g = 0; cmap[j].b = 0; } else { if ((((cmap[j].r < 0) || (!strcmp(tok, "c"))) && (!hascolor))) { r = g = b = 0; xpm_parse_color(col, &r, &g, &b); cmap[j].r = r; cmap[j].g = g; cmap[j].b = b; if (iscolor) hascolor = 1; } } } strcpy(tok, s); col[0] = 0; } else { if (col[0]) { if (strlen(col) < ( sizeof(col) - 2)) strcat(col, " "); else done = 1; } if ((strlen(col) + strlen(s)) < (sizeof(col) - 1)) strcat(col, s); } } } } j++; if (j >= ncolors) { if (cpp == 1) { for (i = 0; i < ncolors; i++) lookup[(int)cmap[i].str[0] - 32][0] = i; } if (cpp == 2) { for (i = 0; i < ncolors; i++) lookup[(int)cmap[i].str[0] - 32][(int)cmap[i].str[1] - 32] = i; } context++; } if (transp) ilp->alpha = 1; if (load_data) { ptr = ilp->buffer; if (!ptr) { *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; goto on_error; } pixels = w * h; end = ptr + pixels; } else { *error = EVAS_LOAD_ERROR_NONE; goto on_success; } } else { /* Image Data */ i = 0; if (cpp == 0) { /* Chars per pixel = 0? well u never know */ } /* it's xpm - don't care about speed too much. still faster * that most xpm loaders anyway */ else if (cpp == 1) { if (transp) { for (i = 0; ((i < 65536) && (ptr < end) && (line[i])); i++) { lu1 = (int)line[i] - 32; if (lu1 < 0) continue; if (cmap[lookup[lu1][0]].transp) { r = (unsigned char)cmap[lookup[lu1][0]].r; g = (unsigned char)cmap[lookup[lu1][0]].g; b = (unsigned char)cmap[lookup[lu1][0]].b; *ptr = RGB_JOIN(r, g, b); ptr++; count++; } else { r = (unsigned char)cmap[lookup[lu1][0]].r; g = (unsigned char)cmap[lookup[lu1][0]].g; b = (unsigned char)cmap[lookup[lu1][0]].b; *ptr = ARGB_JOIN(0xff, r, g, b); ptr++; count++; } } } else { for (i = 0; ((i < 65536) && (ptr < end) && (line[i])); i++) { lu1 = (int)line[i] - 32; if (lu1 < 0) continue; r = (unsigned char)cmap[lookup[lu1][0]].r; g = (unsigned char)cmap[lookup[lu1][0]].g; b = (unsigned char)cmap[lookup[lu1][0]].b; *ptr = ARGB_JOIN(0xff, r, g, b); ptr++; count++; } } } else if (cpp == 2) { if (transp) { for (i = 0; ((i < 65536) && (ptr < end) && (line[i])); i++) { lu1 = (int)line[i] - 32; i++; lu2 = (int)line[i] - 32; if (lu1 < 0) continue; if (lu2 < 0) continue; if (cmap[lookup[lu1][lu2]].transp) { r = (unsigned char)cmap[lookup[lu1][lu2]].r; g = (unsigned char)cmap[lookup[lu1][lu2]].g; b = (unsigned char)cmap[lookup[lu1][lu2]].b; *ptr = RGB_JOIN(r, g, b); ptr++; count++; } else { r = (unsigned char)cmap[lookup[lu1][lu2]].r; g = (unsigned char)cmap[lookup[lu1][lu2]].g; b = (unsigned char)cmap[lookup[lu1][lu2]].b; *ptr = ARGB_JOIN(0xff, r, g, b); ptr++; count++; } } } else { for (i = 0; ((i < 65536) && (ptr < end) && (line[i])); i++) { lu1 = (int)line[i] - 32; i++; lu2 = (int)line[i] - 32; if (lu1 < 0) continue; if (lu2 < 0) continue; r = (unsigned char)cmap[lookup[lu1][lu2]].r; g = (unsigned char)cmap[lookup[lu1][lu2]].g; b = (unsigned char)cmap[lookup[lu1][lu2]].b; *ptr = ARGB_JOIN(0xff, r, g, b); ptr++; count++; } } } else { if (transp) { for (i = 0; ((i < 65536) && (ptr < end) && (line[i])); i++) { Eina_Rbtree *l; for (j = 0; j < cpp; j++, i++) { col[j] = line[i]; if (col[j] < 32) col[j] = 32; } col[j] = 0; i--; l = eina_rbtree_inline_lookup(root, col, j, _cmap_cmp_key_cb, NULL); if (l) { CMap *cm = EINA_RBTREE_CONTAINER_GET(l, CMap); r = (unsigned char)cm->r; g = (unsigned char)cm->g; b = (unsigned char)cm->b; if (cm->transp) { *ptr = RGB_JOIN(r, g, b); } else { *ptr = ARGB_JOIN(0xff, r, g, b); } ptr++; count++; } } } else { for (i = 0; ((i < 65536) && (ptr < end) && (line[i])); i++) { Eina_Rbtree *l; for (j = 0; j < cpp; j++, i++) { col[j] = line[i]; } col[j] = 0; i--; l = eina_rbtree_inline_lookup(root, col, 0, _cmap_cmp_key_cb, NULL); if (l) { CMap *cm = EINA_RBTREE_CONTAINER_GET(l, CMap); r = (unsigned char)cm->r; g = (unsigned char)cm->g; b = (unsigned char)cm->b; *ptr = ARGB_JOIN(0xff, r, g, b); ptr++; count++; } } } } } } } /* Scan in line from XPM file */ if ((!comment) && (quote) && (c != '"')) { if (c < 32) c = 32; else if (c > 127) c = 127; if (c =='\\') { if (++backslash < 2) line[i++] = c; else backslash = 0; } else { backslash = 0; line[i++] = c; } } if (i >= lsz) { lsz += 256; tl = realloc(line, lsz); if (!tl) break; line = tl; } if (((ptr) && ((ptr - (DATA32 *)ilp->buffer) >= (w * h * (int)sizeof(DATA32)))) || ((context > 1) && (count >= pixels))) break; } on_success: free(cmap); free(line); eina_file_map_free(f, (void*) map); eina_file_close(f); *error = EVAS_LOAD_ERROR_NONE; return EINA_TRUE; on_error: free(line); eina_file_map_free(f, (void*) map); eina_file_close(f); return EINA_FALSE; } static Eina_Bool evas_image_load_file_head_xpm(Evas_Img_Load_Params *ilp, const char *file, const char *key, int *error) { return evas_image_load_file_xpm(ilp, file, key, 0, error); } static Eina_Bool evas_image_load_file_data_xpm(Evas_Img_Load_Params *ilp, const char *file, const char *key, int *error) { return evas_image_load_file_xpm(ilp, file, key, 1, error); } static Evas_Loader_Module_Api modapi = { EVAS_CSERVE2_MODULE_API_VERSION, "xpm", evas_image_load_file_head_xpm, evas_image_load_file_data_xpm }; static Eina_Bool module_init(void) { /* Shouldn't we make that PATH configurable ? */ rgb_txt = eina_file_open("/usr/lib/X11/rgb.txt", 0); if (!rgb_txt) rgb_txt = eina_file_open("/usr/X11/lib/X11/rgb.txt", 0); if (!rgb_txt) rgb_txt = eina_file_open("/usr/X11R6/lib/X11/rgb.txt", 0); if (!rgb_txt) rgb_txt = eina_file_open("/usr/openwin/lib/X11/rgb.txt", 0); if (rgb_txt) rgb_txt_map = eina_file_map_all(rgb_txt, EINA_FILE_SEQUENTIAL); return evas_cserve2_loader_register(&modapi); } static void module_shutdown(void) { if (rgb_txt) { eina_file_map_free(rgb_txt, rgb_txt_map); eina_file_close(rgb_txt); rgb_txt = NULL; } } EINA_MODULE_INIT(module_init); EINA_MODULE_SHUTDOWN(module_shutdown); evas-1.7.9/src/bin/loaders/xpm/Makefile.am0000664000175000017500000000146412175475547015267 00000000000000 MAINTAINERCLEANFILES = Makefile.in AM_CPPFLAGS = \ -I. \ -I$(top_srcdir)/src/lib \ -I$(top_srcdir)/src/lib/include \ -I$(top_srcdir)/src/lib/cserve2 \ -I$(top_srcdir)/src/bin \ @EVAS_GENERAL_CFLAGS@ \ @evas_image_loader_xpm_cflags@ \ @EVIL_CFLAGS@ if BUILD_LOADER_XPM #if !EVAS_STATIC_BUILD_XPM pkgdir = $(libdir)/evas/cserve2/loaders/xpm/$(MODULE_ARCH) pkg_LTLIBRARIES = module.la module_la_SOURCES = evas_image_load_xpm.c module_la_LIBADD = @EVAS_GENERAL_LIBS@ @EVIL_LIBS@ @evas_image_loader_xpm_libs@ module_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -module -avoid-version module_la_LIBTOOLFLAGS = --tag=disable-static #else #noinst_LTLIBRARIES = libevas_loader_xpm.la #libevas_loader_xpm_la_SOURCES = evas_image_load_xpm.c #libevas_loader_xpm_la_LIBADD = @evas_image_loader_xpm_libs@ #endif endif evas-1.7.9/src/bin/loaders/ico/0000775000175000017500000000000012234557316013243 500000000000000evas-1.7.9/src/bin/loaders/ico/Makefile.in0000664000175000017500000007174712234557301015242 00000000000000# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/bin/loaders/ico DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/efl_attribute.m4 \ $(top_srcdir)/m4/efl_coverage.m4 \ $(top_srcdir)/m4/efl_doxygen.m4 \ $(top_srcdir)/m4/efl_fnmatch.m4 \ $(top_srcdir)/m4/efl_path_max.m4 \ $(top_srcdir)/m4/efl_shm_open.m4 $(top_srcdir)/m4/efl_tests.m4 \ $(top_srcdir)/m4/evas_check_engine.m4 \ $(top_srcdir)/m4/evas_check_loader.m4 \ $(top_srcdir)/m4/evas_converter.m4 \ $(top_srcdir)/m4/evas_dither.m4 \ $(top_srcdir)/m4/evas_scaler.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(pkgdir)" LTLIBRARIES = $(pkg_LTLIBRARIES) module_la_DEPENDENCIES = am__module_la_SOURCES_DIST = evas_image_load_ico.c @BUILD_LOADER_ICO_TRUE@am_module_la_OBJECTS = \ @BUILD_LOADER_ICO_TRUE@ module_la-evas_image_load_ico.lo module_la_OBJECTS = $(am_module_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = module_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(AM_CFLAGS) $(CFLAGS) $(module_la_LDFLAGS) $(LDFLAGS) -o $@ @BUILD_LOADER_ICO_TRUE@am_module_la_rpath = -rpath $(pkgdir) AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(module_la_SOURCES) DIST_SOURCES = $(am__module_la_SOURCES_DIST) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHECK_CFLAGS = @CHECK_CFLAGS@ CHECK_LIBS = @CHECK_LIBS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@ DIRECTFB_LIBS = @DIRECTFB_LIBS@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ ECORE_EVAS_CFLAGS = @ECORE_EVAS_CFLAGS@ ECORE_EVAS_LIBS = @ECORE_EVAS_LIBS@ EDB_CFLAGS = @EDB_CFLAGS@ EDB_LIBS = @EDB_LIBS@ EDJE_CFLAGS = @EDJE_CFLAGS@ EDJE_LIBS = @EDJE_LIBS@ EET_CFLAGS = @EET_CFLAGS@ EET_LIBS = @EET_LIBS@ EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@ EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@ EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@ EFL_SHM_OPEN_LIBS = @EFL_SHM_OPEN_LIBS@ EGREP = @EGREP@ EINA_CFLAGS = @EINA_CFLAGS@ EINA_LIBS = @EINA_LIBS@ EVAS_CFLAGS = @EVAS_CFLAGS@ EVAS_GENERAL_CFLAGS = @EVAS_GENERAL_CFLAGS@ EVAS_GENERAL_LIBS = @EVAS_GENERAL_LIBS@ EVAS_LIBS = @EVAS_LIBS@ EVAS_SSE3_CFLAGS = @EVAS_SSE3_CFLAGS@ EVIL_CFLAGS = @EVIL_CFLAGS@ EVIL_LIBS = @EVIL_LIBS@ EXEEXT = @EXEEXT@ EXOTIC_CFLAGS = @EXOTIC_CFLAGS@ EXOTIC_LIBS = @EXOTIC_LIBS@ FGREP = @FGREP@ FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@ FONTCONFIG_LIBS = @FONTCONFIG_LIBS@ FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ FREETYPE_LIBS = @FREETYPE_LIBS@ FRIBIDI_CFLAGS = @FRIBIDI_CFLAGS@ FRIBIDI_LIBS = @FRIBIDI_LIBS@ GL_EET_CFLAGS = @GL_EET_CFLAGS@ GL_EET_LIBS = @GL_EET_LIBS@ GREP = @GREP@ HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@ HARFBUZZ_LIBS = @HARFBUZZ_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LINEBREAK_CFLAGS = @LINEBREAK_CFLAGS@ LINEBREAK_LIBS = @LINEBREAK_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MODULE_ARCH = @MODULE_ARCH@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ SDL_CFLAGS = @SDL_CFLAGS@ SDL_LIBS = @SDL_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ SVG_CFLAGS = @SVG_CFLAGS@ SVG_LIBS = @SVG_LIBS@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ XCB_CFLAGS = @XCB_CFLAGS@ XCB_GL_CFLAGS = @XCB_GL_CFLAGS@ XCB_GL_LIBS = @XCB_GL_LIBS@ XCB_LIBS = @XCB_LIBS@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_ct_OBJC = @ac_ct_OBJC@ altivec_cflags = @altivec_cflags@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ dlopen_libs = @dlopen_libs@ docdir = @docdir@ dvidir = @dvidir@ edje_cc = @edje_cc@ efl_doxygen = @efl_doxygen@ efl_have_doxygen = @efl_have_doxygen@ evas_engine_buffer_cflags = @evas_engine_buffer_cflags@ evas_engine_buffer_libs = @evas_engine_buffer_libs@ evas_engine_direct3d_cflags = @evas_engine_direct3d_cflags@ evas_engine_direct3d_libs = @evas_engine_direct3d_libs@ evas_engine_directfb_cflags = @evas_engine_directfb_cflags@ evas_engine_directfb_libs = @evas_engine_directfb_libs@ evas_engine_fb_cflags = @evas_engine_fb_cflags@ evas_engine_fb_libs = @evas_engine_fb_libs@ evas_engine_gl_cocoa_cflags = @evas_engine_gl_cocoa_cflags@ evas_engine_gl_cocoa_libs = @evas_engine_gl_cocoa_libs@ evas_engine_gl_common_libs = @evas_engine_gl_common_libs@ evas_engine_gl_sdl_cflags = @evas_engine_gl_sdl_cflags@ evas_engine_gl_sdl_libs = @evas_engine_gl_sdl_libs@ evas_engine_gl_xcb_cflags = @evas_engine_gl_xcb_cflags@ evas_engine_gl_xcb_libs = @evas_engine_gl_xcb_libs@ evas_engine_gl_xlib_cflags = @evas_engine_gl_xlib_cflags@ evas_engine_gl_xlib_libs = @evas_engine_gl_xlib_libs@ evas_engine_psl1ght_cflags = @evas_engine_psl1ght_cflags@ evas_engine_psl1ght_libs = @evas_engine_psl1ght_libs@ evas_engine_software_16_sdl_cflags = @evas_engine_software_16_sdl_cflags@ evas_engine_software_16_sdl_libs = @evas_engine_software_16_sdl_libs@ evas_engine_software_16_wince_cflags = @evas_engine_software_16_wince_cflags@ evas_engine_software_16_wince_libs = @evas_engine_software_16_wince_libs@ evas_engine_software_16_x11_cflags = @evas_engine_software_16_x11_cflags@ evas_engine_software_16_x11_libs = @evas_engine_software_16_x11_libs@ evas_engine_software_8_x11_cflags = @evas_engine_software_8_x11_cflags@ evas_engine_software_8_x11_libs = @evas_engine_software_8_x11_libs@ evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@ evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@ evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@ evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ evas_image_loader_edb_libs = @evas_image_loader_edb_libs@ evas_image_loader_eet_cflags = @evas_image_loader_eet_cflags@ evas_image_loader_eet_libs = @evas_image_loader_eet_libs@ evas_image_loader_generic_cflags = @evas_image_loader_generic_cflags@ evas_image_loader_generic_libs = @evas_image_loader_generic_libs@ evas_image_loader_gif_cflags = @evas_image_loader_gif_cflags@ evas_image_loader_gif_libs = @evas_image_loader_gif_libs@ evas_image_loader_ico_cflags = @evas_image_loader_ico_cflags@ evas_image_loader_ico_libs = @evas_image_loader_ico_libs@ evas_image_loader_jpeg_cflags = @evas_image_loader_jpeg_cflags@ evas_image_loader_jpeg_libs = @evas_image_loader_jpeg_libs@ evas_image_loader_pmaps_cflags = @evas_image_loader_pmaps_cflags@ evas_image_loader_pmaps_libs = @evas_image_loader_pmaps_libs@ evas_image_loader_png_cflags = @evas_image_loader_png_cflags@ evas_image_loader_png_libs = @evas_image_loader_png_libs@ evas_image_loader_psd_cflags = @evas_image_loader_psd_cflags@ evas_image_loader_psd_libs = @evas_image_loader_psd_libs@ evas_image_loader_svg_cflags = @evas_image_loader_svg_cflags@ evas_image_loader_svg_libs = @evas_image_loader_svg_libs@ evas_image_loader_tga_cflags = @evas_image_loader_tga_cflags@ evas_image_loader_tga_libs = @evas_image_loader_tga_libs@ evas_image_loader_tiff_cflags = @evas_image_loader_tiff_cflags@ evas_image_loader_tiff_libs = @evas_image_loader_tiff_libs@ evas_image_loader_wbmp_cflags = @evas_image_loader_wbmp_cflags@ evas_image_loader_wbmp_libs = @evas_image_loader_wbmp_libs@ evas_image_loader_xpm_cflags = @evas_image_loader_xpm_cflags@ evas_image_loader_xpm_libs = @evas_image_loader_xpm_libs@ exec_prefix = @exec_prefix@ have_evas_engine_gl_x11 = @have_evas_engine_gl_x11@ have_evas_engine_gl_xcb = @have_evas_engine_gl_xcb@ have_evas_engine_gl_xlib = @have_evas_engine_gl_xlib@ have_evas_engine_software_x11 = @have_evas_engine_software_x11@ have_evas_engine_software_xcb = @have_evas_engine_software_xcb@ have_evas_engine_software_xlib = @have_evas_engine_software_xlib@ have_lcov = @have_lcov@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_enable_auto_import = @lt_enable_auto_import@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgconfig_requires_private = @pkgconfig_requires_private@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pthread_cflags = @pthread_cflags@ pthread_libs = @pthread_libs@ release_info = @release_info@ requirement_evas = @requirement_evas@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ shm_open_libs = @shm_open_libs@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ version_info = @version_info@ MAINTAINERCLEANFILES = Makefile.in AM_CPPFLAGS = \ -I. \ -I$(top_srcdir)/src/lib \ -I$(top_srcdir)/src/lib/include \ -I$(top_srcdir)/src/lib/cserve2 \ -I$(top_srcdir)/src/bin \ @EVAS_GENERAL_CFLAGS@ \ @EVIL_CFLAGS@ #if !EVAS_STATIC_BUILD_ICO @BUILD_LOADER_ICO_TRUE@pkgdir = $(libdir)/evas/cserve2/loaders/ico/$(MODULE_ARCH) @BUILD_LOADER_ICO_TRUE@pkg_LTLIBRARIES = module.la @BUILD_LOADER_ICO_TRUE@module_la_SOURCES = evas_image_load_ico.c @BUILD_LOADER_ICO_TRUE@module_la_LIBADD = @EVAS_GENERAL_LIBS@ @EVIL_LIBS@ @BUILD_LOADER_ICO_TRUE@module_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -module -avoid-version @BUILD_LOADER_ICO_TRUE@module_la_LIBTOOLFLAGS = --tag=disable-static all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/bin/loaders/ico/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/bin/loaders/ico/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-pkgLTLIBRARIES: $(pkg_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(pkg_LTLIBRARIES)'; test -n "$(pkgdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(pkgdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(pkgdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkgdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkgdir)"; \ } uninstall-pkgLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(pkg_LTLIBRARIES)'; test -n "$(pkgdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkgdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkgdir)/$$f"; \ done clean-pkgLTLIBRARIES: -test -z "$(pkg_LTLIBRARIES)" || rm -f $(pkg_LTLIBRARIES) @list='$(pkg_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } module.la: $(module_la_OBJECTS) $(module_la_DEPENDENCIES) $(EXTRA_module_la_DEPENDENCIES) $(AM_V_CCLD)$(module_la_LINK) $(am_module_la_rpath) $(module_la_OBJECTS) $(module_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/module_la-evas_image_load_ico.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< module_la-evas_image_load_ico.lo: evas_image_load_ico.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT module_la-evas_image_load_ico.lo -MD -MP -MF $(DEPDIR)/module_la-evas_image_load_ico.Tpo -c -o module_la-evas_image_load_ico.lo `test -f 'evas_image_load_ico.c' || echo '$(srcdir)/'`evas_image_load_ico.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/module_la-evas_image_load_ico.Tpo $(DEPDIR)/module_la-evas_image_load_ico.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='evas_image_load_ico.c' object='module_la-evas_image_load_ico.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o module_la-evas_image_load_ico.lo `test -f 'evas_image_load_ico.c' || echo '$(srcdir)/'`evas_image_load_ico.c mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: for dir in "$(DESTDIR)$(pkgdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool clean-pkgLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-pkgLTLIBRARIES install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-pkgLTLIBRARIES .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-libtool clean-pkgLTLIBRARIES cscopelist-am ctags \ ctags-am distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-pkgLTLIBRARIES install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am uninstall-pkgLTLIBRARIES #else #noinst_LTLIBRARIES = libevas_loader_ico.la #libevas_loader_ico_la_SOURCES = evas_image_load_ico.c #libevas_loader_ico_la_LIBADD = #endif # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: evas-1.7.9/src/bin/loaders/ico/evas_image_load_ico.c0000664000175000017500000006066212175475547017303 00000000000000#ifdef HAVE_CONFIG_H # include #endif #include #ifdef HAVE_EVIL # include #endif #include "evas_macros.h" #include "evas_cserve2.h" #include "evas_cserve2_slave.h" static Eina_Bool read_ushort(unsigned char *map, size_t length, size_t *position, unsigned short *ret) { unsigned char b[2]; if (*position + 2 > length) return EINA_FALSE; b[0] = map[(*position)++]; b[1] = map[(*position)++]; *ret = (b[1] << 8) | b[0]; return EINA_TRUE; } static Eina_Bool read_uint(unsigned char *map, size_t length, size_t *position, unsigned int *ret) { unsigned char b[4]; unsigned int i; if (*position + 4 > length) return EINA_FALSE; for (i = 0; i < 4; i++) b[i] = map[(*position)++]; *ret = ARGB_JOIN(b[3], b[2], b[1], b[0]); return EINA_TRUE; } static Eina_Bool read_uchar(unsigned char *map, size_t length, size_t *position, unsigned char *ret) { if (*position + 1 > length) return EINA_FALSE; *ret = map[(*position)++]; return EINA_TRUE; } static Eina_Bool read_mem(unsigned char *map, size_t length, size_t *position, void *buffer, int size) { if (*position + size > length) return EINA_FALSE; memcpy(buffer, map + *position, size); *position += size; return EINA_TRUE; } enum { SMALLEST, BIGGEST, SMALLER, BIGGER }; enum { ICON = 1, CURSOR = 2 }; static Eina_Bool evas_image_load_file_head_ico(Evas_Img_Load_Params *ilp, const char *file, const char *key, int *error) { Eina_File *f; void *map = NULL; size_t position = 0; unsigned short word; unsigned char byte; int wanted_w = 0, wanted_h = 0, w, h, cols, i, planes = 0, bpp = 0, pdelta, search = -1, have_choice = 0, hasa = 1; unsigned int bmoffset, bmsize, fsize; unsigned short reserved, type, count; struct { int pdelta; int w, h; int cols; int bpp, planes; int hot_x, hot_y; unsigned int bmoffset, bmsize; } chosen = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; f = eina_file_open(file, EINA_FALSE); if (!f) { *error = EVAS_LOAD_ERROR_DOES_NOT_EXIST; return EINA_FALSE; } *error = EVAS_LOAD_ERROR_UNKNOWN_FORMAT; fsize = eina_file_size_get(f); if (fsize < (6 + 16 + 40)) goto close_file; map = eina_file_map_all(f, EINA_FILE_SEQUENTIAL); if (!map) goto close_file; // key: // NULL == highest res // biggest == highest res // smallest == lowest res // // smaller == next size SMALLER than load opts WxH (if possible) // bigger == next size BIGGER than load opts WxH (if possible) // more ? search = BIGGEST; if ((ilp->opts.w > 0) && (ilp->opts.h > 0)) { wanted_w = ilp->opts.w; wanted_h = ilp->opts.h; search = SMALLER; } if (!read_ushort(map, fsize, &position, &reserved)) goto close_file; if (!read_ushort(map, fsize, &position, &type)) goto close_file; if (!read_ushort(map, fsize, &position, &count)) goto close_file; if (!((reserved == 0) && ((type == ICON) || (type == CURSOR)) && (count > 0))) goto close_file; *error = EVAS_LOAD_ERROR_CORRUPT_FILE; if (key) { if (!strcmp(key, "biggest")) { wanted_w = 0; wanted_h = 0; search = BIGGEST; chosen.pdelta = 0; } else if (!strcmp(key, "smallest")) { wanted_w = 1; wanted_h = 1; search = SMALLEST; chosen.pdelta = 0x7fffffff; } else if (!strcmp(key, "smaller")) { chosen.pdelta = 0x7fffffff; search = SMALLER; } else if (!strcmp(key, "bigger")) { chosen.pdelta = 0x7fffffff; search = BIGGER; } } for (i = 0; i < count; i++) { unsigned char tw = 0, th = 0, tcols = 0; if (!read_uchar(map, fsize, &position, &tw)) goto close_file; w = tw; if (w <= 0) w = 256; if (!read_uchar(map, fsize, &position, &th)) goto close_file; h = th; if (h <= 0) h = 256; if (!read_uchar(map, fsize, &position, &tcols)) goto close_file; cols = tcols; if (cols <= 0) cols = 256; if (!read_uchar(map, fsize, &position, &byte)) goto close_file; if (!read_ushort(map, fsize, &position, &word)) goto close_file; if (type == CURSOR) planes = word; //else hot_x = word; if (!read_ushort(map, fsize, &position, &word)) goto close_file; if (type == CURSOR) bpp = word; //else hot_y = word; if (!read_uint(map, fsize, &position, &bmsize)) goto close_file; if (!read_uint(map, fsize, &position, &bmoffset)) goto close_file; if ((bmsize <= 0) || (bmoffset <= 0) || (bmoffset >= fsize)) goto close_file; if (search == BIGGEST) { pdelta = w * h; if ((!have_choice) || ((pdelta >= chosen.pdelta) && (((bpp >= 3) && (bpp >= chosen.bpp)) || ((bpp < 3) && (cols >= chosen.cols))))) { have_choice = 1; chosen.pdelta = pdelta; chosen.w = w; chosen.h = h; chosen.cols = cols; chosen.bpp = bpp; chosen.planes = planes; chosen.bmsize = bmsize; chosen.bmoffset = bmoffset; } } else { if (search == SMALLEST) { pdelta = w * h; if ((!have_choice) || ((pdelta <= chosen.pdelta) && (((bpp >= 3) && (bpp >= chosen.bpp)) || ((bpp < 3) && (cols >= chosen.cols))))) { have_choice = 1; chosen.pdelta = pdelta; chosen.w = w; chosen.h = h; chosen.cols = cols; chosen.bpp = bpp; chosen.planes = planes; chosen.bmsize = bmsize; chosen.bmoffset = bmoffset; } } else if (search == SMALLER) { pdelta = (wanted_w * wanted_h) - (w * h); if ((!have_choice) || ((w <= wanted_w) && (h <= wanted_h) && (pdelta <= chosen.pdelta) && (((bpp >= 3) && (bpp >= chosen.bpp)) || ((bpp < 3) && (cols >= chosen.cols))))) { have_choice = 1; if (pdelta < 0) pdelta = 0x7fffffff; chosen.pdelta = pdelta; chosen.w = w; chosen.h = h; chosen.cols = cols; chosen.bpp = bpp; chosen.planes = planes; chosen.bmsize = bmsize; chosen.bmoffset = bmoffset; } } else if (search == BIGGER) { pdelta = (w * h) - (wanted_w * wanted_h); if ((!have_choice) || ((w >= wanted_w) && (h >= wanted_h) && (pdelta <= chosen.pdelta) && (((bpp >= 3) && (bpp >= chosen.bpp)) || ((bpp < 3) && (cols >= chosen.cols))))) { have_choice = 1; if (pdelta < 0) pdelta = 0x7fffffff; chosen.pdelta = pdelta; chosen.w = w; chosen.h = h; chosen.cols = cols; chosen.bpp = bpp; chosen.planes = planes; chosen.bmsize = bmsize; chosen.bmoffset = bmoffset; } } } } if (chosen.bmoffset == 0) goto close_file; position = chosen.bmoffset; w = chosen.w; h = chosen.h; if ((w > 256) || (h > 256)) goto close_file; if ((w < 1) || (h < 1) || (w > IMG_MAX_SIZE) || (h > IMG_MAX_SIZE) || IMG_TOO_BIG(w, h)) { if (IMG_TOO_BIG(w, h)) *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; else *error = EVAS_LOAD_ERROR_GENERIC; goto close_file; } ilp->w = w; ilp->h = h; if (hasa) ilp->alpha = 1; eina_file_map_free(f, map); eina_file_close(f); *error = EVAS_LOAD_ERROR_NONE; return EINA_TRUE; close_file: if (map) eina_file_map_free(f, map); eina_file_close(f); return EINA_FALSE; } static Eina_Bool evas_image_load_file_data_ico(Evas_Img_Load_Params *ilp, const char *file, const char *key, int *error) { Eina_File *f; void *map = NULL; size_t position = 0; unsigned short word; unsigned char byte; unsigned int dword; int wanted_w = 0, wanted_h = 0, w, h, cols, i, planes = 0, bpp = 0, pdelta, search = -1, have_choice = 0, stride, pstride, j, right_way_up = 0, diff_size = 0, cols2; unsigned int bmoffset, bmsize, bitcount, fsize, *pal, *surface, *pix, none_zero_alpha = 0; unsigned short reserved, type, count; unsigned char *maskbuf, *pixbuf, *p; struct { int pdelta; int w, h; int cols; int bpp, planes; int hot_x, hot_y; unsigned int bmoffset, bmsize; } chosen = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; f = eina_file_open(file, EINA_FALSE); if (!f) { *error = EVAS_LOAD_ERROR_DOES_NOT_EXIST; return EINA_FALSE; } *error = EVAS_LOAD_ERROR_UNKNOWN_FORMAT; fsize = eina_file_size_get(f); if (fsize < (6 + 16 + 40)) goto close_file; map = eina_file_map_all(f, EINA_FILE_SEQUENTIAL); if (!map) goto close_file; // key: // NULL == highest res // biggest == highest res // smallest == lowest res // // smaller == next size SMALLER than load opts WxH (if possible) // bigger == next size BIGGER than load opts WxH (if possible) // more ? search = BIGGEST; if ((ilp->opts.w > 0) && (ilp->opts.h > 0)) { wanted_w = ilp->opts.w; wanted_h = ilp->opts.h; search = SMALLER; } if (!read_ushort(map, fsize, &position, &reserved)) goto close_file; if (!read_ushort(map, fsize, &position, &type)) goto close_file; if (!read_ushort(map, fsize, &position, &count)) goto close_file; if (!((reserved == 0) && ((type == ICON) || (type == CURSOR)) && (count > 0))) goto close_file; *error = EVAS_LOAD_ERROR_CORRUPT_FILE; if (key) { if (!strcmp(key, "biggest")) { wanted_w = 0; wanted_h = 0; search = BIGGEST; chosen.pdelta = 0; } else if (!strcmp(key, "smallest")) { wanted_w = 1; wanted_h = 1; search = SMALLEST; chosen.pdelta = 0x7fffffff; } else if (!strcmp(key, "smaller")) { chosen.pdelta = 0x7fffffff; search = SMALLER; } else if (!strcmp(key, "bigger")) { chosen.pdelta = 0x7fffffff; search = BIGGER; } } for (i = 0; i < count; i++) { unsigned char tw = 0, th = 0, tcols = 0; if (!read_uchar(map, fsize, &position, &tw)) goto close_file; w = tw; if (w <= 0) w = 256; if (!read_uchar(map, fsize, &position, &th)) goto close_file; h = th; if (h <= 0) h = 256; if (!read_uchar(map, fsize, &position, &tcols)) goto close_file; cols = tcols; if (cols <= 0) cols = 256; if (!read_uchar(map, fsize, &position, &byte)) goto close_file; if (!read_ushort(map, fsize, &position, &word)) goto close_file; if (type == 1) planes = word; //else hot_x = word; if (!read_ushort(map, fsize, &position, &word)) goto close_file; if (type == 1) bpp = word; //else hot_y = word; if (!read_uint(map, fsize, &position, &bmsize)) goto close_file; if (!read_uint(map, fsize, &position, &bmoffset)) goto close_file; if ((bmsize <= 0) || (bmoffset <= 0) || (bmoffset >= fsize)) goto close_file; if (search == BIGGEST) { pdelta = w * h; if ((!have_choice) || ((pdelta >= chosen.pdelta) && (((bpp >= 3) && (bpp >= chosen.bpp)) || ((bpp < 3) && (cols >= chosen.cols))))) { have_choice = 1; chosen.pdelta = pdelta; chosen.w = w; chosen.h = h; chosen.cols = cols; chosen.bpp = bpp; chosen.planes = planes; chosen.bmsize = bmsize; chosen.bmoffset = bmoffset; } } else { if (search == SMALLEST) { pdelta = w * h; if ((!have_choice) || ((pdelta <= chosen.pdelta) && (((bpp >= 3) && (bpp >= chosen.bpp)) || ((bpp < 3) && (cols >= chosen.cols))))) { have_choice = 1; chosen.pdelta = pdelta; chosen.w = w; chosen.h = h; chosen.cols = cols; chosen.bpp = bpp; chosen.planes = planes; chosen.bmsize = bmsize; chosen.bmoffset = bmoffset; } } else if (search == SMALLER) { pdelta = (wanted_w * wanted_h) - (w * h); if ((!have_choice) || ((w <= wanted_w) && (h <= wanted_h) && (pdelta <= chosen.pdelta) && (((bpp >= 3) && (bpp >= chosen.bpp)) || ((bpp < 3) && (cols >= chosen.cols))))) { have_choice = 1; if (pdelta < 0) pdelta = 0x7fffffff; chosen.pdelta = pdelta; chosen.w = w; chosen.h = h; chosen.cols = cols; chosen.bpp = bpp; chosen.planes = planes; chosen.bmsize = bmsize; chosen.bmoffset = bmoffset; } } else if (search == BIGGER) { pdelta = (w * h) - (wanted_w * wanted_h); if ((!have_choice) || ((w >= wanted_w) && (h >= wanted_h) && (pdelta <= chosen.pdelta) && (((bpp >= 3) && (bpp >= chosen.bpp)) || ((bpp < 3) && (cols >= chosen.cols))))) { have_choice = 1; if (pdelta < 0) pdelta = 0x7fffffff; chosen.pdelta = pdelta; chosen.w = w; chosen.h = h; chosen.cols = cols; chosen.bpp = bpp; chosen.planes = planes; chosen.bmsize = bmsize; chosen.bmoffset = bmoffset; } } } } if (chosen.bmoffset == 0) goto close_file; position = chosen.bmoffset; w = chosen.w; h = chosen.h; cols = chosen.cols; bpp = chosen.bpp; // changed since we loaded header? if (((int)ilp->w != w) || ((int)ilp->h != h)) goto close_file; // read bmp header time... let's do some checking if (!read_uint(map, fsize, &position, &dword)) goto close_file; // headersize - dont care if (!read_uint(map, fsize, &position, &dword)) goto close_file; // width if (dword > 0) { if ((int)dword != w) { w = dword; diff_size = 1; } } if (!read_uint(map, fsize, &position, &dword)) goto close_file; // height if (dword > 0) { if ((int)dword != (h * 2)) { h = dword / 2; diff_size = 1; } } if (diff_size) { ERR("Broken ICO file: %s - " " Reporting size of %ix%i in index, but bitmap is %ix%i. " " May be expanded or cropped.", file, ilp->w, ilp->h, w, h); } if (!read_ushort(map, fsize, &position, &word)) goto close_file; // planes //planes2 = word; if (!read_ushort(map, fsize, &position, &word)) goto close_file; // bitcount bitcount = word; if (!read_uint(map, fsize, &position, &dword)) goto close_file; // compression //compression = dword; if (!read_uint(map, fsize, &position, &dword)) goto close_file; // imagesize //imagesize = dword; if (!read_uint(map, fsize, &position, &dword)) goto close_file; // z pixels per m if (!read_uint(map, fsize, &position, &dword)) goto close_file; // y pizels per m if (!read_uint(map, fsize, &position, &dword)) goto close_file; // colors used //colorsused = dword; if (!read_uint(map, fsize, &position, &dword)) goto close_file; // colors important //colorsimportant = dword; surface = ilp->buffer; if (!surface) { *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; goto close_file; } memset(surface, 0, ilp->w * ilp->h * 4); if (!((bitcount == 1) || (bitcount == 4) || (bitcount == 8) || (bitcount == 24) || (bitcount == 32))) goto close_file; if (bitcount <= 8) { cols2 = 1 << bitcount; if (cols == 0) cols = cols2; if (cols > cols2) cols = cols2; if (cols > 256) cols = 256; } else cols = 0; if (bitcount > 8) cols = 0; pal = alloca(256 * 4); for (i = 0; i < cols; i++) { unsigned char a, r, g, b; if (!read_uchar(map, fsize, &position, &b)) goto close_file; if (!read_uchar(map, fsize, &position, &g)) goto close_file; if (!read_uchar(map, fsize, &position, &r)) goto close_file; if (!read_uchar(map, fsize, &position, &a)) goto close_file; a = 0xff; pal[i] = ARGB_JOIN(a, r, g, b); } stride = ((w + 31) / 32); maskbuf = alloca(stride * h); pixbuf = alloca(stride * 32 * 4); // more than enough if (bitcount == 1) { pstride = stride * 4; for (i = 0; i < h; i++) { pix = surface + (i * ilp->w); if (!right_way_up) pix = surface + ((ilp->h - 1 - i) * ilp->w); if (!read_mem(map, fsize, &position, pixbuf, pstride)) goto close_file; p = pixbuf; if (i >= (int)ilp->h) continue; for (j = 0; j < w; j++) { if (j >= (int)ilp->w) break; if ((j & 0x7) == 0x0) { *pix = pal[*p >> 7]; } else if ((j & 0x7) == 0x1) { *pix = pal[(*p >> 6) & 0x1]; } else if ((j & 0x7) == 0x2) { *pix = pal[(*p >> 5) & 0x1]; } else if ((j & 0x7) == 0x3) { *pix = pal[(*p >> 4) & 0x1]; } else if ((j & 0x7) == 0x4) { *pix = pal[(*p >> 3) & 0x1]; } else if ((j & 0x7) == 0x5) { *pix = pal[(*p >> 2) & 0x1]; } else if ((j & 0x7) == 0x6) { *pix = pal[(*p >> 1) & 0x1]; } else { *pix = pal[*p & 0x1]; p++; } pix++; } } } else if (bitcount == 4) { pstride = ((w + 7) / 8) * 4; for (i = 0; i < h; i++) { pix = surface + (i * ilp->w); if (!right_way_up) pix = surface + ((ilp->h - 1 - i) * ilp->w); if (!read_mem(map, fsize, &position, pixbuf, pstride)) goto close_file; p = pixbuf; if (i >= (int)ilp->h) continue; for (j = 0; j < w; j++) { if (j >= (int)ilp->w) break; if ((j & 0x1) == 0x1) { *pix = pal[*p & 0x0f]; p++; } else { *pix = pal[*p >> 4]; } pix++; } } } else if (bitcount == 8) { pstride = ((w + 3) / 4) * 4; for (i = 0; i < h; i++) { pix = surface + (i * ilp->w); if (!right_way_up) pix = surface + ((ilp->h - 1 - i) * ilp->w); if (!read_mem(map, fsize, &position, pixbuf, pstride)) goto close_file; p = pixbuf; if (i >= (int)ilp->h) continue; for (j = 0; j < w; j++) { if (j >= (int)ilp->w) break; *pix = pal[*p]; p++; pix++; } } } else if (bitcount == 24) { pstride = w * 3; for (i = 0; i < h; i++) { pix = surface + (i * ilp->w); if (!right_way_up) pix = surface + ((ilp->h - 1 - i) * ilp->w); if (!read_mem(map, fsize, &position, pixbuf, pstride)) goto close_file; p = pixbuf; if (i >= (int)ilp->h) continue; for (j = 0; j < w; j++) { unsigned char a, r, g, b; if (j >= (int)ilp->w) break; b = p[0]; g = p[1]; r = p[2]; p += 3; a = 0xff; *pix = ARGB_JOIN(a, r, g, b); pix++; } } } else if (bitcount == 32) { pstride = w * 4; for (i = 0; i < h; i++) { pix = surface + (i * ilp->w); if (!right_way_up) pix = surface + ((ilp->h - 1 - i) * ilp->w); if (!read_mem(map, fsize, &position, pixbuf, pstride)) goto close_file; p = pixbuf; if (i >= (int)ilp->h) continue; for (j = 0; j < w; j++) { unsigned char a, r, g, b; if (j >= (int)ilp->w) break; b = p[0]; g = p[1]; r = p[2]; a = p[3]; p += 4; if (a) none_zero_alpha = 1; *pix = ARGB_JOIN(a, r, g, b); pix++; } } } if (!none_zero_alpha) { if (!read_mem(map, fsize, &position, maskbuf, stride * 4 * h)) goto close_file; // apply mask pix = surface; for (i = 0; i < h; i++) { unsigned char *m; pix = surface + (i * ilp->w); if (!right_way_up) pix = surface + ((ilp->h - 1 - i) * ilp->w); m = maskbuf + (stride * i * 4); if (i >= (int)ilp->h) continue; for (j = 0; j < w; j++) { if (j >= (int)ilp->w) break; if (*m & (1 << (7 - (j & 0x7)))) A_VAL(pix) = 0x00; else A_VAL(pix) = 0xff; if ((j & 0x7) == 0x7) m++; pix++; } } } eina_file_map_free(f, map); eina_file_close(f); evas_cserve2_image_premul(ilp); *error = EVAS_LOAD_ERROR_NONE; return EINA_TRUE; close_file: if (map) eina_file_map_free(f, map); eina_file_close(f); return EINA_FALSE; } static Evas_Loader_Module_Api modapi = { EVAS_CSERVE2_MODULE_API_VERSION, "ico", evas_image_load_file_head_ico, evas_image_load_file_data_ico }; static Eina_Bool module_init(void) { return evas_cserve2_loader_register(&modapi); } static void module_shutdown(void) { } EINA_MODULE_INIT(module_init); EINA_MODULE_SHUTDOWN(module_shutdown); evas-1.7.9/src/bin/loaders/ico/Makefile.am0000664000175000017500000000133012175475547015225 00000000000000 MAINTAINERCLEANFILES = Makefile.in AM_CPPFLAGS = \ -I. \ -I$(top_srcdir)/src/lib \ -I$(top_srcdir)/src/lib/include \ -I$(top_srcdir)/src/lib/cserve2 \ -I$(top_srcdir)/src/bin \ @EVAS_GENERAL_CFLAGS@ \ @EVIL_CFLAGS@ if BUILD_LOADER_ICO #if !EVAS_STATIC_BUILD_ICO pkgdir = $(libdir)/evas/cserve2/loaders/ico/$(MODULE_ARCH) pkg_LTLIBRARIES = module.la module_la_SOURCES = evas_image_load_ico.c module_la_LIBADD = @EVAS_GENERAL_LIBS@ @EVIL_LIBS@ module_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -module -avoid-version module_la_LIBTOOLFLAGS = --tag=disable-static #else #noinst_LTLIBRARIES = libevas_loader_ico.la #libevas_loader_ico_la_SOURCES = evas_image_load_ico.c #libevas_loader_ico_la_LIBADD = #endif endif evas-1.7.9/src/bin/loaders/bmp/0000775000175000017500000000000012234557316013247 500000000000000evas-1.7.9/src/bin/loaders/bmp/Makefile.in0000664000175000017500000007175312234557301015243 00000000000000# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/bin/loaders/bmp DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/efl_attribute.m4 \ $(top_srcdir)/m4/efl_coverage.m4 \ $(top_srcdir)/m4/efl_doxygen.m4 \ $(top_srcdir)/m4/efl_fnmatch.m4 \ $(top_srcdir)/m4/efl_path_max.m4 \ $(top_srcdir)/m4/efl_shm_open.m4 $(top_srcdir)/m4/efl_tests.m4 \ $(top_srcdir)/m4/evas_check_engine.m4 \ $(top_srcdir)/m4/evas_check_loader.m4 \ $(top_srcdir)/m4/evas_converter.m4 \ $(top_srcdir)/m4/evas_dither.m4 \ $(top_srcdir)/m4/evas_scaler.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(pkgdir)" LTLIBRARIES = $(pkg_LTLIBRARIES) module_la_DEPENDENCIES = am__module_la_SOURCES_DIST = evas_image_load_bmp.c @BUILD_LOADER_BMP_TRUE@am_module_la_OBJECTS = \ @BUILD_LOADER_BMP_TRUE@ module_la-evas_image_load_bmp.lo module_la_OBJECTS = $(am_module_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = module_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(AM_CFLAGS) $(CFLAGS) $(module_la_LDFLAGS) $(LDFLAGS) -o $@ @BUILD_LOADER_BMP_TRUE@am_module_la_rpath = -rpath $(pkgdir) AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(module_la_SOURCES) DIST_SOURCES = $(am__module_la_SOURCES_DIST) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHECK_CFLAGS = @CHECK_CFLAGS@ CHECK_LIBS = @CHECK_LIBS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@ DIRECTFB_LIBS = @DIRECTFB_LIBS@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ ECORE_EVAS_CFLAGS = @ECORE_EVAS_CFLAGS@ ECORE_EVAS_LIBS = @ECORE_EVAS_LIBS@ EDB_CFLAGS = @EDB_CFLAGS@ EDB_LIBS = @EDB_LIBS@ EDJE_CFLAGS = @EDJE_CFLAGS@ EDJE_LIBS = @EDJE_LIBS@ EET_CFLAGS = @EET_CFLAGS@ EET_LIBS = @EET_LIBS@ EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@ EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@ EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@ EFL_SHM_OPEN_LIBS = @EFL_SHM_OPEN_LIBS@ EGREP = @EGREP@ EINA_CFLAGS = @EINA_CFLAGS@ EINA_LIBS = @EINA_LIBS@ EVAS_CFLAGS = @EVAS_CFLAGS@ EVAS_GENERAL_CFLAGS = @EVAS_GENERAL_CFLAGS@ EVAS_GENERAL_LIBS = @EVAS_GENERAL_LIBS@ EVAS_LIBS = @EVAS_LIBS@ EVAS_SSE3_CFLAGS = @EVAS_SSE3_CFLAGS@ EVIL_CFLAGS = @EVIL_CFLAGS@ EVIL_LIBS = @EVIL_LIBS@ EXEEXT = @EXEEXT@ EXOTIC_CFLAGS = @EXOTIC_CFLAGS@ EXOTIC_LIBS = @EXOTIC_LIBS@ FGREP = @FGREP@ FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@ FONTCONFIG_LIBS = @FONTCONFIG_LIBS@ FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ FREETYPE_LIBS = @FREETYPE_LIBS@ FRIBIDI_CFLAGS = @FRIBIDI_CFLAGS@ FRIBIDI_LIBS = @FRIBIDI_LIBS@ GL_EET_CFLAGS = @GL_EET_CFLAGS@ GL_EET_LIBS = @GL_EET_LIBS@ GREP = @GREP@ HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@ HARFBUZZ_LIBS = @HARFBUZZ_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LINEBREAK_CFLAGS = @LINEBREAK_CFLAGS@ LINEBREAK_LIBS = @LINEBREAK_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MODULE_ARCH = @MODULE_ARCH@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ SDL_CFLAGS = @SDL_CFLAGS@ SDL_LIBS = @SDL_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ SVG_CFLAGS = @SVG_CFLAGS@ SVG_LIBS = @SVG_LIBS@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ XCB_CFLAGS = @XCB_CFLAGS@ XCB_GL_CFLAGS = @XCB_GL_CFLAGS@ XCB_GL_LIBS = @XCB_GL_LIBS@ XCB_LIBS = @XCB_LIBS@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_ct_OBJC = @ac_ct_OBJC@ altivec_cflags = @altivec_cflags@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ dlopen_libs = @dlopen_libs@ docdir = @docdir@ dvidir = @dvidir@ edje_cc = @edje_cc@ efl_doxygen = @efl_doxygen@ efl_have_doxygen = @efl_have_doxygen@ evas_engine_buffer_cflags = @evas_engine_buffer_cflags@ evas_engine_buffer_libs = @evas_engine_buffer_libs@ evas_engine_direct3d_cflags = @evas_engine_direct3d_cflags@ evas_engine_direct3d_libs = @evas_engine_direct3d_libs@ evas_engine_directfb_cflags = @evas_engine_directfb_cflags@ evas_engine_directfb_libs = @evas_engine_directfb_libs@ evas_engine_fb_cflags = @evas_engine_fb_cflags@ evas_engine_fb_libs = @evas_engine_fb_libs@ evas_engine_gl_cocoa_cflags = @evas_engine_gl_cocoa_cflags@ evas_engine_gl_cocoa_libs = @evas_engine_gl_cocoa_libs@ evas_engine_gl_common_libs = @evas_engine_gl_common_libs@ evas_engine_gl_sdl_cflags = @evas_engine_gl_sdl_cflags@ evas_engine_gl_sdl_libs = @evas_engine_gl_sdl_libs@ evas_engine_gl_xcb_cflags = @evas_engine_gl_xcb_cflags@ evas_engine_gl_xcb_libs = @evas_engine_gl_xcb_libs@ evas_engine_gl_xlib_cflags = @evas_engine_gl_xlib_cflags@ evas_engine_gl_xlib_libs = @evas_engine_gl_xlib_libs@ evas_engine_psl1ght_cflags = @evas_engine_psl1ght_cflags@ evas_engine_psl1ght_libs = @evas_engine_psl1ght_libs@ evas_engine_software_16_sdl_cflags = @evas_engine_software_16_sdl_cflags@ evas_engine_software_16_sdl_libs = @evas_engine_software_16_sdl_libs@ evas_engine_software_16_wince_cflags = @evas_engine_software_16_wince_cflags@ evas_engine_software_16_wince_libs = @evas_engine_software_16_wince_libs@ evas_engine_software_16_x11_cflags = @evas_engine_software_16_x11_cflags@ evas_engine_software_16_x11_libs = @evas_engine_software_16_x11_libs@ evas_engine_software_8_x11_cflags = @evas_engine_software_8_x11_cflags@ evas_engine_software_8_x11_libs = @evas_engine_software_8_x11_libs@ evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@ evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@ evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@ evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ evas_image_loader_edb_libs = @evas_image_loader_edb_libs@ evas_image_loader_eet_cflags = @evas_image_loader_eet_cflags@ evas_image_loader_eet_libs = @evas_image_loader_eet_libs@ evas_image_loader_generic_cflags = @evas_image_loader_generic_cflags@ evas_image_loader_generic_libs = @evas_image_loader_generic_libs@ evas_image_loader_gif_cflags = @evas_image_loader_gif_cflags@ evas_image_loader_gif_libs = @evas_image_loader_gif_libs@ evas_image_loader_ico_cflags = @evas_image_loader_ico_cflags@ evas_image_loader_ico_libs = @evas_image_loader_ico_libs@ evas_image_loader_jpeg_cflags = @evas_image_loader_jpeg_cflags@ evas_image_loader_jpeg_libs = @evas_image_loader_jpeg_libs@ evas_image_loader_pmaps_cflags = @evas_image_loader_pmaps_cflags@ evas_image_loader_pmaps_libs = @evas_image_loader_pmaps_libs@ evas_image_loader_png_cflags = @evas_image_loader_png_cflags@ evas_image_loader_png_libs = @evas_image_loader_png_libs@ evas_image_loader_psd_cflags = @evas_image_loader_psd_cflags@ evas_image_loader_psd_libs = @evas_image_loader_psd_libs@ evas_image_loader_svg_cflags = @evas_image_loader_svg_cflags@ evas_image_loader_svg_libs = @evas_image_loader_svg_libs@ evas_image_loader_tga_cflags = @evas_image_loader_tga_cflags@ evas_image_loader_tga_libs = @evas_image_loader_tga_libs@ evas_image_loader_tiff_cflags = @evas_image_loader_tiff_cflags@ evas_image_loader_tiff_libs = @evas_image_loader_tiff_libs@ evas_image_loader_wbmp_cflags = @evas_image_loader_wbmp_cflags@ evas_image_loader_wbmp_libs = @evas_image_loader_wbmp_libs@ evas_image_loader_xpm_cflags = @evas_image_loader_xpm_cflags@ evas_image_loader_xpm_libs = @evas_image_loader_xpm_libs@ exec_prefix = @exec_prefix@ have_evas_engine_gl_x11 = @have_evas_engine_gl_x11@ have_evas_engine_gl_xcb = @have_evas_engine_gl_xcb@ have_evas_engine_gl_xlib = @have_evas_engine_gl_xlib@ have_evas_engine_software_x11 = @have_evas_engine_software_x11@ have_evas_engine_software_xcb = @have_evas_engine_software_xcb@ have_evas_engine_software_xlib = @have_evas_engine_software_xlib@ have_lcov = @have_lcov@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_enable_auto_import = @lt_enable_auto_import@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgconfig_requires_private = @pkgconfig_requires_private@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pthread_cflags = @pthread_cflags@ pthread_libs = @pthread_libs@ release_info = @release_info@ requirement_evas = @requirement_evas@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ shm_open_libs = @shm_open_libs@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ version_info = @version_info@ MAINTAINERCLEANFILES = Makefile.in AM_CPPFLAGS = \ -I. \ -I$(top_srcdir)/src/lib \ -I$(top_srcdir)/src/lib/include \ -I$(top_srcdir)/src/lib/cserve2 \ -I$(top_srcdir)/src/bin \ @EVAS_GENERAL_CFLAGS@ \ @EVIL_CFLAGS@ #if !EVAS_STATIC_BUILD_BMP @BUILD_LOADER_BMP_TRUE@pkgdir = $(libdir)/evas/cserve2/loaders/bmp/$(MODULE_ARCH) @BUILD_LOADER_BMP_TRUE@pkg_LTLIBRARIES = module.la @BUILD_LOADER_BMP_TRUE@module_la_SOURCES = evas_image_load_bmp.c @BUILD_LOADER_BMP_TRUE@module_la_LIBADD = @EVAS_GENERAL_LIBS@ @EVIL_LIBS@ -lm @BUILD_LOADER_BMP_TRUE@module_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -module -avoid-version @BUILD_LOADER_BMP_TRUE@module_la_LIBTOOLFLAGS = --tag=disable-static all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/bin/loaders/bmp/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/bin/loaders/bmp/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-pkgLTLIBRARIES: $(pkg_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(pkg_LTLIBRARIES)'; test -n "$(pkgdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(pkgdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(pkgdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkgdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkgdir)"; \ } uninstall-pkgLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(pkg_LTLIBRARIES)'; test -n "$(pkgdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkgdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkgdir)/$$f"; \ done clean-pkgLTLIBRARIES: -test -z "$(pkg_LTLIBRARIES)" || rm -f $(pkg_LTLIBRARIES) @list='$(pkg_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } module.la: $(module_la_OBJECTS) $(module_la_DEPENDENCIES) $(EXTRA_module_la_DEPENDENCIES) $(AM_V_CCLD)$(module_la_LINK) $(am_module_la_rpath) $(module_la_OBJECTS) $(module_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/module_la-evas_image_load_bmp.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< module_la-evas_image_load_bmp.lo: evas_image_load_bmp.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT module_la-evas_image_load_bmp.lo -MD -MP -MF $(DEPDIR)/module_la-evas_image_load_bmp.Tpo -c -o module_la-evas_image_load_bmp.lo `test -f 'evas_image_load_bmp.c' || echo '$(srcdir)/'`evas_image_load_bmp.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/module_la-evas_image_load_bmp.Tpo $(DEPDIR)/module_la-evas_image_load_bmp.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='evas_image_load_bmp.c' object='module_la-evas_image_load_bmp.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o module_la-evas_image_load_bmp.lo `test -f 'evas_image_load_bmp.c' || echo '$(srcdir)/'`evas_image_load_bmp.c mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: for dir in "$(DESTDIR)$(pkgdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool clean-pkgLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-pkgLTLIBRARIES install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-pkgLTLIBRARIES .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-libtool clean-pkgLTLIBRARIES cscopelist-am ctags \ ctags-am distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-pkgLTLIBRARIES install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am uninstall-pkgLTLIBRARIES #else #noinst_LTLIBRARIES = libevas_loader_bmp.la #libevas_loader_bmp_la_SOURCES = evas_image_load_bmp.c #libevas_loader_bmp_la_LIBADD = #endif # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: evas-1.7.9/src/bin/loaders/bmp/evas_image_load_bmp.c0000664000175000017500000016333012175475547017307 00000000000000#ifdef HAVE_CONFIG_H # include #endif #include #ifdef HAVE_EVIL # include #endif #include #include "evas_macros.h" #include "evas_cserve2.h" #include "evas_cserve2_slave.h" static Eina_Bool read_short(unsigned char *map, size_t length, size_t *position, short *ret) { unsigned char b[2]; if (*position + 2 > length) return EINA_FALSE; b[0] = map[(*position)++]; b[1] = map[(*position)++]; *ret = (b[1] << 8) | b[0]; return EINA_TRUE; } static Eina_Bool read_ushort(unsigned char *map, size_t length, size_t *position, unsigned short *ret) { unsigned char b[2]; if (*position + 2 > length) return EINA_FALSE; b[0] = map[(*position)++]; b[1] = map[(*position)++]; *ret = (b[1] << 8) | b[0]; return EINA_TRUE; } static Eina_Bool read_int(unsigned char *map, size_t length, size_t *position, int *ret) { unsigned char b[4]; int i; if (*position + 4 > length) return EINA_FALSE; for (i = 0; i < 4; i++) b[i] = map[(*position)++]; *ret = ARGB_JOIN(b[3], b[2], b[1], b[0]); return EINA_TRUE; } static Eina_Bool read_uint(unsigned char *map, size_t length, size_t *position, unsigned int *ret) { unsigned char b[4]; int i; if (*position + 4 > length) return EINA_FALSE; for (i = 0; i < 4; i++) b[i] = map[(*position)++]; *ret = ARGB_JOIN(b[3], b[2], b[1], b[0]); return EINA_TRUE; } static Eina_Bool read_uchar(unsigned char *map, size_t length, size_t *position, unsigned char *ret) { if (*position + 1 > length) return EINA_FALSE; *ret = map[(*position)++]; return EINA_TRUE; } static Eina_Bool read_skip(size_t length, size_t *position, int skip) { if (*position + skip > length) return EINA_FALSE; *position += skip; return EINA_TRUE; } static Eina_Bool read_mem(unsigned char *map, size_t length, size_t *position, void *buffer, int size) { if (*position + size > length) return EINA_FALSE; memcpy(buffer, map + *position, size); *position += size; return EINA_TRUE; } static Eina_Bool evas_image_load_file_head_bmp(Evas_Img_Load_Params *ilp, const char *file, const char *key __UNUSED__, int *error) { Eina_File *f; void *map = NULL; size_t position = 0; char hasa = 0; int w = 0, h = 0, bit_count = 0, image_size = 0, comp = 0; unsigned int offset, head_size, amask = 0; int fsize = 0; unsigned int bmpsize; unsigned short res1, res2; f = eina_file_open(file, 0); if (!f) { *error = EVAS_LOAD_ERROR_DOES_NOT_EXIST; return EINA_FALSE; } *error = EVAS_LOAD_ERROR_UNKNOWN_FORMAT; fsize = eina_file_size_get(f); if (fsize < 2) goto close_file; map = eina_file_map_all(f, EINA_FILE_SEQUENTIAL); if (!map) goto close_file; if (strncmp(map, "BM", 2)) goto close_file; // magic number position += 2; *error = EVAS_LOAD_ERROR_CORRUPT_FILE; if (!read_uint(map, fsize, &position, &bmpsize)) goto close_file; if (!read_ushort(map, fsize, &position, &res1)) goto close_file; if (!read_ushort(map, fsize, &position, &res2)) goto close_file; if (!read_uint(map, fsize, &position, &offset)) goto close_file; if (!read_uint(map, fsize, &position, &head_size)) goto close_file; if (head_size == 12) // OS/2 V1 + Windows 3.0 { short tmp; if (!read_short(map, fsize, &position, &tmp)) goto close_file; w = tmp; // width if (!read_short(map, fsize, &position, &tmp)) goto close_file; h = tmp; // height if (!read_short(map, fsize, &position, &tmp)) goto close_file; //planes = tmp; // must be 1 if (!read_short(map, fsize, &position, &tmp)) goto close_file; bit_count = tmp; // bits per pixel: 1, 4, 8 & 24 } else if (head_size == 64) // OS/2 V2 { short tmp; int tmp2; if (!read_int(map, fsize, &position, &tmp2)) goto close_file; w = tmp2; // width if (!read_int(map, fsize, &position, &tmp2)) goto close_file; h = tmp2; // height if (!read_short(map, fsize, &position, &tmp)) goto close_file; //planes = tmp; // must be 1 if (!read_short(map, fsize, &position, &tmp)) goto close_file; bit_count = tmp; // bits per pixel: 1, 4, 8, 16, 24 & 32 if (!read_int(map, fsize, &position, &tmp2)) goto close_file; comp = tmp2; // compression method if (!read_int(map, fsize, &position, &tmp2)) goto close_file; image_size = tmp2; // bitmap data size if (!read_int(map, fsize, &position, &tmp2)) goto close_file; //hdpi = (tmp2 * 254) / 10000; // horizontal pixels/meter if (!read_int(map, fsize, &position, &tmp2)) goto close_file; //vdpi = (tmp2 * 254) / 10000; // vertical pixles/meter if (!read_int(map, fsize, &position, &tmp2)) goto close_file; //palette_size = tmp2; // number of palette colors power (2^n - so 0 - 8) if (!read_int(map, fsize, &position, &tmp2)) goto close_file; //important_colors = tmp2; // number of important colors - 0 if all if (!read_skip(fsize, &position, 24)) goto close_file; // skip unused header if (image_size == 0) image_size = fsize - offset; } else if (head_size == 40) // Windows 3.0 + (v3) { short tmp; int tmp2; if (!read_int(map, fsize, &position, &tmp2)) goto close_file; w = tmp2; // width if (!read_int(map, fsize, &position, &tmp2)) goto close_file; h = tmp2; // height if (!read_short(map, fsize, &position, &tmp)) goto close_file; //planes = tmp; // must be 1 if (!read_short(map, fsize, &position, &tmp)) goto close_file; bit_count = tmp; // bits per pixel: 1, 4, 8, 16, 24 & 32 if (!read_int(map, fsize, &position, &tmp2)) goto close_file; comp = tmp2; // compression method if (!read_int(map, fsize, &position, &tmp2)) goto close_file; image_size = tmp2; // bitmap data size if (!read_int(map, fsize, &position, &tmp2)) goto close_file; //hdpi = (tmp2 * 254) / 10000; // horizontal pixels/meter if (!read_int(map, fsize, &position, &tmp2)) goto close_file; //vdpi = (tmp2 * 254) / 10000; // vertical pixles/meter if (!read_int(map, fsize, &position, &tmp2)) goto close_file; //palette_size = tmp2; // number of palette colors power (2^n - so 0 - 8) if (!read_int(map, fsize, &position, &tmp2)) goto close_file; //important_colors = tmp2; // number of important colors - 0 if all if (image_size == 0) image_size = fsize - offset; if ((comp == 0) && (bit_count == 32)) hasa = 1; // GIMP seems to store it this way } else if (head_size == 108) // Windows 95/NT4 + (v4) { short tmp; int tmp2; if (!read_int(map, fsize, &position, &tmp2)) goto close_file; w = tmp2; // width if (!read_int(map, fsize, &position, &tmp2)) goto close_file; h = tmp2; // height if (!read_short(map, fsize, &position, &tmp)) goto close_file; //planes = tmp; // must be 1 if (!read_short(map, fsize, &position, &tmp)) goto close_file; bit_count = tmp; // bits per pixel: 1, 4, 8, 16, 24 & 32 if (!read_int(map, fsize, &position, &tmp2)) goto close_file; comp = tmp2; // compression method if (!read_int(map, fsize, &position, &tmp2)) goto close_file; image_size = tmp2; // bitmap data size if (!read_int(map, fsize, &position, &tmp2)) goto close_file; //hdpi = (tmp2 * 254) / 10000; // horizontal pixels/meter if (!read_int(map, fsize, &position, &tmp2)) goto close_file; //vdpi = (tmp2 * 254) / 10000; // vertical pixles/meter if (!read_int(map, fsize, &position, &tmp2)) goto close_file; //palette_size = tmp2; // number of palette colors power (2^n - so 0 - 8) if (!read_int(map, fsize, &position, &tmp2)) goto close_file; //important_colors = tmp2; // number of important colors - 0 if all if (!read_int(map, fsize, &position, &tmp2)) goto close_file; //rmask = tmp2; // red mask if (!read_int(map, fsize, &position, &tmp2)) goto close_file; //gmask = tmp2; // green mask if (!read_int(map, fsize, &position, &tmp2)) goto close_file; //bmask = tmp2; // blue mask if (!read_int(map, fsize, &position, &tmp2)) goto close_file; amask = tmp2; // alpha mask if (!read_skip(fsize, &position, 36)) goto close_file; // skip unused cie if (!read_skip(fsize, &position, 12)) goto close_file; // skip unused gamma if (image_size == 0) image_size = fsize - offset; if ((amask) && (bit_count == 32)) hasa = 1; } else if (head_size == 124) // Windows 98/2000 + (v5) { short tmp; int tmp2; if (!read_int(map, fsize, &position, &tmp2)) goto close_file; w = tmp2; // width if (!read_int(map, fsize, &position, &tmp2)) goto close_file; h = tmp2; // height if (!read_short(map, fsize, &position, &tmp)) goto close_file; //planes = tmp; // must be 1 if (!read_short(map, fsize, &position, &tmp)) goto close_file; bit_count = tmp; // bits per pixel: 1, 4, 8, 16, 24 & 32 if (!read_int(map, fsize, &position, &tmp2)) goto close_file; comp = tmp2; // compression method if (!read_int(map, fsize, &position, &tmp2)) goto close_file; //image_size = tmp2; // bitmap data size if (!read_int(map, fsize, &position, &tmp2)) goto close_file; //hdpi = (tmp2 * 254) / 10000; // horizontal pixels/meter if (!read_int(map, fsize, &position, &tmp2)) goto close_file; //vdpi = (tmp2 * 254) / 10000; // vertical pixles/meter if (!read_int(map, fsize, &position, &tmp2)) goto close_file; //palette_size = tmp2; // number of palette colors power (2^n - so 0 - 8) if (!read_int(map, fsize, &position, &tmp2)) goto close_file; //important_colors = tmp2; // number of important colors - 0 if all if (!read_int(map, fsize, &position, &tmp2)) goto close_file; //rmask = tmp2; // red mask if (!read_int(map, fsize, &position, &tmp2)) goto close_file; //gmask = tmp2; // green mask if (!read_int(map, fsize, &position, &tmp2)) goto close_file; //bmask = tmp2; // blue mask if (!read_int(map, fsize, &position, &tmp2)) goto close_file; amask = tmp2; // alpha mask if (!read_skip(fsize, &position, 36)) goto close_file; // skip unused cie if (!read_skip(fsize, &position, 12)) goto close_file; // skip unused gamma if (!read_skip(fsize, &position, 16)) goto close_file; // skip others if (image_size == 0) image_size = fsize - offset; if ((amask) && (bit_count == 32)) hasa = 1; } else goto close_file; if (h < 0) { h = -h; //right_way_up = 1; } if ((w < 1) || (h < 1) || (w > IMG_MAX_SIZE) || (h > IMG_MAX_SIZE) || IMG_TOO_BIG(w, h)) { if (IMG_TOO_BIG(w, h)) *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; else *error = EVAS_LOAD_ERROR_GENERIC; goto close_file; } /* It is not bad idea that bmp loader support scale down decoding * because of memory issue in mobile world.*/ if (ilp->opts.scale_down_by > 1) { w /= ilp->opts.scale_down_by; h /= ilp->opts.scale_down_by; } if (bit_count < 16) { //if ((palette_size < 0) || (palette_size > 256)) pal_num = 256; //else pal_num = palette_size; if (bit_count == 1) { if (comp == 0) // no compression { } else goto close_file; } else if (bit_count == 4) { if (comp == 0) // no compression { } else if (comp == 2) // rle 4bit/pixel { } else goto close_file; } else if (bit_count == 8) { if (comp == 0) // no compression { } else if (comp == 1) // rle 8bit/pixel { } else goto close_file; } } else if ((bit_count == 16) || (bit_count == 24) || (bit_count == 32)) { if (comp == 0) // no compression { // handled } else if (comp == 3) // bit field { // handled } else if (comp == 4) // jpeg - only printer drivers goto close_file; else if (comp == 3) // png - only printer drivers goto close_file; else goto close_file; } else goto close_file; ilp->w = w; ilp->h = h; if (hasa) ilp->alpha = 1; eina_file_map_free(f, map); eina_file_close(f); *error = EVAS_LOAD_ERROR_NONE; return EINA_TRUE; close_file: if (map) eina_file_map_free(f, map); eina_file_close(f); return EINA_FALSE; } static Eina_Bool evas_image_load_file_data_bmp(Evas_Img_Load_Params *ilp, const char *file, const char *key __UNUSED__, int *error) { Eina_File *f; void *map = NULL; size_t position = 0; unsigned char *buffer = NULL, *buffer_end = NULL, *p; char hasa = 0; int x = 0, y = 0, w = 0, h = 0, bit_count = 0, image_size = 0, comp = 0, palette_size = -1; unsigned int offset = 0, head_size = 0; unsigned int *pal = NULL, pal_num = 0, *pix = NULL, *surface = NULL, fix, rmask = 0, gmask = 0, bmask = 0, amask = 0; int right_way_up = 0; unsigned char r, g, b, a; int fsize = 0; unsigned int bmpsize; unsigned short res1, res2; /* for scale decoding */ unsigned int *scale_surface = NULL, *scale_pix = NULL; int scale_ratio = 1, image_w = 0, image_h = 0; int row_size = 0; /* Row size is rounded up to a multiple of 4bytes */ int read_line = 0; /* total read line */ f = eina_file_open(file, 0); if (!f) { *error = EVAS_LOAD_ERROR_DOES_NOT_EXIST; return EINA_FALSE; } *error = EVAS_LOAD_ERROR_UNKNOWN_FORMAT; fsize = eina_file_size_get(f); if (fsize < 2) goto close_file; map = eina_file_map_all(f, EINA_FILE_SEQUENTIAL); if (!map) goto close_file; if (strncmp(map, "BM", 2)) goto close_file; // magic number position += 2; *error = EVAS_LOAD_ERROR_CORRUPT_FILE; if (!read_uint(map, fsize, &position, &bmpsize)) goto close_file; if (!read_ushort(map, fsize, &position, &res1)) goto close_file; if (!read_ushort(map, fsize, &position, &res2)) goto close_file; if (!read_uint(map, fsize, &position, &offset)) goto close_file; if (!read_uint(map, fsize, &position, &head_size)) goto close_file; image_size = fsize - offset; if (image_size < 1) goto close_file; if (head_size == 12) // OS/2 V1 + Windows 3.0 { short tmp; if (!read_short(map, fsize, &position, &tmp)) goto close_file; w = tmp; // width if (!read_short(map, fsize, &position, &tmp)) goto close_file; h = tmp; // height if (!read_short(map, fsize, &position, &tmp)) goto close_file; //planes = tmp; // must be 1 if (!read_short(map, fsize, &position, &tmp)) goto close_file; bit_count = tmp; // bits per pixel: 1, 4, 8 & 24 } else if (head_size == 64) // OS/2 V2 { short tmp; int tmp2; if (!read_int(map, fsize, &position, &tmp2)) goto close_file; w = tmp2; // width if (!read_int(map, fsize, &position, &tmp2)) goto close_file; h = tmp2; // height if (!read_short(map, fsize, &position, &tmp)) goto close_file; //planes = tmp; // must be 1 if (!read_short(map, fsize, &position, &tmp)) goto close_file; bit_count = tmp; // bits per pixel: 1, 4, 8, 16, 24 & 32 if (!read_int(map, fsize, &position, &tmp2)) goto close_file; comp = tmp2; // compression method if (!read_int(map, fsize, &position, &tmp2)) goto close_file; image_size = tmp2; // bitmap data size if (!read_int(map, fsize, &position, &tmp2)) goto close_file; //hdpi = (tmp2 * 254) / 10000; // horizontal pixels/meter if (!read_int(map, fsize, &position, &tmp2)) goto close_file; //vdpi = (tmp2 * 254) / 10000; // vertical pixles/meter if (!read_int(map, fsize, &position, &tmp2)) goto close_file; palette_size = tmp2; // number of palette colors power (2^n - so 0 - 8) if (!read_int(map, fsize, &position, &tmp2)) goto close_file; //important_colors = tmp2; // number of important colors - 0 if all if (!read_skip(fsize, &position, 24)) goto close_file; // skip unused header if (image_size == 0) image_size = fsize - offset; } else if (head_size == 40) // Windows 3.0 + (v3) { short tmp; int tmp2; if (!read_int(map, fsize, &position, &tmp2)) goto close_file; w = tmp2; // width if (!read_int(map, fsize, &position, &tmp2)) goto close_file; h = tmp2; // height if (!read_short(map, fsize, &position, &tmp)) goto close_file; //planes = tmp; // must be 1 if (!read_short(map, fsize, &position, &tmp)) goto close_file; bit_count = tmp; // bits per pixel: 1, 4, 8, 16, 24 & 32 if (!read_int(map, fsize, &position, &tmp2)) goto close_file; comp = tmp2; // compression method if (!read_int(map, fsize, &position, &tmp2)) goto close_file; image_size = tmp2; // bitmap data size if (!read_int(map, fsize, &position, &tmp2)) goto close_file; //hdpi = (tmp2 * 254) / 10000; // horizontal pixels/meter if (!read_int(map, fsize, &position, &tmp2)) goto close_file; //vdpi = (tmp2 * 254) / 10000; // vertical pixles/meter if (!read_int(map, fsize, &position, &tmp2)) goto close_file; palette_size = tmp2; // number of palette colors power (2^n - so 0 - 8) if (!read_int(map, fsize, &position, &tmp2)) goto close_file; //important_colors = tmp2; // number of important colors - 0 if all if (image_size == 0) image_size = fsize - offset; if ((comp == 0) && (bit_count == 32)) hasa = 1; // GIMP seems to store it this way } else if (head_size == 108) // Windows 95/NT4 + (v4) { short tmp; int tmp2; if (!read_int(map, fsize, &position, &tmp2)) goto close_file; w = tmp2; // width if (!read_int(map, fsize, &position, &tmp2)) goto close_file; h = tmp2; // height if (!read_short(map, fsize, &position, &tmp)) goto close_file; //planes = tmp; // must be 1 if (!read_short(map, fsize, &position, &tmp)) goto close_file; bit_count = tmp; // bits per pixel: 1, 4, 8, 16, 24 & 32 if (!read_int(map, fsize, &position, &tmp2)) goto close_file; comp = tmp2; // compression method if (!read_int(map, fsize, &position, &tmp2)) goto close_file; image_size = tmp2; // bitmap data size if (!read_int(map, fsize, &position, &tmp2)) goto close_file; //hdpi = (tmp2 * 254) / 10000; // horizontal pixels/meter if (!read_int(map, fsize, &position, &tmp2)) goto close_file; //vdpi = (tmp2 * 254) / 10000; // vertical pixles/meter if (!read_int(map, fsize, &position, &tmp2)) goto close_file; palette_size = tmp2; // number of palette colors power (2^n - so 0 - 8) if (!read_int(map, fsize, &position, &tmp2)) goto close_file; //important_colors = tmp2; // number of important colors - 0 if all if (!read_int(map, fsize, &position, &tmp2)) goto close_file; rmask = tmp2; // red mask if (!read_int(map, fsize, &position, &tmp2)) goto close_file; gmask = tmp2; // green mask if (!read_int(map, fsize, &position, &tmp2)) goto close_file; bmask = tmp2; // blue mask if (!read_int(map, fsize, &position, &tmp2)) goto close_file; amask = tmp2; // alpha mask if (!read_skip(fsize, &position, 36)) goto close_file; // skip unused cie if (!read_skip(fsize, &position, 12)) goto close_file; // skip unused gamma if (image_size == 0) image_size = fsize - offset; if ((amask) && (bit_count == 32)) hasa = 1; } else if (head_size == 124) // Windows 98/2000 + (v5) { short tmp; int tmp2; if (!read_int(map, fsize, &position, &tmp2)) goto close_file; w = tmp2; // width if (!read_int(map, fsize, &position, &tmp2)) goto close_file; h = tmp2; // height if (!read_short(map, fsize, &position, &tmp)) goto close_file; //planes = tmp; // must be 1 if (!read_short(map, fsize, &position, &tmp)) goto close_file; bit_count = tmp; // bits per pixel: 1, 4, 8, 16, 24 & 32 if (!read_int(map, fsize, &position, &tmp2)) goto close_file; comp = tmp2; // compression method if (!read_int(map, fsize, &position, &tmp2)) goto close_file; image_size = tmp2; // bitmap data size if (!read_int(map, fsize, &position, &tmp2)) goto close_file; //hdpi = (tmp2 * 254) / 10000; // horizontal pixels/meter if (!read_int(map, fsize, &position, &tmp2)) goto close_file; //vdpi = (tmp2 * 254) / 10000; // vertical pixles/meter if (!read_int(map, fsize, &position, &tmp2)) goto close_file; palette_size = tmp2; // number of palette colors power (2^n - so 0 - 8) if (!read_int(map, fsize, &position, &tmp2)) goto close_file; //important_colors = tmp2; // number of important colors - 0 if all if (!read_int(map, fsize, &position, &tmp2)) goto close_file; rmask = tmp2; // red mask if (!read_int(map, fsize, &position, &tmp2)) goto close_file; gmask = tmp2; // green mask if (!read_int(map, fsize, &position, &tmp2)) goto close_file; bmask = tmp2; // blue mask if (!read_int(map, fsize, &position, &tmp2)) goto close_file; amask = tmp2; // alpha mask if (!read_skip(fsize, &position, 36)) goto close_file; // skip unused cie if (!read_skip(fsize, &position, 12)) goto close_file; // skip unused gamma if (!read_skip(fsize, &position, 16)) goto close_file; // skip others if (image_size == 0) image_size = fsize - offset; if ((amask) && (bit_count == 32)) hasa = 1; } else goto close_file; if (h < 0) { h = -h; right_way_up = 1; } if ((w < 1) || (h < 1) || (w > IMG_MAX_SIZE) || (h > IMG_MAX_SIZE) || IMG_TOO_BIG(w, h)) { if (IMG_TOO_BIG(w, h)) *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; else *error = EVAS_LOAD_ERROR_GENERIC; goto close_file; } /* It is not bad idea that bmp loader support scale down decoding * because of memory issue in mobile world. */ if (ilp->opts.scale_down_by > 1) scale_ratio = ilp->opts.scale_down_by; image_w = w; image_h = h; if (scale_ratio > 1) { w /= scale_ratio; h /= scale_ratio; if ((w < 1) || (h < 1) ) { *error = EVAS_LOAD_ERROR_GENERIC; goto close_file; } } if ((w != (int)ilp->w) || (h != (int)ilp->h)) { *error = EVAS_LOAD_ERROR_GENERIC; goto close_file; } surface = ilp->buffer; if (!surface) { *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; goto close_file; } row_size = ceil((double)(image_w * bit_count) / 32) * 4; if (bit_count < 16) { unsigned int i; if (bit_count == 1) { if ((palette_size <= 0) || (palette_size > 2)) pal_num = 2; else pal_num = palette_size; } else if (bit_count == 4) { if ((palette_size <= 0) || (palette_size > 16)) pal_num = 16; else pal_num = palette_size; } else if (bit_count == 8) { if ((palette_size <= 0) || (palette_size > 256)) pal_num = 256; else pal_num = palette_size; } pal = alloca(256 * 4); for (i = 0; i < pal_num; i++) { if (!read_uchar(map, fsize, &position, &b)) goto close_file; if (!read_uchar(map, fsize, &position, &g)) goto close_file; if (!read_uchar(map, fsize, &position, &r)) goto close_file; if ((head_size != 12) /*&& (palette_size != 0)*/) { // OS/2 V1 doesn't do the pad byte if (!read_uchar(map, fsize, &position, &a)) goto close_file; } a = 0xff; // fillin a as solid for paletted images pal[i] = ARGB_JOIN(a, r, g, b); } position = offset; if ((scale_ratio == 1) || (comp !=0)) buffer = malloc(image_size + 8); // add 8 for padding to avoid checks else { scale_surface = malloc(image_w * sizeof(DATA32)); //for one line decoding if (!scale_surface) { *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; goto close_file; } buffer = malloc(row_size); // scale down is usually set because of memory issue, so read line by line } if (!buffer) { *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; goto close_file; } if ((scale_ratio == 1) || (comp !=0)) buffer_end = buffer + image_size; else buffer_end = buffer + row_size; p = buffer; if ((scale_ratio == 1) || (comp !=0)) { if (!read_mem(map, fsize, &position, buffer, image_size)) goto close_file; } else { if (!read_mem(map, fsize, &position, buffer, row_size)) goto close_file; } if (bit_count == 1) { if (comp == 0) // no compression { pix = surface; for (y = 0; y < h; y++) { if (!right_way_up) pix = surface + ((h - 1 - y) * w); if (scale_ratio > 1) pix = scale_surface; // one line decoding for (x = 0; x < image_w; x++) { if ((x & 0x7) == 0x0) { *pix = pal[*p >> 7]; } else if ((x & 0x7) == 0x1) { *pix = pal[(*p >> 6) & 0x1]; } else if ((x & 0x7) == 0x2) { *pix = pal[(*p >> 5) & 0x1]; } else if ((x & 0x7) == 0x3) { *pix = pal[(*p >> 4) & 0x1]; } else if ((x & 0x7) == 0x4) { *pix = pal[(*p >> 3) & 0x1]; } else if ((x & 0x7) == 0x5) { *pix = pal[(*p >> 2) & 0x1]; } else if ((x & 0x7) == 0x6) { *pix = pal[(*p >> 1) & 0x1]; } else { *pix = pal[*p & 0x1]; p++; } if (p >= buffer_end) break; pix++; } if (scale_ratio > 1) { if (!right_way_up) scale_pix = surface + ((h - 1 - y) * w); else scale_pix = surface + (y * w); pix = scale_surface; for (x = 0; x < w; x++) { *scale_pix = *pix; scale_pix ++; pix += scale_ratio; } read_line += scale_ratio; if (read_line >= image_h) break; position += row_size * (scale_ratio - 1); if (!read_mem(map, fsize, &position, buffer, row_size)) goto close_file; p = buffer; buffer_end = buffer + row_size; } else { if ((x & 0x7) != 0) p++; fix = (int)(((unsigned long)p) & 0x3); if (fix > 0) p += 4 - fix; // align row read if (p >= buffer_end) break; } } } else goto close_file; } else if (bit_count == 4) { if (comp == 0) // no compression { pix = surface; for (y = 0; y < h; y++) { if (!right_way_up) pix = surface + ((h - 1 - y) * w); if (scale_ratio > 1) pix = scale_surface; // one line decoding for (x = 0; x < image_w; x++) { if ((x & 0x1) == 0x1) { *pix = pal[*p & 0x0f]; p++; } else { *pix = pal[*p >> 4]; } if (p >= buffer_end) break; pix++; } if (scale_ratio > 1) { if (!right_way_up) scale_pix = surface + ((h - 1 - y) * w); else scale_pix = surface + (y * w); pix = scale_surface; for (x = 0; x < w; x++) { *scale_pix = *pix; scale_pix ++; pix += scale_ratio; } read_line += scale_ratio; if (read_line >= image_h) break; position += row_size * (scale_ratio - 1); if (!read_mem(map, fsize, &position, buffer, row_size)) goto close_file; p = buffer; buffer_end = buffer + row_size; } else { if ((x & 0x1) != 0) p++; fix = (int)(((unsigned long)p) & 0x3); if (fix > 0) p += 4 - fix; // align row read if (p >= buffer_end) break; } } } else if (comp == 2) // rle 4bit/pixel { int count = 0, done = 0, wpad; int scale_x = 0, scale_y = 0; Eina_Bool scale_down_line = EINA_TRUE; pix = surface; if (!right_way_up) pix = surface + ((h - 1 - y) * w); wpad = ((image_w + 1) / 2) * 2; while (p < buffer_end) { if (p[0]) { if (scale_down_line) { if ((x + p[0]) <= wpad) { unsigned int col1 = pal[p[1] >> 4]; unsigned int col2 = pal[p[1] & 0xf]; count = p[0] / 2; while (count > 0) { if (x < w) { if (((x % scale_ratio) == 0) && (scale_x < w)) { *pix = col1; pix++; scale_x++; } x++; } if (x < w) { if (((x % scale_ratio) == 0) && (scale_x < w)) { *pix = col2; pix++; scale_x++; } x++; } count--; } if (p[0] & 0x1) { if (((x % scale_ratio) == 0) && (scale_x < w)) { *pix = col1; pix++; scale_x++; } x++; } } } p += 2; } else { switch (p[1]) { case 0: // EOL x = 0; scale_x = 0; y++; if ((y % scale_ratio) == 0) { scale_y++; scale_down_line = EINA_TRUE; if (!right_way_up) pix = surface + ((h - 1 - scale_y) * w); else pix = surface + (scale_y * w); } else scale_down_line = EINA_FALSE; if (scale_y >= h) { p = buffer_end; } p += 2; break; case 1: // EOB p = buffer_end; break; case 2: // DELTA x += p[2]; y += p[3]; scale_x = x / scale_ratio; scale_y = y / scale_ratio; if ((scale_x >= w) || (scale_y >= h)) { p = buffer_end; } if (!right_way_up) pix = surface + scale_x + ((h - 1 - scale_y) * w); else pix = surface + scale_x + (scale_y * w); p += 4; break; default: count = p[1]; if (((p + count) > buffer_end) || ((x + count) > w)) { p = buffer_end; break; } p += 2; done = count; count /= 2; while (count > 0) { if (((x % scale_ratio) == 0) && (scale_x < w)) { *pix = pal[*p >> 4]; pix++; scale_x++; } x++; if (((x % scale_ratio) == 0) && (scale_x < w)) { *pix = pal[*p & 0xf]; pix++; scale_x++; } x++; p++; count--; } if (done & 0x1) { if (((x % scale_ratio) == 0) && (scale_x < w)) { *pix = pal[*p >> 4]; scale_x++; } x++; p++; } if ((done & 0x3) == 0x1) p += 2; else if ((done & 0x3) == 0x2) p += 1; break; } } } } else goto close_file; } else if (bit_count == 8) { if (comp == 0) // no compression { pix = surface; for (y = 0; y < h; y++) { if (!right_way_up) pix = surface + ((h - 1 - y) * w); for (x = 0; x < w; x++) { *pix = pal[*p]; p += scale_ratio; if (p >= buffer_end) break; pix++; } if (scale_ratio > 1) { read_line += scale_ratio; if (read_line >= image_h) break; position += row_size * (scale_ratio - 1); if (!read_mem(map, fsize, &position, buffer, row_size)) goto close_file; p = buffer; buffer_end = buffer + row_size; } else { fix = (int)(((unsigned long)p) & 0x3); if (fix > 0) p += 4 - fix; // align row read if (p >= buffer_end) break; } } } else if (comp == 1) // rle 8bit/pixel { int count = 0, done = 0; int scale_x = 0, scale_y = 0; Eina_Bool scale_down_line = EINA_TRUE; pix = surface; if (!right_way_up) pix = surface + ((h - 1 - y) * w); while (p < buffer_end) { if (p[0]) { if (scale_down_line) { if ((x + p[0]) <= image_w) { unsigned int col = pal[p[1]]; count = p[0]; while (count > 0) { if (((x % scale_ratio) == 0) && (scale_x < w)) { *pix = col; pix++; scale_x ++; } x++; count--; } } } p += 2; } else { switch (p[1]) { case 0: // EOL x = 0; scale_x = 0; y++; if ((y % scale_ratio) == 0) { scale_y++; scale_down_line = EINA_TRUE; if (!right_way_up) pix = surface + ((h - 1 - scale_y) * w); else pix = surface + (scale_y * w); } else scale_down_line = EINA_FALSE; if (scale_y >= h) { p = buffer_end; } p += 2; break; case 1: // EOB p = buffer_end; break; case 2: // DELTA x += p[2]; y += p[3]; scale_x = x / scale_ratio; scale_y = y / scale_ratio; if ((scale_x >= w) || (scale_y >= h)) { p = buffer_end; } if (!right_way_up) pix = surface + scale_x + ((h - 1 - scale_y) * w); else pix = surface + scale_x + (scale_y * w); p += 4; break; default: count = p[1]; if (((p + count) > buffer_end) || ((x + count) > image_w)) { p = buffer_end; break; } p += 2; done = count; while (count > 0) { if (((x % scale_ratio) == 0) && (scale_x < w)) { *pix = pal[*p]; pix++; scale_x ++; } p++; x++; count--; } if (done & 0x1) p++; break; } } } } else goto close_file; } } else if ((bit_count == 16) || (bit_count == 24) || (bit_count == 32)) { if (comp == 0) // no compression { position = offset; if (scale_ratio == 1) buffer = malloc(image_size + 8); // add 8 for padding to avoid checks else buffer = malloc(row_size); // scale down is usually set because of memory issue, so read line by line if (!buffer) { *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; goto close_file; } if (scale_ratio == 1) buffer_end = buffer + image_size; else buffer_end = buffer + row_size; p = buffer; if (scale_ratio == 1) { if (!read_mem(map, fsize, &position, buffer, image_size)) goto close_file; } else { if (!read_mem(map, fsize, &position, buffer, row_size)) goto close_file; } if (bit_count == 16) { unsigned short tmp; pix = surface; for (y = 0; y < h; y++) { if (!right_way_up) pix = surface + ((h - 1 - y) * w); for (x = 0; x < w; x++) { tmp = *((unsigned short *)(p)); r = (tmp >> 7) & 0xf8; r |= r >> 5; g = (tmp >> 2) & 0xf8; g |= g >> 5; b = (tmp << 3) & 0xf8; b |= b >> 5; *pix = ARGB_JOIN(0xff, r, g, b); p += 2 * scale_ratio; if (p >= buffer_end) break; pix++; } if (scale_ratio > 1) { read_line += scale_ratio; if (read_line >= image_h) break; position += row_size * (scale_ratio - 1); if (!read_mem(map, fsize, &position, buffer, row_size)) goto close_file; p = buffer; buffer_end = buffer + row_size; } else { fix = (int)(((unsigned long)p) & 0x3); if (fix > 0) p += 4 - fix; // align row read if (p >= buffer_end) break; } } } else if (bit_count == 24) { pix = surface; for (y = 0; y < h; y++) { if (!right_way_up) pix = surface + ((h - 1 - y) * w); for (x = 0; x < w; x++) { b = p[0]; g = p[1]; r = p[2]; *pix = ARGB_JOIN(0xff, r, g, b); p += 3 * scale_ratio; if (p >= buffer_end) break; pix++; } if (scale_ratio > 1) { read_line += scale_ratio; if (read_line >= image_h) break; position += row_size * (scale_ratio - 1); if (!read_mem(map, fsize, &position, buffer, row_size)) goto close_file; p = buffer; buffer_end = buffer + row_size; } else { fix = (int)(((unsigned long)p) & 0x3); if (fix > 0) p += 4 - fix; // align row read if (p >= buffer_end) break; } } } else if (bit_count == 32) { int none_zero_alpha = 0; pix = surface; for (y = 0; y < h; y++) { if (!right_way_up) pix = surface + ((h - 1 - y) * w); for (x = 0; x < w; x++) { b = p[0]; g = p[1]; r = p[2]; a = p[3]; if (a) none_zero_alpha = 1; if (!hasa) a = 0xff; *pix = ARGB_JOIN(a, r, g, b); p += 4 * scale_ratio; if (p >= buffer_end) break; pix++; } if (scale_ratio > 1) { read_line += scale_ratio; if (read_line >= image_h) break; position += row_size * (scale_ratio - 1); if (!read_mem(map, fsize, &position, buffer, row_size)) goto close_file; p = buffer; buffer_end = buffer + row_size; } else { fix = (int)(((unsigned long)p) & 0x3); if (fix > 0) p += 4 - fix; // align row read if (p >= buffer_end) break; } } if (!none_zero_alpha) { ilp->alpha = 0; if (hasa) { unsigned int *pixend = surface + (w * h); for (pix = surface; pix < pixend; pix++) A_VAL(pix) = 0xff; } } } else goto close_file; } else if (comp == 3) // bit field { if (!read_uint(map, fsize, &position, &rmask)) goto close_file; if (!read_uint(map, fsize, &position, &gmask)) goto close_file; if (!read_uint(map, fsize, &position, &bmask)) goto close_file; position = offset; if (scale_ratio == 1) buffer = malloc(image_size + 8); // add 8 for padding to avoid checks else buffer = malloc(row_size); // scale down is usually set because of memory issue, so read line by line if (!buffer) { *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; goto close_file; } if (scale_ratio == 1) buffer_end = buffer + image_size; else buffer_end = buffer + row_size; p = buffer; if (scale_ratio == 1) { if (!read_mem(map, fsize, &position, buffer, image_size)) goto close_file; } else { if (!read_mem(map, fsize, &position, buffer, row_size)) goto close_file; } if ((bit_count == 16) && (rmask == 0xf800) && (gmask == 0x07e0) && (bmask == 0x001f) ) { unsigned short tmp; pix = surface; for (y = 0; y < h; y++) { if (!right_way_up) pix = surface + ((h - 1 - y) * w); for (x = 0; x < w; x++) { tmp = *((unsigned short *)(p)); r = (tmp >> 8) & 0xf8; r |= r >> 5; g = (tmp >> 3) & 0xfc; g |= g >> 6; b = (tmp << 3) & 0xf8; b |= b >> 5; *pix = ARGB_JOIN(0xff, r, g, b); p += 2 * scale_ratio; if (p >= buffer_end) break; pix++; } if (scale_ratio > 1) { read_line += scale_ratio; if (read_line >= image_h) break; position += row_size * (scale_ratio - 1); if (!read_mem(map, fsize, &position, buffer, row_size)) goto close_file; p = buffer; buffer_end = buffer + row_size; } else { fix = (int)(((unsigned long)p) & 0x3); if (fix > 0) p += 4 - fix; // align row read if (p >= buffer_end) break; } } } else if ((bit_count == 16) && (rmask == 0x7c00) && (gmask == 0x03e0) && (bmask == 0x001f) ) { unsigned short tmp; pix = surface; for (y = 0; y < h; y++) { if (!right_way_up) pix = surface + ((h - 1 - y) * w); for (x = 0; x < w; x++) { tmp = *((unsigned short *)(p)); r = (tmp >> 7) & 0xf8; r |= r >> 5; g = (tmp >> 2) & 0xf8; g |= g >> 5; b = (tmp << 3) & 0xf8; b |= b >> 5; *pix = ARGB_JOIN(0xff, r, g, b); p += 2 * scale_ratio; if (p >= buffer_end) break; pix++; } if (scale_ratio > 1) { read_line += scale_ratio; if (read_line >= image_h) break; position += row_size * (scale_ratio - 1); if (!read_mem(map, fsize, &position, buffer_end, row_size)) goto close_file; p = buffer; buffer_end = buffer + row_size; } else { fix = (int)(((unsigned long)p) & 0x3); if (fix > 0) p += 4 - fix; // align row read if (p >= buffer_end) break; } } } else if (bit_count == 32) { pix = surface; for (y = 0; y < h; y++) { if (!right_way_up) pix = surface + ((h - 1 - y) * w); for (x = 0; x < w; x++) { b = p[0]; g = p[1]; r = p[2]; a = p[3]; if (!hasa) a = 0xff; *pix = ARGB_JOIN(a, r, g, b); p += 4 * scale_ratio; if (p >= buffer_end) break; pix++; } if (scale_ratio > 1) { read_line += scale_ratio; if (read_line >= image_h) break; position += row_size * (scale_ratio - 1); if (!read_mem(map, fsize, &position, buffer, row_size)) goto close_file; p = buffer; buffer_end = buffer + row_size; } else { fix = (int)(((unsigned long)p) & 0x3); if (fix > 0) p += 4 - fix; // align row read if (p >= buffer_end) break; } } } else goto close_file; } else if (comp == 4) // jpeg - only printer drivers { goto close_file; } else if (comp == 3) // png - only printer drivers { goto close_file; } else goto close_file; } else goto close_file; if (buffer) free(buffer); if (scale_surface) free(scale_surface); eina_file_map_free(f, map); eina_file_close(f); evas_cserve2_image_premul(ilp); *error = EVAS_LOAD_ERROR_NONE; return EINA_TRUE; close_file: if (buffer) free(buffer); if (scale_surface) free(scale_surface); if (map) eina_file_map_free(f, map); eina_file_close(f); return EINA_FALSE; } static Evas_Loader_Module_Api modapi = { EVAS_CSERVE2_MODULE_API_VERSION, "bmp", evas_image_load_file_head_bmp, evas_image_load_file_data_bmp }; static Eina_Bool module_init(void) { return evas_cserve2_loader_register(&modapi); } static void module_shutdown(void) { } EINA_MODULE_INIT(module_init); EINA_MODULE_SHUTDOWN(module_shutdown); evas-1.7.9/src/bin/loaders/bmp/Makefile.am0000664000175000017500000000133412175475547015235 00000000000000 MAINTAINERCLEANFILES = Makefile.in AM_CPPFLAGS = \ -I. \ -I$(top_srcdir)/src/lib \ -I$(top_srcdir)/src/lib/include \ -I$(top_srcdir)/src/lib/cserve2 \ -I$(top_srcdir)/src/bin \ @EVAS_GENERAL_CFLAGS@ \ @EVIL_CFLAGS@ if BUILD_LOADER_BMP #if !EVAS_STATIC_BUILD_BMP pkgdir = $(libdir)/evas/cserve2/loaders/bmp/$(MODULE_ARCH) pkg_LTLIBRARIES = module.la module_la_SOURCES = evas_image_load_bmp.c module_la_LIBADD = @EVAS_GENERAL_LIBS@ @EVIL_LIBS@ -lm module_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -module -avoid-version module_la_LIBTOOLFLAGS = --tag=disable-static #else #noinst_LTLIBRARIES = libevas_loader_bmp.la #libevas_loader_bmp_la_SOURCES = evas_image_load_bmp.c #libevas_loader_bmp_la_LIBADD = #endif endif evas-1.7.9/src/bin/loaders/wbmp/0000775000175000017500000000000012234557317013437 500000000000000evas-1.7.9/src/bin/loaders/wbmp/Makefile.in0000664000175000017500000007201312234557301015420 00000000000000# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/bin/loaders/wbmp DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/efl_attribute.m4 \ $(top_srcdir)/m4/efl_coverage.m4 \ $(top_srcdir)/m4/efl_doxygen.m4 \ $(top_srcdir)/m4/efl_fnmatch.m4 \ $(top_srcdir)/m4/efl_path_max.m4 \ $(top_srcdir)/m4/efl_shm_open.m4 $(top_srcdir)/m4/efl_tests.m4 \ $(top_srcdir)/m4/evas_check_engine.m4 \ $(top_srcdir)/m4/evas_check_loader.m4 \ $(top_srcdir)/m4/evas_converter.m4 \ $(top_srcdir)/m4/evas_dither.m4 \ $(top_srcdir)/m4/evas_scaler.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(pkgdir)" LTLIBRARIES = $(pkg_LTLIBRARIES) module_la_DEPENDENCIES = am__module_la_SOURCES_DIST = evas_image_load_wbmp.c @BUILD_LOADER_WBMP_TRUE@am_module_la_OBJECTS = \ @BUILD_LOADER_WBMP_TRUE@ module_la-evas_image_load_wbmp.lo module_la_OBJECTS = $(am_module_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = module_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(AM_CFLAGS) $(CFLAGS) $(module_la_LDFLAGS) $(LDFLAGS) -o $@ @BUILD_LOADER_WBMP_TRUE@am_module_la_rpath = -rpath $(pkgdir) AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(module_la_SOURCES) DIST_SOURCES = $(am__module_la_SOURCES_DIST) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHECK_CFLAGS = @CHECK_CFLAGS@ CHECK_LIBS = @CHECK_LIBS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@ DIRECTFB_LIBS = @DIRECTFB_LIBS@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ ECORE_EVAS_CFLAGS = @ECORE_EVAS_CFLAGS@ ECORE_EVAS_LIBS = @ECORE_EVAS_LIBS@ EDB_CFLAGS = @EDB_CFLAGS@ EDB_LIBS = @EDB_LIBS@ EDJE_CFLAGS = @EDJE_CFLAGS@ EDJE_LIBS = @EDJE_LIBS@ EET_CFLAGS = @EET_CFLAGS@ EET_LIBS = @EET_LIBS@ EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@ EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@ EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@ EFL_SHM_OPEN_LIBS = @EFL_SHM_OPEN_LIBS@ EGREP = @EGREP@ EINA_CFLAGS = @EINA_CFLAGS@ EINA_LIBS = @EINA_LIBS@ EVAS_CFLAGS = @EVAS_CFLAGS@ EVAS_GENERAL_CFLAGS = @EVAS_GENERAL_CFLAGS@ EVAS_GENERAL_LIBS = @EVAS_GENERAL_LIBS@ EVAS_LIBS = @EVAS_LIBS@ EVAS_SSE3_CFLAGS = @EVAS_SSE3_CFLAGS@ EVIL_CFLAGS = @EVIL_CFLAGS@ EVIL_LIBS = @EVIL_LIBS@ EXEEXT = @EXEEXT@ EXOTIC_CFLAGS = @EXOTIC_CFLAGS@ EXOTIC_LIBS = @EXOTIC_LIBS@ FGREP = @FGREP@ FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@ FONTCONFIG_LIBS = @FONTCONFIG_LIBS@ FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ FREETYPE_LIBS = @FREETYPE_LIBS@ FRIBIDI_CFLAGS = @FRIBIDI_CFLAGS@ FRIBIDI_LIBS = @FRIBIDI_LIBS@ GL_EET_CFLAGS = @GL_EET_CFLAGS@ GL_EET_LIBS = @GL_EET_LIBS@ GREP = @GREP@ HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@ HARFBUZZ_LIBS = @HARFBUZZ_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LINEBREAK_CFLAGS = @LINEBREAK_CFLAGS@ LINEBREAK_LIBS = @LINEBREAK_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MODULE_ARCH = @MODULE_ARCH@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ SDL_CFLAGS = @SDL_CFLAGS@ SDL_LIBS = @SDL_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ SVG_CFLAGS = @SVG_CFLAGS@ SVG_LIBS = @SVG_LIBS@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ XCB_CFLAGS = @XCB_CFLAGS@ XCB_GL_CFLAGS = @XCB_GL_CFLAGS@ XCB_GL_LIBS = @XCB_GL_LIBS@ XCB_LIBS = @XCB_LIBS@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_ct_OBJC = @ac_ct_OBJC@ altivec_cflags = @altivec_cflags@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ dlopen_libs = @dlopen_libs@ docdir = @docdir@ dvidir = @dvidir@ edje_cc = @edje_cc@ efl_doxygen = @efl_doxygen@ efl_have_doxygen = @efl_have_doxygen@ evas_engine_buffer_cflags = @evas_engine_buffer_cflags@ evas_engine_buffer_libs = @evas_engine_buffer_libs@ evas_engine_direct3d_cflags = @evas_engine_direct3d_cflags@ evas_engine_direct3d_libs = @evas_engine_direct3d_libs@ evas_engine_directfb_cflags = @evas_engine_directfb_cflags@ evas_engine_directfb_libs = @evas_engine_directfb_libs@ evas_engine_fb_cflags = @evas_engine_fb_cflags@ evas_engine_fb_libs = @evas_engine_fb_libs@ evas_engine_gl_cocoa_cflags = @evas_engine_gl_cocoa_cflags@ evas_engine_gl_cocoa_libs = @evas_engine_gl_cocoa_libs@ evas_engine_gl_common_libs = @evas_engine_gl_common_libs@ evas_engine_gl_sdl_cflags = @evas_engine_gl_sdl_cflags@ evas_engine_gl_sdl_libs = @evas_engine_gl_sdl_libs@ evas_engine_gl_xcb_cflags = @evas_engine_gl_xcb_cflags@ evas_engine_gl_xcb_libs = @evas_engine_gl_xcb_libs@ evas_engine_gl_xlib_cflags = @evas_engine_gl_xlib_cflags@ evas_engine_gl_xlib_libs = @evas_engine_gl_xlib_libs@ evas_engine_psl1ght_cflags = @evas_engine_psl1ght_cflags@ evas_engine_psl1ght_libs = @evas_engine_psl1ght_libs@ evas_engine_software_16_sdl_cflags = @evas_engine_software_16_sdl_cflags@ evas_engine_software_16_sdl_libs = @evas_engine_software_16_sdl_libs@ evas_engine_software_16_wince_cflags = @evas_engine_software_16_wince_cflags@ evas_engine_software_16_wince_libs = @evas_engine_software_16_wince_libs@ evas_engine_software_16_x11_cflags = @evas_engine_software_16_x11_cflags@ evas_engine_software_16_x11_libs = @evas_engine_software_16_x11_libs@ evas_engine_software_8_x11_cflags = @evas_engine_software_8_x11_cflags@ evas_engine_software_8_x11_libs = @evas_engine_software_8_x11_libs@ evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@ evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@ evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@ evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ evas_image_loader_edb_libs = @evas_image_loader_edb_libs@ evas_image_loader_eet_cflags = @evas_image_loader_eet_cflags@ evas_image_loader_eet_libs = @evas_image_loader_eet_libs@ evas_image_loader_generic_cflags = @evas_image_loader_generic_cflags@ evas_image_loader_generic_libs = @evas_image_loader_generic_libs@ evas_image_loader_gif_cflags = @evas_image_loader_gif_cflags@ evas_image_loader_gif_libs = @evas_image_loader_gif_libs@ evas_image_loader_ico_cflags = @evas_image_loader_ico_cflags@ evas_image_loader_ico_libs = @evas_image_loader_ico_libs@ evas_image_loader_jpeg_cflags = @evas_image_loader_jpeg_cflags@ evas_image_loader_jpeg_libs = @evas_image_loader_jpeg_libs@ evas_image_loader_pmaps_cflags = @evas_image_loader_pmaps_cflags@ evas_image_loader_pmaps_libs = @evas_image_loader_pmaps_libs@ evas_image_loader_png_cflags = @evas_image_loader_png_cflags@ evas_image_loader_png_libs = @evas_image_loader_png_libs@ evas_image_loader_psd_cflags = @evas_image_loader_psd_cflags@ evas_image_loader_psd_libs = @evas_image_loader_psd_libs@ evas_image_loader_svg_cflags = @evas_image_loader_svg_cflags@ evas_image_loader_svg_libs = @evas_image_loader_svg_libs@ evas_image_loader_tga_cflags = @evas_image_loader_tga_cflags@ evas_image_loader_tga_libs = @evas_image_loader_tga_libs@ evas_image_loader_tiff_cflags = @evas_image_loader_tiff_cflags@ evas_image_loader_tiff_libs = @evas_image_loader_tiff_libs@ evas_image_loader_wbmp_cflags = @evas_image_loader_wbmp_cflags@ evas_image_loader_wbmp_libs = @evas_image_loader_wbmp_libs@ evas_image_loader_xpm_cflags = @evas_image_loader_xpm_cflags@ evas_image_loader_xpm_libs = @evas_image_loader_xpm_libs@ exec_prefix = @exec_prefix@ have_evas_engine_gl_x11 = @have_evas_engine_gl_x11@ have_evas_engine_gl_xcb = @have_evas_engine_gl_xcb@ have_evas_engine_gl_xlib = @have_evas_engine_gl_xlib@ have_evas_engine_software_x11 = @have_evas_engine_software_x11@ have_evas_engine_software_xcb = @have_evas_engine_software_xcb@ have_evas_engine_software_xlib = @have_evas_engine_software_xlib@ have_lcov = @have_lcov@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_enable_auto_import = @lt_enable_auto_import@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgconfig_requires_private = @pkgconfig_requires_private@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pthread_cflags = @pthread_cflags@ pthread_libs = @pthread_libs@ release_info = @release_info@ requirement_evas = @requirement_evas@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ shm_open_libs = @shm_open_libs@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ version_info = @version_info@ MAINTAINERCLEANFILES = Makefile.in AM_CPPFLAGS = \ -I. \ -I$(top_srcdir)/src/lib \ -I$(top_srcdir)/src/lib/include \ -I$(top_srcdir)/src/lib/cserve2 \ -I$(top_srcdir)/src/bin \ @EVAS_GENERAL_CFLAGS@ \ @EVIL_CFLAGS@ #if !EVAS_STATIC_BUILD_WBMP @BUILD_LOADER_WBMP_TRUE@pkgdir = $(libdir)/evas/cserve2/loaders/wbmp/$(MODULE_ARCH) @BUILD_LOADER_WBMP_TRUE@pkg_LTLIBRARIES = module.la @BUILD_LOADER_WBMP_TRUE@module_la_SOURCES = evas_image_load_wbmp.c @BUILD_LOADER_WBMP_TRUE@module_la_LIBADD = @EVAS_GENERAL_LIBS@ @EVIL_LIBS@ @BUILD_LOADER_WBMP_TRUE@module_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -module -avoid-version @BUILD_LOADER_WBMP_TRUE@module_la_LIBTOOLFLAGS = --tag=disable-static all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/bin/loaders/wbmp/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/bin/loaders/wbmp/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-pkgLTLIBRARIES: $(pkg_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(pkg_LTLIBRARIES)'; test -n "$(pkgdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(pkgdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(pkgdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkgdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkgdir)"; \ } uninstall-pkgLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(pkg_LTLIBRARIES)'; test -n "$(pkgdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkgdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkgdir)/$$f"; \ done clean-pkgLTLIBRARIES: -test -z "$(pkg_LTLIBRARIES)" || rm -f $(pkg_LTLIBRARIES) @list='$(pkg_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } module.la: $(module_la_OBJECTS) $(module_la_DEPENDENCIES) $(EXTRA_module_la_DEPENDENCIES) $(AM_V_CCLD)$(module_la_LINK) $(am_module_la_rpath) $(module_la_OBJECTS) $(module_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/module_la-evas_image_load_wbmp.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< module_la-evas_image_load_wbmp.lo: evas_image_load_wbmp.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT module_la-evas_image_load_wbmp.lo -MD -MP -MF $(DEPDIR)/module_la-evas_image_load_wbmp.Tpo -c -o module_la-evas_image_load_wbmp.lo `test -f 'evas_image_load_wbmp.c' || echo '$(srcdir)/'`evas_image_load_wbmp.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/module_la-evas_image_load_wbmp.Tpo $(DEPDIR)/module_la-evas_image_load_wbmp.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='evas_image_load_wbmp.c' object='module_la-evas_image_load_wbmp.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o module_la-evas_image_load_wbmp.lo `test -f 'evas_image_load_wbmp.c' || echo '$(srcdir)/'`evas_image_load_wbmp.c mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: for dir in "$(DESTDIR)$(pkgdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool clean-pkgLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-pkgLTLIBRARIES install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-pkgLTLIBRARIES .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-libtool clean-pkgLTLIBRARIES cscopelist-am ctags \ ctags-am distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-pkgLTLIBRARIES install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am uninstall-pkgLTLIBRARIES #else #noinst_LTLIBRARIES = libevas_loader_wbmp.la #libevas_loader_wbmp_la_SOURCES = evas_image_load_wbmp.c #libevas_loader_wbmp_la_LIBADD = #endif # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: evas-1.7.9/src/bin/loaders/wbmp/evas_image_load_wbmp.c0000664000175000017500000001034112175475547017656 00000000000000#ifdef HAVE_CONFIG_H # include #endif #include #ifdef HAVE_EVIL # include #endif #include "evas_macros.h" #include "evas_cserve2.h" #include "evas_cserve2_slave.h" static int read_mb(unsigned int *data, void *map, size_t length, size_t *position) { int ac = 0, ct; unsigned char buf; for (ct = 0;;) { if ((ct++) == 5) return -1; if (*position > length) return -1; buf = ((unsigned char *) map)[(*position)++]; ac = (ac << 7) | (buf & 0x7f); if ((buf & 0x80) == 0) break; } *data = ac; return 0; } static Eina_Bool evas_image_load_file_head_wbmp(Evas_Img_Load_Params *ilp, const char *file, const char *key __UNUSED__, int *error) { Eina_File *f; void *map = NULL; size_t position = 0; size_t length; unsigned int type, w, h; *error = EVAS_LOAD_ERROR_GENERIC; f = eina_file_open(file, 0); if (!f) { *error = EVAS_LOAD_ERROR_DOES_NOT_EXIST; return EINA_FALSE; } length = eina_file_size_get(f); if (length <= 4) goto bail; map = eina_file_map_all(f, EINA_FILE_SEQUENTIAL); if (!map) goto bail; if (read_mb(&type, map, length, &position) < 0) goto bail; if (type != 0) { *error = EVAS_LOAD_ERROR_UNKNOWN_FORMAT; goto bail; } position++; /* skipping one byte */ if (read_mb(&w, map, length, &position) < 0) goto bail; if (read_mb(&h, map, length, &position) < 0) goto bail; if ((w < 1) || (h < 1) || (w > IMG_MAX_SIZE) || (h > IMG_MAX_SIZE) || IMG_TOO_BIG(w, h)) { *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; goto bail; } eina_file_map_free(f, map); eina_file_close(f); ilp->w = w; ilp->h = h; *error = EVAS_LOAD_ERROR_NONE; return EINA_TRUE; bail: if (map) eina_file_map_free(f, map); eina_file_close(f); return EINA_FALSE; } static Eina_Bool evas_image_load_file_data_wbmp(Evas_Img_Load_Params *ilp, const char *file, const char *key __UNUSED__, int *error) { Eina_File *f; void *map = NULL; size_t position = 0; size_t length; unsigned int type, w, h; unsigned int line_length; unsigned char *line = NULL; int cur = 0, x, y; DATA32 *dst_data; *error = EVAS_LOAD_ERROR_GENERIC; f = eina_file_open(file, EINA_FALSE); if (!f) { *error = EVAS_LOAD_ERROR_DOES_NOT_EXIST; return EINA_FALSE; } length = eina_file_size_get(f); if (length <= 4) goto bail; map = eina_file_map_all(f, EINA_FILE_SEQUENTIAL); if (!map) goto bail; if (read_mb(&type, map, length, &position) < 0) goto bail; position++; /* skipping one byte */ if (read_mb(&w, map, length, &position) < 0) goto bail; if (read_mb(&h, map, length, &position) < 0) goto bail; if (type != 0) { *error = EVAS_LOAD_ERROR_UNKNOWN_FORMAT; goto bail; } if ((w < 1) || (h < 1) || (w > IMG_MAX_SIZE) || (h > IMG_MAX_SIZE) || IMG_TOO_BIG(w, h)) { *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; goto bail; } ilp->w = w; ilp->h = h; dst_data = ilp->buffer; if (!dst_data) { *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; goto bail; } line_length = (ilp->w + 7) >> 3; for (y = 0; y < (int)ilp->h; y++) { if (position + line_length > length) goto bail; line = ((unsigned char*) map) + position; position += line_length; for (x = 0; x < (int)ilp->w; x++) { int idx = x >> 3; int offset = 1 << (0x07 - (x & 0x07)); if (line[idx] & offset) dst_data[cur] = 0xffffffff; else dst_data[cur] = 0xff000000; cur++; } } eina_file_map_free(f, map); eina_file_close(f); *error = EVAS_LOAD_ERROR_NONE; return EINA_TRUE; bail: if (map) eina_file_map_free(f, map); eina_file_close(f); return EINA_FALSE; } static Evas_Loader_Module_Api modapi = { EVAS_CSERVE2_MODULE_API_VERSION, "wbmp", evas_image_load_file_head_wbmp, evas_image_load_file_data_wbmp }; static Eina_Bool module_init(void) { return evas_cserve2_loader_register(&modapi); } static void module_shutdown(void) { } EINA_MODULE_INIT(module_init); EINA_MODULE_SHUTDOWN(module_shutdown); evas-1.7.9/src/bin/loaders/wbmp/Makefile.am0000664000175000017500000000134012175475547015421 00000000000000 MAINTAINERCLEANFILES = Makefile.in AM_CPPFLAGS = \ -I. \ -I$(top_srcdir)/src/lib \ -I$(top_srcdir)/src/lib/include \ -I$(top_srcdir)/src/lib/cserve2 \ -I$(top_srcdir)/src/bin \ @EVAS_GENERAL_CFLAGS@ \ @EVIL_CFLAGS@ if BUILD_LOADER_WBMP #if !EVAS_STATIC_BUILD_WBMP pkgdir = $(libdir)/evas/cserve2/loaders/wbmp/$(MODULE_ARCH) pkg_LTLIBRARIES = module.la module_la_SOURCES = evas_image_load_wbmp.c module_la_LIBADD = @EVAS_GENERAL_LIBS@ @EVIL_LIBS@ module_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -module -avoid-version module_la_LIBTOOLFLAGS = --tag=disable-static #else #noinst_LTLIBRARIES = libevas_loader_wbmp.la #libevas_loader_wbmp_la_SOURCES = evas_image_load_wbmp.c #libevas_loader_wbmp_la_LIBADD = #endif endif evas-1.7.9/src/bin/loaders/Makefile.am0000664000175000017500000000100612175475547014453 00000000000000MAINTAINERCLEANFILES = Makefile.in SUBDIRS = if BUILD_LOADER_BMP SUBDIRS += bmp endif if BUILD_LOADER_EET SUBDIRS += eet endif if BUILD_LOADER_ICO SUBDIRS += ico endif if BUILD_LOADER_JPEG SUBDIRS += jpeg endif if BUILD_LOADER_PMAPS SUBDIRS += pmaps endif if BUILD_LOADER_PNG SUBDIRS += png endif if BUILD_LOADER_PSD SUBDIRS += psd endif if BUILD_LOADER_TGA SUBDIRS += tga endif if BUILD_LOADER_TIFF SUBDIRS += tiff endif if BUILD_LOADER_WBMP SUBDIRS += wbmp endif if BUILD_LOADER_XPM SUBDIRS += xpm endif evas-1.7.9/src/bin/evas_cserve2_slaves.c0000664000175000017500000003215712175475547015111 00000000000000#ifdef HAVE_CONFIG_H # include "config.h" #endif #include "evas_cserve2.h" #include #include #include #include #include typedef enum { SLAVE_PROCESS, SLAVE_THREAD } Slave_Type; struct _Slave { Slave_Type type; int write_fd; int read_fd; Slave_Read_Cb read_cb; Slave_Dead_Cb dead_cb; const void *data; Eina_Binbuf *pending; struct { int size; int read_size; Slave_Command cmd; char *buf; } read; }; struct _Slave_Proc { Slave base; pid_t pid; const char *name; Eina_Bool killed : 1; }; typedef struct _Slave_Thread Slave_Thread; typedef struct _Slave_Proc Slave_Proc; struct _Slave_Thread { Slave base; pthread_t tid; Slave_Thread_Data *tdata; }; struct _Slave_Thread_Data { int write_fd; int read_fd; Slave_Thread_Cb cb; void *cb_data; const void *cmddata; void *cmdanswer; }; static Eina_List *slave_procs; static Eina_List *slave_threads; static pthread_attr_t slave_thread_attr; static Slave_Proc * _slave_proc_find(pid_t pid) { Eina_List *l; Slave_Proc *s; EINA_LIST_FOREACH(slave_procs, l, s) if (s->pid == pid) return s; return NULL; } static void _slave_free(Slave *s) { if (s->write_fd) close(s->write_fd); if (s->read_fd) { cserve2_fd_watch_del(s->read_fd); close(s->read_fd); } free(s->read.buf); if (s->pending) eina_binbuf_free(s->pending); if (s->dead_cb) s->dead_cb(s, (void *)s->data); } static void _slave_proc_free(Slave_Proc *s) { _slave_free((Slave *)s); eina_stringshare_del(s->name); free(s); } static void _slave_thread_free(Slave_Thread *s) { Slave_Thread_Data *sd = s->tdata; close(sd->write_fd); close(sd->read_fd); free(sd); _slave_free((Slave *)s); free(s); } static void _slave_proc_dead_cb(int pid, int status __UNUSED__) { Slave_Proc *s; DBG("Child dead with pid '%d'.", pid); s = _slave_proc_find(pid); if (!s) { ERR("Unknown child dead '%d'.", pid); return; } slave_procs = eina_list_remove(slave_procs, s); _slave_proc_free(s); } static size_t _slave_write(Slave *s, const char *data, size_t size) { size_t sent = 0; do { ssize_t ret; ret = write(s->write_fd, data + sent, size - sent); if (ret == -1) { if (errno == EAGAIN) break; if (errno == EPIPE) { WRN("Slave unexpectedly gone."); /* handle dead? */ break; } } sent += ret; } while(sent < size); return sent; } static void _slave_write_cb(int fd __UNUSED__, Fd_Flags flags __UNUSED__, void *data) { Slave *s = data; size_t sent; size_t size; const char *str; size = eina_binbuf_length_get(s->pending); str = (const char *)eina_binbuf_string_get(s->pending); sent = _slave_write(s, str, size); if (sent == size) { eina_binbuf_free(s->pending); s->pending = NULL; cserve2_fd_watch_del(s->write_fd); return; } eina_binbuf_remove(s->pending, 0, sent); } static void _slave_read_clear(Slave *s) { s->read.buf = NULL; s->read.cmd = 0; s->read.read_size = s->read.size = 0; } static void _slave_proc_read_cb(int fd, Fd_Flags flags, void *data) { Slave *s = data; Eina_Bool done = EINA_FALSE; /* handle error */ if (!(flags & FD_READ)) return; if (!s->read.size) { int ints[2]; ssize_t ret; ret = read(fd, ints, sizeof(int) * 2); if (ret < (int)sizeof(int) * 2) { return; } s->read.size = ints[0]; s->read.cmd = ints[1]; if (s->read.size) s->read.buf = malloc(s->read.size); else done = EINA_TRUE; } if (s->read.buf) { ssize_t ret; do { char *p = s->read.buf + s->read.read_size; int sz = s->read.size - s->read.read_size; ret = read(fd, p, sz); if (ret < 0) { if (errno == EAGAIN) break; } s->read.read_size += ret; } while(s->read.read_size < s->read.size); if (s->read.read_size == s->read.size) done = EINA_TRUE; } if (done) { s->read_cb(s, s->read.cmd, s->read.buf, (void *)s->data); _slave_read_clear(s); } } static void _slave_thread_read_cb(int fd, Fd_Flags flags, void *data) { Slave_Thread *s = data; Slave_Thread_Data *sd = s->tdata; if (!(flags & FD_READ)) return; Slave_Command cmd; ssize_t ret; ret = read(fd, (char *)&cmd, sizeof(cmd)); if (ret < (int)sizeof(int)) { return; } s->base.read_cb((Slave *)s, cmd, sd->cmdanswer, (void *)s->base.data); } Eina_Bool cserve2_slaves_init(void) { cserve2_on_child_dead_set(_slave_proc_dead_cb); if (pthread_attr_init(&slave_thread_attr)) { ERR("Could not initialize attributes for thread."); cserve2_on_child_dead_set(NULL); return EINA_FALSE; } return EINA_TRUE; } void cserve2_slaves_shutdown(void) { Slave_Proc *sp; Slave_Thread *st; Eina_List *l; cserve2_on_child_dead_set(NULL); if (!slave_procs && !slave_threads) return; DBG("Shutting down slaves subsystem with %d slaves alive!", eina_list_count(slave_procs)); EINA_LIST_FREE(slave_procs, sp) { kill(sp->pid, SIGKILL); _slave_proc_free(sp); } EINA_LIST_FOREACH(slave_threads, l, st) pthread_cancel(st->tid); EINA_LIST_FREE(slave_threads, st) { pthread_join(st->tid, NULL); _slave_thread_free(st); } } static const char * _slave_proc_path_get(const char *name) { char buf[PATH_MAX], cwd[PATH_MAX]; if (name[0] == '/') { if (access(name, X_OK)) return NULL; return eina_stringshare_add(name); } getcwd(cwd, sizeof(cwd)); snprintf(buf, sizeof(buf), "%s/%s", cwd, name); if (!access(buf, X_OK)) return eina_stringshare_add(buf); snprintf(buf, sizeof(buf), PACKAGE_LIBEXEC_DIR"/%s", name); if (!access(buf, X_OK)) return eina_stringshare_add(buf); return NULL; } static Slave * _cserve2_slave_proc_run(const char *exe, Slave_Read_Cb read_cb, Slave_Dead_Cb dead_cb, const void *data) { Slave_Proc *s; Slave *sb; pid_t pid; int child[2], parent[2]; int flags; const char *name; name = _slave_proc_path_get(exe); if (!name) { ERR("Cannot execute slave '%s'. Not found or not executable.", exe); return NULL; } DBG("Running slave '%s', resolved to path: %s", exe, name); s = calloc(1, sizeof(Slave_Proc)); if (!s) { ERR("Could not create Slave_Proc handler."); eina_stringshare_del(name); return NULL; } sb = (Slave *)s; if (pipe(child)) { ERR("Could not create pipes for child."); eina_stringshare_del(name); free(s); return NULL; } if (pipe(parent)) { ERR("Could not create pipes for parent."); eina_stringshare_del(name); free(s); close(child[0]); close(child[1]); return NULL; } pid = fork(); if (pid < 0) { ERR("Could not create sub process."); eina_stringshare_del(name); close(child[0]); close(child[1]); close(parent[0]); close(parent[1]); free(s); return NULL; } if (!pid) { char *args[4], readfd[12], writefd[12]; close(child[1]); close(parent[0]); sprintf(readfd, "%d", child[0]); sprintf(writefd, "%d", parent[1]); args[0] = (char *)name; args[1] = writefd; args[2] = readfd; args[3] = NULL; execvp(name, args); /* we only get here if execvp fails, which should not * happen and if it does, it's baaaaaaaaad */ ERR("execvp() for slave at: '%s' failed! '%m'", name); exit(1); } s->pid = pid; s->name = name; sb->type = SLAVE_PROCESS; sb->write_fd = child[1]; flags = fcntl(sb->write_fd, F_GETFL); flags |= O_NONBLOCK; fcntl(sb->write_fd, F_SETFL, flags); sb->read_fd = parent[0]; flags = fcntl(sb->read_fd, F_GETFL); flags |= O_NONBLOCK; fcntl(sb->read_fd, F_SETFL, flags); sb->read_cb = read_cb; sb->dead_cb = dead_cb; sb->data = data; cserve2_fd_watch_add(sb->read_fd, FD_READ, _slave_proc_read_cb, sb); close(child[0]); close(parent[1]); slave_procs = eina_list_append(slave_procs, s); return sb; } Slave * cserve2_slave_run(const char *name, Slave_Read_Cb read_cb, Slave_Dead_Cb dead_cb, const void *data) { return _cserve2_slave_proc_run(name, read_cb, dead_cb, data); } static void * _slave_thread_cb(void *data) { ssize_t n; Slave_Command cmd; Slave_Thread_Data *sd = data; n = read(sd->read_fd, &cmd, sizeof(cmd)); while (n != 0) { /* EINTR means we were interrupted by a signal before anything * was sent, and if we are back here it means that signal was * not meant for us to die. Any other error here is fatal and * should result in the slave terminating. */ if (errno == EINTR) continue; if (n != sizeof(cmd)) { ERR("Slave thread read invalid size of command from server: %zu", n); continue; } sd->cmdanswer = sd->cb(sd, &cmd, sd->cmddata, sd->cb_data); write(sd->write_fd, &cmd, sizeof(cmd)); n = read(sd->read_fd, &cmd, sizeof(cmd)); } ERR("Pipe was closed on the side. Slave thread exiting..."); return NULL; } Slave * cserve2_slave_thread_run(Slave_Thread_Cb thread_cb, void *thread_data, Slave_Read_Cb read_cb, Slave_Dead_Cb dead_cb, const void *data) { Slave_Thread_Data *sd; Slave_Thread *s; Slave *sb; pthread_t tid; int child[2], parent[2]; int flags; s = calloc(1, sizeof(Slave_Thread)); if (!s) { ERR("Could not create Slave_Thread handler."); return NULL; } sb = (Slave *)s; sd = calloc(1, sizeof(Slave_Thread_Data)); if (!sd) { ERR("Could not create Slave_Thread_Data."); return NULL; } if (pipe(child)) { ERR("Could not create pipes for child."); free(s); free(sd); return NULL; } if (pipe(parent)) { ERR("Could not create pipes for parent."); free(s); free(sd); close(child[0]); close(child[1]); return NULL; } /* Setting data for slave thread */ sd->read_fd = child[0]; sd->write_fd = parent[1]; sd->cb = thread_cb; sd->cb_data = thread_data; if (pthread_create(&tid, &slave_thread_attr, _slave_thread_cb, sd)) { ERR("Could not start slave thread."); free(s); free(sd); close(child[0]); close(child[1]); close(parent[0]); close(parent[1]); return NULL; } s->tid = tid; s->tdata = sd; sb->type = SLAVE_THREAD; sb->write_fd = child[1]; flags = fcntl(sb->write_fd, F_GETFL); flags |= O_NONBLOCK; fcntl(sb->write_fd, F_SETFL, flags); sb->read_fd = parent[0]; flags = fcntl(sb->read_fd, F_GETFL); flags |= O_NONBLOCK; fcntl(sb->read_fd, F_SETFL, flags); sb->read_cb = read_cb; sb->dead_cb = dead_cb; sb->data = data; cserve2_fd_watch_add(sb->read_fd, FD_READ, _slave_thread_read_cb, sb); slave_threads = eina_list_append(slave_threads, s); return sb; } static void _slave_send_aux(Slave *s, const char *data, size_t size) { size_t sent; if (s->pending) { eina_binbuf_append_length(s->pending, (unsigned char *)data, size); return; } sent = _slave_write(s, data, size); if (sent < size) { s->pending = eina_binbuf_new(); eina_binbuf_append_length(s->pending, (unsigned char *)data + sent, size - sent); cserve2_fd_watch_add(s->write_fd, FD_WRITE, _slave_write_cb, s); } } void _cserve2_slave_proc_send(Slave *s, Slave_Command cmd, const char *data, size_t size) { int ints[2]; ints[0] = size; ints[1] = cmd; _slave_send_aux(s, (char *)ints, sizeof(int) * 2); if (size) _slave_send_aux(s, (char *)data, size); } void _cserve2_slave_thread_send(Slave_Thread *s, Slave_Command cmd, const char *data) { s->tdata->cmddata = data; _slave_send_aux((Slave *)s, (char *)&cmd, sizeof(cmd)); } void cserve2_slave_send(Slave *s, Slave_Command cmd, const char *data, size_t size) { if (s->type == SLAVE_PROCESS) _cserve2_slave_proc_send(s, cmd, data, size); else _cserve2_slave_thread_send((Slave_Thread *)s, cmd, data); } static void _cserve2_slave_proc_kill(Slave_Proc *s) { if (s->killed) { if (!kill(s->pid, 0)) DBG("Slave %p(%d) requested to kill, but it's still alive.", s, s->pid); } s->killed = EINA_TRUE; kill(s->pid, SIGTERM); } void cserve2_slave_kill(Slave *s) { _cserve2_slave_proc_kill((Slave_Proc *)s); } evas-1.7.9/src/bin/evas_cserve2_fonts.c0000664000175000017500000003722312175475547014744 00000000000000#ifdef HAVE_CONFIG_H # include "config.h" #endif #ifdef DEBUG_LOAD_TIME #include #endif #ifdef BUILD_FONT_LOADER_EET #include #endif #include #include FT_FREETYPE_H #include FT_GLYPH_H #include FT_SIZES_H #include FT_TYPES_H #include FT_MODULE_H #include FT_OUTLINE_H #include FT_SYNTHESIS_H #include "evas_cserve2.h" #define CACHESIZE 4 * 1024 /* The tangent of the slant angle we do on runtime. This value was * retrieved from engines/common/evas_font.h */ #define _EVAS_FONT_SLANT_TAN 0.221694663 #define CHECK_CHARS "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" #define MIN_GLYPHS 50 #define MAX_CACHE_SIZE 1 * 1024 * 1024 // 1MB #define EVAS_FONT_ROUND_26_6_TO_INT(x) \ (((x + 0x20) & -0x40) >> 6) static FT_Library cserve2_ft_lib = 0; static int initialised = 0; typedef struct _Font_Info Font_Info; typedef struct _Font_Source_Info Font_Source_Info; struct _Font_Info { Font_Source_Info *fsi; FT_Size size; int real_size; // this is probably useless, not used even on client int fsize; int dpi; int max_h; unsigned int runtime_rend; int shmsize; }; struct _Font_Source_Info { FT_Face face; int orig_upem; int current_size; int current_dpi; void *data; int datasize; }; static void * _font_slave_error_send(Error_Type error) { Error_Type *e = calloc(1, sizeof(*e)); *e = error; return e; } static void _font_slave_size_use(Font_Info *fi) { Font_Source_Info *fsi = fi->fsi; // if ((fsi->current_size != fi->fsize) // || (fsi->current_dpi != fi->dpi)) { FT_Activate_Size(fi->size); fsi->current_size = fi->fsize; fsi->current_dpi = fi->dpi; } } static Font_Source_Info * _font_slave_source_load(const char *file, const char *name) { int error; Font_Source_Info *fsi = calloc(1, sizeof(*fsi)); if (!name) { error = FT_New_Face(cserve2_ft_lib, file, 0, &(fsi->face)); if (error) { free(fsi); return NULL; } } #ifdef BUILD_FONT_LOADER_EET else { Eet_File *ef; void *fdata; int fsize = 0; ef = eet_open(file, EET_FILE_MODE_READ); if (!ef) { free(fsi); return NULL; } fdata = eet_read(ef, name, &fsize); eet_close(ef); if (!fdata) { free(fsi); return NULL; } fsi->data = fdata; fsi->datasize = fsize; error = FT_New_Memory_Face(cserve2_ft_lib, fsi->data, fsi->datasize, 0, &(fsi->face)); if (error) { free(fsi->data); free(fsi); return NULL; } } #endif error = FT_Select_Charmap(fsi->face, ft_encoding_unicode); if (error) { FT_Done_Face(fsi->face); free(fsi->data); free(fsi); return NULL; } fsi->orig_upem = fsi->face->units_per_EM; fsi->current_size = 0; fsi->current_dpi = 0; return fsi; } static Font_Info * _font_slave_int_load(const Slave_Msg_Font_Load *msg, Font_Source_Info *fsi) { int error; int val, dv; int ret; Font_Info *fi = calloc(1, sizeof(*fi)); error = FT_New_Size(fsi->face, &(fi->size)); if (!error) FT_Activate_Size(fi->size); fi->fsize = msg->size; fi->dpi = msg->dpi; fi->real_size = msg->size * 64; fi->fsi = fsi; error = FT_Set_Char_Size(fsi->face, 0, fi->real_size, msg->dpi, msg->dpi); if (error) error = FT_Set_Pixel_Sizes(fsi->face, 0, fi->real_size); if (error) { int i, maxd = 0x7fffffff; int chosen_size = 0; int chosen_size2 = 0; for (i = 0; i < fsi->face->num_fixed_sizes; i++) { int s, cd; s = fsi->face->available_sizes[i].size; cd = chosen_size - fi->real_size; if (cd < 0) cd = -cd; if (cd < maxd) { maxd = cd; chosen_size = s; chosen_size2 = fsi->face->available_sizes[i].y_ppem; if (maxd == 0) break; } } fi->real_size = chosen_size; error = FT_Set_Pixel_Sizes(fsi->face, 0, fi->real_size); if (error) { error = FT_Set_Char_Size(fsi->face, 0, fi->real_size, fi->dpi, fi->dpi); if (error) { /* hack around broken fonts */ fi->real_size = (chosen_size2 / 64) * 60; error = FT_Set_Char_Size(fsi->face, 0, fi->real_size, fi->dpi, fi->dpi); if (error) { ERR("Could not choose the font size for font: '%s:%s'.", msg->file, msg->name); FT_Done_Size(fi->size); free(fi); return NULL; } } } } fi->max_h = 0; val = (int)fsi->face->bbox.yMax; if (fsi->face->units_per_EM != 0) { dv = (fsi->orig_upem * 2048) / fsi->face->units_per_EM; ret = (val * fsi->face->size->metrics.y_scale) / (dv * dv); } else ret = val; fi->max_h += ret; val = -(int)fsi->face->bbox.yMin; if (fsi->face->units_per_EM != 0) { dv = (fsi->orig_upem * 2048) / fsi->face->units_per_EM; ret = (val * fsi->face->size->metrics.y_scale) / (dv * dv); } else ret = val; fi->max_h += ret; fi->runtime_rend = FONT_REND_REGULAR; if ((msg->rend_flags & FONT_REND_SLANT) && !(fsi->face->style_flags & FT_STYLE_FLAG_ITALIC)) fi->runtime_rend |= FONT_REND_SLANT; if ((msg->rend_flags & FONT_REND_WEIGHT) && !(fsi->face->style_flags & FT_STYLE_FLAG_BOLD)) fi->runtime_rend |= FONT_REND_WEIGHT; return fi; } static Slave_Msg_Font_Loaded * _font_slave_load(const void *cmddata, void *data __UNUSED__) { const Slave_Msg_Font_Load *msg = cmddata; Slave_Msg_Font_Loaded *response; Font_Source_Info *fsi; Font_Info *fi; DBG("slave received FONT_LOAD: '%s'", msg->name); fsi = msg->ftdata1; /* Loading Font Source */ if (!fsi) fsi = _font_slave_source_load(msg->file, msg->name); // FIXME: Return correct error message if (!fsi) { ERR("Could not load font source: '%s'", msg->file); return NULL; } fi = _font_slave_int_load(msg, fsi); if (!fi) { if (!msg->ftdata1) cserve2_font_source_ft_free(fsi); return NULL; } response = calloc(1, sizeof(*response)); response->ftdata1 = fsi; response->ftdata2 = fi; return response; } static Shm_Handle * _font_slave_memory_alloc(Font_Info *fi) { Shm_Handle *shm = cserve2_shm_request(fi->shmsize); return shm; } /* This function will load the "index" glyph to the glyph slot of the font. * In order to use or render it, one should access it from the glyph slot, * or get the glyph using FT_Get_Glyph(). */ static Eina_Bool _font_slave_glyph_load(Font_Info *fi, unsigned int idx, unsigned int hint) { Font_Source_Info *fsi = fi->fsi; FT_Error error; const FT_Int32 hintflags[3] = { FT_LOAD_NO_HINTING, FT_LOAD_FORCE_AUTOHINT, FT_LOAD_NO_AUTOHINT }; static FT_Matrix transform = {0x10000, _EVAS_FONT_SLANT_TAN * 0x10000, 0x00000, 0x10000}; error = FT_Load_Glyph(fsi->face, idx, FT_LOAD_DEFAULT | FT_LOAD_NO_BITMAP | hintflags[hint]); if (error) { ERR("Could not load glyph %d", idx); return EINA_FALSE; } /* Transform the outline of Glyph according to runtime_rend. */ if (fi->runtime_rend & FONT_REND_SLANT) FT_Outline_Transform(&fsi->face->glyph->outline, &transform); /* Embolden the outline of Glyph according to rundtime_rend. */ if (fi->runtime_rend & FONT_REND_WEIGHT) FT_GlyphSlot_Embolden(fsi->face->glyph); return EINA_TRUE; } /* This function will render the glyph currently in the glyph slot into the * given Font Cache. */ static Eina_Bool _font_slave_glyph_render(Font_Info *fi, Slave_Msg_Font_Cache *c, unsigned int idx) { Font_Source_Info *fsi = fi->fsi; unsigned int glyphsize; char *cachedata = cserve2_shm_map(c->shm); FT_Glyph glyph; FT_BitmapGlyph bglyph; FT_Get_Glyph(fsi->face->glyph, &glyph); FT_Glyph_To_Bitmap(&glyph, FT_RENDER_MODE_NORMAL, 0, 1); bglyph = (FT_BitmapGlyph)glyph; glyphsize = bglyph->bitmap.pitch * bglyph->bitmap.rows; if (c->usage + glyphsize > cserve2_shm_size_get(c->shm)) { FT_Done_Glyph(glyph); return EINA_FALSE; } memcpy(cachedata + c->usage, bglyph->bitmap.buffer, glyphsize); // TODO: Check if we have problems with alignment c->glyphs[c->nglyphs].index = idx; c->glyphs[c->nglyphs].offset = c->usage; c->glyphs[c->nglyphs].size = glyphsize; c->glyphs[c->nglyphs].rows = bglyph->bitmap.rows; c->glyphs[c->nglyphs].width = bglyph->bitmap.width; c->glyphs[c->nglyphs].pitch = bglyph->bitmap.pitch; c->glyphs[c->nglyphs].num_grays = bglyph->bitmap.num_grays; c->glyphs[c->nglyphs].pixel_mode = bglyph->bitmap.pixel_mode; c->usage += glyphsize; c->nglyphs++; FT_Done_Glyph(glyph); return EINA_TRUE; } static void _font_slave_int_metrics_get(Font_Info *fi, unsigned int hint, unsigned int c, int *width, int *height, int *depth) { unsigned int idx; Font_Source_Info *fsi = fi->fsi; FT_BBox outbox; FT_Glyph glyph; idx = FT_Get_Char_Index(fsi->face, c); if (!idx) goto end; if (!_font_slave_glyph_load(fi, idx, hint)) goto end; FT_Get_Glyph(fsi->face->glyph, &glyph); FT_Glyph_Get_CBox(glyph, ((hint == 0) ? FT_GLYPH_BBOX_UNSCALED : FT_GLYPH_BBOX_GRIDFIT), &outbox); if (width) *width = EVAS_FONT_ROUND_26_6_TO_INT(outbox.xMax - outbox.xMin); if (height) *height = EVAS_FONT_ROUND_26_6_TO_INT(outbox.yMax - outbox.xMin); if (depth) *depth = 1; // FIXME: Do we need to check this? FT_Done_Glyph(glyph); return; end: if (width) *width = 0; if (height) *height = 0; if (depth) *depth = 0; } static unsigned int _font_slave_int_shm_prev_calculate(unsigned int size, unsigned int nglyphs) { unsigned int average = size / nglyphs; unsigned int newsize; newsize = MIN_GLYPHS * average; newsize = cserve2_shm_size_normalize(newsize); if (newsize > MAX_CACHE_SIZE) return MAX_CACHE_SIZE; return newsize; } static unsigned int _font_slave_int_shm_calculate(Font_Info *fi, unsigned int hint) { const char *c; int i; int size = 0; int average; for (c = CHECK_CHARS, i = 0; *c != '\0'; c++, i++) { int w, h, depth; _font_slave_int_metrics_get(fi, hint, *c, &w, &h, &depth); size += w * h * depth; } average = size / i; // average glyph size size = MIN_GLYPHS * average; size = cserve2_shm_size_normalize(size); if (size > MAX_CACHE_SIZE) return MAX_CACHE_SIZE; // Assumes no glyph will be bigger than this return size; } #ifdef DEBUG_LOAD_TIME static int _timeval_sub(const struct timeval *tv2, const struct timeval *tv1) { int t1, t2; t1 = tv1->tv_usec + tv1->tv_sec * 1000000; t2 = tv2->tv_usec + tv2->tv_sec * 1000000; if (t2 > t1) return t2 - t1; return 0; } #endif static Slave_Msg_Font_Glyphs_Loaded * _font_slave_glyphs_load(const void *cmddata, void *data __UNUSED__) { const Slave_Msg_Font_Glyphs_Load *msg = cmddata; Slave_Msg_Font_Glyphs_Loaded *response; Font_Info *fi; unsigned int i; unsigned int total_glyphs = 0; #ifdef DEBUG_LOAD_TIME unsigned int gl_load_time = 0; unsigned int gl_render_time = 0; struct timeval tv_start, tv_end; struct timeval rstart, rfinish; #endif Eina_List *caches = NULL; Slave_Msg_Font_Cache *c = NULL; fi = msg->font.ftdata2; #ifdef DEBUG_LOAD_TIME gettimeofday(&rstart, NULL); #endif _font_slave_size_use(fi); if (msg->cache.shm) { c = malloc(sizeof(*c) + sizeof(Slave_Msg_Glyph) * (msg->glyphs.nglyphs)); c->nglyphs = 0; c->glyphs = (void *)(c + 1); c->shm = msg->cache.shm; c->usage = msg->cache.usage; caches = eina_list_append(caches, c); total_glyphs = msg->cache.nglyphs; } if (!fi->shmsize) fi->shmsize = _font_slave_int_shm_calculate(fi, msg->font.hint); i = 0; while (i < msg->glyphs.nglyphs) { Eina_Bool r = EINA_TRUE; if (!c) { Shm_Handle *shm; shm = _font_slave_memory_alloc(fi); c = malloc(sizeof(*c) + sizeof(Slave_Msg_Glyph) * (msg->glyphs.nglyphs - i)); c->nglyphs = 0; c->glyphs = (void *)(c + 1); c->shm = shm; c->usage = 0; caches = eina_list_append(caches, c); total_glyphs = 0; } #ifdef DEBUG_LOAD_TIME gettimeofday(&tv_start, NULL); #endif if (_font_slave_glyph_load(fi, msg->glyphs.glyphs[i], msg->font.hint)) { #ifdef DEBUG_LOAD_TIME gettimeofday(&tv_end, NULL); gl_load_time += _timeval_sub(&tv_end, &tv_start); // copy the time that we got here to be used as start of render tv_start.tv_sec = tv_end.tv_sec; tv_start.tv_usec = tv_end.tv_usec; #endif r = _font_slave_glyph_render(fi, c, msg->glyphs.glyphs[i]); #ifdef DEBUG_LOAD_TIME gettimeofday(&tv_end, NULL); gl_render_time += _timeval_sub(&tv_end, &tv_start); #endif } if (!r) // SHM is full { fi->shmsize = _font_slave_int_shm_prev_calculate (c->usage, total_glyphs); c = NULL; continue; } i++; total_glyphs++; } response = malloc(sizeof(*response) + sizeof(c) * eina_list_count(caches)); response->ncaches = eina_list_count(caches); response->caches = (void *)(response + 1); i = 0; EINA_LIST_FREE(caches, c) response->caches[i++] = c; #ifdef DEBUG_LOAD_TIME response->gl_load_time = gl_load_time; response->gl_render_time = gl_render_time; gettimeofday(&rfinish, NULL); response->gl_slave_time = _timeval_sub(&rfinish, &rstart); #endif return response; } void * cserve2_font_slave_cb(Slave_Thread_Data *sd __UNUSED__, Slave_Command *cmd, const void *cmddata, void *data) { void *response = NULL; switch (*cmd) { case FONT_LOAD: response = _font_slave_load(cmddata, data); break; case FONT_GLYPHS_LOAD: response = _font_slave_glyphs_load(cmddata, data); break; default: ERR("Invalid command for font slave: %d", *cmd); *cmd = ERROR; return _font_slave_error_send(CSERVE2_INVALID_COMMAND); } if (!response) { *cmd = ERROR; return _font_slave_error_send(CSERVE2_GENERIC); } return response; } void cserve2_font_init(void) { int error; if (initialised++ > 0) return; error = FT_Init_FreeType(&cserve2_ft_lib); if (error) return; #ifdef BUILD_FONT_LOADER_EET eet_init(); #endif } void cserve2_font_shutdown(void) { initialised--; if (initialised > 0) return; if (initialised < 0) { ERR("Invalid shutdown of cserve2 font."); return; } FT_Done_FreeType(cserve2_ft_lib); cserve2_ft_lib = 0; #ifdef BUILD_FONT_LOADER_EET eet_shutdown(); #endif } void cserve2_font_source_ft_free(void *fontsource) { Font_Source_Info *fsi = fontsource; FT_Done_Face(fsi->face); free(fsi->data); free(fsi); } void cserve2_font_ft_free(void *fontinfo) { Font_Info *fi = fontinfo; FT_Done_Size(fi->size); free(fi); } evas-1.7.9/src/bin/evas_cserve2_main.c0000664000175000017500000002245712175475547014542 00000000000000#ifdef HAVE_CONFIG_H # include "config.h" #endif #include #include #include #include "evas_cserve2.h" #ifdef CSERVE2_BIN_DEFAULT_COLOR #undef CSERVE2_BIN_DEFAULT_COLOR #endif #define CSERVE2_BIN_DEFAULT_COLOR EINA_COLOR_BLUE int _evas_cserve2_bin_log_dom = -1; static unsigned int _client_id = 0; static Eina_Hash *client_list = NULL; void cserve2_client_error_send(Client *client, unsigned int rid, int error_code) { int size; Msg_Error msg; // clear the struct with possible paddings, since it is not aligned. memset(&msg, 0, sizeof(msg)); msg.base.rid = rid; msg.base.type = CSERVE2_ERROR; msg.error = error_code; size = sizeof(msg); cserve2_client_send(client, &size, sizeof(size)); cserve2_client_send(client, &msg, sizeof(msg)); } static void _cserve2_client_image_setoptsed(Client *client, unsigned int rid) { int size; Msg_Setoptsed msg; memset(&msg, 0, sizeof(msg)); msg.base.rid = rid; msg.base.type = CSERVE2_SETOPTSED; size = sizeof(msg); cserve2_client_send(client, &size, sizeof(size)); cserve2_client_send(client, &msg, size); } static void _cserve2_client_close(Client *client) { Msg_Close *msg = (Msg_Close *)client->msg.buf; INF("Received CLOSE command: RID=%d", msg->base.rid); INF("File_ID: %d\n", msg->file_id); cserve2_cache_file_close(client, msg->file_id); } static void _cserve2_client_unload(Client *client) { Msg_Unload *msg = (Msg_Unload *)client->msg.buf; INF("Received UNLOAD command: RID=%d", msg->base.rid); INF("Image_ID: %d\n", msg->image_id); cserve2_cache_image_unload(client, msg->image_id); } static void _cserve2_client_preload(Client *client) { Msg_Preload *msg = (Msg_Preload *)client->msg.buf; INF("Received PRELOAD command: RID=%d", msg->base.rid); INF("Image_ID: %d\n", msg->image_id); cserve2_cache_image_preload(client, msg->image_id, msg->base.rid); } static void _cserve2_client_load(Client *client) { Msg_Load *msg = (Msg_Load *)client->msg.buf; INF("Received LOAD command: RID=%d", msg->base.rid); INF("Image_ID: %d\n", msg->image_id); cserve2_cache_image_load(client, msg->image_id, msg->base.rid); } static void _cserve2_client_setopts(Client *client) { Msg_Setopts *msg = (Msg_Setopts *)client->msg.buf; INF("Received SETOPTS command: RID=%d", msg->base.rid); INF("File_ID: %d, Image_ID: %d", msg->file_id, msg->image_id); INF("Load Options:"); INF("\tdpi: %03.1f", msg->opts.dpi); INF("\tsize: %dx%d", msg->opts.w, msg->opts.h); INF("\tscale down: %d", msg->opts.scale_down); INF("\tregion: %d,%d + %dx%d", msg->opts.rx, msg->opts.ry, msg->opts.rw, msg->opts.rh); INF("\torientation: %d\n", msg->opts.orientation); if (cserve2_cache_image_opts_set(client, msg) != 0) return; _cserve2_client_image_setoptsed(client, msg->base.rid); } static void _cserve2_client_open(Client *client) { Msg_Open *msg = (Msg_Open *)client->msg.buf; const char *path, *key; path = ((const char *)msg) + sizeof(*msg) + msg->path_offset; key = ((const char *)msg) + sizeof(*msg) + msg->key_offset; INF("Received OPEN command: RID=%d", msg->base.rid); INF("File_ID: %d, path=\"%s\", key=\"%s\"\n", msg->file_id, path, key); cserve2_cache_file_open(client, msg->file_id, path, key, msg->base.rid); } static void _cserve2_client_font_load(Client *client) { Msg_Font_Load *msg = (Msg_Font_Load *)client->msg.buf; char name[PATH_MAX], source[PATH_MAX], *buf; buf = ((char *)msg) + sizeof(*msg); memcpy(source, buf, msg->sourcelen); buf += msg->sourcelen; memcpy(name, buf, msg->pathlen); INF("Received %s command: RID=%d", (msg->base.type == CSERVE2_FONT_LOAD) ? "FONT_LOAD" : "FONT_UNLOAD", msg->base.rid); INF("Font: %s, rend_flags: %d, size: %d, dpi: %d", name, msg->rend_flags, msg->size, msg->dpi); if (msg->base.type == CSERVE2_FONT_LOAD) cserve2_cache_font_load(client, source, msg->sourcelen, name, msg->pathlen, msg->rend_flags, msg->size, msg->dpi, msg->base.rid); else cserve2_cache_font_unload(client, source, msg->sourcelen, name, msg->pathlen, msg->rend_flags, msg->size, msg->dpi, msg->base.rid); } static void _cserve2_client_font_glyphs_request(Client *client) { Msg_Font_Glyphs_Request *msg = (Msg_Font_Glyphs_Request *)client->msg.buf; char source[PATH_MAX], fontpath[PATH_MAX], *buf; unsigned int *glyphs; buf = ((char *)msg) + sizeof(*msg); memcpy(source, buf, msg->sourcelen); buf += msg->sourcelen; memcpy(fontpath, buf, msg->pathlen); buf += msg->pathlen; glyphs = malloc(sizeof(*glyphs) * msg->nglyphs); memcpy(glyphs, buf, sizeof(*glyphs) * msg->nglyphs); if (msg->base.type == CSERVE2_FONT_GLYPHS_LOAD) { INF("Received CSERVE2_FONT_GLYPHS_LOAD command: RID=%d", msg->base.rid); cserve2_cache_font_glyphs_load(client, source, msg->sourcelen, fontpath, msg->pathlen, msg->hint, msg->rend_flags, msg->size, msg->dpi, glyphs, msg->nglyphs, msg->base.rid); } else { INF("Received CSERVE2_FONT_GLYPHS_USED command: RID=%d", msg->base.rid); cserve2_cache_font_glyphs_used(client, source, msg->sourcelen, fontpath, msg->pathlen, msg->hint, msg->rend_flags, msg->size, msg->dpi, glyphs, msg->nglyphs, msg->base.rid); } } static void _cserve2_client_stats_request(Client *client) { Msg_Base *msg = (Msg_Base *)client->msg.buf; cserve2_cache_stats_get(client, msg->rid); } static void _cserve2_client_font_debug_request(Client *client) { Msg_Base *msg = (Msg_Base *)client->msg.buf; cserve2_cache_font_debug(client, msg->rid); } void cserve2_command_run(Client *client, Message_Type type) { switch (type) { case CSERVE2_OPEN: _cserve2_client_open(client); break; case CSERVE2_SETOPTS: _cserve2_client_setopts(client); break; case CSERVE2_LOAD: _cserve2_client_load(client); break; case CSERVE2_PRELOAD: _cserve2_client_preload(client); break; case CSERVE2_UNLOAD: _cserve2_client_unload(client); break; case CSERVE2_CLOSE: _cserve2_client_close(client); break; case CSERVE2_FONT_LOAD: case CSERVE2_FONT_UNLOAD: _cserve2_client_font_load(client); break; case CSERVE2_FONT_GLYPHS_LOAD: case CSERVE2_FONT_GLYPHS_USED: _cserve2_client_font_glyphs_request(client); break; case CSERVE2_STATS: _cserve2_client_stats_request(client); break; case CSERVE2_FONT_DEBUG: _cserve2_client_font_debug_request(client); break; default: WRN("Unhandled message"); } } void cserve2_client_accept(int fd) { Client *client = calloc(1, sizeof(*client)); client->socket = fd; client->id = _client_id++; while (eina_hash_find(client_list, &client->id)) client->id = _client_id++; if (!eina_hash_add(client_list, &client->id, client)) { Eina_Error err = eina_error_get(); ERR("Could not add client to the list: \"%s\"", eina_error_msg_get(err)); free(client); close(fd); } cserve2_fd_watch_add(fd, FD_READ | FD_ERROR, cserve2_message_handler, client); INF("Client %d connection accepted.", client->id); cserve2_cache_client_new(client); } void cserve2_client_del(Client *client) { eina_hash_del_by_key(client_list, &client->id); } static void _client_free(void *data) { Client *client = data; cserve2_cache_client_del(client); if (client->msg.pending) eina_binbuf_free(client->msg.pending); cserve2_fd_watch_del(client->socket); close(client->socket); free(data); } static void _clients_setup(void) { client_list = eina_hash_int32_new(_client_free); } static void _clients_finish(void) { eina_hash_free(client_list); } int main(int argc __UNUSED__, const char *argv[] __UNUSED__) { eina_init(); _evas_cserve2_bin_log_dom = eina_log_domain_register ("evas_cserve2_bin", CSERVE2_BIN_DEFAULT_COLOR); if (_evas_cserve2_bin_log_dom < 0) { EINA_LOG_ERR("impossible to create a log domain."); eina_shutdown(); exit(1); } if (!cserve2_main_loop_setup()) { ERR("could not setup main loop."); goto error; } if (!cserve2_slaves_init()) { ERR("Could not init slaves subsystem."); goto error; } cserve2_requests_init(); cserve2_font_init(); cserve2_cache_init(); _clients_setup(); cserve2_main_loop_run(); _clients_finish(); cserve2_cache_shutdown(); cserve2_font_shutdown(); cserve2_requests_shutdown(); cserve2_slaves_shutdown(); cserve2_main_loop_finish(); eina_log_domain_unregister(_evas_cserve2_bin_log_dom); eina_shutdown(); return 0; error: eina_log_domain_unregister(_evas_cserve2_bin_log_dom); eina_shutdown(); exit(1); } evas-1.7.9/src/bin/evas_cserve2_main_loop_linux.c0000664000175000017500000004250312175475547017004 00000000000000#ifdef HAVE_CONFIG_H # include "config.h" #endif #include "evas_cserve2.h" #include #include #include #include #include #include #include #include #include #include #include #include #include #define MAX_EPOLL_EVENTS 10 #define MAX_INCOMING_CONN 10 struct _Watch_Data { int fd; Fd_Flags flags; Fd_Watch_Cb callback; const void *user_data; Eina_Bool deleted : 1; }; typedef struct _Watch_Data Watch_Data; struct _Inotify_Data { EINA_INLIST; const char *path; int watchid; File_Change_Cb cb; const void *data; }; typedef struct _Inotify_Data Inotify_Data; static int epoll_fd = -1; static int signal_fd = -1; static int socket_fd = -1; static int inotify_fd = -1; static struct sockaddr_un socket_local; static Eina_Hash *watch_list; static Eina_List *deleted_watch_list; static Eina_Hash *inotify_path_hash; static Eina_Hash *inotify_id_hash; static Eina_Bool running; static Eina_Bool terminate; static int timeout = -1; // in miliseconds static long timeout_time = 0; // in miliseconds static Timeout_Cb timeout_func = NULL; static Main_Loop_Child_Dead_Cb reap_children_func = NULL; #ifndef UNIX_PATH_MAX #define UNIX_PATH_MAX sizeof(socket_local.sun_path) #endif static void _signal_handle_child(struct signalfd_siginfo *sinfo __UNUSED__) { int status; pid_t pid; while ((pid = waitpid(0, &status, WNOHANG)) > 0) { if (reap_children_func) { reap_children_func(pid, status); continue; } DBG("Received SIGCHLD and no handler is set."); if (WIFEXITED(status)) DBG("Child '%d' exited with status '%d'.", pid, WEXITSTATUS(status)); else if (WIFSIGNALED(status)) DBG("Child '%d' exited with signal '%d'.", pid, WTERMSIG(status)); } } static void _signal_handle_int(struct signalfd_siginfo *sinfo __UNUSED__) { DBG("Received SIGINT. Honoring request."); terminate = EINA_TRUE; } static void _signal_handle_term(struct signalfd_siginfo *sinfo __UNUSED__) { DBG("Received SIGTERM. Honoring request."); terminate = EINA_TRUE; } static void _signalfd_handler(int fd, Fd_Flags flags __UNUSED__, void *data __UNUSED__) { struct signalfd_siginfo sinfo; ssize_t ret; for (;;) { ret = read(fd, &sinfo, sizeof(struct signalfd_siginfo)); if (ret == -1) { if (errno == EAGAIN) break; ERR("Error reading from signal fd: %m."); return; } switch(sinfo.ssi_signo) { case SIGCHLD: _signal_handle_child(&sinfo); break; case SIGINT: _signal_handle_int(&sinfo); break; case SIGTERM: _signal_handle_term(&sinfo); break; default: ERR("Caught unexpected signal '%d'.", sinfo.ssi_signo); } } } static int _signalfd_setup(void) { sigset_t mask; sigemptyset(&mask); sigaddset(&mask, SIGCHLD); sigaddset(&mask, SIGINT); sigaddset(&mask, SIGTERM); if (sigprocmask(SIG_BLOCK, &mask, NULL) == -1) { ERR("Could not set mask of handled signals."); return -1; } signal_fd = signalfd(-1, &mask, SFD_NONBLOCK | SFD_CLOEXEC); if (signal_fd == -1) ERR("Could not create file descriptor from signalfd."); /* ignore SIGPIPE so it's handled by write() and send() as needed */ signal(SIGPIPE, SIG_IGN); return signal_fd; } static void _signalfd_finish(void) { sigset_t mask; cserve2_fd_watch_del(signal_fd); sigemptyset(&mask); sigprocmask(SIG_BLOCK, NULL, &mask); close(signal_fd); sigprocmask(SIG_UNBLOCK, &mask, NULL); signal(SIGPIPE, SIG_DFL); } static void _socketfd_handler(int fd __UNUSED__, Fd_Flags flags __UNUSED__, void *data __UNUSED__) { struct sockaddr_un remote; unsigned int len; int s; len = sizeof(struct sockaddr_un); s = accept(socket_fd, &remote, &len); if (s == -1) { ERR("Could not accept socket: \"%s\"", strerror(errno)); return; } /* TODO: when porting to windows, do: * SetHandleInformation(s, HANDLE_FLAG_INHERIT, 0) */ fcntl(s, F_SETFD, FD_CLOEXEC); cserve2_client_accept(s); } static void _socket_path_set(char *path) { char *env; char buf[UNIX_PATH_MAX]; env = getenv("EVAS_CSERVE2_SOCKET"); if (env && env[0]) { strncpy(path, env, UNIX_PATH_MAX - 1); return; } snprintf(buf, sizeof(buf), "/tmp/.evas-cserve2-%x.socket", (int)getuid()); /* FIXME: check we can actually create this socket */ strcpy(path, buf); return; #if 0 env = getenv("XDG_RUNTIME_DIR"); if (!env || !env[0]) { env = getenv("HOME"); if (!env || !env[0]) { env = getenv("TMPDIR"); if (!env || !env[0]) env = "/tmp"; } } snprintf(buf, sizeof(buf), "%s/evas-cserve2-%x.socket", env, getuid()); /* FIXME: check we can actually create this socket */ strcpy(path, buf); #endif } static int _socketfd_setup(void) { int s; int len; s = socket(AF_UNIX, SOCK_STREAM | SOCK_CLOEXEC, 0); if (s == -1) { ERR("Could not create socketfd: \"%s\"", strerror(errno)); return -1; } socket_local.sun_family = AF_UNIX; _socket_path_set(socket_local.sun_path); DBG("Using '%s' as server socket.", socket_local.sun_path); unlink(socket_local.sun_path); len = strlen(socket_local.sun_path) + sizeof(socket_local.sun_family); if (bind(s, (struct sockaddr *)&socket_local, len) == -1) { ERR("Could not bind socketfd: \"%s\"", strerror(errno)); close(s); return -1; } if (listen(s, MAX_INCOMING_CONN) == -1) { ERR("Could not listen on socketfd: \"%s\"", strerror(errno)); close(s); unlink(socket_local.sun_path); return -1; } socket_fd = s; return s; } static void _socketfd_finish(void) { close(socket_fd); unlink(socket_local.sun_path); } static void _inotifyfd_handler(int fd, Fd_Flags flags, void *data __UNUSED__) { char buffer[16384]; int i = 0; ssize_t size; if (flags & FD_ERROR) { ERR("Error on inotify file handler, what to do?"); return; } size = read(fd, buffer, sizeof(buffer)); while (i < size) { struct inotify_event *event; int event_size; Eina_Inlist *ids, *itr; Inotify_Data *id; Eina_Bool deleted; event = (struct inotify_event *)&buffer[i]; event_size = sizeof(struct inotify_event) + event->len; i += event_size; ids = eina_hash_find(inotify_id_hash, &event->wd); if (!ids) continue; deleted = !!(event->mask & (IN_DELETE_SELF | IN_MOVE_SELF | IN_IGNORED | IN_UNMOUNT)); EINA_INLIST_FOREACH_SAFE(ids, itr, id) id->cb(id->path, deleted, (void *)id->data); } } static void _inotify_id_hash_free_cb(void *data) { Eina_Inlist *list = data; while (list) { Inotify_Data *id; id = EINA_INLIST_CONTAINER_GET(list, Inotify_Data); list = eina_inlist_remove(list, list); eina_stringshare_del(id->path); free(id); } } static int _inotifyfd_setup(void) { inotify_fd = inotify_init1(IN_NONBLOCK | IN_CLOEXEC); if (inotify_fd == -1) { ERR("Could not create inotifyfd: \"%s\"", strerror(errno)); return -1; } inotify_path_hash = eina_hash_string_superfast_new(NULL); inotify_id_hash = eina_hash_int32_new(_inotify_id_hash_free_cb); return inotify_fd; } static void _inotifyfd_finish(void) { close(inotify_fd); eina_hash_free(inotify_path_hash); eina_hash_free(inotify_id_hash); } static void _watch_data_free_cb(void *data) { Watch_Data *wd = data; wd->deleted = EINA_TRUE; deleted_watch_list = eina_list_append(deleted_watch_list, wd); } Eina_Bool cserve2_main_loop_setup(void) { int sfd; int sock; int ifd; epoll_fd = epoll_create1(EPOLL_CLOEXEC); if (epoll_fd < 0) { ERR("Could not create epoll fd."); return EINA_FALSE; } watch_list = eina_hash_int32_new(_watch_data_free_cb); if (!watch_list) { ERR("Could not create watch list hash struct."); close(epoll_fd); return EINA_FALSE; } sfd = _signalfd_setup(); if (sfd == -1) { ERR("Could not setup signalfd."); close(epoll_fd); eina_hash_free(watch_list); return EINA_FALSE; } DBG("Add watch for signal fd: %d", sfd); if (!cserve2_fd_watch_add(sfd, FD_READ, _signalfd_handler, NULL)) { ERR("Could not add watch for signalfd."); close(sfd); close(epoll_fd); eina_hash_free(watch_list); return EINA_FALSE; } sock = _socketfd_setup(); if (sock == -1) { ERR("Could not setup socketfd."); goto error_socket; } DBG("Add watch for socket fd: %d", sock); if (!cserve2_fd_watch_add(sock, FD_READ, _socketfd_handler, NULL)) { ERR("Could not add watch for socketf."); close(sock); goto error_socket; } ifd = _inotifyfd_setup(); if (ifd == -1) { ERR("Could not setup inotify."); goto error_inotify; } DBG("Add watch for inotify fd: %d", ifd); if (!cserve2_fd_watch_add(ifd, FD_READ, _inotifyfd_handler, NULL)) { ERR("Could not add watch for inotifyfd."); close(ifd); goto error_inotify; } return EINA_TRUE; error_inotify: _socketfd_finish(); error_socket: close(sfd); close(epoll_fd); eina_hash_free(watch_list); return EINA_FALSE; } void cserve2_main_loop_finish(void) { Watch_Data *wd; _socketfd_finish(); _signalfd_finish(); _inotifyfd_finish(); eina_hash_free(watch_list); EINA_LIST_FREE(deleted_watch_list, wd) free(wd); close(epoll_fd); } Eina_Bool cserve2_fd_watch_add(int fd, Fd_Flags flags, Fd_Watch_Cb cb, const void *data) { Watch_Data *w_data; struct epoll_event ev; int err; DBG("Add watch for fd %d, flags = 0x%x", fd, flags); if ((fd < 0) || (!cb)) { ERR("Can't add watch: fd = %d, callback = %p", fd, cb); return EINA_FALSE; } w_data = calloc(1, sizeof(*w_data)); w_data->fd = fd; w_data->flags = flags; w_data->callback = cb; w_data->user_data = data; if (!eina_hash_add(watch_list, &fd, w_data)) { ERR("Could not add watch for fd %d to the hash.", fd); free(w_data); return EINA_FALSE; } memset(&ev, 0, sizeof(ev)); if (flags & FD_READ) ev.events |= EPOLLIN; if (flags & FD_WRITE) ev.events |= EPOLLOUT; ev.data.ptr = w_data; err = epoll_ctl(epoll_fd, EPOLL_CTL_ADD, fd, &ev); if (!err < 0) { ERR("Could not create epoll watch for fd %d.", fd); eina_hash_del(watch_list, &fd, NULL); return EINA_FALSE; } return EINA_TRUE; } Eina_Bool cserve2_fd_watch_flags_set(int fd, Fd_Flags flags) { Watch_Data *w_data; struct epoll_event ev; int err; DBG("Set watch flags for fd %d, flags = 0x%x", fd, flags); if (fd < 0) { ERR("Can't modify watch: fd = %d", fd); return EINA_FALSE; } w_data = eina_hash_find(watch_list, &fd); if (!w_data) { ERR("Couldn't find data for fd %d: not being watched.", fd); return EINA_FALSE; } if (flags == w_data->flags) return EINA_TRUE; memset(&ev, 0, sizeof(ev)); if (flags & FD_READ) ev.events |= EPOLLIN; if (flags & FD_WRITE) ev.events |= EPOLLOUT; ev.data.ptr = w_data; err = epoll_ctl(epoll_fd, EPOLL_CTL_MOD, fd, &ev); if (err < 0) { ERR("Could not modify epoll watch for fd: %d", fd); return EINA_FALSE; } return EINA_TRUE; } Eina_Bool cserve2_fd_watch_flags_get(int fd, Fd_Flags *flags) { Watch_Data *w_data; if (fd < 0) { ERR("Can't get flags for watch: fd = %d", fd); return EINA_FALSE; } w_data = eina_hash_find(watch_list, &fd); if (!w_data) { ERR("Couldn't find data for fd: %d. Is it really being watched?", fd); return EINA_FALSE; } *flags = w_data->flags; return EINA_TRUE; } Eina_Bool cserve2_fd_watch_del(int fd) { int err; DBG("Remove watch for fd %d", fd); if (fd < 0) return EINA_FALSE; if (!eina_hash_del(watch_list, &fd, NULL)) ERR("Could not remove watch for fd %d from watch list hash.", fd); err = epoll_ctl(epoll_fd, EPOLL_CTL_DEL, fd, NULL); if (err < 0) { ERR("Could not remove epoll watch for fd %d.", fd); return EINA_FALSE; } return EINA_TRUE; } Eina_Bool cserve2_file_change_watch_add(const char *path, File_Change_Cb cb, const void *data) { Inotify_Data *id; Eina_Inlist *ids; unsigned int mask = IN_ATTRIB | IN_DELETE_SELF | IN_MODIFY | IN_MOVE_SELF; id = eina_hash_find(inotify_path_hash, path); if (id) { ERR("Attempt to watch changes for path '%s', which is already " "being watched.", path); return EINA_FALSE; } id = calloc(1, sizeof(Inotify_Data)); if (!id) { ERR("Could not alloc Inotify_Data instance."); return EINA_FALSE; } id->watchid = inotify_add_watch(inotify_fd, path, mask); if (id->watchid == -1) { ERR("Could not add inotify watch for %s: %m.", path); free(id); return EINA_FALSE; } id->path = eina_stringshare_add(path); id->cb = cb; id->data = data; eina_hash_direct_add(inotify_path_hash, id->path, id); ids = eina_hash_find(inotify_id_hash, &id->watchid); ids = eina_inlist_append(ids, EINA_INLIST_GET(id)); eina_hash_set(inotify_id_hash, &id->watchid, ids); return EINA_TRUE; } Eina_Bool cserve2_file_change_watch_del(const char *path) { Inotify_Data *id; Eina_Inlist *ids; int wd; id = eina_hash_set(inotify_path_hash, path, NULL); if (!id) { ERR("Requested to remove change watch for %s, but it's not being " "watched.", path); return EINA_FALSE; } ids = eina_hash_find(inotify_id_hash, &id->watchid); ids = eina_inlist_remove(ids, EINA_INLIST_GET(id)); eina_hash_set(inotify_id_hash, &id->watchid, ids); wd = id->watchid; eina_stringshare_del(id->path); free(id); if (!ids) { if (inotify_rm_watch(inotify_fd, wd) == -1) { ERR("Could not remove change watch for %s: %m", path); return EINA_FALSE; } } return EINA_TRUE; } static void _update_timeout(void) { struct timeval timev; long cur_time; if (timeout <= 0) return; gettimeofday(&timev, NULL); cur_time = timev.tv_sec * 1000 + timev.tv_usec / 1000; timeout -= cur_time - timeout_time; timeout_time = cur_time; if (timeout < 0) timeout = 0; } void cserve2_timeout_cb_set(int t, Timeout_Cb cb) { struct timeval timev; if (cb && t <= 0) { ERR("timeout must be a value greater than 0 to set a callback." " given timeout: %d miliseconds", t); return; } if (!cb) { DBG("Removing timeout callback."); timeout = -1; cb = NULL; return; } //DBG("Setting timeout to: %d miliseconds", t); gettimeofday(&timev, NULL); timeout_time = timev.tv_sec * 1000 + timev.tv_usec / 1000; timeout = t; timeout_func = cb; } void cserve2_on_child_dead_set(Main_Loop_Child_Dead_Cb cb) { reap_children_func = cb; } void cserve2_main_loop_run(void) { running = EINA_TRUE; terminate = EINA_FALSE; for (;;) { struct epoll_event events[MAX_EPOLL_EVENTS]; int n, nfds; Watch_Data *data; if (terminate) break; nfds = epoll_wait(epoll_fd, events, MAX_EPOLL_EVENTS, timeout); if (nfds < 0) { ERR("An error occurred when reading the epoll fd."); ERR("%s", strerror(errno)); break; } if (nfds == 0) // timeout occurred { timeout = -1; if (!timeout_func) ERR("Timeout expired, but no timeout function set."); else timeout_func(); } for (n = 0; n < nfds; n++) { data = events[n].data.ptr; Fd_Flags flags = 0; if (!data) continue; if (data->deleted) continue; if (!data->callback) continue; if (events[n].events & EPOLLIN) flags |= FD_READ; if (events[n].events & EPOLLOUT) flags |= FD_WRITE; if (events[n].events & EPOLLERR) flags |= FD_ERROR; data->callback(data->fd, flags, (void *)data->user_data); } EINA_LIST_FREE(deleted_watch_list, data) free(data); _update_timeout(); } running = EINA_FALSE; } ssize_t cserve2_client_read(Client *client, void *buf, size_t len) { return recv(client->socket, buf, len, MSG_DONTWAIT); } ssize_t cserve2_client_write(Client *client, const void *data, size_t size) { return send(client->socket, data, size, MSG_NOSIGNAL | MSG_DONTWAIT); } evas-1.7.9/src/bin/evas_cserve2_utils.c0000664000175000017500000000227412175475547014751 00000000000000#include "evas_cserve2_slave.h" static unsigned int evas_cserve2_convert_argb_premul(unsigned int *data, unsigned int len) { unsigned int *de = data + len; unsigned int nas = 0; while (data < de) { unsigned int a = 1 + (*data >> 24); *data = (*data & 0xff000000) + (((((*data) >> 8) & 0xff) * a) & 0xff00) + (((((*data) & 0x00ff00ff) * a) >> 8) & 0x00ff00ff); data++; if ((a == 1) || (a == 256)) nas++; } return nas; } EAPI void evas_cserve2_image_premul(Evas_Img_Load_Params *ilp) { unsigned int nas; if (!ilp->alpha) return; nas = evas_cserve2_convert_argb_premul(ilp->buffer, ilp->w * ilp->h); if ((ALPHA_SPARSE_INV_FRACTION * nas) >= (ilp->w * ilp->h)) ilp->alpha_sparse = EINA_TRUE; } EAPI void evas_cserve2_imave_alpha_sparse_set(Evas_Img_Load_Params *ilp) { unsigned int *s, *se; unsigned int nas = 0; unsigned int len = ilp->w * ilp->h; if (!ilp->alpha) return; s = ilp->buffer; se = s + len; while (s < se) { unsigned int p = *s & 0xff000000; if (!p || (p == 0xff000000)) nas++; s++; } if ((ALPHA_SPARSE_INV_FRACTION * nas) >= len) ilp->alpha_sparse = EINA_TRUE; } evas-1.7.9/src/bin/evas_cserve2_shm.c0000664000175000017500000000677712175475547014414 00000000000000#ifdef HAVE_CONFIG_H # include "config.h" #endif #include "evas_cserve2.h" #include #include #include #include #include struct _Shm_Mapping { const char *name; size_t length; Eina_Inlist *segments; }; typedef struct _Shm_Mapping Shm_Mapping; struct _Shm_Handle { EINA_INLIST; Shm_Mapping *mapping; off_t map_offset; off_t image_offset; size_t map_size; size_t image_size; int refcount; void *data; }; static int id = 0; size_t cserve2_shm_size_normalize(size_t size) { long pagesize; size_t normalized; pagesize = sysconf(_SC_PAGESIZE); if (pagesize < 1) { ERR("sysconf() reported weird value for PAGESIZE, assuming 4096."); pagesize = 4096; } normalized = ((size + pagesize - 1) / pagesize) * pagesize; return normalized; } Shm_Handle * cserve2_shm_request(size_t size) { Shm_Mapping *map; Shm_Handle *shm; char shmname[NAME_MAX]; size_t map_size; int fd; map = calloc(1, sizeof(Shm_Mapping)); if (!map) { ERR("Failed to allocate mapping handler."); return NULL; } do { snprintf(shmname, sizeof(shmname), "/evas-shm-img-%d", id++); fd = shm_open(shmname, O_RDWR | O_CREAT | O_EXCL, S_IRUSR | S_IWUSR); if (fd == -1 && errno != EEXIST) { ERR("Failed to create shared memory object '%s': %m", shmname); free(map); return NULL; } } while (fd == -1); map_size = cserve2_shm_size_normalize(size); if (ftruncate(fd, map_size) == -1) { ERR("Failed to set size of shared file: %m"); close(fd); free(map); return NULL; } close(fd); map->name = eina_stringshare_add(shmname); map->length = map_size; shm = calloc(1, sizeof(Shm_Handle)); if (!shm) { ERR("Failed to allocate shared memory handler."); eina_stringshare_del(map->name); free(map); return NULL; } map->segments = eina_inlist_append(map->segments, EINA_INLIST_GET(shm)); shm->mapping = map; shm->map_offset = 0; shm->image_offset = 0; shm->image_size = size; shm->map_size = map_size; return shm; } void cserve2_shm_unref(Shm_Handle *shm) { Shm_Mapping *map = shm->mapping; map->segments = eina_inlist_remove(map->segments, EINA_INLIST_GET(shm)); if (shm->data) munmap(shm->data, shm->image_size); free(shm); if (map->segments) return; shm_unlink(map->name); eina_stringshare_del(map->name); free(map); } const char * cserve2_shm_name_get(const Shm_Handle *shm) { return shm->mapping->name; } off_t cserve2_shm_map_offset_get(const Shm_Handle *shm) { return shm->map_offset; } off_t cserve2_shm_offset_get(const Shm_Handle *shm) { return shm->image_offset; } size_t cserve2_shm_map_size_get(const Shm_Handle *shm) { return shm->map_size; } size_t cserve2_shm_size_get(const Shm_Handle *shm) { return shm->image_size; } void * cserve2_shm_map(Shm_Handle *shm) { int fd; const char *name; if (shm->refcount++) return shm->data; name = cserve2_shm_name_get(shm); fd = shm_open(name, O_RDWR, S_IWUSR); if (fd == -1) return MAP_FAILED; shm->data = mmap(NULL, shm->image_size, PROT_WRITE, MAP_SHARED, fd, shm->image_offset); close(fd); return shm->data; } void cserve2_shm_unmap(Shm_Handle *shm) { if (--shm->refcount) return; munmap(shm->data, shm->image_size); shm->data = NULL; } evas-1.7.9/src/bin/evas_cserve2_usage.c0000664000175000017500000001306112175475547014711 00000000000000#include "config.h" #include #include #include #include #include #include #include #include #include #include #include "evas_cs2.h" static int socketfd = -1; static unsigned int _rid_count = 1; static int _evas_cserve2_usage_log_dom = -1; static struct sockaddr_un socksize; #ifndef UNIX_PATH_MAX #define UNIX_PATH_MAX sizeof(socksize.sun_path) #endif #ifdef ERR #undef ERR #endif #define ERR(...) EINA_LOG_DOM_ERR(_evas_cserve2_usage_log_dom, __VA_ARGS__) #ifdef DBG #undef DBG #endif #define DBG(...) EINA_LOG_DOM_DBG(_evas_cserve2_usage_log_dom, __VA_ARGS__) #ifdef WRN #undef WRN #endif #define WRN(...) EINA_LOG_DOM_WARN(_evas_cserve2_usage_log_dom, __VA_ARGS__) #ifdef INF #undef INF #endif #define INF(...) EINA_LOG_DOM_INFO(_evas_cserve2_usage_log_dom, __VA_ARGS__) static void _socket_path_set(char *path) { char *env; char buf[UNIX_PATH_MAX]; env = getenv("EVAS_CSERVE2_SOCKET"); if (env && env[0]) { strncpy(path, env, UNIX_PATH_MAX - 1); return; } snprintf(buf, sizeof(buf), "/tmp/.evas-cserve2-%x.socket", (int)getuid()); /* FIXME: check we can actually create this socket */ strcpy(path, buf); } static Eina_Bool _server_connect(void) { int s, len; struct sockaddr_un remote; if ((s = socket(AF_UNIX, SOCK_STREAM, 0)) == -1) { ERR("socket"); return EINA_FALSE; } remote.sun_family = AF_UNIX; _socket_path_set(remote.sun_path); len = strlen(remote.sun_path) + sizeof(remote.sun_family); if (connect(s, (struct sockaddr *)&remote, len) == -1) { ERR("connect"); return EINA_FALSE; } fcntl(s, F_SETFL, O_NONBLOCK); socketfd = s; DBG("connected to cserve2 server."); return EINA_TRUE; } static void _server_disconnect(void) { close(socketfd); socketfd = -1; } static Eina_Bool _server_send(const void *data, int size) { int sent = 0; ssize_t ret; const char *msg = data; while (sent < size) { ret = send(socketfd, msg + sent, size - sent, MSG_NOSIGNAL); if (ret < 0) { if ((errno == EAGAIN) || (errno == EINTR)) continue; return EINA_FALSE; } sent += ret; } return EINA_TRUE; } static int sr_size = 0; static int sr_got = 0; static char *sr_buf = NULL; static void * _server_read(int *size) { int n; void *ret; if (sr_size) goto get_data; n = recv(socketfd, &sr_size, sizeof(sr_size), 0); if (n < 0) return NULL; sr_buf = malloc(sr_size); get_data: n = recv(socketfd, sr_buf + sr_got, sr_size - sr_got, 0); if (n < 0) return NULL; sr_got += n; if (sr_got < sr_size) return NULL; *size = sr_size; sr_size = 0; sr_got = 0; ret = sr_buf; sr_buf = NULL; return ret; } static void _usage_msg_send(void) { Msg_Base msg; int size; memset(&msg, 0, sizeof(msg)); msg.type = CSERVE2_STATS; msg.rid = _rid_count++; size = sizeof(msg); if (!_server_send(&size, sizeof(size))) { ERR("Could not send usage msg size to server."); return; } if (!_server_send(&msg, size)) { ERR("Could not send usage msg body to server."); return; } } static void _usage_msg_read(void) { Msg_Stats *msg = NULL; int size; printf("Requesting server statistics.\n\n"); while (!msg) msg = _server_read(&size); if (msg->base.type != CSERVE2_STATS) { ERR("Invalid message received from server." "Something went badly wrong."); return; } printf("Printing server usage.\n"); printf("======================\n\n"); printf("\nImage Usage Statistics:\n"); printf("----------------------\n\n"); printf("Image headers usage: %d bytes\n", msg->images.files_size); printf("Image data requested: %d kbytes\n", msg->images.requested_size / 1024); printf("Image data usage: %d kbytes\n", msg->images.images_size / 1024); printf("Image data unused: %d kbytes\n", msg->images.unused_size / 1024); printf("Image headers load time: %dus\n", msg->images.files_load_time); printf("Image headers saved time: %dus\n", msg->images.files_saved_time); printf("Image data load time: %dus\n", msg->images.images_load_time); printf("Image data saved time: %dus\n", msg->images.images_saved_time); printf("\nFont Usage Statistics:\n"); printf("----------------------\n\n"); printf("Requested usage: %d bytes\n", msg->fonts.requested_size); printf("Real usage: %d bytes\n", msg->fonts.real_size); printf("Unused size: %d bytes\n", msg->fonts.unused_size); printf("Fonts load time: %dus\n", msg->fonts.fonts_load_time); printf("Fonts used load time: %dus\n", msg->fonts.fonts_used_load_time); printf("Fonts used saved time: %dus\n", msg->fonts.fonts_used_saved_time); printf("Glyphs load time: %dus\n", msg->fonts.glyphs_load_time); printf("Glyphs render time: %dus\n", msg->fonts.glyphs_render_time); printf("Glyphs saved time: %dus\n", msg->fonts.glyphs_saved_time); printf("Glyphs request time: %dus\n", msg->fonts.glyphs_request_time); printf("Glyphs slave time: %dus\n", msg->fonts.glyphs_slave_time); printf("\n"); } int main(void) { eina_init(); _evas_cserve2_usage_log_dom = eina_log_domain_register ("evas_cserve2_usage", EINA_COLOR_BLUE); if (!_server_connect()) { ERR("Could not connect to server."); return -1; } _usage_msg_send(); _usage_msg_read(); _server_disconnect(); eina_shutdown(); } evas-1.7.9/src/bin/evas_cserve2_slave.c0000664000175000017500000002575012175475547014727 00000000000000#ifdef HAVE_CONFIG_H # include "config.h" #endif #include #include #include #include #include #include #include #include "evas_cserve2.h" #include "evas_cserve2_slave.h" static Eina_Hash *loaders = NULL; static Eina_List *modules = NULL; struct ext_loader_s { unsigned int length; const char *extension; const char *loader; }; #define MATCHING(Ext, Module) \ { sizeof (Ext), Ext, Module } static const struct ext_loader_s map_loaders[] = { /* map extensions to loaders to use for good first-guess tries */ MATCHING(".png", "png"), MATCHING(".jpg", "jpeg"), MATCHING(".jpeg", "jpeg"), MATCHING(".jfif", "jpeg"), MATCHING(".eet", "eet"), MATCHING(".edj", "eet"), MATCHING(".eap", "eet"), MATCHING(".edb", "edb"), MATCHING(".xpm", "xpm"), MATCHING(".tiff", "tiff"), MATCHING(".tif", "tiff"), MATCHING(".svg", "svg"), MATCHING(".svgz", "svg"), MATCHING(".svg.gz", "svg"), MATCHING(".gif", "gif"), MATCHING(".pbm", "pmaps"), MATCHING(".pgm", "pmaps"), MATCHING(".ppm", "pmaps"), MATCHING(".pnm", "pmaps"), MATCHING(".bmp", "bmp"), MATCHING(".tga", "tga"), MATCHING(".wbmp", "wbmp"), MATCHING(".ico", "ico"), MATCHING(".cur", "ico"), MATCHING(".psd", "psd") }; static const char *loaders_name[] = { /* in order of most likely needed */ "png", "jpeg", "eet", "xpm", "tiff", "gif", "svg", "pmaps", "bmp", "tga", "wbmp", "ico", "psd", "edb" }; Eina_Bool evas_cserve2_loader_register(Evas_Loader_Module_Api *api) { eina_hash_direct_add(loaders, api->type, api); return EINA_TRUE; } #if defined(__CEGCC__) || defined(__MINGW32CE__) # define EVAS_MODULE_NAME_IMAGE_LOADER "loader_%s.dll" #elif _WIN32 # define EVAS_MODULE_NAME_IMAGE_LOADER "module.dll" #else # define EVAS_MODULE_NAME_IMAGE_LOADER "module.so" #endif static Evas_Loader_Module_Api * loader_module_find(const char *type) { Evas_Loader_Module_Api *l; Eina_Module *em; char buf[PATH_MAX]; l = eina_hash_find(loaders, type); if (l) return l; /* FIXME: Look in every possible path, but what will those be? */ snprintf(buf, sizeof(buf), PACKAGE_LIB_DIR "/evas/cserve2/loaders/%s/%s/%s", type, MODULE_ARCH, EVAS_MODULE_NAME_IMAGE_LOADER); em = eina_module_new(buf); if (!em) return NULL; if (!eina_module_load(em)) { eina_module_free(em); return NULL; } l = eina_hash_find(loaders, type); if (l) { modules = eina_list_append(modules, em); return l; } eina_module_free(em); return NULL; } static Eina_Bool command_read(int fd, Slave_Command *cmd, void **params) { ssize_t ret; int ints[2], size, got = 0; char *buf; ret = read(fd, ints, sizeof(int) * 2); if (ret < (int)sizeof(int) * 2) return EINA_FALSE; size = ints[0]; buf = malloc(size); if (!buf) return EINA_FALSE; do { ret = read(fd, buf + got, size - got); if (ret < 0) { /* EINTR means we were interrupted by a signal before anything * was sent, and if we are back here it means that signal was * not meant for us to die. Any other error here is fatal and * should result in the slave terminating. */ if (errno == EINTR) continue; free(buf); return EINA_FALSE; } got += ret; } while (got < size); *cmd = ints[1]; *params = buf; return EINA_TRUE; } static Eina_Bool response_send(int fd, Slave_Command cmd, void *resp, int size) { int sent = 0, ints[2]; const char *data = resp; ssize_t ret; ints[0] = size; ints[1] = cmd; ret = write(fd, ints, sizeof(int) * 2); if (ret < 0) return EINA_FALSE; if (!size) return EINA_TRUE; do { ret = write(fd, data + sent, size - sent); if (ret < 0) { /* EINTR means we were interrupted by a signal before anything * was sent, and if we are back here it means that signal was * not meant for us to die. Any other error here is fatal and * should result in the slave terminating. */ if (errno == EINTR) continue; return EINA_FALSE; } sent += ret; } while (sent < size); return EINA_TRUE; } static Eina_Bool error_send(int fd, Error_Type err) { return response_send(fd, ERROR, &err, sizeof(Error_Type)); } static void * _cserve2_shm_map(const char *name, size_t length, off_t offset) { void *map; int fd; fd = shm_open(name, O_RDWR, S_IWUSR); if (fd == -1) return MAP_FAILED; map = mmap(NULL, length, PROT_WRITE, MAP_SHARED, fd, offset); close(fd); return map; } static void _cserve2_shm_unmap(void *map, size_t length) { munmap(map, length); } static Error_Type image_open(const char *file, const char *key, Image_Load_Opts *opts, Slave_Msg_Image_Opened *result, const char **use_loader) { Evas_Img_Load_Params ilp; Evas_Loader_Module_Api *api; const char *loader = NULL, *end; unsigned int i; int len; int err; memset(&ilp, 0, sizeof(ilp)); if (opts) { #define SETOPT(v) ilp.opts.v = opts->v SETOPT(w); SETOPT(h); SETOPT(rx); SETOPT(ry); SETOPT(rw); SETOPT(rh); SETOPT(scale_down_by); SETOPT(dpi); SETOPT(orientation); #undef SETOPT ilp.has_opts = EINA_TRUE; } if (!*use_loader) goto try_extension; loader = *use_loader; api = loader_module_find(loader); if (!api) goto try_extension; if (api->head_load(&ilp, file, key, &err)) goto done; try_extension: len = strlen(file); end = file + len; for (i = 0; i < (sizeof (map_loaders) / sizeof(struct ext_loader_s)); i++) { int len2 = strlen(map_loaders[i].extension); if (len2 > len) continue; if (!strcasecmp(end - len2, map_loaders[i].extension)) { loader = map_loaders[i].loader; break; } } if (!loader) goto try_all_known; api = loader_module_find(loader); if (!api) goto try_all_known; if (api->head_load(&ilp, file, key, &err)) goto done; try_all_known: for (i = 0; i < (sizeof(loaders_name) / sizeof(loaders_name[0])); i++) { loader = loaders_name[i]; api = loader_module_find(loader); if (!api) continue; if (api->head_load(&ilp, file, key, &err)) goto done; } /* find every module available and try them, even if we don't know they * exist. That will be our generic loader */ return err; done: *use_loader = loader; result->w = ilp.w; result->h = ilp.h; if ((result->rotated = ilp.rotated)) { result->degree = ilp.degree; } if ((result->animated = ilp.animated)) { result->frame_count = ilp.frame_count; result->loop_count = ilp.loop_count; result->loop_hint = ilp.loop_hint; } result->scale = ilp.scale; result->alpha = ilp.alpha; return CSERVE2_NONE; } static Error_Type image_load(const char *file, const char *key, const char *shmfile, Slave_Msg_Image_Load *params, Slave_Msg_Image_Loaded *result, const char *loader) { Evas_Img_Load_Params ilp; Evas_Loader_Module_Api *api; int err; Error_Type ret = CSERVE2_NONE; char *map = _cserve2_shm_map(shmfile, params->shm.mmap_size, params->shm.mmap_offset); if (map == MAP_FAILED) return CSERVE2_RESOURCE_ALLOCATION_FAILED; memset(&ilp, 0, sizeof(ilp)); api = loader_module_find(loader); if (!api) { ret = CSERVE2_GENERIC; goto done; } ilp.w = params->w; ilp.h = params->h; ilp.alpha = params->alpha; #define SETOPT(v) ilp.opts.v = params->opts.v SETOPT(w); SETOPT(h); SETOPT(rx); SETOPT(ry); SETOPT(rw); SETOPT(rh); SETOPT(scale_down_by); SETOPT(dpi); SETOPT(orientation); #undef SETOPT ilp.buffer = map + params->shm.image_offset; if (!api->data_load(&ilp, file, key, &err)) ret = err; result->alpha_sparse = ilp.alpha_sparse; done: _cserve2_shm_unmap(map, params->shm.mmap_size); return ret; } static void handle_image_open(int wfd, void *params) { Slave_Msg_Image_Open *p; Slave_Msg_Image_Opened result; Image_Load_Opts *load_opts = NULL; Error_Type err; const char *loader = NULL, *file, *key, *ptr; char *resp; size_t resp_size; p = params; file = (const char *)(p + sizeof(Slave_Msg_Image_Open)); key = file + strlen(file) + 1; ptr = key + strlen(key) + 1; if (p->has_opts) { load_opts = (Image_Load_Opts *)ptr; ptr += sizeof(Image_Load_Opts); } if (p->has_loader_data) loader = ptr; memset(&result, 0, sizeof(result)); if ((err = image_open(file, key, load_opts, &result, &loader)) != CSERVE2_NONE) { error_send(wfd, err); return; } result.has_loader_data = EINA_TRUE; resp_size = sizeof(Slave_Msg_Image_Opened) + sizeof(int) + strlen(loader) + 1; resp = alloca(resp_size); memcpy(resp, &result, sizeof(Slave_Msg_Image_Opened)); memcpy(resp + sizeof(Slave_Msg_Image_Opened), loader, strlen(loader) + 1); response_send(wfd, IMAGE_OPEN, resp, resp_size); } static void handle_image_load(int wfd, void *params) { Slave_Msg_Image_Load *load_args = params; Slave_Msg_Image_Loaded resp; Error_Type err; const char *shmfile; const char *file, *key, *loader; if (!load_args->has_loader_data) { error_send(wfd, CSERVE2_UNKNOWN_FORMAT); return; } memset(&resp, 0, sizeof(resp)); shmfile = ((const char *)params) + sizeof(Slave_Msg_Image_Load); file = shmfile + strlen(shmfile) + 1; key = file + strlen(file) + 1; loader = key + strlen(key) + 1; if ((err = image_load(file, key, shmfile, load_args, &resp, loader)) != CSERVE2_NONE) { error_send(wfd, err); return; } response_send(wfd, IMAGE_LOAD, &resp, sizeof(resp)); } int main(int c, char **v) { int wfd, rfd; Slave_Command cmd; void *params = NULL; Eina_Module *m; Eina_Bool quit = EINA_FALSE; if (c < 3) return 1; eina_init(); loaders = eina_hash_string_superfast_new(NULL); wfd = atoi(v[1]); rfd = atoi(v[2]); while (!quit) { if (!command_read(rfd, &cmd, ¶ms)) { error_send(wfd, CSERVE2_INVALID_COMMAND); return 1; } switch (cmd) { case IMAGE_OPEN: handle_image_open(wfd, params); break; case IMAGE_LOAD: handle_image_load(wfd, params); break; case SLAVE_QUIT: quit = EINA_TRUE; break; default: error_send(wfd, CSERVE2_INVALID_COMMAND); } } eina_hash_free(loaders); EINA_LIST_FREE(modules, m) eina_module_free(m); eina_shutdown(); return 0; } evas-1.7.9/src/bin/evas_cserve2_client.c0000664000175000017500000002145412175475547015070 00000000000000#include "config.h" #include #include #include #include #include #include #include #include #include "evas_cserve2.h" static unsigned int _rid_count = 0; static struct sockaddr_un socket_local; #ifndef UNIX_PATH_MAX #define UNIX_PATH_MAX sizeof(socket_local.sun_path) #endif static void debug_msg(const void *buf, int size) { const char *str = buf; int i; printf("message: "); for (i = 0; i < size; i++) printf("%x ", str[i]); printf("\n"); } static int _read_line(char *buf, int size) { int len; char *c; fgets(buf, size, stdin); c = strchr(buf, '#'); if (c) *c = '\0'; else { c = strchr(buf, '\n'); if (c) *c = '\0'; } len = strlen(buf); return len + 1; } static void * parse_input_open(int *size) { char path[4096]; char key[4096]; char line[4096]; int path_len, key_len; Msg_Open msg; char *buf; int file_id; _read_line(line, sizeof(line)); path_len = _read_line(path, sizeof(path)); key_len = _read_line(key, sizeof(key)); sscanf(line, "%d", &file_id); buf = malloc(sizeof(msg) + path_len + key_len); msg.base.rid = _rid_count++; msg.base.type = CSERVE2_OPEN; msg.file_id = file_id; msg.path_offset = 0; msg.key_offset = path_len; memcpy(buf, &msg, sizeof(msg)); memcpy(buf + sizeof(msg), path, path_len); memcpy(buf + sizeof(msg) + path_len, key, key_len); *size = sizeof(msg) + path_len + key_len; return buf; } static void * parse_input_setopts(int *size) { Msg_Setopts *msg; char line[4096]; int file_id, image_id; double dpi; int w, h; int scale; int rx, ry, rw, rh; int orientation; // reading file_id, image_id _read_line(line, sizeof(line)); sscanf(line, "%d %d", &file_id, &image_id); // reading load dpi _read_line(line, sizeof(line)); dpi = atof(line); // reading load size _read_line(line, sizeof(line)); sscanf(line, "%d %d", &w, &h); // reading load scale down _read_line(line, sizeof(line)); sscanf(line, "%d", &scale); // reading load region _read_line(line, sizeof(line)); sscanf(line, "%d %d %d %d", &rx, &ry, &rw, &rh); // reading orientation _read_line(line, sizeof(line)); sscanf(line, "%d", &orientation); msg = calloc(1, sizeof(*msg)); msg->base.rid = _rid_count++; msg->base.type = CSERVE2_SETOPTS; msg->file_id = file_id; msg->image_id = image_id; msg->opts.dpi = dpi; msg->opts.w = w; msg->opts.h = h; msg->opts.scale_down = scale; msg->opts.rx = rx; msg->opts.ry = ry; msg->opts.rw = rw; msg->opts.rh = rh; msg->opts.orientation = !!orientation; *size = sizeof(*msg); return msg; } static void * parse_input_load(int *size) { Msg_Load *msg; char line[4096]; int image_id; // read image_id _read_line(line, sizeof(line)); sscanf(line, "%d", &image_id); msg = calloc(1, sizeof(*msg)); msg->base.rid = _rid_count++; msg->base.type = CSERVE2_LOAD; msg->image_id = image_id; *size = sizeof(*msg); return msg; } static void * parse_input_preload(int *size) { Msg_Preload *msg; char line[4096]; int image_id; // read image_id _read_line(line, sizeof(line)); sscanf(line, "%d", &image_id); msg = calloc(1, sizeof(*msg)); msg->base.rid = _rid_count++; msg->base.type = CSERVE2_PRELOAD; msg->image_id = image_id; *size = sizeof(*msg); return msg; } static void * parse_input_unload(int *size) { Msg_Unload *msg; char line[4096]; int image_id; // read image_id _read_line(line, sizeof(line)); sscanf(line, "%d", &image_id); msg = calloc(1, sizeof(*msg)); msg->base.rid = _rid_count++; msg->base.type = CSERVE2_UNLOAD; msg->image_id = image_id; *size = sizeof(*msg); return msg; } static void * parse_input_close(int *size) { Msg_Close *msg; char line[4096]; int file_id; // read file_id _read_line(line, sizeof(line)); sscanf(line, "%d", &file_id); msg = calloc(1, sizeof(*msg)); msg->base.rid = _rid_count++; msg->base.type = CSERVE2_CLOSE; msg->file_id = file_id; *size = sizeof(*msg); return msg; } static void parse_answer_opened(const void *buf) { const Msg_Opened *msg = buf; printf("OPENED rid = %d\n", msg->base.rid); printf("size: %dx%d, alpha: %d\n\n", msg->image.w, msg->image.h, msg->image.alpha); } static void parse_answer_setoptsed(const void *buf) { const Msg_Setoptsed *msg = buf; printf("SETOPTSED rid = %d\n", msg->base.rid); } static void parse_answer_loaded(const void *buf) { const Msg_Loaded *msg = buf; const char *path; path = ((const char *)msg) + sizeof(*msg); printf("LOADED rid = %d\n", msg->base.rid); printf("shm mmap_offset = 0x%x, use_offset = 0x%x, mmap size = %d bytes\n", msg->shm.mmap_offset, msg->shm.use_offset, msg->shm.mmap_size); printf("shm path: \"%s\"\n\n", path); } static void parse_answer_error(const void *buf) { const Msg_Error *msg = buf; printf("ERROR rid = %d, error = %d\n", msg->base.rid, msg->error); } static void parse_answer(const void *buf) { const Msg_Base *msg = buf; switch (msg->type) { case CSERVE2_OPENED: parse_answer_opened(buf); break; case CSERVE2_SETOPTSED: parse_answer_setoptsed(buf); break; case CSERVE2_LOADED: parse_answer_loaded(buf); break; case CSERVE2_ERROR: parse_answer_error(buf); break; default: printf("unhandled answer: %d\n", msg->type); } } static struct { const char *name; Message_Type type; void *(*parse_func)(int *size); } _msg_types[] = { { "OPEN", CSERVE2_OPEN, parse_input_open }, { "OPENED", CSERVE2_OPENED, NULL }, { "SETOPTS", CSERVE2_SETOPTS, parse_input_setopts }, { "SETOPTSED", CSERVE2_SETOPTSED, NULL }, { "LOAD", CSERVE2_LOAD, parse_input_load }, { "LOADED", CSERVE2_LOADED, NULL }, { "PRELOAD", CSERVE2_PRELOAD, parse_input_preload }, { "UNLOAD", CSERVE2_UNLOAD, parse_input_unload }, { "CLOSE", CSERVE2_CLOSE, parse_input_close }, { NULL, 0, NULL } }; int main(void) { int s, t, len, skip_cmd = 0; struct sockaddr_un remote; char msgbuf[4096], buf[UNIX_PATH_MAX], *env; if ((s = socket(AF_UNIX, SOCK_STREAM, 0)) == -1) { perror("socket"); exit(1); } printf("Trying to connect...\n"); remote.sun_family = AF_UNIX; env = getenv("EVAS_CSERVE2_SOCKET"); if (!env) { snprintf(buf, sizeof(buf), "/tmp/.evas-cserve2-%x.socket", (int)getuid()); env = buf; } strncpy(remote.sun_path, env, UNIX_PATH_MAX - 1); len = strlen(remote.sun_path) + sizeof(remote.sun_family); if (connect(s, (struct sockaddr *)&remote, len) == -1) { perror("connect"); exit(1); } printf("Connected.\n"); while(!feof(stdin)) { char cmd[1024]; int i; int size; void *msg; if (skip_cmd) skip_cmd = 0; else printf("\n> "); fgets(cmd, sizeof(cmd), stdin); len = strlen(cmd) - 1; cmd[len] = '\0'; if (!len) { skip_cmd = 1; continue; } for (i = 0; _msg_types[i].name; i++) { if (!strcmp(cmd, _msg_types[i].name)) break; } // discards the end of the message if we can't parse it if (!_msg_types[i].name) { printf("Invalid command.\n"); continue; } if (!_msg_types[i].parse_func) { printf("Command %s still unhandled.\n", _msg_types[i].name); continue; } msg = _msg_types[i].parse_func(&size); if (send(s, &size, sizeof(size), MSG_NOSIGNAL) == -1) { perror("send size"); exit(1); } if (send(s, msg, size, MSG_NOSIGNAL) == -1) { perror("send"); exit(1); } free(msg); usleep(100000); if ((t=recv(s, &size, sizeof(size), MSG_DONTWAIT)) > 0) { len = recv(s, msgbuf, size, 0); printf("size of received message: %d\n", len); if (len != size) { printf("couldn't read entire message.\n"); continue; } debug_msg(&size, sizeof(size)); debug_msg(msgbuf, size); parse_answer(msgbuf); } else { if (t < 0 && ((errno == EAGAIN) || (errno == EWOULDBLOCK))) continue; else fprintf(stderr, "Server closed connection\n"); exit(1); } } close(s); return 0; } evas-1.7.9/src/bin/evas_cserve2_debug.c0000664000175000017500000002044612175475547014700 00000000000000#include "config.h" #include #include #include #include #include #include #include #include #include #include #include "evas_cs2.h" static int socketfd = -1; static unsigned int _rid_count = 1; static int _evas_cserve2_debug_log_dom = -1; static struct sockaddr_un socksize; #ifndef UNIX_PATH_MAX #define UNIX_PATH_MAX sizeof(socksize.sun_path) #endif #ifdef ERR #undef ERR #endif #define ERR(...) EINA_LOG_DOM_ERR(_evas_cserve2_debug_log_dom, __VA_ARGS__) #ifdef DBG #undef DBG #endif #define DBG(...) EINA_LOG_DOM_DBG(_evas_cserve2_debug_log_dom, __VA_ARGS__) #ifdef WRN #undef WRN #endif #define WRN(...) EINA_LOG_DOM_WARN(_evas_cserve2_debug_log_dom, __VA_ARGS__) #ifdef INF #undef INF #endif #define INF(...) EINA_LOG_DOM_INFO(_evas_cserve2_debug_log_dom, __VA_ARGS__) static void _socket_path_set(char *path) { char *env; char buf[UNIX_PATH_MAX]; env = getenv("EVAS_CSERVE2_SOCKET"); if (env && env[0]) { strncpy(path, env, UNIX_PATH_MAX - 1); return; } snprintf(buf, sizeof(buf), "/tmp/.evas-cserve2-%x.socket", (int)getuid()); /* FIXME: check we can actually create this socket */ strcpy(path, buf); } static Eina_Bool _server_connect(void) { int s, len; struct sockaddr_un remote; if ((s = socket(AF_UNIX, SOCK_STREAM, 0)) == -1) { ERR("socket"); return EINA_FALSE; } remote.sun_family = AF_UNIX; _socket_path_set(remote.sun_path); len = strlen(remote.sun_path) + sizeof(remote.sun_family); if (connect(s, (struct sockaddr *)&remote, len) == -1) { ERR("connect"); return EINA_FALSE; } fcntl(s, F_SETFL, O_NONBLOCK); socketfd = s; DBG("connected to cserve2 server."); return EINA_TRUE; } static void _server_disconnect(void) { close(socketfd); socketfd = -1; } static Eina_Bool _server_send(const void *data, int size) { int sent = 0; ssize_t ret; const char *msg = data; while (sent < size) { ret = send(socketfd, msg + sent, size - sent, MSG_NOSIGNAL); if (ret < 0) { if ((errno == EAGAIN) || (errno == EINTR)) continue; return EINA_FALSE; } sent += ret; } return EINA_TRUE; } static int sr_size = 0; static int sr_got = 0; static char *sr_buf = NULL; static void * _server_read(int *size) { int n; void *ret; if (sr_size) goto get_data; n = recv(socketfd, &sr_size, sizeof(sr_size), 0); if (n < 0) return NULL; sr_buf = malloc(sr_size); get_data: n = recv(socketfd, sr_buf + sr_got, sr_size - sr_got, 0); if (n < 0) return NULL; sr_got += n; if (sr_got < sr_size) return NULL; *size = sr_size; sr_size = 0; sr_got = 0; ret = sr_buf; sr_buf = NULL; return ret; } static void _debug_msg_send(void) { Msg_Base msg; int size; memset(&msg, 0, sizeof(msg)); msg.type = CSERVE2_FONT_DEBUG; msg.rid = _rid_count++; size = sizeof(msg); if (!_server_send(&size, sizeof(size))) { ERR("Could not send usage msg size to server."); return; } if (!_server_send(&msg, size)) { ERR("Could not send usage msg body to server."); return; } } typedef struct _Font_Entry Font_Entry; typedef struct _Cache_Entry Cache_Entry; typedef struct _Glyph_Entry Glyph_Entry; struct _Font_Entry { const char *file; const char *name; unsigned int rend_flags; unsigned int size; unsigned int dpi; unsigned int unused; Eina_List *caches; }; struct _Cache_Entry { const char *shmname; unsigned int size; unsigned int usage; Eina_List *glyphs; }; struct _Glyph_Entry { unsigned int index; unsigned int offset; unsigned int size; unsigned int rows; unsigned int width; unsigned int pitch; unsigned int num_grays; unsigned int pixel_mode; }; #define READIT(_dst, _src) \ do { \ memcpy(&_dst, _src, sizeof(_dst)); \ _src += sizeof(_dst); \ } while(0) static Glyph_Entry * _parse_glyph_entry(char **msg) { Glyph_Entry *ge; char *buf = *msg; ge = calloc(1, sizeof(*ge)); READIT(ge->index, buf); READIT(ge->offset, buf); READIT(ge->size, buf); READIT(ge->rows, buf); READIT(ge->width, buf); READIT(ge->pitch, buf); READIT(ge->num_grays, buf); READIT(ge->pixel_mode, buf); *msg = buf; return ge; } static Cache_Entry * _parse_cache_entry(char **msg) { Cache_Entry *ce; char *buf = *msg; unsigned int n; ce = calloc(1, sizeof(*ce)); READIT(n, buf); ce->shmname = eina_stringshare_add_length(buf, n); buf += n; READIT(ce->size, buf); READIT(ce->usage, buf); READIT(n, buf); while (n--) { Glyph_Entry *ge; ge = _parse_glyph_entry(&buf); ce->glyphs = eina_list_append(ce->glyphs, ge); } *msg = buf; return ce; } static Font_Entry * _parse_font_entry(char **msg) { Font_Entry *fe; char *buf = *msg; unsigned int n; fe = calloc(1, sizeof(*fe)); READIT(n, buf); if (n) fe->file = eina_stringshare_add_length(buf, n); buf += n; READIT(n, buf); if (n) fe->name = eina_stringshare_add_length(buf, n); buf += n; READIT(fe->rend_flags, buf); READIT(fe->size, buf); READIT(fe->dpi, buf); READIT(fe->unused, buf); READIT(n, buf); while (n--) { Cache_Entry *ce; ce = _parse_cache_entry(&buf); fe->caches = eina_list_append(fe->caches, ce); } *msg = buf; return fe; } static Eina_List * _debug_msg_read(void) { Msg_Base *msg = NULL; char *buf; int size; unsigned int nfonts; Eina_List *fonts = NULL; printf("Requesting server debug info.\n\n"); while (!msg) msg = _server_read(&size); if (msg->type != CSERVE2_FONT_DEBUG) { ERR("Invalid message received from server." "Something went badly wrong."); return NULL; } buf = (char *)msg + sizeof(*msg); READIT(nfonts, buf); while (nfonts--) { Font_Entry *fe; fe = _parse_font_entry(&buf); fonts = eina_list_append(fonts, fe); } return fonts; } static void _glyph_entry_free(Glyph_Entry *ge) { free(ge); } static void _cache_entry_free(Cache_Entry *ce) { Glyph_Entry *ge; EINA_LIST_FREE(ce->glyphs, ge) _glyph_entry_free(ge); eina_stringshare_del(ce->shmname); free(ce); } static void _font_entry_free(Font_Entry *fe) { Cache_Entry *ce; EINA_LIST_FREE(fe->caches, ce) _cache_entry_free(ce); eina_stringshare_del(fe->name); eina_stringshare_del(fe->file); free(fe); } static void _glyph_entry_print(Glyph_Entry *ge) { const char *pxmode[] = { "FT_PIXEL_MODE_NONE", "FT_PIXEL_MODE_MONO", "FT_PIXEL_MODE_GRAY", "FT_PIXEL_MODE_GRAY2", "FT_PIXEL_MODE_GRAY4", "FT_PIXEL_MODE_LCD", "FT_PIXEL_MODE_LCD_V" }; printf("\t\tGLYPH %u offset: %u size: %u %ux%u pitch: %u grays: %u " "pixel mode: %s\n", ge->index, ge->offset, ge->size, ge->width, ge->rows, ge->pitch, ge->num_grays, pxmode[ge->pixel_mode]); } static void _cache_entry_print(Cache_Entry *ce) { Eina_List *l; Glyph_Entry *ge; printf("\tSHM %s used %u/%u\n", ce->shmname, ce->usage, ce->size); EINA_LIST_FOREACH(ce->glyphs, l, ge) _glyph_entry_print(ge); } static void _font_entry_print(Font_Entry *fe) { Eina_List *l; Cache_Entry *ce; printf("FONT %s:%s size: %u dpi: %u %s%s%s %s\n", fe->file, fe->name, fe->size, fe->dpi, fe->rend_flags == 0 ? "REGULAR " : "", fe->rend_flags & 1 ? "SLANT " : "", fe->rend_flags & 2 ? "WEIGHT" : "", fe->unused ? "(unused)" : ""); EINA_LIST_FOREACH(fe->caches, l, ce) _cache_entry_print(ce); putchar('\n'); } int main(void) { Eina_List *fonts; Font_Entry *fe; eina_init(); _evas_cserve2_debug_log_dom = eina_log_domain_register ("evas_cserve2_debug", EINA_COLOR_BLUE); if (!_server_connect()) { ERR("Could not connect to server."); return -1; } _debug_msg_send(); fonts = _debug_msg_read(); EINA_LIST_FREE(fonts, fe) { _font_entry_print(fe); _font_entry_free(fe); } _server_disconnect(); eina_shutdown(); } evas-1.7.9/src/bin/evas_cserve2_slave.h0000664000175000017500000000472312175475547014731 00000000000000#ifndef _EVAS_CSERVE2_SLAVE_H #define _EVAS_CSERVE2_SLAVE_H #include /* begin bunch of stuff from evas_common.h so that we don't need to drag * a lot of useless @SOMETHING_CFLAGS@ around */ typedef unsigned long long DATA64; typedef unsigned int DATA32; typedef unsigned short DATA16; typedef unsigned char DATA8; #ifndef WORDS_BIGENDIAN /* x86 */ #define A_VAL(p) (((DATA8 *)(p))[3]) #define R_VAL(p) (((DATA8 *)(p))[2]) #define G_VAL(p) (((DATA8 *)(p))[1]) #define B_VAL(p) (((DATA8 *)(p))[0]) #define AR_VAL(p) ((DATA16 *)(p)[1]) #define GB_VAL(p) ((DATA16 *)(p)[0]) #else /* ppc */ #define A_VAL(p) (((DATA8 *)(p))[0]) #define R_VAL(p) (((DATA8 *)(p))[1]) #define G_VAL(p) (((DATA8 *)(p))[2]) #define B_VAL(p) (((DATA8 *)(p))[3]) #define AR_VAL(p) ((DATA16 *)(p)[0]) #define GB_VAL(p) ((DATA16 *)(p)[1]) #endif /* if more than 1/ALPHA_SPARSE_INV_FRACTION is "alpha" (1-254) then sparse * alpha flag gets set */ #define ALPHA_SPARSE_INV_FRACTION 3 #define IMG_MAX_SIZE 65000 #define IMG_TOO_BIG(w, h) \ ((((unsigned long long)w) * ((unsigned long long)h)) >= \ ((1ULL << (29 * (sizeof(void *) / 4))) - 2048)) #define RGB_JOIN(r,g,b) \ (((r) << 16) + ((g) << 8) + (b)) #define ARGB_JOIN(a,r,g,b) \ (((a) << 24) + ((r) << 16) + ((g) << 8) + (b)) /* end bunchf of stuff from evas_common.h */ typedef struct _Evas_Loader_Module_Api Evas_Loader_Module_Api; typedef struct _Evas_Img_Load_Params Evas_Img_Load_Params; #define EVAS_CSERVE2_MODULE_API_VERSION 1 struct _Evas_Loader_Module_Api { int version; const char *type; Eina_Bool (*head_load)(Evas_Img_Load_Params *p, const char *file, const char *key, int *error); Eina_Bool (*data_load)(Evas_Img_Load_Params *p, const char *file, const char *key, int *error); }; struct _Evas_Img_Load_Params { unsigned int w, h; unsigned int degree; unsigned int scale; int frame_count; int loop_count; int loop_hint; struct { unsigned int w, h; unsigned int rx, ry, rw, rh; int scale_down_by; double dpi; Eina_Bool orientation; } opts; void *buffer; Eina_Bool has_opts : 1; Eina_Bool rotated : 1; Eina_Bool alpha : 1; Eina_Bool alpha_sparse : 1; Eina_Bool animated : 1; }; EAPI Eina_Bool evas_cserve2_loader_register(Evas_Loader_Module_Api *api); EAPI void evas_cserve2_image_premul(Evas_Img_Load_Params *ilp); EAPI void evas_cserve2_image_alpha_sparse_set(Evas_Img_Load_Params *ilp); #endif /* _EVAS_CSERVE2_SLAVE_H */ evas-1.7.9/src/bin/evas_cserve2.h0000664000175000017500000002454312175475547013541 00000000000000#ifndef _EVAS_CSERVE2_H #define _EVAS_CSERVE2_H #include #include "evas_cs2.h" #ifdef ERR #undef ERR #endif #define ERR(...) EINA_LOG_DOM_ERR(_evas_cserve2_bin_log_dom, __VA_ARGS__) #ifdef DBG #undef DBG #endif #define DBG(...) EINA_LOG_DOM_DBG(_evas_cserve2_bin_log_dom, __VA_ARGS__) #ifdef WRN #undef WRN #endif #define WRN(...) EINA_LOG_DOM_WARN(_evas_cserve2_bin_log_dom, __VA_ARGS__) #ifdef INF #undef INF #endif #define INF(...) EINA_LOG_DOM_INFO(_evas_cserve2_bin_log_dom, __VA_ARGS__) #define DEBUG_LOAD_TIME 1 extern int _evas_cserve2_bin_log_dom; typedef struct _Slave Slave; typedef struct _Slave_Thread_Data Slave_Thread_Data; typedef struct _Shm_Handle Shm_Handle; typedef enum { FD_READ = 1, FD_WRITE = 2, FD_ERROR = 4 } Fd_Flags; struct _Client { unsigned int id; int socket; struct { Eina_Bool reading; char *buf; // buffer of data being read int done, size; Eina_Binbuf *pending; // pending data to send } msg; struct { Eina_Hash *referencing; // indexed by client file id } files; struct { Eina_Hash *referencing; // indexed by client image id } images; struct { Eina_List *referencing; } fonts; }; typedef struct _Client Client; struct _Image_Load_Opts { unsigned int w, h; unsigned int rx, ry, rw, rh; unsigned int scale_down_by; double dpi; Eina_Bool orientation; }; typedef struct _Image_Load_Opts Image_Load_Opts; typedef enum { IMAGE_OPEN, IMAGE_LOAD, FONT_LOAD, FONT_GLYPHS_LOAD, SLAVE_QUIT, ERROR } Slave_Command; struct _Slave_Msg_Image_Open { Eina_Bool has_opts : 1; Eina_Bool has_loader_data : 1; }; struct _Slave_Msg_Image_Opened { int w, h; int degree; int scale; /* used by jpeg when loading in smaller sizes */ int frame_count; int loop_count; int loop_hint; /* include Evas.h? Copy the enum around? */ Eina_Bool alpha : 1; Eina_Bool animated : 1; Eina_Bool rotated : 1; Eina_Bool has_loader_data : 1; }; struct _Slave_Msg_Image_Load { int w, h; Image_Load_Opts opts; struct { int mmap_offset; int image_offset; int mmap_size; int image_size; } shm; Eina_Bool alpha : 1; Eina_Bool has_loader_data : 1; }; struct _Slave_Msg_Image_Loaded { Eina_Bool alpha_sparse : 1; }; typedef struct _Slave_Msg_Image_Open Slave_Msg_Image_Open; typedef struct _Slave_Msg_Image_Opened Slave_Msg_Image_Opened; typedef struct _Slave_Msg_Image_Load Slave_Msg_Image_Load; typedef struct _Slave_Msg_Image_Loaded Slave_Msg_Image_Loaded; struct _Slave_Msg_Font_Load { void *ftdata1; // Freetype file source info comes here void *ftdata2; // Freetype font info comes here unsigned int rend_flags; unsigned int size; unsigned int dpi; const char *name; const char *file; void *data; int datasize; }; struct _Slave_Msg_Font_Loaded { void *ftdata1; void *ftdata2; }; struct _Slave_Msg_Font_Glyphs_Load { struct { void *ftdata1; void *ftdata2; unsigned int rend_flags; unsigned int hint; } font; struct { unsigned int nglyphs; unsigned int *glyphs; } glyphs; struct { Shm_Handle *shm; unsigned int usage; unsigned int nglyphs; } cache; }; struct _Slave_Msg_Glyph { unsigned int index; unsigned int offset; unsigned int size; unsigned int rows; unsigned int width; unsigned int pitch; unsigned int num_grays; unsigned int pixel_mode; }; typedef struct _Slave_Msg_Glyph Slave_Msg_Glyph; struct _Slave_Msg_Font_Cache { unsigned int nglyphs; Slave_Msg_Glyph *glyphs; Shm_Handle *shm; unsigned int usage; }; typedef struct _Slave_Msg_Font_Cache Slave_Msg_Font_Cache; struct _Slave_Msg_Font_Glyphs_Loaded { unsigned int ncaches; unsigned int gl_load_time; unsigned int gl_render_time; unsigned int gl_slave_time; Slave_Msg_Font_Cache **caches; }; typedef struct _Slave_Msg_Font_Load Slave_Msg_Font_Load; typedef struct _Slave_Msg_Font_Loaded Slave_Msg_Font_Loaded; typedef struct _Slave_Msg_Font_Glyphs_Load Slave_Msg_Font_Glyphs_Load; typedef struct _Slave_Msg_Font_Glyphs_Loaded Slave_Msg_Font_Glyphs_Loaded; typedef void *(*Slave_Request_Msg_Create)(void *data, int *size); typedef void (*Slave_Request_Msg_Free)(void *msg, void *data); typedef Msg_Base *(*Slave_Request_Response)(void *data, void *resp, int *size); typedef void (*Slave_Request_Error)(void *data, Error_Type error); struct _Slave_Request_Funcs { Slave_Request_Msg_Create msg_create; Slave_Request_Msg_Free msg_free; Slave_Request_Response response; Slave_Request_Error error; }; typedef struct _Slave_Request Slave_Request; typedef struct _Slave_Request_Funcs Slave_Request_Funcs; typedef enum { FONT_REND_REGULAR = 1, FONT_REND_SLANT = 1 << 1, FONT_REND_WEIGHT = 1 << 2 } Font_Rend_Flags; typedef enum { CSERVE2_REQ_IMAGE_OPEN = 0, CSERVE2_REQ_IMAGE_LOAD, CSERVE2_REQ_IMAGE_SPEC_LOAD, CSERVE2_REQ_FONT_LOAD, CSERVE2_REQ_FONT_GLYPHS_LOAD, CSERVE2_REQ_LAST } Slave_Request_Type; typedef struct _Glyph_Entry Glyph_Entry; typedef void (*Fd_Watch_Cb)(int fd, Fd_Flags flags, void *data); typedef void (*Timeout_Cb)(void); /* void* for compat? */ typedef void (*Main_Loop_Child_Dead_Cb)(int pid, int status); /* void* for compat? */ typedef void (*Slave_Dead_Cb)(Slave *slave, void *data); typedef void (*Slave_Read_Cb)(Slave *slave, Slave_Command cmd, void *msg, void *data); typedef void *(*Slave_Thread_Cb)(Slave_Thread_Data *sd, Slave_Command *cmd, const void *cmddata, void *userdata); typedef void (*File_Change_Cb)(const char *path, Eina_Bool deleted, void *data); void cserve2_client_accept(int fd); ssize_t cserve2_client_read(Client *client, void *buf, size_t len); ssize_t cserve2_client_write(Client *client, const void *buf, size_t len); void cserve2_client_del(Client *client); void cserve2_client_deliver(Client *client); void cserve2_client_error_send(Client *client, unsigned int rid, int error_code); ssize_t cserve2_client_send(Client *client, const void *data, size_t size); Eina_Bool cserve2_fd_watch_add(int fd, Fd_Flags flags, Fd_Watch_Cb cb, const void *data); Eina_Bool cserve2_fd_watch_del(int fd); Eina_Bool cserve2_fd_watch_flags_set(int fd, Fd_Flags flags); Eina_Bool cserve2_fd_watch_flags_get(int fd, Fd_Flags *flags); Eina_Bool cserve2_file_change_watch_add(const char *path, File_Change_Cb cb, const void *data); Eina_Bool cserve2_file_change_watch_del(const char *path); void cserve2_on_child_dead_set(Main_Loop_Child_Dead_Cb cb); void cserve2_timeout_cb_set(int t, Timeout_Cb cb); Eina_Bool cserve2_main_loop_setup(void); void cserve2_main_loop_run(void); void cserve2_main_loop_finish(void); Eina_Bool cserve2_slaves_init(void); void cserve2_slaves_shutdown(void); int cserve2_slave_available_get(void); Eina_Bool cserve2_slave_cmd_dispatch(void *data, Slave_Command cmd, const void *msg, int size); Slave *cserve2_slave_run(const char *exe, Slave_Read_Cb read_cb, Slave_Dead_Cb dead_cb, const void *data); Slave *cserve2_slave_thread_run(Slave_Thread_Cb thread_cb, void *thread_data, Slave_Read_Cb read_cb, Slave_Dead_Cb dead_cb, const void *data); void cserve2_slave_send(Slave *s, Slave_Command cmd, const char *data, size_t size); void cserve2_slave_kill(Slave *s); void cserve2_message_handler(int fd, Fd_Flags flags, void *data); Shm_Handle *cserve2_shm_request(size_t size); void cserve2_shm_unref(Shm_Handle *shm); const char *cserve2_shm_name_get(const Shm_Handle *shm); off_t cserve2_shm_map_offset_get(const Shm_Handle *shm); off_t cserve2_shm_offset_get(const Shm_Handle *shm); size_t cserve2_shm_map_size_get(const Shm_Handle *shm); size_t cserve2_shm_size_get(const Shm_Handle *shm); void *cserve2_shm_map(Shm_Handle *shm); void cserve2_shm_unmap(Shm_Handle *shm); size_t cserve2_shm_size_normalize(size_t size); void cserve2_command_run(Client *client, Message_Type type); void cserve2_cache_init(void); void cserve2_cache_shutdown(void); void cserve2_cache_client_new(Client *client); void cserve2_cache_client_del(Client *client); int cserve2_cache_file_open(Client *client, unsigned int client_file_id, const char *path, const char *key, unsigned int rid); void cserve2_cache_file_close(Client *client, unsigned int client_file_id); int cserve2_cache_image_opts_set(Client *client, Msg_Setopts *msg); void cserve2_cache_image_load(Client *client, unsigned int client_image_id, unsigned int rid); void cserve2_cache_image_preload(Client *client, unsigned int client_image_id, unsigned int rid); void cserve2_cache_image_unload(Client *client, unsigned int client_image_id); int cserve2_cache_font_load(Client *client, const char *source, unsigned int sourcelen, const char *name, unsigned int namelen, unsigned int rend_flags, unsigned int size, unsigned int dpi, unsigned int rid); int cserve2_cache_font_unload(Client *client, const char *source, unsigned int sourcelen, const char *name, unsigned int namelen, unsigned int rend_flags, unsigned int size, unsigned int dpi, unsigned int rid); int cserve2_cache_font_glyphs_load(Client *client, const char *source, unsigned int sourcelen, const char *name, unsigned int namelen, unsigned int rend_flags, unsigned int hint, unsigned int size, unsigned int dpi, unsigned int *glyphs, unsigned int nglyphs, unsigned int rid); int cserve2_cache_font_glyphs_used(Client *client, const char *source, unsigned int sourcelen, const char *name, unsigned int namelen, unsigned int hint, unsigned int rend_flags, unsigned int size, unsigned int dpi, unsigned int *glyphs, unsigned int nglyphs, unsigned int rid); void cserve2_cache_stats_get(Client *client, unsigned int rid); void cserve2_cache_font_debug(Client *client, unsigned int rid); Slave_Request *cserve2_request_add(Slave_Request_Type type, unsigned int rid, Client *client, Slave_Request *dep, Slave_Request_Funcs *funcs, void *data); void cserve2_request_waiter_add(Slave_Request *req, unsigned int rid, Client *client); void cserve2_request_type_set(Slave_Request *req, Slave_Request_Type type); void cserve2_request_cancel(Slave_Request *req, Client *client, Error_Type err); void cserve2_request_cancel_all(Slave_Request *req, Error_Type err); void cserve2_requests_init(void); void cserve2_requests_shutdown(void); void cserve2_font_init(void); void cserve2_font_shutdown(void); void *cserve2_font_slave_cb(Slave_Thread_Data *sd, Slave_Command *cmd, const void *cmddata, void *data); void cserve2_font_source_ft_free(void *fontsource); void cserve2_font_ft_free(void *fontinfo); #endif /* _EVAS_CSERVE2_H */ evas-1.7.9/src/bin/evas_cserve2_cache.c0000664000175000017500000017057112175475547014662 00000000000000#ifdef HAVE_CONFIG_H # include "config.h" #endif #include #ifdef DEBUG_LOAD_TIME #include #endif #include "evas_cserve2.h" #include "evas_cs2_utils.h" typedef struct _Entry Entry; typedef struct _Reference Reference; typedef struct _File_Data File_Data; typedef struct _Image_Data Image_Data; typedef struct _File_Watch File_Watch; typedef struct _Font_Source Font_Source; typedef struct _Font_Entry Font_Entry; typedef struct _Font_Cache Font_Cache; typedef enum { CSERVE2_IMAGE_FILE, CSERVE2_IMAGE_DATA, CSERVE2_FONT_ENTRY } Entry_Type; struct _Entry { unsigned int id; Eina_List *references; Slave_Request *request; Entry_Type type; #ifdef DEBUG_LOAD_TIME struct timeval load_start; struct timeval load_finish; int load_time; int saved_time; #endif }; struct _File_Data { Entry base; char *path; char *key; int w, h; int frame_count; int loop_count; int loop_hint; const char *loader_data; File_Watch *watcher; Eina_List *images; Eina_Bool alpha : 1; Eina_Bool invalid : 1; }; // Default values for load options commented below struct _Image_Data { Entry base; unsigned int file_id; File_Data *file; struct { double dpi; // dpi < -1 int w, h; // w and h < -1 int scale_down; // scale_down < -1 int rx, ry, rw, rh; // rx, ry, rw, rh < -1 Eina_Bool orientation; // orientation == 0 } opts; Shm_Handle *shm; Eina_Bool alpha_sparse : 1; Eina_Bool unused : 1; Eina_Bool doload : 1; }; struct _Font_Source { const char *key; const char *name; const char *file; int references; void *ft; }; struct _Font_Entry { Entry base; unsigned int rend_flags; unsigned int size; unsigned int dpi; Font_Source *src; void *ft; Fash_Glyph2 *glyphs; unsigned int nglyphs; Eina_Inlist *caches; Font_Cache *last_cache; Eina_Bool unused : 1; #ifdef DEBUG_LOAD_TIME struct timeval rstart; // start of the glyphs load request struct timeval rfinish; // finish of the glyphs load request int gl_request_time; // time spent to process glyph requests int gl_load_time; int gl_render_time; int gl_slave_time; int gl_saved_time; #endif }; struct _Font_Cache { EINA_INLIST; Font_Entry *fe; Shm_Handle *shm; unsigned int usage; int inuse; Eina_Inlist *glyphs; unsigned int nglyphs; }; struct _Glyph_Entry { EINA_INLIST; Font_Entry *fe; Font_Cache *fc; unsigned int index; unsigned int offset; unsigned int size; unsigned int rows; unsigned int width; unsigned int pitch; unsigned int num_grays; unsigned int pixel_mode; }; struct _Glyphs_Request { Client *client; Font_Entry *fe; unsigned int current; unsigned int nglyphs; unsigned int *glyphs; unsigned int nrender; unsigned int *render; unsigned int nanswer; Glyph_Entry **answer; unsigned int hint; }; typedef struct _Glyphs_Request Glyphs_Request; struct _Glyphs_Group { Font_Cache *fc; Eina_List *glyphs; }; typedef struct _Glyphs_Group Glyphs_Group; struct _Reference { Client *client; Entry *entry; unsigned int client_entry_id; // for reverse lookup int count; }; struct _File_Watch { const char *path; Eina_List *entries; }; static unsigned int _file_id = 0; // id unique number static unsigned int _image_id = 0; // id unique number static Eina_Hash *file_ids = NULL; // maps path + key --> file_id static Eina_Hash *file_entries = NULL; // maps file_id --> entry static Eina_Hash *image_ids = NULL; // maps file id + load opts --> image id static Eina_Hash *image_entries = NULL; // maps image_id --> entry static Eina_Hash *font_sources = NULL; // font path --> font source static Eina_Hash *font_entries = NULL; // maps font path + options --> entry static Eina_Hash *file_watch = NULL; static Eina_List *image_entries_lru = NULL; static Eina_List *font_shm_lru = NULL; static int max_unused_mem_usage = 5 * 1024; /* in kbytes */ static int unused_mem_usage = 0; static int max_font_usage = 10 * 4 * 1024; /* in kbytes */ static int font_mem_usage = 0; #ifdef DEBUG_LOAD_TIME static int _timeval_sub(const struct timeval *tv2, const struct timeval *tv1) { int t1, t2; t1 = tv1->tv_usec + tv1->tv_sec * 1000000; t2 = tv2->tv_usec + tv2->tv_sec * 1000000; // Make sure that we don't add negative values. Some images may have // been not loaded yet, so it would mess with the stats. if (t2 > t1) return t2 - t1; return 0; } #endif static inline void _entry_load_start(Entry *e) { #ifdef DEBUG_LOAD_TIME gettimeofday(&e->load_start, NULL); #endif } static inline void _entry_load_finish(Entry *e) { #ifdef DEBUG_LOAD_TIME gettimeofday(&e->load_finish, NULL); e->load_time = _timeval_sub(&e->load_finish, &e->load_start); #endif } static inline void _entry_load_reused(Entry *e) { #ifdef DEBUG_LOAD_TIME e->saved_time += e->load_time; #endif } static Msg_Opened * _image_opened_msg_create(File_Data *entry, int *size) { Msg_Opened *msg; msg = calloc(1, sizeof(*msg)); msg->base.type = CSERVE2_OPENED; msg->image.w = entry->w; msg->image.h = entry->h; msg->image.frame_count = entry->frame_count; msg->image.loop_count = entry->loop_count; msg->image.loop_hint = entry->loop_hint; msg->image.alpha = entry->alpha; *size = sizeof(*msg); return msg; } static void _image_opened_send(Client *client, File_Data *entry, unsigned int rid) { int size; Msg_Opened *msg; DBG("Sending OPENED reply for entry: %d and RID: %d.", entry->base.id, rid); // clear the struct with possible paddings, since it is not aligned. msg = _image_opened_msg_create(entry, &size); msg->base.rid = rid; cserve2_client_send(client, &size, sizeof(size)); cserve2_client_send(client, msg, size); free(msg); } static Msg_Loaded * _image_loaded_msg_create(Image_Data *entry, int *size) { Msg_Loaded *msg; const char *shmpath = cserve2_shm_name_get(entry->shm); int path_len; char *buf; path_len = strlen(shmpath) + 1; *size = sizeof(*msg) + path_len; msg = calloc(1, *size); msg->base.type = CSERVE2_LOADED; msg->shm.mmap_offset = cserve2_shm_map_offset_get(entry->shm); msg->shm.use_offset = cserve2_shm_offset_get(entry->shm); msg->shm.mmap_size = cserve2_shm_map_size_get(entry->shm); msg->shm.image_size = cserve2_shm_size_get(entry->shm); msg->alpha_sparse = entry->alpha_sparse; buf = (char *)msg + sizeof(*msg); memcpy(buf, shmpath, path_len); return msg; } static void _image_loaded_send(Client *client, Image_Data *entry, unsigned int rid) { int size; Msg_Loaded *msg; DBG("Sending LOADED reply for entry %d and RID: %d.", entry->base.id, rid); msg = _image_loaded_msg_create(entry, &size); msg->base.rid = rid; cserve2_client_send(client, &size, sizeof(size)); cserve2_client_send(client, msg, size); free(msg); } static void _font_loaded_send(Client *client, unsigned int rid) { int size; Msg_Font_Loaded msg; DBG("Sending FONT_LOADED reply for RID: %d.", rid); size = sizeof(msg); memset(&msg, 0, size); msg.base.rid = rid; msg.base.type = CSERVE2_FONT_LOADED; size = sizeof(msg); cserve2_client_send(client, &size, sizeof(size)); cserve2_client_send(client, &msg, size); } static void * _open_request_build(File_Data *f, int *bufsize) { char *buf; int size, pathlen, keylen; Slave_Msg_Image_Open msg; pathlen = strlen(f->path) + 1; keylen = strlen(f->key) + 1; size = sizeof(msg) + pathlen + keylen; buf = malloc(size); if (!buf) return NULL; memset(&msg, 0, sizeof(msg)); memcpy(buf, &msg, sizeof(msg)); memcpy(buf + sizeof(msg), f->path, pathlen); memcpy(buf + sizeof(msg) + pathlen, f->key, keylen); *bufsize = size; _entry_load_start(&f->base); return buf; } static void _request_free(void *msg, void *data __UNUSED__) { free(msg); } static Msg_Opened * _open_request_response(File_Data *e, Slave_Msg_Image_Opened *resp, int *size) { _entry_load_finish(&e->base); e->base.request = NULL; e->w = resp->w; e->h = resp->h; e->frame_count = resp->frame_count; e->loop_count = resp->loop_count; e->loop_hint = resp->loop_hint; e->alpha = resp->alpha; if (resp->has_loader_data) { const char *ldata = (const char *)resp + sizeof(Slave_Msg_Image_Opened); e->loader_data = eina_stringshare_add(ldata); } return _image_opened_msg_create(e, size); } static void _request_failed(Entry *e, Error_Type type __UNUSED__) { Eina_List *l; Reference *ref; e->request = NULL; EINA_LIST_FOREACH(e->references, l, ref) { Eina_Hash *hash = NULL; if (e->type == CSERVE2_IMAGE_FILE) hash = ref->client->files.referencing; else if (e->type == CSERVE2_IMAGE_DATA) hash = ref->client->images.referencing; else continue; eina_hash_del_by_key(hash, &(ref->client_entry_id)); } } static Slave_Request_Funcs _open_funcs = { .msg_create = (Slave_Request_Msg_Create)_open_request_build, .msg_free = _request_free, .response = (Slave_Request_Response)_open_request_response, .error = (Slave_Request_Error)_request_failed }; static void * _load_request_build(Image_Data *i, int *bufsize) { char *buf, *ptr; const char *shmpath; int size; int shmlen, filelen, keylen, loaderlen; Slave_Msg_Image_Load msg; // opening shm for this file i->shm = cserve2_shm_request(i->file->w * i->file->h * 4); shmpath = cserve2_shm_name_get(i->shm); shmlen = strlen(shmpath) + 1; filelen = strlen(i->file->path) + 1; keylen = strlen(i->file->key) + 1; if (i->file->loader_data) loaderlen = strlen(i->file->loader_data) + 1; else loaderlen = 0; size = sizeof(msg) + shmlen + filelen + keylen + loaderlen; buf = malloc(size); if (!buf) return NULL; memset(&msg, 0, sizeof(msg)); msg.w = i->file->w; msg.h = i->file->h; msg.alpha = i->file->alpha; msg.opts.w = i->opts.w; msg.opts.h = i->opts.h; msg.opts.rx = i->opts.rx; msg.opts.ry = i->opts.ry; msg.opts.rw = i->opts.rw; msg.opts.rh = i->opts.rh; msg.opts.scale_down_by = i->opts.scale_down; msg.opts.dpi = i->opts.dpi; msg.opts.orientation = i->opts.orientation; msg.shm.mmap_offset = cserve2_shm_map_offset_get(i->shm); msg.shm.image_offset = cserve2_shm_offset_get(i->shm); msg.shm.mmap_size = cserve2_shm_map_size_get(i->shm); msg.shm.image_size = cserve2_shm_size_get(i->shm); msg.has_loader_data = !!loaderlen; memcpy(buf, &msg, sizeof(msg)); ptr = buf + sizeof(msg); memcpy(ptr, shmpath, shmlen); ptr += shmlen; memcpy(ptr, i->file->path, filelen); ptr += filelen; memcpy(ptr, i->file->key, keylen); ptr += keylen; memcpy(ptr, i->file->loader_data, loaderlen); *bufsize = size; _entry_load_start(&i->base); return buf; } static Msg_Loaded * _load_request_response(Image_Data *e, Slave_Msg_Image_Loaded *resp, int *size) { _entry_load_finish(&e->base); e->base.request = NULL; e->alpha_sparse = resp->alpha_sparse; if (!e->doload) DBG("Entry %d loaded by speculative preload.", e->base.id); return _image_loaded_msg_create(e, size); } static Slave_Request_Funcs _load_funcs = { .msg_create = (Slave_Request_Msg_Create)_load_request_build, .msg_free = _request_free, .response = (Slave_Request_Response)_load_request_response, .error = (Slave_Request_Error)_request_failed }; static unsigned int _img_opts_id_get(Image_Data *im, char *buf, int size) { uintptr_t image_id; snprintf(buf, size, "%u:%0.3f:%dx%d:%d:%d,%d+%dx%d:%d", im->file_id, im->opts.dpi, im->opts.w, im->opts.h, im->opts.scale_down, im->opts.rx, im->opts.ry, im->opts.rw, im->opts.rh, im->opts.orientation); image_id = (uintptr_t)eina_hash_find(image_ids, buf); return image_id; } static int _image_entry_size_get(Image_Data *e) { int size = sizeof(Image_Data); /* XXX: get the overhead of the shm handler too */ if (e->shm) size += cserve2_shm_size_get(e->shm); return size / 1024; } static void _file_id_free(File_Data *entry) { char buf[4096]; DBG("Removing entry file id: %d, file: \"%s:%s\"", entry->base.id, entry->path, entry->key); snprintf(buf, sizeof(buf), "%s:%s", entry->path, entry->key); eina_hash_del_by_key(file_ids, buf); } static void _image_id_free(Image_Data *entry) { char buf[4096]; DBG("Removing entry image id: %d", entry->base.id); _img_opts_id_get(entry, buf, sizeof(buf)); eina_hash_del_by_key(image_ids, buf); } static void _image_entry_free(Image_Data *entry) { File_Data *fentry = entry->file; if (entry->base.request) cserve2_request_cancel_all(entry->base.request, CSERVE2_REQUEST_CANCEL); if (entry->unused) { image_entries_lru = eina_list_remove(image_entries_lru, entry); unused_mem_usage -= _image_entry_size_get(entry); } if (fentry) { fentry->images = eina_list_remove(fentry->images, entry); if (!fentry->images && !fentry->base.references) eina_hash_del_by_key(file_entries, &fentry->base.id); } if (entry->shm) cserve2_shm_unref(entry->shm); free(entry); } static void _hash_image_entry_free(void *data) { Image_Data *entry = data; _image_id_free(entry); _image_entry_free(entry); } static void _file_entry_free(File_Data *entry) { File_Watch *fw; // Should we call free for each of the images too? // If everything goes fine, it's not necessary. if (entry->images) { ERR("Freeing file %d (\"%s:%s\") image data still referenced.", entry->base.id, entry->path, entry->key); eina_list_free(entry->images); } if (entry->base.request) cserve2_request_cancel_all(entry->base.request, CSERVE2_REQUEST_CANCEL); if ((fw = entry->watcher)) { fw->entries = eina_list_remove(fw->entries, entry); if (!fw->entries) eina_hash_del_by_key(file_watch, fw->path); } free(entry->key); free(entry->path); eina_stringshare_del(entry->loader_data); free(entry); } static void _hash_file_entry_free(void *data) { File_Data *entry = data; // TODO: Add some checks to make sure that we are freeing an // unused entry. _file_id_free(entry); _file_entry_free(entry); } static void _file_watch_free(void *data) { File_Watch *fw = data; cserve2_file_change_watch_del(fw->path); eina_stringshare_del(fw->path); eina_list_free(fw->entries); free(fw); } static int _font_entry_cmp(const Font_Entry *k1, int k1_length __UNUSED__, const Font_Entry *k2, int k2_length __UNUSED__) { if (k1->src->key == k2->src->key) { if (k1->size == k2->size) { if (k1->rend_flags == k2->rend_flags) return k1->dpi - k2->dpi; return k1->rend_flags - k2->rend_flags; } return k1->size - k2->size; } return strcmp(k1->src->key, k2->src->key); } static int _font_entry_key_hash(const Font_Entry *key, int key_length __UNUSED__) { int hash; hash = eina_hash_djb2(key->src->key, eina_stringshare_strlen(key->src->key) + 1); hash ^= eina_hash_int32(&key->rend_flags, sizeof(int)); hash ^= eina_hash_int32(&key->size, sizeof(int)); hash ^= eina_hash_int32(&key->dpi, sizeof(int)); return hash; } static void _font_entry_free(Font_Entry *fe) { fash_gl_free(fe->glyphs); fe->src->references--; if (fe->ft) cserve2_font_ft_free(fe->ft); if (fe->src->references <= 0) eina_hash_del_by_key(font_sources, fe->src->key); free(fe); } static void _glyph_free_cb(void *data) { Glyph_Entry *gl = data; free(gl); } static void _font_source_free(Font_Source *fs) { eina_stringshare_del(fs->key); eina_stringshare_del(fs->name); eina_stringshare_del(fs->file); if (fs->ft) cserve2_font_source_ft_free(fs->ft); free(fs); } static void _font_shm_promote(Font_Cache *fc) { Eina_List *l; l = eina_list_data_find_list(font_shm_lru, fc); font_shm_lru = eina_list_demote_list(font_shm_lru, l); } static int _font_shm_size_get(Font_Cache *fc) { int size; size = sizeof(*fc) + cserve2_shm_size_get(fc->shm); return size; } static void _font_shm_free(Font_Cache *fc) { Font_Entry *fe = fc->fe; fe->caches = eina_inlist_remove(fe->caches, EINA_INLIST_GET(fc)); if (fc == fe->last_cache) fe->last_cache = NULL; while (fc->glyphs) { Glyph_Entry *gl = EINA_INLIST_CONTAINER_GET(fc->glyphs, Glyph_Entry); fc->glyphs = eina_inlist_remove(fc->glyphs, fc->glyphs); fash_gl_del(fe->glyphs, gl->index); } cserve2_shm_unref(fc->shm); free(fc); if (!fe->caches) eina_hash_del_by_key(font_entries, fe); } static void _font_shm_lru_flush(void) { Eina_List *l, *l_next; l = font_shm_lru; l_next = eina_list_next(l); while (l && font_mem_usage > max_font_usage) { int size; Font_Cache *fc; fc = eina_list_data_get(l); if (fc->fe->unused && fc->inuse == 0) { font_shm_lru = eina_list_remove_list(font_shm_lru, l); size = _font_shm_size_get(fc); size += fc->nglyphs * sizeof(Glyph_Entry); _font_shm_free(fc); font_mem_usage -= size; } l = l_next; l_next = eina_list_next(l); } } void cserve2_cache_init(void) { file_ids = eina_hash_string_superfast_new(NULL); file_entries = eina_hash_int32_new(_hash_file_entry_free); image_ids = eina_hash_string_superfast_new(NULL); image_entries = eina_hash_string_superfast_new(_hash_image_entry_free); file_watch = eina_hash_string_superfast_new(_file_watch_free); font_sources = eina_hash_string_small_new(EINA_FREE_CB(_font_source_free)); font_entries = eina_hash_new(NULL, EINA_KEY_CMP(_font_entry_cmp), EINA_KEY_HASH(_font_entry_key_hash), EINA_FREE_CB(_font_entry_free), 5); } void cserve2_cache_shutdown(void) { Font_Cache *fc; EINA_LIST_FREE(font_shm_lru, fc) _font_shm_free(fc); eina_hash_free(image_entries); eina_hash_free(image_ids); eina_hash_free(file_entries); eina_hash_free(file_ids); eina_hash_free(file_watch); eina_hash_free(font_entries); eina_hash_free(font_sources); } static Reference * _entry_reference_add(Entry *entry, Client *client, unsigned int client_entry_id) { Reference *ref; // increase reference for this file ref = malloc(sizeof(*ref)); ref->client = client; ref->entry = entry; ref->client_entry_id = client_entry_id; ref->count = 1; entry->references = eina_list_append(entry->references, ref); return ref; } static void _entry_unused_push(Image_Data *e) { int size = _image_entry_size_get(e); if ((size > max_unused_mem_usage) || !(e->doload)) { eina_hash_del_by_key(image_entries, &e->base.id); return; } while (size > (max_unused_mem_usage - unused_mem_usage)) { Entry *ie = eina_list_data_get(eina_list_last(image_entries_lru)); eina_hash_del_by_key(image_entries, &ie->id); } image_entries_lru = eina_list_append(image_entries_lru, e); e->unused = EINA_TRUE; unused_mem_usage += size; } static void _entry_reference_del(Entry *entry, Reference *ref) { entry->references = eina_list_remove(entry->references, ref); if (entry->references) goto free_ref; if (entry->type == CSERVE2_IMAGE_FILE) { File_Data *fentry = (File_Data *)entry; if (fentry->invalid) _file_entry_free(fentry); else if (!fentry->images) eina_hash_del_by_key(file_entries, &entry->id); /* don't free file entries that have images attached to it, they will * be freed when the last unused image is freed */ } else if (entry->type == CSERVE2_IMAGE_DATA) { Image_Data *ientry = (Image_Data *)entry; if (!ientry->file) eina_hash_del_by_key(image_entries, &entry->id); else if (ientry->file->invalid) _image_entry_free(ientry); else _entry_unused_push(ientry); } else if (entry->type == CSERVE2_FONT_ENTRY) { Font_Entry *fe = (Font_Entry *)entry; fe->unused = EINA_TRUE; if (!fe->caches) eina_hash_del_by_key(font_entries, fe); } else ERR("Wrong type of entry."); free_ref: free(ref); } static void _entry_free_cb(void *data) { Reference *ref = data; Entry *entry; DBG("Removing client reference for entry id: %d, client: %d", ref->entry->id, ref->client->id); entry = ref->entry; /* XXX: handle the case of requests being processed gracefully */ if (entry->request /*&& !entry->request->processing*/) { if (entry->type == CSERVE2_IMAGE_FILE) cserve2_request_cancel(entry->request, ref->client, CSERVE2_REQUEST_CANCEL); else if (entry->type == CSERVE2_IMAGE_DATA) cserve2_request_cancel(entry->request, ref->client, CSERVE2_REQUEST_CANCEL); } _entry_reference_del(entry, ref); } static void _font_entry_reference_del(Client *client, Font_Entry *fe) { Eina_List *l; Reference *ref; EINA_LIST_FOREACH(client->fonts.referencing, l, ref) { if (ref->entry == (Entry *)fe) { ref->count--; if (ref->count > 0) break; client->fonts.referencing = eina_list_remove_list( client->fonts.referencing, l); _entry_reference_del(&fe->base, ref); return; } } } void cserve2_cache_client_new(Client *client) { client->files.referencing = eina_hash_int32_new(_entry_free_cb); client->images.referencing = eina_hash_int32_new(_entry_free_cb); client->fonts.referencing = NULL; } void cserve2_cache_client_del(Client *client) { Reference *ref; // will call _entry_free_cb() for every entry eina_hash_free(client->images.referencing); // will call _entry_free_cb() for every entry eina_hash_free(client->files.referencing); EINA_LIST_FREE(client->fonts.referencing, ref) { _entry_reference_del(ref->entry, ref); } } static Image_Data * _image_msg_new(Client *client, Msg_Setopts *msg) { Reference *ref; Image_Data *im_entry; ref = eina_hash_find(client->files.referencing, &msg->file_id); if (!ref) { ERR("Couldn't find file id: %d, for image id: %d", msg->file_id, msg->image_id); cserve2_client_error_send(client, msg->base.rid, CSERVE2_INVALID_CACHE); return NULL; } if (((File_Data *)ref->entry)->invalid) { cserve2_client_error_send(client, msg->base.rid, CSERVE2_FILE_CHANGED); return NULL; } im_entry = calloc(1, sizeof(*im_entry)); im_entry->base.type = CSERVE2_IMAGE_DATA; im_entry->file_id = ref->entry->id; im_entry->file = (File_Data *)ref->entry; im_entry->opts.dpi = msg->opts.dpi; im_entry->opts.w = msg->opts.w; im_entry->opts.h = msg->opts.h; im_entry->opts.scale_down = msg->opts.scale_down; im_entry->opts.rx = msg->opts.rx; im_entry->opts.ry = msg->opts.ry; im_entry->opts.rw = msg->opts.rw; im_entry->opts.rh = msg->opts.rh; im_entry->opts.orientation = msg->opts.orientation; return im_entry; } static void _file_changed_cb(const char *path __UNUSED__, Eina_Bool deleted __UNUSED__, void *data) { File_Watch *fw = data; File_Data *e; Eina_List *l; EINA_LIST_FOREACH(fw->entries, l, e) { Eina_List *ll; Image_Data *ie; e->invalid = EINA_TRUE; e->watcher = NULL; EINA_LIST_FOREACH(e->images, ll, ie) { _image_id_free(ie); eina_hash_set(image_entries, &ie->base.id, NULL); if (ie->base.request /*&& !ie->base.request->processing*/) cserve2_request_cancel_all(ie->base.request, CSERVE2_FILE_CHANGED); ie->base.request = NULL; if (ie->unused) _image_entry_free(ie); } _file_id_free(e); eina_hash_set(file_entries, &e->base.id, NULL); if (e->base.request /*&& !e->base.request->processing*/) cserve2_request_cancel_all(e->base.request, CSERVE2_FILE_CHANGED); e->base.request = NULL; if (!e->images && !e->base.references) _file_entry_free(e); } eina_hash_del_by_key(file_watch, fw->path); } static Font_Source * _cserve2_font_source_find(const char *name) { Font_Source *fs; fs = eina_hash_find(font_sources, name); return fs; } static Font_Entry * _cserve2_font_entry_find(const char *name, unsigned int namelen, unsigned int size, unsigned int rend_flags, unsigned int dpi) { Font_Entry tmp_fe; Font_Source tmp_fs; Font_Entry *fe; tmp_fs.key = eina_stringshare_add_length(name, namelen); tmp_fe.src = &tmp_fs; tmp_fe.size = size; tmp_fe.rend_flags = rend_flags; tmp_fe.dpi = dpi; fe = eina_hash_find(font_entries, &tmp_fe); eina_stringshare_del(tmp_fs.key); return fe; } static void * _font_load_request_build(void *data, int *size) { Font_Entry *fe = data; Slave_Msg_Font_Load *msg = calloc(1, sizeof(*msg)); msg->ftdata1 = fe->src->ft; msg->ftdata2 = fe->ft; msg->rend_flags = fe->rend_flags; msg->size = fe->size; msg->dpi = fe->dpi; msg->name = fe->src->name; msg->file = fe->src->file; *size = 0; _entry_load_start(&fe->base); return msg; } static void _font_load_request_free(void *msg, void *data __UNUSED__) { free(msg); } static Msg_Font_Loaded * _font_load_request_response(Font_Entry *fe, Slave_Msg_Font_Loaded *msg, int *size) { Msg_Font_Loaded *resp; if (!fe->src->ft) fe->src->ft = msg->ftdata1; if (!fe->ft) { fe->ft = msg->ftdata2; _entry_load_finish(&fe->base); } if (fe->base.request) fe->base.request = NULL; /* could be a function, but it's too basic and only used here */ resp = calloc(1, sizeof(*resp)); resp->base.type = CSERVE2_FONT_LOADED; *size = sizeof(*resp); return resp; } static void _font_load_request_failed(Font_Entry *fe, Error_Type error __UNUSED__) { Eina_List *l; Reference *ref; if (fe->base.request) fe->base.request = NULL; EINA_LIST_FOREACH(fe->base.references, l, ref) _font_entry_reference_del(ref->client, fe); } static Slave_Request_Funcs _font_load_funcs = { .msg_create = (Slave_Request_Msg_Create)_font_load_request_build, .msg_free = (Slave_Request_Msg_Free)_font_load_request_free, .response = (Slave_Request_Response)_font_load_request_response, .error = (Slave_Request_Error)_font_load_request_failed }; static Eina_Bool _glyphs_request_check(Glyphs_Request *req, Eina_Bool report_load) { unsigned int i; Font_Entry *fe = req->fe; req->answer = malloc(sizeof(*req->answer) * req->nglyphs); req->nanswer = 0; for (i = req->current; i < req->nglyphs; i++) { Glyph_Entry *ge; ge = fash_gl_find(fe->glyphs, req->glyphs[i]); if (ge) { req->answer[req->nanswer++] = ge; #ifdef DEBUG_LOAD_TIME // calculate average time saved when loading glyphs if (report_load) fe->gl_saved_time += (fe->gl_load_time / fe->nglyphs); #endif ge->fc->inuse++; } else break; } req->current = i; // No glyphs need to be rendered. return (req->nanswer == req->nglyphs); } /* organize answer (cache1{gl1, gl2,}, cache2{gl3,gl4,gl5}, cache3{gl6}) */ static Eina_List * _glyphs_group_create(Glyphs_Request *req) { Eina_List *groups = NULL; unsigned int i; for (i = 0; i < req->nanswer; i++) { Eina_List *l; Glyphs_Group *iter, *gg = NULL; Font_Cache *fc = req->answer[i]->fc; EINA_LIST_FOREACH(groups, l, iter) { if (iter->fc == fc) { gg = iter; break; } } if (!gg) { gg = calloc(1, sizeof(*gg)); gg->fc = fc; groups = eina_list_append(groups, gg); } gg->glyphs = eina_list_append(gg->glyphs, req->answer[i]); } return groups; } static Msg_Font_Glyphs_Loaded * _glyphs_loaded_msg_create(Glyphs_Request *req, int *resp_size) { Msg_Font_Glyphs_Loaded msg; unsigned int size; Eina_List *ll, *answers = NULL; const char *shmname; unsigned int shmsize; unsigned int intsize; char *resp, *buf; Glyphs_Group *iter; memset(&msg, 0, sizeof(msg)); msg.base.type = CSERVE2_FONT_GLYPHS_LOADED; answers = _glyphs_group_create(req); msg.ncaches = eina_list_count(answers); size = sizeof(msg); // calculate size of message // ncaches * sizeof(cache) + nglyphs1 * sizeof(glyph) + // nglyphs2 * sizeof(glyph)... intsize = sizeof(unsigned int); EINA_LIST_FOREACH(answers, ll, iter) { shmname = cserve2_shm_name_get(iter->fc->shm); shmsize = eina_stringshare_strlen(shmname) + 1; // shm namelen + name size += intsize + shmsize; // nglyphs size += intsize; // nglyphs * (index + offset + size + rows + width + pitch + // num_grays + pixel_mode) size += eina_list_count(iter->glyphs) * 8 * intsize; } resp = malloc(size); memcpy(resp, &msg, sizeof(msg)); buf = resp + sizeof(msg); EINA_LIST_FREE(answers, iter) { Glyph_Entry *gl; unsigned int nglyphs; shmname = cserve2_shm_name_get(iter->fc->shm); shmsize = eina_stringshare_strlen(shmname) + 1; memcpy(buf, &shmsize, intsize); buf += intsize; memcpy(buf, shmname, shmsize); buf += shmsize; nglyphs = eina_list_count(iter->glyphs); memcpy(buf, &nglyphs, intsize); buf += intsize; iter->fc->inuse -= eina_list_count(iter->glyphs); EINA_LIST_FREE(iter->glyphs, gl) { memcpy(buf, &gl->index, intsize); buf += intsize; memcpy(buf, &gl->offset, intsize); buf += intsize; memcpy(buf, &gl->size, intsize); buf += intsize; memcpy(buf, &gl->rows, intsize); buf += intsize; memcpy(buf, &gl->width, intsize); buf += intsize; memcpy(buf, &gl->pitch, intsize); buf += intsize; memcpy(buf, &gl->num_grays, intsize); buf += intsize; memcpy(buf, &gl->pixel_mode, intsize); buf += intsize; } /* We are removing SHMs from the beginning of the list, so this * gives a higher priority to them */ _font_shm_promote(iter->fc); eina_list_free(iter->glyphs); free(iter); } *resp_size = size; return (Msg_Font_Glyphs_Loaded *)resp; } static void _glyphs_loaded_send(Glyphs_Request *req, unsigned int rid) { Msg_Font_Glyphs_Loaded *resp; int size; resp = _glyphs_loaded_msg_create(req, &size); resp->base.rid = rid; cserve2_client_send(req->client, &size, sizeof(size)); cserve2_client_send(req->client, resp, size); free(resp); } /* * taken from evas_path.c. It would be good to clean up those utils to * have cserve link against them easily without dragging unneeded dependencies */ #ifdef _WIN32 # define EVAS_PATH_SEPARATOR "\\" #else # define EVAS_PATH_SEPARATOR "/" #endif static char * _file_path_join(const char *path, const char *end) { char *res = NULL; size_t len; if ((!path) && (!end)) return NULL; if (!path) return strdup(end); if (!end) return strdup(path); len = strlen(path); len += strlen(end); len += strlen(EVAS_PATH_SEPARATOR); res = malloc(len + 1); if (!res) return NULL; strcpy(res, path); strcat(res, EVAS_PATH_SEPARATOR); strcat(res, end); return res; } static Glyphs_Request * _glyphs_request_create(Client *client, const char *source, unsigned int sourcelen, const char *name, unsigned int namelen, unsigned int hint, unsigned int rend_flags, unsigned int size, unsigned int dpi, unsigned int *glyphs, unsigned int nglyphs) { char *fullname; Glyphs_Request *req = calloc(1, sizeof(*req)); if (sourcelen == 0) source = NULL; if (namelen == 0) name = NULL; fullname = _file_path_join(source, name); req->fe = _cserve2_font_entry_find(fullname, strlen(fullname) + 1, size, rend_flags, dpi); free(fullname); if (!req->fe) { ERR("No font entry found: source %s, name %s, rendflags: %d, hint: %d," " size: %d, dpi: %d", source, name, rend_flags, hint, size, dpi); free(req); return NULL; } req->client = client; req->nglyphs = nglyphs; req->current = 0; req->glyphs = glyphs; req->hint = hint; return req; } static void _glyphs_request_free(Glyphs_Request *req) { free(req->glyphs); free(req->render); free(req->answer); free(req); } /* add glyphs that are already in cache to the "answers" array, and the ones * that are not cached to the "render" array. */ static void _glyphs_load_request_prepare(Glyphs_Request *req) { unsigned int i, max; req->nrender = 0; Font_Entry *fe = req->fe; if (!fe) { ERR("No font entry for this request."); return; } // Won't render more than this number of glyphs max = req->nglyphs - req->nanswer; req->render = malloc(sizeof(*req->render) * max); for (i = req->current; i < req->nglyphs; i++) { Glyph_Entry *ge; ge = fash_gl_find(fe->glyphs, req->glyphs[i]); if (ge) { req->answer[req->nanswer++] = ge; #ifdef DEBUG_LOAD_TIME // calculate average time saved when loading glyphs fe->gl_saved_time += (fe->gl_load_time / fe->nglyphs); #endif ge->fc->inuse++; } else req->render[req->nrender++] = req->glyphs[i]; } } static void * _glyphs_load_request_build(void *data, int *size __UNUSED__) { Glyphs_Request *req = data; Slave_Msg_Font_Glyphs_Load *msg = NULL; Font_Entry *fe = req->fe; Font_Cache *fc; #ifdef DEBUG_LOAD_TIME gettimeofday(&fe->rstart, NULL); _glyphs_load_request_prepare(req); #endif msg = calloc(1, sizeof(*msg)); msg->font.ftdata1 = fe->src->ft; msg->font.ftdata2 = fe->ft; msg->font.hint = req->hint; msg->font.rend_flags = fe->rend_flags; msg->glyphs.nglyphs = req->nrender; msg->glyphs.glyphs = req->render; // Trying to reuse last filled cache. fc = fe->last_cache; if (fc) { msg->cache.shm = fc->shm; msg->cache.usage = fc->usage; msg->cache.nglyphs = fc->nglyphs; } return msg; } static void _glyphs_load_request_free(void *msg, void *data) { _glyphs_request_free(data); free(msg); } static Msg_Font_Glyphs_Loaded * _glyphs_load_request_response(Glyphs_Request *req, Slave_Msg_Font_Glyphs_Loaded *msg, int *size) { Font_Entry *fe = req->fe; Font_Cache *fc = NULL; unsigned int i = 0; if (fe->last_cache && fe->last_cache->shm == msg->caches[0]->shm) fc = fe->last_cache; while (i < msg->ncaches) { unsigned int j; Slave_Msg_Font_Cache *c = msg->caches[i++]; if (!fc) { fc = malloc(sizeof(*fc)); fe->caches = eina_inlist_append(fe->caches, EINA_INLIST_GET(fc)); fe->last_cache = fc; fc->fe = fe; fc->shm = c->shm; fc->glyphs = NULL; fc->nglyphs = 0; fc->inuse = 0; font_shm_lru = eina_list_append(font_shm_lru, fc); font_mem_usage += _font_shm_size_get(fc); } fc->usage = c->usage; for (j = 0; j < c->nglyphs; j++) { Glyph_Entry *gl = malloc(sizeof(*gl)); gl->fe = fe; gl->fc = fc; gl->index = c->glyphs[j].index; gl->offset = c->glyphs[j].offset; gl->size = c->glyphs[j].size; gl->rows = c->glyphs[j].rows; gl->width = c->glyphs[j].width; gl->pitch = c->glyphs[j].pitch; gl->num_grays = c->glyphs[j].num_grays; gl->pixel_mode = c->glyphs[j].pixel_mode; font_mem_usage += sizeof(*gl); fc->glyphs = eina_inlist_append(fc->glyphs, EINA_INLIST_GET(gl)); fc->nglyphs++; fe->nglyphs++; fash_gl_add(fe->glyphs, gl->index, gl); req->answer[req->nanswer++] = gl; gl->fc->inuse++; } free(c); // FIXME: We are freeing this here because we only do a // simple free on the response message. Later we need to // setup a free callback for the slave response. fc = NULL; } #ifdef DEBUG_LOAD_TIME gettimeofday(&fe->rfinish, NULL); fe->gl_request_time += _timeval_sub(&fe->rfinish, &fe->rstart); fe->gl_load_time += msg->gl_load_time; fe->gl_render_time += msg->gl_render_time; fe->gl_slave_time += msg->gl_slave_time; #endif _font_shm_lru_flush(); return _glyphs_loaded_msg_create(req, size); } static void _glyphs_load_request_failed(void *data __UNUSED__, Error_Type error __UNUSED__) { } static Slave_Request_Funcs _glyphs_load_funcs = { .msg_create = (Slave_Request_Msg_Create)_glyphs_load_request_build, .msg_free = (Slave_Request_Msg_Free)_glyphs_load_request_free, .response = (Slave_Request_Response)_glyphs_load_request_response, .error = (Slave_Request_Error)_glyphs_load_request_failed }; static Eina_Bool _font_entry_stats_cb(const Eina_Hash *hash __UNUSED__, const void *key __UNUSED__, void *data, void *fdata) { Font_Entry *fe = data; Msg_Stats *msg = fdata; Font_Cache *fc; int nrefs = eina_list_count(fe->base.references); msg->fonts.fonts_loaded++; if (fe->unused) msg->fonts.fonts_unused++; // accounting size EINA_INLIST_FOREACH(fe->caches, fc) { unsigned int fc_usage, shmsize; /* This is not real requested usage, but an approximation. We don't * know how many times each glyph would be used by each client, but * assume that a similar set of glyphs from a given font would be used * by each client, thus counting them one time per client referencing * them. */ fc_usage = fc->usage * nrefs; shmsize = cserve2_shm_size_get(fc->shm); msg->fonts.requested_size += fc_usage; msg->fonts.real_size += shmsize; if (fe->unused) msg->fonts.unused_size += shmsize; } #ifdef DEBUG_LOAD_TIME // accounting fonts load time msg->fonts.fonts_load_time += fe->base.load_time; if (fe->caches) { msg->fonts.fonts_used_load_time += fe->base.load_time; msg->fonts.fonts_used_saved_time += fe->base.saved_time; } // accounting glyphs load time msg->fonts.glyphs_load_time += fe->gl_load_time; msg->fonts.glyphs_render_time += fe->gl_render_time; msg->fonts.glyphs_saved_time += fe->gl_saved_time; msg->fonts.glyphs_request_time += fe->gl_request_time; msg->fonts.glyphs_slave_time += fe->gl_slave_time; #endif return EINA_TRUE; } static Eina_Bool _image_file_entry_stats_cb(const Eina_Hash *hash __UNUSED__, const void *key __UNUSED__, void *data, void *fdata) { Msg_Stats *msg = fdata; File_Data *fd = data; // accounting numbers msg->images.files_loaded++; // accounting size msg->images.files_size += sizeof(File_Data) + eina_list_count(fd->images) * sizeof(Eina_List *) + eina_list_count(fd->base.references) * (sizeof(Slave_Request *) + sizeof(Eina_List *)); #ifdef DEBUG_LOAD_TIME // accounting file entries load time msg->images.files_load_time += fd->base.load_time; msg->images.files_saved_time += fd->base.saved_time; #endif return EINA_TRUE; } static Eina_Bool _image_data_entry_stats_cb(const Eina_Hash *hash __UNUSED__, const void *key __UNUSED__, void *data, void *fdata) { Msg_Stats *msg = fdata; Image_Data *id = data; unsigned int image_size; // accounting numbers msg->images.images_loaded++; if (id->unused) msg->images.images_unused++; // accounting size msg->images.images_size += _image_entry_size_get(id) * 1024; if (id->unused) msg->images.unused_size += _image_entry_size_get(id) * 1024; image_size = id->file->w * id->file->h * 4; msg->images.requested_size += (image_size * eina_list_count(id->base.references)); #ifdef DEBUG_LOAD_TIME // accounting image entries load time msg->images.images_load_time += id->base.load_time; msg->images.images_saved_time += id->base.saved_time; #endif return EINA_TRUE; } static void _cserve2_cache_image_stats_get(Msg_Stats *msg) { eina_hash_foreach(file_entries, _image_file_entry_stats_cb, msg); eina_hash_foreach(image_entries, _image_data_entry_stats_cb, msg); } static void _cserve2_cache_font_stats_get(Msg_Stats *msg) { eina_hash_foreach(font_entries, _font_entry_stats_cb, msg); } struct _debug_info { unsigned int size; unsigned int nfonts; }; static Eina_Bool _font_entry_debug_size_cb(const Eina_Hash *hash __UNUSED__, const void *key __UNUSED__, void *data, void *fdata) { struct _debug_info *di = fdata; unsigned int size = di->size; Font_Entry *fe = data; Font_Cache *fc; unsigned int intsize = sizeof(unsigned int); // filelen size += intsize; // file if (fe->src->file) size += strlen(fe->src->file) + 1; // namelen size += intsize; // name if (fe->src->name) size += strlen(fe->src->name) + 1; // rend_flags, size, dpi size += 3 * intsize; // unused size += intsize; // ncaches size += intsize; EINA_INLIST_FOREACH(fe->caches, fc) { Glyph_Entry *gl; // shmnamelen + shmname size += intsize; size += strlen(cserve2_shm_name_get(fc->shm)) + 1; // size + usage size += 2 * intsize; // nglyphs size += intsize; EINA_INLIST_FOREACH(fc->glyphs, gl) { // index, offset, size size += 3 * intsize; // rows, width, pitch size += 3 * intsize; // num_grays, pixel_mode size += 2 * intsize; } } di->size = size; di->nfonts++; return EINA_TRUE; } static Eina_Bool _font_entry_debug_cb(const Eina_Hash *hash __UNUSED__, const void *key __UNUSED__, void *data, void *fdata) { char **pos = fdata; char *buf = *pos; Font_Entry *fe = data; Font_Cache *fc; unsigned int len; unsigned int unused; unsigned int ncaches; unsigned int intsize = sizeof(unsigned int); // filelen + file len = 0; if (fe->src->file) len = strlen(fe->src->file) + 1; memcpy(buf, &len, intsize); buf += intsize; memcpy(buf, fe->src->file, len); buf += len; // namelen + name len = 0; if (fe->src->name) len = strlen(fe->src->name) + 1; memcpy(buf, &len, intsize); buf += intsize; memcpy(buf, fe->src->name, len); buf += len; // rend_flags, size, dpi memcpy(buf, &fe->rend_flags, intsize); buf += intsize; memcpy(buf, &fe->size, intsize); buf += intsize; memcpy(buf, &fe->dpi, intsize); buf += intsize; // unused unused = fe->unused; memcpy(buf, &unused, intsize); buf += intsize; // ncaches ncaches = eina_inlist_count(fe->caches); memcpy(buf, &ncaches, intsize); buf += intsize; EINA_INLIST_FOREACH(fe->caches, fc) { Glyph_Entry *gl; const char *shmname; unsigned int shmsize; // shmnamelen + shmname shmname = cserve2_shm_name_get(fc->shm); len = strlen(shmname) + 1; memcpy(buf, &len, intsize); buf += intsize; memcpy(buf, shmname, len); buf += len; // size, usage, nglyphs shmsize = cserve2_shm_size_get(fc->shm); memcpy(buf, &shmsize, intsize); buf += intsize; memcpy(buf, &fc->usage, intsize); buf += intsize; memcpy(buf, &fc->nglyphs, intsize); buf += intsize; EINA_INLIST_FOREACH(fc->glyphs, gl) { // index, offset, size memcpy(buf, &gl->index, intsize); buf += intsize; memcpy(buf, &gl->offset, intsize); buf += intsize; memcpy(buf, &gl->size, intsize); buf += intsize; // rows, width, pitch memcpy(buf, &gl->rows, intsize); buf += intsize; memcpy(buf, &gl->width, intsize); buf += intsize; memcpy(buf, &gl->pitch, intsize); buf += intsize; // num_grays, pixel_mode memcpy(buf, &gl->num_grays, intsize); buf += intsize; memcpy(buf, &gl->pixel_mode, intsize); buf += intsize; } } *pos = buf; return EINA_TRUE; } static void * _cserve2_cache_font_debug(unsigned int rid, unsigned int *size) { Msg_Font_Debug msg; char *buf, *pos; struct _debug_info di; di.size = sizeof(msg); di.nfonts = 0; memset(&msg, 0, sizeof(msg)); msg.base.type = CSERVE2_FONT_DEBUG; msg.base.rid = rid; // First calculate how much size is needed for this message: // nfonts di.size += sizeof(unsigned int); // size needed for each font entry eina_hash_foreach(font_entries, _font_entry_debug_size_cb, &di); // Now really create the message buf = malloc(di.size); pos = buf; // msg base memcpy(buf, &msg, sizeof(msg)); pos += sizeof(msg); // nfonts memcpy(pos, &di.nfonts, sizeof(unsigned int)); pos += sizeof(unsigned int); eina_hash_foreach(font_entries, _font_entry_debug_cb, &pos); *size = di.size; return buf; } int cserve2_cache_file_open(Client *client, unsigned int client_file_id, const char *path, const char *key, unsigned int rid) { unsigned int file_id; File_Data *entry; Reference *ref; File_Watch *fw; char buf[4906]; // look for this file on client references ref = eina_hash_find(client->files.referencing, &client_file_id); if (ref) { entry = (File_Data *)ref->entry; _entry_load_reused(ref->entry); if (entry->invalid) { cserve2_client_error_send(client, rid, CSERVE2_FILE_CHANGED); return -1; } DBG("found client file id: %d", client_file_id); ref->count++; // File already being loaded, just add the request to be replied if (entry->base.request) cserve2_request_waiter_add(entry->base.request, rid, client); else _image_opened_send(client, entry, rid); return 0; } // search whether the file is already opened by another client snprintf(buf, sizeof(buf), "%s:%s", path, key); file_id = (unsigned int)(uintptr_t)eina_hash_find(file_ids, buf); if (file_id) { DBG("found file_id %u for client file id %d", file_id, client_file_id); entry = eina_hash_find(file_entries, &file_id); if (!entry) { ERR("file \"%s\" is in file_ids hash but not in entries hash.", buf); cserve2_client_error_send(client, rid, CSERVE2_INVALID_CACHE); return -1; } ref = _entry_reference_add((Entry *)entry, client, client_file_id); _entry_load_reused(ref->entry); eina_hash_add(client->files.referencing, &client_file_id, ref); if (entry->base.request) cserve2_request_waiter_add(entry->base.request, rid, client); else // File already loaded, otherwise there would be a request _image_opened_send(client, entry, rid); return 0; } file_id = _file_id++; while ((file_id == 0) || (eina_hash_find(file_entries, &file_id))) file_id = _file_id++; DBG("Creating new entry with file_id: %u for file \"%s:%s\"", file_id, path, key); entry = calloc(1, sizeof(*entry)); entry->base.type = CSERVE2_IMAGE_FILE; entry->path = strdup(path); entry->key = strdup(key); entry->base.id = file_id; eina_hash_add(file_entries, &file_id, entry); eina_hash_add(file_ids, buf, (intptr_t*)(int64_t)file_id); ref = _entry_reference_add((Entry *)entry, client, client_file_id); eina_hash_add(client->files.referencing, &client_file_id, ref); fw = eina_hash_find(file_watch, entry->path); if (!fw) { fw = calloc(1, sizeof(File_Watch)); fw->path = eina_stringshare_add(entry->path); cserve2_file_change_watch_add(fw->path, _file_changed_cb, fw); eina_hash_direct_add(file_watch, fw->path, fw); } fw->entries = eina_list_append(fw->entries, entry); entry->watcher = fw; entry->base.request = cserve2_request_add(CSERVE2_REQ_IMAGE_OPEN, rid, client, NULL, &_open_funcs, entry); // _open_image_default_set(entry); return 0; } void cserve2_cache_file_close(Client *client, unsigned int client_file_id) { Reference *ref = eina_hash_find(client->files.referencing, &client_file_id); if (!ref) { ERR("Couldn't find file %d in client hash.", client_file_id); return; } ref->count--; if (ref->count <= 0) // will call _entry_free_cb() for this entry eina_hash_del_by_key(client->files.referencing, &client_file_id); } int cserve2_cache_image_opts_set(Client *client, Msg_Setopts *msg) { Image_Data *entry; File_Data *fentry = NULL; Reference *ref, *oldref; unsigned int image_id; char buf[4096]; oldref = eina_hash_find(client->images.referencing, &msg->image_id); // search whether the image is already loaded by another client entry = _image_msg_new(client, msg); if (!entry) return -1; image_id = _img_opts_id_get(entry, buf, sizeof(buf)); if (image_id) { // if so, just update the references free(entry); DBG("found image_id %d for client image id %d", image_id, msg->image_id); entry = eina_hash_find(image_entries, &image_id); if (!entry) { ERR("image id %d is in file_ids hash, but not in entries hash" "with entry id %d.", msg->image_id, image_id); cserve2_client_error_send(client, msg->base.rid, CSERVE2_INVALID_CACHE); return -1; } if (entry->unused) { DBG("Re-using old image entry (id: %d) from the LRU list.", entry->base.id); entry->unused = EINA_FALSE; image_entries_lru = eina_list_remove(image_entries_lru, entry); unused_mem_usage -= _image_entry_size_get(entry); } _entry_load_reused(&entry->base); if (oldref && (oldref->entry->id == image_id)) return 0; ref = _entry_reference_add((Entry *)entry, client, msg->image_id); if (oldref) eina_hash_del_by_key(client->images.referencing, &msg->image_id); eina_hash_add(client->images.referencing, &msg->image_id, ref); return 0; } image_id = _image_id++; while ((image_id == 0) || (eina_hash_find(image_entries, &image_id))) image_id = _image_id++; entry->base.id = image_id; eina_hash_add(image_entries, &image_id, entry); eina_hash_add(image_ids, buf, (intptr_t *)(int64_t)image_id); ref = _entry_reference_add((Entry *)entry, client, msg->image_id); if (oldref) eina_hash_del_by_key(client->images.referencing, &msg->image_id); eina_hash_add(client->images.referencing, &msg->image_id, ref); fentry = entry->file; fentry->images = eina_list_append(fentry->images, entry); entry->base.request = cserve2_request_add(CSERVE2_REQ_IMAGE_SPEC_LOAD, 0, NULL, fentry->base.request, &_load_funcs, entry); return 0; } void cserve2_cache_image_load(Client *client, unsigned int client_image_id, unsigned int rid) { Image_Data *entry; Reference *ref; ref = eina_hash_find(client->images.referencing, &client_image_id); if (!ref) { ERR("Can't load: client %d has no image id %d", client->id, client_image_id); return; } entry = (Image_Data *)ref->entry; if (entry->file->invalid) { cserve2_client_error_send(client, rid, CSERVE2_FILE_CHANGED); return; } DBG("Loading image id: %d", ref->entry->id); // File already being loaded, just add the request to be replied if (entry->base.request) { cserve2_request_waiter_add(entry->base.request, rid, client); if (!entry->doload) cserve2_request_type_set(entry->base.request, CSERVE2_REQ_IMAGE_LOAD); } else if (entry->shm) _image_loaded_send(client, entry, rid); else entry->base.request = cserve2_request_add(CSERVE2_REQ_IMAGE_LOAD, rid, client, entry->file->base.request, &_load_funcs, entry); entry->doload = EINA_TRUE; } void cserve2_cache_image_preload(Client *client, unsigned int client_image_id, unsigned int rid) { Image_Data *entry; Reference *ref; ref = eina_hash_find(client->images.referencing, &client_image_id); if (!ref) { ERR("Can't load: client %d has no image id %d", client->id, client_image_id); return; } entry = (Image_Data *)ref->entry; if (entry->file->invalid) { cserve2_client_error_send(client, rid, CSERVE2_FILE_CHANGED); return; } DBG("Loading image id: %d", ref->entry->id); // File already being loaded, just add the request to be replied if (entry->base.request) { cserve2_request_waiter_add(entry->base.request, rid, client); if (!entry->doload) cserve2_request_type_set(entry->base.request, CSERVE2_REQ_IMAGE_LOAD); } else if (entry->shm) _image_loaded_send(client, entry, rid); else entry->base.request = cserve2_request_add(CSERVE2_REQ_IMAGE_LOAD, rid, client, entry->file->base.request, &_load_funcs, entry); entry->doload = EINA_TRUE; } void cserve2_cache_image_unload(Client *client, unsigned int client_image_id) { Reference *ref = eina_hash_find(client->images.referencing, &client_image_id); if (!ref) { ERR("Couldn't find file %d in client hash.", client_image_id); return; } ref->count--; if (ref->count <= 0) // will call _entry_free_cb() for this entry eina_hash_del_by_key(client->images.referencing, &client_image_id); } int cserve2_cache_font_load(Client *client, const char *source, unsigned int sourcelen, const char *name, unsigned int namelen, unsigned int rend_flags, unsigned int size, unsigned int dpi, unsigned int rid) { Reference *ref; Font_Source *fs; Font_Entry *fe; char *fullname; if (sourcelen == 0) source = NULL; if (namelen == 0) name = NULL; fullname = _file_path_join(source, name); fe = _cserve2_font_entry_find(fullname, strlen(fullname) + 1, size, rend_flags, dpi); if (fe) { DBG("found font entry %s, rendflags: %d, size: %d, dpi: %d", name, rend_flags, size, dpi); ref = _entry_reference_add((Entry *)fe, client, 0); client->fonts.referencing = eina_list_append( client->fonts.referencing, ref); _entry_load_reused(&fe->base); fe->unused = EINA_FALSE; if (fe->base.request) cserve2_request_waiter_add(fe->base.request, rid, client); else _font_loaded_send(client, rid); free(fullname); return 0; } fe = calloc(1, sizeof(*fe)); fe->rend_flags = rend_flags; fe->size = size; fe->dpi = dpi; fe->base.type = CSERVE2_FONT_ENTRY; fe->glyphs = fash_gl_new(_glyph_free_cb); ref = _entry_reference_add((Entry *)fe, client, 0); client->fonts.referencing = eina_list_append( client->fonts.referencing, ref); fe->unused = EINA_FALSE; fs = _cserve2_font_source_find(fullname); if (!fs) { fs = calloc(1, sizeof(*fs)); if (source) { fs->key = eina_stringshare_add(fullname); fs->name = eina_stringshare_add_length(name, namelen); fs->file = eina_stringshare_add_length(source, sourcelen); } else { fs->file = eina_stringshare_add_length(name, namelen); fs->key = eina_stringshare_ref(fs->file); } eina_hash_direct_add(font_sources, fs->key, fs); } fe->src = fs; fs->references++; DBG("adding FONT_LOAD '%s' request.", fs->name); fe->base.request = cserve2_request_add(CSERVE2_REQ_FONT_LOAD, rid, client, NULL, &_font_load_funcs, fe); eina_hash_direct_add(font_entries, fe, fe); free(fullname); return 0; } int cserve2_cache_font_unload(Client *client, const char *source, unsigned int sourcelen, const char *name, unsigned int namelen, unsigned int rend_flags, unsigned int size, unsigned int dpi, unsigned int rid __UNUSED__) { Font_Entry *fe; char *fullname; if (sourcelen == 0) source = NULL; if (namelen == 0) name = NULL; fullname = _file_path_join(source, name); fe = _cserve2_font_entry_find(fullname, strlen(fullname) + 1, size, rend_flags, dpi); free(fullname); if (!fe) { ERR("Unreferencing font not found: '%s:%s'.", source, name); return -1; } _font_entry_reference_del(client, fe); return 0; } int cserve2_cache_font_glyphs_load(Client *client, const char *source, unsigned int sourcelen, const char *name, unsigned int namelen, unsigned int hint, unsigned int rend_flags, unsigned int size, unsigned int dpi, unsigned int *glyphs, unsigned int nglyphs, unsigned int rid) { Glyphs_Request *req; req = _glyphs_request_create(client, source, sourcelen, name, namelen, hint, rend_flags, size, dpi, glyphs, nglyphs); if (!req) { free(glyphs); return -1; } if (_glyphs_request_check(req, EINA_TRUE)) { INF("Glyphs already loaded. Sending answer."); _glyphs_loaded_send(req, rid); _glyphs_request_free(req); } else { cserve2_request_add(CSERVE2_REQ_FONT_GLYPHS_LOAD, rid, client, req->fe->base.request, &_glyphs_load_funcs, req); } return 0; } int cserve2_cache_font_glyphs_used(Client *client, const char *source, unsigned int sourcelen, const char *name, unsigned int namelen, unsigned int hint, unsigned int rend_flags, unsigned int size, unsigned int dpi, unsigned int *glyphs, unsigned int nglyphs, unsigned int rid __UNUSED__) { Glyphs_Group *gg; Eina_List *groups; Glyphs_Request *req; DBG("Received report of used glyphs from client %d", client->id); req = _glyphs_request_create(client, source, sourcelen, name, namelen, hint, rend_flags, size, dpi, glyphs, nglyphs); if (!req) { free(glyphs); return 0; } _glyphs_request_check(req, EINA_FALSE); groups = _glyphs_group_create(req); // Promote SHMs which are still cached and in use // TODO: We can use later the information from request_prepare to preload // glyphs which are not cached anymore, but are in use on the client. EINA_LIST_FREE(groups, gg) { _font_shm_promote(gg->fc); eina_list_free(gg->glyphs); free(gg); } _glyphs_request_free(req); return 0; } void cserve2_cache_stats_get(Client *client, unsigned int rid) { Msg_Stats msg; int size; memset(&msg, 0, sizeof(msg)); msg.base.type = CSERVE2_STATS; msg.base.rid = rid; _cserve2_cache_image_stats_get(&msg); _cserve2_cache_font_stats_get(&msg); size = sizeof(msg); cserve2_client_send(client, &size, sizeof(size)); cserve2_client_send(client, &msg, size); } void cserve2_cache_font_debug(Client *client, unsigned int rid) { void *msg; unsigned int size; msg = _cserve2_cache_font_debug(rid, &size); cserve2_client_send(client, &size, sizeof(size)); cserve2_client_send(client, msg, size); free(msg); } evas-1.7.9/src/bin/evas_cserve_main.c0000664000175000017500000013715212175475547014457 00000000000000#ifdef HAVE_CONFIG_H # include "config.h" #endif #include #include #include #ifdef _WIN32 # include #endif #ifdef BUILD_PTHREAD #include #endif #include "Evas.h" #include "evas_cs.h" #define D(...) EINA_LOG_DOM_DBG(_evas_cserve_bin_log_dom, __VA_ARGS__) #ifdef ERR #undef ERR #endif #define ERR(...) EINA_LOG_DOM_ERR(_evas_cserve_bin_log_dom, __VA_ARGS__) #ifdef DBG #undef DBG #endif #define DBG(...) EINA_LOG_DOM_DBG(_evas_cserve_bin_log_dom, __VA_ARGS__) #ifdef WRN #undef WRN #endif #define WRN(...) EINA_LOG_DOM_WARN(_evas_cserve_bin_log_dom, __VA_ARGS__) #ifdef CSERVE_BIN_DEFAULT_COLOR #undef CSERVE_BIN_DEFAULT_COLOR #endif #define CSERVE_BIN_DEFAULT_COLOR EINA_COLOR_BLUE // fixme:'s // // preload - make it work (both) // // pants! typedef struct _Img Img; typedef struct _Lopt Lopt; typedef struct _Load_Inf Load_Inf; struct _Lopt { int scale_down_by; // if > 1 then use this double dpi; // if > 0.0 use this int w, h; // if > 0 use this struct { int x, y, w, h; } region; }; struct _Img { Image_Entry ie; int ref; int dref; int usage; Mem *mem; const char *key; time_t cached; struct { const char *file; const char *key; time_t modtime; time_t last_stat; } file; struct { int load1saved, load2saved; double load1, load2; } stats; Lopt load_opts; struct { int w, h; void *data; Eina_Bool alpha : 1; } image; int incache; LK(lock); Eina_Bool dead : 1; Eina_Bool active : 1; Eina_Bool useless : 1; Eina_Bool killme : 1; }; struct _Load_Inf { Img *img; Client *c; }; // config static int stat_res_interval = 2; static time_t t_now = 0; static int server_id = 0; LK(strshr_freeme_lock); static int strshr_freeme_count = 0; static int strshr_freeme_alloc = 0; static const char **strshr_freeme = NULL; static int cache_cleanme = 0; static Evas_Cache_Image *cache = NULL; static Eina_Hash *active_images = NULL; LK(cache_lock); static Eina_List *cache_images = NULL; static int cache_usage = 0; static int cache_max_usage = 1 * 1024; static int cache_max_adjust = 0; static int cache_item_timeout = -1; static int cache_item_timeout_check = -1; static Mem *stat_mem = NULL; static int _evas_cserve_bin_log_dom = -1; static Eina_List *stat_mems = NULL; static void cache_clean(void); #ifndef _WIN32 static double get_time(void) { struct timeval timev; gettimeofday(&timev, NULL); return (double)timev.tv_sec + (((double)timev.tv_usec) / 1000000); } #else static double get_time(void) { return (double)GetTickCount()/1000.0; } #endif static int mem_total = 0; static int mem_free = 0; static int mem_buffers = 0; static int mem_cached = 0; static void meminfo_check(void) { FILE *f; char buf[1024]; int v; f = fopen("/proc/meminfo", "r"); if (!f) return; if (!fgets(buf, sizeof(buf), f)) goto done; v = 0; if (sscanf(buf, "%*s %i %*s", &v) != 1) goto done; mem_total = v; if (!fgets(buf, sizeof(buf), f)) goto done; v = 0; if (sscanf(buf, "%*s %i %*s", &v) != 1) goto done; mem_free = v; if (!fgets(buf, sizeof(buf), f)) goto done; v = 0; if (sscanf(buf, "%*s %i %*s", &v) != 1) goto done; mem_buffers = v; if (!fgets(buf, sizeof(buf), f)) goto done; v = 0; if (sscanf(buf, "%*s %i %*s", &v) != 1) goto done; mem_cached = v; done: fclose(f); } static int stats_dirty = 0; static int saved_loads = 0; static double saved_load_time = 0; static double saved_load_lifetime = 0; static int saved_loaddatas = 0; static double saved_loaddata_time = 0; static double saved_loaddata_lifetime = 0; static int saved_memory = 0; static int saved_memory_peak = 0; static int alloced_memory = 0; static int alloced_memory_peak = 0; static int real_memory = 0; static int real_memory_peak = 0; static Eina_Bool stats_hash_image_cb(const Eina_Hash *hash __UNUSED__, const void *key __UNUSED__, void *data, void *fdata __UNUSED__) { Img *img = data; saved_load_time += img->stats.load1 * img->stats.load1saved; saved_loaddata_time += img->stats.load2 * img->stats.load2saved; if (img->ref > 1) saved_memory += img->image.w * img->image.h * sizeof(DATA32) * (img->ref - 1); if (img->mem) { alloced_memory += img->image.w * img->image.h * sizeof(DATA32); real_memory += (((img->image.w * img->image.h * sizeof(DATA32)) + 4095) >> 12) << 12; } return 1; } static void stats_calc(void) { Img *img; Eina_List *l; if (!stats_dirty) return; stats_dirty = 0; saved_loads = 0; saved_load_time = 0; saved_loaddatas = 0; saved_loaddata_time = 0; saved_memory = 0; alloced_memory = 0; real_memory = 0; if (active_images) eina_hash_foreach(active_images, stats_hash_image_cb, NULL); LKL(cache_lock); EINA_LIST_FOREACH(cache_images, l, img) { saved_loads += img->stats.load1saved; saved_load_time += img->stats.load1 * img->stats.load1saved; saved_loaddatas += img->stats.load2saved; saved_loaddata_time += img->stats.load2 * img->stats.load2saved; if (img->mem) { alloced_memory += img->image.w * img->image.h * sizeof(DATA32); real_memory += (((img->image.w * img->image.h * sizeof(DATA32)) + 4095) >> 12) << 12; } } LKU(cache_lock); if (saved_memory > saved_memory_peak) saved_memory_peak = saved_memory; if (real_memory > real_memory_peak) real_memory_peak = real_memory; if (alloced_memory > alloced_memory_peak) alloced_memory_peak = alloced_memory; } static void stats_update(void) { stats_dirty = 1; } static void stats_lifetime_update(Img *img) { saved_load_lifetime += img->stats.load1 * img->stats.load1saved; saved_loaddata_lifetime += img->stats.load2 * img->stats.load2saved; } static void stat_clean(Mem *m) { int *ints; int size, pid, *ids, count, i; ints = (int *)m->data; size = ints[0]; if (!evas_cserve_mem_resize(m, size)) return; ints = (int *)m->data; pid = ints[1]; count = (size - (2 * sizeof(int))) / sizeof(int); ids = ints + 2; for (i = 0; i < count; i++) evas_cserve_mem_del(pid, ids[i]); } static int stat_init(Mem *m) { int *ints; ints = (int *)m->data; if (!evas_cserve_mem_resize(m, 2 * sizeof(int))) return 0; ints[0] = 2 * sizeof(int); ints[1] = getpid(); msync(m->data, 2 * sizeof(int), MS_SYNC | MS_INVALIDATE); return 1; } static int stat_update(Mem *m) { Eina_List *l; Mem *m2; int *ints, *ids, i; ints = (int *)m->data; ints[0] = (2 * sizeof(int)) + (eina_list_count(stat_mems) * sizeof(int)); if (!evas_cserve_mem_resize(m, ints[0])) return 0; ints = (int *)m->data; ids = ints + 2; i = 0; EINA_LIST_FOREACH(stat_mems, l, m2) { ids[i] = m2->id; i++; } msync(m->data, ints[0], MS_SYNC | MS_INVALIDATE); return 1; } static Image_Entry * _img_alloc(void) { Img *img; img = calloc(1, sizeof(Img)); LKI(img->lock); return (Image_Entry *)img; } static void _img_dealloc(Image_Entry *ie) { Img *img = (Img *)ie; LKD(img->lock); free(img); } static int _img_surface_alloc(Image_Entry *ie, unsigned int w, unsigned int h) { Img *img = (Img *)ie; img->mem = evas_cserve_mem_new(w * h * sizeof(DATA32), NULL); if (!img->mem) return -1; img->image.data = img->mem->data + img->mem->offset; stat_mems = eina_list_append(stat_mems, img->mem); stat_update(stat_mem); return 0; } static void _img_surface_delete(Image_Entry *ie) { Img *img = (Img *)ie; if (!img->mem) return; stat_mems = eina_list_remove(stat_mems, img->mem); stat_update(stat_mem); evas_cserve_mem_free(img->mem); img->mem = NULL; img->image.data = NULL; } static DATA32 * _img_surface_pixels(Image_Entry *ie) { Img *img = (Img *)ie; return img->image.data; } static int _img_load(Image_Entry *ie) { return evas_common_load_rgba_image_module_from_file(ie); } static void _img_unload(Image_Entry *ie __UNUSED__) { } static void _img_dirty_region(Image_Entry *ie __UNUSED__, unsigned int x __UNUSED__, unsigned int y __UNUSED__, unsigned int w __UNUSED__, unsigned int h __UNUSED__) { } static int _img_dirty(Image_Entry *dst __UNUSED__, const Image_Entry *src __UNUSED__) { return 0; } static int _img_size_set(Image_Entry *dst __UNUSED__, const Image_Entry *src __UNUSED__, unsigned int w __UNUSED__, unsigned int h __UNUSED__) { return 0; } static int _img_copied_data(Image_Entry *ie __UNUSED__, unsigned int w __UNUSED__, unsigned int h __UNUSED__, DATA32 *image_data __UNUSED__, int alpha __UNUSED__, int cspace __UNUSED__) { return 0; } static int _img_data(Image_Entry *ie __UNUSED__, unsigned int w __UNUSED__, unsigned int h __UNUSED__, DATA32 *image_data __UNUSED__, int alpha __UNUSED__, int cspace __UNUSED__) { return 0; } static int _img_color_space(Image_Entry *ie __UNUSED__, int cspace __UNUSED__) { return 0; } static int _img_load_data(Image_Entry *ie) { return evas_common_load_rgba_image_data_from_file(ie); } static int _img_mem_size_get(Image_Entry *ie __UNUSED__) { return 1; } static void img_init(void) { const Evas_Cache_Image_Func cache_funcs = { _img_alloc,//Image_Entry *(*alloc)(void); _img_dealloc,//void (*dealloc)(Image_Entry *im); /* The cache provide some helpers for surface manipulation. */ _img_surface_alloc,//int (*surface_alloc)(Image_Entry *im, unsigned int w, unsigned int h); _img_surface_delete,//void (*surface_delete)(Image_Entry *im); _img_surface_pixels,//DATA32 *(*surface_pixels)(Image_Entry *im); /* The cache is doing the allocation and deallocation, you must just do the rest. */ _img_load,//int (*constructor)(Image_Entry *im); _img_unload,//void (*destructor)(Image_Entry *im); _img_dirty_region,//void (*dirty_region)(Image_Entry *im, unisnged int x, unisnged int y, unisnged int w, unsigned int h); /* Only called when references > 0. Need to provide a fresh copie of im. */ /* The destination surface does have a surface, but no allocated pixel data. */ _img_dirty,//int (*dirty)(Image_Entry *dst, const Image_Entry *src); /* Only called when references == 1. We will call drop on im'. */ /* The destination surface does not have any surface. */ _img_size_set,//int (*size_set)(Image_Entry *dst, const Image_Entry *src, unisnged int w, unisnged int h); /* The destination surface does not have any surface. */ _img_copied_data,//int (*copied_data)(Image_Entry *dst, unisnged int w, unisnged int h, DATA32 *image_data, int alpha, int cspace); /* The destination surface does not have any surface. */ _img_data,//int (*data)(Image_Entry *dst, unsigned int w, unisgned int h, DATA32 *image_data, int alpha, int cspace); _img_color_space,//int (*color_space)(Image_Entry *dst, int cspace); /* This function need to update im->w and im->h. */ _img_load_data,//int (*load)(Image_Entry *im); _img_mem_size_get,//int (*mem_size_get)(Image_Entry *im); NULL,//void (*debug)(const char *context, Image_Entry *im); }; active_images = eina_hash_string_superfast_new(NULL); cache = evas_cache_image_init(&cache_funcs); LKI(cache_lock); LKI(strshr_freeme_lock); } static void img_shutdown(void) { evas_cache_image_shutdown(cache); cache = NULL; // FIXME: shutdown properly LKD(strshr_freeme_lock); LKI(cache_lock); } static Img * img_new(const char *file, const char *key, RGBA_Image_Loadopts *load_opts, const char *bufkey) { Img *img; struct stat st; int ret; Image_Entry *ie; int err = 0; double t; DBG("... stat %s", file); ret = stat(file, &st); if (ret < 0) return NULL; DBG("... load header"); t = get_time(); ie = evas_cache_image_request(cache, file, key, load_opts, &err); t = get_time() - t; DBG("... header done"); if (!ie) return NULL; DBG("... ie->cache = %p", ie->cache); img = (Img *)ie; img->stats.load1 = t; img->key = eina_stringshare_add(bufkey); img->file.modtime = st.st_mtime; img->file.last_stat = t_now; img->file.file = eina_stringshare_add(file); if (key) img->file.key = eina_stringshare_add(key); img->load_opts.scale_down_by = load_opts->scale_down_by; img->load_opts.dpi = load_opts->dpi; img->load_opts.w = load_opts->w; img->load_opts.h = load_opts->h; img->image.w = ie->w; img->image.h = ie->h; img->image.alpha = ie->flags.alpha; img->ref = 1; img->active = 1; img->usage = sizeof(Img) + strlen(img->key) + 1 + strlen(img->file.file) + 1; if (img->file.key) img->usage += strlen(img->file.key) + 1; eina_hash_direct_add(active_images, img->key, img); return img; } static void img_loaddata(Img *img) { double t; if (img->mem) return; t = get_time(); LKL(cache_lock); evas_cache_image_load_data((Image_Entry *)img); t = get_time() - t; img->stats.load2 = t; if (img->image.data) msync(img->image.data, img->image.w * img->image.h * sizeof(DATA32), MS_SYNC | MS_INVALIDATE); if (!img->active) cache_usage -= img->usage; img->usage += (4096 * (((img->image.w * img->image.h * sizeof(DATA32)) + 4095) / 4096)) + sizeof(Mem); if (!img->active) cache_usage += img->usage; LKU(cache_lock); cache_clean(); } static void img_free(Img *img) { if (img->incache > 0) { ERR("EEEEEEEEEEEEEEEEK!"); ERR("EEEEEEEEEEEEEEEEK! %p '%s' still in cache", img, img->file.file); ERR("EEEEEEEEEEEEEEEEK!"); return; } stats_lifetime_update(img); stats_update(); LKL(strshr_freeme_lock); strshr_freeme_count += 3; if (strshr_freeme_count > strshr_freeme_alloc) { const char **tmp; strshr_freeme_alloc += 32; tmp = realloc(strshr_freeme, strshr_freeme_alloc * sizeof(const char **)); if (tmp) strshr_freeme = tmp; else { ERR("realloc of strshr_freeme failed for %i items", strshr_freeme_alloc); strshr_freeme_alloc -= 32; strshr_freeme_count -= 3; return; } } strshr_freeme[strshr_freeme_count - 3] = img->key; strshr_freeme[strshr_freeme_count - 2] = img->file.file; strshr_freeme[strshr_freeme_count - 1] = img->file.key; LKU(strshr_freeme_lock); evas_cache_image_drop((Image_Entry *)img); } static void cache_clean(void) { DBG("... cache clean!!! do"); LKL(cache_lock); while ((cache_usage > ((cache_max_usage + cache_max_adjust) * 1024)) && (cache_images)) { Img *img; Eina_List *l; DBG("... clean loop %i > %i", cache_usage, (cache_max_usage + cache_max_adjust) * 1024); l = eina_list_last(cache_images); // THREAD: called from thread. happens to be safe as it uses no unlocked shared resources if (!l) break; img = l->data; if (!img) break; LKL(img->lock); DBG("... REMOVE %p '%s'", img, img->file.file); #ifdef BUILD_PTHREAD img->killme = 1; img->useless = 1; img->dead = 1; cache_cleanme++; LKU(img->lock); #else cache_images = eina_list_remove_list(cache_images, l); // FIXME: called from thread img->incache--; cache_usage -= img->usage; DBG("... IMG FREE %p", img); img_free(img); #endif } LKU(cache_lock); } static void cache_timeout(time_t t) { Eina_List *l, *l_next; Img *img; if (cache_item_timeout < 0) return; LKL(cache_lock); EINA_LIST_FOREACH_SAFE(cache_images, l, l_next, img) { LKL(img->lock); if ((t - img->cached) > cache_item_timeout) { cache_images = eina_list_remove_list(cache_images, l); img->incache--; cache_usage -= img->usage; img_free(img); } else LKU(img->lock); } LKU(cache_lock); } static void mem_cache_adjust(void) { int pval = cache_max_adjust; int max = 0; if (mem_total <= 0) return; //int mem_used = mem_total - mem_free - mem_cached - mem_buffers; #if 0 // this lets the image cache to grow to fill all real free ram, if // there is any (ie ram unused by disk cache) if (mem_free < mem_total) { cache_max_adjust = mem_free; return; } #endif max = ((mem_free + mem_cached + mem_buffers) / 8) - cache_max_usage; if (max < 0) max = 0; if (max > cache_max_usage) max = cache_max_usage; cache_max_adjust = max - cache_max_usage; if (cache_max_adjust < -cache_max_usage) cache_max_adjust = -cache_max_usage; DBG("... cache_max_adjust = %i", cache_max_adjust); if (pval != cache_max_adjust) { DBG("... cache clean"); // FIXME lock problem cache_clean(); } } static void img_cache(Img *img) { eina_hash_del(active_images, img->key, img); if (img->dead) { DBG("... img %p '%s' dead", img , img->file.file); img_free(img); return; } if ((cache_usage + img->usage) > ((cache_max_usage + cache_max_adjust) * 1024)) { DBG("... img %p '%s' too big for cache", img , img->file.file); img_free(img); return; } DBG("... img %p '%s' cached += %i", img , img->file.file, img->usage); if (img->incache > 0) { ERR("EEEEEEEEEEEEEEEEK!"); ERR("EEEEEEEEEEEEEEEEK! %p '%s' already in cache", img, img->file.file); ERR("EEEEEEEEEEEEEEEEK!"); return; } LKL(cache_lock); cache_images = eina_list_prepend(cache_images, img); LKU(cache_lock); img->incache++; cache_usage += img->usage; img->active = 0; img->cached = t_now; // FIXME: lock problem if (cache_usage > ((cache_max_usage + cache_max_adjust) * 1024)) cache_clean(); } static void img_dead(Img *img) { if (img->active) return; LKL(cache_lock); cache_images = eina_list_remove(cache_images, img); LKU(cache_lock); img->incache--; cache_usage -= img->usage; img_free(img); } static Eina_Bool img_ok(Img *img) { struct stat st; int ret; if (img->dead) return 0; if ((t_now > img->file.last_stat) && ((t_now - img->file.last_stat) < stat_res_interval)) return 1; img->file.last_stat = t_now; ret = stat(img->file.file, &st); img->file.last_stat = t_now; if (ret < 0) { img->dead = 1; img_dead(img); return 0; } if (st.st_mtime != img->file.modtime) { img->dead = 1; img_dead(img); return 0; } return 1; } static Img * img_load(const char *file, const char *key, RGBA_Image_Loadopts *load_opts) { Img *img; char buf[8192]; Eina_List *l, *l_next; if (!file) return NULL; DBG("... img_load '%s'", file); if (key) DBG("... ... key '%s'", key); if (key) snprintf(buf, sizeof(buf), "%s///::/%s/\001/%i/%1.8f/%ix%i", file, key, load_opts->scale_down_by, load_opts->dpi, load_opts->w, load_opts->h); else snprintf(buf, sizeof(buf), "%s///\001/%i/%1.8f/%ix%i", file, load_opts->scale_down_by, load_opts->dpi, load_opts->w, load_opts->h); DBG("... find '%s'", buf); img = eina_hash_find(active_images, buf); if ((img) && (img_ok(img))) { DBG("... found!"); img->stats.load1saved++; img->ref++; DBG("... stats update"); stats_update(); DBG("... return %p", img); return img; } // FIXME: keep hash of cached images too LKL(cache_lock); EINA_LIST_FOREACH_SAFE(cache_images, l, l_next, img) { if (!strcmp(img->key, buf)) { LKL(img->lock); if (img_ok(img)) { DBG("... found cached"); cache_images = eina_list_remove_list(cache_images, l); img->incache--; cache_usage -= img->usage; img->active = 1; img->stats.load1saved++; img->ref++; eina_hash_direct_add(active_images, img->key, img); DBG("... sats update"); stats_update(); DBG("... return %p", img); LKU(img->lock); LKU(cache_lock); return img; } LKU(img->lock); } } LKU(cache_lock); DBG("... ned new img"); return img_new(file, key, load_opts, buf); } static void img_unload(Img *img) { if (img->ref == 0) { ERR("EEEEEEEEEEEEEEEEK!"); ERR("EEEEEEEEEEEEEEEEK! %p '%s' already @ ref 0", img, img->file.file); ERR("EEEEEEEEEEEEEEEEK!"); return; } img->ref--; DBG("... img ref-- = %i", img->ref); if (img->ref == 0) { DBG("... img cache %p '%s'", img, img->file.file); img_cache(img); } } static void img_unloaddata(Img *img) { DBG("img_unloaddata() %p '%s'", img, img->file.file); if ((img->dref <= 0) && (img->useless) && (img->mem)) { Image_Entry *ie = (Image_Entry *)img; DBG("... really do forced unload"); if (!img->active) cache_usage -= img->usage; img->usage -= (4096 * (((img->image.w * img->image.h * sizeof(DATA32)) + 4095) / 4096)) + sizeof(Mem); if (!img->active) cache_usage += img->usage; evas_cserve_mem_free(img->mem); stat_mems = eina_list_remove(stat_mems, img->mem); img->mem = NULL; img->image.data = NULL; img->dref = 0; DBG("... done"); ie->flags.loaded = 0; ie->allocated.w = 0; ie->allocated.h = 0; } } static void img_useless(Img *img) { DBG("img_useless() %p", img); img->useless = 1; if (img->dref <= 0) img_unloaddata(img); } static void img_forcedunload(Img *img) { DBG("img_forcedunload() %p", img); img->dead = 1; img_unload(img); } static void img_preload(Img *img) { DBG("img_preload() %p", img); } static void client_del(void *data, Client *c) { Eina_List *images; Img *img; images = data; DBG("... CLIENT DEL %i", c->pid); EINA_LIST_FREE(images, img) { DBG("... unloaddata img %p", img); img_unloaddata(img); DBG("... unload img %p", img); img_unload(img); } } static Eina_Bool getinfo_hash_image_cb(const Eina_Hash *hash __UNUSED__, const void *key __UNUSED__, void *data, void *fdata __UNUSED__) { Img *img = data; Eina_List **list = fdata; *list = eina_list_append(*list, img); return 1; } #ifdef BUILD_PTHREAD static void * load_data_thread(void *data) { Load_Inf *li = data; Img *img = li->img; Client *c = li->c; Op_Loaddata_Reply msg; free(li); LKL(img->lock); if (img->mem) { memset(&msg, 0, sizeof(msg)); msg.mem.id = img->mem->id; msg.mem.offset = img->mem->offset; msg.mem.size = img->mem->size; DBG("... reply"); evas_cserve_client_send(c, OP_LOADDATA, sizeof(msg), (unsigned char *)(&msg)); LKU(c->lock); return NULL; } img_loaddata(img); memset(&msg, 0, sizeof(msg)); if (img->mem) { msg.mem.id = img->mem->id; msg.mem.offset = img->mem->offset; msg.mem.size = img->mem->size; } else msg.mem.id = msg.mem.offset = msg.mem.size = 0; LKU(img->lock); DBG("... reply"); evas_cserve_client_send(c, OP_LOADDATA, sizeof(msg), (unsigned char *)(&msg)); LKU(c->lock); return NULL; } #endif static int message(void *fdata __UNUSED__, Server *s __UNUSED__, Client *c, int opcode, int size, unsigned char *data) { // copy data into local aligned buffer... in case. unsigned char *tdata = alloca(size + 16); memcpy(tdata, data, size); t_now = time(NULL); DBG("message @ %i...", (int)t_now); switch (opcode) { case OP_INIT: { Op_Init *rep; Op_Init msg; memset(&msg, 0, sizeof(msg)); msg.pid = getpid(); msg.server_id = server_id; msg.handle = c; rep = (Op_Init *)tdata; c->pid = rep->pid; if (rep->server_id == 1) // 2nd channel conn { c->client_main = rep->handle; } c->func = client_del; c->data = NULL; DBG("OP_INIT %i", c->pid); DBG("... reply"); evas_cserve_client_send(c, OP_INIT, sizeof(msg), (unsigned char *)(&msg)); } break; case OP_LOAD: { Op_Load *rep; Op_Load_Reply msg; Img *img; RGBA_Image_Loadopts lopt; char *file = NULL, *key = NULL; memset(&lopt, 0, sizeof lopt); DBG("OP_LOAD %i", c->pid); rep = (Op_Load *)tdata; file = (char*) (data + sizeof(Op_Load)); key = file + strlen(file) + 1; if (key[0] == 0) key = NULL; lopt.scale_down_by = rep->lopt.scale_down_by; lopt.dpi = rep->lopt.dpi; lopt.w = rep->lopt.w; lopt.h = rep->lopt.h; lopt.region.x = rep->lopt.region.x; lopt.region.y = rep->lopt.region.y; lopt.region.w = rep->lopt.region.w; lopt.region.h = rep->lopt.region.h; DBG("... img_load '%s'", file); if (key) DBG("'%s'", (char *)key); else DBG(" '%s'", ""); DBG(" lopt { %i %1.1f %i %i { %i %i %i %i}}", lopt.scale_down_by, lopt.dpi, lopt.w, lopt.h, lopt.region.x, lopt.region.y, lopt.region.w, lopt.region.h); img = img_load(file, key, &lopt); DBG("... img_load = %p", img); if (img) { DBG("... add image to client list"); if (c->client_main) c->client_main->data = eina_list_append(c->client_main->data, img); else c->data = eina_list_append(c->data, img); } memset(&msg, 0, sizeof(msg)); msg.handle = img; if ((img) && (img->mem)) { msg.mem.id = img->mem->id; msg.mem.offset = img->mem->offset; msg.mem.size = img->mem->size; img->stats.load2saved++; stats_update(); } else msg.mem.id = msg.mem.offset = msg.mem.size = 0; if (img) { msg.image.w = img->image.w; msg.image.h = img->image.h; msg.image.alpha = img->image.alpha; } DBG("... reply"); evas_cserve_client_send(c, OP_LOAD, sizeof(msg), (unsigned char *)(&msg)); } break; case OP_UNLOAD: { Op_Unload *rep; Img *img; DBG("OP_UNLOAD %i", c->pid); rep = (Op_Unload *)tdata; img = rep->handle; if ((img) && (rep->server_id == server_id)) { Eina_Bool doflush = 0; DBG("... remove %p from list", img); if (c->client_main) c->client_main->data = eina_list_remove(c->client_main->data, img); else c->data = eina_list_remove(c->data, img); DBG("... unload %p", img); LKL(img->lock); img->ref++; img_unload(img); img->ref--; if (img->ref == 0) doflush = 1; LKU(img->lock); if (doflush) img_cache(img); cache_clean(); } } break; case OP_LOADDATA: { Op_Loaddata *rep; Op_Loaddata_Reply msg; Img *img; DBG("OP_LOADDATA %i", c->pid); rep = (Op_Loaddata *)tdata; img = rep->handle; if ((img) && (rep->server_id == server_id)) { if (img->mem) { DBG("... load saved - cached %p", img); img->stats.load2saved++; stats_update(); memset(&msg, 0, sizeof(msg)); if (img->mem) { msg.mem.id = img->mem->id; msg.mem.offset = img->mem->offset; msg.mem.size = img->mem->size; } else msg.mem.id = msg.mem.offset = msg.mem.size = 0; DBG("... reply"); evas_cserve_client_send(c, OP_LOADDATA, sizeof(msg), (unsigned char *)(&msg)); } else { #ifdef BUILD_PTHREAD pthread_t tid; pthread_attr_t attr; Load_Inf *li; DBG("... load data %p", img); pthread_attr_init(&attr); li = calloc(1, sizeof(Load_Inf)); if (li) { li->img= img; li->c = c; LKL(c->lock); if (pthread_create(&tid, &attr, load_data_thread, li)) { perror("pthread_create()"); } else pthread_detach(tid); } pthread_attr_destroy(&attr); #else img_loaddata(img); memset(&msg, 0, sizeof(msg)); if (img->mem) { msg.mem.id = img->mem->id; msg.mem.offset = img->mem->offset; msg.mem.size = img->mem->size; } else msg.mem.id = msg.mem.offset = msg.mem.size = 0; DBG("... reply"); evas_cserve_client_send(c, OP_LOADDATA, sizeof(msg), (unsigned char *)(&msg)); #endif } } else { msg.mem.id = msg.mem.offset = msg.mem.size = 0; evas_cserve_client_send(c, OP_LOADDATA, sizeof(msg), (unsigned char *)(&msg)); } } break; case OP_UNLOADDATA: { Op_Unloaddata *rep; Img *img; DBG("OP_UNLOADDATA %i", c->pid); rep = (Op_Unloaddata *)tdata; img = rep->handle; if ((img) && (rep->server_id == server_id)) { DBG("... dref--"); LKL(img->lock); img->dref--; if (img->dref < 0) img->dref = 0; DBG("... unload data %p '%s'", img, img->file.file); img_unloaddata(img); LKU(img->lock); } } break; case OP_USELESSDATA: { Op_Unloaddata *rep; Img *img; DBG("OP_USELESSDATA %i", c->pid); rep = (Op_Unloaddata *)tdata; img = rep->handle; if ((img) && (rep->server_id == server_id)) { DBG("... dref--"); LKL(img->lock); img->dref--; if (img->dref < 0) img->dref = 0; DBG("... useless %p", img); img_useless(img); LKU(img->lock); } } break; case OP_PRELOAD: { Op_Preload *rep; Img *img; DBG("OP_PRELOAD %i", c->pid); rep = (Op_Preload *)tdata; img = rep->handle; if ((img) && (rep->server_id == server_id)) { LKL(img->lock); if (c->client_main) c->client_main->data = eina_list_remove(c->client_main->data, img); else c->data = eina_list_remove(c->data, img); // FIXME: preload doesn't work async img_preload(img); LKU(img->lock); } } case OP_FORCEDUNLOAD: { Op_Forcedunload *rep; Img *img; DBG("OP_FORCEDUNLOAD %i", c->pid); rep = (Op_Forcedunload *)tdata; img = rep->handle; if ((img) && (rep->server_id == server_id)) { Eina_Bool doflush = 0; LKL(img->lock); DBG("remove %p from list", img); if (c->client_main) c->client_main->data = eina_list_remove(c->client_main->data, img); else c->data = eina_list_remove(c->data, img); DBG("... forced unload now"); img->ref++; img_forcedunload(img); img->ref--; if (img->ref == 0) doflush = 1; LKU(img->lock); if (doflush) img_cache(img); cache_clean(); } } break; case OP_GETCONFIG: { Op_Getconfig_Reply msg; DBG("OP_GETCONFIG %i", c->pid); msg.cache_max_usage = cache_max_usage; msg.cache_item_timeout = cache_item_timeout; msg.cache_item_timeout_check = cache_item_timeout_check; DBG("... reply"); evas_cserve_client_send(c, OP_GETCONFIG, sizeof(msg), (unsigned char *)(&msg)); } break; case OP_SETCONFIG: { Op_Setconfig *rep; DBG("OP_SETCONFIG %i", c->pid); rep = (Op_Setconfig *)tdata; cache_max_usage = rep->cache_max_usage; cache_item_timeout = rep->cache_item_timeout; cache_item_timeout_check = rep->cache_item_timeout_check; DBG("... cache timeout"); cache_timeout(t_now); DBG("... cache clean"); cache_clean(); } break; case OP_GETSTATS: { Op_Getstats_Reply msg; DBG("OP_GETSTATS %i", c->pid); stats_calc(); msg.saved_memory = saved_memory; msg.wasted_memory = (real_memory - alloced_memory); msg.saved_memory_peak = saved_memory_peak; msg.wasted_memory_peak = (real_memory_peak - alloced_memory_peak); msg.saved_time_image_header_load = saved_load_lifetime + saved_load_time; msg.saved_time_image_data_load = saved_loaddata_lifetime + saved_loaddata_time; DBG("... reply"); evas_cserve_client_send(c, OP_GETSTATS, sizeof(msg), (unsigned char *)(&msg)); } break; case OP_GETINFO: { Op_Getinfo_Reply *msg; int len; Eina_List *imgs = NULL, *l; Img *img; DBG("OP_GETINFO %i", c->pid); len = sizeof(Op_Getinfo_Reply); DBG("... foreach"); if (active_images) eina_hash_foreach(active_images, getinfo_hash_image_cb, &imgs); DBG("... walk foreach list output"); LKL(cache_lock); EINA_LIST_FOREACH(cache_images, l, img) { imgs = eina_list_append(imgs, img); } LKU(cache_lock); DBG("... walk image cache"); EINA_LIST_FOREACH(imgs, l, img) { len += sizeof(Op_Getinfo_Item); if (img->file.file) len += strlen(img->file.file); len++; if (img->file.key) len += strlen(img->file.key); len++; } DBG("... malloc msg"); msg = calloc(1, len); if (msg) { unsigned char *p; DBG("... init msg"); p = (unsigned char *)msg; msg->active.mem_total = 0; msg->active.count = 0; msg->cached.mem_total = 0; msg->cached.count = 0; p += sizeof(Op_Getinfo_Reply); DBG("... walk all imgs"); EINA_LIST_FOREACH(imgs, l, img) { Op_Getinfo_Item it; LKL(img->lock); DBG("... img %p", img); memset(&it, 0, sizeof(Op_Getinfo_Item)); it.file_key_size = 0; if (img->file.file) { strcpy((char *)p + sizeof(Op_Getinfo_Item) + it.file_key_size, img->file.file); it.file_key_size += strlen(img->file.file); } p[sizeof(Op_Getinfo_Item) + it.file_key_size] = 0; it.file_key_size += 1; if (img->file.key) { strcpy((char *)p + sizeof(Op_Getinfo_Item) + it.file_key_size, img->file.key); it.file_key_size += strlen(img->file.key); } p[sizeof(Op_Getinfo_Item) + it.file_key_size] = 0; it.file_key_size += 1; it.w = img->image.w; it.h = img->image.h; it.file_mod_time = img->file.modtime; it.file_checked_time = img->file.last_stat; if (!img->active) it.cached_time = img->cached; else it.cached_time = 0; it.refcount = img->ref; it.data_refcount = img->dref; it.memory_footprint = img->usage; it.head_load_time = img->stats.load1; it.data_load_time = img->stats.load2; it.alpha = img->image.alpha; if (img->image.data) it.data_loaded = 1; else it.data_loaded = 0; it.active = img->active; if (it.active) { msg->active.count++; msg->active.mem_total += img->usage; } else { msg->cached.count++; msg->cached.mem_total += img->usage; } it.dead = img->dead; it.useless = img->useless; DBG("... memcpy %p %p %zu ", p, &it, sizeof(Op_Getinfo_Item)); memcpy(p, &it, sizeof(Op_Getinfo_Item)); DBG("... memcpy done %p", img); p += sizeof(Op_Getinfo_Item) + it.file_key_size; LKU(img->lock); } DBG("... walk all imgs done"); msg->active.mem_total = (msg->active.mem_total + 1023) / 1024; msg->cached.mem_total = (msg->cached.mem_total + 1023) / 1024; DBG("... reply"); evas_cserve_client_send(c, OP_GETINFO, len, (unsigned char *)msg); free(msg); } else { DBG("... reply empty"); evas_cserve_client_send(c, OP_GETINFO, 0, NULL); } DBG("... free imgs list"); if (imgs) eina_list_free(imgs); } break; default: DBG("OP_... UNKNOWN??? %i opcode: %i", c->pid, opcode); break; } return 0; } static void parse_args(int argc, char **argv) { int i; for (i = 1; i < argc; i++) { if ((!strcmp(argv[i], "-h")) || (!strcmp(argv[i], "-help")) || (!strcmp(argv[i], "--help"))) { printf("Options:\n" "\t-h This help\n" "\t-csize Size of speculative cache (Kb)\n" "\t-ctime Maximum life of a cached image (seconds)\n" "\t-ctimecheck Time between checking the cache for timeouts (seconds)\n" "\t-debug Enable debug logging\n" "\n"); exit(0); } else if ((!strcmp(argv[i], "-csize")) && (i < (argc - 1))) { i++; cache_max_usage = atoi(argv[i]); } else if ((!strcmp(argv[i], "-ctime")) && (i < (argc - 1))) { i++; cache_item_timeout = atoi(argv[i]); } else if ((!strcmp(argv[i], "-ctimecheck")) && (i < (argc - 1))) { i++; cache_item_timeout_check = atoi(argv[i]); } else if (!strcmp(argv[i], "-debug")) { eina_log_level_set(EINA_LOG_LEVEL_DBG); } } } static int exit_flag = 0; static void exit_handler(int x __UNUSED__, siginfo_t *info __UNUSED__, void *data __UNUSED__) { exit_flag = 1; } static void pipe_handler(int x __UNUSED__, siginfo_t *info __UNUSED__, void *data __UNUSED__) { } static void signal_init(void) { struct sigaction action, old_action; action.sa_handler = NULL; action.sa_sigaction = exit_handler; action.sa_flags = SA_RESTART | SA_SIGINFO; sigemptyset(&action.sa_mask); sigaction(SIGINT, &action, &old_action); action.sa_handler = NULL; action.sa_sigaction = exit_handler; action.sa_flags = SA_RESTART | SA_SIGINFO; sigemptyset(&action.sa_mask); sigaction(SIGTERM, &action, &old_action); action.sa_handler = NULL; action.sa_sigaction = exit_handler; action.sa_flags = SA_RESTART | SA_SIGINFO; sigemptyset(&action.sa_mask); sigaction(SIGQUIT, &action, &old_action); action.sa_handler = NULL; action.sa_sigaction = pipe_handler; action.sa_flags = SA_RESTART | SA_SIGINFO; sigemptyset(&action.sa_mask); sigaction(SIGPIPE, &action, &old_action); // SIGUSR1 // SIGUSR2 // SIGHUP // SIGCHLD // SIGSEGV // SIGILL // SIGBUS // SIGFPE // SIGABRT } static void signal_shutdown(void) { } int main(int argc, char **argv) { Server *s; time_t last_check, t, t_next; pid_t pid; t = time(NULL); pid = getpid(); t ^= (pid << 24) | (pid << 16) | (pid << 8) | (pid); srand(t); server_id = rand(); parse_args(argc, argv); unsetenv("EVAS_CSERVE"); eina_init(); _evas_cserve_bin_log_dom = eina_log_domain_register ("evas_cserve_bin", CSERVE_BIN_DEFAULT_COLOR); if (_evas_cserve_bin_log_dom < 0) { EINA_LOG_ERR("impossible to create a log domain."); eina_shutdown(); exit(1); } DBG("evas init..."); evas_init(); DBG("img init..."); img_init(); DBG("signal init..."); signal_init(); DBG("cserve add..."); s = evas_cserve_server_add(); if (!s) { ERR("ERROR: server socket init fail. abort."); goto error; } DBG("mem open (status)..."); stat_mem = evas_cserve_mem_open(0, 0, "status", sizeof(int), 0); if (stat_mem) { WRN("WARNING: previous evas_cserve left garbage. cleaning up."); stat_clean(stat_mem); evas_cserve_mem_close(stat_mem); stat_mem = NULL; } DBG("mem new (status)..."); stat_mem = evas_cserve_mem_new(sizeof(int), "status"); if (!stat_mem) { ERR("ERROR: cannot create status shmseg. abort."); goto error; } DBG("init status..."); if (!stat_init(stat_mem)) { ERR("cannot init status shmseg. abort."); evas_cserve_mem_free(stat_mem); stat_mem = NULL; goto error; } DBG("cset server message handler..."); evas_cserve_server_message_handler_set(s, message, NULL); last_check = time(NULL); t_next = 0; if (cache_item_timeout_check > 0) t_next = cache_item_timeout_check; DBG("LOOP!!! ..."); for (;;) { /* fixme: timeout 0 only her - future use timeouts for timed * housekeping */ if (exit_flag) break; DBG("wait for messages..."); evas_cserve_server_wait(s, t_next * 1000000); if (exit_flag) break; t = time(NULL); t_next = t - last_check; if ((cache_item_timeout_check > 0) && ((t_next) >= cache_item_timeout_check)) { DBG("check timeout of items..."); t_next = cache_item_timeout_check; last_check = t; DBG("cache timeout..."); cache_timeout(t); DBG("meminfo check..."); meminfo_check(); DBG("mem cache adjust..."); mem_cache_adjust(); } if ((t_next <= 0) && (cache_item_timeout_check > 0)) t_next = 1; DBG("sleep for %isec...", (int)t_next); LKL(strshr_freeme_lock); if (strshr_freeme_count > 0) { int i; for (i = 0; i < strshr_freeme_count; i++) eina_stringshare_del(strshr_freeme[i]); strshr_freeme_count = 0; } LKU(strshr_freeme_lock); LKL(cache_lock); if (cache_cleanme) { Eina_List *l; Img *img; Eina_List *kills = NULL; EINA_LIST_FOREACH(cache_images, l, img) { LKL(img->lock); if (img->killme) kills = eina_list_append(kills, img); LKU(img->lock); } while (kills) { img = kills->data; kills = eina_list_remove_list(kills, kills); LKL(img->lock); cache_images = eina_list_remove(cache_images, img); img->incache--; cache_usage -= img->usage; DBG("... IMG FREE %p", img); img_free(img); } cache_cleanme = 0; } LKU(cache_lock); } DBG("end loop..."); error: DBG("cleanup..."); if (stat_mem) { DBG("clean mem stat..."); stat_clean(stat_mem); } DBG("signal shutdown..."); signal_shutdown(); DBG("img shutdown..."); img_shutdown(); if (stat_mem) { DBG("free stat mem..."); evas_cserve_mem_free(stat_mem); stat_mem = NULL; } if (s) { DBG("del server..."); evas_cserve_server_del(s); } DBG("evas shutdown..."); evas_shutdown(); eina_log_domain_unregister(_evas_cserve_bin_log_dom); DBG("eina shutdown..."); eina_shutdown(); DBG("exit.."); return 0; } evas-1.7.9/src/bin/Makefile.am0000664000175000017500000000435612175475547013035 00000000000000MAINTAINERCLEANFILES = Makefile.in if EVAS_CSERVE AM_CPPFLAGS = \ -I. \ -I$(top_srcdir)/src/lib \ -I$(top_srcdir)/src/lib/include \ -I$(top_srcdir)/src/lib/cserve \ -DPACKAGE_BIN_DIR=\"$(bindir)\" \ -DPACKAGE_LIB_DIR=\"$(libdir)\" \ -DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \ @EVAS_GENERAL_CFLAGS@ \ @FREETYPE_CFLAGS@ \ @FRIBIDI_CFLAGS@ \ @EET_CFLAGS@ \ @FONTCONFIG_CFLAGS@ \ @pthread_cflags@ \ @PIXMAN_CFLAGS@ bin_PROGRAMS = evas_cserve evas_cserve_tool evas_cserve_SOURCES = \ evas_cserve_main.c evas_cserve_LDADD = \ $(top_builddir)/src/lib/libevas.la \ @pthread_libs@ \ @EVAS_GENERAL_LIBS@ evas_cserve_tool_LDFLAGS = evas_cserve_tool_SOURCES = \ evas_cserve_tool.c evas_cserve_tool_LDADD = \ $(top_builddir)/src/lib/libevas.la \ @pthread_libs@ \ @EVAS_GENERAL_LIBS@ endif if EVAS_CSERVE2 SUBDIRS = loaders libexec_PROGRAMS = evas_cserve2 evas_cserve2_slave dummy_slave bin_PROGRAMS = evas_cserve2_client evas_cserve2_usage evas_cserve2_debug AM_CPPFLAGS = \ -I. \ -I$(top_srcdir)/src/lib \ -I$(top_srcdir)/src/lib/include \ -I$(top_srcdir)/src/lib/cserve2 \ -DPACKAGE_BIN_DIR=\"$(bindir)\" \ -DPACKAGE_LIB_DIR=\"$(libdir)\" \ -DPACKAGE_LIBEXEC_DIR=\"$(libexecdir)\" \ @FREETYPE_CFLAGS@ \ @EVAS_GENERAL_CFLAGS@ \ @EET_CFLAGS@ evas_cserve2_SOURCES = \ evas_cserve2.h \ evas_cserve2_slave.h \ evas_cserve2_main.c \ evas_cserve2_slaves.c \ evas_cserve2_messages.c \ evas_cserve2_shm.c \ evas_cserve2_cache.c \ evas_cserve2_requests.c \ evas_cserve2_fonts.c \ evas_cserve2_main_loop_linux.c libevas_cserve2_utils_la = $(top_builddir)/src/lib/cserve2/libevas_cserve2_utils.la evas_cserve2_LDADD = \ @FREETYPE_LIBS@ \ @EVAS_GENERAL_LIBS@ \ @EFL_SHM_OPEN_LIBS@ \ @EET_LIBS@ \ $(libevas_cserve2_utils_la) evas_cserve2_client_SOURCES = \ evas_cserve2_client.c evas_cserve2_usage_SOURCES = \ evas_cserve2_usage.c evas_cserve2_debug_SOURCES = \ evas_cserve2_debug.c evas_cserve2_usage_LDADD = \ @EVAS_GENERAL_LIBS@ evas_cserve2_debug_LDADD = \ @EVAS_GENERAL_LIBS@ evas_cserve2_slave_SOURCES = \ evas_cserve2_slave.c \ evas_cserve2_utils.c evas_cserve2_slave_LDFLAGS = -export-dynamic evas_cserve2_slave_LDADD = \ @EVAS_GENERAL_LIBS@ \ @EFL_SHM_OPEN_LIBS@ dummy_slave_SOURCES = \ dummy_slave.c dummy_slave_LDADD = \ @EVAS_GENERAL_LIBS@ \ @EFL_SHM_OPEN_LIBS@ endif evas-1.7.9/src/bin/dummy_slave.c0000664000175000017500000001173612175475547013472 00000000000000#ifdef HAVE_CONFIG_H # include "config.h" #endif #include #include #include #include #include #include #include #include "evas_cserve2.h" static Eina_Bool command_read(int fd, Slave_Command *cmd, void **params) { ssize_t ret; int ints[2], size, got = 0; char *buf; ret = read(fd, ints, sizeof(int) * 2); if (ret < (int)sizeof(int) * 2) return EINA_FALSE; size = ints[0]; buf = malloc(size); if (!buf) return EINA_FALSE; do { ret = read(fd, buf + got, size - got); if (ret < 0) { /* EINTR means we were interrupted by a signal before anything * was sent, and if we are back here it means that signal was * not meant for us to die. Any other error here is fatal and * should result in the slave terminating. */ if (errno == EINTR) continue; free(buf); return EINA_FALSE; } got += ret; } while (got < size); *cmd = ints[1]; *params = buf; return EINA_TRUE; } static Eina_Bool response_send(int fd, Slave_Command cmd, void *resp, int size) { int sent = 0, ints[2]; const char *data = resp; ssize_t ret; ints[0] = size; ints[1] = cmd; ret = write(fd, ints, sizeof(int) * 2); if (ret < 0) return EINA_FALSE; if (!size) return EINA_TRUE; do { ret = write(fd, data + sent, size - sent); if (ret < 0) { /* EINTR means we were interrupted by a signal before anything * was sent, and if we are back here it means that signal was * not meant for us to die. Any other error here is fatal and * should result in the slave terminating. */ if (errno == EINTR) continue; return EINA_FALSE; } sent += ret; } while (sent < size); return EINA_TRUE; } static Eina_Bool error_send(int fd, Error_Type err) { return response_send(fd, ERROR, &err, sizeof(Error_Type)); } static void * _cserve2_shm_map(const char *name, size_t length, off_t offset) { void *map; int fd; fd = shm_open(name, O_RDWR, 0); if (fd == -1) return MAP_FAILED; map = mmap(NULL, length, PROT_WRITE, MAP_SHARED, fd, offset); close(fd); return map; } /* static void _cserve2_shm_unmap(void *map, size_t length) { munmap(map, length); } */ static Error_Type image_open(const char *file __UNUSED__, const char *key __UNUSED__, Slave_Msg_Image_Opened *result) { memset(result, 0, sizeof(*result)); result->w = 32; result->h = 32; result->frame_count = 1; result->loop_count = 0; result->loop_hint = 0; result->alpha = EINA_TRUE; return CSERVE2_NONE; } static Error_Type image_load(const char *shmfile, Slave_Msg_Image_Load *params) { char *map = _cserve2_shm_map(shmfile, params->shm.mmap_size, params->shm.mmap_offset); if (map == MAP_FAILED) return CSERVE2_RESOURCE_ALLOCATION_FAILED; memset(map + params->shm.image_offset, 'A', params->shm.image_size); return CSERVE2_NONE; } int main(int c, char **v) { int wfd, rfd; Slave_Command cmd; void *params = NULL;; Eina_Bool quit = EINA_FALSE; if (c < 3) return 1; wfd = atoi(v[1]); rfd = atoi(v[2]); while (!quit) { if (!command_read(rfd, &cmd, ¶ms)) { error_send(wfd, CSERVE2_INVALID_COMMAND); continue; } switch (cmd) { case IMAGE_OPEN: { Slave_Msg_Image_Opened result; Slave_Msg_Image_Open *p; Error_Type err; const char *file, *key; p = params; file = (const char *)(p + sizeof(*p)); key = file + strlen(file) + 1; if ((err = image_open(file, key, &result)) != CSERVE2_NONE) error_send(wfd, err); else response_send(wfd, IMAGE_OPEN, &result, sizeof(Slave_Msg_Image_Opened)); break; } case IMAGE_LOAD: { Slave_Msg_Image_Load *load_args = params; Error_Type err; const char *shmfile = ((const char *)params) + sizeof(Slave_Msg_Image_Load); if ((err = image_load(shmfile, load_args)) != CSERVE2_NONE) error_send(wfd, err); else response_send(wfd, IMAGE_LOAD, NULL, 0); break; } case SLAVE_QUIT: { quit = EINA_TRUE; break; } default: error_send(wfd, CSERVE2_INVALID_COMMAND); } free(params); } return 0; } evas-1.7.9/src/lib/0000775000175000017500000000000012234557316011036 500000000000000evas-1.7.9/src/lib/Makefile.in0000664000175000017500000013255312234557301013026 00000000000000# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ @EVAS_STATIC_BUILD_SOFTWARE_GENERIC_TRUE@am__append_1 = ../modules/engines/software_generic/ @EVAS_STATIC_BUILD_SOFTWARE_GENERIC_TRUE@am__append_2 = ../modules/engines/software_generic/libevas_engine_software_generic.la @EVAS_STATIC_BUILD_BUFFER_TRUE@am__append_3 = ../modules/engines/buffer/ @EVAS_STATIC_BUILD_BUFFER_TRUE@am__append_4 = ../modules/engines/buffer/libevas_engine_buffer.la @EVAS_STATIC_BUILD_DIRECT3D_TRUE@am__append_5 = ../modules/engines/direct3d/ @EVAS_STATIC_BUILD_DIRECT3D_TRUE@am__append_6 = ../modules/engines/direct3d/libevas_engine_direct3d.la @EVAS_STATIC_BUILD_DIRECT3D_TRUE@am__append_7 = @evas_engine_direct3d_libs@ @EVAS_STATIC_BUILD_DIRECTFB_TRUE@am__append_8 = ../modules/engines/directfb/ @EVAS_STATIC_BUILD_DIRECTFB_TRUE@am__append_9 = ../modules/engines/directfb/libevas_engine_directfb.la @EVAS_STATIC_BUILD_DIRECTFB_TRUE@am__append_10 = @evas_engine_directfb_libs@ @EVAS_STATIC_BUILD_FB_TRUE@am__append_11 = ../modules/engines/fb/ @EVAS_STATIC_BUILD_FB_TRUE@am__append_12 = ../modules/engines/fb/libevas_engine_fb.la @EVAS_STATIC_BUILD_FB_TRUE@am__append_13 = @evas_engine_fb_libs@ @EVAS_STATIC_BUILD_GL_X11_TRUE@am__append_14 = \ @EVAS_STATIC_BUILD_GL_X11_TRUE@ ../modules/engines/gl_common \ @EVAS_STATIC_BUILD_GL_X11_TRUE@ ../modules/engines/gl_x11 @EVAS_STATIC_BUILD_GL_X11_TRUE@am__append_15 = \ @EVAS_STATIC_BUILD_GL_X11_TRUE@ ../modules/engines/gl_x11/libevas_engine_gl_x11.la @EVAS_STATIC_BUILD_GL_X11_TRUE@am__append_16 = @evas_engine_gl_common_libs@ @evas_engine_gl_xlib_libs@ @EVAS_STATIC_BUILD_GL_SDL_TRUE@am__append_17 = \ @EVAS_STATIC_BUILD_GL_SDL_TRUE@ ../modules/engines/gl_common \ @EVAS_STATIC_BUILD_GL_SDL_TRUE@ ../modules/engines/gl_sdl @EVAS_STATIC_BUILD_GL_SDL_TRUE@am__append_18 = \ @EVAS_STATIC_BUILD_GL_SDL_TRUE@ ../modules/engines/gl_sdl/libevas_engine_gl_sdl.la @EVAS_STATIC_BUILD_GL_SDL_TRUE@am__append_19 = @evas_engine_gl_common_libs@ @evas_engine_gl_sdl_libs@ @EVAS_STATIC_BUILD_PSL1GHT_TRUE@am__append_20 = ../modules/engines/psl1ght/ @EVAS_STATIC_BUILD_PSL1GHT_TRUE@am__append_21 = ../modules/engines/psl1ght/libevas_engine_psl1ght.la @EVAS_STATIC_BUILD_PSL1GHT_TRUE@am__append_22 = @evas_engine_psl1ght_libs@ @EVAS_STATIC_BUILD_SOFTWARE_16_TRUE@am__append_23 = ../modules/engines/software_16/ @EVAS_STATIC_BUILD_SOFTWARE_16_TRUE@am__append_24 = ../modules/engines/software_16/libevas_engine_software_16.la @EVAS_STATIC_BUILD_SOFTWARE_16_WINCE_TRUE@am__append_25 = ../modules/engines/software_16_wince/ @EVAS_STATIC_BUILD_SOFTWARE_16_WINCE_TRUE@am__append_26 = ../modules/engines/software_16_wince/libevas_engine_software_16_wince.la @EVAS_STATIC_BUILD_SOFTWARE_16_WINCE_TRUE@am__append_27 = @evas_engine_software_16_wince_libs@ @EVAS_STATIC_BUILD_SOFTWARE_16_X11_TRUE@am__append_28 = ../modules/engines/software_16_x11/ @EVAS_STATIC_BUILD_SOFTWARE_16_X11_TRUE@am__append_29 = ../modules/engines/software_16_x11/libevas_engine_software_16_x11.la @EVAS_STATIC_BUILD_SOFTWARE_16_X11_TRUE@am__append_30 = @evas_engine_software_16_x11_libs@ @EVAS_STATIC_BUILD_SOFTWARE_8_TRUE@am__append_31 = ../modules/engines/software_8/ @EVAS_STATIC_BUILD_SOFTWARE_8_TRUE@am__append_32 = ../modules/engines/software_8/libevas_engine_software_8.la @EVAS_STATIC_BUILD_SOFTWARE_8_X11_TRUE@am__append_33 = ../modules/engines/software_8_x11/ @EVAS_STATIC_BUILD_SOFTWARE_8_X11_TRUE@am__append_34 = ../modules/engines/software_8_x11/libevas_engine_software_8_x11.la @EVAS_STATIC_BUILD_SOFTWARE_8_X11_TRUE@am__append_35 = @evas_engine_software_8_x11_libs@ @EVAS_STATIC_BUILD_SOFTWARE_16_SDL_TRUE@am__append_36 = \ @EVAS_STATIC_BUILD_SOFTWARE_16_SDL_TRUE@ ../modules/engines/software_16_sdl/ @EVAS_STATIC_BUILD_SOFTWARE_16_SDL_TRUE@am__append_37 = \ @EVAS_STATIC_BUILD_SOFTWARE_16_SDL_TRUE@ ../modules/engines/software_16_sdl/libevas_engine_software_16_sdl.la @EVAS_STATIC_BUILD_SOFTWARE_16_SDL_TRUE@am__append_38 = @SDL_LIBS@ @EVAS_STATIC_BUILD_SOFTWARE_DDRAW_TRUE@am__append_39 = ../modules/engines/software_ddraw/ @EVAS_STATIC_BUILD_SOFTWARE_DDRAW_TRUE@am__append_40 = ../modules/engines/software_ddraw/libevas_engine_software_ddraw.la @EVAS_STATIC_BUILD_SOFTWARE_DDRAW_TRUE@am__append_41 = @evas_engine_software_ddraw_libs@ @EVAS_STATIC_BUILD_SOFTWARE_GDI_TRUE@am__append_42 = ../modules/engines/software_gdi/ @EVAS_STATIC_BUILD_SOFTWARE_GDI_TRUE@am__append_43 = ../modules/engines/software_gdi/libevas_engine_software_gdi.la @EVAS_STATIC_BUILD_SOFTWARE_GDI_TRUE@am__append_44 = @evas_engine_software_gdi_libs@ @EVAS_STATIC_BUILD_SOFTWARE_X11_TRUE@am__append_45 = ../modules/engines/software_x11/ @EVAS_STATIC_BUILD_SOFTWARE_X11_TRUE@am__append_46 = ../modules/engines/software_x11/libevas_engine_software_x11.la @EVAS_STATIC_BUILD_SOFTWARE_X11_TRUE@am__append_47 = @evas_engine_software_xlib_libs@ @evas_engine_software_xcb_libs@ @EVAS_STATIC_BUILD_WAYLAND_SHM_TRUE@am__append_48 = ../modules/engines/wayland_shm/ @EVAS_STATIC_BUILD_WAYLAND_SHM_TRUE@am__append_49 = ../modules/engines/wayland_shm/libevas_engine_wayland_shm.la @EVAS_STATIC_BUILD_WAYLAND_SHM_TRUE@am__append_50 = @evas_engine_wayland_shm_libs@ @EVAS_STATIC_BUILD_BMP_TRUE@am__append_51 = ../modules/loaders/bmp @EVAS_STATIC_BUILD_BMP_TRUE@am__append_52 = ../modules/loaders/bmp/libevas_loader_bmp.la @EVAS_STATIC_BUILD_BMP_TRUE@am__append_53 = @evas_image_loader_bmp_libs@ @EVAS_STATIC_BUILD_EDB_TRUE@am__append_54 = ../modules/savers/edb ../modules/loaders/edb @EVAS_STATIC_BUILD_EDB_TRUE@am__append_55 = ../modules/savers/edb/libevas_saver_edb.la ../modules/loaders/edb/libevas_loader_edb.la @EVAS_STATIC_BUILD_EDB_TRUE@am__append_56 = @evas_image_loader_edb_libs@ @EVAS_STATIC_BUILD_EET_TRUE@am__append_57 = ../modules/savers/eet ../modules/loaders/eet @EVAS_STATIC_BUILD_EET_TRUE@am__append_58 = ../modules/savers/eet/libevas_saver_eet.la ../modules/loaders/eet/libevas_loader_eet.la @EVAS_STATIC_BUILD_EET_TRUE@am__append_59 = @evas_image_loader_eet_libs@ @EVAS_STATIC_BUILD_GENERIC_TRUE@am__append_60 = ../modules/loaders/generic @EVAS_STATIC_BUILD_GENERIC_TRUE@am__append_61 = ../modules/loaders/generic/libevas_loader_generic.la @EVAS_STATIC_BUILD_GENERIC_TRUE@am__append_62 = @evas_image_loader_generic_libs@ @EVAS_STATIC_BUILD_GIF_TRUE@am__append_63 = ../modules/loaders/gif @EVAS_STATIC_BUILD_GIF_TRUE@am__append_64 = ../modules/loaders/gif/libevas_loader_gif.la @EVAS_STATIC_BUILD_GIF_TRUE@am__append_65 = @evas_image_loader_gif_libs@ @EVAS_STATIC_BUILD_ICO_TRUE@am__append_66 = ../modules/loaders/ico @EVAS_STATIC_BUILD_ICO_TRUE@am__append_67 = ../modules/loaders/ico/libevas_loader_ico.la @EVAS_STATIC_BUILD_ICO_TRUE@am__append_68 = @evas_image_loader_ico_libs@ @EVAS_STATIC_BUILD_JPEG_TRUE@am__append_69 = ../modules/loaders/jpeg @EVAS_STATIC_BUILD_JPEG_TRUE@am__append_70 = ../modules/loaders/jpeg/libevas_loader_jpeg.la @BUILD_SAVER_JPEG_TRUE@@EVAS_STATIC_BUILD_JPEG_TRUE@am__append_71 = ../modules/savers/jpeg @BUILD_SAVER_JPEG_TRUE@@EVAS_STATIC_BUILD_JPEG_TRUE@am__append_72 = ../modules/savers/jpeg/libevas_saver_jpeg.la @EVAS_STATIC_BUILD_JPEG_TRUE@am__append_73 = @evas_image_loader_jpeg_libs@ @EVAS_STATIC_BUILD_PMAPS_TRUE@am__append_74 = ../modules/loaders/pmaps @EVAS_STATIC_BUILD_PMAPS_TRUE@am__append_75 = ../modules/loaders/pmaps/libevas_loader_pmaps.la @EVAS_STATIC_BUILD_PMAPS_TRUE@am__append_76 = @evas_image_loader_pmaps_libs@ @EVAS_STATIC_BUILD_PNG_TRUE@am__append_77 = ../modules/savers/png ../modules/loaders/png @EVAS_STATIC_BUILD_PNG_TRUE@am__append_78 = ../modules/savers/png/libevas_saver_png.la ../modules/loaders/png/libevas_loader_png.la @EVAS_STATIC_BUILD_PNG_TRUE@am__append_79 = @evas_image_loader_png_libs@ @EVAS_STATIC_BUILD_PSD_TRUE@am__append_80 = ../modules/loaders/psd @EVAS_STATIC_BUILD_PSD_TRUE@am__append_81 = ../modules/loaders/psd/libevas_loader_psd.la @EVAS_STATIC_BUILD_PSD_TRUE@am__append_82 = @evas_image_loader_psd_libs@ @EVAS_STATIC_BUILD_SVG_TRUE@am__append_83 = ../modules/loaders/svg @EVAS_STATIC_BUILD_SVG_TRUE@am__append_84 = ../modules/loaders/svg/libevas_loader_svg.la @EVAS_STATIC_BUILD_SVG_TRUE@am__append_85 = @evas_image_loader_svg_libs@ @EVAS_STATIC_BUILD_TGA_TRUE@am__append_86 = ../modules/loaders/tga @EVAS_STATIC_BUILD_TGA_TRUE@am__append_87 = ../modules/loaders/tga/libevas_loader_tga.la @EVAS_STATIC_BUILD_TGA_TRUE@am__append_88 = @evas_image_loader_tga_libs@ @EVAS_STATIC_BUILD_TIFF_TRUE@am__append_89 = ../modules/savers/tiff ../modules/loaders/tiff @EVAS_STATIC_BUILD_TIFF_TRUE@am__append_90 = ../modules/savers/tiff/libevas_saver_tiff.la ../modules/loaders/tiff/libevas_loader_tiff.la @EVAS_STATIC_BUILD_TIFF_TRUE@am__append_91 = @evas_image_loader_tiff_libs@ @EVAS_STATIC_BUILD_WBMP_TRUE@am__append_92 = ../modules/loaders/wbmp @EVAS_STATIC_BUILD_WBMP_TRUE@am__append_93 = ../modules/loaders/wbmp/libevas_loader_wbmp.la @EVAS_STATIC_BUILD_WBMP_TRUE@am__append_94 = @evas_image_loader_wbmp_libs@ @EVAS_STATIC_BUILD_XPM_TRUE@am__append_95 = ../modules/loaders/xpm @EVAS_STATIC_BUILD_XPM_TRUE@am__append_96 = ../modules/loaders/xpm/libevas_loader_xpm.la @EVAS_STATIC_BUILD_XPM_TRUE@am__append_97 = @evas_image_loader_xpm_libs@ @EVAS_CSERVE2_TRUE@am__append_98 = \ @EVAS_CSERVE2_TRUE@cache2/libevas_cache2.la @EVAS_CSERVE2_TRUE@am__append_99 = \ @EVAS_CSERVE2_TRUE@cache2/libevas_cache2.la @BUILD_ENGINE_SOFTWARE_16_TRUE@am__append_100 = engines/common_16/libevas_engine_common_16.la @BUILD_ENGINE_SOFTWARE_16_TRUE@am__append_101 = engines/common_16/libevas_engine_common_16.la @BUILD_ENGINE_SOFTWARE_8_TRUE@am__append_102 = engines/common_8/libevas_engine_common_8.la @BUILD_ENGINE_SOFTWARE_8_TRUE@am__append_103 = engines/common_8/libevas_engine_common_8.la subdir = src/lib DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/depcomp $(includes_HEADERS) ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/efl_attribute.m4 \ $(top_srcdir)/m4/efl_coverage.m4 \ $(top_srcdir)/m4/efl_doxygen.m4 \ $(top_srcdir)/m4/efl_fnmatch.m4 \ $(top_srcdir)/m4/efl_path_max.m4 \ $(top_srcdir)/m4/efl_shm_open.m4 $(top_srcdir)/m4/efl_tests.m4 \ $(top_srcdir)/m4/evas_check_engine.m4 \ $(top_srcdir)/m4/evas_check_loader.m4 \ $(top_srcdir)/m4/evas_converter.m4 \ $(top_srcdir)/m4/evas_dither.m4 \ $(top_srcdir)/m4/evas_scaler.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(includesdir)" LTLIBRARIES = $(lib_LTLIBRARIES) am__DEPENDENCIES_1 = am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) am_libevas_la_OBJECTS = main.lo libevas_la_OBJECTS = $(am_libevas_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = libevas_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(libevas_la_LDFLAGS) $(LDFLAGS) -o $@ AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libevas_la_SOURCES) DIST_SOURCES = $(libevas_la_SOURCES) RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-recursive dvi-recursive html-recursive info-recursive \ install-data-recursive install-dvi-recursive \ install-exec-recursive install-html-recursive \ install-info-recursive install-pdf-recursive \ install-ps-recursive install-recursive installcheck-recursive \ installdirs-recursive pdf-recursive ps-recursive \ tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac HEADERS = $(includes_HEADERS) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ $(RECURSIVE_TARGETS) \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ distdir am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHECK_CFLAGS = @CHECK_CFLAGS@ CHECK_LIBS = @CHECK_LIBS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@ DIRECTFB_LIBS = @DIRECTFB_LIBS@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ ECORE_EVAS_CFLAGS = @ECORE_EVAS_CFLAGS@ ECORE_EVAS_LIBS = @ECORE_EVAS_LIBS@ EDB_CFLAGS = @EDB_CFLAGS@ EDB_LIBS = @EDB_LIBS@ EDJE_CFLAGS = @EDJE_CFLAGS@ EDJE_LIBS = @EDJE_LIBS@ EET_CFLAGS = @EET_CFLAGS@ EET_LIBS = @EET_LIBS@ EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@ EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@ EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@ EFL_SHM_OPEN_LIBS = @EFL_SHM_OPEN_LIBS@ EGREP = @EGREP@ EINA_CFLAGS = @EINA_CFLAGS@ EINA_LIBS = @EINA_LIBS@ EVAS_CFLAGS = @EVAS_CFLAGS@ EVAS_GENERAL_CFLAGS = @EVAS_GENERAL_CFLAGS@ EVAS_GENERAL_LIBS = @EVAS_GENERAL_LIBS@ EVAS_LIBS = @EVAS_LIBS@ EVAS_SSE3_CFLAGS = @EVAS_SSE3_CFLAGS@ EVIL_CFLAGS = @EVIL_CFLAGS@ EVIL_LIBS = @EVIL_LIBS@ EXEEXT = @EXEEXT@ EXOTIC_CFLAGS = @EXOTIC_CFLAGS@ EXOTIC_LIBS = @EXOTIC_LIBS@ FGREP = @FGREP@ FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@ FONTCONFIG_LIBS = @FONTCONFIG_LIBS@ FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ FREETYPE_LIBS = @FREETYPE_LIBS@ FRIBIDI_CFLAGS = @FRIBIDI_CFLAGS@ FRIBIDI_LIBS = @FRIBIDI_LIBS@ GL_EET_CFLAGS = @GL_EET_CFLAGS@ GL_EET_LIBS = @GL_EET_LIBS@ GREP = @GREP@ HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@ HARFBUZZ_LIBS = @HARFBUZZ_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LINEBREAK_CFLAGS = @LINEBREAK_CFLAGS@ LINEBREAK_LIBS = @LINEBREAK_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MODULE_ARCH = @MODULE_ARCH@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ SDL_CFLAGS = @SDL_CFLAGS@ SDL_LIBS = @SDL_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ SVG_CFLAGS = @SVG_CFLAGS@ SVG_LIBS = @SVG_LIBS@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ XCB_CFLAGS = @XCB_CFLAGS@ XCB_GL_CFLAGS = @XCB_GL_CFLAGS@ XCB_GL_LIBS = @XCB_GL_LIBS@ XCB_LIBS = @XCB_LIBS@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_ct_OBJC = @ac_ct_OBJC@ altivec_cflags = @altivec_cflags@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ dlopen_libs = @dlopen_libs@ docdir = @docdir@ dvidir = @dvidir@ edje_cc = @edje_cc@ efl_doxygen = @efl_doxygen@ efl_have_doxygen = @efl_have_doxygen@ evas_engine_buffer_cflags = @evas_engine_buffer_cflags@ evas_engine_buffer_libs = @evas_engine_buffer_libs@ evas_engine_direct3d_cflags = @evas_engine_direct3d_cflags@ evas_engine_direct3d_libs = @evas_engine_direct3d_libs@ evas_engine_directfb_cflags = @evas_engine_directfb_cflags@ evas_engine_directfb_libs = @evas_engine_directfb_libs@ evas_engine_fb_cflags = @evas_engine_fb_cflags@ evas_engine_fb_libs = @evas_engine_fb_libs@ evas_engine_gl_cocoa_cflags = @evas_engine_gl_cocoa_cflags@ evas_engine_gl_cocoa_libs = @evas_engine_gl_cocoa_libs@ evas_engine_gl_common_libs = @evas_engine_gl_common_libs@ evas_engine_gl_sdl_cflags = @evas_engine_gl_sdl_cflags@ evas_engine_gl_sdl_libs = @evas_engine_gl_sdl_libs@ evas_engine_gl_xcb_cflags = @evas_engine_gl_xcb_cflags@ evas_engine_gl_xcb_libs = @evas_engine_gl_xcb_libs@ evas_engine_gl_xlib_cflags = @evas_engine_gl_xlib_cflags@ evas_engine_gl_xlib_libs = @evas_engine_gl_xlib_libs@ evas_engine_psl1ght_cflags = @evas_engine_psl1ght_cflags@ evas_engine_psl1ght_libs = @evas_engine_psl1ght_libs@ evas_engine_software_16_sdl_cflags = @evas_engine_software_16_sdl_cflags@ evas_engine_software_16_sdl_libs = @evas_engine_software_16_sdl_libs@ evas_engine_software_16_wince_cflags = @evas_engine_software_16_wince_cflags@ evas_engine_software_16_wince_libs = @evas_engine_software_16_wince_libs@ evas_engine_software_16_x11_cflags = @evas_engine_software_16_x11_cflags@ evas_engine_software_16_x11_libs = @evas_engine_software_16_x11_libs@ evas_engine_software_8_x11_cflags = @evas_engine_software_8_x11_cflags@ evas_engine_software_8_x11_libs = @evas_engine_software_8_x11_libs@ evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@ evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@ evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@ evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ evas_image_loader_edb_libs = @evas_image_loader_edb_libs@ evas_image_loader_eet_cflags = @evas_image_loader_eet_cflags@ evas_image_loader_eet_libs = @evas_image_loader_eet_libs@ evas_image_loader_generic_cflags = @evas_image_loader_generic_cflags@ evas_image_loader_generic_libs = @evas_image_loader_generic_libs@ evas_image_loader_gif_cflags = @evas_image_loader_gif_cflags@ evas_image_loader_gif_libs = @evas_image_loader_gif_libs@ evas_image_loader_ico_cflags = @evas_image_loader_ico_cflags@ evas_image_loader_ico_libs = @evas_image_loader_ico_libs@ evas_image_loader_jpeg_cflags = @evas_image_loader_jpeg_cflags@ evas_image_loader_jpeg_libs = @evas_image_loader_jpeg_libs@ evas_image_loader_pmaps_cflags = @evas_image_loader_pmaps_cflags@ evas_image_loader_pmaps_libs = @evas_image_loader_pmaps_libs@ evas_image_loader_png_cflags = @evas_image_loader_png_cflags@ evas_image_loader_png_libs = @evas_image_loader_png_libs@ evas_image_loader_psd_cflags = @evas_image_loader_psd_cflags@ evas_image_loader_psd_libs = @evas_image_loader_psd_libs@ evas_image_loader_svg_cflags = @evas_image_loader_svg_cflags@ evas_image_loader_svg_libs = @evas_image_loader_svg_libs@ evas_image_loader_tga_cflags = @evas_image_loader_tga_cflags@ evas_image_loader_tga_libs = @evas_image_loader_tga_libs@ evas_image_loader_tiff_cflags = @evas_image_loader_tiff_cflags@ evas_image_loader_tiff_libs = @evas_image_loader_tiff_libs@ evas_image_loader_wbmp_cflags = @evas_image_loader_wbmp_cflags@ evas_image_loader_wbmp_libs = @evas_image_loader_wbmp_libs@ evas_image_loader_xpm_cflags = @evas_image_loader_xpm_cflags@ evas_image_loader_xpm_libs = @evas_image_loader_xpm_libs@ exec_prefix = @exec_prefix@ have_evas_engine_gl_x11 = @have_evas_engine_gl_x11@ have_evas_engine_gl_xcb = @have_evas_engine_gl_xcb@ have_evas_engine_gl_xlib = @have_evas_engine_gl_xlib@ have_evas_engine_software_x11 = @have_evas_engine_software_x11@ have_evas_engine_software_xcb = @have_evas_engine_software_xcb@ have_evas_engine_software_xlib = @have_evas_engine_software_xlib@ have_lcov = @have_lcov@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_enable_auto_import = @lt_enable_auto_import@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgconfig_requires_private = @pkgconfig_requires_private@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pthread_cflags = @pthread_cflags@ pthread_libs = @pthread_libs@ release_info = @release_info@ requirement_evas = @requirement_evas@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ shm_open_libs = @shm_open_libs@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ version_info = @version_info@ MAINTAINERCLEANFILES = Makefile.in SUBDIRS = canvas cache cache2 cserve cserve2 file engines include \ $(am__append_1) $(am__append_3) $(am__append_5) \ $(am__append_8) $(am__append_11) $(am__append_14) \ $(am__append_17) $(am__append_20) $(am__append_23) \ $(am__append_25) $(am__append_28) $(am__append_31) \ $(am__append_33) $(am__append_36) $(am__append_39) \ $(am__append_42) $(am__append_45) $(am__append_48) \ $(am__append_51) $(am__append_54) $(am__append_57) \ $(am__append_60) $(am__append_63) $(am__append_66) \ $(am__append_69) $(am__append_71) $(am__append_74) \ $(am__append_77) $(am__append_80) $(am__append_83) \ $(am__append_86) $(am__append_89) $(am__append_92) \ $(am__append_95) EVAS_STATIC_MODULE = $(am__append_2) $(am__append_4) $(am__append_6) \ $(am__append_9) $(am__append_12) $(am__append_15) \ $(am__append_18) $(am__append_21) $(am__append_24) \ $(am__append_26) $(am__append_29) $(am__append_32) \ $(am__append_34) $(am__append_37) $(am__append_40) \ $(am__append_43) $(am__append_46) $(am__append_49) \ $(am__append_52) $(am__append_55) $(am__append_58) \ $(am__append_61) $(am__append_64) $(am__append_67) \ $(am__append_70) $(am__append_72) $(am__append_75) \ $(am__append_78) $(am__append_81) $(am__append_84) \ $(am__append_87) $(am__append_90) $(am__append_93) \ $(am__append_96) EVAS_STATIC_LIBADD = $(am__append_7) $(am__append_10) $(am__append_13) \ $(am__append_16) $(am__append_19) $(am__append_22) \ $(am__append_27) $(am__append_30) $(am__append_35) \ $(am__append_38) $(am__append_41) $(am__append_44) \ $(am__append_47) $(am__append_50) $(am__append_53) \ $(am__append_56) $(am__append_59) $(am__append_62) \ $(am__append_65) $(am__append_68) $(am__append_73) \ $(am__append_76) $(am__append_79) $(am__append_82) \ $(am__append_85) $(am__append_88) $(am__append_91) \ $(am__append_94) $(am__append_97) AM_CPPFLAGS = \ -I. \ -I$(top_srcdir)/src/lib \ -I$(top_srcdir)/src/lib/include \ -DPACKAGE_BIN_DIR=\"$(bindir)\" \ -DPACKAGE_LIB_DIR=\"$(libdir)\" \ -DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \ @EVAS_GENERAL_CFLAGS@ \ @FREETYPE_CFLAGS@ \ @FRIBIDI_CFLAGS@ \ @HARFBUZZ_CFLAGS@ \ @EET_CFLAGS@ \ @FONTCONFIG_CFLAGS@ \ @pthread_cflags@ \ @PIXMAN_CFLAGS@ lib_LTLIBRARIES = libevas.la includes_HEADERS = Evas.h Evas_GL.h includesdir = $(includedir)/evas-@VMAJ@ libevas_la_SOURCES = main.c @EVAS_CSERVE_TRUE@libevas_cserve_la = cserve/libevas_cserve.la @EVAS_CSERVE2_TRUE@libevas_cserve2_la = cserve2/libevas_cserve2.la libevas_la_LIBADD = canvas/libevas_canvas.la file/libevas_file.la \ cache/libevas_cache.la $(libevas_cserve_la) \ $(libevas_cserve2_la) engines/common/libevas_engine_common.la \ @FREETYPE_LIBS@ @FRIBIDI_LIBS@ @HARFBUZZ_LIBS@ @EET_LIBS@ \ @FONTCONFIG_LIBS@ @pthread_libs@ @EVAS_GENERAL_LIBS@ \ $(EVAS_STATIC_MODULE) $(EVAS_STATIC_LIBADD) @PIXMAN_LIBS@ -lm \ $(am__append_98) $(am__append_100) $(am__append_102) libevas_la_DEPENDENCIES = canvas/libevas_canvas.la \ file/libevas_file.la cache/libevas_cache.la \ $(libevas_cserve_la) $(libevas_cserve2_la) \ engines/common/libevas_engine_common.la $(EVAS_STATIC_MODULE) \ $(am__append_99) $(am__append_101) $(am__append_103) libevas_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -version-info @version_info@ @release_info@ ### Evas_GL we are still using it in our code, so just don't install it. EXTRA_DIST = Evas_GL.h DIST_SUBDIRS = canvas cache cache2 cserve cserve2 file engines include all: all-recursive .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/lib/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/lib/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ } uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libevas.la: $(libevas_la_OBJECTS) $(libevas_la_DEPENDENCIES) $(EXTRA_libevas_la_DEPENDENCIES) $(AM_V_CCLD)$(libevas_la_LINK) -rpath $(libdir) $(libevas_la_OBJECTS) $(libevas_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-includesHEADERS: $(includes_HEADERS) @$(NORMAL_INSTALL) @list='$(includes_HEADERS)'; test -n "$(includesdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(includesdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(includesdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includesdir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(includesdir)" || exit $$?; \ done uninstall-includesHEADERS: @$(NORMAL_UNINSTALL) @list='$(includes_HEADERS)'; test -n "$(includesdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(includesdir)'; $(am__uninstall_files_from_dir) # This directory's subdirectories are mostly independent; you can cd # into them and run 'make' without going through this Makefile. # To change the values of 'make' variables: instead of editing Makefiles, # (1) if the variable is set in 'config.status', edit 'config.status' # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. $(am__recursive_targets): @fail=; \ if $(am__make_keepgoing); then \ failcom='fail=yes'; \ else \ failcom='exit 1'; \ fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-recursive TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-recursive CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-recursive cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile $(LTLIBRARIES) $(HEADERS) installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(includesdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-recursive clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-recursive -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-includesHEADERS install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-libLTLIBRARIES install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-includesHEADERS uninstall-libLTLIBRARIES .MAKE: $(am__recursive_targets) install-am install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \ check-am clean clean-generic clean-libLTLIBRARIES \ clean-libtool cscopelist-am ctags ctags-am distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-includesHEADERS install-info \ install-info-am install-libLTLIBRARIES install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs installdirs-am \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \ uninstall-includesHEADERS uninstall-libLTLIBRARIES # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: evas-1.7.9/src/lib/cserve2/0000775000175000017500000000000012234557316012407 500000000000000evas-1.7.9/src/lib/cserve2/evas_cs2_client.c0000664000175000017500000006656612175475547015572 00000000000000#include "config.h" #include #include #include #include #include #include #include #include "evas_cs2.h" #include "evas_cs2_private.h" #include "evas_cs2_utils.h" #ifdef EVAS_CSERVE2 typedef void (*Op_Callback)(void *data, const void *msg); struct _File_Entry { unsigned int file_id; }; struct _Client_Request { Message_Type type; unsigned int rid; Op_Callback cb; void *data; }; typedef struct _File_Entry File_Entry; typedef struct _Client_Request Client_Request; static int cserve2_init = 0; static int socketfd = -1; static unsigned int _rid_count = 0; static unsigned int _file_id = 0; static unsigned int _data_id = 0; static Eina_List *_requests = NULL; static struct sockaddr_un socksize; #ifndef UNIX_PATH_MAX #define UNIX_PATH_MAX sizeof(socksize.sun_path) #endif static void _socket_path_set(char *path) { char *env; char buf[UNIX_PATH_MAX]; env = getenv("EVAS_CSERVE2_SOCKET"); if (env && env[0]) { strncpy(path, env, UNIX_PATH_MAX - 1); return; } snprintf(buf, sizeof(buf), "/tmp/.evas-cserve2-%x.socket", (int)getuid()); /* FIXME: check we can actually create this socket */ strcpy(path, buf); #if 0 env = getenv("XDG_RUNTIME_DIR"); if (!env || !env[0]) { env = getenv("HOME"); if (!env || !env[0]) { env = getenv("TMPDIR"); if (!env || !env[0]) env = "/tmp"; } } snprintf(buf, sizeof(buf), "%s/evas-cserve2-%x.socket", env, getuid()); /* FIXME: check we can actually create this socket */ strcpy(path, buf); #endif } static Eina_Bool _server_connect(void) { int s, len; struct sockaddr_un remote; if ((s = socket(AF_UNIX, SOCK_STREAM, 0)) == -1) { ERR("socket"); return EINA_FALSE; } remote.sun_family = AF_UNIX; _socket_path_set(remote.sun_path); len = strlen(remote.sun_path) + sizeof(remote.sun_family); if (connect(s, (struct sockaddr *)&remote, len) == -1) { ERR("connect"); return EINA_FALSE; } fcntl(s, F_SETFL, O_NONBLOCK); socketfd = s; DBG("connected to cserve2 server."); return EINA_TRUE; } static void _server_disconnect(void) { close(socketfd); socketfd = -1; } static void _request_answer_add(Message_Type type, unsigned int rid, Op_Callback cb, void *data) { Client_Request *cr = calloc(1, sizeof(*cr)); cr->type = type; cr->rid = rid; cr->cb = cb; cr->data = data; _requests = eina_list_append(_requests, cr); } static Eina_Bool _server_safe_send(int fd, const void *data, int size) { int sent = 0; ssize_t ret; const char *msg = data; while (sent < size) { ret = send(fd, msg + sent, size - sent, MSG_NOSIGNAL); if (ret < 0) { if ((errno == EAGAIN) || (errno == EINTR)) continue; return EINA_FALSE; } sent += ret; } return EINA_TRUE; } static Eina_Bool _server_send(const void *buf, int size, Op_Callback cb, void *data) { const Msg_Base *msg; if (!_server_safe_send(socketfd, &size, sizeof(size))) { ERR("Couldn't send message size to server."); return EINA_FALSE; } if (!_server_safe_send(socketfd, buf, size)) { ERR("Couldn't send message body to server."); return EINA_FALSE; } msg = buf; switch (msg->type) { case CSERVE2_OPEN: case CSERVE2_SETOPTS: case CSERVE2_LOAD: case CSERVE2_PRELOAD: case CSERVE2_FONT_LOAD: case CSERVE2_FONT_GLYPHS_LOAD: _request_answer_add(msg->type, msg->rid, cb, data); break; default: break; } return EINA_TRUE; } static int sr_size = 0; static int sr_got = 0; static char *sr_buf = NULL; static void * _server_read(int *size) { int n; void *ret; if (sr_size) goto get_data; n = recv(socketfd, &sr_size, sizeof(sr_size), 0); if (n < 0) return NULL; sr_buf = malloc(sr_size); get_data: n = recv(socketfd, sr_buf + sr_got, sr_size - sr_got, 0); if (n < 0) return NULL; sr_got += n; if (sr_got < sr_size) return NULL; *size = sr_size; sr_size = 0; sr_got = 0; ret = sr_buf; sr_buf = NULL; return ret; } int evas_cserve2_init(void) { if (cserve2_init++) return cserve2_init; DBG("Connecting to cserve2."); if (!_server_connect()) { cserve2_init = 0; return 0; } return cserve2_init; } int evas_cserve2_shutdown(void) { if ((--cserve2_init) > 0) return cserve2_init; DBG("Disconnecting from cserve2."); _server_disconnect(); return cserve2_init; } int evas_cserve2_use_get(void) { return cserve2_init; } static unsigned int _next_rid(void) { if (!_rid_count) _rid_count++; return _rid_count++; } static unsigned int _server_dispatch(void) { int size; unsigned int rid; Eina_List *l, *l_next; Client_Request *cr; Msg_Base *msg; msg = _server_read(&size); if (!msg) return 0; EINA_LIST_FOREACH_SAFE(_requests, l, l_next, cr) { if (cr->rid != msg->rid) // dispatch this answer continue; _requests = eina_list_remove_list(_requests, l); if (cr->cb) cr->cb(cr->data, msg); free(cr); } rid = msg->rid; free(msg); return rid; } static void _server_dispatch_until(unsigned int rid) { Eina_Bool done = EINA_FALSE; while (!done) { if (_server_dispatch() == rid) done = EINA_TRUE; } } static void _image_opened_cb(void *data, const void *msg_received) { const Msg_Base *answer = msg_received; const Msg_Opened *msg = msg_received; Image_Entry *ie = data; ie->open_rid = 0; if (answer->type == CSERVE2_ERROR) { const Msg_Error *msg_error = msg_received; ERR("Couldn't open image: '%s':'%s'; error: %d", ie->file, ie->key, msg_error->error); free(ie->data1); ie->data1 = NULL; return; } ie->w = msg->image.w; ie->h = msg->image.h; ie->flags.alpha = msg->image.alpha; ie->loop_hint = msg->image.loop_hint; ie->loop_count = msg->image.loop_count; ie->frame_count = msg->image.frame_count; } static void _loaded_handle(Image_Entry *ie, const Msg_Loaded *msg) { Data_Entry *dentry = ie->data2; const char *shmpath; shmpath = ((const char *)msg) + sizeof(*msg); // dentry->shm.path = strdup(shmpath); dentry->shm.mmap_offset = msg->shm.mmap_offset; dentry->shm.use_offset = msg->shm.use_offset; dentry->shm.mmap_size = msg->shm.mmap_size; dentry->shm.image_size = msg->shm.image_size; dentry->shm.f = eina_file_open(shmpath, EINA_TRUE); if (!dentry->shm.f) { free(dentry); ie->data2 = NULL; return; } dentry->shm.data = eina_file_map_new(dentry->shm.f, EINA_FILE_WILLNEED, dentry->shm.mmap_offset, dentry->shm.mmap_size); if (!dentry->shm.data) { eina_file_close(dentry->shm.f); free(dentry); ie->data2 = NULL; } if (ie->data2) { RGBA_Image *im = (RGBA_Image *)ie; im->image.data = evas_cserve2_image_data_get(ie); ie->flags.alpha_sparse = msg->alpha_sparse; ie->flags.loaded = EINA_TRUE; im->image.no_free = 1; } } static void _image_loaded_cb(void *data, const void *msg_received) { const Msg_Base *answer = msg_received; const Msg_Loaded *msg = msg_received; Image_Entry *ie = data; ie->load_rid = 0; if (!ie->data2) return; if (answer->type == CSERVE2_ERROR) { const Msg_Error *msg_error = msg_received; ERR("Couldn't load image: '%s':'%s'; error: %d", ie->file, ie->key, msg_error->error); free(ie->data2); ie->data2 = NULL; return; } _loaded_handle(ie, msg); } static void _image_preloaded_cb(void *data, const void *msg_received) { const Msg_Base *answer = msg_received; Image_Entry *ie = data; Data_Entry *dentry = ie->data2; DBG("Received PRELOADED for RID: %d", answer->rid); ie->preload_rid = 0; if (answer->type == CSERVE2_ERROR) { const Msg_Error *msg_error = msg_received; ERR("Couldn't preload image: '%s':'%s'; error: %d", ie->file, ie->key, msg_error->error); dentry->preloaded_cb(data, EINA_FALSE); dentry->preloaded_cb = NULL; return; } _loaded_handle(ie, msg_received); if (dentry && (dentry->preloaded_cb)) { dentry->preloaded_cb(data, EINA_TRUE); dentry->preloaded_cb = NULL; } } static const char * _build_absolute_path(const char *path, char buf[], int size) { char *p; int len; if (!path) return NULL; p = buf; if (path[0] == '/') strncpy(p, path, size); else if (path[0] == '~') { const char *home = getenv("HOME"); if (!home) return NULL; strncpy(p, home, size); len = strlen(p); size -= len + 1; p += len; p[0] = '/'; p++; strncpy(p, path + 2, size); } else { if (!getcwd(p, size)) return NULL; len = strlen(p); size -= len + 1; p += len; p[0] = '/'; p++; strncpy(p, path, size); } return buf; } static unsigned int _image_open_server_send(Image_Entry *ie, const char *file, const char *key, RGBA_Image_Loadopts *lopt __UNUSED__) { int flen, klen; int size; char *buf; char filebuf[PATH_MAX]; Msg_Open msg_open; File_Entry *fentry; if (cserve2_init == 0) { ERR("Server not initialized."); return 0; } if (!key) key = ""; _build_absolute_path(file, filebuf, sizeof(filebuf)); fentry = calloc(1, sizeof(*fentry)); memset(&msg_open, 0, sizeof(msg_open)); fentry->file_id = ++_file_id; if (fentry->file_id == 0) fentry->file_id = ++_file_id; flen = strlen(filebuf) + 1; klen = strlen(key) + 1; msg_open.base.rid = _next_rid(); msg_open.base.type = CSERVE2_OPEN; msg_open.file_id = fentry->file_id; msg_open.path_offset = 0; msg_open.key_offset = flen; size = sizeof(msg_open) + flen + klen; buf = malloc(size); if (!buf) return EINA_FALSE; memcpy(buf, &msg_open, sizeof(msg_open)); memcpy(buf + sizeof(msg_open), filebuf, flen); memcpy(buf + sizeof(msg_open) + flen, key, klen); if (!_server_send(buf, size, _image_opened_cb, ie)) { ERR("Couldn't send message to server."); free(buf); return 0; } free(buf); ie->data1 = fentry; return msg_open.base.rid; } unsigned int _image_setopts_server_send(Image_Entry *ie) { File_Entry *fentry; Data_Entry *dentry; Msg_Setopts msg; if (cserve2_init == 0) return 0; fentry = ie->data1; dentry = calloc(1, sizeof(*dentry)); memset(&msg, 0, sizeof(msg)); dentry->image_id = ++_data_id; if (dentry->image_id == 0) dentry->image_id = ++_data_id; msg.base.rid = _next_rid(); msg.base.type = CSERVE2_SETOPTS; msg.file_id = fentry->file_id; msg.image_id = dentry->image_id; msg.opts.scale_down = ie->load_opts.scale_down_by; msg.opts.dpi = ie->load_opts.dpi; msg.opts.w = ie->load_opts.w; msg.opts.h = ie->load_opts.h; msg.opts.rx = ie->load_opts.region.x; msg.opts.ry = ie->load_opts.region.y; msg.opts.rw = ie->load_opts.region.w; msg.opts.rh = ie->load_opts.region.h; msg.opts.orientation = ie->load_opts.orientation; if (!_server_send(&msg, sizeof(msg), 0, NULL)) return 0; ie->data2 = dentry; return msg.base.rid; } unsigned int _image_load_server_send(Image_Entry *ie) { Data_Entry *dentry; Msg_Load msg; if (cserve2_init == 0) return 0; if (!ie->data1) { ERR("No data for opened file."); return 0; } dentry = ie->data2; memset(&msg, 0, sizeof(msg)); msg.base.rid = _next_rid(); msg.base.type = CSERVE2_LOAD; msg.image_id = dentry->image_id; if (!_server_send(&msg, sizeof(msg), _image_loaded_cb, ie)) return 0; return msg.base.rid; } unsigned int _image_preload_server_send(Image_Entry *ie, void (*preloaded_cb)(void *im, Eina_Bool success)) { Data_Entry *dentry; Msg_Preload msg; if (cserve2_init == 0) return 0; dentry = ie->data2; dentry->preloaded_cb = preloaded_cb; memset(&msg, 0, sizeof(msg)); msg.base.rid = _next_rid(); msg.base.type = CSERVE2_PRELOAD; msg.image_id = dentry->image_id; if (!_server_send(&msg, sizeof(msg), _image_preloaded_cb, ie)) return 0; return msg.base.rid; } unsigned int _image_close_server_send(Image_Entry *ie) { Msg_Close msg; File_Entry *fentry; if (cserve2_init == 0) return 0; if (!ie->data1) return 0; fentry = ie->data1; if (ie->data2) { Data_Entry *dentry = ie->data2; if (dentry->shm.data) eina_file_map_free(dentry->shm.f, dentry->shm.data); if (dentry->shm.f) eina_file_close(dentry->shm.f); free(ie->data2); ie->data2 = NULL; } memset(&msg, 0, sizeof(msg)); msg.base.rid = _next_rid(); msg.base.type = CSERVE2_CLOSE; msg.file_id = fentry->file_id; free(fentry); ie->data1 = NULL; if (!_server_send(&msg, sizeof(msg), NULL, NULL)) return 0; return msg.base.rid; } unsigned int _image_unload_server_send(Image_Entry *ie) { Msg_Unload msg; Data_Entry *dentry; if (cserve2_init == 0) return 0; if (!ie->data2) return 0; dentry = ie->data2; if (dentry->shm.data) eina_file_map_free(dentry->shm.f, dentry->shm.data); if (dentry->shm.f) eina_file_close(dentry->shm.f); // if (dentry->shm.path) // free(dentry->shm.path); memset(&msg, 0, sizeof(msg)); msg.base.rid = _next_rid(); msg.base.type = CSERVE2_UNLOAD; msg.image_id = dentry->image_id; free(dentry); ie->data2 = NULL; if (!_server_send(&msg, sizeof(msg), NULL, NULL)) return 0; return msg.base.rid; } Eina_Bool evas_cserve2_image_load(Image_Entry *ie, const char *file, const char *key, RGBA_Image_Loadopts *lopt) { unsigned int rid; rid = _image_open_server_send(ie, file, key, lopt); if (!rid) return EINA_FALSE; ie->open_rid = rid; _image_setopts_server_send(ie); // _server_dispatch_until(rid); if (ie->data1) return EINA_TRUE; else return EINA_FALSE; } int evas_cserve2_image_load_wait(Image_Entry *ie) { if (ie->open_rid) { _server_dispatch_until(ie->open_rid); if (!ie->data1) return CSERVE2_GENERIC; return CSERVE2_NONE; } else return CSERVE2_GENERIC; } Eina_Bool evas_cserve2_image_data_load(Image_Entry *ie) { unsigned int rid; rid = _image_load_server_send(ie); if (!rid) return EINA_FALSE; ie->load_rid = rid; if (ie->data2) return EINA_TRUE; else return EINA_FALSE; } void evas_cserve2_image_load_data_wait(Image_Entry *ie) { if (ie->load_rid) _server_dispatch_until(ie->load_rid); } Eina_Bool evas_cserve2_image_preload(Image_Entry *ie, void (*preloaded_cb)(void *im, Eina_Bool success)) { unsigned int rid; if (!ie->data1) return EINA_FALSE; rid = _image_preload_server_send(ie, preloaded_cb); if (!rid) return EINA_FALSE; ie->preload_rid = rid; return EINA_FALSE; } void evas_cserve2_image_free(Image_Entry *ie) { if (!ie->data1) return; if (!_image_close_server_send(ie)) WRN("Couldn't send close message to cserve2."); } void evas_cserve2_image_unload(Image_Entry *ie) { if (!ie->data2) return; if (!_image_unload_server_send(ie)) WRN("Couldn't send unload message to cserve2."); } void evas_cserve2_dispatch(void) { _server_dispatch_until(0); } typedef struct _Glyph_Map Glyph_Map; typedef struct _CS_Glyph_Out CS_Glyph_Out; struct _Font_Entry { const char *source; const char *name; unsigned int size; unsigned int dpi; Font_Rend_Flags wanted_rend; unsigned int rid; // open Eina_Hash *glyphs_maps; Fash_Glyph2 *fash[3]; // one per hinting value Eina_Clist glyphs_queue; int glyphs_queue_count; Eina_Clist glyphs_used; int glyphs_used_count; Eina_Bool failed : 1; }; struct _Glyph_Map { Font_Entry *fe; const char *name; unsigned int size; Eina_File *map; unsigned char *data; Eina_Clist glyphs; }; struct _CS_Glyph_Out { RGBA_Font_Glyph_Out base; Eina_Clist map_entry; Eina_Clist used_list; unsigned int idx; unsigned int rid; Glyph_Map *map; unsigned int offset; unsigned int size; Eina_Bool used; }; static void _font_entry_free(Font_Entry *fe) { int i; for (i = 0; i < 3; i++) if (fe->fash[i]) fash_gl_free(fe->fash[i]); eina_stringshare_del(fe->source); eina_stringshare_del(fe->name); eina_hash_free(fe->glyphs_maps); free(fe); } static void _glyphs_map_free(Glyph_Map *m) { eina_file_map_free(m->map, m->data); eina_file_close(m->map); eina_stringshare_del(m->name); free(m); } static void _glyph_out_free(void *gl) { CS_Glyph_Out *glout = gl; if (glout->map) { eina_clist_remove(&glout->map_entry); if (eina_clist_empty(&glout->map->glyphs)) { eina_hash_del(glout->map->fe->glyphs_maps, &glout->map->name, NULL); _glyphs_map_free(glout->map); } } free(glout); } static void _font_loaded_cb(void *data, const void *msg) { const Msg_Base *m = msg; Font_Entry *fe = data; fe->rid = 0; if (m->type == CSERVE2_ERROR) fe->failed = EINA_TRUE; } static unsigned int _font_load_server_send(Font_Entry *fe, Message_Type type) { Msg_Font_Load *msg; int source_len, path_len, size; char *buf; unsigned int ret = 0; void (*cb)(void *data, const void *msg) = NULL; if (!cserve2_init) return 0; source_len = fe->source ? eina_stringshare_strlen(fe->source) + 1 : 0; path_len = eina_stringshare_strlen(fe->name) + 1; size = sizeof(*msg) + path_len + source_len; msg = calloc(1, size); msg->base.rid = _next_rid(); msg->base.type = type; msg->sourcelen = source_len; msg->pathlen = path_len; msg->rend_flags = fe->wanted_rend; msg->size = fe->size; msg->dpi = fe->dpi; buf = ((char *)msg) + sizeof(*msg); memcpy(buf, fe->source, source_len); buf += source_len; memcpy(buf, fe->name, path_len); if (type == CSERVE2_FONT_LOAD) cb = _font_loaded_cb; if (_server_send(msg, size, cb, fe)) ret = msg->base.rid; free(msg); return ret; } Font_Entry * evas_cserve2_font_load(const char *source, const char *name, int size, int dpi, Font_Rend_Flags wanted_rend) { Font_Entry *fe; fe = calloc(1, sizeof(Font_Entry)); if (!fe) return NULL; fe->source = source ? eina_stringshare_add(source) : NULL; fe->name = eina_stringshare_add(name); fe->size = size; fe->dpi = dpi; fe->wanted_rend = wanted_rend; if (!(fe->rid = _font_load_server_send(fe, CSERVE2_FONT_LOAD))) { eina_stringshare_del(fe->source); eina_stringshare_del(fe->name); free(fe); return NULL; } fe->glyphs_maps = eina_hash_stringshared_new(NULL); eina_clist_init(&fe->glyphs_queue); eina_clist_init(&fe->glyphs_used); return fe; } void evas_cserve2_font_free(Font_Entry *fe) { if (!fe) return; if (fe->failed) return; _font_load_server_send(fe, CSERVE2_FONT_UNLOAD); _font_entry_free(fe); } typedef struct { Font_Entry *fe; Font_Hint_Flags hints; unsigned int rid; } Glyph_Request_Data; static void _glyph_request_cb(void *data, const void *msg) { const Msg_Font_Glyphs_Loaded *resp = msg; Glyph_Request_Data *grd = data; Font_Entry *fe = grd->fe; unsigned int ncaches = 0; const char *buf; if (resp->base.type == CSERVE2_ERROR) { free(grd); return; } buf = (const char *)resp + sizeof(*resp); while (ncaches < resp->ncaches) { int i = 0, nglyphs; int namelen; const char *name; Glyph_Map *map; memcpy(&namelen, buf, sizeof(int)); buf += sizeof(int); name = eina_stringshare_add_length(buf, namelen); buf += namelen; memcpy(&nglyphs, buf, sizeof(int)); buf += sizeof(int); map = eina_hash_find(fe->glyphs_maps, name); if (!map) { map = calloc(1, sizeof(*map)); map->fe = fe; map->name = name; map->map = eina_file_open(name, EINA_TRUE); map->data = eina_file_map_all(map->map, EINA_FILE_WILLNEED); eina_clist_init(&map->glyphs); eina_hash_direct_add(fe->glyphs_maps, &map->name, map); } else eina_stringshare_del(name); while (i < nglyphs) { unsigned int idx, offset, glsize; int rows, width, pitch, num_grays, pixel_mode; CS_Glyph_Out *gl; memcpy(&idx, buf, sizeof(int)); buf += sizeof(int); memcpy(&offset, buf, sizeof(int)); buf += sizeof(int); memcpy(&glsize, buf, sizeof(int)); buf += sizeof(int); memcpy(&rows, buf, sizeof(int)); buf += sizeof(int); memcpy(&width, buf, sizeof(int)); buf += sizeof(int); memcpy(&pitch, buf, sizeof(int)); buf += sizeof(int); memcpy(&num_grays, buf, sizeof(int)); buf += sizeof(int); memcpy(&pixel_mode, buf, sizeof(int)); buf += sizeof(int); gl = fash_gl_find(fe->fash[grd->hints], idx); gl->map = map; gl->offset = offset; gl->size = glsize; gl->base.bitmap.rows = rows; gl->base.bitmap.width = width; gl->base.bitmap.pitch = pitch; gl->base.bitmap.buffer = map->data + gl->offset; gl->base.bitmap.num_grays = num_grays; gl->base.bitmap.pixel_mode = pixel_mode; gl->rid = 0; eina_clist_add_head(&map->glyphs, &gl->map_entry); i++; } ncaches++; } free(grd); } static unsigned int _glyph_request_server_send(Font_Entry *fe, Font_Hint_Flags hints, Eina_Bool used) { Msg_Font_Glyphs_Request *msg; Glyph_Request_Data *grd = NULL; int source_len, name_len, size, nglyphs; char *buf; unsigned int *glyphs; unsigned int ret = 0; Op_Callback cb; Eina_Clist *queue, *itr, *itr_next; source_len = fe->source ? eina_stringshare_strlen(fe->source) + 1 : 0; name_len = eina_stringshare_strlen(fe->name) + 1; if (!used) { nglyphs = fe->glyphs_queue_count; queue = &fe->glyphs_queue; } else { nglyphs = fe->glyphs_used_count; queue = &fe->glyphs_used; } size = sizeof(*msg) + source_len + name_len + (nglyphs * sizeof(int)); msg = calloc(1, size); msg->base.rid = _next_rid(); if (!used) msg->base.type = CSERVE2_FONT_GLYPHS_LOAD; else msg->base.type = CSERVE2_FONT_GLYPHS_USED; msg->sourcelen = source_len; msg->pathlen = name_len; msg->rend_flags = fe->wanted_rend; msg->size = fe->size; msg->dpi = fe->dpi; msg->hint = hints; msg->nglyphs = nglyphs; buf = ((char *)msg) + sizeof(*msg); memcpy(buf, fe->source, source_len); buf += source_len; memcpy(buf, fe->name, name_len); buf += name_len; glyphs = (unsigned int *)buf; nglyphs = 0; EINA_CLIST_FOR_EACH_SAFE(itr, itr_next, queue) { CS_Glyph_Out *gl; if (!used) { gl = EINA_CLIST_ENTRY(itr, CS_Glyph_Out, map_entry); gl->rid = msg->base.rid; eina_clist_remove(&gl->map_entry); } else { gl = EINA_CLIST_ENTRY(itr, CS_Glyph_Out, used_list); gl->used = EINA_FALSE; eina_clist_remove(&gl->used_list); } glyphs[nglyphs++] = gl->idx; } if (!used) fe->glyphs_queue_count = 0; else fe->glyphs_used_count = 0; if (!used) { cb = _glyph_request_cb; grd = malloc(sizeof(*grd)); grd->fe = fe; grd->rid = msg->base.rid; grd->hints = hints; } else cb = NULL; if (_server_send(msg, size, cb, grd)) ret = msg->base.rid; else free(grd); free(msg); return ret; } Eina_Bool evas_cserve2_font_glyph_request(Font_Entry *fe, unsigned int idx, Font_Hint_Flags hints) { Fash_Glyph2 *fash; CS_Glyph_Out *glyph; if (fe->rid) _server_dispatch_until(0); /* dispatch anything pending just to avoid requesting glyphs for a font we may already know it failed loading, but don't block */ if (fe->failed) return EINA_FALSE; fash = fe->fash[hints]; if (!fash) { fash = fash_gl_new(_glyph_out_free); fe->fash[hints] = fash; } glyph = fash_gl_find(fash, idx); if (!glyph) { glyph = calloc(1, sizeof(*glyph)); glyph->idx = idx; fash_gl_add(fash, idx, glyph); eina_clist_add_head(&fe->glyphs_queue, &glyph->map_entry); fe->glyphs_queue_count++; } else if (!glyph->used) { eina_clist_add_head(&fe->glyphs_used, &glyph->used_list); fe->glyphs_used_count++; glyph->used = EINA_TRUE; } /* crude way to manage a queue, but it will work for now */ if (fe->glyphs_queue_count == 50) _glyph_request_server_send(fe, hints, EINA_FALSE); return EINA_TRUE; } Eina_Bool evas_cserve2_font_glyph_used(Font_Entry *fe, unsigned int idx, Font_Hint_Flags hints) { Fash_Glyph2 *fash; CS_Glyph_Out *glyph; if (fe->rid) _server_dispatch_until(0); /* dispatch anything pending just to avoid requesting glyphs for a font we may already know it failed loading, but don't block */ if (fe->failed) return EINA_FALSE; fash = fe->fash[hints]; if (!fash) return EINA_FALSE; glyph = fash_gl_find(fash, idx); /* If we found the glyph on client cache, we should also have at least * its request done. */ if (!glyph) return EINA_FALSE; if (!glyph->map) return EINA_TRUE; if (glyph->used) return EINA_TRUE; eina_clist_add_head(&fe->glyphs_used, &glyph->used_list); fe->glyphs_used_count++; glyph->used = EINA_TRUE; return EINA_TRUE; } RGBA_Font_Glyph_Out * evas_cserve2_font_glyph_bitmap_get(Font_Entry *fe, unsigned int idx, Font_Hint_Flags hints) { Fash_Glyph2 *fash; CS_Glyph_Out *out; if (fe->failed) return NULL; /* quick hack, flush pending queue when we are asked for a bitmap */ if (fe->glyphs_queue_count) _glyph_request_server_send(fe, hints, EINA_FALSE); if (fe->glyphs_used_count) _glyph_request_server_send(fe, hints, EINA_TRUE); fash = fe->fash[hints]; if (!fash) { // this should not happen really, so let the user know he fucked up system("format c:"); return NULL; } out = fash_gl_find(fash, idx); if (!out) { // again, if we are asking for a bitmap we were supposed to already // have requested the glyph, it must be there return NULL; } if (out->rid) _server_dispatch_until(out->rid); // promote shm and font entry in lru or something return &(out->base); } #endif evas-1.7.9/src/lib/cserve2/Makefile.in0000664000175000017500000006444112234557302014400 00000000000000# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/lib/cserve2 DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/efl_attribute.m4 \ $(top_srcdir)/m4/efl_coverage.m4 \ $(top_srcdir)/m4/efl_doxygen.m4 \ $(top_srcdir)/m4/efl_fnmatch.m4 \ $(top_srcdir)/m4/efl_path_max.m4 \ $(top_srcdir)/m4/efl_shm_open.m4 $(top_srcdir)/m4/efl_tests.m4 \ $(top_srcdir)/m4/evas_check_engine.m4 \ $(top_srcdir)/m4/evas_check_loader.m4 \ $(top_srcdir)/m4/evas_converter.m4 \ $(top_srcdir)/m4/evas_dither.m4 \ $(top_srcdir)/m4/evas_scaler.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) @EVAS_CSERVE2_TRUE@libevas_cserve2_la_DEPENDENCIES = \ @EVAS_CSERVE2_TRUE@ libevas_cserve2_utils.la am__libevas_cserve2_la_SOURCES_DIST = evas_cs2.h evas_cs2_private.h \ evas_cs2_image_data.c evas_cs2_client.c @EVAS_CSERVE2_TRUE@am_libevas_cserve2_la_OBJECTS = \ @EVAS_CSERVE2_TRUE@ evas_cs2_image_data.lo evas_cs2_client.lo libevas_cserve2_la_OBJECTS = $(am_libevas_cserve2_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = @EVAS_CSERVE2_TRUE@am_libevas_cserve2_la_rpath = libevas_cserve2_utils_la_LIBADD = am__libevas_cserve2_utils_la_SOURCES_DIST = evas_cs2_utils.h \ evas_cs2_utils.c @EVAS_CSERVE2_TRUE@am_libevas_cserve2_utils_la_OBJECTS = \ @EVAS_CSERVE2_TRUE@ evas_cs2_utils.lo libevas_cserve2_utils_la_OBJECTS = \ $(am_libevas_cserve2_utils_la_OBJECTS) @EVAS_CSERVE2_TRUE@am_libevas_cserve2_utils_la_rpath = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libevas_cserve2_la_SOURCES) \ $(libevas_cserve2_utils_la_SOURCES) DIST_SOURCES = $(am__libevas_cserve2_la_SOURCES_DIST) \ $(am__libevas_cserve2_utils_la_SOURCES_DIST) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHECK_CFLAGS = @CHECK_CFLAGS@ CHECK_LIBS = @CHECK_LIBS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@ DIRECTFB_LIBS = @DIRECTFB_LIBS@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ ECORE_EVAS_CFLAGS = @ECORE_EVAS_CFLAGS@ ECORE_EVAS_LIBS = @ECORE_EVAS_LIBS@ EDB_CFLAGS = @EDB_CFLAGS@ EDB_LIBS = @EDB_LIBS@ EDJE_CFLAGS = @EDJE_CFLAGS@ EDJE_LIBS = @EDJE_LIBS@ EET_CFLAGS = @EET_CFLAGS@ EET_LIBS = @EET_LIBS@ EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@ EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@ EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@ EFL_SHM_OPEN_LIBS = @EFL_SHM_OPEN_LIBS@ EGREP = @EGREP@ EINA_CFLAGS = @EINA_CFLAGS@ EINA_LIBS = @EINA_LIBS@ EVAS_CFLAGS = @EVAS_CFLAGS@ EVAS_GENERAL_CFLAGS = @EVAS_GENERAL_CFLAGS@ EVAS_GENERAL_LIBS = @EVAS_GENERAL_LIBS@ EVAS_LIBS = @EVAS_LIBS@ EVAS_SSE3_CFLAGS = @EVAS_SSE3_CFLAGS@ EVIL_CFLAGS = @EVIL_CFLAGS@ EVIL_LIBS = @EVIL_LIBS@ EXEEXT = @EXEEXT@ EXOTIC_CFLAGS = @EXOTIC_CFLAGS@ EXOTIC_LIBS = @EXOTIC_LIBS@ FGREP = @FGREP@ FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@ FONTCONFIG_LIBS = @FONTCONFIG_LIBS@ FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ FREETYPE_LIBS = @FREETYPE_LIBS@ FRIBIDI_CFLAGS = @FRIBIDI_CFLAGS@ FRIBIDI_LIBS = @FRIBIDI_LIBS@ GL_EET_CFLAGS = @GL_EET_CFLAGS@ GL_EET_LIBS = @GL_EET_LIBS@ GREP = @GREP@ HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@ HARFBUZZ_LIBS = @HARFBUZZ_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LINEBREAK_CFLAGS = @LINEBREAK_CFLAGS@ LINEBREAK_LIBS = @LINEBREAK_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MODULE_ARCH = @MODULE_ARCH@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ SDL_CFLAGS = @SDL_CFLAGS@ SDL_LIBS = @SDL_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ SVG_CFLAGS = @SVG_CFLAGS@ SVG_LIBS = @SVG_LIBS@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ XCB_CFLAGS = @XCB_CFLAGS@ XCB_GL_CFLAGS = @XCB_GL_CFLAGS@ XCB_GL_LIBS = @XCB_GL_LIBS@ XCB_LIBS = @XCB_LIBS@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_ct_OBJC = @ac_ct_OBJC@ altivec_cflags = @altivec_cflags@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ dlopen_libs = @dlopen_libs@ docdir = @docdir@ dvidir = @dvidir@ edje_cc = @edje_cc@ efl_doxygen = @efl_doxygen@ efl_have_doxygen = @efl_have_doxygen@ evas_engine_buffer_cflags = @evas_engine_buffer_cflags@ evas_engine_buffer_libs = @evas_engine_buffer_libs@ evas_engine_direct3d_cflags = @evas_engine_direct3d_cflags@ evas_engine_direct3d_libs = @evas_engine_direct3d_libs@ evas_engine_directfb_cflags = @evas_engine_directfb_cflags@ evas_engine_directfb_libs = @evas_engine_directfb_libs@ evas_engine_fb_cflags = @evas_engine_fb_cflags@ evas_engine_fb_libs = @evas_engine_fb_libs@ evas_engine_gl_cocoa_cflags = @evas_engine_gl_cocoa_cflags@ evas_engine_gl_cocoa_libs = @evas_engine_gl_cocoa_libs@ evas_engine_gl_common_libs = @evas_engine_gl_common_libs@ evas_engine_gl_sdl_cflags = @evas_engine_gl_sdl_cflags@ evas_engine_gl_sdl_libs = @evas_engine_gl_sdl_libs@ evas_engine_gl_xcb_cflags = @evas_engine_gl_xcb_cflags@ evas_engine_gl_xcb_libs = @evas_engine_gl_xcb_libs@ evas_engine_gl_xlib_cflags = @evas_engine_gl_xlib_cflags@ evas_engine_gl_xlib_libs = @evas_engine_gl_xlib_libs@ evas_engine_psl1ght_cflags = @evas_engine_psl1ght_cflags@ evas_engine_psl1ght_libs = @evas_engine_psl1ght_libs@ evas_engine_software_16_sdl_cflags = @evas_engine_software_16_sdl_cflags@ evas_engine_software_16_sdl_libs = @evas_engine_software_16_sdl_libs@ evas_engine_software_16_wince_cflags = @evas_engine_software_16_wince_cflags@ evas_engine_software_16_wince_libs = @evas_engine_software_16_wince_libs@ evas_engine_software_16_x11_cflags = @evas_engine_software_16_x11_cflags@ evas_engine_software_16_x11_libs = @evas_engine_software_16_x11_libs@ evas_engine_software_8_x11_cflags = @evas_engine_software_8_x11_cflags@ evas_engine_software_8_x11_libs = @evas_engine_software_8_x11_libs@ evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@ evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@ evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@ evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ evas_image_loader_edb_libs = @evas_image_loader_edb_libs@ evas_image_loader_eet_cflags = @evas_image_loader_eet_cflags@ evas_image_loader_eet_libs = @evas_image_loader_eet_libs@ evas_image_loader_generic_cflags = @evas_image_loader_generic_cflags@ evas_image_loader_generic_libs = @evas_image_loader_generic_libs@ evas_image_loader_gif_cflags = @evas_image_loader_gif_cflags@ evas_image_loader_gif_libs = @evas_image_loader_gif_libs@ evas_image_loader_ico_cflags = @evas_image_loader_ico_cflags@ evas_image_loader_ico_libs = @evas_image_loader_ico_libs@ evas_image_loader_jpeg_cflags = @evas_image_loader_jpeg_cflags@ evas_image_loader_jpeg_libs = @evas_image_loader_jpeg_libs@ evas_image_loader_pmaps_cflags = @evas_image_loader_pmaps_cflags@ evas_image_loader_pmaps_libs = @evas_image_loader_pmaps_libs@ evas_image_loader_png_cflags = @evas_image_loader_png_cflags@ evas_image_loader_png_libs = @evas_image_loader_png_libs@ evas_image_loader_psd_cflags = @evas_image_loader_psd_cflags@ evas_image_loader_psd_libs = @evas_image_loader_psd_libs@ evas_image_loader_svg_cflags = @evas_image_loader_svg_cflags@ evas_image_loader_svg_libs = @evas_image_loader_svg_libs@ evas_image_loader_tga_cflags = @evas_image_loader_tga_cflags@ evas_image_loader_tga_libs = @evas_image_loader_tga_libs@ evas_image_loader_tiff_cflags = @evas_image_loader_tiff_cflags@ evas_image_loader_tiff_libs = @evas_image_loader_tiff_libs@ evas_image_loader_wbmp_cflags = @evas_image_loader_wbmp_cflags@ evas_image_loader_wbmp_libs = @evas_image_loader_wbmp_libs@ evas_image_loader_xpm_cflags = @evas_image_loader_xpm_cflags@ evas_image_loader_xpm_libs = @evas_image_loader_xpm_libs@ exec_prefix = @exec_prefix@ have_evas_engine_gl_x11 = @have_evas_engine_gl_x11@ have_evas_engine_gl_xcb = @have_evas_engine_gl_xcb@ have_evas_engine_gl_xlib = @have_evas_engine_gl_xlib@ have_evas_engine_software_x11 = @have_evas_engine_software_x11@ have_evas_engine_software_xcb = @have_evas_engine_software_xcb@ have_evas_engine_software_xlib = @have_evas_engine_software_xlib@ have_lcov = @have_lcov@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_enable_auto_import = @lt_enable_auto_import@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgconfig_requires_private = @pkgconfig_requires_private@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pthread_cflags = @pthread_cflags@ pthread_libs = @pthread_libs@ release_info = @release_info@ requirement_evas = @requirement_evas@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ shm_open_libs = @shm_open_libs@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ version_info = @version_info@ MAINTAINERCLEANFILES = Makefile.in AM_CPPFLAGS = \ -I. \ -I$(top_srcdir)/src/lib \ -I$(top_srcdir)/src/lib/include \ @EVAS_GENERAL_CFLAGS@ \ @FREETYPE_CFLAGS@ \ @FRIBIDI_CFLAGS@ \ @EET_CFLAGS@ \ @FONTCONFIG_CFLAGS@ \ @pthread_cflags@ \ @PIXMAN_CFLAGS@ @EVAS_CSERVE2_TRUE@noinst_LTLIBRARIES = libevas_cserve2.la libevas_cserve2_utils.la @EVAS_CSERVE2_TRUE@libevas_cserve2_la_SOURCES = \ @EVAS_CSERVE2_TRUE@evas_cs2.h \ @EVAS_CSERVE2_TRUE@evas_cs2_private.h \ @EVAS_CSERVE2_TRUE@evas_cs2_image_data.c \ @EVAS_CSERVE2_TRUE@evas_cs2_client.c @EVAS_CSERVE2_TRUE@libevas_cserve2_utils_la_SOURCES = \ @EVAS_CSERVE2_TRUE@evas_cs2_utils.h \ @EVAS_CSERVE2_TRUE@evas_cs2_utils.c @EVAS_CSERVE2_TRUE@libevas_cserve2_la_LIBADD = @EVAS_GENERAL_LIBS@ libevas_cserve2_utils.la all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/lib/cserve2/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/lib/cserve2/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libevas_cserve2.la: $(libevas_cserve2_la_OBJECTS) $(libevas_cserve2_la_DEPENDENCIES) $(EXTRA_libevas_cserve2_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(am_libevas_cserve2_la_rpath) $(libevas_cserve2_la_OBJECTS) $(libevas_cserve2_la_LIBADD) $(LIBS) libevas_cserve2_utils.la: $(libevas_cserve2_utils_la_OBJECTS) $(libevas_cserve2_utils_la_DEPENDENCIES) $(EXTRA_libevas_cserve2_utils_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(am_libevas_cserve2_utils_la_rpath) $(libevas_cserve2_utils_la_OBJECTS) $(libevas_cserve2_utils_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_cs2_client.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_cs2_image_data.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_cs2_utils.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES cscopelist-am ctags \ ctags-am distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: evas-1.7.9/src/lib/cserve2/evas_cs2_utils.c0000664000175000017500000000533712175475547015441 00000000000000/* THIS FILE TO BE SHARED WITH THE BIN PART. KEEP IT CLEAN. THERE BE DRAGONS */ #ifdef HAVE_CONFIG_H # include "config.h" #endif #include #include #include "evas_cs2_utils.h" /* fash */ typedef struct _Fash_Glyph_Map Fash_Glyph_Map; typedef struct _Fash_Glyph_Map2 Fash_Glyph_Map2; struct _Fash_Glyph_Map { void *item[256]; }; struct _Fash_Glyph_Map2 { Fash_Glyph_Map *bucket[256]; }; struct _Fash_Glyph2 { Fash_Glyph_Map2 *bucket[256]; void (*free_cb)(void *glyph); }; static void _fash_item_free(Fash_Glyph2 *fash, Fash_Glyph_Map *map) { int i; if (fash->free_cb) for (i = 0; i < 256; i++) if (map->item[i]) fash->free_cb(map->item[i]); free(map); } static void _fash_gl2_free(Fash_Glyph2 *fash, Fash_Glyph_Map2 *fash2) { int i; for (i = 0; i < 256; i++) if (fash2->bucket[i]) _fash_item_free(fash, fash2->bucket[i]); free(fash2); } void fash_gl_free(Fash_Glyph2 *fash) { int i; for (i = 0; i < 256; i++) if (fash->bucket[i]) _fash_gl2_free(fash, fash->bucket[i]); free(fash); } Fash_Glyph2 * fash_gl_new(void (*free_cb)(void *glyph)) { Fash_Glyph2 *fash = calloc(1, sizeof(Fash_Glyph2)); fash->free_cb = free_cb; return fash; } void * fash_gl_find(Fash_Glyph2 *fash, int item) { int grp, maj, min; // 24bits for unicode - v6 up to E01EF (chrs) & 10FFFD for private use (plane 16) grp = (item >> 16) & 0xff; maj = (item >> 8) & 0xff; min = item & 0xff; if (!fash->bucket[grp]) return NULL; if (!fash->bucket[grp]->bucket[maj]) return NULL; return fash->bucket[grp]->bucket[maj]->item[min]; } void fash_gl_add(Fash_Glyph2 *fash, int item, void *glyph) { int grp, maj, min; // 24bits for unicode - v6 up to E01EF (chrs) & 10FFFD for private use (plane 16) grp = (item >> 16) & 0xff; maj = (item >> 8) & 0xff; min = item & 0xff; if (!fash->bucket[grp]) fash->bucket[grp] = calloc(1, sizeof(Fash_Glyph_Map2)); EINA_SAFETY_ON_NULL_RETURN(fash->bucket[grp]); if (!fash->bucket[grp]->bucket[maj]) fash->bucket[grp]->bucket[maj] = calloc(1, sizeof(Fash_Glyph_Map)); EINA_SAFETY_ON_NULL_RETURN(fash->bucket[grp]->bucket[maj]); fash->bucket[grp]->bucket[maj]->item[min] = glyph; } void fash_gl_del(Fash_Glyph2 *fash, int item) { int grp, maj, min; void *data; // 24bits for unicode - v6 up to E01EF (chrs) & 10FFFD for private use (plane 16) grp = (item >> 16) & 0xff; maj = (item >> 8) & 0xff; min = item & 0xff; if (!fash->bucket[grp]) return; if (!fash->bucket[grp]->bucket[maj]) return; if (!fash->bucket[grp]->bucket[maj]->item[min]) return; data = fash->bucket[grp]->bucket[maj]->item[min]; fash->free_cb(data); fash->bucket[grp]->bucket[maj]->item[min] = NULL; } evas-1.7.9/src/lib/cserve2/evas_cs2_private.h0000664000175000017500000000305612175475547015754 00000000000000#ifndef EVAS_CS2_PRIVATE_H #define EVAS_CS2_PRIVATE_H 1 #include "evas_common.h" struct _Data_Entry { unsigned int image_id; void (*preloaded_cb)(void *, Eina_Bool); struct { const char *path; int mmap_offset; int use_offset; int mmap_size; int image_size; Eina_File *f; void *data; } shm; }; typedef struct _Data_Entry Data_Entry; typedef struct _Font_Entry Font_Entry; int evas_cserve2_init(void); int evas_cserve2_shutdown(void); EAPI int evas_cserve2_use_get(void); Eina_Bool evas_cserve2_image_load(Image_Entry *ie, const char *file, const char *key, RGBA_Image_Loadopts *lopt); int evas_cserve2_image_load_wait(Image_Entry *ie); Eina_Bool evas_cserve2_image_data_load(Image_Entry *ie); void evas_cserve2_image_load_data_wait(Image_Entry *ie); void evas_cserve2_image_free(Image_Entry *ie); void evas_cserve2_image_unload(Image_Entry *ie); Eina_Bool evas_cserve2_image_preload(Image_Entry *ie, void (*preloaded_cb)(void *im, Eina_Bool success)); void evas_cserve2_dispatch(void); void *evas_cserve2_image_data_get(Image_Entry *ie); Font_Entry *evas_cserve2_font_load(const char *source, const char *name, int size, int dpi, Font_Rend_Flags wanted_rend); void evas_cserve2_font_free(Font_Entry *fe); Eina_Bool evas_cserve2_font_glyph_request(Font_Entry *fe, unsigned int idx, Font_Hint_Flags hints); Eina_Bool evas_cserve2_font_glyph_used(Font_Entry *fe, unsigned int idx, Font_Hint_Flags hints); RGBA_Font_Glyph_Out *evas_cserve2_font_glyph_bitmap_get(Font_Entry *fe, unsigned int idx, Font_Hint_Flags hints); #endif evas-1.7.9/src/lib/cserve2/evas_cs2_utils.h0000664000175000017500000000073412175475547015442 00000000000000/* THIS FILE TO BE SHARED WITH THE BIN PART. KEEP IT CLEAN. THERE BE DRAGONS */ #ifndef _EVAS_CSERVE2_UTILS_H_ #define _EVAS_CSERVE2_UTILS_H_ typedef struct _Fash_Glyph2 Fash_Glyph2; Fash_Glyph2 *fash_gl_new(void (*free_cb)(void *glyph)); void fash_gl_free(Fash_Glyph2 *fash); void *fash_gl_find(Fash_Glyph2 *fash, int item); void fash_gl_add(Fash_Glyph2 *fash, int item, void *glyph); void fash_gl_del(Fash_Glyph2 *fash, int item); #endif /* EVAS_CSERVE2_UTILS_H_ */ evas-1.7.9/src/lib/cserve2/evas_cs2.h0000664000175000017500000001644212175475547014225 00000000000000#ifndef EVAS_CS2_H #define EVAS_CS2_H 1 #include #ifdef EVAS_CSERVE2 typedef enum { CSERVE2_OPEN = 1, CSERVE2_OPENED, CSERVE2_SETOPTS, CSERVE2_SETOPTSED, CSERVE2_LOAD, CSERVE2_LOADED, CSERVE2_PRELOAD, CSERVE2_UNLOAD, CSERVE2_CLOSE, CSERVE2_FONT_LOAD, CSERVE2_FONT_LOADED, CSERVE2_FONT_UNLOAD, CSERVE2_FONT_GLYPHS_LOAD, CSERVE2_FONT_GLYPHS_LOADED, CSERVE2_FONT_GLYPHS_USED, CSERVE2_STATS, CSERVE2_FONT_DEBUG, CSERVE2_ERROR } Message_Type; typedef enum { CSERVE2_NONE, CSERVE2_GENERIC, CSERVE2_DOES_NOT_EXIST, CSERVE2_PERMISSION_DENIED, CSERVE2_RESOURCE_ALLOCATION_FAILED, CSERVE2_CORRUPT_FILE, CSERVE2_UNKNOWN_FORMAT, CSERVE2_INVALID_COMMAND, CSERVE2_LOADER_DIED, CSERVE2_LOADER_EXEC_ERR, CSERVE2_INVALID_CACHE, // invalid cserve cache entry CSERVE2_FILE_CHANGED, CSERVE2_REQUEST_CANCEL } Error_Type; struct _Msg_Base { int type; unsigned int rid; }; typedef struct _Msg_Base Msg_Base; struct _Msg_Open { Msg_Base base; unsigned int file_id; int path_offset; int key_offset; }; struct _Msg_Opened { Msg_Base base; struct { int w, h; int frame_count; int loop_count; int loop_hint; /* include Evas.h? Copy the enum around? */ Eina_Bool alpha : 1; } image; }; struct _Msg_Setopts { Msg_Base base; unsigned int file_id; unsigned int image_id; struct { double dpi; int w, h; int scale_down; int rx, ry, rw, rh; Eina_Bool orientation; } opts; }; struct _Msg_Setoptsed { Msg_Base base; }; struct _Msg_Load { Msg_Base base; unsigned int image_id; }; struct _Msg_Loaded { Msg_Base base; struct { int mmap_offset; int use_offset; int mmap_size; int image_size; } shm; Eina_Bool alpha_sparse : 1; }; struct _Msg_Preload { Msg_Base base; unsigned int image_id; }; struct _Msg_Preloaded { Msg_Base base; }; struct _Msg_Unload { Msg_Base base; unsigned int image_id; }; struct _Msg_Close { Msg_Base base; unsigned int file_id; }; /** * @struct _Msg_Font_Load * * Message from client to request load or unload of a font. * * The path strings follow the struct inside the message. */ struct _Msg_Font_Load { Msg_Base base; unsigned int sourcelen; // font id unsigned int pathlen; // font id unsigned int rend_flags; // font id unsigned int size; // font id unsigned int dpi; // font id }; /** * @struct _Msg_Font_Loaded * * Message from server to inform that a font was loaded. */ struct _Msg_Font_Loaded { Msg_Base base; }; /** * @struct _Msg_Font_Glyphs_Request * * Message from client to request load of glyphs, or inform usage of them. * * The path strings follow the struct inside the message, as well as * the list of glyphs to be loaded. */ struct _Msg_Font_Glyphs_Request { Msg_Base base; unsigned int sourcelen; // font id unsigned int pathlen; // font id unsigned int rend_flags; // font id unsigned int size; // font id unsigned int dpi; // font id unsigned int hint; unsigned int nglyphs; }; /** * @struct _Msg_Font_Glyphs_Loaded * * Message from server to inform that some glyphs were loaded. * * This message is quite complex: it contains the font id, representing for * which font these glyphs should be loaded, and the number of caches on which * the loaded glyphs are stored. Each cache is a SHM segment. The information * about each SHM comes serialized just after this struct, and can be read in * order as follows: * * shm name: * - unsigned int size; * - char name[]; * glyphs: * - unsigned int nglyphs; * - struct { * unsigned int index; * unsigned int offset; * unsigned int size; * unsigned int rows; * unsigned int width; * unsigned int pitch; * unsigned int num_grays; * unsigned int pixel_mode; * } glarray[]; */ struct _Msg_Font_Glyphs_Loaded { Msg_Base base; unsigned int ncaches; }; struct _Msg_Stats { Msg_Base base; struct { unsigned int requested_size; unsigned int real_size; unsigned int unused_size; unsigned int fonts_loaded; /* number of loaded fonts */ unsigned int fonts_unused; /* number of loaded fonts without reference * from any clients */ int fonts_load_time; /* total time spent loading fonts */ int fonts_used_load_time; /* total time spent loading fonts that are * really used, i.e. fonts that have glyphs * rendered */ int fonts_used_saved_time; int glyphs_request_time; /* time spent waiting for glyph requests */ int glyphs_load_time; /* total time spent loading glyphs */ int glyphs_render_time; /* total time spent rendering glyphs */ int glyphs_slave_time; /* total time spent on the slave processing glyph load requests */ int glyphs_saved_time; /* total time spent loading glyphs */ } fonts; struct { unsigned int files_loaded; /* number of file headers loaded */ unsigned int images_loaded; /* number of image data loaded */ unsigned int images_unused; /* number of image data loaded and unused */ unsigned int requested_size; /* memory usage originally requested by * the client */ unsigned int files_size; /* memory usage from image headers */ unsigned int images_size; /* memory usage from image data */ unsigned int unused_size; /* memory usage from image data */ int files_load_time; int files_saved_time; int images_load_time; int images_saved_time; } images; }; /* * @struct _Msg_Font_Debug * * Message from server containing all font cache info. * * Content of the message follows: * * * number of font entries; * * each font entry: * - unsigned int filelen * - const char file * - unsigned int namelen * - const char name * - unsigned int rend_flags; * - unsigned int size; * - unsigned int dpi; * - unsigned int unused; * - ncaches: * - each cache: * * usigned int shmnamelen; * * const char shmname; * * unsigned int size; * * unsigned int usage; * * unsigned int nglyphs; * * each glyph: * - unsigned int index; * - unsigned int offset; * - unsigned int size; * - unsigned int rows; * - unsigned int width; * - unsigned int pitch; * - unsigned int num_grays; * - unsigned int pixel_mode; */ struct _Msg_Font_Debug { Msg_Base base; }; struct _Msg_Error { Msg_Base base; int error; }; typedef struct _Msg_Open Msg_Open; typedef struct _Msg_Opened Msg_Opened; typedef struct _Msg_Setopts Msg_Setopts; typedef struct _Msg_Setoptsed Msg_Setoptsed; typedef struct _Msg_Load Msg_Load; typedef struct _Msg_Loaded Msg_Loaded; typedef struct _Msg_Preload Msg_Preload; typedef struct _Msg_Preloaded Msg_Preloaded; typedef struct _Msg_Unload Msg_Unload; typedef struct _Msg_Close Msg_Close; typedef struct _Msg_Font_Load Msg_Font_Load; typedef struct _Msg_Font_Loaded Msg_Font_Loaded; typedef struct _Msg_Font_Glyphs_Request Msg_Font_Glyphs_Request; typedef struct _Msg_Font_Glyphs_Loaded Msg_Font_Glyphs_Loaded; typedef struct _Msg_Stats Msg_Stats; typedef struct _Msg_Font_Debug Msg_Font_Debug; typedef struct _Msg_Error Msg_Error; #endif #endif evas-1.7.9/src/lib/cserve2/evas_cs2_image_data.c0000664000175000017500000000050212175475547016341 00000000000000#include "config.h" #include #include #include #include "evas_cs2.h" #include "evas_cs2_private.h" #ifdef EVAS_CSERVE2 void * evas_cserve2_image_data_get(Image_Entry *ie) { Data_Entry *dentry = ie->data2; if (!dentry) return NULL; return dentry->shm.data; } #endif evas-1.7.9/src/lib/cserve2/Makefile.am0000664000175000017500000000112712175475547014375 00000000000000MAINTAINERCLEANFILES = Makefile.in AM_CPPFLAGS = \ -I. \ -I$(top_srcdir)/src/lib \ -I$(top_srcdir)/src/lib/include \ @EVAS_GENERAL_CFLAGS@ \ @FREETYPE_CFLAGS@ \ @FRIBIDI_CFLAGS@ \ @EET_CFLAGS@ \ @FONTCONFIG_CFLAGS@ \ @pthread_cflags@ \ @PIXMAN_CFLAGS@ if EVAS_CSERVE2 noinst_LTLIBRARIES = libevas_cserve2.la libevas_cserve2_utils.la libevas_cserve2_la_SOURCES = \ evas_cs2.h \ evas_cs2_private.h \ evas_cs2_image_data.c \ evas_cs2_client.c libevas_cserve2_utils_la_SOURCES = \ evas_cs2_utils.h \ evas_cs2_utils.c libevas_cserve2_la_LIBADD = @EVAS_GENERAL_LIBS@ libevas_cserve2_utils.la endif evas-1.7.9/src/lib/include/0000775000175000017500000000000012234557316012461 500000000000000evas-1.7.9/src/lib/include/Makefile.in0000664000175000017500000004625212234557303014453 00000000000000# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/lib/include DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/efl_attribute.m4 \ $(top_srcdir)/m4/efl_coverage.m4 \ $(top_srcdir)/m4/efl_doxygen.m4 \ $(top_srcdir)/m4/efl_fnmatch.m4 \ $(top_srcdir)/m4/efl_path_max.m4 \ $(top_srcdir)/m4/efl_shm_open.m4 $(top_srcdir)/m4/efl_tests.m4 \ $(top_srcdir)/m4/evas_check_engine.m4 \ $(top_srcdir)/m4/evas_check_loader.m4 \ $(top_srcdir)/m4/evas_converter.m4 \ $(top_srcdir)/m4/evas_dither.m4 \ $(top_srcdir)/m4/evas_scaler.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHECK_CFLAGS = @CHECK_CFLAGS@ CHECK_LIBS = @CHECK_LIBS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@ DIRECTFB_LIBS = @DIRECTFB_LIBS@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ ECORE_EVAS_CFLAGS = @ECORE_EVAS_CFLAGS@ ECORE_EVAS_LIBS = @ECORE_EVAS_LIBS@ EDB_CFLAGS = @EDB_CFLAGS@ EDB_LIBS = @EDB_LIBS@ EDJE_CFLAGS = @EDJE_CFLAGS@ EDJE_LIBS = @EDJE_LIBS@ EET_CFLAGS = @EET_CFLAGS@ EET_LIBS = @EET_LIBS@ EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@ EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@ EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@ EFL_SHM_OPEN_LIBS = @EFL_SHM_OPEN_LIBS@ EGREP = @EGREP@ EINA_CFLAGS = @EINA_CFLAGS@ EINA_LIBS = @EINA_LIBS@ EVAS_CFLAGS = @EVAS_CFLAGS@ EVAS_GENERAL_CFLAGS = @EVAS_GENERAL_CFLAGS@ EVAS_GENERAL_LIBS = @EVAS_GENERAL_LIBS@ EVAS_LIBS = @EVAS_LIBS@ EVAS_SSE3_CFLAGS = @EVAS_SSE3_CFLAGS@ EVIL_CFLAGS = @EVIL_CFLAGS@ EVIL_LIBS = @EVIL_LIBS@ EXEEXT = @EXEEXT@ EXOTIC_CFLAGS = @EXOTIC_CFLAGS@ EXOTIC_LIBS = @EXOTIC_LIBS@ FGREP = @FGREP@ FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@ FONTCONFIG_LIBS = @FONTCONFIG_LIBS@ FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ FREETYPE_LIBS = @FREETYPE_LIBS@ FRIBIDI_CFLAGS = @FRIBIDI_CFLAGS@ FRIBIDI_LIBS = @FRIBIDI_LIBS@ GL_EET_CFLAGS = @GL_EET_CFLAGS@ GL_EET_LIBS = @GL_EET_LIBS@ GREP = @GREP@ HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@ HARFBUZZ_LIBS = @HARFBUZZ_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LINEBREAK_CFLAGS = @LINEBREAK_CFLAGS@ LINEBREAK_LIBS = @LINEBREAK_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MODULE_ARCH = @MODULE_ARCH@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ SDL_CFLAGS = @SDL_CFLAGS@ SDL_LIBS = @SDL_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ SVG_CFLAGS = @SVG_CFLAGS@ SVG_LIBS = @SVG_LIBS@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ XCB_CFLAGS = @XCB_CFLAGS@ XCB_GL_CFLAGS = @XCB_GL_CFLAGS@ XCB_GL_LIBS = @XCB_GL_LIBS@ XCB_LIBS = @XCB_LIBS@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_ct_OBJC = @ac_ct_OBJC@ altivec_cflags = @altivec_cflags@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ dlopen_libs = @dlopen_libs@ docdir = @docdir@ dvidir = @dvidir@ edje_cc = @edje_cc@ efl_doxygen = @efl_doxygen@ efl_have_doxygen = @efl_have_doxygen@ evas_engine_buffer_cflags = @evas_engine_buffer_cflags@ evas_engine_buffer_libs = @evas_engine_buffer_libs@ evas_engine_direct3d_cflags = @evas_engine_direct3d_cflags@ evas_engine_direct3d_libs = @evas_engine_direct3d_libs@ evas_engine_directfb_cflags = @evas_engine_directfb_cflags@ evas_engine_directfb_libs = @evas_engine_directfb_libs@ evas_engine_fb_cflags = @evas_engine_fb_cflags@ evas_engine_fb_libs = @evas_engine_fb_libs@ evas_engine_gl_cocoa_cflags = @evas_engine_gl_cocoa_cflags@ evas_engine_gl_cocoa_libs = @evas_engine_gl_cocoa_libs@ evas_engine_gl_common_libs = @evas_engine_gl_common_libs@ evas_engine_gl_sdl_cflags = @evas_engine_gl_sdl_cflags@ evas_engine_gl_sdl_libs = @evas_engine_gl_sdl_libs@ evas_engine_gl_xcb_cflags = @evas_engine_gl_xcb_cflags@ evas_engine_gl_xcb_libs = @evas_engine_gl_xcb_libs@ evas_engine_gl_xlib_cflags = @evas_engine_gl_xlib_cflags@ evas_engine_gl_xlib_libs = @evas_engine_gl_xlib_libs@ evas_engine_psl1ght_cflags = @evas_engine_psl1ght_cflags@ evas_engine_psl1ght_libs = @evas_engine_psl1ght_libs@ evas_engine_software_16_sdl_cflags = @evas_engine_software_16_sdl_cflags@ evas_engine_software_16_sdl_libs = @evas_engine_software_16_sdl_libs@ evas_engine_software_16_wince_cflags = @evas_engine_software_16_wince_cflags@ evas_engine_software_16_wince_libs = @evas_engine_software_16_wince_libs@ evas_engine_software_16_x11_cflags = @evas_engine_software_16_x11_cflags@ evas_engine_software_16_x11_libs = @evas_engine_software_16_x11_libs@ evas_engine_software_8_x11_cflags = @evas_engine_software_8_x11_cflags@ evas_engine_software_8_x11_libs = @evas_engine_software_8_x11_libs@ evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@ evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@ evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@ evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ evas_image_loader_edb_libs = @evas_image_loader_edb_libs@ evas_image_loader_eet_cflags = @evas_image_loader_eet_cflags@ evas_image_loader_eet_libs = @evas_image_loader_eet_libs@ evas_image_loader_generic_cflags = @evas_image_loader_generic_cflags@ evas_image_loader_generic_libs = @evas_image_loader_generic_libs@ evas_image_loader_gif_cflags = @evas_image_loader_gif_cflags@ evas_image_loader_gif_libs = @evas_image_loader_gif_libs@ evas_image_loader_ico_cflags = @evas_image_loader_ico_cflags@ evas_image_loader_ico_libs = @evas_image_loader_ico_libs@ evas_image_loader_jpeg_cflags = @evas_image_loader_jpeg_cflags@ evas_image_loader_jpeg_libs = @evas_image_loader_jpeg_libs@ evas_image_loader_pmaps_cflags = @evas_image_loader_pmaps_cflags@ evas_image_loader_pmaps_libs = @evas_image_loader_pmaps_libs@ evas_image_loader_png_cflags = @evas_image_loader_png_cflags@ evas_image_loader_png_libs = @evas_image_loader_png_libs@ evas_image_loader_psd_cflags = @evas_image_loader_psd_cflags@ evas_image_loader_psd_libs = @evas_image_loader_psd_libs@ evas_image_loader_svg_cflags = @evas_image_loader_svg_cflags@ evas_image_loader_svg_libs = @evas_image_loader_svg_libs@ evas_image_loader_tga_cflags = @evas_image_loader_tga_cflags@ evas_image_loader_tga_libs = @evas_image_loader_tga_libs@ evas_image_loader_tiff_cflags = @evas_image_loader_tiff_cflags@ evas_image_loader_tiff_libs = @evas_image_loader_tiff_libs@ evas_image_loader_wbmp_cflags = @evas_image_loader_wbmp_cflags@ evas_image_loader_wbmp_libs = @evas_image_loader_wbmp_libs@ evas_image_loader_xpm_cflags = @evas_image_loader_xpm_cflags@ evas_image_loader_xpm_libs = @evas_image_loader_xpm_libs@ exec_prefix = @exec_prefix@ have_evas_engine_gl_x11 = @have_evas_engine_gl_x11@ have_evas_engine_gl_xcb = @have_evas_engine_gl_xcb@ have_evas_engine_gl_xlib = @have_evas_engine_gl_xlib@ have_evas_engine_software_x11 = @have_evas_engine_software_x11@ have_evas_engine_software_xcb = @have_evas_engine_software_xcb@ have_evas_engine_software_xlib = @have_evas_engine_software_xlib@ have_lcov = @have_lcov@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_enable_auto_import = @lt_enable_auto_import@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgconfig_requires_private = @pkgconfig_requires_private@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pthread_cflags = @pthread_cflags@ pthread_libs = @pthread_libs@ release_info = @release_info@ requirement_evas = @requirement_evas@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ shm_open_libs = @shm_open_libs@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ version_info = @version_info@ MAINTAINERCLEANFILES = Makefile.in EXTRA_DIST = \ evas_inline.x \ evas_private.h \ evas_options.h \ evas_macros.h \ evas_mmx.h \ evas_common.h \ evas_common_soft8.h \ evas_common_soft16.h \ evas_blend_ops.h all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/lib/include/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/lib/include/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags TAGS: ctags CTAGS: cscope cscopelist: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ cscopelist-am ctags-am distclean distclean-generic \ distclean-libtool distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: evas-1.7.9/src/lib/include/evas_private.h0000664000175000017500000012565412175475547015270 00000000000000#ifndef EVAS_PRIVATE_H #define EVAS_PRIVATE_H #ifdef HAVE_CONFIG_H # include #endif #include #include #include "Evas.h" #include "../file/evas_module.h" #include "../file/evas_path.h" #include "../engines/common/evas_text_utils.h" #include "../engines/common/language/evas_bidi_utils.h" #include "../engines/common/language/evas_language_utils.h" #ifdef EVAS_MAGIC_DEBUG /* complain when peole pass in wrong object types etc. */ # define MAGIC_DEBUG #endif #define RENDER_METHOD_INVALID 0x00000000 typedef struct _Evas_Layer Evas_Layer; typedef struct _Evas_Size Evas_Size; typedef struct _Evas_Aspect Evas_Aspect; typedef struct _Evas_Border Evas_Border; typedef struct _Evas_Double_Pair Evas_Double_Pair; typedef struct _Evas_Size_Hints Evas_Size_Hints; typedef struct _Evas_Font_Dir Evas_Font_Dir; typedef struct _Evas_Font Evas_Font; typedef struct _Evas_Font_Alias Evas_Font_Alias; typedef struct _Evas_Font_Description Evas_Font_Description; typedef struct _Evas_Data_Node Evas_Data_Node; typedef struct _Evas_Func_Node Evas_Func_Node; typedef RGBA_Image_Loadopts Evas_Image_Load_Opts; typedef struct _Evas_Func Evas_Func; typedef struct _Evas_Image_Load_Func Evas_Image_Load_Func; typedef struct _Evas_Image_Save_Func Evas_Image_Save_Func; typedef struct _Evas_Object_Func Evas_Object_Func; typedef struct _Evas_Intercept_Func Evas_Intercept_Func; typedef struct _Evas_Key_Grab Evas_Key_Grab; typedef struct _Evas_Callbacks Evas_Callbacks; typedef struct _Evas_Format Evas_Format; typedef struct _Evas_Map_Point Evas_Map_Point; typedef struct _Evas_Smart_Cb_Description_Array Evas_Smart_Cb_Description_Array; typedef struct _Evas_Smart_Interfaces_Array Evas_Smart_Interfaces_Array; typedef struct _Evas_Post_Callback Evas_Post_Callback; typedef struct _Evas_Coord_Touch_Point Evas_Coord_Touch_Point; enum _Evas_Font_Style { EVAS_FONT_STYLE_SLANT, EVAS_FONT_STYLE_WEIGHT, EVAS_FONT_STYLE_WIDTH }; enum _Evas_Font_Slant { EVAS_FONT_SLANT_NORMAL, EVAS_FONT_SLANT_OBLIQUE, EVAS_FONT_SLANT_ITALIC }; enum _Evas_Font_Weight { EVAS_FONT_WEIGHT_NORMAL, EVAS_FONT_WEIGHT_THIN, EVAS_FONT_WEIGHT_ULTRALIGHT, EVAS_FONT_WEIGHT_LIGHT, EVAS_FONT_WEIGHT_BOOK, EVAS_FONT_WEIGHT_MEDIUM, EVAS_FONT_WEIGHT_SEMIBOLD, EVAS_FONT_WEIGHT_BOLD, EVAS_FONT_WEIGHT_ULTRABOLD, EVAS_FONT_WEIGHT_BLACK, EVAS_FONT_WEIGHT_EXTRABLACK }; enum _Evas_Font_Width { EVAS_FONT_WIDTH_NORMAL, EVAS_FONT_WIDTH_ULTRACONDENSED, EVAS_FONT_WIDTH_EXTRACONDENSED, EVAS_FONT_WIDTH_CONDENSED, EVAS_FONT_WIDTH_SEMICONDENSED, EVAS_FONT_WIDTH_SEMIEXPANDED, EVAS_FONT_WIDTH_EXPANDED, EVAS_FONT_WIDTH_EXTRAEXPANDED, EVAS_FONT_WIDTH_ULTRAEXPANDED }; typedef enum _Evas_Font_Style Evas_Font_Style; typedef enum _Evas_Font_Slant Evas_Font_Slant; typedef enum _Evas_Font_Weight Evas_Font_Weight; typedef enum _Evas_Font_Width Evas_Font_Width; /* General types - used for script type chceking */ #define OPAQUE_TYPE(type) struct __##type { int a; }; \ typedef struct __##type type OPAQUE_TYPE(Evas_Font_Set); /* General type for RGBA_Font */ OPAQUE_TYPE(Evas_Font_Instance); /* General type for RGBA_Font_Int */ /* End of general types */ #define MAGIC_EVAS 0x70777770 #define MAGIC_OBJ 0x71777770 #define MAGIC_OBJ_RECTANGLE 0x71777771 #define MAGIC_OBJ_LINE 0x71777772 #define MAGIC_OBJ_POLYGON 0x71777774 #define MAGIC_OBJ_IMAGE 0x71777775 #define MAGIC_OBJ_TEXT 0x71777776 #define MAGIC_OBJ_SMART 0x71777777 #define MAGIC_OBJ_TEXTBLOCK 0x71777778 #define MAGIC_OBJ_TEXTGRID 0x7177777A #define MAGIC_SMART 0x72777770 #define MAGIC_OBJ_SHAPE 0x72777773 #define MAGIC_OBJ_CONTAINER 0x72777774 #define MAGIC_OBJ_CUSTOM 0x72777775 #define MAGIC_EVAS_GL 0x72777776 #define MAGIC_MAP 0x72777777 #ifdef MAGIC_DEBUG # define MAGIC_CHECK_FAILED(o, t, m) \ {evas_debug_error(); \ if (!o) evas_debug_input_null(); \ else if (((t *)o)->magic == 0) evas_debug_magic_null(); \ else evas_debug_magic_wrong((m), ((t *)o)->magic); \ } # define MAGIC_CHECK(o, t, m) \ {if ((!o) || (!(((t *)o)->magic == (m)))) { \ MAGIC_CHECK_FAILED(o, t, m) # define MAGIC_CHECK_END() }} #else # define MAGIC_CHECK_FAILED(o, t, m) # define MAGIC_CHECK(o, t, m) { if (!o) { # define MAGIC_CHECK_END() }} #endif #define NEW_RECT(_r, _x, _y, _w, _h) (_r) = eina_rectangle_new(_x, _y, _w, _h); #define MERR_NONE() _evas_alloc_error = EVAS_ALLOC_ERROR_NONE #define MERR_FATAL() _evas_alloc_error = EVAS_ALLOC_ERROR_FATAL #define MERR_BAD() _evas_alloc_error = EVAS_ALLOC_ERROR_RECOVERED #define EVAS_OBJECT_IMAGE_FREE_FILE_AND_KEY(o) \ if ((o)->cur.file) \ { \ eina_stringshare_del((o)->cur.file); \ if ((o)->prev.file == (o)->cur.file) \ (o)->prev.file = NULL; \ (o)->cur.file = NULL; \ } \ if ((o)->cur.key) \ { \ eina_stringshare_del((o)->cur.key); \ if ((o)->prev.key == (o)->cur.key) \ (o)->prev.key = NULL; \ (o)->cur.key = NULL; \ } \ if ((o)->prev.file) \ { \ eina_stringshare_del((o)->prev.file); \ (o)->prev.file = NULL; \ } \ if ((o)->prev.key) \ { \ eina_stringshare_del((o)->prev.key); \ (o)->prev.key = NULL; \ } struct _Evas_Coord_Touch_Point { Evas_Coord x, y; // point's x, y position int id; // id in order to distinguish each point Evas_Touch_Point_State state; }; struct _Evas_Key_Grab { char *keyname; Evas_Modifier_Mask modifiers; Evas_Modifier_Mask not_modifiers; Evas_Object *object; Eina_Bool exclusive : 1; Eina_Bool just_added : 1; Eina_Bool delete_me : 1; }; struct _Evas_Intercept_Func { struct { Evas_Object_Intercept_Show_Cb func; void *data; } show; struct { Evas_Object_Intercept_Hide_Cb func; void *data; } hide; struct { Evas_Object_Intercept_Move_Cb func; void *data; } move; struct { Evas_Object_Intercept_Resize_Cb func; void *data; } resize; struct { Evas_Object_Intercept_Raise_Cb func; void *data; } raise; struct { Evas_Object_Intercept_Lower_Cb func; void *data; } lower; struct { Evas_Object_Intercept_Stack_Above_Cb func; void *data; } stack_above; struct { Evas_Object_Intercept_Stack_Below_Cb func; void *data; } stack_below; struct { Evas_Object_Intercept_Layer_Set_Cb func; void *data; } layer_set; struct { Evas_Object_Intercept_Color_Set_Cb func; void *data; } color_set; struct { Evas_Object_Intercept_Clip_Set_Cb func; void *data; } clip_set; struct { Evas_Object_Intercept_Clip_Unset_Cb func; void *data; } clip_unset; }; struct _Evas_Smart_Cb_Description_Array { unsigned int size; const Evas_Smart_Cb_Description **array; }; struct _Evas_Smart_Interfaces_Array { unsigned int size; const Evas_Smart_Interface **array; }; struct _Evas_Smart { DATA32 magic; int usage; const Evas_Smart_Class *smart_class; Evas_Smart_Cb_Description_Array callbacks; Evas_Smart_Interfaces_Array interfaces; unsigned char delete_me : 1; unsigned char class_allocated : 1; }; struct _Evas_Modifier { struct { int count; char **list; } mod; Evas_Modifier_Mask mask; /* ok we have a max of 64 modifiers */ }; struct _Evas_Lock { struct { int count; char **list; } lock; Evas_Modifier_Mask mask; /* we have a max of 64 locks */ }; struct _Evas_Post_Callback { Evas_Object *obj; Evas_Object_Event_Post_Cb func; const void *data; unsigned char delete_me : 1; }; struct _Evas_Callbacks { Eina_Inlist *callbacks; int walking_list; unsigned char deletions_waiting : 1; }; struct _Evas { EINA_INLIST; DATA32 magic; struct { unsigned char inside : 1; int mouse_grabbed; int downs; DATA32 button; Evas_Coord x, y; int nogrep; struct { Eina_List *in; } object; } pointer; struct { Evas_Coord x, y, w, h; unsigned char changed : 1; } viewport; struct { int w, h; DATA32 render_method; unsigned char changed : 1; } output; struct { Evas_Coord x, y, w, h; Eina_Bool changed : 1; Evas_Object *clip; } framespace; Eina_List *damages; Eina_List *obscures; Evas_Layer *layers; Eina_Hash *name_hash; int output_validity; int walking_list; int events_frozen; Evas_Event_Flags default_event_flags; struct { Evas_Module *module; Evas_Func *func; struct { void *output; void *context; } data; void *info; int info_magic; } engine; Eina_Array delete_objects; Eina_Array active_objects; Eina_Array restack_objects; Eina_Array render_objects; Eina_Array pending_objects; Eina_Array obscuring_objects; Eina_Array temporary_objects; Eina_Array calculate_objects; Eina_Array clip_changes; Eina_Clist calc_list; Eina_Clist calc_done; Eina_List *video_objects; Eina_List *post_events; // free me on evas_free Evas_Callbacks *callbacks; int delete_grabs; int walking_grabs; Eina_List *grabs; Eina_List *font_path; int in_smart_calc; int smart_calc_count; Evas_Object *focused; void *attach_data; Evas_Modifier modifiers; Evas_Lock locks; unsigned int last_timestamp; int last_mouse_down_counter; int last_mouse_up_counter; int nochange; Evas_Font_Hinting_Flags hinting; unsigned char changed : 1; unsigned char delete_me : 1; unsigned char invalidate : 1; unsigned char cleanup : 1; unsigned char focus : 1; Eina_List *touch_points; }; struct _Evas_Layer { EINA_INLIST; short layer; Evas_Object *objects; Evas *evas; void *engine_data; int usage; unsigned char delete_me : 1; }; struct _Evas_Size { Evas_Coord w, h; }; struct _Evas_Aspect { Evas_Aspect_Control mode; Evas_Size size; }; struct _Evas_Border { Evas_Coord l, r, t, b; }; struct _Evas_Double_Pair { double x, y; }; struct _Evas_Size_Hints { Evas_Size min, max, request; Evas_Aspect aspect; Evas_Double_Pair align, weight; Evas_Border padding; }; struct _Evas_Map_Point { double x, y, z, px, py; double u, v; unsigned char r, g, b, a; }; struct _Evas_Map { DATA32 magic; int count; // num of points Evas_Coord_Rectangle normal_geometry; // bounding box of map geom actually // void *surface; // surface holding map if needed // int surface_w, surface_h; // current surface w & h alloc Evas_Coord mx, my; // mouse x, y after conversion to map space struct { Evas_Coord px, py, z0, foc; } persp; Eina_Bool alpha : 1; Eina_Bool smooth : 1; Evas_Map_Point points[]; // actual points }; #if 0 // filtering disabled /* nash: Split into two bits */ typedef struct Evas_Filter_Info { Evas_Filter filter; Evas_Filter_Mode mode; Eina_Bool dirty : 1; int datalen; void *data; void (*data_free)(void *); uint8_t *key; uint32_t len; Filtered_Image *cached; } Evas_Filter_Info; typedef Eina_Bool (*Evas_Software_Filter_Fn)(Evas_Filter_Info *, RGBA_Image *, RGBA_Image *); int evas_filter_get_size(Evas_Filter_Info *info, int inw, int inh, int *outw, int *outh, Eina_Bool inv); Eina_Bool evas_filter_always_alpha(Evas_Filter_Info *info); uint8_t *evas_filter_key_get(const Evas_Filter_Info *info, uint32_t *lenp); // expose for use in engines EAPI Evas_Software_Filter_Fn evas_filter_software_get(Evas_Filter_Info *info); void evas_filter_free(Evas_Object *o); #endif struct _Evas_Object { EINA_INLIST; DATA32 magic; const char *type; Evas_Layer *layer; struct { Evas_Map *map; Evas_Object *clipper; Evas_Object *mask; Evas_Object *map_parent; double scale; Evas_Coord_Rectangle geometry; Evas_Coord_Rectangle bounding_box; struct { struct { Evas_Coord x, y, w, h; unsigned char r, g, b, a; Eina_Bool visible : 1; Eina_Bool dirty : 1; } clip; } cache; short layer; struct { unsigned char r, g, b, a; } color; Eina_Bool usemap : 1; Eina_Bool valid_map : 1; Eina_Bool visible : 1; Eina_Bool have_clipees : 1; Eina_Bool anti_alias : 1; Evas_Render_Op render_op : 4; Eina_Bool valid_bounding_box : 1; Eina_Bool cached_surface : 1; Eina_Bool parent_cached_surface : 1; } cur, prev; struct { void *surface; // surface holding map if needed int surface_w, surface_h; // current surface w & h alloc } map; Evas_Map *cache_map; char *name; Evas_Intercept_Func *interceptors; struct { Eina_List *elements; } data; Eina_List *grabs; Evas_Callbacks *callbacks; struct { Eina_List *clipees; Eina_List *changes; } clip; const Evas_Object_Func *func; void *object_data; struct { Evas_Smart *smart; Evas_Object *parent; } smart; struct { Eina_List *proxies; void *surface; int w,h; Eina_Bool redraw; } proxy; #if 0 // filtering disabled Evas_Filter_Info *filter; #endif Evas_Size_Hints *size_hints; RGBA_Map *spans; int last_mouse_down_counter; int last_mouse_up_counter; int mouse_grabbed; int last_event; Evas_Callback_Type last_event_type; struct { int in_move, in_resize; } doing; /* ptr array + data blob holding all interfaces private data for * this object */ void **interface_privates; unsigned int ref; unsigned char delete_me; unsigned char recalculate_cycle; Eina_Clist calc_entry; Evas_Object_Pointer_Mode pointer_mode : 2; Eina_Bool store : 1; Eina_Bool pass_events : 1; Eina_Bool freeze_events : 1; Eina_Bool repeat_events : 1; struct { Eina_Bool pass_events : 1; Eina_Bool pass_events_valid : 1; Eina_Bool freeze_events : 1; Eina_Bool freeze_events_valid : 1; } parent_cache; Eina_Bool restack : 1; Eina_Bool is_active : 1; Eina_Bool precise_is_inside : 1; Eina_Bool is_static_clip : 1; Eina_Bool render_pre : 1; Eina_Bool rect_del : 1; Eina_Bool mouse_in : 1; Eina_Bool pre_render_done : 1; Eina_Bool intercepted : 1; Eina_Bool focused : 1; Eina_Bool in_layer : 1; Eina_Bool no_propagate : 1; Eina_Bool changed : 1; Eina_Bool changed_move : 1; Eina_Bool changed_color : 1; Eina_Bool changed_map : 1; Eina_Bool changed_pchange : 1; Eina_Bool del_ref : 1; Eina_Bool is_frame : 1; Eina_Bool child_has_map : 1; }; struct _Evas_Func_Node { EINA_INLIST; void (*func) (); void *data; Evas_Callback_Type type; Evas_Callback_Priority priority; unsigned char delete_me : 1; }; struct _Evas_Data_Node { char *key; void *data; }; struct _Evas_Font_Dir { Eina_Hash *lookup; Eina_List *fonts; Eina_List *aliases; DATA64 dir_mod_time; DATA64 fonts_dir_mod_time; DATA64 fonts_alias_mod_time; }; struct _Evas_Font { struct { const char *prop[14]; } x; struct { const char *name; } simple; const char *path; char type; }; struct _Evas_Font_Alias { const char *alias; Evas_Font *fn; }; struct _Evas_Font_Description { int ref; /* We assume everywhere this is stringshared */ const char *name; const char *fallbacks; const char *lang; Evas_Font_Slant slant; Evas_Font_Weight weight; Evas_Font_Width width; Eina_Bool is_new : 1; }; struct _Evas_Object_Func { void (*free) (Evas_Object *obj); void (*render) (Evas_Object *obj, void *output, void *context, void *surface, int x, int y); void (*render_pre) (Evas_Object *obj); void (*render_post) (Evas_Object *obj); unsigned int (*type_id_get) (Evas_Object *obj); unsigned int (*visual_id_get) (Evas_Object *obj); void *(*engine_data_get) (Evas_Object *obj); void (*store) (Evas_Object *obj); void (*unstore) (Evas_Object *obj); int (*is_visible) (Evas_Object *obj); int (*was_visible) (Evas_Object *obj); int (*is_opaque) (Evas_Object *obj); int (*was_opaque) (Evas_Object *obj); int (*is_inside) (Evas_Object *obj, Evas_Coord x, Evas_Coord y); int (*was_inside) (Evas_Object *obj, Evas_Coord x, Evas_Coord y); void (*coords_recalc) (Evas_Object *obj); void (*scale_update) (Evas_Object *obj); int (*has_opaque_rect) (Evas_Object *obj); int (*get_opaque_rect) (Evas_Object *obj, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h); int (*can_map) (Evas_Object *obj); }; struct _Evas_Func { void *(*info) (Evas *e); void (*info_free) (Evas *e, void *info); int (*setup) (Evas *e, void *info); void (*output_free) (void *data); void (*output_resize) (void *data, int w, int h); void (*output_tile_size_set) (void *data, int w, int h); void (*output_redraws_rect_add) (void *data, int x, int y, int w, int h); void (*output_redraws_rect_del) (void *data, int x, int y, int w, int h); void (*output_redraws_clear) (void *data); void *(*output_redraws_next_update_get) (void *data, int *x, int *y, int *w, int *h, int *cx, int *cy, int *cw, int *ch); void (*output_redraws_next_update_push) (void *data, void *surface, int x, int y, int w, int h); void (*output_flush) (void *data); void (*output_idle_flush) (void *data); void (*output_dump) (void *data); void *(*context_new) (void *data); Eina_Bool (*canvas_alpha_get) (void *data, void *context); void (*context_free) (void *data, void *context); void (*context_clip_set) (void *data, void *context, int x, int y, int w, int h); void (*context_clip_clip) (void *data, void *context, int x, int y, int w, int h); void (*context_clip_unset) (void *data, void *context); int (*context_clip_get) (void *data, void *context, int *x, int *y, int *w, int *h); void (*context_mask_set) (void *data, void *context, void *mask, int x, int y, int w, int h); void (*context_mask_unset) (void *data, void *context); void (*context_color_set) (void *data, void *context, int r, int g, int b, int a); int (*context_color_get) (void *data, void *context, int *r, int *g, int *b, int *a); void (*context_multiplier_set) (void *data, void *context, int r, int g, int b, int a); void (*context_multiplier_unset) (void *data, void *context); int (*context_multiplier_get) (void *data, void *context, int *r, int *g, int *b, int *a); void (*context_cutout_add) (void *data, void *context, int x, int y, int w, int h); void (*context_cutout_clear) (void *data, void *context); void (*context_anti_alias_set) (void *data, void *context, unsigned char aa); unsigned char (*context_anti_alias_get) (void *data, void *context); void (*context_color_interpolation_set) (void *data, void *context, int color_space); int (*context_color_interpolation_get) (void *data, void *context); void (*context_render_op_set) (void *data, void *context, int render_op); int (*context_render_op_get) (void *data, void *context); void (*rectangle_draw) (void *data, void *context, void *surface, int x, int y, int w, int h); void (*line_draw) (void *data, void *context, void *surface, int x1, int y1, int x2, int y2); void *(*polygon_point_add) (void *data, void *context, void *polygon, int x, int y); void *(*polygon_points_clear) (void *data, void *context, void *polygon); void (*polygon_draw) (void *data, void *context, void *surface, void *polygon, int x, int y); void *(*image_load) (void *data, const char *file, const char *key, int *error, Evas_Image_Load_Opts *lo); void *(*image_new_from_data) (void *data, int w, int h, DATA32 *image_data, int alpha, int cspace); void *(*image_new_from_copied_data) (void *data, int w, int h, DATA32 *image_data, int alpha, int cspace); void (*image_free) (void *data, void *image); void (*image_size_get) (void *data, void *image, int *w, int *h); void *(*image_size_set) (void *data, void *image, int w, int h); void (*image_stride_get) (void *data, void *image, int *stride); void *(*image_dirty_region) (void *data, void *image, int x, int y, int w, int h); void *(*image_data_get) (void *data, void *image, int to_write, DATA32 **image_data, int *err); void *(*image_data_put) (void *data, void *image, DATA32 *image_data); void (*image_data_preload_request) (void *data, void *image, const void *target); void (*image_data_preload_cancel) (void *data, void *image, const void *target); void *(*image_alpha_set) (void *data, void *image, int has_alpha); int (*image_alpha_get) (void *data, void *image); void *(*image_border_set) (void *data, void *image, int l, int r, int t, int b); void (*image_border_get) (void *data, void *image, int *l, int *r, int *t, int *b); 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); char *(*image_comment_get) (void *data, void *image, char *key); char *(*image_format_get) (void *data, void *image); void (*image_colorspace_set) (void *data, void *image, int cspace); int (*image_colorspace_get) (void *data, void *image); Eina_Bool (*image_can_region_get) (void *data, void *image); void (*image_mask_create) (void *data, void *image); void *(*image_native_set) (void *data, void *image, void *native); void *(*image_native_get) (void *data, void *image); void (*image_cache_flush) (void *data); void (*image_cache_set) (void *data, int bytes); int (*image_cache_get) (void *data); Evas_Font_Set *(*font_load) (void *data, const char *name, int size, Font_Rend_Flags wanted_rend); Evas_Font_Set *(*font_memory_load) (void *data, const char *source, const char *name, int size, const void *fdata, int fdata_size, Font_Rend_Flags wanted_rend); Evas_Font_Set *(*font_add) (void *data, Evas_Font_Set *font, const char *name, int size, Font_Rend_Flags wanted_rend); Evas_Font_Set *(*font_memory_add) (void *data, Evas_Font_Set *font, const char *source, const char *name, int size, const void *fdata, int fdata_size, Font_Rend_Flags wanted_rend); void (*font_free) (void *data, Evas_Font_Set *font); int (*font_ascent_get) (void *data, Evas_Font_Set *font); int (*font_descent_get) (void *data, Evas_Font_Set *font); int (*font_max_ascent_get) (void *data, Evas_Font_Set *font); int (*font_max_descent_get) (void *data, Evas_Font_Set *font); void (*font_string_size_get) (void *data, Evas_Font_Set *font, const Evas_Text_Props *intl_props, int *w, int *h); int (*font_inset_get) (void *data, Evas_Font_Set *font, const Evas_Text_Props *text_props); int (*font_h_advance_get) (void *data, Evas_Font_Set *font, const Evas_Text_Props *intl_props); int (*font_v_advance_get) (void *data, Evas_Font_Set *font, const Evas_Text_Props *intl_props); 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); 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); 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, Evas_Text_Props *intl_props); void (*font_cache_flush) (void *data); void (*font_cache_set) (void *data, int bytes); int (*font_cache_get) (void *data); /* Engine functions will over time expand from here */ void (*font_hinting_set) (void *data, Evas_Font_Set *font, int hinting); int (*font_hinting_can_hint) (void *data, int hinting); /* void (*image_rotation_set) (void *data, void *image); */ void (*image_scale_hint_set) (void *data, void *image, int hint); int (*image_scale_hint_get) (void *data, void *image); int (*font_last_up_to_pos) (void *data, Evas_Font_Set *font, const Evas_Text_Props *intl_props, int x, int y); void (*image_map_draw) (void *data, void *context, void *surface, void *image, RGBA_Map *m, int smooth, int level); void *(*image_map_surface_new) (void *data, int w, int h, int alpha); void (*image_map_surface_free) (void *data, void *surface); void (*image_map_clean) (void *data, RGBA_Map *m); void (*image_content_hint_set) (void *data, void *surface, int hint); int (*image_content_hint_get) (void *data, void *surface); 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); 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, Evas_Text_Props_Mode mode); int (*font_right_inset_get) (void *data, Evas_Font_Set *font, const Evas_Text_Props *text_props); #if 0 // filtering disabled void (*image_draw_filtered) (void *data, void *context, void *surface, void *image, Evas_Filter_Info *filter); Filtered_Image *(*image_filtered_get) (void *image, uint8_t *key, size_t len); Filtered_Image *(*image_filtered_save) (void *image, void *filtered, uint8_t *key, size_t len); void (*image_filtered_free) (void *image, Filtered_Image *); #endif /* EFL-GL Glue Layer */ void *(*gl_surface_create) (void *data, void *config, int w, int h); int (*gl_surface_destroy) (void *data, void *surface); void *(*gl_context_create) (void *data, void *share_context); int (*gl_context_destroy) (void *data, void *context); int (*gl_make_current) (void *data, void *surface, void *context); void *(*gl_string_query) (void *data, int name); void *(*gl_proc_address_get) (void *data, const char *name); int (*gl_native_surface_get) (void *data, void *surface, void *native_surface); void *(*gl_api_get) (void *data); void (*gl_img_obj_set) (void *data, void *image, int has_alpha); int (*image_load_error_get) (void *data, void *image); 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); /* animated feature */ Eina_Bool (*image_animated_get) (void *data, void *image); int (*image_animated_frame_count_get) (void *data, void *image); Evas_Image_Animated_Loop_Hint (*image_animated_loop_type_get) (void *data, void *image); int (*image_animated_loop_count_get) (void *data, void *image); double (*image_animated_frame_duration_get) (void *data, void *image, int start_frame, int frame_num); Eina_Bool (*image_animated_frame_set) (void *data, void *image, int frame_index); /* max size query */ void (*image_max_size_get) (void *data, int *maxw, int *maxh); Eina_Bool (*pixel_alpha_get) (void *image, int x, int y, DATA8 *alpha, 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); }; struct _Evas_Image_Load_Func { Eina_Bool threadable; Eina_Bool (*file_head) (Image_Entry *ie, const char *file, const char *key, int *error); Eina_Bool (*file_data) (Image_Entry *ie, const char *file, const char *key, int *error); double (*frame_duration) (Image_Entry *ie, const char *file, const int start, const int frame_num); Eina_Bool do_region; }; struct _Evas_Image_Save_Func { int (*image_save) (RGBA_Image *im, const char *file, const char *key, int quality, int compress); }; #ifdef __cplusplus extern "C" { #endif Evas_Object *evas_object_new(Evas *e); void evas_object_change_reset(Evas_Object *obj); void evas_object_cur_prev(Evas_Object *obj); void evas_object_free(Evas_Object *obj, int clean_layer); void evas_object_update_bounding_box(Evas_Object *obj); void evas_object_inject(Evas_Object *obj, Evas *e); void evas_object_release(Evas_Object *obj, int clean_layer); void evas_object_change(Evas_Object *obj); void evas_object_clip_changes_clean(Evas_Object *obj); void evas_object_render_pre_visible_change(Eina_Array *rects, Evas_Object *obj, int is_v, int was_v); void evas_object_render_pre_clipper_change(Eina_Array *rects, Evas_Object *obj); void evas_object_render_pre_prev_cur_add(Eina_Array *rects, Evas_Object *obj); void evas_object_render_pre_effect_updates(Eina_Array *rects, Evas_Object *obj, int is_v, int was_v); void evas_rects_return_difference_rects(Eina_Array *rects, int x, int y, int w, int h, int xx, int yy, int ww, int hh); void evas_object_clip_dirty(Evas_Object *obj); void evas_object_recalc_clippees(Evas_Object *obj); Evas_Layer *evas_layer_new(Evas *e); void evas_layer_pre_free(Evas_Layer *lay); void evas_layer_free_objects(Evas_Layer *lay); void evas_layer_clean(Evas *e); Evas_Layer *evas_layer_find(Evas *e, short layer_num); void evas_layer_add(Evas_Layer *lay); void evas_layer_del(Evas_Layer *lay); int evas_object_was_in_output_rect(Evas_Object *obj, int x, int y, int w, int h); int evas_object_was_opaque(Evas_Object *obj); int evas_object_is_inside(Evas_Object *obj, Evas_Coord x, Evas_Coord y); int evas_object_was_inside(Evas_Object *obj, Evas_Coord x, Evas_Coord y); int evas_object_clippers_was_visible(Evas_Object *obj); void evas_object_clip_across_check(Evas_Object *obj); void evas_object_clip_across_clippees_check(Evas_Object *obj); void evas_object_mapped_clip_across_mark(Evas_Object *obj); void evas_event_callback_call(Evas *e, Evas_Callback_Type type, void *event_info); void evas_object_event_callback_call(Evas_Object *obj, Evas_Callback_Type type, void *event_info, int event_id); Eina_List *evas_event_objects_event_list(Evas *e, Evas_Object *stop, int x, int y); int evas_mem_free(int mem_required); int evas_mem_degrade(int mem_required); void evas_debug_error(void); void evas_debug_input_null(void); void evas_debug_magic_null(void); void evas_debug_magic_wrong(DATA32 expected, DATA32 supplied); void evas_debug_generic(const char *str); const char *evas_debug_magic_string_get(DATA32 magic); void evas_object_smart_use(Evas_Smart *s); void evas_object_smart_unuse(Evas_Smart *s); void evas_smart_cb_descriptions_fix(Evas_Smart_Cb_Description_Array *a) EINA_ARG_NONNULL(1); Eina_Bool evas_smart_cb_descriptions_resize(Evas_Smart_Cb_Description_Array *a, unsigned int size) EINA_ARG_NONNULL(1); const 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; Eina_Bool _evas_object_image_preloading_get(const Evas_Object *obj); void _evas_object_image_preloading_set(Evas_Object *obj, Eina_Bool preloading); void _evas_object_image_preloading_check(Evas_Object *obj); Evas_Object *_evas_object_image_video_parent_get(Evas_Object *obj); void _evas_object_image_video_overlay_show(Evas_Object *obj); void _evas_object_image_video_overlay_hide(Evas_Object *obj); void evas_object_smart_del(Evas_Object *obj); void evas_object_smart_cleanup(Evas_Object *obj); void evas_object_smart_member_raise(Evas_Object *member); void evas_object_smart_member_lower(Evas_Object *member); void evas_object_smart_member_stack_above(Evas_Object *member, Evas_Object *other); void evas_object_smart_member_stack_below(Evas_Object *member, Evas_Object *other); const Eina_Inlist *evas_object_smart_members_get_direct(const Evas_Object *obj); void _evas_object_smart_members_all_del(Evas_Object *obj); void evas_call_smarts_calculate(Evas *e); void evas_object_smart_bouding_box_update(Evas_Object *obj); void evas_object_smart_need_bounding_box_update(Evas_Object *obj); void *evas_mem_calloc(int size); void _evas_post_event_callback_call(Evas *e); void _evas_post_event_callback_free(Evas *e); void evas_event_callback_list_post_free(Eina_Inlist **list); void evas_object_event_callback_all_del(Evas_Object *obj); void evas_object_event_callback_cleanup(Evas_Object *obj); void evas_event_callback_all_del(Evas *e); void evas_event_callback_cleanup(Evas *e); void evas_object_inform_call_show(Evas_Object *obj); void evas_object_inform_call_hide(Evas_Object *obj); void evas_object_inform_call_move(Evas_Object *obj); void evas_object_inform_call_resize(Evas_Object *obj); void evas_object_inform_call_restack(Evas_Object *obj); void evas_object_inform_call_changed_size_hints(Evas_Object *obj); void evas_object_inform_call_image_preloaded(Evas_Object *obj); void evas_object_inform_call_image_unloaded(Evas_Object *obj); void evas_object_intercept_cleanup(Evas_Object *obj); int evas_object_intercept_call_show(Evas_Object *obj); int evas_object_intercept_call_hide(Evas_Object *obj); int evas_object_intercept_call_move(Evas_Object *obj, Evas_Coord x, Evas_Coord y); int evas_object_intercept_call_resize(Evas_Object *obj, Evas_Coord w, Evas_Coord h); int evas_object_intercept_call_raise(Evas_Object *obj); int evas_object_intercept_call_lower(Evas_Object *obj); int evas_object_intercept_call_stack_above(Evas_Object *obj, Evas_Object *above); int evas_object_intercept_call_stack_below(Evas_Object *obj, Evas_Object *below); int evas_object_intercept_call_layer_set(Evas_Object *obj, int l); int evas_object_intercept_call_color_set(Evas_Object *obj, int r, int g, int b, int a); int evas_object_intercept_call_clip_set(Evas_Object *obj, Evas_Object *clip); int evas_object_intercept_call_clip_unset(Evas_Object *obj); void evas_object_grabs_cleanup(Evas_Object *obj); void evas_key_grab_free(Evas_Object *obj, const char *keyname, Evas_Modifier_Mask modifiers, Evas_Modifier_Mask not_modifiers); void evas_font_dir_cache_free(void); const char *evas_font_dir_cache_find(char *dir, char *font); Eina_List *evas_font_dir_available_list(const Evas* evas); void evas_font_dir_available_list_free(Eina_List *available); void evas_font_free(Evas *evas, void *font); void evas_fonts_zero_free(Evas *evas); void evas_fonts_zero_presure(Evas *evas); void evas_font_name_parse(Evas_Font_Description *fdesc, const char *name); int evas_font_style_find(const char *start, const char *end, Evas_Font_Style style); Evas_Font_Description *evas_font_desc_new(void); Evas_Font_Description *evas_font_desc_dup(const Evas_Font_Description *fdesc); void evas_font_desc_unref(Evas_Font_Description *fdesc); int evas_font_desc_cmp(const Evas_Font_Description *a, const Evas_Font_Description *b); Evas_Font_Description *evas_font_desc_ref(Evas_Font_Description *fdesc); void * evas_font_load(Evas *evas, Evas_Font_Description *fdesc, const char *source, Evas_Font_Size size); void evas_font_load_hinting_set(Evas *evas, void *font, int hinting); void evas_object_smart_member_cache_invalidate(Evas_Object *obj, Eina_Bool pass_events, Eina_Bool freeze_events); void evas_text_style_pad_get(Evas_Text_Style_Type style, int *l, int *r, int *t, int *b); void _evas_object_text_rehint(Evas_Object *obj); void _evas_object_textblock_rehint(Evas_Object *obj); extern int _evas_alloc_error; extern int _evas_event_counter; struct _Evas_Imaging_Image { RGBA_Image *image; }; struct _Evas_Imaging_Font { RGBA_Font *font; }; int evas_async_events_init(void); int evas_async_events_shutdown(void); int evas_async_target_del(const void *target); void _evas_preload_thread_init(void); void _evas_preload_thread_shutdown(void); Evas_Preload_Pthread *evas_preload_thread_run(void (*func_heavy)(void *data), void (*func_end)(void *data), void (*func_cancel)(void *data), const void *data); Eina_Bool evas_preload_thread_cancel(Evas_Preload_Pthread *thread); void _evas_walk(Evas *e); void _evas_unwalk(Evas *e); // expose for use in engines EAPI int _evas_module_engine_inherit(Evas_Func *funcs, char *name); EAPI const char *_evas_module_libdir_get(void); Eina_Bool evas_render_mapped(Evas *e, Evas_Object *obj, void *context, void *surface, int off_x, int off_y, int mapped, int ecx, int ecy, int ecw, int ech); void evas_render_invalidate(Evas *e); void evas_render_object_recalc(Evas_Object *obj); Eina_Bool evas_map_inside_get(const Evas_Map *m, Evas_Coord x, Evas_Coord y); Eina_Bool evas_map_coords_get(const Evas_Map *m, Evas_Coord x, Evas_Coord y, Evas_Coord *mx, Evas_Coord *my, int grab); void evas_object_map_update(Evas_Object *obj, int x, int y, int imagew, int imageh, int uvw, int uvh); Eina_List *evas_module_engine_list(void); /* for updating touch point list */ void _evas_touch_point_append(Evas *e, int id, Evas_Coord x, Evas_Coord y); void _evas_touch_point_update(Evas *e, int id, Evas_Coord x, Evas_Coord y, Evas_Touch_Point_State state); void _evas_touch_point_remove(Evas *e, int id); /****************************************************************************/ /*****************************************/ /********************/ #define MPOOL 1 #ifdef MPOOL typedef struct _Evas_Mempool Evas_Mempool; struct _Evas_Mempool { int count; int num_allocs; int num_frees; Eina_Mempool *mp; }; # define EVAS_MEMPOOL(x) \ static Evas_Mempool x = {0, 0, 0, NULL} # define EVAS_MEMPOOL_INIT(x, nam, siz, cnt, ret) \ do { \ if (!x.mp) { \ x.mp = eina_mempool_add("chained_mempool", nam, NULL, sizeof(siz), cnt); \ if (!x.mp) { \ return ret; \ } \ } \ } while (0) # define EVAS_MEMPOOL_ALLOC(x, siz) \ eina_mempool_malloc(x.mp, sizeof(siz)) # define EVAS_MEMPOOL_PREP(x, p, siz) \ do { \ x.count++; \ x.num_allocs++; \ memset(p, 0, sizeof(siz)); \ } while (0) # define EVAS_MEMPOOL_FREE(x, p) \ do { \ eina_mempool_free(x.mp, p); \ x.count--; \ x.num_frees++; \ if (x.count <= 0) { \ eina_mempool_del(x.mp); \ x.mp = NULL; \ x.count = 0; \ } \ } while (0) #else # define EVAS_MEMPOOL(x) # define EVAS_MEMPOOL_INIT(x, nam, siz, cnt, ret) # define EVAS_MEMPOOL_PREP(x, p, siz) # define EVAS_MEMPOOL_ALLOC(x, siz) \ calloc(1, sizeof(siz)) # define EVAS_MEMPOOL_FREE(x, p) \ free(p) #endif /********************/ /*****************************************/ /****************************************************************************/ #define EVAS_API_OVERRIDE(func, api, prefix) \ (api)->func = prefix##func #define EVAS_API_RESET(func, api) \ (api)->func = NULL #include "evas_inline.x" #ifdef __cplusplus } #endif #endif evas-1.7.9/src/lib/include/evas_common_soft8.h0000664000175000017500000001244012175475547016215 00000000000000#ifndef EVAS_COMMON_SOFT8_H #define EVAS_COMMON_SOFT8_H #include "evas_common.h" #include "evas_private.h" #ifdef __cplusplus extern "C" { #endif #define GRY_8_BLEND(a, b, alpha) \ ((b) + (a) - ((((b) * ((alpha) + 1)) >> 8) & 0xff)) #define GRY_8_BLEND_UNMUL(a, b, alpha) \ ((b) + ((((a) - (b)) * ((alpha) + 1)) >> 8)) #if 0 #define GRY_8_FROM_COMPONENTS(r, g, b) \ (((307 * (r)) + \ (604 * (g)) + \ (113 * (b))) >> 10) #define GRY_8_FROM_RGB(rgb) \ GRY_8_FROM_COMPONENTS(R_VAL(rgb), G_VAL(rgb), B_VAL(rgb)) #endif //Y = R * 0.2126 + G * 0.7152 + B * 0.0722 #define GRY_8_FROM_COMPONENTS(r, g, b) \ (((218 * (r)) + \ (732 * (g)) + \ (74 * (b))) >> 10) #define GRY_8_FROM_RGB(rgb) \ GRY_8_FROM_COMPONENTS(R_VAL(rgb), G_VAL(rgb), B_VAL(rgb)) #define UNROLL2(op...) op op #define UNROLL4(op...) UNROLL2(op) UNROLL2(op) #define UNROLL8(op...) UNROLL4(op) UNROLL4(op) #define UNROLL16(op...) UNROLL8(op) UNROLL8(op) #if defined(__ARM_ARCH_3M__) # define __ARM_ARCH__ 40 #endif #if defined(__ARM_ARCH_4__) # define __ARM_ARCH__ 40 #endif #if defined(__ARM_ARCH_4T__) # define __ARM_ARCH__ 41 #endif #if defined(__ARM_ARCH_5__) # define __ARM_ARCH__ 50 #endif #if defined(__ARM_ARCH_5T__) # define __ARM_ARCH__ 51 #endif #if defined(__ARM_ARCH_5E__) # define __ARM_ARCH__ 52 #endif #if defined(__ARM_ARCH_5TE__) # define __ARM_ARCH__ 53 #endif #if defined(__ARM_ARCH_5TEJ__) # define __ARM_ARCH__ 54 #endif #if defined(__ARM_ARCH_6__) # define __ARM_ARCH__ 60 #endif #if defined(__ARM_ARCH_6J__) # define __ARM_ARCH__ 61 #endif #if defined(__ARM_ARCH_6K__) # define __ARM_ARCH__ 62 #endif #if defined(__ARM_ARCH_6Z__) # define __ARM_ARCH__ 63 #endif #if defined(__ARM_ARCH_6ZK__) # define __ARM_ARCH__ 64 #endif #if defined(__ARM_ARCH_6T2__) # define __ARM_ARCH__ 65 #endif #if defined(__ARM_ARCH_7__) # define __ARM_ARCH__ 70 #endif #if defined(__ARM_ARCH_7A__) # define __ARM_ARCH__ 71 #endif #if defined(__ARM_ARCH_7R__) # define __ARM_ARCH__ 72 #endif #if defined(__ARM_ARCH_7M__) # define __ARM_ARCH__ 73 #endif #if defined(__ARM_ARCH__) && (__ARM_ARCH__ >= 52) /* tested on ARMv6 (arm1136j-s), Nokia N800 CPU */ #define pld(addr, off) \ __asm__("pld [%[address], %[offset]]":: \ [address] "r" (addr), [offset] "i" (off)) #else #define pld(addr, off) #endif /* __ARMEL__ */ static inline unsigned int _calc_stride(unsigned int w) { unsigned int pad = w % 4; if (!pad) return w; else return w + 4 - pad; } #define IMG_BYTE_SIZE(stride, height, has_alpha) \ ((stride) * (height) * (!(has_alpha) ? 1 : 2)) typedef struct _Soft8_Image Soft8_Image; struct _Soft8_Image { Image_Entry cache_entry; RGBA_Image *source; int stride; // pixel stride DATA8 *pixels; // 8bpp pixels gry8 DATA8 *alpha; // 8bit alpha mask - optional. points into pixels void *extended_info; struct { /* unsigned char have_alpha : 1; // 1 if we have halpha */ unsigned char free_pixels : 1; // 1 if pixels should be freed unsigned char free_alpha : 1; // 1 if alpha mask should be freed } flags; }; /** * Image (evas_soft8_main.c) */ EAPI void evas_common_soft8_image_init(void); EAPI void evas_common_soft8_image_shutdown(void); EAPI Evas_Cache_Image *evas_common_soft8_image_cache_get(void); EAPI 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); EAPI Soft8_Image *evas_common_soft8_image_alpha_set(Soft8_Image *im, int have_alpha); void 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); void 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); /* convert/dither functions */ void evas_common_soft8_image_convert_from_rgb(Soft8_Image *im, const DATA32 *src); void evas_common_soft8_image_convert_from_rgba(Soft8_Image *im, const DATA32 *src); /** * Rectangle (evas_soft8_rectangle.c) */ EAPI void evas_common_soft8_rectangle_draw(Soft8_Image *dst, RGBA_Draw_Context *dc, int x, int y, int w, int h); /** * Polygon (evas_soft8_polygon.c) */ EAPI void evas_common_soft8_polygon_draw(Soft8_Image *dst, RGBA_Draw_Context *dc, RGBA_Polygon_Point *points, int x, int y); /** * Line (evas_soft8_line.c) */ EAPI void evas_common_soft8_line_draw(Soft8_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, int x1, int y1); /** * Font (evas_soft8_font.c) */ EAPI void *evas_common_soft8_font_glyph_new(void *data, RGBA_Font_Glyph *fg); EAPI void evas_common_soft8_font_glyph_free(void *ext_dat); EAPI void evas_common_soft8_font_glyph_draw(void *data, void *dest, void *context, RGBA_Font_Glyph *fg, int x, int y); #ifdef __cplusplus } #endif #endif evas-1.7.9/src/lib/include/evas_mmx.h0000664000175000017500000006055512175475547014415 00000000000000/* mmx.h MultiMedia eXtensions GCC interface library for IA32. To use this library, simply include this header file and compile with GCC. You MUST have inlining enabled in order for mmx_ok() to work; this can be done by simply using -O on the GCC command line. Compiling with -DMMX_TRACE will cause detailed trace output to be sent to stderr for each mmx operation. This adds lots of code, and obviously slows execution to a crawl, but can be very useful for debugging. THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR ANY PARTICULAR PURPOSE. 1997-98 by H. Dietz and R. Fisher History: 97-98* R.Fisher Early versions 980501 R.Fisher Original Release 980611* H.Dietz Rewrite, correctly implementing inlines, and R.Fisher including direct register accesses. 980616 R.Fisher Release of 980611 as 980616. 980714 R.Fisher Minor corrections to Makefile, etc. 980715 R.Fisher mmx_ok() now prevents optimizer from using clobbered values. mmx_ok() now checks if cpuid instruction is available before trying to use it. 980726* R.Fisher mm_support() searches for AMD 3DNow, Cyrix Extended MMX, and standard MMX. It returns a value which is positive if any of these are supported, and can be masked with constants to see which. mmx_ok() is now a call to this 980726* R.Fisher Added i2r support for shift functions 980919 R.Fisher Fixed AMD extended feature recognition bug. 980921 R.Fisher Added definition/check for _MMX_H. Added "float s[2]" to mmx_t for use with 3DNow and EMMX. So same mmx_t can be used. 981013 R.Fisher Fixed cpuid function 1 bug (looked at wrong reg) Fixed psllq_i2r error in mmxtest.c * Unreleased (internal or interim) versions Notes: It appears that the latest gas has the pand problem fixed, therefore I'll undefine BROKEN_PAND by default. String compares may be quicker than the multiple test/jumps in vendor test sequence in mmx_ok(), but I'm not concerned with that right now. Acknowledgments: Jussi Laako for pointing out the errors ultimately found to be connected to the failure to notify the optimizer of clobbered values. Roger Hardiman for reminding us that CPUID isn't everywhere, and that someone may actually try to use this on a machine without CPUID. Also for suggesting code for checking this. Robert Dale for pointing out the AMD recognition bug. Jimmy Mayfield and Carl Witty for pointing out the Intel recognition bug. Carl Witty for pointing out the psllq_i2r test bug. */ #ifndef _MMX_H #define _MMX_H /* Warning: at this writing, the version of GAS packaged with most Linux distributions does not handle the parallel AND operation mnemonic correctly. If the symbol BROKEN_PAND is defined, a slower alternative coding will be used. If execution of mmxtest results in an illegal instruction fault, define this symbol. */ #undef BROKEN_PAND /* The type of an value that fits in an MMX register (note that long long constant values MUST be suffixed by LL and unsigned long long values by ULL, lest they be truncated by the compiler) */ typedef union { long long q; /* Quadword (64-bit) value */ unsigned long long uq; /* Unsigned Quadword */ int d[2]; /* 2 Doubleword (32-bit) values */ unsigned int ud[2]; /* 2 Unsigned Doubleword */ short w[4]; /* 4 Word (16-bit) values */ unsigned short uw[4]; /* 4 Unsigned Word */ char b[8]; /* 8 Byte (8-bit) values */ unsigned char ub[8]; /* 8 Unsigned Byte */ float s[2]; /* Single-precision (32-bit) value */ } __attribute__ ((aligned (8))) mmx_t; /* Helper functions for the instruction macros that follow... (note that memory-to-register, m2r, instructions are nearly as efficient as register-to-register, r2r, instructions; however, memory-to-memory instructions are really simulated as a convenience, and are only 1/3 as efficient) */ /* These macros are a lot simpler without the tracing... */ #define mmx_i2r(op, imm, reg) \ __asm__ __volatile__ (#op " $" #imm ", %%" #reg \ : /* nothing */ \ : /* nothing */); #define mmx_m2r(op, mem, reg) \ __asm__ __volatile__ (#op " %0, %%" #reg \ : /* nothing */ \ : "m" (mem)) #define mmx_r2m(op, reg, mem) \ __asm__ __volatile__ (#op " %%" #reg ", %0" \ : "=m" (mem) \ : /* nothing */ ) #define mmx_a2r(op, mem, reg) \ __asm__ __volatile__ (#op " %0, %%" #reg \ : /* nothing */ \ : "m" (mem)) #define mmx_r2a(op, reg, mem) \ __asm__ __volatile__ (#op " %%" #reg ", %0" \ : "=m" (mem) \ : /* nothing */ ) #define mmx_r2r(op, regs, regd) \ __asm__ __volatile__ (#op " %" #regs ", %" #regd) #define mmx_m2m(op, mems, memd) \ __asm__ __volatile__ ("movq %0, %%mm0\n\t" \ #op " %1, %%mm0\n\t" \ "movq %%mm0, %0" \ : "=X" (memd) \ : "X" (mems)) /* 1x64 MOVE Quadword (this is both a load and a store... in fact, it is the only way to store) */ #define movq_m2r(var, reg) mmx_m2r(movq, var, reg) #define movq_r2m(reg, var) mmx_r2m(movq, reg, var) #define movq_r2r(regs, regd) mmx_r2r(movq, regs, regd) #define movq(vars, vard) \ __asm__ __volatile__ ("movq %1, %%mm0\n\t" \ "movq %%mm0, %0" \ : "=X" (vard) \ : "X" (vars)) #define movntq_r2m(reg, var) mmx_r2m(movntq, reg, var) /* 1x32 MOVE Doubleword (like movq, this is both load and store... but is most useful for moving things between mmx registers and ordinary registers) */ #define movd_m2r(var, reg) mmx_a2r(movd, var, reg) #define movd_r2m(reg, var) mmx_r2a(movd, reg, var) #define movd_r2r(regs, regd) mmx_r2r(movd, regs, regd) #define movd(vars, vard) \ __asm__ __volatile__ ("movd %1, %%mm0\n\t" \ "movd %%mm0, %0" \ : "=X" (vard) \ : "X" (vars)) /* 2x32, 4x16, and 8x8 Parallel ADDs */ #define paddd_m2r(var, reg) mmx_m2r(paddd, var, reg) #define paddd_r2r(regs, regd) mmx_r2r(paddd, regs, regd) #define paddd(vars, vard) mmx_m2m(paddd, vars, vard) #define paddw_m2r(var, reg) mmx_m2r(paddw, var, reg) #define paddw_r2r(regs, regd) mmx_r2r(paddw, regs, regd) #define paddw(vars, vard) mmx_m2m(paddw, vars, vard) #define paddb_m2r(var, reg) mmx_m2r(paddb, var, reg) #define paddb_r2r(regs, regd) mmx_r2r(paddb, regs, regd) #define paddb(vars, vard) mmx_m2m(paddb, vars, vard) /* 4x16 and 8x8 Parallel ADDs using Saturation arithmetic */ #define paddsw_m2r(var, reg) mmx_m2r(paddsw, var, reg) #define paddsw_r2r(regs, regd) mmx_r2r(paddsw, regs, regd) #define paddsw(vars, vard) mmx_m2m(paddsw, vars, vard) #define paddsb_m2r(var, reg) mmx_m2r(paddsb, var, reg) #define paddsb_r2r(regs, regd) mmx_r2r(paddsb, regs, regd) #define paddsb(vars, vard) mmx_m2m(paddsb, vars, vard) /* 4x16 and 8x8 Parallel ADDs using Unsigned Saturation arithmetic */ #define paddusw_m2r(var, reg) mmx_m2r(paddusw, var, reg) #define paddusw_r2r(regs, regd) mmx_r2r(paddusw, regs, regd) #define paddusw(vars, vard) mmx_m2m(paddusw, vars, vard) #define paddusb_m2r(var, reg) mmx_m2r(paddusb, var, reg) #define paddusb_r2r(regs, regd) mmx_r2r(paddusb, regs, regd) #define paddusb(vars, vard) mmx_m2m(paddusb, vars, vard) /* 2x32, 4x16, and 8x8 Parallel SUBs */ #define psubd_m2r(var, reg) mmx_m2r(psubd, var, reg) #define psubd_r2r(regs, regd) mmx_r2r(psubd, regs, regd) #define psubd(vars, vard) mmx_m2m(psubd, vars, vard) #define psubw_m2r(var, reg) mmx_m2r(psubw, var, reg) #define psubw_r2r(regs, regd) mmx_r2r(psubw, regs, regd) #define psubw(vars, vard) mmx_m2m(psubw, vars, vard) #define psubb_m2r(var, reg) mmx_m2r(psubb, var, reg) #define psubb_r2r(regs, regd) mmx_r2r(psubb, regs, regd) #define psubb(vars, vard) mmx_m2m(psubb, vars, vard) /* 4x16 and 8x8 Parallel SUBs using Saturation arithmetic */ #define psubsw_m2r(var, reg) mmx_m2r(psubsw, var, reg) #define psubsw_r2r(regs, regd) mmx_r2r(psubsw, regs, regd) #define psubsw(vars, vard) mmx_m2m(psubsw, vars, vard) #define psubsb_m2r(var, reg) mmx_m2r(psubsb, var, reg) #define psubsb_r2r(regs, regd) mmx_r2r(psubsb, regs, regd) #define psubsb(vars, vard) mmx_m2m(psubsb, vars, vard) /* 4x16 and 8x8 Parallel SUBs using Unsigned Saturation arithmetic */ #define psubusw_m2r(var, reg) mmx_m2r(psubusw, var, reg) #define psubusw_r2r(regs, regd) mmx_r2r(psubusw, regs, regd) #define psubusw(vars, vard) mmx_m2m(psubusw, vars, vard) #define psubusb_m2r(var, reg) mmx_m2r(psubusb, var, reg) #define psubusb_r2r(regs, regd) mmx_r2r(psubusb, regs, regd) #define psubusb(vars, vard) mmx_m2m(psubusb, vars, vard) /* 4x16 Parallel MULs giving Low 4x16 portions of results */ #define pmullw_m2r(var, reg) mmx_m2r(pmullw, var, reg) #define pmullw_r2r(regs, regd) mmx_r2r(pmullw, regs, regd) #define pmullw(vars, vard) mmx_m2m(pmullw, vars, vard) /* 4x16 Parallel MULs giving High 4x16 portions of results */ #define pmulhw_m2r(var, reg) mmx_m2r(pmulhw, var, reg) #define pmulhw_r2r(regs, regd) mmx_r2r(pmulhw, regs, regd) #define pmulhw(vars, vard) mmx_m2m(pmulhw, vars, vard) /* 4x16->2x32 Parallel Mul-ADD (muls like pmullw, then adds adjacent 16-bit fields in the multiply result to make the final 2x32 result) */ #define pmaddwd_m2r(var, reg) mmx_m2r(pmaddwd, var, reg) #define pmaddwd_r2r(regs, regd) mmx_r2r(pmaddwd, regs, regd) #define pmaddwd(vars, vard) mmx_m2m(pmaddwd, vars, vard) /* 1x64 bitwise AND */ #ifdef BROKEN_PAND #define pand_m2r(var, reg) \ { \ mmx_m2r(pandn, (mmx_t) -1LL, reg); \ mmx_m2r(pandn, var, reg); \ } #define pand_r2r(regs, regd) \ { \ mmx_m2r(pandn, (mmx_t) -1LL, regd); \ mmx_r2r(pandn, regs, regd) \ } #define pand(vars, vard) \ { \ movq_m2r(vard, mm0); \ mmx_m2r(pandn, (mmx_t) -1LL, mm0); \ mmx_m2r(pandn, vars, mm0); \ movq_r2m(mm0, vard); \ } #else #define pand_m2r(var, reg) mmx_m2r(pand, var, reg) #define pand_r2r(regs, regd) mmx_r2r(pand, regs, regd) #define pand(vars, vard) mmx_m2m(pand, vars, vard) #endif /* 1x64 bitwise AND with Not the destination */ #define pandn_m2r(var, reg) mmx_m2r(pandn, var, reg) #define pandn_r2r(regs, regd) mmx_r2r(pandn, regs, regd) #define pandn(vars, vard) mmx_m2m(pandn, vars, vard) /* 1x64 bitwise OR */ #define por_m2r(var, reg) mmx_m2r(por, var, reg) #define por_r2r(regs, regd) mmx_r2r(por, regs, regd) #define por(vars, vard) mmx_m2m(por, vars, vard) /* 1x64 bitwise eXclusive OR */ #define pxor_m2r(var, reg) mmx_m2r(pxor, var, reg) #define pxor_r2r(regs, regd) mmx_r2r(pxor, regs, regd) #define pxor(vars, vard) mmx_m2m(pxor, vars, vard) /* 2x32, 4x16, and 8x8 Parallel CoMPare for EQuality (resulting fields are either 0 or -1) */ #define pcmpeqd_m2r(var, reg) mmx_m2r(pcmpeqd, var, reg) #define pcmpeqd_r2r(regs, regd) mmx_r2r(pcmpeqd, regs, regd) #define pcmpeqd(vars, vard) mmx_m2m(pcmpeqd, vars, vard) #define pcmpeqw_m2r(var, reg) mmx_m2r(pcmpeqw, var, reg) #define pcmpeqw_r2r(regs, regd) mmx_r2r(pcmpeqw, regs, regd) #define pcmpeqw(vars, vard) mmx_m2m(pcmpeqw, vars, vard) #define pcmpeqb_m2r(var, reg) mmx_m2r(pcmpeqb, var, reg) #define pcmpeqb_r2r(regs, regd) mmx_r2r(pcmpeqb, regs, regd) #define pcmpeqb(vars, vard) mmx_m2m(pcmpeqb, vars, vard) /* 2x32, 4x16, and 8x8 Parallel CoMPare for Greater Than (resulting fields are either 0 or -1) */ #define pcmpgtd_m2r(var, reg) mmx_m2r(pcmpgtd, var, reg) #define pcmpgtd_r2r(regs, regd) mmx_r2r(pcmpgtd, regs, regd) #define pcmpgtd(vars, vard) mmx_m2m(pcmpgtd, vars, vard) #define pcmpgtw_m2r(var, reg) mmx_m2r(pcmpgtw, var, reg) #define pcmpgtw_r2r(regs, regd) mmx_r2r(pcmpgtw, regs, regd) #define pcmpgtw(vars, vard) mmx_m2m(pcmpgtw, vars, vard) #define pcmpgtb_m2r(var, reg) mmx_m2r(pcmpgtb, var, reg) #define pcmpgtb_r2r(regs, regd) mmx_r2r(pcmpgtb, regs, regd) #define pcmpgtb(vars, vard) mmx_m2m(pcmpgtb, vars, vard) /* 1x64, 2x32, and 4x16 Parallel Shift Left Logical */ #define psllq_i2r(imm, reg) mmx_i2r(psllq, imm, reg) #define psllq_m2r(var, reg) mmx_m2r(psllq, var, reg) #define psllq_r2r(regs, regd) mmx_r2r(psllq, regs, regd) #define psllq(vars, vard) mmx_m2m(psllq, vars, vard) #define pslld_i2r(imm, reg) mmx_i2r(pslld, imm, reg) #define pslld_m2r(var, reg) mmx_m2r(pslld, var, reg) #define pslld_r2r(regs, regd) mmx_r2r(pslld, regs, regd) #define pslld(vars, vard) mmx_m2m(pslld, vars, vard) #define psllw_i2r(imm, reg) mmx_i2r(psllw, imm, reg) #define psllw_m2r(var, reg) mmx_m2r(psllw, var, reg) #define psllw_r2r(regs, regd) mmx_r2r(psllw, regs, regd) #define psllw(vars, vard) mmx_m2m(psllw, vars, vard) /* 1x64, 2x32, and 4x16 Parallel Shift Right Logical */ #define psrlq_i2r(imm, reg) mmx_i2r(psrlq, imm, reg) #define psrlq_m2r(var, reg) mmx_m2r(psrlq, var, reg) #define psrlq_r2r(regs, regd) mmx_r2r(psrlq, regs, regd) #define psrlq(vars, vard) mmx_m2m(psrlq, vars, vard) #define psrld_i2r(imm, reg) mmx_i2r(psrld, imm, reg) #define psrld_m2r(var, reg) mmx_m2r(psrld, var, reg) #define psrld_r2r(regs, regd) mmx_r2r(psrld, regs, regd) #define psrld(vars, vard) mmx_m2m(psrld, vars, vard) #define psrlw_i2r(imm, reg) mmx_i2r(psrlw, imm, reg) #define psrlw_m2r(var, reg) mmx_m2r(psrlw, var, reg) #define psrlw_r2r(regs, regd) mmx_r2r(psrlw, regs, regd) #define psrlw(vars, vard) mmx_m2m(psrlw, vars, vard) /* 2x32 and 4x16 Parallel Shift Right Arithmetic */ #define psrad_i2r(imm, reg) mmx_i2r(psrad, imm, reg) #define psrad_m2r(var, reg) mmx_m2r(psrad, var, reg) #define psrad_r2r(regs, regd) mmx_r2r(psrad, regs, regd) #define psrad(vars, vard) mmx_m2m(psrad, vars, vard) #define psraw_i2r(imm, reg) mmx_i2r(psraw, imm, reg) #define psraw_m2r(var, reg) mmx_m2r(psraw, var, reg) #define psraw_r2r(regs, regd) mmx_r2r(psraw, regs, regd) #define psraw(vars, vard) mmx_m2m(psraw, vars, vard) /* 2x32->4x16 and 4x16->8x8 PACK and Signed Saturate (packs source and dest fields into dest in that order) */ #define packssdw_m2r(var, reg) mmx_m2r(packssdw, var, reg) #define packssdw_r2r(regs, regd) mmx_r2r(packssdw, regs, regd) #define packssdw(vars, vard) mmx_m2m(packssdw, vars, vard) #define packsswb_m2r(var, reg) mmx_m2r(packsswb, var, reg) #define packsswb_r2r(regs, regd) mmx_r2r(packsswb, regs, regd) #define packsswb(vars, vard) mmx_m2m(packsswb, vars, vard) /* 4x16->8x8 PACK and Unsigned Saturate (packs source and dest fields into dest in that order) */ #define packuswb_m2r(var, reg) mmx_m2r(packuswb, var, reg) #define packuswb_r2r(regs, regd) mmx_r2r(packuswb, regs, regd) #define packuswb(vars, vard) mmx_m2m(packuswb, vars, vard) /* 2x32->1x64, 4x16->2x32, and 8x8->4x16 UNPaCK Low (interleaves low half of dest with low half of source as padding in each result field) */ #define punpckldq_m2r(var, reg) mmx_m2r(punpckldq, var, reg) #define punpckldq_r2r(regs, regd) mmx_r2r(punpckldq, regs, regd) #define punpckldq(vars, vard) mmx_m2m(punpckldq, vars, vard) #define punpcklwd_m2r(var, reg) mmx_m2r(punpcklwd, var, reg) #define punpcklwd_r2r(regs, regd) mmx_r2r(punpcklwd, regs, regd) #define punpcklwd(vars, vard) mmx_m2m(punpcklwd, vars, vard) #define punpcklbw_m2r(var, reg) mmx_m2r(punpcklbw, var, reg) #define punpcklbw_r2r(regs, regd) mmx_r2r(punpcklbw, regs, regd) #define punpcklbw(vars, vard) mmx_m2m(punpcklbw, vars, vard) /* 2x32->1x64, 4x16->2x32, and 8x8->4x16 UNPaCK High (interleaves high half of dest with high half of source as padding in each result field) */ #define punpckhdq_m2r(var, reg) mmx_m2r(punpckhdq, var, reg) #define punpckhdq_r2r(regs, regd) mmx_r2r(punpckhdq, regs, regd) #define punpckhdq(vars, vard) mmx_m2m(punpckhdq, vars, vard) #define punpckhwd_m2r(var, reg) mmx_m2r(punpckhwd, var, reg) #define punpckhwd_r2r(regs, regd) mmx_r2r(punpckhwd, regs, regd) #define punpckhwd(vars, vard) mmx_m2m(punpckhwd, vars, vard) #define punpckhbw_m2r(var, reg) mmx_m2r(punpckhbw, var, reg) #define punpckhbw_r2r(regs, regd) mmx_r2r(punpckhbw, regs, regd) #define punpckhbw(vars, vard) mmx_m2m(punpckhbw, vars, vard) #define MOVE_8DWORDS_MMX(src,dst) \ __asm__ ( \ "movq (%1), %%mm0 \n" \ "movq 0x8(%1), %%mm1 \n" \ "movq 0x10(%1), %%mm2 \n" \ "movq 0x18(%1), %%mm3 \n" \ "movq %%mm0, (%0) \n" \ "movq %%mm1, 0x8(%0) \n" \ "movq %%mm2, 0x10(%0) \n" \ "movq %%mm3, 0x18(%0) \n" \ : \ : "q" (dst), "r" (src) \ : "memory", "st"); #define MOVE_10DWORDS_MMX(src,dst) \ __asm__ ( \ "movq (%1), %%mm0 \n" \ "movq 0x8(%1), %%mm1 \n" \ "movq 0x10(%1), %%mm2 \n" \ "movq 0x18(%1), %%mm3 \n" \ "movq 0x20(%1), %%mm4 \n" \ "movq %%mm0, (%0) \n" \ "movq %%mm1, 0x8(%0) \n" \ "movq %%mm2, 0x10(%0) \n" \ "movq %%mm3, 0x18(%0) \n" \ "movq %%mm4, 0x20(%0) \n" \ : \ : "q" (dst), "r" (src) \ : "memory", "st"); #define MOVE_16DWORDS_MMX(src,dst) \ __asm__ ( \ "movq (%1), %%mm0 \n" \ "movq 0x8(%1), %%mm1 \n" \ "movq 0x10(%1), %%mm2 \n" \ "movq 0x18(%1), %%mm3 \n" \ "movq 0x20(%1), %%mm4 \n" \ "movq 0x28(%1), %%mm5 \n" \ "movq 0x30(%1), %%mm6 \n" \ "movq 0x38(%1), %%mm7 \n" \ "movq %%mm0, (%0) \n" \ "movq %%mm1, 0x8(%0) \n" \ "movq %%mm2, 0x10(%0) \n" \ "movq %%mm3, 0x18(%0) \n" \ "movq %%mm4, 0x20(%0) \n" \ "movq %%mm5, 0x28(%0) \n" \ "movq %%mm6, 0x30(%0) \n" \ "movq %%mm7, 0x38(%0) \n" \ : \ : "q" (dst), "r" (src) \ : "memory", "st"); #define MOVE_16DWORDS_MMX2(src,dst) \ __asm__ ( \ "movq (%1), %%mm0 \n" \ "movq 0x8(%1), %%mm1 \n" \ "movq 0x10(%1), %%mm2 \n" \ "movq 0x18(%1), %%mm3 \n" \ "movq 0x20(%1), %%mm4 \n" \ "movq 0x28(%1), %%mm5 \n" \ "movq 0x30(%1), %%mm6 \n" \ "movq 0x38(%1), %%mm7 \n" \ "movntq %%mm0, (%0) \n" \ "movntq %%mm1, 0x8(%0) \n" \ "movntq %%mm2, 0x10(%0) \n" \ "movntq %%mm3, 0x18(%0) \n" \ "movntq %%mm4, 0x20(%0) \n" \ "movntq %%mm5, 0x28(%0) \n" \ "movntq %%mm6, 0x30(%0) \n" \ "movntq %%mm7, 0x38(%0) \n" \ : \ : "q" (dst), "r" (src) \ : "memory", "st"); #define MOVE_32DWORDS_SSE2(src,dst) \ __asm__ ( \ "movdqu (%1), %%xmm0 \n" \ "movdqu 0x10(%1), %%xmm1 \n" \ "movdqu 0x20(%1), %%xmm2 \n" \ "movdqu 0x30(%1), %%xmm3 \n" \ "movdqu 0x40(%1), %%xmm4 \n" \ "movdqu 0x50(%1), %%xmm5 \n" \ "movdqu 0x60(%1), %%xmm6 \n" \ "movdqu 0x70(%1), %%xmm7 \n" \ "movntdq %%xmm0, (%0) \n" \ "movntdq %%xmm1, 0x10(%0) \n" \ "movntdq %%xmm2, 0x20(%0) \n" \ "movntdq %%xmm3, 0x30(%0) \n" \ "movntdq %%xmm4, 0x40(%0) \n" \ "movntdq %%xmm5, 0x50(%0) \n" \ "movntdq %%xmm6, 0x60(%0) \n" \ "movntdq %%xmm7, 0x70(%0) \n" \ : \ : "q" (dst), "r" (src) \ : "memory", "st"); #define MOVE_32DWORDS_ALIGNED_SSE2(src,dst) \ __asm__ ( \ "movdqa (%1), %%xmm0 \n" \ "movdqa 0x10(%1), %%xmm1 \n" \ "movdqa 0x20(%1), %%xmm2 \n" \ "movdqa 0x30(%1), %%xmm3 \n" \ "movdqa 0x40(%1), %%xmm4 \n" \ "movdqa 0x50(%1), %%xmm5 \n" \ "movdqa 0x60(%1), %%xmm6 \n" \ "movdqa 0x70(%1), %%xmm7 \n" \ "movntdq %%xmm0, (%0) \n" \ "movntdq %%xmm1, 0x10(%0) \n" \ "movntdq %%xmm2, 0x20(%0) \n" \ "movntdq %%xmm3, 0x30(%0) \n" \ "movntdq %%xmm4, 0x40(%0) \n" \ "movntdq %%xmm5, 0x50(%0) \n" \ "movntdq %%xmm6, 0x60(%0) \n" \ "movntdq %%xmm7, 0x70(%0) \n" \ : \ : "q" (dst), "r" (src) \ : "memory", "st"); /* Empty MMx State (used to clean-up when going from mmx to float use of the registers that are shared by both; note that there is no float-to-mmx operation needed, because only the float tag word info is corruptible) */ #define emms() __asm__ __volatile__ ("emms":::"memory") #define sfence() __asm__ __volatile__ ("sfence":::"memory") /* additions to detect mmx - */ /* Raster */ #define CPUID_MMX (1 << 23) /* flags: mmx */ #define CPUID_SSE (1 << 25) /* flags: xmm */ #define CPUID_SSE2 (1 << 26) /* flags: ? */ /* #ifdef __amd64 #define have_cpuid(cpuid_ret) \ __asm__ __volatile__ ( \ ".align 32 \n" \ " pushq %%rbx \n" \ " pushfq \n" \ " popq %%rax \n" \ " movq %%rax, %%rbx \n" \ " xorq $0x200000, %%rax \n" \ " pushq %%rax \n" \ " popfq \n" \ " pushfq \n" \ " popq %%rax \n" \ " cmpq %%rax, %%rbx \n" \ " je 1f \n" \ " movl $1, %0 \n" \ " jmp 2f \n" \ "1: \n" \ " movl $0, %0 \n" \ "2: \n" \ " popq %%rbx \n" \ : "=m" (cpuid_ret) \ ); #define get_cpuid(cpuid_ret) \ __asm__ __volatile__ ( \ ".align 32 \n" \ " pushq %%rax \n" \ " movl $1, %%eax \n" \ " cpuid \n" \ " test $0x00800000, %%edx\n" \ "1: \n" \ " movl %%edx, %0 \n" \ " jmp 2f \n" \ "2: \n" \ " movl $0, %0 \n" \ " popq %%rax \n" \ : "=m" (cpuid_ret) \ ); #else #define have_cpuid(cpuid_ret) \ __asm__ __volatile__ ( \ ".align 32 \n" \ " pushl %%ebx \n" \ " pushfl \n" \ " popl %%eax \n" \ " movl %%eax, %%ebx \n" \ " xorl $0x200000, %%eax \n" \ " pushl %%eax \n" \ " popfl \n" \ " pushfl \n" \ " popl %%eax \n" \ " cmpl %%eax, %%ebx \n" \ " je 1f \n" \ " movl $1, %0 \n" \ " jmp 2f \n" \ "1: \n" \ " movl $0, %0 \n" \ "2: \n" \ " popl %%ebx \n" \ : "=m" (cpuid_ret) \ ); #define get_cpuid(cpuid_ret) \ __asm__ __volatile__ ( \ ".align 32 \n" \ " pushl %%eax \n" \ " movl $1, %%eax \n" \ " cpuid \n" \ " test $0x00800000, %%edx\n" \ "1: \n" \ " movl %%edx, %0 \n" \ " jmp 2f \n" \ "2: \n" \ " movl $0, %0 \n" \ " popl %%eax \n" \ : "=m" (cpuid_ret) \ ); #endif */ #define prefetch(var) \ __asm__ __volatile__ ( \ "prefetchnta (%0) \n" \ : \ : "r" (var) \ ); #define prefetch0(var) \ __asm__ __volatile__ ( \ "prefetcht0 (%0) \n" \ : \ : "r" (var) \ ); #define prefetch1(var) \ __asm__ __volatile__ ( \ "prefetcht1 (%0) \n" \ : \ : "r" (var) \ ); #define prefetch2(var) \ __asm__ __volatile__ ( \ "prefetcht2 (%0) \n" \ : \ : "r" (var) \ ); #define pshufw(r1, r2, imm) \ __asm__ __volatile__ ( \ "pshufw $" #imm ", %" #r1 ", %" #r2 " \n" \ ); #define pshufhw(r1, r2, imm) \ __asm__ __volatile__ ( \ "pshufhw $" #imm ", %" #r1 ", %" #r2 " \n" \ ); #define pshuflw(r1, r2, imm) \ __asm__ __volatile__ ( \ "pshuflw $" #imm ", %" #r1 ", %" #r2 " \n" \ ); #define pshufd(r1, r2, imm) \ __asm__ __volatile__ ( \ "pshufd $" #imm ", %" #r1 ", %" #r2 " \n" \ ); /* 1x238 MOVE Doouble Quadword (this is both a load and a store... in fact, it is the only way to store) */ #define movdqu_m2r(var, reg) mmx_m2r(movdqu, var, reg) #define movdqu_r2m(reg, var) mmx_r2m(movdqu, reg, var) #define movdqu_r2r(regs, regd) mmx_r2r(movdqu, regs, regd) #define movdqu(vars, vard) \ __asm__ __volatile__ ("movdqu %1, %%xmm0\n\t" \ "movdqu %%xmm0, %0" \ : "=X" (vard) \ : "X" (vars)) #define movdqa_m2r(var, reg) mmx_m2r(movdqa, var, reg) #define movdqa_r2m(reg, var) mmx_r2m(movdqa, reg, var) #define movdqa_r2r(regs, regd) mmx_r2r(movdqa, regs, regd) #define movdqa(vars, vard) \ __asm__ __volatile__ ("movdqa %1, %%xmm0\n\t" \ "movdqa %%xmm0, %0" \ : "=X" (vard) \ : "X" (vars)) #define movntdq_r2m(reg, var) mmx_r2m(movntdq, reg, var) /* end additions */ #endif evas-1.7.9/src/lib/include/evas_macros.h0000664000175000017500000001312512175475547015067 00000000000000#ifndef EVAS_MACROS_H #define EVAS_MACROS_H #undef ABS #define ABS(x) (((x) < 0) ? -(x) : (x)) #undef SGN #define SGN(x) (((x) < 0) ? -1 : 1) #undef MIN #define MIN(x, y) (((x) < (y)) ? (x) : (y)) #undef MAX #define MAX(x, y) (((x) > (y)) ? (x) : (y)) #define SWAP32(x) (x) = \ ((((x) & 0x000000ff ) << 24) | \ (((x) & 0x0000ff00 ) << 8) | \ (((x) & 0x00ff0000 ) >> 8) | \ (((x) & 0xff000000 ) >> 24)) #define SWAP16(x) (x) = \ ((((x) & 0x00ff ) << 8) | \ (((x) & 0xff00 ) >> 8)) #define SPANS_COMMON(x1, w1, x2, w2) \ (!(( (int)((x2) + (int)(w2)) <= (int)(x1)) || (int)((x2) >= (int)((x1) + (int)(w1))))) #define RECTS_INTERSECT(x, y, w, h, xx, yy, ww, hh) \ ((SPANS_COMMON((x), (w), (xx), (ww))) && (SPANS_COMMON((y), (h), (yy), (hh)))) #define RECTS_CLIP_TO_RECT(_x, _y, _w, _h, _cx, _cy, _cw, _ch) \ { \ if (RECTS_INTERSECT(_x, _y, _w, _h, _cx, _cy, _cw, _ch)) \ { \ if ((int)_x < (int)(_cx)) \ { \ if ((int)_w + ((int)_x - (int)(_cx)) < 0) _w = 0; \ else _w += ((int)_x - (int)(_cx)); \ _x = (_cx); \ } \ if ((int)(_x + _w) > (int)((_cx) + (_cw))) \ _w = (_cx) + (_cw) - _x; \ if ((int)_y < (int)(_cy)) \ { \ if ((int)_h + ((int)_y - (int)(_cy)) < 0) _h = 0; \ else _h += ((int)_y - (int)(_cy)); \ _y = (_cy); \ } \ if ((int)(_y + _h) > (int)((_cy) + (_ch))) \ _h = (_cy) + (_ch) - _y; \ } \ else \ { \ _w = 0; _h = 0; \ } \ } #define INTERP_VAL(out, in1, in2, in3, in4, interp_x, interp_y) \ { \ int _v, _vv; \ \ _v = (256 - (interp_x)) * (in1); \ if ((interp_x) > 0) _v += (interp_x) * (in2); \ _v *= (256 - (interp_y)); \ if ((interp_y) > 0) \ { \ _vv = (256 - (interp_x)) * (in3); \ if ((interp_x) > 0) _vv += (interp_x) * (in4); \ _vv *= (interp_y); \ (out) = ((_v + _vv) >> 16); \ } \ else (out) = (_v >> 16); \ } #define INTERP_2(in1, in2, interp, interp_inv) \ ((in1 * interp_inv) + (in2 * interp)) >> 8 #define CONVERT_LOOP_START_ROT_0() \ src_ptr = src; \ for (y = 0; y < h; y++) \ { \ for (x = 0; x < w; x++) \ { #define CONVERT_LOOP_END_ROT_0() \ dst_ptr++; \ src_ptr++; \ } \ src_ptr += src_jump; \ dst_ptr += dst_jump; \ } #define CONVERT_LOOP_START_ROT_180() \ src_ptr = src + (w - 1) + ((h - 1) * (w + src_jump)); \ for (y = 0; y < h; y++) \ { \ for (x = 0; x < w; x++) \ { #define CONVERT_LOOP_END_ROT_180() \ dst_ptr++; \ src_ptr--; \ } \ src_ptr = src + (w - 1) + ((h - y - 2) * (w + src_jump)); \ dst_ptr += dst_jump; \ } #define CONVERT_LOOP_START_ROT_270() \ src_ptr = src + ((w - 1) * (h + src_jump)); \ for (y = 0; y < h; y++) \ { \ for (x = 0; x < w; x++) \ { #define CONVERT_LOOP_END_ROT_270() \ dst_ptr++; \ src_ptr -= (h + src_jump); \ } \ src_ptr = src + ((w - 1) * (h + src_jump)) + (y + 1); \ dst_ptr += dst_jump; \ } #define CONVERT_LOOP_START_ROT_90() \ src_ptr = src + (h - 1); \ for (y = 0; y < h; y++) \ { \ for (x = 0; x < w; x++) \ { #define CONVERT_LOOP_END_ROT_90() \ dst_ptr++; \ src_ptr += (h + src_jump); \ } \ src_ptr = src + (h - 1) - y - 1; \ dst_ptr += dst_jump; \ } #define CONVERT_LOOP2_START_ROT_0() \ src_ptr = src; \ for (y = 0; y < h; y++) \ { \ for (x = 0; x < w; x++) \ { #define CONVERT_LOOP2_INC_ROT_0() \ src_ptr++; \ x++; #define CONVERT_LOOP2_END_ROT_0() \ dst_ptr+=2; \ src_ptr++; \ } \ src_ptr += src_jump; \ dst_ptr += dst_jump; \ } #define CONVERT_LOOP2_START_ROT_180() \ src_ptr = src + (w - 1) + ((h - 1) * (w + src_jump)); \ for (y = 0; y < h; y++) \ { \ for (x = 0; x < w; x++) \ { #define CONVERT_LOOP2_INC_ROT_180() \ src_ptr--; \ x++; #define CONVERT_LOOP2_END_ROT_180() \ dst_ptr+=2; \ src_ptr--; \ } \ src_ptr = src + (w - 1) + ((h - y - 2) * (w + src_jump)); \ dst_ptr += dst_jump; \ } #define CONVERT_LOOP2_START_ROT_270() \ src_ptr = src + ((w - 1) * (h + src_jump)); \ for (y = 0; y < h; y++) \ { \ for (x = 0; x < w; x++) \ { #define CONVERT_LOOP2_INC_ROT_270() \ src_ptr -= (h + src_jump); \ x++; #define CONVERT_LOOP2_END_ROT_270() \ dst_ptr+=2; \ src_ptr -= (h + src_jump); \ } \ src_ptr = src + ((w - 1) * (h + src_jump)) + (y + 1); \ dst_ptr += dst_jump; \ } #define CONVERT_LOOP2_START_ROT_90() \ src_ptr = src + (h - 1); \ for (y = 0; y < h; y++) \ { \ for (x = 0; x < w; x++) \ { #define CONVERT_LOOP2_INC_ROT_90() \ src_ptr += (h + src_jump); \ x++; #define CONVERT_LOOP2_END_ROT_90() \ dst_ptr+=2; \ src_ptr += (h + src_jump); \ } \ src_ptr = src + (h - 1) - y - 1; \ dst_ptr += dst_jump; \ } #endif evas-1.7.9/src/lib/include/evas_inline.x0000664000175000017500000002064612175475547015107 00000000000000#ifndef EVAS_INLINE_H #define EVAS_INLINE_H static inline Eina_Bool _evas_render_has_map(Evas_Object *obj) { return ((!((obj->func->can_map) && (obj->func->can_map(obj)))) && ((obj->cur.map) && (obj->cur.usemap))); // return ((obj->cur.map) && (obj->cur.usemap)); } static inline void _evas_object_event_new(void) { _evas_event_counter++; } static inline int evas_object_was_visible(Evas_Object *obj) { if ((obj->prev.visible) && ((obj->prev.cache.clip.visible) || (obj->smart.smart)) && ((obj->prev.cache.clip.a > 0 && obj->prev.render_op == EVAS_RENDER_BLEND) || obj->prev.render_op != EVAS_RENDER_BLEND)) { if (obj->func->was_visible) return obj->func->was_visible(obj); return 1; } return 0; } static inline void evas_add_rect(Eina_Array *rects, int x, int y, int w, int h) { Eina_Rectangle *r; NEW_RECT(r, x, y, w, h); if (r) eina_array_push(rects, r); } static inline Cutout_Rect* evas_common_draw_context_cutouts_add(Cutout_Rects* rects, int x, int y, int w, int h) { Cutout_Rect* rect; if (rects->max < (rects->active + 1)) { rects->max += 128; rects->rects = (Cutout_Rect *)realloc(rects->rects, sizeof(Cutout_Rect) * rects->max); } rect = rects->rects + rects->active; rect->x = x; rect->y = y; rect->w = w; rect->h = h; rects->active++; return rect; } static inline int evas_object_is_opaque(Evas_Object *obj) { if (obj->smart.smart) return 0; /* If a mask: Assume alpha */ if (obj->cur.mask) return 0; if (obj->cur.cache.clip.a == 255) { if (obj->func->is_opaque) return obj->func->is_opaque(obj); return 1; } if (obj->cur.render_op == EVAS_RENDER_COPY) return 1; return 0; } static inline int evas_event_freezes_through(Evas_Object *obj) { if (obj->freeze_events) return 1; if (obj->parent_cache.freeze_events_valid) return obj->parent_cache.freeze_events; if (!obj->smart.parent) return 0; obj->parent_cache.freeze_events = evas_event_freezes_through(obj->smart.parent); obj->parent_cache.freeze_events_valid = EINA_TRUE; return obj->parent_cache.freeze_events; } static inline int evas_event_passes_through(Evas_Object *obj) { if (obj->pass_events) return 1; if (obj->parent_cache.pass_events_valid) return obj->parent_cache.pass_events; if (!obj->smart.parent) return 0; obj->parent_cache.pass_events = evas_event_passes_through(obj->smart.parent); obj->parent_cache.pass_events_valid = EINA_TRUE; return obj->parent_cache.pass_events; } static inline int evas_object_is_visible(Evas_Object *obj) { /* post 1.0 -> enable? */ if ((obj->cur.visible)/* && (obj->cur.color.a > 0)*/ && ((obj->cur.cache.clip.visible) || (obj->smart.smart)) && ((obj->cur.cache.clip.a > 0 && obj->cur.render_op == EVAS_RENDER_BLEND) || obj->cur.render_op != EVAS_RENDER_BLEND)) { if (obj->func->is_visible) return obj->func->is_visible(obj); return 1; } return 0; } static inline int evas_object_clippers_is_visible(Evas_Object *obj) { if (obj->cur.visible) { if (obj->cur.clipper) return evas_object_clippers_is_visible(obj->cur.clipper); return 1; } return 0; } static inline int evas_object_is_in_output_rect(Evas_Object *obj, int x, int y, int w, int h) { /* assumes coords have been recalced */ if ((RECTS_INTERSECT(x, y, w, h, obj->cur.cache.clip.x, obj->cur.cache.clip.y, obj->cur.cache.clip.w, obj->cur.cache.clip.h))) return 1; return 0; } static inline int evas_object_is_active(Evas_Object *obj) { if (evas_object_is_visible(obj) || evas_object_was_visible(obj)) { if (obj->smart.smart) { int mapsmt = 0; if (obj->smart.smart && (obj->cur.map && obj->cur.usemap)) mapsmt = 1; if (!mapsmt) return 1; if (evas_object_is_in_output_rect(obj, 0, 0, obj->layer->evas->output.w, obj->layer->evas->output.h) || evas_object_was_in_output_rect(obj, 0, 0, obj->layer->evas->output.w, obj->layer->evas->output.h)) return 1; } else { if (evas_object_is_in_output_rect(obj, 0, 0, obj->layer->evas->output.w, obj->layer->evas->output.h) || evas_object_was_in_output_rect(obj, 0, 0, obj->layer->evas->output.w, obj->layer->evas->output.h)) return 1; } } /* FIXME: forcing object with proxies to stay active, need to be smarter and only do that when really needed. */ if (obj->proxy.proxies && obj->changed) return 1; return 0; } static inline void evas_object_coords_recalc(Evas_Object *obj) { //// if (obj->cur.cache.geometry.validity == obj->layer->evas->output_validity) //// return; //// obj->cur.cache.geometry.x = //// evas_coord_world_x_to_screen(obj->layer->evas, obj->cur.geometry.x); //// obj->cur.cache.geometry.y = //// evas_coord_world_y_to_screen(obj->layer->evas, obj->cur.geometry.y); //// obj->cur.cache.geometry.w = //// evas_coord_world_x_to_screen(obj->layer->evas, obj->cur.geometry.w) - //// evas_coord_world_x_to_screen(obj->layer->evas, 0); //// obj->cur.cache.geometry.h = //// evas_coord_world_y_to_screen(obj->layer->evas, obj->cur.geometry.h) - //// evas_coord_world_y_to_screen(obj->layer->evas, 0); if (obj->func->coords_recalc) obj->func->coords_recalc(obj); //// obj->cur.cache.geometry.validity = obj->layer->evas->output_validity; } static inline void evas_object_clip_recalc(Evas_Object *obj) { int cx, cy, cw, ch, cr, cg, cb, ca; int nx, ny, nw, nh, nr, ng, nb, na; Eina_Bool cvis, nvis; if ((!obj->cur.cache.clip.dirty) && !(!obj->cur.clipper || obj->cur.clipper->cur.cache.clip.dirty)) return; if (obj->layer->evas->events_frozen > 0) return; evas_object_coords_recalc(obj); if ((obj->cur.map) && (obj->cur.usemap)) { cx = obj->cur.map->normal_geometry.x; cy = obj->cur.map->normal_geometry.y; cw = obj->cur.map->normal_geometry.w; ch = obj->cur.map->normal_geometry.h; } else { cx = obj->cur.geometry.x; cy = obj->cur.geometry.y; cw = obj->cur.geometry.w; ch = obj->cur.geometry.h; } if (obj->cur.color.a == 0 && obj->cur.render_op == EVAS_RENDER_BLEND) cvis = EINA_FALSE; else cvis = obj->cur.visible; cr = obj->cur.color.r; cg = obj->cur.color.g; cb = obj->cur.color.b; ca = obj->cur.color.a; if (obj->cur.clipper) { // this causes problems... hmmm ????? if (obj->cur.clipper->cur.cache.clip.dirty) evas_object_clip_recalc(obj->cur.clipper); // I don't know why this test was here in the first place. As I have // no issue showing up due to this, I keep it and move color out of it. // breaks cliping of mapped images!!! if (obj->cur.clipper->cur.map_parent == obj->cur.map_parent) { nx = obj->cur.clipper->cur.cache.clip.x; ny = obj->cur.clipper->cur.cache.clip.y; nw = obj->cur.clipper->cur.cache.clip.w; nh = obj->cur.clipper->cur.cache.clip.h; RECTS_CLIP_TO_RECT(cx, cy, cw, ch, nx, ny, nw, nh); } nvis = obj->cur.clipper->cur.cache.clip.visible; nr = obj->cur.clipper->cur.cache.clip.r; ng = obj->cur.clipper->cur.cache.clip.g; nb = obj->cur.clipper->cur.cache.clip.b; na = obj->cur.clipper->cur.cache.clip.a; cvis = (cvis & nvis); cr = (cr * (nr + 1)) >> 8; cg = (cg * (ng + 1)) >> 8; cb = (cb * (nb + 1)) >> 8; ca = (ca * (na + 1)) >> 8; } if ((ca == 0 && obj->cur.render_op == EVAS_RENDER_BLEND) || (cw <= 0) || (ch <= 0)) cvis = EINA_FALSE; obj->cur.cache.clip.x = cx; obj->cur.cache.clip.y = cy; obj->cur.cache.clip.w = cw; obj->cur.cache.clip.h = ch; obj->cur.cache.clip.visible = cvis; obj->cur.cache.clip.r = cr; obj->cur.cache.clip.g = cg; obj->cur.cache.clip.b = cb; obj->cur.cache.clip.a = ca; obj->cur.cache.clip.dirty = EINA_FALSE; } #endif evas-1.7.9/src/lib/include/evas_options.h0000664000175000017500000000336212175475547015300 00000000000000#ifndef EVAS_OPTIONS_H #define EVAS_OPTIONS_H 1 /* these may vary per OS */ /* what to build *//* small dither table is MUCH faster on ipaq */ /*#define BUILD_SMALL_DITHER_MASK*/ /*#define HARD_CODED_P3*/ /*#define HARD_CODED_P2*/ /*#define BUILD_CONVERT_1_GRY_1*/ /*#define BUILD_CONVERT_4_GRY_1*/ /*#define BUILD_CONVERT_4_GRY_4*/ /*#define BUILD_CONVERT_8_GRY_1*/ /*#define BUILD_CONVERT_8_GRY_4*/ /*#define BUILD_CONVERT_8_GRY_16*/ /*#define BUILD_CONVERT_8_GRY_64*/ /*#define BUILD_CONVERT_8_GRY_256*/ /*#define BUILD_CONVERT_8_RGB_332*/ /*#define BUILD_CONVERT_8_RGB_666*/ /*#define BUILD_CONVERT_8_RGB_232*/ /*#define BUILD_CONVERT_8_RGB_222*/ /*#define BUILD_CONVERT_8_RGB_221*/ /*#define BUILD_CONVERT_8_RGB_121*/ /*#define BUILD_CONVERT_8_RGB_111*/ /*#define BUILD_CONVERT_16_RGB_565*/ /*#define BUILD_CONVERT_16_RGB_555*/ /*#define BUILD_CONVERT_16_RGB_444*/ /*#define BUILD_CONVERT_16_RGB_454645*/ /*#define BUILD_CONVERT_16_RGB_ROT0*/ /*#define BUILD_CONVERT_16_RGB_ROT270*/ /*#define BUILD_CONVERT_24_RGB_888*/ /*#define BUILD_CONVERT_24_BGR_888*/ /*#define BUILD_CONVERT_32_RGB_8888*/ /*#define BUILD_CONVERT_32_BGR_8888*/ /*#define BUILD_CONVERT_32_RGB_ROT0*/ /*#define BUILD_CONVERT_32_RGB_ROT270*/ /*#define BUILD_SCALE_SAMPLE*/ /*#define BUILD_SCALE_SMOOTH*/ /*#define BUILD_SCALE_TRILINEAR*/ /*#define BUILD_MMX*/ /*#define BUILD_SSE*/ /*#define BUILD_SSE3*/ /*#define BUILD_C*/ /*#define BUILD_LOADER_PNG*/ /*#define BUILD_LOADER_JPEG*/ /*#define BUILD_LOADER_EET*/ /*#define BUILD_LOADER_EDB*/ /*#define BUILD_FMEMOPEN*/ /* check in that the user configured it right */ #ifndef BUILD_MMX # ifndef BUILD_SSE3 # ifndef BUILD_SSE # ifndef BUILD_C # error "Please Read the README" #endif # endif # endif #endif #define DIRECT_SCALE #endif evas-1.7.9/src/lib/include/evas_common.h0000664000175000017500000007535312175475547015106 00000000000000#ifndef EVAS_COMMON_H #define EVAS_COMMON_H //#ifdef HAVE_CONFIG_H #include "config.h" /* so that EAPI in Evas.h is correctly defined */ //#endif #ifdef STDC_HEADERS # include # include #else # ifdef HAVE_STDLIB_H # include # endif #endif #ifdef HAVE_ALLOCA_H # include #elif !defined alloca # ifdef __GNUC__ # define alloca __builtin_alloca # elif defined _AIX # define alloca __alloca # elif defined _MSC_VER # include # define alloca _alloca # elif !defined HAVE_ALLOCA # ifdef __cplusplus extern "C" # endif void *alloca (size_t); # endif #endif #include #include #include #include #include #include #include #ifndef _MSC_VER # include #include #endif #ifdef HAVE_EVIL # include #endif #ifdef HAVE_ESCAPE # include #endif #ifdef HAVE_PIXMAN #include #endif #include #include #include #ifdef HAVE_EXOTIC # include #endif #include #include "Evas.h" //#include "Evas_GL.h" #ifndef HAVE_LROUND /* right now i dont care about rendering bugs on platforms without lround (e.g. windows/vc++... yay!) FIXME: http://cgit.freedesktop.org/cairo/tree/src/cairo-misc.c#n487 */ #define lround(x) (((x) < 0) ? (long int)ceil((x) - 0.5) : (long int)floor((x) + 0.5)) #endif /* macros needed to log message through eina_log */ extern EAPI int _evas_log_dom_global; #ifdef _EVAS_DEFAULT_LOG_DOM # undef _EVAS_DEFAULT_LOG_DOM #endif #define _EVAS_DEFAULT_LOG_DOM _evas_log_dom_global #ifdef EVAS_DEFAULT_LOG_COLOR # undef EVAS_DEFAULT_LOG_COLOR #endif #define EVAS_DEFAULT_LOG_COLOR EINA_COLOR_BLUE #ifdef ERR # undef ERR #endif #define ERR(...) EINA_LOG_DOM_ERR(_EVAS_DEFAULT_LOG_DOM, __VA_ARGS__) #ifdef DBG # undef DBG #endif #define DBG(...) EINA_LOG_DOM_DBG(_EVAS_DEFAULT_LOG_DOM, __VA_ARGS__) #ifdef INF # undef INF #endif #define INF(...) EINA_LOG_DOM_INFO(_EVAS_DEFAULT_LOG_DOM, __VA_ARGS__) #ifdef WRN # undef WRN #endif #define WRN(...) EINA_LOG_DOM_WARN(_EVAS_DEFAULT_LOG_DOM, __VA_ARGS__) #ifdef CRIT # undef CRIT #endif #define CRIT(...) EINA_LOG_DOM_CRIT(_EVAS_DEFAULT_LOG_DOM, __VA_ARGS__) #include "evas_options.h" #if defined(__ARM_ARCH_3M__) # define __ARM_ARCH__ 40 #endif #if defined(__ARM_ARCH_4__) # define __ARM_ARCH__ 40 #endif #if defined(__ARM_ARCH_4T__) # define __ARM_ARCH__ 41 #endif #if defined(__ARM_ARCH_5__) # define __ARM_ARCH__ 50 #endif #if defined(__ARM_ARCH_5T__) # define __ARM_ARCH__ 51 #endif #if defined(__ARM_ARCH_5E__) # define __ARM_ARCH__ 52 #endif #if defined(__ARM_ARCH_5TE__) # define __ARM_ARCH__ 53 #endif #if defined(__ARM_ARCH_5TEJ__) # define __ARM_ARCH__ 54 #endif #if defined(__ARM_ARCH_6__) # define __ARM_ARCH__ 60 #endif #if defined(__ARM_ARCH_6J__) # define __ARM_ARCH__ 61 #endif #if defined(__ARM_ARCH_6K__) # define __ARM_ARCH__ 62 #endif #if defined(__ARM_ARCH_6Z__) # define __ARM_ARCH__ 63 #endif #if defined(__ARM_ARCH_6ZK__) # define __ARM_ARCH__ 64 #endif #if defined(__ARM_ARCH_6T2__) # define __ARM_ARCH__ 65 #endif #if defined(__ARM_ARCH_7__) # define __ARM_ARCH__ 70 #endif #if defined(__ARM_ARCH_7A__) # define __ARM_ARCH__ 71 #endif #if defined(__ARM_ARCH_7R__) # define __ARM_ARCH__ 72 #endif #if defined(__ARM_ARCH_7M__) # define __ARM_ARCH__ 73 #endif #ifndef BUILD_PTHREAD # undef BUILD_PIPE_RENDER #endif #if defined(BUILD_ASYNC_PRELOAD) && !defined(BUILD_PTHREAD) # define BUILD_PTHREAD #endif #define LK(x) Eina_Lock x #define LKI(x) eina_lock_new(&(x)) #define LKD(x) eina_lock_free(&(x)) #define LKL(x) eina_lock_take(&(x)) #define LKT(x) eina_lock_take_try(&(x)) #define LKU(x) eina_lock_release(&(x)) #define LKDBG(x) eina_lock_debug(&(x)) /* for rwlocks */ #define RWLK(x) Eina_RWLock x #define RWLKI(x) eina_rwlock_new(&(x)) #define RWLKD(x) eina_rwlock_free(&(x)) #define RDLKL(x) eina_rwlock_take_read(&(x)) #define WRLKL(x) eina_rwlock_take_write(&(x)) #define RWLKU(x) eina_rwlock_release(&(x)) #ifdef BUILD_PTHREAD # define TH(x) pthread_t x # define THI(x) int x # define TH_MAX 8 #else # define TH(x) # define THI(x) # define TH_MAX 0 #endif #include #include FT_FREETYPE_H #include FT_GLYPH_H #include FT_SIZES_H #include FT_MODULE_H #ifdef __GNUC__ # if __GNUC__ >= 4 // BROKEN in gcc 4 on amd64 //# pragma GCC visibility push(hidden) # endif #define LIKELY(x) __builtin_expect(!!(x), 1) #define UNLIKELY(x) __builtin_expect(!!(x), 0) #else #define LIKELY(x) (x) #define UNLIKELY(x) (x) #endif /*****************************************************************************/ /* use exact rects for updates not tiles */ /* #define RECTUPDATE */ #define TILESIZE 8 #define IMG_MAX_SIZE 65000 #define IMG_TOO_BIG(w, h) \ ((((unsigned long long)w) * ((unsigned long long)h)) >= \ ((1ULL << (29 * (sizeof(void *) / 4))) - 2048)) #ifdef BUILD_SMALL_DITHER_MASK # define DM_TABLE _evas_dither_44 # define DM_SIZE 4 # define DM_BITS 4 # define DM_DIV 16 # define USE_DITHER_44 1 #else # define DM_TABLE _evas_dither_128128 # define DM_SIZE 128 # define DM_BITS 6 # define DM_DIV 64 # define USE_DITHER_128128 1 #endif #define DM_MSK (DM_SIZE - 1) #define DM_SHF(_b) (DM_BITS - (8 - _b)) /* Supports negative right shifts */ #define DM_SHR(x, _b) ((DM_SHF(_b) >= 0) ? \ ((x) >> DM_SHF(_b)) : ((x) << -DM_SHF(_b))) /* if more than 1/ALPHA_SPARSE_INV_FRACTION is "alpha" (1-254) then sparse * alpha flag gets set */ #define ALPHA_SPARSE_INV_FRACTION 3 /*****************************************************************************/ #if defined(__ARM_ARCH_3M__) # define __ARM_ARCH__ 40 #endif #if defined(__ARM_ARCH_4__) # define __ARM_ARCH__ 40 #endif #if defined(__ARM_ARCH_4T__) # define __ARM_ARCH__ 41 #endif #if defined(__ARM_ARCH_5__) # define __ARM_ARCH__ 50 #endif #if defined(__ARM_ARCH_5T__) # define __ARM_ARCH__ 51 #endif #if defined(__ARM_ARCH_5E__) # define __ARM_ARCH__ 52 #endif #if defined(__ARM_ARCH_5TE__) # define __ARM_ARCH__ 53 #endif #if defined(__ARM_ARCH_5TEJ__) # define __ARM_ARCH__ 54 #endif #if defined(__ARM_ARCH_6__) # define __ARM_ARCH__ 60 #endif #if defined(__ARM_ARCH_6J__) # define __ARM_ARCH__ 61 #endif #if defined(__ARM_ARCH_6K__) # define __ARM_ARCH__ 62 #endif #if defined(__ARM_ARCH_6Z__) # define __ARM_ARCH__ 63 #endif #if defined(__ARM_ARCH_6ZK__) # define __ARM_ARCH__ 64 #endif #if defined(__ARM_ARCH_6T2__) # define __ARM_ARCH__ 65 #endif #if defined(__ARM_ARCH_7__) # define __ARM_ARCH__ 70 #endif #if defined(__ARM_ARCH_7A__) # define __ARM_ARCH__ 71 #endif #if defined(__ARM_ARCH_7R__) # define __ARM_ARCH__ 72 #endif #if defined(__ARM_ARCH_7M__) # define __ARM_ARCH__ 73 #endif #if defined(__ARM_ARCH__) && (__ARM_ARCH__ >= 52) /* tested on ARMv6 (arm1136j-s), Nokia N800 CPU */ #define pld(addr, off) \ __asm__("pld [%[address], %[offset]]":: \ [address] "r" (addr), [offset] "i" (off)) #else #define pld(addr, off) #endif /* __ARMEL__ */ // these here are in config.h - just here for documentation //#ifdef __ARM_ARCH__ // *IF* you enable pixman, this determines which things pixman will do ////#define PIXMAN_FONT 1 ////#define PIXMAN_RECT 1 ////#define PIXMAN_LINE 1 ////#define PIXMAN_POLY 1 //#define PIXMAN_IMAGE 1 //#define PIXMAN_IMAGE_SCALE_SAMPLE 1 //#endif // not related to pixman but an alternate rotate code //#define TILE_ROTATE 1 #define TILE_CACHE_LINE_SIZE 64 /*****************************************************************************/ #define UNROLL2(op...) op op #define UNROLL4(op...) UNROLL2(op) UNROLL2(op) #define UNROLL8(op...) UNROLL4(op) UNROLL4(op) #define UNROLL16(op...) UNROLL8(op) UNROLL8(op) #define UNROLL8_PLD_WHILE(start, size, end, op) \ pld(start, 0); \ end = start + (size & ~7); \ while (start < end) \ { \ pld(start, 32); \ UNROLL8(op); \ } \ end += (size & 7); \ pld(start, 32); \ while (start < end) \ { \ op; \ } /*****************************************************************************/ typedef unsigned long long DATA64; typedef unsigned int DATA32; typedef unsigned short DATA16; typedef unsigned char DATA8; typedef struct _Image_Entry Image_Entry; typedef struct _Image_Entry_Flags Image_Entry_Flags; typedef struct _Image_Entry_Frame Image_Entry_Frame; typedef struct _Image_Timestamp Image_Timestamp; typedef struct _Engine_Image_Entry Engine_Image_Entry; typedef struct _Evas_Cache_Target Evas_Cache_Target; typedef struct _Evas_Preload_Pthread Evas_Preload_Pthread; typedef struct _RGBA_Image_Loadopts RGBA_Image_Loadopts; #ifdef BUILD_PIPE_RENDER typedef struct _RGBA_Pipe_Op RGBA_Pipe_Op; typedef struct _RGBA_Pipe RGBA_Pipe; typedef struct _RGBA_Pipe_Thread_Info RGBA_Pipe_Thread_Info; #endif typedef struct _RGBA_Image RGBA_Image; typedef struct _RGBA_Image_Span RGBA_Image_Span; typedef struct _RGBA_Draw_Context RGBA_Draw_Context; typedef struct _RGBA_Polygon_Point RGBA_Polygon_Point; typedef struct _RGBA_Map_Point RGBA_Map_Point; typedef struct _RGBA_Map RGBA_Map; typedef struct _RGBA_Font RGBA_Font; typedef struct _RGBA_Font_Int RGBA_Font_Int; typedef struct _RGBA_Font_Source RGBA_Font_Source; typedef struct _RGBA_Font_Glyph RGBA_Font_Glyph; typedef struct _RGBA_Font_Glyph_Out RGBA_Font_Glyph_Out; typedef struct _RGBA_Gfx_Compositor RGBA_Gfx_Compositor; typedef struct _Cutout_Rect Cutout_Rect; typedef struct _Cutout_Rects Cutout_Rects; typedef struct _Convert_Pal Convert_Pal; typedef struct _Tilebuf Tilebuf; typedef struct _Tilebuf_Tile Tilebuf_Tile; typedef struct _Tilebuf_Rect Tilebuf_Rect; typedef struct _Evas_Common_Transform Evas_Common_Transform; // RGBA_Map_Point // all coords are 20.12 // fp type - an int for now typedef int FPc; // fp # of bits of float accuracy #define FP 8 // fp half (half of an fp unit) #define FPH (1 << (FP - 1)) // one fp unit #define FP1 (1 << (FP)) /* typedef struct _Regionbuf Regionbuf; typedef struct _Regionspan Regionspan; */ typedef void (*RGBA_Gfx_Func) (DATA32 *src, DATA8 *mask, DATA32 col, DATA32 *dst, int len); typedef void (*RGBA_Gfx_Pt_Func) (DATA32 src, DATA8 mask, DATA32 col, DATA32 *dst); typedef void (*Gfx_Func_Copy) (DATA32 *src, DATA32 *dst, int len); typedef 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); #include "../cache/evas_cache.h" #ifdef EVAS_CSERVE2 #include "../cache2/evas_cache2.h" #endif /*****************************************************************************/ typedef enum _RGBA_Image_Flags { RGBA_IMAGE_NOTHING = (0), /* RGBA_IMAGE_HAS_ALPHA = (1 << 0), */ RGBA_IMAGE_IS_DIRTY = (1 << 1), RGBA_IMAGE_INDEXED = (1 << 2), RGBA_IMAGE_ALPHA_ONLY = (1 << 3), RGBA_IMAGE_ALPHA_TILES = (1 << 4), /* RGBA_IMAGE_ALPHA_SPARSE = (1 << 5), */ /* RGBA_IMAGE_LOADED = (1 << 6), */ /* RGBA_IMAGE_NEED_DATA = (1 << 7) */ RGBA_IMAGE_TODO_LOAD = (1 << 8), } RGBA_Image_Flags; typedef enum _Convert_Pal_Mode { PAL_MODE_NONE, PAL_MODE_MONO, PAL_MODE_GRAY4, PAL_MODE_GRAY16, PAL_MODE_GRAY64, PAL_MODE_GRAY256, PAL_MODE_RGB111, PAL_MODE_RGB121, PAL_MODE_RGB221, PAL_MODE_RGB222, PAL_MODE_RGB232, PAL_MODE_RGB332, PAL_MODE_RGB666, PAL_MODE_LAST } Convert_Pal_Mode; typedef enum _CPU_Features { CPU_FEATURE_C = 0, CPU_FEATURE_MMX = (1 << 0), CPU_FEATURE_MMX2 = (1 << 1), CPU_FEATURE_SSE = (1 << 2), CPU_FEATURE_ALTIVEC = (1 << 3), CPU_FEATURE_VIS = (1 << 4), CPU_FEATURE_VIS2 = (1 << 5), CPU_FEATURE_NEON = (1 << 6), CPU_FEATURE_SSE3 = (1 << 7) } CPU_Features; typedef enum _Font_Hint_Flags { FONT_NO_HINT, FONT_AUTO_HINT, FONT_BYTECODE_HINT } Font_Hint_Flags; typedef enum _Font_Rend_Flags { FONT_REND_REGULAR = 0, FONT_REND_SLANT = (1 << 0), FONT_REND_WEIGHT = (1 << 1), } Font_Rend_Flags; /*****************************************************************************/ #if 0 // filtering disabled typedef struct _Filtered_Image Filtered_Image; #endif struct _RGBA_Image_Loadopts { int scale_down_by; // if > 1 then use this double dpi; // if > 0.0 use this unsigned int w, h; // if > 0 use this unsigned int degree;//if>0 there is some info related with rotation struct { unsigned int x, y, w, h; } region; Eina_Bool orientation; // if EINA_TRUE => should honor orientation information provided by file (like jpeg exif info) }; struct _Image_Entry_Flags { Eina_Bool loaded : 1; Eina_Bool in_progress : 1; Eina_Bool dirty : 1; Eina_Bool activ : 1; Eina_Bool need_data : 1; Eina_Bool lru_nodata : 1; Eina_Bool cached : 1; Eina_Bool alpha : 1; Eina_Bool lru : 1; Eina_Bool alpha_sparse : 1; #ifdef BUILD_ASYNC_PRELOAD Eina_Bool preload_done : 1; Eina_Bool delete_me : 1; Eina_Bool pending : 1; #endif Eina_Bool animated : 1; Eina_Bool rotated : 1; }; struct _Image_Entry_Frame { int index; DATA32 *data; /* frame decoding data */ void *info; /* special image type info */ Eina_Bool loaded : 1; }; struct _Evas_Cache_Target { EINA_INLIST; const void *target; void *data; }; struct _Image_Timestamp { time_t mtime; off_t size; ino_t ino; #ifdef _STAT_VER_LINUX unsigned long int mtime_nsec; #endif }; struct _Image_Entry { EINA_INLIST; Evas_Cache_Image *cache; #ifdef EVAS_CSERVE2 Evas_Cache2 *cache2; #endif const char *cache_key; const char *file; const char *key; Evas_Cache_Target *targets; Evas_Preload_Pthread *preload; Image_Timestamp tstamp; int references; #ifdef BUILD_PIPE_RENDER RGBA_Pipe *pipe; #endif unsigned char scale; RGBA_Image_Loadopts load_opts; int space; unsigned int w; unsigned int h; struct { unsigned int w; unsigned int h; } allocated; struct { void *module; void *loader; } info; #ifdef BUILD_ASYNC_PRELOAD LK(lock); LK(lock_cancel); Eina_Bool unload_cancel : 1; #endif Image_Entry_Flags flags; Evas_Image_Scale_Hint scale_hint; void *data1, *data2; #ifdef EVAS_CSERVE2 unsigned int open_rid, load_rid, preload_rid; #endif int server_id; int connect_num; int channel; int load_error; /* for animation feature */ int frame_count; Evas_Image_Animated_Loop_Hint loop_hint; int loop_count; int cur_frame; Eina_List *frames; }; struct _Engine_Image_Entry { EINA_INLIST; /* Upper Engine data. */ Image_Entry *src; /* Cache stuff. */ Evas_Cache_Engine_Image *cache; const char *cache_key; struct { Eina_Bool cached : 1; Eina_Bool activ : 1; Eina_Bool dirty : 1; Eina_Bool loaded : 1; Eina_Bool need_parent : 1; } flags; int references; int w; int h; }; struct _Cutout_Rect { int x, y, w, h; }; struct _Cutout_Rects { Cutout_Rect* rects; int active; int max; }; struct _Evas_Common_Transform { float mxx, mxy, mxz; float myx, myy, myz; float mzx, mzy, mzz; }; struct _RGBA_Draw_Context { struct { Eina_Bool use : 1; DATA32 col; } mul; struct { #ifdef HAVE_PIXMAN pixman_image_t *pixman_color_image; #endif DATA32 col; } col; struct RGBA_Draw_Context_clip { int x, y, w, h; Eina_Bool use : 1; } clip; struct { int x, y, w, h; RGBA_Image *mask; } mask; Cutout_Rects cutout; struct { struct { void *(*gl_new) (void *data, RGBA_Font_Glyph *fg); void (*gl_free) (void *ext_dat); void (*gl_draw) (void *data, void *dest, void *context, RGBA_Font_Glyph *fg, int x, int y); } func; void *data; } font_ext; struct { int color_space; } interpolation; struct { int y, h; } sli; int render_op; Eina_Bool anti_alias : 1; }; #ifdef BUILD_PIPE_RENDER #include "../engines/common/evas_map_image.h" #include "../engines/common/evas_text_utils.h" struct _RGBA_Pipe_Op { RGBA_Draw_Context context; Eina_Bool (*prepare_func) (void *data, RGBA_Image *dst, RGBA_Pipe_Op *op); void (*op_func) (RGBA_Image *dst, const RGBA_Pipe_Op *op, const RGBA_Pipe_Thread_Info *info); void (*free_func) (RGBA_Pipe_Op *op); Cutout_Rects *rects; union { struct { int x, y, w, h; } rect; struct { int x0, y0, x1, y1; } line; struct { int x, y; RGBA_Polygon_Point *points; } poly; struct { int x, y; Evas_Text_Props *intl_props; RGBA_Gfx_Func func; } text; struct { RGBA_Image *src; int sx, sy, sw, sh, dx, dy, dw, dh; int smooth; char *text; } image; struct { RGBA_Image *src; RGBA_Map *m; int npoints; int smooth; int level; } map; } op; Eina_Bool render : 1; }; #define PIPE_LEN 256 struct _RGBA_Pipe { EINA_INLIST; int op_num; RGBA_Pipe_Op op[PIPE_LEN]; }; struct _RGBA_Pipe_Thread_Info { EINA_INLIST; Eina_Rectangle area; }; #endif struct _RGBA_Image { Image_Entry cache_entry; RGBA_Image_Flags flags; struct { /* void *module; */ /* void *loader; */ /* char *real_file; */ char *comment; // int format; } info; void *extended_info; int ref; /* unsigned char scale; */ /* Colorspace stuff. */ struct { void *data; Eina_Bool no_free : 1; Eina_Bool dirty : 1; } cs; /* RGBA stuff */ struct { DATA32 *data; Eina_Bool no_free : 1; } image; struct { DATA8 *mask; Eina_Bool dirty: 1; } mask; #if 0 // filtering disabled Eina_List *filtered; #endif struct { LK(lock); Eina_List *list; unsigned long long orig_usage; unsigned long long usage_count; int populate_count; unsigned long long newest_usage; unsigned long long newest_usage_count; } cache; #ifdef HAVE_PIXMAN struct { pixman_image_t *im; } pixman; #endif }; struct _RGBA_Polygon_Point { EINA_INLIST; int x, y; }; struct _RGBA_Map_Point { FPc x, y; // x, y screenspace float fx, fy, fz; // x, y, z in floats // FPc x3, y3; // x, y 3d space FPc z; // z in world space. optional FPc u, v; // u, v in tex coords DATA32 col; // color at this point // for perspective correctness - only point 0 has relevant info FPc px, py, z0, foc; }; struct _RGBA_Map { void *engine_data; struct { int w, h; } image, uv; int x, y; int count; RGBA_Map_Point pts[1]; }; #if 0 // filtering disabled struct _Filtered_Image { void *key; size_t keylen; RGBA_Image *image; int ref; }; #endif // for fonts... ///// typedef struct _Fash_Item_Index_Map Fash_Item_Index_Map; typedef struct _Fash_Int_Map Fash_Int_Map; typedef struct _Fash_Int_Map2 Fash_Int_Map2; typedef struct _Fash_Int Fash_Int; struct _Fash_Item_Index_Map { RGBA_Font_Int *fint; int index; }; struct _Fash_Int_Map { Fash_Item_Index_Map item[256]; }; struct _Fash_Int_Map2 { Fash_Int_Map *bucket[256]; }; struct _Fash_Int { Fash_Int_Map2 *bucket[256]; void (*freeme) (Fash_Int *fash); }; ///// typedef struct _Fash_Glyph_Map Fash_Glyph_Map; typedef struct _Fash_Glyph_Map2 Fash_Glyph_Map2; typedef struct _Fash_Glyph Fash_Glyph; struct _Fash_Glyph_Map { RGBA_Font_Glyph *item[256]; }; struct _Fash_Glyph_Map2 { Fash_Glyph_Map *bucket[256]; }; struct _Fash_Glyph { Fash_Glyph_Map2 *bucket[256]; void (*freeme) (Fash_Glyph *fash); }; ///// struct _RGBA_Font { Eina_List *fonts; Fash_Int *fash; Font_Hint_Flags hinting; int references; LK(lock); unsigned char sizeok : 1; }; #include "../engines/common/evas_font_ot.h" struct _RGBA_Font_Int { EINA_INLIST; RGBA_Font_Source *src; Eina_Hash *kerning; Fash_Glyph *fash; unsigned int size; int real_size; int max_h; int references; int usage; struct { FT_Size size; #ifdef USE_HARFBUZZ void *hb_font; #endif } ft; LK(ft_mutex); Font_Hint_Flags hinting; Font_Rend_Flags wanted_rend; /* The wanted rendering style */ Font_Rend_Flags runtime_rend; /* The rendering we need to do on runtime in order to comply with the wanted_rend. */ Eina_List *task; #ifdef EVAS_CSERVE2 void *cs2_handler; #endif int generation; unsigned char sizeok : 1; unsigned char inuse : 1; }; struct _RGBA_Font_Source { const char *name; const char *file; void *data; unsigned int current_size; int data_size; int references; struct { int orig_upem; FT_Face face; } ft; }; /* * laziness wins for now. The parts used from the freetpye struct are * kept intact to avoid changing the code using it until we know exactly * what needs to be changed */ struct _RGBA_Font_Glyph_Out { struct { int rows; int width; int pitch; unsigned char *buffer; short num_grays; char pixel_mode; } bitmap; }; struct _RGBA_Font_Glyph { FT_UInt index; Evas_Coord width; Evas_Coord x_bear; Evas_Coord y_bear; FT_Glyph glyph; RGBA_Font_Glyph_Out *glyph_out; void (*glyph_out_free)(void *); /* this is a problem - only 1 engine at a time can extend such a font... grrr */ void *ext_dat; void (*ext_dat_free) (void *ext_dat); RGBA_Font_Int *fi; }; struct _RGBA_Gfx_Compositor { const char *name; void (*init)(void); void (*shutdown)(void); RGBA_Gfx_Func (*composite_pixel_span_get)(RGBA_Image *src, RGBA_Image *dst, int pixels); RGBA_Gfx_Func (*composite_color_span_get)(DATA32 col, RGBA_Image *dst, int pixels); RGBA_Gfx_Func (*composite_pixel_color_span_get)(RGBA_Image *src, DATA32 col, RGBA_Image *dst, int pixels); RGBA_Gfx_Func (*composite_mask_color_span_get)(DATA32 col, RGBA_Image *dst, int pixels); RGBA_Gfx_Func (*composite_pixel_mask_span_get)(RGBA_Image *src, RGBA_Image *dst, int pixels); RGBA_Gfx_Pt_Func (*composite_pixel_pt_get)(Image_Entry_Flags src_flags, RGBA_Image *dst); RGBA_Gfx_Pt_Func (*composite_color_pt_get)(DATA32 col, RGBA_Image *dst); RGBA_Gfx_Pt_Func (*composite_pixel_color_pt_get)(Image_Entry_Flags src_flags, DATA32 col, RGBA_Image *dst); RGBA_Gfx_Pt_Func (*composite_mask_color_pt_get)(DATA32 col, RGBA_Image *dst); RGBA_Gfx_Pt_Func (*composite_pixel_mask_pt_get)(Image_Entry_Flags src_flags, RGBA_Image *dst); }; #define EVAS_RECT_SPLIT 1 #ifdef EVAS_RECT_SPLIT typedef struct list_node list_node_t; typedef struct list list_t; typedef struct rect rect_t; typedef struct rect_node rect_node_t; struct list_node { struct list_node *next; }; struct list { struct list_node *head; struct list_node *tail; }; struct rect { int left; int top; int right; int bottom; int width; int height; int area; }; struct rect_node { struct list_node _lst; struct rect rect; }; #endif /* EVAS_RECT_SPLIT */ struct _Tilebuf { int outbuf_w; int outbuf_h; struct { int w, h; } tile_size; struct { int x, y, w, h; } prev_add, prev_del; #ifdef RECTUPDATE /* Regionbuf *rb; */ #elif defined(EVAS_RECT_SPLIT) int need_merge; list_t rects; #else /* struct { int w, h; Tilebuf_Tile *tiles; } tiles; */ #endif }; struct _Tilebuf_Tile { Eina_Bool redraw : 1; /* FIXME: need these flags later - but not now */ /* Eina_Bool done : 1; Eina_Bool edge : 1; Eina_Bool from : 1; struct { int dx, dy; } vector; */ }; struct _Tilebuf_Rect { EINA_INLIST; int x, y, w, h; }; /* struct _Regionbuf { int w, h; Regionspan **spans; }; struct _Regionspan { EINA_INLIST; int x1, x2; }; */ struct _Convert_Pal { int references; int count; Convert_Pal_Mode colors; DATA8 *lookup; void *data; }; /****/ /*****************************************************************************/ #include "evas_macros.h" #ifndef WORDS_BIGENDIAN /* x86 */ #define A_VAL(p) (((DATA8 *)(p))[3]) #define R_VAL(p) (((DATA8 *)(p))[2]) #define G_VAL(p) (((DATA8 *)(p))[1]) #define B_VAL(p) (((DATA8 *)(p))[0]) #define AR_VAL(p) ((DATA16 *)(p)[1]) #define GB_VAL(p) ((DATA16 *)(p)[0]) #else /* ppc */ #define A_VAL(p) (((DATA8 *)(p))[0]) #define R_VAL(p) (((DATA8 *)(p))[1]) #define G_VAL(p) (((DATA8 *)(p))[2]) #define B_VAL(p) (((DATA8 *)(p))[3]) #define AR_VAL(p) ((DATA16 *)(p)[0]) #define GB_VAL(p) ((DATA16 *)(p)[1]) #endif #define RGB_JOIN(r,g,b) \ (((r) << 16) + ((g) << 8) + (b)) #define ARGB_JOIN(a,r,g,b) \ (((a) << 24) + ((r) << 16) + ((g) << 8) + (b)) #include "evas_blend_ops.h" #define _EVAS_RENDER_FILL -1 #define _EVAS_RENDER_BLEND 0 #define _EVAS_RENDER_BLEND_REL 1 #define _EVAS_RENDER_COPY 2 #define _EVAS_RENDER_COPY_REL 3 #define _EVAS_RENDER_ADD 4 #define _EVAS_RENDER_ADD_REL 5 #define _EVAS_RENDER_SUB 6 #define _EVAS_RENDER_SUB_REL 7 #define _EVAS_RENDER_TINT 8 #define _EVAS_RENDER_TINT_REL 9 #define _EVAS_RENDER_MASK 10 #define _EVAS_RENDER_MUL 11 #define _EVAS_RENDER_CLIP 12 #define _EVAS_TEXTURE_REFLECT 0 #define _EVAS_TEXTURE_REPEAT 1 #define _EVAS_TEXTURE_RESTRICT 2 #define _EVAS_TEXTURE_RESTRICT_REFLECT 3 #define _EVAS_TEXTURE_RESTRICT_REPEAT 4 #define _EVAS_TEXTURE_PAD 5 #define _EVAS_COLOR_SPACE_ARGB 0 #define _EVAS_COLOR_SPACE_AHSV 1 /*****************************************************************************/ #define SCALE_SIZE_MAX ((1 << 15) - 1) #ifdef __cplusplus extern "C" { #endif /****/ void evas_common_init (void); void evas_common_shutdown (void); EAPI void evas_common_cpu_init (void); int evas_common_cpu_have_cpuid (void); int evas_common_cpu_has_feature (unsigned int feature); EAPI void evas_common_cpu_can_do (int *mmx, int *sse, int *sse2); EAPI void evas_common_cpu_end_opt (void); /****/ #include "../engines/common/evas_blend.h" EAPI Gfx_Func_Copy evas_common_draw_func_copy_get (int pixels, int reverse); /****/ #include "../engines/common/evas_convert_color.h" #include "../engines/common/evas_convert_colorspace.h" #include "../engines/common/evas_convert_main.h" #include "../engines/common/evas_convert_yuv.h" #include "../engines/common/evas_scale_main.h" #include "../engines/common/evas_scale_smooth.h" #include "../engines/common/evas_scale_span.h" /****/ #include "../engines/common/evas_image.h" /****/ #include "../engines/common/evas_line.h" #include "../engines/common/evas_polygon.h" #include "../engines/common/evas_rectangle.h" /****/ EAPI void evas_common_blit_init (void); EAPI 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); /****/ #include "../engines/common/evas_font.h" /****/ EAPI void evas_common_tilebuf_init (void); EAPI Tilebuf *evas_common_tilebuf_new (int w, int h); EAPI void evas_common_tilebuf_free (Tilebuf *tb); EAPI void evas_common_tilebuf_set_tile_size (Tilebuf *tb, int tw, int th); EAPI void evas_common_tilebuf_get_tile_size (Tilebuf *tb, int *tw, int *th); EAPI int evas_common_tilebuf_add_redraw (Tilebuf *tb, int x, int y, int w, int h); EAPI int evas_common_tilebuf_del_redraw (Tilebuf *tb, int x, int y, int w, int h); EAPI int evas_common_tilebuf_add_motion_vector (Tilebuf *tb, int x, int y, int w, int h, int dx, int dy, int alpha); EAPI void evas_common_tilebuf_clear (Tilebuf *tb); EAPI Tilebuf_Rect *evas_common_tilebuf_get_render_rects (Tilebuf *tb); EAPI void evas_common_tilebuf_free_render_rects (Tilebuf_Rect *rects); /* Regionbuf *evas_common_regionbuf_new (int w, int h); void evas_common_regionbuf_free (Regionbuf *rb); void evas_common_regionbuf_clear (Regionbuf *rb); void evas_common_regionbuf_span_add (Regionbuf *rb, int x1, int x2, int y); void evas_common_regionbuf_span_del (Regionbuf *rb, int x1, int x2, int y); Tilebuf_Rect *evas_common_regionbuf_rects_get (Regionbuf *rb); */ /****/ #include "../engines/common/evas_draw.h" #include "../engines/common/evas_map_image.h" /****/ #include "../engines/common/evas_pipe.h" void evas_font_dir_cache_free(void); /****/ /*****************************************************************************/ #ifdef __cplusplus } #endif #endif evas-1.7.9/src/lib/include/evas_blend_ops.h0000664000175000017500000002173312175475547015554 00000000000000#ifndef EVAS_BLEND_OPS_H #define EVAS_BLEND_OPS_H #if defined BUILD_MMX || defined BUILD_SSE #include "evas_mmx.h" #endif #include "config.h" #ifdef NEED_SSE3 # if defined BUILD_SSE3 # include # endif #endif /* src pixel flags: */ /* pixels none */ #define SP_N 0 /* pixels (argb default) */ #define SP 1 /* pixels are rgb (ie. alphas == 255) */ #define SP_AN 2 /* pixels alpha are sparse */ #define SP_AS 3 /* src pixels flags count */ #define SP_LAST 4 /* src mask flags: */ /* mask none */ #define SM_N 0 /* mask (alpha) */ #define SM 1 /* mask alphas are 'trivial - ie. only 0 or 255 */ #define SM_AT 2 /* mask alphas are sparse */ #define SM_AS 3 /* src mask flags count */ #define SM_LAST 4 /* src color flags: */ /* color is 0xffffffff */ #define SC_N 0 /* color (argb default) */ #define SC 1 /* color is rgb (ie. 0xffrrggbb) */ #define SC_AN 2 /* color is 'alpha' (ie. 0xaaaaaaaa) */ #define SC_AA 3 /* src color flags count */ #define SC_LAST 4 /* dst pixels flags: */ /* pixels (argb default) */ #define DP 0 /* pixels are rgb (ie. alphas == 255) */ #define DP_AN 1 /* dst pixels flags count */ #define DP_LAST 2 /* cpu types flags */ /* none, bad news */ #define CPU_N 0 /* cpu C */ #define CPU_C 1 /* cpu MMX */ #define CPU_MMX 2 /* cpu SSE */ #define CPU_SSE 3 /* cpu SSE2 */ #define CPU_SSE2 4 /* cpu flags count */ #define CPU_NEON 5 /* CPU SSE3 */ #define CPU_SSE3 6 /* cpu flags count */ #define CPU_LAST 7 /* some useful constants */ extern const DATA32 ALPHA_255; extern const DATA32 ALPHA_256; /* some useful C macros */ #define MUL4_256(a, r, g, b, c) \ ( (((((c) >> 8) & 0xff0000) * (a)) & 0xff000000) + \ (((((c) & 0xff0000) * (r)) >> 8) & 0xff0000) + \ (((((c) & 0xff00) * (g)) >> 8) & 0xff00) + \ ((((c) & 0xff) * (b)) >> 8) ) #define MUL3_256(r, g, b, c) \ ( (((((c) & 0xff0000) * (r)) >> 8) & 0xff0000) + \ (((((c) & 0xff00) * (g)) >> 8) & 0xff00) + \ ((((c) & 0xff) * (b)) >> 8) ) #define MUL_256(a, c) \ ( (((((c) >> 8) & 0x00ff00ff) * (a)) & 0xff00ff00) + \ (((((c) & 0x00ff00ff) * (a)) >> 8) & 0x00ff00ff) ) #define MUL4_SYM(x, y) \ ( ((((((x) >> 16) & 0xff00) * (((y) >> 16) & 0xff00)) + 0xff0000) & 0xff000000) + \ ((((((x) >> 8) & 0xff00) * (((y) >> 16) & 0xff)) + 0xff00) & 0xff0000) + \ ((((((x) & 0xff00) * ((y) & 0xff00)) + 0xff00) >> 16) & 0xff00) + \ (((((x) & 0xff) * ((y) & 0xff)) + 0xff) >> 8) ) #define MUL3_SYM(x, y) \ ( ((((((x) >> 8) & 0xff00) * (((y) >> 16) & 0xff)) + 0xff00) & 0xff0000) + \ ((((((x) & 0xff00) * ((y) & 0xff00)) + 0xff00) >> 16) & 0xff00) + \ (((((x) & 0xff) * ((y) & 0xff)) + 0xff) >> 8) ) #define MUL_SYM(a, x) \ ( (((((x) >> 8) & 0x00ff00ff) * (a) + 0xff00ff) & 0xff00ff00) + \ (((((x) & 0x00ff00ff) * (a) + 0xff00ff) >> 8) & 0x00ff00ff) ) #define MUL_A_256(a, c) \ ( ((((c) >> 8) & 0x00ff0000) * (a)) & 0xff000000 ) #define MUL_A_SYM(a, c) \ ( (((((c) >> 8) & 0x00ff0000) * (a)) + 0x00ff0000) & 0xff000000 ) #define INTERP_256(a, c0, c1) \ ( (((((((c0) >> 8) & 0xff00ff) - (((c1) >> 8) & 0xff00ff)) * (a)) \ + ((c1) & 0xff00ff00)) & 0xff00ff00) + \ (((((((c0) & 0xff00ff) - ((c1) & 0xff00ff)) * (a)) >> 8) \ + ((c1) & 0xff00ff)) & 0xff00ff) ) #define INTERP_RGB_256(a, c0, c1) \ ( (((((((c0) >> 8) & 0xff) - (((c1) >> 8) & 0xff)) * (a)) \ + ((c1) & 0xff00)) & 0xff00) + \ (((((((c0) & 0xff00ff) - ((c1) & 0xff00ff)) * (a)) >> 8) \ + ((c1) & 0xff00ff)) & 0xff00ff) ) #define INTERP_A_256(a, c0, c1) \ ( (((((((c0) >> 8) & 0xff0000) - (((c1) >> 8) & 0xff0000)) * (a)) \ + ((c1) & 0xff000000)) & 0xff000000) ) /* some useful MMX macros */ #ifdef BUILD_MMX #define MOV_A2R(a, mma) \ movd_m2r(a, mma); \ punpcklwd_r2r(mma, mma); \ punpckldq_r2r(mma, mma); #define MOV_P2R(c, mmc, mmz) \ movd_m2r(c, mmc); \ punpcklbw_r2r(mmz, mmc); #define MOV_R2P(mmc, c, mmz) \ packuswb_r2r(mmz, mmc); \ movd_r2m(mmc, c); #define MUL4_256_R2R(mmx, mmy) \ pmullw_r2r(mmx, mmy); \ psrlw_i2r(8, mmy); #define MUL4_SYM_R2R(mmx, mmy, mm255) \ pmullw_r2r(mmx, mmy); \ paddw_r2r(mm255, mmy); \ psrlw_i2r(8, mmy); #define MOV_RA2R(mmx, mma) \ movq_r2r(mmx, mma); \ punpckhwd_r2r(mma, mma); \ punpckhdq_r2r(mma, mma); #define MOV_PA2R(c, mma) \ movd_m2r(c, mma); \ punpcklbw_r2r(mma, mma); \ punpckhwd_r2r(mma, mma); \ punpckhdq_r2r(mma, mma); #define INTERP_256_R2R(mma, mmx, mmy, mm255) \ psubw_r2r(mmy, mmx); \ pmullw_r2r(mma, mmx); \ psrlw_i2r(8, mmx); \ paddw_r2r(mmx, mmy); \ pand_r2r(mm255, mmy); #endif /* some useful SSE3 inline functions */ #ifdef NEED_SSE3 #ifdef BUILD_SSE3 static __m128i GA_MASK_SSE3; static __m128i RB_MASK_SSE3; static __m128i SYM4_MASK_SSE3; static __m128i RGB_MASK_SSE3; //static __m128i A_MASK_SSE3; static __m128i ALPHA_SSE3; static EFL_ALWAYS_INLINE __m128i mul_256_sse3(__m128i a, __m128i c) { /* prepare alpha for word multiplication */ __m128i a_l = a; __m128i a_h = a; a_l = _mm_unpacklo_epi16(a_l, a_l); a_h = _mm_unpackhi_epi16(a_h, a_h); __m128i a0 = (__m128i) _mm_shuffle_ps( (__m128)a_l, (__m128)a_h, 0x88); /* first half of calc */ __m128i c0 = c; c0 = _mm_srli_epi32(c0, 8); c0 = _mm_and_si128(GA_MASK_SSE3, c0); c0 = _mm_mullo_epi16(a0, c0); c0 = _mm_and_si128(RB_MASK_SSE3, c0); /* second half of calc */ __m128i c1 = c; c1 = _mm_and_si128(GA_MASK_SSE3, c1); c1 = _mm_mullo_epi16(a0, c1); c1 = _mm_srli_epi32(c1, 8); c1 = _mm_and_si128(GA_MASK_SSE3, c1); /* combine */ return _mm_add_epi32(c0, c1); } static EFL_ALWAYS_INLINE __m128i sub4_alpha_sse3(__m128i c) { __m128i c0 = c; c0 = _mm_srli_epi32(c0, 24); return _mm_sub_epi32(ALPHA_SSE3, c0); } static EFL_ALWAYS_INLINE __m128i interp4_256_sse3(__m128i a, __m128i c0, __m128i c1) { const __m128i zero = _mm_setzero_si128(); __m128i a_l = a; __m128i a_h = a; a_l = _mm_unpacklo_epi16(a_l, a_l); a_h = _mm_unpackhi_epi16(a_h, a_h); __m128i a_t = _mm_slli_epi64(a_l, 32); __m128i a_t0 = _mm_slli_epi64(a_h, 32); a_l = _mm_add_epi32(a_l, a_t); a_h = _mm_add_epi32(a_h, a_t0); __m128i c0_l = c0; __m128i c0_h = c0; c0_l = _mm_unpacklo_epi8(c0_l, zero); c0_h = _mm_unpackhi_epi8(c0_h, zero); __m128i c1_l = c1; __m128i c1_h = c1; c1_l = _mm_unpacklo_epi8(c1_l, zero); c1_h = _mm_unpackhi_epi8(c1_h, zero); __m128i cl_sub = _mm_sub_epi16(c0_l, c1_l); __m128i ch_sub = _mm_sub_epi16(c0_h, c1_h); cl_sub = _mm_mullo_epi16(cl_sub, a_l); ch_sub = _mm_mullo_epi16(ch_sub, a_h); __m128i c1ls = _mm_slli_epi16(c1_l, 8); __m128i c1hs = _mm_slli_epi16(c1_h, 8); cl_sub = _mm_add_epi16(cl_sub, c1ls); ch_sub = _mm_add_epi16(ch_sub, c1hs); cl_sub = _mm_and_si128(cl_sub, RB_MASK_SSE3); ch_sub = _mm_and_si128(ch_sub, RB_MASK_SSE3); cl_sub = _mm_srli_epi64(cl_sub, 8); ch_sub = _mm_srli_epi64(ch_sub, 8); cl_sub = _mm_packus_epi16(cl_sub, cl_sub); ch_sub = _mm_packus_epi16(ch_sub, ch_sub); return (__m128i) _mm_shuffle_ps( (__m128)cl_sub, (__m128)ch_sub, 0x44); } static EFL_ALWAYS_INLINE __m128i mul_sym_sse3(__m128i a, __m128i c) { /* Prepare alpha for word mult */ __m128i a_l = a; __m128i a_h = a; a_l = _mm_unpacklo_epi16(a_l, a_l); a_h = _mm_unpackhi_epi16(a_h, a_h); __m128i a0 = (__m128i) _mm_shuffle_ps( (__m128)a_l, (__m128)a_h, 0x88); /* first part */ __m128i c0 = c; c0 = _mm_srli_epi32(c0, 8); c0 = _mm_and_si128(GA_MASK_SSE3, c0); c0 = _mm_mullo_epi16(a0, c0); c0 = _mm_add_epi32(c0, GA_MASK_SSE3); c0 = _mm_and_si128(RB_MASK_SSE3, c0); /* second part */ __m128i c1 = c; c1 = _mm_and_si128(GA_MASK_SSE3, c1); c1 = _mm_mullo_epi16(a0, c1); c1 = _mm_add_epi32(c1, GA_MASK_SSE3); c1 = _mm_srli_epi32(c1, 8); c1 = _mm_and_si128(GA_MASK_SSE3, c1); return _mm_add_epi32(c0, c1); } static EFL_ALWAYS_INLINE __m128i mul4_sym_sse3(__m128i x, __m128i y) { const __m128i zero = _mm_setzero_si128(); __m128i x_l = _mm_unpacklo_epi8(x, zero); __m128i x_h = _mm_unpackhi_epi8(x, zero); __m128i y_l = _mm_unpacklo_epi8(y, zero); __m128i y_h = _mm_unpackhi_epi8(y, zero); __m128i r_l = _mm_mullo_epi16(x_l, y_l); __m128i r_h = _mm_mullo_epi16(x_h, y_h); r_l = _mm_add_epi16(r_l, SYM4_MASK_SSE3); r_h = _mm_add_epi16(r_h, SYM4_MASK_SSE3); r_l = _mm_srli_epi16(r_l, 8); r_h = _mm_srli_epi16(r_h, 8); return _mm_packus_epi16(r_l, r_h); } static EFL_ALWAYS_INLINE __m128i mul3_sym_sse3(__m128i x, __m128i y) { __m128i res = mul4_sym_sse3(x, y); return _mm_and_si128(res, RGB_MASK_SSE3); } #define LOOP_ALIGNED_U1_A48_SSE3(DEST, LENGTH, UOP, A4OP, A8OP) \ { \ while((uintptr_t)DEST & 0xF && LENGTH) UOP \ \ while(LENGTH) { \ switch(LENGTH) { \ case 3: UOP \ case 2: UOP \ case 1: UOP \ break; \ case 7: \ case 6: \ case 5: \ case 4: \ A4OP \ break; \ default: \ A8OP \ break; \ } \ } \ } #endif #endif #endif evas-1.7.9/src/lib/include/Makefile.am0000664000175000017500000000032112175475547014442 00000000000000 MAINTAINERCLEANFILES = Makefile.in EXTRA_DIST = \ evas_inline.x \ evas_private.h \ evas_options.h \ evas_macros.h \ evas_mmx.h \ evas_common.h \ evas_common_soft8.h \ evas_common_soft16.h \ evas_blend_ops.h evas-1.7.9/src/lib/include/evas_common_soft16.h0000664000175000017500000000766612175475547016312 00000000000000#ifndef EVAS_COMMON_SOFT16_H #define EVAS_COMMON_SOFT16_H #include "evas_common.h" #include "evas_private.h" #ifdef __cplusplus extern "C" { #endif #define RGB_565_UNPACKED_MASK 0x07e0f81f #define RGB_565_UNPACK(rgb) \ (((rgb) | ((rgb) << 16)) & RGB_565_UNPACKED_MASK) #define RGB_565_PACK(rgb) \ ((((rgb) & RGB_565_UNPACKED_MASK) | \ ((rgb) & RGB_565_UNPACKED_MASK) >> 16) & 0xffff) #define RGB_565_UNPACKED_BLEND(a, b, alpha) \ ((b) + (a) - ((((b) * (alpha)) >> 5) & RGB_565_UNPACKED_MASK)) #define RGB_565_UNPACKED_BLEND_UNMUL(a, b, alpha) \ ((b) + ((((a) - (b)) * (alpha)) >> 5)) #define RGB_565_FROM_COMPONENTS(r, g, b) \ (((((r) >> 3) & 0x1f) << 11) | \ ((((g) >> 2) & 0x3f) << 5) | \ (((b) >> 3) & 0x1f)) static inline unsigned int _calc_stride(unsigned int w) { unsigned int pad = w % 4; if (!pad) return w; else return w + 4 - pad; } #define IMG_BYTE_SIZE(stride, height, has_alpha) \ ((stride) * (height) * (!(has_alpha) ? 2 : 3)) typedef struct _Soft16_Image Soft16_Image; struct _Soft16_Image { Image_Entry cache_entry; RGBA_Image *source; int stride; // pixel stride - likely a multiple of 2 DATA16 *pixels; // 16bpp pixels rgb565 DATA8 *alpha; // 8bit alpha mask - optional. points into pixels struct { /* unsigned char have_alpha : 1; // 1 if we have halpha */ unsigned char free_pixels : 1; // 1 if pixels should be freed unsigned char free_alpha : 1; // 1 if alpha mask should be freed } flags; }; /** * Image (evas_soft16_main.c) */ EAPI void evas_common_soft16_image_init(void); EAPI void evas_common_soft16_image_shutdown(void); EAPI Evas_Cache_Image *evas_common_soft16_image_cache_get(void); EAPI 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); EAPI Soft16_Image *evas_common_soft16_image_alpha_set(Soft16_Image *im, int have_alpha); void 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); void 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); /* convert/dither functions */ void evas_common_soft16_image_convert_from_rgb(Soft16_Image *im, const DATA32 *src); void evas_common_soft16_image_convert_from_rgba(Soft16_Image *im, const DATA32 *src); /** * Rectangle (evas_soft16_rectangle.c) */ EAPI void evas_common_soft16_rectangle_draw(Soft16_Image *dst, RGBA_Draw_Context *dc, int x, int y, int w, int h); /** * Polygon (evas_soft16_polygon.c) */ EAPI void evas_common_soft16_polygon_draw(Soft16_Image *dst, RGBA_Draw_Context *dc, RGBA_Polygon_Point *points, int x, int y); /** * Line (evas_soft16_line.c) */ EAPI void evas_common_soft16_line_draw(Soft16_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, int x1, int y1); /** * Font (evas_soft16_font.c) */ EAPI void *evas_common_soft16_font_glyph_new(void *data, RGBA_Font_Glyph *fg); EAPI void evas_common_soft16_font_glyph_free(void *ext_dat); EAPI void evas_common_soft16_font_glyph_draw(void *data, void *dest, void *context, RGBA_Font_Glyph *fg, int x, int y); #ifdef __cplusplus } #endif #endif evas-1.7.9/src/lib/file/0000775000175000017500000000000012234557316011755 500000000000000evas-1.7.9/src/lib/file/Makefile.in0000664000175000017500000006160512234557302013745 00000000000000# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/lib/file DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/efl_attribute.m4 \ $(top_srcdir)/m4/efl_coverage.m4 \ $(top_srcdir)/m4/efl_doxygen.m4 \ $(top_srcdir)/m4/efl_fnmatch.m4 \ $(top_srcdir)/m4/efl_path_max.m4 \ $(top_srcdir)/m4/efl_shm_open.m4 $(top_srcdir)/m4/efl_tests.m4 \ $(top_srcdir)/m4/evas_check_engine.m4 \ $(top_srcdir)/m4/evas_check_loader.m4 \ $(top_srcdir)/m4/evas_converter.m4 \ $(top_srcdir)/m4/evas_dither.m4 \ $(top_srcdir)/m4/evas_scaler.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libevas_file_la_DEPENDENCIES = am_libevas_file_la_OBJECTS = evas_path.lo evas_module.lo libevas_file_la_OBJECTS = $(am_libevas_file_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libevas_file_la_SOURCES) DIST_SOURCES = $(libevas_file_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHECK_CFLAGS = @CHECK_CFLAGS@ CHECK_LIBS = @CHECK_LIBS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@ DIRECTFB_LIBS = @DIRECTFB_LIBS@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ ECORE_EVAS_CFLAGS = @ECORE_EVAS_CFLAGS@ ECORE_EVAS_LIBS = @ECORE_EVAS_LIBS@ EDB_CFLAGS = @EDB_CFLAGS@ EDB_LIBS = @EDB_LIBS@ EDJE_CFLAGS = @EDJE_CFLAGS@ EDJE_LIBS = @EDJE_LIBS@ EET_CFLAGS = @EET_CFLAGS@ EET_LIBS = @EET_LIBS@ EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@ EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@ EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@ EFL_SHM_OPEN_LIBS = @EFL_SHM_OPEN_LIBS@ EGREP = @EGREP@ EINA_CFLAGS = @EINA_CFLAGS@ EINA_LIBS = @EINA_LIBS@ EVAS_CFLAGS = @EVAS_CFLAGS@ EVAS_GENERAL_CFLAGS = @EVAS_GENERAL_CFLAGS@ EVAS_GENERAL_LIBS = @EVAS_GENERAL_LIBS@ EVAS_LIBS = @EVAS_LIBS@ EVAS_SSE3_CFLAGS = @EVAS_SSE3_CFLAGS@ EVIL_CFLAGS = @EVIL_CFLAGS@ EVIL_LIBS = @EVIL_LIBS@ EXEEXT = @EXEEXT@ EXOTIC_CFLAGS = @EXOTIC_CFLAGS@ EXOTIC_LIBS = @EXOTIC_LIBS@ FGREP = @FGREP@ FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@ FONTCONFIG_LIBS = @FONTCONFIG_LIBS@ FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ FREETYPE_LIBS = @FREETYPE_LIBS@ FRIBIDI_CFLAGS = @FRIBIDI_CFLAGS@ FRIBIDI_LIBS = @FRIBIDI_LIBS@ GL_EET_CFLAGS = @GL_EET_CFLAGS@ GL_EET_LIBS = @GL_EET_LIBS@ GREP = @GREP@ HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@ HARFBUZZ_LIBS = @HARFBUZZ_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LINEBREAK_CFLAGS = @LINEBREAK_CFLAGS@ LINEBREAK_LIBS = @LINEBREAK_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MODULE_ARCH = @MODULE_ARCH@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ SDL_CFLAGS = @SDL_CFLAGS@ SDL_LIBS = @SDL_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ SVG_CFLAGS = @SVG_CFLAGS@ SVG_LIBS = @SVG_LIBS@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ XCB_CFLAGS = @XCB_CFLAGS@ XCB_GL_CFLAGS = @XCB_GL_CFLAGS@ XCB_GL_LIBS = @XCB_GL_LIBS@ XCB_LIBS = @XCB_LIBS@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_ct_OBJC = @ac_ct_OBJC@ altivec_cflags = @altivec_cflags@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ dlopen_libs = @dlopen_libs@ docdir = @docdir@ dvidir = @dvidir@ edje_cc = @edje_cc@ efl_doxygen = @efl_doxygen@ efl_have_doxygen = @efl_have_doxygen@ evas_engine_buffer_cflags = @evas_engine_buffer_cflags@ evas_engine_buffer_libs = @evas_engine_buffer_libs@ evas_engine_direct3d_cflags = @evas_engine_direct3d_cflags@ evas_engine_direct3d_libs = @evas_engine_direct3d_libs@ evas_engine_directfb_cflags = @evas_engine_directfb_cflags@ evas_engine_directfb_libs = @evas_engine_directfb_libs@ evas_engine_fb_cflags = @evas_engine_fb_cflags@ evas_engine_fb_libs = @evas_engine_fb_libs@ evas_engine_gl_cocoa_cflags = @evas_engine_gl_cocoa_cflags@ evas_engine_gl_cocoa_libs = @evas_engine_gl_cocoa_libs@ evas_engine_gl_common_libs = @evas_engine_gl_common_libs@ evas_engine_gl_sdl_cflags = @evas_engine_gl_sdl_cflags@ evas_engine_gl_sdl_libs = @evas_engine_gl_sdl_libs@ evas_engine_gl_xcb_cflags = @evas_engine_gl_xcb_cflags@ evas_engine_gl_xcb_libs = @evas_engine_gl_xcb_libs@ evas_engine_gl_xlib_cflags = @evas_engine_gl_xlib_cflags@ evas_engine_gl_xlib_libs = @evas_engine_gl_xlib_libs@ evas_engine_psl1ght_cflags = @evas_engine_psl1ght_cflags@ evas_engine_psl1ght_libs = @evas_engine_psl1ght_libs@ evas_engine_software_16_sdl_cflags = @evas_engine_software_16_sdl_cflags@ evas_engine_software_16_sdl_libs = @evas_engine_software_16_sdl_libs@ evas_engine_software_16_wince_cflags = @evas_engine_software_16_wince_cflags@ evas_engine_software_16_wince_libs = @evas_engine_software_16_wince_libs@ evas_engine_software_16_x11_cflags = @evas_engine_software_16_x11_cflags@ evas_engine_software_16_x11_libs = @evas_engine_software_16_x11_libs@ evas_engine_software_8_x11_cflags = @evas_engine_software_8_x11_cflags@ evas_engine_software_8_x11_libs = @evas_engine_software_8_x11_libs@ evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@ evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@ evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@ evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ evas_image_loader_edb_libs = @evas_image_loader_edb_libs@ evas_image_loader_eet_cflags = @evas_image_loader_eet_cflags@ evas_image_loader_eet_libs = @evas_image_loader_eet_libs@ evas_image_loader_generic_cflags = @evas_image_loader_generic_cflags@ evas_image_loader_generic_libs = @evas_image_loader_generic_libs@ evas_image_loader_gif_cflags = @evas_image_loader_gif_cflags@ evas_image_loader_gif_libs = @evas_image_loader_gif_libs@ evas_image_loader_ico_cflags = @evas_image_loader_ico_cflags@ evas_image_loader_ico_libs = @evas_image_loader_ico_libs@ evas_image_loader_jpeg_cflags = @evas_image_loader_jpeg_cflags@ evas_image_loader_jpeg_libs = @evas_image_loader_jpeg_libs@ evas_image_loader_pmaps_cflags = @evas_image_loader_pmaps_cflags@ evas_image_loader_pmaps_libs = @evas_image_loader_pmaps_libs@ evas_image_loader_png_cflags = @evas_image_loader_png_cflags@ evas_image_loader_png_libs = @evas_image_loader_png_libs@ evas_image_loader_psd_cflags = @evas_image_loader_psd_cflags@ evas_image_loader_psd_libs = @evas_image_loader_psd_libs@ evas_image_loader_svg_cflags = @evas_image_loader_svg_cflags@ evas_image_loader_svg_libs = @evas_image_loader_svg_libs@ evas_image_loader_tga_cflags = @evas_image_loader_tga_cflags@ evas_image_loader_tga_libs = @evas_image_loader_tga_libs@ evas_image_loader_tiff_cflags = @evas_image_loader_tiff_cflags@ evas_image_loader_tiff_libs = @evas_image_loader_tiff_libs@ evas_image_loader_wbmp_cflags = @evas_image_loader_wbmp_cflags@ evas_image_loader_wbmp_libs = @evas_image_loader_wbmp_libs@ evas_image_loader_xpm_cflags = @evas_image_loader_xpm_cflags@ evas_image_loader_xpm_libs = @evas_image_loader_xpm_libs@ exec_prefix = @exec_prefix@ have_evas_engine_gl_x11 = @have_evas_engine_gl_x11@ have_evas_engine_gl_xcb = @have_evas_engine_gl_xcb@ have_evas_engine_gl_xlib = @have_evas_engine_gl_xlib@ have_evas_engine_software_x11 = @have_evas_engine_software_x11@ have_evas_engine_software_xcb = @have_evas_engine_software_xcb@ have_evas_engine_software_xlib = @have_evas_engine_software_xlib@ have_lcov = @have_lcov@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_enable_auto_import = @lt_enable_auto_import@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgconfig_requires_private = @pkgconfig_requires_private@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pthread_cflags = @pthread_cflags@ pthread_libs = @pthread_libs@ release_info = @release_info@ requirement_evas = @requirement_evas@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ shm_open_libs = @shm_open_libs@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ version_info = @version_info@ MAINTAINERCLEANFILES = Makefile.in AM_CPPFLAGS = \ -I. \ -I$(top_srcdir)/src/lib \ -I$(top_srcdir)/src/lib/include \ -DPACKAGE_BIN_DIR=\"$(bindir)\" \ -DPACKAGE_LIB_DIR=\"$(libdir)\" \ -DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \ @FREETYPE_CFLAGS@ \ @EVAS_GENERAL_CFLAGS@ \ @EVIL_CFLAGS@ \ @FRIBIDI_CFLAGS@ \ @PIXMAN_CFLAGS@ noinst_LTLIBRARIES = libevas_file.la libevas_file_la_SOURCES = \ evas_path.c \ evas_module.c \ evas_module.h \ evas_path.h libevas_file_la_LIBADD = @EVAS_GENERAL_LIBS@ @EVIL_LIBS@ all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/lib/file/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/lib/file/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libevas_file.la: $(libevas_file_la_OBJECTS) $(libevas_file_la_DEPENDENCIES) $(EXTRA_libevas_file_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libevas_file_la_OBJECTS) $(libevas_file_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_module.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_path.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES cscopelist-am ctags \ ctags-am distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: evas-1.7.9/src/lib/file/evas_path.h0000664000175000017500000000111612175475547014030 00000000000000#ifndef _EVAS_PATH_H #define _EVAS_PATH_H int evas_file_path_is_full_path (const char *path); char *evas_file_path_join (const char *path, const char *end); int evas_file_path_exists (const char *path); int evas_file_path_is_file (const char *path); int evas_file_path_is_dir (const char *path); Eina_List *evas_file_path_list (char *path, const char *match, int match_case); DATA64 evas_file_modified_time (const char *file); char *evas_file_path_resolve (const char *file); #endif /* _EVAS_PATH_H */ evas-1.7.9/src/lib/file/evas_path.c0000664000175000017500000000601212175475547014023 00000000000000/* os dependent file code. for unix-y like fs's only for now */ /* if your os doesn't use unix-like fs starting with "/" for the root and */ /* the file path separator isn't "/" then you may need to help out by */ /* adding in a new set of functions here */ #ifdef HAVE_CONFIG_H # include #endif #include #include #include #include /* get the casefold feature! */ #include #ifndef _MSC_VER # include # include #endif #ifdef HAVE_EVIL # include #endif #include "evas_common.h" #include "evas_private.h" #ifdef _WIN32 # define EVAS_PATH_SEPARATOR "\\" #else # define EVAS_PATH_SEPARATOR "/" #endif int evas_file_path_is_full_path(const char *path) { if (!path) return 0; #if defined _WIN32_WCE if (path[0] == '\\') return 1; #elif defined _WIN32 if (evil_path_is_absolute(path)) return 1; #else if (path[0] == '/') return 1; #endif return 0; } char * evas_file_path_join(const char *path, const char *end) { char *res = NULL; size_t len; if ((!path) && (!end)) return NULL; if (!path) return strdup(end); if (!end) return strdup(path); len = strlen(path); len += strlen(end); len += strlen(EVAS_PATH_SEPARATOR); res = malloc(len + 1); if (!res) return NULL; strcpy(res, path); strcat(res, EVAS_PATH_SEPARATOR); strcat(res, end); return res; } int evas_file_path_exists(const char *path) { struct stat st; if (!stat(path, &st)) return 1; return 0; } int evas_file_path_is_file(const char *path) { struct stat st; if (stat(path, &st) == -1) return 0; if (S_ISREG(st.st_mode)) return 1; return 0; } int evas_file_path_is_dir(const char *path) { struct stat st; if (stat(path, &st) == -1) return 0; if (S_ISDIR(st.st_mode)) return 1; return 0; } Eina_List * evas_file_path_list(char *path, const char *match, int match_case) { Eina_File_Direct_Info *info; Eina_Iterator *it; Eina_List *files = NULL; int flags; flags = FNM_PATHNAME; #ifdef FNM_CASEFOLD if (!match_case) flags |= FNM_CASEFOLD; #else /*#warning "Your libc does not provide case-insensitive matching!"*/ #endif it = eina_file_direct_ls(path); EINA_ITERATOR_FOREACH(it, info) { if (match) { if (fnmatch(match, info->path + info->name_start, flags) == 0) files = eina_list_append(files, strdup(info->path + info->name_start)); } else files = eina_list_append(files, strdup(info->path + info->name_start)); } if (it) eina_iterator_free(it); return files; } DATA64 evas_file_modified_time(const char *file) { struct stat st; if (stat(file, &st) < 0) return 0; if (st.st_ctime > st.st_mtime) return (DATA64)st.st_ctime; else return (DATA64)st.st_mtime; return 0; } char * evas_file_path_resolve(const char *file) { #if 0 char buf[PATH_MAX], *buf2; #endif return strdup(file); #if 0 if (!realpath(file, buf)) return NULL; buf2 = strdup(buf); return buf2; #endif } evas-1.7.9/src/lib/file/evas_module.c0000664000175000017500000004302112175475547014355 00000000000000#ifdef HAVE_CONFIG_H # include #endif #include #include #include #include static Eina_Hash *evas_modules[4] = { NULL, NULL, NULL, NULL }; static Eina_List *eina_evas_modules = NULL; static Eina_List *evas_module_paths = NULL; static Eina_Array *evas_engines = NULL; static Eina_List * _evas_module_append(Eina_List *list, char *path) { if (path) { if (evas_file_path_exists(path)) list = eina_list_append(list, path); else free(path); } return list; } /* this will alloc a list of paths to search for the modules */ /* by now these are: */ /* 1. ~/.evas/modules/ */ /* 2. $(EVAS_MODULE_DIR)/evas/modules/ */ /* 3. dladdr/evas/modules/ */ /* 4. PREFIX/evas/modules/ */ void evas_module_paths_init(void) { char *libdir, *path; /* 1. ~/.evas/modules/ */ path = eina_module_environment_path_get("HOME", "/.evas/modules"); evas_module_paths = _evas_module_append(evas_module_paths, path); /* 2. $(EVAS_MODULE_DIR)/evas/modules/ */ path = eina_module_environment_path_get("EVAS_MODULES_DIR", "/evas/modules"); if (eina_list_search_unsorted(evas_module_paths, (Eina_Compare_Cb) strcmp, path)) free(path); else evas_module_paths = _evas_module_append(evas_module_paths, path); /* 3. libevas.so/../evas/modules/ */ libdir = (char *)_evas_module_libdir_get(); if (!libdir) path = eina_module_symbol_path_get(evas_module_paths_init, "/evas/modules"); else { path = malloc(strlen(libdir) + strlen("/evas/modules") + 1); if (path) { strcpy(path, libdir); strcat(path, "/evas/modules"); } } if (eina_list_search_unsorted(evas_module_paths, (Eina_Compare_Cb) strcmp, path)) free(path); else evas_module_paths = _evas_module_append(evas_module_paths, path); /* 4. PREFIX/lib/evas/modules/ */ #ifndef _MSC_VER path = PACKAGE_LIB_DIR "/evas/modules"; if (!eina_list_search_unsorted(evas_module_paths, (Eina_Compare_Cb) strcmp, path)) { path = strdup(path); if (path) evas_module_paths = _evas_module_append(evas_module_paths, path); } #endif } #define EVAS_EINA_STATIC_MODULE_DEFINE(Tn, Name) \ Eina_Bool evas_##Tn##_##Name##_init(void); \ void evas_##Tn##_##Name##_shutdown(void); #define EVAS_EINA_STATIC_MODULE_USE(Tn, Name) \ { evas_##Tn##_##Name##_init, evas_##Tn##_##Name##_shutdown } EVAS_EINA_STATIC_MODULE_DEFINE(engine, buffer); EVAS_EINA_STATIC_MODULE_DEFINE(engine, direct3d); EVAS_EINA_STATIC_MODULE_DEFINE(engine, directfb); EVAS_EINA_STATIC_MODULE_DEFINE(engine, fb); EVAS_EINA_STATIC_MODULE_DEFINE(engine, gl_x11); EVAS_EINA_STATIC_MODULE_DEFINE(engine, gl_sdl); EVAS_EINA_STATIC_MODULE_DEFINE(engine, psl1ght); EVAS_EINA_STATIC_MODULE_DEFINE(engine, software_16); EVAS_EINA_STATIC_MODULE_DEFINE(engine, software_16_sdl); EVAS_EINA_STATIC_MODULE_DEFINE(engine, software_16_wince); EVAS_EINA_STATIC_MODULE_DEFINE(engine, software_16_x11); EVAS_EINA_STATIC_MODULE_DEFINE(engine, software_8); EVAS_EINA_STATIC_MODULE_DEFINE(engine, software_8_x11); EVAS_EINA_STATIC_MODULE_DEFINE(engine, software_ddraw); EVAS_EINA_STATIC_MODULE_DEFINE(engine, software_gdi); EVAS_EINA_STATIC_MODULE_DEFINE(engine, software_generic); EVAS_EINA_STATIC_MODULE_DEFINE(engine, software_x11); EVAS_EINA_STATIC_MODULE_DEFINE(image_loader, bmp); EVAS_EINA_STATIC_MODULE_DEFINE(image_loader, edb); EVAS_EINA_STATIC_MODULE_DEFINE(image_loader, eet); EVAS_EINA_STATIC_MODULE_DEFINE(image_loader, generic); EVAS_EINA_STATIC_MODULE_DEFINE(image_loader, gif); EVAS_EINA_STATIC_MODULE_DEFINE(image_loader, ico); EVAS_EINA_STATIC_MODULE_DEFINE(image_loader, jpeg); EVAS_EINA_STATIC_MODULE_DEFINE(image_loader, pmaps); EVAS_EINA_STATIC_MODULE_DEFINE(image_loader, png); EVAS_EINA_STATIC_MODULE_DEFINE(image_loader, psd); EVAS_EINA_STATIC_MODULE_DEFINE(image_loader, svg); EVAS_EINA_STATIC_MODULE_DEFINE(image_loader, tga); EVAS_EINA_STATIC_MODULE_DEFINE(image_loader, tiff); EVAS_EINA_STATIC_MODULE_DEFINE(image_loader, wbmp); EVAS_EINA_STATIC_MODULE_DEFINE(image_loader, xpm); EVAS_EINA_STATIC_MODULE_DEFINE(image_saver, edb); EVAS_EINA_STATIC_MODULE_DEFINE(image_saver, eet); EVAS_EINA_STATIC_MODULE_DEFINE(image_saver, jpeg); EVAS_EINA_STATIC_MODULE_DEFINE(image_saver, png); EVAS_EINA_STATIC_MODULE_DEFINE(image_saver, tiff); static const struct { Eina_Bool (*init)(void); void (*shutdown)(void); } evas_static_module[] = { #ifdef EVAS_STATIC_BUILD_BUFFER EVAS_EINA_STATIC_MODULE_USE(engine, buffer), #endif #ifdef EVAS_STATIC_BUILD_DIRECT3D EVAS_EINA_STATIC_MODULE_USE(engine, direct3d), #endif #ifdef EVAS_STATIC_BUILD_DIRECTFB EVAS_EINA_STATIC_MODULE_USE(engine, directfb), #endif #ifdef EVAS_STATIC_BUILD_FB EVAS_EINA_STATIC_MODULE_USE(engine, fb), #endif #ifdef EVAS_STATIC_BUILD_GL_X11 EVAS_EINA_STATIC_MODULE_USE(engine, gl_x11), #endif #ifdef EVAS_STATIC_BUILD_GL_SDL EVAS_EINA_STATIC_MODULE_USE(engine, gl_sdl), #endif #ifdef EVAS_STATIC_BUILD_PSL1GHT EVAS_EINA_STATIC_MODULE_USE(engine, psl1ght), #endif #ifdef EVAS_STATIC_BUILD_SOFTWARE_16 EVAS_EINA_STATIC_MODULE_USE(engine, software_16), #endif #ifdef EVAS_STATIC_BUILD_SOFTWARE_16_SDL EVAS_EINA_STATIC_MODULE_USE(engine, software_16_sdl), #endif #ifdef EVAS_STATIC_BUILD_SOFTWARE_16_WINCE EVAS_EINA_STATIC_MODULE_USE(engine, software_16_wince), #endif #ifdef EVAS_STATIC_BUILD_SOFTWARE_16_X11 EVAS_EINA_STATIC_MODULE_USE(engine, software_16_x11), #endif #ifdef EVAS_STATIC_BUILD_SOFTWARE_GDI EVAS_EINA_STATIC_MODULE_USE(engine, software_gdi), #endif #ifdef EVAS_STATIC_BUILD_SOFTWARE_DDRAW EVAS_EINA_STATIC_MODULE_USE(engine, software_ddraw), #endif #ifdef EVAS_STATIC_BUILD_SOFTWARE_8 EVAS_EINA_STATIC_MODULE_USE(engine, software_8), #endif #ifdef EVAS_STATIC_BUILD_SOFTWARE_8_X11 EVAS_EINA_STATIC_MODULE_USE(engine, software_8_x11), #endif #ifdef EVAS_STATIC_BUILD_SOFTWARE_DDRAW EVAS_EINA_STATIC_MODULE_USE(engine, software_ddraw), #endif #ifdef EVAS_STATIC_BUILD_SOFTWARE_GDI EVAS_EINA_STATIC_MODULE_USE(engine, software_gdi), #endif #ifdef EVAS_STATIC_BUILD_SOFTWARE_GENERIC EVAS_EINA_STATIC_MODULE_USE(engine, software_generic), #endif #ifdef EVAS_STATIC_BUILD_SOFTWARE_X11 EVAS_EINA_STATIC_MODULE_USE(engine, software_x11), #endif #ifdef EVAS_STATIC_BUILD_BMP EVAS_EINA_STATIC_MODULE_USE(image_loader, bmp), #endif #ifdef EVAS_STATIC_BUILD_EDB EVAS_EINA_STATIC_MODULE_USE(image_loader, edb), #endif #ifdef EVAS_STATIC_BUILD_EET EVAS_EINA_STATIC_MODULE_USE(image_loader, eet), #endif #ifdef EVAS_STATIC_BUILD_GENERIC EVAS_EINA_STATIC_MODULE_USE(image_loader, generic), #endif #ifdef EVAS_STATIC_BUILD_GIF EVAS_EINA_STATIC_MODULE_USE(image_loader, gif), #endif #ifdef EVAS_STATIC_BUILD_ICO EVAS_EINA_STATIC_MODULE_USE(image_loader, ico), #endif #ifdef EVAS_STATIC_BUILD_JPEG EVAS_EINA_STATIC_MODULE_USE(image_loader, jpeg), #endif #ifdef EVAS_STATIC_BUILD_PMAPS EVAS_EINA_STATIC_MODULE_USE(image_loader, pmaps), #endif #ifdef EVAS_STATIC_BUILD_PNG EVAS_EINA_STATIC_MODULE_USE(image_loader, png), #endif #ifdef EVAS_STATIC_BUILD_PSD EVAS_EINA_STATIC_MODULE_USE(image_loader, psd), #endif #ifdef EVAS_STATIC_BUILD_SVG EVAS_EINA_STATIC_MODULE_USE(image_loader, svg), #endif #ifdef EVAS_STATIC_BUILD_TGA EVAS_EINA_STATIC_MODULE_USE(image_loader, tga), #endif #ifdef EVAS_STATIC_BUILD_TIFF EVAS_EINA_STATIC_MODULE_USE(image_loader, tiff), #endif #ifdef EVAS_STATIC_BUILD_WBMP EVAS_EINA_STATIC_MODULE_USE(image_loader, wbmp), #endif #ifdef EVAS_STATIC_BUILD_XPM EVAS_EINA_STATIC_MODULE_USE(image_loader, xpm), #endif #ifdef EVAS_STATIC_BUILD_EDB EVAS_EINA_STATIC_MODULE_USE(image_saver, edb), #endif #ifdef EVAS_STATIC_BUILD_EET EVAS_EINA_STATIC_MODULE_USE(image_saver, eet), #endif #if defined (EVAS_BUILD_SAVER_JPEG) && defined (EVAS_STATIC_BUILD_JPEG) EVAS_EINA_STATIC_MODULE_USE(image_saver, jpeg), #endif #ifdef EVAS_STATIC_BUILD_PNG EVAS_EINA_STATIC_MODULE_USE(image_saver, png), #endif #ifdef EVAS_STATIC_BUILD_TIFF EVAS_EINA_STATIC_MODULE_USE(image_saver, tiff), #endif { NULL, NULL } }; /* this will alloc an Evas_Module struct for each module * it finds on the paths */ void evas_module_init(void) { int i; evas_module_paths_init(); evas_modules[EVAS_MODULE_TYPE_ENGINE] = eina_hash_string_small_new(/* FIXME: Add a function to cleanup stuff. */ NULL); evas_modules[EVAS_MODULE_TYPE_IMAGE_LOADER] = eina_hash_string_small_new(/* FIXME: Add a function to cleanup stuff. */ NULL); evas_modules[EVAS_MODULE_TYPE_IMAGE_SAVER] = eina_hash_string_small_new(/* FIXME: Add a function to cleanup stuff. */ NULL); evas_modules[EVAS_MODULE_TYPE_OBJECT] = eina_hash_string_small_new(/* FIXME: Add a function to cleanup stuff. */ NULL); evas_engines = eina_array_new(4); for (i = 0; evas_static_module[i].init; ++i) evas_static_module[i].init(); } Eina_Bool evas_module_register(const Evas_Module_Api *module, Evas_Module_Type type) { Evas_Module *em; if ((unsigned int)type > 3) return EINA_FALSE; if (!module) return EINA_FALSE; if (module->version != EVAS_MODULE_API_VERSION) return EINA_FALSE; em = eina_hash_find(evas_modules[type], module->name); if (em) return EINA_FALSE; em = calloc(1, sizeof (Evas_Module)); if (!em) return EINA_FALSE; em->definition = module; if (type == EVAS_MODULE_TYPE_ENGINE) { eina_array_push(evas_engines, em); em->id_engine = eina_array_count(evas_engines); } eina_hash_direct_add(evas_modules[type], module->name, em); return EINA_TRUE; } Eina_List * evas_module_engine_list(void) { Evas_Module *em; Eina_List *r = NULL, *l, *ll; Eina_Array_Iterator iterator; Eina_Iterator *it, *it2; unsigned int i; const char *s, *s2; char buf[4096]; EINA_LIST_FOREACH(evas_module_paths, l, s) { snprintf(buf, sizeof(buf), "%s/engines", s); it = eina_file_direct_ls(buf); if (it) { Eina_File_Direct_Info *fi; EINA_ITERATOR_FOREACH(it, fi) { const char *fname = fi->path + fi->name_start; snprintf(buf, sizeof(buf), "%s/engines/%s/%s", s, fname, MODULE_ARCH); it2 = eina_file_ls(buf); if (it2) { EINA_LIST_FOREACH(r, ll, s2) { if (!strcmp(fname, s2)) break; } if (!ll) r = eina_list_append(r, eina_stringshare_add(fname)); eina_iterator_free(it2); } } eina_iterator_free(it); } } EINA_ARRAY_ITER_NEXT(evas_engines, i, em, iterator) { EINA_LIST_FOREACH(r, ll, s2) { if (!strcmp(em->definition->name, s2)) break; } if (!ll) r = eina_list_append(r, eina_stringshare_add(em->definition->name)); } return r; } Eina_Bool evas_module_unregister(const Evas_Module_Api *module, Evas_Module_Type type) { Evas_Module *em; if ((unsigned int)type > 3) return EINA_FALSE; if (!module) return EINA_FALSE; em = eina_hash_find(evas_modules[type], module->name); if (!em || em->definition != module) return EINA_FALSE; if (type == EVAS_MODULE_TYPE_ENGINE) eina_array_data_set(evas_engines, em->id_engine, NULL); eina_hash_del(evas_modules[type], module->name, em); free(em); return EINA_TRUE; } #if defined(__CEGCC__) || defined(__MINGW32CE__) # define EVAS_MODULE_NAME_IMAGE_SAVER "saver_%s.dll" # define EVAS_MODULE_NAME_IMAGE_LOADER "loader_%s.dll" # define EVAS_MODULE_NAME_ENGINE "engine_%s.dll" # define EVAS_MODULE_NAME_OBJECT "object_%s.dll" #elif _WIN32 # define EVAS_MODULE_NAME_IMAGE_SAVER "module.dll" # define EVAS_MODULE_NAME_IMAGE_LOADER "module.dll" # define EVAS_MODULE_NAME_ENGINE "module.dll" # define EVAS_MODULE_NAME_OBJECT "module.dll" #else # define EVAS_MODULE_NAME_IMAGE_SAVER "module.so" # define EVAS_MODULE_NAME_IMAGE_LOADER "module.so" # define EVAS_MODULE_NAME_ENGINE "module.so" # define EVAS_MODULE_NAME_OBJECT "module.so" #endif Evas_Module * evas_module_find_type(Evas_Module_Type type, const char *name) { const char *path; const char *format = NULL; char buffer[4096]; Evas_Module *em; Eina_Module *en; Eina_List *l; if ((unsigned int)type > 3) return NULL; em = eina_hash_find(evas_modules[type], name); if (em) return em; EINA_LIST_FOREACH(evas_module_paths, l, path) { switch (type) { case EVAS_MODULE_TYPE_ENGINE: format = "%s/engines/%s/%s/" EVAS_MODULE_NAME_ENGINE; break; case EVAS_MODULE_TYPE_IMAGE_LOADER: format = "%s/loaders/%s/%s/" EVAS_MODULE_NAME_IMAGE_LOADER; break; case EVAS_MODULE_TYPE_IMAGE_SAVER: format = "%s/savers/%s/%s/" EVAS_MODULE_NAME_IMAGE_SAVER; break; case EVAS_MODULE_TYPE_OBJECT: format = "%s/object/%s/%s/" EVAS_MODULE_NAME_OBJECT; break; } snprintf(buffer, sizeof (buffer), format, path, name, MODULE_ARCH, name); if (!evas_file_path_is_file(buffer)) continue; en = eina_module_new(buffer); if (!en) continue; if (!eina_module_load(en)) { eina_module_free(en); continue; } em = eina_hash_find(evas_modules[type], name); if (em) { eina_evas_modules = eina_list_append(eina_evas_modules, en); return em; } eina_module_free(en); } return NULL; } Evas_Module * evas_module_engine_get(int render_method) { if ((render_method <= 0) || ((unsigned int)render_method > eina_array_count(evas_engines))) return NULL; return eina_array_data_get(evas_engines, render_method - 1); } void evas_module_foreach_image_loader(Eina_Hash_Foreach cb, const void *fdata) { eina_hash_foreach(evas_modules[EVAS_MODULE_TYPE_IMAGE_LOADER], cb, fdata); } int evas_module_load(Evas_Module *em) { if (em->loaded) return 1; if (!em->definition) return 0; if (!em->definition->func.open(em)) return 0; em->loaded = 1; #ifdef BUILD_ASYNC_PRELOAD LKI(em->lock); #endif return 1; } void evas_module_unload(Evas_Module *em) { if (!em->loaded) return; if (!em->definition) return ; // for now lets not unload modules - they may still be in use. // em->definition->func.close(em); // em->loaded = 0; #ifdef BUILD_ASYNC_PRELOAD LKD(em->lock); #endif } void evas_module_ref(Evas_Module *em) { #ifdef BUILD_ASYNC_PRELOAD LKL(em->lock); #endif em->ref++; #ifdef BUILD_ASYNC_PRELOAD LKU(em->lock); #endif } void evas_module_unref(Evas_Module *em) { #ifdef BUILD_ASYNC_PRELOAD LKL(em->lock); #endif em->ref--; #ifdef BUILD_ASYNC_PRELOAD LKU(em->lock); #endif } static int use_count = 0; void evas_module_use(Evas_Module *em) { em->last_used = use_count; } void evas_module_clean(void) { static int call_count = 0; /* int ago; */ int noclean = -1; /* Eina_List *l; */ /* Evas_Module *em; */ /* only clean modules every 256 calls */ call_count++; if (call_count <= 256) return; call_count = 0; if (noclean == -1) { if (getenv("EVAS_NOCLEAN")) noclean = 1; else noclean = 0; } if (noclean == 1) return; /* disable module cleaning for now - may cause instability with some modules */ return; /* FIXME: Don't know what it is supposed to do. */ /* /\* incriment use counter = 28bits *\/ */ /* use_count++; */ /* if (use_count > 0x0fffffff) use_count = 0; */ /* /\* printf("CLEAN!\n"); *\/ */ /* /\* go through all modules *\/ */ /* EINA_LIST_FOREACH(evas_modules, l, em) */ /* { */ /* /\* printf("M %s %i %i\n", em->name, em->ref, em->loaded); *\/ */ /* /\* if the module is refernced - skip *\/ */ /* if ((em->ref > 0) || (!em->loaded)) continue; */ /* /\* how many clean cycles ago was this module last used *\/ */ /* ago = use_count - em->last_used; */ /* if (em->last_used > use_count) ago += 0x10000000; */ /* /\* if it was used last more than N clean cycles ago - unload *\/ */ /* if (ago > 5) */ /* { */ /* /\* printf(" UNLOAD %s\n", em->name); *\/ */ /* evas_module_unload(em); */ /* } */ /* } */ } static Eina_Prefix *pfx = NULL; /* will dlclose all the modules loaded and free all the structs */ void evas_module_shutdown(void) { Eina_Module *en; char *path; int i; for (i = 0; evas_static_module[i].shutdown; ++i) evas_static_module[i].shutdown(); EINA_LIST_FREE(eina_evas_modules, en) eina_module_free(en); eina_hash_free(evas_modules[EVAS_MODULE_TYPE_ENGINE]); evas_modules[EVAS_MODULE_TYPE_ENGINE] = NULL; eina_hash_free(evas_modules[EVAS_MODULE_TYPE_IMAGE_LOADER]); evas_modules[EVAS_MODULE_TYPE_IMAGE_LOADER] = NULL; eina_hash_free(evas_modules[EVAS_MODULE_TYPE_IMAGE_SAVER]); evas_modules[EVAS_MODULE_TYPE_IMAGE_SAVER] = NULL; eina_hash_free(evas_modules[EVAS_MODULE_TYPE_OBJECT]); evas_modules[EVAS_MODULE_TYPE_OBJECT] = NULL; EINA_LIST_FREE(evas_module_paths, path) free(path); eina_array_free(evas_engines); evas_engines = NULL; if (pfx) { eina_prefix_free(pfx); pfx = NULL; } } EAPI int _evas_module_engine_inherit(Evas_Func *funcs, char *name) { Evas_Module *em; em = evas_module_find_type(EVAS_MODULE_TYPE_ENGINE, name); if (em) { if (evas_module_load(em)) { /* FIXME: no way to unref */ evas_module_ref(em); evas_module_use(em); *funcs = *((Evas_Func *)(em->functions)); return 1; } } return 0; } EAPI const char * _evas_module_libdir_get(void) { if (!pfx) pfx = eina_prefix_new (NULL, _evas_module_libdir_get, "EVAS", "evas", "checkme", PACKAGE_BIN_DIR, PACKAGE_LIB_DIR, PACKAGE_DATA_DIR, PACKAGE_DATA_DIR); if (!pfx) return NULL; return eina_prefix_lib_get(pfx); } evas-1.7.9/src/lib/file/evas_module.h0000664000175000017500000000540212175475547014363 00000000000000#ifndef _EVAS_MODULE_H #define _EVAS_MODULE_H /* the module api version */ #define EVAS_MODULE_API_VERSION 2 /* the module types */ typedef enum _Evas_Module_Type { EVAS_MODULE_TYPE_ENGINE = 0, EVAS_MODULE_TYPE_IMAGE_LOADER = 1, EVAS_MODULE_TYPE_IMAGE_SAVER = 2, EVAS_MODULE_TYPE_OBJECT = 3 } Evas_Module_Type; typedef struct _Evas_Module_Api Evas_Module_Api; typedef struct _Evas_Module Evas_Module; typedef struct _Evas_Module_Path Evas_Module_Path; typedef struct _Evas_Module_Engine Evas_Module_Engine; typedef struct _Evas_Module_Public Evas_Module_Public; /* the module api structure, all modules should define this struct */ struct _Evas_Module_Api { int version; const char *name; const char *author; struct { int (*open)(Evas_Module *); void (*close)(Evas_Module *); } func; }; /* the module structure */ struct _Evas_Module { const Evas_Module_Api *definition; void *functions; /* this are the functions exported by the module */ int id_engine; /* some internal data for the module i.e the id for engines */ int ref; /* how many refs */ int last_used; /* the cycle count when it was last used */ LK(lock); unsigned char loaded : 1; }; /* the internals of the module api use this struct to reference a path with a module type * instead of deduce the type from the path. * */ struct _Evas_Module_Path { Evas_Module_Type type; char *path; }; void evas_module_paths_init (void); void evas_module_init (void); Evas_Module *evas_module_find_type (Evas_Module_Type type, const char *name); Evas_Module *evas_module_engine_get(int render_method); void evas_module_foreach_image_loader(Eina_Hash_Foreach cb, const void *fdata); int evas_module_load (Evas_Module *em); void evas_module_unload (Evas_Module *em); void evas_module_ref (Evas_Module *em); void evas_module_unref (Evas_Module *em); void evas_module_use (Evas_Module *em); void evas_module_clean (void); void evas_module_shutdown (void); EAPI Eina_Bool evas_module_register (const Evas_Module_Api *module, Evas_Module_Type type); EAPI Eina_Bool evas_module_unregister (const Evas_Module_Api *module, Evas_Module_Type type); #define EVAS_MODULE_DEFINE(Type, Tn, Name) \ Eina_Bool evas_##Tn##_##Name##_init(void) \ { \ return evas_module_register(&evas_modapi, Type); \ } \ void evas_##Tn##_##Name##_shutdown(void) \ { \ evas_module_unregister(&evas_modapi, Type); \ } #define EVAS_EINA_MODULE_DEFINE(Tn, Name) \ EINA_MODULE_INIT(evas_##Tn##_##Name##_init); \ EINA_MODULE_SHUTDOWN(evas_##Tn##_##Name##_shutdown); #endif /* _EVAS_MODULE_H */ evas-1.7.9/src/lib/file/Makefile.am0000664000175000017500000000100612175475547013737 00000000000000 MAINTAINERCLEANFILES = Makefile.in AM_CPPFLAGS = \ -I. \ -I$(top_srcdir)/src/lib \ -I$(top_srcdir)/src/lib/include \ -DPACKAGE_BIN_DIR=\"$(bindir)\" \ -DPACKAGE_LIB_DIR=\"$(libdir)\" \ -DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \ @FREETYPE_CFLAGS@ \ @EVAS_GENERAL_CFLAGS@ \ @EVIL_CFLAGS@ \ @FRIBIDI_CFLAGS@ \ @PIXMAN_CFLAGS@ noinst_LTLIBRARIES = libevas_file.la libevas_file_la_SOURCES = \ evas_path.c \ evas_module.c \ evas_module.h \ evas_path.h libevas_file_la_LIBADD = @EVAS_GENERAL_LIBS@ @EVIL_LIBS@ evas-1.7.9/src/lib/engines/0000775000175000017500000000000012234557316012466 500000000000000evas-1.7.9/src/lib/engines/Makefile.in0000664000175000017500000006263012234557302014455 00000000000000# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ @BUILD_ENGINE_SOFTWARE_16_TRUE@am__append_1 = common_16 @BUILD_ENGINE_SOFTWARE_8_TRUE@am__append_2 = common_8 subdir = src/lib/engines DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/efl_attribute.m4 \ $(top_srcdir)/m4/efl_coverage.m4 \ $(top_srcdir)/m4/efl_doxygen.m4 \ $(top_srcdir)/m4/efl_fnmatch.m4 \ $(top_srcdir)/m4/efl_path_max.m4 \ $(top_srcdir)/m4/efl_shm_open.m4 $(top_srcdir)/m4/efl_tests.m4 \ $(top_srcdir)/m4/evas_check_engine.m4 \ $(top_srcdir)/m4/evas_check_loader.m4 \ $(top_srcdir)/m4/evas_converter.m4 \ $(top_srcdir)/m4/evas_dither.m4 \ $(top_srcdir)/m4/evas_scaler.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-recursive dvi-recursive html-recursive info-recursive \ install-data-recursive install-dvi-recursive \ install-exec-recursive install-html-recursive \ install-info-recursive install-pdf-recursive \ install-ps-recursive install-recursive installcheck-recursive \ installdirs-recursive pdf-recursive ps-recursive \ tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ $(RECURSIVE_TARGETS) \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ distdir am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DIST_SUBDIRS = common common_16 common_8 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHECK_CFLAGS = @CHECK_CFLAGS@ CHECK_LIBS = @CHECK_LIBS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@ DIRECTFB_LIBS = @DIRECTFB_LIBS@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ ECORE_EVAS_CFLAGS = @ECORE_EVAS_CFLAGS@ ECORE_EVAS_LIBS = @ECORE_EVAS_LIBS@ EDB_CFLAGS = @EDB_CFLAGS@ EDB_LIBS = @EDB_LIBS@ EDJE_CFLAGS = @EDJE_CFLAGS@ EDJE_LIBS = @EDJE_LIBS@ EET_CFLAGS = @EET_CFLAGS@ EET_LIBS = @EET_LIBS@ EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@ EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@ EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@ EFL_SHM_OPEN_LIBS = @EFL_SHM_OPEN_LIBS@ EGREP = @EGREP@ EINA_CFLAGS = @EINA_CFLAGS@ EINA_LIBS = @EINA_LIBS@ EVAS_CFLAGS = @EVAS_CFLAGS@ EVAS_GENERAL_CFLAGS = @EVAS_GENERAL_CFLAGS@ EVAS_GENERAL_LIBS = @EVAS_GENERAL_LIBS@ EVAS_LIBS = @EVAS_LIBS@ EVAS_SSE3_CFLAGS = @EVAS_SSE3_CFLAGS@ EVIL_CFLAGS = @EVIL_CFLAGS@ EVIL_LIBS = @EVIL_LIBS@ EXEEXT = @EXEEXT@ EXOTIC_CFLAGS = @EXOTIC_CFLAGS@ EXOTIC_LIBS = @EXOTIC_LIBS@ FGREP = @FGREP@ FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@ FONTCONFIG_LIBS = @FONTCONFIG_LIBS@ FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ FREETYPE_LIBS = @FREETYPE_LIBS@ FRIBIDI_CFLAGS = @FRIBIDI_CFLAGS@ FRIBIDI_LIBS = @FRIBIDI_LIBS@ GL_EET_CFLAGS = @GL_EET_CFLAGS@ GL_EET_LIBS = @GL_EET_LIBS@ GREP = @GREP@ HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@ HARFBUZZ_LIBS = @HARFBUZZ_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LINEBREAK_CFLAGS = @LINEBREAK_CFLAGS@ LINEBREAK_LIBS = @LINEBREAK_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MODULE_ARCH = @MODULE_ARCH@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ SDL_CFLAGS = @SDL_CFLAGS@ SDL_LIBS = @SDL_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ SVG_CFLAGS = @SVG_CFLAGS@ SVG_LIBS = @SVG_LIBS@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ XCB_CFLAGS = @XCB_CFLAGS@ XCB_GL_CFLAGS = @XCB_GL_CFLAGS@ XCB_GL_LIBS = @XCB_GL_LIBS@ XCB_LIBS = @XCB_LIBS@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_ct_OBJC = @ac_ct_OBJC@ altivec_cflags = @altivec_cflags@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ dlopen_libs = @dlopen_libs@ docdir = @docdir@ dvidir = @dvidir@ edje_cc = @edje_cc@ efl_doxygen = @efl_doxygen@ efl_have_doxygen = @efl_have_doxygen@ evas_engine_buffer_cflags = @evas_engine_buffer_cflags@ evas_engine_buffer_libs = @evas_engine_buffer_libs@ evas_engine_direct3d_cflags = @evas_engine_direct3d_cflags@ evas_engine_direct3d_libs = @evas_engine_direct3d_libs@ evas_engine_directfb_cflags = @evas_engine_directfb_cflags@ evas_engine_directfb_libs = @evas_engine_directfb_libs@ evas_engine_fb_cflags = @evas_engine_fb_cflags@ evas_engine_fb_libs = @evas_engine_fb_libs@ evas_engine_gl_cocoa_cflags = @evas_engine_gl_cocoa_cflags@ evas_engine_gl_cocoa_libs = @evas_engine_gl_cocoa_libs@ evas_engine_gl_common_libs = @evas_engine_gl_common_libs@ evas_engine_gl_sdl_cflags = @evas_engine_gl_sdl_cflags@ evas_engine_gl_sdl_libs = @evas_engine_gl_sdl_libs@ evas_engine_gl_xcb_cflags = @evas_engine_gl_xcb_cflags@ evas_engine_gl_xcb_libs = @evas_engine_gl_xcb_libs@ evas_engine_gl_xlib_cflags = @evas_engine_gl_xlib_cflags@ evas_engine_gl_xlib_libs = @evas_engine_gl_xlib_libs@ evas_engine_psl1ght_cflags = @evas_engine_psl1ght_cflags@ evas_engine_psl1ght_libs = @evas_engine_psl1ght_libs@ evas_engine_software_16_sdl_cflags = @evas_engine_software_16_sdl_cflags@ evas_engine_software_16_sdl_libs = @evas_engine_software_16_sdl_libs@ evas_engine_software_16_wince_cflags = @evas_engine_software_16_wince_cflags@ evas_engine_software_16_wince_libs = @evas_engine_software_16_wince_libs@ evas_engine_software_16_x11_cflags = @evas_engine_software_16_x11_cflags@ evas_engine_software_16_x11_libs = @evas_engine_software_16_x11_libs@ evas_engine_software_8_x11_cflags = @evas_engine_software_8_x11_cflags@ evas_engine_software_8_x11_libs = @evas_engine_software_8_x11_libs@ evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@ evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@ evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@ evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ evas_image_loader_edb_libs = @evas_image_loader_edb_libs@ evas_image_loader_eet_cflags = @evas_image_loader_eet_cflags@ evas_image_loader_eet_libs = @evas_image_loader_eet_libs@ evas_image_loader_generic_cflags = @evas_image_loader_generic_cflags@ evas_image_loader_generic_libs = @evas_image_loader_generic_libs@ evas_image_loader_gif_cflags = @evas_image_loader_gif_cflags@ evas_image_loader_gif_libs = @evas_image_loader_gif_libs@ evas_image_loader_ico_cflags = @evas_image_loader_ico_cflags@ evas_image_loader_ico_libs = @evas_image_loader_ico_libs@ evas_image_loader_jpeg_cflags = @evas_image_loader_jpeg_cflags@ evas_image_loader_jpeg_libs = @evas_image_loader_jpeg_libs@ evas_image_loader_pmaps_cflags = @evas_image_loader_pmaps_cflags@ evas_image_loader_pmaps_libs = @evas_image_loader_pmaps_libs@ evas_image_loader_png_cflags = @evas_image_loader_png_cflags@ evas_image_loader_png_libs = @evas_image_loader_png_libs@ evas_image_loader_psd_cflags = @evas_image_loader_psd_cflags@ evas_image_loader_psd_libs = @evas_image_loader_psd_libs@ evas_image_loader_svg_cflags = @evas_image_loader_svg_cflags@ evas_image_loader_svg_libs = @evas_image_loader_svg_libs@ evas_image_loader_tga_cflags = @evas_image_loader_tga_cflags@ evas_image_loader_tga_libs = @evas_image_loader_tga_libs@ evas_image_loader_tiff_cflags = @evas_image_loader_tiff_cflags@ evas_image_loader_tiff_libs = @evas_image_loader_tiff_libs@ evas_image_loader_wbmp_cflags = @evas_image_loader_wbmp_cflags@ evas_image_loader_wbmp_libs = @evas_image_loader_wbmp_libs@ evas_image_loader_xpm_cflags = @evas_image_loader_xpm_cflags@ evas_image_loader_xpm_libs = @evas_image_loader_xpm_libs@ exec_prefix = @exec_prefix@ have_evas_engine_gl_x11 = @have_evas_engine_gl_x11@ have_evas_engine_gl_xcb = @have_evas_engine_gl_xcb@ have_evas_engine_gl_xlib = @have_evas_engine_gl_xlib@ have_evas_engine_software_x11 = @have_evas_engine_software_x11@ have_evas_engine_software_xcb = @have_evas_engine_software_xcb@ have_evas_engine_software_xlib = @have_evas_engine_software_xlib@ have_lcov = @have_lcov@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_enable_auto_import = @lt_enable_auto_import@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgconfig_requires_private = @pkgconfig_requires_private@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pthread_cflags = @pthread_cflags@ pthread_libs = @pthread_libs@ release_info = @release_info@ requirement_evas = @requirement_evas@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ shm_open_libs = @shm_open_libs@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ version_info = @version_info@ MAINTAINERCLEANFILES = Makefile.in SUBDIRS = common $(am__append_1) $(am__append_2) all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/lib/engines/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/lib/engines/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs # This directory's subdirectories are mostly independent; you can cd # into them and run 'make' without going through this Makefile. # To change the values of 'make' variables: instead of editing Makefiles, # (1) if the variable is set in 'config.status', edit 'config.status' # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. $(am__recursive_targets): @fail=; \ if $(am__make_keepgoing); then \ failcom='fail=yes'; \ else \ failcom='exit 1'; \ fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-recursive TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-recursive CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-recursive cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: .MAKE: $(am__recursive_targets) install-am install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \ check-am clean clean-generic clean-libtool cscopelist-am ctags \ ctags-am distclean distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ installdirs-am maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: evas-1.7.9/src/lib/engines/common_16/0000775000175000017500000000000012234557316014264 500000000000000evas-1.7.9/src/lib/engines/common_16/evas_soft16_polygon.c0000664000175000017500000001433612175475547020277 00000000000000#include #include #include "evas_soft16_scanline_fill.c" typedef struct _RGBA_Edge RGBA_Edge; typedef struct _RGBA_Vertex RGBA_Vertex; struct _RGBA_Edge { float x, dx; int i; }; struct _RGBA_Vertex { float x, y; int i; }; #define POLY_EDGE_DEL(_i) \ { \ int _j; \ \ for (_j = 0; (_j < num_active_edges) && (edges[_j].i != _i); _j++); \ if (_j < num_active_edges) \ { \ num_active_edges--; \ memmove(&(edges[_j]), &(edges[_j + 1]), \ (num_active_edges - _j) * sizeof(RGBA_Edge)); \ } \ } #define POLY_EDGE_ADD(_i, _y) \ { \ int _j; \ float _dx; \ RGBA_Vertex *_p, *_q; \ if (_i < (n - 1)) _j = _i + 1; \ else _j = 0; \ if (point[_i].y < point[_j].y) \ { \ _p = &(point[_i]); \ _q = &(point[_j]); \ } \ else \ { \ _p = &(point[_j]); \ _q = &(point[_i]); \ } \ edges[num_active_edges].dx = _dx = (_q->x - _p->x) / (_q->y - _p->y); \ edges[num_active_edges].x = (_dx * ((float)_y + 0.5 - _p->y)) + _p->x; \ edges[num_active_edges].i = _i; \ num_active_edges++; \ } static int polygon_point_sorter(const void *a, const void *b) { RGBA_Vertex *p, *q; p = (RGBA_Vertex *)a; q = (RGBA_Vertex *)b; if (p->y <= q->y) return -1; return 1; } static int polygon_edge_sorter(const void *a, const void *b) { RGBA_Edge *p, *q; p = (RGBA_Edge *)a; q = (RGBA_Edge *)b; if (p->x <= q->x) return -1; return 1; } void evas_common_soft16_polygon_draw(Soft16_Image *dst, RGBA_Draw_Context *dc, RGBA_Polygon_Point *points, int x, int y) { RGBA_Polygon_Point *pt; RGBA_Vertex *point; RGBA_Edge *edges; int num_active_edges; int n; int i, j, k; int y0, y1, yi; int ext_x, ext_y, ext_w, ext_h; int *sorted_index; DATA8 alpha; DATA16 rgb565; DATA32 rgb565_unpack; alpha = A_VAL(&dc->col.col) >> 3; if (alpha == 0) return; alpha++; rgb565 = RGB_565_FROM_COMPONENTS(R_VAL(&dc->col.col), G_VAL(&dc->col.col), B_VAL(&dc->col.col)); rgb565_unpack = RGB_565_UNPACK(rgb565); ext_x = 0; ext_y = 0; ext_w = dst->cache_entry.w; ext_h = dst->cache_entry.h; if (dc->clip.use) RECTS_CLIP_TO_RECT(ext_x, ext_y, ext_w, ext_h, dc->clip.x, dc->clip.y, dc->clip.w, dc->clip.h); if ((ext_w <= 0) || (ext_h <= 0)) return; n = 0; EINA_INLIST_FOREACH(points, pt) n++; if (n < 3) return; edges = malloc(sizeof(RGBA_Edge) * n); if (!edges) return; point = malloc(sizeof(RGBA_Vertex) * n); if (!point) { free(edges); return; } sorted_index = malloc(sizeof(int) * n); if (!sorted_index) { free(edges); free(point); return; } k = 0; EINA_INLIST_FOREACH(points, pt) { point[k].x = pt->x + x; point[k].y = pt->y + y; point[k].i = k; k++; } qsort(point, n, sizeof(RGBA_Vertex), polygon_point_sorter); for (k = 0; k < n; k++) sorted_index[k] = point[k].i; k = 0; EINA_INLIST_FOREACH(points, pt) { point[k].x = pt->x + x; point[k].y = pt->y + y; point[k].i = k; k++; } y0 = MAX(ext_y, ceil(point[sorted_index[0]].y - 0.5)); y1 = MIN(ext_y + ext_h - 1, floor(point[sorted_index[n - 1]].y - 0.5)); k = 0; num_active_edges = 0; for (yi = y0; yi <= y1; yi++) { for (; (k < n) && (point[sorted_index[k]].y <= ((float)yi + 0.5)); k++) { i = sorted_index[k]; if (i > 0) j = i - 1; else j = n - 1; if (point[j].y <= ((float)yi - 0.5)) { POLY_EDGE_DEL(j) } else if (point[j].y > ((float)yi + 0.5)) { POLY_EDGE_ADD(j, yi) } if (i < (n - 1)) j = i + 1; else j = 0; if (point[j].y <= ((float)yi - 0.5)) { POLY_EDGE_DEL(i) } else if (point[j].y > ((float)yi + 0.5)) { POLY_EDGE_ADD(i, yi) } } qsort(edges, num_active_edges, sizeof(RGBA_Edge), polygon_edge_sorter); for (j = 0; j < num_active_edges; j += 2) { int x0, x1; x0 = ceil(edges[j].x - 0.5); if (j < (num_active_edges - 1)) x1 = floor(edges[j + 1].x - 0.5); else x1 = x0; if ((x1 >= ext_x) && (x0 < (ext_x + ext_w)) && (x0 <= x1)) { DATA16 *dst_itr; int w; if (x0 < ext_x) x0 = ext_x; if (x1 >= (ext_x + ext_w)) x1 = ext_x + ext_w - 1; w = (x1 - x0) + 1; dst_itr = dst->pixels + (yi * dst->stride) + x0; if (alpha == 32) _soft16_scanline_fill_solid_solid(dst_itr, w, rgb565); else _soft16_scanline_fill_transp_solid(dst_itr, w, rgb565_unpack, alpha); } edges[j].x += edges[j].dx; edges[j + 1].x += edges[j + 1].dx; } } free(edges); free(point); free(sorted_index); } evas-1.7.9/src/lib/engines/common_16/evas_soft16_main.c0000664000175000017500000004154012175475547017531 00000000000000#include "evas_common_soft16.h" static Evas_Cache_Image *eci = NULL; static int reference = 0; static Image_Entry *_evas_common_soft16_image_new(void); static void _evas_common_soft16_image_delete(Image_Entry *ie); static int _evas_common_soft16_image_surface_alloc(Image_Entry *ie, unsigned int w, unsigned int h); static void _evas_common_soft16_image_surface_delete(Image_Entry *ie); static DATA32 *_evas_common_soft16_image_surface_pixels(Image_Entry *ie); static int _evas_common_load_soft16_image_from_file(Image_Entry *ie); static void _evas_common_soft16_image_unload(Image_Entry *ie); static void _evas_common_soft16_image_dirty_region(Image_Entry *im, unsigned int x, unsigned int y, unsigned int w, unsigned int h); static int _evas_common_soft16_image_dirty(Image_Entry *ie_dst, const Image_Entry *ie_src); static int _evas_common_soft16_image_ram_usage(Image_Entry *ie); static int _evas_common_soft16_image_size_set(Image_Entry *ie_dst, const Image_Entry *ie_im, unsigned int w, unsigned int h); static int _evas_common_soft16_image_from_copied_data(Image_Entry* ie_dst, unsigned int w, unsigned int h, DATA32 *image_data, int alpha, int cspace); static int _evas_common_soft16_image_from_data(Image_Entry* ie_dst, unsigned int w, unsigned int h, DATA32 *image_data, int alpha, int cspace); static int _evas_common_soft16_image_colorspace_set(Image_Entry* ie_dst, int cspace); static int _evas_common_load_soft16_image_data_from_file(Image_Entry *ie); /* static void */ /* _evas_common_soft16_image_debug(const char* context, Image_Entry *eim) */ /* { */ /* DBG("[16] %p = [%s] {%s,%s} %i [%i|%i]", eim, context, eim->file, eim->key, eim->references, eim->w, eim->h); */ /* } */ static const Evas_Cache_Image_Func _evas_common_soft16_image_func = { _evas_common_soft16_image_new, _evas_common_soft16_image_delete, _evas_common_soft16_image_surface_alloc, _evas_common_soft16_image_surface_delete, _evas_common_soft16_image_surface_pixels, _evas_common_load_soft16_image_from_file, _evas_common_soft16_image_unload, _evas_common_soft16_image_dirty_region, _evas_common_soft16_image_dirty, _evas_common_soft16_image_size_set, _evas_common_soft16_image_from_copied_data, _evas_common_soft16_image_from_data, _evas_common_soft16_image_colorspace_set, _evas_common_load_soft16_image_data_from_file, _evas_common_soft16_image_ram_usage, /* _evas_common_soft16_image_debug */ NULL }; EAPI void evas_common_soft16_image_init(void) { if (!eci) eci = evas_cache_image_init(&_evas_common_soft16_image_func); reference++; } EAPI void evas_common_soft16_image_shutdown(void) { if (--reference == 0) { // DISABLE for now - something wrong with cache shutdown freeing things // still in use - rage_thumb segv's now. // // actually - i think i see it. cache ref goes to 0 (and thus gets freed) // because in eng_setup() when a buffer changes size it is FIRST freed // THEN allocated again - thus brignhjing ref to 0 then back to 1 immediately // where it should stay at 1. - see evas_engine.c in the buffer enigne for // example. eng_output_free() is called BEFORE _output_setup(). although this // is only a SIGNE of the problem. we can patch this up with either freeing // after the setup (so we just pt a ref of 2 then back to 1), or just // evas_common_image_init() at the start and evas_common_image_shutdown() // after it all. really ref 0 should only be reached when no more canvases // with no more objects exist anywhere. // ENABLE IT AGAIN, hope it is fixed. Gustavo @ January 22nd, 2009. evas_cache_image_shutdown(eci); eci = NULL; } } EAPI Evas_Cache_Image * evas_common_soft16_image_cache_get(void) { return eci; } static Image_Entry * _evas_common_soft16_image_new(void) { Soft16_Image *im; im = calloc(1, sizeof(Soft16_Image)); if (!im) return NULL; im->stride = -1; return (Image_Entry *) im; } static void _evas_common_soft16_image_delete(Image_Entry *ie) { memset(ie, 0xFF, sizeof (Soft16_Image)); free(ie); } static int _evas_common_soft16_image_surface_alloc(Image_Entry *ie, unsigned int w, unsigned int h) { Soft16_Image *im = (Soft16_Image *) ie; if (im->stride < 0) im->stride = _calc_stride(w); im->pixels = realloc(im->pixels, IMG_BYTE_SIZE(im->stride, h, ie->flags.alpha)); if (!im->pixels) return -1; if (ie->flags.alpha) { im->alpha = (DATA8 *)(im->pixels + (im->stride * h)); im->flags.free_alpha = 0; } im->flags.free_pixels = 1; return 0; } static void _evas_common_soft16_image_surface_delete(Image_Entry *ie) { Soft16_Image *im = (Soft16_Image *) ie; if (im->flags.free_pixels) free(im->pixels); im->pixels = NULL; im->flags.free_pixels = 0; if (im->flags.free_alpha) free(im->alpha); im->alpha = NULL; im->flags.free_alpha = 0; } static DATA32 * _evas_common_soft16_image_surface_pixels(Image_Entry *ie __UNUSED__) { abort(); return NULL; } static int _evas_common_load_soft16_image_from_file(Image_Entry *ie) { Soft16_Image *sim = (Soft16_Image *) ie; RGBA_Image *im; int error = 0; im = (RGBA_Image *) evas_cache_image_request(evas_common_image_cache_get(), sim->cache_entry.file, sim->cache_entry.key, &sim->cache_entry.load_opts, &error); sim->source = im; if (!sim->source) return -1; sim->cache_entry.w = sim->source->cache_entry.w; sim->cache_entry.h = sim->source->cache_entry.h; ie->flags.alpha = im->cache_entry.flags.alpha; sim->cache_entry.info = im->cache_entry.info; if (sim->stride < 0) sim->stride = _calc_stride(sim->cache_entry.w); return 0; } static void _evas_common_soft16_image_unload(Image_Entry *ie __UNUSED__) { } static void _evas_common_soft16_image_dirty_region(Image_Entry *im __UNUSED__, unsigned int x __UNUSED__, unsigned int y __UNUSED__, unsigned int w __UNUSED__, unsigned int h __UNUSED__) { } static int _evas_common_soft16_image_dirty(Image_Entry *ie_dst, const Image_Entry *ie_src) { Soft16_Image *dst = (Soft16_Image *) ie_dst; Soft16_Image *src = (Soft16_Image *) ie_src; evas_cache_image_load_data(&src->cache_entry); evas_cache_image_surface_alloc(&dst->cache_entry, src->cache_entry.w, src->cache_entry.h); /* evas_common_blit_rectangle(src, dst, 0, 0, src->cache_entry.w, src->cache_entry.h, 0, 0); */ return 0; } static int _evas_common_soft16_image_ram_usage(Image_Entry *ie) { Soft16_Image *im = (Soft16_Image *) ie; if (im->pixels && im->flags.free_pixels) return IMG_BYTE_SIZE(im->stride, im->cache_entry.h, ie->flags.alpha); return 0; } static int _evas_common_soft16_image_size_set(Image_Entry *ie_dst, const Image_Entry *ie_im, unsigned int w __UNUSED__, unsigned int h __UNUSED__) { Soft16_Image *dst = (Soft16_Image *) ie_dst; Soft16_Image *im = (Soft16_Image *) ie_im; dst->flags = im->flags; return 0; } static int _evas_common_soft16_image_from_data(Image_Entry* ie_dst, unsigned int w, unsigned int h, DATA32 *image_data, int alpha, int cspace __UNUSED__) { Soft16_Image *im = (Soft16_Image *) ie_dst; /* FIXME: handle colorspace */ ie_dst->w = w; ie_dst->h = h; ie_dst->flags.alpha = alpha; im->flags.free_pixels = 0; im->flags.free_alpha = 0; if (im->stride < 0) im->stride = _calc_stride(w); /* FIXME: That's bad, the application must be aware of the engine internal. */ im->pixels = (DATA16 *) image_data; if (ie_dst->flags.alpha) im->alpha = (DATA8 *)(im->pixels + (im->stride * h)); return 0; } static int _evas_common_soft16_image_from_copied_data(Image_Entry* ie_dst, unsigned int w __UNUSED__, unsigned int h, DATA32 *image_data, int alpha __UNUSED__, int cspace __UNUSED__) { Soft16_Image *im = (Soft16_Image *) ie_dst; /* FIXME: handle colorspace */ if (image_data) memcpy(im->pixels, image_data, IMG_BYTE_SIZE(im->stride, h, ie_dst->flags.alpha)); else memset(im->pixels, 0, IMG_BYTE_SIZE(im->stride, h, ie_dst->flags.alpha)); return 0; } static int _evas_common_soft16_image_colorspace_set(Image_Entry* ie_dst __UNUSED__, int cspace __UNUSED__) { /* FIXME: handle colorspace */ return 0; } static int _evas_common_load_soft16_image_data_from_file(Image_Entry *ie) { Soft16_Image *im = (Soft16_Image *) ie; if (im->pixels) return 0; if (!im->source) return -1; evas_cache_image_load_data(&im->source->cache_entry); if (im->source->image.data) { DATA32 *sp; evas_cache_image_surface_alloc(&im->cache_entry, im->source->cache_entry.w, im->source->cache_entry.h); sp = im->source->image.data; if (im->alpha) evas_common_soft16_image_convert_from_rgba(im, sp); else evas_common_soft16_image_convert_from_rgb(im, sp); } evas_cache_image_drop(&im->source->cache_entry); im->cache_entry.info.module = NULL; im->cache_entry.info.loader = NULL; im->source = NULL; return 0; } /* Soft16_Image * */ /* evas_common_soft16_image_new(int w, int h, int stride, int have_alpha, DATA16 *pixels, */ /* int copy) */ /* { */ /* Soft16_Image *im; */ /* if (stride < 0) stride = _calc_stride(w); */ /* im = evas_common_soft16_image_alloc(w, h, stride, have_alpha, copy); */ /* if (!im) return NULL; */ /* if (pixels) */ /* { */ /* if (copy) */ /* memcpy(im->pixels, pixels, IMG_BYTE_SIZE(stride, h, have_alpha)); */ /* else */ /* { */ /* im->pixels = pixels; */ /* if (have_alpha) im->alpha = (DATA8 *)(im->pixels + (stride * h)); */ /* } */ /* } */ /* return im; */ /* } */ static inline void _get_clip(const RGBA_Draw_Context *dc, const Soft16_Image *im, Eina_Rectangle *clip) { if (dc->clip.use) { EINA_RECTANGLE_SET(clip, dc->clip.x, dc->clip.y, dc->clip.w, dc->clip.h); if (clip->x < 0) { clip->w += clip->x; clip->x = 0; } if (clip->y < 0) { clip->h += clip->y; clip->y = 0; } if ((clip->x + clip->w) > (int)im->cache_entry.w) clip->w = im->cache_entry.w - clip->x; if ((clip->y + clip->h) > (int)im->cache_entry.h) clip->h = im->cache_entry.h - clip->y; } else { EINA_RECTANGLE_SET(clip, 0, 0, im->cache_entry.w, im->cache_entry.h); } } static inline int _is_empty_rectangle(const Eina_Rectangle *r) { return (r->w < 1) || (r->h < 1); } static inline void _shrink(int *s_pos, int *s_size, int pos, int size) { int d; d = (*s_pos) - pos; if (d < 0) { (*s_size) += d; (*s_pos) = pos; } d = size + pos - (*s_pos); if ((*s_size) > d) (*s_size) = d; } static int _soft16_adjust_areas(Eina_Rectangle *src, int src_max_x, int src_max_y, Eina_Rectangle *dst, int dst_max_x, int dst_max_y, Eina_Rectangle *dst_clip) { if (_is_empty_rectangle(src) || _is_empty_rectangle(dst) || _is_empty_rectangle(dst_clip)) return 0; /* shrink clip */ _shrink(&dst_clip->x, &dst_clip->w, dst->x, dst->w); _shrink(&dst_clip->y, &dst_clip->h, dst->y, dst->h); if (_is_empty_rectangle(dst_clip)) return 0; /* sanitise x */ if (src->x < 0) { dst->x -= (src->x * dst->w) / src->w; dst->w += (src->x * dst->w) / src->w; src->w += src->x; src->x = 0; } if (src->x >= src_max_x) return 0; if ((src->x + src->w) > src_max_x) { dst->w = (dst->w * (src_max_x - src->x)) / (src->w); src->w = src_max_x - src->x; } if (dst->w <= 0) return 0; if (src->w <= 0) return 0; if (dst_clip->x < 0) { dst_clip->w += dst_clip->x; dst_clip->x = 0; } if (dst_clip->w <= 0) return 0; if (dst_clip->x >= dst_max_x) return 0; _shrink(&dst_clip->x, &dst_clip->w, 0, dst_max_x); if (dst_clip->w <= 0) return 0; /* sanitise y */ if (src->y < 0) { dst->y -= (src->y * dst->h) / src->h; dst->h += (src->y * dst->h) / src->h; src->h += src->y; src->y = 0; } if (src->y >= src_max_y) return 0; if ((src->y + src->h) > src_max_y) { dst->h = (dst->h * (src_max_y - src->y)) / (src->h); src->h = src_max_y - src->y; } if (dst->h <= 0) return 0; if (src->h <= 0) return 0; if (dst_clip->y < 0) { dst_clip->h += dst_clip->y; dst_clip->y = 0; } if (dst_clip->h <= 0) return 0; if (dst_clip->y >= dst_max_y) return 0; _shrink(&dst_clip->y, &dst_clip->h, 0, dst_max_y); if (dst_clip->h <= 0) return 0; return 1; } static void _soft16_image_draw_sampled_int(Soft16_Image *src, Soft16_Image *dst, RGBA_Draw_Context *dc, Eina_Rectangle sr, Eina_Rectangle dr) { Eina_Rectangle cr; if (!(RECTS_INTERSECT(dr.x, dr.y, dr.w, dr.h, 0, 0, dst->cache_entry.w, dst->cache_entry.h))) return; if (!(RECTS_INTERSECT(sr.x, sr.y, sr.w, sr.h, 0, 0, src->cache_entry.w, src->cache_entry.h))) return; _get_clip(dc, dst, &cr); if (!_soft16_adjust_areas(&sr, src->cache_entry.w, src->cache_entry.h, &dr, dst->cache_entry.w, dst->cache_entry.h, &cr)) return; if ((dr.w == sr.w) && (dr.h == sr.h)) evas_common_soft16_image_draw_unscaled(src, dst, dc, sr, dr, cr); else evas_common_soft16_image_draw_scaled_sampled(src, dst, dc, sr, dr, cr); } EAPI 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 __UNUSED__) { static Cutout_Rects *rects = NULL; Eina_Rectangle sr, dr; Cutout_Rect *r; struct RGBA_Draw_Context_clip clip_bkp; int i; /* handle cutouts here! */ EINA_RECTANGLE_SET(&dr, dst_region_x, dst_region_y, dst_region_w, dst_region_h); if (_is_empty_rectangle(&dr)) return; if (!(RECTS_INTERSECT(dr.x, dr.y, dr.w, dr.h, 0, 0, dst->cache_entry.w, dst->cache_entry.h))) return; EINA_RECTANGLE_SET(&sr, src_region_x, src_region_y, src_region_w, src_region_h); if (_is_empty_rectangle(&sr)) return; if (!(RECTS_INTERSECT(sr.x, sr.y, sr.w, sr.h, 0, 0, src->cache_entry.w, src->cache_entry.h))) return; /* no cutouts - cut right to the chase */ if (!dc->cutout.rects) { _soft16_image_draw_sampled_int(src, dst, dc, sr, dr); return; } /* save out clip info */ clip_bkp = dc->clip; evas_common_draw_context_clip_clip(dc, 0, 0, dst->cache_entry.w, dst->cache_entry.h); evas_common_draw_context_clip_clip(dc, dst_region_x, dst_region_y, dst_region_w, dst_region_h); /* our clip is 0 size.. abort */ if ((dc->clip.w <= 0) || (dc->clip.h <= 0)) { dc->clip = clip_bkp; return; } rects = evas_common_draw_context_apply_cutouts(dc, rects); for (i = 0; i < rects->active; i++) { r = rects->rects + i; evas_common_draw_context_set_clip(dc, r->x, r->y, r->w, r->h); _soft16_image_draw_sampled_int(src, dst, dc, sr, dr); } dc->clip = clip_bkp; } EAPI Soft16_Image * evas_common_soft16_image_alpha_set(Soft16_Image *im, int have_alpha) { Soft16_Image *new_im; if (im->cache_entry.flags.alpha == have_alpha) return im; new_im = (Soft16_Image *) evas_cache_image_alone(&im->cache_entry); new_im->cache_entry.flags.alpha = have_alpha; if (im->cache_entry.w > 0 && im->cache_entry.h) new_im = (Soft16_Image *) evas_cache_image_size_set(&new_im->cache_entry, im->cache_entry.w, im->cache_entry.h); return new_im; } /* Soft16_Image * */ /* evas_common_soft16_image_size_set(Soft16_Image *old_im, int w, int h) */ /* { */ /* Soft16_Image *new_im; */ /* DATA16 *dp, *sp; */ /* int i, cw, ch, ew; */ /* if ((old_im->cache_entry.w == w) && (old_im->cache_entry.h == h)) return old_im; */ /* new_im = evas_common_soft16_image_new(w, h, -1, old_im->flags.have_alpha, NULL, 1); */ /* if (old_im->cache_entry.w < new_im->cache_entry.w) */ /* cw = old_im->cache_entry.w; */ /* else */ /* cw = new_im->cache_entry.w; */ /* ew = new_im->cache_entry.w - cw; */ /* if (old_im->cache_entry.h < new_im->cache_entry.h) */ /* ch = old_im->cache_entry.h; */ /* else */ /* ch = new_im->cache_entry.h; */ /* dp = new_im->pixels; */ /* sp = old_im->pixels; */ /* for (i = 0; i < ch; i++) */ /* { */ /* memcpy(dp, sp, cw * sizeof(DATA16)); */ /* if (ew > 0) memset(dp, 0, ew * sizeof(DATA16)); */ /* dp += new_im->stride; */ /* sp += old_im->stride; */ /* } */ /* if (old_im->flags.have_alpha) */ /* { */ /* DATA8 *dp, *sp; */ /* dp = new_im->alpha; */ /* sp = old_im->alpha; */ /* for (i = 0; i < ch; i++) */ /* { */ /* memcpy(dp, sp, cw * sizeof(DATA8)); */ /* if (ew > 0) memset(dp, 0, ew * sizeof(DATA8)); */ /* dp += new_im->stride; */ /* sp += old_im->stride; */ /* } */ /* } */ /* evas_cache_image_drop(&old_im->cache_entry); */ /* return new_im; */ /* } */ evas-1.7.9/src/lib/engines/common_16/Makefile.in0000664000175000017500000006374012234557302016256 00000000000000# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/lib/engines/common_16 DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/efl_attribute.m4 \ $(top_srcdir)/m4/efl_coverage.m4 \ $(top_srcdir)/m4/efl_doxygen.m4 \ $(top_srcdir)/m4/efl_fnmatch.m4 \ $(top_srcdir)/m4/efl_path_max.m4 \ $(top_srcdir)/m4/efl_shm_open.m4 $(top_srcdir)/m4/efl_tests.m4 \ $(top_srcdir)/m4/evas_check_engine.m4 \ $(top_srcdir)/m4/evas_check_loader.m4 \ $(top_srcdir)/m4/evas_converter.m4 \ $(top_srcdir)/m4/evas_dither.m4 \ $(top_srcdir)/m4/evas_scaler.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libevas_engine_common_16_la_LIBADD = am_libevas_engine_common_16_la_OBJECTS = evas_soft16_dither_mask.lo \ evas_soft16_font.lo evas_soft16_image_scaled_sampled.lo \ evas_soft16_image_unscaled.lo evas_soft16_main.lo \ evas_soft16_rectangle.lo evas_soft16_line.lo \ evas_soft16_polygon.lo libevas_engine_common_16_la_OBJECTS = \ $(am_libevas_engine_common_16_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libevas_engine_common_16_la_SOURCES) DIST_SOURCES = $(libevas_engine_common_16_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHECK_CFLAGS = @CHECK_CFLAGS@ CHECK_LIBS = @CHECK_LIBS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@ DIRECTFB_LIBS = @DIRECTFB_LIBS@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ ECORE_EVAS_CFLAGS = @ECORE_EVAS_CFLAGS@ ECORE_EVAS_LIBS = @ECORE_EVAS_LIBS@ EDB_CFLAGS = @EDB_CFLAGS@ EDB_LIBS = @EDB_LIBS@ EDJE_CFLAGS = @EDJE_CFLAGS@ EDJE_LIBS = @EDJE_LIBS@ EET_CFLAGS = @EET_CFLAGS@ EET_LIBS = @EET_LIBS@ EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@ EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@ EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@ EFL_SHM_OPEN_LIBS = @EFL_SHM_OPEN_LIBS@ EGREP = @EGREP@ EINA_CFLAGS = @EINA_CFLAGS@ EINA_LIBS = @EINA_LIBS@ EVAS_CFLAGS = @EVAS_CFLAGS@ EVAS_GENERAL_CFLAGS = @EVAS_GENERAL_CFLAGS@ EVAS_GENERAL_LIBS = @EVAS_GENERAL_LIBS@ EVAS_LIBS = @EVAS_LIBS@ EVAS_SSE3_CFLAGS = @EVAS_SSE3_CFLAGS@ EVIL_CFLAGS = @EVIL_CFLAGS@ EVIL_LIBS = @EVIL_LIBS@ EXEEXT = @EXEEXT@ EXOTIC_CFLAGS = @EXOTIC_CFLAGS@ EXOTIC_LIBS = @EXOTIC_LIBS@ FGREP = @FGREP@ FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@ FONTCONFIG_LIBS = @FONTCONFIG_LIBS@ FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ FREETYPE_LIBS = @FREETYPE_LIBS@ FRIBIDI_CFLAGS = @FRIBIDI_CFLAGS@ FRIBIDI_LIBS = @FRIBIDI_LIBS@ GL_EET_CFLAGS = @GL_EET_CFLAGS@ GL_EET_LIBS = @GL_EET_LIBS@ GREP = @GREP@ HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@ HARFBUZZ_LIBS = @HARFBUZZ_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LINEBREAK_CFLAGS = @LINEBREAK_CFLAGS@ LINEBREAK_LIBS = @LINEBREAK_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MODULE_ARCH = @MODULE_ARCH@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ SDL_CFLAGS = @SDL_CFLAGS@ SDL_LIBS = @SDL_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ SVG_CFLAGS = @SVG_CFLAGS@ SVG_LIBS = @SVG_LIBS@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ XCB_CFLAGS = @XCB_CFLAGS@ XCB_GL_CFLAGS = @XCB_GL_CFLAGS@ XCB_GL_LIBS = @XCB_GL_LIBS@ XCB_LIBS = @XCB_LIBS@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_ct_OBJC = @ac_ct_OBJC@ altivec_cflags = @altivec_cflags@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ dlopen_libs = @dlopen_libs@ docdir = @docdir@ dvidir = @dvidir@ edje_cc = @edje_cc@ efl_doxygen = @efl_doxygen@ efl_have_doxygen = @efl_have_doxygen@ evas_engine_buffer_cflags = @evas_engine_buffer_cflags@ evas_engine_buffer_libs = @evas_engine_buffer_libs@ evas_engine_direct3d_cflags = @evas_engine_direct3d_cflags@ evas_engine_direct3d_libs = @evas_engine_direct3d_libs@ evas_engine_directfb_cflags = @evas_engine_directfb_cflags@ evas_engine_directfb_libs = @evas_engine_directfb_libs@ evas_engine_fb_cflags = @evas_engine_fb_cflags@ evas_engine_fb_libs = @evas_engine_fb_libs@ evas_engine_gl_cocoa_cflags = @evas_engine_gl_cocoa_cflags@ evas_engine_gl_cocoa_libs = @evas_engine_gl_cocoa_libs@ evas_engine_gl_common_libs = @evas_engine_gl_common_libs@ evas_engine_gl_sdl_cflags = @evas_engine_gl_sdl_cflags@ evas_engine_gl_sdl_libs = @evas_engine_gl_sdl_libs@ evas_engine_gl_xcb_cflags = @evas_engine_gl_xcb_cflags@ evas_engine_gl_xcb_libs = @evas_engine_gl_xcb_libs@ evas_engine_gl_xlib_cflags = @evas_engine_gl_xlib_cflags@ evas_engine_gl_xlib_libs = @evas_engine_gl_xlib_libs@ evas_engine_psl1ght_cflags = @evas_engine_psl1ght_cflags@ evas_engine_psl1ght_libs = @evas_engine_psl1ght_libs@ evas_engine_software_16_sdl_cflags = @evas_engine_software_16_sdl_cflags@ evas_engine_software_16_sdl_libs = @evas_engine_software_16_sdl_libs@ evas_engine_software_16_wince_cflags = @evas_engine_software_16_wince_cflags@ evas_engine_software_16_wince_libs = @evas_engine_software_16_wince_libs@ evas_engine_software_16_x11_cflags = @evas_engine_software_16_x11_cflags@ evas_engine_software_16_x11_libs = @evas_engine_software_16_x11_libs@ evas_engine_software_8_x11_cflags = @evas_engine_software_8_x11_cflags@ evas_engine_software_8_x11_libs = @evas_engine_software_8_x11_libs@ evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@ evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@ evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@ evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ evas_image_loader_edb_libs = @evas_image_loader_edb_libs@ evas_image_loader_eet_cflags = @evas_image_loader_eet_cflags@ evas_image_loader_eet_libs = @evas_image_loader_eet_libs@ evas_image_loader_generic_cflags = @evas_image_loader_generic_cflags@ evas_image_loader_generic_libs = @evas_image_loader_generic_libs@ evas_image_loader_gif_cflags = @evas_image_loader_gif_cflags@ evas_image_loader_gif_libs = @evas_image_loader_gif_libs@ evas_image_loader_ico_cflags = @evas_image_loader_ico_cflags@ evas_image_loader_ico_libs = @evas_image_loader_ico_libs@ evas_image_loader_jpeg_cflags = @evas_image_loader_jpeg_cflags@ evas_image_loader_jpeg_libs = @evas_image_loader_jpeg_libs@ evas_image_loader_pmaps_cflags = @evas_image_loader_pmaps_cflags@ evas_image_loader_pmaps_libs = @evas_image_loader_pmaps_libs@ evas_image_loader_png_cflags = @evas_image_loader_png_cflags@ evas_image_loader_png_libs = @evas_image_loader_png_libs@ evas_image_loader_psd_cflags = @evas_image_loader_psd_cflags@ evas_image_loader_psd_libs = @evas_image_loader_psd_libs@ evas_image_loader_svg_cflags = @evas_image_loader_svg_cflags@ evas_image_loader_svg_libs = @evas_image_loader_svg_libs@ evas_image_loader_tga_cflags = @evas_image_loader_tga_cflags@ evas_image_loader_tga_libs = @evas_image_loader_tga_libs@ evas_image_loader_tiff_cflags = @evas_image_loader_tiff_cflags@ evas_image_loader_tiff_libs = @evas_image_loader_tiff_libs@ evas_image_loader_wbmp_cflags = @evas_image_loader_wbmp_cflags@ evas_image_loader_wbmp_libs = @evas_image_loader_wbmp_libs@ evas_image_loader_xpm_cflags = @evas_image_loader_xpm_cflags@ evas_image_loader_xpm_libs = @evas_image_loader_xpm_libs@ exec_prefix = @exec_prefix@ have_evas_engine_gl_x11 = @have_evas_engine_gl_x11@ have_evas_engine_gl_xcb = @have_evas_engine_gl_xcb@ have_evas_engine_gl_xlib = @have_evas_engine_gl_xlib@ have_evas_engine_software_x11 = @have_evas_engine_software_x11@ have_evas_engine_software_xcb = @have_evas_engine_software_xcb@ have_evas_engine_software_xlib = @have_evas_engine_software_xlib@ have_lcov = @have_lcov@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_enable_auto_import = @lt_enable_auto_import@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgconfig_requires_private = @pkgconfig_requires_private@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pthread_cflags = @pthread_cflags@ pthread_libs = @pthread_libs@ release_info = @release_info@ requirement_evas = @requirement_evas@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ shm_open_libs = @shm_open_libs@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ version_info = @version_info@ MAINTAINERCLEANFILES = Makefile.in AM_CPPFLAGS = \ -I. \ -I$(top_srcdir)/src/lib \ -I$(top_srcdir)/src/lib/include \ @FREETYPE_CFLAGS@ \ @PIXMAN_CFLAGS@ \ @FRIBIDI_CFLAGS@ \ @VALGRIND_CFLAGS@ \ @EVAS_GENERAL_CFLAGS@ \ @EET_CFLAGS@ \ @pthread_cflags@ noinst_LTLIBRARIES = libevas_engine_common_16.la libevas_engine_common_16_la_SOURCES = \ evas_soft16_dither_mask.c \ evas_soft16_font.c \ evas_soft16_image_scaled_sampled.c \ evas_soft16_image_unscaled.c \ evas_soft16_main.c \ evas_soft16_rectangle.c \ evas_soft16_line.c \ evas_soft16_polygon.c libevas_engine_common_16_la_DEPENDENCIES = $(top_builddir)/config.h EXTRA_DIST = \ evas_soft16_point_blend.c \ evas_soft16_scanline_blend.c \ evas_soft16_scanline_fill.c all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/lib/engines/common_16/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/lib/engines/common_16/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libevas_engine_common_16.la: $(libevas_engine_common_16_la_OBJECTS) $(libevas_engine_common_16_la_DEPENDENCIES) $(EXTRA_libevas_engine_common_16_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libevas_engine_common_16_la_OBJECTS) $(libevas_engine_common_16_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_soft16_dither_mask.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_soft16_font.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_soft16_image_scaled_sampled.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_soft16_image_unscaled.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_soft16_line.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_soft16_main.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_soft16_polygon.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_soft16_rectangle.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES cscopelist-am ctags \ ctags-am distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: evas-1.7.9/src/lib/engines/common_16/evas_soft16_dither_mask.c0000664000175000017500000020405212175475547021076 00000000000000#include "evas_common_soft16.h" #define S16_DM_SIZE 128 #define S16_DM_BITS 6 #define S16_DM_DIV 64 #define S16_DM_MSK (S16_DM_SIZE - 1) #define S16_DM_SHF(_b) (S16_DM_BITS - (8 - _b)) static const DATA8 dither_table[S16_DM_SIZE][S16_DM_SIZE] = { { 0, 41, 23, 5, 17, 39, 7, 15, 62, 23, 40, 51, 31, 47, 9, 32, 52, 27, 57, 25, 6, 61, 27, 52, 37, 7, 40, 63, 18, 36, 10, 42, 25, 62, 45, 34, 20, 42, 37, 14, 35, 29, 50, 10, 61, 2, 40, 8, 37, 12, 58, 22, 5, 41, 10, 39, 0, 60, 11, 46, 2, 55, 38, 17, 36, 59, 13, 54, 37, 56, 8, 29, 16, 13, 63, 22, 41, 55, 7, 20, 49, 14, 23, 55, 37, 23, 19, 36, 15, 49, 23, 63, 30, 14, 38, 27, 53, 13, 22, 41, 19, 31, 7, 19, 50, 30, 49, 16, 3, 32, 56, 40, 29, 34, 8, 48, 19, 45, 4, 51, 12, 46, 35, 49, 16, 42, 12, 62 }, { 30, 57, 36, 54, 47, 34, 52, 27, 43, 4, 28, 7, 17, 36, 62, 13, 44, 7, 18, 48, 33, 21, 44, 14, 30, 47, 12, 33, 5, 55, 31, 58, 13, 30, 4, 17, 52, 10, 60, 26, 46, 0, 39, 27, 42, 22, 47, 25, 60, 32, 9, 38, 48, 17, 59, 30, 49, 18, 34, 25, 51, 19, 5, 48, 21, 8, 28, 46, 1, 32, 41, 19, 54, 47, 37, 18, 28, 11, 44, 30, 39, 56, 2, 33, 8, 42, 61, 28, 58, 8, 46, 9, 41, 4, 58, 7, 21, 48, 59, 10, 52, 14, 42, 57, 12, 25, 7, 53, 42, 24, 11, 50, 17, 59, 42, 2, 36, 60, 32, 17, 63, 29, 21, 7, 59, 32, 24, 39 }, { 22, 8, 16, 32, 3, 25, 13, 57, 18, 45, 58, 39, 55, 20, 5, 42, 23, 34, 63, 1, 51, 10, 58, 4, 60, 23, 53, 27, 44, 21, 3, 48, 8, 50, 43, 54, 27, 32, 5, 55, 21, 58, 12, 53, 6, 36, 14, 50, 17, 29, 53, 15, 24, 52, 7, 36, 13, 42, 4, 53, 9, 35, 61, 26, 56, 32, 49, 15, 62, 23, 6, 60, 2, 31, 4, 48, 58, 38, 15, 61, 5, 25, 47, 28, 50, 15, 7, 40, 3, 32, 33, 52, 25, 50, 35, 42, 61, 3, 28, 36, 23, 63, 4, 33, 46, 62, 36, 23, 60, 6, 54, 28, 4, 37, 23, 55, 25, 8, 42, 54, 14, 6, 56, 38, 19, 52, 4, 46 }, { 48, 53, 43, 12, 45, 63, 30, 37, 9, 34, 21, 1, 25, 47, 29, 58, 3, 54, 15, 39, 29, 17, 38, 35, 20, 43, 1, 49, 15, 59, 29, 39, 22, 35, 16, 23, 1, 47, 39, 18, 8, 44, 25, 31, 57, 19, 63, 4, 45, 3, 42, 61, 1, 31, 45, 20, 57, 29, 62, 21, 32, 41, 14, 44, 3, 39, 5, 34, 10, 43, 51, 35, 23, 52, 40, 10, 21, 1, 53, 18, 51, 43, 12, 62, 18, 54, 26, 51, 20, 57, 14, 1, 62, 16, 11, 18, 32, 39, 17, 44, 1, 48, 26, 37, 18, 2, 51, 14, 28, 45, 35, 18, 57, 13, 47, 11, 51, 20, 2, 39, 31, 47, 25, 1, 50, 11, 60, 7 }, { 18, 28, 1, 56, 21, 10, 51, 2, 46, 54, 14, 61, 11, 50, 13, 38, 19, 31, 45, 9, 55, 24, 47, 5, 54, 9, 62, 11, 35, 8, 51, 14, 57, 6, 63, 40, 58, 14, 51, 28, 62, 34, 15, 48, 1, 41, 30, 35, 55, 21, 34, 11, 49, 37, 8, 52, 4, 23, 15, 43, 1, 58, 11, 23, 53, 16, 55, 26, 58, 18, 27, 12, 45, 14, 25, 63, 42, 33, 27, 35, 9, 31, 21, 38, 1, 44, 34, 12, 48, 38, 21, 44, 29, 47, 26, 53, 1, 46, 54, 8, 59, 29, 11, 55, 22, 41, 33, 20, 39, 1, 48, 9, 44, 32, 5, 62, 29, 44, 57, 23, 10, 58, 34, 43, 15, 37, 26, 33 }, { 51, 38, 59, 24, 35, 42, 19, 60, 5, 32, 41, 26, 43, 33, 7, 53, 48, 11, 59, 23, 42, 2, 61, 30, 16, 40, 32, 24, 56, 41, 19, 33, 37, 26, 47, 9, 31, 22, 2, 45, 9, 54, 4, 37, 21, 52, 11, 23, 7, 57, 16, 25, 55, 18, 63, 27, 46, 39, 56, 10, 50, 37, 29, 47, 19, 63, 24, 9, 46, 2, 39, 60, 9, 57, 30, 7, 49, 11, 59, 3, 45, 57, 5, 60, 29, 22, 5, 60, 30, 9, 59, 18, 40, 6, 57, 36, 30, 12, 24, 34, 15, 40, 52, 6, 49, 9, 58, 4, 63, 12, 26, 61, 22, 53, 38, 16, 35, 14, 28, 50, 42, 17, 5, 28, 62, 20, 54, 12 }, { 26, 6, 31, 15, 49, 6, 38, 27, 22, 49, 16, 56, 2, 62, 30, 21, 0, 36, 28, 6, 49, 32, 13, 52, 26, 50, 19, 46, 3, 26, 62, 0, 53, 12, 29, 3, 53, 41, 60, 24, 38, 13, 58, 16, 43, 9, 59, 39, 46, 28, 44, 40, 2, 33, 13, 41, 16, 6, 47, 31, 26, 17, 57, 6, 38, 0, 42, 36, 29, 52, 20, 31, 48, 0, 34, 56, 20, 36, 23, 54, 14, 41, 24, 37, 10, 55, 46, 25, 16, 45, 36, 4, 55, 23, 15, 8, 50, 62, 5, 56, 44, 20, 13, 28, 59, 31, 24, 47, 31, 52, 37, 17, 40, 0, 26, 49, 3, 60, 7, 33, 0, 61, 53, 40, 8, 45, 2, 41 }, { 16, 63, 43, 4, 61, 24, 56, 13, 53, 8, 36, 12, 24, 41, 16, 46, 60, 26, 52, 39, 14, 57, 21, 37, 0, 45, 7, 59, 38, 17, 43, 10, 45, 20, 61, 43, 19, 11, 33, 17, 50, 32, 23, 61, 28, 49, 26, 0, 18, 51, 5, 60, 22, 58, 29, 0, 59, 34, 19, 62, 3, 52, 7, 44, 30, 59, 13, 50, 15, 62, 7, 17, 38, 22, 44, 15, 40, 4, 47, 28, 33, 17, 49, 16, 51, 40, 10, 56, 0, 53, 13, 49, 28, 38, 60, 21, 43, 19, 37, 27, 3, 51, 34, 39, 0, 45, 15, 43, 10, 21, 3, 55, 8, 33, 59, 10, 41, 18, 52, 24, 46, 20, 30, 13, 58, 22, 36, 57 }, { 50, 34, 11, 47, 29, 17, 44, 0, 33, 63, 28, 46, 52, 5, 57, 10, 42, 18, 4, 63, 20, 8, 44, 10, 56, 34, 14, 29, 5, 54, 23, 59, 32, 49, 7, 34, 49, 27, 56, 0, 42, 7, 46, 3, 40, 6, 54, 32, 62, 13, 36, 10, 47, 8, 35, 49, 24, 51, 12, 40, 22, 35, 60, 12, 22, 51, 33, 4, 40, 25, 43, 55, 5, 54, 12, 61, 26, 51, 8, 62, 0, 53, 7, 63, 2, 32, 19, 34, 42, 24, 31, 63, 2, 10, 45, 33, 0, 48, 9, 61, 22, 47, 8, 62, 18, 56, 7, 54, 27, 57, 46, 30, 50, 19, 45, 30, 56, 36, 22, 47, 11, 38, 3, 51, 32, 48, 18, 9 }, { 0, 21, 40, 19, 52, 9, 37, 48, 20, 40, 3, 18, 27, 38, 35, 22, 31, 56, 13, 35, 46, 28, 60, 40, 27, 18, 61, 50, 41, 30, 7, 36, 2, 25, 16, 57, 5, 15, 47, 29, 55, 19, 30, 52, 15, 34, 20, 12, 43, 30, 20, 54, 25, 44, 53, 12, 38, 5, 55, 27, 48, 15, 33, 27, 45, 8, 19, 28, 56, 11, 33, 49, 18, 36, 29, 2, 45, 16, 39, 19, 31, 43, 27, 35, 20, 52, 26, 6, 61, 11, 41, 17, 29, 51, 20, 56, 25, 32, 41, 17, 53, 31, 25, 14, 42, 23, 35, 16, 38, 6, 34, 12, 15, 62, 6, 21, 13, 1, 63, 9, 55, 27, 43, 25, 14, 4, 31, 55 }, { 44, 29, 61, 2, 35, 58, 26, 15, 60, 10, 51, 59, 14, 55, 8, 50, 2, 44, 25, 51, 1, 33, 16, 4, 48, 36, 2, 21, 12, 57, 48, 13, 51, 55, 40, 28, 37, 62, 8, 39, 12, 63, 36, 10, 59, 24, 56, 47, 9, 50, 41, 1, 32, 17, 6, 21, 61, 30, 9, 43, 1, 54, 41, 2, 54, 37, 48, 61, 1, 46, 21, 3, 58, 24, 50, 32, 60, 10, 57, 25, 46, 12, 59, 4, 45, 13, 57, 47, 27, 39, 5, 58, 47, 14, 35, 4, 52, 13, 60, 6, 36, 10, 45, 55, 4, 50, 29, 2, 61, 50, 25, 58, 44, 24, 36, 42, 54, 28, 40, 32, 16, 56, 6, 62, 46, 39, 60, 23 }, { 7, 48, 14, 54, 23, 40, 4, 45, 30, 22, 42, 32, 1, 44, 20, 29, 58, 8, 37, 19, 41, 54, 24, 58, 9, 53, 25, 46, 34, 16, 23, 38, 27, 11, 18, 1, 52, 21, 35, 22, 48, 5, 25, 45, 18, 38, 2, 27, 35, 4, 57, 15, 62, 39, 57, 28, 42, 16, 36, 60, 24, 18, 10, 63, 20, 5, 16, 23, 37, 14, 59, 27, 41, 8, 13, 42, 21, 35, 6, 50, 3, 38, 15, 48, 30, 39, 17, 3, 49, 14, 53, 33, 24, 7, 61, 44, 11, 39, 23, 49, 19, 58, 1, 32, 36, 12, 60, 41, 20, 13, 41, 4, 39, 1, 48, 8, 18, 51, 14, 44, 5, 37, 21, 34, 1, 26, 10, 37 }, { 53, 36, 27, 9, 50, 12, 32, 55, 2, 57, 7, 17, 48, 34, 63, 15, 40, 26, 62, 11, 49, 6, 31, 39, 22, 42, 6, 63, 1, 39, 60, 4, 42, 61, 32, 45, 24, 44, 2, 60, 16, 41, 53, 1, 33, 61, 49, 17, 63, 23, 45, 26, 33, 3, 23, 46, 2, 50, 20, 4, 45, 34, 49, 30, 39, 58, 44, 31, 53, 34, 6, 52, 30, 47, 63, 1, 53, 22, 42, 31, 58, 23, 54, 22, 61, 8, 36, 59, 22, 35, 21, 1, 55, 40, 27, 16, 30, 54, 2, 29, 43, 16, 39, 63, 21, 46, 26, 10, 48, 32, 19, 53, 30, 56, 26, 60, 33, 4, 61, 23, 49, 59, 15, 53, 19, 58, 42, 16 }, { 20, 5, 59, 46, 25, 62, 7, 19, 43, 25, 37, 61, 11, 24, 4, 54, 12, 52, 3, 32, 17, 61, 12, 47, 15, 55, 18, 31, 53, 28, 9, 50, 21, 6, 55, 9, 58, 14, 54, 26, 33, 7, 31, 58, 13, 21, 8, 42, 29, 6, 37, 11, 48, 52, 14, 60, 11, 39, 56, 32, 14, 58, 7, 26, 17, 4, 42, 8, 11, 47, 19, 38, 10, 17, 26, 37, 9, 55, 28, 13, 18, 40, 6, 33, 1, 43, 25, 11, 51, 7, 62, 43, 18, 37, 3, 57, 45, 9, 38, 58, 5, 52, 27, 7, 17, 53, 5, 57, 37, 2, 63, 9, 22, 15, 11, 38, 25, 45, 35, 0, 28, 10, 41, 30, 50, 8, 31, 57 }, { 49, 33, 16, 38, 1, 42, 51, 34, 53, 14, 28, 49, 30, 56, 36, 23, 43, 20, 38, 56, 22, 45, 28, 0, 62, 35, 26, 44, 11, 19, 52, 35, 44, 15, 30, 38, 10, 31, 40, 4, 46, 50, 20, 40, 27, 44, 51, 14, 56, 53, 19, 59, 7, 29, 41, 19, 35, 25, 8, 52, 22, 44, 13, 53, 50, 32, 61, 24, 56, 25, 63, 0, 45, 57, 33, 59, 16, 46, 4, 62, 50, 11, 60, 37, 52, 19, 55, 29, 37, 46, 13, 26, 48, 10, 50, 34, 21, 63, 26, 13, 42, 33, 22, 55, 35, 28, 43, 15, 24, 51, 27, 34, 46, 49, 58, 3, 52, 9, 57, 19, 48, 55, 3, 35, 12, 45, 24, 3 }, { 41, 11, 56, 28, 18, 31, 22, 10, 37, 6, 47, 13, 3, 41, 9, 46, 0, 48, 29, 6, 34, 10, 55, 37, 20, 8, 49, 3, 41, 59, 14, 25, 0, 63, 19, 47, 27, 51, 17, 57, 23, 10, 61, 6, 54, 3, 38, 31, 0, 22, 34, 43, 20, 55, 31, 0, 49, 63, 29, 38, 3, 62, 28, 40, 0, 22, 14, 35, 2, 48, 15, 43, 23, 14, 3, 29, 49, 20, 39, 34, 0, 44, 29, 9, 15, 47, 5, 42, 0, 31, 58, 5, 31, 61, 23, 15, 0, 47, 19, 50, 24, 3, 59, 11, 44, 0, 31, 59, 6, 42, 17, 60, 0, 39, 20, 31, 43, 17, 29, 40, 12, 25, 60, 22, 52, 15, 63, 29 }, { 20, 52, 8, 44, 62, 4, 59, 49, 17, 63, 21, 39, 60, 18, 52, 27, 33, 59, 14, 51, 59, 43, 24, 5, 51, 30, 57, 17, 32, 5, 37, 56, 48, 34, 42, 3, 60, 5, 36, 13, 43, 37, 18, 34, 25, 12, 59, 24, 47, 36, 11, 50, 3, 38, 9, 58, 16, 5, 43, 18, 47, 10, 37, 18, 59, 46, 29, 52, 40, 12, 34, 28, 56, 36, 53, 7, 43, 8, 24, 52, 26, 17, 56, 43, 24, 32, 63, 20, 57, 16, 22, 52, 36, 8, 41, 56, 29, 32, 54, 7, 35, 57, 14, 48, 20, 62, 13, 39, 53, 29, 8, 45, 13, 29, 7, 61, 14, 54, 6, 63, 38, 32, 18, 43, 2, 39, 6, 47 }, { 0, 58, 23, 35, 13, 46, 12, 39, 0, 31, 55, 24, 5, 35, 15, 61, 17, 5, 39, 25, 18, 2, 50, 33, 41, 13, 39, 23, 62, 46, 29, 12, 22, 8, 56, 25, 20, 49, 32, 62, 0, 56, 11, 46, 63, 42, 9, 16, 55, 5, 60, 15, 62, 26, 45, 21, 36, 51, 13, 57, 31, 24, 55, 6, 35, 9, 57, 5, 20, 60, 7, 51, 5, 19, 40, 25, 61, 32, 56, 12, 36, 48, 21, 2, 58, 12, 39, 28, 9, 50, 40, 12, 44, 18, 25, 49, 6, 38, 11, 62, 18, 46, 30, 9, 40, 25, 49, 19, 10, 36, 55, 22, 33, 52, 41, 18, 37, 27, 49, 21, 2, 46, 7, 53, 33, 61, 27, 35 }, { 41, 31, 5, 39, 51, 26, 33, 57, 27, 41, 9, 44, 54, 29, 48, 7, 44, 36, 57, 10, 31, 63, 16, 45, 11, 60, 1, 47, 7, 20, 43, 3, 58, 36, 13, 52, 39, 7, 15, 28, 22, 48, 30, 21, 1, 29, 49, 44, 27, 17, 40, 30, 24, 42, 12, 53, 33, 7, 47, 20, 1, 42, 11, 49, 25, 43, 17, 32, 45, 27, 41, 21, 31, 62, 11, 49, 2, 15, 42, 5, 63, 7, 41, 27, 49, 6, 54, 23, 46, 34, 2, 28, 54, 3, 59, 12, 46, 17, 42, 28, 40, 1, 37, 51, 5, 55, 2, 34, 47, 16, 3, 62, 47, 5, 23, 56, 1, 44, 12, 34, 51, 16, 57, 11, 25, 17, 54, 13 }, { 60, 26, 55, 18, 3, 60, 20, 6, 52, 15, 50, 19, 32, 11, 23, 53, 26, 21, 1, 47, 42, 27, 8, 58, 21, 27, 53, 36, 26, 54, 31, 50, 17, 30, 45, 1, 29, 59, 44, 53, 41, 4, 35, 58, 51, 19, 32, 4, 52, 34, 48, 8, 51, 5, 56, 2, 25, 61, 27, 38, 54, 27, 62, 21, 51, 1, 39, 62, 10, 50, 1, 58, 13, 47, 38, 18, 35, 54, 22, 51, 30, 19, 59, 34, 14, 32, 44, 4, 60, 15, 52, 62, 20, 43, 30, 35, 21, 60, 4, 52, 12, 24, 61, 18, 30, 42, 23, 61, 25, 50, 27, 38, 11, 59, 12, 35, 50, 30, 59, 24, 8, 42, 28, 37, 48, 9, 44, 21 }, { 10, 47, 15, 50, 30, 43, 8, 45, 29, 2, 36, 59, 1, 58, 41, 3, 63, 31, 54, 20, 13, 55, 35, 38, 4, 44, 15, 9, 61, 2, 14, 38, 61, 10, 23, 54, 18, 12, 24, 2, 14, 55, 16, 8, 38, 14, 41, 60, 10, 23, 1, 58, 32, 17, 28, 37, 41, 15, 3, 60, 15, 33, 4, 36, 16, 59, 28, 14, 23, 55, 37, 18, 44, 28, 2, 57, 30, 10, 27, 46, 14, 38, 3, 53, 21, 61, 17, 35, 10, 41, 26, 7, 33, 9, 57, 1, 53, 37, 26, 20, 56, 48, 9, 33, 58, 16, 37, 7, 45, 1, 57, 15, 32, 26, 42, 23, 7, 20, 4, 54, 31, 62, 22, 1, 59, 30, 4, 51 }, { 36, 2, 38, 11, 24, 36, 54, 22, 62, 47, 25, 8, 28, 45, 16, 38, 12, 43, 9, 37, 49, 3, 23, 52, 18, 30, 50, 33, 19, 42, 49, 26, 6, 40, 47, 35, 63, 38, 50, 33, 60, 26, 36, 47, 24, 57, 6, 26, 39, 63, 19, 44, 14, 46, 61, 9, 50, 30, 45, 23, 10, 50, 44, 8, 31, 54, 6, 46, 36, 4, 30, 54, 8, 52, 22, 41, 4, 60, 40, 0, 58, 24, 45, 10, 37, 1, 48, 30, 56, 17, 38, 48, 24, 47, 19, 39, 14, 8, 45, 32, 2, 34, 27, 44, 4, 52, 11, 56, 31, 21, 40, 19, 44, 51, 2, 63, 46, 58, 36, 43, 14, 5, 50, 38, 14, 56, 40, 23 }, { 61, 46, 32, 63, 54, 1, 14, 34, 12, 40, 18, 49, 37, 10, 61, 30, 51, 24, 60, 7, 29, 40, 62, 11, 46, 58, 6, 56, 24, 10, 34, 52, 21, 59, 16, 3, 27, 5, 20, 46, 9, 40, 7, 62, 2, 30, 53, 15, 48, 10, 28, 35, 54, 6, 21, 34, 18, 55, 7, 40, 57, 19, 26, 60, 41, 13, 24, 51, 19, 61, 9, 25, 34, 15, 63, 11, 45, 17, 20, 47, 33, 8, 31, 62, 43, 26, 53, 7, 24, 59, 0, 13, 55, 4, 62, 27, 51, 31, 63, 15, 58, 7, 54, 14, 46, 22, 28, 43, 12, 63, 8, 54, 5, 17, 39, 33, 15, 10, 27, 17, 47, 34, 19, 45, 27, 12, 33, 17 }, { 5, 28, 21, 7, 17, 48, 42, 58, 23, 4, 63, 14, 55, 21, 34, 5, 19, 0, 45, 17, 52, 15, 25, 32, 0, 22, 40, 13, 45, 62, 18, 0, 43, 11, 33, 55, 30, 42, 57, 19, 51, 31, 22, 43, 18, 45, 34, 0, 43, 31, 56, 3, 23, 40, 59, 0, 44, 13, 48, 35, 2, 32, 46, 0, 21, 48, 35, 3, 40, 32, 43, 59, 0, 48, 33, 26, 53, 36, 55, 12, 51, 16, 55, 5, 18, 29, 11, 39, 51, 19, 45, 31, 42, 21, 35, 6, 22, 47, 10, 38, 23, 50, 20, 36, 0, 60, 38, 4, 50, 35, 48, 34, 24, 57, 9, 53, 28, 48, 61, 0, 56, 24, 53, 3, 63, 6, 42, 57 }, { 13, 53, 45, 40, 58, 27, 6, 16, 38, 51, 33, 30, 43, 2, 47, 56, 40, 50, 33, 57, 27, 5, 47, 42, 60, 36, 16, 54, 28, 4, 37, 57, 28, 51, 22, 8, 45, 14, 6, 39, 0, 54, 11, 59, 28, 12, 50, 21, 61, 13, 19, 38, 49, 11, 25, 37, 58, 29, 22, 63, 14, 56, 12, 53, 30, 63, 9, 57, 26, 12, 47, 16, 23, 39, 50, 6, 31, 2, 25, 6, 28, 41, 36, 22, 50, 57, 42, 3, 34, 8, 28, 61, 11, 50, 16, 54, 41, 0, 55, 43, 5, 29, 41, 63, 25, 16, 53, 18, 26, 10, 21, 0, 61, 30, 41, 22, 3, 38, 20, 39, 29, 8, 41, 16, 36, 52, 22, 19 }, { 55, 34, 0, 25, 10, 32, 56, 44, 28, 0, 57, 7, 26, 53, 23, 8, 13, 35, 22, 12, 36, 60, 20, 8, 14, 29, 48, 2, 41, 49, 23, 13, 39, 7, 48, 58, 25, 53, 34, 62, 28, 16, 48, 4, 37, 56, 27, 5, 36, 52, 46, 7, 62, 33, 52, 11, 17, 53, 5, 28, 41, 24, 38, 17, 5, 39, 20, 45, 15, 56, 5, 38, 60, 8, 14, 57, 21, 48, 62, 39, 59, 13, 1, 60, 9, 32, 16, 63, 44, 25, 52, 15, 36, 2, 60, 29, 12, 33, 25, 17, 59, 45, 13, 8, 49, 32, 6, 40, 59, 29, 45, 37, 13, 47, 6, 55, 30, 45, 9, 52, 13, 59, 25, 47, 32, 1, 49, 30 }, { 9, 39, 14, 61, 49, 37, 3, 20, 50, 13, 41, 19, 46, 17, 38, 59, 28, 62, 4, 44, 54, 1, 34, 51, 55, 7, 63, 32, 21, 8, 56, 31, 62, 19, 36, 1, 41, 17, 24, 12, 42, 35, 25, 52, 20, 8, 44, 59, 25, 2, 22, 42, 16, 29, 4, 46, 20, 36, 43, 9, 51, 8, 49, 26, 58, 33, 54, 1, 37, 29, 52, 20, 27, 45, 19, 35, 42, 16, 10, 32, 20, 49, 46, 27, 40, 4, 47, 22, 13, 55, 4, 47, 26, 44, 23, 40, 58, 19, 48, 13, 31, 2, 57, 34, 42, 19, 61, 32, 14, 55, 5, 51, 26, 19, 58, 16, 49, 14, 62, 5, 33, 44, 21, 7, 60, 26, 11, 41 }, { 62, 24, 47, 29, 8, 19, 53, 11, 60, 24, 32, 61, 4, 55, 31, 2, 49, 16, 39, 9, 31, 24, 43, 17, 26, 38, 11, 25, 58, 43, 12, 35, 3, 46, 15, 32, 63, 4, 49, 56, 2, 60, 10, 32, 63, 17, 39, 12, 55, 30, 57, 9, 48, 55, 39, 24, 60, 2, 58, 31, 19, 61, 34, 3, 42, 11, 22, 46, 7, 61, 10, 42, 3, 55, 32, 1, 58, 28, 44, 54, 4, 34, 23, 15, 56, 20, 37, 58, 6, 30, 38, 18, 63, 9, 32, 5, 51, 3, 62, 37, 52, 18, 39, 23, 3, 51, 9, 47, 1, 23, 43, 15, 60, 35, 11, 40, 1, 36, 31, 26, 57, 2, 37, 54, 18, 44, 58, 16 }, { 5, 51, 3, 33, 43, 62, 21, 42, 35, 9, 48, 15, 36, 10, 22, 42, 20, 46, 26, 56, 50, 12, 59, 3, 48, 19, 45, 53, 1, 27, 47, 17, 52, 24, 56, 11, 51, 21, 37, 30, 20, 46, 14, 41, 1, 47, 33, 7, 41, 17, 35, 27, 20, 1, 14, 54, 26, 33, 18, 47, 1, 44, 14, 59, 16, 52, 28, 18, 49, 31, 25, 34, 63, 13, 51, 24, 9, 50, 3, 23, 38, 63, 7, 52, 29, 46, 11, 33, 50, 22, 57, 36, 1, 57, 49, 17, 39, 28, 9, 35, 6, 27, 53, 15, 55, 30, 24, 58, 36, 41, 11, 52, 32, 3, 44, 25, 62, 23, 51, 15, 42, 22, 50, 10, 39, 4, 31, 35 }, { 46, 22, 57, 17, 12, 39, 26, 5, 31, 59, 1, 45, 27, 62, 52, 7, 58, 33, 6, 18, 39, 22, 33, 41, 57, 5, 35, 18, 40, 16, 60, 5, 29, 42, 7, 39, 27, 44, 9, 47, 8, 26, 54, 22, 51, 29, 24, 49, 15, 61, 4, 51, 31, 63, 43, 6, 50, 8, 39, 12, 53, 37, 23, 30, 40, 6, 62, 43, 14, 53, 2, 49, 7, 36, 17, 41, 61, 37, 18, 56, 11, 18, 44, 35, 2, 19, 61, 0, 41, 14, 8, 30, 43, 12, 24, 46, 14, 54, 42, 21, 44, 61, 10, 46, 37, 11, 44, 7, 18, 63, 20, 29, 7, 49, 28, 54, 8, 43, 4, 48, 18, 63, 12, 29, 48, 24, 59, 20 }, { 13, 36, 28, 54, 35, 2, 56, 46, 16, 49, 22, 40, 11, 34, 14, 43, 29, 12, 63, 48, 2, 61, 7, 15, 28, 30, 50, 9, 61, 33, 38, 23, 54, 13, 61, 33, 3, 59, 16, 35, 58, 40, 5, 38, 13, 57, 3, 58, 37, 21, 45, 12, 39, 7, 35, 30, 13, 56, 22, 62, 27, 6, 55, 10, 48, 21, 33, 2, 38, 23, 40, 20, 44, 29, 59, 4, 26, 12, 33, 47, 28, 53, 31, 13, 59, 41, 27, 49, 26, 54, 45, 16, 53, 21, 35, 7, 59, 26, 11, 56, 1, 24, 33, 4, 28, 62, 21, 49, 31, 2, 56, 39, 24, 58, 13, 17, 37, 21, 56, 10, 38, 0, 34, 55, 15, 43, 1, 52 }, { 42, 9, 50, 6, 25, 60, 14, 38, 10, 29, 53, 18, 57, 3, 25, 51, 0, 53, 25, 17, 29, 37, 52, 46, 0, 62, 14, 37, 4, 50, 10, 44, 0, 46, 20, 25, 50, 19, 55, 0, 23, 31, 62, 34, 11, 45, 19, 32, 0, 53, 10, 59, 23, 47, 18, 60, 42, 28, 37, 3, 50, 15, 35, 44, 0, 51, 27, 60, 9, 57, 16, 58, 11, 22, 46, 15, 53, 48, 7, 42, 0, 60, 5, 49, 24, 54, 9, 17, 39, 5, 34, 62, 3, 40, 60, 31, 0, 47, 29, 16, 49, 39, 59, 17, 50, 0, 40, 13, 53, 38, 16, 46, 0, 42, 34, 60, 2, 53, 29, 31, 58, 46, 27, 6, 61, 8, 37, 28 }, { 0, 63, 21, 40, 45, 18, 51, 23, 63, 34, 6, 43, 28, 38, 55, 19, 40, 35, 8, 41, 54, 10, 21, 32, 39, 23, 53, 26, 55, 28, 22, 63, 30, 34, 9, 48, 6, 38, 29, 43, 49, 6, 18, 52, 27, 61, 9, 43, 28, 42, 33, 26, 56, 3, 51, 23, 0, 48, 16, 45, 32, 25, 63, 20, 57, 17, 42, 12, 35, 47, 5, 31, 39, 56, 6, 30, 34, 21, 61, 25, 14, 40, 22, 38, 15, 6, 36, 56, 20, 60, 25, 12, 51, 27, 10, 56, 42, 20, 36, 63, 32, 6, 21, 41, 12, 34, 60, 26, 5, 48, 27, 10, 62, 19, 6, 47, 39, 14, 45, 7, 24, 17, 41, 32, 23, 51, 19, 56 }, { 45, 31, 15, 59, 4, 33, 7, 47, 0, 41, 13, 61, 4, 47, 9, 23, 60, 14, 57, 31, 4, 45, 59, 6, 58, 10, 44, 20, 8, 42, 15, 6, 55, 17, 58, 31, 53, 12, 61, 10, 15, 57, 43, 2, 23, 35, 48, 14, 54, 6, 18, 49, 15, 38, 11, 34, 62, 9, 21, 58, 11, 41, 4, 31, 38, 8, 29, 55, 19, 36, 27, 52, 0, 25, 50, 43, 1, 39, 8, 55, 35, 51, 10, 30, 45, 62, 29, 2, 46, 10, 32, 48, 18, 38, 5, 22, 33, 8, 51, 3, 14, 44, 54, 25, 57, 30, 18, 52, 33, 22, 59, 28, 36, 52, 32, 21, 26, 50, 5, 55, 35, 60, 14, 54, 4, 40, 16, 33 }, { 27, 3, 49, 10, 30, 40, 55, 27, 57, 24, 52, 21, 32, 17, 60, 30, 5, 44, 27, 49, 19, 34, 13, 24, 43, 36, 3, 49, 31, 59, 37, 48, 26, 41, 2, 41, 14, 36, 21, 32, 40, 26, 13, 49, 55, 5, 16, 40, 25, 60, 36, 1, 63, 29, 17, 44, 25, 40, 52, 5, 29, 47, 54, 13, 46, 24, 60, 4, 51, 22, 63, 14, 45, 18, 12, 62, 17, 57, 19, 42, 3, 26, 58, 48, 1, 21, 40, 52, 23, 37, 44, 1, 29, 58, 43, 50, 15, 61, 19, 45, 58, 28, 7, 48, 2, 46, 8, 42, 3, 55, 8, 50, 12, 4, 55, 10, 63, 33, 20, 40, 11, 3, 46, 20, 48, 26, 61, 11 }, { 44, 56, 24, 36, 53, 19, 12, 37, 16, 44, 7, 36, 49, 54, 11, 37, 48, 21, 15, 1, 62, 25, 47, 56, 16, 18, 51, 12, 40, 1, 24, 11, 52, 16, 23, 59, 28, 1, 45, 53, 4, 60, 37, 21, 39, 30, 63, 20, 52, 10, 30, 45, 8, 41, 54, 4, 57, 7, 34, 55, 36, 18, 23, 59, 2, 48, 11, 32, 44, 1, 41, 8, 33, 54, 38, 23, 30, 46, 6, 29, 62, 18, 32, 16, 55, 34, 14, 11, 61, 7, 55, 16, 53, 13, 23, 2, 55, 37, 26, 10, 33, 23, 36, 16, 38, 22, 56, 15, 24, 43, 35, 17, 44, 40, 25, 46, 16, 1, 57, 25, 49, 36, 28, 62, 9, 35, 7, 53 }, { 17, 38, 8, 61, 1, 50, 26, 62, 3, 31, 56, 15, 1, 26, 40, 2, 34, 51, 56, 36, 42, 9, 38, 2, 29, 60, 32, 57, 19, 62, 34, 47, 4, 57, 39, 7, 44, 63, 24, 18, 46, 28, 8, 54, 1, 34, 7, 46, 3, 37, 50, 23, 57, 21, 13, 46, 31, 20, 43, 15, 1, 61, 8, 33, 37, 17, 56, 26, 15, 49, 24, 59, 28, 3, 56, 9, 52, 32, 13, 49, 10, 43, 5, 45, 8, 25, 59, 42, 28, 33, 19, 40, 8, 63, 35, 47, 25, 4, 40, 52, 1, 60, 12, 53, 63, 9, 29, 60, 37, 19, 1, 62, 31, 20, 58, 12, 41, 30, 43, 9, 18, 52, 22, 1, 39, 30, 58, 21 }, { 13, 47, 29, 18, 43, 34, 5, 48, 20, 42, 10, 45, 30, 58, 20, 63, 24, 11, 6, 28, 54, 14, 22, 52, 41, 7, 26, 5, 45, 15, 53, 13, 35, 27, 18, 50, 12, 33, 5, 56, 10, 17, 45, 24, 59, 15, 50, 26, 56, 13, 19, 5, 32, 52, 27, 36, 2, 61, 12, 26, 49, 40, 27, 52, 13, 50, 6, 39, 61, 34, 10, 37, 48, 20, 41, 27, 2, 36, 59, 24, 54, 33, 63, 20, 38, 50, 3, 17, 52, 4, 58, 27, 45, 21, 32, 11, 48, 17, 57, 20, 46, 38, 25, 43, 4, 34, 51, 6, 13, 45, 57, 26, 6, 48, 2, 35, 53, 23, 61, 34, 59, 6, 42, 56, 13, 51, 2, 41 }, { 32, 5, 55, 23, 58, 14, 22, 52, 29, 15, 61, 25, 51, 8, 43, 13, 53, 41, 46, 20, 3, 33, 63, 11, 48, 21, 54, 38, 28, 3, 30, 43, 21, 62, 9, 31, 55, 22, 51, 29, 37, 62, 32, 12, 42, 29, 41, 9, 33, 44, 62, 28, 43, 1, 59, 19, 48, 30, 51, 39, 24, 4, 58, 19, 42, 29, 22, 43, 3, 18, 53, 5, 13, 50, 16, 60, 45, 21, 7, 40, 15, 0, 26, 53, 13, 31, 43, 24, 47, 31, 15, 49, 2, 41, 6, 59, 29, 42, 9, 30, 14, 7, 49, 18, 31, 47, 20, 39, 49, 32, 11, 41, 54, 15, 61, 18, 7, 38, 4, 13, 44, 28, 15, 32, 45, 19, 27, 49 }, { 63, 34, 11, 39, 2, 45, 37, 8, 59, 39, 33, 4, 36, 17, 48, 5, 29, 18, 32, 61, 39, 50, 5, 27, 35, 0, 46, 12, 22, 49, 60, 6, 54, 0, 38, 49, 2, 42, 15, 40, 0, 47, 20, 51, 3, 57, 18, 61, 22, 0, 39, 16, 55, 12, 35, 8, 41, 22, 6, 59, 16, 45, 10, 36, 0, 62, 9, 54, 30, 58, 21, 43, 63, 31, 7, 35, 12, 48, 58, 28, 47, 37, 41, 9, 57, 20, 61, 0, 36, 11, 57, 35, 23, 52, 37, 18, 0, 62, 22, 55, 35, 62, 27, 54, 0, 15, 61, 28, 2, 59, 22, 9, 37, 27, 33, 51, 29, 48, 19, 50, 25, 37, 10, 57, 5, 37, 60, 8 }, { 20, 25, 46, 52, 31, 60, 12, 55, 0, 19, 11, 46, 62, 35, 23, 38, 57, 0, 55, 10, 16, 30, 58, 44, 17, 59, 29, 63, 42, 8, 36, 20, 33, 46, 16, 61, 25, 35, 8, 54, 26, 7, 58, 22, 34, 6, 47, 14, 53, 31, 48, 9, 37, 25, 49, 63, 16, 55, 45, 14, 34, 63, 21, 53, 25, 33, 46, 16, 35, 7, 46, 29, 0, 39, 25, 55, 22, 34, 18, 4, 56, 11, 23, 51, 28, 6, 39, 14, 62, 44, 19, 8, 60, 12, 56, 28, 50, 34, 39, 5, 51, 3, 41, 12, 57, 35, 10, 53, 25, 17, 52, 30, 47, 0, 43, 14, 5, 57, 31, 55, 0, 63, 47, 23, 54, 24, 14, 43 }, { 0, 57, 16, 6, 26, 19, 35, 28, 49, 42, 54, 26, 21, 1, 59, 27, 9, 47, 26, 44, 50, 22, 13, 40, 8, 37, 10, 34, 17, 56, 25, 58, 13, 27, 44, 9, 20, 58, 31, 17, 60, 36, 10, 41, 53, 25, 36, 39, 4, 24, 58, 17, 60, 4, 22, 38, 10, 32, 0, 50, 31, 7, 28, 47, 12, 57, 5, 26, 52, 23, 14, 40, 57, 17, 47, 5, 53, 1, 44, 31, 19, 60, 46, 2, 35, 48, 30, 54, 22, 5, 51, 39, 25, 31, 4, 43, 14, 9, 45, 16, 24, 44, 19, 29, 40, 23, 44, 7, 38, 42, 4, 63, 12, 54, 23, 59, 22, 42, 8, 15, 40, 21, 8, 34, 3, 41, 30, 50 }, { 39, 10, 48, 33, 41, 54, 5, 47, 23, 13, 32, 7, 52, 44, 14, 39, 58, 18, 35, 6, 37, 2, 60, 24, 55, 19, 53, 2, 51, 32, 1, 41, 51, 4, 40, 29, 47, 3, 52, 44, 13, 49, 28, 16, 1, 62, 11, 27, 52, 35, 5, 42, 29, 47, 14, 56, 28, 53, 26, 38, 9, 56, 40, 3, 38, 15, 41, 60, 1, 37, 50, 25, 11, 28, 61, 19, 42, 62, 10, 52, 39, 6, 32, 14, 58, 17, 7, 26, 42, 34, 27, 10, 54, 40, 20, 63, 26, 53, 21, 61, 32, 7, 59, 48, 3, 56, 18, 31, 58, 14, 49, 21, 36, 16, 45, 9, 36, 24, 62, 45, 27, 31, 53, 17, 49, 12, 62, 18 }, { 28, 59, 21, 58, 2, 16, 38, 9, 62, 3, 56, 41, 10, 31, 50, 4, 32, 52, 12, 63, 23, 46, 33, 31, 4, 48, 25, 43, 14, 23, 47, 11, 22, 55, 14, 60, 23, 37, 11, 39, 23, 2, 45, 56, 31, 43, 19, 55, 16, 46, 21, 51, 11, 33, 44, 2, 41, 18, 5, 52, 23, 44, 17, 60, 27, 49, 11, 32, 44, 10, 54, 2, 56, 33, 8, 38, 13, 29, 36, 16, 24, 63, 27, 51, 21, 43, 56, 12, 49, 3, 59, 48, 1, 15, 46, 7, 36, 2, 47, 11, 50, 27, 37, 13, 33, 8, 51, 46, 1, 34, 28, 40, 3, 33, 60, 29, 47, 1, 35, 11, 59, 42, 2, 60, 26, 46, 6, 35 }, { 4, 43, 9, 29, 36, 63, 24, 44, 20, 50, 30, 17, 60, 22, 16, 43, 25, 3, 42, 19, 51, 15, 8, 54, 42, 15, 61, 5, 39, 57, 18, 61, 31, 48, 34, 2, 50, 19, 57, 5, 63, 33, 19, 38, 13, 27, 48, 7, 32, 61, 2, 26, 58, 6, 24, 50, 13, 61, 42, 20, 62, 2, 35, 20, 51, 4, 62, 18, 23, 58, 20, 31, 43, 15, 51, 45, 26, 50, 4, 55, 45, 3, 35, 9, 38, 1, 32, 61, 20, 45, 17, 33, 24, 57, 29, 51, 22, 58, 38, 30, 15, 1, 54, 21, 63, 43, 26, 12, 24, 56, 8, 60, 50, 19, 5, 52, 13, 54, 17, 50, 4, 16, 36, 12, 32, 56, 22, 54 }, { 51, 25, 40, 53, 12, 49, 15, 57, 34, 7, 38, 47, 2, 36, 55, 8, 61, 30, 56, 7, 28, 59, 48, 11, 27, 35, 21, 45, 28, 36, 9, 38, 6, 16, 24, 63, 10, 32, 28, 43, 21, 53, 5, 60, 8, 57, 3, 45, 11, 37, 15, 54, 40, 20, 62, 36, 27, 34, 11, 48, 30, 15, 54, 8, 30, 42, 22, 34, 48, 13, 35, 63, 4, 37, 22, 2, 59, 9, 41, 23, 13, 41, 49, 18, 59, 24, 40, 5, 37, 30, 9, 61, 44, 6, 37, 11, 33, 17, 5, 55, 41, 60, 23, 39, 17, 5, 30, 62, 41, 16, 46, 25, 11, 56, 39, 26, 20, 38, 29, 39, 22, 52, 44, 20, 48, 1, 38, 14 }, { 15, 33, 2, 18, 44, 6, 27, 0, 32, 61, 25, 12, 58, 28, 40, 20, 47, 13, 34, 43, 38, 1, 23, 62, 40, 0, 51, 10, 63, 3, 52, 26, 44, 30, 45, 6, 41, 54, 0, 51, 12, 30, 46, 24, 49, 22, 40, 33, 63, 23, 43, 30, 9, 47, 0, 17, 54, 7, 57, 3, 37, 47, 24, 46, 13, 55, 7, 52, 2, 42, 6, 26, 49, 18, 60, 34, 16, 57, 33, 20, 61, 30, 8, 54, 14, 46, 12, 53, 16, 55, 38, 13, 22, 53, 18, 59, 46, 27, 43, 19, 32, 10, 45, 6, 49, 36, 52, 2, 20, 55, 6, 39, 32, 15, 44, 3, 58, 10, 63, 6, 56, 30, 7, 58, 9, 40, 19, 63 }, { 10, 47, 61, 23, 55, 31, 52, 42, 17, 45, 4, 51, 27, 6, 15, 53, 0, 49, 26, 10, 56, 18, 36, 6, 20, 58, 32, 30, 13, 49, 19, 56, 0, 59, 12, 53, 27, 17, 38, 25, 48, 9, 15, 36, 14, 30, 59, 17, 0, 50, 8, 58, 18, 56, 31, 45, 21, 41, 29, 19, 60, 6, 32, 59, 0, 36, 29, 39, 19, 59, 46, 12, 55, 30, 10, 47, 24, 3, 28, 48, 0, 55, 44, 27, 33, 4, 63, 29, 49, 0, 26, 50, 34, 2, 42, 14, 0, 62, 9, 56, 3, 52, 28, 34, 58, 9, 20, 48, 37, 32, 22, 53, 0, 62, 27, 49, 34, 46, 21, 33, 41, 14, 25, 37, 53, 29, 31, 45 }, { 56, 28, 7, 37, 11, 36, 20, 9, 54, 14, 39, 19, 34, 63, 45, 37, 24, 17, 60, 31, 21, 45, 53, 29, 47, 15, 7, 55, 40, 23, 34, 14, 42, 20, 37, 35, 15, 59, 7, 62, 34, 40, 59, 1, 51, 42, 10, 28, 54, 21, 35, 5, 38, 13, 36, 4, 59, 12, 39, 53, 15, 43, 9, 21, 39, 62, 16, 56, 25, 9, 32, 38, 0, 41, 14, 51, 40, 53, 43, 11, 37, 17, 5, 22, 57, 39, 19, 7, 42, 21, 60, 10, 31, 63, 25, 52, 30, 49, 36, 25, 48, 17, 61, 14, 22, 42, 29, 13, 60, 11, 47, 18, 35, 41, 7, 23, 4, 16, 51, 11, 0, 48, 61, 3, 17, 50, 5, 24 }, { 0, 42, 21, 49, 60, 3, 57, 40, 29, 48, 23, 56, 42, 11, 22, 5, 59, 39, 4, 50, 3, 41, 12, 57, 25, 50, 44, 18, 4, 46, 7, 62, 33, 50, 4, 56, 21, 32, 43, 18, 3, 23, 55, 34, 20, 4, 53, 38, 12, 46, 29, 52, 25, 61, 23, 51, 26, 46, 1, 34, 25, 57, 28, 51, 26, 11, 50, 3, 44, 28, 53, 21, 57, 27, 62, 6, 31, 19, 8, 63, 26, 59, 36, 47, 15, 29, 50, 25, 35, 47, 18, 41, 4, 48, 8, 40, 12, 23, 6, 44, 13, 40, 1, 31, 55, 0, 61, 43, 4, 50, 26, 58, 9, 53, 24, 61, 42, 55, 31, 43, 57, 20, 34, 27, 43, 8, 59, 39 }, { 18, 51, 30, 13, 26, 16, 46, 22, 2, 59, 8, 30, 1, 48, 33, 51, 29, 9, 46, 16, 62, 14, 33, 2, 38, 9, 27, 60, 37, 26, 53, 17, 28, 10, 24, 46, 2, 49, 8, 57, 29, 45, 6, 26, 62, 44, 18, 25, 61, 3, 42, 14, 49, 10, 43, 6, 17, 32, 63, 10, 49, 4, 40, 14, 45, 33, 22, 37, 12, 61, 5, 17, 43, 7, 23, 37, 15, 58, 49, 13, 39, 21, 10, 52, 1, 62, 9, 56, 12, 2, 58, 28, 36, 16, 56, 28, 56, 35, 20, 63, 24, 37, 51, 8, 45, 25, 16, 33, 27, 38, 2, 44, 13, 30, 17, 36, 12, 26, 5, 18, 28, 47, 13, 60, 23, 45, 13, 33 }, { 55, 4, 62, 34, 52, 38, 7, 63, 32, 37, 13, 53, 25, 62, 18, 12, 55, 41, 27, 35, 24, 49, 31, 52, 17, 63, 34, 1, 56, 12, 41, 2, 48, 58, 39, 16, 61, 27, 41, 52, 13, 19, 50, 39, 11, 31, 57, 6, 32, 40, 20, 55, 1, 28, 33, 57, 48, 8, 37, 22, 44, 18, 53, 1, 61, 5, 54, 16, 47, 36, 50, 24, 55, 34, 48, 45, 1, 30, 33, 46, 2, 50, 32, 42, 25, 34, 43, 21, 38, 52, 23, 45, 14, 54, 21, 4, 44, 16, 53, 29, 10, 47, 19, 57, 12, 54, 39, 10, 51, 15, 63, 21, 57, 40, 51, 1, 48, 57, 37, 62, 2, 38, 9, 52, 1, 35, 58, 22 }, { 36, 46, 10, 42, 1, 27, 43, 15, 50, 21, 45, 16, 41, 3, 35, 44, 20, 1, 57, 11, 55, 7, 43, 8, 22, 42, 13, 46, 21, 39, 31, 60, 22, 5, 29, 44, 11, 35, 20, 4, 36, 58, 32, 15, 47, 2, 36, 48, 16, 60, 8, 35, 44, 63, 16, 2, 40, 26, 55, 14, 58, 35, 24, 31, 19, 42, 31, 58, 1, 29, 10, 40, 2, 19, 12, 54, 22, 61, 7, 24, 56, 5, 28, 16, 54, 3, 15, 58, 6, 30, 8, 62, 1, 43, 31, 47, 7, 59, 1, 38, 58, 4, 34, 27, 38, 5, 31, 59, 7, 46, 30, 3, 34, 6, 28, 59, 20, 8, 32, 15, 53, 24, 55, 31, 19, 49, 11, 26 }, { 2, 24, 16, 58, 19, 55, 5, 35, 10, 61, 4, 28, 57, 24, 58, 7, 31, 47, 22, 38, 19, 28, 61, 36, 54, 5, 59, 29, 6, 52, 15, 11, 43, 36, 8, 54, 52, 1, 62, 25, 47, 9, 1, 60, 28, 53, 24, 14, 46, 27, 51, 22, 12, 24, 38, 53, 20, 11, 51, 3, 29, 7, 48, 63, 8, 49, 9, 21, 52, 14, 63, 32, 46, 60, 35, 4, 41, 16, 52, 35, 18, 42, 59, 7, 36, 61, 45, 27, 33, 51, 19, 39, 34, 11, 61, 18, 33, 41, 28, 15, 54, 22, 42, 3, 49, 21, 47, 18, 36, 23, 55, 19, 48, 24, 45, 10, 33, 44, 50, 40, 7, 35, 15, 41, 63, 6, 40, 54 }, { 62, 41, 32, 8, 47, 28, 60, 24, 44, 30, 38, 49, 9, 33, 14, 40, 50, 14, 60, 2, 54, 40, 0, 20, 25, 39, 16, 49, 24, 35, 57, 47, 19, 61, 33, 18, 23, 37, 13, 55, 31, 43, 22, 41, 17, 8, 42, 58, 0, 37, 5, 56, 31, 54, 7, 30, 60, 33, 42, 17, 59, 39, 12, 27, 38, 17, 35, 41, 27, 45, 20, 7, 25, 15, 29, 58, 27, 47, 11, 40, 14, 54, 23, 46, 19, 31, 11, 40, 13, 49, 5, 58, 24, 51, 26, 6, 50, 20, 49, 9, 32, 46, 17, 60, 14, 63, 24, 1, 57, 41, 9, 43, 14, 62, 16, 52, 3, 27, 14, 22, 61, 45, 4, 28, 9, 47, 29, 17 }, { 5, 50, 12, 53, 38, 18, 11, 51, 0, 55, 17, 6, 47, 54, 19, 63, 5, 26, 34, 45, 13, 30, 47, 58, 10, 48, 32, 3, 62, 9, 26, 0, 25, 14, 50, 3, 47, 30, 42, 16, 6, 63, 12, 49, 33, 55, 21, 10, 34, 63, 18, 41, 3, 47, 19, 43, 0, 49, 8, 28, 46, 20, 52, 0, 56, 24, 60, 3, 59, 5, 39, 57, 48, 52, 9, 38, 3, 21, 26, 60, 0, 32, 12, 38, 4, 48, 53, 0, 60, 15, 29, 44, 18, 10, 38, 57, 13, 60, 2, 26, 62, 7, 50, 29, 35, 8, 40, 53, 28, 12, 60, 33, 38, 5, 37, 29, 60, 39, 56, 0, 30, 18, 50, 34, 59, 25, 14, 44 }, { 20, 31, 60, 22, 3, 49, 33, 25, 40, 13, 34, 59, 22, 36, 0, 28, 37, 56, 8, 18, 51, 16, 4, 45, 27, 12, 53, 42, 18, 44, 51, 31, 55, 40, 28, 58, 7, 60, 10, 51, 27, 37, 24, 56, 5, 26, 44, 29, 50, 23, 45, 11, 34, 15, 59, 27, 13, 23, 62, 37, 4, 57, 15, 32, 42, 6, 47, 11, 30, 43, 23, 13, 0, 36, 18, 44, 63, 51, 37, 29, 49, 20, 57, 27, 62, 9, 24, 35, 23, 53, 37, 3, 42, 55, 0, 36, 23, 39, 31, 43, 17, 37, 24, 11, 52, 43, 19, 32, 5, 50, 26, 0, 56, 21, 54, 11, 19, 6, 47, 25, 59, 42, 12, 54, 21, 3, 38, 57 }, { 48, 0, 35, 27, 44, 14, 59, 7, 57, 46, 26, 2, 42, 12, 52, 43, 10, 27, 53, 42, 32, 62, 37, 21, 34, 61, 7, 23, 36, 4, 38, 12, 41, 5, 17, 45, 22, 27, 39, 21, 59, 0, 45, 18, 39, 62, 3, 38, 14, 7, 54, 26, 61, 39, 9, 52, 45, 36, 18, 50, 10, 34, 44, 22, 50, 14, 36, 55, 17, 34, 53, 62, 33, 26, 56, 6, 31, 12, 6, 53, 9, 44, 2, 50, 20, 40, 55, 17, 47, 7, 26, 63, 22, 32, 48, 16, 46, 8, 52, 12, 57, 41, 0, 56, 25, 3, 61, 14, 45, 35, 18, 44, 12, 46, 23, 42, 32, 51, 35, 10, 17, 36, 23, 1, 45, 52, 32, 10 }, { 37, 15, 43, 8, 63, 39, 21, 31, 16, 37, 19, 62, 30, 46, 17, 60, 21, 48, 1, 23, 6, 25, 11, 56, 1, 40, 30, 58, 15, 54, 21, 59, 9, 63, 35, 56, 11, 51, 2, 46, 34, 14, 53, 7, 30, 11, 51, 19, 60, 40, 30, 1, 24, 50, 20, 32, 3, 56, 5, 25, 31, 13, 61, 2, 29, 60, 25, 20, 51, 2, 27, 8, 18, 42, 10, 45, 21, 34, 43, 17, 62, 29, 41, 14, 34, 6, 30, 43, 2, 57, 33, 13, 45, 12, 27, 62, 4, 55, 21, 35, 5, 27, 45, 33, 16, 47, 30, 54, 22, 10, 51, 27, 63, 7, 49, 1, 58, 22, 15, 43, 53, 7, 57, 39, 27, 12, 61, 24 }, { 56, 51, 26, 56, 19, 2, 41, 54, 5, 52, 9, 48, 6, 23, 39, 4, 32, 15, 63, 35, 59, 49, 43, 15, 52, 19, 50, 9, 46, 33, 1, 29, 48, 20, 32, 1, 38, 33, 19, 54, 9, 32, 24, 48, 58, 35, 16, 48, 4, 52, 13, 57, 33, 5, 45, 59, 15, 29, 41, 55, 47, 39, 23, 53, 9, 40, 4, 57, 10, 44, 48, 40, 50, 14, 61, 24, 55, 1, 59, 22, 33, 8, 51, 25, 58, 46, 11, 59, 20, 41, 17, 51, 6, 56, 35, 25, 42, 30, 15, 58, 48, 18, 61, 9, 58, 39, 13, 2, 37, 59, 40, 2, 31, 16, 34, 41, 8, 30, 62, 3, 29, 48, 33, 5, 63, 16, 41, 7 }, { 22, 4, 46, 11, 33, 51, 29, 10, 62, 24, 43, 27, 15, 58, 50, 25, 54, 44, 9, 38, 18, 3, 29, 57, 32, 5, 26, 43, 17, 61, 24, 52, 8, 42, 23, 53, 15, 61, 7, 28, 57, 43, 4, 40, 20, 2, 43, 25, 32, 35, 21, 43, 17, 48, 10, 22, 38, 54, 11, 21, 1, 58, 16, 30, 48, 18, 46, 32, 38, 13, 22, 4, 59, 35, 2, 51, 30, 39, 15, 47, 4, 56, 13, 37, 1, 28, 16, 52, 32, 9, 61, 29, 38, 19, 3, 52, 10, 48, 1, 32, 11, 40, 20, 36, 6, 22, 49, 29, 55, 6, 20, 56, 36, 52, 19, 60, 26, 46, 18, 54, 40, 13, 20, 46, 35, 19, 49, 29 }, { 61, 17, 34, 53, 23, 6, 48, 35, 20, 40, 1, 56, 36, 29, 11, 34, 7, 41, 14, 30, 55, 20, 46, 8, 24, 38, 63, 2, 37, 10, 45, 14, 34, 49, 6, 13, 44, 25, 49, 41, 21, 12, 61, 15, 54, 29, 63, 12, 56, 8, 49, 2, 62, 36, 28, 61, 0, 25, 41, 63, 35, 8, 44, 6, 37, 62, 7, 21, 63, 28, 55, 31, 16, 24, 41, 19, 9, 57, 27, 36, 18, 42, 31, 62, 22, 55, 38, 4, 27, 47, 1, 40, 14, 54, 43, 20, 60, 23, 38, 63, 25, 51, 2, 53, 26, 63, 10, 42, 17, 34, 47, 25, 13, 5, 44, 11, 55, 2, 38, 27, 6, 60, 52, 25, 9, 55, 1, 40 }, { 8, 30, 58, 3, 42, 61, 17, 38, 13, 59, 32, 10, 54, 3, 51, 20, 61, 26, 57, 2, 46, 33, 12, 60, 41, 13, 48, 29, 55, 20, 39, 27, 57, 18, 62, 29, 55, 2, 31, 16, 37, 50, 26, 36, 6, 46, 9, 41, 27, 57, 23, 39, 26, 6, 51, 12, 31, 46, 7, 16, 27, 52, 19, 56, 26, 12, 33, 53, 1, 41, 8, 57, 46, 7, 54, 32, 47, 5, 49, 11, 60, 23, 5, 48, 10, 43, 19, 63, 35, 24, 49, 21, 59, 5, 31, 37, 14, 44, 7, 42, 6, 30, 46, 13, 44, 32, 19, 50, 4, 58, 8, 30, 62, 38, 28, 53, 21, 36, 13, 50, 21, 33, 15, 2, 44, 31, 14, 47 }, { 37, 13, 39, 16, 28, 9, 57, 0, 25, 49, 21, 45, 18, 47, 12, 42, 0, 49, 22, 39, 16, 53, 25, 36, 0, 52, 22, 16, 6, 60, 4, 51, 0, 26, 37, 47, 10, 36, 63, 5, 57, 0, 18, 59, 23, 33, 51, 19, 0, 44, 15, 11, 54, 17, 42, 35, 53, 18, 58, 33, 49, 4, 34, 42, 0, 50, 43, 25, 16, 49, 34, 20, 37, 28, 12, 63, 16, 38, 25, 44, 0, 40, 52, 17, 35, 3, 50, 14, 8, 53, 11, 36, 25, 45, 9, 62, 0, 54, 28, 17, 50, 55, 15, 24, 57, 0, 53, 34, 23, 41, 15, 45, 0, 49, 16, 4, 48, 9, 63, 45, 0, 42, 58, 37, 61, 22, 54, 26 }, { 0, 50, 21, 47, 54, 36, 27, 45, 52, 4, 34, 15, 63, 29, 37, 59, 17, 31, 6, 61, 28, 5, 48, 18, 59, 27, 34, 56, 44, 31, 35, 12, 41, 59, 16, 3, 40, 20, 50, 22, 30, 40, 52, 10, 45, 3, 59, 22, 37, 61, 29, 46, 31, 58, 2, 22, 9, 43, 3, 39, 14, 61, 24, 54, 15, 29, 11, 60, 39, 17, 5, 61, 0, 44, 50, 3, 31, 14, 58, 21, 54, 28, 15, 45, 60, 26, 33, 58, 44, 22, 60, 2, 57, 34, 49, 27, 18, 34, 21, 59, 29, 4, 36, 41, 8, 39, 28, 11, 62, 26, 53, 20, 35, 24, 59, 32, 29, 39, 24, 31, 57, 23, 11, 28, 5, 36, 11, 59 }, { 44, 32, 63, 5, 20, 12, 41, 7, 30, 61, 42, 8, 39, 5, 33, 8, 24, 53, 45, 11, 37, 58, 7, 44, 10, 50, 3, 40, 8, 22, 53, 19, 46, 9, 33, 52, 24, 58, 8, 44, 13, 47, 8, 34, 38, 30, 14, 47, 7, 34, 4, 55, 9, 19, 40, 49, 56, 26, 60, 21, 30, 45, 10, 19, 40, 58, 23, 36, 3, 52, 45, 23, 54, 13, 22, 42, 53, 45, 7, 33, 10, 36, 57, 6, 29, 12, 41, 0, 30, 15, 41, 30, 17, 7, 16, 53, 40, 56, 2, 39, 12, 61, 10, 52, 31, 60, 16, 45, 1, 37, 7, 61, 40, 10, 43, 17, 58, 7, 54, 14, 4, 51, 39, 49, 18, 56, 42, 20 }, { 14, 6, 24, 36, 56, 49, 22, 60, 18, 14, 23, 51, 26, 57, 21, 52, 41, 14, 35, 50, 19, 31, 40, 23, 33, 14, 63, 17, 32, 47, 7, 62, 23, 30, 56, 11, 42, 27, 14, 60, 35, 19, 28, 61, 17, 55, 25, 39, 53, 17, 42, 21, 38, 63, 25, 5, 14, 36, 12, 50, 1, 37, 59, 32, 2, 51, 6, 56, 27, 32, 11, 30, 38, 26, 60, 8, 26, 19, 62, 39, 50, 2, 21, 39, 53, 23, 56, 19, 49, 39, 5, 46, 55, 23, 42, 4, 31, 11, 47, 26, 45, 22, 48, 18, 21, 5, 48, 25, 57, 14, 47, 30, 3, 56, 12, 50, 1, 42, 19, 47, 35, 17, 8, 30, 45, 25, 4, 51 }, { 28, 58, 43, 1, 31, 8, 33, 2, 44, 55, 32, 1, 60, 12, 46, 27, 4, 62, 23, 1, 56, 13, 62, 2, 54, 36, 25, 51, 1, 57, 26, 42, 3, 49, 17, 38, 1, 48, 31, 4, 54, 3, 50, 24, 1, 49, 5, 63, 13, 27, 52, 1, 48, 13, 45, 33, 52, 30, 46, 20, 55, 28, 6, 48, 24, 38, 20, 47, 14, 62, 48, 9, 58, 4, 36, 30, 56, 1, 34, 12, 18, 63, 25, 48, 4, 16, 37, 7, 62, 10, 52, 28, 13, 50, 36, 63, 24, 51, 15, 58, 8, 33, 1, 38, 56, 35, 42, 9, 33, 51, 22, 18, 48, 32, 27, 37, 23, 61, 33, 11, 59, 29, 62, 1, 53, 10, 60, 33 }, { 12, 39, 17, 52, 26, 46, 53, 38, 25, 11, 48, 36, 16, 43, 2, 35, 55, 17, 39, 29, 43, 9, 28, 45, 20, 5, 46, 12, 42, 28, 13, 52, 36, 6, 60, 22, 54, 17, 62, 39, 25, 42, 15, 55, 44, 20, 31, 10, 35, 57, 24, 32, 29, 6, 59, 18, 7, 62, 3, 41, 10, 44, 16, 54, 13, 62, 31, 9, 41, 1, 21, 43, 18, 47, 15, 40, 11, 49, 28, 55, 46, 30, 8, 43, 32, 61, 28, 47, 25, 34, 21, 61, 32, 1, 20, 9, 46, 6, 35, 19, 41, 54, 27, 63, 14, 3, 51, 20, 62, 2, 38, 55, 8, 21, 63, 6, 46, 9, 26, 51, 3, 24, 43, 34, 16, 41, 18, 48 }, { 62, 23, 55, 9, 15, 62, 19, 13, 58, 40, 6, 30, 54, 19, 50, 31, 10, 44, 6, 59, 21, 47, 51, 15, 60, 39, 30, 54, 21, 61, 19, 33, 14, 29, 43, 11, 34, 45, 7, 21, 10, 56, 36, 6, 38, 11, 58, 42, 2, 47, 11, 60, 50, 16, 41, 28, 38, 23, 47, 17, 35, 63, 22, 33, 42, 5, 45, 17, 53, 35, 25, 56, 33, 6, 51, 19, 60, 23, 43, 15, 5, 40, 58, 13, 51, 1, 45, 11, 54, 3, 43, 8, 37, 48, 59, 29, 39, 21, 61, 43, 3, 31, 10, 44, 24, 29, 60, 12, 28, 40, 11, 25, 43, 52, 14, 41, 16, 57, 44, 20, 40, 55, 12, 21, 57, 27, 35, 2 }, { 37, 6, 31, 42, 40, 4, 29, 50, 0, 20, 63, 28, 9, 58, 14, 24, 63, 26, 48, 16, 34, 4, 32, 38, 23, 11, 58, 4, 37, 9, 45, 5, 63, 48, 26, 57, 2, 28, 32, 51, 46, 29, 13, 62, 27, 46, 28, 18, 50, 15, 40, 4, 19, 34, 54, 0, 53, 9, 26, 58, 28, 5, 49, 0, 57, 27, 19, 60, 29, 8, 59, 12, 37, 63, 24, 46, 3, 37, 6, 52, 26, 32, 20, 36, 9, 22, 59, 18, 35, 51, 14, 57, 17, 24, 12, 44, 56, 0, 30, 13, 59, 20, 49, 17, 54, 43, 6, 34, 46, 17, 58, 36, 0, 34, 29, 54, 25, 2, 36, 15, 60, 6, 37, 46, 4, 50, 9, 45 }, { 19, 59, 48, 3, 24, 60, 44, 22, 34, 51, 15, 45, 41, 5, 33, 47, 0, 37, 12, 55, 25, 54, 8, 57, 0, 47, 18, 34, 49, 15, 55, 24, 40, 20, 8, 35, 53, 13, 41, 18, 0, 59, 22, 33, 4, 52, 8, 60, 24, 36, 31, 56, 45, 26, 10, 43, 15, 56, 36, 4, 51, 14, 39, 30, 12, 55, 36, 2, 39, 49, 4, 44, 17, 0, 32, 13, 53, 35, 59, 17, 62, 0, 55, 24, 52, 38, 31, 6, 42, 19, 29, 40, 4, 54, 33, 5, 16, 27, 52, 37, 23, 55, 7, 37, 0, 39, 23, 49, 4, 53, 31, 15, 59, 10, 50, 4, 60, 34, 48, 7, 31, 49, 27, 14, 62, 22, 53, 29 }, { 46, 21, 14, 51, 36, 17, 7, 57, 10, 32, 3, 37, 22, 60, 39, 18, 56, 20, 42, 3, 36, 10, 44, 26, 41, 29, 53, 27, 2, 39, 30, 52, 0, 59, 15, 48, 23, 61, 6, 58, 37, 12, 40, 49, 16, 39, 20, 44, 0, 62, 8, 21, 3, 59, 23, 32, 49, 31, 12, 44, 22, 59, 18, 50, 24, 7, 43, 52, 15, 23, 41, 26, 51, 28, 55, 39, 21, 27, 10, 42, 12, 45, 27, 47, 3, 15, 63, 26, 55, 0, 60, 26, 45, 18, 62, 38, 58, 49, 8, 47, 4, 33, 46, 29, 57, 13, 56, 16, 59, 21, 5, 47, 23, 39, 18, 44, 13, 22, 28, 53, 19, 0, 58, 32, 41, 7, 26, 13 }, { 0, 56, 34, 28, 11, 55, 31, 47, 26, 41, 56, 13, 53, 28, 11, 49, 7, 52, 32, 61, 50, 22, 63, 17, 13, 56, 7, 19, 43, 62, 10, 21, 37, 32, 43, 4, 38, 19, 44, 25, 31, 54, 5, 23, 61, 30, 53, 12, 35, 22, 43, 53, 37, 48, 7, 62, 20, 2, 61, 41, 8, 34, 47, 9, 63, 34, 28, 10, 55, 33, 14, 57, 7, 47, 9, 61, 4, 49, 31, 50, 21, 38, 8, 16, 57, 44, 33, 5, 49, 36, 12, 50, 7, 34, 10, 25, 2, 22, 36, 15, 26, 61, 18, 9, 22, 46, 32, 8, 27, 37, 44, 30, 55, 3, 62, 24, 38, 56, 5, 45, 38, 24, 43, 10, 19, 54, 39, 61 }, { 41, 30, 8, 63, 43, 23, 38, 3, 62, 19, 8, 49, 25, 1, 58, 30, 23, 40, 9, 28, 18, 40, 6, 38, 49, 22, 35, 59, 8, 27, 50, 5, 56, 17, 11, 50, 30, 9, 55, 2, 51, 19, 34, 47, 9, 41, 6, 26, 48, 57, 14, 28, 17, 12, 39, 13, 37, 46, 25, 19, 54, 27, 1, 37, 16, 45, 20, 60, 1, 48, 20, 38, 31, 22, 42, 15, 19, 44, 1, 61, 6, 34, 56, 40, 29, 10, 20, 46, 13, 22, 41, 23, 59, 42, 30, 51, 45, 13, 63, 53, 42, 12, 51, 38, 62, 2, 26, 41, 50, 1, 61, 10, 19, 42, 31, 8, 49, 32, 12, 63, 9, 52, 16, 56, 36, 2, 31, 16 }, { 52, 5, 47, 20, 1, 53, 12, 50, 16, 35, 43, 21, 33, 43, 16, 44, 3, 59, 14, 46, 1, 30, 60, 33, 2, 45, 12, 42, 31, 47, 14, 33, 46, 25, 55, 27, 60, 36, 16, 42, 14, 46, 26, 1, 55, 15, 63, 32, 2, 38, 5, 47, 33, 61, 30, 52, 4, 57, 6, 38, 11, 43, 61, 24, 52, 3, 31, 22, 42, 10, 62, 3, 59, 11, 35, 57, 33, 54, 24, 14, 29, 48, 18, 2, 60, 41, 53, 24, 32, 62, 3, 53, 15, 1, 55, 17, 32, 40, 6, 31, 1, 40, 28, 5, 35, 52, 19, 63, 13, 33, 17, 41, 52, 26, 15, 57, 1, 20, 42, 17, 35, 27, 48, 5, 25, 50, 44, 11 }, { 35, 25, 38, 57, 33, 17, 40, 6, 59, 27, 54, 5, 61, 10, 52, 26, 36, 19, 51, 35, 57, 48, 11, 20, 54, 25, 61, 16, 1, 58, 24, 61, 3, 39, 7, 47, 1, 22, 49, 28, 63, 10, 58, 32, 17, 36, 45, 19, 51, 29, 59, 10, 50, 1, 23, 42, 18, 29, 51, 21, 56, 32, 14, 5, 40, 58, 47, 13, 54, 35, 29, 45, 18, 52, 26, 2, 38, 8, 46, 36, 58, 11, 52, 35, 17, 28, 1, 58, 9, 39, 17, 28, 37, 48, 20, 9, 57, 24, 50, 19, 58, 16, 48, 25, 43, 11, 35, 6, 45, 24, 56, 4, 36, 7, 47, 35, 52, 28, 59, 30, 2, 61, 21, 33, 63, 12, 18, 59 }, { 3, 49, 15, 10, 27, 61, 25, 45, 30, 0, 14, 47, 31, 38, 17, 62, 7, 55, 27, 4, 15, 24, 42, 52, 10, 34, 5, 51, 36, 18, 41, 11, 35, 21, 62, 13, 33, 57, 8, 35, 5, 40, 21, 43, 52, 3, 24, 56, 11, 16, 33, 25, 41, 20, 55, 8, 60, 35, 15, 48, 2, 57, 30, 49, 18, 25, 6, 39, 17, 57, 7, 25, 43, 5, 49, 16, 62, 22, 55, 4, 25, 43, 23, 7, 50, 11, 37, 48, 14, 51, 33, 57, 7, 27, 39, 46, 4, 29, 11, 43, 34, 56, 7, 60, 20, 54, 30, 57, 22, 49, 9, 33, 54, 14, 63, 23, 6, 43, 10, 40, 50, 13, 44, 8, 38, 33, 46, 23 }, { 55, 39, 22, 50, 44, 4, 36, 9, 52, 23, 37, 59, 21, 2, 46, 13, 31, 41, 11, 45, 62, 29, 6, 37, 19, 48, 30, 23, 44, 7, 53, 28, 54, 16, 41, 29, 44, 18, 52, 24, 60, 15, 48, 7, 27, 59, 9, 34, 42, 54, 7, 63, 4, 46, 31, 27, 45, 0, 40, 26, 34, 17, 37, 10, 53, 29, 36, 50, 2, 27, 51, 11, 61, 37, 23, 41, 30, 7, 18, 50, 39, 14, 63, 32, 45, 61, 19, 30, 25, 44, 2, 47, 23, 63, 11, 34, 59, 37, 60, 3, 22, 14, 44, 30, 15, 0, 47, 15, 3, 38, 61, 20, 27, 45, 11, 39, 51, 16, 55, 3, 22, 54, 29, 58, 1, 57, 6, 29 }, { 9, 17, 60, 2, 34, 56, 20, 62, 39, 12, 49, 6, 29, 56, 34, 48, 0, 58, 22, 38, 18, 43, 56, 0, 63, 14, 55, 3, 59, 31, 15, 45, 0, 49, 6, 58, 3, 38, 12, 45, 0, 37, 29, 57, 13, 39, 30, 49, 0, 23, 44, 36, 16, 57, 13, 54, 11, 24, 63, 9, 53, 7, 62, 42, 0, 59, 15, 23, 63, 34, 40, 16, 32, 0, 53, 12, 48, 28, 59, 33, 0, 53, 9, 27, 3, 22, 54, 5, 56, 9, 61, 13, 42, 14, 52, 19, 0, 21, 47, 27, 53, 36, 3, 50, 39, 58, 25, 40, 53, 28, 12, 50, 0, 59, 32, 2, 21, 34, 26, 46, 37, 7, 18, 47, 24, 14, 53, 42 }, { 61, 32, 13, 54, 29, 7, 46, 13, 28, 57, 18, 41, 53, 15, 9, 39, 24, 49, 33, 3, 53, 9, 26, 32, 40, 28, 46, 39, 25, 9, 56, 21, 63, 37, 26, 22, 51, 27, 17, 56, 31, 53, 4, 43, 22, 46, 12, 18, 60, 40, 20, 26, 50, 21, 39, 5, 49, 33, 16, 44, 22, 46, 20, 32, 24, 45, 8, 43, 12, 46, 4, 48, 56, 20, 29, 58, 3, 40, 10, 42, 31, 21, 47, 41, 56, 38, 15, 42, 36, 27, 20, 33, 55, 3, 26, 44, 31, 54, 12, 35, 9, 63, 28, 10, 21, 32, 9, 60, 17, 8, 43, 29, 40, 16, 36, 48, 60, 7, 57, 14, 62, 31, 42, 15, 36, 40, 20, 26 }, { 0, 37, 47, 23, 41, 18, 32, 48, 1, 35, 8, 25, 4, 26, 63, 20, 54, 8, 16, 61, 35, 23, 51, 15, 58, 7, 12, 20, 50, 34, 42, 4, 38, 10, 32, 47, 8, 60, 41, 20, 9, 25, 50, 19, 62, 1, 37, 56, 28, 8, 53, 11, 3, 58, 34, 43, 19, 60, 38, 4, 58, 31, 3, 51, 11, 55, 38, 30, 21, 58, 19, 26, 9, 44, 36, 13, 46, 20, 62, 24, 13, 60, 5, 28, 12, 34, 7, 59, 0, 53, 45, 6, 38, 30, 50, 7, 62, 16, 41, 5, 46, 18, 55, 42, 51, 5, 45, 23, 34, 48, 19, 58, 5, 25, 54, 19, 13, 41, 28, 21, 0, 49, 10, 60, 4, 51, 9, 45 }, { 19, 28, 6, 58, 10, 51, 4, 22, 55, 42, 60, 45, 34, 51, 42, 5, 30, 45, 27, 40, 13, 47, 4, 49, 21, 38, 60, 29, 2, 57, 17, 27, 52, 19, 61, 14, 30, 34, 2, 44, 63, 33, 11, 35, 16, 51, 25, 6, 14, 47, 31, 61, 37, 29, 18, 8, 52, 2, 28, 54, 13, 41, 15, 62, 35, 18, 2, 60, 6, 33, 41, 61, 31, 6, 56, 17, 34, 50, 6, 52, 44, 35, 16, 51, 59, 24, 48, 18, 31, 40, 16, 49, 21, 60, 17, 39, 10, 49, 32, 57, 24, 39, 1, 25, 18, 62, 37, 12, 56, 1, 37, 11, 52, 44, 9, 30, 47, 4, 51, 40, 55, 25, 34, 27, 56, 30, 32, 54 }, { 63, 40, 49, 15, 43, 26, 63, 38, 16, 20, 30, 12, 57, 14, 19, 60, 36, 12, 59, 2, 57, 17, 42, 31, 1, 44, 16, 35, 47, 11, 32, 48, 13, 43, 1, 39, 51, 12, 57, 23, 6, 40, 53, 3, 55, 31, 39, 60, 35, 44, 5, 15, 45, 1, 62, 41, 26, 14, 47, 22, 36, 27, 50, 9, 26, 47, 52, 28, 54, 16, 1, 13, 51, 39, 23, 63, 1, 30, 15, 26, 2, 57, 19, 37, 1, 44, 21, 50, 13, 63, 8, 24, 56, 1, 35, 25, 58, 20, 2, 28, 14, 51, 33, 59, 13, 30, 4, 49, 31, 24, 63, 26, 33, 3, 58, 38, 62, 24, 32, 8, 17, 45, 5, 48, 18, 3, 43, 11 }, { 21, 4, 24, 34, 59, 1, 37, 11, 53, 5, 47, 2, 22, 40, 32, 1, 24, 50, 21, 29, 38, 25, 63, 8, 55, 24, 53, 6, 62, 23, 59, 3, 54, 20, 58, 24, 5, 46, 15, 38, 48, 14, 27, 42, 23, 7, 46, 10, 17, 58, 25, 52, 23, 32, 49, 12, 55, 30, 40, 7, 59, 1, 56, 21, 39, 4, 23, 15, 37, 46, 55, 42, 21, 4, 48, 8, 45, 54, 37, 55, 32, 8, 46, 10, 30, 54, 4, 41, 25, 29, 36, 48, 11, 43, 14, 47, 5, 43, 53, 36, 61, 10, 45, 6, 41, 54, 27, 43, 16, 55, 6, 46, 18, 42, 23, 15, 1, 45, 12, 60, 37, 22, 62, 12, 39, 59, 16, 52 }, { 47, 35, 56, 7, 19, 46, 31, 50, 33, 24, 61, 35, 50, 7, 53, 44, 55, 6, 46, 10, 52, 5, 21, 43, 36, 10, 18, 41, 26, 37, 8, 29, 40, 36, 9, 49, 34, 26, 61, 21, 7, 59, 18, 62, 29, 54, 20, 32, 51, 0, 40, 10, 55, 6, 20, 36, 9, 61, 5, 51, 44, 19, 33, 43, 13, 57, 40, 63, 8, 24, 29, 10, 60, 34, 27, 40, 25, 18, 10, 42, 21, 49, 26, 62, 38, 12, 33, 61, 5, 57, 2, 19, 54, 28, 62, 22, 38, 31, 16, 7, 22, 47, 29, 17, 35, 8, 20, 51, 2, 40, 22, 50, 13, 61, 28, 53, 35, 20, 56, 30, 2, 53, 14, 41, 23, 34, 8, 31 }, { 12, 2, 42, 29, 52, 13, 21, 8, 55, 14, 41, 17, 28, 58, 23, 11, 17, 36, 31, 62, 17, 34, 50, 14, 28, 61, 33, 52, 2, 51, 17, 45, 7, 25, 62, 30, 18, 55, 0, 42, 30, 35, 45, 1, 12, 48, 3, 63, 21, 36, 30, 48, 19, 59, 43, 27, 46, 17, 34, 25, 12, 29, 53, 6, 48, 31, 11, 34, 49, 3, 36, 50, 19, 47, 14, 61, 11, 36, 58, 4, 60, 14, 39, 22, 6, 52, 15, 35, 17, 46, 31, 42, 9, 34, 3, 52, 12, 60, 26, 56, 40, 2, 53, 23, 57, 38, 62, 14, 36, 59, 10, 31, 39, 6, 49, 9, 41, 26, 5, 48, 43, 27, 33, 58, 1, 50, 25, 57 }, { 61, 37, 15, 61, 3, 39, 58, 43, 26, 0, 44, 10, 47, 3, 37, 63, 28, 43, 13, 39, 3, 57, 30, 59, 0, 48, 5, 43, 13, 22, 60, 33, 55, 15, 42, 4, 52, 10, 45, 13, 54, 4, 24, 49, 37, 26, 41, 14, 42, 9, 61, 13, 38, 23, 3, 53, 0, 58, 21, 42, 63, 10, 17, 61, 25, 0, 58, 28, 17, 44, 57, 12, 27, 0, 55, 5, 52, 28, 23, 47, 29, 0, 43, 17, 58, 28, 47, 23, 55, 10, 58, 23, 51, 40, 18, 33, 45, 0, 49, 8, 32, 61, 19, 48, 0, 26, 7, 47, 29, 18, 44, 0, 56, 34, 20, 59, 15, 51, 37, 18, 10, 52, 7, 20, 46, 9, 38, 17 }, { 6, 27, 48, 23, 45, 29, 5, 18, 38, 62, 27, 56, 20, 32, 15, 9, 48, 0, 54, 22, 45, 20, 7, 41, 23, 39, 19, 27, 58, 31, 44, 0, 12, 50, 23, 56, 20, 39, 32, 59, 16, 52, 33, 9, 57, 22, 6, 58, 28, 50, 24, 2, 56, 35, 16, 45, 32, 38, 15, 54, 2, 38, 46, 22, 35, 45, 20, 5, 52, 25, 7, 35, 59, 32, 22, 43, 38, 3, 51, 16, 34, 53, 32, 50, 3, 40, 8, 43, 0, 39, 27, 4, 14, 61, 8, 55, 15, 41, 20, 44, 27, 13, 39, 11, 46, 42, 54, 33, 4, 52, 23, 61, 14, 25, 43, 2, 33, 11, 63, 29, 61, 17, 40, 55, 22, 62, 28, 44 }, { 20, 54, 8, 56, 35, 10, 63, 31, 52, 12, 48, 6, 59, 41, 52, 33, 19, 58, 25, 49, 11, 37, 47, 12, 54, 15, 56, 35, 7, 47, 16, 53, 28, 34, 5, 37, 28, 8, 48, 3, 28, 38, 18, 61, 16, 43, 53, 32, 4, 17, 47, 27, 44, 8, 63, 10, 25, 49, 6, 37, 24, 52, 32, 3, 50, 12, 41, 56, 38, 14, 62, 20, 40, 16, 53, 31, 18, 63, 41, 9, 59, 7, 13, 25, 57, 20, 63, 26, 53, 18, 48, 62, 30, 46, 21, 25, 58, 29, 36, 4, 55, 34, 6, 60, 31, 16, 21, 12, 58, 38, 9, 29, 47, 7, 52, 30, 57, 44, 22, 0, 35, 45, 3, 31, 14, 36, 0, 51 }, { 42, 14, 33, 24, 16, 49, 40, 2, 22, 33, 16, 36, 25, 1, 21, 61, 38, 8, 33, 4, 62, 26, 29, 60, 6, 46, 30, 11, 63, 4, 36, 40, 19, 57, 46, 11, 41, 63, 22, 25, 58, 10, 46, 2, 34, 27, 11, 38, 56, 34, 12, 53, 18, 33, 41, 51, 13, 28, 60, 20, 47, 14, 29, 59, 16, 62, 8, 22, 32, 47, 9, 49, 2, 44, 7, 12, 45, 6, 20, 27, 45, 24, 62, 42, 36, 11, 33, 15, 37, 7, 32, 10, 37, 1, 35, 50, 6, 11, 63, 24, 52, 15, 50, 24, 3, 37, 56, 27, 34, 22, 49, 16, 36, 62, 17, 39, 4, 15, 54, 24, 50, 8, 58, 26, 49, 54, 11, 30 }, { 4, 59, 41, 1, 53, 12, 25, 45, 59, 7, 51, 39, 54, 14, 46, 4, 27, 53, 16, 44, 18, 51, 1, 32, 25, 2, 50, 40, 20, 54, 24, 9, 62, 2, 27, 60, 1, 17, 36, 50, 6, 40, 30, 55, 41, 19, 49, 1, 21, 60, 40, 5, 62, 1, 22, 30, 57, 4, 43, 31, 1, 55, 40, 7, 27, 37, 30, 54, 1, 19, 42, 30, 56, 26, 62, 49, 24, 57, 37, 56, 2, 39, 16, 5, 30, 55, 3, 49, 60, 23, 56, 44, 17, 52, 13, 42, 28, 48, 18, 45, 9, 37, 21, 41, 58, 10, 48, 1, 63, 5, 41, 57, 2, 24, 12, 48, 27, 42, 32, 46, 13, 38, 19, 34, 5, 41, 25, 60 }, { 39, 28, 21, 46, 32, 57, 36, 9, 19, 42, 4, 29, 11, 43, 30, 49, 13, 42, 35, 56, 9, 39, 15, 52, 36, 61, 18, 26, 45, 14, 31, 48, 21, 43, 14, 33, 49, 54, 14, 44, 21, 62, 13, 23, 8, 62, 15, 51, 44, 7, 30, 37, 20, 42, 56, 7, 39, 18, 50, 11, 61, 9, 19, 43, 57, 2, 48, 11, 39, 60, 28, 4, 37, 17, 35, 1, 33, 11, 31, 14, 48, 19, 35, 51, 46, 21, 44, 29, 12, 41, 2, 22, 58, 26, 54, 4, 59, 38, 2, 33, 57, 1, 63, 13, 28, 51, 15, 40, 18, 45, 8, 30, 43, 37, 54, 19, 8, 59, 21, 6, 60, 29, 55, 10, 63, 15, 47, 17 }, { 3, 50, 10, 62, 18, 5, 27, 49, 60, 23, 55, 18, 62, 24, 56, 10, 59, 28, 2, 23, 34, 59, 43, 20, 10, 42, 8, 49, 1, 37, 57, 6, 51, 29, 53, 7, 23, 31, 5, 32, 51, 0, 35, 54, 45, 31, 5, 26, 36, 24, 55, 15, 48, 29, 14, 48, 26, 60, 21, 41, 36, 26, 50, 33, 14, 44, 17, 24, 52, 15, 46, 23, 54, 6, 47, 21, 60, 50, 4, 53, 29, 61, 8, 23, 1, 60, 19, 6, 53, 16, 47, 34, 6, 39, 16, 31, 12, 20, 53, 22, 30, 43, 25, 46, 35, 6, 44, 32, 53, 26, 55, 19, 11, 59, 5, 33, 51, 1, 35, 53, 25, 3, 42, 23, 44, 32, 7, 53 }, { 22, 44, 37, 6, 26, 51, 38, 0, 34, 13, 31, 46, 3, 37, 6, 19, 40, 21, 47, 63, 12, 5, 29, 55, 22, 58, 34, 28, 60, 22, 11, 41, 17, 38, 9, 44, 59, 39, 56, 19, 11, 47, 25, 15, 3, 39, 57, 17, 61, 11, 46, 3, 58, 9, 54, 35, 2, 34, 8, 45, 15, 56, 5, 23, 53, 33, 63, 35, 4, 59, 10, 51, 13, 61, 29, 41, 15, 25, 43, 19, 40, 10, 54, 33, 41, 12, 38, 51, 31, 26, 61, 9, 30, 45, 24, 62, 49, 40, 10, 61, 14, 49, 5, 17, 54, 20, 60, 23, 3, 13, 35, 50, 32, 23, 46, 27, 38, 63, 16, 12, 39, 48, 18, 51, 1, 27, 56, 35 }, { 63, 15, 30, 55, 43, 14, 57, 17, 53, 44, 7, 48, 26, 50, 32, 60, 0, 53, 14, 31, 50, 24, 46, 0, 38, 13, 4, 52, 16, 45, 30, 59, 0, 25, 55, 35, 16, 10, 26, 42, 58, 29, 60, 38, 50, 22, 28, 47, 0, 50, 28, 19, 33, 39, 11, 44, 16, 52, 24, 59, 3, 38, 27, 51, 0, 21, 7, 42, 26, 34, 21, 40, 33, 18, 39, 3, 54, 38, 8, 59, 0, 44, 27, 15, 58, 28, 57, 9, 43, 0, 36, 50, 20, 59, 8, 34, 0, 27, 47, 7, 36, 19, 56, 32, 0, 38, 11, 29, 62, 47, 6, 61, 0, 41, 14, 56, 10, 23, 45, 31, 57, 8, 36, 13, 58, 38, 11, 19 }, { 0, 34, 12, 47, 21, 2, 40, 30, 11, 25, 61, 20, 40, 15, 35, 22, 45, 36, 7, 41, 17, 57, 9, 48, 32, 62, 44, 24, 35, 3, 54, 13, 33, 63, 19, 4, 48, 22, 62, 2, 37, 8, 33, 6, 20, 52, 9, 32, 43, 13, 39, 63, 25, 4, 49, 23, 62, 32, 9, 30, 48, 18, 63, 12, 46, 29, 58, 13, 48, 8, 57, 31, 0, 51, 9, 58, 12, 22, 47, 29, 35, 22, 49, 5, 46, 4, 34, 20, 63, 24, 56, 11, 41, 3, 51, 19, 56, 35, 17, 58, 28, 42, 9, 45, 59, 26, 51, 42, 17, 36, 25, 15, 53, 21, 44, 3, 30, 55, 5, 50, 21, 28, 61, 32, 6, 49, 28, 46 }, { 58, 42, 60, 4, 31, 59, 22, 63, 35, 38, 9, 54, 1, 57, 8, 51, 16, 58, 27, 53, 3, 38, 30, 15, 27, 6, 19, 56, 10, 50, 21, 36, 47, 5, 43, 28, 51, 32, 13, 46, 18, 54, 16, 43, 63, 12, 36, 59, 22, 34, 5, 52, 17, 59, 27, 41, 0, 19, 55, 37, 13, 43, 6, 34, 41, 10, 36, 55, 19, 44, 3, 16, 58, 27, 49, 25, 32, 62, 17, 55, 13, 63, 18, 52, 25, 37, 17, 48, 13, 32, 5, 46, 28, 37, 14, 43, 25, 5, 51, 39, 3, 52, 33, 22, 8, 40, 12, 4, 57, 9, 46, 39, 28, 58, 13, 62, 17, 42, 19, 36, 0, 47, 16, 43, 24, 21, 54, 13 }, { 25, 9, 23, 50, 36, 8, 45, 14, 3, 51, 16, 28, 44, 12, 42, 29, 4, 26, 10, 47, 22, 61, 18, 54, 51, 39, 46, 13, 41, 26, 58, 7, 18, 39, 12, 57, 15, 1, 52, 27, 41, 23, 48, 1, 27, 45, 18, 2, 57, 26, 55, 8, 43, 31, 6, 58, 14, 51, 40, 5, 61, 31, 24, 54, 17, 60, 22, 1, 39, 30, 53, 45, 36, 13, 43, 5, 45, 2, 37, 6, 34, 42, 2, 39, 10, 62, 7, 54, 40, 18, 60, 15, 52, 21, 63, 8, 55, 46, 15, 30, 23, 13, 62, 16, 50, 24, 58, 31, 48, 21, 34, 2, 49, 7, 31, 37, 26, 48, 9, 61, 40, 11, 52, 2, 60, 40, 4, 37 }, { 52, 28, 39, 16, 54, 19, 29, 55, 42, 20, 58, 33, 24, 63, 18, 55, 39, 62, 43, 34, 12, 40, 6, 35, 2, 25, 8, 62, 34, 1, 31, 42, 61, 27, 53, 24, 40, 61, 34, 8, 59, 4, 30, 56, 40, 6, 53, 42, 10, 48, 16, 37, 12, 46, 21, 36, 47, 11, 28, 45, 22, 10, 57, 2, 49, 31, 14, 44, 61, 11, 25, 6, 23, 63, 18, 36, 28, 56, 20, 51, 11, 48, 27, 56, 32, 22, 45, 30, 2, 42, 27, 39, 1, 44, 23, 31, 38, 22, 11, 61, 43, 54, 4, 47, 35, 2, 44, 16, 28, 54, 12, 62, 18, 43, 10, 52, 1, 58, 33, 15, 29, 56, 20, 34, 9, 30, 48, 17 }, { 46, 2, 56, 11, 41, 1, 49, 6, 27, 47, 2, 48, 5, 32, 37, 3, 13, 19, 32, 1, 55, 28, 60, 17, 43, 59, 32, 20, 49, 16, 55, 23, 14, 46, 2, 36, 6, 30, 20, 49, 12, 47, 35, 14, 21, 60, 29, 14, 35, 24, 46, 1, 56, 29, 53, 8, 33, 23, 56, 1, 35, 46, 20, 39, 26, 4, 53, 28, 17, 38, 60, 34, 48, 9, 55, 15, 46, 7, 41, 31, 60, 24, 16, 36, 1, 59, 19, 52, 35, 6, 55, 11, 59, 33, 7, 57, 4, 29, 48, 1, 19, 26, 37, 30, 18, 63, 37, 6, 59, 1, 40, 24, 56, 33, 46, 22, 35, 7, 24, 53, 39, 5, 26, 45, 55, 18, 62, 7 }, { 20, 60, 29, 34, 20, 62, 33, 52, 10, 36, 13, 60, 41, 21, 50, 27, 56, 49, 8, 51, 21, 45, 11, 48, 8, 23, 53, 3, 29, 44, 5, 52, 9, 32, 50, 17, 43, 56, 3, 38, 24, 10, 62, 25, 51, 9, 33, 49, 61, 7, 30, 62, 22, 19, 2, 42, 63, 5, 49, 18, 60, 15, 52, 7, 43, 56, 23, 50, 5, 50, 2, 20, 41, 30, 1, 52, 22, 61, 14, 26, 3, 43, 53, 7, 47, 28, 11, 14, 23, 58, 33, 25, 47, 13, 50, 17, 40, 54, 34, 60, 41, 6, 59, 14, 50, 7, 25, 55, 20, 42, 51, 8, 27, 4, 16, 60, 28, 50, 44, 3, 22, 49, 63, 12, 33, 1, 43, 31 }, { 36, 5, 46, 8, 44, 24, 13, 39, 25, 57, 31, 18, 8, 52, 10, 45, 6, 30, 36, 24, 63, 4, 33, 26, 57, 40, 15, 56, 37, 12, 40, 25, 37, 58, 11, 63, 21, 45, 16, 60, 31, 53, 18, 33, 3, 45, 23, 0, 20, 54, 40, 15, 50, 38, 60, 16, 25, 42, 29, 38, 7, 41, 25, 62, 18, 33, 8, 35, 42, 16, 32, 56, 12, 39, 59, 19, 34, 9, 49, 38, 57, 12, 21, 50, 14, 40, 61, 44, 50, 9, 49, 19, 3, 29, 35, 62, 12, 24, 7, 18, 52, 32, 10, 46, 21, 41, 32, 11, 36, 29, 14, 34, 60, 38, 54, 11, 41, 14, 19, 57, 32, 16, 7, 41, 51, 25, 14, 57 }, { 53, 18, 26, 50, 15, 58, 4, 63, 17, 43, 7, 40, 61, 35, 15, 41, 23, 60, 16, 38, 14, 42, 19, 50, 0, 31, 10, 46, 27, 63, 18, 60, 0, 20, 29, 39, 8, 26, 37, 5, 42, 0, 44, 39, 57, 17, 58, 41, 28, 37, 4, 32, 9, 44, 12, 31, 54, 10, 59, 14, 27, 53, 12, 36, 0, 47, 13, 63, 21, 58, 10, 24, 50, 27, 4, 26, 44, 53, 31, 0, 18, 42, 29, 33, 57, 4, 32, 26, 0, 38, 16, 61, 41, 53, 20, 0, 42, 44, 49, 27, 10, 56, 39, 0, 57, 15, 53, 49, 3, 61, 22, 47, 17, 5, 49, 26, 2, 63, 39, 10, 47, 27, 37, 23, 4, 59, 38, 10 }, { 23, 39, 61, 3, 37, 28, 48, 31, 0, 34, 51, 23, 2, 26, 58, 0, 53, 11, 46, 1, 57, 29, 52, 14, 37, 61, 21, 35, 2, 49, 7, 34, 47, 55, 4, 33, 54, 13, 58, 52, 19, 50, 22, 7, 13, 29, 36, 11, 51, 17, 60, 25, 55, 4, 34, 51, 0, 35, 20, 48, 32, 3, 51, 30, 59, 28, 40, 3, 46, 29, 54, 43, 7, 62, 47, 11, 39, 4, 23, 46, 55, 8, 63, 5, 25, 37, 18, 46, 21, 56, 31, 5, 36, 8, 45, 58, 26, 15, 2, 36, 47, 21, 29, 44, 25, 34, 3, 27, 43, 10, 52, 0, 45, 30, 24, 36, 43, 18, 34, 59, 0, 52, 61, 15, 44, 19, 30, 49 }, { 0, 27, 12, 43, 54, 9, 22, 53, 21, 46, 15, 55, 29, 47, 20, 33, 39, 28, 59, 35, 9, 44, 5, 24, 47, 7, 52, 17, 56, 22, 30, 42, 14, 26, 45, 18, 49, 1, 24, 34, 11, 27, 55, 32, 61, 47, 2, 56, 6, 44, 13, 47, 36, 27, 58, 22, 16, 47, 40, 4, 57, 38, 21, 45, 16, 9, 56, 26, 11, 38, 0, 22, 36, 17, 33, 57, 16, 30, 62, 15, 35, 40, 20, 45, 59, 10, 54, 8, 63, 13, 52, 27, 22, 57, 28, 12, 32, 51, 55, 22, 63, 4, 16, 54, 12, 62, 45, 19, 58, 13, 32, 40, 20, 56, 7, 57, 9, 54, 6, 29, 42, 21, 8, 55, 35, 47, 6, 41 }, { 56, 33, 58, 32, 19, 35, 42, 6, 59, 11, 38, 5, 49, 12, 62, 7, 52, 17, 5, 25, 54, 20, 61, 31, 54, 27, 41, 11, 44, 5, 59, 12, 36, 51, 10, 61, 28, 41, 48, 9, 43, 63, 5, 40, 20, 8, 49, 26, 34, 21, 58, 1, 18, 45, 7, 39, 61, 26, 8, 50, 23, 10, 63, 5, 55, 37, 19, 49, 52, 15, 59, 47, 13, 54, 1, 25, 42, 58, 10, 48, 3, 27, 50, 1, 17, 48, 34, 41, 16, 40, 2, 45, 10, 39, 17, 61, 5, 38, 19, 9, 41, 31, 60, 38, 5, 23, 36, 8, 30, 55, 24, 63, 12, 48, 14, 51, 31, 20, 45, 25, 12, 50, 32, 2, 28, 11, 62, 14 }, { 44, 16, 7, 48, 1, 62, 16, 50, 27, 33, 61, 25, 17, 44, 31, 14, 22, 43, 32, 48, 18, 40, 8, 36, 3, 16, 33, 62, 23, 38, 25, 53, 2, 21, 41, 6, 22, 15, 59, 29, 16, 37, 26, 15, 52, 42, 23, 15, 54, 39, 10, 30, 53, 11, 49, 24, 2, 43, 55, 17, 34, 44, 15, 31, 24, 44, 2, 32, 7, 35, 25, 5, 40, 45, 29, 51, 6, 21, 37, 52, 24, 60, 13, 31, 53, 23, 2, 28, 49, 24, 31, 60, 20, 51, 1, 34, 48, 14, 59, 33, 50, 1, 18, 33, 48, 60, 17, 51, 39, 6, 38, 2, 35, 29, 40, 23, 1, 62, 15, 53, 37, 17, 46, 57, 40, 51, 24, 22 }, { 5, 37, 52, 24, 45, 13, 40, 3, 45, 9, 19, 42, 56, 4, 37, 46, 56, 2, 63, 11, 51, 1, 49, 13, 59, 45, 39, 1, 48, 15, 58, 9, 46, 31, 54, 35, 57, 38, 3, 46, 56, 4, 47, 57, 1, 30, 38, 63, 3, 46, 28, 63, 41, 14, 33, 62, 19, 32, 13, 28, 61, 1, 53, 42, 11, 60, 22, 62, 27, 42, 61, 31, 19, 8, 61, 12, 32, 55, 2, 18, 33, 12, 43, 36, 9, 62, 30, 55, 6, 58, 35, 7, 43, 29, 54, 23, 43, 30, 3, 25, 11, 45, 52, 28, 7, 14, 42, 1, 22, 50, 16, 53, 19, 59, 4, 46, 33, 41, 4, 35, 58, 5, 26, 13, 20, 2, 34, 54 }, { 30, 63, 21, 10, 26, 55, 29, 59, 23, 39, 53, 1, 36, 24, 59, 27, 10, 34, 23, 38, 30, 60, 22, 42, 28, 19, 9, 57, 30, 19, 43, 33, 13, 63, 3, 19, 11, 50, 31, 20, 14, 34, 10, 35, 17, 59, 7, 31, 19, 25, 50, 5, 20, 57, 29, 6, 52, 41, 4, 46, 20, 37, 26, 17, 49, 6, 39, 18, 53, 14, 3, 49, 57, 23, 34, 48, 14, 41, 28, 38, 56, 6, 58, 25, 39, 19, 43, 15, 37, 11, 47, 18, 53, 4, 37, 9, 62, 21, 53, 40, 57, 24, 13, 40, 56, 26, 47, 31, 59, 25, 45, 27, 10, 43, 21, 61, 13, 27, 48, 9, 23, 43, 31, 62, 38, 59, 9, 47 }, { 25, 4, 40, 60, 34, 6, 18, 36, 8, 57, 12, 30, 49, 14, 6, 54, 41, 16, 50, 6, 43, 15, 34, 4, 53, 24, 50, 35, 4, 51, 7, 55, 28, 24, 39, 44, 60, 7, 25, 62, 42, 53, 24, 61, 28, 45, 52, 12, 48, 37, 9, 35, 43, 3, 37, 48, 12, 58, 30, 52, 9, 59, 6, 57, 33, 29, 48, 4, 37, 45, 20, 34, 10, 39, 0, 60, 22, 45, 8, 63, 21, 42, 14, 49, 3, 56, 11, 46, 21, 61, 0, 42, 25, 13, 63, 17, 36, 8, 46, 16, 6, 35, 63, 0, 21, 37, 4, 57, 9, 34, 5, 61, 48, 32, 8, 37, 54, 17, 56, 30, 60, 0, 50, 16, 7, 29, 42, 17 }, { 32, 50, 15, 48, 2, 43, 52, 25, 47, 16, 32, 63, 21, 52, 40, 19, 0, 61, 29, 58, 20, 56, 26, 46, 12, 55, 6, 22, 62, 32, 17, 40, 0, 49, 34, 8, 27, 32, 48, 0, 21, 39, 5, 44, 12, 6, 22, 40, 0, 57, 16, 60, 23, 17, 54, 22, 36, 15, 24, 39, 19, 34, 47, 23, 0, 54, 13, 51, 24, 9, 55, 16, 52, 27, 44, 20, 4, 54, 26, 49, 0, 30, 46, 16, 29, 51, 34, 4, 52, 28, 33, 15, 57, 39, 26, 49, 0, 56, 27, 31, 48, 20, 43, 29, 53, 11, 46, 19, 41, 13, 55, 18, 0, 57, 26, 51, 2, 44, 6, 38, 14, 40, 22, 45, 36, 53, 3, 57 }, { 44, 12, 37, 28, 22, 57, 11, 38, 0, 51, 9, 41, 4, 29, 11, 47, 33, 45, 12, 26, 3, 36, 9, 63, 31, 16, 38, 44, 14, 47, 25, 61, 20, 58, 15, 47, 17, 57, 13, 36, 9, 51, 18, 29, 50, 36, 54, 20, 61, 27, 32, 13, 53, 44, 9, 27, 0, 63, 45, 2, 56, 10, 14, 43, 41, 28, 58, 11, 35, 60, 30, 41, 6, 63, 11, 51, 37, 32, 15, 10, 35, 53, 5, 61, 22, 7, 26, 59, 23, 9, 44, 48, 21, 3, 51, 32, 24, 41, 12, 61, 2, 55, 9, 15, 35, 58, 28, 15, 62, 30, 37, 23, 42, 29, 11, 17, 35, 24, 63, 20, 52, 28, 8, 55, 11, 23, 47, 19 }, { 0, 56, 8, 53, 14, 31, 61, 20, 55, 28, 62, 18, 35, 60, 25, 57, 7, 23, 39, 54, 47, 17, 43, 0, 40, 59, 29, 2, 56, 10, 37, 5, 43, 11, 29, 52, 1, 23, 54, 41, 59, 30, 55, 1, 62, 15, 33, 4, 43, 10, 47, 39, 1, 31, 40, 60, 49, 33, 7, 55, 26, 50, 31, 61, 8, 18, 21, 32, 44, 1, 25, 47, 18, 36, 30, 23, 59, 7, 40, 59, 27, 19, 38, 32, 44, 54, 40, 17, 38, 60, 27, 6, 35, 55, 10, 14, 44, 5, 50, 17, 38, 26, 42, 50, 18, 3, 44, 52, 2, 49, 7, 52, 15, 46, 62, 39, 55, 10, 31, 48, 3, 58, 33, 18, 61, 34, 13, 59 }, { 39, 27, 63, 20, 35, 41, 4, 45, 26, 5, 38, 13, 44, 2, 50, 17, 37, 52, 2, 13, 28, 58, 24, 51, 21, 8, 34, 48, 27, 42, 18, 51, 31, 56, 5, 36, 38, 44, 4, 17, 26, 11, 38, 23, 42, 8, 56, 39, 24, 51, 5, 56, 21, 59, 14, 6, 18, 42, 22, 35, 16, 37, 3, 25, 39, 46, 63, 5, 50, 17, 58, 8, 55, 3, 50, 12, 43, 17, 47, 2, 51, 9, 62, 12, 1, 35, 13, 50, 1, 37, 12, 51, 19, 29, 46, 59, 22, 58, 33, 45, 22, 60, 10, 32, 61, 39, 8, 33, 25, 36, 20, 60, 38, 4, 21, 5, 28, 45, 12, 18, 42, 11, 49, 1, 27, 40, 6, 30 }, { 24, 16, 42, 1, 50, 10, 48, 17, 33, 43, 24, 48, 21, 55, 31, 42, 10, 21, 63, 35, 49, 6, 33, 13, 41, 53, 10, 20, 60, 6, 53, 26, 12, 41, 22, 60, 14, 28, 63, 33, 49, 3, 45, 16, 48, 26, 14, 46, 18, 30, 35, 26, 8, 50, 29, 51, 25, 57, 12, 47, 53, 9, 62, 20, 54, 2, 36, 15, 40, 28, 33, 13, 38, 24, 46, 1, 29, 56, 33, 20, 44, 24, 41, 26, 57, 20, 63, 8, 30, 55, 5, 41, 62, 8, 34, 2, 37, 10, 19, 6, 37, 1, 53, 23, 5, 27, 58, 22, 43, 12, 50, 26, 9, 34, 54, 32, 49, 1, 59, 37, 22, 46, 25, 36, 51, 15, 54, 46 }, { 52, 7, 45, 33, 26, 58, 14, 60, 7, 54, 3, 58, 8, 34, 14, 5, 59, 30, 18, 44, 8, 22, 48, 62, 3, 26, 55, 38, 23, 16, 39, 1, 62, 24, 49, 9, 53, 19, 46, 7, 19, 60, 31, 58, 2, 34, 53, 7, 59, 2, 62, 42, 46, 19, 36, 11, 44, 4, 38, 28, 1, 43, 32, 51, 12, 29, 56, 22, 52, 2, 62, 49, 22, 60, 14, 35, 63, 5, 25, 57, 14, 53, 4, 46, 18, 31, 42, 22, 47, 20, 58, 31, 16, 43, 23, 54, 30, 42, 52, 57, 29, 49, 30, 13, 45, 48, 16, 55, 6, 63, 1, 44, 14, 58, 19, 47, 15, 24, 51, 34, 6, 55, 5, 63, 20, 41, 21, 9 }, { 30, 62, 18, 55, 5, 23, 39, 29, 49, 30, 15, 36, 28, 46, 60, 25, 39, 46, 4, 32, 61, 40, 15, 30, 36, 45, 14, 2, 49, 33, 57, 45, 18, 32, 3, 45, 30, 2, 35, 52, 40, 27, 13, 21, 38, 63, 20, 28, 37, 23, 16, 10, 13, 55, 2, 62, 21, 32, 60, 17, 58, 23, 5, 40, 16, 48, 7, 45, 10, 26, 43, 19, 6, 31, 52, 21, 39, 16, 48, 9, 37, 28, 36, 55, 7, 48, 3, 59, 15, 45, 25, 1, 53, 13, 47, 7, 62, 15, 4, 25, 12, 41, 18, 60, 38, 11, 34, 19, 39, 31, 29, 56, 23, 42, 3, 27, 60, 41, 8, 16, 61, 29, 43, 9, 32, 2, 60, 34 }, { 3, 38, 13, 37, 52, 44, 2, 19, 12, 42, 63, 19, 40, 1, 20, 50, 12, 55, 15, 56, 27, 1, 54, 11, 57, 18, 32, 63, 44, 4, 29, 13, 37, 61, 35, 16, 42, 57, 12, 22, 6, 55, 43, 10, 50, 5, 44, 11, 48, 52, 34, 58, 28, 41, 38, 30, 7, 52, 11, 49, 30, 14, 45, 27, 59, 34, 21, 38, 32, 58, 11, 36, 56, 42, 9, 41, 3, 54, 31, 42, 0, 60, 16, 11, 39, 24, 52, 33, 6, 36, 10, 40, 32, 60, 26, 20, 39, 28, 47, 34, 63, 8, 54, 3, 24, 56, 0, 51, 13, 47, 16, 40, 7, 35, 52, 11, 36, 4, 57, 30, 39, 13, 18, 50, 58, 28, 12, 48 }, { 57, 24, 49, 21, 10, 31, 61, 36, 56, 0, 22, 53, 11, 56, 32, 7, 36, 27, 41, 9, 46, 19, 34, 42, 25, 7, 50, 9, 28, 21, 54, 8, 50, 7, 27, 59, 10, 25, 48, 62, 37, 0, 33, 58, 25, 18, 32, 61, 0, 15, 45, 5, 50, 3, 23, 55, 47, 17, 40, 6, 60, 34, 53, 8, 41, 0, 61, 13, 54, 4, 46, 28, 0, 17, 48, 27, 58, 13, 23, 61, 33, 21, 50, 30, 62, 8, 14, 29, 56, 27, 61, 49, 17, 2, 44, 11, 51, 0, 59, 17, 40, 20, 32, 47, 36, 21, 42, 28, 60, 4, 54, 10, 59, 17, 30, 62, 21, 43, 26, 48, 0, 56, 36, 25, 8, 44, 39, 17 }, { 10, 42, 4, 59, 27, 47, 8, 23, 51, 32, 45, 6, 37, 26, 48, 43, 62, 0, 21, 53, 38, 12, 51, 5, 60, 47, 24, 37, 59, 15, 35, 47, 22, 55, 0, 50, 21, 40, 6, 29, 15, 52, 24, 8, 41, 55, 13, 29, 40, 56, 24, 31, 19, 33, 61, 15, 0, 35, 24, 42, 21, 2, 19, 57, 24, 15, 30, 50, 20, 25, 40, 16, 57, 34, 61, 8, 29, 45, 6, 49, 11, 47, 2, 44, 19, 57, 38, 50, 12, 42, 21, 4, 35, 52, 28, 56, 23, 36, 13, 45, 4, 52, 27, 14, 6, 62, 9, 45, 21, 37, 25, 46, 33, 49, 0, 44, 7, 53, 13, 19, 53, 31, 3, 47, 15, 56, 22, 51 }, { 35, 28, 53, 32, 1, 16, 54, 40, 9, 17, 25, 58, 14, 59, 3, 22, 16, 51, 31, 5, 23, 58, 28, 17, 35, 20, 0, 42, 11, 52, 3, 31, 41, 17, 43, 13, 32, 54, 18, 60, 32, 45, 17, 49, 2, 36, 51, 22, 7, 36, 9, 63, 48, 12, 46, 26, 43, 28, 63, 13, 48, 37, 51, 33, 5, 47, 55, 9, 42, 63, 7, 51, 24, 12, 37, 19, 55, 34, 18, 38, 15, 28, 54, 34, 5, 43, 22, 0, 48, 14, 54, 24, 58, 9, 38, 5, 32, 55, 21, 30, 49, 9, 59, 43, 30, 51, 35, 26, 7, 53, 2, 22, 14, 27, 57, 18, 38, 24, 33, 45, 10, 41, 20, 60, 37, 5, 32, 0 }, { 63, 19, 15, 40, 62, 35, 14, 28, 46, 61, 4, 49, 35, 10, 29, 54, 33, 8, 45, 62, 37, 1, 43, 55, 10, 52, 61, 30, 19, 40, 25, 62, 11, 38, 27, 58, 36, 3, 46, 8, 39, 4, 62, 28, 47, 20, 4, 54, 47, 27, 43, 1, 21, 38, 8, 58, 10, 54, 4, 56, 9, 26, 12, 39, 60, 27, 18, 37, 1, 31, 35, 5, 45, 50, 2, 43, 26, 1, 59, 23, 56, 40, 7, 26, 58, 17, 32, 63, 25, 39, 7, 31, 45, 19, 63, 15, 48, 8, 37, 61, 16, 34, 1, 56, 18, 3, 15, 58, 49, 32, 63, 41, 55, 5, 40, 22, 50, 6, 59, 2, 63, 23, 52, 11, 26, 61, 44, 23 }, { 11, 56, 46, 6, 22, 43, 58, 3, 34, 21, 38, 30, 18, 44, 52, 13, 41, 57, 17, 28, 14, 49, 25, 7, 33, 39, 26, 6, 56, 48, 1, 20, 56, 5, 46, 9, 19, 51, 30, 25, 56, 21, 35, 14, 57, 42, 16, 33, 10, 57, 17, 59, 41, 25, 53, 37, 20, 40, 30, 18, 31, 62, 44, 22, 3, 44, 11, 48, 23, 53, 18, 60, 29, 22, 62, 15, 53, 47, 10, 41, 3, 19, 52, 36, 13, 46, 10, 35, 3, 61, 41, 16, 1, 50, 26, 42, 18, 46, 2, 25, 54, 20, 39, 23, 47, 31, 41, 12, 38, 17, 8, 19, 31, 48, 12, 61, 9, 54, 29, 35, 15, 38, 6, 43, 34, 14, 7, 47 }, { 39, 2, 33, 26, 53, 8, 18, 50, 41, 12, 53, 1, 63, 24, 19, 39, 2, 24, 47, 10, 60, 38, 19, 63, 48, 4, 15, 45, 32, 14, 60, 36, 29, 53, 23, 63, 34, 12, 61, 1, 43, 11, 53, 30, 1, 26, 60, 45, 23, 39, 3, 29, 12, 50, 4, 16, 51, 3, 45, 36, 50, 1, 16, 54, 35, 14, 57, 30, 58, 9, 46, 14, 41, 10, 32, 38, 4, 30, 21, 51, 32, 63, 25, 1, 60, 27, 53, 18, 51, 22, 28, 55, 34, 12, 40, 3, 60, 29, 57, 41, 6, 44, 11, 53, 8, 61, 24, 57, 1, 28, 44, 59, 36, 3, 34, 25, 41, 31, 16, 44, 22, 47, 28, 58, 1, 49, 54, 29 }, { 58, 25, 50, 13, 38, 30, 60, 24, 6, 57, 27, 42, 9, 45, 6, 61, 30, 50, 4, 34, 29, 3, 46, 13, 22, 42, 58, 28, 9, 39, 23, 44, 7, 15, 44, 2, 40, 15, 47, 41, 23, 37, 7, 59, 38, 11, 34, 6, 62, 14, 52, 35, 55, 19, 32, 61, 33, 24, 57, 6, 22, 59, 29, 7, 49, 25, 40, 3, 17, 39, 27, 52, 0, 55, 16, 57, 24, 61, 36, 6, 29, 12, 48, 39, 20, 44, 6, 40, 33, 5, 48, 10, 57, 36, 22, 51, 33, 9, 24, 12, 62, 29, 50, 35, 14, 43, 5, 33, 47, 52, 13, 23, 10, 51, 56, 16, 46, 1, 49, 4, 61, 9, 52, 18, 31, 21, 36, 17 }, { 19, 42, 9, 48, 2, 44, 11, 37, 48, 20, 33, 16, 55, 35, 49, 15, 37, 20, 59, 16, 53, 22, 56, 31, 50, 11, 34, 54, 16, 51, 4, 49, 33, 53, 21, 28, 56, 24, 31, 9, 52, 16, 48, 24, 44, 13, 51, 20, 31, 49, 18, 6, 34, 2, 44, 14, 47, 8, 15, 43, 13, 41, 33, 52, 20, 61, 7, 51, 34, 62, 4, 20, 36, 33, 43, 8, 46, 13, 53, 17, 45, 42, 9, 31, 52, 11, 30, 56, 13, 59, 17, 44, 27, 6, 62, 11, 43, 17, 49, 38, 26, 2, 16, 27, 58, 21, 54, 18, 26, 5, 35, 61, 43, 27, 7, 39, 14, 58, 37, 55, 20, 33, 13, 40, 62, 10, 55, 5 }, { 51, 14, 61, 29, 59, 20, 55, 31, 0, 49, 11, 60, 3, 26, 22, 56, 0, 40, 12, 43, 41, 8, 36, 0, 17, 57, 24, 2, 46, 26, 61, 18, 0, 38, 12, 59, 6, 49, 3, 57, 19, 63, 5, 33, 18, 54, 28, 56, 0, 43, 26, 46, 63, 27, 56, 22, 27, 54, 38, 28, 63, 24, 10, 45, 0, 31, 42, 21, 12, 25, 44, 49, 59, 6, 26, 50, 3, 34, 27, 59, 0, 35, 62, 16, 4, 58, 47, 0, 43, 24, 37, 2, 54, 20, 46, 31, 0, 56, 34, 5, 55, 45, 60, 37, 0, 40, 10, 38, 63, 46, 15, 20, 0, 53, 21, 62, 30, 11, 24, 27, 40, 0, 57, 26, 3, 45, 27, 35 } }; EFL_ALWAYS_INLINE void _soft16_convert_from_rgba_pt(const DATA32 *src, DATA16 *dst, DATA8 *alpha, const int x, const int y) { DATA8 orig_r, orig_g, orig_b, orig_a; orig_r = R_VAL(src); orig_g = G_VAL(src); orig_b = B_VAL(src); orig_a = A_VAL(src); if (orig_a == 255) { DATA8 dith5, dith6, dith, r, g, b; dith = dither_table[x & S16_DM_MSK][y & S16_DM_MSK]; dith5 = dith >> S16_DM_SHF(5); dith6 = dith >> S16_DM_SHF(6); r = orig_r >> 3; g = orig_g >> 2; b = orig_b >> 3; if (((orig_r - (r << 3)) >= dith5) && (r < 0x1f)) r++; if (((orig_g - (g << 2)) >= dith6) && (g < 0x3f)) g++; if (((orig_b - (b << 3)) >= dith5) && (b < 0x1f)) b++; *dst = (r << 11) | (g << 5) | b; *alpha = 31; } else if (orig_a == 0) { *dst = 0; *alpha = 0; } else { DATA8 r, g, b, a; r = orig_r >> 3; g = orig_g >> 2; b = orig_b >> 3; a = (orig_a >> 3) + 1; *dst = (r << 11) | (g << 5) | b; *alpha = a; } } static inline void _soft16_convert_from_rgba_scanline(const DATA32 *src, DATA16 *dst, DATA8 *alpha, const int y, const int w) { int x, m; m = (w & ~7); x = 0; pld(src, 0); while (x < m) { pld(src, 32); UNROLL8({ _soft16_convert_from_rgba_pt(src, dst, alpha, x, y); src++; dst++; alpha++; x++; }); } for (; x < w; x++, src++, dst++, alpha++) _soft16_convert_from_rgba_pt(src, dst, alpha, x, y); } void evas_common_soft16_image_convert_from_rgba(Soft16_Image *im, const DATA32 *src) { const DATA32 *sp; DATA16 *dp; DATA8 *ap; unsigned int y; sp = src; dp = im->pixels; ap = im->alpha; for (y = 0; y < im->cache_entry.h; y++, sp += im->cache_entry.w, dp += im->stride, ap += im->stride) _soft16_convert_from_rgba_scanline(sp, dp, ap, y, im->cache_entry.w); } EFL_ALWAYS_INLINE void _soft16_convert_from_rgb_pt(const DATA32 *src, DATA16 *dst, const int x, const int y) { DATA8 orig_r, orig_g, orig_b, r, g, b, dith5, dith6, dith; orig_r = R_VAL(src); orig_g = G_VAL(src); orig_b = B_VAL(src); r = orig_r >> 3; g = orig_g >> 2; b = orig_b >> 3; dith = dither_table[x & S16_DM_MSK][y & S16_DM_MSK]; dith5 = dith >> S16_DM_SHF(5); dith6 = dith >> S16_DM_SHF(6); if (((orig_r - (r << 3)) >= dith5) && (r < 0x1f)) r++; if (((orig_g - (g << 2)) >= dith6) && (g < 0x3f)) g++; if (((orig_b - (b << 3)) >= dith5) && (b < 0x1f)) b++; *dst = (r << 11) | (g << 5) | b; } static inline void _soft16_convert_from_rgb_scanline(const DATA32 *src, DATA16 *dst, const int y, const int w) { int x, m; m = (w & ~7); x = 0; pld(src, 0); while (x < m) { pld(src, 32); UNROLL8({ _soft16_convert_from_rgb_pt(src, dst, x, y); src++; dst++; x++; }); } for (; x < w; x++, src++, dst++) _soft16_convert_from_rgb_pt(src, dst, x, y); } void evas_common_soft16_image_convert_from_rgb(Soft16_Image *im, const DATA32 *src) { const DATA32 *sp; DATA16 *dp; unsigned int y; sp = src; dp = im->pixels; for (y = 0; y < im->cache_entry.h; y++, sp += im->cache_entry.w, dp += im->stride) _soft16_convert_from_rgb_scanline(sp, dp, y, im->cache_entry.w); } evas-1.7.9/src/lib/engines/common_16/evas_soft16_point_blend.c0000664000175000017500000001001612175475547021074 00000000000000/** NOTE: This file is meant to be included by users **/ /** NOTE2: r, g, b parameters are 16bits, so you can pass 0 to 256 inclusive. ** this is due our division by 256 when multiplying the color. **/ /***************************************************************************** * Scanline processing * * _soft16_pt___[_]() * ****************************************************************************/ /*********************************************************************** * Regular blend operations */ EFL_ALWAYS_INLINE void _soft16_pt_blend_transp_solid(DATA16 *p_dst, DATA16 src, DATA8 alpha) { if (alpha == 31) *p_dst = src; else if (alpha != 0) { DATA32 a, b; a = RGB_565_UNPACK(src); b = RGB_565_UNPACK(*p_dst); b = RGB_565_UNPACKED_BLEND(a, b, alpha); *p_dst = RGB_565_PACK(b); } } EFL_ALWAYS_INLINE void _soft16_pt_blend_solid_solid(DATA16 *p_dst, DATA16 src) { *p_dst = src; } /*********************************************************************** * Blend operations taking an extra alpha (fade in, out) */ EFL_ALWAYS_INLINE void _soft16_pt_blend_transp_solid_mul_alpha(DATA16 *p_dst, DATA16 src, DATA8 alpha, DATA8 rel_alpha) { DATA32 a, b; alpha = (alpha * rel_alpha) >> 5; if (alpha == 0) return; alpha++; a = ((RGB_565_UNPACK(src) * rel_alpha) >> 5) & RGB_565_UNPACKED_MASK; b = RGB_565_UNPACK(*p_dst); b = RGB_565_UNPACKED_BLEND(a, b, alpha); *p_dst = RGB_565_PACK(b); } EFL_ALWAYS_INLINE void _soft16_pt_blend_solid_solid_mul_alpha(DATA16 *p_dst, DATA16 src, DATA8 rel_alpha) { DATA32 a, b; a = RGB_565_UNPACK(src); b = RGB_565_UNPACK(*p_dst); b = RGB_565_UNPACKED_BLEND_UNMUL(a, b, rel_alpha); *p_dst = RGB_565_PACK(b); } /*********************************************************************** * Blend operations with extra alpha and multiply color */ EFL_ALWAYS_INLINE void _soft16_pt_blend_transp_solid_mul_color_transp(DATA16 *p_dst, DATA16 src, DATA8 alpha, DATA8 rel_alpha, DATA16 r, DATA16 g, DATA16 b) { DATA32 rgb, d; int r1, g1, b1; alpha = (alpha * rel_alpha) >> 5; if (alpha == 0) return; alpha++; r1 = ((((src) >> 11) & 0x1f) * r) >> 5; g1 = ((((src) >> 5) & 0x3f) * g) >> 6; b1 = (((src) & 0x1f) * b) >> 5; rgb = ((r1 << 11) | (g1 << 21) | b1) & RGB_565_UNPACKED_MASK; d = RGB_565_UNPACK(*p_dst); d = RGB_565_UNPACKED_BLEND(rgb, d, alpha); *p_dst = RGB_565_PACK(d); } EFL_ALWAYS_INLINE void _soft16_pt_blend_solid_solid_mul_color_transp(DATA16 *p_dst, DATA16 src, DATA8 rel_alpha, DATA16 r, DATA16 g, DATA16 b) { int r1, g1, b1; DATA32 rgb, d; r1 = ((((src) >> 11) & 0x1f) * r) >> 5; g1 = ((((src) >> 5) & 0x3f) * g) >> 6; b1 = (((src) & 0x1f) * b) >> 5; rgb = ((r1 << 11) | (g1 << 21) | b1) & RGB_565_UNPACKED_MASK; d = RGB_565_UNPACK(*p_dst); d = RGB_565_UNPACKED_BLEND(rgb, d, rel_alpha); *p_dst = RGB_565_PACK(d); } /*********************************************************************** * Blend operations with extra multiply color */ EFL_ALWAYS_INLINE void _soft16_pt_blend_transp_solid_mul_color_solid(DATA16 *p_dst, DATA16 src, DATA8 alpha, DATA8 r, DATA8 g, DATA8 b) { int r1, g1, b1; if (alpha == 0) return; r1 = ((((src >> 11) & 0x1f) * r) >> 5) & 0x1f; g1 = ((((src >> 5) & 0x3f) * g) >> 6) & 0x3f; b1 = (((src & 0x1f) * b) >> 5) & 0x1f; if (alpha == 31) *p_dst = (r1 << 11) | (g1 << 5) | b1; else { DATA32 rgb_unpack, d; rgb_unpack = ((r1 << 11) | (g1 << 21) | b1) & RGB_565_UNPACKED_MASK; d = RGB_565_UNPACK(*p_dst); d = RGB_565_UNPACKED_BLEND(rgb_unpack, d, alpha); *p_dst = RGB_565_PACK(d); } } EFL_ALWAYS_INLINE void _soft16_pt_blend_solid_solid_mul_color_solid(DATA16 *p_dst, DATA16 src, DATA16 r, DATA16 g, DATA16 b) { int r1, g1, b1; r1 = ((((src >> 11) & 0x1f) * r) >> 5) & 0x1f; g1 = ((((src >> 5) & 0x3f) * g) >> 6) & 0x3f; b1 = (((src & 0x1f) * b) >> 5) & 0x1f; *p_dst = (r1 << 11) | (g1 << 5) | b1; } evas-1.7.9/src/lib/engines/common_16/evas_soft16_scanline_fill.c0000664000175000017500000000346312175475547021411 00000000000000/** NOTE: This file is meant to be included by users **/ /***************************************************************************** * Point processing * * _soft16_pt___[_]() * * Scanline processing * * _soft16_scanline___[_]() * ****************************************************************************/ EFL_ALWAYS_INLINE void _soft16_pt_fill_solid_solid(DATA16 *dst, DATA16 rgb565) { *dst = rgb565; } static void _soft16_scanline_fill_solid_solid(DATA16 *dst, int size, DATA16 rgb565) { DATA16 *start, *end; DATA32 rgb565_double; start = dst; if ((long)start & 0x2) { *start = rgb565; start++; size--; } end = start + (size & ~7); rgb565_double = (rgb565 << 16) | rgb565; while (start < end) { DATA32 *p = (DATA32 *)start; p[0] = rgb565_double; p[1] = rgb565_double; p[2] = rgb565_double; p[3] = rgb565_double; start += 8; } end = start + (size & 7); for (; start < end; start++) *start = rgb565; } EFL_ALWAYS_INLINE void _soft16_pt_fill_transp_solid(DATA16 *dst, DATA32 rgb565_unpack, DATA8 alpha) { DATA32 d; d = RGB_565_UNPACK(*dst); d = RGB_565_UNPACKED_BLEND(rgb565_unpack, d, alpha); *dst = RGB_565_PACK(d); } static void _soft16_scanline_fill_transp_solid(DATA16 *dst, int size, DATA32 rgb565_unpack, DATA8 alpha) { DATA16 *start, *end; start = dst; pld(start, 0); end = start + (size & ~7); while (start < end) { pld(start, 32); UNROLL8({ _soft16_pt_fill_transp_solid(start, rgb565_unpack, alpha); start++; }); } end = start + (size & 7); for (; start < end; start++) _soft16_pt_fill_transp_solid(start, rgb565_unpack, alpha); } evas-1.7.9/src/lib/engines/common_16/evas_soft16_rectangle.c0000664000175000017500000000626612175475547020557 00000000000000#include "evas_common_soft16.h" #include "evas_soft16_scanline_fill.c" static inline int _is_empty_rectangle(const Eina_Rectangle *r) { return (r->w < 1) || (r->h < 1); } static inline void _soft16_rectangle_draw_solid_solid(Soft16_Image *dst, int offset, int w, int h, DATA16 rgb565) { DATA16 *dst_itr; int i; dst_itr = dst->pixels + offset; for (i = 0; i < h; i++, dst_itr += dst->stride) _soft16_scanline_fill_solid_solid(dst_itr, w, rgb565); } static inline void _soft16_rectangle_draw_transp_solid(Soft16_Image *dst, int offset, int w, int h, DATA16 rgb565, DATA8 alpha) { DATA16 *dst_itr; DATA32 rgb565_unpack; int i; dst_itr = dst->pixels + offset; rgb565_unpack = RGB_565_UNPACK(rgb565); alpha++; for (i = 0; i < h; i++, dst_itr += dst->stride) _soft16_scanline_fill_transp_solid(dst_itr, w, rgb565_unpack, alpha); } static void _soft16_rectangle_draw_int(Soft16_Image *dst, RGBA_Draw_Context *dc, Eina_Rectangle dr) { int dst_offset; if (_is_empty_rectangle(&dr)) return; RECTS_CLIP_TO_RECT(dr.x, dr.y, dr.w, dr.h, 0, 0, dst->cache_entry.w, dst->cache_entry.h); if (_is_empty_rectangle(&dr)) return; if (dc->clip.use) RECTS_CLIP_TO_RECT(dr.x, dr.y, dr.w, dr.h, dc->clip.x, dc->clip.y, dc->clip.w, dc->clip.h); if (_is_empty_rectangle(&dr)) return; if (A_VAL(&dc->col.col) == 0) return; dst_offset = dr.x + (dr.y * dst->cache_entry.w); if (!dst->cache_entry.flags.alpha) { DATA16 rgb565; DATA8 alpha; alpha = A_VAL(&dc->col.col) >> 3; rgb565 = RGB_565_FROM_COMPONENTS(R_VAL(&dc->col.col), G_VAL(&dc->col.col), B_VAL(&dc->col.col)); if (alpha == 31) _soft16_rectangle_draw_solid_solid (dst, dst_offset, dr.w, dr.h, rgb565); else if (alpha > 0) _soft16_rectangle_draw_transp_solid (dst, dst_offset, dr.w, dr.h, rgb565, alpha); } else ERR("Unsupported feature: drawing rectangle to non-opaque destination."); } void evas_common_soft16_rectangle_draw(Soft16_Image *dst, RGBA_Draw_Context *dc, int x, int y, int w, int h) { static Cutout_Rects *rects = NULL; Eina_Rectangle dr; Cutout_Rect *r; struct RGBA_Draw_Context_clip c_bkp; int i; /* handle cutouts here! */ EINA_RECTANGLE_SET(&dr, x, y, w, h); if (_is_empty_rectangle(&dr)) return; if (!(RECTS_INTERSECT(dr.x, dr.y, dr.w, dr.h, 0, 0, dst->cache_entry.w, dst->cache_entry.h))) return; /* no cutouts - cut right to the chase */ if (!dc->cutout.rects) { _soft16_rectangle_draw_int(dst, dc, dr); return; } c_bkp = dc->clip; evas_common_draw_context_clip_clip(dc, 0, 0, dst->cache_entry.w, dst->cache_entry.h); evas_common_draw_context_clip_clip(dc, x, y, w, h); /* our clip is 0 size.. abort */ if ((dc->clip.w <= 0) || (dc->clip.h <= 0)) { dc->clip = c_bkp; return; } rects = evas_common_draw_context_apply_cutouts(dc, rects); for (i = 0; i < rects->active; ++i) { r = rects->rects + i; evas_common_draw_context_set_clip(dc, r->x, r->y, r->w, r->h); _soft16_rectangle_draw_int(dst, dc, dr); } dc->clip = c_bkp; } evas-1.7.9/src/lib/engines/common_16/evas_soft16_font.c0000664000175000017500000001515212175475547017553 00000000000000#include "evas_common_soft16.h" EFL_ALWAYS_INLINE void _glyph_pt_mask_solid_solid(DATA16 *dst, const DATA16 rgb565, const DATA32 rgb565_unpack, const DATA8 *mask) { DATA8 alpha = *mask >> 3; if (alpha == 31) *dst = rgb565; else if (alpha > 0) { DATA32 d; d = RGB_565_UNPACK(*dst); d = RGB_565_UNPACKED_BLEND_UNMUL(rgb565_unpack, d, alpha); *dst = RGB_565_PACK(d); } } static void _glyph_scanline_mask_solid_solid(DATA16 *dst, int size, const DATA16 rgb565, const DATA32 rgb565_unpack, const DATA8 *mask) { DATA16 *start, *end; start = dst; pld(start, 0); pld(mask, 0); end = start + (size & ~3); while (start < end) { pld(start, 16); pld(mask, 4); UNROLL4({ _glyph_pt_mask_solid_solid(start, rgb565, rgb565_unpack, mask); start++; mask++; }); } end = start + (size & 3); for (; start < end; start++, mask++) _glyph_pt_mask_solid_solid(start, rgb565, rgb565_unpack, mask); } EFL_ALWAYS_INLINE void _glyph_pt_mask_transp_solid(DATA16 *dst, DATA32 rgb565_unpack, DATA8 alpha, const DATA8 *mask) { DATA32 a, b; int rel_alpha; rel_alpha = *mask >> 3; alpha = (alpha * rel_alpha) >> 5; if (alpha == 0) return; alpha++; a = ((rgb565_unpack * rel_alpha) >> 5) & RGB_565_UNPACKED_MASK; b = RGB_565_UNPACK(*dst); b = RGB_565_UNPACKED_BLEND(a, b, alpha); *dst = RGB_565_PACK(b); } static void _glyph_scanline_mask_transp_solid(DATA16 *dst, int size, const DATA32 rgb565_unpack, const DATA8 rel_alpha, const DATA8 *mask) { DATA16 *start, *end; start = dst; pld(start, 0); pld(mask, 0); end = start + (size & ~3); while (start < end) { pld(start, 16); pld(mask, 4); UNROLL4({ _glyph_pt_mask_transp_solid(start, rgb565_unpack, rel_alpha, mask); start++; mask++; }); } end = start + (size & 3); for (; start < end; start++, mask++) _glyph_pt_mask_transp_solid(start, rgb565_unpack, rel_alpha, mask); } static inline void _calc_ext(const Soft16_Image *dst, const RGBA_Draw_Context *dc, Eina_Rectangle *ext) { EINA_RECTANGLE_SET(ext, 0, 0, dst->cache_entry.w, dst->cache_entry.h); if (dc->clip.use) { int v; EINA_RECTANGLE_SET(ext, dc->clip.x, dc->clip.y, dc->clip.w, dc->clip.h); if (ext->x < 0) { ext->w += ext->x; ext->x = 0; } if (ext->y < 0) { ext->h += ext->y; ext->y = 0; } v = dst->cache_entry.w - ext->x; if (ext->w > v) ext->w = v; v = dst->cache_entry.h - ext->y; if (ext->h > v) ext->h = v; } } static inline void _glyph_scanline(Soft16_Image *dst, const DATA8 *p_mask, const Eina_Rectangle ext, int dx, int dy, int max_x, int max_y, int w, DATA8 alpha, const DATA16 rgb565, const DATA32 rgb565_unpack) { int size, in_x, in_w; DATA16 *p_pixels; if ((dx >= max_x) || (dy < ext.y) || (dy >= max_y)) return; in_x = 0; in_w = 0; if (dx + w > max_x) in_w += (dx + w) - max_x; if (dx < ext.x) { in_w += ext.x - dx; in_x = ext.x - dx; dx = ext.x; } size = w - in_w; p_pixels = dst->pixels + (dy * dst->stride) + dx; p_mask += in_x; if (size > 1) { if (alpha == 31) _glyph_scanline_mask_solid_solid (p_pixels, size, rgb565, rgb565_unpack, p_mask); else if (alpha != 0) _glyph_scanline_mask_transp_solid (p_pixels, size, rgb565_unpack, alpha, p_mask); } else if (size == 1) { if (alpha == 31) _glyph_pt_mask_solid_solid(p_pixels, rgb565, rgb565_unpack, p_mask); else if (alpha != 0) _glyph_pt_mask_transp_solid(p_pixels, rgb565_unpack, alpha, p_mask); } } static void _soft16_font_glyph_draw_grayscale(Soft16_Image *dst, RGBA_Draw_Context *dc __UNUSED__, RGBA_Font_Glyph *fg __UNUSED__, int x, int y, DATA8 alpha, DATA16 rgb565, const Eina_Rectangle ext, int bw, int bh, int bpitch, const DATA8 *bitmap) { const DATA32 rgb565_unpack = RGB_565_UNPACK(rgb565); int i, max_x, max_y; max_x = ext.x + ext.w; max_y = ext.y + ext.h; for (i = 0; i < bh; i++, bitmap += bpitch) _glyph_scanline(dst, bitmap, ext, x, y + i, max_x, max_y, bw, alpha, rgb565, rgb565_unpack); } static inline void _glyph_create_mask_line(DATA8 *mask, const DATA8 *bitmap, int w) { const DATA8 bitrepl[2] = {0x0, 0xff}; int i; for (i = 0; i < w; i += 8, bitmap++) { int j, size; DATA32 bits; if (i + 8 < w) size = 8; else size = w - i; bits = *bitmap; for (j = size - 1; j >= 0; j--, mask++) *mask = bitrepl[(bits >> j) & 0x1]; } } static void _soft16_font_glyph_draw_mono(Soft16_Image *dst, RGBA_Draw_Context *dc __UNUSED__, RGBA_Font_Glyph *fg __UNUSED__, int x, int y, DATA8 alpha, DATA16 rgb565, const Eina_Rectangle ext, int bw, int bh, int bpitch, const DATA8 *bitmap) { const DATA32 rgb565_unpack = RGB_565_UNPACK(rgb565); DATA8 *mask; int i, max_x, max_y; max_x = ext.x + ext.w; max_y = ext.y + ext.h; mask = alloca(bpitch); for (i = 0; i < bh; i++, bitmap += bpitch) { _glyph_create_mask_line(mask, bitmap, bw); _glyph_scanline(dst, mask, ext, x, y + i, max_x, max_y, bw, alpha, rgb565, rgb565_unpack); } } void evas_common_soft16_font_glyph_draw(void *data, void *dest __UNUSED__, void *context, RGBA_Font_Glyph *fg, int x, int y) { Soft16_Image *dst; RGBA_Draw_Context *dc; const DATA8 *bitmap; DATA8 alpha, r, g, b; DATA16 rgb565; Eina_Rectangle ext; int bpitch, bw, bh; dst = data; dc = context; alpha = A_VAL(&dc->col.col) >> 3; if (alpha == 0) return; /* precision is 5 bits, 3 bits lost */ r = R_VAL(&dc->col.col) >> 3; g = G_VAL(&dc->col.col) >> 2; b = B_VAL(&dc->col.col) >> 3; if (r > alpha) r = alpha; if (g > (alpha << 1)) g = (alpha << 1); if (b > alpha) b = alpha; rgb565 = (r << 11) | (g << 5) | b; bitmap = fg->glyph_out->bitmap.buffer; bh = fg->glyph_out->bitmap.rows; bw = fg->glyph_out->bitmap.width; bpitch = fg->glyph_out->bitmap.pitch; if (bpitch < bw) bpitch = bw; _calc_ext(dst, dc, &ext); if ((fg->glyph_out->bitmap.num_grays == 256) && (fg->glyph_out->bitmap.pixel_mode == ft_pixel_mode_grays)) _soft16_font_glyph_draw_grayscale(dst, dc, fg, x, y, alpha, rgb565, ext, bw, bh, bpitch, bitmap); else _soft16_font_glyph_draw_mono(dst, dc, fg, x, y, alpha, rgb565, ext, bw, bh, bpitch, bitmap); } void * evas_common_soft16_font_glyph_new(void *data __UNUSED__, RGBA_Font_Glyph *fg __UNUSED__) { return (void *)1; /* core requires != NULL to work */ } void evas_common_soft16_font_glyph_free(void *ext_dat __UNUSED__) { } evas-1.7.9/src/lib/engines/common_16/evas_soft16_image_scaled_sampled.c0000664000175000017500000002536112175475547022712 00000000000000#include "evas_common_soft16.h" #include "evas_soft16_point_blend.c" static void _soft16_image_draw_scaled_solid_solid(Soft16_Image *src, Soft16_Image *dst, RGBA_Draw_Context *dc __UNUSED__, int dst_offset, int w, int h, int *offset_x, int *offset_y) { DATA16 *dst_itr; int y, w_align; w_align = w & ~7; dst_itr = dst->pixels + dst_offset; for (y = 0; y < h; y++, dst_itr += dst->stride) { DATA16 *d, *s; int x; s = src->pixels + offset_y[y]; pld(s, 0); pld(offset_x, 0); d = dst_itr; x = 0; while (x < w_align) { pld(s, 32); pld(offset_x + x, 32); UNROLL8({ _soft16_pt_blend_solid_solid(d, s[offset_x[x]]); x++; d++; }); } for (; x < w; x++, d++) _soft16_pt_blend_solid_solid(d, s[offset_x[x]]); } } static void _soft16_image_draw_scaled_transp_solid(Soft16_Image *src, Soft16_Image *dst, RGBA_Draw_Context *dc __UNUSED__, int dst_offset, int w, int h, int *offset_x, int *offset_y) { DATA16 *dst_itr; int y, w_align; w_align = w & ~7; dst_itr = dst->pixels + dst_offset; for (y = 0; y < h; y++, dst_itr += dst->stride) { DATA16 *d, *s; DATA8 *a; int x; s = src->pixels + offset_y[y]; a = src->alpha + offset_y[y]; pld(s, 0); pld(a, 0); pld(offset_x, 0); d = dst_itr; x = 0; while (x < w_align) { pld(s, 32); pld(a, 8); pld(offset_x + x, 32); UNROLL8({ int off_x = offset_x[x]; _soft16_pt_blend_transp_solid(d, s[off_x], a[off_x]); x++; d++; }); } for (; x < w; x++, d++) _soft16_pt_blend_transp_solid(d, s[offset_x[x]], a[offset_x[x]]); } } static inline void _soft16_image_draw_scaled_no_mul(Soft16_Image *src, Soft16_Image *dst, RGBA_Draw_Context *dc, int dst_offset, int w, int h, int *offset_x, int *offset_y) { if ((src->cache_entry.flags.alpha && src->alpha) && (!dst->cache_entry.flags.alpha)) _soft16_image_draw_scaled_transp_solid (src, dst, dc, dst_offset, w, h, offset_x, offset_y); else if (!dst->cache_entry.flags.alpha) _soft16_image_draw_scaled_solid_solid (src, dst, dc, dst_offset, w, h, offset_x, offset_y); else ERR("Unsupported draw of scaled images src->cache_entry.flags.alpha=%d, " "dst->cache_entry.flags.alpha=%d, WITHOUT COLOR MUL", src->cache_entry.flags.alpha, dst->cache_entry.flags.alpha); } static void _soft16_image_draw_scaled_solid_solid_mul_alpha(Soft16_Image *src, Soft16_Image *dst, RGBA_Draw_Context *dc __UNUSED__, int dst_offset, int w, int h, int *offset_x, int *offset_y, DATA8 alpha) { DATA16 *dst_itr; int y, w_align; w_align = w & ~7; dst_itr = dst->pixels + dst_offset; for (y = 0; y < h; y++, dst_itr += dst->stride) { DATA16 *d, *s; int x; s = src->pixels + offset_y[y]; pld(s, 0); pld(offset_x, 0); d = dst_itr; x = 0; while (x < w_align) { pld(s, 32); pld(offset_x + x, 32); UNROLL8({ _soft16_pt_blend_solid_solid_mul_alpha (d, s[offset_x[x]], alpha); x++; d++; }); } for (; x < w; x++, d++) _soft16_pt_blend_solid_solid_mul_alpha (d, s[offset_x[x]], alpha); } } static void _soft16_image_draw_scaled_transp_solid_mul_alpha(Soft16_Image *src, Soft16_Image *dst, RGBA_Draw_Context *dc __UNUSED__, int dst_offset, int w, int h, int *offset_x, int *offset_y, DATA8 alpha) { DATA16 *dst_itr; int y, w_align; w_align = w & ~7; dst_itr = dst->pixels + dst_offset; for (y = 0; y < h; y++, dst_itr += dst->stride) { DATA16 *d, *s; DATA8 *a; int x; s = src->pixels + offset_y[y]; a = src->alpha + offset_y[y]; pld(s, 0); pld(a, 0); pld(offset_x, 0); d = dst_itr; x = 0; while (x < w_align) { pld(s, 32); pld(a, 8); pld(offset_x + x, 32); UNROLL8({ int off_x = offset_x[x]; _soft16_pt_blend_transp_solid_mul_alpha (d, s[off_x], a[off_x], alpha); x++; d++; }); } for (; x < w; x++, d++) _soft16_pt_blend_transp_solid_mul_alpha (d, s[offset_x[x]], a[offset_x[x]], alpha); } } static inline void _soft16_image_draw_scaled_mul_alpha(Soft16_Image *src, Soft16_Image *dst, RGBA_Draw_Context *dc, int dst_offset, int w, int h, int *offset_x, int *offset_y, DATA8 a) { if ((src->cache_entry.flags.alpha && src->alpha) && (!dst->cache_entry.flags.alpha)) _soft16_image_draw_scaled_transp_solid_mul_alpha (src, dst, dc, dst_offset, w, h, offset_x, offset_y, a); else if (!dst->cache_entry.flags.alpha) _soft16_image_draw_scaled_solid_solid_mul_alpha (src, dst, dc, dst_offset, w, h, offset_x, offset_y, a); else ERR("Unsupported draw of scaled images src->cache_entry.flags.alpha=%d, " "dst->cache_entry.flags.alpha=%d, WITH ALPHA MUL %d", src->cache_entry.flags.alpha, dst->cache_entry.flags.alpha, A_VAL(&dc->mul.col)); } static void _soft16_image_draw_scaled_solid_solid_mul_color(Soft16_Image *src, Soft16_Image *dst, RGBA_Draw_Context *dc __UNUSED__, int dst_offset, int w, int h, int *offset_x, int *offset_y, DATA8 r, DATA8 g, DATA8 b, DATA8 alpha) { DATA16 *dst_itr; int y, w_align; w_align = w & ~7; dst_itr = dst->pixels + dst_offset; if (alpha == 31) for (y = 0; y < h; y++, dst_itr += dst->stride) { DATA16 *d, *s; int x; s = src->pixels + offset_y[y]; pld(s, 0); pld(offset_x, 0); d = dst_itr; x = 0; while (x < w_align) { pld(s, 32); pld(offset_x + x, 32); UNROLL8({ _soft16_pt_blend_solid_solid_mul_color_solid (d, s[offset_x[x]], r, g, b); x++; d++; }); } for (; x < w; x++, d++) _soft16_pt_blend_solid_solid_mul_color_solid (d, s[offset_x[x]], r, g, b); } else for (y = 0; y < h; y++, dst_itr += dst->stride) { DATA16 *d, *s; int x; s = src->pixels + offset_y[y]; pld(s, 0); pld(offset_x, 0); d = dst_itr; x = 0; while (x < w_align) { pld(s, 32); pld(offset_x + x, 32); UNROLL8({ _soft16_pt_blend_solid_solid_mul_color_transp (d, s[offset_x[x]], alpha, r, g, b); x++; d++; }); } for (; x < w; x++, d++) _soft16_pt_blend_solid_solid_mul_color_transp (d, s[offset_x[x]], alpha, r, g, b); } } static void _soft16_image_draw_scaled_transp_solid_mul_color(Soft16_Image *src, Soft16_Image *dst, RGBA_Draw_Context *dc __UNUSED__, int dst_offset, int w, int h, int *offset_x, int *offset_y, DATA8 r, DATA8 g, DATA8 b, DATA8 alpha) { DATA16 *dst_itr; int y, w_align; w_align = w & ~7; dst_itr = dst->pixels + dst_offset; if (alpha == 31) for (y = 0; y < h; y++, dst_itr += dst->stride) { DATA16 *d, *s; DATA8 *a; int x; s = src->pixels + offset_y[y]; a = src->alpha + offset_y[y]; pld(s, 0); pld(a, 0); pld(offset_x, 0); d = dst_itr; x = 0; while (x < w_align) { pld(s, 32); pld(a, 8); pld(offset_x + x, 32); UNROLL8({ int off_x = offset_x[x]; _soft16_pt_blend_transp_solid_mul_color_solid (d, s[off_x], a[off_x], r, g, b); x++; d++; }); } for (; x < w; x++, d++) _soft16_pt_blend_transp_solid_mul_color_solid (d, s[offset_x[x]], a[offset_x[x]], r, g, b); } else for (y = 0; y < h; y++, dst_itr += dst->stride) { DATA16 *d, *s; DATA8 *a; int x; s = src->pixels + offset_y[y]; a = src->alpha + offset_y[y]; pld(s, 0); pld(a, 0); pld(offset_x, 0); d = dst_itr; x = 0; while (x < w_align) { pld(s, 32); pld(a, 8); pld(offset_x + x, 32); UNROLL8({ int off_x = offset_x[x]; _soft16_pt_blend_transp_solid_mul_color_transp (d, s[off_x], a[off_x], alpha, r, g, b); x++; d++; }); } for (; x < w; x++, d++) _soft16_pt_blend_transp_solid_mul_color_transp (d, s[offset_x[x]], a[offset_x[x]], alpha, r, g, b); } } static inline void _soft16_image_draw_scaled_mul_color(Soft16_Image *src, Soft16_Image *dst, RGBA_Draw_Context *dc, int dst_offset, int w, int h, int *offset_x, int *offset_y, DATA8 r, DATA8 g, DATA8 b, DATA8 a) { if ((src->cache_entry.flags.alpha && src->alpha) && (!dst->cache_entry.flags.alpha)) _soft16_image_draw_scaled_transp_solid_mul_color (src, dst, dc, dst_offset, w, h, offset_x, offset_y, r, g, b, a); else if (!dst->cache_entry.flags.alpha) _soft16_image_draw_scaled_solid_solid_mul_color (src, dst, dc, dst_offset, w, h, offset_x, offset_y, r, g, b, a); else ERR("Unsupported draw of scaled images src->cache_entry.flags.alpha=%d, " "dst->cache_entry.flags.alpha=%d, WITH COLOR MUL 0x%08x", src->cache_entry.flags.alpha, dst->cache_entry.flags.alpha, dc->mul.col); } static inline void _soft16_image_draw_scaled_mul(Soft16_Image *src, Soft16_Image *dst, RGBA_Draw_Context *dc, int dst_offset, int w, int h, int *offset_x, int *offset_y, DATA8 r, DATA8 g, DATA8 b, DATA8 a) { if ((a == r) && (a == (g >> 1)) && (a == b)) _soft16_image_draw_scaled_mul_alpha (src, dst, dc, dst_offset, w, h, offset_x, offset_y, a); else _soft16_image_draw_scaled_mul_color (src, dst, dc, dst_offset, w, h, offset_x, offset_y, r, g, b, a); } void 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) { int x, y, dst_offset, *offset_x, *offset_y; DATA16 mul_rgb565; DATA8 r, g, b, a; if (!dc->mul.use) { r = b = a = 31; g = 63; mul_rgb565 = 0xffff; } else { a = A_VAL(&dc->mul.col) >> 3; if (a == 0) return; r = R_VAL(&dc->mul.col) >> 3; g = G_VAL(&dc->mul.col) >> 2; b = B_VAL(&dc->mul.col) >> 3; if (r > a) r = a; if (g > (a << 1)) g = (a << 1); if (b > a) b = a; mul_rgb565 = (r << 11) || (g << 5) | b; } /* pre-calculated scale tables */ offset_x = alloca(cr.w * sizeof(*offset_x)); for (x = 0; x < cr.w; x++) offset_x[x] = (((x + cr.x - dr.x) * sr.w) / dr.w) + sr.x; offset_y = alloca(cr.h * sizeof(*offset_y)); for (y = 0; y < cr.h; y++) offset_y[y] = (((((y + cr.y - dr.y) * sr.h) / dr.h) + sr.y) * src->stride); dst_offset = cr.x + (cr.y * dst->stride); if (mul_rgb565 == 0xffff) _soft16_image_draw_scaled_no_mul (src, dst, dc, dst_offset, cr.w, cr.h, offset_x, offset_y); else _soft16_image_draw_scaled_mul (src, dst, dc, dst_offset, cr.w, cr.h, offset_x, offset_y, r, g, b, a); } evas-1.7.9/src/lib/engines/common_16/evas_soft16_line.c0000664000175000017500000002144012175475547017531 00000000000000#include "evas_common_soft16.h" #include "evas_soft16_scanline_fill.c" /* * All functions except by evas_common_soft16_line_draw() expect x0 <= x1. */ static inline int _in_range(int value, int min, int max) { return min <= value && value <= max; } static inline int _is_xy_inside_clip(int x, int y, const struct RGBA_Draw_Context_clip clip) { if (!clip.use) return 1; if (!_in_range(x, clip.x, clip.x + clip.w - 1)) return 0; if (!_in_range(y, clip.y, clip.y + clip.h - 1)) return 0; return 1; } static inline int _is_x_inside_clip(int x, const struct RGBA_Draw_Context_clip clip) { if (!clip.use) return 1; return _in_range(x, clip.x, clip.x + clip.w - 1); } static inline int _is_y_inside_clip(int y, const struct RGBA_Draw_Context_clip clip) { if (!clip.use) return 1; return _in_range(y, clip.y, clip.y + clip.h - 1); } static inline int _is_xy_inside_rect(int x, int y, int w, int h) { return _in_range(x, 0, w - 1) && _in_range(y, 0, h - 1); } static inline int _is_empty_clip(const struct RGBA_Draw_Context_clip clip) { return clip.w < 1 || clip.h < 1; } static void _soft16_line_point(Soft16_Image *dst, RGBA_Draw_Context *dc, int x, int y) { DATA16 rgb565, *dst_itr; DATA8 alpha; if (!_is_xy_inside_rect(x, y, dst->cache_entry.w, dst->cache_entry.h)) return; if (!_is_xy_inside_clip(x, y, dc->clip)) return; dst_itr = dst->pixels + (dst->stride * y) + x; alpha = A_VAL(&dc->col.col) >> 3; rgb565 = RGB_565_FROM_COMPONENTS(R_VAL(&dc->col.col), G_VAL(&dc->col.col), B_VAL(&dc->col.col)); if (alpha == 31) _soft16_pt_fill_solid_solid(dst_itr, rgb565); else if (alpha > 0) { DATA32 rgb565_unpack; rgb565_unpack = RGB_565_UNPACK(rgb565); alpha++; _soft16_pt_fill_transp_solid(dst_itr, rgb565_unpack, alpha); } } static void _soft16_line_horiz(Soft16_Image *dst, RGBA_Draw_Context *dc, int x0, int x1, int y) { DATA16 rgb565, *dst_itr; DATA8 alpha; int w; if (!_is_y_inside_clip(y, dc->clip)) return; if (x0 < dc->clip.x) x0 = dc->clip.x; if (x1 >= dc->clip.x + dc->clip.w) x1 = dc->clip.x + dc->clip.w - 1; w = x1 - x0; if (w < 1) return; dst_itr = dst->pixels + (dst->stride * y) + x0; alpha = A_VAL(&dc->col.col) >> 3; rgb565 = RGB_565_FROM_COMPONENTS(R_VAL(&dc->col.col), G_VAL(&dc->col.col), B_VAL(&dc->col.col)); if (alpha == 31) _soft16_scanline_fill_solid_solid(dst_itr, w, rgb565); else if (alpha > 0) { DATA32 rgb565_unpack; rgb565_unpack = RGB_565_UNPACK(rgb565); alpha++; _soft16_scanline_fill_transp_solid(dst_itr, w, rgb565_unpack, alpha); } } static void _soft16_line_vert(Soft16_Image *dst, RGBA_Draw_Context *dc, int x, int y0, int y1) { DATA16 rgb565, *dst_itr; DATA8 alpha; int h; if (!_is_x_inside_clip(x, dc->clip)) return; if (y1 < y0) { int t; t = y0; y0 = y1; y1 = t; } if (y0 < dc->clip.y) y0 = dc->clip.y; if (y1 >= dc->clip.y + dc->clip.h) y1 = dc->clip.y + dc->clip.h - 1; h = y1 - y0; if (h < 1) return; dst_itr = dst->pixels + (dst->stride * y0) + x; alpha = A_VAL(&dc->col.col) >> 3; rgb565 = RGB_565_FROM_COMPONENTS(R_VAL(&dc->col.col), G_VAL(&dc->col.col), B_VAL(&dc->col.col)); if (alpha == 31) { for (; h > 0; h--, dst_itr += dst->stride) _soft16_pt_fill_solid_solid(dst_itr, rgb565); } else if (alpha > 0) { DATA32 rgb565_unpack; rgb565_unpack = RGB_565_UNPACK(rgb565); alpha++; for (; h > 0; h--, dst_itr += dst->stride) _soft16_pt_fill_transp_solid(dst_itr, rgb565_unpack, alpha); } } static inline void _soft16_line_45deg_adjust_boundaries(const struct RGBA_Draw_Context_clip clip, int *p_x0, int *p_y0, int *p_x1, int *p_y1) { int diff, dy, x0, y0, x1, y1; x0 = *p_x0; y0 = *p_y0; x1 = *p_x1; y1 = *p_y1; dy = y1 - y0; diff = clip.x - x0; if (diff > 0) { x0 = clip.x; y0 += (dy > 0) ? diff : -diff; } diff = x1 - (clip.x + clip.w); if (diff > 0) { x1 = clip.x + clip.w; y1 += (dy > 0) ? -diff : diff; } if (dy > 0) { diff = clip.y - y0; if (diff > 0) { y0 = clip.y; x0 += diff; } diff = y1 - (clip.y + clip.h); if (diff > 0) { y1 = clip.y + clip.h; x1 -= diff; } } else { diff = clip.y - y1; if (diff > 0) { y1 = clip.y; x1 -= diff; } diff = y0 - (clip.y + clip.h - 1); if (diff > 0) { y0 = clip.y + clip.h - 1; x0 += diff; } } *p_x0 = x0; *p_y0 = y0; *p_x1 = x1; *p_y1 = y1; } static void _soft16_line_45deg(Soft16_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, int x1, int y1) { int dy, step_dst_itr, len; DATA8 alpha; DATA16 *dst_itr, rgb565; alpha = A_VAL(&dc->col.col) >> 3; if (alpha < 1) return; rgb565 = RGB_565_FROM_COMPONENTS(R_VAL(&dc->col.col), G_VAL(&dc->col.col), B_VAL(&dc->col.col)); dy = y1 - y0; step_dst_itr = 1 + ((dy > 0) ? dst->stride : -dst->stride); _soft16_line_45deg_adjust_boundaries(dc->clip, &x0, &y0, &x1, &y1); len = (dy > 0) ? (y1 - y0) : (y0 - y1); if (len < 1) return; dst_itr = dst->pixels + dst->stride * y0 + x0; if (alpha == 31) { for (; len > 0; len--, dst_itr += step_dst_itr) _soft16_pt_fill_solid_solid(dst_itr, rgb565); } else { DATA32 rgb565_unpack; rgb565_unpack = RGB_565_UNPACK(rgb565); alpha++; for (; len > 0; len--, dst_itr += step_dst_itr) _soft16_pt_fill_transp_solid(dst_itr, rgb565_unpack, alpha); } } EFL_ALWAYS_INLINE void _soft16_line_aliased_pt(DATA16 *dst_itr, DATA16 rgb565, DATA32 rgb565_unpack, DATA8 alpha) { if (alpha == 32) _soft16_pt_fill_solid_solid(dst_itr, rgb565); else _soft16_pt_fill_transp_solid(dst_itr, rgb565_unpack, alpha); } static void _soft16_line_aliased(Soft16_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, int x1, int y1) { int dx, dy, step_y, step_dst_itr; DATA32 rgb565_unpack; DATA16 rgb565; DATA8 alpha; alpha = A_VAL(&dc->col.col) >> 3; if (alpha == 0) return; alpha++; rgb565 = RGB_565_FROM_COMPONENTS(R_VAL(&dc->col.col), G_VAL(&dc->col.col), B_VAL(&dc->col.col)); rgb565_unpack = RGB_565_UNPACK(rgb565); dx = x1 - x0; dy = y1 - y0; if (dy >= 0) { step_y = 1; step_dst_itr = dst->stride; } else { dy = -dy; step_y = -1; step_dst_itr = -dst->stride; } if (dx > dy) { DATA16 *dst_itr; int e, x, y; e = - (dx / 2); y = y0; dst_itr = dst->pixels + dst->stride * y0 + x0; for (x=x0; x <= x1; x++, dst_itr++) { if (_is_xy_inside_clip(x, y, dc->clip)) _soft16_line_aliased_pt(dst_itr, rgb565, rgb565_unpack, alpha); e += dy; if (e >= 0) { dst_itr += step_dst_itr; y += step_y; e -= dx; } } } else { DATA16 *dst_itr; int e, x, y; e = - (dy / 2); x = x0; dst_itr = dst->pixels + dst->stride * y0 + x0; for (y=y0; y != y1; y += step_y, dst_itr += step_dst_itr) { if (_is_xy_inside_clip(x, y, dc->clip)) _soft16_line_aliased_pt(dst_itr, rgb565, rgb565_unpack, alpha); e += dx; if (e >= 0) { dst_itr++; x++; e -= dy; } } } } void evas_common_soft16_line_draw(Soft16_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, int x1, int y1) { struct RGBA_Draw_Context_clip c_bkp, c_tmp; int dx, dy; int x, y, w, h; c_tmp.use = 1; c_tmp.x = 0; c_tmp.y = 0; c_tmp.w = dst->cache_entry.w; c_tmp.h = dst->cache_entry.h; /* save out clip info */ c_bkp = dc->clip; if (c_bkp.use) { RECTS_CLIP_TO_RECT(c_tmp.x, c_tmp.y, c_tmp.w, c_tmp.h, c_bkp.x, c_bkp.y, c_bkp.w, c_bkp.h); if (_is_empty_clip(c_tmp)) return; } x = MIN(x0, x1); y = MIN(y0, y1); w = MAX(x0, x1) - x + 1; h = MAX(y0, y1) - y + 1; RECTS_CLIP_TO_RECT(c_tmp.x, c_tmp.y, c_tmp.w, c_tmp.h, x, y, w, h); if (_is_empty_clip(c_tmp)) return; /* Check if the line doesn't cross the clip area */ if (x0 < c_tmp.x && x1 < c_tmp.x) return; if (x0 >= c_tmp.x + c_tmp.w && x1 >= c_tmp.x + c_tmp.w) return; if (y0 < c_tmp.y && y1 < c_tmp.y) return; if (y0 >= c_tmp.y + c_tmp.h && y1 >= c_tmp.y + c_tmp.h) return; dc->clip = c_tmp; dx = x1 - x0; dy = y1 - y0; if (dx < 0) { int t; t = x0; x0 = x1; x1 = t; t = y0; y0 = y1; y1 = t; } if (dx == 0 && dy == 0) _soft16_line_point(dst, dc, x0, y0); else if (dx == 0) _soft16_line_vert(dst, dc, x0, y0, y1); else if (dy == 0) _soft16_line_horiz(dst, dc, x0, x1, y0); else if (dy == dx || dy == -dx) _soft16_line_45deg(dst, dc, x0, y0, x1, y1); else _soft16_line_aliased(dst, dc, x0, y0, x1, y1); /* restore clip info */ dc->clip = c_bkp; } evas-1.7.9/src/lib/engines/common_16/evas_soft16_scanline_blend.c0000664000175000017500000002126212175475547021544 00000000000000/** NOTE: This file is meant to be included by users **/ /** NOTE2: r, g, b parameters are 16bits, so you can pass 0 to 256 inclusive. ** this is due our division by 256 when multiplying the color. **/ /***************************************************************************** * Scanline processing * * _soft16_scanline___[_]() * ****************************************************************************/ #include "evas_soft16_point_blend.c" /*********************************************************************** * Regular blend operations */ static void _soft16_scanline_blend_transp_solid(DATA16 *src, DATA8 *alpha, DATA16 *dst, int size) { DATA16 *start, *end; start = dst; end = start + (size & ~7); pld(alpha, 0); pld(src, 0); /* work on 8 pixels per time, do data preload */ while (start < end) { DATA8 alpha1, alpha2; alpha1 = alpha[0]; alpha += 8; /* empirical tests show these give the best performance */ pld(alpha, 8); pld(src, 32); src += 8; start += 8; alpha2 = alpha[-7]; _soft16_pt_blend_transp_solid(start - 8, src[-8], alpha1); alpha1 = alpha[-6]; _soft16_pt_blend_transp_solid(start - 7, src[-7], alpha2); alpha2 = alpha[-5]; _soft16_pt_blend_transp_solid(start - 6, src[-6], alpha1); alpha1 = alpha[-4]; _soft16_pt_blend_transp_solid(start - 5, src[-5], alpha2); alpha2 = alpha[-3]; _soft16_pt_blend_transp_solid(start - 4, src[-4], alpha1); alpha1 = alpha[-2]; _soft16_pt_blend_transp_solid(start - 3, src[-3], alpha2); alpha2 = alpha[-1]; _soft16_pt_blend_transp_solid(start - 2, src[-2], alpha1); _soft16_pt_blend_transp_solid(start - 1, src[-1], alpha2); } /* remaining pixels (up to 7) */ end = start + (size & 7); for (; start < end; start++, src++, alpha++) _soft16_pt_blend_transp_solid(start, *src, *alpha); } static inline void _soft16_scanline_blend_solid_solid(DATA16 *src, DATA16 *dst, int size) { memcpy(dst, src, size * sizeof(DATA16)); } /*********************************************************************** * Blend operations taking an extra alpha (fade in, out) */ static void _soft16_scanline_blend_transp_solid_mul_alpha(DATA16 *src, DATA8 *alpha, DATA16 *dst, int size, const DATA8 rel_alpha) { DATA16 *start, *end; start = dst; end = start + (size & ~7); pld(alpha, 0); pld(src, 0); while (start < end) { DATA8 alpha1, alpha2; alpha1 = alpha[0]; alpha += 8; pld(alpha, 8); pld(src, 32); src += 8; start += 8; alpha2 = alpha[-7]; _soft16_pt_blend_transp_solid_mul_alpha (start - 8, src[-8], alpha1, rel_alpha); alpha1 = alpha[-6]; _soft16_pt_blend_transp_solid_mul_alpha (start - 7, src[-7], alpha2, rel_alpha); alpha2 = alpha[-5]; _soft16_pt_blend_transp_solid_mul_alpha (start - 6, src[-6], alpha1, rel_alpha); alpha1 = alpha[-4]; _soft16_pt_blend_transp_solid_mul_alpha (start - 5, src[-5], alpha2, rel_alpha); alpha2 = alpha[-3]; _soft16_pt_blend_transp_solid_mul_alpha (start - 4, src[-4], alpha1, rel_alpha); alpha1 = alpha[-2]; _soft16_pt_blend_transp_solid_mul_alpha (start - 3, src[-3], alpha2, rel_alpha); alpha2 = alpha[-1]; _soft16_pt_blend_transp_solid_mul_alpha (start - 2, src[-2], alpha1, rel_alpha); _soft16_pt_blend_transp_solid_mul_alpha (start - 1, src[-1], alpha2, rel_alpha); } end = start + (size & 7); for (; start < end; start++, src++, alpha++) _soft16_pt_blend_transp_solid_mul_alpha(start, *src, *alpha, rel_alpha); } static void _soft16_scanline_blend_solid_solid_mul_alpha(DATA16 *src, DATA16 *dst, int size, DATA8 rel_alpha) { DATA16 *start, *end; start = dst; end = start + (size & ~7); pld(src, 0); while (start < end) { pld(src, 32); UNROLL8({ _soft16_pt_blend_solid_solid_mul_alpha(start, *src, rel_alpha); start++; src++; }); } end = start + (size & 7); for (; start < end; start++, src++) _soft16_pt_blend_solid_solid_mul_alpha(start, *src, rel_alpha); } /*********************************************************************** * Blend operations with extra alpha and multiply color */ static void _soft16_scanline_blend_transp_solid_mul_color_transp(DATA16 *src, DATA8 *alpha, DATA16 *dst, int size, DATA8 rel_alpha, DATA16 r, DATA16 g, DATA16 b) { DATA16 *start, *end; start = dst; end = start + (size & ~7); pld(alpha, 0); pld(src, 0); while (start < end) { DATA8 alpha1, alpha2; alpha1 = alpha[0]; alpha += 8; pld(src, 32); pld(start, 32); src += 8; start += 8; alpha2 = alpha[-7]; _soft16_pt_blend_transp_solid_mul_color_transp (start - 8, src[-8], alpha1, rel_alpha, r, g, b); alpha1 = alpha[-6]; _soft16_pt_blend_transp_solid_mul_color_transp (start - 7, src[-7], alpha2, rel_alpha, r, g, b); alpha2 = alpha[-5]; _soft16_pt_blend_transp_solid_mul_color_transp (start - 6, src[-6], alpha1, rel_alpha, r, g, b); alpha1 = alpha[-4]; _soft16_pt_blend_transp_solid_mul_color_transp (start - 5, src[-5], alpha2, rel_alpha, r, g, b); alpha2 = alpha[-3]; _soft16_pt_blend_transp_solid_mul_color_transp (start - 4, src[-4], alpha1, rel_alpha, r, g, b); alpha1 = alpha[-2]; _soft16_pt_blend_transp_solid_mul_color_transp (start - 3, src[-3], alpha2, rel_alpha, r, g, b); alpha2 = alpha[-1]; _soft16_pt_blend_transp_solid_mul_color_transp (start - 2, src[-2], alpha1, rel_alpha, r, g, b); _soft16_pt_blend_transp_solid_mul_color_transp (start - 1, src[-1], alpha2, rel_alpha, r, g, b); } end = start + (size & 7); for (; start < end; start++, src++, alpha++) _soft16_pt_blend_transp_solid_mul_color_transp (start, *src, *alpha, rel_alpha, r, g, b); } static void _soft16_scanline_blend_solid_solid_mul_color_transp(DATA16 *src, DATA16 *dst, int size, DATA8 rel_alpha, DATA16 r, DATA16 g, DATA16 b) { DATA16 *start, *end; start = dst; end = start + (size & ~7); pld(src, 0); while (start < end) { pld(src, 32); UNROLL8({ _soft16_pt_blend_solid_solid_mul_color_transp (start, *src, rel_alpha, r, g, b); start++; src++; }); } end = start + (size & 7); for (; start < end; start++, src++) _soft16_pt_blend_solid_solid_mul_color_transp (start, *src, rel_alpha, r, g, b); } /*********************************************************************** * Blend operations with extra multiply color */ static void _soft16_scanline_blend_transp_solid_mul_color_solid(DATA16 *src, DATA8 *alpha, DATA16 *dst, int size, DATA16 r, DATA16 g, DATA16 b) { DATA16 *start, *end; start = dst; end = start + (size & ~7); pld(alpha, 0); pld(src, 0); while (start < end) { DATA8 alpha1, alpha2; alpha1 = alpha[0]; alpha += 8; pld(alpha, 8); pld(src, 32); src += 8; start += 8; alpha2 = alpha[-7]; _soft16_pt_blend_transp_solid_mul_color_solid (start - 8, src[-8], alpha1, r, g, b); alpha1 = alpha[-6]; _soft16_pt_blend_transp_solid_mul_color_solid (start - 7, src[-7], alpha2, r, g, b); alpha2 = alpha[-5]; _soft16_pt_blend_transp_solid_mul_color_solid (start - 6, src[-6], alpha1, r, g, b); alpha1 = alpha[-4]; _soft16_pt_blend_transp_solid_mul_color_solid (start - 5, src[-5], alpha2, r, g, b); alpha2 = alpha[-3]; _soft16_pt_blend_transp_solid_mul_color_solid (start - 4, src[-4], alpha1, r, g, b); alpha1 = alpha[-2]; _soft16_pt_blend_transp_solid_mul_color_solid (start - 3, src[-3], alpha2, r, g, b); alpha2 = alpha[-1]; _soft16_pt_blend_transp_solid_mul_color_solid (start - 2, src[-2], alpha1, r, g, b); _soft16_pt_blend_transp_solid_mul_color_solid (start - 1, src[-1], alpha2, r, g, b); } end = start + (size & 7); for (; start < end; start++, src++, alpha++) _soft16_pt_blend_transp_solid_mul_color_solid (start, *src, *alpha, r, g, b); } static void _soft16_scanline_blend_solid_solid_mul_color_solid(DATA16 *src, DATA16 *dst, int size, DATA8 r, DATA8 g, DATA8 b) { DATA16 *start, *end; start = dst; end = start + (size & ~7); pld(src, 0); while (start < end) { pld(src, 32); UNROLL8({ _soft16_pt_blend_solid_solid_mul_color_solid(start, *src, r, g, b); start++; src++; }); } end = start + (size & 7); for (; start < end; start++, src++) _soft16_pt_blend_solid_solid_mul_color_solid(start, *src, r, g, b); } evas-1.7.9/src/lib/engines/common_16/Makefile.am0000664000175000017500000000132212175475547016247 00000000000000 MAINTAINERCLEANFILES = Makefile.in AM_CPPFLAGS = \ -I. \ -I$(top_srcdir)/src/lib \ -I$(top_srcdir)/src/lib/include \ @FREETYPE_CFLAGS@ \ @PIXMAN_CFLAGS@ \ @FRIBIDI_CFLAGS@ \ @VALGRIND_CFLAGS@ \ @EVAS_GENERAL_CFLAGS@ \ @EET_CFLAGS@ \ @pthread_cflags@ noinst_LTLIBRARIES = libevas_engine_common_16.la libevas_engine_common_16_la_SOURCES = \ evas_soft16_dither_mask.c \ evas_soft16_font.c \ evas_soft16_image_scaled_sampled.c \ evas_soft16_image_unscaled.c \ evas_soft16_main.c \ evas_soft16_rectangle.c \ evas_soft16_line.c \ evas_soft16_polygon.c libevas_engine_common_16_la_DEPENDENCIES = $(top_builddir)/config.h EXTRA_DIST = \ evas_soft16_point_blend.c \ evas_soft16_scanline_blend.c \ evas_soft16_scanline_fill.c evas-1.7.9/src/lib/engines/common_16/evas_soft16_image_unscaled.c0000664000175000017500000002323112175475547021542 00000000000000#include "evas_common_soft16.h" #include "evas_soft16_scanline_blend.c" static void _soft16_image_draw_unscaled_solid_solid(Soft16_Image *src, Soft16_Image *dst, RGBA_Draw_Context *dc __UNUSED__, int src_offset, int dst_offset, int w, int h) { DATA16 *src_itr, *dst_itr; int y; src_itr = src->pixels + src_offset; dst_itr = dst->pixels + dst_offset; for (y = 0; y < h; y++) { _soft16_scanline_blend_solid_solid(src_itr, dst_itr, w); src_itr += src->stride; dst_itr += dst->stride; } } static void _soft16_image_draw_unscaled_transp_solid(Soft16_Image *src, Soft16_Image *dst, RGBA_Draw_Context *dc __UNUSED__, int src_offset, int dst_offset, int w, int h) { DATA16 *src_itr, *dst_itr; DATA8 *alpha_itr; int y; src_itr = src->pixels + src_offset; alpha_itr = src->alpha + src_offset; dst_itr = dst->pixels + dst_offset; for (y = 0; y < h; y++) { _soft16_scanline_blend_transp_solid(src_itr, alpha_itr, dst_itr, w); src_itr += src->stride; alpha_itr += src->stride; dst_itr += dst->stride; } } static inline void _soft16_image_draw_unscaled_no_mul(Soft16_Image *src, Soft16_Image *dst, RGBA_Draw_Context *dc, int src_offset, int dst_offset, int width, int height) { if (src->cache_entry.flags.alpha && (!dst->cache_entry.flags.alpha)) _soft16_image_draw_unscaled_transp_solid(src, dst, dc, src_offset, dst_offset, width, height); else if ((!src->cache_entry.flags.alpha) && (!dst->cache_entry.flags.alpha)) _soft16_image_draw_unscaled_solid_solid(src, dst, dc, src_offset, dst_offset, width, height); else ERR("Unsupported draw of unscaled images src->cache_entry.flags.alpha=%d, " "dst->cache_entry.flags.alpha=%d, WITHOUT COLOR MUL", src->cache_entry.flags.alpha, dst->cache_entry.flags.alpha); } static void _soft16_image_draw_unscaled_solid_solid_mul_alpha(Soft16_Image *src, Soft16_Image *dst, RGBA_Draw_Context *dc __UNUSED__, int src_offset, int dst_offset, int w, int h, DATA8 a) { DATA16 *src_itr, *dst_itr; int y; src_itr = src->pixels + src_offset; dst_itr = dst->pixels + dst_offset; for (y = 0; y < h; y++) { _soft16_scanline_blend_solid_solid_mul_alpha(src_itr, dst_itr, w, a); src_itr += src->stride; dst_itr += dst->stride; } } static void _soft16_image_draw_unscaled_transp_solid_mul_alpha(Soft16_Image *src, Soft16_Image *dst, RGBA_Draw_Context *dc __UNUSED__, int src_offset, int dst_offset, int w, int h, DATA8 a) { DATA16 *src_itr, *dst_itr; DATA8 *alpha_itr; int y; src_itr = src->pixels + src_offset; alpha_itr = src->alpha + src_offset; dst_itr = dst->pixels + dst_offset; for (y = 0; y < h; y++) { _soft16_scanline_blend_transp_solid_mul_alpha(src_itr, alpha_itr, dst_itr, w, a); src_itr += src->stride; alpha_itr += src->stride; dst_itr += dst->stride; } } static inline void _soft16_image_draw_unscaled_mul_alpha(Soft16_Image *src, Soft16_Image *dst, RGBA_Draw_Context *dc, int src_offset, int dst_offset, int width, int height, DATA8 a) { if (src->cache_entry.flags.alpha && (!dst->cache_entry.flags.alpha)) _soft16_image_draw_unscaled_transp_solid_mul_alpha (src, dst, dc, src_offset, dst_offset, width, height, a); else if ((!src->cache_entry.flags.alpha) && (!dst->cache_entry.flags.alpha)) _soft16_image_draw_unscaled_solid_solid_mul_alpha (src, dst, dc, src_offset, dst_offset, width, height, a); else ERR("Unsupported draw of unscaled images src->cache_entry.flags.alpha=%d, " "dst->cache_entry.flags.alpha=%d, WITH ALPHA MUL %d", src->cache_entry.flags.alpha, dst->cache_entry.flags.alpha, A_VAL(&dc->mul.col)); } static void _soft16_image_draw_unscaled_solid_solid_mul_color(Soft16_Image *src, Soft16_Image *dst, RGBA_Draw_Context *dc __UNUSED__, int src_offset, int dst_offset, int w, int h, DATA8 r, DATA8 g, DATA8 b, DATA8 a) { DATA16 *src_itr, *dst_itr; int y; src_itr = src->pixels + src_offset; dst_itr = dst->pixels + dst_offset; if (a == 31) for (y = 0; y < h; y++) { _soft16_scanline_blend_solid_solid_mul_color_solid (src_itr, dst_itr, w, r, g, b); src_itr += src->stride; dst_itr += dst->stride; } else for (y = 0; y < h; y++) { _soft16_scanline_blend_solid_solid_mul_color_transp (src_itr, dst_itr, w, a, r, g, b); src_itr += src->stride; dst_itr += dst->stride; } } static void _soft16_image_draw_unscaled_transp_solid_mul_color(Soft16_Image *src, Soft16_Image *dst, RGBA_Draw_Context *dc __UNUSED__, int src_offset, int dst_offset, int w, int h, DATA8 r, DATA8 g, DATA8 b, DATA8 a) { DATA16 *src_itr, *dst_itr; DATA8 *alpha_itr; int y; src_itr = src->pixels + src_offset; alpha_itr = src->alpha + src_offset; dst_itr = dst->pixels + dst_offset; if (a == 31) for (y = 0; y < h; y++) { _soft16_scanline_blend_transp_solid_mul_color_solid (src_itr, alpha_itr, dst_itr, w, r, g, b); src_itr += src->stride; alpha_itr += src->stride; dst_itr += dst->stride; } else for (y = 0; y < h; y++) { _soft16_scanline_blend_transp_solid_mul_color_transp (src_itr, alpha_itr, dst_itr, w, a, r, g, b); src_itr += src->stride; alpha_itr += src->stride; dst_itr += dst->stride; } } static inline void _soft16_image_draw_unscaled_mul_color(Soft16_Image *src, Soft16_Image *dst, RGBA_Draw_Context *dc, int src_offset, int dst_offset, int width, int height, DATA8 r, DATA8 g, DATA8 b, DATA8 a) { if (src->cache_entry.flags.alpha && (!dst->cache_entry.flags.alpha)) _soft16_image_draw_unscaled_transp_solid_mul_color (src, dst, dc, src_offset, dst_offset, width, height, r, g, b, a); else if ((!src->cache_entry.flags.alpha) && (!dst->cache_entry.flags.alpha)) _soft16_image_draw_unscaled_solid_solid_mul_color (src, dst, dc, src_offset, dst_offset, width, height, r, g, b, a); else ERR("Unsupported draw of unscaled images src->cache_entry.flags.alpha=%d, " "dst->cache_entry.flags.alpha=%d, WITH COLOR MUL 0x%08x", src->cache_entry.flags.alpha, dst->cache_entry.flags.alpha, dc->mul.col); } static inline void _soft16_image_draw_unscaled_mul(Soft16_Image *src, Soft16_Image *dst, RGBA_Draw_Context *dc, int src_offset, int dst_offset, int width, int height, DATA8 r, DATA8 g, DATA8 b, DATA8 a) { if ((a == r) && (a == (g >> 1)) && (a == b)) _soft16_image_draw_unscaled_mul_alpha(src, dst, dc, src_offset, dst_offset, width, height, a); else _soft16_image_draw_unscaled_mul_color(src, dst, dc, src_offset, dst_offset, width, height, r, g, b, a); } void 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) { int src_offset_rows, src_offset, dst_offset; DATA16 mul_rgb565; DATA8 r, g, b, a; if (!dc->mul.use) { r = b = a = 31; g = 63; mul_rgb565 = 0xffff; } else { a = A_VAL(&dc->mul.col) >> 3; if (a == 0) return; r = R_VAL(&dc->mul.col) >> 3; g = G_VAL(&dc->mul.col) >> 2; b = B_VAL(&dc->mul.col) >> 3; if (r > a) r = a; if (g > (a << 1)) g = (a << 1); if (b > a) b = a; mul_rgb565 = (r << 11) || (g << 5) | b; } src_offset_rows = (cr.y - dr.y) + sr.y; src_offset = (src_offset_rows * src->stride) + (cr.x - dr.x) + sr.x; dst_offset = cr.x + (cr.y * dst->stride); if (mul_rgb565 == 0xffff) _soft16_image_draw_unscaled_no_mul(src, dst, dc, src_offset, dst_offset, cr.w, cr.h); else _soft16_image_draw_unscaled_mul(src, dst, dc, src_offset, dst_offset, cr.w, cr.h, r, g, b, a); } evas-1.7.9/src/lib/engines/common/0000775000175000017500000000000012234557316013756 500000000000000evas-1.7.9/src/lib/engines/common/evas_pipe.h0000664000175000017500000000257712175475547016046 00000000000000#ifndef _EVAS_PIPE_H #define _EVAS_PIPE_H #include #include "language/evas_bidi_utils.h" /* image rendering pipelines... new optional system - non-immediate and * threadable */ EAPI Eina_Bool evas_common_pipe_init(void); EAPI void evas_common_pipe_free(RGBA_Image *im); EAPI void evas_common_pipe_rectangle_draw(RGBA_Image *dst, RGBA_Draw_Context *dc, int x, int y, int w, int h); EAPI void evas_common_pipe_line_draw(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, int x1, int y1); EAPI void evas_common_pipe_poly_draw(RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Polygon_Point *points, int x, int y); EAPI void evas_common_pipe_text_draw(RGBA_Image *dst, RGBA_Draw_Context *dc, int x, int y, Evas_Text_Props *intl_props); EAPI void evas_common_pipe_text_prepare(Evas_Text_Props *text_props); EAPI void evas_common_pipe_image_load(RGBA_Image *im); EAPI void evas_common_pipe_image_draw(RGBA_Image *src, RGBA_Image *dst, RGBA_Draw_Context *dc, int smooth, 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); EAPI void evas_common_pipe_map_begin(RGBA_Image *root); EAPI void evas_common_pipe_map_draw(RGBA_Image *src, RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Map *m, int smooth, int level); EAPI void evas_common_pipe_flush(RGBA_Image *im); #endif /* _EVAS_PIPE_H */ evas-1.7.9/src/lib/engines/common/evas_op_add_main_.c0000664000175000017500000003464512175475547017476 00000000000000#include "evas_common.h" static RGBA_Gfx_Func op_add_span_funcs[SP_LAST][SM_LAST][SC_LAST][DP_LAST][CPU_LAST]; static RGBA_Gfx_Pt_Func op_add_pt_funcs[SP_LAST][SM_LAST][SC_LAST][DP_LAST][CPU_LAST]; static void op_add_init(void); static void op_add_shutdown(void); static RGBA_Gfx_Func op_add_pixel_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels); static RGBA_Gfx_Func op_add_color_span_get(DATA32 col, RGBA_Image *dst, int pixels); static RGBA_Gfx_Func op_add_pixel_color_span_get(RGBA_Image *src, DATA32 col, RGBA_Image *dst, int pixels); static RGBA_Gfx_Func op_add_mask_color_span_get(DATA32 col, RGBA_Image *dst, int pixels); static RGBA_Gfx_Func op_add_pixel_mask_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels); static RGBA_Gfx_Pt_Func op_add_pixel_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst); static RGBA_Gfx_Pt_Func op_add_color_pt_get(DATA32 col, RGBA_Image *dst); static RGBA_Gfx_Pt_Func op_add_pixel_color_pt_get(Image_Entry_Flags src_flags, DATA32 col, RGBA_Image *dst); static RGBA_Gfx_Pt_Func op_add_mask_color_pt_get(DATA32 col, RGBA_Image *dst); static RGBA_Gfx_Pt_Func op_add_pixel_mask_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst); static RGBA_Gfx_Compositor _composite_add = { "add", op_add_init, op_add_shutdown, op_add_pixel_span_get, op_add_color_span_get, op_add_pixel_color_span_get, op_add_mask_color_span_get, op_add_pixel_mask_span_get, op_add_pixel_pt_get, op_add_color_pt_get, op_add_pixel_color_pt_get, op_add_mask_color_pt_get, op_add_pixel_mask_pt_get }; RGBA_Gfx_Compositor * evas_common_gfx_compositor_add_get(void) { return &(_composite_add); } static RGBA_Gfx_Func op_add_rel_span_funcs[SP_LAST][SM_LAST][SC_LAST][DP_LAST][CPU_LAST]; static RGBA_Gfx_Pt_Func op_add_rel_pt_funcs[SP_LAST][SM_LAST][SC_LAST][DP_LAST][CPU_LAST]; static void op_add_rel_init(void); static void op_add_rel_shutdown(void); static RGBA_Gfx_Func op_add_rel_pixel_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels); static RGBA_Gfx_Func op_add_rel_color_span_get(DATA32 col, RGBA_Image *dst, int pixels); static RGBA_Gfx_Func op_add_rel_pixel_color_span_get(RGBA_Image *src, DATA32 col, RGBA_Image *dst, int pixels); static RGBA_Gfx_Func op_add_rel_mask_color_span_get(DATA32 col, RGBA_Image *dst, int pixels); static RGBA_Gfx_Func op_add_rel_pixel_mask_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels); static RGBA_Gfx_Pt_Func op_add_rel_pixel_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst); static RGBA_Gfx_Pt_Func op_add_rel_color_pt_get(DATA32 col, RGBA_Image *dst); static RGBA_Gfx_Pt_Func op_add_rel_pixel_color_pt_get(Image_Entry_Flags src_flags, DATA32 col, RGBA_Image *dst); static RGBA_Gfx_Pt_Func op_add_rel_mask_color_pt_get(DATA32 col, RGBA_Image *dst); static RGBA_Gfx_Pt_Func op_add_rel_pixel_mask_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst); static RGBA_Gfx_Compositor _composite_add_rel = { "add_rel", op_add_rel_init, op_add_rel_shutdown, op_add_rel_pixel_span_get, op_add_rel_color_span_get, op_add_rel_pixel_color_span_get, op_add_rel_mask_color_span_get, op_add_rel_pixel_mask_span_get, op_add_rel_pixel_pt_get, op_add_rel_color_pt_get, op_add_rel_pixel_color_pt_get, op_add_rel_mask_color_pt_get, op_add_rel_pixel_mask_pt_get }; RGBA_Gfx_Compositor * evas_common_gfx_compositor_add_rel_get(void) { return &(_composite_add_rel); } # include "./evas_op_add/op_add_pixel_.c" # include "./evas_op_add/op_add_color_.c" # include "./evas_op_add/op_add_pixel_color_.c" # include "./evas_op_add/op_add_pixel_mask_.c" # include "./evas_op_add/op_add_mask_color_.c" //# include "./evas_op_add/op_add_pixel_mask_color_.c" # include "./evas_op_add/op_add_pixel_i386.c" # include "./evas_op_add/op_add_color_i386.c" # include "./evas_op_add/op_add_pixel_color_i386.c" # include "./evas_op_add/op_add_pixel_mask_i386.c" # include "./evas_op_add/op_add_mask_color_i386.c" //# include "op_add_pixel_mask_color_.c" static void op_add_init(void) { memset(op_add_span_funcs, 0, sizeof(op_add_span_funcs)); memset(op_add_pt_funcs, 0, sizeof(op_add_pt_funcs)); #ifdef BUILD_MMX init_add_pixel_span_funcs_mmx(); init_add_pixel_color_span_funcs_mmx(); init_add_pixel_mask_span_funcs_mmx(); init_add_color_span_funcs_mmx(); init_add_mask_color_span_funcs_mmx(); init_add_pixel_pt_funcs_mmx(); init_add_pixel_color_pt_funcs_mmx(); init_add_pixel_mask_pt_funcs_mmx(); init_add_color_pt_funcs_mmx(); init_add_mask_color_pt_funcs_mmx(); #endif #ifdef BUILD_C init_add_pixel_span_funcs_c(); init_add_pixel_color_span_funcs_c(); init_add_rel_pixel_mask_span_funcs_c(); init_add_color_span_funcs_c(); init_add_mask_color_span_funcs_c(); init_add_pixel_pt_funcs_c(); init_add_pixel_color_pt_funcs_c(); init_add_rel_pixel_mask_pt_funcs_c(); init_add_color_pt_funcs_c(); init_add_mask_color_pt_funcs_c(); #endif } static void op_add_shutdown(void) { } static RGBA_Gfx_Func add_gfx_span_func_cpu(int s, int m, int c, int d) { RGBA_Gfx_Func func = NULL; int cpu = CPU_N; #ifdef BUILD_MMX if (evas_common_cpu_has_feature(CPU_FEATURE_MMX)) { cpu = CPU_MMX; func = op_add_span_funcs[s][m][c][d][cpu]; if (func) return func; } #endif #ifdef BUILD_C cpu = CPU_C; func = op_add_span_funcs[s][m][c][d][cpu]; if (func) return func; #endif return func; } static RGBA_Gfx_Func op_add_pixel_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels __UNUSED__) { int s = SP_AN, m = SM_N, c = SC_N, d = DP_AN; if (src && src->cache_entry.flags.alpha) s = SP; if (dst && dst->cache_entry.flags.alpha) d = DP; return add_gfx_span_func_cpu(s, m, c, d); } static RGBA_Gfx_Func op_add_color_span_get(DATA32 col, RGBA_Image *dst, int pixels __UNUSED__) { int s = SP_N, m = SM_N, c = SC_AN, d = DP_AN; if ((col >> 24) < 255) c = SC; if (col == (col | 0x00ffffff)) c = SC_AA; if (col == 0xffffffff) c = SC_N; if (dst && dst->cache_entry.flags.alpha) d = DP; return add_gfx_span_func_cpu(s, m, c, d); } static RGBA_Gfx_Func op_add_pixel_color_span_get(RGBA_Image *src, DATA32 col, RGBA_Image *dst, int pixels __UNUSED__) { int s = SP_AN, m = SM_N, c = SC_AN, d = DP_AN; if (src && src->cache_entry.flags.alpha) s = SP; if ((col >> 24) < 255) c = SC; if (col == (col | 0x00ffffff)) c = SC_AA; if (col == 0xffffffff) c = SC_N; if (dst && dst->cache_entry.flags.alpha) d = DP; return add_gfx_span_func_cpu(s, m, c, d); } static RGBA_Gfx_Func op_add_mask_color_span_get(DATA32 col, RGBA_Image *dst, int pixels __UNUSED__) { int s = SP_N, m = SM_AS, c = SC_AN, d = DP_AN; if ((col >> 24) < 255) c = SC; if (col == (col | 0x00ffffff)) c = SC_AA; if (col == 0xffffffff) c = SC_N; if (dst && dst->cache_entry.flags.alpha) d = DP; return add_gfx_span_func_cpu(s, m, c, d); } static RGBA_Gfx_Func op_add_pixel_mask_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels __UNUSED__) { int s = SP_AN, m = SM_AS, c = SC_N, d = DP_AN; if (src && src->cache_entry.flags.alpha) s = SP; if (dst && dst->cache_entry.flags.alpha) d = DP; return add_gfx_span_func_cpu(s, m, c, d); } static RGBA_Gfx_Pt_Func add_gfx_pt_func_cpu(int s, int m, int c, int d) { RGBA_Gfx_Pt_Func func = NULL; int cpu = CPU_N; #ifdef BUILD_MMX if (evas_common_cpu_has_feature(CPU_FEATURE_MMX)) { cpu = CPU_MMX; func = op_add_pt_funcs[s][m][c][d][cpu]; if (func) return func; } #endif #ifdef BUILD_C cpu = CPU_C; func = op_add_pt_funcs[s][m][c][d][cpu]; if (func) return func; #endif return func; } static RGBA_Gfx_Pt_Func op_add_pixel_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst) { int s = SP_AN, m = SM_N, c = SC_N, d = DP_AN; if (src_flags.alpha) s = SP; if (dst && dst->cache_entry.flags.alpha) d = DP; return add_gfx_pt_func_cpu(s, m, c, d); } static RGBA_Gfx_Pt_Func op_add_color_pt_get(DATA32 col, RGBA_Image *dst) { int s = SP_N, m = SM_N, c = SC_AN, d = DP_AN; if ((col >> 24) < 255) c = SC; if (col == (col | 0x00ffffff)) c = SC_AA; if (col == 0xffffffff) c = SC_N; if (dst && dst->cache_entry.flags.alpha) d = DP; return add_gfx_pt_func_cpu(s, m, c, d); } static RGBA_Gfx_Pt_Func op_add_pixel_color_pt_get(Image_Entry_Flags src_flags, DATA32 col, RGBA_Image *dst) { int s = SP_AN, m = SM_N, c = SC_AN, d = DP_AN; if (src_flags.alpha) s = SP; if ((col >> 24) < 255) c = SC; if (col == (col | 0x00ffffff)) c = SC_AA; if (col == 0xffffffff) c = SC_N; if (dst && dst->cache_entry.flags.alpha) d = DP; return add_gfx_pt_func_cpu(s, m, c, d); } static RGBA_Gfx_Pt_Func op_add_mask_color_pt_get(DATA32 col, RGBA_Image *dst) { int s = SP_N, m = SM_AS, c = SC_AN, d = DP_AN; if ((col >> 24) < 255) c = SC; if (col == (col | 0x00ffffff)) c = SC_AA; if (col == 0xffffffff) c = SC_N; if (dst && dst->cache_entry.flags.alpha) d = DP; return add_gfx_pt_func_cpu(s, m, c, d); } static RGBA_Gfx_Pt_Func op_add_pixel_mask_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst) { int s = SP_AN, m = SM_AS, c = SC_N, d = DP_AN; if (src_flags.alpha) s = SP; if (dst && dst->cache_entry.flags.alpha) d = DP; return add_gfx_pt_func_cpu(s, m, c, d); } static void op_add_rel_init(void) { memset(op_add_rel_span_funcs, 0, sizeof(op_add_rel_span_funcs)); memset(op_add_rel_pt_funcs, 0, sizeof(op_add_rel_pt_funcs)); #ifdef BUILD_MMX init_add_rel_pixel_span_funcs_mmx(); init_add_rel_pixel_color_span_funcs_mmx(); init_add_rel_pixel_mask_span_funcs_mmx(); init_add_rel_color_span_funcs_mmx(); init_add_rel_mask_color_span_funcs_mmx(); init_add_rel_pixel_pt_funcs_mmx(); init_add_rel_pixel_color_pt_funcs_mmx(); init_add_rel_pixel_mask_pt_funcs_mmx(); init_add_rel_color_pt_funcs_mmx(); init_add_rel_mask_color_pt_funcs_mmx(); #endif #ifdef BUILD_C init_add_rel_pixel_span_funcs_c(); init_add_rel_pixel_color_span_funcs_c(); init_add_rel_pixel_mask_span_funcs_c(); init_add_rel_color_span_funcs_c(); init_add_rel_mask_color_span_funcs_c(); init_add_rel_pixel_pt_funcs_c(); init_add_rel_pixel_color_pt_funcs_c(); init_add_rel_pixel_mask_pt_funcs_c(); init_add_rel_color_pt_funcs_c(); init_add_rel_mask_color_pt_funcs_c(); #endif } static void op_add_rel_shutdown(void) { } static RGBA_Gfx_Func add_rel_gfx_span_func_cpu(int s, int m, int c, int d) { RGBA_Gfx_Func func = NULL; int cpu = CPU_N; #ifdef BUILD_MMX if (evas_common_cpu_has_feature(CPU_FEATURE_MMX)) { cpu = CPU_MMX; func = op_add_rel_span_funcs[s][m][c][d][cpu]; if (func) return func; } #endif #ifdef BUILD_C cpu = CPU_C; func = op_add_rel_span_funcs[s][m][c][d][cpu]; if (func) return func; #endif return func; } static RGBA_Gfx_Func op_add_rel_pixel_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels __UNUSED__) { int s = SP_AN, m = SM_N, c = SC_N, d = DP_AN; if (src && src->cache_entry.flags.alpha) s = SP; if (dst && dst->cache_entry.flags.alpha) d = DP; return add_rel_gfx_span_func_cpu(s, m, c, d); } static RGBA_Gfx_Func op_add_rel_color_span_get(DATA32 col, RGBA_Image *dst, int pixels __UNUSED__) { int s = SP_N, m = SM_N, c = SC_AN, d = DP_AN; if ((col >> 24) < 255) c = SC; if (col == (col | 0x00ffffff)) c = SC_AA; if (col == 0xffffffff) c = SC_N; if (dst && dst->cache_entry.flags.alpha) d = DP; return add_rel_gfx_span_func_cpu(s, m, c, d); } static RGBA_Gfx_Func op_add_rel_pixel_color_span_get(RGBA_Image *src, DATA32 col, RGBA_Image *dst, int pixels __UNUSED__) { int s = SP_AN, m = SM_N, c = SC_AN, d = DP_AN; if (src && src->cache_entry.flags.alpha) s = SP; if ((col >> 24) < 255) c = SC; if (col == (col | 0x00ffffff)) c = SC_AA; if (col == 0xffffffff) c = SC_N; if (dst && dst->cache_entry.flags.alpha) d = DP; return add_rel_gfx_span_func_cpu(s, m, c, d); } static RGBA_Gfx_Func op_add_rel_mask_color_span_get(DATA32 col, RGBA_Image *dst, int pixels __UNUSED__) { int s = SP_N, m = SM_AS, c = SC_AN, d = DP_AN; if ((col >> 24) < 255) c = SC; if (col == (col | 0x00ffffff)) c = SC_AA; if (col == 0xffffffff) c = SC_N; if (dst && dst->cache_entry.flags.alpha) d = DP; return add_rel_gfx_span_func_cpu(s, m, c, d); } static RGBA_Gfx_Func op_add_rel_pixel_mask_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels __UNUSED__) { int s = SP_AN, m = SM_AS, c = SC_N, d = DP_AN; if (src && src->cache_entry.flags.alpha) s = SP; if (dst && dst->cache_entry.flags.alpha) d = DP; return add_rel_gfx_span_func_cpu(s, m, c, d); } static RGBA_Gfx_Pt_Func add_rel_gfx_pt_func_cpu(int s, int m, int c, int d) { RGBA_Gfx_Pt_Func func = NULL; int cpu = CPU_N; #ifdef BUILD_MMX if (evas_common_cpu_has_feature(CPU_FEATURE_MMX)) { cpu = CPU_MMX; func = op_add_rel_pt_funcs[s][m][c][d][cpu]; if (func) return func; } #endif #ifdef BUILD_C cpu = CPU_C; func = op_add_rel_pt_funcs[s][m][c][d][cpu]; if (func) return func; #endif return func; } static RGBA_Gfx_Pt_Func op_add_rel_pixel_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst) { int s = SP_AN, m = SM_N, c = SC_N, d = DP_AN; if (src_flags.alpha) s = SP; if (dst && dst->cache_entry.flags.alpha) d = DP; return add_rel_gfx_pt_func_cpu(s, m, c, d); } static RGBA_Gfx_Pt_Func op_add_rel_color_pt_get(DATA32 col, RGBA_Image *dst) { int s = SP_N, m = SM_N, c = SC_AN, d = DP_AN; if ((col >> 24) < 255) c = SC; if (col == (col | 0x00ffffff)) c = SC_AA; if (col == 0xffffffff) c = SC_N; if (dst && dst->cache_entry.flags.alpha) d = DP; return add_rel_gfx_pt_func_cpu(s, m, c, d); } static RGBA_Gfx_Pt_Func op_add_rel_pixel_color_pt_get(Image_Entry_Flags src_flags, DATA32 col, RGBA_Image *dst) { int s = SP_AN, m = SM_N, c = SC_AN, d = DP_AN; if (src_flags.alpha) s = SP; if ((col >> 24) < 255) c = SC; if (col == (col | 0x00ffffff)) c = SC_AA; if (col == 0xffffffff) c = SC_N; if (dst && dst->cache_entry.flags.alpha) d = DP; return add_rel_gfx_pt_func_cpu(s, m, c, d); } static RGBA_Gfx_Pt_Func op_add_rel_mask_color_pt_get(DATA32 col, RGBA_Image *dst) { int s = SP_N, m = SM_AS, c = SC_AN, d = DP_AN; if ((col >> 24) < 255) c = SC; if (col == (col | 0x00ffffff)) c = SC_AA; if (col == 0xffffffff) c = SC_N; if (dst && dst->cache_entry.flags.alpha) d = DP; return add_rel_gfx_pt_func_cpu(s, m, c, d); } static RGBA_Gfx_Pt_Func op_add_rel_pixel_mask_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst) { int s = SP_AN, m = SM_AS, c = SC_N, d = DP_AN; if (src_flags.alpha) s = SP; if (dst && dst->cache_entry.flags.alpha) d = DP; return add_rel_gfx_pt_func_cpu(s, m, c, d); } evas-1.7.9/src/lib/engines/common/evas_map_image_core.c0000664000175000017500000001733212175475547020026 00000000000000//#undef SCALE_USING_MMX { if (smooth) { for (y = ystart; y <= yend; y++) { int x, w, ww; FPc u, v, ud, vd, dv, ue, ve; DATA32 *d, *s; #ifdef COLMUL FPc cv, cd; // col # ifdef SCALE_USING_MMX FPc cc; #endif DATA32 c1, c2; // col #endif Line *line; #ifdef SCALE_USING_MMX pxor_r2r(mm0, mm0); MOV_A2R(ALPHA_255, mm5) #endif line = &(spans[y - ystart]); for (i = 0; i < 2; i++) { Span *span; span = &(line->span[i]); if (span->x1 >= 0) { long long tl; x = span->x1; w = (span->x2 - x); if (w <= 0) continue; dv = (span->o2 - span->o1); if (dv <= 0) continue; ww = w; u = span->u[0] << FPI; if (u < 0) u = 0; else if (u > swp) u = swp; v = span->v[0] << FPI; if (v < 0) v = 0; else if (v > shp) v = shp; ue = span->u[1] << FPI; if (ue < 0) ue = 0; else if (ue > swp) ue = swp; ve = span->v[1] << FPI; if (ve < 0) ve = 0; else if (ve > shp) ve = shp; ud = (ue - u) / w; vd = (ve - v) / w; tl = (long long)ud * (w << FP); tl = tl / dv; ud = tl; u -= (ud * (span->o1 - (span->x1 << FP))) / FP1; tl = (long long)vd * (w << FP); tl = tl / dv; vd = tl; v -= (vd * (span->o1 - (span->x1 << FP))) / FP1; if (ud < 0) u += ud; if (vd < 0) v += vd; if (u < 0) u = 0; else if (u >= swp) u = swp - 1; if (v < 0) v = 0; else if (v >= shp) v = shp - 1; if (direct) d = dst->image.data + (y * dst->cache_entry.w) + x; else d = buf; #define SMOOTH 1 #ifdef COLMUL c1 = span->col[0]; // col c2 = span->col[1]; // col cv = 0; // col cd = (255 << 16) / w; // col if (c1 == c2) { if (c1 == 0xffffffff) { #endif #include "evas_map_image_loop.c" #ifdef COLMUL } else if ((c1 == 0x0000ff) && (!src->cache_entry.flags.alpha)) { // all black line # define COLBLACK 1 # include "evas_map_image_loop.c" # undef COLBLACK } else if (c1 == 0x000000) { // skip span } else { // generic loop # include "evas_map_image_loop.c" } } else { # include "evas_map_image_loop.c" } #endif if (!direct) { d = dst->image.data; d += (y * dst->cache_entry.w) + x; func(buf, NULL, dc->mul.col, d, w); } } else break; } } } else { for (y = ystart; y <= yend; y++) { int x, w, ww; FPc u, v, ud, vd, ue, ve; DATA32 *d, *s; #ifdef COLMUL FPc cv, cd; // col DATA32 c1, c2; // col #endif Line *line; line = &(spans[y - ystart]); for (i = 0; i < 2; i++) { Span *span; span = &(line->span[i]); if (span->x1 >= 0) { x = span->x1; w = (span->x2 - x); if (w <= 0) continue; ww = w; u = span->u[0] << FPI; if (u < 0) u = 0; else if (u > swp) u = swp; v = span->v[0] << FPI; if (v < 0) v = 0; else if (v > shp) v = shp; ue = span->u[1] << FPI; if (ue < 0) ue = 0; else if (ue > swp) ue = swp; ve = span->v[1] << FPI; if (ve < 0) ve = 0; else if (ve > shp) ve = shp; ud = (ue - u) / w; vd = (ve - v) / w; if (direct) d = dst->image.data + (y * dst->cache_entry.w) + x; else d = buf; if (ud < 0) u += ud; if (vd < 0) v += vd; if (u < 0) u = 0; else if (u >= swp) u = swp - 1; if (v < 0) v = 0; else if (v >= shp) v = shp - 1; #undef SMOOTH #ifdef COLMUL c1 = span->col[0]; // col c2 = span->col[1]; // col cv = 0; // col cd = (255 << 16) / w; // col if (c1 == c2) { if (c1 == 0xffffffff) { #endif #include "evas_map_image_loop.c" #ifdef COLMUL } else if ((c1 == 0x0000ff) && (!src->cache_entry.flags.alpha)) { // all black line # define COLBLACK 1 # include "evas_map_image_loop.c" # undef COLBLACK } else if (c1 == 0x000000) { // skip span } else { // generic loop # include "evas_map_image_loop.c" } } else { // generic loop # include "evas_map_image_loop.c" } #endif if (!direct) { d = dst->image.data; d += (y * dst->cache_entry.w) + x; func(buf, NULL, dc->mul.col, d, w); } } else break; } } } } evas-1.7.9/src/lib/engines/common/evas_image_save.c0000664000175000017500000000210412175475547017166 00000000000000#ifdef HAVE_CONFIG_H # include "config.h" #endif #include "evas_options.h" #include "evas_common.h" #include "evas_private.h" int evas_common_save_image_to_file(RGBA_Image *im, const char *file, const char *key, int quality, int compress) { Evas_Image_Save_Func *evas_image_save_func = NULL; char *p; char *saver = NULL; p = strrchr(file, '.'); if (p) { p++; if (!strcasecmp(p, "png")) saver = "png"; if ((!strcasecmp(p, "jpg")) || (!strcasecmp(p, "jpeg")) || (!strcasecmp(p, "jfif"))) saver = "jpeg"; if ((!strcasecmp(p, "eet")) || (!strcasecmp(p, "edj")) || (!strcasecmp(p, "eap"))) saver = "eet"; if (!strcasecmp(p, "edb")) saver = "edb"; } if (saver) { Evas_Module *em; em = evas_module_find_type(EVAS_MODULE_TYPE_IMAGE_SAVER, saver); if (em) { evas_module_use(em); if (evas_module_load(em)) { evas_image_save_func = em->functions; return evas_image_save_func->image_save(im, file, key, quality, compress); } } } return 0; } evas-1.7.9/src/lib/engines/common/evas_op_copy_main_.c0000664000175000017500000004321112175475547017705 00000000000000#include "evas_common.h" #include "evas_blend_private.h" static RGBA_Gfx_Func op_copy_span_funcs[SP_LAST][SM_LAST][SC_LAST][DP_LAST][CPU_LAST]; static RGBA_Gfx_Pt_Func op_copy_pt_funcs[SP_LAST][SM_LAST][SC_LAST][DP_LAST][CPU_LAST]; static void op_copy_init(void); static void op_copy_shutdown(void); static RGBA_Gfx_Func op_copy_pixel_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels); static RGBA_Gfx_Func op_copy_color_span_get(DATA32 col, RGBA_Image *dst, int pixels); static RGBA_Gfx_Func op_copy_pixel_color_span_get(RGBA_Image *src, DATA32 col, RGBA_Image *dst, int pixels); static RGBA_Gfx_Func op_copy_mask_color_span_get(DATA32 col, RGBA_Image *dst, int pixels); static RGBA_Gfx_Func op_copy_pixel_mask_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels); static RGBA_Gfx_Pt_Func op_copy_pixel_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst); static RGBA_Gfx_Pt_Func op_copy_color_pt_get(DATA32 col, RGBA_Image *dst); static RGBA_Gfx_Pt_Func op_copy_pixel_color_pt_get(Image_Entry_Flags src_flags, DATA32 col, RGBA_Image *dst); static RGBA_Gfx_Pt_Func op_copy_mask_color_pt_get(DATA32 col, RGBA_Image *dst); static RGBA_Gfx_Pt_Func op_copy_pixel_mask_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst); static RGBA_Gfx_Compositor _composite_copy = { "copy", op_copy_init, op_copy_shutdown, op_copy_pixel_span_get, op_copy_color_span_get, op_copy_pixel_color_span_get, op_copy_mask_color_span_get, op_copy_pixel_mask_span_get, op_copy_pixel_pt_get, op_copy_color_pt_get, op_copy_pixel_color_pt_get, op_copy_mask_color_pt_get, op_copy_pixel_mask_pt_get }; RGBA_Gfx_Compositor * evas_common_gfx_compositor_copy_get(void) { return &(_composite_copy); } static RGBA_Gfx_Func op_copy_rel_span_funcs[SP_LAST][SM_LAST][SC_LAST][DP_LAST][CPU_LAST]; static RGBA_Gfx_Pt_Func op_copy_rel_pt_funcs[SP_LAST][SM_LAST][SC_LAST][DP_LAST][CPU_LAST]; static void op_copy_rel_init(void); static void op_copy_rel_shutdown(void); static RGBA_Gfx_Func op_copy_rel_pixel_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels); static RGBA_Gfx_Func op_copy_rel_color_span_get(DATA32 col, RGBA_Image *dst, int pixels); static RGBA_Gfx_Func op_copy_rel_pixel_color_span_get(RGBA_Image *src, DATA32 col, RGBA_Image *dst, int pixels); static RGBA_Gfx_Func op_copy_rel_mask_color_span_get(DATA32 col, RGBA_Image *dst, int pixels); static RGBA_Gfx_Func op_copy_rel_pixel_mask_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels); static RGBA_Gfx_Pt_Func op_copy_rel_pixel_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst); /* XXX: doesn't exist static RGBA_Gfx_Pt_Func op_copy_rel_color_pt_get(DATA32 col, RGBA_Image *dst); */ static RGBA_Gfx_Pt_Func op_copy_rel_pixel_color_pt_get(Image_Entry_Flags src_flags, DATA32 col, RGBA_Image *dst); static RGBA_Gfx_Pt_Func op_copy_rel_mask_color_pt_get(DATA32 col, RGBA_Image *dst); static RGBA_Gfx_Pt_Func op_copy_rel_pixel_mask_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst); static RGBA_Gfx_Compositor _composite_copy_rel = { "copy_rel", op_copy_rel_init, op_copy_rel_shutdown, op_copy_rel_pixel_span_get, op_copy_rel_color_span_get, op_copy_rel_pixel_color_span_get, op_copy_rel_mask_color_span_get, op_copy_rel_pixel_mask_span_get, op_copy_rel_pixel_pt_get, op_copy_color_pt_get, op_copy_rel_pixel_color_pt_get, op_copy_rel_mask_color_pt_get, op_copy_rel_pixel_mask_pt_get }; RGBA_Gfx_Compositor * evas_common_gfx_compositor_copy_rel_get(void) { return &(_composite_copy_rel); } # include "./evas_op_copy/op_copy_pixel_.c" # include "./evas_op_copy/op_copy_color_.c" # include "./evas_op_copy/op_copy_pixel_color_.c" # include "./evas_op_copy/op_copy_pixel_mask_.c" # include "./evas_op_copy/op_copy_mask_color_.c" //# include "./evas_op_copy/op_copy_pixel_mask_color_.c" # include "./evas_op_copy/op_copy_pixel_i386.c" # include "./evas_op_copy/op_copy_color_i386.c" # include "./evas_op_copy/op_copy_pixel_color_i386.c" # include "./evas_op_copy/op_copy_pixel_mask_i386.c" # include "./evas_op_copy/op_copy_mask_color_i386.c" //# include "./evas_op_copy/op_copy_pixel_mask_color_i386.c" # include "./evas_op_copy/op_copy_pixel_neon.c" # include "./evas_op_copy/op_copy_color_neon.c" # include "./evas_op_copy/op_copy_pixel_color_neon.c" # include "./evas_op_copy/op_copy_pixel_mask_neon.c" # include "./evas_op_copy/op_copy_mask_color_neon.c" //# include "./evas_op_copy/op_copy_pixel_mask_color_neon.c" static void op_copy_init(void) { memset(op_copy_span_funcs, 0, sizeof(op_copy_span_funcs)); memset(op_copy_pt_funcs, 0, sizeof(op_copy_pt_funcs)); #ifdef BUILD_MMX init_copy_pixel_span_funcs_mmx(); init_copy_pixel_color_span_funcs_mmx(); init_copy_pixel_mask_span_funcs_mmx(); init_copy_color_span_funcs_mmx(); init_copy_mask_color_span_funcs_mmx(); init_copy_pixel_pt_funcs_mmx(); init_copy_pixel_color_pt_funcs_mmx(); init_copy_pixel_mask_pt_funcs_mmx(); init_copy_color_pt_funcs_mmx(); init_copy_mask_color_pt_funcs_mmx(); #endif #ifdef BUILD_NEON init_copy_pixel_span_funcs_neon(); init_copy_pixel_color_span_funcs_neon(); init_copy_pixel_mask_span_funcs_neon(); init_copy_color_span_funcs_neon(); init_copy_mask_color_span_funcs_neon(); init_copy_pixel_pt_funcs_neon(); init_copy_pixel_color_pt_funcs_neon(); init_copy_pixel_mask_pt_funcs_neon(); init_copy_color_pt_funcs_neon(); init_copy_mask_color_pt_funcs_neon(); #endif #ifdef BUILD_C init_copy_pixel_span_funcs_c(); init_copy_pixel_color_span_funcs_c(); init_copy_pixel_mask_span_funcs_c(); init_copy_color_span_funcs_c(); init_copy_mask_color_span_funcs_c(); init_copy_pixel_pt_funcs_c(); init_copy_pixel_color_pt_funcs_c(); init_copy_pixel_mask_pt_funcs_c(); init_copy_color_pt_funcs_c(); init_copy_mask_color_pt_funcs_c(); #endif } static void op_copy_shutdown(void) { } static RGBA_Gfx_Func copy_gfx_span_func_cpu(int s, int m, int c, int d) { RGBA_Gfx_Func func = NULL; int cpu = CPU_N; #ifdef BUILD_MMX if (evas_common_cpu_has_feature(CPU_FEATURE_MMX)) { cpu = CPU_MMX; func = op_copy_span_funcs[s][m][c][d][cpu]; if (func) return func; } #endif #ifdef BUILD_NEON if (evas_common_cpu_has_feature(CPU_FEATURE_NEON)) { cpu = CPU_NEON; func = op_copy_span_funcs[s][m][c][d][cpu]; if (func) return func; } #endif #ifdef BUILD_C cpu = CPU_C; func = op_copy_span_funcs[s][m][c][d][cpu]; if (func) return func; #endif return func; } static RGBA_Gfx_Func op_copy_pixel_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels __UNUSED__) { int s = SP_AN, m = SM_N, c = SC_N, d = DP_AN; if (src && src->cache_entry.flags.alpha) { dst->cache_entry.flags.alpha = 1; s = SP; } if (dst && dst->cache_entry.flags.alpha) d = DP; return copy_gfx_span_func_cpu(s, m, c, d); } static RGBA_Gfx_Func op_copy_color_span_get(DATA32 col, RGBA_Image *dst, int pixels __UNUSED__) { int s = SP_N, m = SM_N, c = SC_AN, d = DP_AN; if ((col >> 24) < 255) { if (dst) dst->cache_entry.flags.alpha = 1; c = SC; } if (col == ((col >> 24) * 0x01010101)) c = SC_AA; if (col == 0xffffffff) c = SC_N; if (dst && dst->cache_entry.flags.alpha) d = DP; return copy_gfx_span_func_cpu(s, m, c, d); } static RGBA_Gfx_Func op_copy_pixel_color_span_get(RGBA_Image *src, DATA32 col, RGBA_Image *dst, int pixels __UNUSED__) { int s = SP_AN, m = SM_N, c = SC_AN, d = DP_AN; if (src && src->cache_entry.flags.alpha) { if (dst) dst->cache_entry.flags.alpha = 1; s = SP; } if ((col >> 24) < 255) { if (dst) dst->cache_entry.flags.alpha = 1; c = SC; } if (col == ((col >> 24) * 0x01010101)) c = SC_AA; if (col == 0xffffffff) c = SC_N; if (dst && dst->cache_entry.flags.alpha) d = DP; return copy_gfx_span_func_cpu(s, m, c, d); } static RGBA_Gfx_Func op_copy_mask_color_span_get(DATA32 col, RGBA_Image *dst, int pixels __UNUSED__) { int s = SP_N, m = SM_AS, c = SC_AN, d = DP; if (dst) dst->cache_entry.flags.alpha = 1; if ((col >> 24) < 255) c = SC; if (col == ((col >> 24) * 0x01010101)) c = SC_AA; if (col == 0xffffffff) c = SC_N; return copy_gfx_span_func_cpu(s, m, c, d); } static RGBA_Gfx_Func op_copy_pixel_mask_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels __UNUSED__) { int s = SP_AN, m = SM_AS, c = SC_N, d = DP; if (dst) dst->cache_entry.flags.alpha = 1; if (src && src->cache_entry.flags.alpha) s = SP; return copy_gfx_span_func_cpu(s, m, c, d); } static RGBA_Gfx_Pt_Func copy_gfx_pt_func_cpu(int s, int m, int c, int d) { RGBA_Gfx_Pt_Func func = NULL; int cpu = CPU_N; #ifdef BUILD_MMX if (evas_common_cpu_has_feature(CPU_FEATURE_MMX)) { cpu = CPU_MMX; func = op_copy_pt_funcs[s][m][c][d][cpu]; if (func) return func; } #endif #ifdef BUILD_NEON if (evas_common_cpu_has_feature(CPU_FEATURE_NEON)) { cpu = CPU_NEON; func = op_copy_pt_funcs[s][m][c][d][cpu]; if (func) return func; } #endif #ifdef BUILD_C cpu = CPU_C; func = op_copy_pt_funcs[s][m][c][d][cpu]; if (func) return func; #endif return func; } static RGBA_Gfx_Pt_Func op_copy_pixel_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst) { int s = SP_AN, m = SM_N, c = SC_N, d = DP_AN; if (src_flags.alpha) { dst->cache_entry.flags.alpha = 1; s = SP; } if (dst && dst->cache_entry.flags.alpha) d = DP; return copy_gfx_pt_func_cpu(s, m, c, d); } static RGBA_Gfx_Pt_Func op_copy_color_pt_get(DATA32 col, RGBA_Image *dst) { int s = SP_N, m = SM_N, c = SC_AN, d = DP_AN; if ((col >> 24) < 255) { if (dst) dst->cache_entry.flags.alpha = 1; c = SC; } if (col == ((col >> 24) * 0x01010101)) c = SC_AA; if (col == 0xffffffff) c = SC_N; if (dst && dst->cache_entry.flags.alpha) d = DP; return copy_gfx_pt_func_cpu(s, m, c, d); } static RGBA_Gfx_Pt_Func op_copy_pixel_color_pt_get(Image_Entry_Flags src_flags, DATA32 col, RGBA_Image *dst) { int s = SP_AN, m = SM_N, c = SC_AN, d = DP_AN; if (src_flags.alpha) { if (dst) dst->cache_entry.flags.alpha = 1; s = SP; } if ((col >> 24) < 255) { if (dst) dst->cache_entry.flags.alpha = 1; c = SC; } if (col == ((col >> 24) * 0x01010101)) c = SC_AA; if (col == 0xffffffff) c = SC_N; if (dst && dst->cache_entry.flags.alpha) d = DP; return copy_gfx_pt_func_cpu(s, m, c, d); } static RGBA_Gfx_Pt_Func op_copy_mask_color_pt_get(DATA32 col, RGBA_Image *dst) { int s = SP_N, m = SM_AS, c = SC_AN, d = DP; if (dst) dst->cache_entry.flags.alpha = 1; if ((col >> 24) < 255) c = SC; if (col == ((col >> 24) * 0x01010101)) c = SC_AA; if (col == 0xffffffff) c = SC_N; return copy_gfx_pt_func_cpu(s, m, c, d); } static RGBA_Gfx_Pt_Func op_copy_pixel_mask_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst) { int s = SP_AN, m = SM_AS, c = SC_N, d = DP; if (dst) dst->cache_entry.flags.alpha = 1; if (src_flags.alpha) s = SP; return copy_gfx_pt_func_cpu(s, m, c, d); } static void op_copy_rel_init(void) { memset(op_copy_rel_span_funcs, 0, sizeof(op_copy_rel_span_funcs)); memset(op_copy_rel_pt_funcs, 0, sizeof(op_copy_rel_pt_funcs)); #ifdef BUILD_MMX init_copy_rel_pixel_span_funcs_mmx(); init_copy_rel_pixel_color_span_funcs_mmx(); init_copy_rel_pixel_mask_span_funcs_mmx(); init_copy_rel_color_span_funcs_mmx(); init_copy_rel_mask_color_span_funcs_mmx(); init_copy_rel_pixel_pt_funcs_mmx(); init_copy_rel_pixel_color_pt_funcs_mmx(); init_copy_rel_pixel_mask_pt_funcs_mmx(); init_copy_rel_color_pt_funcs_mmx(); init_copy_rel_mask_color_pt_funcs_mmx(); #endif #ifdef BUILD_NEON init_copy_rel_pixel_span_funcs_neon(); init_copy_rel_pixel_color_span_funcs_neon(); init_copy_rel_pixel_mask_span_funcs_neon(); init_copy_rel_color_span_funcs_neon(); init_copy_rel_mask_color_span_funcs_neon(); init_copy_rel_pixel_pt_funcs_neon(); init_copy_rel_pixel_color_pt_funcs_neon(); init_copy_rel_pixel_mask_pt_funcs_neon(); init_copy_rel_color_pt_funcs_neon(); init_copy_rel_mask_color_pt_funcs_neon(); #endif #ifdef BUILD_C init_copy_rel_pixel_span_funcs_c(); init_copy_rel_pixel_color_span_funcs_c(); init_copy_rel_pixel_mask_span_funcs_c(); init_copy_rel_color_span_funcs_c(); init_copy_rel_mask_color_span_funcs_c(); init_copy_rel_pixel_pt_funcs_c(); init_copy_rel_pixel_color_pt_funcs_c(); init_copy_rel_pixel_mask_pt_funcs_c(); init_copy_rel_color_pt_funcs_c(); init_copy_rel_mask_color_pt_funcs_c(); #endif } static void op_copy_rel_shutdown(void) { } static RGBA_Gfx_Func copy_rel_gfx_span_func_cpu(int s, int m, int c, int d) { RGBA_Gfx_Func func = NULL; int cpu = CPU_N; #ifdef BUILD_MMX if (evas_common_cpu_has_feature(CPU_FEATURE_MMX)) { cpu = CPU_MMX; func = op_copy_rel_span_funcs[s][m][c][d][cpu]; if (func) return func; } #endif #ifdef BUILD_NEON if (evas_common_cpu_has_feature(CPU_FEATURE_NEON)) { cpu = CPU_NEON; func = op_copy_rel_span_funcs[s][m][c][d][cpu]; if (func) return func; } #endif #ifdef BUILD_C cpu = CPU_C; func = op_copy_rel_span_funcs[s][m][c][d][cpu]; if (func) return func; #endif return func; } static RGBA_Gfx_Func op_copy_rel_pixel_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels __UNUSED__) { int s = SP_AN, m = SM_N, c = SC_N, d = DP_AN; if (src && src->cache_entry.flags.alpha) { if (dst) dst->cache_entry.flags.alpha = 1; s = SP; } if (dst && dst->cache_entry.flags.alpha) d = DP; return copy_rel_gfx_span_func_cpu(s, m, c, d); } static RGBA_Gfx_Func op_copy_rel_color_span_get(DATA32 col, RGBA_Image *dst, int pixels __UNUSED__) { int s = SP_N, m = SM_N, c = SC_AN, d = DP_AN; if ((col >> 24) < 255) { if (dst) dst->cache_entry.flags.alpha = 1; c = SC; } if (col == ((col >> 24) * 0x01010101)) c = SC_AA; if (col == 0xffffffff) c = SC_N; if (dst && dst->cache_entry.flags.alpha) d = DP; return copy_rel_gfx_span_func_cpu(s, m, c, d); } static RGBA_Gfx_Func op_copy_rel_pixel_color_span_get(RGBA_Image *src, DATA32 col, RGBA_Image *dst, int pixels __UNUSED__) { int s = SP_AN, m = SM_N, c = SC_AN, d = DP_AN; if (src && src->cache_entry.flags.alpha) { if (dst) dst->cache_entry.flags.alpha = 1; s = SP; } if ((col >> 24) < 255) { if (dst) dst->cache_entry.flags.alpha = 1; c = SC; } if (col == ((col >> 24) * 0x01010101)) c = SC_AA; if (col == 0xffffffff) c = SC_N; if (dst && dst->cache_entry.flags.alpha) d = DP; return copy_rel_gfx_span_func_cpu(s, m, c, d); } static RGBA_Gfx_Func op_copy_rel_mask_color_span_get(DATA32 col, RGBA_Image *dst, int pixels __UNUSED__) { int s = SP_N, m = SM_AS, c = SC_AN, d = DP; if (dst) dst->cache_entry.flags.alpha = 1; if ((col >> 24) < 255) c = SC; if (col == ((col >> 24) * 0x01010101)) c = SC_AA; if (col == 0xffffffff) c = SC_N; return copy_rel_gfx_span_func_cpu(s, m, c, d); } static RGBA_Gfx_Func op_copy_rel_pixel_mask_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels __UNUSED__) { int s = SP_AN, m = SM_AS, c = SC_N, d = DP; if (dst) dst->cache_entry.flags.alpha = 1; if (src && src->cache_entry.flags.alpha) s = SP; return copy_rel_gfx_span_func_cpu(s, m, c, d); } static RGBA_Gfx_Pt_Func copy_rel_gfx_pt_func_cpu(int s, int m, int c, int d) { RGBA_Gfx_Pt_Func func = NULL; int cpu = CPU_N; #ifdef BUILD_MMX if (evas_common_cpu_has_feature(CPU_FEATURE_MMX)) { cpu = CPU_MMX; func = op_copy_rel_pt_funcs[s][m][c][d][cpu]; if (func) return func; } #endif #ifdef BUILD_NEON if (evas_common_cpu_has_feature(CPU_FEATURE_NEON)) { cpu = CPU_NEON; func = op_copy_rel_pt_funcs[s][m][c][d][cpu]; if (func) return func; } #endif #ifdef BUILD_C cpu = CPU_C; func = op_copy_rel_pt_funcs[s][m][c][d][cpu]; if (func) return func; #endif return func; } static RGBA_Gfx_Pt_Func op_copy_rel_pixel_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst) { int s = SP_AN, m = SM_N, c = SC_N, d = DP_AN; if (src_flags.alpha) { if (dst) dst->cache_entry.flags.alpha = 1; s = SP; } if (dst && dst->cache_entry.flags.alpha) d = DP; return copy_rel_gfx_pt_func_cpu(s, m, c, d); } /* XXX: not used static RGBA_Gfx_Pt_Func op_copy_rel_color_pt_get(DATA32 col, RGBA_Image *dst) { int s = SP_N, m = SM_N, c = SC_AN, d = DP_AN; if ((col >> 24) < 255) { if (dst) dst->cache_entry.flags.alpha = 1; c = SC; } if (col == ((col >> 24) * 0x01010101)) c = SC_AA; if (col == 0xffffffff) c = SC_N; if (dst && dst->cache_entry.flags.alpha) d = DP; return copy_rel_gfx_pt_func_cpu(s, m, c, d); } */ static RGBA_Gfx_Pt_Func op_copy_rel_pixel_color_pt_get(Image_Entry_Flags src_flags, DATA32 col, RGBA_Image *dst) { int s = SP_AN, m = SM_N, c = SC_AN, d = DP_AN; if (src_flags.alpha) { if (dst) dst->cache_entry.flags.alpha = 1; s = SP; } if ((col >> 24) < 255) { if (dst) dst->cache_entry.flags.alpha = 1; c = SC; } if (col == ((col >> 24) * 0x01010101)) c = SC_AA; if (col == 0xffffffff) c = SC_N; if (dst && dst->cache_entry.flags.alpha) d = DP; return copy_rel_gfx_pt_func_cpu(s, m, c, d); } static RGBA_Gfx_Pt_Func op_copy_rel_mask_color_pt_get(DATA32 col, RGBA_Image *dst) { int s = SP_N, m = SM_AS, c = SC_AN, d = DP; if (dst) dst->cache_entry.flags.alpha = 1; if ((col >> 24) < 255) c = SC; if (col == ((col >> 24) * 0x01010101)) c = SC_AA; if (col == 0xffffffff) c = SC_N; return copy_rel_gfx_pt_func_cpu(s, m, c, d); } static RGBA_Gfx_Pt_Func op_copy_rel_pixel_mask_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst) { int s = SP_AN, m = SM_AS, c = SC_N, d = DP; if (dst) dst->cache_entry.flags.alpha = 1; if (src_flags.alpha) s = SP; return copy_rel_gfx_pt_func_cpu(s, m, c, d); } evas-1.7.9/src/lib/engines/common/evas_scale_smooth_scaler_downx.c0000664000175000017500000001265512175475547022332 00000000000000{ int Cx, j; DATA32 *pix, *dptr, *pbuf, **yp; int r, g, b, a, rr, gg, bb, aa; int *xp, xap, yap, pos; //int dyy, dxx; int w = dst_clip_w; dptr = dst_ptr; pos = (src_region_y * src_w) + src_region_x; //dyy = dst_clip_y - dst_region_y; //dxx = dst_clip_x - dst_region_x; xp = xpoints;// + dxx; yp = ypoints;// + dyy; xapp = xapoints;// + dxx; yapp = yapoints;// + dyy; pbuf = buf; if (src->cache_entry.flags.alpha) { while (dst_clip_h--) { while (dst_clip_w--) { Cx = *xapp >> 16; xap = *xapp & 0xffff; pix = *yp + *xp + pos; a = (A_VAL(pix) * xap) >> 10; r = (R_VAL(pix) * xap) >> 10; g = (G_VAL(pix) * xap) >> 10; b = (B_VAL(pix) * xap) >> 10; for (j = (1 << 14) - xap; j > Cx; j -= Cx) { pix++; a += (A_VAL(pix) * Cx) >> 10; r += (R_VAL(pix) * Cx) >> 10; g += (G_VAL(pix) * Cx) >> 10; b += (B_VAL(pix) * Cx) >> 10; } if (j > 0) { pix++; a += (A_VAL(pix) * j) >> 10; r += (R_VAL(pix) * j) >> 10; g += (G_VAL(pix) * j) >> 10; b += (B_VAL(pix) * j) >> 10; } if ((yap = *yapp) > 0) { pix = *yp + *xp + src_w + pos; aa = (A_VAL(pix) * xap) >> 10; rr = (R_VAL(pix) * xap) >> 10; gg = (G_VAL(pix) * xap) >> 10; bb = (B_VAL(pix) * xap) >> 10; for (j = (1 << 14) - xap; j > Cx; j -= Cx) { pix++; aa += (A_VAL(pix) * Cx) >> 10; rr += (R_VAL(pix) * Cx) >> 10; gg += (G_VAL(pix) * Cx) >> 10; bb += (B_VAL(pix) * Cx) >> 10; } if (j > 0) { pix++; aa += (A_VAL(pix) * j) >> 10; rr += (R_VAL(pix) * j) >> 10; gg += (G_VAL(pix) * j) >> 10; bb += (B_VAL(pix) * j) >> 10; } a += ((aa - a) * yap) >> 8; r += ((rr - r) * yap) >> 8; g += ((gg - g) * yap) >> 8; b += ((bb - b) * yap) >> 8; } *pbuf++ = ARGB_JOIN(((a + (1 << 3)) >> 4), ((r + (1 << 3)) >> 4), ((g + (1 << 3)) >> 4), ((b + (1 << 3)) >> 4)); xp++; xapp++; } func(buf, NULL, dc->mul.col, dptr, w); pbuf = buf; dptr += dst_w; dst_clip_w = w; yp++; yapp++; xp = xpoints;// + dxx; xapp = xapoints;// + dxx; } } else { #ifdef DIRECT_SCALE if ((!src->cache_entry.flags.alpha) && (!dst->cache_entry.flags.alpha) && (!dc->mul.use)) { while (dst_clip_h--) { pbuf = dptr; while (dst_clip_w--) { Cx = *xapp >> 16; xap = *xapp & 0xffff; pix = *yp + *xp + pos; r = (R_VAL(pix) * xap) >> 10; g = (G_VAL(pix) * xap) >> 10; b = (B_VAL(pix) * xap) >> 10; for (j = (1 << 14) - xap; j > Cx; j -= Cx) { pix++; r += (R_VAL(pix) * Cx) >> 10; g += (G_VAL(pix) * Cx) >> 10; b += (B_VAL(pix) * Cx) >> 10; } if (j > 0) { pix++; r += (R_VAL(pix) * j) >> 10; g += (G_VAL(pix) * j) >> 10; b += (B_VAL(pix) * j) >> 10; } if ((yap = *yapp) > 0) { pix = *yp + *xp + src_w + pos; rr = (R_VAL(pix) * xap) >> 10; gg = (G_VAL(pix) * xap) >> 10; bb = (B_VAL(pix) * xap) >> 10; for (j = (1 << 14) - xap; j > Cx; j -= Cx) { pix++; rr += (R_VAL(pix) * Cx) >> 10; gg += (G_VAL(pix) * Cx) >> 10; bb += (B_VAL(pix) * Cx) >> 10; } if (j > 0) { pix++; rr += (R_VAL(pix) * j) >> 10; gg += (G_VAL(pix) * j) >> 10; bb += (B_VAL(pix) * j) >> 10; } r += ((rr - r) * yap) >> 8; g += ((gg - g) * yap) >> 8; b += ((bb - b) * yap) >> 8; } *pbuf++ = ARGB_JOIN(0xff, ((r + (1 << 3)) >> 4), ((g + (1 << 3)) >> 4), ((b + (1 << 3)) >> 4)); xp++; xapp++; } dptr += dst_w; dst_clip_w = w; yp++; yapp++; xp = xpoints;// + dxx; xapp = xapoints;// + dxx; } } else #endif { while (dst_clip_h--) { while (dst_clip_w--) { Cx = *xapp >> 16; xap = *xapp & 0xffff; pix = *yp + *xp + pos; r = (R_VAL(pix) * xap) >> 10; g = (G_VAL(pix) * xap) >> 10; b = (B_VAL(pix) * xap) >> 10; for (j = (1 << 14) - xap; j > Cx; j -= Cx) { pix++; r += (R_VAL(pix) * Cx) >> 10; g += (G_VAL(pix) * Cx) >> 10; b += (B_VAL(pix) * Cx) >> 10; } if (j > 0) { pix++; r += (R_VAL(pix) * j) >> 10; g += (G_VAL(pix) * j) >> 10; b += (B_VAL(pix) * j) >> 10; } if ((yap = *yapp) > 0) { pix = *yp + *xp + src_w + pos; rr = (R_VAL(pix) * xap) >> 10; gg = (G_VAL(pix) * xap) >> 10; bb = (B_VAL(pix) * xap) >> 10; for (j = (1 << 14) - xap; j > Cx; j -= Cx) { pix++; rr += (R_VAL(pix) * Cx) >> 10; gg += (G_VAL(pix) * Cx) >> 10; bb += (B_VAL(pix) * Cx) >> 10; } if (j > 0) { pix++; rr += (R_VAL(pix) * j) >> 10; gg += (G_VAL(pix) * j) >> 10; bb += (B_VAL(pix) * j) >> 10; } r += ((rr - r) * yap) >> 8; g += ((gg - g) * yap) >> 8; b += ((bb - b) * yap) >> 8; } *pbuf++ = ARGB_JOIN(0xff, ((r + (1 << 3)) >> 4), ((g + (1 << 3)) >> 4), ((b + (1 << 3)) >> 4)); xp++; xapp++; } func(buf, NULL, dc->mul.col, dptr, w); pbuf = buf; dptr += dst_w; dst_clip_w = w; yp++; yapp++; xp = xpoints;// + dxx; xapp = xapoints;// + dxx; } } } } evas-1.7.9/src/lib/engines/common/evas_scale_smooth_scaler.c0000664000175000017500000001312312175475547021102 00000000000000void SCALE_FUNC(RGBA_Image *src, RGBA_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) { DATA32 *dst_ptr; int dst_clip_x, dst_clip_y, dst_clip_w, dst_clip_h; int src_w, src_h, dst_w, dst_h; if (!(RECTS_INTERSECT(dst_region_x, dst_region_y, dst_region_w, dst_region_h, 0, 0, dst->cache_entry.w, dst->cache_entry.h))) return; if (!(RECTS_INTERSECT(src_region_x, src_region_y, src_region_w, src_region_h, 0, 0, src->cache_entry.w, src->cache_entry.h))) return; src_w = src->cache_entry.w; src_h = src->cache_entry.h; dst_w = dst->cache_entry.w; dst_h = dst->cache_entry.h; if (dc->clip.use) { dst_clip_x = dc->clip.x; dst_clip_y = dc->clip.y; dst_clip_w = dc->clip.w; dst_clip_h = dc->clip.h; if (dst_clip_x < 0) { dst_clip_w += dst_clip_x; dst_clip_x = 0; } if (dst_clip_y < 0) { dst_clip_h += dst_clip_y; dst_clip_y = 0; } if ((dst_clip_w <= 0) || (dst_clip_h <= 0)) return; if ((dst_clip_x + dst_clip_w) > dst_w) dst_clip_w = dst_w - dst_clip_x; if ((dst_clip_y + dst_clip_h) > dst_h) dst_clip_h = dst_h - dst_clip_y; } else { dst_clip_x = 0; dst_clip_y = 0; dst_clip_w = dst_w; dst_clip_h = dst_h; } if (dst_clip_x < dst_region_x) { dst_clip_w += dst_clip_x - dst_region_x; dst_clip_x = dst_region_x; } if ((dst_clip_x + dst_clip_w) > (dst_region_x + dst_region_w)) dst_clip_w = dst_region_x + dst_region_w - dst_clip_x; if (dst_clip_y < dst_region_y) { dst_clip_h += dst_clip_y - dst_region_y; dst_clip_y = dst_region_y; } if ((dst_clip_y + dst_clip_h) > (dst_region_y + dst_region_h)) dst_clip_h = dst_region_y + dst_region_h - dst_clip_y; if ((src_region_w <= 0) || (src_region_h <= 0) || (dst_region_w <= 0) || (dst_region_h <= 0) || (dst_clip_w <= 0) || (dst_clip_h <= 0)) return; /* sanitise x */ if (src_region_x < 0) { dst_region_x -= (src_region_x * dst_region_w) / src_region_w; dst_region_w += (src_region_x * dst_region_w) / src_region_w; src_region_w += src_region_x; src_region_x = 0; } if (src_region_x >= src_w) return; if ((src_region_x + src_region_w) > src_w) { dst_region_w = (dst_region_w * (src_w - src_region_x)) / (src_region_w); src_region_w = src_w - src_region_x; } if (dst_region_w <= 0) return; if (src_region_w <= 0) return; if (dst_clip_x < 0) { dst_clip_w += dst_clip_x; dst_clip_x = 0; } if (dst_clip_w <= 0) return; if (dst_clip_x >= dst_w) return; if (dst_clip_x < dst_region_x) { dst_clip_w += (dst_clip_x - dst_region_x); dst_clip_x = dst_region_x; } if ((dst_clip_x + dst_clip_w) > dst_w) { dst_clip_w = dst_w - dst_clip_x; } if (dst_clip_w <= 0) return; /* sanitise y */ if (src_region_y < 0) { dst_region_y -= (src_region_y * dst_region_h) / src_region_h; dst_region_h += (src_region_y * dst_region_h) / src_region_h; src_region_h += src_region_y; src_region_y = 0; } if (src_region_y >= src_h) return; if ((src_region_y + src_region_h) > src_h) { dst_region_h = (dst_region_h * (src_h - src_region_y)) / (src_region_h); src_region_h = src_h - src_region_y; } if (dst_region_h <= 0) return; if (src_region_h <= 0) return; if (dst_clip_y < 0) { dst_clip_h += dst_clip_y; dst_clip_y = 0; } if (dst_clip_h <= 0) return; if (dst_clip_y >= dst_h) return; if (dst_clip_y < dst_region_y) { dst_clip_h += (dst_clip_y - dst_region_y); dst_clip_y = dst_region_y; } if ((dst_clip_y + dst_clip_h) > dst_h) { dst_clip_h = dst_h - dst_clip_y; } if (dst_clip_h <= 0) return; /* some maximum region sizes to avoid insane calc point tables */ if (dst_clip_w > 65536) return; if (dst_clip_h > 65536) return; if (dst_region_w > (65536 * 1024)) return; if (dst_region_h > (65536 * 1024)) return; /* figure out dst jump * NB: Unused currently, so commented out */ // dst_jump = dst_w - dst_clip_w; /* figure out dest start ptr */ dst_ptr = dst->image.data + dst_clip_x + (dst_clip_y * dst_w); /* FIXME: * * things to do later for speedups: * * break upscale into 3 cases (as listed below - up:up, 1:up, up:1) * * break downscale into more cases (as listed below) * * roll func (blend/copy/cultiply/cmod) code into inner loop of scaler. * (578 fps vs 550 in mmx upscale in evas demo - this means probably * a good 10-15% speedup over the func call, but means massively larger * code) * * anything involving downscaling has no mmx equivalent code and maybe the * C could do with a little work. * * --------------------------------------------------------------------------- * * (1 = no scaling (1:1 ratio), + = scale up, - = scale down) * (* == fully optimised mmx, # = fully optimised C) * * h:v mmx C * * 1:1 * # * * +:+ * # * 1:+ * # * +:1 * # * * 1:- * -:1 * +:- * -:+ * -:- * */ /* if 1:1 scale */ if ((dst_region_w == src_region_w) && (dst_region_h == src_region_h)) { #include "evas_scale_smooth_scaler_noscale.c" } else { /* scaling up only - dont need anything except original */ // if ((!dc->anti_alias) || ((dst_region_w >= src_region_w) && (dst_region_h >= src_region_h))) if (((dst_region_w >= src_region_w) && (dst_region_h >= src_region_h))) { #include "evas_scale_smooth_scaler_up.c" return; } else /* scaling down... funkiness */ { #include "evas_scale_smooth_scaler_down.c" return; } } } evas-1.7.9/src/lib/engines/common/evas_line_main.c0000664000175000017500000007601112175475547017031 00000000000000#include "evas_common.h" #include "evas_blend_private.h" static void _evas_draw_point(RGBA_Image *dst, RGBA_Draw_Context *dc, int x, int y); static void _evas_draw_simple_line(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, int x1, int y1); static void _evas_draw_line(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, int x1, int y1); static void _evas_draw_line_aa(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, int x1, int y1); #define IN_RANGE(x, y, w, h) \ ( x > 0 && y > 0 &&((unsigned)(x) < (unsigned)(w)) && ((unsigned)(y) < (unsigned)(h)) ) #define IN_RECT(x, y, rx, ry, rw, rh) \ ( ((unsigned)((x) - (rx)) < (unsigned)(rw)) && \ ((unsigned)((y) - (ry)) < (unsigned)(rh)) ) #define EXCHANGE_POINTS(x0, y0, x1, y1) \ { \ int _tmp = y0; \ \ y0 = y1; \ y1 = _tmp; \ \ _tmp = x0; \ x0 = x1; \ x1 = _tmp; \ } EAPI void evas_common_line_init(void) { } EAPI void evas_common_line_draw(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, int x1, int y1) { int x, y, w, h; int clx, cly, clw, clh; int cuse, cx, cy, cw, ch; /* No cutout ? FIXME ? */ if ((x0 == x1) && (y0 == y1)) { _evas_draw_point(dst, dc, x0, y0); return; } clx = cly = 0; clw = dst->cache_entry.w; clh = dst->cache_entry.h; /* save out clip info */ cuse = dc->clip.use; cx = dc->clip.x; cy = dc->clip.y; cw = dc->clip.w; ch = dc->clip.h; if (cuse) { RECTS_CLIP_TO_RECT(clx, cly, clw, clh, cx, cy, cw, ch); if ((clw < 1) || (clh < 1)) return; } x = MIN(x0, x1); y = MIN(y0, y1); w = MAX(x0, x1) - x + 1; h = MAX(y0, y1) - y + 1; RECTS_CLIP_TO_RECT(clx, cly, clw, clh, x, y, w, h); if ((clw < 1) || (clh < 1)) return; dc->clip.use = 1; dc->clip.x = clx; dc->clip.y = cly; dc->clip.w = clw; dc->clip.h = clh; if (dc->anti_alias) _evas_draw_line_aa(dst, dc, x0, y0, x1, y1); else _evas_draw_line(dst, dc, x0, y0, x1, y1); /* restore clip info */ dc->clip.use = cuse; dc->clip.x = cx; dc->clip.y = cy; dc->clip.w = cw; dc->clip.h = ch; } static void _evas_draw_point(RGBA_Image *dst, RGBA_Draw_Context *dc, int x, int y) { RGBA_Gfx_Pt_Func pfunc; if (!IN_RANGE(x, y, dst->cache_entry.w, dst->cache_entry.h)) return; if ((dc->clip.use) && (!IN_RECT(x, y, dc->clip.x, dc->clip.y, dc->clip.w, dc->clip.h))) return; #ifdef HAVE_PIXMAN # ifdef PIXMAN_LINE pixman_op_t op = PIXMAN_OP_SRC; if (dc->render_op == _EVAS_RENDER_BLEND) op = PIXMAN_OP_OVER; if ((dst->pixman.im) && (dc->col.pixman_color_image)) pixman_image_composite(op, dc->col.pixman_color_image, NULL, dst->pixman.im, x, y, 0, 0, x, y, 1, 1); else # endif #endif { pfunc = evas_common_gfx_func_composite_color_pt_get(dc->col.col, dst, dc->render_op); if (pfunc) pfunc(0, 255, dc->col.col, dst->image.data + (dst->cache_entry.w * y) + x); } } /* these functions use the dc->clip data as bounding data. they assume that such data has already been cut back to lie in the dst image rect and the object's (line) bounding rect. */ static void _evas_draw_simple_line(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, int x1, int y1) { int dx, dy, len, lx, ty, rx, by; int clx, cly, clw, clh; int dstw; DATA32 *p, color; RGBA_Gfx_Pt_Func pfunc; RGBA_Gfx_Func sfunc; #ifdef HAVE_PIXMAN # ifdef PIXMAN_LINE pixman_op_t op = PIXMAN_OP_SRC; // _EVAS_RENDER_COPY if (dc->render_op == _EVAS_RENDER_BLEND) op = PIXMAN_OP_OVER; # endif #endif dstw = dst->cache_entry.w; color = dc->col.col; if (y0 > y1) EXCHANGE_POINTS(x0, y0, x1, y1) if (x0 > x1) EXCHANGE_POINTS(x0, y0, x1, y1) dx = x1 - x0; dy = y1 - y0; clx = dc->clip.x; cly = dc->clip.y; clw = dc->clip.w; clh = dc->clip.h; lx = clx; rx = clx + clw - 1; ty = cly; by = cly + clh - 1; if (dy == 0) { if ((y0 >= ty) && (y0 <= by)) { if (dx < 0) { int tmp = x1; x1 = x0; x0 = tmp; } if (x0 < lx) x0 = lx; if (x1 > rx) x1 = rx; len = x1 - x0 + 1; p = dst->image.data + (dstw * y0) + x0; #ifdef HAVE_PIXMAN # ifdef PIXMAN_LINE if ((dst->pixman.im) && (dc->col.pixman_color_image) && (!dc->mask.mask)) pixman_image_composite(op, dc->col.pixman_color_image, NULL, dst->pixman.im, x0, y0, 0, 0, x0, y0, len, 1); else if ((dst->pixman.im) && (dc->col.pixman_color_image) && (dc->mask.mask)) pixman_image_composite(op, dc->col.pixman_color_image, dc->mask.mask->pixman.im, dst->pixman.im, x0, y0, 0, 0, x0, y0, len, 1); else # endif #endif { sfunc = evas_common_gfx_func_composite_color_span_get(color, dst, len, dc->render_op); if (sfunc) sfunc(NULL, NULL, color, p, len); } } return; } pfunc = evas_common_gfx_func_composite_color_pt_get(color, dst, dc->render_op); if (!pfunc) return; if (dx == 0) { if ((x0 >= lx) && (x0 <= rx)) { if (y0 < ty) y0 = ty; if (y1 > by) y1 = by; len = y1 - y0 + 1; p = dst->image.data + (dstw * y0) + x0; #ifdef HAVE_PIXMAN # ifdef PIXMAN_LINE if ((dst->pixman.im) && (dc->col.pixman_color_image) && (!dc->mask.mask)) pixman_image_composite(op, dc->col.pixman_color_image, NULL, dst->pixman.im, x0, y0, 0, 0, x0, y0, 1, len); else if ((dst->pixman.im) && (dc->col.pixman_color_image) && (dc->mask.mask)) pixman_image_composite(op, dc->col.pixman_color_image, dc->mask.mask->pixman.im, dst->pixman.im, x0, y0, 0, 0, x0, y0, 1, len); else # endif #endif { while (len--) { pfunc(0, 255, color, p); p += dstw; } } } return; } if ((dy == dx) || (dy == -dx)) { int p0_in, p1_in; p0_in = (IN_RECT(x0, y0, clx, cly, clw, clh) ? 1 : 0); p1_in = (IN_RECT(x1, y1, clx, cly, clw, clh) ? 1 : 0); if (dy > 0) { if (!p0_in) { x0 = x0 + (ty - y0); y0 = ty; if (x0 > rx) return; if (x0 < lx) { y0 = y0 + (lx - x0); x0 = lx; if ((y0 < ty) || (y0 > by)) return; } } if (!p1_in) { x1 = x0 + (by - y0); y1 = by; if (x1 < lx) return; if (x1 > rx) { y1 = y0 + (rx - x0); x1 = rx; if ((y1 < ty) || (y1 > by)) return; } } } else { if (!p0_in) { x0 = x0 - (by - y0); y0 = by; if (x0 > rx) return; if (x0 < lx) { y0 = y0 - (lx - x0); x0 = lx; if ((y0 < ty) || (y0 > by)) return; } } if (!p1_in) { x1 = x0 - (ty - y0); y1 = ty; if (x1 < lx) return; if (x1 > rx) { y1 = y0 - (rx - x0); x1 = rx; if ((y1 < ty) || (y1 > by)) return; } } } if (y1 > y0) { p = dst->image.data + (dstw * y0) + x0; len = y1 - y0 + 1; if (dx > 0) dstw++; else dstw--; } else { len = y0 - y1 + 1; p = dst->image.data + (dstw * y1) + x1; if (dx > 0) dstw--; else dstw++; } #ifdef HAVE_PIXMAN # ifdef PIXMAN_LINE int pixman_x_position = x0; int pixman_y_position = y0; int x_unit = dstw - dst->cache_entry.w; # endif #endif while (len--) { #ifdef HAVE_PIXMAN # ifdef PIXMAN_LINE if ((dst->pixman.im) && (dc->col.pixman_color_image) && (!dc->mask.mask)) pixman_image_composite(op, dc->col.pixman_color_image, NULL, dst->pixman.im, pixman_x_position, pixman_y_position, 0, 0, pixman_x_position, pixman_y_position, 1, 1); else if ((dst->pixman.im) && (dc->col.pixman_color_image) && (dc->mask.mask)) pixman_image_composite(op, dc->col.pixman_color_image, dc->mask.mask->pixman.im, dst->pixman.im, pixman_x_position, pixman_y_position, 0, 0, pixman_x_position, pixman_y_position, 1, 1); else # endif #endif pfunc(0, 255, color, p); #ifdef HAVE_PIXMAN # ifdef PIXMAN_LINE pixman_x_position += x_unit; pixman_y_position += 1; # endif #endif p += dstw; } } } #define SETUP_LINE_SHALLOW \ if (x0 > x1) \ { \ EXCHANGE_POINTS(x0, y0, x1, y1); \ dx = -dx; \ dy = -dy; \ } \ \ px = x0; \ py = y0; \ \ p0_in = (IN_RANGE(x0 , y0 , clw, clh) ? 1 : 0); \ p1_in = (IN_RANGE(x1 , y1 , clw, clh) ? 1 : 0); \ \ dely = 1; \ dh = dstw; \ if (dy < 0) \ { \ dely = -1; \ dh = -dstw; \ } \ \ dyy = ((dy) << 16) / (dx); \ \ if (!p0_in) \ { \ dxx = ((dx) << 16) / (dy); \ if (px < 0) \ { \ x = -px; px = 0; \ yy = x * dyy; \ y = yy >> 16; \ if (!a_a) \ y += (yy - (y << 16)) >> 15; \ py += y; \ if ((dely > 0) && (py >= clh)) \ return; \ else if ((dely < 0) && (py < -1)) \ return; \ } \ \ y = 0; \ if ((dely > 0) && (py < 0)) \ y = (-1 - py); \ else if ((dely < 0) && (py >= clh)) \ y = (clh - 1 - py); \ \ xx = y * dxx; \ x = xx >> 16; \ if (!a_a) \ x += (xx - (x << 16)) >> 15; \ px += x; \ if (px >= clw) return; \ \ yy = x * dyy; \ y = yy >> 16; \ if (!a_a) \ y += (yy - (y << 16)) >> 15; \ py += y; \ if ((dely > 0) && (py >= clh)) \ return; \ else if ((dely < 0) && (py < -1)) \ return; \ } \ \ p = data + (dstw * py) + px; \ \ x = px - x0; \ yy = x * dyy; \ prev_y = (yy >> 16); \ \ rx = MIN(x1 + 1, clw); \ by = clh - 1; #define SETUP_LINE_STEEP \ if (y0 > y1) \ { \ EXCHANGE_POINTS(x0, y0, x1, y1); \ dx = -dx; \ dy = -dy; \ } \ \ px = x0; \ py = y0; \ \ p0_in = (IN_RANGE(x0 , y0 , clw, clh) ? 1 : 0); \ p1_in = (IN_RANGE(x1 , y1 , clw, clh) ? 1 : 0); \ \ delx = 1; \ if (dx < 0) \ delx = -1; \ \ dxx = ((dx) << 16) / (dy); \ \ if (!p0_in) \ { \ dyy = ((dy) << 16) / (dx); \ \ if (py < 0) \ { \ y = -py; py = 0; \ xx = y * dxx; \ x = xx >> 16; \ if (!a_a) \ x += (xx - (x << 16)) >> 15; \ px += x; \ if ((delx > 0) && (px >= clw)) \ return; \ else if ((delx < 0) && (px < -1)) \ return; \ } \ \ x = 0; \ if ((delx > 0) && (px < -1)) \ x = (-1 - px); \ else if ((delx < 0) && (px >= clw)) \ x = (clw - 1 - px); \ \ yy = x * dyy; \ y = yy >> 16; \ if (!a_a) \ y += (yy - (y << 16)) >> 15; \ py += y; \ if (py >= clh) return; \ \ xx = y * dxx; \ x = xx >> 16; \ if (!a_a) \ x += (xx - (x << 16)) >> 15; \ px += x; \ if ((delx > 0) && (px >= clw)) \ return; \ else if ((delx < 0) && (px < -1)) \ return; \ } \ \ p = data + (dstw * py) + px; \ \ y = py - y0; \ xx = y * dxx; \ prev_x = (xx >> 16); \ \ by = MIN(y1 + 1, clh); \ rx = clw - 1; static void _evas_draw_line(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, int x1, int y1) { int px, py, x, y, prev_x, prev_y; int dx, dy, rx, by, p0_in, p1_in, dh, a_a = 0; int delx, dely, xx, yy, dxx, dyy; int clx, cly, clw, clh; int dstw; DATA32 *p, *data, color; RGBA_Gfx_Pt_Func pfunc; dx = x1 - x0; dy = y1 - y0; #ifdef HAVE_PIXMAN # ifdef PIXMAN_LINE int pix_x; int pix_y; int pix_x_unit; int pix_y_unit; pixman_op_t op = PIXMAN_OP_SRC; // _EVAS_RENDER_COPY if (dc->render_op == _EVAS_RENDER_BLEND) op = PIXMAN_OP_OVER; pix_x = x0; pix_y = y0; if (dx < 0) pix_x_unit = -1; else pix_x_unit = 1; if (dy < 0) pix_y_unit = -1; else pix_y_unit = 1; # endif #endif if ( (dx == 0) || (dy == 0) || (dx == dy) || (dx == -dy) ) { _evas_draw_simple_line(dst, dc, x0, y0, x1, y1); return; } color = dc->col.col; pfunc = evas_common_gfx_func_composite_color_pt_get(color, dst, dc->render_op); if (!pfunc) return; clx = dc->clip.x; cly = dc->clip.y; clw = dc->clip.w; clh = dc->clip.h; data = dst->image.data; dstw = dst->cache_entry.w; data += (dstw * cly) + clx; x0 -= clx; y0 -= cly; x1 -= clx; y1 -= cly; /* shallow: x-parametric */ if ((dy < dx) || (dy < -dx)) { SETUP_LINE_SHALLOW; while (px < rx) { y = (yy >> 16); y += ((yy - (y << 16)) >> 15); if (prev_y != y) { prev_y = y; p += dh; py += dely; #ifdef HAVE_PIXMAN # ifdef PIXMAN_LINE pix_y += pix_y_unit; # endif #endif } if (!p1_in) { if ((py < 0) && (dely < 0)) return; if ((py > by) && (dely > 0)) return; } if (!p0_in) { if (py < 0) goto next_x; } if (IN_RANGE(px, py, clw, clh)) { #ifdef HAVE_PIXMAN # ifdef PIXMAN_LINE if ((dst->pixman.im) && (dc->col.pixman_color_image) && (!dc->mask.mask)) pixman_image_composite(op, dc->col.pixman_color_image, NULL, dst->pixman.im, pix_x, pix_y, 0, 0, pix_x, pix_y, 1, 1); else if ((dst->pixman.im) && (dc->col.pixman_color_image) && (dc->mask.mask)) pixman_image_composite(op, dc->col.pixman_color_image, dc->mask.mask->pixman.im, dst->pixman.im, pix_x, pix_y, 0, 0, pix_x, pix_y, 1, 1); else # endif #endif pfunc(0, 255, color, p); } next_x: yy += dyy; px++; p++; #ifdef HAVE_PIXMAN # ifdef PIXMAN_LINE pix_x += pix_x_unit; # endif #endif } return; } /* steep: y-parametric */ SETUP_LINE_STEEP; while (py < by) { x = (xx >> 16); x += ((xx - (x << 16)) >> 15); if (prev_x != x) { prev_x = x; px += delx; p += delx; #ifdef HAVE_PIXMAN # ifdef PIXMAN_LINE pix_x += pix_x_unit; # endif #endif } if (!p1_in) { if ((px < 0) && (delx < 0)) return; if ((px > rx) && (delx > 0)) return; } if (!p0_in) { if (px < 0) goto next_y; } if (IN_RANGE(px, py, clw, clh)) { #ifdef HAVE_PIXMAN # ifdef PIXMAN_LINE if ((dst->pixman.im) && (dc->col.pixman_color_image) && (!dc->mask.mask)) pixman_image_composite(op, dc->col.pixman_color_image, NULL, dst->pixman.im, pix_x, pix_y, 0, 0, pix_x, pix_y, 1, 1); else if ((dst->pixman.im) && (dc->col.pixman_color_image) && (dc->mask.mask)) pixman_image_composite(op, dc->col.pixman_color_image, dc->mask.mask->pixman.im, dst->pixman.im, pix_x, pix_y, 0, 0, pix_x, pix_y, 1, 1); else # endif #endif pfunc(0, 255, color, p); } next_y: xx += dxx; py++; p += dstw; #ifdef HAVE_PIXMAN # ifdef PIXMAN_LINE pix_y += pix_y_unit; # endif #endif } } static void _evas_draw_line_aa(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, int x1, int y1) { int px, py, x, y, prev_x, prev_y; int dx, dy, rx, by, p0_in, p1_in, dh, a_a = 1; int delx, dely, xx, yy, dxx, dyy; int clx, cly, clw, clh; int dstw; DATA32 *p, *data, color; RGBA_Gfx_Pt_Func pfunc; dx = x1 - x0; dy = y1 - y0; #ifdef HAVE_PIXMAN # ifdef PIXMAN_LINE int pix_x; int pix_y; int pix_x_unit; int pix_y_unit; pixman_image_t *aa_mask_image; int alpha_data_buffer; pixman_op_t op = PIXMAN_OP_SRC; // _EVAS_RENDER_COPY if (dc->render_op == _EVAS_RENDER_BLEND) op = PIXMAN_OP_OVER; pix_x = x0; pix_y = y0; if (dx < 0) pix_x_unit = -1; else pix_x_unit = 1; if (dy < 0) pix_y_unit = -1; else pix_y_unit = 1; # endif #endif if (y0 > y1) EXCHANGE_POINTS(x0, y0, x1, y1); dx = x1 - x0; dy = y1 - y0; if ((dx == 0) || (dy == 0) || (dx == dy) || (dx == -dy)) { _evas_draw_simple_line(dst, dc, x0, y0, x1, y1); return; } color = dc->col.col; pfunc = evas_common_gfx_func_composite_mask_color_pt_get(color, dst, dc->render_op); if (!pfunc) return; clx = dc->clip.x; cly = dc->clip.y; clw = dc->clip.w; clh = dc->clip.h; data = evas_cache_image_pixels(&dst->cache_entry); dstw = dst->cache_entry.w; data += (dstw * cly) + clx; x0 -= clx; y0 -= cly; x1 -= clx; y1 -= cly; /* shallow: x-parametric */ if ((dy < dx) || (dy < -dx)) { SETUP_LINE_SHALLOW; while (px < rx) { DATA8 aa; y = (yy >> 16); if (prev_y != y) { prev_y = y; p += dh; py += dely; #ifdef HAVE_PIXMAN # ifdef PIXMAN_LINE pix_y += pix_y_unit; # endif #endif } if (!p1_in) { if ((py < 0) && (dely < 0)) return; if ((py > by) && (dely > 0)) return; } if (!p0_in) { if (py < 0) goto next_x; } if (px < clw) { aa = ((yy - (y << 16)) >> 8); if ((py) < clh) { #ifdef HAVE_PIXMAN # ifdef PIXMAN_LINE alpha_data_buffer = 255 - aa; aa_mask_image = pixman_image_create_bits(PIXMAN_a8, 1, 1, (uint32_t *)&alpha_data_buffer, 4); if ((dst->pixman.im) && (dc->col.pixman_color_image ) && (!dc->mask.mask)) pixman_image_composite(PIXMAN_OP_OVER, dc->col.pixman_color_image, aa_mask_image, dst->pixman.im, pix_x, pix_y, 0, 0, pix_x, pix_y, 1, 1); else if ((dst->pixman.im) && (dc->col.pixman_color_image) && (dc->mask.mask) ) pixman_image_composite(op, dc->col.pixman_color_image, dc->mask.mask->pixman.im, dst->pixman.im, pix_x, pix_y, 0, 0, pix_x, pix_y, 1, 1); else # endif #endif pfunc(0, 255 - aa, color, p); #ifdef HAVE_PIXMAN # ifdef PIXMAN_LINE pixman_image_unref(aa_mask_image); # endif #endif } if ((py + 1) < clh) { #ifdef HAVE_PIXMAN # ifdef PIXMAN_LINE alpha_data_buffer = aa; aa_mask_image = pixman_image_create_bits(PIXMAN_a8, 1, 1, (uint32_t *)&alpha_data_buffer, 4); if ((dst->pixman.im) && (dc->col.pixman_color_image) && (!dc->mask.mask)) pixman_image_composite(PIXMAN_OP_OVER, dc->col.pixman_color_image, aa_mask_image, dst->pixman.im, pix_x, pix_y + 1, 0, 0, pix_x, pix_y + 1, 1, 1); else if ((dst->pixman.im) && (dc->col.pixman_color_image) && (dc->mask.mask)) pixman_image_composite(op, dc->col.pixman_color_image, dc->mask.mask->pixman.im, dst->pixman.im, pix_x, pix_y + 1, 0, 0, pix_x, pix_y + 1, 1, 1); else # endif #endif pfunc(0, aa, color, p + dstw); #ifdef HAVE_PIXMAN # ifdef PIXMAN_LINE pixman_image_unref(aa_mask_image); # endif #endif } } next_x: yy += dyy; px++; p++; #ifdef HAVE_PIXMAN # ifdef PIXMAN_LINE pix_x += pix_x_unit; # endif #endif } return; } /* steep: y-parametric */ SETUP_LINE_STEEP; while (py < by) { DATA8 aa; x = (xx >> 16); if (prev_x != x) { prev_x = x; px += delx; p += delx; #ifdef HAVE_PIXMAN # ifdef PIXMAN_LINE pix_x += pix_x_unit; # endif #endif } if (!p1_in) { if ((px < 0) && (delx < 0)) return; if ((px > rx) && (delx > 0)) return; } if (!p0_in) { if (px < 0) goto next_y; } if (py < clh) { aa = ((xx - (x << 16)) >> 8); if ((px) < clw) { #ifdef HAVE_PIXMAN # ifdef PIXMAN_LINE alpha_data_buffer = 255 - aa; aa_mask_image = pixman_image_create_bits(PIXMAN_a8, 1, 1, (uint32_t *)&alpha_data_buffer, 4); if ((dst->pixman.im) && (dc->col.pixman_color_image) && (!dc->mask.mask)) pixman_image_composite(PIXMAN_OP_OVER, dc->col.pixman_color_image, aa_mask_image, dst->pixman.im, pix_x, pix_y, 0, 0, pix_x, pix_y, 1, 1); else if ((dst->pixman.im) && (dc->col.pixman_color_image) && (dc->mask.mask)) pixman_image_composite(op, dc->col.pixman_color_image, dc->mask.mask->pixman.im, dst->pixman.im, pix_x, pix_y, 0, 0, pix_x, pix_y, 1, 1); else # endif #endif pfunc(0, 255 - aa, color, p); #ifdef HAVE_PIXMAN # ifdef PIXMAN_LINE pixman_image_unref(aa_mask_image); # endif #endif } if ((px + 1) < clw) { #ifdef HAVE_PIXMAN # ifdef PIXMAN_LINE alpha_data_buffer = aa; aa_mask_image = pixman_image_create_bits(PIXMAN_a8, 1, 1, (uint32_t *)&alpha_data_buffer, 4); if ((dst->pixman.im) && (dc->col.pixman_color_image) && (!dc->mask.mask)) pixman_image_composite(PIXMAN_OP_OVER, dc->col.pixman_color_image, aa_mask_image, dst->pixman.im, pix_x + 1, pix_y, 0, 0, pix_x + 1, pix_y, 1, 1); else if ((dst->pixman.im) && (dc->col.pixman_color_image) && (dc->mask.mask)) pixman_image_composite(op, dc->col.pixman_color_image, dc->mask.mask->pixman.im, dst->pixman.im, pix_x + 1, pix_y, 0, 0, pix_x + 1, pix_y, 1, 1); else # endif #endif pfunc(0, aa, color, p + 1); #ifdef HAVE_PIXMAN # ifdef PIXMAN_LINE pixman_image_unref(aa_mask_image); # endif #endif } } next_y: xx += dxx; py++; p += dstw; #ifdef HAVE_PIXMAN # ifdef PIXMAN_LINE pix_y += pix_y_unit; # endif #endif } } evas-1.7.9/src/lib/engines/common/evas_draw_main.c0000664000175000017500000004015312175475547017035 00000000000000#include "evas_common.h" #include "evas_convert_main.h" #include "evas_private.h" EAPI Cutout_Rects* evas_common_draw_context_cutouts_new(void) { Cutout_Rects *rects; rects = calloc(1, sizeof(Cutout_Rects)); return rects; } EAPI void evas_common_draw_context_cutouts_free(Cutout_Rects* rects) { if (!rects) return ; rects->active = 0; } EAPI void evas_common_draw_context_cutouts_del(Cutout_Rects* rects, int idx) { if ((idx >= 0) && (idx < rects->active)) { Cutout_Rect *rect; rect = rects->rects + idx; memmove(rect, rect + 1, sizeof(Cutout_Rect) * (rects->active - idx - 1)); rects->active--; } } void evas_common_init(void) { evas_common_cpu_init(); evas_common_blend_init(); evas_common_image_init(); evas_common_convert_init(); evas_common_scale_init(); evas_common_rectangle_init(); evas_common_polygon_init(); evas_common_line_init(); evas_common_font_init(); evas_common_draw_init(); evas_common_tilebuf_init(); } void evas_common_shutdown(void) { evas_font_dir_cache_free(); evas_common_image_cache_free(); } EAPI void evas_common_draw_init(void) { } EAPI RGBA_Draw_Context * evas_common_draw_context_new(void) { RGBA_Draw_Context *dc; dc = calloc(1, sizeof(RGBA_Draw_Context)); dc->sli.h = 1; return dc; } EAPI void evas_common_draw_context_free(RGBA_Draw_Context *dc) { if (!dc) return; #ifdef HAVE_PIXMAN if (dc->col.pixman_color_image) { pixman_image_unref(dc->col.pixman_color_image); dc->col.pixman_color_image = NULL; } #endif evas_common_draw_context_apply_clean_cutouts(&dc->cutout); free(dc); } EAPI void evas_common_draw_context_clear_cutouts(RGBA_Draw_Context *dc) { evas_common_draw_context_cutouts_free(&dc->cutout); } EAPI void evas_common_draw_context_font_ext_set(RGBA_Draw_Context *dc, void *data, void *(*gl_new) (void *data, RGBA_Font_Glyph *fg), void (*gl_free) (void *ext_dat), void (*gl_draw) (void *data, void *dest, void *context, RGBA_Font_Glyph *fg, int x, int y)) { dc->font_ext.data = data; dc->font_ext.func.gl_new = gl_new; dc->font_ext.func.gl_free = gl_free; dc->font_ext.func.gl_draw = gl_draw; } EAPI void evas_common_draw_context_clip_clip(RGBA_Draw_Context *dc, int x, int y, int w, int h) { if (dc->clip.use) { RECTS_CLIP_TO_RECT(dc->clip.x, dc->clip.y, dc->clip.w, dc->clip.h, x, y, w, h); } else evas_common_draw_context_set_clip(dc, x, y, w, h); } EAPI void evas_common_draw_context_set_clip(RGBA_Draw_Context *dc, int x, int y, int w, int h) { dc->clip.use = 1; dc->clip.x = x; dc->clip.y = y; dc->clip.w = w; dc->clip.h = h; } EAPI void evas_common_draw_context_unset_clip(RGBA_Draw_Context *dc) { dc->clip.use = 0; } EAPI void evas_common_draw_context_set_color(RGBA_Draw_Context *dc, int r, int g, int b, int a) { R_VAL(&(dc->col.col)) = (DATA8)r; G_VAL(&(dc->col.col)) = (DATA8)g; B_VAL(&(dc->col.col)) = (DATA8)b; A_VAL(&(dc->col.col)) = (DATA8)a; #ifdef HAVE_PIXMAN if (dc && dc->col.pixman_color_image) pixman_image_unref(dc->col.pixman_color_image); pixman_color_t pixman_color; pixman_color.alpha = (dc->col.col & 0xff000000) >> 16; pixman_color.red = (dc->col.col & 0x00ff0000) >> 8; pixman_color.green = (dc->col.col & 0x0000ff00); pixman_color.blue = (dc->col.col & 0x000000ff) << 8; dc->col.pixman_color_image = pixman_image_create_solid_fill(&pixman_color); #endif } EAPI void evas_common_draw_context_set_multiplier(RGBA_Draw_Context *dc, int r, int g, int b, int a) { dc->mul.use = 1; R_VAL(&(dc->mul.col)) = (DATA8)r; G_VAL(&(dc->mul.col)) = (DATA8)g; B_VAL(&(dc->mul.col)) = (DATA8)b; A_VAL(&(dc->mul.col)) = (DATA8)a; } EAPI void evas_common_draw_context_unset_multiplier(RGBA_Draw_Context *dc) { dc->mul.use = 0; } EAPI void evas_common_draw_context_set_mask(RGBA_Draw_Context *dc, RGBA_Image *mask, int x, int y, int w, int h) { dc->mask.mask = mask; dc->mask.x = x; dc->mask.y = y; dc->mask.w = w; dc->mask.h = h; #ifdef HAVE_PIXMAN if (mask->pixman.im) pixman_image_unref(mask->pixman.im); if (mask->cache_entry.flags.alpha) { mask->pixman.im = pixman_image_create_bits(PIXMAN_a8r8g8b8, w, h, (uint32_t *)mask->mask.mask, w * 4); } else { mask->pixman.im = pixman_image_create_bits(PIXMAN_x8r8g8b8, w, h, (uint32_t *)mask->mask.mask, w * 4); } #endif } EAPI void evas_common_draw_context_unset_mask(RGBA_Draw_Context *dc) { dc->mask.mask = NULL; #ifdef HAVE_PIXMAN RGBA_Image *mask; mask = (RGBA_Image *)dc->mask.mask; if (mask && mask->pixman.im) { pixman_image_unref(mask->pixman.im); mask->pixman.im = NULL; } #endif } EAPI void evas_common_draw_context_add_cutout(RGBA_Draw_Context *dc, int x, int y, int w, int h) { // if (dc->cutout.rects > 512) return; if (dc->clip.use) { #if 1 // this is a bit faster int xa1, xa2, xb1, xb2; xa1 = x; xa2 = xa1 + w - 1; xb1 = dc->clip.x; if (xa2 < xb1) return; xb2 = xb1 + dc->clip.w - 1; if (xa1 >= xb2) return; if (xa2 > xb2) xa2 = xb2; if (xb1 > xa1) xa1 = xb1; x = xa1; w = xa2 - xa1 + 1; xa1 = y; xa2 = xa1 + h - 1; xb1 = dc->clip.y; if (xa2 < xb1) return; xb2 = xb1 + dc->clip.h - 1; if (xa1 >= xb2) return; if (xa2 > xb2) xa2 = xb2; if (xb1 > xa1) xa1 = xb1; y = xa1; h = xa2 - xa1 + 1; #else RECTS_CLIP_TO_RECT(x, y, w, h, dc->clip.x, dc->clip.y, dc->clip.w, dc->clip.h); #endif if ((w < 1) || (h < 1)) return; } evas_common_draw_context_cutouts_add(&dc->cutout, x, y, w, h); } int evas_common_draw_context_cutout_split(Cutout_Rects* res, int idx, Cutout_Rect *split) { /* 1 input rect, multiple out */ Cutout_Rect in = res->rects[idx]; /* this is to save me a LOT of typing */ #define INX1 (in.x) #define INX2 (in.x + in.w) #define SPX1 (split->x) #define SPX2 (split->x + split->w) #define INY1 (in.y) #define INY2 (in.y + in.h) #define SPY1 (split->y) #define SPY2 (split->y + split->h) #define X1_IN (in.x < split->x) #define X2_IN ((in.x + in.w) > (split->x + split->w)) #define Y1_IN (in.y < split->y) #define Y2_IN ((in.y + in.h) > (split->y + split->h)) #define R_NEW(_r, _x, _y, _w, _h) { evas_common_draw_context_cutouts_add(_r, _x, _y, _w, _h); } if (!RECTS_INTERSECT(in.x, in.y, in.w, in.h, split->x, split->y, split->w, split->h)) { /* No colision => no clipping, don't touch it. */ return 1; } /* S = split (ie cut out rect) */ /* +--+ = in (rect to be cut) */ /* * +---+ * | | * | S | * | | * +---+ * */ if (X1_IN && X2_IN && Y1_IN && Y2_IN) { R_NEW(res, in.x, in.y, in.w, SPY1 - in.y); R_NEW(res, in.x, SPY1, SPX1 - in.x, SPY2 - SPY1); R_NEW(res, SPX2, SPY1, INX2 - SPX2, SPY2 - SPY1); /* out => (in.x, SPY2, in.w, INY2 - SPY2) */ res->rects[idx].h = INY2 - SPY2; res->rects[idx].y = SPY2; return 1; } /* SSSSSSS * S+---+S * S|SSS|S * S|SSS|S * S|SSS|S * S+---+S * SSSSSSS */ if (!X1_IN && !X2_IN && !Y1_IN && !Y2_IN) { evas_common_draw_context_cutouts_del(res, idx); return 0; } /* SSS * S+---+ * S|S | * S|S | * S|S | * S+---+ * SSS */ if (!X1_IN && X2_IN && !Y1_IN && !Y2_IN) { /* in => (SPX2, in.y, INX2 - SPX2, in.h) */ res->rects[idx].w = INX2 - SPX2; res->rects[idx].x = SPX2; return 1; } /* S * +---+ * | S | * | S | * | S | * +---+ * S */ if (X1_IN && X2_IN && !Y1_IN && !Y2_IN) { R_NEW(res, in.x, in.y, SPX1 - in.x, in.h); /* in => (SPX2, in.y, INX2 - SPX2, in.h) */ res->rects[idx].w = INX2 - SPX2; res->rects[idx].x = SPX2; return 1; } /* SSS * +---+S * | S|S * | S|S * | S|S * +---+S * SSS */ if (X1_IN && !X2_IN && !Y1_IN && !Y2_IN) { /* in => (in.x, in.y, SPX1 - in.x, in.h) */ res->rects[idx].w = SPX1 - in.x; return 1; } /* SSSSSSS * S+---+S * S|SSS|S * | | * | | * +---+ * */ if (!X1_IN && !X2_IN && !Y1_IN && Y2_IN) { /* in => (in.x, SPY2, in.w, INY2 - SPY2) */ res->rects[idx].h = INY2 - SPY2; res->rects[idx].y = SPY2; return 1; } /* * +---+ * | | * S|SSS|S * | | * +---+ * */ if (!X1_IN && !X2_IN && Y1_IN && Y2_IN) { R_NEW(res, in.x, SPY2, in.w, INY2 - SPY2); /* in => (in.x, in.y, in.w, SPY1 - in.y) */ res->rects[idx].h = SPY1 - in.y; return 1; } /* * +---+ * | | * | | * S|SSS|S * S+---+S * SSSSSSS */ if (!X1_IN && !X2_IN && Y1_IN && !Y2_IN) { /* in => (in.x, in.y, in.w, SPY1 - in.y) */ res->rects[idx].h = SPY1 - in.y; return 1; } /* SSS * S+---+ * S|S | * | | * | | * +---+ * */ if (!X1_IN && X2_IN && !Y1_IN && Y2_IN) { R_NEW(res, SPX2, in.y, INX2 - SPX2, SPY2 - in.y); /* in => (in.x, SPY2, in.w, INY2 - SPY2) */ res->rects[idx].h = INY2 - SPY2; res->rects[idx].y = SPY2; return 1; } /* S * +---+ * | S | * | | * | | * +---+ * */ if (X1_IN && X2_IN && !Y1_IN && Y2_IN) { R_NEW(res, in.x, in.y, SPX1 - in.x, SPY2 - in.y); R_NEW(res, SPX2, in.y, INX2 - SPX2, SPY2 - in.y); /* in => (in.x, SPY2, in.w, INY2 - SPY2) */ res->rects[idx].h = INY2 - SPY2; res->rects[idx].y = SPY2; return 1; } /* SSS * +---+S * | S|S * | | * | | * +---+ * */ if (X1_IN && !X2_IN && !Y1_IN && Y2_IN) { R_NEW(res, in.x, in.y, SPX1 - in.x, SPY2 - in.y); /* in => (in.x, SPY2, in.w, INY2 - SPY2) */ res->rects[idx].h = INY2 - SPY2; res->rects[idx].y = SPY2; return 1; } /* * +---+ * | | * S|S | * | | * +---+ * */ if (!X1_IN && X2_IN && Y1_IN && Y2_IN) { R_NEW(res, in.x, SPY2, in.w, INY2 - SPY2); R_NEW(res, SPX2, SPY1, INX2 - SPX2, SPY2 - SPY1); /* in => (in.x, SPY2, in.w, INY2 - SPY2) */ res->rects[idx].h = SPY1 - in.y; return 1; } /* * +---+ * | | * | S|S * | | * +---+ * */ if (X1_IN && !X2_IN && Y1_IN && Y2_IN) { R_NEW(res, in.x, SPY2, in.w, INY2 - SPY2); R_NEW(res, in.x, SPY1, SPX1 - in.x, SPY2 - SPY1); /* in => (in.x, in.y, in.w, SPY1 - in.y) */ res->rects[idx].h = SPY1 - in.y; return 1; } /* * +---+ * | | * | | * S|S | * S+---+ * SSS */ if (!X1_IN && X2_IN && Y1_IN && !Y2_IN) { R_NEW(res, SPX2, SPY1, INX2 - SPX2, INY2 - SPY1); /* in => (in.x, in.y, in.w, SPY1 - in.y) */ res->rects[idx].h = SPY1 - in.y; return 1; } /* * +---+ * | | * | | * | S | * +---+ * S */ if (X1_IN && X2_IN && Y1_IN && !Y2_IN) { R_NEW(res, in.x, SPY1, SPX1 - in.x, INY2 - SPY1); R_NEW(res, SPX2, SPY1, INX2 - SPX2, INY2 - SPY1); /* in => (in.x, in.y, in.w, SPY1 - in.y) */ res->rects[idx].h = SPY1 - in.y; return 1; } /* * +---+ * | | * | | * | S|S * +---+S * SSS */ if (X1_IN && !X2_IN && Y1_IN && !Y2_IN) { R_NEW(res, in.x, SPY1, SPX1 - in.x, INY2 - SPY1); /* in => (in.x, in.y, in.w, SPY1 - in.y) */ res->rects[idx].h = SPY1 - in.y; return 1; } evas_common_draw_context_cutouts_del(res, idx); return 0; #undef INX1 #undef INX2 #undef SPX1 #undef SPX2 #undef INY1 #undef INY2 #undef SPY1 #undef SPY2 #undef X1_IN #undef X2_IN #undef Y1_IN #undef Y2_IN #undef R_NEW } EAPI Cutout_Rects* evas_common_draw_context_apply_cutouts(RGBA_Draw_Context *dc, Cutout_Rects *reuse) { Cutout_Rects* res = NULL; int i; int j; if (!dc->clip.use) return NULL; if ((dc->clip.w <= 0) || (dc->clip.h <= 0)) return NULL; if (!reuse) { res = evas_common_draw_context_cutouts_new(); } else { evas_common_draw_context_cutouts_free(reuse); res = reuse; } evas_common_draw_context_cutouts_add(res, dc->clip.x, dc->clip.y, dc->clip.w, dc->clip.h); for (i = 0; i < dc->cutout.active; ++i) { /* Don't loop on the element just added to the list as they are already correctly clipped. */ int active = res->active; for (j = 0; j < active; ) { if (evas_common_draw_context_cutout_split(res, j, dc->cutout.rects + i)) ++j; else active--; } } /* merge rects */ #define RI res->rects[i] #define RJ res->rects[j] if (res->active > 1) { int found = 1; while (found) { found = 0; for (i = 0; i < res->active; i++) { for (j = i + 1; j < res->active; j++) { /* skip empty rects we are removing */ if (RJ.w == 0) continue; /* check if its same width, immediately above or below */ if ((RJ.w == RI.w) && (RJ.x == RI.x)) { if ((RJ.y + RJ.h) == RI.y) /* above */ { RI.y = RJ.y; RI.h += RJ.h; RJ.w = 0; found = 1; } else if ((RI.y + RI.h) == RJ.y) /* below */ { RI.h += RJ.h; RJ.w = 0; found = 1; } } /* check if its same height, immediately left or right */ else if ((RJ.h == RI.h) && (RJ.y == RI.y)) { if ((RJ.x + RJ.w) == RI.x) /* left */ { RI.x = RJ.x; RI.w += RJ.w; RJ.w = 0; found = 1; } else if ((RI.x + RI.w) == RJ.x) /* right */ { RI.w += RJ.w; RJ.w = 0; found = 1; } } } } } /* Repack the cutout */ j = 0; for (i = 0; i < res->active; i++) { if (RI.w == 0) continue; if (i != j) RJ = RI; j++; } res->active = j; return res; } return res; } EAPI void evas_common_draw_context_apply_clear_cutouts(Cutout_Rects* rects) { evas_common_draw_context_apply_clean_cutouts(rects); free(rects); } EAPI void evas_common_draw_context_apply_clean_cutouts(Cutout_Rects* rects) { free(rects->rects); rects->rects = NULL; rects->active = 0; rects->max = 0; } EAPI void evas_common_draw_context_set_anti_alias(RGBA_Draw_Context *dc , unsigned char aa) { dc->anti_alias = !!aa; } EAPI void evas_common_draw_context_set_color_interpolation(RGBA_Draw_Context *dc, int color_space) { dc->interpolation.color_space = color_space; } EAPI void evas_common_draw_context_set_render_op(RGBA_Draw_Context *dc , int op) { dc->render_op = op; } EAPI void evas_common_draw_context_set_sli(RGBA_Draw_Context *dc, int y, int h) { dc->sli.y = y; dc->sli.h = h; } evas-1.7.9/src/lib/engines/common/evas_font_query.c0000664000175000017500000006363712213647747017277 00000000000000#include "evas_common.h" #include "language/evas_bidi_utils.h" /*defines BIDI_SUPPORT if possible */ #include "evas_font_private.h" /* for Frame-Queuing support */ #include "evas_font_ot.h" /* FIXME: Check coverage according to the font and not by actually loading */ /** * @internal * Find the end of a run according to font coverage, and return the base script * font and the current wanted font. * * @param[in] fn the font to use. * @param script_fi The base font instance to be used with the script. If NULL, then it's calculated and returned in this variable, if not NULL, it's used and not modified. * @param[out] cur_fi The font instance found for the current run. * @param[in] script the base script * @param[in] text the text to work on. * @param[in] run_let the current run len, i.e "search limit". * @return length of the run found. */ EAPI int evas_common_font_query_run_font_end_get(RGBA_Font *fn, RGBA_Font_Int **script_fi, RGBA_Font_Int **cur_fi, Evas_Script_Type script, const Eina_Unicode *text, int run_len) { RGBA_Font_Int *fi = NULL; const Eina_Unicode *run_end = text + run_len; const Eina_Unicode *itr; /* If there's no current script_fi, find it first */ if (!*script_fi) { const Eina_Unicode *base_char = NULL; /* Skip common chars */ for (base_char = text ; (base_char < run_end) && (evas_common_language_char_script_get(*base_char) != script) ; base_char++) ; if (base_char == run_end) base_char = text; /* Find the first renderable char */ while (base_char < run_end) { /* 0x1F is the last ASCII contral char, just a hack in * the meanwhile. */ if ((*base_char > 0x1F) && evas_common_font_glyph_search(fn, &fi, *base_char)) break; base_char++; } /* If everything else fails, at least try to find a font for the * replacement char */ if (base_char == run_end) evas_common_font_glyph_search(fn, &fi, REPLACEMENT_CHAR); if (!fi) fi = fn->fonts->data; *script_fi = fi; } else { fi = *script_fi; } /* Find the longest run of the same font starting from the start position * and update cur_fi accordingly. */ itr = text; while (itr < run_end) { RGBA_Font_Int *tmp_fi; /* Itr will end up being the first of the next run */ for ( ; itr < run_end ; itr++) { /* 0x1F is the last ASCII contral char, just a hack in * the meanwhile. */ if (*itr <= 0x1F) continue; /* Break if either it's not in the font, or if it is in the * script's font. */ if (!evas_common_get_char_index(fi, *itr)) break; if (fi != *script_fi) { if (evas_common_get_char_index(*script_fi, *itr)) break; } } /* Abort if we reached the end */ if (itr == run_end) break; /* If the script font doesn't fit even one char, find a new font. */ if (itr == text) { /* If we can find a font, use it. Otherwise, find the first * char the run of chars that can't be rendered until the first * one that can. */ if (evas_common_font_glyph_search(fn, &tmp_fi, *itr)) { fi = tmp_fi; } else { itr++; /* Go through all the chars that can't be rendered with any * font */ for ( ; itr < run_end ; itr++) { tmp_fi = fi; if (evas_common_get_char_index(fi, *itr) || evas_common_font_glyph_search(fn, &tmp_fi, *itr)) { fi = tmp_fi; break; } } /* If we found a renderable character and the found font * can render the replacement char, continue, otherwise * find a font most suitable for the replacement char and * break */ if ((itr == run_end) || !evas_common_get_char_index(fi, REPLACEMENT_CHAR)) { evas_common_font_glyph_search(fn, &fi, REPLACEMENT_CHAR); break; } } itr++; } else { /* If this char is not renderable by any font, but the replacement * char can be rendered using the currentfont, continue this * run. */ if (!evas_common_font_glyph_search(fn, &tmp_fi, *itr) && evas_common_get_char_index(fi, REPLACEMENT_CHAR)) { itr++; } else { /* Done, we did as much as possible */ break; } } } if (fi) *cur_fi = fi; else *cur_fi = *script_fi; return itr - text; } /** * @internal * Calculate the kerning between "left" and "right. * * @param fi the font instance to use * @param left the left glyph index * @param right the right glyph index * @param[out] kerning the kerning calculated. * @return FALSE on error, TRUE on success. */ EAPI int evas_common_font_query_kerning(RGBA_Font_Int *fi, FT_UInt left, FT_UInt right, int *kerning) { int *result; FT_Vector delta; int key[2]; int error = 1; key[0] = left; key[1] = right; result = eina_hash_find(fi->kerning, key); if (result) { *kerning = result[2]; goto on_correct; } /* NOTE: ft2 seems to have a bug. and sometimes returns bizarre * values to kern by - given same font, same size and same * prev_index and index. auto/bytecode or none hinting doesn't * matter */ evas_common_font_int_reload(fi); FTLOCK(); if (FT_Get_Kerning(fi->src->ft.face, key[0], key[1], FT_KERNING_DEFAULT, &delta) == 0) { int *push; FTUNLOCK(); *kerning = delta.x; push = malloc(sizeof (int) * 3); if (!push) return 1; push[0] = key[0]; push[1] = key[1]; push[2] = *kerning; eina_hash_direct_add(fi->kerning, push, push); goto on_correct; } FTUNLOCK(); error = 0; on_correct: return error; } /** * @internal * Calculate the inset of the text. Inset is the difference between the pen * position of the first char in the string, and the first pixel drawn. * (can be negative). * * @param fn the font set to use. * @param text_props the string object. * @return the calculated inset. */ EAPI int evas_common_font_query_inset(RGBA_Font *fn __UNUSED__, const Evas_Text_Props *text_props) { if (!text_props->len) return 0; return text_props->info->glyph[text_props->start].x_bear; } /** * @internal * Calculate the right inset of the text. This is the difference between the * pen position of the glyph after the last glyph in the text, and the last * pixel drawn in the text (essentially "advance - width" of the last char). * * @param fn the font set to use. * @param text_props the string object. * @return the calculated inset. * * @see evas_common_font_query_inset() */ EAPI int evas_common_font_query_right_inset(RGBA_Font *fn __UNUSED__, const Evas_Text_Props *text_props) { const Evas_Font_Glyph_Info *gli; if (!text_props->len) return 0; gli = text_props->info->glyph + text_props->start + text_props->len - 1; /* If the last char is a whitespace, we use the advance as the size, * so the right_inset is 0. */ if (gli->width == 0) return 0; return ((gli > text_props->info->glyph) ? gli->pen_after - (gli - 1)->pen_after : gli->pen_after) - (gli->width + gli->x_bear #ifdef OT_SUPPORT + EVAS_FONT_ROUND_26_6_TO_INT(EVAS_FONT_OT_X_OFF_GET( text_props->info->ot[text_props->start + text_props->len - 1])) #endif ); } /** * @internal * Calculate the ascent/descent of a run. This is different from * evas_common_font_[max]_ascent/descent_get because this one returns the * actual sizee (i.e including accents), and not just what the font reports. * * @param fn the font set to use. * @param text_props the string object. * @param[out] ascent the calculated ascent * @param[out] descent the calculated descent */ EAPI void evas_common_font_ascent_descent_get(RGBA_Font *fn, const Evas_Text_Props *text_props, int *ascent, int *descent) { int asc = 0, desc = 0; int max_asc, max_desc; max_asc = evas_common_font_ascent_get(fn); max_desc = evas_common_font_descent_get(fn); /* FIXME: Not supported yet!!! */ desc = max_desc; EVAS_FONT_WALK_TEXT_INIT(); EVAS_FONT_WALK_TEXT_START() { EVAS_FONT_WALK_TEXT_WORK(); if (!EVAS_FONT_WALK_IS_VISIBLE) continue; if ((EVAS_FONT_WALK_PEN_Y + EVAS_FONT_WALK_Y_OFF + EVAS_FONT_WALK_Y_BEAR) > asc) { asc = EVAS_FONT_WALK_PEN_Y + EVAS_FONT_WALK_Y_OFF + EVAS_FONT_WALK_Y_BEAR; } } EVAS_FONT_WALK_TEXT_END(); if (ascent) *ascent = (asc > max_asc) ? asc : max_asc; if (descent) *descent = (desc < max_desc) ? desc : max_desc; } /** * @internal * Calculate the size of the string (width and height). * The width is the disntance between the first pen position and the last pixel * drawn. * The height is the max ascent+descent of the font. * * @param fn the font set to use. * @param text_props the string object. * @param[out] w the calculated width * @param[out] h the calculated height */ EAPI void evas_common_font_query_size(RGBA_Font *fn, const Evas_Text_Props *text_props, int *w, int *h) { Evas_Coord ret_w = 0; if (text_props->len > 0) { const Evas_Font_Glyph_Info *glyph = text_props->info->glyph + text_props->start; const Evas_Font_Glyph_Info *last_glyph = glyph; if (text_props->len > 1) { last_glyph += text_props->len - 1; ret_w = last_glyph[-1].pen_after; if (text_props->start > 0) ret_w -= glyph[-1].pen_after; } #ifdef OT_SUPPORT ret_w += EVAS_FONT_ROUND_26_6_TO_INT(EVAS_FONT_OT_X_OFF_GET( text_props->info->ot[text_props->start + text_props->len - 1])); #endif ret_w += last_glyph->width + last_glyph->x_bear; } if (w) *w = ret_w; if (h) *h = evas_common_font_max_ascent_get(fn) + evas_common_font_max_descent_get(fn); } /** * @internal * Calculate the advance of the string. Advance is the distance between the * first pen position and the pen position after the string. * * @param fn the font set to use. * @param text_props the string object. * @param[out] h_adv the calculated horizontal advance. * @param[out] v_adv the calculated vertical advance. */ EAPI void evas_common_font_query_advance(RGBA_Font *fn, const Evas_Text_Props *text_props, int *h_adv, int *v_adv) { Evas_Coord ret_adv = 0; if (text_props->len > 0) { // RGBA_Font_Int *fi = text_props->font_instance; const Evas_Font_Glyph_Info *glyph = text_props->info->glyph + text_props->start; const Evas_Font_Glyph_Info *last_glyph = glyph + text_props->len - 1; ret_adv = last_glyph->pen_after; if (text_props->start > 0) ret_adv -= glyph[-1].pen_after; #if 0 /* Runtime slant adjustment. */ if (fi->runtime_rend & FONT_REND_SLANT) { RGBA_Font_Glyph *fg = evas_common_font_int_cache_glyph_get(fi, last_glyph->index); if (!fg->glyph_out) evas_common_font_int_cache_glyph_render(fg); ret_adv += fg->glyph_out->bitmap.rows * _EVAS_FONT_SLANT_TAN; } #endif } if (h_adv) *h_adv = ret_adv; if (v_adv) *v_adv = evas_common_font_get_line_advance(fn); } /** * @internal * Query the coordinates of the char at position pos. If the position is at the * end of the string (i.e where the finishing null would be) it returns the * coordinates of the position right after the last char. This is either on * the left or on the right of the string, depending on BiDi direction. Returned * width in this case is 0. It returns the x of the leftmost pixel drawn. * * @param fn the font set to use. * @param text_props the string object. * @param pos the position of the char in the string object (not actual position in the string object, but the position of the source character). * @param[out] cx the calculated x - CAN BE NULL * @param[out] cy the calculated y - CAN BE NULL * @param[out] cw the calculated width - CAN BE NULL * @param[out] ch the calculated height - CAN BE NULL * @return TRUE on success, FALSE otherwise. * * @see evas_common_font_query_pen_coords() */ EAPI int evas_common_font_query_char_coords(RGBA_Font *fn, const Evas_Text_Props *text_props, int pos, int *cx, int *cy, int *cw, int *ch) { int asc, desc; size_t position = 0; int ret_val = 0; EVAS_FONT_WALK_TEXT_INIT(); asc = evas_common_font_max_ascent_get(fn); desc = evas_common_font_max_descent_get(fn); position = pos; /* If it's the null, choose location according to the direction. */ if (position == text_props->text_len) { /* if it's rtl then the location is the left of the string, * otherwise, the right. */ #ifdef BIDI_SUPPORT if (text_props->bidi.dir == EVAS_BIDI_DIRECTION_RTL) { if (cx) *cx = 0; if (ch) *ch = asc + desc; } else #endif { evas_common_font_query_advance(fn, text_props, cx, ch); } if (cy) *cy = 0; if (cw) *cw = 0; ret_val = 1; goto end; } Evas_Coord cluster_start = 0, last_end = 0; int prev_cluster = -1; int found = 0, items = 1, item_pos = 1; int last_is_visible = 0; EVAS_FONT_WALK_TEXT_START() { EVAS_FONT_WALK_TEXT_WORK(); if (prev_cluster != (int) EVAS_FONT_WALK_POS) { if (found) { break; } else { cluster_start = EVAS_FONT_WALK_PEN_X + EVAS_FONT_WALK_X_OFF + EVAS_FONT_WALK_X_BEAR; } } last_is_visible = EVAS_FONT_WALK_IS_VISIBLE; last_end = EVAS_FONT_WALK_PEN_X + EVAS_FONT_WALK_X_OFF + EVAS_FONT_WALK_X_BEAR + EVAS_FONT_WALK_WIDTH; /* we need to see if the char at the visual position is the char wanted */ if ((text_props->bidi.dir == EVAS_BIDI_DIRECTION_LTR) && (EVAS_FONT_WALK_POS <= (size_t) position) && ((((size_t) position) < EVAS_FONT_WALK_POS_NEXT) || (EVAS_FONT_WALK_IS_LAST))) { found = 1; #ifdef OT_SUPPORT items = evas_common_font_ot_cluster_size_get(text_props, char_index); #endif item_pos = position - EVAS_FONT_WALK_POS + 1; } else if ((text_props->bidi.dir == EVAS_BIDI_DIRECTION_RTL) && ((EVAS_FONT_WALK_POS_PREV > (size_t) position) || (EVAS_FONT_WALK_IS_FIRST)) && (((size_t) position) >= EVAS_FONT_WALK_POS)) { found = 1; #ifdef OT_SUPPORT items = evas_common_font_ot_cluster_size_get(text_props, char_index); #endif item_pos = items - (position - EVAS_FONT_WALK_POS); } prev_cluster = EVAS_FONT_WALK_POS; } EVAS_FONT_WALK_TEXT_END(); if (found) { Evas_Coord cluster_w; cluster_w = last_end - cluster_start; if (cy) *cy = -asc; if (ch) *ch = asc + desc; if (last_is_visible) { if (cx) *cx = cluster_start + (cluster_w / items) * (item_pos - 1); if (cw) *cw = (cluster_w / items); } else { if (cx) *cx = cluster_start; if (cw) *cw = 0; } ret_val = 1; goto end; } end: return ret_val; } /** * @internal * Query the coordinates of the char at position pos. If the position is at the * end of the string (i.e where the finishing null would be) it returns the * coordinates of the position right after the last char. This is either on * the left or on the right of the string, depending on BiDi direction. Returned * advance in this case is 0. * * This is the same as evas_common_font_query_char_coords() except that the * advance of the character is returned instead of the width and the pen * position is returned instead of the actual pixel position. * * @param fn the font set to use. * @param text_props the string object. * @param pos the position of the char in the string object (not actual position in the string object, but the position of the source character). * @param[out] cpenx the calculated x - CAN BE NULL * @param[out] cy the calculated y - CAN BE NULL * @param[out] cadv the calculated advance - CAN BE NULL * @param[out] ch the calculated height - CAN BE NULL * @return TRUE on success, FALSE otherwise. * * @see evas_common_font_query_char_coords() */ EAPI int evas_common_font_query_pen_coords(RGBA_Font *fn, const Evas_Text_Props *text_props, int pos, int *cpen_x, int *cy, int *cadv, int *ch) { int asc, desc; size_t position; int ret_val = 0; EVAS_FONT_WALK_TEXT_INIT(); asc = evas_common_font_max_ascent_get(fn); desc = evas_common_font_max_descent_get(fn); position = pos; /* If it's the null, choose location according to the direction. */ if (position == text_props->text_len) { /* if it's rtl then the location is the left of the string, * otherwise, the right. */ #ifdef BIDI_SUPPORT if (text_props->bidi.dir == EVAS_BIDI_DIRECTION_RTL) { if (cpen_x) *cpen_x = 0; if (ch) *ch = asc + desc; } else #endif { evas_common_font_query_advance(fn, text_props, cpen_x, ch); } if (cy) *cy = 0; if (cadv) *cadv = 0; ret_val = 1; goto end; } Evas_Coord cluster_start = 0; int prev_cluster = -1; int found = 0, items = 1, item_pos = 1; int last_is_visible = 0; EVAS_FONT_WALK_TEXT_START() { EVAS_FONT_WALK_TEXT_WORK(); if (prev_cluster != (int) EVAS_FONT_WALK_POS) { if (found) { break; } else { cluster_start = EVAS_FONT_WALK_PEN_X; } } last_is_visible = EVAS_FONT_WALK_IS_VISIBLE; if ((text_props->bidi.dir == EVAS_BIDI_DIRECTION_LTR) && (EVAS_FONT_WALK_POS <= (size_t) position) && ((((size_t) position) < EVAS_FONT_WALK_POS_NEXT) || (EVAS_FONT_WALK_IS_LAST))) { found = 1; #ifdef OT_SUPPORT items = evas_common_font_ot_cluster_size_get(text_props, char_index); #endif item_pos = position - EVAS_FONT_WALK_POS + 1; } else if ((text_props->bidi.dir == EVAS_BIDI_DIRECTION_RTL) && ((EVAS_FONT_WALK_POS_PREV > (size_t) position) || (EVAS_FONT_WALK_IS_FIRST)) && (((size_t) position) >= EVAS_FONT_WALK_POS)) { found = 1; #ifdef OT_SUPPORT items = evas_common_font_ot_cluster_size_get(text_props, char_index); #endif item_pos = items - (position - EVAS_FONT_WALK_POS); } prev_cluster = EVAS_FONT_WALK_POS; } EVAS_FONT_WALK_TEXT_END(); if (found) { Evas_Coord cluster_adv; cluster_adv = EVAS_FONT_WALK_PEN_X - cluster_start; if (cy) *cy = -asc; if (ch) *ch = asc + desc; if (last_is_visible) { if (cpen_x) *cpen_x = cluster_start + (cluster_adv / items) * (item_pos - 1); if (cadv) *cadv = (cluster_adv / items); } else { if (cpen_x) *cpen_x = EVAS_FONT_WALK_PEN_X; if (cadv) *cadv = 0; } ret_val = 1; goto end; } end: return ret_val; } /** * @internal * Find the character at a specific x, y coordinates and return it's position * in the text (not in the text object, but in the source text). Also calculate * the char's geometry. * * @param fn the font set to use. * @param text_props the string object. * @param x the x to look at. * @param y the y to look at. * @param[out] cx the calculated x - CAN BE NULL * @param[out] cy the calculated y - CAN BE NULL * @param[out] cw the calculated width - CAN BE NULL * @param[out] ch the calculated height - CAN BE NULL * @return the position found, -1 on failure. */ EAPI int evas_common_font_query_char_at_coords(RGBA_Font *fn, const Evas_Text_Props *text_props, int x, int y, int *cx, int *cy, int *cw, int *ch) { int asc, desc; int ret_val = -1; EVAS_FONT_WALK_TEXT_INIT(); asc = evas_common_font_max_ascent_get(fn); desc = evas_common_font_max_descent_get(fn); Evas_Coord cluster_start = 0; int prev_cluster = -1; int found = 0, items = 1; EVAS_FONT_WALK_TEXT_START() { EVAS_FONT_WALK_TEXT_WORK(); if (prev_cluster != (int) EVAS_FONT_WALK_POS) { if (found) { break; } else { cluster_start = EVAS_FONT_WALK_PEN_X; } } if (!EVAS_FONT_WALK_IS_VISIBLE) continue; /* we need to see if the char at the visual position is the char, * we check that by checking if it's before the current pen * position and the next */ if ((x >= EVAS_FONT_WALK_PEN_X) && (x <= (EVAS_FONT_WALK_PEN_X_AFTER)) && (y >= -asc) && (y <= desc)) { #ifdef OT_SUPPORT items = evas_common_font_ot_cluster_size_get(text_props, char_index); #endif found = 1; } prev_cluster = EVAS_FONT_WALK_POS; } EVAS_FONT_WALK_TEXT_END(); if (found) { int item_pos; Evas_Coord cluster_adv; cluster_adv = EVAS_FONT_WALK_PEN_X - cluster_start; if (text_props->bidi.dir == EVAS_BIDI_DIRECTION_LTR) { double part; part = cluster_adv / items; item_pos = (int) ((x - cluster_start) / part); } else { double part; part = cluster_adv / items; item_pos = items - ((int) ((x - cluster_start) / part)) - 1; } if (cx) *cx = EVAS_FONT_WALK_PEN_X + ((cluster_adv / items) * (item_pos - 1)); if (cy) *cy = -asc; if (cw) *cw = (cluster_adv / items); if (ch) *ch = asc + desc; ret_val = prev_cluster + item_pos; goto end; } end: return ret_val; } /** * @internal * Find one after the last character that fits until the boundaries set by x * and y. I.e find the first char that doesn't fit. * This LOGICALLY walks the string. This is needed for wrapping for example * where we want the first part to be the first logical part. * * @param fn the font set to use. * @param text_props the string object. * @param x the x boundary. * @param y the y boundary. * @return the position found, -1 on failure. */ EAPI int evas_common_font_query_last_up_to_pos(RGBA_Font *fn, const Evas_Text_Props *text_props, int x, int y) { int asc, desc; int ret=-1; asc = evas_common_font_max_ascent_get(fn); desc = evas_common_font_max_descent_get(fn); #ifdef BIDI_SUPPORT if (text_props->bidi.dir == EVAS_BIDI_DIRECTION_RTL) { Evas_Font_Glyph_Info *gli = NULL; Evas_Coord full_adv = 0, pen_x = 0, start_pen = 0; int i; if ((text_props->info) && (text_props->len > 0)) { gli = text_props->info->glyph + text_props->start; full_adv = gli[text_props->len - 1].pen_after; if (text_props->start > 0) { start_pen = gli[-1].pen_after; full_adv -= start_pen; } gli += text_props->len - 1; for (i = text_props->len - 1 ; i >= 0 ; i--, gli--) { pen_x = full_adv - (gli->pen_after - start_pen); /* If invisible, skip */ if (gli->index == 0) continue; if ((x >= pen_x) && (((i == 0) && (x <= full_adv)) || (x <= (full_adv - (gli[-1].pen_after - start_pen)))) && (y >= -asc) && (y <= desc)) { #ifdef OT_SUPPORT ret = EVAS_FONT_OT_POS_GET( text_props->info->ot[text_props->start + i]) - text_props->text_offset; #else ret = text_props->text_len - i - 1; #endif goto end; } } } } else #endif { EVAS_FONT_WALK_TEXT_INIT(); /* When text is not rtl, visual direction = logical direction */ EVAS_FONT_WALK_TEXT_START() { EVAS_FONT_WALK_TEXT_WORK(); if (!EVAS_FONT_WALK_IS_VISIBLE) continue; if ((x >= EVAS_FONT_WALK_PEN_X) && (x <= (EVAS_FONT_WALK_PEN_X_AFTER)) && (y >= -asc) && (y <= desc)) { ret = EVAS_FONT_WALK_POS; goto end; } } EVAS_FONT_WALK_TEXT_END(); } end: return ret; } evas-1.7.9/src/lib/engines/common/evas_scale_smooth.c0000664000175000017500000003555512175475547017566 00000000000000#include "evas_common.h" #include "evas_scale_smooth.h" #include "evas_blend_private.h" #define SCALE_CALC_X_POINTS(P, SW, DW, CX, CW) \ P = alloca((CW + 1) * sizeof (int)); \ scale_calc_x_points(P, SW, DW, CX, CW); #define SCALE_CALC_Y_POINTS(P, SRC, SW, SH, DH, CY, CH) \ P = alloca((CH + 1) * sizeof (DATA32 *)); \ scale_calc_y_points(P, SRC, SW, SH, DH, CY, CH); #define SCALE_CALC_A_POINTS(P, S, D, C, CC) \ P = alloca(CC * sizeof (int)); \ scale_calc_a_points(P, S, D, C, CC); static void scale_calc_y_points(DATA32 **p, DATA32 *src, int sw, int sh, int dh, int cy, int ch); static void scale_calc_x_points(int *p, int sw, int dw, int cx, int cw); static void scale_calc_a_points(int *p, int s, int d, int c, int cc); static void scale_calc_y_points(DATA32** p, DATA32 *src, int sw, int sh, int dh, int cy, int ch) { int i, val, inc; if (sh > SCALE_SIZE_MAX) return; val = 0; inc = (sh << 16) / dh; for (i = 0; i < dh; i++) { if ((i >= cy) && (i < (cy + ch))) p[i - cy] = src + ((val >> 16) * sw); val += inc; } if ((i >= cy) && (i < (cy + ch))) p[i - cy] = p[i - cy - 1]; } static void scale_calc_x_points(int *p, int sw, int dw, int cx, int cw) { int i, val, inc; if (sw > SCALE_SIZE_MAX) return; val = 0; inc = (sw << 16) / dw; for (i = 0; i < dw; i++) { if ((i >= cx) && (i < (cx + cw))) p[i - cx] = val >> 16; val += inc; } if ((i >= cx) && (i < (cx + cw))) p[i - cx] = p[i - cx - 1]; } static void scale_calc_a_points(int *p, int s, int d, int c, int cc) { int i, val, inc; if (s > SCALE_SIZE_MAX) return; if (d >= s) { val = 0; inc = (s << 16) / d; for (i = 0; i < d; i++) { if ((i >= c) && (i < (c + cc))) { p[i - c] = (val >> 8) - ((val >> 8) & 0xffffff00); if ((val >> 16) >= (s - 1)) p[i - c] = 0; } val += inc; } } else { int ap, Cp; val = 0; inc = (s << 16) / d; Cp = ((d << 14) / s) + 1; for (i = 0; i < d; i++) { ap = ((0x100 - ((val >> 8) & 0xff)) * Cp) >> 8; if ((i >= c) && (i < (c + cc))) p[i - c] = ap | (Cp << 16); val += inc; } } } #ifdef BUILD_SCALE_SMOOTH #ifdef BUILD_C EAPI void evas_common_scale_rgba_mipmap_down_2x2_c(DATA32 *src, DATA32 *dst, int src_w, int src_h) { int x, y, dst_w, dst_h; DATA32 *src_ptr, *src_ptr2, *dst_ptr; dst_w = src_w >> 1; dst_h = src_h >> 1; if (dst_w < 1) dst_w = 1; if (dst_h < 1) dst_h = 1; src_ptr = src; src_ptr2 = src + src_w; dst_ptr = dst; for (y = 0; y < dst_h; y++) { src_ptr = src + (y * src_w * 2); src_ptr2 = src_ptr + src_w; for (x = 0; x < dst_w; x++) { R_VAL(dst_ptr) = (R_VAL(src_ptr) + R_VAL(src_ptr + 1) + R_VAL(src_ptr2) + R_VAL(src_ptr2 + 1)) >> 2; G_VAL(dst_ptr) = (G_VAL(src_ptr) + G_VAL(src_ptr + 1) + G_VAL(src_ptr2) + G_VAL(src_ptr2 + 1)) >> 2; B_VAL(dst_ptr) = (B_VAL(src_ptr) + B_VAL(src_ptr + 1) + B_VAL(src_ptr2) + B_VAL(src_ptr2 + 1)) >> 2; A_VAL(dst_ptr) = (A_VAL(src_ptr) + A_VAL(src_ptr + 1) + A_VAL(src_ptr2) + A_VAL(src_ptr2 + 1)) >> 2; src_ptr+=2; src_ptr2+=2; dst_ptr++; } } } #endif #endif #ifdef BUILD_SCALE_SMOOTH #ifdef BUILD_C EAPI void evas_common_scale_rgba_mipmap_down_2x1_c(DATA32 *src, DATA32 *dst, int src_w, int src_h) { int x, y, dst_w, dst_h; DATA32 *src_ptr, *dst_ptr; dst_w = src_w >> 1; dst_h = src_h >> 1; if (dst_w < 1) dst_w = 1; if (dst_h < 1) dst_h = 1; src_ptr = src; dst_ptr = dst; for (y = 0; y < dst_h; y++) { src_ptr = src + (y * src_w * 2); for (x = 0; x < dst_w; x++) { R_VAL(dst_ptr) = (R_VAL(src_ptr) + R_VAL(src_ptr + 1)) >> 1; G_VAL(dst_ptr) = (G_VAL(src_ptr) + G_VAL(src_ptr + 1)) >> 1; B_VAL(dst_ptr) = (B_VAL(src_ptr) + B_VAL(src_ptr + 1)) >> 1; A_VAL(dst_ptr) = (A_VAL(src_ptr) + A_VAL(src_ptr + 1)) >> 1; src_ptr+=2; dst_ptr++; } } } #endif #endif #ifdef BUILD_SCALE_SMOOTH #ifdef BUILD_C EAPI void evas_common_scale_rgba_mipmap_down_1x2_c(DATA32 *src, DATA32 *dst, int src_w, int src_h) { int x, y, dst_w, dst_h; DATA32 *src_ptr, *src_ptr2, *dst_ptr; dst_w = src_w >> 1; dst_h = src_h >> 1; if (dst_w < 1) dst_w = 1; if (dst_h < 1) dst_h = 1; src_ptr = src; dst_ptr = dst; for (y = 0; y < dst_h; y++) { src_ptr = src + (y * src_w * 2); src_ptr2 = src_ptr + src_w; for (x = 0; x < dst_w; x++) { R_VAL(dst_ptr) = (R_VAL(src_ptr) + R_VAL(src_ptr2)) >> 1; G_VAL(dst_ptr) = (G_VAL(src_ptr) + G_VAL(src_ptr2)) >> 1; B_VAL(dst_ptr) = (B_VAL(src_ptr) + B_VAL(src_ptr2)) >> 1; A_VAL(dst_ptr) = (A_VAL(src_ptr) + A_VAL(src_ptr2)) >> 1; src_ptr+=2; src_ptr2+=2; dst_ptr++; } } } #endif #endif #ifdef BUILD_SCALE_SMOOTH #ifdef BUILD_C EAPI void evas_common_scale_rgb_mipmap_down_2x2_c(DATA32 *src, DATA32 *dst, int src_w, int src_h) { int x, y, dst_w, dst_h; DATA32 *src_ptr, *src_ptr2, *dst_ptr; dst_w = src_w >> 1; dst_h = src_h >> 1; if (dst_w < 1) dst_w = 1; if (dst_h < 1) dst_h = 1; src_ptr = src; src_ptr2 = src + src_w; dst_ptr = dst; for (y = 0; y < dst_h; y++) { for (x = 0; x < dst_w; x++) { R_VAL(dst_ptr) = (R_VAL(src_ptr) + R_VAL(src_ptr + 1) + R_VAL(src_ptr2) + R_VAL(src_ptr2 + 1)) >> 2; G_VAL(dst_ptr) = (G_VAL(src_ptr) + G_VAL(src_ptr + 1) + G_VAL(src_ptr2) + G_VAL(src_ptr2 + 1)) >> 2; B_VAL(dst_ptr) = (B_VAL(src_ptr) + B_VAL(src_ptr + 1) + B_VAL(src_ptr2) + B_VAL(src_ptr2 + 1)) >> 2; A_VAL(dst_ptr) = 0xff; src_ptr+=2; src_ptr2+=2; dst_ptr++; } src_ptr += src_w; src_ptr2 += src_w; } } #endif #endif #ifdef BUILD_SCALE_SMOOTH #ifdef BUILD_C EAPI void evas_common_scale_rgb_mipmap_down_2x1_c(DATA32 *src, DATA32 *dst, int src_w, int src_h) { int x, y, dst_w, dst_h; DATA32 *src_ptr, *dst_ptr; dst_w = src_w >> 1; dst_h = src_h >> 1; if (dst_w < 1) dst_w = 1; if (dst_h < 1) dst_h = 1; src_ptr = src; dst_ptr = dst; for (y = 0; y < dst_h; y++) { for (x = 0; x < dst_w; x++) { R_VAL(dst_ptr) = (R_VAL(src_ptr) + R_VAL(src_ptr + 1)) >> 1; G_VAL(dst_ptr) = (G_VAL(src_ptr) + G_VAL(src_ptr + 1)) >> 1; B_VAL(dst_ptr) = (B_VAL(src_ptr) + B_VAL(src_ptr + 1)) >> 1; A_VAL(dst_ptr) = 0xff; src_ptr+=2; dst_ptr++; } src_ptr += src_w; } } #endif #endif #ifdef BUILD_SCALE_SMOOTH #ifdef BUILD_C EAPI void evas_common_scale_rgb_mipmap_down_1x2_c(DATA32 *src, DATA32 *dst, int src_w, int src_h) { int x, y, dst_w, dst_h; DATA32 *src_ptr, *src_ptr2, *dst_ptr; dst_w = src_w >> 1; dst_h = src_h >> 1; if (dst_w < 1) dst_w = 1; if (dst_h < 1) dst_h = 1; src_ptr = src; src_ptr2 = src + src_w; dst_ptr = dst; for (y = 0; y < dst_h; y++) { for (x = 0; x < dst_w; x++) { R_VAL(dst_ptr) = (R_VAL(src_ptr) + R_VAL(src_ptr2)) >> 1; G_VAL(dst_ptr) = (G_VAL(src_ptr) + G_VAL(src_ptr2)) >> 1; B_VAL(dst_ptr) = (B_VAL(src_ptr) + B_VAL(src_ptr2)) >> 1; A_VAL(dst_ptr) = 0xff; src_ptr+=2; src_ptr2+=2; dst_ptr++; } src_ptr += src_w; src_ptr2 += src_w; } } #endif #endif #ifdef BUILD_SCALE_SMOOTH #ifdef BUILD_MMX EAPI void evas_common_scale_rgba_mipmap_down_2x2_mmx(DATA32 *src, DATA32 *dst, int src_w, int src_h) { int x, y, dst_w, dst_h; DATA32 *src_ptr, *src_ptr2, *dst_ptr; dst_w = src_w >> 1; dst_h = src_h >> 1; if (dst_w < 1) dst_w = 1; if (dst_h < 1) dst_h = 1; /* NB: Dead assignments (reassigned to different values below) src_ptr = src; src_ptr2 = src + src_w; */ dst_ptr = dst; for (y = 0; y < dst_h; y++) { src_ptr = src + (y * src_w * 2); src_ptr2 = src_ptr + src_w; for (x = 0; x < dst_w; x++) { punpcklbw_m2r(src_ptr[0], mm0); punpcklbw_m2r(src_ptr[1], mm1); punpcklbw_m2r(src_ptr2[0], mm2); punpcklbw_m2r(src_ptr2[1], mm3); psrlw_i2r(8, mm0); psrlw_i2r(8, mm1); psrlw_i2r(8, mm2); psrlw_i2r(8, mm3); paddw_r2r(mm1, mm0); paddw_r2r(mm2, mm0); paddw_r2r(mm3, mm0); psrlw_i2r(2, mm0); packuswb_r2r(mm0, mm0); movd_r2m(mm0, dst_ptr[0]); src_ptr+=2; src_ptr2+=2; dst_ptr++; } } } #endif #endif #ifdef BUILD_SCALE_SMOOTH #ifdef BUILD_MMX EAPI void evas_common_scale_rgba_mipmap_down_2x1_mmx(DATA32 *src, DATA32 *dst, int src_w, int src_h) { int x, y, dst_w, dst_h; DATA32 *src_ptr, *dst_ptr; dst_w = src_w >> 1; dst_h = src_h >> 1; if (dst_w < 1) dst_w = 1; if (dst_h < 1) dst_h = 1; src_ptr = src; dst_ptr = dst; for (y = 0; y < dst_h; y++) { src_ptr = src + (y * src_w * 2); for (x = 0; x < dst_w; x++) { punpcklbw_m2r(src_ptr[0], mm0); punpcklbw_m2r(src_ptr[1], mm1); psrlw_i2r(8, mm0); psrlw_i2r(8, mm1); paddw_r2r(mm1, mm0); psrlw_i2r(1, mm0); packuswb_r2r(mm0, mm0); movd_r2m(mm0, dst_ptr[0]); src_ptr+=2; dst_ptr++; } } } #endif #endif #ifdef BUILD_SCALE_SMOOTH #ifdef BUILD_MMX EAPI void evas_common_scale_rgba_mipmap_down_1x2_mmx(DATA32 *src, DATA32 *dst, int src_w, int src_h) { int x, y, dst_w, dst_h; DATA32 *src_ptr, *src_ptr2, *dst_ptr; dst_w = src_w >> 1; dst_h = src_h >> 1; if (dst_w < 1) dst_w = 1; if (dst_h < 1) dst_h = 1; /* NB: Dead assignment (gets reassigned later) */ // src_ptr = src; src_ptr2 = src + src_w; dst_ptr = dst; for (y = 0; y < dst_h; y++) { src_ptr = src + (y * src_w * 2); src_ptr2 = src_ptr + src_w; for (x = 0; x < dst_w; x++) { punpcklbw_m2r(src_ptr[0], mm0); punpcklbw_m2r(src_ptr2[0], mm1); psrlw_i2r(8, mm0); psrlw_i2r(8, mm1); paddw_r2r(mm1, mm0); psrlw_i2r(1, mm0); packuswb_r2r(mm0, mm0); movd_r2m(mm0, dst_ptr[0]); src_ptr+=2; src_ptr2+=2; dst_ptr++; } } } #endif #endif #ifdef BUILD_SCALE_SMOOTH # ifdef BUILD_MMX # undef SCALE_FUNC # define SCALE_FUNC evas_common_scale_rgba_in_to_out_clip_smooth_mmx # undef SCALE_USING_MMX # define SCALE_USING_MMX # include "evas_scale_smooth_scaler.c" # endif # ifdef BUILD_C # undef SCALE_FUNC # define SCALE_FUNC evas_common_scale_rgba_in_to_out_clip_smooth_c # undef SCALE_USING_MMX # include "evas_scale_smooth_scaler.c" # endif EAPI void evas_common_scale_rgba_in_to_out_clip_smooth(RGBA_Image *src, RGBA_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) { # ifdef BUILD_MMX int mmx, sse, sse2; # endif static Cutout_Rects *rects = NULL; Cutout_Rect *r; int c, cx, cy, cw, ch; int i; /* handle cutouts here! */ if ((dst_region_w <= 0) || (dst_region_h <= 0)) return; if (!(RECTS_INTERSECT(dst_region_x, dst_region_y, dst_region_w, dst_region_h, 0, 0, dst->cache_entry.w, dst->cache_entry.h))) return; # ifdef BUILD_MMX evas_common_cpu_can_do(&mmx, &sse, &sse2); # endif /* no cutouts - cut right to the chase */ if (!dc->cutout.rects) { # ifdef BUILD_MMX if (mmx) evas_common_scale_rgba_in_to_out_clip_smooth_mmx(src, dst, dc, src_region_x, src_region_y, src_region_w, src_region_h, dst_region_x, dst_region_y, dst_region_w, dst_region_h); else # endif # ifdef BUILD_C evas_common_scale_rgba_in_to_out_clip_smooth_c(src, dst, dc, src_region_x, src_region_y, src_region_w, src_region_h, dst_region_x, dst_region_y, dst_region_w, dst_region_h); # endif return; } /* save out clip info */ c = dc->clip.use; cx = dc->clip.x; cy = dc->clip.y; cw = dc->clip.w; ch = dc->clip.h; evas_common_draw_context_clip_clip(dc, 0, 0, dst->cache_entry.w, dst->cache_entry.h); evas_common_draw_context_clip_clip(dc, dst_region_x, dst_region_y, dst_region_w, dst_region_h); /* our clip is 0 size.. abort */ if ((dc->clip.w <= 0) || (dc->clip.h <= 0)) { dc->clip.use = c; dc->clip.x = cx; dc->clip.y = cy; dc->clip.w = cw; dc->clip.h = ch; return; } rects = evas_common_draw_context_apply_cutouts(dc, rects); for (i = 0; i < rects->active; ++i) { r = rects->rects + i; evas_common_draw_context_set_clip(dc, r->x, r->y, r->w, r->h); # ifdef BUILD_MMX if (mmx) evas_common_scale_rgba_in_to_out_clip_smooth_mmx(src, dst, dc, src_region_x, src_region_y, src_region_w, src_region_h, dst_region_x, dst_region_y, dst_region_w, dst_region_h); else # endif # ifdef BUILD_C evas_common_scale_rgba_in_to_out_clip_smooth_c(src, dst, dc, src_region_x, src_region_y, src_region_w, src_region_h, dst_region_x, dst_region_y, dst_region_w, dst_region_h); # endif } /* restore clip info */ dc->clip.use = c; dc->clip.x = cx; dc->clip.y = cy; dc->clip.w = cw; dc->clip.h = ch; } EAPI void evas_common_scale_rgba_in_to_out_clip_smooth_do(const Cutout_Rects *reuse, const Eina_Rectangle *clip, RGBA_Image *src, RGBA_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) { # ifdef BUILD_MMX int mmx, sse, sse2; # endif Eina_Rectangle area; Cutout_Rect *r; int i; # ifdef BUILD_MMX evas_common_cpu_can_do(&mmx, &sse, &sse2); # endif if (!reuse) { evas_common_draw_context_clip_clip(dc, clip->x, clip->y, clip->w, clip->h); # ifdef BUILD_MMX if (mmx) evas_common_scale_rgba_in_to_out_clip_smooth_mmx(src, dst, dc, src_region_x, src_region_y, src_region_w, src_region_h, dst_region_x, dst_region_y, dst_region_w, dst_region_h); else # endif # ifdef BUILD_C evas_common_scale_rgba_in_to_out_clip_smooth_c(src, dst, dc, src_region_x, src_region_y, src_region_w, src_region_h, dst_region_x, dst_region_y, dst_region_w, dst_region_h); # endif return ; } for (i = 0; i < reuse->active; ++i) { r = reuse->rects + i; EINA_RECTANGLE_SET(&area, r->x, r->y, r->w, r->h); if (!eina_rectangle_intersection(&area, clip)) continue ; evas_common_draw_context_set_clip(dc, area.x, area.y, area.w, area.h); # ifdef BUILD_MMX if (mmx) evas_common_scale_rgba_in_to_out_clip_smooth_mmx(src, dst, dc, src_region_x, src_region_y, src_region_w, src_region_h, dst_region_x, dst_region_y, dst_region_w, dst_region_h); else # endif # ifdef BUILD_C evas_common_scale_rgba_in_to_out_clip_smooth_c(src, dst, dc, src_region_x, src_region_y, src_region_w, src_region_h, dst_region_x, dst_region_y, dst_region_w, dst_region_h); # endif } } #endif evas-1.7.9/src/lib/engines/common/Makefile.in0000664000175000017500000011444012234557302015742 00000000000000# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/lib/engines/common DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/efl_attribute.m4 \ $(top_srcdir)/m4/efl_coverage.m4 \ $(top_srcdir)/m4/efl_doxygen.m4 \ $(top_srcdir)/m4/efl_fnmatch.m4 \ $(top_srcdir)/m4/efl_path_max.m4 \ $(top_srcdir)/m4/efl_shm_open.m4 $(top_srcdir)/m4/efl_tests.m4 \ $(top_srcdir)/m4/evas_check_engine.m4 \ $(top_srcdir)/m4/evas_check_loader.m4 \ $(top_srcdir)/m4/evas_converter.m4 \ $(top_srcdir)/m4/evas_dither.m4 \ $(top_srcdir)/m4/evas_scaler.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libevas_engine_common_la_DEPENDENCIES = \ evas_op_blend/libevas_engine_common_op_blend_master_sse3.la am_libevas_engine_common_la_OBJECTS = evas_op_copy_main_.lo \ evas_op_blend_main_.lo evas_op_add_main_.lo \ evas_op_sub_main_.lo evas_op_mask_main_.lo \ evas_op_mul_main_.lo evas_blend_main.lo evas_blit_main.lo \ evas_convert_color.lo evas_convert_colorspace.lo \ evas_convert_gry_1.lo evas_convert_gry_4.lo \ evas_convert_gry_8.lo evas_convert_main.lo \ evas_convert_rgb_16.lo evas_convert_rgb_24.lo \ evas_convert_rgb_32.lo evas_convert_rgb_8.lo \ evas_convert_grypal_6.lo evas_convert_yuv.lo evas_cpu.lo \ evas_draw_main.lo evas_font_draw.lo evas_font_load.lo \ evas_font_main.lo evas_font_query.lo evas_image_load.lo \ evas_image_save.lo evas_image_main.lo evas_image_data.lo \ evas_image_scalecache.lo evas_line_main.lo \ evas_polygon_main.lo evas_rectangle_main.lo evas_scale_main.lo \ evas_scale_sample.lo evas_scale_smooth.lo evas_scale_span.lo \ evas_tiler.lo evas_regionbuf.lo evas_pipe.lo \ evas_bidi_utils.lo evas_language_utils.lo evas_text_utils.lo \ evas_font_ot.lo evas_map_image.lo libevas_engine_common_la_OBJECTS = \ $(am_libevas_engine_common_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libevas_engine_common_la_SOURCES) DIST_SOURCES = $(libevas_engine_common_la_SOURCES) RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-recursive dvi-recursive html-recursive info-recursive \ install-data-recursive install-dvi-recursive \ install-exec-recursive install-html-recursive \ install-info-recursive install-pdf-recursive \ install-ps-recursive install-recursive installcheck-recursive \ installdirs-recursive pdf-recursive ps-recursive \ tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ $(RECURSIVE_TARGETS) \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ distdir am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHECK_CFLAGS = @CHECK_CFLAGS@ CHECK_LIBS = @CHECK_LIBS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@ DIRECTFB_LIBS = @DIRECTFB_LIBS@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ ECORE_EVAS_CFLAGS = @ECORE_EVAS_CFLAGS@ ECORE_EVAS_LIBS = @ECORE_EVAS_LIBS@ EDB_CFLAGS = @EDB_CFLAGS@ EDB_LIBS = @EDB_LIBS@ EDJE_CFLAGS = @EDJE_CFLAGS@ EDJE_LIBS = @EDJE_LIBS@ EET_CFLAGS = @EET_CFLAGS@ EET_LIBS = @EET_LIBS@ EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@ EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@ EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@ EFL_SHM_OPEN_LIBS = @EFL_SHM_OPEN_LIBS@ EGREP = @EGREP@ EINA_CFLAGS = @EINA_CFLAGS@ EINA_LIBS = @EINA_LIBS@ EVAS_CFLAGS = @EVAS_CFLAGS@ EVAS_GENERAL_CFLAGS = @EVAS_GENERAL_CFLAGS@ EVAS_GENERAL_LIBS = @EVAS_GENERAL_LIBS@ EVAS_LIBS = @EVAS_LIBS@ EVAS_SSE3_CFLAGS = @EVAS_SSE3_CFLAGS@ EVIL_CFLAGS = @EVIL_CFLAGS@ EVIL_LIBS = @EVIL_LIBS@ EXEEXT = @EXEEXT@ EXOTIC_CFLAGS = @EXOTIC_CFLAGS@ EXOTIC_LIBS = @EXOTIC_LIBS@ FGREP = @FGREP@ FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@ FONTCONFIG_LIBS = @FONTCONFIG_LIBS@ FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ FREETYPE_LIBS = @FREETYPE_LIBS@ FRIBIDI_CFLAGS = @FRIBIDI_CFLAGS@ FRIBIDI_LIBS = @FRIBIDI_LIBS@ GL_EET_CFLAGS = @GL_EET_CFLAGS@ GL_EET_LIBS = @GL_EET_LIBS@ GREP = @GREP@ HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@ HARFBUZZ_LIBS = @HARFBUZZ_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LINEBREAK_CFLAGS = @LINEBREAK_CFLAGS@ LINEBREAK_LIBS = @LINEBREAK_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MODULE_ARCH = @MODULE_ARCH@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ SDL_CFLAGS = @SDL_CFLAGS@ SDL_LIBS = @SDL_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ SVG_CFLAGS = @SVG_CFLAGS@ SVG_LIBS = @SVG_LIBS@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ XCB_CFLAGS = @XCB_CFLAGS@ XCB_GL_CFLAGS = @XCB_GL_CFLAGS@ XCB_GL_LIBS = @XCB_GL_LIBS@ XCB_LIBS = @XCB_LIBS@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_ct_OBJC = @ac_ct_OBJC@ altivec_cflags = @altivec_cflags@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ dlopen_libs = @dlopen_libs@ docdir = @docdir@ dvidir = @dvidir@ edje_cc = @edje_cc@ efl_doxygen = @efl_doxygen@ efl_have_doxygen = @efl_have_doxygen@ evas_engine_buffer_cflags = @evas_engine_buffer_cflags@ evas_engine_buffer_libs = @evas_engine_buffer_libs@ evas_engine_direct3d_cflags = @evas_engine_direct3d_cflags@ evas_engine_direct3d_libs = @evas_engine_direct3d_libs@ evas_engine_directfb_cflags = @evas_engine_directfb_cflags@ evas_engine_directfb_libs = @evas_engine_directfb_libs@ evas_engine_fb_cflags = @evas_engine_fb_cflags@ evas_engine_fb_libs = @evas_engine_fb_libs@ evas_engine_gl_cocoa_cflags = @evas_engine_gl_cocoa_cflags@ evas_engine_gl_cocoa_libs = @evas_engine_gl_cocoa_libs@ evas_engine_gl_common_libs = @evas_engine_gl_common_libs@ evas_engine_gl_sdl_cflags = @evas_engine_gl_sdl_cflags@ evas_engine_gl_sdl_libs = @evas_engine_gl_sdl_libs@ evas_engine_gl_xcb_cflags = @evas_engine_gl_xcb_cflags@ evas_engine_gl_xcb_libs = @evas_engine_gl_xcb_libs@ evas_engine_gl_xlib_cflags = @evas_engine_gl_xlib_cflags@ evas_engine_gl_xlib_libs = @evas_engine_gl_xlib_libs@ evas_engine_psl1ght_cflags = @evas_engine_psl1ght_cflags@ evas_engine_psl1ght_libs = @evas_engine_psl1ght_libs@ evas_engine_software_16_sdl_cflags = @evas_engine_software_16_sdl_cflags@ evas_engine_software_16_sdl_libs = @evas_engine_software_16_sdl_libs@ evas_engine_software_16_wince_cflags = @evas_engine_software_16_wince_cflags@ evas_engine_software_16_wince_libs = @evas_engine_software_16_wince_libs@ evas_engine_software_16_x11_cflags = @evas_engine_software_16_x11_cflags@ evas_engine_software_16_x11_libs = @evas_engine_software_16_x11_libs@ evas_engine_software_8_x11_cflags = @evas_engine_software_8_x11_cflags@ evas_engine_software_8_x11_libs = @evas_engine_software_8_x11_libs@ evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@ evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@ evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@ evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ evas_image_loader_edb_libs = @evas_image_loader_edb_libs@ evas_image_loader_eet_cflags = @evas_image_loader_eet_cflags@ evas_image_loader_eet_libs = @evas_image_loader_eet_libs@ evas_image_loader_generic_cflags = @evas_image_loader_generic_cflags@ evas_image_loader_generic_libs = @evas_image_loader_generic_libs@ evas_image_loader_gif_cflags = @evas_image_loader_gif_cflags@ evas_image_loader_gif_libs = @evas_image_loader_gif_libs@ evas_image_loader_ico_cflags = @evas_image_loader_ico_cflags@ evas_image_loader_ico_libs = @evas_image_loader_ico_libs@ evas_image_loader_jpeg_cflags = @evas_image_loader_jpeg_cflags@ evas_image_loader_jpeg_libs = @evas_image_loader_jpeg_libs@ evas_image_loader_pmaps_cflags = @evas_image_loader_pmaps_cflags@ evas_image_loader_pmaps_libs = @evas_image_loader_pmaps_libs@ evas_image_loader_png_cflags = @evas_image_loader_png_cflags@ evas_image_loader_png_libs = @evas_image_loader_png_libs@ evas_image_loader_psd_cflags = @evas_image_loader_psd_cflags@ evas_image_loader_psd_libs = @evas_image_loader_psd_libs@ evas_image_loader_svg_cflags = @evas_image_loader_svg_cflags@ evas_image_loader_svg_libs = @evas_image_loader_svg_libs@ evas_image_loader_tga_cflags = @evas_image_loader_tga_cflags@ evas_image_loader_tga_libs = @evas_image_loader_tga_libs@ evas_image_loader_tiff_cflags = @evas_image_loader_tiff_cflags@ evas_image_loader_tiff_libs = @evas_image_loader_tiff_libs@ evas_image_loader_wbmp_cflags = @evas_image_loader_wbmp_cflags@ evas_image_loader_wbmp_libs = @evas_image_loader_wbmp_libs@ evas_image_loader_xpm_cflags = @evas_image_loader_xpm_cflags@ evas_image_loader_xpm_libs = @evas_image_loader_xpm_libs@ exec_prefix = @exec_prefix@ have_evas_engine_gl_x11 = @have_evas_engine_gl_x11@ have_evas_engine_gl_xcb = @have_evas_engine_gl_xcb@ have_evas_engine_gl_xlib = @have_evas_engine_gl_xlib@ have_evas_engine_software_x11 = @have_evas_engine_software_x11@ have_evas_engine_software_xcb = @have_evas_engine_software_xcb@ have_evas_engine_software_xlib = @have_evas_engine_software_xlib@ have_lcov = @have_lcov@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_enable_auto_import = @lt_enable_auto_import@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgconfig_requires_private = @pkgconfig_requires_private@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pthread_cflags = @pthread_cflags@ pthread_libs = @pthread_libs@ release_info = @release_info@ requirement_evas = @requirement_evas@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ shm_open_libs = @shm_open_libs@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ version_info = @version_info@ SUBDIRS = evas_op_add evas_op_blend evas_op_copy evas_op_mask evas_op_mul evas_op_sub MAINTAINERCLEANFILES = Makefile.in AM_CPPFLAGS = -I. \ -I$(top_srcdir)/src/lib \ -I$(top_srcdir)/src/lib/cserve \ -I$(top_srcdir)/src/lib/cserve2 \ -I$(top_srcdir)/src/lib/include \ -DPACKAGE_BIN_DIR=\"$(bindir)\" \ -DPACKAGE_LIB_DIR=\"$(libdir)\" \ -DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \ @FREETYPE_CFLAGS@ @VALGRIND_CFLAGS@ \ @PIXMAN_CFLAGS@ \ @EET_CFLAGS@ @pthread_cflags@ \ @EVAS_GENERAL_CFLAGS@ \ @FRIBIDI_CFLAGS@ @HARFBUZZ_CFLAGS@ \ @PIXMAN_CFLAGS@ noinst_LTLIBRARIES = libevas_engine_common.la libevas_engine_common_la_SOURCES = \ evas_op_copy_main_.c \ evas_op_blend_main_.c \ evas_op_add_main_.c \ evas_op_sub_main_.c \ evas_op_mask_main_.c \ evas_op_mul_main_.c \ evas_blend_main.c \ evas_blit_main.c \ evas_convert_color.c \ evas_convert_colorspace.c \ evas_convert_gry_1.c \ evas_convert_gry_4.c \ evas_convert_gry_8.c \ evas_convert_main.c \ evas_convert_rgb_16.c \ evas_convert_rgb_24.c \ evas_convert_rgb_32.c \ evas_convert_rgb_8.c \ evas_convert_grypal_6.c \ evas_convert_yuv.c \ evas_cpu.c \ evas_draw_main.c \ evas_font_draw.c \ evas_font_load.c \ evas_font_main.c \ evas_font_query.c \ evas_image_load.c \ evas_image_save.c \ evas_image_main.c \ evas_image_data.c \ evas_image_scalecache.c \ evas_line_main.c \ evas_polygon_main.c \ evas_rectangle_main.c \ evas_scale_main.c \ evas_scale_sample.c \ evas_scale_smooth.c \ evas_scale_span.c \ evas_tiler.c \ evas_regionbuf.c \ evas_pipe.c \ language/evas_bidi_utils.c \ language/evas_language_utils.c \ evas_text_utils.c \ evas_font_ot.c \ evas_map_image.c \ evas_map_image.h EXTRA_DIST = \ evas_blend.h \ evas_blend_private.h \ evas_convert_color.h \ evas_convert_colorspace.h \ evas_convert_gry_1.h \ evas_convert_gry_4.h \ evas_convert_gry_8.h \ evas_convert_grypal_6.h \ evas_convert_main.h \ evas_convert_rgb_16.h \ evas_convert_rgb_24.h \ evas_convert_rgb_32.h \ evas_convert_rgb_8.h \ evas_convert_yuv.h \ evas_draw.h \ evas_font.h \ evas_font_default_walk.x \ evas_font_private.h \ evas_image.h \ evas_image_private.h \ evas_line.h \ evas_polygon.h \ evas_rectangle.h \ evas_scale_main.h \ evas_scale_smooth.h \ evas_scale_smooth_scaler.c \ evas_scale_smooth_scaler_down.c \ evas_scale_smooth_scaler_downx.c \ evas_scale_smooth_scaler_downx_downy.c \ evas_scale_smooth_scaler_downy.c \ evas_scale_smooth_scaler_noscale.c \ evas_scale_smooth_scaler_up.c \ evas_scale_span.h \ evas_pipe.h \ language/evas_bidi_utils.h \ language/evas_language_utils.h \ language/evas_script_table.h \ evas_text_utils.h \ evas_font_ot.h \ evas_map_image_internal.c \ evas_map_image_core.c \ evas_map_image_loop.c libevas_engine_common_la_LIBADD = \ evas_op_blend/libevas_engine_common_op_blend_master_sse3.la all: all-recursive .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/lib/engines/common/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/lib/engines/common/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libevas_engine_common.la: $(libevas_engine_common_la_OBJECTS) $(libevas_engine_common_la_DEPENDENCIES) $(EXTRA_libevas_engine_common_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libevas_engine_common_la_OBJECTS) $(libevas_engine_common_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_bidi_utils.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_blend_main.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_blit_main.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_convert_color.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_convert_colorspace.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_convert_gry_1.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_convert_gry_4.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_convert_gry_8.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_convert_grypal_6.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_convert_main.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_convert_rgb_16.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_convert_rgb_24.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_convert_rgb_32.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_convert_rgb_8.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_convert_yuv.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_cpu.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_draw_main.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_font_draw.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_font_load.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_font_main.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_font_ot.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_font_query.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_image_data.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_image_load.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_image_main.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_image_save.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_image_scalecache.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_language_utils.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_line_main.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_map_image.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_op_add_main_.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_op_blend_main_.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_op_copy_main_.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_op_mask_main_.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_op_mul_main_.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_op_sub_main_.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_pipe.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_polygon_main.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_rectangle_main.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_regionbuf.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_scale_main.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_scale_sample.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_scale_smooth.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_scale_span.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_text_utils.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_tiler.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< evas_bidi_utils.lo: language/evas_bidi_utils.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT evas_bidi_utils.lo -MD -MP -MF $(DEPDIR)/evas_bidi_utils.Tpo -c -o evas_bidi_utils.lo `test -f 'language/evas_bidi_utils.c' || echo '$(srcdir)/'`language/evas_bidi_utils.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/evas_bidi_utils.Tpo $(DEPDIR)/evas_bidi_utils.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='language/evas_bidi_utils.c' object='evas_bidi_utils.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o evas_bidi_utils.lo `test -f 'language/evas_bidi_utils.c' || echo '$(srcdir)/'`language/evas_bidi_utils.c evas_language_utils.lo: language/evas_language_utils.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT evas_language_utils.lo -MD -MP -MF $(DEPDIR)/evas_language_utils.Tpo -c -o evas_language_utils.lo `test -f 'language/evas_language_utils.c' || echo '$(srcdir)/'`language/evas_language_utils.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/evas_language_utils.Tpo $(DEPDIR)/evas_language_utils.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='language/evas_language_utils.c' object='evas_language_utils.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o evas_language_utils.lo `test -f 'language/evas_language_utils.c' || echo '$(srcdir)/'`language/evas_language_utils.c mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs # This directory's subdirectories are mostly independent; you can cd # into them and run 'make' without going through this Makefile. # To change the values of 'make' variables: instead of editing Makefiles, # (1) if the variable is set in 'config.status', edit 'config.status' # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. $(am__recursive_targets): @fail=; \ if $(am__make_keepgoing); then \ failcom='fail=yes'; \ else \ failcom='exit 1'; \ fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-recursive TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-recursive CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-recursive cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile $(LTLIBRARIES) installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-recursive clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-recursive -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: .MAKE: $(am__recursive_targets) install-am install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \ check-am clean clean-generic clean-libtool \ clean-noinstLTLIBRARIES cscopelist-am ctags ctags-am distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ installdirs-am maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \ uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: evas-1.7.9/src/lib/engines/common/evas_polygon.h0000664000175000017500000000074112175475547016567 00000000000000#ifndef _EVAS_POLYGON_H #define _EVAS_POLYGON_H EAPI void evas_common_polygon_init (void); EAPI RGBA_Polygon_Point *evas_common_polygon_point_add (RGBA_Polygon_Point *points, int x, int y); EAPI RGBA_Polygon_Point *evas_common_polygon_points_clear (RGBA_Polygon_Point *points); EAPI void evas_common_polygon_draw (RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Polygon_Point *points, int x, int y); #endif /* _EVAS_POLYGON_H */ evas-1.7.9/src/lib/engines/common/evas_convert_rgb_32.h0000664000175000017500000000561612175475547017724 00000000000000#ifndef _EVAS_CONVERT_RGB_32_H #define _EVAS_CONVERT_RGB_32_H void evas_common_convert_rgba_to_32bpp_rgb_8888 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); void evas_common_convert_rgba_to_32bpp_rgb_8888_rot_180 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); void evas_common_convert_rgba_to_32bpp_rgb_8888_rot_270 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); void evas_common_convert_rgba_to_32bpp_rgb_8888_rot_90 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); void evas_common_convert_rgba_to_32bpp_rgbx_8888 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); void evas_common_convert_rgba_to_32bpp_rgbx_8888_rot_180 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); void evas_common_convert_rgba_to_32bpp_rgbx_8888_rot_270 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); void evas_common_convert_rgba_to_32bpp_rgbx_8888_rot_90 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); void evas_common_convert_rgba_to_32bpp_bgr_8888 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); void evas_common_convert_rgba_to_32bpp_bgr_8888_rot_180 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); void evas_common_convert_rgba_to_32bpp_bgr_8888_rot_270 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); void evas_common_convert_rgba_to_32bpp_bgr_8888_rot_90 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); void evas_common_convert_rgba_to_32bpp_bgrx_8888 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); void evas_common_convert_rgba_to_32bpp_bgrx_8888_rot_180 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); void evas_common_convert_rgba_to_32bpp_bgrx_8888_rot_270 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); void evas_common_convert_rgba_to_32bpp_bgrx_8888_rot_90 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); void evas_common_convert_rgba_to_32bpp_rgb_666 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); #endif /* _EVAS_CONVERT_RGB_32_H */ evas-1.7.9/src/lib/engines/common/evas_scale_smooth_scaler_down.c0000664000175000017500000000304012175475547022126 00000000000000{ DATA32 **ypoints; int *xpoints; int *xapoints, *xapp; int *yapoints, *yapp; DATA32 *buf, *src_data; RGBA_Gfx_Func func; src_data = src->image.data; /* some maximum region sizes to avoid insane calc point tables */ SCALE_CALC_X_POINTS(xpoints, src_region_w, dst_region_w, dst_clip_x - dst_region_x, dst_clip_w); SCALE_CALC_Y_POINTS(ypoints, src_data, src_w, src_region_h, dst_region_h, dst_clip_y - dst_region_y, dst_clip_h); SCALE_CALC_A_POINTS(xapoints, src_region_w, dst_region_w, dst_clip_x - dst_region_x, dst_clip_w); SCALE_CALC_A_POINTS(yapoints, src_region_h, dst_region_h, dst_clip_y - dst_region_y, dst_clip_h); /* a scanline buffer */ buf = alloca(dst_clip_w * sizeof(DATA32)); if (dc->mul.use) func = evas_common_gfx_func_composite_pixel_color_span_get(src, dc->mul.col, dst, dst_clip_w, dc->render_op); else func = evas_common_gfx_func_composite_pixel_span_get(src, dst, dst_clip_w, dc->render_op); /* scaling down vertically */ if ((dst_region_w >= src_region_w) && (dst_region_h < src_region_h)) { #include "evas_scale_smooth_scaler_downy.c" } /* scaling down horizontally */ else if ((dst_region_w < src_region_w) && (dst_region_h >= src_region_h)) { #include "evas_scale_smooth_scaler_downx.c" } /* scaling down both vertically & horizontally */ else if ((dst_region_w < src_region_w) && (dst_region_h < src_region_h)) { #include "evas_scale_smooth_scaler_downx_downy.c" } } evas-1.7.9/src/lib/engines/common/evas_map_image_loop.c0000664000175000017500000000546112175475547020047 00000000000000#ifdef SMOOTH { while (ww > 0) { # ifdef COLBLACK *d = 0xff000000; // col # else FPc u1, v1, u2, v2; FPc rv, ru; DATA32 val1, val2, val3, val4; u1 = u; if (u1 < 0) u1 = 0; else if (u1 >= swp) u1 = swp - 1; v1 = v; if (v1 < 0) v1 = 0; else if (v1 >= shp) v1 = shp - 1; u2 = u1 + FPFPI1; if (u2 >= swp) u2 = swp - 1; v2 = v1 + FPFPI1; if (v2 >= shp) v2 = shp - 1; ru = (u >> (FP + FPI - 8)) & 0xff; rv = (v >> (FP + FPI - 8)) & 0xff; s = sp + ((v1 >> (FP + FPI)) * sw) + (u1 >> (FP + FPI)); val1 = *s; s = sp + ((v1 >> (FP + FPI)) * sw) + (u2 >> (FP + FPI)); val2 = *s; s = sp + ((v2 >> (FP + FPI)) * sw) + (u1 >> (FP + FPI)); val3 = *s; s = sp + ((v2 >> (FP + FPI)) * sw) + (u2 >> (FP + FPI)); val4 = *s; # ifdef SCALE_USING_MMX MOV_A2R(rv, mm4); MOV_A2R(ru, mm6); MOV_P2R(val1, mm1, mm0); if (val1 | val2) { MOV_P2R(val2, mm2, mm0); INTERP_256_R2R(mm6, mm2, mm1, mm5); } MOV_P2R(val3, mm2, mm0); if (val3 | val4) { MOV_P2R(val4, mm3, mm0); INTERP_256_R2R(mm6, mm3, mm2, mm5); } INTERP_256_R2R(mm4, mm2, mm1, mm5); # ifdef COLMUL cc = cv >> 16; // col cv += cd; // col MOV_A2R(cc, mm2); // col MOV_P2R(c1, mm3, mm0); // col MOV_P2R(c2, mm4, mm0); // col INTERP_256_R2R(mm2, mm4, mm3, mm5); // col MUL4_SYM_R2R(mm3, mm1, mm5); // col # endif MOV_R2P(mm1, *d, mm0); # else val1 = INTERP_256(ru, val2, val1); val3 = INTERP_256(ru, val4, val3); val1 = INTERP_256(rv, val3, val1); // col # ifdef COLMUL val2 = INTERP_256((cv >> 16), c2, c1); // col *d = MUL4_SYM(val2, val1); // col cv += cd; // col # else *d = INTERP_256(rv, val3, val1); # endif # endif u += ud; v += vd; # endif d++; ww--; } } #else { while (ww > 0) { # ifdef COLMUL # ifndef COLBLACK DATA32 val1, cval; // col # endif # endif # ifdef COLBLACK *d = 0xff000000; // col # else s = sp + ((v >> (FP + FPI)) * sw) + (u >> (FP + FPI)); # ifdef COLMUL val1 = *s; // col cval = INTERP_256((cv >> 16), c2, c1); // col *d = MUL4_SYM(cval, val1); cv += cd; // col # else *d = *s; # endif u += ud; v += vd; # endif d++; ww--; } } #endif evas-1.7.9/src/lib/engines/common/evas_convert_colorspace.c0000664000175000017500000001000212175475547020754 00000000000000#include "evas_common.h" #include "evas_convert_colorspace.h" #define CONVERT_RGB_565_TO_RGB_888(s) \ (((((s) << 3) & 0xf8) | (((s) >> 2) & 0x7)) | \ ((((s) << 5) & 0xfc00) | (((s) >> 1) & 0x300)) | \ ((((s) << 8) & 0xf80000) | (((s) << 3) & 0x70000))) #define CONVERT_A5P_TO_A8(s) \ ((((s) << 3) & 0xf8) | (((s) >> 2) & 0x7)) #define CONVERT_ARGB_8888_TO_A_8(s) ((s) >> 24) static inline void * evas_common_convert_argb8888_to_rgb565_a5p(void *data __UNUSED__, int w __UNUSED__, int h __UNUSED__, int stride __UNUSED__, Eina_Bool has_alpha __UNUSED__) { return NULL; } static inline void * evas_common_convert_rgb565_a5p_to_argb8888(void *data, int w, int h, int stride, Eina_Bool has_alpha) { DATA16 *src, *end; DATA32 *ret, *dst; src = data; end = src + (stride * h); ret = malloc(w * h * sizeof(DATA32)); dst = ret; if (has_alpha) { DATA8 *alpha; alpha = (DATA8 *)end; for (; src < end; src++, alpha++, dst++) *dst = (CONVERT_A5P_TO_A8(*alpha) << 24) | CONVERT_RGB_565_TO_RGB_888(*src); } else { for (; src < end; src++, dst++) *dst = CONVERT_RGB_565_TO_RGB_888(*src); } return ret; } static inline void * evas_common_convert_argb8888_to_a8(void *data, int w, int h, int stride, Eina_Bool has_alpha) { uint32_t *src, *end; uint8_t *ret, *dst; src = data; end = src + (stride * h); ret = malloc(w * h); if (!ret) return NULL; if (!has_alpha) { return memset(ret, 0xff, w * h); } dst = ret; for ( ; src < end ; src++, dst++) *dst = CONVERT_ARGB_8888_TO_A_8(*src); return ret; } EAPI void * evas_common_convert_argb8888_to(void *data, int w, int h, int stride, Eina_Bool has_alpha, Evas_Colorspace cspace) { switch (cspace) { case EVAS_COLORSPACE_RGB565_A5P: return evas_common_convert_argb8888_to_rgb565_a5p(data, w, h, stride, has_alpha); default: break; } return NULL; } EAPI void * evas_common_convert_rgb565_a5p_to(void *data, int w, int h, int stride, Eina_Bool has_alpha, Evas_Colorspace cspace) { switch (cspace) { case EVAS_COLORSPACE_ARGB8888: return evas_common_convert_rgb565_a5p_to_argb8888(data, w, h, stride, has_alpha); default: break; } return NULL; } EAPI void * evas_common_convert_yuv_422_601_to(void *data, int w, int h, Evas_Colorspace cspace) { switch (cspace) { case EVAS_COLORSPACE_ARGB8888: { void *dst; dst = malloc(sizeof (unsigned int) * w * h); if (!dst) return NULL; evas_common_convert_yuv_422_601_rgba(data, dst, w, h); return dst; } default: break; } return NULL; } EAPI void * evas_common_convert_yuv_422P_601_to(void *data, int w, int h, Evas_Colorspace cspace) { switch (cspace) { case EVAS_COLORSPACE_ARGB8888: { void *dst; dst = malloc(sizeof (unsigned int) * w * h); if (!dst) return NULL; evas_common_convert_yuv_420p_601_rgba(data, dst, w, h); return dst; } default: break; } return NULL; } EAPI void * evas_common_convert_yuv_420_601_to(void *data, int w, int h, Evas_Colorspace cspace) { switch (cspace) { case EVAS_COLORSPACE_ARGB8888: { void *dst; dst = malloc(sizeof (unsigned int) * w * h); if (!dst) return NULL; evas_common_convert_yuv_420_601_rgba(data, dst, w, h); return dst; } default: break; } return NULL; } EAPI void * evas_common_convert_yuv_420T_601_to(void *data, int w, int h, Evas_Colorspace cspace) { switch (cspace) { case EVAS_COLORSPACE_ARGB8888: { void *dst; dst = malloc(sizeof (unsigned int) * w * h); if (!dst) return NULL; evas_common_convert_yuv_420_601_rgba(data, dst, w, h); return dst; } default: break; } return NULL; } /* vim:set ts=8 sw=3 sts=3 expandtab cino=>5n-2f0^-2{2(0W1st0 :*/ evas-1.7.9/src/lib/engines/common/evas_scale_sample.c0000664000175000017500000004074412175475547017532 00000000000000#include "evas_common.h" #include "evas_blend_private.h" static void scale_rgba_in_to_out_clip_sample_internal(RGBA_Image *src, RGBA_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); #ifndef BUILD_SCALE_SMOOTH #ifdef BUILD_SCALE_SAMPLE EAPI void evas_common_scale_rgba_in_to_out_clip_smooth_do(const Cutout_Rects *reuse, const Eina_Rectangle *clip, RGBA_Image *src, RGBA_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) { evas_common_scale_rgba_in_to_out_clip_sample_do(reuse, clip, src, dst, dc, src_region_x, src_region_y, src_region_w, src_region_h, dst_region_x, dst_region_y, dst_region_w, dst_region_h); } EAPI void evas_common_scale_rgba_in_to_out_clip_smooth(RGBA_Image *src, RGBA_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) { evas_common_scale_rgba_in_to_out_clip_sample(src, dst, dc, src_region_x, src_region_y, src_region_w, src_region_h, dst_region_x, dst_region_y, dst_region_w, dst_region_h); } #endif #endif #ifdef BUILD_SCALE_SAMPLE EAPI void evas_common_scale_rgba_in_to_out_clip_sample(RGBA_Image *src, RGBA_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) { static Cutout_Rects *rects = NULL; Cutout_Rect *r; int c, cx, cy, cw, ch; int i; /* handle cutouts here! */ if ((dst_region_w <= 0) || (dst_region_h <= 0)) return; if (!(RECTS_INTERSECT(dst_region_x, dst_region_y, dst_region_w, dst_region_h, 0, 0, dst->cache_entry.w, dst->cache_entry.h))) return; /* no cutouts - cut right to the chase */ if (!dc->cutout.rects) { scale_rgba_in_to_out_clip_sample_internal(src, dst, dc, src_region_x, src_region_y, src_region_w, src_region_h, dst_region_x, dst_region_y, dst_region_w, dst_region_h); return; } /* save out clip info */ c = dc->clip.use; cx = dc->clip.x; cy = dc->clip.y; cw = dc->clip.w; ch = dc->clip.h; evas_common_draw_context_clip_clip(dc, 0, 0, dst->cache_entry.w, dst->cache_entry.h); evas_common_draw_context_clip_clip(dc, dst_region_x, dst_region_y, dst_region_w, dst_region_h); /* our clip is 0 size.. abort */ if ((dc->clip.w <= 0) || (dc->clip.h <= 0)) { dc->clip.use = c; dc->clip.x = cx; dc->clip.y = cy; dc->clip.w = cw; dc->clip.h = ch; return; } rects = evas_common_draw_context_apply_cutouts(dc, rects); for (i = 0; i < rects->active; ++i) { r = rects->rects + i; evas_common_draw_context_set_clip(dc, r->x, r->y, r->w, r->h); scale_rgba_in_to_out_clip_sample_internal(src, dst, dc, src_region_x, src_region_y, src_region_w, src_region_h, dst_region_x, dst_region_y, dst_region_w, dst_region_h); } /* restore clip info */ dc->clip.use = c; dc->clip.x = cx; dc->clip.y = cy; dc->clip.w = cw; dc->clip.h = ch; } EAPI void evas_common_scale_rgba_in_to_out_clip_sample_do(const Cutout_Rects *reuse, const Eina_Rectangle *clip, RGBA_Image *src, RGBA_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) { Eina_Rectangle area; Cutout_Rect *r; int i; if (!reuse) { evas_common_draw_context_clip_clip(dc, clip->x, clip->y, clip->w, clip->h); scale_rgba_in_to_out_clip_sample_internal(src, dst, dc, src_region_x, src_region_y, src_region_w, src_region_h, dst_region_x, dst_region_y, dst_region_w, dst_region_h); return; } for (i = 0; i < reuse->active; ++i) { r = reuse->rects + i; EINA_RECTANGLE_SET(&area, r->x, r->y, r->w, r->h); if (!eina_rectangle_intersection(&area, clip)) continue ; evas_common_draw_context_set_clip(dc, area.x, area.y, area.w, area.h); scale_rgba_in_to_out_clip_sample_internal(src, dst, dc, src_region_x, src_region_y, src_region_w, src_region_h, dst_region_x, dst_region_y, dst_region_w, dst_region_h); } } static void scale_rgba_in_to_out_clip_sample_internal(RGBA_Image *src, RGBA_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 x, y; int *lin_ptr; DATA32 *buf, *dptr; DATA32 **row_ptr; DATA32 *ptr, *dst_ptr, *src_data, *dst_data; int dst_clip_x, dst_clip_y, dst_clip_w, dst_clip_h; int m_clip_x = 0, m_clip_y = 0, m_clip_w = 0, m_clip_h = 0, mdx = 0, mdy = 0; int src_w, src_h, dst_w, dst_h; RGBA_Gfx_Func func; RGBA_Image *maskobj = NULL; DATA8 *mask = NULL; if (!(RECTS_INTERSECT(dst_region_x, dst_region_y, dst_region_w, dst_region_h, 0, 0, dst->cache_entry.w, dst->cache_entry.h))) return; if (!(RECTS_INTERSECT(src_region_x, src_region_y, src_region_w, src_region_h, 0, 0, src->cache_entry.w, src->cache_entry.h))) return; src_w = src->cache_entry.w; src_h = src->cache_entry.h; dst_w = dst->cache_entry.w; dst_h = dst->cache_entry.h; src_data = src->image.data; dst_data = dst->image.data; if (dc->clip.use) { dst_clip_x = dc->clip.x; dst_clip_y = dc->clip.y; dst_clip_w = dc->clip.w; dst_clip_h = dc->clip.h; if (dst_clip_x < 0) { dst_clip_w += dst_clip_x; dst_clip_x = 0; } if (dst_clip_y < 0) { dst_clip_h += dst_clip_y; dst_clip_y = 0; } if ((dst_clip_x + dst_clip_w) > dst_w) dst_clip_w = dst_w - dst_clip_x; if ((dst_clip_y + dst_clip_h) > dst_h) dst_clip_h = dst_h - dst_clip_y; } else { dst_clip_x = 0; dst_clip_y = 0; dst_clip_w = dst_w; dst_clip_h = dst_h; } if (dc->mask.mask) { m_clip_x = dc->mask.x; m_clip_y = dc->mask.y; m_clip_w = dc->mask.mask->cache_entry.w; m_clip_h = dc->mask.mask->cache_entry.h; RECTS_CLIP_TO_RECT(m_clip_x, m_clip_y, m_clip_w, m_clip_h, dst_clip_x, dst_clip_y, dst_clip_w, dst_clip_h); if ((m_clip_w <= 0) || (m_clip_h <= 0)) return; dst_clip_x = m_clip_x; dst_clip_y = m_clip_y; dst_clip_w = m_clip_w; dst_clip_h = m_clip_h; } if (dst_clip_x < dst_region_x) { dst_clip_w += dst_clip_x - dst_region_x; dst_clip_x = dst_region_x; } if ((dst_clip_x + dst_clip_w) > (dst_region_x + dst_region_w)) dst_clip_w = dst_region_x + dst_region_w - dst_clip_x; if (dst_clip_y < dst_region_y) { dst_clip_h += dst_clip_y - dst_region_y; dst_clip_y = dst_region_y; } if ((dst_clip_y + dst_clip_h) > (dst_region_y + dst_region_h)) dst_clip_h = dst_region_y + dst_region_h - dst_clip_y; if ((src_region_w <= 0) || (src_region_h <= 0) || (dst_region_w <= 0) || (dst_region_h <= 0) || (dst_clip_w <= 0) || (dst_clip_h <= 0)) return; /* sanitise x */ if (src_region_x < 0) { dst_region_x -= (src_region_x * dst_region_w) / src_region_w; dst_region_w += (src_region_x * dst_region_w) / src_region_w; src_region_w += src_region_x; src_region_x = 0; } if (src_region_x >= src_w) return; if ((src_region_x + src_region_w) > src_w) { dst_region_w = (dst_region_w * (src_w - src_region_x)) / (src_region_w); src_region_w = src_w - src_region_x; } if (dst_region_w <= 0) return; if (src_region_w <= 0) return; if (dst_clip_x < 0) { dst_clip_w += dst_clip_x; dst_clip_x = 0; } if (dst_clip_w <= 0) return; if (dst_clip_x >= dst_w) return; if (dst_clip_x < dst_region_x) { dst_clip_w += (dst_clip_x - dst_region_x); dst_clip_x = dst_region_x; } if ((dst_clip_x + dst_clip_w) > dst_w) { dst_clip_w = dst_w - dst_clip_x; } if (dst_clip_w <= 0) return; /* sanitise y */ if (src_region_y < 0) { dst_region_y -= (src_region_y * dst_region_h) / src_region_h; dst_region_h += (src_region_y * dst_region_h) / src_region_h; src_region_h += src_region_y; src_region_y = 0; } if (src_region_y >= src_h) return; if ((src_region_y + src_region_h) > src_h) { dst_region_h = (dst_region_h * (src_h - src_region_y)) / (src_region_h); src_region_h = src_h - src_region_y; } if (dst_region_h <= 0) return; if (src_region_h <= 0) return; if (dst_clip_y < 0) { dst_clip_h += dst_clip_y; dst_clip_y = 0; } if (dst_clip_h <= 0) return; if (dst_clip_y >= dst_h) return; if (dst_clip_y < dst_region_y) { dst_clip_h += (dst_clip_y - dst_region_y); dst_clip_y = dst_region_y; } if ((dst_clip_y + dst_clip_h) > dst_h) { dst_clip_h = dst_h - dst_clip_y; } if (dst_clip_h <= 0) return; /* allocate scale lookup tables */ lin_ptr = alloca(dst_clip_w * sizeof(int)); row_ptr = alloca(dst_clip_h * sizeof(DATA32 *)); /* figure out dst jump */ //dst_jump = dst_w - dst_clip_w; /* figure out dest start ptr */ dst_ptr = dst_data + dst_clip_x + (dst_clip_y * dst_w); if (dc->mask.mask) { func = evas_common_gfx_func_composite_pixel_mask_span_get(src, dst, dst_clip_w, dc->render_op); maskobj = dc->mask.mask; mask = maskobj->mask.mask; /* if (1 || dst_region_w > src_region_w || dst_region_h > src_region_h){ printf("Mask w/h: %d/%d\n",maskobj->cache_entry.w, maskobj->cache_entry.h); printf("Warning: Unscaled mask (%d/%d) // (%d/%d)\n", dst_region_w,src_region_w, dst_region_h,src_region_h); } */ } else if (dc->mul.use) func = evas_common_gfx_func_composite_pixel_color_span_get(src, dc->mul.col, dst, dst_clip_w, dc->render_op); else func = evas_common_gfx_func_composite_pixel_span_get(src, dst, dst_clip_w, dc->render_op); if ((dst_region_w == src_region_w) && (dst_region_h == src_region_h)) { #ifdef HAVE_PIXMAN # ifdef PIXMAN_IMAGE_SCALE_SAMPLE if ((src->pixman.im) && (dst->pixman.im) && (!dc->mask.mask) && ((!dc->mul.use) || ((dc->mul.use) && (dc->mul.col == 0xffffffff))) && ((dc->render_op == _EVAS_RENDER_COPY) || (dc->render_op == _EVAS_RENDER_BLEND))) { pixman_op_t op = PIXMAN_OP_SRC; // _EVAS_RENDER_COPY if (dc->render_op == _EVAS_RENDER_BLEND) op = PIXMAN_OP_OVER; pixman_image_composite(op, src->pixman.im, NULL, dst->pixman.im, (dst_clip_x - dst_region_x) + src_region_x, (dst_clip_y - dst_region_y) + src_region_y, 0, 0, dst_clip_x, dst_clip_y, dst_clip_w, dst_clip_h); } else if ((src->pixman.im) && (dst->pixman.im) && (dc->mask.mask) && (dc->mask.mask->pixman.im) && ((dc->render_op == _EVAS_RENDER_COPY) || (dc->render_op == _EVAS_RENDER_BLEND))) { // In case of pixel and color operation. pixman_op_t op = PIXMAN_OP_SRC; // _EVAS_RENDER_COPY if (dc->render_op == _EVAS_RENDER_BLEND) op = PIXMAN_OP_OVER; pixman_image_composite(op, src->pixman.im, dc->mask.mask->pixman.im, dst->pixman.im, (dst_clip_x - dst_region_x) + src_region_x, (dst_clip_y - dst_region_y) + src_region_y, 0, 0, dst_clip_x, dst_clip_y, dst_clip_w, dst_clip_h); } else # endif #endif { ptr = src_data + ((dst_clip_y - dst_region_y + src_region_y) * src_w) + (dst_clip_x - dst_region_x) + src_region_x; if (mask) { mdx = (m_clip_x - dc->mask.x) + (m_clip_x - dst_clip_x); mdy = (m_clip_y - dc->mask.y) + (m_clip_y - dst_clip_y); mask += mdx + (mdy * maskobj->cache_entry.w); } for (y = 0; y < dst_clip_h; y++) { /* * blend here [clip_w *] ptr -> dst_ptr * */ func(ptr, mask, dc->mul.col, dst_ptr, dst_clip_w); ptr += src_w; dst_ptr += dst_w; if (mask) mask += maskobj->cache_entry.w; } } } else { /* fill scale tables */ for (x = 0; x < dst_clip_w; x++) lin_ptr[x] = (((x + dst_clip_x - dst_region_x) * src_region_w) / dst_region_w) + src_region_x; for (y = 0; y < dst_clip_h; y++) row_ptr[y] = src_data + (((((y + dst_clip_y - dst_region_y) * src_region_h) / dst_region_h) + src_region_y) * src_w); /* scale to dst */ dptr = dst_ptr; #ifdef DIRECT_SCALE if ((!src->cache_entry.flags.alpha) && (!dst->cache_entry.flags.alpha) && (!dc->mul.use)) { for (y = 0; y < dst_clip_h; y++) { dst_ptr = dptr; for (x = 0; x < dst_clip_w; x++) { ptr = row_ptr[y] + lin_ptr[x]; *dst_ptr = *ptr; dst_ptr++; } dptr += dst_w; } } else #endif { /* a scanline buffer */ buf = alloca(dst_clip_w * sizeof(DATA32)); for (y = 0; y < dst_clip_h; y++) { dst_ptr = buf; for (x = 0; x < dst_clip_w; x++) { ptr = row_ptr[y] + lin_ptr[x]; *dst_ptr = *ptr; dst_ptr++; } /* * blend here [clip_w *] buf -> dptr * */ func(buf, NULL, dc->mul.col, dptr, dst_clip_w); dptr += dst_w; } } } } #else #ifdef BUILD_SCALE_SMOOTH EAPI void evas_common_scale_rgba_in_to_out_clip_sample(RGBA_Image *src, RGBA_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) { evas_common_scale_rgba_in_to_out_clip_smooth(src, dst, dc, src_region_x, src_region_y, src_region_w, src_region_h, dst_region_x, dst_region_y, dst_region_w, dst_region_h); } EAPI void evas_common_scale_rgba_in_to_out_clip_sample_do(const Cutout_Rects *reuse, const Eina_Rectangle *clip, RGBA_Image *src, RGBA_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) { evas_common_scale_rgba_in_to_out_clip_smooth_do(reuse, clip, src, dst, dc, src_region_x, src_region_y, src_region_w, src_region_h, dst_region_x, dst_region_y, dst_region_w, dst_region_h); } #endif #endif evas-1.7.9/src/lib/engines/common/evas_line.h0000664000175000017500000000041212175475547016022 00000000000000#ifndef _EVAS_LINE_H #define _EVAS_LINE_H EAPI void evas_common_line_init (void); EAPI void evas_common_line_draw (RGBA_Image *dst, RGBA_Draw_Context *dc, int x1, int y1, int x2, int y2); #endif /* _EVAS_LINE_H */ evas-1.7.9/src/lib/engines/common/evas_convert_rgb_24.h0000664000175000017500000000114212175475547017713 00000000000000#ifndef _EVAS_CONVERT_RGB_24_H #define _EVAS_CONVERT_RGB_24_H void evas_common_convert_rgba_to_24bpp_rgb_888 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); void evas_common_convert_rgba_to_24bpp_bgr_888 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); void evas_common_convert_rgba_to_24bpp_rgb_666 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); #endif /* _EVAS_CONVERT_RGB_24_H */ evas-1.7.9/src/lib/engines/common/evas_convert_rgb_8.h0000664000175000017500000000237312175475547017644 00000000000000#ifndef _EVAS_CONVERT_RGB_8_H #define _EVAS_CONVERT_RGB_8_H void evas_common_convert_rgba_to_8bpp_rgb_332_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); void evas_common_convert_rgba_to_8bpp_rgb_666_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); void evas_common_convert_rgba_to_8bpp_rgb_232_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); void evas_common_convert_rgba_to_8bpp_rgb_222_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); void evas_common_convert_rgba_to_8bpp_rgb_221_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); void evas_common_convert_rgba_to_8bpp_rgb_121_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); void evas_common_convert_rgba_to_8bpp_rgb_111_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); #endif /* _EVAS_CONVERT_RGB_8_H */ evas-1.7.9/src/lib/engines/common/evas_convert_rgb_16.h0000664000175000017500000001532112175475547017720 00000000000000#ifndef _EVAS_CONVERT_RGB_16_H #define _EVAS_CONVERT_RGB_16_H void evas_common_convert_rgba2_to_16bpp_rgb_565_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); void evas_common_convert_rgba_to_16bpp_rgb_565_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); void evas_common_convert_rgba2_to_16bpp_bgr_565_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); void evas_common_convert_rgba_to_16bpp_bgr_565_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); void evas_common_convert_rgba2_to_16bpp_rgb_444_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); void evas_common_convert_rgba_to_16bpp_rgb_444_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); void evas_common_convert_rgba2_to_16bpp_rgb_454645_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); void evas_common_convert_rgba_to_16bpp_rgb_454645_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); void evas_common_convert_rgba2_to_16bpp_rgb_555_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); void evas_common_convert_rgba_to_16bpp_rgb_555_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); void evas_common_convert_rgba2_to_16bpp_rgb_565_dith_rot_180 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); void evas_common_convert_rgba_to_16bpp_rgb_565_dith_rot_180 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); void evas_common_convert_rgba2_to_16bpp_bgr_565_dith_rot_180 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); void evas_common_convert_rgba_to_16bpp_bgr_565_dith_rot_180 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); void evas_common_convert_rgba2_to_16bpp_rgb_444_dith_rot_180 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); void evas_common_convert_rgba_to_16bpp_rgb_444_dith_rot_180 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); void evas_common_convert_rgba2_to_16bpp_rgb_454645_dith_rot_180 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); void evas_common_convert_rgba_to_16bpp_rgb_454645_dith_rot_180 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); void evas_common_convert_rgba2_to_16bpp_rgb_555_dith_rot_180 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); void evas_common_convert_rgba_to_16bpp_rgb_555_dith_rot_180 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); void evas_common_convert_rgba2_to_16bpp_rgb_565_dith_rot_270 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); void evas_common_convert_rgba_to_16bpp_rgb_565_dith_rot_270 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); void evas_common_convert_rgba2_to_16bpp_bgr_565_dith_rot_270 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); void evas_common_convert_rgba_to_16bpp_bgr_565_dith_rot_270 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); void evas_common_convert_rgba2_to_16bpp_rgb_444_dith_rot_270 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); void evas_common_convert_rgba_to_16bpp_rgb_444_dith_rot_270 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); void evas_common_convert_rgba2_to_16bpp_rgb_454645_dith_rot_270 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); void evas_common_convert_rgba_to_16bpp_rgb_454645_dith_rot_270 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); void evas_common_convert_rgba2_to_16bpp_rgb_555_dith_rot_270 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); void evas_common_convert_rgba_to_16bpp_rgb_555_dith_rot_270 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); void evas_common_convert_rgba2_to_16bpp_rgb_565_dith_rot_90 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); void evas_common_convert_rgba_to_16bpp_rgb_565_dith_rot_90 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); void evas_common_convert_rgba2_to_16bpp_bgr_565_dith_rot_90 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); void evas_common_convert_rgba_to_16bpp_bgr_565_dith_rot_90 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); void evas_common_convert_rgba2_to_16bpp_rgb_444_dith_rot_90 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); void evas_common_convert_rgba_to_16bpp_rgb_444_dith_rot_90 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); void evas_common_convert_rgba2_to_16bpp_rgb_454645_dith_rot_90 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); void evas_common_convert_rgba_to_16bpp_rgb_454645_dith_rot_90 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); void evas_common_convert_rgba2_to_16bpp_rgb_555_dith_rot_90 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); void evas_common_convert_rgba_to_16bpp_rgb_555_dith_rot_90 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); #endif /* _EVAS_CONVERT_RGB_16_H */ evas-1.7.9/src/lib/engines/common/evas_font.h0000664000175000017500000001562712213647747016053 00000000000000#ifndef _EVAS_FONT_H #define _EVAS_FONT_H #include "evas_text_utils.h" /* The tangent of the slant angle we do on runtime. */ #define _EVAS_FONT_SLANT_TAN 0.221694663 /* main */ EAPI void evas_common_font_init (void); EAPI void evas_common_font_shutdown (void); EAPI void evas_common_font_font_all_unload (void); EAPI int evas_common_font_ascent_get (RGBA_Font *fn); EAPI int evas_common_font_descent_get (RGBA_Font *fn); EAPI int evas_common_font_max_ascent_get (RGBA_Font *fn); EAPI int evas_common_font_max_descent_get (RGBA_Font *fn); EAPI int evas_common_font_instance_ascent_get (RGBA_Font_Int *fi); EAPI int evas_common_font_instance_descent_get (RGBA_Font_Int *fi); EAPI int evas_common_font_instance_max_ascent_get (RGBA_Font_Int *fi); EAPI int evas_common_font_instance_max_descent_get (RGBA_Font_Int *fi); EAPI int evas_common_font_get_line_advance (RGBA_Font *fn); /* draw */ EAPI void evas_common_font_draw (RGBA_Image *dst, RGBA_Draw_Context *dc, int x, int y, const Evas_Text_Props *intl_props); EAPI int evas_common_font_glyph_search (RGBA_Font *fn, RGBA_Font_Int **fi_ret, Eina_Unicode gl); EAPI RGBA_Font_Glyph *evas_common_font_int_cache_glyph_get (RGBA_Font_Int *fi, FT_UInt index); EAPI Eina_Bool evas_common_font_int_cache_glyph_render(RGBA_Font_Glyph *fg); EAPI FT_UInt evas_common_get_char_index (RGBA_Font_Int* fi, Eina_Unicode gl); EAPI void evas_common_font_draw_init (void); EAPI void evas_common_font_draw_prepare (Evas_Text_Props *text_props); EAPI void evas_common_font_draw_do(const Cutout_Rects *reuse, const Eina_Rectangle *clip, RGBA_Gfx_Func func, RGBA_Image *dst, RGBA_Draw_Context *dc, int x, int y, const Evas_Text_Props *text_props); EAPI Eina_Bool evas_common_font_draw_prepare_cutout(Cutout_Rects *reuse, RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Gfx_Func *func); /* load */ EAPI void evas_common_font_dpi_set (int dpi); EAPI RGBA_Font_Source *evas_common_font_source_memory_load (const char *name, const void *data, int data_size); EAPI RGBA_Font_Source *evas_common_font_source_load (const char *name); EAPI int evas_common_font_source_load_complete (RGBA_Font_Source *fs); EAPI RGBA_Font_Source *evas_common_font_source_find (const char *name); EAPI void evas_common_font_source_free (RGBA_Font_Source *fs); EAPI void evas_common_font_size_use (RGBA_Font *fn); EAPI RGBA_Font_Int *evas_common_font_int_load (const char *name, int size, Font_Rend_Flags wanted_rend); EAPI RGBA_Font_Int *evas_common_font_int_load_init (RGBA_Font_Int *fn); EAPI RGBA_Font_Int *evas_common_font_int_load_complete (RGBA_Font_Int *fi); EAPI RGBA_Font *evas_common_font_memory_load (const char *source, const char *name, int size, const void *data, int data_size, Font_Rend_Flags wanted_rend); EAPI RGBA_Font *evas_common_font_load (const char *name, int size, Font_Rend_Flags wanted_rend); EAPI RGBA_Font *evas_common_font_add (RGBA_Font *fn, const char *name, int size, Font_Rend_Flags wanted_rend); EAPI RGBA_Font *evas_common_font_memory_add (RGBA_Font *fn, const char *source, const char *name, int size, const void *data, int data_size, Font_Rend_Flags wanted_rend); EAPI void evas_common_font_free (RGBA_Font *fn); EAPI void evas_common_font_int_unref (RGBA_Font_Int *fi); EAPI void evas_common_font_hinting_set (RGBA_Font *fn, Font_Hint_Flags hinting); EAPI Eina_Bool evas_common_hinting_available (Font_Hint_Flags hinting); EAPI RGBA_Font *evas_common_font_memory_hinting_load (const char *source, const char *name, int size, const void *data, int data_size, Font_Hint_Flags hinting, Font_Rend_Flags wanted_rend); EAPI RGBA_Font *evas_common_font_hinting_load (const char *name, int size, Font_Hint_Flags hinting, Font_Rend_Flags wanted_rend); EAPI RGBA_Font *evas_common_font_hinting_add (RGBA_Font *fn, const char *name, int size, Font_Hint_Flags hinting, Font_Rend_Flags wanted_rend); EAPI RGBA_Font *evas_common_font_memory_hinting_add (RGBA_Font *fn, const char *source, const char *name, int size, const void *data, int data_size, Font_Hint_Flags hinting, Font_Rend_Flags wanted_rend); EAPI void evas_common_font_int_modify_cache_by (RGBA_Font_Int *fi, int dir); EAPI int evas_common_font_cache_get (void); EAPI void evas_common_font_cache_set (int size); EAPI void evas_common_font_flush (void); EAPI void evas_common_font_flush_last (void); EAPI RGBA_Font_Int *evas_common_font_int_find (const char *name, int size, Font_Rend_Flags wanted_rend); EAPI void evas_common_font_all_clear (void); /* query */ EAPI int evas_common_font_query_kerning (RGBA_Font_Int* fi, FT_UInt left, FT_UInt right, int* kerning); EAPI void evas_common_font_query_size (RGBA_Font *fn, const Evas_Text_Props *intl_props, int *w, int *h); EAPI int evas_common_font_query_inset (RGBA_Font *fn __UNUSED__, const Evas_Text_Props *text_props); EAPI int evas_common_font_query_right_inset (RGBA_Font *fn __UNUSED__, const Evas_Text_Props *text_props); EAPI void evas_common_font_query_advance (RGBA_Font *fn, const Evas_Text_Props *intl_props, int *h_adv, int *v_adv); EAPI int evas_common_font_query_char_coords (RGBA_Font *fn, const Evas_Text_Props *intl_props, int pos, int *cx, int *cy, int *cw, int *ch); EAPI int evas_common_font_query_pen_coords (RGBA_Font *fn, const Evas_Text_Props *intl_props, int pos, int *cpen_x, int *cy, int *cadv, int *ch); EAPI int evas_common_font_query_char_at_coords (RGBA_Font *fn, const Evas_Text_Props *intl_props, int x, int y, int *cx, int *cy, int *cw, int *ch); EAPI int evas_common_font_query_last_up_to_pos (RGBA_Font *fn, const Evas_Text_Props *intl_props, int x, int y); EAPI int evas_common_font_query_run_font_end_get(RGBA_Font *fn, RGBA_Font_Int **script_fi, RGBA_Font_Int **cur_fi, Evas_Script_Type script, const Eina_Unicode *text, int run_len); EAPI void evas_common_font_ascent_descent_get(RGBA_Font *fn, const Evas_Text_Props *text_props, int *ascent, int *descent); void evas_common_font_load_init(void); void evas_common_font_load_shutdown(void); #endif /* _EVAS_FONT_H */ evas-1.7.9/src/lib/engines/common/evas_image_main.c0000664000175000017500000006230712175475547017167 00000000000000#ifdef HAVE_CONFIG_H # include "config.h" /* so that EAPI in Eet.h is correctly defined */ #endif #ifdef BUILD_LOADER_EET # include #endif #include "evas_common.h" #include "evas_private.h" #include "evas_image_private.h" #include "evas_convert_yuv.h" #include "evas_cs.h" #ifdef HAVE_VALGRIND # include #endif //#define SURFDBG 1 static Evas_Cache_Image * eci = NULL; #ifdef EVAS_CSERVE2 static Evas_Cache2 * eci2 = NULL; #endif static int reference = 0; /* static RGBA_Image *evas_rgba_line_buffer = NULL; */ #define EVAS_RGBA_LINE_BUFFER_MIN_LEN 256 #define EVAS_RGBA_LINE_BUFFER_MAX_LEN 2048 /* static RGBA_Image *evas_alpha_line_buffer = NULL; */ #define EVAS_ALPHA_LINE_BUFFER_MIN_LEN 256 #define EVAS_ALPHA_LINE_BUFFER_MAX_LEN 2048 static Image_Entry *_evas_common_rgba_image_new(void); static void _evas_common_rgba_image_delete(Image_Entry *ie); static int _evas_common_rgba_image_surface_alloc(Image_Entry *ie, unsigned int w, unsigned int h); static void _evas_common_rgba_image_surface_delete(Image_Entry *ie); static DATA32 *_evas_common_rgba_image_surface_pixels(Image_Entry *ie); static void _evas_common_rgba_image_unload(Image_Entry *im); static void _evas_common_rgba_image_dirty_region(Image_Entry *im, unsigned int x, unsigned int y, unsigned int w, unsigned int h); static int _evas_common_rgba_image_ram_usage(Image_Entry *ie); /* Only called when references > 0. Need to provide a fresh copie of im. */ /* The destination surface does have a surface, but no allocated pixel data. */ static int _evas_common_rgba_image_dirty(Image_Entry* dst, const Image_Entry* src); #if 0 static void _evas_common_rgba_image_debug(const char* context, Image_Entry *eim) { DBG("%p = [%s] {%s,%s} %i [%i|%i]", eim, context, eim->file, eim->key, eim->references, eim->w, eim->h); } #endif static const Evas_Cache_Image_Func _evas_common_image_func = { _evas_common_rgba_image_new, _evas_common_rgba_image_delete, _evas_common_rgba_image_surface_alloc, _evas_common_rgba_image_surface_delete, _evas_common_rgba_image_surface_pixels, evas_common_load_rgba_image_module_from_file, _evas_common_rgba_image_unload, _evas_common_rgba_image_dirty_region, _evas_common_rgba_image_dirty, evas_common_rgba_image_size_set, evas_common_rgba_image_from_copied_data, evas_common_rgba_image_from_data, evas_common_rgba_image_colorspace_set, evas_common_load_rgba_image_data_from_file, _evas_common_rgba_image_ram_usage, /* _evas_common_rgba_image_debug */ NULL }; #ifdef EVAS_CSERVE2 static const Evas_Cache2_Image_Func _evas_common_image_func2 = { // _evas_common_rgba_image_new, // _evas_common_rgba_image_delete, _evas_common_rgba_image_surface_alloc, _evas_common_rgba_image_surface_delete, _evas_common_rgba_image_surface_pixels, // evas_common_load_rgba_image_module_from_file, // _evas_common_rgba_image_unload, NULL, // _evas_common_rgba_image_dirty_region, NULL, // _evas_common_rgba_image_dirty, evas_common_rgba_image_size_set, evas_common_rgba_image_from_copied_data, evas_common_rgba_image_from_data, NULL, // evas_common_rgba_image_colorspace_set, // evas_common_load_rgba_image_data_from_file, _evas_common_rgba_image_ram_usage, /* _evas_common_rgba_image_debug */ NULL }; #endif EAPI void evas_common_image_init(void) { if (!eci) eci = evas_cache_image_init(&_evas_common_image_func); #ifdef EVAS_CSERVE2 if (!eci2) eci2 = evas_cache2_init(&_evas_common_image_func2); #endif reference++; //// ERR("REF++=%i", reference); #ifdef BUILD_LOADER_EET eet_init(); #endif evas_common_scalecache_init(); } EAPI void evas_common_image_shutdown(void) { if (--reference == 0) { //// printf("REF--=%i\n", reference); // DISABLE for now - something wrong with cache shutdown freeing things // still in use - rage_thumb segv's now. // // actually - i think i see it. cache ref goes to 0 (and thus gets freed) // because in eng_setup() when a buffer changes size it is FIRST freed // THEN allocated again - thus brignhjing ref to 0 then back to 1 immediately // where it should stay at 1. - see evas_engine.c in the buffer enigne for // example. eng_output_free() is called BEFORE _output_setup(). although this // is only a SIGNE of the problem. we can patch this up with either freeing // after the setup (so we just pt a ref of 2 then back to 1), or just // evas_common_image_init() at the start and evas_common_image_shutdown() // after it all. really ref 0 should only be reached when no more canvases // with no more objects exist anywhere. // ENABLE IT AGAIN, hope it is fixed. Gustavo @ January 22nd, 2009. evas_cache_image_shutdown(eci); eci = NULL; #ifdef EVAS_CSERVE2 evas_cache2_shutdown(eci2); eci2 = NULL; #endif } #ifdef BUILD_LOADER_EET eet_shutdown(); #endif evas_common_scalecache_shutdown(); } EAPI void evas_common_image_image_all_unload(void) { evas_common_rgba_image_scalecache_dump(); evas_cache_image_unload_all(eci); } static Image_Entry * _evas_common_rgba_image_new(void) { RGBA_Image *im; im = calloc(1, sizeof(RGBA_Image)); if (!im) return NULL; im->flags = RGBA_IMAGE_NOTHING; im->ref = 1; evas_common_rgba_image_scalecache_init(&im->cache_entry); return &im->cache_entry; } static void _evas_common_rgba_image_delete(Image_Entry *ie) { RGBA_Image *im = (RGBA_Image *)ie; #ifdef BUILD_PIPE_RENDER evas_common_pipe_free(im); #endif evas_common_rgba_image_scalecache_shutdown(&im->cache_entry); if (ie->info.module) evas_module_unref((Evas_Module *)ie->info.module); /* memset the image to 0x99 because i recently saw a segv where an * seemed to be used BUT its contents were wrong - it looks like it was * overwritten by something from efreet - as there was an execute command * for a command there and some other signs - but to make sure, I am * going to empty this struct out in case this happens again so i know * that something else is overwritign this struct - or not */ // memset(im, 0x99, sizeof(im)); #ifdef EVAS_CSERVE if (ie->data1) evas_cserve_image_free(ie); #endif #ifdef EVAS_CSERVE2 if (ie->data1) ERR("Shouldn't reach this point since we are using cache2: '%s' '%s'", ie->file, ie->key); // if (ie->data1) evas_cserve2_image_free(ie); #endif /* * FIXME: This doesn't seem to be needed... But I'm not sure why. * -- nash { Filtered_Image *fi; EINA_LIST_FREE(im->filtered, fi) { free(fi->key); _evas_common_rgba_image_delete((Image_Entry *)(fi->image)); free(fi); } } */ if (ie->frames) { Eina_List *l; Image_Entry_Frame *frame; EINA_LIST_FOREACH(ie->frames, l, frame) { if (frame) { if (frame->data) free(frame->data); if (frame->info) free(frame->info); free (frame); } } } free(im); } EAPI void evas_common_rgba_image_free(Image_Entry *ie) { _evas_common_rgba_image_surface_delete(ie); _evas_common_rgba_image_delete(ie); } #ifdef SURFDBG static Eina_List *surfs = NULL; static void surf_debug(void) { Eina_List *l; Image_Entry *ie; RGBA_Image *im; int i = 0; printf("----SURFS----\n"); EINA_LIST_FOREACH(surfs, l, ie) { im = ie; printf("%i - %p - %ix%i [%s][%s]\n", i, im->image.data, ie->allocated.w, ie->allocated.h, ie->file, ie->key ); i++; } } #endif EAPI void evas_common_rgba_image_unload(Image_Entry *ie) { RGBA_Image *im = (RGBA_Image *) ie; if (!ie->flags.loaded) return; if ((!ie->info.module) && (!ie->data1)) return; if (!ie->file) return; ie->flags.loaded = 0; if ((im->cs.data) && (im->image.data)) { if (im->cs.data != im->image.data) { if (!im->cs.no_free) free(im->cs.data); } } else if (im->cs.data) { if (!im->cs.no_free) free(im->cs.data); } im->cs.data = NULL; #ifdef EVAS_CSERVE if (ie->data1) { evas_cserve_image_useless(ie); im->image.data = NULL; ie->allocated.w = 0; ie->allocated.h = 0; ie->flags.loaded = 0; #ifdef BUILD_ASYNC_PRELOAD ie->flags.preload_done = 0; #endif return; } #endif #ifdef EVAS_CSERVE2 if (ie->data1) { ERR("Shouldn't reach this point since we are using cache2."); // evas_cserve2_image_unload(ie); // im->image.data = NULL; // ie->allocated.w = 0; // ie->allocated.h = 0; // ie->flags.loaded = 0; #ifdef BUILD_ASYNC_PRELOAD ie->flags.preload_done = 0; #endif return; } #endif if (im->image.data && !im->image.no_free) { free(im->image.data); #ifdef SURFDBG surfs = eina_list_remove(surfs, ie); #endif } im->image.data = NULL; ie->allocated.w = 0; ie->allocated.h = 0; ie->flags.loaded = 0; #ifdef BUILD_ASYNC_PRELOAD ie->flags.preload_done = 0; #endif #ifdef SURFDBG surf_debug(); #endif } void _evas_common_rgba_image_post_surface(Image_Entry *ie) { #ifdef HAVE_PIXMAN # ifdef PIXMAN_IMAGE RGBA_Image *im = (RGBA_Image *)ie; int w, h; if (im->pixman.im) pixman_image_unref(im->pixman.im); w = ie->allocated.w; h = ie->allocated.h; if ((w <= 0) || (h <= 0)) { w = im->cache_entry.w; h = im->cache_entry.h; } if (im->cache_entry.flags.alpha) { im->pixman.im = pixman_image_create_bits ( // FIXME: endianess determines this PIXMAN_a8r8g8b8, // PIXMAN_b8g8r8a8, w, h, im->image.data, w * 4); } else { im->pixman.im = pixman_image_create_bits ( // FIXME: endianess determines this PIXMAN_x8r8g8b8, // PIXMAN_b8g8r8x8, w, h, im->image.data, w * 4); } # else (void)ie; # endif #else (void)ie; #endif } static int _evas_common_rgba_image_surface_alloc(Image_Entry *ie, unsigned int w, unsigned int h) { RGBA_Image *im = (RGBA_Image *) ie; size_t siz = 0; #ifdef EVAS_CSERVE if (ie->data1) return 0; #endif #ifdef EVAS_CSERVE2 if (ie->data1) return 0; #endif if (im->image.no_free) return 0; if (im->flags & RGBA_IMAGE_ALPHA_ONLY) siz = w * h * sizeof(DATA8); else siz = w * h * sizeof(DATA32); if (im->image.data) { free(im->image.data); #ifdef SURFDBG surfs = eina_list_remove(surfs, ie); #endif } im->image.data = malloc(siz); if (!im->image.data) return -1; ie->allocated.w = w; ie->allocated.h = h; #ifdef SURFDBG surfs = eina_list_append(surfs, ie); #endif #ifdef HAVE_VALGRIND # ifdef VALGRIND_MAKE_READABLE VALGRIND_MAKE_READABLE(im->image.data, siz); # else # ifdef VALGRIND_MAKE_MEM_DEFINED VALGRIND_MAKE_MEM_DEFINED(im->image.data, siz); # endif # endif #endif _evas_common_rgba_image_post_surface(ie); #ifdef SURFDBG surf_debug(); #endif return 0; } static void _evas_common_rgba_image_surface_delete(Image_Entry *ie) { RGBA_Image *im = (RGBA_Image *) ie; #ifdef HAVE_PIXMAN # ifdef PIXMAN_IMAGE if (im->pixman.im) { pixman_image_unref(im->pixman.im); im->pixman.im = NULL; } # endif #endif if (ie->file) DBG("unload: [%p] %s %s", ie, ie->file, ie->key); if ((im->cs.data) && (im->image.data)) { if (im->cs.data != im->image.data) { if (!im->cs.no_free) free(im->cs.data); } } else if (im->cs.data) { if (!im->cs.no_free) free(im->cs.data); } im->cs.data = NULL; if (im->image.data && !im->image.no_free) { free(im->image.data); #ifdef SURFDBG surfs = eina_list_remove(surfs, ie); #endif } #ifdef EVAS_CSERVE else if (ie->data1) evas_cserve_image_free(ie); #endif // #ifdef EVAS_CSERVE2 // else if (ie->data1) // ERR("Shouldn't reach this point since we are using cache2."); // // evas_cserve2_image_free(ie); // #endif im->image.data = NULL; ie->allocated.w = 0; ie->allocated.h = 0; #ifdef BUILD_ASYNC_PRELOAD ie->flags.preload_done = 0; #endif ie->flags.loaded = 0; evas_common_rgba_image_scalecache_dirty(&im->cache_entry); #ifdef SURFDBG surf_debug(); #endif } static void _evas_common_rgba_image_unload(Image_Entry *im) { // DBG("unload: [%p] %s %s", im, im->file, im->key); evas_common_rgba_image_scalecache_dirty(im); evas_common_rgba_image_unload(im); } static void _evas_common_rgba_image_dirty_region(Image_Entry* ie, unsigned int x __UNUSED__, unsigned int y __UNUSED__, unsigned int w __UNUSED__, unsigned int h __UNUSED__) { RGBA_Image *im = (RGBA_Image *) ie; #ifdef EVAS_CSERVE if (ie->data1) evas_cserve_image_free(ie); #endif #ifdef EVAS_CSERVE2 // if (ie->data1) evas_cserve2_image_free(ie); if (ie->data1) ERR("Shouldn't reach this point since we are using cache2."); #endif im->flags |= RGBA_IMAGE_IS_DIRTY; evas_common_rgba_image_scalecache_dirty(&im->cache_entry); } /* Only called when references > 0. Need to provide a fresh copie of im. */ static int _evas_common_rgba_image_dirty(Image_Entry *ie_dst, const Image_Entry *ie_src) { RGBA_Image *dst = (RGBA_Image *) ie_dst; RGBA_Image *src = (RGBA_Image *) ie_src; evas_common_rgba_image_scalecache_dirty((Image_Entry *)ie_src); evas_common_rgba_image_scalecache_dirty(ie_dst); evas_cache_image_load_data(&src->cache_entry); if (_evas_common_rgba_image_surface_alloc(&dst->cache_entry, src->cache_entry.w, src->cache_entry.h)) { #ifdef EVAS_CSERVE if (ie_src->data1) evas_cserve_image_free((Image_Entry*) ie_src); #endif #ifdef EVAS_CSERVE2 // if (ie_src->data1) evas_cserve2_image_free((Image_Entry*) ie_src); if (ie_src->data1) ERR("Shouldn't reach this point since we are using cache2."); #endif return 1; } #ifdef EVAS_CSERVE if (ie_src->data1) evas_cserve_image_free((Image_Entry*) ie_src); #endif #ifdef EVAS_CSERVE2 // if (ie_src->data1) evas_cserve2_image_free((Image_Entry*) ie_src); if (ie_src->data1) ERR("Shouldn't reach this point since we are using cache2."); #endif evas_common_image_colorspace_normalize(src); evas_common_image_colorspace_normalize(dst); /* evas_common_blit_rectangle(src, dst, 0, 0, src->cache_entry.w, src->cache_entry.h, 0, 0); */ /* evas_common_cpu_end_opt(); */ return 0; } static int _evas_common_rgba_image_ram_usage(Image_Entry *ie) { RGBA_Image *im = (RGBA_Image *)ie; int size = sizeof(struct _RGBA_Image); if (ie->cache_key) size += strlen(ie->cache_key); if (ie->file) size += strlen(ie->file); if (ie->key) size += strlen(ie->key); if (im->image.data) { #if defined(EVAS_CSERVE) if ((!im->image.no_free) || (ie->data1)) #elif defined(EVAS_CSERVE2) if ((!im->image.no_free) || (ie->data1)) #else if ((!im->image.no_free)) #endif size += im->cache_entry.w * im->cache_entry.h * sizeof(DATA32); } size += evas_common_rgba_image_scalecache_usage_get(&im->cache_entry); return size; } static DATA32 * _evas_common_rgba_image_surface_pixels(Image_Entry *ie) { RGBA_Image *im = (RGBA_Image *) ie; return im->image.data; } #if 0 void evas_common_image_surface_alpha_tiles_calc(RGBA_Surface *is, int tsize) { int x, y; DATA32 *ptr; if (is->spans) return; if (!is->im->cache_entry.flags.alpha) return; /* FIXME: dont handle alpha only images yet */ if ((is->im->flags & RGBA_IMAGE_ALPHA_ONLY)) return; if (tsize < 0) tsize = 0; is->spans = calloc(1, sizeof(RGBA_Image_Span *) * is->h); if (!is->spans) return; ptr = is->data; for (y = 0; y < is->h; y++) { RGBA_Image_Span *sp; sp = NULL; for (x = 0; x < is->w; x++) { DATA8 a; a = A_VAL(ptr); if (sp) { if (a == 0) { is->spans[y] = eina_inlist_append(is->spans[y], sp); sp = NULL; } else { sp->w++; if ((sp->v == 2) && (a != 255)) sp->v = 1; } } else { if (a == 255) { sp = calloc(1, sizeof(RGBA_Image_Span)); sp->x = x; sp->w = 1; sp->v = 2; } else if (a > 0) { sp = calloc(1, sizeof(RGBA_Image_Span)); sp->x = x; sp->w = 1; sp->v = 1; } } ptr++; } if (sp) { is->spans[y] = eina_inlist_append(is->spans[y], sp); sp = NULL; } } } #endif /* EAPI void */ /* evas_common_image_surface_dealloc(RGBA_Surface *is) */ /* { */ /* if ((is->data) && (!is->no_free)) */ /* { */ /* free(is->data); */ /* is->data = NULL; */ /* } */ /* } */ static RGBA_Image * evas_common_image_create(unsigned int w, unsigned int h) { RGBA_Image *im; im = (RGBA_Image *) _evas_common_rgba_image_new(); if (!im) return NULL; im->cache_entry.w = w; im->cache_entry.h = h; if (_evas_common_rgba_image_surface_alloc(&im->cache_entry, w, h)) { _evas_common_rgba_image_delete(&im->cache_entry); return NULL; } im->cache_entry.flags.cached = 0; return im; } EAPI RGBA_Image * evas_common_image_alpha_create(unsigned int w, unsigned int h) { RGBA_Image *im; im = (RGBA_Image *) _evas_common_rgba_image_new(); if (!im) return NULL; im->cache_entry.w = w; im->cache_entry.h = h; im->cache_entry.flags.alpha = 1; if (_evas_common_rgba_image_surface_alloc(&im->cache_entry, w, h)) { _evas_common_rgba_image_delete(&im->cache_entry); return NULL; } im->cache_entry.flags.cached = 0; return im; } EAPI RGBA_Image * evas_common_image_new(unsigned int w, unsigned int h, unsigned int alpha) { if (alpha) return evas_common_image_alpha_create(w, h); return evas_common_image_create(w, h); } void evas_common_image_colorspace_normalize(RGBA_Image *im) { if ((!im->cs.data) || ((!im->cs.dirty) && (!(im->flags & RGBA_IMAGE_IS_DIRTY)))) return; switch (im->cache_entry.space) { case EVAS_COLORSPACE_ARGB8888: if (im->image.data != im->cs.data) { #ifdef EVAS_CSERVE if (((Image_Entry *)im)->data1) evas_cserve_image_free(&im->cache_entry); #endif #ifdef EVAS_CSERVE2 // if (((Image_Entry *)im)->data1) evas_cserve2_image_free(&im->cache_entry); if (((Image_Entry *)im)->data1) ERR("Shouldn't reach this point since we are using cache2."); #endif if (!im->image.no_free) { free(im->image.data); #ifdef SURFDBG surfs = eina_list_remove(surfs, im); #endif ((Image_Entry *)im)->allocated.w = 0; ((Image_Entry *)im)->allocated.h = 0; } im->image.data = im->cs.data; im->cs.no_free = im->image.no_free; } break; case EVAS_COLORSPACE_YCBCR422P601_PL: #ifdef BUILD_CONVERT_YUV if ((im->image.data) && (*((unsigned char **)im->cs.data))) evas_common_convert_yuv_420p_601_rgba(im->cs.data, (DATA8*) im->image.data, im->cache_entry.w, im->cache_entry.h); #endif break; case EVAS_COLORSPACE_YCBCR422601_PL: #ifdef BUILD_CONVERT_YUV if ((im->image.data) && (*((unsigned char **)im->cs.data))) evas_common_convert_yuv_422_601_rgba(im->cs.data, (DATA8*) im->image.data, im->cache_entry.w, im->cache_entry.h); #endif break; case EVAS_COLORSPACE_YCBCR420NV12601_PL: #ifdef BUILD_CONVERT_YUV if ((im->image.data) && (*((unsigned char **)im->cs.data))) evas_common_convert_yuv_420_601_rgba(im->cs.data, (DATA8*) im->image.data, im->cache_entry.w, im->cache_entry.h); #endif break; case EVAS_COLORSPACE_YCBCR420TM12601_PL: #ifdef BUILD_CONVERT_YUV if ((im->image.data) && (*((unsigned char **)im->cs.data))) evas_common_convert_yuv_420T_601_rgba(im->cs.data, (DATA8*) im->image.data, im->cache_entry.w, im->cache_entry.h); #endif break; default: break; } im->cs.dirty = 0; #ifdef SURFDBG surf_debug(); #endif } EAPI void evas_common_image_colorspace_dirty(RGBA_Image *im) { im->cs.dirty = 1; evas_common_rgba_image_scalecache_dirty(&im->cache_entry); #ifdef HAVE_PIXMAN # ifdef PIXMAN_IMAGE if (im->pixman.im) { pixman_image_unref(im->pixman.im); im->pixman.im = NULL; } _evas_common_rgba_image_post_surface((Image_Entry *)im); # endif #endif } EAPI void evas_common_image_set_cache(unsigned int size) { if (eci) evas_cache_image_set(eci, size); #ifdef EVAS_CSERVE2 if (eci2) evas_cache2_limit_set(eci2, size); #endif } EAPI int evas_common_image_get_cache(void) { return evas_cache_image_get(eci); } EAPI RGBA_Image * evas_common_load_image_from_file(const char *file, const char *key, RGBA_Image_Loadopts *lo, int *error) { if (!file) { *error = EVAS_LOAD_ERROR_GENERIC; return NULL; } return (RGBA_Image *) evas_cache_image_request(eci, file, key, lo, error); } EAPI void evas_common_image_cache_free(void) { evas_common_image_set_cache(0); } EAPI Evas_Cache_Image* evas_common_image_cache_get(void) { return eci; } #ifdef EVAS_CSERVE2 EAPI Evas_Cache2* evas_common_image_cache2_get(void) { return eci2; } #endif EAPI RGBA_Image * evas_common_image_line_buffer_obtain(int len) { if (len < 1) return NULL; if (len < EVAS_RGBA_LINE_BUFFER_MIN_LEN) len = EVAS_RGBA_LINE_BUFFER_MIN_LEN; return evas_common_image_create(len, 1); /* if (evas_rgba_line_buffer) { if (evas_rgba_line_buffer->image->w >= len) return evas_rgba_line_buffer; evas_rgba_line_buffer->image->data = (DATA32 *)realloc(evas_rgba_line_buffer->image->data, len * sizeof(DATA32)); if (!evas_rgba_line_buffer->image->data) { evas_common_image_free(evas_rgba_line_buffer); evas_rgba_line_buffer = NULL; return NULL; } evas_rgba_line_buffer->image->w = len; return evas_rgba_line_buffer; } evas_rgba_line_buffer = evas_common_image_create(len, 1); if (!evas_rgba_line_buffer) return NULL; return evas_rgba_line_buffer; */ } EAPI void evas_common_image_line_buffer_release(RGBA_Image *im) { _evas_common_rgba_image_delete(&im->cache_entry); /* if (!evas_rgba_line_buffer) return; if (EVAS_RGBA_LINE_BUFFER_MAX_LEN < evas_rgba_line_buffer->image->w) { evas_rgba_line_buffer->image->w = EVAS_RGBA_LINE_BUFFER_MAX_LEN; evas_rgba_line_buffer->image->data = (DATA32 *)realloc(evas_rgba_line_buffer->image->data, evas_rgba_line_buffer->image->w * sizeof(DATA32)); if (!evas_rgba_line_buffer->image->data) { evas_common_image_free(evas_rgba_line_buffer); evas_rgba_line_buffer = NULL; } } */ } EAPI void evas_common_image_line_buffer_free(RGBA_Image *im) { _evas_common_rgba_image_delete(&im->cache_entry); /* if (!evas_rgba_line_buffer) return; evas_common_image_free(evas_rgba_line_buffer); evas_rgba_line_buffer = NULL; */ } EAPI RGBA_Image * evas_common_image_alpha_line_buffer_obtain(int len) { if (len < 1) return NULL; if (len < EVAS_ALPHA_LINE_BUFFER_MIN_LEN) len = EVAS_ALPHA_LINE_BUFFER_MIN_LEN; return evas_common_image_alpha_create(len, 1); /* if (evas_alpha_line_buffer) { if (evas_alpha_line_buffer->image->w >= len) return evas_alpha_line_buffer; evas_alpha_line_buffer->image->data = realloc(evas_alpha_line_buffer->image->data, len * sizeof(DATA8)); if (!evas_alpha_line_buffer->image->data) { evas_common_image_free(evas_alpha_line_buffer); evas_alpha_line_buffer = NULL; return NULL; } evas_alpha_line_buffer->image->w = len; return evas_alpha_line_buffer; } evas_alpha_line_buffer = evas_common_image_alpha_create(len, 1); return evas_alpha_line_buffer; */ } EAPI void evas_common_image_alpha_line_buffer_release(RGBA_Image *im) { _evas_common_rgba_image_delete(&im->cache_entry); /* if (!evas_alpha_line_buffer) return; if (EVAS_ALPHA_LINE_BUFFER_MAX_LEN < evas_alpha_line_buffer->image->w) { evas_alpha_line_buffer->image->w = EVAS_ALPHA_LINE_BUFFER_MAX_LEN; evas_alpha_line_buffer->image->data = realloc(evas_alpha_line_buffer->image->data, evas_alpha_line_buffer->image->w * sizeof(DATA8)); if (!evas_alpha_line_buffer->image->data) { evas_common_image_free(evas_alpha_line_buffer); evas_alpha_line_buffer = NULL; } } */ } EAPI void evas_common_image_premul(Image_Entry *ie) { DATA32 nas = 0; if (!ie) return ; if (!evas_cache_image_pixels(ie)) return ; if (!ie->flags.alpha) return; nas = evas_common_convert_argb_premul(evas_cache_image_pixels(ie), ie->w * ie->h); if ((ALPHA_SPARSE_INV_FRACTION * nas) >= (ie->w * ie->h)) ie->flags.alpha_sparse = 1; } EAPI void evas_common_image_set_alpha_sparse(Image_Entry *ie) { DATA32 *s, *se; DATA32 nas = 0; if (!ie) return; if (!evas_cache_image_pixels(ie)) return ; if (!ie->flags.alpha) return; s = evas_cache_image_pixels(ie); se = s + (ie->w * ie->h); while (s < se) { DATA32 p = *s & 0xff000000; if (!p || (p == 0xff000000)) nas++; s++; } if ((ALPHA_SPARSE_INV_FRACTION * nas) >= (ie->w * ie->h)) ie->flags.alpha_sparse = 1; } evas-1.7.9/src/lib/engines/common/evas_pipe.c0000664000175000017500000006411012175475547016030 00000000000000#include "evas_common.h" #include #ifdef BUILD_PIPE_RENDER # ifdef BUILD_PTHREAD typedef struct _Thinfo { RGBA_Image *im; int thread_num; pthread_t thread_id; pthread_barrier_t *barrier; const Eina_Inlist *tasks; Eina_Array cutout_trash; Eina_Array rects_task; } Thinfo; #endif static RGBA_Pipe *evas_common_pipe_add(RGBA_Pipe *pipe, RGBA_Pipe_Op **op); static void evas_common_pipe_draw_context_copy(RGBA_Draw_Context *dc, RGBA_Pipe_Op *op); static void evas_common_pipe_op_free(RGBA_Pipe_Op *op); /* utils */ static RGBA_Pipe * evas_common_pipe_add(RGBA_Pipe *rpipe, RGBA_Pipe_Op **op) { RGBA_Pipe *p; int first_pipe = 0; if (!rpipe) { first_pipe = 1; p = calloc(1, sizeof(RGBA_Pipe)); if (!p) return NULL; rpipe = (RGBA_Pipe *)eina_inlist_append(EINA_INLIST_GET(rpipe), EINA_INLIST_GET(p)); } p = (RGBA_Pipe *)(EINA_INLIST_GET(rpipe))->last; if (p->op_num == PIPE_LEN) { p = calloc(1, sizeof(RGBA_Pipe)); if (!p) return NULL; rpipe = (RGBA_Pipe *)eina_inlist_append(EINA_INLIST_GET(rpipe), EINA_INLIST_GET(p)); } p->op_num++; *op = &(p->op[p->op_num - 1]); if (first_pipe) { /* FIXME: PTHREAD init any thread locks etc */ } return rpipe; } static void evas_common_pipe_draw_context_copy(RGBA_Draw_Context *dc, RGBA_Pipe_Op *op) { memcpy(&(op->context), dc, sizeof(RGBA_Draw_Context)); if (op->context.cutout.active > 0) { op->context.cutout.rects = malloc(sizeof(Cutout_Rect) * op->context.cutout.active); memcpy(op->context.cutout.rects, dc->cutout.rects, sizeof(Cutout_Rect) * op->context.cutout.active); } else { op->context.cutout.rects = NULL; } } static void evas_common_pipe_op_free(RGBA_Pipe_Op *op) { evas_common_draw_context_apply_clean_cutouts(&op->context.cutout); } #ifdef BUILD_PTHREAD /* main api calls */ static void * evas_common_pipe_thread(void *data) { Thinfo *thinfo; // INF("TH [..........."); thinfo = data; for (;;) { const RGBA_Pipe_Thread_Info *info; RGBA_Pipe *p; /* wait for start signal */ // INF(" TH %i START...", thinfo->thread_num); pthread_barrier_wait(&(thinfo->barrier[0])); EINA_INLIST_FOREACH(thinfo->tasks, info) { EINA_INLIST_FOREACH(EINA_INLIST_GET(thinfo->im->cache_entry.pipe), p) { int i; for (i = 0; i < p->op_num; i++) { if (p->op[i].op_func && p->op[i].render) p->op[i].op_func(thinfo->im, &(p->op[i]), info); } } } thinfo->tasks = NULL; pthread_barrier_wait(&(thinfo->barrier[1])); } return NULL; } #endif #ifdef BUILD_PTHREAD static Eina_List *im_task = NULL; static Eina_List *text_task = NULL; static Thinfo task_thinfo[TH_MAX]; static pthread_barrier_t task_thbarrier[2]; static LK(im_task_mutex); static LK(text_task_mutex); static int thread_num = 0; static Thinfo thinfo[TH_MAX]; static pthread_barrier_t thbarrier[2]; static RGBA_Pipe_Thread_Info *buf = NULL; static unsigned int buf_size = 0; static Cutout_Rects * evas_pipe_cutout_rects_pop(Thinfo *info) { Cutout_Rects *r; r = eina_array_pop(&info->cutout_trash); if (!r) r = evas_common_draw_context_cutouts_new(); return r; } static void evas_pipe_cutout_rects_push(Thinfo *info, Cutout_Rects *r) { /* evas_common_draw_context_apply_clean_cutouts(r); */ evas_common_draw_context_cutouts_free(r); eina_array_push(&info->cutout_trash, r); } static void evas_pipe_cutout_rects_rotate(Cutout_Rects *r) { static int current = 0; if (current >= thread_num) current = 0; evas_pipe_cutout_rects_push(&task_thinfo[current], r); current++; } static void evas_pipe_prepare_push(RGBA_Pipe_Op *op) { static int current = 0; if (current >= thread_num) current = 0; eina_array_push(&task_thinfo[current].rects_task, op); current++; } #endif static void evas_common_pipe_begin(RGBA_Image *im) { #define SZ 128 #ifdef BUILD_PTHREAD unsigned int x, y, cpu; RGBA_Pipe_Thread_Info *info; unsigned int estimatex, estimatey; unsigned int needed_size; if (!im->cache_entry.pipe) return; if (thread_num == 1) return; if (im->cache_entry.w * im->cache_entry.h / thread_num < SZ * SZ) { estimatex = im->cache_entry.w; estimatey = im->cache_entry.h / thread_num; if (estimatey == 0) estimatey = 1; } else { estimatex = SZ; estimatey = SZ; } needed_size = ((im->cache_entry.w / estimatex) + 1 ) * ((im->cache_entry.h / estimatey) + 1); if (buf_size < needed_size) { buf = realloc(buf, sizeof (RGBA_Pipe_Thread_Info) * needed_size); buf_size = needed_size; } info = buf; cpu = 0; for (y = 0; y < im->cache_entry.h; y += estimatey) for (x = 0; x < im->cache_entry.w; x += estimatex) { EINA_RECTANGLE_SET(&info->area, x, y, (x + estimatex > im->cache_entry.w) ? im->cache_entry.w - x : estimatex, (y + estimatey > im->cache_entry.h) ? im->cache_entry.h - y : estimatey); thinfo[cpu].im = im; thinfo[cpu].tasks = eina_inlist_prepend((void*) thinfo[cpu].tasks, EINA_INLIST_GET(info)); cpu++; if (cpu >= (unsigned int) thread_num) cpu = 0; info++; } /* tell worker threads to start */ pthread_barrier_wait(&(thbarrier[0])); #endif } EAPI void evas_common_pipe_flush(RGBA_Image *im) { if (!im->cache_entry.pipe) return; #ifdef BUILD_PTHREAD if (thread_num > 1) { /* sync worker threads */ pthread_barrier_wait(&(thbarrier[1])); } else #endif { RGBA_Pipe_Thread_Info info; RGBA_Pipe *p; int i; EINA_RECTANGLE_SET(&info.area, 0, 0, im->cache_entry.w, im->cache_entry.h); /* process pipe - 1 thead */ for (p = im->cache_entry.pipe; p; p = (RGBA_Pipe *)(EINA_INLIST_GET(p))->next) { for (i = 0; i < p->op_num; i++) { if (p->op[i].render && p->op[i].op_func) { p->op[i].op_func(im, &(p->op[i]), &info); } } } } evas_common_cpu_end_opt(); evas_common_pipe_free(im); } EAPI void evas_common_pipe_free(RGBA_Image *im) { RGBA_Pipe *p; int i; if (!im->cache_entry.pipe) return; /* FIXME: PTHREAD join all threads here (if not finished) */ /* free pipe */ while (im->cache_entry.pipe) { p = im->cache_entry.pipe; for (i = 0; i < p->op_num; i++) { if (p->op[i].free_func) { p->op[i].free_func(&(p->op[i])); } if (p->op[i].rects) evas_pipe_cutout_rects_rotate(p->op[i].rects); } im->cache_entry.pipe = (RGBA_Pipe *)eina_inlist_remove(EINA_INLIST_GET(im->cache_entry.pipe), EINA_INLIST_GET(p)); free(p); } } /* draw ops */ /**************** RECT ******************/ static void evas_common_pipe_rectangle_draw_do(RGBA_Image *dst, const RGBA_Pipe_Op *op, const RGBA_Pipe_Thread_Info *info) { RGBA_Draw_Context context; memcpy(&(context), &(op->context), sizeof(RGBA_Draw_Context)); evas_common_rectangle_draw_do(op->rects, &info->area, dst, &(context), op->op.rect.x, op->op.rect.y, op->op.rect.w, op->op.rect.h); } static Eina_Bool evas_common_pipe_rectangle_prepare(void *data, RGBA_Image *dst, RGBA_Pipe_Op *op) { Cutout_Rects *recycle; Thinfo *info = data; Eina_Bool r; recycle = evas_pipe_cutout_rects_pop(info); r = evas_common_rectangle_draw_prepare(recycle, dst, &(op->context), op->op.rect.x, op->op.rect.y, op->op.rect.w, op->op.rect.h); if (recycle->active) op->rects = recycle; else evas_pipe_cutout_rects_push(info, recycle); return r; } EAPI void evas_common_pipe_rectangle_draw(RGBA_Image *dst, RGBA_Draw_Context *dc, int x, int y, int w, int h) { RGBA_Pipe_Op *op; if ((w < 1) || (h < 1)) return; dst->cache_entry.pipe = evas_common_pipe_add(dst->cache_entry.pipe, &op); if (!dst->cache_entry.pipe) return; op->op.rect.x = x; op->op.rect.y = y; op->op.rect.w = w; op->op.rect.h = h; op->op_func = evas_common_pipe_rectangle_draw_do; op->free_func = evas_common_pipe_op_free; op->prepare_func = evas_common_pipe_rectangle_prepare; evas_pipe_prepare_push(op); evas_common_pipe_draw_context_copy(dc, op); } /**************** LINE ******************/ static void evas_common_pipe_line_draw_do(RGBA_Image *dst, const RGBA_Pipe_Op *op, const RGBA_Pipe_Thread_Info *info) { RGBA_Draw_Context context; memcpy(&(context), &(op->context), sizeof(RGBA_Draw_Context)); evas_common_draw_context_clip_clip(&(context), info->area.x, info->area.y, info->area.w, info->area.h); evas_common_line_draw(dst, &(context), op->op.line.x0, op->op.line.y0, op->op.line.x1, op->op.line.y1); } EAPI void evas_common_pipe_line_draw(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, int x1, int y1) { RGBA_Pipe_Op *op; dst->cache_entry.pipe = evas_common_pipe_add(dst->cache_entry.pipe, &op); if (!dst->cache_entry.pipe) return; op->op.line.x0 = x0; op->op.line.y0 = y0; op->op.line.x1 = x1; op->op.line.y1 = y1; op->op_func = evas_common_pipe_line_draw_do; op->free_func = evas_common_pipe_op_free; op->prepare_func = NULL; op->render = EINA_TRUE; evas_common_pipe_draw_context_copy(dc, op); } /**************** POLY ******************/ static void evas_common_pipe_op_poly_free(RGBA_Pipe_Op *op) { #if 0 RGBA_Polygon_Point *p; while (op->op.poly.points) { p = op->op.poly.points; op->op.poly.points = (RGBA_Polygon_Point *)eina_inlist_remove(EINA_INLIST_GET(op->op.poly.points), EINA_INLIST_GET(p)); free(p); } #endif evas_common_pipe_op_free(op); } static void evas_common_pipe_poly_draw_do(RGBA_Image *dst, const RGBA_Pipe_Op *op, const RGBA_Pipe_Thread_Info *info) { RGBA_Draw_Context context; memcpy(&(context), &(op->context), sizeof(RGBA_Draw_Context)); evas_common_draw_context_clip_clip(&(context), info->area.x, info->area.y, info->area.w, info->area.h); evas_common_polygon_draw(dst, &(context), op->op.poly.points, op->op.poly.x, op->op.poly.y); } EAPI void evas_common_pipe_poly_draw(RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Polygon_Point *points, int x, int y) { RGBA_Pipe_Op *op; /* RGBA_Polygon_Point *pts = NULL, *p, *pp; */ if (!points) return; dst->cache_entry.pipe = evas_common_pipe_add(dst->cache_entry.pipe, &op); if (!dst->cache_entry.pipe) return; /* FIXME: copy points - maybe we should refcount? */ #if 0 for (p = points; p; p = (RGBA_Polygon_Point *)(EINA_INLIST_GET(p))->next) { pp = calloc(1, sizeof(RGBA_Polygon_Point)); if (pp) { pp->x = p->x + x; pp->y = p->y + y; pts = (RGBA_Polygon_Point *)eina_inlist_append(EINA_INLIST_GET(pts), EINA_INLIST_GET(pp)); } } #endif op->op.poly.x = x; op->op.poly.y = y; op->op.poly.points = points/* pts */; op->op_func = evas_common_pipe_poly_draw_do; op->free_func = evas_common_pipe_op_poly_free; op->render = EINA_TRUE; op->prepare_func = NULL; /* FIXME: If we really want to improve it, we should prepare span for it here */ evas_common_pipe_draw_context_copy(dc, op); } /**************** TEXT ******************/ static void evas_common_pipe_op_text_free(RGBA_Pipe_Op *op) { evas_common_text_props_content_unref(op->op.text.intl_props); evas_common_pipe_op_free(op); } static void evas_common_pipe_text_draw_do(RGBA_Image *dst, const RGBA_Pipe_Op *op, const RGBA_Pipe_Thread_Info *info) { RGBA_Draw_Context context; memcpy(&(context), &(op->context), sizeof(RGBA_Draw_Context)); evas_common_font_draw_do(op->rects, &info->area, op->op.text.func, dst, &(context), op->op.text.x, op->op.text.y, op->op.text.intl_props); } static Eina_Bool evas_common_pipe_text_draw_prepare(void *data, RGBA_Image *dst, RGBA_Pipe_Op *op) { Cutout_Rects *recycle; Thinfo *info = data; Eina_Bool r; recycle = evas_pipe_cutout_rects_pop(info); r = evas_common_font_draw_prepare_cutout(recycle, dst, &(op->context), &(op->op.text.func)); if (recycle->active) op->rects = recycle; else evas_pipe_cutout_rects_push(info, recycle); return r; } EAPI void evas_common_pipe_text_draw(RGBA_Image *dst, RGBA_Draw_Context *dc, int x, int y, Evas_Text_Props *intl_props) { RGBA_Pipe_Op *op; dst->cache_entry.pipe = evas_common_pipe_add(dst->cache_entry.pipe, &op); if (!dst->cache_entry.pipe) return; op->op.text.x = x; op->op.text.y = y; op->op.text.intl_props = intl_props; evas_common_text_props_content_ref(intl_props); op->op_func = evas_common_pipe_text_draw_do; op->free_func = evas_common_pipe_op_text_free; op->prepare_func = evas_common_pipe_text_draw_prepare; evas_pipe_prepare_push(op); evas_common_pipe_draw_context_copy(dc, op); evas_common_pipe_text_prepare(intl_props); } /**************** IMAGE *****************/ static void evas_common_pipe_op_image_free(RGBA_Pipe_Op *op) { op->op.image.src->ref--; if (op->op.image.src->ref == 0) { evas_cache_image_drop(&op->op.image.src->cache_entry); } evas_common_pipe_op_free(op); } static Eina_Bool evas_common_pipe_op_image_prepare(void *data, RGBA_Image *dst, RGBA_Pipe_Op *op) { Cutout_Rects *recycle; Thinfo *info = data; Eina_Bool r; recycle = evas_pipe_cutout_rects_pop(info); r = evas_common_scale_rgba_in_to_out_clip_prepare(recycle, op->op.image.src, dst, &(op->context), op->op.image.dx, op->op.image.dy, op->op.image.dw, op->op.image.dh); if (recycle->active) op->rects = recycle; else evas_pipe_cutout_rects_push(info, recycle); return r; } static void evas_common_pipe_image_draw_do(RGBA_Image *dst, const RGBA_Pipe_Op *op, const RGBA_Pipe_Thread_Info *info) { RGBA_Draw_Context context; memcpy(&(context), &(op->context), sizeof(RGBA_Draw_Context)); #ifdef SCALECACHE /* FIXME: Make the scalecache path use the prepared Cutout ? */ evas_common_draw_context_clip_clip(&(context), info->area.x, info->area.y, info->area.w, info->area.h); evas_common_rgba_image_scalecache_do((Image_Entry *)(op->op.image.src), dst, &(context), op->op.image.smooth, op->op.image.sx, op->op.image.sy, op->op.image.sw, op->op.image.sh, op->op.image.dx, op->op.image.dy, op->op.image.dw, op->op.image.dh); #else if (op->op.image.smooth) { evas_common_scale_rgba_in_to_out_clip_smooth_do(op->rects, &info->area, op->op.image.src, dst, &(context), op->op.image.sx, op->op.image.sy, op->op.image.sw, op->op.image.sh, op->op.image.dx, op->op.image.dy, op->op.image.dw, op->op.image.dh); } else { evas_common_scale_rgba_in_to_out_clip_sample_do(op->rects, &info->area, op->op.image.src, dst, &(context), op->op.image.sx, op->op.image.sy, op->op.image.sw, op->op.image.sh, op->op.image.dx, op->op.image.dy, op->op.image.dw, op->op.image.dh); } #endif } EAPI void evas_common_pipe_image_draw(RGBA_Image *src, RGBA_Image *dst, RGBA_Draw_Context *dc, int smooth, 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) { RGBA_Pipe_Op *op; if (!src) return; // evas_common_pipe_flush(src); dst->cache_entry.pipe = evas_common_pipe_add(dst->cache_entry.pipe, &op); if (!dst->cache_entry.pipe) return; op->op.image.smooth = smooth; op->op.image.sx = src_region_x; op->op.image.sy = src_region_y; op->op.image.sw = src_region_w; op->op.image.sh = src_region_h; op->op.image.dx = dst_region_x; op->op.image.dy = dst_region_y; op->op.image.dw = dst_region_w; op->op.image.dh = dst_region_h; src->ref++; op->op.image.src = src; op->op_func = evas_common_pipe_image_draw_do; op->free_func = evas_common_pipe_op_image_free; op->prepare_func = evas_common_pipe_op_image_prepare; evas_pipe_prepare_push(op); evas_common_pipe_draw_context_copy(dc, op); evas_common_pipe_image_load(src); } static void evas_common_pipe_op_map_free(RGBA_Pipe_Op *op) { op->op.map.src->ref--; if (op->op.map.src->ref == 0) evas_cache_image_drop(&op->op.map.src->cache_entry); /* free(op->op.map.p); */ evas_common_pipe_op_free(op); } static void evas_common_pipe_map_draw_do(RGBA_Image *dst, const RGBA_Pipe_Op *op, const RGBA_Pipe_Thread_Info *info) { RGBA_Draw_Context context; memcpy(&(context), &(op->context), sizeof(RGBA_Draw_Context)); evas_common_map_rgba_do(&info->area, op->op.map.src, dst, &context, op->op.map.m, op->op.map.smooth, op->op.map.level); } static Eina_Bool evas_common_pipe_map_draw_prepare(void *data, RGBA_Image *dst, RGBA_Pipe_Op *op) { RGBA_Draw_Context context; Thinfo *info = data; Eina_Bool r; memcpy(&(context), &(op->context), sizeof(RGBA_Draw_Context)); r = evas_common_map_rgba_prepare(op->op.map.src, dst, &context, op->op.map.m); return r; } EAPI void evas_common_pipe_map_draw(RGBA_Image *src, RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Map *m, int smooth, int level) { RGBA_Pipe_Op *op; /* RGBA_Map_Point *pts_copy; */ int i; if (!src) return; /* pts_copy = malloc(sizeof (RGBA_Map_Point) * 4); */ /* if (!pts_copy) return; */ dst->cache_entry.pipe = evas_common_pipe_add(dst->cache_entry.pipe, &op); if (!dst->cache_entry.pipe) { /* free(pts_copy); */ return; } /* for (i = 0; i < 4; ++i) */ /* pts_copy[i] = p[i]; */ op->op.map.smooth = smooth; op->op.map.level = level; src->ref++; op->op.map.src = src; op->op.map.m = m; op->op_func = evas_common_pipe_map_draw_do; op->free_func = evas_common_pipe_op_map_free; op->prepare_func = evas_common_pipe_map_draw_prepare; evas_pipe_prepare_push(op); evas_common_pipe_draw_context_copy(dc, op); evas_common_pipe_image_load(src); } static void evas_common_pipe_map_render(RGBA_Image *root) { RGBA_Pipe *p; int i; /* Map imply that we need to process them recursively first. */ for (p = root->cache_entry.pipe; p; p = (RGBA_Pipe *)(EINA_INLIST_GET(p))->next) { for (i = 0; i < p->op_num; i++) { if (p->op[i].op_func == evas_common_pipe_map_draw_do) { if (p->op[i].op.map.src->cache_entry.pipe) evas_common_pipe_map_render(p->op[i].op.map.src); } else if (p->op[i].op_func == evas_common_pipe_image_draw_do) { if (p->op[i].op.image.src->cache_entry.pipe) evas_common_pipe_map_render(p->op[i].op.image.src); } } } evas_common_pipe_begin(root); evas_common_pipe_flush(root); } #ifdef BUILD_PTHREAD static void* evas_common_pipe_load(void *data) { Thinfo *tinfo; tinfo = data; for (;;) { RGBA_Pipe_Op *op; Eina_Array_Iterator it; unsigned int i; /* wait for start signal */ pthread_barrier_wait(&(tinfo->barrier[0])); while (im_task) { RGBA_Image *im = NULL; LKL(im_task_mutex); im = eina_list_data_get(im_task); im_task = eina_list_remove_list(im_task, im_task); LKU(im_task_mutex); if (im) { if (im->cache_entry.space == EVAS_COLORSPACE_ARGB8888) evas_cache_image_load_data(&im->cache_entry); evas_common_image_colorspace_normalize(im); im->flags &= ~RGBA_IMAGE_TODO_LOAD; } } while (text_task) { Evas_Text_Props *text_props; RGBA_Font_Int *fi; LKL(text_task_mutex); fi = eina_list_data_get(text_task); text_task = eina_list_remove_list(text_task, text_task); LKU(text_task_mutex); if (fi) { LKL(fi->ft_mutex); EINA_LIST_FREE(fi->task, text_props) { evas_common_font_draw_prepare(text_props); text_props->changed = EINA_FALSE; text_props->prepare = EINA_FALSE; } LKU(fi->ft_mutex); } } EINA_ARRAY_ITER_NEXT(&tinfo->rects_task, i, op, it) op->render = op->prepare_func(tinfo, tinfo->im, op); eina_array_clean(&tinfo->rects_task); /* send finished signal */ pthread_barrier_wait(&(tinfo->barrier[1])); } return NULL; } #endif static volatile int bval = 0; static void evas_common_pipe_load_do(RGBA_Image *im) { #ifdef BUILD_PTHREAD int i; for (i = 0; i < thread_num; i++) task_thinfo[i].im = im; /* Notify worker thread. */ pthread_barrier_wait(&(task_thbarrier[0])); /* sync worker threads */ pthread_barrier_wait(&(task_thbarrier[1])); #endif } EAPI void evas_common_pipe_image_load(RGBA_Image *im) { if (im->flags & RGBA_IMAGE_TODO_LOAD) return ; if (im->cache_entry.space == EVAS_COLORSPACE_ARGB8888 && !evas_cache_image_is_loaded(&(im->cache_entry))) goto add_task; if (!((!im->cs.data) || ((!im->cs.dirty) && (!(im->flags & RGBA_IMAGE_IS_DIRTY))))) goto add_task; return ; add_task: LKL(im_task_mutex); im_task = eina_list_append(im_task, im); LKU(im_task_mutex); im->flags |= RGBA_IMAGE_TODO_LOAD; } EAPI void evas_common_pipe_text_prepare(Evas_Text_Props *text_props) { RGBA_Font_Int *fi; fi = text_props->font_instance; if (!fi) return ; if (!text_props->changed && text_props->generation == fi->generation && text_props->glyphs) return ; LKL(fi->ft_mutex); if (!fi->task) { LKL(text_task_mutex); text_task = eina_list_append(text_task, fi); LKU(text_task_mutex); } if (text_props->prepare) goto end; text_props->prepare = EINA_TRUE; fi->task = eina_list_append(fi->task, text_props); end: LKU(fi->ft_mutex); } EAPI void evas_common_pipe_map_begin(RGBA_Image *root) { if (!evas_common_pipe_init()) { RGBA_Image *im; EINA_LIST_FREE(im_task, im) { if (im->cache_entry.space == EVAS_COLORSPACE_ARGB8888) evas_cache_image_load_data(&im->cache_entry); evas_common_image_colorspace_normalize(im); im->flags &= ~RGBA_IMAGE_TODO_LOAD; } } evas_common_pipe_load_do(root); evas_common_pipe_map_render(root); } #endif EAPI Eina_Bool evas_common_pipe_init(void) { #ifdef BUILD_PIPE_RENDER if (thread_num == 0) { int cpunum; int i; cpunum = eina_cpu_count(); thread_num = cpunum; // on single cpu we still want this initted.. otherwise we block forever // waiting onm pthread barriers for async rendering on a single core! // if (thread_num == 1) return EINA_FALSE; eina_threads_init(); LKI(im_task_mutex); LKI(text_task_mutex); pthread_barrier_init(&(thbarrier[0]), NULL, thread_num + 1); pthread_barrier_init(&(thbarrier[1]), NULL, thread_num + 1); for (i = 0; i < thread_num; i++) { pthread_attr_t attr; cpu_set_t cpu; pthread_attr_init(&attr); CPU_ZERO(&cpu); CPU_SET(i % cpunum, &cpu); pthread_attr_setaffinity_np(&attr, sizeof(cpu), &cpu); thinfo[i].thread_num = i; thinfo[i].tasks = NULL; thinfo[i].barrier = thbarrier; /* setup initial locks */ pthread_create(&(thinfo[i].thread_id), &attr, evas_common_pipe_thread, &(thinfo[i])); pthread_attr_destroy(&attr); } pthread_barrier_init(&(task_thbarrier[0]), NULL, thread_num + 1); pthread_barrier_init(&(task_thbarrier[1]), NULL, thread_num + 1); for (i = 0; i < thread_num; i++) { pthread_attr_t attr; cpu_set_t cpu; pthread_attr_init(&attr); CPU_ZERO(&cpu); CPU_SET(i % cpunum, &cpu); pthread_attr_setaffinity_np(&attr, sizeof(cpu), &cpu); task_thinfo[i].thread_num = i; task_thinfo[i].tasks = NULL; task_thinfo[i].barrier = task_thbarrier; eina_array_step_set(&task_thinfo[i].cutout_trash, sizeof (Eina_Array), 8); eina_array_step_set(&task_thinfo[i].rects_task, sizeof (Eina_Array), 8); /* setup initial locks */ pthread_create(&(task_thinfo[i].thread_id), &attr, evas_common_pipe_load, &(task_thinfo[i])); pthread_attr_destroy(&attr); } } if (thread_num == 1) return EINA_FALSE; return EINA_TRUE; #endif return EINA_FALSE; } evas-1.7.9/src/lib/engines/common/evas_blend.h0000664000175000017500000000016412175475547016163 00000000000000#ifndef _EVAS_BLEND_H #define _EVAS_BLEND_H EAPI void evas_common_blend_init (void); #endif /* _EVAS_BLEND_H */ evas-1.7.9/src/lib/engines/common/evas_blend_private.h0000664000175000017500000000415312175475547017717 00000000000000#ifndef _EVAS_BLEND_PRIVATE_H #define _EVAS_BLEND_PRIVATE_H RGBA_Gfx_Compositor *evas_common_gfx_compositor_blend_get (void); RGBA_Gfx_Compositor *evas_common_gfx_compositor_blend_rel_get (void); RGBA_Gfx_Compositor *evas_common_gfx_compositor_copy_get (void); RGBA_Gfx_Compositor *evas_common_gfx_compositor_copy_rel_get (void); RGBA_Gfx_Compositor *evas_common_gfx_compositor_add_get (void); RGBA_Gfx_Compositor *evas_common_gfx_compositor_add_rel_get (void); /* RGBA_Gfx_Compositor *evas_common_gfx_compositor_sub_get(void); RGBA_Gfx_Compositor *evas_common_gfx_compositor_sub_rel_get(void); */ RGBA_Gfx_Compositor *evas_common_gfx_compositor_mask_get (void); RGBA_Gfx_Compositor *evas_common_gfx_compositor_mul_get (void); RGBA_Gfx_Func evas_common_gfx_func_composite_pixel_span_get (RGBA_Image *src, RGBA_Image *dst, int pixels, int op); RGBA_Gfx_Func evas_common_gfx_func_composite_color_span_get (DATA32 col, RGBA_Image *dst, int pixels, int op); RGBA_Gfx_Func evas_common_gfx_func_composite_pixel_color_span_get (RGBA_Image *src, DATA32 col, RGBA_Image *dst, int pixels, int op); RGBA_Gfx_Func evas_common_gfx_func_composite_mask_color_span_get (DATA32 col, RGBA_Image *dst, int pixels, int op); RGBA_Gfx_Func evas_common_gfx_func_composite_pixel_mask_span_get (RGBA_Image *src, RGBA_Image *dst, int pixels, int op); RGBA_Gfx_Pt_Func evas_common_gfx_func_composite_pixel_pt_get (Image_Entry_Flags src_flags, RGBA_Image *dst, int op); RGBA_Gfx_Pt_Func evas_common_gfx_func_composite_color_pt_get (DATA32 col, RGBA_Image *dst, int op); RGBA_Gfx_Pt_Func evas_common_gfx_func_composite_pixel_color_pt_get (Image_Entry_Flags src_flags, DATA32 col, RGBA_Image *dst, int op); RGBA_Gfx_Pt_Func evas_common_gfx_func_composite_mask_color_pt_get (DATA32 col, RGBA_Image *dst, int op); RGBA_Gfx_Pt_Func evas_common_gfx_func_composite_pixel_mask_pt_get (Image_Entry_Flags src_flags, RGBA_Image *dst, int op); #endif /* _EVAS_BLEND_PRIVATE_H */ evas-1.7.9/src/lib/engines/common/evas_op_blend_main_.c0000664000175000017500000004425612175475547020031 00000000000000#include "evas_common.h" RGBA_Gfx_Func op_blend_span_funcs[SP_LAST][SM_LAST][SC_LAST][DP_LAST][CPU_LAST]; RGBA_Gfx_Pt_Func op_blend_pt_funcs[SP_LAST][SM_LAST][SC_LAST][DP_LAST][CPU_LAST]; static void op_blend_init(void); static void op_blend_shutdown(void); static RGBA_Gfx_Func op_blend_pixel_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels); static RGBA_Gfx_Func op_blend_color_span_get(DATA32 col, RGBA_Image *dst, int pixels); static RGBA_Gfx_Func op_blend_pixel_color_span_get(RGBA_Image *src, DATA32 col, RGBA_Image *dst, int pixels); static RGBA_Gfx_Func op_blend_mask_color_span_get(DATA32 col, RGBA_Image *dst, int pixels); static RGBA_Gfx_Func op_blend_pixel_mask_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels); static RGBA_Gfx_Pt_Func op_blend_pixel_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst); static RGBA_Gfx_Pt_Func op_blend_color_pt_get(DATA32 col, RGBA_Image *dst); static RGBA_Gfx_Pt_Func op_blend_pixel_color_pt_get(Image_Entry_Flags src_flags, DATA32 col, RGBA_Image *dst); static RGBA_Gfx_Pt_Func op_blend_mask_color_pt_get(DATA32 col, RGBA_Image *dst); static RGBA_Gfx_Pt_Func op_blend_pixel_mask_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst); static RGBA_Gfx_Compositor _composite_blend = { "blend", op_blend_init, op_blend_shutdown, op_blend_pixel_span_get, op_blend_color_span_get, op_blend_pixel_color_span_get, op_blend_mask_color_span_get, op_blend_pixel_mask_span_get, op_blend_pixel_pt_get, op_blend_color_pt_get, op_blend_pixel_color_pt_get, op_blend_mask_color_pt_get, op_blend_pixel_mask_pt_get }; RGBA_Gfx_Compositor * evas_common_gfx_compositor_blend_get(void) { return &(_composite_blend); } RGBA_Gfx_Func op_blend_rel_span_funcs[SP_LAST][SM_LAST][SC_LAST][DP_LAST][CPU_LAST]; RGBA_Gfx_Pt_Func op_blend_rel_pt_funcs[SP_LAST][SM_LAST][SC_LAST][DP_LAST][CPU_LAST]; static void op_blend_rel_init(void); static void op_blend_rel_shutdown(void); static RGBA_Gfx_Func op_blend_rel_pixel_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels); static RGBA_Gfx_Func op_blend_rel_color_span_get(DATA32 col, RGBA_Image *dst, int pixels); static RGBA_Gfx_Func op_blend_rel_pixel_color_span_get(RGBA_Image *src, DATA32 col, RGBA_Image *dst, int pixels); static RGBA_Gfx_Func op_blend_rel_mask_color_span_get(DATA32 col, RGBA_Image *dst, int pixels); static RGBA_Gfx_Func op_blend_rel_pixel_mask_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels); static RGBA_Gfx_Pt_Func op_blend_rel_pixel_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst); static RGBA_Gfx_Pt_Func op_blend_rel_color_pt_get(DATA32 col, RGBA_Image *dst); static RGBA_Gfx_Pt_Func op_blend_rel_pixel_color_pt_get(Image_Entry_Flags src_flags, DATA32 col, RGBA_Image *dst); static RGBA_Gfx_Pt_Func op_blend_rel_mask_color_pt_get(DATA32 col, RGBA_Image *dst); static RGBA_Gfx_Pt_Func op_blend_rel_pixel_mask_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst); static RGBA_Gfx_Compositor _composite_blend_rel = { "blend_rel", op_blend_rel_init, op_blend_rel_shutdown, op_blend_rel_pixel_span_get, op_blend_rel_color_span_get, op_blend_rel_pixel_color_span_get, op_blend_rel_mask_color_span_get, op_blend_rel_pixel_mask_span_get, op_blend_rel_pixel_pt_get, op_blend_rel_color_pt_get, op_blend_rel_pixel_color_pt_get, op_blend_rel_mask_color_pt_get, op_blend_rel_pixel_mask_pt_get }; RGBA_Gfx_Compositor * evas_common_gfx_compositor_blend_rel_get(void) { return &(_composite_blend_rel); } # include "./evas_op_blend/op_blend_pixel_.c" # include "./evas_op_blend/op_blend_color_.c" # include "./evas_op_blend/op_blend_pixel_color_.c" # include "./evas_op_blend/op_blend_pixel_mask_.c" # include "./evas_op_blend/op_blend_mask_color_.c" //# include "./evas_op_blend/op_blend_pixel_mask_color_.c" # include "./evas_op_blend/op_blend_pixel_i386.c" # include "./evas_op_blend/op_blend_color_i386.c" # include "./evas_op_blend/op_blend_pixel_color_i386.c" # include "./evas_op_blend/op_blend_pixel_mask_i386.c" # include "./evas_op_blend/op_blend_mask_color_i386.c" //# include "./evas_op_blend/op_blend_pixel_mask_color_i386.c" # include "./evas_op_blend/op_blend_pixel_neon.c" # include "./evas_op_blend/op_blend_color_neon.c" # include "./evas_op_blend/op_blend_pixel_color_neon.c" # include "./evas_op_blend/op_blend_pixel_mask_neon.c" # include "./evas_op_blend/op_blend_mask_color_neon.c" //# include "./evas_op_blend/op_blend_pixel_mask_color_neon.c" #ifdef BUILD_SSE3 void evas_common_op_blend_init_sse3(void); #endif static void op_blend_init(void) { memset(op_blend_span_funcs, 0, sizeof(op_blend_span_funcs)); memset(op_blend_pt_funcs, 0, sizeof(op_blend_pt_funcs)); #ifdef BUILD_SSE3 evas_common_op_blend_init_sse3(); #endif #ifdef BUILD_MMX init_blend_pixel_span_funcs_mmx(); init_blend_pixel_color_span_funcs_mmx(); init_blend_pixel_mask_span_funcs_mmx(); init_blend_color_span_funcs_mmx(); init_blend_mask_color_span_funcs_mmx(); init_blend_pixel_pt_funcs_mmx(); init_blend_pixel_color_pt_funcs_mmx(); init_blend_pixel_mask_pt_funcs_mmx(); init_blend_color_pt_funcs_mmx(); init_blend_mask_color_pt_funcs_mmx(); #endif #ifdef BUILD_NEON init_blend_pixel_span_funcs_neon(); init_blend_pixel_color_span_funcs_neon(); init_blend_pixel_mask_span_funcs_neon(); init_blend_color_span_funcs_neon(); init_blend_mask_color_span_funcs_neon(); init_blend_pixel_pt_funcs_neon(); init_blend_pixel_color_pt_funcs_neon(); init_blend_pixel_mask_pt_funcs_neon(); init_blend_color_pt_funcs_neon(); init_blend_mask_color_pt_funcs_neon(); #endif #ifdef BUILD_C init_blend_pixel_span_funcs_c(); init_blend_pixel_color_span_funcs_c(); init_blend_pixel_mask_span_funcs_c(); init_blend_color_span_funcs_c(); init_blend_mask_color_span_funcs_c(); init_blend_pixel_pt_funcs_c(); init_blend_pixel_color_pt_funcs_c(); init_blend_pixel_mask_pt_funcs_c(); init_blend_color_pt_funcs_c(); init_blend_mask_color_pt_funcs_c(); #endif } static void op_blend_shutdown(void) { } static RGBA_Gfx_Func blend_gfx_span_func_cpu(int s, int m, int c, int d) { RGBA_Gfx_Func func = NULL; int cpu = CPU_N; #ifdef BUILD_SSE3 if (evas_common_cpu_has_feature(CPU_FEATURE_SSE3)) { cpu = CPU_SSE3; func = op_blend_span_funcs[s][m][c][d][cpu]; if(func) return func; } #endif #ifdef BUILD_MMX if (evas_common_cpu_has_feature(CPU_FEATURE_MMX)) { cpu = CPU_MMX; func = op_blend_span_funcs[s][m][c][d][cpu]; if (func) return func; } #endif #ifdef BUILD_NEON if (evas_common_cpu_has_feature(CPU_FEATURE_NEON)) { cpu = CPU_NEON; func = op_blend_span_funcs[s][m][c][d][cpu]; if (func) return func; } #endif #ifdef BUILD_C cpu = CPU_C; func = op_blend_span_funcs[s][m][c][d][cpu]; if (func) return func; #endif return func; } static RGBA_Gfx_Func op_blend_pixel_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels __UNUSED__) { int s = SP_AN, m = SM_N, c = SC_N, d = DP_AN; if (src && src->cache_entry.flags.alpha) { s = SP; if (src->cache_entry.flags.alpha_sparse) s = SP_AS; } if (dst && dst->cache_entry.flags.alpha) d = DP; return blend_gfx_span_func_cpu(s, m, c, d); } static RGBA_Gfx_Func op_blend_color_span_get(DATA32 col, RGBA_Image *dst, int pixels __UNUSED__) { int s = SP_N, m = SM_N, c = SC_AN, d = DP_AN; if ((col >> 24) < 255) c = SC; if (col == ((col >> 24) * 0x01010101)) c = SC_AA; if (col == 0xffffffff) c = SC_N; if (dst && dst->cache_entry.flags.alpha) d = DP; return blend_gfx_span_func_cpu(s, m, c, d); } static RGBA_Gfx_Func op_blend_pixel_color_span_get(RGBA_Image *src, DATA32 col, RGBA_Image *dst, int pixels __UNUSED__) { int s = SP_AN, m = SM_N, c = SC_AN, d = DP_AN; if (src && src->cache_entry.flags.alpha) { s = SP; if (src->cache_entry.flags.alpha_sparse) s = SP_AS; } if ((col >> 24) < 255) c = SC; if (col == ((col >> 24) * 0x01010101)) c = SC_AA; if (col == 0xffffffff) c = SC_N; if (dst && dst->cache_entry.flags.alpha) d = DP; return blend_gfx_span_func_cpu(s, m, c, d); } static RGBA_Gfx_Func op_blend_mask_color_span_get(DATA32 col, RGBA_Image *dst, int pixels __UNUSED__) { int s = SP_N, m = SM_AS, c = SC_AN, d = DP_AN; if ((col >> 24) < 255) c = SC; if (col == ((col >> 24) * 0x01010101)) c = SC_AA; if (col == 0xffffffff) c = SC_N; if (dst && dst->cache_entry.flags.alpha) d = DP; return blend_gfx_span_func_cpu(s, m, c, d); } static RGBA_Gfx_Func op_blend_pixel_mask_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels __UNUSED__) { int s = SP_AN, m = SM_AS, c = SC_N, d = DP_AN; if (src && src->cache_entry.flags.alpha) { s = SP; if (src->cache_entry.flags.alpha_sparse) s = SP_AS; } if (dst && dst->cache_entry.flags.alpha) d = DP; return blend_gfx_span_func_cpu(s, m, c, d); } static RGBA_Gfx_Pt_Func blend_gfx_pt_func_cpu(int s, int m, int c, int d) { RGBA_Gfx_Pt_Func func = NULL; int cpu = CPU_N; #ifdef BUILD_SSE3 if(evas_common_cpu_has_feature(CPU_FEATURE_SSE3)) { cpu = CPU_SSE3; func = op_blend_pt_funcs[s][m][c][d][cpu]; if(func) return func; } #endif #ifdef BUILD_MMX if (evas_common_cpu_has_feature(CPU_FEATURE_MMX)) { cpu = CPU_MMX; func = op_blend_pt_funcs[s][m][c][d][cpu]; if (func) return func; } #endif #ifdef BUILD_NEON if (evas_common_cpu_has_feature(CPU_FEATURE_NEON)) { cpu = CPU_NEON; func = op_blend_pt_funcs[s][m][c][d][cpu]; if (func) return func; } #endif #ifdef BUILD_C cpu = CPU_C; func = op_blend_pt_funcs[s][m][c][d][cpu]; if (func) return func; #endif return func; } static RGBA_Gfx_Pt_Func op_blend_pixel_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst) { int s = SP_AN, m = SM_N, c = SC_N, d = DP_AN; if (src_flags.alpha) s = SP; if (dst && dst->cache_entry.flags.alpha) d = DP; return blend_gfx_pt_func_cpu(s, m, c, d); } static RGBA_Gfx_Pt_Func op_blend_color_pt_get(DATA32 col, RGBA_Image *dst) { int s = SP_N, m = SM_N, c = SC_AN, d = DP_AN; if ((col >> 24) < 255) c = SC; if (col == ((col >> 24) * 0x01010101)) c = SC_AA; if (col == 0xffffffff) c = SC_N; if (dst && dst->cache_entry.flags.alpha) d = DP; return blend_gfx_pt_func_cpu(s, m, c, d); } static RGBA_Gfx_Pt_Func op_blend_pixel_color_pt_get(Image_Entry_Flags src_flags, DATA32 col, RGBA_Image *dst) { int s = SP_AN, m = SM_N, c = SC_AN, d = DP_AN; if (src_flags.alpha) s = SP; if ((col >> 24) < 255) c = SC; if (col == ((col >> 24) * 0x01010101)) c = SC_AA; if (col == 0xffffffff) c = SC_N; if (dst && dst->cache_entry.flags.alpha) d = DP; return blend_gfx_pt_func_cpu(s, m, c, d); } static RGBA_Gfx_Pt_Func op_blend_mask_color_pt_get(DATA32 col, RGBA_Image *dst) { int s = SP_N, m = SM_AS, c = SC_AN, d = DP_AN; if ((col >> 24) < 255) c = SC; if (col == ((col >> 24) * 0x01010101)) c = SC_AA; if (col == 0xffffffff) c = SC_N; if (dst && dst->cache_entry.flags.alpha) d = DP; return blend_gfx_pt_func_cpu(s, m, c, d); } static RGBA_Gfx_Pt_Func op_blend_pixel_mask_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst) { int s = SP_AN, m = SM_AS, c = SC_N, d = DP_AN; if (src_flags.alpha) s = SP; if (dst && dst->cache_entry.flags.alpha) d = DP; return blend_gfx_pt_func_cpu(s, m, c, d); } void evas_common_op_blend_rel_init_sse3(void); static void op_blend_rel_init(void) { memset(op_blend_rel_span_funcs, 0, sizeof(op_blend_rel_span_funcs)); memset(op_blend_rel_pt_funcs, 0, sizeof(op_blend_rel_pt_funcs)); #ifdef BUILD_SSE3 evas_common_op_blend_rel_init_sse3(); #endif #ifdef BUILD_MMX init_blend_rel_pixel_span_funcs_mmx(); init_blend_rel_pixel_color_span_funcs_mmx(); init_blend_rel_pixel_mask_span_funcs_mmx(); init_blend_rel_color_span_funcs_mmx(); init_blend_rel_mask_color_span_funcs_mmx(); init_blend_rel_pixel_pt_funcs_mmx(); init_blend_rel_pixel_color_pt_funcs_mmx(); init_blend_rel_pixel_mask_pt_funcs_mmx(); init_blend_rel_color_pt_funcs_mmx(); init_blend_rel_mask_color_pt_funcs_mmx(); #endif #ifdef BUILD_NEON init_blend_rel_pixel_span_funcs_neon(); init_blend_rel_pixel_color_span_funcs_neon(); init_blend_rel_pixel_mask_span_funcs_neon(); init_blend_rel_color_span_funcs_neon(); init_blend_rel_mask_color_span_funcs_neon(); init_blend_rel_pixel_pt_funcs_neon(); init_blend_rel_pixel_color_pt_funcs_neon(); init_blend_rel_pixel_mask_pt_funcs_neon(); init_blend_rel_color_pt_funcs_neon(); init_blend_rel_mask_color_pt_funcs_neon(); #endif #ifdef BUILD_C init_blend_rel_pixel_span_funcs_c(); init_blend_rel_pixel_color_span_funcs_c(); init_blend_rel_pixel_mask_span_funcs_c(); init_blend_rel_color_span_funcs_c(); init_blend_rel_mask_color_span_funcs_c(); init_blend_rel_pixel_pt_funcs_c(); init_blend_rel_pixel_color_pt_funcs_c(); init_blend_rel_pixel_mask_pt_funcs_c(); init_blend_rel_color_pt_funcs_c(); init_blend_rel_mask_color_pt_funcs_c(); #endif } static void op_blend_rel_shutdown(void) { } static RGBA_Gfx_Func blend_rel_gfx_span_func_cpu(int s, int m, int c, int d) { RGBA_Gfx_Func func = NULL; int cpu = CPU_N; #ifdef BUILD_SSE3 if (evas_common_cpu_has_feature(CPU_FEATURE_SSE3)) { cpu = CPU_SSE3; func = op_blend_rel_span_funcs[s][m][c][d][cpu]; if(func) return func; } #endif #ifdef BUILD_MMX if (evas_common_cpu_has_feature(CPU_FEATURE_MMX)) { cpu = CPU_MMX; func = op_blend_rel_span_funcs[s][m][c][d][cpu]; if (func) return func; } #endif #ifdef BUILD_NEON if (evas_common_cpu_has_feature(CPU_FEATURE_NEON)) { cpu = CPU_NEON; func = op_blend_rel_span_funcs[s][m][c][d][cpu]; if (func) return func; } #endif #ifdef BUILD_C cpu = CPU_C; func = op_blend_rel_span_funcs[s][m][c][d][cpu]; if (func) return func; #endif return func; } static RGBA_Gfx_Func op_blend_rel_pixel_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels __UNUSED__) { int s = SP_AN, m = SM_N, c = SC_N, d = DP_AN; if (src && src->cache_entry.flags.alpha) { s = SP; if (src->cache_entry.flags.alpha_sparse) s = SP_AS; } if (dst && dst->cache_entry.flags.alpha) d = DP; return blend_rel_gfx_span_func_cpu(s, m, c, d); } static RGBA_Gfx_Func op_blend_rel_color_span_get(DATA32 col, RGBA_Image *dst, int pixels __UNUSED__) { int s = SP_N, m = SM_N, c = SC_AN, d = DP_AN; if ((col >> 24) < 255) c = SC; if (col == ((col >> 24) * 0x01010101)) c = SC_AA; if (col == 0xffffffff) c = SC_N; if (dst && dst->cache_entry.flags.alpha) d = DP; return blend_rel_gfx_span_func_cpu(s, m, c, d); } static RGBA_Gfx_Func op_blend_rel_pixel_color_span_get(RGBA_Image *src, DATA32 col, RGBA_Image *dst, int pixels __UNUSED__) { int s = SP_AN, m = SM_N, c = SC_AN, d = DP_AN; if (src && src->cache_entry.flags.alpha) s = SP; if ((col >> 24) < 255) c = SC; if (col == ((col >> 24) * 0x01010101)) c = SC_AA; if (col == 0xffffffff) c = SC_N; if (dst && dst->cache_entry.flags.alpha) d = DP; return blend_rel_gfx_span_func_cpu(s, m, c, d); } static RGBA_Gfx_Func op_blend_rel_mask_color_span_get(DATA32 col, RGBA_Image *dst, int pixels __UNUSED__) { int s = SP_N, m = SM_AS, c = SC_AN, d = DP_AN; if ((col >> 24) < 255) c = SC; if (col == ((col >> 24) * 0x01010101)) c = SC_AA; if (col == 0xffffffff) c = SC_N; if (dst && dst->cache_entry.flags.alpha) d = DP; return blend_rel_gfx_span_func_cpu(s, m, c, d); } static RGBA_Gfx_Func op_blend_rel_pixel_mask_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels __UNUSED__) { int s = SP_AN, m = SM_AS, c = SC_N, d = DP_AN; if (src && src->cache_entry.flags.alpha) { s = SP; if (src->cache_entry.flags.alpha_sparse) s = SP_AS; } if (dst && dst->cache_entry.flags.alpha) d = DP; return blend_rel_gfx_span_func_cpu(s, m, c, d); } static RGBA_Gfx_Pt_Func blend_rel_gfx_pt_func_cpu(int s, int m, int c, int d) { RGBA_Gfx_Pt_Func func = NULL; int cpu = CPU_N; #ifdef BUILD_SSE3 if (evas_common_cpu_has_feature(CPU_FEATURE_SSE3)) { cpu = CPU_SSE3; func = op_blend_rel_pt_funcs[s][m][c][d][cpu]; if(func) return func; } #endif #ifdef BUILD_MMX if (evas_common_cpu_has_feature(CPU_FEATURE_MMX)) { cpu = CPU_MMX; func = op_blend_rel_pt_funcs[s][m][c][d][cpu]; if (func) return func; } #endif #ifdef BUILD_NEON if (evas_common_cpu_has_feature(CPU_FEATURE_NEON)) { cpu = CPU_NEON; func = op_blend_rel_pt_funcs[s][m][c][d][cpu]; if (func) return func; } #endif #ifdef BUILD_C cpu = CPU_C; func = op_blend_rel_pt_funcs[s][m][c][d][cpu]; if (func) return func; #endif return func; } static RGBA_Gfx_Pt_Func op_blend_rel_pixel_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst) { int s = SP_AN, m = SM_N, c = SC_N, d = DP_AN; if (src_flags.alpha) s = SP; if (dst && dst->cache_entry.flags.alpha) d = DP; return blend_rel_gfx_pt_func_cpu(s, m, c, d); } static RGBA_Gfx_Pt_Func op_blend_rel_color_pt_get(DATA32 col, RGBA_Image *dst) { int s = SP_N, m = SM_N, c = SC_AN, d = DP_AN; if ((col >> 24) < 255) c = SC; if (col == ((col >> 24) * 0x01010101)) c = SC_AA; if (col == 0xffffffff) c = SC_N; if (dst && dst->cache_entry.flags.alpha) d = DP; return blend_rel_gfx_pt_func_cpu(s, m, c, d); } static RGBA_Gfx_Pt_Func op_blend_rel_pixel_color_pt_get(Image_Entry_Flags src_flags, DATA32 col, RGBA_Image *dst) { int s = SP_AN, m = SM_N, c = SC_AN, d = DP_AN; if (src_flags.alpha) s = SP; if ((col >> 24) < 255) c = SC; if (col == ((col >> 24) * 0x01010101)) c = SC_AA; if (col == 0xffffffff) c = SC_N; if (dst && dst->cache_entry.flags.alpha) d = DP; return blend_rel_gfx_pt_func_cpu(s, m, c, d); } static RGBA_Gfx_Pt_Func op_blend_rel_mask_color_pt_get(DATA32 col, RGBA_Image *dst) { int s = SP_N, m = SM_AS, c = SC_AN, d = DP_AN; if ((col >> 24) < 255) c = SC; if (col == ((col >> 24) * 0x01010101)) c = SC_AA; if (col == 0xffffffff) c = SC_N; if (dst && dst->cache_entry.flags.alpha) d = DP; return blend_rel_gfx_pt_func_cpu(s, m, c, d); } static RGBA_Gfx_Pt_Func op_blend_rel_pixel_mask_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst) { int s = SP_AN, m = SM_AS, c = SC_N, d = DP_AN; if (src_flags.alpha) s = SP; if (dst && dst->cache_entry.flags.alpha) d = DP; return blend_rel_gfx_pt_func_cpu(s, m, c, d); } evas-1.7.9/src/lib/engines/common/evas_image_scalecache.c0000664000175000017500000006341312175475547020315 00000000000000#ifdef HAVE_CONFIG_H # include "config.h" #endif #ifdef HAVE_EVIL # include #endif #include #ifdef EVAS_CSERVE2 #include "evas_cs2_private.h" #endif #include "evas_common.h" #include "evas_private.h" #include "evas_image_private.h" #define SCALECACHE 1 #define MAX_SCALEITEMS 32 #define MIN_SCALE_USES 3 //#define MIN_SCALE_AGE_GAP 5000 #define MAX_SCALECACHE_DIM 3200 #define FLOP_ADD 4 #define MAX_FLOP_COUNT 16 #define FLOP_DEL 1 #define SCALE_CACHE_SIZE 4 * 1024 * 1024 //#define SCALE_CACHE_SIZE 0 typedef struct _Scaleitem Scaleitem; struct _Scaleitem { EINA_INLIST; unsigned long long usage; unsigned long long usage_count; RGBA_Image *im, *parent_im; int src_x, src_y; unsigned int src_w, src_h; unsigned int dst_w, dst_h; unsigned int flop; unsigned int size_adjust; Eina_Bool forced_unload : 1; Eina_Bool smooth : 1; Eina_Bool populate_me : 1; }; #ifdef SCALECACHE static unsigned long long use_counter = 0; static LK(cache_lock); static Eina_Inlist *cache_list = NULL; static unsigned int cache_size = 0; static int init = 0; static unsigned int max_cache_size = SCALE_CACHE_SIZE; static unsigned int max_dimension = MAX_SCALECACHE_DIM; static unsigned int max_flop_count = MAX_FLOP_COUNT; static unsigned int max_scale_items = MAX_SCALEITEMS; static unsigned int min_scale_uses = MIN_SCALE_USES; #endif void evas_common_scalecache_init(void) { #ifdef SCALECACHE const char *s; init++; if (init > 1) return; use_counter = 0; LKI(cache_lock); s = getenv("EVAS_SCALECACHE_SIZE"); if (s) max_cache_size = atoi(s) * 1024; s = getenv("EVAS_SCALECACHE_MAX_DIMENSION"); if (s) max_dimension = atoi(s); s = getenv("EVAS_SCALECACHE_MAX_FLOP_COUNT"); if (s) max_flop_count = atoi(s); s = getenv("EVAS_SCALECACHE_MAX_ITEMS"); if (s) max_scale_items = atoi(s); s = getenv("EVAS_SCALECACHE_MIN_USES"); if (s) min_scale_uses = atoi(s); #endif } void evas_common_scalecache_shutdown(void) { #ifdef SCALECACHE init--; if (init ==0) LKD(cache_lock); #endif } void evas_common_rgba_image_scalecache_init(Image_Entry *ie) { #ifdef SCALECACHE RGBA_Image *im = (RGBA_Image *)ie; // NOTE: this conflicts with evas image cache init and del of lock LKI(im->cache.lock); #endif } void evas_common_rgba_image_scalecache_shutdown(Image_Entry *ie) { #ifdef SCALECACHE RGBA_Image *im = (RGBA_Image *)ie; evas_common_rgba_image_scalecache_dirty(ie); // NOTE: this conflicts with evas image cache init and del of lock LKD(im->cache.lock); #endif } void evas_common_rgba_image_scalecache_dirty(Image_Entry *ie) { #ifdef SCALECACHE RGBA_Image *im = (RGBA_Image *)ie; LKL(im->cache.lock); while (im->cache.list) { Scaleitem *sci; sci = im->cache.list->data; im->cache.list = eina_list_remove(im->cache.list, sci); if (sci->im) { // INF(" 0- %i", sci->dst_w * sci->dst_h * 4); LKL(cache_lock); evas_common_rgba_image_free(&sci->im->cache_entry); if (!sci->forced_unload) cache_size -= sci->dst_w * sci->dst_h * 4; else cache_size -= sci->size_adjust; cache_list = eina_inlist_remove(cache_list, (Eina_Inlist *)sci); LKU(cache_lock); } free(sci); } LKU(im->cache.lock); #endif } void evas_common_rgba_image_scalecache_orig_use(Image_Entry *ie) { #ifdef SCALECACHE RGBA_Image *im = (RGBA_Image *)ie; LKL(im->cache.lock); use_counter++; // FIXME: if orig not loaded, reload // FIXME: mark orig with current used counter im->cache.orig_usage++; im->cache.usage_count = use_counter; LKU(im->cache.lock); #endif } int evas_common_rgba_image_scalecache_usage_get(Image_Entry *ie) { #ifdef SCALECACHE RGBA_Image *im = (RGBA_Image *)ie; int size = 0; Eina_List *l; Scaleitem *sci; LKL(im->cache.lock); EINA_LIST_FOREACH(im->cache.list, l, sci) { if (sci->im) size += sci->dst_w * sci->dst_h * 4; } LKU(im->cache.lock); return size; #else return 0; #endif } #ifdef SCALECACHE static void _sci_fix_newest(RGBA_Image *im) { Eina_List *l; Scaleitem *sci; im->cache.newest_usage = 0; im->cache.newest_usage_count = 0; EINA_LIST_FOREACH(im->cache.list, l, sci) { if (sci->usage > im->cache.newest_usage) im->cache.newest_usage = sci->usage; if (sci->usage_count > im->cache.newest_usage_count) im->cache.newest_usage_count = sci->usage_count; } // INF("_sci_fix_newest! -> %i", im->cache.newest_usage); } static Scaleitem * _sci_find(RGBA_Image *im, RGBA_Draw_Context *dc __UNUSED__, int smooth, int src_region_x, int src_region_y, unsigned int src_region_w, unsigned int src_region_h, unsigned int dst_region_w, unsigned int dst_region_h) { Eina_List *l; Scaleitem *sci; EINA_LIST_FOREACH(im->cache.list, l, sci) { if ( (sci->src_w == src_region_w) && (sci->src_h == src_region_h) && (sci->dst_w == dst_region_w) && (sci->dst_h == dst_region_h) && (sci->src_x == src_region_x) && (sci->src_y == src_region_y) && (sci->smooth == smooth) ) { if (im->cache.list != l) { im->cache.list = eina_list_promote_list(im->cache.list, l); } return sci; } } if (eina_list_count(im->cache.list) > max_scale_items) { l = eina_list_last(im->cache.list); sci = l->data; im->cache.list = eina_list_remove_list(im->cache.list, l); if ((sci->usage == im->cache.newest_usage) || (sci->usage_count == im->cache.newest_usage_count)) _sci_fix_newest(im); if (sci->im) { evas_common_rgba_image_free(&sci->im->cache_entry); if (!sci->forced_unload) cache_size -= sci->dst_w * sci->dst_h * 4; else cache_size -= sci->size_adjust; // INF(" 1- %i", sci->dst_w * sci->dst_h * 4); cache_list = eina_inlist_remove(cache_list, (Eina_Inlist *)sci); } if (max_scale_items < 1) return NULL; } else { if (max_scale_items < 1) return NULL; if (eina_list_count(im->cache.list) > (max_scale_items - 1)) return NULL; sci = calloc(1, sizeof(Scaleitem)); sci->parent_im = im; } sci->usage = 0; sci->usage_count = 0; sci->populate_me = 0; sci->smooth = smooth; sci->forced_unload = 0; sci->flop = 0; sci->im = NULL; sci->src_x = src_region_x; sci->src_y = src_region_y; sci->src_w = src_region_w; sci->src_h = src_region_h; sci->dst_w = dst_region_w; sci->dst_h = dst_region_h; im->cache.list = eina_list_prepend(im->cache.list, sci); return sci; } static void _cache_prune(Scaleitem *notsci, Eina_Bool copies_only) { Scaleitem *sci; while (cache_size > max_cache_size) { if (!cache_list) break; sci = (Scaleitem *)(cache_list); if (copies_only) { while ((sci) && (!sci->parent_im->image.data)) sci = (Scaleitem *)(((Eina_Inlist *)sci)->next); if (!sci) return; } if (sci == notsci) return; if (sci->im) { evas_common_rgba_image_free(&sci->im->cache_entry); sci->im = NULL; sci->usage = 0; sci->usage_count = 0; sci->flop += FLOP_ADD; if (!sci->forced_unload) cache_size -= sci->dst_w * sci->dst_h * 4; else cache_size -= sci->size_adjust; // INF(" 2- %i", sci->dst_w * sci->dst_h * 4); cache_list = eina_inlist_remove(cache_list, (Eina_Inlist *)sci); memset(sci, 0, sizeof(Eina_Inlist)); } // INF("FLUSH %i > %i", cache_size, max_cache_size); } } #endif EAPI void evas_common_rgba_image_scalecache_size_set(unsigned int size) { #ifdef SCALECACHE LKL(cache_lock); if (size != max_cache_size) { max_cache_size = size; _cache_prune(NULL, 1); } LKU(cache_lock); #endif } EAPI unsigned int evas_common_rgba_image_scalecache_size_get(void) { #ifdef SCALECACHE int t; LKL(cache_lock); t = max_cache_size; LKU(cache_lock); return t; #else return 0; #endif } EAPI void evas_common_rgba_image_scalecache_dump(void) { #ifdef SCALECACHE int t; LKL(cache_lock); t = max_cache_size; max_cache_size = 0; _cache_prune(NULL, 0); max_cache_size = t; LKU(cache_lock); #endif } EAPI void evas_common_rgba_image_scalecache_flush(void) { #ifdef SCALECACHE int t; LKL(cache_lock); t = max_cache_size; max_cache_size = 0; _cache_prune(NULL, 1); max_cache_size = t; LKU(cache_lock); #endif } EAPI void evas_common_rgba_image_scalecache_prepare(Image_Entry *ie, RGBA_Image *dst __UNUSED__, RGBA_Draw_Context *dc, int smooth, int src_region_x, int src_region_y, int src_region_w, int src_region_h, int dst_region_x __UNUSED__, int dst_region_y __UNUSED__, int dst_region_w, int dst_region_h) { #ifdef SCALECACHE int locked = 0; Eina_Lock_Result ret; RGBA_Image *im = (RGBA_Image *)ie; Scaleitem *sci; if (!im->image.data) return; if ((dst_region_w == 0) || (dst_region_h == 0) || (src_region_w == 0) || (src_region_h == 0)) return; // was having major lock issues here - LKL was deadlocking. what was // going on? it may have been an eina treads badness but this will stay here // for now for debug #if 1 ret = LKT(im->cache.lock); if (ret == EINA_FALSE) /* can't get image lock */ { useconds_t slp = 1, slpt = 0; while (slpt < 500000) { #ifdef _WIN32 Sleep(slp / 1000); #else usleep(slp); #endif slpt += slp; slp++; ret = LKT(im->cache.lock); if (ret == EINA_LOCK_DEADLOCK) { printf("WARNING: DEADLOCK on image %p (%s)\n", im, ie->file); } else { locked = 1; break; } } if (ret == EINA_FALSE) { printf("WARNING: lock still there after %i usec\n", slpt); printf("WARNING: stucklock on image %p (%s)\n", im, ie->file); LKDBG(im->cache.lock); } } else if (ret == EINA_LOCK_DEADLOCK) { printf("WARNING: DEADLOCK on image %p (%s)\n", im, ie->file); } else locked = 1; #endif if (!locked) { LKL(im->cache.lock); locked = 1; } use_counter++; if ((src_region_w == dst_region_w) && (src_region_h == dst_region_h)) { // 1:1 scale. im->cache.orig_usage++; im->cache.usage_count = use_counter; if (locked) LKU(im->cache.lock); return; } if ((!im->cache_entry.flags.alpha) && (!smooth)) { // solid nearest scaling - it's actually the same speed cached or not, // or in some cases faster not cached im->cache.orig_usage++; im->cache.usage_count = use_counter; if (locked) LKU(im->cache.lock); return; } LKL(cache_lock); sci = _sci_find(im, dc, smooth, src_region_x, src_region_y, src_region_w, src_region_h, dst_region_w, dst_region_h); if (!sci) { LKU(cache_lock); if (locked) LKU(im->cache.lock); return; } // INF("%10i | %4i %4i %4ix%4i -> %4i %4i %4ix%4i | %i", // (int)use_counter, // src_region_x, src_region_y, src_region_w, src_region_h, // dst_region_x, dst_region_y, dst_region_w, dst_region_h, // smooth); if ((sci->usage >= min_scale_uses) && (ie->scale_hint != EVAS_IMAGE_SCALE_HINT_DYNAMIC) // && (sci->usage_count > (use_counter - MIN_SCALE_AGE_GAP)) ) { if (!sci->im) { if ((sci->dst_w < max_dimension) && (sci->dst_h < max_dimension)) { if (sci->flop <= max_flop_count) { sci->populate_me = 1; im->cache.populate_count++; } } } } sci->usage++; sci->usage_count = use_counter; LKU(cache_lock); if (sci->usage > im->cache.newest_usage) im->cache.newest_usage = sci->usage; // INF("newset? %p %i > %i", im, // (int)sci->usage, // (int)im->cache.newest_usage); if (sci->usage_count > im->cache.newest_usage_count) im->cache.newest_usage_count = sci->usage_count; // INF(" -------------- used %8i#, %8i@", (int)sci->usage, (int)sci->usage_count); if (locked) LKU(im->cache.lock); #endif } #ifdef SCALECACHE //static int pops = 0; //static int hits = 0; //static int misses = 0; //static int noscales = 0; #endif EAPI void evas_common_rgba_image_scalecache_do(Image_Entry *ie, RGBA_Image *dst, RGBA_Draw_Context *dc, int smooth, 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) { #ifdef SCALECACHE RGBA_Image *im = (RGBA_Image *)ie; Scaleitem *sci; int didpop = 0; int dounload = 0; /* static int i = 0; i++; if (i > 2000) { INF("p: %6i, h: %6i, m: %6i, n: %6i", pops, hits, misses, noscales); i = 0; } */ if ((dst_region_w == 0) || (dst_region_h == 0) || (src_region_w == 0) || (src_region_h == 0)) return; LKL(im->cache.lock); if ((src_region_w == dst_region_w) && (src_region_h == dst_region_h)) { if (im->cache_entry.space == EVAS_COLORSPACE_ARGB8888) { #ifdef EVAS_CSERVE2 if (evas_cserve2_use_get()) evas_cache2_image_load_data(&im->cache_entry); else #endif evas_cache_image_load_data(&im->cache_entry); } evas_common_image_colorspace_normalize(im); // noscales++; LKU(im->cache.lock); if (im->image.data) { evas_common_scale_rgba_in_to_out_clip_sample(im, dst, dc, src_region_x, src_region_y, src_region_w, src_region_h, dst_region_x, dst_region_y, dst_region_w, dst_region_h); } return; } LKL(cache_lock); sci = _sci_find(im, dc, smooth, src_region_x, src_region_y, src_region_w, src_region_h, dst_region_w, dst_region_h); LKU(cache_lock); if (!sci) { if (im->cache_entry.space == EVAS_COLORSPACE_ARGB8888) { #ifdef EVAS_CSERVE2 if (evas_cserve2_use_get()) evas_cache2_image_load_data(&im->cache_entry); else #endif evas_cache_image_load_data(&im->cache_entry); } evas_common_image_colorspace_normalize(im); // misses++; LKU(im->cache.lock); if (im->image.data) { if (smooth) evas_common_scale_rgba_in_to_out_clip_smooth(im, dst, dc, src_region_x, src_region_y, src_region_w, src_region_h, dst_region_x, dst_region_y, dst_region_w, dst_region_h); else evas_common_scale_rgba_in_to_out_clip_sample(im, dst, dc, src_region_x, src_region_y, src_region_w, src_region_h, dst_region_x, dst_region_y, dst_region_w, dst_region_h); } return; } if (sci->populate_me) { int size, osize, used; size = dst_region_w * dst_region_h; if (((((dst_region_w > 640) || (dst_region_h > 640)) && (size > (480 * 480))) || (ie->scale_hint == EVAS_IMAGE_SCALE_HINT_STATIC)) && (ie->scale_hint != EVAS_IMAGE_SCALE_HINT_DYNAMIC)) { Eina_List *l; Scaleitem *sci2; dounload = 1; osize = sci->parent_im->cache_entry.w * sci->parent_im->cache_entry.h; used = 0; EINA_LIST_FOREACH(im->cache.list, l, sci2) { if (sci2->im) used += sci2->dst_w * sci2->dst_h; } if ((size < osize) && (used == 0)) sci->size_adjust = 0; else { osize -= used; if (osize < 0) osize = 0; size -= osize; sci->size_adjust = size * 4; } } else { size *= sizeof(DATA32); if ((cache_size + size) > max_cache_size) { sci->populate_me = 0; im->cache.populate_count--; } } } if (sci->populate_me) { // INF("##! populate!"); sci->im = evas_common_image_new (dst_region_w, dst_region_h, im->cache_entry.flags.alpha); if (sci->im) { static RGBA_Draw_Context *ct = NULL; LKL(cache_lock); im->cache.orig_usage++; im->cache.usage_count = use_counter; im->cache.populate_count--; // pops++; if (!ct) { // FIXME: static ct - never can free on shutdown? not a leak // or real harm - just annoying valgrind bitch ct = evas_common_draw_context_new(); evas_common_draw_context_set_render_op(ct, _EVAS_RENDER_COPY); } if (im->cache_entry.space == EVAS_COLORSPACE_ARGB8888) { #ifdef EVAS_CSERVE2 if (evas_cserve2_use_get()) evas_cache2_image_load_data(&im->cache_entry); else #endif evas_cache_image_load_data(&im->cache_entry); } evas_common_image_colorspace_normalize(im); if (im->image.data) { if (smooth) evas_common_scale_rgba_in_to_out_clip_smooth (im, sci->im, ct, src_region_x, src_region_y, src_region_w, src_region_h, 0, 0, dst_region_w, dst_region_h); else evas_common_scale_rgba_in_to_out_clip_sample (im, sci->im, ct, src_region_x, src_region_y, src_region_w, src_region_h, 0, 0, dst_region_w, dst_region_h); sci->populate_me = 0; #if 0 // visual debug of cached images { int xx, yy; DATA32 *pp; pp = sci->im->image.data; for (yy = 0; yy < dst_region_h; yy++) { for (xx = 0; xx < dst_region_w; xx++) { if (yy & 0x1) { if (xx & 0x1) *pp = 0x882288ff; } else { if (!(xx & 0x1)) *pp = 0x882288ff; } pp++; } } } #endif } if (dounload) { sci->forced_unload = 1; cache_size += sci->size_adjust; } else { cache_size += sci->dst_w * sci->dst_h * 4; } // INF(" + %i @ flop: %i (%ix%i)", // sci->dst_w * sci->dst_h * 4, sci->flop, // sci->dst_w, sci->dst_h); cache_list = eina_inlist_append(cache_list, (Eina_Inlist *)sci); _cache_prune(sci, 0); LKU(cache_lock); didpop = 1; } } if (sci->im && !ie->flags.animated) { if (!didpop) { LKL(cache_lock); cache_list = eina_inlist_remove(cache_list, (Eina_Inlist *)sci); cache_list = eina_inlist_append(cache_list, (Eina_Inlist *)sci); LKU(cache_lock); } else { if (sci->flop >= FLOP_DEL) sci->flop -= FLOP_DEL; } // INF("use cached!"); LKU(im->cache.lock); evas_common_scale_rgba_in_to_out_clip_sample (sci->im, dst, dc, 0, 0, dst_region_w, dst_region_h, dst_region_x, dst_region_y, dst_region_w, dst_region_h); // hits++; // INF("check %p %i < %i", // im, // (int)im->cache.orig_usage, // (int)im->cache.newest_usage); /* while framequeuing is applied, * original image data is loaded by the main thread * just before enqueuing the rendering op into the pipe. * so unloading the original image data here * causes only speed-down side-effect and no memory usage gain; * it will be loaded again for the very next rendering for this image. */ if (ie->scale_hint != EVAS_IMAGE_SCALE_HINT_DYNAMIC) { if ((dounload) || ((im->cache_entry.flags.loaded) && ((!im->cs.no_free) #ifdef EVAS_CSERVE || (ie->data1) #endif #ifdef EVAS_CSERVE2 || (ie->data1) #endif ) && (im->cache_entry.space == EVAS_COLORSPACE_ARGB8888))) { if ((dounload) || (im->cache.orig_usage < (im->cache.newest_usage / 20))) { //FIXME: imagedataunload - inform owners #ifdef EVAS_CSERVE2 if (evas_cserve2_use_get()) evas_cache2_image_unload_data(&im->cache_entry); else #endif evas_common_rgba_image_unload(&im->cache_entry); } } } } else { if (im->cache_entry.space == EVAS_COLORSPACE_ARGB8888) { #ifdef EVAS_CSERVE2 if (evas_cserve2_use_get()) evas_cache2_image_load_data(&im->cache_entry); else #endif evas_cache_image_load_data(&im->cache_entry); } evas_common_image_colorspace_normalize(im); // misses++; LKU(im->cache.lock); if (im->image.data) { if (smooth) evas_common_scale_rgba_in_to_out_clip_smooth(im, dst, dc, src_region_x, src_region_y, src_region_w, src_region_h, dst_region_x, dst_region_y, dst_region_w, dst_region_h); else evas_common_scale_rgba_in_to_out_clip_sample(im, dst, dc, src_region_x, src_region_y, src_region_w, src_region_h, dst_region_x, dst_region_y, dst_region_w, dst_region_h); } } #else RGBA_Image *im = (RGBA_Image *)ie; if (im->cache_entry.space == EVAS_COLORSPACE_ARGB8888) { #ifdef EVAS_CSERVE2 if (evas_cserve2_use_get()) evas_cache2_image_load_data(&im->cache_entry); else #endif evas_cache_image_load_data(&im->cache_entry); } evas_common_image_colorspace_normalize(im); if (im->image.data) { if (smooth) evas_common_scale_rgba_in_to_out_clip_smooth(im, dst, dc, src_region_x, src_region_y, src_region_w, src_region_h, dst_region_x, dst_region_y, dst_region_w, dst_region_h); else evas_common_scale_rgba_in_to_out_clip_sample(im, dst, dc, src_region_x, src_region_y, src_region_w, src_region_h, dst_region_x, dst_region_y, dst_region_w, dst_region_h); } #endif } evas-1.7.9/src/lib/engines/common/evas_op_copy/0000775000175000017500000000000012234557316016444 500000000000000evas-1.7.9/src/lib/engines/common/evas_op_copy/op_copy_mask_color_.c0000664000175000017500000001454112175475547022566 00000000000000/* copy mask x color -> dst */ #ifdef BUILD_C static void _op_copy_mas_c_dp(DATA32 *s __UNUSED__, DATA8 *m, DATA32 c, DATA32 *d, int l) { DATA32 *e; int color; UNROLL8_PLD_WHILE(d, l, e, { color = *m; switch(color) { case 0: break; case 255: *d = c; break; default: color++; *d = INTERP_256(color, c, *d); break; } m++; d++; }); } #define _op_copy_mas_cn_dp _op_copy_mas_c_dp #define _op_copy_mas_can_dp _op_copy_mas_c_dp #define _op_copy_mas_caa_dp _op_copy_mas_c_dp #define _op_copy_mas_c_dpan _op_copy_mas_c_dp #define _op_copy_mas_cn_dpan _op_copy_mas_c_dpan #define _op_copy_mas_can_dpan _op_copy_mas_c_dpan #define _op_copy_mas_caa_dpan _op_copy_mas_c_dpan static void init_copy_mask_color_span_funcs_c(void) { op_copy_span_funcs[SP_N][SM_AS][SC_N][DP][CPU_C] = _op_copy_mas_cn_dp; op_copy_span_funcs[SP_N][SM_AS][SC][DP][CPU_C] = _op_copy_mas_c_dp; op_copy_span_funcs[SP_N][SM_AS][SC_AN][DP][CPU_C] = _op_copy_mas_can_dp; op_copy_span_funcs[SP_N][SM_AS][SC_AA][DP][CPU_C] = _op_copy_mas_caa_dp; op_copy_span_funcs[SP_N][SM_AS][SC_N][DP_AN][CPU_C] = _op_copy_mas_cn_dpan; op_copy_span_funcs[SP_N][SM_AS][SC][DP_AN][CPU_C] = _op_copy_mas_c_dpan; op_copy_span_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_C] = _op_copy_mas_can_dpan; op_copy_span_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_C] = _op_copy_mas_caa_dpan; } #endif #ifdef BUILD_C static void _op_copy_pt_mas_c_dp(DATA32 s __UNUSED__, DATA8 m, DATA32 c, DATA32 *d) { *d = INTERP_256(m + 1, c, *d); } #define _op_copy_pt_mas_cn_dp _op_copy_pt_mas_c_dp #define _op_copy_pt_mas_can_dp _op_copy_pt_mas_c_dp #define _op_copy_pt_mas_caa_dp _op_copy_pt_mas_c_dp #define _op_copy_pt_mas_c_dpan _op_copy_pt_mas_c_dp #define _op_copy_pt_mas_cn_dpan _op_copy_pt_mas_c_dpan #define _op_copy_pt_mas_can_dpan _op_copy_pt_mas_c_dpan #define _op_copy_pt_mas_caa_dpan _op_copy_pt_mas_c_dpan static void init_copy_mask_color_pt_funcs_c(void) { op_copy_pt_funcs[SP_N][SM_AS][SC_N][DP][CPU_C] = _op_copy_pt_mas_cn_dp; op_copy_pt_funcs[SP_N][SM_AS][SC][DP][CPU_C] = _op_copy_pt_mas_c_dp; op_copy_pt_funcs[SP_N][SM_AS][SC_AN][DP][CPU_C] = _op_copy_pt_mas_can_dp; op_copy_pt_funcs[SP_N][SM_AS][SC_AA][DP][CPU_C] = _op_copy_pt_mas_caa_dp; op_copy_pt_funcs[SP_N][SM_AS][SC_N][DP_AN][CPU_C] = _op_copy_pt_mas_cn_dpan; op_copy_pt_funcs[SP_N][SM_AS][SC][DP_AN][CPU_C] = _op_copy_pt_mas_c_dpan; op_copy_pt_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_C] = _op_copy_pt_mas_can_dpan; op_copy_pt_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_C] = _op_copy_pt_mas_caa_dpan; } #endif /*-----*/ /* copy_rel mask x color -> dst */ #ifdef BUILD_C static void _op_copy_rel_mas_c_dp(DATA32 *s __UNUSED__, DATA8 *m, DATA32 c, DATA32 *d, int l) { DATA32 *e; int color; UNROLL8_PLD_WHILE(d, l, e, { color = *m; switch(color) { case 0: break; case 255: color = 1 + (*d >> 24); *d = MUL_256(color, c); break; default: { DATA32 da = 1 + (*d >> 24); da = MUL_256(da, c); color++; *d = INTERP_256(color, da, *d); } break; } m++; d++; }); } #define _op_copy_rel_mas_cn_dp _op_copy_rel_mas_c_dp #define _op_copy_rel_mas_can_dp _op_copy_rel_mas_c_dp #define _op_copy_rel_mas_caa_dp _op_copy_rel_mas_c_dp #define _op_copy_rel_mas_c_dpan _op_copy_mas_c_dpan #define _op_copy_rel_mas_cn_dpan _op_copy_mas_cn_dpan #define _op_copy_rel_mas_can_dpan _op_copy_mas_can_dpan #define _op_copy_rel_mas_caa_dpan _op_copy_mas_caa_dpan static void init_copy_rel_mask_color_span_funcs_c(void) { op_copy_rel_span_funcs[SP_N][SM_AS][SC_N][DP][CPU_C] = _op_copy_rel_mas_cn_dp; op_copy_rel_span_funcs[SP_N][SM_AS][SC][DP][CPU_C] = _op_copy_rel_mas_c_dp; op_copy_rel_span_funcs[SP_N][SM_AS][SC_AN][DP][CPU_C] = _op_copy_rel_mas_can_dp; op_copy_rel_span_funcs[SP_N][SM_AS][SC_AA][DP][CPU_C] = _op_copy_rel_mas_caa_dp; op_copy_rel_span_funcs[SP_N][SM_AS][SC_N][DP_AN][CPU_C] = _op_copy_rel_mas_cn_dpan; op_copy_rel_span_funcs[SP_N][SM_AS][SC][DP_AN][CPU_C] = _op_copy_rel_mas_c_dpan; op_copy_rel_span_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_C] = _op_copy_rel_mas_can_dpan; op_copy_rel_span_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_C] = _op_copy_rel_mas_caa_dpan; } #endif #ifdef BUILD_C static void _op_copy_rel_pt_mas_c_dp(DATA32 s, DATA8 m, DATA32 c, DATA32 *d) { s = 1 + (*d >> 24); s = MUL_256(s, c); *d = INTERP_256(m + 1, s, *d); } #define _op_copy_rel_pt_mas_cn_dp _op_copy_rel_pt_mas_c_dp #define _op_copy_rel_pt_mas_can_dp _op_copy_rel_pt_mas_c_dp #define _op_copy_rel_pt_mas_caa_dp _op_copy_rel_pt_mas_c_dp #define _op_copy_rel_pt_mas_c_dpan _op_copy_pt_mas_c_dpan #define _op_copy_rel_pt_mas_cn_dpan _op_copy_pt_mas_cn_dpan #define _op_copy_rel_pt_mas_can_dpan _op_copy_pt_mas_can_dpan #define _op_copy_rel_pt_mas_caa_dpan _op_copy_pt_mas_caa_dpan static void init_copy_rel_mask_color_pt_funcs_c(void) { op_copy_rel_pt_funcs[SP_N][SM_AS][SC_N][DP][CPU_C] = _op_copy_rel_pt_mas_cn_dp; op_copy_rel_pt_funcs[SP_N][SM_AS][SC][DP][CPU_C] = _op_copy_rel_pt_mas_c_dp; op_copy_rel_pt_funcs[SP_N][SM_AS][SC_AN][DP][CPU_C] = _op_copy_rel_pt_mas_can_dp; op_copy_rel_pt_funcs[SP_N][SM_AS][SC_AA][DP][CPU_C] = _op_copy_rel_pt_mas_caa_dp; op_copy_rel_pt_funcs[SP_N][SM_AS][SC_N][DP_AN][CPU_C] = _op_copy_rel_pt_mas_cn_dpan; op_copy_rel_pt_funcs[SP_N][SM_AS][SC][DP_AN][CPU_C] = _op_copy_rel_pt_mas_c_dpan; op_copy_rel_pt_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_C] = _op_copy_rel_pt_mas_can_dpan; op_copy_rel_pt_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_C] = _op_copy_rel_pt_mas_caa_dpan; } #endif evas-1.7.9/src/lib/engines/common/evas_op_copy/op_copy_pixel_color_neon.c0000664000175000017500000002770712175475547023644 00000000000000/* copy pixel x color --> dst */ #ifdef BUILD_NEON static void _op_copy_p_c_dp_neon(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { // FIXME: neon-it DATA32 *e; UNROLL8_PLD_WHILE(d, l, e, { *d = MUL4_SYM(c, *s); d++; s++; }); } static void _op_copy_p_caa_dp_neon(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { // FIXME: neon-it // FIXME: neon-it DATA32 *e; c = 1 + (c >> 24); UNROLL8_PLD_WHILE(d, l, e, { *d = MUL_256(c, *s); d++; s++; }); } #define _op_copy_pas_c_dp_neon _op_copy_p_c_dp_neon #define _op_copy_pan_c_dp_neon _op_copy_p_c_dp_neon #define _op_copy_p_can_dp_neon _op_copy_p_c_dp_neon #define _op_copy_pas_can_dp_neon _op_copy_pas_c_dp_neon #define _op_copy_pan_can_dp_neon _op_copy_pan_c_dp_neon #define _op_copy_pas_caa_dp_neon _op_copy_p_caa_dp_neon #define _op_copy_pan_caa_dp_neon _op_copy_p_caa_dp_neon #define _op_copy_p_c_dpan_neon _op_copy_p_c_dp_neon #define _op_copy_pas_c_dpan_neon _op_copy_pas_c_dp_neon #define _op_copy_pan_c_dpan_neon _op_copy_pan_c_dp_neon #define _op_copy_p_can_dpan_neon _op_copy_p_can_dp_neon #define _op_copy_pas_can_dpan_neon _op_copy_pas_can_dp_neon #define _op_copy_pan_can_dpan_neon _op_copy_pan_can_dp_neon #define _op_copy_p_caa_dpan_neon _op_copy_p_caa_dp_neon #define _op_copy_pas_caa_dpan_neon _op_copy_pas_caa_dp_neon #define _op_copy_pan_caa_dpan_neon _op_copy_pan_caa_dp_neon static void init_copy_pixel_color_span_funcs_neon(void) { op_copy_span_funcs[SP][SM_N][SC][DP][CPU_NEON] = _op_copy_p_c_dp_neon; op_copy_span_funcs[SP_AS][SM_N][SC][DP][CPU_NEON] = _op_copy_pas_c_dp_neon; op_copy_span_funcs[SP_AN][SM_N][SC][DP][CPU_NEON] = _op_copy_pan_c_dp_neon; op_copy_span_funcs[SP][SM_N][SC_AN][DP][CPU_NEON] = _op_copy_p_can_dp_neon; op_copy_span_funcs[SP_AS][SM_N][SC_AN][DP][CPU_NEON] = _op_copy_pas_can_dp_neon; op_copy_span_funcs[SP_AN][SM_N][SC_AN][DP][CPU_NEON] = _op_copy_pan_can_dp_neon; op_copy_span_funcs[SP][SM_N][SC_AA][DP][CPU_NEON] = _op_copy_p_caa_dp_neon; op_copy_span_funcs[SP_AS][SM_N][SC_AA][DP][CPU_NEON] = _op_copy_pas_caa_dp_neon; op_copy_span_funcs[SP_AN][SM_N][SC_AA][DP][CPU_NEON] = _op_copy_pan_caa_dp_neon; op_copy_span_funcs[SP][SM_N][SC][DP_AN][CPU_NEON] = _op_copy_p_c_dpan_neon; op_copy_span_funcs[SP_AS][SM_N][SC][DP_AN][CPU_NEON] = _op_copy_pas_c_dpan_neon; op_copy_span_funcs[SP_AN][SM_N][SC][DP_AN][CPU_NEON] = _op_copy_pan_c_dpan_neon; op_copy_span_funcs[SP][SM_N][SC_AN][DP_AN][CPU_NEON] = _op_copy_p_can_dpan_neon; op_copy_span_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_NEON] = _op_copy_pas_can_dpan_neon; op_copy_span_funcs[SP_AN][SM_N][SC_AN][DP_AN][CPU_NEON] = _op_copy_pan_can_dpan_neon; op_copy_span_funcs[SP][SM_N][SC_AA][DP_AN][CPU_NEON] = _op_copy_p_caa_dpan_neon; op_copy_span_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_NEON] = _op_copy_pas_caa_dpan_neon; op_copy_span_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_NEON] = _op_copy_pan_caa_dpan_neon; } #endif #ifdef BUILD_NEON static void _op_copy_pt_p_c_dp_neon(DATA32 s, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) { *d = MUL4_SYM(c, s); } #define _op_copy_pt_pas_c_dp_neon _op_copy_pt_p_c_dp_neon #define _op_copy_pt_pan_c_dp_neon _op_copy_pt_p_c_dp_neon #define _op_copy_pt_p_can_dp_neon _op_copy_pt_p_c_dp_neon #define _op_copy_pt_pas_can_dp_neon _op_copy_pt_p_c_dp_neon #define _op_copy_pt_pan_can_dp_neon _op_copy_pt_p_c_dp_neon #define _op_copy_pt_p_caa_dp_neon _op_copy_pt_p_c_dp_neon #define _op_copy_pt_pas_caa_dp_neon _op_copy_pt_p_c_dp_neon #define _op_copy_pt_pan_caa_dp_neon _op_copy_pt_p_c_dp_neon #define _op_copy_pt_p_c_dpan_neon _op_copy_pt_p_c_dp_neon #define _op_copy_pt_pas_c_dpan_neon _op_copy_pt_pas_c_dp_neon #define _op_copy_pt_pan_c_dpan_neon _op_copy_pt_pan_c_dp_neon #define _op_copy_pt_p_can_dpan_neon _op_copy_pt_p_can_dp_neon #define _op_copy_pt_pas_can_dpan_neon _op_copy_pt_pas_can_dp_neon #define _op_copy_pt_pan_can_dpan_neon _op_copy_pt_pan_can_dp_neon #define _op_copy_pt_p_caa_dpan_neon _op_copy_pt_p_caa_dp_neon #define _op_copy_pt_pas_caa_dpan_neon _op_copy_pt_pas_caa_dp_neon #define _op_copy_pt_pan_caa_dpan_neon _op_copy_pt_pan_caa_dp_neon static void init_copy_pixel_color_pt_funcs_neon(void) { op_copy_pt_funcs[SP][SM_N][SC][DP][CPU_NEON] = _op_copy_pt_p_c_dp_neon; op_copy_pt_funcs[SP_AS][SM_N][SC][DP][CPU_NEON] = _op_copy_pt_pas_c_dp_neon; op_copy_pt_funcs[SP_AN][SM_N][SC][DP][CPU_NEON] = _op_copy_pt_pan_c_dp_neon; op_copy_pt_funcs[SP][SM_N][SC_AN][DP][CPU_NEON] = _op_copy_pt_p_can_dp_neon; op_copy_pt_funcs[SP_AS][SM_N][SC_AN][DP][CPU_NEON] = _op_copy_pt_pas_can_dp_neon; op_copy_pt_funcs[SP_AN][SM_N][SC_AN][DP][CPU_NEON] = _op_copy_pt_pan_can_dp_neon; op_copy_pt_funcs[SP][SM_N][SC_AA][DP][CPU_NEON] = _op_copy_pt_p_caa_dp_neon; op_copy_pt_funcs[SP_AS][SM_N][SC_AA][DP][CPU_NEON] = _op_copy_pt_pas_caa_dp_neon; op_copy_pt_funcs[SP_AN][SM_N][SC_AA][DP][CPU_NEON] = _op_copy_pt_pan_caa_dp_neon; op_copy_pt_funcs[SP][SM_N][SC][DP_AN][CPU_NEON] = _op_copy_pt_p_c_dpan_neon; op_copy_pt_funcs[SP_AS][SM_N][SC][DP_AN][CPU_NEON] = _op_copy_pt_pas_c_dpan_neon; op_copy_pt_funcs[SP_AN][SM_N][SC][DP_AN][CPU_NEON] = _op_copy_pt_pan_c_dpan_neon; op_copy_pt_funcs[SP][SM_N][SC_AN][DP_AN][CPU_NEON] = _op_copy_pt_p_can_dpan_neon; op_copy_pt_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_NEON] = _op_copy_pt_pas_can_dpan_neon; op_copy_pt_funcs[SP_AN][SM_N][SC_AN][DP_AN][CPU_NEON] = _op_copy_pt_pan_can_dpan_neon; op_copy_pt_funcs[SP][SM_N][SC_AA][DP_AN][CPU_NEON] = _op_copy_pt_p_caa_dpan_neon; op_copy_pt_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_NEON] = _op_copy_pt_pas_caa_dpan_neon; op_copy_pt_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_NEON] = _op_copy_pt_pan_caa_dpan_neon; } #endif /*-----*/ /* copy_rel pixel x color --> dst */ #ifdef BUILD_NEON static void _op_copy_rel_p_c_dp_neon(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { // FIXME: neon-it DATA32 *e; UNROLL8_PLD_WHILE(d, l, e, { DATA32 cs = MUL4_SYM(c, *s); *d = MUL_SYM(*d >> 24, cs); d++; s++; }); } #define _op_copy_rel_pas_c_dp_neon _op_copy_rel_p_c_dp_neon #define _op_copy_rel_pan_c_dp_neon _op_copy_rel_p_c_dp_neon #define _op_copy_rel_p_can_dp_neon _op_copy_rel_p_c_dp_neon #define _op_copy_rel_pas_can_dp_neon _op_copy_rel_p_c_dp_neon #define _op_copy_rel_pan_can_dp_neon _op_copy_rel_p_c_dp_neon #define _op_copy_rel_p_caa_dp_neon _op_copy_rel_p_c_dp_neon #define _op_copy_rel_pas_caa_dp_neon _op_copy_rel_p_c_dp_neon #define _op_copy_rel_pan_caa_dp_neon _op_copy_rel_p_c_dp_neon #define _op_copy_rel_p_c_dpan_neon _op_copy_p_c_dpan_neon #define _op_copy_rel_pas_c_dpan_neon _op_copy_pas_c_dpan_neon #define _op_copy_rel_pan_c_dpan_neon _op_copy_pan_c_dpan_neon #define _op_copy_rel_p_can_dpan_neon _op_copy_p_can_dpan_neon #define _op_copy_rel_pas_can_dpan_neon _op_copy_pas_can_dpan_neon #define _op_copy_rel_pan_can_dpan_neon _op_copy_pan_can_dpan_neon #define _op_copy_rel_p_caa_dpan_neon _op_copy_p_caa_dpan_neon #define _op_copy_rel_pas_caa_dpan_neon _op_copy_pas_caa_dpan_neon #define _op_copy_rel_pan_caa_dpan_neon _op_copy_pan_caa_dpan_neon static void init_copy_rel_pixel_color_span_funcs_neon(void) { op_copy_rel_span_funcs[SP][SM_N][SC][DP][CPU_NEON] = _op_copy_rel_p_c_dp_neon; op_copy_rel_span_funcs[SP_AS][SM_N][SC][DP][CPU_NEON] = _op_copy_rel_pas_c_dp_neon; op_copy_rel_span_funcs[SP_AN][SM_N][SC][DP][CPU_NEON] = _op_copy_rel_pan_c_dp_neon; op_copy_rel_span_funcs[SP][SM_N][SC_AN][DP][CPU_NEON] = _op_copy_rel_p_can_dp_neon; op_copy_rel_span_funcs[SP_AS][SM_N][SC_AN][DP][CPU_NEON] = _op_copy_rel_pas_can_dp_neon; op_copy_rel_span_funcs[SP_AN][SM_N][SC_AN][DP][CPU_NEON] = _op_copy_rel_pan_can_dp_neon; op_copy_rel_span_funcs[SP][SM_N][SC_AA][DP][CPU_NEON] = _op_copy_rel_p_caa_dp_neon; op_copy_rel_span_funcs[SP_AS][SM_N][SC_AA][DP][CPU_NEON] = _op_copy_rel_pas_caa_dp_neon; op_copy_rel_span_funcs[SP_AN][SM_N][SC_AA][DP][CPU_NEON] = _op_copy_rel_pan_caa_dp_neon; op_copy_rel_span_funcs[SP][SM_N][SC][DP_AN][CPU_NEON] = _op_copy_rel_p_c_dpan_neon; op_copy_rel_span_funcs[SP_AS][SM_N][SC][DP_AN][CPU_NEON] = _op_copy_rel_pas_c_dpan_neon; op_copy_rel_span_funcs[SP_AN][SM_N][SC][DP_AN][CPU_NEON] = _op_copy_rel_pan_c_dpan_neon; op_copy_rel_span_funcs[SP][SM_N][SC_AN][DP_AN][CPU_NEON] = _op_copy_rel_p_can_dpan_neon; op_copy_rel_span_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_NEON] = _op_copy_rel_pas_can_dpan_neon; op_copy_rel_span_funcs[SP_AN][SM_N][SC_AN][DP_AN][CPU_NEON] = _op_copy_rel_pan_can_dpan_neon; op_copy_rel_span_funcs[SP][SM_N][SC_AA][DP_AN][CPU_NEON] = _op_copy_rel_p_caa_dpan_neon; op_copy_rel_span_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_NEON] = _op_copy_rel_pas_caa_dpan_neon; op_copy_rel_span_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_NEON] = _op_copy_rel_pan_caa_dpan_neon; } #endif #ifdef BUILD_NEON static void _op_copy_rel_pt_p_c_dp_neon(DATA32 s, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) { s = MUL4_SYM(c, s); *d = MUL_SYM(*d >> 24, s); } #define _op_copy_rel_pt_pas_c_dp_neon _op_copy_rel_pt_p_c_dp_neon #define _op_copy_rel_pt_pan_c_dp_neon _op_copy_rel_pt_p_c_dp_neon #define _op_copy_rel_pt_p_can_dp_neon _op_copy_rel_pt_p_c_dp_neon #define _op_copy_rel_pt_pas_can_dp_neon _op_copy_rel_pt_p_c_dp_neon #define _op_copy_rel_pt_pan_can_dp_neon _op_copy_rel_pt_p_c_dp_neon #define _op_copy_rel_pt_p_caa_dp_neon _op_copy_rel_pt_p_c_dp_neon #define _op_copy_rel_pt_pas_caa_dp_neon _op_copy_rel_pt_p_c_dp_neon #define _op_copy_rel_pt_pan_caa_dp_neon _op_copy_rel_pt_p_c_dp_neon #define _op_copy_rel_pt_p_c_dpan_neon _op_copy_pt_p_c_dpan_neon #define _op_copy_rel_pt_pas_c_dpan_neon _op_copy_pt_pas_c_dpan_neon #define _op_copy_rel_pt_pan_c_dpan_neon _op_copy_pt_pan_c_dpan_neon #define _op_copy_rel_pt_p_can_dpan_neon _op_copy_pt_p_can_dpan_neon #define _op_copy_rel_pt_pas_can_dpan_neon _op_copy_pt_pas_can_dpan_neon #define _op_copy_rel_pt_pan_can_dpan_neon _op_copy_pt_pan_can_dpan_neon #define _op_copy_rel_pt_p_caa_dpan_neon _op_copy_pt_p_caa_dpan_neon #define _op_copy_rel_pt_pas_caa_dpan_neon _op_copy_pt_pas_caa_dpan_neon #define _op_copy_rel_pt_pan_caa_dpan_neon _op_copy_pt_pan_caa_dpan_neon static void init_copy_rel_pixel_color_pt_funcs_neon(void) { op_copy_rel_pt_funcs[SP][SM_N][SC][DP][CPU_NEON] = _op_copy_rel_pt_p_c_dp_neon; op_copy_rel_pt_funcs[SP_AS][SM_N][SC][DP][CPU_NEON] = _op_copy_rel_pt_pas_c_dp_neon; op_copy_rel_pt_funcs[SP_AN][SM_N][SC][DP][CPU_NEON] = _op_copy_rel_pt_pan_c_dp_neon; op_copy_rel_pt_funcs[SP][SM_N][SC_AN][DP][CPU_NEON] = _op_copy_rel_pt_p_can_dp_neon; op_copy_rel_pt_funcs[SP_AS][SM_N][SC_AN][DP][CPU_NEON] = _op_copy_rel_pt_pas_can_dp_neon; op_copy_rel_pt_funcs[SP_AN][SM_N][SC_AN][DP][CPU_NEON] = _op_copy_rel_pt_pan_can_dp_neon; op_copy_rel_pt_funcs[SP][SM_N][SC_AA][DP][CPU_NEON] = _op_copy_rel_pt_p_caa_dp_neon; op_copy_rel_pt_funcs[SP_AS][SM_N][SC_AA][DP][CPU_NEON] = _op_copy_rel_pt_pas_caa_dp_neon; op_copy_rel_pt_funcs[SP_AN][SM_N][SC_AA][DP][CPU_NEON] = _op_copy_rel_pt_pan_caa_dp_neon; op_copy_rel_pt_funcs[SP][SM_N][SC][DP_AN][CPU_NEON] = _op_copy_rel_pt_p_c_dpan_neon; op_copy_rel_pt_funcs[SP_AS][SM_N][SC][DP_AN][CPU_NEON] = _op_copy_rel_pt_pas_c_dpan_neon; op_copy_rel_pt_funcs[SP_AN][SM_N][SC][DP_AN][CPU_NEON] = _op_copy_rel_pt_pan_c_dpan_neon; op_copy_rel_pt_funcs[SP][SM_N][SC_AN][DP_AN][CPU_NEON] = _op_copy_rel_pt_p_can_dpan_neon; op_copy_rel_pt_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_NEON] = _op_copy_rel_pt_pas_can_dpan_neon; op_copy_rel_pt_funcs[SP_AN][SM_N][SC_AN][DP_AN][CPU_NEON] = _op_copy_rel_pt_pan_can_dpan_neon; op_copy_rel_pt_funcs[SP][SM_N][SC_AA][DP_AN][CPU_NEON] = _op_copy_rel_pt_p_caa_dpan_neon; op_copy_rel_pt_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_NEON] = _op_copy_rel_pt_pas_caa_dpan_neon; op_copy_rel_pt_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_NEON] = _op_copy_rel_pt_pan_caa_dpan_neon; } #endif evas-1.7.9/src/lib/engines/common/evas_op_copy/Makefile.in0000664000175000017500000004667412234557302020445 00000000000000# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/lib/engines/common/evas_op_copy DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/efl_attribute.m4 \ $(top_srcdir)/m4/efl_coverage.m4 \ $(top_srcdir)/m4/efl_doxygen.m4 \ $(top_srcdir)/m4/efl_fnmatch.m4 \ $(top_srcdir)/m4/efl_path_max.m4 \ $(top_srcdir)/m4/efl_shm_open.m4 $(top_srcdir)/m4/efl_tests.m4 \ $(top_srcdir)/m4/evas_check_engine.m4 \ $(top_srcdir)/m4/evas_check_loader.m4 \ $(top_srcdir)/m4/evas_converter.m4 \ $(top_srcdir)/m4/evas_dither.m4 \ $(top_srcdir)/m4/evas_scaler.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHECK_CFLAGS = @CHECK_CFLAGS@ CHECK_LIBS = @CHECK_LIBS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@ DIRECTFB_LIBS = @DIRECTFB_LIBS@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ ECORE_EVAS_CFLAGS = @ECORE_EVAS_CFLAGS@ ECORE_EVAS_LIBS = @ECORE_EVAS_LIBS@ EDB_CFLAGS = @EDB_CFLAGS@ EDB_LIBS = @EDB_LIBS@ EDJE_CFLAGS = @EDJE_CFLAGS@ EDJE_LIBS = @EDJE_LIBS@ EET_CFLAGS = @EET_CFLAGS@ EET_LIBS = @EET_LIBS@ EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@ EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@ EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@ EFL_SHM_OPEN_LIBS = @EFL_SHM_OPEN_LIBS@ EGREP = @EGREP@ EINA_CFLAGS = @EINA_CFLAGS@ EINA_LIBS = @EINA_LIBS@ EVAS_CFLAGS = @EVAS_CFLAGS@ EVAS_GENERAL_CFLAGS = @EVAS_GENERAL_CFLAGS@ EVAS_GENERAL_LIBS = @EVAS_GENERAL_LIBS@ EVAS_LIBS = @EVAS_LIBS@ EVAS_SSE3_CFLAGS = @EVAS_SSE3_CFLAGS@ EVIL_CFLAGS = @EVIL_CFLAGS@ EVIL_LIBS = @EVIL_LIBS@ EXEEXT = @EXEEXT@ EXOTIC_CFLAGS = @EXOTIC_CFLAGS@ EXOTIC_LIBS = @EXOTIC_LIBS@ FGREP = @FGREP@ FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@ FONTCONFIG_LIBS = @FONTCONFIG_LIBS@ FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ FREETYPE_LIBS = @FREETYPE_LIBS@ FRIBIDI_CFLAGS = @FRIBIDI_CFLAGS@ FRIBIDI_LIBS = @FRIBIDI_LIBS@ GL_EET_CFLAGS = @GL_EET_CFLAGS@ GL_EET_LIBS = @GL_EET_LIBS@ GREP = @GREP@ HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@ HARFBUZZ_LIBS = @HARFBUZZ_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LINEBREAK_CFLAGS = @LINEBREAK_CFLAGS@ LINEBREAK_LIBS = @LINEBREAK_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MODULE_ARCH = @MODULE_ARCH@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ SDL_CFLAGS = @SDL_CFLAGS@ SDL_LIBS = @SDL_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ SVG_CFLAGS = @SVG_CFLAGS@ SVG_LIBS = @SVG_LIBS@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ XCB_CFLAGS = @XCB_CFLAGS@ XCB_GL_CFLAGS = @XCB_GL_CFLAGS@ XCB_GL_LIBS = @XCB_GL_LIBS@ XCB_LIBS = @XCB_LIBS@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_ct_OBJC = @ac_ct_OBJC@ altivec_cflags = @altivec_cflags@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ dlopen_libs = @dlopen_libs@ docdir = @docdir@ dvidir = @dvidir@ edje_cc = @edje_cc@ efl_doxygen = @efl_doxygen@ efl_have_doxygen = @efl_have_doxygen@ evas_engine_buffer_cflags = @evas_engine_buffer_cflags@ evas_engine_buffer_libs = @evas_engine_buffer_libs@ evas_engine_direct3d_cflags = @evas_engine_direct3d_cflags@ evas_engine_direct3d_libs = @evas_engine_direct3d_libs@ evas_engine_directfb_cflags = @evas_engine_directfb_cflags@ evas_engine_directfb_libs = @evas_engine_directfb_libs@ evas_engine_fb_cflags = @evas_engine_fb_cflags@ evas_engine_fb_libs = @evas_engine_fb_libs@ evas_engine_gl_cocoa_cflags = @evas_engine_gl_cocoa_cflags@ evas_engine_gl_cocoa_libs = @evas_engine_gl_cocoa_libs@ evas_engine_gl_common_libs = @evas_engine_gl_common_libs@ evas_engine_gl_sdl_cflags = @evas_engine_gl_sdl_cflags@ evas_engine_gl_sdl_libs = @evas_engine_gl_sdl_libs@ evas_engine_gl_xcb_cflags = @evas_engine_gl_xcb_cflags@ evas_engine_gl_xcb_libs = @evas_engine_gl_xcb_libs@ evas_engine_gl_xlib_cflags = @evas_engine_gl_xlib_cflags@ evas_engine_gl_xlib_libs = @evas_engine_gl_xlib_libs@ evas_engine_psl1ght_cflags = @evas_engine_psl1ght_cflags@ evas_engine_psl1ght_libs = @evas_engine_psl1ght_libs@ evas_engine_software_16_sdl_cflags = @evas_engine_software_16_sdl_cflags@ evas_engine_software_16_sdl_libs = @evas_engine_software_16_sdl_libs@ evas_engine_software_16_wince_cflags = @evas_engine_software_16_wince_cflags@ evas_engine_software_16_wince_libs = @evas_engine_software_16_wince_libs@ evas_engine_software_16_x11_cflags = @evas_engine_software_16_x11_cflags@ evas_engine_software_16_x11_libs = @evas_engine_software_16_x11_libs@ evas_engine_software_8_x11_cflags = @evas_engine_software_8_x11_cflags@ evas_engine_software_8_x11_libs = @evas_engine_software_8_x11_libs@ evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@ evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@ evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@ evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ evas_image_loader_edb_libs = @evas_image_loader_edb_libs@ evas_image_loader_eet_cflags = @evas_image_loader_eet_cflags@ evas_image_loader_eet_libs = @evas_image_loader_eet_libs@ evas_image_loader_generic_cflags = @evas_image_loader_generic_cflags@ evas_image_loader_generic_libs = @evas_image_loader_generic_libs@ evas_image_loader_gif_cflags = @evas_image_loader_gif_cflags@ evas_image_loader_gif_libs = @evas_image_loader_gif_libs@ evas_image_loader_ico_cflags = @evas_image_loader_ico_cflags@ evas_image_loader_ico_libs = @evas_image_loader_ico_libs@ evas_image_loader_jpeg_cflags = @evas_image_loader_jpeg_cflags@ evas_image_loader_jpeg_libs = @evas_image_loader_jpeg_libs@ evas_image_loader_pmaps_cflags = @evas_image_loader_pmaps_cflags@ evas_image_loader_pmaps_libs = @evas_image_loader_pmaps_libs@ evas_image_loader_png_cflags = @evas_image_loader_png_cflags@ evas_image_loader_png_libs = @evas_image_loader_png_libs@ evas_image_loader_psd_cflags = @evas_image_loader_psd_cflags@ evas_image_loader_psd_libs = @evas_image_loader_psd_libs@ evas_image_loader_svg_cflags = @evas_image_loader_svg_cflags@ evas_image_loader_svg_libs = @evas_image_loader_svg_libs@ evas_image_loader_tga_cflags = @evas_image_loader_tga_cflags@ evas_image_loader_tga_libs = @evas_image_loader_tga_libs@ evas_image_loader_tiff_cflags = @evas_image_loader_tiff_cflags@ evas_image_loader_tiff_libs = @evas_image_loader_tiff_libs@ evas_image_loader_wbmp_cflags = @evas_image_loader_wbmp_cflags@ evas_image_loader_wbmp_libs = @evas_image_loader_wbmp_libs@ evas_image_loader_xpm_cflags = @evas_image_loader_xpm_cflags@ evas_image_loader_xpm_libs = @evas_image_loader_xpm_libs@ exec_prefix = @exec_prefix@ have_evas_engine_gl_x11 = @have_evas_engine_gl_x11@ have_evas_engine_gl_xcb = @have_evas_engine_gl_xcb@ have_evas_engine_gl_xlib = @have_evas_engine_gl_xlib@ have_evas_engine_software_x11 = @have_evas_engine_software_x11@ have_evas_engine_software_xcb = @have_evas_engine_software_xcb@ have_evas_engine_software_xlib = @have_evas_engine_software_xlib@ have_lcov = @have_lcov@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_enable_auto_import = @lt_enable_auto_import@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgconfig_requires_private = @pkgconfig_requires_private@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pthread_cflags = @pthread_cflags@ pthread_libs = @pthread_libs@ release_info = @release_info@ requirement_evas = @requirement_evas@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ shm_open_libs = @shm_open_libs@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ version_info = @version_info@ MAINTAINERCLEANFILES = Makefile.in EXTRA_DIST = \ op_copy_color_.c \ op_copy_color_i386.c \ op_copy_color_neon.c \ op_copy_mask_color_.c \ op_copy_mask_color_i386.c \ op_copy_mask_color_neon.c \ op_copy_pixel_.c \ op_copy_pixel_neon.c \ op_copy_pixel_color_.c \ op_copy_pixel_color_i386.c \ op_copy_pixel_color_neon.c \ op_copy_pixel_i386.c \ op_copy_pixel_mask_.c \ op_copy_pixel_mask_i386.c \ op_copy_pixel_mask_neon.c all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/lib/engines/common/evas_op_copy/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/lib/engines/common/evas_op_copy/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags TAGS: ctags CTAGS: cscope cscopelist: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ cscopelist-am ctags-am distclean distclean-generic \ distclean-libtool distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: evas-1.7.9/src/lib/engines/common/evas_op_copy/op_copy_pixel_mask_i386.c0000664000175000017500000001242712175475547023204 00000000000000/* copy pixel x mask --> dst */ #ifdef BUILD_MMX static void _op_copy_p_mas_dp_mmx(DATA32 *s, DATA8 *m, DATA32 c __UNUSED__, DATA32 *d, int l) { DATA32 *e = d + l; pxor_r2r(mm0, mm0); MOV_A2R(ALPHA_255, mm5) while (d < e) { l = *m; switch(l) { case 0: break; case 255: *d = *s; break; default: l++; MOV_A2R(l, mm3) MOV_P2R(*s, mm2, mm0) MOV_P2R(*d, mm1, mm0) INTERP_256_R2R(mm3, mm2, mm1, mm5); MOV_R2P(mm1, *d, mm0) break; } m++; d++; } } #define _op_copy_pan_mas_dp_mmx _op_copy_p_mas_dp_mmx #define _op_copy_pas_mas_dp_mmx _op_copy_p_mas_dp_mmx #define _op_copy_p_mas_dpan_mmx _op_copy_p_mas_dp_mmx #define _op_copy_pan_mas_dpan_mmx _op_copy_p_mas_dpan_mmx #define _op_copy_pas_mas_dpan_mmx _op_copy_p_mas_dpan_mmx static void init_copy_pixel_mask_span_funcs_mmx(void) { op_copy_span_funcs[SP][SM_AS][SC_N][DP][CPU_MMX] = _op_copy_p_mas_dp_mmx; op_copy_span_funcs[SP_AN][SM_AS][SC_N][DP][CPU_MMX] = _op_copy_pan_mas_dp_mmx; op_copy_span_funcs[SP_AS][SM_AS][SC_N][DP][CPU_MMX] = _op_copy_pas_mas_dp_mmx; op_copy_span_funcs[SP][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_copy_p_mas_dpan_mmx; op_copy_span_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_copy_pan_mas_dpan_mmx; op_copy_span_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_copy_pas_mas_dpan_mmx; } #endif #ifdef BUILD_MMX static void _op_copy_pt_p_mas_dp_mmx(DATA32 s, DATA8 m, DATA32 c, DATA32 *d) { c = m + 1; MOV_A2R(ALPHA_255, mm5) MOV_A2R(c, mm3) pxor_r2r(mm0, mm0); MOV_P2R(s, mm2, mm0) MOV_P2R(*d, mm1, mm0) INTERP_256_R2R(mm3, mm2, mm1, mm5); MOV_R2P(mm1, *d, mm0) } #define _op_copy_pt_pan_mas_dp_mmx _op_copy_pt_p_mas_dp_mmx #define _op_copy_pt_pas_mas_dp_mmx _op_copy_pt_p_mas_dp_mmx #define _op_copy_pt_p_mas_dpan_mmx _op_copy_pt_p_mas_dp_mmx #define _op_copy_pt_pan_mas_dpan_mmx _op_copy_pt_p_mas_dpan_mmx #define _op_copy_pt_pas_mas_dpan_mmx _op_copy_pt_p_mas_dpan_mmx static void init_copy_pixel_mask_pt_funcs_mmx(void) { op_copy_pt_funcs[SP][SM_AS][SC_N][DP][CPU_MMX] = _op_copy_pt_p_mas_dp_mmx; op_copy_pt_funcs[SP_AN][SM_AS][SC_N][DP][CPU_MMX] = _op_copy_pt_pan_mas_dp_mmx; op_copy_pt_funcs[SP_AS][SM_AS][SC_N][DP][CPU_MMX] = _op_copy_pt_pas_mas_dp_mmx; op_copy_pt_funcs[SP][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_copy_pt_p_mas_dpan_mmx; op_copy_pt_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_copy_pt_pan_mas_dpan_mmx; op_copy_pt_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_copy_pt_pas_mas_dpan_mmx; } #endif /*-----*/ /* copy_rel pixel x mask --> dst */ #ifdef BUILD_MMX static void _op_copy_rel_p_mas_dp_mmx(DATA32 *s, DATA8 *m, DATA32 c __UNUSED__, DATA32 *d, int l) { DATA32 *e = d + l; pxor_r2r(mm0, mm0); MOV_A2R(ALPHA_255, mm5) while (d < e) { l = *m; switch(l) { case 0: break; case 255: MOV_P2R(*s, mm2, mm0) MOV_PA2R(*d, mm1) MUL4_SYM_R2R(mm2, mm1, mm5) MOV_R2P(mm1, *d, mm0) break; default: l++; MOV_P2R(*s, mm3, mm0) MOV_P2R(*d, mm1, mm0) MOV_RA2R(mm1, mm2) MUL4_SYM_R2R(mm3, mm2, mm5) MOV_A2R(l, mm3) INTERP_256_R2R(mm3, mm2, mm1, mm5) MOV_R2P(mm1, *d, mm0) break; } m++; s++; d++; } } #define _op_copy_rel_pan_mas_dp_mmx _op_copy_rel_p_mas_dp_mmx #define _op_copy_rel_pas_mas_dp_mmx _op_copy_rel_p_mas_dp_mmx #define _op_copy_rel_p_mas_dpan_mmx _op_copy_p_mas_dpan_mmx #define _op_copy_rel_pan_mas_dpan_mmx _op_copy_pan_mas_dpan_mmx #define _op_copy_rel_pas_mas_dpan_mmx _op_copy_pas_mas_dpan_mmx static void init_copy_rel_pixel_mask_span_funcs_mmx(void) { op_copy_rel_span_funcs[SP][SM_AS][SC_N][DP][CPU_MMX] = _op_copy_rel_p_mas_dp_mmx; op_copy_rel_span_funcs[SP_AN][SM_AS][SC_N][DP][CPU_MMX] = _op_copy_rel_pan_mas_dp_mmx; op_copy_rel_span_funcs[SP_AS][SM_AS][SC_N][DP][CPU_MMX] = _op_copy_rel_pas_mas_dp_mmx; op_copy_rel_span_funcs[SP][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_copy_rel_p_mas_dpan_mmx; op_copy_rel_span_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_copy_rel_pan_mas_dpan_mmx; op_copy_rel_span_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_copy_rel_pas_mas_dpan_mmx; } #endif #ifdef BUILD_MMX static void _op_copy_rel_pt_p_mas_dp_mmx(DATA32 s, DATA8 m, DATA32 c, DATA32 *d) { c = m + 1; pxor_r2r(mm0, mm0); MOV_A2R(ALPHA_255, mm5) MOV_P2R(s, mm3, mm0) MOV_P2R(*d, mm1, mm0) MOV_RA2R(mm1, mm2) MUL4_SYM_R2R(mm3, mm2, mm5) MOV_A2R(c, mm3) INTERP_256_R2R(mm3, mm2, mm1, mm5) MOV_R2P(mm1, *d, mm0) } #define _op_copy_rel_pt_pan_mas_dp_mmx _op_copy_rel_pt_p_mas_dp_mmx #define _op_copy_rel_pt_pas_mas_dp_mmx _op_copy_rel_pt_p_mas_dp_mmx #define _op_copy_rel_pt_p_mas_dpan_mmx _op_copy_pt_p_mas_dpan_mmx #define _op_copy_rel_pt_pan_mas_dpan_mmx _op_copy_pt_pan_mas_dpan_mmx #define _op_copy_rel_pt_pas_mas_dpan_mmx _op_copy_pt_pas_mas_dpan_mmx static void init_copy_rel_pixel_mask_pt_funcs_mmx(void) { op_copy_rel_pt_funcs[SP][SM_AS][SC_N][DP][CPU_MMX] = _op_copy_rel_pt_p_mas_dp_mmx; op_copy_rel_pt_funcs[SP_AN][SM_AS][SC_N][DP][CPU_MMX] = _op_copy_rel_pt_pan_mas_dp_mmx; op_copy_rel_pt_funcs[SP_AS][SM_AS][SC_N][DP][CPU_MMX] = _op_copy_rel_pt_pas_mas_dp_mmx; op_copy_rel_pt_funcs[SP][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_copy_rel_pt_p_mas_dpan_mmx; op_copy_rel_pt_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_copy_rel_pt_pan_mas_dpan_mmx; op_copy_rel_pt_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_copy_rel_pt_pas_mas_dpan_mmx; } #endif evas-1.7.9/src/lib/engines/common/evas_op_copy/op_copy_color_.c0000664000175000017500000001136112175475547021550 00000000000000/* copy color --> dst */ #ifdef BUILD_C static void _op_copy_c_dp(DATA32 *s __UNUSED__, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { DATA32 *e; UNROLL8_PLD_WHILE(d, l, e, { *d = c; d++; }); } #define _op_copy_cn_dp _op_copy_c_dp #define _op_copy_can_dp _op_copy_c_dp #define _op_copy_caa_dp _op_copy_c_dp #define _op_copy_c_dpan _op_copy_c_dp #define _op_copy_cn_dpan _op_copy_c_dp #define _op_copy_can_dpan _op_copy_c_dp #define _op_copy_caa_dpan _op_copy_c_dp static void init_copy_color_span_funcs_c(void) { op_copy_span_funcs[SP_N][SM_N][SC_N][DP][CPU_C] = _op_copy_cn_dp; op_copy_span_funcs[SP_N][SM_N][SC][DP][CPU_C] = _op_copy_c_dp; op_copy_span_funcs[SP_N][SM_N][SC_AN][DP][CPU_C] = _op_copy_can_dp; op_copy_span_funcs[SP_N][SM_N][SC_AA][DP][CPU_C] = _op_copy_caa_dp; op_copy_span_funcs[SP_N][SM_N][SC_N][DP_AN][CPU_C] = _op_copy_cn_dpan; op_copy_span_funcs[SP_N][SM_N][SC][DP_AN][CPU_C] = _op_copy_c_dpan; op_copy_span_funcs[SP_N][SM_N][SC_AN][DP_AN][CPU_C] = _op_copy_can_dpan; op_copy_span_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_C] = _op_copy_caa_dpan; } #endif #ifdef BUILD_C static void _op_copy_pt_c_dp(DATA32 s __UNUSED__, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) { *d = c; } #define _op_copy_pt_cn_dp _op_copy_pt_c_dp #define _op_copy_pt_can_dp _op_copy_pt_c_dp #define _op_copy_pt_caa_dp _op_copy_pt_c_dp #define _op_copy_pt_c_dpan _op_copy_pt_c_dp #define _op_copy_pt_cn_dpan _op_copy_pt_c_dp #define _op_copy_pt_can_dpan _op_copy_pt_c_dp #define _op_copy_pt_caa_dpan _op_copy_pt_c_dp static void init_copy_color_pt_funcs_c(void) { op_copy_pt_funcs[SP_N][SM_N][SC_N][DP][CPU_C] = _op_copy_pt_cn_dp; op_copy_pt_funcs[SP_N][SM_N][SC][DP][CPU_C] = _op_copy_pt_c_dp; op_copy_pt_funcs[SP_N][SM_N][SC_AN][DP][CPU_C] = _op_copy_pt_can_dp; op_copy_pt_funcs[SP_N][SM_N][SC_AA][DP][CPU_C] = _op_copy_pt_caa_dp; op_copy_pt_funcs[SP_N][SM_N][SC_N][DP_AN][CPU_C] = _op_copy_pt_cn_dpan; op_copy_pt_funcs[SP_N][SM_N][SC][DP_AN][CPU_C] = _op_copy_pt_c_dpan; op_copy_pt_funcs[SP_N][SM_N][SC_AN][DP_AN][CPU_C] = _op_copy_pt_can_dpan; op_copy_pt_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_C] = _op_copy_pt_caa_dpan; } #endif /*-----*/ /* copy_rel color --> dst */ #ifdef BUILD_C static void _op_copy_rel_c_dp(DATA32 *s __UNUSED__, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { DATA32 *e; UNROLL8_PLD_WHILE(d, l, e, { *d = MUL_SYM(*d >> 24, c); d++; }); } #define _op_copy_rel_cn_dp _op_copy_rel_c_dp #define _op_copy_rel_can_dp _op_copy_rel_c_dp #define _op_copy_rel_caa_dp _op_copy_rel_c_dp #define _op_copy_rel_c_dpan _op_copy_c_dp #define _op_copy_rel_cn_dpan _op_copy_cn_dp #define _op_copy_rel_can_dpan _op_copy_can_dp #define _op_copy_rel_caa_dpan _op_copy_caa_dp static void init_copy_rel_color_span_funcs_c(void) { op_copy_rel_span_funcs[SP_N][SM_N][SC_N][DP][CPU_C] = _op_copy_rel_cn_dp; op_copy_rel_span_funcs[SP_N][SM_N][SC][DP][CPU_C] = _op_copy_rel_c_dp; op_copy_rel_span_funcs[SP_N][SM_N][SC_AN][DP][CPU_C] = _op_copy_rel_can_dp; op_copy_rel_span_funcs[SP_N][SM_N][SC_AA][DP][CPU_C] = _op_copy_rel_caa_dp; op_copy_rel_span_funcs[SP_N][SM_N][SC_N][DP_AN][CPU_C] = _op_copy_rel_cn_dpan; op_copy_rel_span_funcs[SP_N][SM_N][SC][DP_AN][CPU_C] = _op_copy_rel_c_dpan; op_copy_rel_span_funcs[SP_N][SM_N][SC_AN][DP_AN][CPU_C] = _op_copy_rel_can_dpan; op_copy_rel_span_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_C] = _op_copy_rel_caa_dpan; } #endif #ifdef BUILD_C static void _op_copy_rel_pt_c_dp(DATA32 s, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) { s = 1 + (*d >> 24); *d = MUL_256(s, c); } #define _op_copy_rel_pt_cn_dp _op_copy_rel_pt_c_dp #define _op_copy_rel_pt_can_dp _op_copy_rel_pt_c_dp #define _op_copy_rel_pt_caa_dp _op_copy_rel_pt_c_dp #define _op_copy_rel_pt_c_dpan _op_copy_pt_c_dp #define _op_copy_rel_pt_cn_dpan _op_copy_pt_cn_dp #define _op_copy_rel_pt_can_dpan _op_copy_pt_can_dp #define _op_copy_rel_pt_caa_dpan _op_copy_pt_caa_dp static void init_copy_rel_color_pt_funcs_c(void) { op_copy_rel_pt_funcs[SP_N][SM_N][SC_N][DP][CPU_C] = _op_copy_rel_pt_cn_dp; op_copy_rel_pt_funcs[SP_N][SM_N][SC][DP][CPU_C] = _op_copy_rel_pt_c_dp; op_copy_rel_pt_funcs[SP_N][SM_N][SC_AN][DP][CPU_C] = _op_copy_rel_pt_can_dp; op_copy_rel_pt_funcs[SP_N][SM_N][SC_AA][DP][CPU_C] = _op_copy_rel_pt_caa_dp; op_copy_rel_pt_funcs[SP_N][SM_N][SC_N][DP_AN][CPU_C] = _op_copy_rel_pt_cn_dpan; op_copy_rel_pt_funcs[SP_N][SM_N][SC][DP_AN][CPU_C] = _op_copy_rel_pt_c_dpan; op_copy_rel_pt_funcs[SP_N][SM_N][SC_AN][DP_AN][CPU_C] = _op_copy_rel_pt_can_dpan; op_copy_rel_pt_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_C] = _op_copy_rel_pt_caa_dpan; } #endif evas-1.7.9/src/lib/engines/common/evas_op_copy/op_copy_mask_color_neon.c0000664000175000017500000001570212175475547023446 00000000000000/* copy mask x color -> dst */ #ifdef BUILD_NEON static void _op_copy_mas_c_dp_neon(DATA32 *s __UNUSED__, DATA8 *m, DATA32 c, DATA32 *d, int l) { // FIXME: neon-it DATA32 *e; int color; UNROLL8_PLD_WHILE(d, l, e, { color = *m; switch(color) { case 0: break; case 255: *d = c; break; default: color++; *d = INTERP_256(color, c, *d); break; } m++; d++; }); } #define _op_copy_mas_cn_dp_neon _op_copy_mas_c_dp_neon #define _op_copy_mas_can_dp_neon _op_copy_mas_c_dp_neon #define _op_copy_mas_caa_dp_neon _op_copy_mas_c_dp_neon #define _op_copy_mas_c_dpan_neon _op_copy_mas_c_dp_neon #define _op_copy_mas_cn_dpan_neon _op_copy_mas_c_dpan_neon #define _op_copy_mas_can_dpan_neon _op_copy_mas_c_dpan_neon #define _op_copy_mas_caa_dpan_neon _op_copy_mas_c_dpan_neon static void init_copy_mask_color_span_funcs_neon(void) { op_copy_span_funcs[SP_N][SM_AS][SC_N][DP][CPU_NEON] = _op_copy_mas_cn_dp_neon; op_copy_span_funcs[SP_N][SM_AS][SC][DP][CPU_NEON] = _op_copy_mas_c_dp_neon; op_copy_span_funcs[SP_N][SM_AS][SC_AN][DP][CPU_NEON] = _op_copy_mas_can_dp_neon; op_copy_span_funcs[SP_N][SM_AS][SC_AA][DP][CPU_NEON] = _op_copy_mas_caa_dp_neon; op_copy_span_funcs[SP_N][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_copy_mas_cn_dpan_neon; op_copy_span_funcs[SP_N][SM_AS][SC][DP_AN][CPU_NEON] = _op_copy_mas_c_dpan_neon; op_copy_span_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_NEON] = _op_copy_mas_can_dpan_neon; op_copy_span_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_NEON] = _op_copy_mas_caa_dpan_neon; } #endif #ifdef BUILD_NEON static void _op_copy_pt_mas_c_dp_neon(DATA32 s, DATA8 m, DATA32 c, DATA32 *d) { *d = INTERP_256(m + 1, c, *d); } #define _op_copy_pt_mas_cn_dp_neon _op_copy_pt_mas_c_dp_neon #define _op_copy_pt_mas_can_dp_neon _op_copy_pt_mas_c_dp_neon #define _op_copy_pt_mas_caa_dp_neon _op_copy_pt_mas_c_dp_neon #define _op_copy_pt_mas_c_dpan_neon _op_copy_pt_mas_c_dp_neon #define _op_copy_pt_mas_cn_dpan_neon _op_copy_pt_mas_c_dpan_neon #define _op_copy_pt_mas_can_dpan_neon _op_copy_pt_mas_c_dpan_neon #define _op_copy_pt_mas_caa_dpan_neon _op_copy_pt_mas_c_dpan_neon static void init_copy_mask_color_pt_funcs_neon(void) { op_copy_pt_funcs[SP_N][SM_AS][SC_N][DP][CPU_NEON] = _op_copy_pt_mas_cn_dp_neon; op_copy_pt_funcs[SP_N][SM_AS][SC][DP][CPU_NEON] = _op_copy_pt_mas_c_dp_neon; op_copy_pt_funcs[SP_N][SM_AS][SC_AN][DP][CPU_NEON] = _op_copy_pt_mas_can_dp_neon; op_copy_pt_funcs[SP_N][SM_AS][SC_AA][DP][CPU_NEON] = _op_copy_pt_mas_caa_dp_neon; op_copy_pt_funcs[SP_N][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_copy_pt_mas_cn_dpan_neon; op_copy_pt_funcs[SP_N][SM_AS][SC][DP_AN][CPU_NEON] = _op_copy_pt_mas_c_dpan_neon; op_copy_pt_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_NEON] = _op_copy_pt_mas_can_dpan_neon; op_copy_pt_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_NEON] = _op_copy_pt_mas_caa_dpan_neon; } #endif /*-----*/ /* copy_rel mask x color -> dst */ #ifdef BUILD_NEON static void _op_copy_rel_mas_c_dp_neon(DATA32 *s __UNUSED__, DATA8 *m, DATA32 c, DATA32 *d, int l) { // FIXME: neon-it DATA32 *e; int color; UNROLL8_PLD_WHILE(d, l, e, { color = *m; switch(color) { case 0: break; case 255: color = 1 + (*d >> 24); *d = MUL_256(color, c); break; default: { DATA32 da = 1 + (*d >> 24); da = MUL_256(da, c); color++; *d = INTERP_256(color, da, *d); } break; } m++; d++; }); } #define _op_copy_rel_mas_cn_dp_neon _op_copy_rel_mas_c_dp_neon #define _op_copy_rel_mas_can_dp_neon _op_copy_rel_mas_c_dp_neon #define _op_copy_rel_mas_caa_dp_neon _op_copy_rel_mas_c_dp_neon #define _op_copy_rel_mas_c_dpan_neon _op_copy_mas_c_dpan_neon #define _op_copy_rel_mas_cn_dpan_neon _op_copy_mas_cn_dpan_neon #define _op_copy_rel_mas_can_dpan_neon _op_copy_mas_can_dpan_neon #define _op_copy_rel_mas_caa_dpan_neon _op_copy_mas_caa_dpan_neon static void init_copy_rel_mask_color_span_funcs_neon(void) { op_copy_rel_span_funcs[SP_N][SM_AS][SC_N][DP][CPU_NEON] = _op_copy_rel_mas_cn_dp_neon; op_copy_rel_span_funcs[SP_N][SM_AS][SC][DP][CPU_NEON] = _op_copy_rel_mas_c_dp_neon; op_copy_rel_span_funcs[SP_N][SM_AS][SC_AN][DP][CPU_NEON] = _op_copy_rel_mas_can_dp_neon; op_copy_rel_span_funcs[SP_N][SM_AS][SC_AA][DP][CPU_NEON] = _op_copy_rel_mas_caa_dp_neon; op_copy_rel_span_funcs[SP_N][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_copy_rel_mas_cn_dpan_neon; op_copy_rel_span_funcs[SP_N][SM_AS][SC][DP_AN][CPU_NEON] = _op_copy_rel_mas_c_dpan_neon; op_copy_rel_span_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_NEON] = _op_copy_rel_mas_can_dpan_neon; op_copy_rel_span_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_NEON] = _op_copy_rel_mas_caa_dpan_neon; } #endif #ifdef BUILD_NEON static void _op_copy_rel_pt_mas_c_dp_neon(DATA32 s, DATA8 m, DATA32 c, DATA32 *d) { s = 1 + (*d >> 24); s = MUL_256(s, c); *d = INTERP_256(m + 1, s, *d); } #define _op_copy_rel_pt_mas_cn_dp_neon _op_copy_rel_pt_mas_c_dp_neon #define _op_copy_rel_pt_mas_can_dp_neon _op_copy_rel_pt_mas_c_dp_neon #define _op_copy_rel_pt_mas_caa_dp_neon _op_copy_rel_pt_mas_c_dp_neon #define _op_copy_rel_pt_mas_c_dpan_neon _op_copy_pt_mas_c_dpan_neon #define _op_copy_rel_pt_mas_cn_dpan_neon _op_copy_pt_mas_cn_dpan_neon #define _op_copy_rel_pt_mas_can_dpan_neon _op_copy_pt_mas_can_dpan_neon #define _op_copy_rel_pt_mas_caa_dpan_neon _op_copy_pt_mas_caa_dpan_neon static void init_copy_rel_mask_color_pt_funcs_neon(void) { op_copy_rel_pt_funcs[SP_N][SM_AS][SC_N][DP][CPU_NEON] = _op_copy_rel_pt_mas_cn_dp_neon; op_copy_rel_pt_funcs[SP_N][SM_AS][SC][DP][CPU_NEON] = _op_copy_rel_pt_mas_c_dp_neon; op_copy_rel_pt_funcs[SP_N][SM_AS][SC_AN][DP][CPU_NEON] = _op_copy_rel_pt_mas_can_dp_neon; op_copy_rel_pt_funcs[SP_N][SM_AS][SC_AA][DP][CPU_NEON] = _op_copy_rel_pt_mas_caa_dp_neon; op_copy_rel_pt_funcs[SP_N][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_copy_rel_pt_mas_cn_dpan_neon; op_copy_rel_pt_funcs[SP_N][SM_AS][SC][DP_AN][CPU_NEON] = _op_copy_rel_pt_mas_c_dpan_neon; op_copy_rel_pt_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_NEON] = _op_copy_rel_pt_mas_can_dpan_neon; op_copy_rel_pt_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_NEON] = _op_copy_rel_pt_mas_caa_dpan_neon; } #endif evas-1.7.9/src/lib/engines/common/evas_op_copy/op_copy_color_i386.c0000664000175000017500000001256012175475547022164 00000000000000/* copy color --> dst */ #ifdef BUILD_MMX static void _op_copy_c_dp_mmx(DATA32 *s __UNUSED__, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { DATA32 *e = d + l - 1; movd_m2r(c, mm1); movq_r2r(mm1, mm2); psllq_i2r(32, mm1); por_r2r(mm2, mm1); for (; d < e; d+=2) { movq_r2m(mm1, d[0]); } e+=1; for (; d < e; d++) { *d = c; } } #define _op_copy_cn_dp_mmx _op_copy_c_dp_mmx #define _op_copy_can_dp_mmx _op_copy_c_dp_mmx #define _op_copy_caa_dp_mmx _op_copy_c_dp_mmx #define _op_copy_cn_dpan_mmx _op_copy_c_dp_mmx #define _op_copy_c_dpan_mmx _op_copy_c_dp_mmx #define _op_copy_can_dpan_mmx _op_copy_c_dp_mmx #define _op_copy_caa_dpan_mmx _op_copy_c_dp_mmx static void init_copy_color_span_funcs_mmx(void) { op_copy_span_funcs[SP_N][SM_N][SC_N][DP][CPU_MMX] = _op_copy_cn_dp_mmx; op_copy_span_funcs[SP_N][SM_N][SC][DP][CPU_MMX] = _op_copy_c_dp_mmx; op_copy_span_funcs[SP_N][SM_N][SC_AN][DP][CPU_MMX] = _op_copy_can_dp_mmx; op_copy_span_funcs[SP_N][SM_N][SC_AA][DP][CPU_MMX] = _op_copy_caa_dp_mmx; op_copy_span_funcs[SP_N][SM_N][SC_N][DP_AN][CPU_MMX] = _op_copy_cn_dpan_mmx; op_copy_span_funcs[SP_N][SM_N][SC][DP_AN][CPU_MMX] = _op_copy_c_dpan_mmx; op_copy_span_funcs[SP_N][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_copy_can_dpan_mmx; op_copy_span_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_copy_caa_dpan_mmx; } #endif #ifdef BUILD_MMX static void _op_copy_pt_c_dp_mmx(DATA32 s __UNUSED__, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) { *d = c; } #define _op_copy_pt_cn_dp_mmx _op_copy_pt_c_dp_mmx #define _op_copy_pt_can_dp_mmx _op_copy_pt_c_dp_mmx #define _op_copy_pt_caa_dp_mmx _op_copy_pt_c_dp_mmx #define _op_copy_pt_cn_dpan_mmx _op_copy_pt_c_dp_mmx #define _op_copy_pt_c_dpan_mmx _op_copy_pt_c_dp_mmx #define _op_copy_pt_can_dpan_mmx _op_copy_pt_c_dp_mmx #define _op_copy_pt_caa_dpan_mmx _op_copy_pt_c_dp_mmx static void init_copy_color_pt_funcs_mmx(void) { op_copy_pt_funcs[SP_N][SM_N][SC_N][DP][CPU_MMX] = _op_copy_pt_cn_dp_mmx; op_copy_pt_funcs[SP_N][SM_N][SC][DP][CPU_MMX] = _op_copy_pt_c_dp_mmx; op_copy_pt_funcs[SP_N][SM_N][SC_AN][DP][CPU_MMX] = _op_copy_pt_can_dp_mmx; op_copy_pt_funcs[SP_N][SM_N][SC_AA][DP][CPU_MMX] = _op_copy_pt_caa_dp_mmx; op_copy_pt_funcs[SP_N][SM_N][SC_N][DP_AN][CPU_MMX] = _op_copy_pt_cn_dpan_mmx; op_copy_pt_funcs[SP_N][SM_N][SC][DP_AN][CPU_MMX] = _op_copy_pt_c_dpan_mmx; op_copy_pt_funcs[SP_N][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_copy_pt_can_dpan_mmx; op_copy_pt_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_copy_pt_caa_dpan_mmx; } #endif /*-----*/ /* copy_rel color --> dst */ #ifdef BUILD_MMX static void _op_copy_rel_c_dp_mmx(DATA32 *s __UNUSED__, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { DATA32 *e = d + l; pxor_r2r(mm0, mm0); MOV_P2R(c, mm2, mm0) for (; d < e; d++) { DATA32 da = 1 + (*d >> 24); MOV_A2R(da, mm1) MUL4_256_R2R(mm2, mm1) MOV_R2P(mm1, *d, mm0) } } #define _op_copy_rel_cn_dp_mmx _op_copy_rel_c_dp_mmx #define _op_copy_rel_can_dp_mmx _op_copy_rel_c_dp_mmx #define _op_copy_rel_caa_dp_mmx _op_copy_rel_c_dp_mmx #define _op_copy_rel_cn_dpan_mmx _op_copy_cn_dpan_mmx #define _op_copy_rel_c_dpan_mmx _op_copy_c_dpan_mmx #define _op_copy_rel_can_dpan_mmx _op_copy_can_dpan_mmx #define _op_copy_rel_caa_dpan_mmx _op_copy_caa_dpan_mmx static void init_copy_rel_color_span_funcs_mmx(void) { op_copy_rel_span_funcs[SP_N][SM_N][SC_N][DP][CPU_MMX] = _op_copy_rel_cn_dp_mmx; op_copy_rel_span_funcs[SP_N][SM_N][SC][DP][CPU_MMX] = _op_copy_rel_c_dp_mmx; op_copy_rel_span_funcs[SP_N][SM_N][SC_AN][DP][CPU_MMX] = _op_copy_rel_can_dp_mmx; op_copy_rel_span_funcs[SP_N][SM_N][SC_AA][DP][CPU_MMX] = _op_copy_rel_caa_dp_mmx; op_copy_rel_span_funcs[SP_N][SM_N][SC_N][DP_AN][CPU_MMX] = _op_copy_rel_cn_dpan_mmx; op_copy_rel_span_funcs[SP_N][SM_N][SC][DP_AN][CPU_MMX] = _op_copy_rel_c_dpan_mmx; op_copy_rel_span_funcs[SP_N][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_copy_rel_can_dpan_mmx; op_copy_rel_span_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_copy_rel_caa_dpan_mmx; } #endif #ifdef BUILD_MMX static void _op_copy_rel_pt_c_dp_mmx(DATA32 s, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) { s = 1 + (*d >> 24); pxor_r2r(mm0, mm0); MOV_P2R(c, mm2, mm0) MOV_A2R(s, mm1) MUL4_256_R2R(mm2, mm1) MOV_R2P(mm1, *d, mm0) } #define _op_copy_rel_pt_cn_dp_mmx _op_copy_rel_pt_c_dp_mmx #define _op_copy_rel_pt_can_dp_mmx _op_copy_rel_pt_c_dp_mmx #define _op_copy_rel_pt_caa_dp_mmx _op_copy_rel_pt_c_dp_mmx #define _op_copy_rel_pt_cn_dpan_mmx _op_copy_pt_cn_dpan_mmx #define _op_copy_rel_pt_c_dpan_mmx _op_copy_pt_c_dpan_mmx #define _op_copy_rel_pt_can_dpan_mmx _op_copy_pt_can_dpan_mmx #define _op_copy_rel_pt_caa_dpan_mmx _op_copy_pt_caa_dpan_mmx static void init_copy_rel_color_pt_funcs_mmx(void) { op_copy_rel_pt_funcs[SP_N][SM_N][SC_N][DP][CPU_MMX] = _op_copy_rel_pt_cn_dp_mmx; op_copy_rel_pt_funcs[SP_N][SM_N][SC][DP][CPU_MMX] = _op_copy_rel_pt_c_dp_mmx; op_copy_rel_pt_funcs[SP_N][SM_N][SC_AN][DP][CPU_MMX] = _op_copy_rel_pt_can_dp_mmx; op_copy_rel_pt_funcs[SP_N][SM_N][SC_AA][DP][CPU_MMX] = _op_copy_rel_pt_caa_dp_mmx; op_copy_rel_pt_funcs[SP_N][SM_N][SC_N][DP_AN][CPU_MMX] = _op_copy_rel_pt_cn_dpan_mmx; op_copy_rel_pt_funcs[SP_N][SM_N][SC][DP_AN][CPU_MMX] = _op_copy_rel_pt_c_dpan_mmx; op_copy_rel_pt_funcs[SP_N][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_copy_rel_pt_can_dpan_mmx; op_copy_rel_pt_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_copy_rel_pt_caa_dpan_mmx; } #endif evas-1.7.9/src/lib/engines/common/evas_op_copy/op_copy_pixel_color_.c0000664000175000017500000002526412175475547022760 00000000000000/* copy pixel x color --> dst */ #ifdef BUILD_C static void _op_copy_p_c_dp(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { DATA32 *e; UNROLL8_PLD_WHILE(d, l, e, { *d = MUL4_SYM(c, *s); d++; s++; }); } static void _op_copy_p_caa_dp(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { DATA32 *e; c = 1 + (c >> 24); UNROLL8_PLD_WHILE(d, l, e, { *d = MUL_256(c, *s); d++; s++; }); } #define _op_copy_pas_c_dp _op_copy_p_c_dp #define _op_copy_pan_c_dp _op_copy_p_c_dp #define _op_copy_p_can_dp _op_copy_p_c_dp #define _op_copy_pas_can_dp _op_copy_p_can_dp #define _op_copy_pan_can_dp _op_copy_p_c_dp #define _op_copy_pas_caa_dp _op_copy_p_caa_dp #define _op_copy_pan_caa_dp _op_copy_p_caa_dp #define _op_copy_p_c_dpan _op_copy_p_c_dp #define _op_copy_pas_c_dpan _op_copy_pas_c_dp #define _op_copy_pan_c_dpan _op_copy_pan_c_dp #define _op_copy_p_can_dpan _op_copy_p_can_dp #define _op_copy_pas_can_dpan _op_copy_pas_can_dp #define _op_copy_pan_can_dpan _op_copy_pan_can_dp #define _op_copy_p_caa_dpan _op_copy_p_caa_dp #define _op_copy_pas_caa_dpan _op_copy_pas_caa_dp #define _op_copy_pan_caa_dpan _op_copy_pan_caa_dp static void init_copy_pixel_color_span_funcs_c(void) { op_copy_span_funcs[SP][SM_N][SC][DP][CPU_C] = _op_copy_p_c_dp; op_copy_span_funcs[SP_AS][SM_N][SC][DP][CPU_C] = _op_copy_pas_c_dp; op_copy_span_funcs[SP_AN][SM_N][SC][DP][CPU_C] = _op_copy_pan_c_dp; op_copy_span_funcs[SP][SM_N][SC_AN][DP][CPU_C] = _op_copy_p_can_dp; op_copy_span_funcs[SP_AS][SM_N][SC_AN][DP][CPU_C] = _op_copy_pas_can_dp; op_copy_span_funcs[SP_AN][SM_N][SC_AN][DP][CPU_C] = _op_copy_pan_can_dp; op_copy_span_funcs[SP][SM_N][SC_AA][DP][CPU_C] = _op_copy_p_caa_dp; op_copy_span_funcs[SP_AS][SM_N][SC_AA][DP][CPU_C] = _op_copy_pas_caa_dp; op_copy_span_funcs[SP_AN][SM_N][SC_AA][DP][CPU_C] = _op_copy_pan_caa_dp; op_copy_span_funcs[SP][SM_N][SC][DP_AN][CPU_C] = _op_copy_p_c_dpan; op_copy_span_funcs[SP_AS][SM_N][SC][DP_AN][CPU_C] = _op_copy_pas_c_dpan; op_copy_span_funcs[SP_AN][SM_N][SC][DP_AN][CPU_C] = _op_copy_pan_c_dpan; op_copy_span_funcs[SP][SM_N][SC_AN][DP_AN][CPU_C] = _op_copy_p_can_dpan; op_copy_span_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_C] = _op_copy_pas_can_dpan; op_copy_span_funcs[SP_AN][SM_N][SC_AN][DP_AN][CPU_C] = _op_copy_pan_can_dpan; op_copy_span_funcs[SP][SM_N][SC_AA][DP_AN][CPU_C] = _op_copy_p_caa_dpan; op_copy_span_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_C] = _op_copy_pas_caa_dpan; op_copy_span_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_C] = _op_copy_pan_caa_dpan; } #endif #ifdef BUILD_C static void _op_copy_pt_p_c_dp(DATA32 s, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) { *d = MUL4_SYM(c, s); } static void _op_copy_pt_p_caa_dp(DATA32 s, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) { *d = MUL_SYM(c >> 24, s); } #define _op_copy_pt_p_can_dp _op_copy_pt_p_c_dp #define _op_copy_pt_pan_c_dp _op_copy_pt_p_c_dp #define _op_copy_pt_pan_can_dp _op_copy_pt_p_c_dp #define _op_copy_pt_pan_caa_dp _op_copy_pt_p_caa_dp #define _op_copy_pt_pas_c_dp _op_copy_pt_p_c_dp #define _op_copy_pt_pas_can_dp _op_copy_pt_p_can_dp #define _op_copy_pt_pas_caa_dp _op_copy_pt_p_caa_dp #define _op_copy_pt_p_c_dpan _op_copy_pt_p_c_dp #define _op_copy_pt_pas_c_dpan _op_copy_pt_pas_c_dp #define _op_copy_pt_pan_c_dpan _op_copy_pt_pan_c_dp #define _op_copy_pt_p_can_dpan _op_copy_pt_p_can_dp #define _op_copy_pt_pas_can_dpan _op_copy_pt_pas_can_dp #define _op_copy_pt_pan_can_dpan _op_copy_pt_pan_can_dp #define _op_copy_pt_p_caa_dpan _op_copy_pt_p_caa_dp #define _op_copy_pt_pas_caa_dpan _op_copy_pt_pas_caa_dp #define _op_copy_pt_pan_caa_dpan _op_copy_pt_pan_caa_dp static void init_copy_pixel_color_pt_funcs_c(void) { op_copy_pt_funcs[SP][SM_N][SC][DP][CPU_C] = _op_copy_pt_p_c_dp; op_copy_pt_funcs[SP_AS][SM_N][SC][DP][CPU_C] = _op_copy_pt_pas_c_dp; op_copy_pt_funcs[SP_AN][SM_N][SC][DP][CPU_C] = _op_copy_pt_pan_c_dp; op_copy_pt_funcs[SP][SM_N][SC_AN][DP][CPU_C] = _op_copy_pt_p_can_dp; op_copy_pt_funcs[SP_AS][SM_N][SC_AN][DP][CPU_C] = _op_copy_pt_pas_can_dp; op_copy_pt_funcs[SP_AN][SM_N][SC_AN][DP][CPU_C] = _op_copy_pt_pan_can_dp; op_copy_pt_funcs[SP][SM_N][SC_AA][DP][CPU_C] = _op_copy_pt_p_caa_dp; op_copy_pt_funcs[SP_AS][SM_N][SC_AA][DP][CPU_C] = _op_copy_pt_pas_caa_dp; op_copy_pt_funcs[SP_AN][SM_N][SC_AA][DP][CPU_C] = _op_copy_pt_pan_caa_dp; op_copy_pt_funcs[SP][SM_N][SC][DP_AN][CPU_C] = _op_copy_pt_p_c_dpan; op_copy_pt_funcs[SP_AS][SM_N][SC][DP_AN][CPU_C] = _op_copy_pt_pas_c_dpan; op_copy_pt_funcs[SP_AN][SM_N][SC][DP_AN][CPU_C] = _op_copy_pt_pan_c_dpan; op_copy_pt_funcs[SP][SM_N][SC_AN][DP_AN][CPU_C] = _op_copy_pt_p_can_dpan; op_copy_pt_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_C] = _op_copy_pt_pas_can_dpan; op_copy_pt_funcs[SP_AN][SM_N][SC_AN][DP_AN][CPU_C] = _op_copy_pt_pan_can_dpan; op_copy_pt_funcs[SP][SM_N][SC_AA][DP_AN][CPU_C] = _op_copy_pt_p_caa_dpan; op_copy_pt_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_C] = _op_copy_pt_pas_caa_dpan; op_copy_pt_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_C] = _op_copy_pt_pan_caa_dpan; } #endif /*-----*/ /* copy_rel pixel x color --> dst */ #ifdef BUILD_C static void _op_copy_rel_p_c_dp(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { DATA32 *e; UNROLL8_PLD_WHILE(d, l, e, { DATA32 cs = MUL4_SYM(c, *s); *d = MUL_SYM(*d >> 24, cs); d++; s++; }); } #define _op_copy_rel_pas_c_dp _op_copy_rel_p_c_dp #define _op_copy_rel_pan_c_dp _op_copy_rel_p_c_dp #define _op_copy_rel_p_can_dp _op_copy_rel_p_c_dp #define _op_copy_rel_pas_can_dp _op_copy_rel_pas_c_dp #define _op_copy_rel_pan_can_dp _op_copy_rel_p_c_dp #define _op_copy_rel_p_caa_dp _op_copy_rel_p_c_dp #define _op_copy_rel_pas_caa_dp _op_copy_rel_p_c_dp #define _op_copy_rel_pan_caa_dp _op_copy_rel_p_c_dp #define _op_copy_rel_p_c_dpan _op_copy_p_c_dpan #define _op_copy_rel_pas_c_dpan _op_copy_pas_c_dpan #define _op_copy_rel_pan_c_dpan _op_copy_pan_c_dpan #define _op_copy_rel_p_can_dpan _op_copy_p_can_dpan #define _op_copy_rel_pas_can_dpan _op_copy_pas_can_dpan #define _op_copy_rel_pan_can_dpan _op_copy_pan_can_dpan #define _op_copy_rel_p_caa_dpan _op_copy_p_caa_dpan #define _op_copy_rel_pas_caa_dpan _op_copy_pas_caa_dpan #define _op_copy_rel_pan_caa_dpan _op_copy_pan_caa_dpan static void init_copy_rel_pixel_color_span_funcs_c(void) { op_copy_rel_span_funcs[SP][SM_N][SC][DP][CPU_C] = _op_copy_rel_p_c_dp; op_copy_rel_span_funcs[SP_AS][SM_N][SC][DP][CPU_C] = _op_copy_rel_pas_c_dp; op_copy_rel_span_funcs[SP_AN][SM_N][SC][DP][CPU_C] = _op_copy_rel_pan_c_dp; op_copy_rel_span_funcs[SP][SM_N][SC_AN][DP][CPU_C] = _op_copy_rel_p_can_dp; op_copy_rel_span_funcs[SP_AS][SM_N][SC_AN][DP][CPU_C] = _op_copy_rel_pas_can_dp; op_copy_rel_span_funcs[SP_AN][SM_N][SC_AN][DP][CPU_C] = _op_copy_rel_pan_can_dp; op_copy_rel_span_funcs[SP][SM_N][SC_AA][DP][CPU_C] = _op_copy_rel_p_caa_dp; op_copy_rel_span_funcs[SP_AS][SM_N][SC_AA][DP][CPU_C] = _op_copy_rel_pas_caa_dp; op_copy_rel_span_funcs[SP_AN][SM_N][SC_AA][DP][CPU_C] = _op_copy_rel_pan_caa_dp; op_copy_rel_span_funcs[SP][SM_N][SC][DP_AN][CPU_C] = _op_copy_rel_p_c_dpan; op_copy_rel_span_funcs[SP_AS][SM_N][SC][DP_AN][CPU_C] = _op_copy_rel_pas_c_dpan; op_copy_rel_span_funcs[SP_AN][SM_N][SC][DP_AN][CPU_C] = _op_copy_rel_pan_c_dpan; op_copy_rel_span_funcs[SP][SM_N][SC_AN][DP_AN][CPU_C] = _op_copy_rel_p_can_dpan; op_copy_rel_span_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_C] = _op_copy_rel_pas_can_dpan; op_copy_rel_span_funcs[SP_AN][SM_N][SC_AN][DP_AN][CPU_C] = _op_copy_rel_pan_can_dpan; op_copy_rel_span_funcs[SP][SM_N][SC_AA][DP_AN][CPU_C] = _op_copy_rel_p_caa_dpan; op_copy_rel_span_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_C] = _op_copy_rel_pas_caa_dpan; op_copy_rel_span_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_C] = _op_copy_rel_pan_caa_dpan; } #endif #ifdef BUILD_C static void _op_copy_rel_pt_p_c_dp(DATA32 s, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) { s = MUL4_SYM(c, s); *d = MUL_SYM(*d >> 24, s); } #define _op_copy_rel_pt_pas_c_dp _op_copy_rel_pt_p_c_dp #define _op_copy_rel_pt_pan_c_dp _op_copy_rel_pt_p_c_dp #define _op_copy_rel_pt_p_can_dp _op_copy_rel_pt_p_c_dp #define _op_copy_rel_pt_pas_can_dp _op_copy_rel_pt_p_can_dp #define _op_copy_rel_pt_pan_can_dp _op_copy_rel_pt_p_c_dp #define _op_copy_rel_pt_p_caa_dp _op_copy_rel_pt_p_c_dp #define _op_copy_rel_pt_pas_caa_dp _op_copy_rel_pt_p_caa_dp #define _op_copy_rel_pt_pan_caa_dp _op_copy_rel_pt_p_caa_dp #define _op_copy_rel_pt_p_c_dpan _op_copy_pt_p_c_dpan #define _op_copy_rel_pt_pas_c_dpan _op_copy_pt_pas_c_dpan #define _op_copy_rel_pt_pan_c_dpan _op_copy_pt_pan_c_dpan #define _op_copy_rel_pt_p_can_dpan _op_copy_pt_p_can_dpan #define _op_copy_rel_pt_pas_can_dpan _op_copy_pt_pas_can_dpan #define _op_copy_rel_pt_pan_can_dpan _op_copy_pt_pan_can_dpan #define _op_copy_rel_pt_p_caa_dpan _op_copy_pt_p_caa_dpan #define _op_copy_rel_pt_pas_caa_dpan _op_copy_pt_pas_caa_dpan #define _op_copy_rel_pt_pan_caa_dpan _op_copy_pt_pan_caa_dpan static void init_copy_rel_pixel_color_pt_funcs_c(void) { op_copy_rel_pt_funcs[SP][SM_N][SC][DP][CPU_C] = _op_copy_rel_pt_p_c_dp; op_copy_rel_pt_funcs[SP_AS][SM_N][SC][DP][CPU_C] = _op_copy_rel_pt_pas_c_dp; op_copy_rel_pt_funcs[SP_AN][SM_N][SC][DP][CPU_C] = _op_copy_rel_pt_pan_c_dp; op_copy_rel_pt_funcs[SP][SM_N][SC_AN][DP][CPU_C] = _op_copy_rel_pt_p_can_dp; op_copy_rel_pt_funcs[SP_AS][SM_N][SC_AN][DP][CPU_C] = _op_copy_rel_pt_pas_can_dp; op_copy_rel_pt_funcs[SP_AN][SM_N][SC_AN][DP][CPU_C] = _op_copy_rel_pt_pan_can_dp; op_copy_rel_pt_funcs[SP][SM_N][SC_AA][DP][CPU_C] = _op_copy_rel_pt_p_caa_dp; op_copy_rel_pt_funcs[SP_AS][SM_N][SC_AA][DP][CPU_C] = _op_copy_rel_pt_pas_caa_dp; op_copy_rel_pt_funcs[SP_AN][SM_N][SC_AA][DP][CPU_C] = _op_copy_rel_pt_pan_caa_dp; op_copy_rel_pt_funcs[SP][SM_N][SC][DP_AN][CPU_C] = _op_copy_rel_pt_p_c_dpan; op_copy_rel_pt_funcs[SP_AS][SM_N][SC][DP_AN][CPU_C] = _op_copy_rel_pt_pas_c_dpan; op_copy_rel_pt_funcs[SP_AN][SM_N][SC][DP_AN][CPU_C] = _op_copy_rel_pt_pan_c_dpan; op_copy_rel_pt_funcs[SP][SM_N][SC_AN][DP_AN][CPU_C] = _op_copy_rel_pt_p_can_dpan; op_copy_rel_pt_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_C] = _op_copy_rel_pt_pas_can_dpan; op_copy_rel_pt_funcs[SP_AN][SM_N][SC_AN][DP_AN][CPU_C] = _op_copy_rel_pt_pan_can_dpan; op_copy_rel_pt_funcs[SP][SM_N][SC_AA][DP_AN][CPU_C] = _op_copy_rel_pt_p_caa_dpan; op_copy_rel_pt_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_C] = _op_copy_rel_pt_pas_caa_dpan; op_copy_rel_pt_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_C] = _op_copy_rel_pt_pan_caa_dpan; } #endif evas-1.7.9/src/lib/engines/common/evas_op_copy/op_copy_pixel_.c0000664000175000017500000000732512175475547021560 00000000000000/* copy pixel --> dst */ #ifdef BUILD_C static void _op_copy_p_dp(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c __UNUSED__, DATA32 *d, int l) { memcpy(d, s, l * sizeof(DATA32)); } #define _op_copy_pan_dp _op_copy_p_dp #define _op_copy_pas_dp _op_copy_p_dp #define _op_copy_p_dpan _op_copy_p_dp #define _op_copy_pan_dpan _op_copy_pan_dp #define _op_copy_pas_dpan _op_copy_pas_dp static void init_copy_pixel_span_funcs_c(void) { op_copy_span_funcs[SP][SM_N][SC_N][DP][CPU_C] = _op_copy_p_dp; op_copy_span_funcs[SP_AN][SM_N][SC_N][DP][CPU_C] = _op_copy_pan_dp; op_copy_span_funcs[SP_AS][SM_N][SC_N][DP][CPU_C] = _op_copy_pas_dp; op_copy_span_funcs[SP][SM_N][SC_N][DP_AN][CPU_C] = _op_copy_p_dpan; op_copy_span_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_C] = _op_copy_pan_dpan; op_copy_span_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_C] = _op_copy_pas_dpan; } #endif #ifdef BUILD_C static void _op_copy_pt_p_dp(DATA32 s, DATA8 m __UNUSED__, DATA32 c __UNUSED__, DATA32 *d) { *d = s; } #define _op_copy_pt_pan_dp _op_copy_pt_p_dp #define _op_copy_pt_pas_dp _op_copy_pt_p_dp #define _op_copy_pt_p_dpan _op_copy_pt_p_dp #define _op_copy_pt_pan_dpan _op_copy_pt_pan_dp #define _op_copy_pt_pas_dpan _op_copy_pt_pas_dp static void init_copy_pixel_pt_funcs_c(void) { op_copy_pt_funcs[SP][SM_N][SC_N][DP][CPU_C] = _op_copy_pt_p_dp; op_copy_pt_funcs[SP_AN][SM_N][SC_N][DP][CPU_C] = _op_copy_pt_pan_dp; op_copy_pt_funcs[SP_AS][SM_N][SC_N][DP][CPU_C] = _op_copy_pt_pas_dp; op_copy_pt_funcs[SP][SM_N][SC_N][DP_AN][CPU_C] = _op_copy_pt_p_dpan; op_copy_pt_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_C] = _op_copy_pt_pan_dpan; op_copy_pt_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_C] = _op_copy_pt_pas_dpan; } #endif /*-----*/ /* copy_rel pixel --> dst */ #ifdef BUILD_C static void _op_copy_rel_p_dp(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c __UNUSED__, DATA32 *d, int l) { DATA32 *e; UNROLL8_PLD_WHILE(d, l, e, { *d = MUL_SYM(*d >> 24, *s); d++; s++; }); } #define _op_copy_rel_pas_dp _op_copy_rel_p_dp #define _op_copy_rel_pan_dp _op_copy_rel_p_dp #define _op_copy_rel_p_dpan _op_copy_p_dpan #define _op_copy_rel_pan_dpan _op_copy_pan_dpan #define _op_copy_rel_pas_dpan _op_copy_pas_dpan static void init_copy_rel_pixel_span_funcs_c(void) { op_copy_rel_span_funcs[SP][SM_N][SC_N][DP][CPU_C] = _op_copy_rel_p_dp; op_copy_rel_span_funcs[SP_AN][SM_N][SC_N][DP][CPU_C] = _op_copy_rel_pan_dp; op_copy_rel_span_funcs[SP_AS][SM_N][SC_N][DP][CPU_C] = _op_copy_rel_pas_dp; op_copy_rel_span_funcs[SP][SM_N][SC_N][DP_AN][CPU_C] = _op_copy_rel_p_dpan; op_copy_rel_span_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_C] = _op_copy_rel_pan_dpan; op_copy_rel_span_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_C] = _op_copy_rel_pas_dpan; } #endif #ifdef BUILD_C static void _op_copy_rel_pt_p_dp(DATA32 s, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) { c = 1 + (*d >> 24); *d = MUL_256(c, s); } #define _op_copy_rel_pt_pan_dp _op_copy_rel_pt_p_dp #define _op_copy_rel_pt_pas_dp _op_copy_rel_pt_p_dp #define _op_copy_rel_pt_p_dpan _op_copy_pt_p_dpan #define _op_copy_rel_pt_pan_dpan _op_copy_pt_pan_dpan #define _op_copy_rel_pt_pas_dpan _op_copy_pt_pas_dpan static void init_copy_rel_pixel_pt_funcs_c(void) { op_copy_rel_pt_funcs[SP][SM_N][SC_N][DP][CPU_C] = _op_copy_rel_pt_p_dp; op_copy_rel_pt_funcs[SP_AN][SM_N][SC_N][DP][CPU_C] = _op_copy_rel_pt_pan_dp; op_copy_rel_pt_funcs[SP_AS][SM_N][SC_N][DP][CPU_C] = _op_copy_rel_pt_pas_dp; op_copy_rel_pt_funcs[SP][SM_N][SC_N][DP_AN][CPU_C] = _op_copy_rel_pt_p_dpan; op_copy_rel_pt_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_C] = _op_copy_rel_pt_pan_dpan; op_copy_rel_pt_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_C] = _op_copy_rel_pt_pas_dpan; } #endif evas-1.7.9/src/lib/engines/common/evas_op_copy/op_copy_pixel_color_i386.c0000664000175000017500000002751712175475547023375 00000000000000/* copy pixel x color --> dst */ #ifdef BUILD_MMX static void _op_copy_p_c_dp_mmx(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { DATA32 *e = d + l; pxor_r2r(mm0, mm0); MOV_P2R(c, mm3, mm0) MOV_A2R(ALPHA_255, mm5) while (d < e) { MOV_P2R(*s, mm2, mm0) MUL4_SYM_R2R(mm3, mm2, mm5); MOV_R2P(mm2, *d, mm0) s++; d++; } } static void _op_copy_p_caa_dp_mmx(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { DATA32 *e = d + l; c = 1 + (c >> 24); MOV_A2R(c, mm3) pxor_r2r(mm0, mm0); while (d < e) { MOV_P2R(*s, mm2, mm0) MUL4_256_R2R(mm3, mm2); MOV_R2P(mm2, *d, mm0) s++; d++; } } #define _op_copy_pas_c_dp_mmx _op_copy_p_c_dp_mmx #define _op_copy_pan_c_dp_mmx _op_copy_p_c_dp_mmx #define _op_copy_p_can_dp_mmx _op_copy_p_c_dp_mmx #define _op_copy_pas_can_dp_mmx _op_copy_pas_c_dp_mmx #define _op_copy_pan_can_dp_mmx _op_copy_pan_c_dp_mmx #define _op_copy_pas_caa_dp_mmx _op_copy_p_caa_dp_mmx #define _op_copy_pan_caa_dp_mmx _op_copy_p_caa_dp_mmx #define _op_copy_p_c_dpan_mmx _op_copy_p_c_dp_mmx #define _op_copy_pas_c_dpan_mmx _op_copy_pas_c_dp_mmx #define _op_copy_pan_c_dpan_mmx _op_copy_pan_c_dp_mmx #define _op_copy_p_can_dpan_mmx _op_copy_p_can_dp_mmx #define _op_copy_pas_can_dpan_mmx _op_copy_pas_can_dp_mmx #define _op_copy_pan_can_dpan_mmx _op_copy_pan_can_dp_mmx #define _op_copy_p_caa_dpan_mmx _op_copy_p_caa_dp_mmx #define _op_copy_pas_caa_dpan_mmx _op_copy_pas_caa_dp_mmx #define _op_copy_pan_caa_dpan_mmx _op_copy_pan_caa_dp_mmx static void init_copy_pixel_color_span_funcs_mmx(void) { op_copy_span_funcs[SP][SM_N][SC][DP][CPU_MMX] = _op_copy_p_c_dp_mmx; op_copy_span_funcs[SP_AS][SM_N][SC][DP][CPU_MMX] = _op_copy_pas_c_dp_mmx; op_copy_span_funcs[SP_AN][SM_N][SC][DP][CPU_MMX] = _op_copy_pan_c_dp_mmx; op_copy_span_funcs[SP][SM_N][SC_AN][DP][CPU_MMX] = _op_copy_p_can_dp_mmx; op_copy_span_funcs[SP_AS][SM_N][SC_AN][DP][CPU_MMX] = _op_copy_pas_can_dp_mmx; op_copy_span_funcs[SP_AN][SM_N][SC_AN][DP][CPU_MMX] = _op_copy_pan_can_dp_mmx; op_copy_span_funcs[SP][SM_N][SC_AA][DP][CPU_MMX] = _op_copy_p_caa_dp_mmx; op_copy_span_funcs[SP_AS][SM_N][SC_AA][DP][CPU_MMX] = _op_copy_pas_caa_dp_mmx; op_copy_span_funcs[SP_AN][SM_N][SC_AA][DP][CPU_MMX] = _op_copy_pan_caa_dp_mmx; op_copy_span_funcs[SP][SM_N][SC][DP_AN][CPU_MMX] = _op_copy_p_c_dpan_mmx; op_copy_span_funcs[SP_AS][SM_N][SC][DP_AN][CPU_MMX] = _op_copy_pas_c_dpan_mmx; op_copy_span_funcs[SP_AN][SM_N][SC][DP_AN][CPU_MMX] = _op_copy_pan_c_dpan_mmx; op_copy_span_funcs[SP][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_copy_p_can_dpan_mmx; op_copy_span_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_copy_pas_can_dpan_mmx; op_copy_span_funcs[SP_AN][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_copy_pan_can_dpan_mmx; op_copy_span_funcs[SP][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_copy_p_caa_dpan_mmx; op_copy_span_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_copy_pas_caa_dpan_mmx; op_copy_span_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_copy_pan_caa_dpan_mmx; } #endif #ifdef BUILD_MMX static void _op_copy_pt_p_c_dp_mmx(DATA32 s, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) { pxor_r2r(mm0, mm0); MOV_A2R(ALPHA_255, mm5) MOV_P2R(c, mm2, mm0) MOV_P2R(s, mm2, mm0) MUL4_SYM_R2R(mm3, mm2, mm5); MOV_R2P(mm2, *d, mm0) } #define _op_copy_pt_pas_c_dp_mmx _op_copy_pt_p_c_dp_mmx #define _op_copy_pt_pan_c_dp_mmx _op_copy_pt_p_c_dp_mmx #define _op_copy_pt_p_can_dp_mmx _op_copy_pt_p_c_dp_mmx #define _op_copy_pt_pas_can_dp_mmx _op_copy_pt_p_c_dp_mmx #define _op_copy_pt_pan_can_dp_mmx _op_copy_pt_p_c_dp_mmx #define _op_copy_pt_p_caa_dp_mmx _op_copy_pt_p_c_dp_mmx #define _op_copy_pt_pas_caa_dp_mmx _op_copy_pt_p_c_dp_mmx #define _op_copy_pt_pan_caa_dp_mmx _op_copy_pt_p_c_dp_mmx #define _op_copy_pt_p_c_dpan_mmx _op_copy_pt_p_c_dp_mmx #define _op_copy_pt_pas_c_dpan_mmx _op_copy_pt_pas_c_dp_mmx #define _op_copy_pt_pan_c_dpan_mmx _op_copy_pt_pan_c_dp_mmx #define _op_copy_pt_p_can_dpan_mmx _op_copy_pt_p_can_dp_mmx #define _op_copy_pt_pas_can_dpan_mmx _op_copy_pt_pas_can_dp_mmx #define _op_copy_pt_pan_can_dpan_mmx _op_copy_pt_pan_can_dp_mmx #define _op_copy_pt_p_caa_dpan_mmx _op_copy_pt_p_caa_dp_mmx #define _op_copy_pt_pas_caa_dpan_mmx _op_copy_pt_pas_caa_dp_mmx #define _op_copy_pt_pan_caa_dpan_mmx _op_copy_pt_pan_caa_dp_mmx static void init_copy_pixel_color_pt_funcs_mmx(void) { op_copy_pt_funcs[SP][SM_N][SC][DP][CPU_MMX] = _op_copy_pt_p_c_dp_mmx; op_copy_pt_funcs[SP_AS][SM_N][SC][DP][CPU_MMX] = _op_copy_pt_pas_c_dp_mmx; op_copy_pt_funcs[SP_AN][SM_N][SC][DP][CPU_MMX] = _op_copy_pt_pan_c_dp_mmx; op_copy_pt_funcs[SP][SM_N][SC_AN][DP][CPU_MMX] = _op_copy_pt_p_can_dp_mmx; op_copy_pt_funcs[SP_AS][SM_N][SC_AN][DP][CPU_MMX] = _op_copy_pt_pas_can_dp_mmx; op_copy_pt_funcs[SP_AN][SM_N][SC_AN][DP][CPU_MMX] = _op_copy_pt_pan_can_dp_mmx; op_copy_pt_funcs[SP][SM_N][SC_AA][DP][CPU_MMX] = _op_copy_pt_p_caa_dp_mmx; op_copy_pt_funcs[SP_AS][SM_N][SC_AA][DP][CPU_MMX] = _op_copy_pt_pas_caa_dp_mmx; op_copy_pt_funcs[SP_AN][SM_N][SC_AA][DP][CPU_MMX] = _op_copy_pt_pan_caa_dp_mmx; op_copy_pt_funcs[SP][SM_N][SC][DP_AN][CPU_MMX] = _op_copy_pt_p_c_dpan_mmx; op_copy_pt_funcs[SP_AS][SM_N][SC][DP_AN][CPU_MMX] = _op_copy_pt_pas_c_dpan_mmx; op_copy_pt_funcs[SP_AN][SM_N][SC][DP_AN][CPU_MMX] = _op_copy_pt_pan_c_dpan_mmx; op_copy_pt_funcs[SP][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_copy_pt_p_can_dpan_mmx; op_copy_pt_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_copy_pt_pas_can_dpan_mmx; op_copy_pt_funcs[SP_AN][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_copy_pt_pan_can_dpan_mmx; op_copy_pt_funcs[SP][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_copy_pt_p_caa_dpan_mmx; op_copy_pt_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_copy_pt_pas_caa_dpan_mmx; op_copy_pt_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_copy_pt_pan_caa_dpan_mmx; } #endif /*-----*/ /* copy_rel pixel x color --> dst */ #ifdef BUILD_MMX static void _op_copy_rel_p_c_dp_mmx(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { DATA32 *e = d + l; pxor_r2r(mm0, mm0); MOV_P2R(c, mm3, mm0) MOV_A2R(ALPHA_255, mm5) while (d < e) { MOV_PA2R(*d, mm1) MOV_P2R(*s, mm2, mm0) MUL4_SYM_R2R(mm3, mm2, mm5); MUL4_SYM_R2R(mm2, mm1, mm5); MOV_R2P(mm1, *d, mm0) s++; d++; } } #define _op_copy_rel_pas_c_dp_mmx _op_copy_rel_p_c_dp_mmx #define _op_copy_rel_pan_c_dp_mmx _op_copy_rel_p_c_dp_mmx #define _op_copy_rel_p_can_dp_mmx _op_copy_rel_p_c_dp_mmx #define _op_copy_rel_pas_can_dp_mmx _op_copy_rel_p_c_dp_mmx #define _op_copy_rel_pan_can_dp_mmx _op_copy_rel_p_c_dp_mmx #define _op_copy_rel_p_caa_dp_mmx _op_copy_rel_p_c_dp_mmx #define _op_copy_rel_pas_caa_dp_mmx _op_copy_rel_p_c_dp_mmx #define _op_copy_rel_pan_caa_dp_mmx _op_copy_rel_p_c_dp_mmx #define _op_copy_rel_p_c_dpan_mmx _op_copy_p_c_dpan_mmx #define _op_copy_rel_pas_c_dpan_mmx _op_copy_pas_c_dpan_mmx #define _op_copy_rel_pan_c_dpan_mmx _op_copy_pan_c_dpan_mmx #define _op_copy_rel_p_can_dpan_mmx _op_copy_p_can_dpan_mmx #define _op_copy_rel_pas_can_dpan_mmx _op_copy_pas_can_dpan_mmx #define _op_copy_rel_pan_can_dpan_mmx _op_copy_pan_can_dpan_mmx #define _op_copy_rel_p_caa_dpan_mmx _op_copy_p_caa_dpan_mmx #define _op_copy_rel_pas_caa_dpan_mmx _op_copy_pas_caa_dpan_mmx #define _op_copy_rel_pan_caa_dpan_mmx _op_copy_pan_caa_dpan_mmx static void init_copy_rel_pixel_color_span_funcs_mmx(void) { op_copy_rel_span_funcs[SP][SM_N][SC][DP][CPU_MMX] = _op_copy_rel_p_c_dp_mmx; op_copy_rel_span_funcs[SP_AS][SM_N][SC][DP][CPU_MMX] = _op_copy_rel_pas_c_dp_mmx; op_copy_rel_span_funcs[SP_AN][SM_N][SC][DP][CPU_MMX] = _op_copy_rel_pan_c_dp_mmx; op_copy_rel_span_funcs[SP][SM_N][SC_AN][DP][CPU_MMX] = _op_copy_rel_p_can_dp_mmx; op_copy_rel_span_funcs[SP_AS][SM_N][SC_AN][DP][CPU_MMX] = _op_copy_rel_pas_can_dp_mmx; op_copy_rel_span_funcs[SP_AN][SM_N][SC_AN][DP][CPU_MMX] = _op_copy_rel_pan_can_dp_mmx; op_copy_rel_span_funcs[SP][SM_N][SC_AA][DP][CPU_MMX] = _op_copy_rel_p_caa_dp_mmx; op_copy_rel_span_funcs[SP_AS][SM_N][SC_AA][DP][CPU_MMX] = _op_copy_rel_pas_caa_dp_mmx; op_copy_rel_span_funcs[SP_AN][SM_N][SC_AA][DP][CPU_MMX] = _op_copy_rel_pan_caa_dp_mmx; op_copy_rel_span_funcs[SP][SM_N][SC][DP_AN][CPU_MMX] = _op_copy_rel_p_c_dpan_mmx; op_copy_rel_span_funcs[SP_AS][SM_N][SC][DP_AN][CPU_MMX] = _op_copy_rel_pas_c_dpan_mmx; op_copy_rel_span_funcs[SP_AN][SM_N][SC][DP_AN][CPU_MMX] = _op_copy_rel_pan_c_dpan_mmx; op_copy_rel_span_funcs[SP][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_copy_rel_p_can_dpan_mmx; op_copy_rel_span_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_copy_rel_pas_can_dpan_mmx; op_copy_rel_span_funcs[SP_AN][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_copy_rel_pan_can_dpan_mmx; op_copy_rel_span_funcs[SP][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_copy_rel_p_caa_dpan_mmx; op_copy_rel_span_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_copy_rel_pas_caa_dpan_mmx; op_copy_rel_span_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_copy_rel_pan_caa_dpan_mmx; } #endif #ifdef BUILD_MMX static void _op_copy_rel_pt_p_c_dp_mmx(DATA32 s, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) { pxor_r2r(mm0, mm0); MOV_P2R(c, mm3, mm0) MOV_A2R(ALPHA_255, mm5) MOV_PA2R(*d, mm1) MOV_P2R(s, mm2, mm0) MUL4_SYM_R2R(mm3, mm2, mm5); MUL4_SYM_R2R(mm2, mm1, mm5); MOV_R2P(mm1, *d, mm0) } #define _op_copy_rel_pt_pas_c_dp_mmx _op_copy_rel_pt_p_c_dp_mmx #define _op_copy_rel_pt_pan_c_dp_mmx _op_copy_rel_pt_p_c_dp_mmx #define _op_copy_rel_pt_p_can_dp_mmx _op_copy_rel_pt_p_c_dp_mmx #define _op_copy_rel_pt_pas_can_dp_mmx _op_copy_rel_pt_p_c_dp_mmx #define _op_copy_rel_pt_pan_can_dp_mmx _op_copy_rel_pt_p_c_dp_mmx #define _op_copy_rel_pt_p_caa_dp_mmx _op_copy_rel_pt_p_c_dp_mmx #define _op_copy_rel_pt_pas_caa_dp_mmx _op_copy_rel_pt_p_c_dp_mmx #define _op_copy_rel_pt_pan_caa_dp_mmx _op_copy_rel_pt_p_c_dp_mmx #define _op_copy_rel_pt_p_c_dpan_mmx _op_copy_pt_p_c_dpan_mmx #define _op_copy_rel_pt_pas_c_dpan_mmx _op_copy_pt_pas_c_dpan_mmx #define _op_copy_rel_pt_pan_c_dpan_mmx _op_copy_pt_pan_c_dpan_mmx #define _op_copy_rel_pt_p_can_dpan_mmx _op_copy_pt_p_can_dpan_mmx #define _op_copy_rel_pt_pas_can_dpan_mmx _op_copy_pt_pas_can_dpan_mmx #define _op_copy_rel_pt_pan_can_dpan_mmx _op_copy_pt_pan_can_dpan_mmx #define _op_copy_rel_pt_p_caa_dpan_mmx _op_copy_pt_p_caa_dpan_mmx #define _op_copy_rel_pt_pas_caa_dpan_mmx _op_copy_pt_pas_caa_dpan_mmx #define _op_copy_rel_pt_pan_caa_dpan_mmx _op_copy_pt_pan_caa_dpan_mmx static void init_copy_rel_pixel_color_pt_funcs_mmx(void) { op_copy_rel_pt_funcs[SP][SM_N][SC][DP][CPU_MMX] = _op_copy_rel_pt_p_c_dp_mmx; op_copy_rel_pt_funcs[SP_AS][SM_N][SC][DP][CPU_MMX] = _op_copy_rel_pt_pas_c_dp_mmx; op_copy_rel_pt_funcs[SP_AN][SM_N][SC][DP][CPU_MMX] = _op_copy_rel_pt_pan_c_dp_mmx; op_copy_rel_pt_funcs[SP][SM_N][SC_AN][DP][CPU_MMX] = _op_copy_rel_pt_p_can_dp_mmx; op_copy_rel_pt_funcs[SP_AS][SM_N][SC_AN][DP][CPU_MMX] = _op_copy_rel_pt_pas_can_dp_mmx; op_copy_rel_pt_funcs[SP_AN][SM_N][SC_AN][DP][CPU_MMX] = _op_copy_rel_pt_pan_can_dp_mmx; op_copy_rel_pt_funcs[SP][SM_N][SC_AA][DP][CPU_MMX] = _op_copy_rel_pt_p_caa_dp_mmx; op_copy_rel_pt_funcs[SP_AS][SM_N][SC_AA][DP][CPU_MMX] = _op_copy_rel_pt_pas_caa_dp_mmx; op_copy_rel_pt_funcs[SP_AN][SM_N][SC_AA][DP][CPU_MMX] = _op_copy_rel_pt_pan_caa_dp_mmx; op_copy_rel_pt_funcs[SP][SM_N][SC][DP_AN][CPU_MMX] = _op_copy_rel_pt_p_c_dpan_mmx; op_copy_rel_pt_funcs[SP_AS][SM_N][SC][DP_AN][CPU_MMX] = _op_copy_rel_pt_pas_c_dpan_mmx; op_copy_rel_pt_funcs[SP_AN][SM_N][SC][DP_AN][CPU_MMX] = _op_copy_rel_pt_pan_c_dpan_mmx; op_copy_rel_pt_funcs[SP][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_copy_rel_pt_p_can_dpan_mmx; op_copy_rel_pt_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_copy_rel_pt_pas_can_dpan_mmx; op_copy_rel_pt_funcs[SP_AN][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_copy_rel_pt_pan_can_dpan_mmx; op_copy_rel_pt_funcs[SP][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_copy_rel_pt_p_caa_dpan_mmx; op_copy_rel_pt_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_copy_rel_pt_pas_caa_dpan_mmx; op_copy_rel_pt_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_copy_rel_pt_pan_caa_dpan_mmx; } #endif evas-1.7.9/src/lib/engines/common/evas_op_copy/op_copy_color_neon.c0000664000175000017500000001521312175475547022430 00000000000000/* copy color --> dst */ #ifdef BUILD_NEON static void _op_copy_c_dp_neon(DATA32 *s, DATA8 *m, DATA32 c, DATA32 *d, int l) { #define AP "COPY_C_DP_" uint32_t *e = d + l,*tmp; asm volatile ( ".fpu neon \n\t" "vdup.i32 q0, %[c] \n\t" // Can we do 32 byte? "andS %[tmp], %[d], $0x1f \n\t" "beq "AP"quadstart \n\t" // Can we do at least 16 byte? "andS %[tmp], %[d], $0x4 \n\t" "beq "AP"dualstart \n\t" // Only once AP"singleloop: \n\t" "vst1.32 d0[0], [%[d]] \n\t" "add %[d], #4 \n\t" // Up to 3 times AP"dualstart: \n\t" "sub %[tmp], %[e], %[d] \n\t" "cmp %[tmp], #32 \n\t" "blt "AP"loopout \n\t" AP"dualloop: \n\t" "vstr.32 d0, [%[d]] \n\t" "add %[d], #8 \n\t" "andS %[tmp], %[d], $0x1f \n\t" "bne "AP"dualloop \n\t" AP"quadstart: \n\t" "sub %[tmp], %[e], %[d] \n\t" "cmp %[tmp], #32 \n\t" "blt "AP"loopout \n\t" "vmov q1, q0 \n\t" "sub %[tmp],%[e],#31 \n\t" AP "quadloop: \n\t" "vstm %[d]!, {d0,d1,d2,d3} \n\t" "cmp %[tmp], %[d] \n\t" "bhi "AP"quadloop \n\t" AP "loopout: \n\t" "cmp %[d], %[e] \n\t" "beq "AP"done \n\t" "sub %[tmp],%[e], %[d] \n\t" "cmp %[tmp],$0x04 \n\t" "beq "AP"singleloop2 \n\t" AP "dualloop2: \n\t" "sub %[tmp],%[e],#7 \n\t" AP "dualloop2int: \n\t" "vstr.64 d0, [%[d]] \n\t" "add %[d], #8 \n\t" "cmp %[tmp], %[d] \n\t" "bhi "AP"dualloop2int \n\t" // Single ?? "cmp %[e], %[d] \n\t" "beq "AP"done \n\t" AP "singleloop2: \n\t" "vst1.32 d0[0], [%[d]] \n\t" AP "done:\n\t" : // No output regs // Input : [c] "r" (c), [e] "r" (e), [d] "r" (d),[tmp] "r" (tmp) // Clobbered : "q0","q1","memory" ); } #define _op_copy_cn_dp_neon _op_copy_c_dp_neon #define _op_copy_can_dp_neon _op_copy_c_dp_neon #define _op_copy_caa_dp_neon _op_copy_c_dp_neon #define _op_copy_cn_dpan_neon _op_copy_c_dp_neon #define _op_copy_c_dpan_neon _op_copy_c_dp_neon #define _op_copy_can_dpan_neon _op_copy_c_dp_neon #define _op_copy_caa_dpan_neon _op_copy_c_dp_neon static void init_copy_color_span_funcs_neon(void) { op_copy_span_funcs[SP_N][SM_N][SC_N][DP][CPU_NEON] = _op_copy_cn_dp_neon; op_copy_span_funcs[SP_N][SM_N][SC][DP][CPU_NEON] = _op_copy_c_dp_neon; op_copy_span_funcs[SP_N][SM_N][SC_AN][DP][CPU_NEON] = _op_copy_can_dp_neon; op_copy_span_funcs[SP_N][SM_N][SC_AA][DP][CPU_NEON] = _op_copy_caa_dp_neon; op_copy_span_funcs[SP_N][SM_N][SC_N][DP_AN][CPU_NEON] = _op_copy_cn_dpan_neon; op_copy_span_funcs[SP_N][SM_N][SC][DP_AN][CPU_NEON] = _op_copy_c_dpan_neon; op_copy_span_funcs[SP_N][SM_N][SC_AN][DP_AN][CPU_NEON] = _op_copy_can_dpan_neon; op_copy_span_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_NEON] = _op_copy_caa_dpan_neon; } #endif #ifdef BUILD_NEON static void _op_copy_pt_c_dp_neon(DATA32 s, DATA8 m, DATA32 c, DATA32 *d) { *d = c; } #define _op_copy_pt_cn_dp_neon _op_copy_pt_c_dp_neon #define _op_copy_pt_can_dp_neon _op_copy_pt_c_dp_neon #define _op_copy_pt_caa_dp_neon _op_copy_pt_c_dp_neon #define _op_copy_pt_cn_dpan_neon _op_copy_pt_c_dp_neon #define _op_copy_pt_c_dpan_neon _op_copy_pt_c_dp_neon #define _op_copy_pt_can_dpan_neon _op_copy_pt_c_dp_neon #define _op_copy_pt_caa_dpan_neon _op_copy_pt_c_dp_neon static void init_copy_color_pt_funcs_neon(void) { op_copy_pt_funcs[SP_N][SM_N][SC_N][DP][CPU_NEON] = _op_copy_pt_cn_dp_neon; op_copy_pt_funcs[SP_N][SM_N][SC][DP][CPU_NEON] = _op_copy_pt_c_dp_neon; op_copy_pt_funcs[SP_N][SM_N][SC_AN][DP][CPU_NEON] = _op_copy_pt_can_dp_neon; op_copy_pt_funcs[SP_N][SM_N][SC_AA][DP][CPU_NEON] = _op_copy_pt_caa_dp_neon; op_copy_pt_funcs[SP_N][SM_N][SC_N][DP_AN][CPU_NEON] = _op_copy_pt_cn_dpan_neon; op_copy_pt_funcs[SP_N][SM_N][SC][DP_AN][CPU_NEON] = _op_copy_pt_c_dpan_neon; op_copy_pt_funcs[SP_N][SM_N][SC_AN][DP_AN][CPU_NEON] = _op_copy_pt_can_dpan_neon; op_copy_pt_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_NEON] = _op_copy_pt_caa_dpan_neon; } #endif /*-----*/ /* copy_rel color --> dst */ #ifdef BUILD_NEON static void _op_copy_rel_c_dp_neon(DATA32 *s, DATA8 *m, DATA32 c, DATA32 *d, int l) { // FIXME: neon-it DATA32 *e = d + l; for (; d < e; d++) { *d = MUL_SYM(*d >> 24, c); } } #define _op_copy_rel_cn_dp_neon _op_copy_rel_c_dp_neon #define _op_copy_rel_can_dp_neon _op_copy_rel_c_dp_neon #define _op_copy_rel_caa_dp_neon _op_copy_rel_c_dp_neon #define _op_copy_rel_cn_dpan_neon _op_copy_cn_dpan_neon #define _op_copy_rel_c_dpan_neon _op_copy_c_dpan_neon #define _op_copy_rel_can_dpan_neon _op_copy_can_dpan_neon #define _op_copy_rel_caa_dpan_neon _op_copy_caa_dpan_neon static void init_copy_rel_color_span_funcs_neon(void) { op_copy_rel_span_funcs[SP_N][SM_N][SC_N][DP][CPU_NEON] = _op_copy_rel_cn_dp_neon; op_copy_rel_span_funcs[SP_N][SM_N][SC][DP][CPU_NEON] = _op_copy_rel_c_dp_neon; op_copy_rel_span_funcs[SP_N][SM_N][SC_AN][DP][CPU_NEON] = _op_copy_rel_can_dp_neon; op_copy_rel_span_funcs[SP_N][SM_N][SC_AA][DP][CPU_NEON] = _op_copy_rel_caa_dp_neon; op_copy_rel_span_funcs[SP_N][SM_N][SC_N][DP_AN][CPU_NEON] = _op_copy_rel_cn_dpan_neon; op_copy_rel_span_funcs[SP_N][SM_N][SC][DP_AN][CPU_NEON] = _op_copy_rel_c_dpan_neon; op_copy_rel_span_funcs[SP_N][SM_N][SC_AN][DP_AN][CPU_NEON] = _op_copy_rel_can_dpan_neon; op_copy_rel_span_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_NEON] = _op_copy_rel_caa_dpan_neon; } #endif #ifdef BUILD_NEON static void _op_copy_rel_pt_c_dp_neon(DATA32 s, DATA8 m, DATA32 c, DATA32 *d) { s = 1 + (*d >> 24); *d = MUL_256(s, c); } #define _op_copy_rel_pt_cn_dp_neon _op_copy_rel_pt_c_dp_neon #define _op_copy_rel_pt_can_dp_neon _op_copy_rel_pt_c_dp_neon #define _op_copy_rel_pt_caa_dp_neon _op_copy_rel_pt_c_dp_neon #define _op_copy_rel_pt_cn_dpan_neon _op_copy_pt_cn_dpan_neon #define _op_copy_rel_pt_c_dpan_neon _op_copy_pt_c_dpan_neon #define _op_copy_rel_pt_can_dpan_neon _op_copy_pt_can_dpan_neon #define _op_copy_rel_pt_caa_dpan_neon _op_copy_pt_caa_dpan_neon static void init_copy_rel_color_pt_funcs_neon(void) { op_copy_rel_pt_funcs[SP_N][SM_N][SC_N][DP][CPU_NEON] = _op_copy_rel_pt_cn_dp_neon; op_copy_rel_pt_funcs[SP_N][SM_N][SC][DP][CPU_NEON] = _op_copy_rel_pt_c_dp_neon; op_copy_rel_pt_funcs[SP_N][SM_N][SC_AN][DP][CPU_NEON] = _op_copy_rel_pt_can_dp_neon; op_copy_rel_pt_funcs[SP_N][SM_N][SC_AA][DP][CPU_NEON] = _op_copy_rel_pt_caa_dp_neon; op_copy_rel_pt_funcs[SP_N][SM_N][SC_N][DP_AN][CPU_NEON] = _op_copy_rel_pt_cn_dpan_neon; op_copy_rel_pt_funcs[SP_N][SM_N][SC][DP_AN][CPU_NEON] = _op_copy_rel_pt_c_dpan_neon; op_copy_rel_pt_funcs[SP_N][SM_N][SC_AN][DP_AN][CPU_NEON] = _op_copy_rel_pt_can_dpan_neon; op_copy_rel_pt_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_NEON] = _op_copy_rel_pt_caa_dpan_neon; } #endif evas-1.7.9/src/lib/engines/common/evas_op_copy/op_copy_pixel_mask_neon.c0000664000175000017500000001310112175475547023440 00000000000000/* copy pixel x mask --> dst */ #ifdef BUILD_NEON static void _op_copy_p_mas_dp_neon(DATA32 *s, DATA8 *m, DATA32 c __UNUSED__, DATA32 *d, int l) { // FIXME: neon-it DATA32 *e; int color; UNROLL8_PLD_WHILE(d, l, e, { color = *m; switch(color) { case 0: break; case 255: *d = *s; break; default: color++; *d = INTERP_256(color, *s, *d); break; } m++; s++; d++; }); } #define _op_copy_pan_mas_dp_neon _op_copy_p_mas_dp_neon #define _op_copy_pas_mas_dp_neon _op_copy_p_mas_dp_neon #define _op_copy_p_mas_dpan_neon _op_copy_p_mas_dp_neon #define _op_copy_pan_mas_dpan_neon _op_copy_p_mas_dpan_neon #define _op_copy_pas_mas_dpan_neon _op_copy_p_mas_dpan_neon static void init_copy_pixel_mask_span_funcs_neon(void) { op_copy_span_funcs[SP][SM_AS][SC_N][DP][CPU_NEON] = _op_copy_p_mas_dp_neon; op_copy_span_funcs[SP_AN][SM_AS][SC_N][DP][CPU_NEON] = _op_copy_pan_mas_dp_neon; op_copy_span_funcs[SP_AS][SM_AS][SC_N][DP][CPU_NEON] = _op_copy_pas_mas_dp_neon; op_copy_span_funcs[SP][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_copy_p_mas_dpan_neon; op_copy_span_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_copy_pan_mas_dpan_neon; op_copy_span_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_copy_pas_mas_dpan_neon; } #endif #ifdef BUILD_NEON static void _op_copy_pt_p_mas_dp_neon(DATA32 s, DATA8 m, DATA32 c, DATA32 *d) { *d = INTERP_256(m + 1, s, *d); } #define _op_copy_pt_pan_mas_dp_neon _op_copy_pt_p_mas_dp_neon #define _op_copy_pt_pas_mas_dp_neon _op_copy_pt_p_mas_dp_neon #define _op_copy_pt_p_mas_dpan_neon _op_copy_pt_p_mas_dp_neon #define _op_copy_pt_pan_mas_dpan_neon _op_copy_pt_p_mas_dpan_neon #define _op_copy_pt_pas_mas_dpan_neon _op_copy_pt_p_mas_dpan_neon static void init_copy_pixel_mask_pt_funcs_neon(void) { op_copy_pt_funcs[SP][SM_AS][SC_N][DP][CPU_NEON] = _op_copy_pt_p_mas_dp_neon; op_copy_pt_funcs[SP_AN][SM_AS][SC_N][DP][CPU_NEON] = _op_copy_pt_pan_mas_dp_neon; op_copy_pt_funcs[SP_AS][SM_AS][SC_N][DP][CPU_NEON] = _op_copy_pt_pas_mas_dp_neon; op_copy_pt_funcs[SP][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_copy_pt_p_mas_dpan_neon; op_copy_pt_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_copy_pt_pan_mas_dpan_neon; op_copy_pt_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_copy_pt_pas_mas_dpan_neon; } #endif /*-----*/ /* copy_rel pixel x mask --> dst */ #ifdef BUILD_NEON static void _op_copy_rel_p_mas_dp_neon(DATA32 *s, DATA8 *m, DATA32 c __UNUSED__, DATA32 *d, int l) { // FIXME: neon-it DATA32 *e; int color; UNROLL8_PLD_WHILE(d, l, e, { color = *m; switch(color) { case 0: break; case 255: *d = MUL_SYM(*d >> 24, *s); break; default: c = MUL_SYM(*d >> 24, *s); l++; *d = INTERP_256(l, c, *d); break; } m++; s++; d++; }); } #define _op_copy_rel_pan_mas_dp_neon _op_copy_rel_p_mas_dp_neon #define _op_copy_rel_pas_mas_dp_neon _op_copy_rel_p_mas_dp_neon #define _op_copy_rel_p_mas_dpan_neon _op_copy_p_mas_dpan_neon #define _op_copy_rel_pan_mas_dpan_neon _op_copy_pan_mas_dpan_neon #define _op_copy_rel_pas_mas_dpan_neon _op_copy_pas_mas_dpan_neon static void init_copy_rel_pixel_mask_span_funcs_neon(void) { op_copy_rel_span_funcs[SP][SM_AS][SC_N][DP][CPU_NEON] = _op_copy_rel_p_mas_dp_neon; op_copy_rel_span_funcs[SP_AN][SM_AS][SC_N][DP][CPU_NEON] = _op_copy_rel_pan_mas_dp_neon; op_copy_rel_span_funcs[SP_AS][SM_AS][SC_N][DP][CPU_NEON] = _op_copy_rel_pas_mas_dp_neon; op_copy_rel_span_funcs[SP][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_copy_rel_p_mas_dpan_neon; op_copy_rel_span_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_copy_rel_pan_mas_dpan_neon; op_copy_rel_span_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_copy_rel_pas_mas_dpan_neon; } #endif #ifdef BUILD_NEON static void _op_copy_rel_pt_p_mas_dp_neon(DATA32 s, DATA8 m, DATA32 c, DATA32 *d) { c = MUL_SYM(*d >> 24, s); *d = INTERP_256(m + 1, c, *d); } #define _op_copy_rel_pt_pan_mas_dp_neon _op_copy_rel_pt_p_mas_dp_neon #define _op_copy_rel_pt_pas_mas_dp_neon _op_copy_rel_pt_p_mas_dp_neon #define _op_copy_rel_pt_p_mas_dpan_neon _op_copy_pt_p_mas_dpan_neon #define _op_copy_rel_pt_pan_mas_dpan_neon _op_copy_pt_pan_mas_dpan_neon #define _op_copy_rel_pt_pas_mas_dpan_neon _op_copy_pt_pas_mas_dpan_neon static void init_copy_rel_pixel_mask_pt_funcs_neon(void) { op_copy_rel_pt_funcs[SP][SM_AS][SC_N][DP][CPU_NEON] = _op_copy_rel_pt_p_mas_dp_neon; op_copy_rel_pt_funcs[SP_AN][SM_AS][SC_N][DP][CPU_NEON] = _op_copy_rel_pt_pan_mas_dp_neon; op_copy_rel_pt_funcs[SP_AS][SM_AS][SC_N][DP][CPU_NEON] = _op_copy_rel_pt_pas_mas_dp_neon; op_copy_rel_pt_funcs[SP][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_copy_rel_pt_p_mas_dpan_neon; op_copy_rel_pt_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_copy_rel_pt_pan_mas_dpan_neon; op_copy_rel_pt_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_copy_rel_pt_pas_mas_dpan_neon; } #endif evas-1.7.9/src/lib/engines/common/evas_op_copy/op_copy_pixel_i386.c0000664000175000017500000001040612175475547022164 00000000000000/* copy pixel --> dst */ #ifdef BUILD_MMX static void _op_copy_p_dp_mmx(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c __UNUSED__, DATA32 *d, int l) { DATA32 *e = d + l - 15; for (; d < e; d+=16, s+=16) { MOVE_16DWORDS_MMX(s, d); } e+=15; for (; d < e; d++, s++) { *d = *s; } } #define _op_copy_pan_dp_mmx _op_copy_p_dp_mmx #define _op_copy_pas_dp_mmx _op_copy_p_dp_mmx #define _op_copy_p_dpan_mmx _op_copy_p_dp_mmx #define _op_copy_pan_dpan_mmx _op_copy_pan_dp_mmx #define _op_copy_pas_dpan_mmx _op_copy_pas_dp_mmx static void init_copy_pixel_span_funcs_mmx(void) { op_copy_span_funcs[SP][SM_N][SC_N][DP][CPU_MMX] = _op_copy_p_dp_mmx; op_copy_span_funcs[SP_AN][SM_N][SC_N][DP][CPU_MMX] = _op_copy_pan_dp_mmx; op_copy_span_funcs[SP_AS][SM_N][SC_N][DP][CPU_MMX] = _op_copy_pas_dp_mmx; op_copy_span_funcs[SP][SM_N][SC_N][DP_AN][CPU_MMX] = _op_copy_p_dpan_mmx; op_copy_span_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_MMX] = _op_copy_pan_dpan_mmx; op_copy_span_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_MMX] = _op_copy_pas_dpan_mmx; } #endif #ifdef BUILD_MMX static void _op_copy_pt_p_dp_mmx(DATA32 s, DATA8 m __UNUSED__, DATA32 c __UNUSED__, DATA32 *d) { *d = s; } #define _op_copy_pt_pan_dp_mmx _op_copy_pt_p_dp_mmx #define _op_copy_pt_pas_dp_mmx _op_copy_pt_p_dp_mmx #define _op_copy_pt_p_dpan_mmx _op_copy_pt_p_dp_mmx #define _op_copy_pt_pan_dpan_mmx _op_copy_pt_pan_dp_mmx #define _op_copy_pt_pas_dpan_mmx _op_copy_pt_pas_dp_mmx static void init_copy_pixel_pt_funcs_mmx(void) { op_copy_pt_funcs[SP][SM_N][SC_N][DP][CPU_MMX] = _op_copy_pt_p_dp_mmx; op_copy_pt_funcs[SP_AN][SM_N][SC_N][DP][CPU_MMX] = _op_copy_pt_pan_dp_mmx; op_copy_pt_funcs[SP_AS][SM_N][SC_N][DP][CPU_MMX] = _op_copy_pt_pas_dp_mmx; op_copy_pt_funcs[SP][SM_N][SC_N][DP_AN][CPU_MMX] = _op_copy_pt_p_dpan_mmx; op_copy_pt_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_MMX] = _op_copy_pt_pan_dpan_mmx; op_copy_pt_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_MMX] = _op_copy_pt_pas_dpan_mmx; } #endif /*-----*/ /* copy_rel pixel --> dst */ #ifdef BUILD_MMX static void _op_copy_rel_p_dp_mmx(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c __UNUSED__, DATA32 *d, int l) { DATA32 *e = d + l; pxor_r2r(mm0, mm0); MOV_A2R(ALPHA_255, mm5) for (; d < e; d++, s++) { MOV_PA2R(*d, mm1) MOV_P2R(*s, mm2, mm0) MUL4_SYM_R2R(mm2, mm1, mm5) MOV_R2P(mm1, *d, mm0) } } #define _op_copy_rel_pas_dp_mmx _op_copy_rel_p_dp_mmx #define _op_copy_rel_pan_dp_mmx _op_copy_rel_p_dp_mmx #define _op_copy_rel_p_dpan_mmx _op_copy_p_dpan_mmx #define _op_copy_rel_pan_dpan_mmx _op_copy_pan_dpan_mmx #define _op_copy_rel_pas_dpan_mmx _op_copy_pas_dpan_mmx static void init_copy_rel_pixel_span_funcs_mmx(void) { op_copy_rel_span_funcs[SP][SM_N][SC_N][DP][CPU_MMX] = _op_copy_rel_p_dp_mmx; op_copy_rel_span_funcs[SP_AN][SM_N][SC_N][DP][CPU_MMX] = _op_copy_rel_pan_dp_mmx; op_copy_rel_span_funcs[SP_AS][SM_N][SC_N][DP][CPU_MMX] = _op_copy_rel_pas_dp_mmx; op_copy_rel_span_funcs[SP][SM_N][SC_N][DP_AN][CPU_MMX] = _op_copy_rel_p_dpan_mmx; op_copy_rel_span_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_MMX] = _op_copy_rel_pan_dpan_mmx; op_copy_rel_span_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_MMX] = _op_copy_rel_pas_dpan_mmx; } #endif #ifdef BUILD_MMX static void _op_copy_rel_pt_p_dp_mmx(DATA32 s, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) { c = 1 + (*d >> 24); MOV_A2R(c, mm1) pxor_r2r(mm0, mm0); MOV_P2R(s, mm2, mm0) MUL4_256_R2R(mm2, mm1) MOV_R2P(mm1, *d, mm0) } #define _op_copy_rel_pt_pan_dp_mmx _op_copy_rel_pt_p_dp_mmx #define _op_copy_rel_pt_pas_dp_mmx _op_copy_rel_pt_p_dp_mmx #define _op_copy_rel_pt_p_dpan_mmx _op_copy_pt_p_dpan_mmx #define _op_copy_rel_pt_pan_dpan_mmx _op_copy_pt_pan_dpan_mmx #define _op_copy_rel_pt_pas_dpan_mmx _op_copy_pt_pas_dpan_mmx static void init_copy_rel_pixel_pt_funcs_mmx(void) { op_copy_rel_pt_funcs[SP][SM_N][SC_N][DP][CPU_MMX] = _op_copy_rel_pt_p_dp_mmx; op_copy_rel_pt_funcs[SP_AN][SM_N][SC_N][DP][CPU_MMX] = _op_copy_rel_pt_pan_dp_mmx; op_copy_rel_pt_funcs[SP_AS][SM_N][SC_N][DP][CPU_MMX] = _op_copy_rel_pt_pas_dp_mmx; op_copy_rel_pt_funcs[SP][SM_N][SC_N][DP_AN][CPU_MMX] = _op_copy_rel_pt_p_dpan_mmx; op_copy_rel_pt_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_MMX] = _op_copy_rel_pt_pan_dpan_mmx; op_copy_rel_pt_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_MMX] = _op_copy_rel_pt_pas_dpan_mmx; } #endif evas-1.7.9/src/lib/engines/common/evas_op_copy/op_copy_mask_color_i386.c0000664000175000017500000001470112175475547023176 00000000000000/* copy mask x color -> dst */ #ifdef BUILD_MMX static void _op_copy_mas_c_dp_mmx(DATA32 *s __UNUSED__, DATA8 *m, DATA32 c, DATA32 *d, int l) { DATA32 *e = d + l; pxor_r2r(mm0, mm0); MOV_P2R(c, mm2, mm0) MOV_A2R(ALPHA_255, mm5) while (d < e) { l = *m; switch(l) { case 0: break; case 255: *d = c; break; default: { l++; MOV_A2R(l, mm3) MOV_P2R(*d, mm1, mm0) movq_r2r(mm2, mm4); INTERP_256_R2R(mm3, mm4, mm1, mm5); MOV_R2P(mm1, *d, mm0) } break; } m++; d++; } } #define _op_copy_mas_cn_dp_mmx _op_copy_mas_c_dp_mmx #define _op_copy_mas_can_dp_mmx _op_copy_mas_c_dp_mmx #define _op_copy_mas_caa_dp_mmx _op_copy_mas_c_dp_mmx #define _op_copy_mas_c_dpan_mmx _op_copy_mas_c_dp_mmx #define _op_copy_mas_cn_dpan_mmx _op_copy_mas_c_dpan_mmx #define _op_copy_mas_can_dpan_mmx _op_copy_mas_c_dpan_mmx #define _op_copy_mas_caa_dpan_mmx _op_copy_mas_c_dpan_mmx static void init_copy_mask_color_span_funcs_mmx(void) { op_copy_span_funcs[SP_N][SM_AS][SC_N][DP][CPU_MMX] = _op_copy_mas_cn_dp_mmx; op_copy_span_funcs[SP_N][SM_AS][SC][DP][CPU_MMX] = _op_copy_mas_c_dp_mmx; op_copy_span_funcs[SP_N][SM_AS][SC_AN][DP][CPU_MMX] = _op_copy_mas_can_dp_mmx; op_copy_span_funcs[SP_N][SM_AS][SC_AA][DP][CPU_MMX] = _op_copy_mas_caa_dp_mmx; op_copy_span_funcs[SP_N][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_copy_mas_cn_dpan_mmx; op_copy_span_funcs[SP_N][SM_AS][SC][DP_AN][CPU_MMX] = _op_copy_mas_c_dpan_mmx; op_copy_span_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_MMX] = _op_copy_mas_can_dpan_mmx; op_copy_span_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_MMX] = _op_copy_mas_caa_dpan_mmx; } #endif #ifdef BUILD_MMX static void _op_copy_pt_mas_c_dp_mmx(DATA32 s, DATA8 m, DATA32 c, DATA32 *d) { s = m + 1; MOV_A2R(ALPHA_255, mm5) pxor_r2r(mm0, mm0); MOV_P2R(c, mm2, mm0) MOV_A2R(s, mm3) MOV_P2R(*d, mm1, mm0) INTERP_256_R2R(mm3, mm2, mm1, mm5); MOV_R2P(mm1, *d, mm0) } #define _op_copy_pt_mas_cn_dp_mmx _op_copy_pt_mas_c_dp_mmx #define _op_copy_pt_mas_can_dp_mmx _op_copy_pt_mas_c_dp_mmx #define _op_copy_pt_mas_caa_dp_mmx _op_copy_pt_mas_c_dp_mmx #define _op_copy_pt_mas_c_dpan_mmx _op_copy_pt_mas_c_dp_mmx #define _op_copy_pt_mas_cn_dpan_mmx _op_copy_pt_mas_c_dpan_mmx #define _op_copy_pt_mas_can_dpan_mmx _op_copy_pt_mas_c_dpan_mmx #define _op_copy_pt_mas_caa_dpan_mmx _op_copy_pt_mas_c_dpan_mmx static void init_copy_mask_color_pt_funcs_mmx(void) { op_copy_pt_funcs[SP_N][SM_AS][SC_N][DP][CPU_MMX] = _op_copy_pt_mas_cn_dp_mmx; op_copy_pt_funcs[SP_N][SM_AS][SC][DP][CPU_MMX] = _op_copy_pt_mas_c_dp_mmx; op_copy_pt_funcs[SP_N][SM_AS][SC_AN][DP][CPU_MMX] = _op_copy_pt_mas_can_dp_mmx; op_copy_pt_funcs[SP_N][SM_AS][SC_AA][DP][CPU_MMX] = _op_copy_pt_mas_caa_dp_mmx; op_copy_pt_funcs[SP_N][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_copy_pt_mas_cn_dpan_mmx; op_copy_pt_funcs[SP_N][SM_AS][SC][DP_AN][CPU_MMX] = _op_copy_pt_mas_c_dpan_mmx; op_copy_pt_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_MMX] = _op_copy_pt_mas_can_dpan_mmx; op_copy_pt_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_MMX] = _op_copy_pt_mas_caa_dpan_mmx; } #endif /*-----*/ /* copy_rel mask x color -> dst */ #ifdef BUILD_MMX static void _op_copy_rel_mas_c_dp_mmx(DATA32 *s __UNUSED__, DATA8 *m, DATA32 c, DATA32 *d, int l) { DATA32 *e = d + l; pxor_r2r(mm0, mm0); MOV_P2R(c, mm2, mm0) MOV_A2R(ALPHA_255, mm5) while (d < e) { l = *m; switch(l) { case 0: break; case 255: l = 1 + (*d >> 24); MOV_A2R(l, mm1) MUL4_256_R2R(mm2, mm1) MOV_R2P(mm1, *d, mm0) break; default: l++; MOV_A2R(l, mm3) MOV_P2R(*d, mm1, mm0) MOV_RA2R(mm1, mm4) MUL4_256_R2R(mm2, mm4) INTERP_256_R2R(mm3, mm4, mm1, mm5) MOV_R2P(mm1, *d, mm0) break; } m++; d++; } } #define _op_copy_rel_mas_cn_dp_mmx _op_copy_rel_mas_c_dp_mmx #define _op_copy_rel_mas_can_dp_mmx _op_copy_rel_mas_c_dp_mmx #define _op_copy_rel_mas_caa_dp_mmx _op_copy_rel_mas_c_dp_mmx #define _op_copy_rel_mas_c_dpan_mmx _op_copy_mas_c_dpan_mmx #define _op_copy_rel_mas_cn_dpan_mmx _op_copy_mas_cn_dpan_mmx #define _op_copy_rel_mas_can_dpan_mmx _op_copy_mas_can_dpan_mmx #define _op_copy_rel_mas_caa_dpan_mmx _op_copy_mas_caa_dpan_mmx static void init_copy_rel_mask_color_span_funcs_mmx(void) { op_copy_rel_span_funcs[SP_N][SM_AS][SC_N][DP][CPU_MMX] = _op_copy_rel_mas_cn_dp_mmx; op_copy_rel_span_funcs[SP_N][SM_AS][SC][DP][CPU_MMX] = _op_copy_rel_mas_c_dp_mmx; op_copy_rel_span_funcs[SP_N][SM_AS][SC_AN][DP][CPU_MMX] = _op_copy_rel_mas_can_dp_mmx; op_copy_rel_span_funcs[SP_N][SM_AS][SC_AA][DP][CPU_MMX] = _op_copy_rel_mas_caa_dp_mmx; op_copy_rel_span_funcs[SP_N][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_copy_rel_mas_cn_dpan_mmx; op_copy_rel_span_funcs[SP_N][SM_AS][SC][DP_AN][CPU_MMX] = _op_copy_rel_mas_c_dpan_mmx; op_copy_rel_span_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_MMX] = _op_copy_rel_mas_can_dpan_mmx; op_copy_rel_span_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_MMX] = _op_copy_rel_mas_caa_dpan_mmx; } #endif #ifdef BUILD_MMX static void _op_copy_rel_pt_mas_c_dp_mmx(DATA32 s, DATA8 m, DATA32 c, DATA32 *d) { s = m + 1; MOV_A2R(ALPHA_255, mm5) pxor_r2r(mm0, mm0); MOV_A2R(s, mm3) MOV_P2R(*d, mm1, mm0) MOV_RA2R(mm1, mm4) MOV_P2R(c, mm2, mm0) MUL4_256_R2R(mm2, mm4) INTERP_256_R2R(mm3, mm4, mm1, mm5) MOV_R2P(mm1, *d, mm0) } #define _op_copy_rel_pt_mas_cn_dp_mmx _op_copy_rel_pt_mas_c_dp_mmx #define _op_copy_rel_pt_mas_can_dp_mmx _op_copy_rel_pt_mas_c_dp_mmx #define _op_copy_rel_pt_mas_caa_dp_mmx _op_copy_rel_pt_mas_c_dp_mmx #define _op_copy_rel_pt_mas_c_dpan_mmx _op_copy_pt_mas_c_dpan_mmx #define _op_copy_rel_pt_mas_cn_dpan_mmx _op_copy_pt_mas_cn_dpan_mmx #define _op_copy_rel_pt_mas_can_dpan_mmx _op_copy_pt_mas_can_dpan_mmx #define _op_copy_rel_pt_mas_caa_dpan_mmx _op_copy_pt_mas_caa_dpan_mmx static void init_copy_rel_mask_color_pt_funcs_mmx(void) { op_copy_rel_pt_funcs[SP_N][SM_AS][SC_N][DP][CPU_MMX] = _op_copy_rel_pt_mas_cn_dp_mmx; op_copy_rel_pt_funcs[SP_N][SM_AS][SC][DP][CPU_MMX] = _op_copy_rel_pt_mas_c_dp_mmx; op_copy_rel_pt_funcs[SP_N][SM_AS][SC_AN][DP][CPU_MMX] = _op_copy_rel_pt_mas_can_dp_mmx; op_copy_rel_pt_funcs[SP_N][SM_AS][SC_AA][DP][CPU_MMX] = _op_copy_rel_pt_mas_caa_dp_mmx; op_copy_rel_pt_funcs[SP_N][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_copy_rel_pt_mas_cn_dpan_mmx; op_copy_rel_pt_funcs[SP_N][SM_AS][SC][DP_AN][CPU_MMX] = _op_copy_rel_pt_mas_c_dpan_mmx; op_copy_rel_pt_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_MMX] = _op_copy_rel_pt_mas_can_dpan_mmx; op_copy_rel_pt_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_MMX] = _op_copy_rel_pt_mas_caa_dpan_mmx; } #endif evas-1.7.9/src/lib/engines/common/evas_op_copy/op_copy_pixel_mask_.c0000664000175000017500000001214312175475547022565 00000000000000/* copy pixel x mask --> dst */ #ifdef BUILD_C static void _op_copy_p_mas_dp(DATA32 *s, DATA8 *m, DATA32 c __UNUSED__, DATA32 *d, int l) { DATA32 *e; int color; UNROLL8_PLD_WHILE(d, l, e, { color = *m; switch(color) { case 0: break; case 255: *d = *s; break; default: color++; *d = INTERP_256(color, *s, *d); break; } m++; s++; d++; }); } #define _op_copy_pan_mas_dp _op_copy_p_mas_dp #define _op_copy_pas_mas_dp _op_copy_p_mas_dp #define _op_copy_p_mas_dpan _op_copy_p_mas_dp #define _op_copy_pan_mas_dpan _op_copy_p_mas_dpan #define _op_copy_pas_mas_dpan _op_copy_p_mas_dpan static void init_copy_pixel_mask_span_funcs_c(void) { op_copy_span_funcs[SP][SM_AS][SC_N][DP][CPU_C] = _op_copy_p_mas_dp; op_copy_span_funcs[SP_AN][SM_AS][SC_N][DP][CPU_C] = _op_copy_pan_mas_dp; op_copy_span_funcs[SP_AS][SM_AS][SC_N][DP][CPU_C] = _op_copy_pas_mas_dp; op_copy_span_funcs[SP][SM_AS][SC_N][DP_AN][CPU_C] = _op_copy_p_mas_dpan; op_copy_span_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_C] = _op_copy_pan_mas_dpan; op_copy_span_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_C] = _op_copy_pas_mas_dpan; } #endif #ifdef BUILD_C static void _op_copy_pt_p_mas_dp(DATA32 s, DATA8 m, DATA32 c __UNUSED__, DATA32 *d) { *d = INTERP_256(m + 1, s, *d); } #define _op_copy_pt_pan_mas_dp _op_copy_pt_p_mas_dp #define _op_copy_pt_pas_mas_dp _op_copy_pt_p_mas_dp #define _op_copy_pt_p_mas_dpan _op_copy_pt_p_mas_dp #define _op_copy_pt_pan_mas_dpan _op_copy_pt_p_mas_dpan #define _op_copy_pt_pas_mas_dpan _op_copy_pt_p_mas_dpan static void init_copy_pixel_mask_pt_funcs_c(void) { op_copy_pt_funcs[SP][SM_AS][SC_N][DP][CPU_C] = _op_copy_pt_p_mas_dp; op_copy_pt_funcs[SP_AN][SM_AS][SC_N][DP][CPU_C] = _op_copy_pt_pan_mas_dp; op_copy_pt_funcs[SP_AS][SM_AS][SC_N][DP][CPU_C] = _op_copy_pt_pas_mas_dp; op_copy_pt_funcs[SP][SM_AS][SC_N][DP_AN][CPU_C] = _op_copy_pt_p_mas_dpan; op_copy_pt_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_C] = _op_copy_pt_pan_mas_dpan; op_copy_pt_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_C] = _op_copy_pt_pas_mas_dpan; } #endif /*-----*/ /* copy_rel pixel x mask --> dst */ #ifdef BUILD_C static void _op_copy_rel_p_mas_dp(DATA32 *s, DATA8 *m, DATA32 c, DATA32 *d, int l) { DATA32 *e; int color; UNROLL8_PLD_WHILE(d, l, e, { color = *m; switch(color) { case 0: break; case 255: *d = MUL_SYM(*d >> 24, *s); break; default: c = MUL_SYM(*d >> 24, *s); l++; *d = INTERP_256(l, c, *d); break; } m++; s++; d++; }); } #define _op_copy_rel_pan_mas_dp _op_copy_rel_p_mas_dp #define _op_copy_rel_pas_mas_dp _op_copy_rel_p_mas_dp #define _op_copy_rel_p_mas_dpan _op_copy_p_mas_dpan #define _op_copy_rel_pan_mas_dpan _op_copy_pan_mas_dpan #define _op_copy_rel_pas_mas_dpan _op_copy_pas_mas_dpan static void init_copy_rel_pixel_mask_span_funcs_c(void) { op_copy_rel_span_funcs[SP][SM_AS][SC_N][DP][CPU_C] = _op_copy_rel_p_mas_dp; op_copy_rel_span_funcs[SP_AN][SM_AS][SC_N][DP][CPU_C] = _op_copy_rel_pan_mas_dp; op_copy_rel_span_funcs[SP_AS][SM_AS][SC_N][DP][CPU_C] = _op_copy_rel_pas_mas_dp; op_copy_rel_span_funcs[SP][SM_AS][SC_N][DP_AN][CPU_C] = _op_copy_rel_p_mas_dpan; op_copy_rel_span_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_C] = _op_copy_rel_pan_mas_dpan; op_copy_rel_span_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_C] = _op_copy_rel_pas_mas_dpan; } #endif #ifdef BUILD_C static void _op_copy_rel_pt_p_mas_dp(DATA32 s, DATA8 m, DATA32 c, DATA32 *d) { c = MUL_SYM(*d >> 24, s); *d = INTERP_256(m + 1, c, *d); } #define _op_copy_rel_pt_pan_mas_dp _op_copy_rel_pt_p_mas_dp #define _op_copy_rel_pt_pas_mas_dp _op_copy_rel_pt_p_mas_dp #define _op_copy_rel_pt_p_mas_dpan _op_copy_pt_p_mas_dpan #define _op_copy_rel_pt_pan_mas_dpan _op_copy_pt_pan_mas_dpan #define _op_copy_rel_pt_pas_mas_dpan _op_copy_pt_pas_mas_dpan static void init_copy_rel_pixel_mask_pt_funcs_c(void) { op_copy_rel_pt_funcs[SP][SM_AS][SC_N][DP][CPU_C] = _op_copy_rel_pt_p_mas_dp; op_copy_rel_pt_funcs[SP_AN][SM_AS][SC_N][DP][CPU_C] = _op_copy_rel_pt_pan_mas_dp; op_copy_rel_pt_funcs[SP_AS][SM_AS][SC_N][DP][CPU_C] = _op_copy_rel_pt_pas_mas_dp; op_copy_rel_pt_funcs[SP][SM_AS][SC_N][DP_AN][CPU_C] = _op_copy_rel_pt_p_mas_dpan; op_copy_rel_pt_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_C] = _op_copy_rel_pt_pan_mas_dpan; op_copy_rel_pt_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_C] = _op_copy_rel_pt_pas_mas_dpan; } #endif evas-1.7.9/src/lib/engines/common/evas_op_copy/Makefile.am0000664000175000017500000000064612175475547020437 00000000000000MAINTAINERCLEANFILES = Makefile.in EXTRA_DIST = \ op_copy_color_.c \ op_copy_color_i386.c \ op_copy_color_neon.c \ op_copy_mask_color_.c \ op_copy_mask_color_i386.c \ op_copy_mask_color_neon.c \ op_copy_pixel_.c \ op_copy_pixel_neon.c \ op_copy_pixel_color_.c \ op_copy_pixel_color_i386.c \ op_copy_pixel_color_neon.c \ op_copy_pixel_i386.c \ op_copy_pixel_mask_.c \ op_copy_pixel_mask_i386.c \ op_copy_pixel_mask_neon.c evas-1.7.9/src/lib/engines/common/evas_op_copy/op_copy_pixel_neon.c0000664000175000017500000001335012175475547022433 00000000000000/* copy pixel --> dst */ #ifdef BUILD_NEON static void _op_copy_p_dp_neon(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c __UNUSED__, DATA32 *d, int l) { //#define USENEON 1 #ifndef USENEON memcpy(d, s, l * sizeof(DATA32)); return; #else DATA32 *e; e = d + l - 23; if (e > d) { int dl; asm volatile (".fpu neon \n\t" "_op_copy_p_dp_neon_asmloop: \n\t" "pld [%[s], #192] \n\t" // preload 256 bytes ahead "pld [%[s], #320] \n\t" // preload 320 bytes ahead "vld1.32 {d0-d3}, [%[s]]! \n\t" // load 256bits (32 bytes 8 pix), 32bit aligned "vld1.32 {d4-d7} , [%[s]]! \n\t" // load 256bits (32 bytes 8 pix), 32bit aligned "vld1.32 {d8-d11}, [%[s]]! \n\t" // load 256bits (32 bytes 8 pix), 32bit aligned "vst1.32 {d0-d3}, [%[d]]! \n\t" // store 256bits (32 bytes 8 pix), 32bit aligned "vst1.32 {d4-d7}, [%[d]]! \n\t" // store 256bits (32 bytes 8 pix), 32bit aligned "vst1.32 {d8-d11}, [%[d]]! \n\t" // store 256bits (32 bytes 8 pix), 32bit aligned "cmp %[e], %[d] \n\t" // compare current and end ptr "bgt _op_copy_p_dp_neon_asmloop \n\t" : /*out*/ : /*in */ [s] "r" (s), [e] "r" (e), [d] "r" (d) : /*clobber*/ "q0", "q1", "q2","q3", "q4", "q5", "q6", "d0", "d1", "d2", "d3", "d4", "d5", "d6", "d7", "d8", "d9", "d10", "d11", "memory" // clobbered ); dl = l % 24; // dl is how many pixels at end that is not a multiple of 24 l = l - dl; // jump to there at the end of the run? s = s + l; d = d + l; } e += 23; for (;d < e; d++, s++) *d = *s; #endif } #define _op_copy_pan_dp_neon _op_copy_p_dp_neon #define _op_copy_pas_dp_neon _op_copy_p_dp_neon #define _op_copy_p_dpan_neon _op_copy_p_dp_neon #define _op_copy_pan_dpan_neon _op_copy_pan_dp_neon #define _op_copy_pas_dpan_neon _op_copy_pas_dp_neon static void init_copy_pixel_span_funcs_neon(void) { op_copy_span_funcs[SP][SM_N][SC_N][DP][CPU_NEON] = _op_copy_p_dp_neon; op_copy_span_funcs[SP_AN][SM_N][SC_N][DP][CPU_NEON] = _op_copy_pan_dp_neon; op_copy_span_funcs[SP_AS][SM_N][SC_N][DP][CPU_NEON] = _op_copy_pas_dp_neon; op_copy_span_funcs[SP][SM_N][SC_N][DP_AN][CPU_NEON] = _op_copy_p_dpan_neon; op_copy_span_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_NEON] = _op_copy_pan_dpan_neon; op_copy_span_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_NEON] = _op_copy_pas_dpan_neon; } #endif #ifdef BUILD_NEON static void _op_copy_pt_p_dp_neon(DATA32 s, DATA8 m __UNUSED__, DATA32 c __UNUSED__, DATA32 *d) { *d = s; } #define _op_copy_pt_pan_dp_neon _op_copy_pt_p_dp_neon #define _op_copy_pt_pas_dp_neon _op_copy_pt_p_dp_neon #define _op_copy_pt_p_dpan_neon _op_copy_pt_p_dp_neon #define _op_copy_pt_pan_dpan_neon _op_copy_pt_pan_dp_neon #define _op_copy_pt_pas_dpan_neon _op_copy_pt_pas_dp_neon static void init_copy_pixel_pt_funcs_neon(void) { op_copy_pt_funcs[SP][SM_N][SC_N][DP][CPU_NEON] = _op_copy_pt_p_dp_neon; op_copy_pt_funcs[SP_AN][SM_N][SC_N][DP][CPU_NEON] = _op_copy_pt_pan_dp_neon; op_copy_pt_funcs[SP_AS][SM_N][SC_N][DP][CPU_NEON] = _op_copy_pt_pas_dp_neon; op_copy_pt_funcs[SP][SM_N][SC_N][DP_AN][CPU_NEON] = _op_copy_pt_p_dpan_neon; op_copy_pt_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_NEON] = _op_copy_pt_pan_dpan_neon; op_copy_pt_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_NEON] = _op_copy_pt_pas_dpan_neon; } #endif /*-----*/ /* copy_rel pixel --> dst */ #ifdef BUILD_NEON static void _op_copy_rel_p_dp_neon(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c __UNUSED__, DATA32 *d, int l) { // FIXME: neon-it DATA32 *e; UNROLL8_PLD_WHILE(d, l, e, { *d = MUL_SYM(*d >> 24, c); d++; }); } #define _op_copy_rel_pas_dp_neon _op_copy_rel_p_dp_neon #define _op_copy_rel_pan_dp_neon _op_copy_rel_p_dp_neon #define _op_copy_rel_p_dpan_neon _op_copy_p_dpan_neon #define _op_copy_rel_pan_dpan_neon _op_copy_pan_dpan_neon #define _op_copy_rel_pas_dpan_neon _op_copy_pas_dpan_neon static void init_copy_rel_pixel_span_funcs_neon(void) { op_copy_rel_span_funcs[SP][SM_N][SC_N][DP][CPU_NEON] = _op_copy_rel_p_dp_neon; op_copy_rel_span_funcs[SP_AN][SM_N][SC_N][DP][CPU_NEON] = _op_copy_rel_pan_dp_neon; op_copy_rel_span_funcs[SP_AS][SM_N][SC_N][DP][CPU_NEON] = _op_copy_rel_pas_dp_neon; op_copy_rel_span_funcs[SP][SM_N][SC_N][DP_AN][CPU_NEON] = _op_copy_rel_p_dpan_neon; op_copy_rel_span_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_NEON] = _op_copy_rel_pan_dpan_neon; op_copy_rel_span_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_NEON] = _op_copy_rel_pas_dpan_neon; } #endif #ifdef BUILD_NEON static void _op_copy_rel_pt_p_dp_neon(DATA32 s, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) { s = 1 + (*d >> 24); *d = MUL_256(s, c); } #define _op_copy_rel_pt_pan_dp_neon _op_copy_rel_pt_p_dp_neon #define _op_copy_rel_pt_pas_dp_neon _op_copy_rel_pt_p_dp_neon #define _op_copy_rel_pt_p_dpan_neon _op_copy_pt_p_dpan_neon #define _op_copy_rel_pt_pan_dpan_neon _op_copy_pt_pan_dpan_neon #define _op_copy_rel_pt_pas_dpan_neon _op_copy_pt_pas_dpan_neon static void init_copy_rel_pixel_pt_funcs_neon(void) { op_copy_rel_pt_funcs[SP][SM_N][SC_N][DP][CPU_NEON] = _op_copy_rel_pt_p_dp_neon; op_copy_rel_pt_funcs[SP_AN][SM_N][SC_N][DP][CPU_NEON] = _op_copy_rel_pt_pan_dp_neon; op_copy_rel_pt_funcs[SP_AS][SM_N][SC_N][DP][CPU_NEON] = _op_copy_rel_pt_pas_dp_neon; op_copy_rel_pt_funcs[SP][SM_N][SC_N][DP_AN][CPU_NEON] = _op_copy_rel_pt_p_dpan_neon; op_copy_rel_pt_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_NEON] = _op_copy_rel_pt_pan_dpan_neon; op_copy_rel_pt_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_NEON] = _op_copy_rel_pt_pas_dpan_neon; } #endif evas-1.7.9/src/lib/engines/common/evas_convert_gry_8.c0000664000175000017500000000464212175475547017667 00000000000000#include "evas_common.h" #include "evas_convert_gry_8.h" #ifdef USE_DITHER_44 extern const DATA8 _evas_dither_44[4][4]; #endif #ifdef USE_DITHER_128128 extern const DATA8 _evas_dither_128128[128][128]; #endif #ifdef BUILD_CONVERT_8_GRY_1 void evas_common_convert_rgba_to_8bpp_gry_256_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x __UNUSED__, int dith_y __UNUSED__, DATA8 *pal __UNUSED__) { DATA32 *src_ptr; DATA8 *dst_ptr; int x, y; DATA8 r, g, b; DATA32 gry8; dst_ptr = (DATA8 *)dst; CONVERT_LOOP_START_ROT_0(); r = (R_VAL(src_ptr)); g = (G_VAL(src_ptr)); b = (B_VAL(src_ptr)); // Y = 0.299 * R + 0.587 * G + 0.114 * B; gry8 = ((r * 19595) + (g * 38469) + (b * 7471)) >> 16; *dst_ptr = gry8; CONVERT_LOOP_END_ROT_0(); } #endif #ifdef BUILD_CONVERT_8_GRY_4 void evas_common_convert_rgba_to_8bpp_gry_64_dith (DATA32 *src __UNUSED__, DATA8 *dst __UNUSED__, int src_jump __UNUSED__, int dst_jump __UNUSED__, int w __UNUSED__, int h __UNUSED__, int dith_x __UNUSED__, int dith_y __UNUSED__, DATA8 *pal __UNUSED__){} #endif #ifdef BUILD_CONVERT_8_GRY_16 void evas_common_convert_rgba_to_8bpp_gry_16_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal __UNUSED__) { DATA32 *src_ptr; DATA8 *dst_ptr; int x, y; DATA8 r, g, b; DATA32 gry8; DATA8 dith; dst_ptr = (DATA8 *)dst; CONVERT_LOOP_START_ROT_0(); dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(4); r = (R_VAL(src_ptr)); g = (G_VAL(src_ptr)); b = (B_VAL(src_ptr)); // Y = 0.299 * R + 0.587 * G + 0.114 * B; gry8 = ((r * 19595) + (g * 38469) + (b * 7471)) >> 16; if (((gry8 - gry8 * 255 / 4) >= dith) && (gry8 < 0x07)) gry8++; *dst_ptr = gry8; CONVERT_LOOP_END_ROT_0(); } #endif #ifdef BUILD_CONVERT_8_GRY_64 void evas_common_convert_rgba_to_8bpp_gry_4_dith (DATA32 *src __UNUSED__, DATA8 *dst __UNUSED__, int src_jump __UNUSED__, int dst_jump __UNUSED__, int w __UNUSED__, int h __UNUSED__, int dith_x __UNUSED__, int dith_y __UNUSED__, DATA8 *pal __UNUSED__){} #endif #ifdef BUILD_CONVERT_8_GRY_256 void evas_common_convert_rgba_to_8bpp_gry_1_dith (DATA32 *src __UNUSED__, DATA8 *dst __UNUSED__, int src_jump __UNUSED__, int dst_jump __UNUSED__, int w __UNUSED__, int h __UNUSED__, int dith_x __UNUSED__, int dith_y __UNUSED__, DATA8 *pal __UNUSED__){} #endif evas-1.7.9/src/lib/engines/common/evas_convert_rgb_8.c0000664000175000017500000002071412175475547017636 00000000000000#include "evas_common.h" #include "evas_convert_rgb_8.h" #ifdef USE_DITHER_44 extern const DATA8 _evas_dither_44[4][4]; #endif #ifdef USE_DITHER_128128 extern const DATA8 _evas_dither_128128[128][128]; #endif #ifdef BUILD_CONVERT_8_RGB_332 void evas_common_convert_rgba_to_8bpp_rgb_332_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal) { DATA32 *src_ptr; DATA8 *dst_ptr; int x, y; DATA8 r, g, b; DATA8 dith, dith2; dst_ptr = (DATA8 *)dst; CONVERT_LOOP_START_ROT_0(); dith = DM_SHR(DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK], 3); dith2 = DM_SHR(DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK], 2); /* r = (R_VAL(src_ptr)) >> (8 - 3);*/ /* g = (G_VAL(src_ptr)) >> (8 - 3);*/ /* b = (B_VAL(src_ptr)) >> (8 - 2);*/ /* if (((R_VAL(src_ptr) - (r << (8 - 3))) >= dith ) && (r < 0x07)) r++;*/ /* if (((G_VAL(src_ptr) - (g << (8 - 3))) >= dith ) && (g < 0x07)) g++;*/ /* if (((B_VAL(src_ptr) - (b << (8 - 2))) >= dith2) && (b < 0x03)) b++;*/ r = (R_VAL(src_ptr)) * 7 / 255; if (((R_VAL(src_ptr) - (r * 255 / 7)) >= dith ) && (r < 0x07)) r++; g = (G_VAL(src_ptr)) * 7 / 255; if (((G_VAL(src_ptr) - (g * 255 / 7)) >= dith ) && (g < 0x07)) g++; b = (B_VAL(src_ptr)) * 3 / 255; if (((B_VAL(src_ptr) - (b * 255 / 3)) >= dith2) && (b < 0x03)) b++; *dst_ptr = pal[(r << 5) | (g << 2) | (b)]; CONVERT_LOOP_END_ROT_0(); } #endif #ifdef BUILD_CONVERT_8_RGB_666 static DATA8 p_to_6[256]; static DATA8 p_to_6_err[256]; void evas_common_convert_rgba_to_8bpp_rgb_666_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal) { DATA32 *src_ptr; DATA8 *dst_ptr; int x, y; DATA8 r, g, b; DATA8 dith; static int tables_calcualted = 0; if (!tables_calcualted) { int i; tables_calcualted = 1; for (i = 0; i < 256; i++) p_to_6[i] = (i * 5) / 255; for (i = 0; i < 256; i++) p_to_6_err[i] = ((i * 5) - (p_to_6[i] * 255)) * DM_DIV / 255; } dst_ptr = (DATA8 *)dst; CONVERT_LOOP_START_ROT_0(); r = p_to_6[(R_VAL(src_ptr))]; g = p_to_6[(G_VAL(src_ptr))]; b = p_to_6[(B_VAL(src_ptr))]; dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK]; if ((p_to_6_err[(R_VAL(src_ptr))] >= dith ) && (r < 5)) r++; if ((p_to_6_err[(G_VAL(src_ptr))] >= dith ) && (g < 5)) g++; if ((p_to_6_err[(B_VAL(src_ptr))] >= dith ) && (b < 5)) b++; *dst_ptr = pal[(r * 36) + (g * 6) + (b)]; CONVERT_LOOP_END_ROT_0(); } #endif #ifdef BUILD_CONVERT_8_RGB_232 void evas_common_convert_rgba_to_8bpp_rgb_232_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal) { DATA32 *src_ptr; DATA8 *dst_ptr; int x, y; DATA8 r, g, b; DATA8 dith, dith2; dst_ptr = (DATA8 *)dst; CONVERT_LOOP_START_ROT_0(); dith = DM_SHR(DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK], 3); dith2 = DM_SHR(DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK], 2); /* r = (R_VAL(src_ptr)) >> (8 - 2);*/ /* g = (G_VAL(src_ptr)) >> (8 - 3);*/ /* b = (B_VAL(src_ptr)) >> (8 - 2);*/ /* if (((R_VAL(src_ptr) - (r << (8 - 2))) >= dith2) && (r < 0x03)) r++;*/ /* if (((G_VAL(src_ptr) - (g << (8 - 3))) >= dith ) && (g < 0x07)) g++;*/ /* if (((B_VAL(src_ptr) - (b << (8 - 2))) >= dith2) && (b < 0x03)) b++;*/ r = (R_VAL(src_ptr)) * 3 / 255; if (((R_VAL(src_ptr) - (r * 255 / 3)) >= dith2) && (r < 0x03)) r++; g = (G_VAL(src_ptr)) * 7 / 255; if (((G_VAL(src_ptr) - (g * 255 / 7)) >= dith ) && (g < 0x07)) g++; b = (B_VAL(src_ptr)) * 3 / 255; if (((B_VAL(src_ptr) - (b * 255 / 3)) >= dith2) && (b < 0x03)) b++; *dst_ptr = pal[(r << 5) | (g << 2) | (b)]; CONVERT_LOOP_END_ROT_0(); } #endif #ifdef BUILD_CONVERT_8_RGB_222 void evas_common_convert_rgba_to_8bpp_rgb_222_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal) { DATA32 *src_ptr; DATA8 *dst_ptr; int x, y; DATA8 r, g, b; DATA8 dith; dst_ptr = (DATA8 *)dst; CONVERT_LOOP_START_ROT_0(); dith = DM_SHR(DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK], 2); /* r = (R_VAL(src_ptr)) >> (8 - 2);*/ /* g = (G_VAL(src_ptr)) >> (8 - 2);*/ /* b = (B_VAL(src_ptr)) >> (8 - 2);*/ /* if (((R_VAL(src_ptr) - (r << (8 - 2))) >= dith ) && (r < 0x03)) r++;*/ /* if (((G_VAL(src_ptr) - (g << (8 - 2))) >= dith ) && (g < 0x03)) g++;*/ /* if (((B_VAL(src_ptr) - (b << (8 - 2))) >= dith ) && (b < 0x03)) b++;*/ r = (R_VAL(src_ptr)) * 3 / 255; if (((R_VAL(src_ptr) - (r * 255 / 3)) >= dith ) && (r < 0x03)) r++; g = (G_VAL(src_ptr)) * 3 / 255; if (((G_VAL(src_ptr) - (g * 255 / 3)) >= dith ) && (g < 0x03)) g++; b = (B_VAL(src_ptr)) * 3 / 255; if (((B_VAL(src_ptr) - (b * 255 / 3)) >= dith ) && (b < 0x03)) b++; *dst_ptr = pal[(r << 4) | (g << 2) | (b)]; CONVERT_LOOP_END_ROT_0(); } #endif #ifdef BUILD_CONVERT_8_RGB_221 void evas_common_convert_rgba_to_8bpp_rgb_221_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal) { DATA32 *src_ptr; DATA8 *dst_ptr; int x, y; DATA8 r, g, b; DATA8 dith, dith2; dst_ptr = (DATA8 *)dst; CONVERT_LOOP_START_ROT_0(); dith = DM_SHR(DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK], 2); dith2 = DM_SHR(DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK], 1); /* r = (R_VAL(src_ptr)) >> (8 - 2);*/ /* g = (G_VAL(src_ptr)) >> (8 - 2);*/ /* b = (B_VAL(src_ptr)) >> (8 - 1);*/ /* if (((R_VAL(src_ptr) - (r << (8 - 2))) >= dith ) && (r < 0x03)) r++;*/ /* if (((G_VAL(src_ptr) - (g << (8 - 2))) >= dith ) && (g < 0x03)) g++;*/ /* if (((B_VAL(src_ptr) - (b << (8 - 1))) >= dith2) && (b < 0x01)) b++;*/ r = (R_VAL(src_ptr)) * 3 / 255; if (((R_VAL(src_ptr) - (r * 255 / 3)) >= dith ) && (r < 0x03)) r++; g = (G_VAL(src_ptr)) * 3 / 255; if (((G_VAL(src_ptr) - (g * 255 / 3)) >= dith ) && (g < 0x03)) g++; b = (B_VAL(src_ptr)) * 1 / 255; if (((B_VAL(src_ptr) - (b * 255 / 1)) >= dith2) && (b < 0x01)) b++; *dst_ptr = pal[(r << 3) | (g << 1) | (b)]; CONVERT_LOOP_END_ROT_0(); } #endif #ifdef BUILD_CONVERT_8_RGB_121 void evas_common_convert_rgba_to_8bpp_rgb_121_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal) { DATA32 *src_ptr; DATA8 *dst_ptr; int x, y; DATA8 r, g, b; DATA8 dith, dith2; dst_ptr = (DATA8 *)dst; CONVERT_LOOP_START_ROT_0(); dith = DM_SHR(DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK], 2); dith2 = DM_SHR(DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK], 1); /* r = (R_VAL(src_ptr)) >> (8 - 1);*/ /* g = (G_VAL(src_ptr)) >> (8 - 2);*/ /* b = (B_VAL(src_ptr)) >> (8 - 1);*/ /* if (((R_VAL(src_ptr) - (r << (8 - 1))) >= dith2) && (r < 0x01)) r++;*/ /* if (((G_VAL(src_ptr) - (g << (8 - 2))) >= dith ) && (g < 0x03)) g++;*/ /* if (((B_VAL(src_ptr) - (b << (8 - 1))) >= dith2) && (b < 0x01)) b++;*/ r = (R_VAL(src_ptr)) * 1 / 255; if (((R_VAL(src_ptr) - (r * 255 / 1)) >= dith2) && (r < 0x01)) r++; g = (G_VAL(src_ptr)) * 3 / 255; if (((G_VAL(src_ptr) - (g * 255 / 3)) >= dith ) && (g < 0x03)) g++; b = (B_VAL(src_ptr)) * 1 / 255; if (((B_VAL(src_ptr) - (b * 255 / 1)) >= dith2) && (b < 0x01)) b++; *dst_ptr = pal[(r << 3) | (g << 1) | (b)]; CONVERT_LOOP_END_ROT_0(); } #endif #ifdef BUILD_CONVERT_8_RGB_111 void evas_common_convert_rgba_to_8bpp_rgb_111_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal) { DATA32 *src_ptr; DATA8 *dst_ptr; int x, y; DATA8 r, g, b; DATA8 dith; dst_ptr = (DATA8 *)dst; CONVERT_LOOP_START_ROT_0(); dith = DM_SHR(DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK], 1); /* r = (R_VAL(src_ptr)) >> (8 - 1);*/ /* g = (G_VAL(src_ptr)) >> (8 - 1);*/ /* b = (B_VAL(src_ptr)) >> (8 - 1);*/ /* if (((R_VAL(src_ptr) - (r << (8 - 1))) >= dith ) && (r < 0x01)) r++;*/ /* if (((G_VAL(src_ptr) - (g << (8 - 1))) >= dith ) && (g < 0x01)) g++;*/ /* if (((B_VAL(src_ptr) - (b << (8 - 1))) >= dith ) && (b < 0x01)) b++;*/ r = (R_VAL(src_ptr)) * 1 / 255; if (((R_VAL(src_ptr) - (r * 255 / 1)) >= dith ) && (r < 0x01)) r++; g = (G_VAL(src_ptr)) * 1 / 255; if (((G_VAL(src_ptr) - (g * 255 / 1)) >= dith ) && (g < 0x01)) g++; b = (B_VAL(src_ptr)) * 1 / 255; if (((B_VAL(src_ptr) - (b * 255 / 1)) >= dith ) && (b < 0x01)) b++; *dst_ptr = pal[(r << 2) | (g << 1) | (b)]; CONVERT_LOOP_END_ROT_0(); } #endif evas-1.7.9/src/lib/engines/common/evas_regionbuf.c0000664000175000017500000002061012175475547017050 00000000000000#include "evas_common.h" #if 0 Regionbuf * evas_common_regionbuf_new(int w, int h) { Regionbuf *rb; rb = calloc(1, sizeof(Regionbuf) + (h * sizeof(Regionspan))); if (!rb) return NULL; rb->spans = (Regionspan **)(rb + sizeof(Regionbuf)); rb->w = w; rb->h = h; return rb; } void evas_common_regionbuf_free(Regionbuf *rb) { evas_common_regionbuf_clear(rb); free(rb); } void evas_common_regionbuf_clear(Regionbuf *rb) { int y; for (y = 0; y < rb->h; y++) { while (rb->spans[y]) { Regionspan *span; span = rb->spans[y]; rb->spans[y] = eina_inlist_remove(rb->spans[y], rb->spans[y]); free(span); } } } void evas_common_regionbuf_span_add(Regionbuf *rb, int x1, int x2, int y) { Regionspan *span, *span2, *nspan, *sp_start, *sp_stop; /* abort if outside */ if ((y < 0) || (y >= rb->h) || (x2 < 0) || (x1 >= rb->w)) return; /* clip to horiz bounds */ if (x1 < 0) x1 = 0; if (x2 < (rb->w - 1)) x2 = rb->w - 1; sp_start = NULL; sp_stop = NULL; EINA_INLIST_FOREACH(rb->spans[y], span) { nspan = (Regionspan *)(EINA_INLIST_GET(span))->next; /* we dont know what t do with the span yet */ if (!sp_start) { /* if new span starts before or on this span or just after * with no gap */ if (x1 <= (span->x2 + 1)) sp_start = span; /* if there is no next span */ if (!nspan) { sp_stop = span; break; } /* if new span ends before the next span starts with a gap of * 1 pixel (or more) */ else if (x2 < (nspan->x1 - 1)) { sp_stop = span; break; } } /* we already know it already starts before or in sp_start */ else { /* there is no span after this one, so this has to be the stop */ if (!nspan) { sp_stop = span; break; } /* if new span ends before the next span starts with a gap of * 1 pixel (or more) */ else if (x2 < (nspan->x1 - 1)) { sp_stop = span; break; } } } /* sp_start is where the new span starts in or before */ /* sp_stop is where the new span stops in or after */ if ((sp_start) && (sp_stop)) { /* same start and stop */ if (sp_start == sp_stop) { if (x2 < (sp_start->x1 - 1)) { span2 = calloc(1, sizeof(Regionspan)); span2->x1 = x1; span2->x2 = x2; rb->spans[y] = eina_inlist_prepend_relative(rb->spans[y], span2, sp_start); return; } if (x1 < sp_start->x1) sp_start->x1 = x1; if (x2 > sp_start->x2) sp_start->x2 = x2; return; } else { Eina_Inlist *l; /* remove all nodes after sp_start and before_sp_stop because * the new */ for (l = (EINA_INLIST_GET(sp_start))->next; l != EINA_INLIST_GET(sp_stop);) { span = (Regionspan *)l; l = l->next; rb->spans[y] = eina_inlist_remove(rb->spans[y], span); free(span); } /* remove the end span */ rb->spans[y] = eina_inlist_remove(rb->spans[y], sp_stop); /* if the new span is before the start span - extend */ if (x1 < sp_start->x1) sp_start->x1 = x1; /* if it goes beyond the stop span - extend stop span */ if (x2 > sp_stop->x2) sp_stop->x2 = x2; /* extend start span to stop span */ sp_start->x2 = sp_stop->x2; /* don't need stop span anymore */ free(sp_stop); return; } } /* no start AND stop... just append */ span2 = calloc(1, sizeof(Regionspan)); span2->x1 = x1; span2->x2 = x2; rb->spans[y] = eina_inlist_append(rb->spans[y], span2); } void evas_common_regionbuf_span_del(Regionbuf *rb, int x1, int x2, int y) { /* FIXME: del span */ Regionspan *span, *span2, *nspan, *sp_start, *sp_stop; /* abort if outside */ if ((y < 0) || (y >= rb->h) || (x2 < 0) || (x1 >= rb->w)) return; /* clip to horiz bounds */ if (x1 < 0) x1 = 0; if (x2 < (rb->w - 1)) x2 = rb->w - 1; sp_start = NULL; sp_stop = NULL; EINA_INLIST_FOREACH(rb->spans[y], span) { nspan = (Regionspan *)(EINA_INLIST_GET(l))->next; /* we dont know what t do with the span yet */ if (!sp_start) { /* if new span starts before or on this span or just after * with no gap */ if (x1 <= (span->x2)) sp_start = span; /* if there is no next span */ if (!nspan) { sp_stop = span; break; } /* if new span ends before the next span starts with a gap of * 1 pixel (or more) */ else if (x2 < nspan->x1) { sp_stop = span; break; } } /* we already know it already starts before or in sp_start */ else { /* there is no span after this one, so this has to be the stop */ if (!nspan) { sp_stop = span; break; } /* if new span ends before the next span starts with a gap of * 1 pixel (or more) */ else if (x2 < nspan->x1) { sp_stop = span; break; } } } /* sp_start is where the new span starts in or before */ /* sp_stop is where the new span stops in or after */ if ((sp_start) && (sp_stop)) { /* same start and stop */ if (sp_start == sp_stop) { /* if it ends before this the span start starts... return */ if (x2 < sp_start->x1) return; /* it starts on or before this span */ else if (x1 <= sp_start->x1) { /* right edge is within the span */ if (x2 < sp_start->x2) { sp_start->x2 = x2; return; } else { rb->spans[y] = eina_inlist_remove(rb->spans[y], sp_start); return; } } /* it ends on or after the end of this span */ else if (x2 >= sp_start->x2) { /* it starts after the start */ if (x1 > sp_start->x1) { sp_start->x1 = x1; return; } /* remove it all */ else { rb->spans[y] = eina_inlist_remove(rb->spans[y], sp_start); return; } return; } /* this breaks the span into 2 */ else { span2 = calloc(1, sizeof(Regionspan)); span2->x1 = sp_start->x1; span2->x2 = x1 - 1; rb->spans[y] = eina_inlist_prepend_relative(rb->spans[y], span2, sp_start); sp_start->x1 = x2 + 1; return; } } else { Eina_Inlist *l; /* remove all nodes after sp_start and before_sp_stop because * the new */ for (l = (EINA_INLIST_GET(sp_start))->next; l != EINA_INLIST_GET(sp_stop);) { span = (Regionspan *)l; l = l->next; rb->spans[y] = eina_inlist_remove(rb->spans[y], span); free(span); } /* all of the start span is cut out */ if (x1 <= sp_start->x1) { rb->spans[y] = eina_inlist_remove(rb->spans[y], sp_start); free(sp_start); } /* chup it off at the new span start */ else sp_start->x2 = x1 - 1; /* all of the end span is cut out */ if (x2 >= sp_stop->x2) { rb->spans[y] = eina_inlist_remove(rb->spans[y], sp_stop); free(sp_stop); } /* chop it up at the end */ else sp_stop->x1 = x2 + 1; return; } } } Tilebuf_Rect * evas_common_regionbuf_rects_get(Regionbuf *rb) { Tilebuf_Rect *rects = NULL, *r; int y; /* FIXME: take spans, make rects */ for (y = 0; y < rb->h; y++) { Regionspan *sp_start; Eina_Inlist *l, *ll; for (l = EINA_INLIST_GET(rb->spans[y]); l;) { Regionspan *span; int yy; sp_start = (Regionspan *)l; l = l->next; rb->spans[y] = eina_inlist_remove(rb->spans[y], sp_start); for (yy = y + 1; yy < rb->h; yy++) { int match = 0; for (ll = EINA_INLIST_GET(rb->spans[yy]); ll;) { span = (Regionspan *)ll; ll = ll->next; if (span->x1 == sp_start->x1) { if ((span->x1 != sp_start->x1) || (span->x2 != sp_start->x2)) { goto coallate; } match = 1; rb->spans[yy] = eina_inlist_remove(rb->spans[yy], span); free(span); } } if (!match) goto coallate; } coallate: r = calloc(1, sizeof(Tilebuf_Rect)); r->x = sp_start->x1; r->y = y; r->w = sp_start->x2 - sp_start->x1 + 1; r->h = yy - y; rects = eina_inlist_append(rects, r); free(sp_start); } } evas_common_regionbuf_clear(rb); return rects; } #endif evas-1.7.9/src/lib/engines/common/evas_convert_gry_1.c0000664000175000017500000000037712175475547017661 00000000000000#include "evas_common.h" #include "evas_convert_gry_1.h" #ifdef BUILD_CONVERT_1_GRY_1 void evas_common_convert_rgba_to_1bpp_gry_1_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal){} #endif evas-1.7.9/src/lib/engines/common/evas_image_private.h0000664000175000017500000000162612175475547017717 00000000000000#ifndef _EVAS_IMAGE_PRIVATE_H #define _EVAS_IMAGE_PRIVATE_H int evas_common_rgba_image_size_set (Image_Entry* dst, const Image_Entry* im, unsigned int w, unsigned int h); int evas_common_rgba_image_from_copied_data (Image_Entry* dst, unsigned int w, unsigned int h, DATA32 *image_data, int alpha, int cspace); int evas_common_rgba_image_from_data (Image_Entry* dst, unsigned int w, unsigned int h, DATA32 *image_data, int alpha, int cspace); int evas_common_rgba_image_colorspace_set (Image_Entry* dst, int cspace); void evas_common_scalecache_init(void); void evas_common_scalecache_shutdown(void); void evas_common_rgba_image_scalecache_dirty(Image_Entry *ie); void evas_common_rgba_image_scalecache_orig_use(Image_Entry *ie); int evas_common_rgba_image_scalecache_usage_get(Image_Entry *ie); #endif /* _EVAS_IMAGE_PRIVATE_H */ evas-1.7.9/src/lib/engines/common/evas_convert_colorspace.h0000664000175000017500000000137712175475547021000 00000000000000#ifndef _EVAS_CONVERT_COLORSPACE_H #define _EVAS_CONVERT_COLORSPACE_H EAPI void *evas_common_convert_argb8888_to (void *data, int w, int h, int stride, Eina_Bool has_alpha, Evas_Colorspace cspace); EAPI void *evas_common_convert_rgb565_a5p_to (void *data, int w, int h, int stride, Eina_Bool has_alpha, Evas_Colorspace cspace); EAPI void *evas_common_convert_yuv_422P_601_to(void *data, int w, int h, Evas_Colorspace cspace); EAPI void *evas_common_convert_yuv_422_601_to (void *data, int w, int h, Evas_Colorspace cspace); EAPI void *evas_common_convert_yuv_420_601_to (void *data, int w, int h, Evas_Colorspace cspace); EAPI void *evas_common_convert_yuv_420T_601_to(void *data, int w, int h, Evas_Colorspace cspace); #endif /* _EVAS_CONVERT_COLORSPACE_H */ evas-1.7.9/src/lib/engines/common/evas_font_main.c0000664000175000017500000004577312175475547017063 00000000000000#include "evas_common.h" #include "evas_private.h" #include "evas_font_private.h" #ifdef EVAS_CSERVE2 # include "../../cserve2/evas_cs2_private.h" #endif #include #include FT_OUTLINE_H #include FT_SYNTHESIS_H FT_Library evas_ft_lib = 0; static int initialised = 0; LK(lock_font_draw); // for freetype2 API calls LK(lock_bidi); // for evas bidi internal usage. LK(lock_ot); // for evas bidi internal usage. EAPI void evas_common_font_init(void) { int error; const char *s; initialised++; if (initialised != 1) return; error = FT_Init_FreeType(&evas_ft_lib); if (error) return; evas_common_font_load_init(); evas_common_font_draw_init(); s = getenv("EVAS_FONT_DPI"); if (s) { int dpi = atoi(s); if (dpi > 0) evas_common_font_dpi_set(dpi); } LKI(lock_font_draw); LKI(lock_bidi); LKI(lock_ot); } EAPI void evas_common_font_shutdown(void) { if (initialised < 1) return; initialised--; if (initialised != 0) return; evas_common_font_load_shutdown(); evas_common_font_cache_set(0); evas_common_font_flush(); FT_Done_FreeType(evas_ft_lib); evas_ft_lib = 0; LKD(lock_font_draw); LKD(lock_bidi); LKD(lock_ot); } EAPI void evas_common_font_font_all_unload(void) { evas_common_font_all_clear(); } EAPI int evas_common_font_instance_ascent_get(RGBA_Font_Int *fi) { int val; evas_common_font_int_reload(fi); if (fi->src->current_size != fi->size) { FTLOCK(); FT_Activate_Size(fi->ft.size); FTUNLOCK(); fi->src->current_size = fi->size; } if (!FT_IS_SCALABLE(fi->src->ft.face)) { WRN("NOT SCALABLE!"); } val = (int)fi->src->ft.face->size->metrics.ascender; return FONT_METRIC_ROUNDUP(val); // printf("%i | %i\n", val, val >> 6); // if (fi->src->ft.face->units_per_EM == 0) // return val; // dv = (fi->src->ft.orig_upem * 2048) / fi->src->ft.face->units_per_EM; // ret = (val * fi->src->ft.face->size->metrics.y_scale) / (dv * dv); // return ret; } EAPI int evas_common_font_instance_descent_get(RGBA_Font_Int *fi) { int val; evas_common_font_int_reload(fi); if (fi->src->current_size != fi->size) { FTLOCK(); FT_Activate_Size(fi->ft.size); FTUNLOCK(); fi->src->current_size = fi->size; } val = -(int)fi->src->ft.face->size->metrics.descender; return FONT_METRIC_ROUNDUP(val); // if (fi->src->ft.face->units_per_EM == 0) // return val; // dv = (fi->src->ft.orig_upem * 2048) / fi->src->ft.face->units_per_EM; // ret = (val * fi->src->ft.face->size->metrics.y_scale) / (dv * dv); // return ret; } EAPI int evas_common_font_instance_max_ascent_get(RGBA_Font_Int *fi) { int val, dv; int ret; evas_common_font_int_reload(fi); if (fi->src->current_size != fi->size) { FTLOCK(); FT_Activate_Size(fi->ft.size); FTUNLOCK(); fi->src->current_size = fi->size; } if ((fi->src->ft.face->bbox.yMax == 0) && (fi->src->ft.face->bbox.yMin == 0) && (fi->src->ft.face->units_per_EM == 0)) val = FONT_METRIC_ROUNDUP((int)fi->src->ft.face->size->metrics.ascender); else val = (int)fi->src->ft.face->bbox.yMax; if (fi->src->ft.face->units_per_EM == 0) return val; dv = (fi->src->ft.orig_upem * 2048) / fi->src->ft.face->units_per_EM; ret = FONT_METRIC_CONV(val, dv, fi->src->ft.face->size->metrics.y_scale); return ret; } EAPI int evas_common_font_instance_max_descent_get(RGBA_Font_Int *fi) { int val, dv; int ret; evas_common_font_int_reload(fi); if (fi->src->current_size != fi->size) { FTLOCK(); FT_Activate_Size(fi->ft.size); FTUNLOCK(); fi->src->current_size = fi->size; } if ((fi->src->ft.face->bbox.yMax == 0) && (fi->src->ft.face->bbox.yMin == 0) && (fi->src->ft.face->units_per_EM == 0)) val = FONT_METRIC_ROUNDUP(-(int)fi->src->ft.face->size->metrics.descender); else val = -(int)fi->src->ft.face->bbox.yMin; if (fi->src->ft.face->units_per_EM == 0) return val; dv = (fi->src->ft.orig_upem * 2048) / fi->src->ft.face->units_per_EM; ret = FONT_METRIC_CONV(val, dv, fi->src->ft.face->size->metrics.y_scale); return ret; } EAPI int evas_common_font_ascent_get(RGBA_Font *fn) { // evas_common_font_size_use(fn); return evas_common_font_instance_ascent_get(fn->fonts->data); } EAPI int evas_common_font_descent_get(RGBA_Font *fn) { // evas_common_font_size_use(fn); return evas_common_font_instance_descent_get(fn->fonts->data); } EAPI int evas_common_font_max_ascent_get(RGBA_Font *fn) { // evas_common_font_size_use(fn); return evas_common_font_instance_max_ascent_get(fn->fonts->data); } EAPI int evas_common_font_max_descent_get(RGBA_Font *fn) { // evas_common_font_size_use(fn); return evas_common_font_instance_max_descent_get(fn->fonts->data); } EAPI int evas_common_font_get_line_advance(RGBA_Font *fn) { int val; RGBA_Font_Int *fi; // evas_common_font_size_use(fn); fi = fn->fonts->data; evas_common_font_int_reload(fi); if (fi->src->current_size != fi->size) { FTLOCK(); FT_Activate_Size(fi->ft.size); FTUNLOCK(); fi->src->current_size = fi->size; } val = (int)fi->src->ft.face->size->metrics.height; if ((fi->src->ft.face->bbox.yMax == 0) && (fi->src->ft.face->bbox.yMin == 0) && (fi->src->ft.face->units_per_EM == 0)) return FONT_METRIC_ROUNDUP(val); else if (fi->src->ft.face->units_per_EM == 0) return val; return FONT_METRIC_ROUNDUP(val); // dv = (fi->src->ft.orig_upem * 2048) / fi->src->ft.face->units_per_EM; // ret = (val * fi->src->ft.face->size->metrics.y_scale) / (dv * dv); // return ret; } /* Set of common functions that are used in a couple of places. */ static void _fash_int2_free(Fash_Int_Map2 *fash) { int i; for (i = 0; i < 256; i++) if (fash->bucket[i]) free(fash->bucket[i]); free(fash); } static void _fash_int_free(Fash_Int *fash) { int i; for (i = 0; i < 256; i++) if (fash->bucket[i]) _fash_int2_free(fash->bucket[i]); free(fash); } static Fash_Int * _fash_int_new(void) { Fash_Int *fash = calloc(1, sizeof(Fash_Int)); fash->freeme = _fash_int_free; return fash; } static Fash_Item_Index_Map * _fash_int_find(Fash_Int *fash, int item) { int grp, maj, min; // 24bits for unicode - v6 up to E01EF (chrs) & 10FFFD for private use (plane 16) grp = (item >> 16) & 0xff; maj = (item >> 8) & 0xff; min = item & 0xff; if (!fash->bucket[grp]) return NULL; if (!fash->bucket[grp]->bucket[maj]) return NULL; return &(fash->bucket[grp]->bucket[maj]->item[min]); } static void _fash_int_add(Fash_Int *fash, int item, RGBA_Font_Int *fint, int idx) { int grp, maj, min; // 24bits for unicode - v6 up to E01EF (chrs) & 10FFFD for private use (plane 16) grp = (item >> 16) & 0xff; maj = (item >> 8) & 0xff; min = item & 0xff; if (!fash->bucket[grp]) fash->bucket[grp] = calloc(1, sizeof(Fash_Int_Map2)); EINA_SAFETY_ON_NULL_RETURN(fash->bucket[grp]); if (!fash->bucket[grp]->bucket[maj]) fash->bucket[grp]->bucket[maj] = calloc(1, sizeof(Fash_Int_Map)); EINA_SAFETY_ON_NULL_RETURN(fash->bucket[grp]->bucket[maj]); fash->bucket[grp]->bucket[maj]->item[min].fint = fint; fash->bucket[grp]->bucket[maj]->item[min].index = idx; } static void _fash_glyph_free(Fash_Glyph_Map *fmap) { int i; for (i = 0; i <= 0xff; i++) { RGBA_Font_Glyph *fg = fmap->item[i]; if ((fg) && (fg != (void *)(-1))) { FT_Done_Glyph(fg->glyph); /* extension calls */ if (fg->ext_dat_free) fg->ext_dat_free(fg->ext_dat); if (fg->glyph_out_free) fg->glyph_out_free(fg->glyph_out); free(fg); fmap->item[i] = NULL; } } free(fmap); } static void _fash_gl2_free(Fash_Glyph_Map2 *fash) { int i; // 24bits for unicode - v6 up to E01EF (chrs) & 10FFFD for private use (plane 16) for (i = 0; i < 256; i++) if (fash->bucket[i]) _fash_glyph_free(fash->bucket[i]); free(fash); } static void _fash_gl_free(Fash_Glyph *fash) { int i; // 24bits for unicode - v6 up to E01EF (chrs) & 10FFFD for private use (plane 16) for (i = 0; i < 256; i++) if (fash->bucket[i]) _fash_gl2_free(fash->bucket[i]); free(fash); } static Fash_Glyph * _fash_gl_new(void) { Fash_Glyph *fash = calloc(1, sizeof(Fash_Glyph)); fash->freeme = _fash_gl_free; return fash; } static RGBA_Font_Glyph * _fash_gl_find(Fash_Glyph *fash, int item) { int grp, maj, min; // 24bits for unicode - v6 up to E01EF (chrs) & 10FFFD for private use (plane 16) grp = (item >> 16) & 0xff; maj = (item >> 8) & 0xff; min = item & 0xff; if (!fash->bucket[grp]) return NULL; if (!fash->bucket[grp]->bucket[maj]) return NULL; return fash->bucket[grp]->bucket[maj]->item[min]; } static void _fash_gl_add(Fash_Glyph *fash, int item, RGBA_Font_Glyph *glyph) { int grp, maj, min; // 24bits for unicode - v6 up to E01EF (chrs) & 10FFFD for private use (plane 16) grp = (item >> 16) & 0xff; maj = (item >> 8) & 0xff; min = item & 0xff; if (!fash->bucket[grp]) fash->bucket[grp] = calloc(1, sizeof(Fash_Glyph_Map2)); EINA_SAFETY_ON_NULL_RETURN(fash->bucket[grp]); if (!fash->bucket[grp]->bucket[maj]) fash->bucket[grp]->bucket[maj] = calloc(1, sizeof(Fash_Glyph_Map)); EINA_SAFETY_ON_NULL_RETURN(fash->bucket[grp]->bucket[maj]); fash->bucket[grp]->bucket[maj]->item[min] = glyph; } EAPI RGBA_Font_Glyph * evas_common_font_int_cache_glyph_get(RGBA_Font_Int *fi, FT_UInt idx) { RGBA_Font_Glyph *fg; FT_Error error; const FT_Int32 hintflags[3] = { FT_LOAD_NO_HINTING, FT_LOAD_FORCE_AUTOHINT, FT_LOAD_NO_AUTOHINT }; static FT_Matrix transform = {0x10000, _EVAS_FONT_SLANT_TAN * 0x10000, 0x00000, 0x10000}; evas_common_font_int_promote(fi); if (fi->fash) { fg = _fash_gl_find(fi->fash, idx); if (fg == (void *)(-1)) return NULL; else if (fg) { #ifdef EVAS_CSERVE2 if (fi->cs2_handler) evas_cserve2_font_glyph_used(fi->cs2_handler, idx, fi->hinting); #endif return fg; } } // fg = eina_hash_find(fi->glyphs, &hindex); // if (fg) return fg; evas_common_font_int_reload(fi); FTLOCK(); error = FT_Load_Glyph(fi->src->ft.face, idx, FT_LOAD_DEFAULT | FT_LOAD_NO_BITMAP | hintflags[fi->hinting]); FTUNLOCK(); if (error) { if (!fi->fash) fi->fash = _fash_gl_new(); if (fi->fash) _fash_gl_add(fi->fash, idx, (void *)(-1)); return NULL; } /* Transform the outline of Glyph according to runtime_rend. */ if (fi->runtime_rend & FONT_REND_SLANT) FT_Outline_Transform(&fi->src->ft.face->glyph->outline, &transform); /* Embolden the outline of Glyph according to rundtime_rend. */ if (fi->runtime_rend & FONT_REND_WEIGHT) FT_GlyphSlot_Embolden(fi->src->ft.face->glyph); fg = malloc(sizeof(struct _RGBA_Font_Glyph)); if (!fg) return NULL; memset(fg, 0, (sizeof(struct _RGBA_Font_Glyph))); FTLOCK(); error = FT_Get_Glyph(fi->src->ft.face->glyph, &(fg->glyph)); FTUNLOCK(); if (error) { free(fg); if (!fi->fash) fi->fash = _fash_gl_new(); if (fi->fash) _fash_gl_add(fi->fash, idx, (void *)(-1)); return NULL; } { FT_BBox outbox; FT_Glyph_Get_CBox(fg->glyph, ((fi->hinting == 0) ? FT_GLYPH_BBOX_UNSCALED : FT_GLYPH_BBOX_GRIDFIT), &outbox); fg->width = EVAS_FONT_ROUND_26_6_TO_INT(outbox.xMax - outbox.xMin); fg->x_bear = EVAS_FONT_ROUND_26_6_TO_INT(outbox.xMin); fg->y_bear = EVAS_FONT_ROUND_26_6_TO_INT(outbox.yMax); } fg->index = idx; fg->fi = fi; if (!fi->fash) fi->fash = _fash_gl_new(); if (fi->fash) _fash_gl_add(fi->fash, idx, fg); #ifdef EVAS_CSERVE2 if (fi->cs2_handler) evas_cserve2_font_glyph_request(fi->cs2_handler, idx, fi->hinting); #endif // eina_hash_direct_add(fi->glyphs, &fg->index, fg); return fg; } EAPI Eina_Bool evas_common_font_int_cache_glyph_render(RGBA_Font_Glyph *fg) { int size; FT_Error error; RGBA_Font_Int *fi = fg->fi; FT_BitmapGlyph fbg; #ifdef EVAS_CSERVE2 if (fi->cs2_handler) { fg->glyph_out = evas_cserve2_font_glyph_bitmap_get(fi->cs2_handler, fg->index, fg->fi->hinting); if (fg->glyph_out) return EINA_TRUE; } #endif /* no cserve2 case */ FTLOCK(); error = FT_Glyph_To_Bitmap(&(fg->glyph), FT_RENDER_MODE_NORMAL, 0, 1); if (error) { FT_Done_Glyph(fg->glyph); FTUNLOCK(); free(fg); if (!fi->fash) fi->fash = _fash_gl_new(); if (fi->fash) _fash_gl_add(fi->fash, fg->index, (void *)(-1)); return EINA_FALSE; } FTUNLOCK(); fbg = (FT_BitmapGlyph)fg->glyph; fg->glyph_out = malloc(sizeof(RGBA_Font_Glyph_Out)); fg->glyph_out->bitmap.rows = fbg->bitmap.rows; fg->glyph_out->bitmap.width = fbg->bitmap.width; fg->glyph_out->bitmap.pitch = fbg->bitmap.pitch; fg->glyph_out->bitmap.buffer = fbg->bitmap.buffer; fg->glyph_out->bitmap.num_grays = fbg->bitmap.num_grays; fg->glyph_out->bitmap.pixel_mode = fbg->bitmap.pixel_mode; fg->glyph_out_free = free; /* This '+ 200' is just an estimation of how much memory freetype will use * on it's size. This value is not really used anywhere in code - it's * only for statistics. */ size = sizeof(RGBA_Font_Glyph) + sizeof(Eina_List) + (fg->glyph_out->bitmap.width * fg->glyph_out->bitmap.rows) + 200; fi->usage += size; if (fi->inuse) evas_common_font_int_use_increase(size); return EINA_TRUE; } typedef struct _Font_Char_Index Font_Char_Index; struct _Font_Char_Index { FT_UInt index; Eina_Unicode gl; }; EAPI FT_UInt evas_common_get_char_index(RGBA_Font_Int* fi, Eina_Unicode gl) { static const unsigned short mapfix[] = { 0x00b0, 0x7, 0x00b1, 0x8, 0x00b7, 0x1f, 0x03c0, 0x1c, 0x20a4, 0xa3, 0x2260, 0x1d, 0x2264, 0x1a, 0x2265, 0x1b, 0x23ba, 0x10, 0x23bb, 0x11, 0x23bc, 0x13, 0x23bd, 0x14, 0x2409, 0x3, 0x240a, 0x6, 0x240b, 0xa, 0x240c, 0x4, 0x240d, 0x5, 0x2424, 0x9, 0x2500, 0x12, 0x2502, 0x19, 0x250c, 0xd, 0x2510, 0xc, 0x2514, 0xe, 0x2518, 0xb, 0x251c, 0x15, 0x2524, 0x16, 0x252c, 0x18, 0x2534, 0x17, 0x253c, 0xf, 0x2592, 0x2, 0x25c6, 0x1, }; Font_Char_Index result; //FT_UInt ret; #ifdef HAVE_PTHREAD /// pthread_mutex_lock(&fi->ft_mutex); #endif // result = eina_hash_find(fi->indexes, &gl); // if (result) goto on_correct; // // result = malloc(sizeof (Font_Char_Index)); // if (!result) // { //#ifdef HAVE_PTHREAD // pthread_mutex_unlock(&fi->ft_mutex); //#endif // return FT_Get_Char_Index(fi->src->ft.face, gl); // } evas_common_font_int_reload(fi); /* * There is no point in locking FreeType at this point as all caller * are running in the main loop at a time where there is zero chance * that something else try to use it. */ /* FTLOCK(); */ result.index = FT_Get_Char_Index(fi->src->ft.face, gl); /* FTUNLOCK(); */ result.gl = gl; // eina_hash_direct_add(fi->indexes, &result->gl, result); // // on_correct: #ifdef HAVE_PTHREAD // pthread_mutex_unlock(&fi->ft_mutex); #endif // this is a workaround freetype bugs where for a bitmap old style font // even if it has unicode information and mappings, they are not used // to find terminal line/drawing chars, so do this by hand with a table if ((result.index <= 0) && (fi->src->ft.face->num_fixed_sizes == 1) && (fi->src->ft.face->num_glyphs < 512)) { int i, min = 0, max; // binary search through sorted table of codepoints to new // codepoints with a guess that bitmap font is playing the old // game of putting line drawing chars in specific ranges max = sizeof(mapfix) / (sizeof(mapfix[0]) * 2); i = (min + max) / 2; for (;;) { unsigned short v; v = mapfix[i << 1]; if (gl == v) { gl = mapfix[(i << 1) + 1]; FTLOCK(); result.index = FT_Get_Char_Index(fi->src->ft.face, gl); FTUNLOCK(); break; } // failure to find at all if ((max - min) <= 2) break; // if glyph above out position... if (gl > v) { min = i; if ((max - min) == 1) i = max; else i = (min + max) / 2; } // if glyph below out position else if (gl < v) { max = i; if ((max - min) == 1) i = min; else i = (min + max) / 2; } } } return result.index; } EAPI int evas_common_font_glyph_search(RGBA_Font *fn, RGBA_Font_Int **fi_ret, Eina_Unicode gl) { Eina_List *l; if (fn->fash) { Fash_Item_Index_Map *fm = _fash_int_find(fn->fash, gl); if (fm) { if (fm->fint) { *fi_ret = fm->fint; return fm->index; } else if (fm->index == -1) return 0; } } for (l = fn->fonts; l; l = l->next) { RGBA_Font_Int *fi; int idx; fi = l->data; #if 0 /* FIXME: charmap user is disabled and use a deprecated data type. */ /* if (fi->src->charmap) // Charmap loaded, FI/FS blank { idx = evas_array_hash_search(fi->src->charmap, gl); if (idx != 0) { evas_common_font_source_load_complete(fi->src); evas_common_font_int_load_complete(fi); evas_array_hash_free(fi->src->charmap); fi->src->charmap = NULL; *fi_ret = fi; return idx; } } else */ #endif if (!fi->src->ft.face) /* Charmap not loaded, FI/FS blank */ { evas_common_font_int_reload(fi); } if (fi->src->ft.face) { idx = evas_common_get_char_index(fi, gl); if (idx != 0) { if (!fi->ft.size) evas_common_font_int_load_complete(fi); if (!fn->fash) fn->fash = _fash_int_new(); if (fn->fash) _fash_int_add(fn->fash, gl, fi, idx); *fi_ret = fi; return idx; } else { if (!fn->fash) fn->fash = _fash_int_new(); if (fn->fash) _fash_int_add(fn->fash, gl, NULL, -1); } } } *fi_ret = NULL; return 0; } evas-1.7.9/src/lib/engines/common/evas_convert_gry_1.h0000664000175000017500000000041412175475547017656 00000000000000#ifndef _EVAS_CONVERT_GRY_1_H #define _EVAS_CONVERT_GRY_1_H void evas_common_convert_rgba_to_1bpp_gry_1_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); #endif /* _EVAS_CONVERT_GRY_1_H */ evas-1.7.9/src/lib/engines/common/evas_scale_smooth_scaler_downx_downy.c0000664000175000017500000002004712175475547023544 00000000000000{ int Cx, Cy, i, j; DATA32 *dptr, *sptr, *pix, *pbuf; int a, r, g, b, rx, gx, bx, ax; int xap, yap, pos; //int dyy, dxx; DATA32 **yp; int *xp; int w = dst_clip_w; dptr = dst_ptr; pos = (src_region_y * src_w) + src_region_x; //dyy = dst_clip_y - dst_region_y; //dxx = dst_clip_x - dst_region_x; xp = xpoints;// + dxx; yp = ypoints;// + dyy; xapp = xapoints;// + dxx; yapp = yapoints;// + dyy; pbuf = buf; /*#ifndef SCALE_USING_MMX */ /* for now there's no mmx down scaling - so C only */ #if 1 if (src->cache_entry.flags.alpha) { while (dst_clip_h--) { Cy = *yapp >> 16; yap = *yapp & 0xffff; while (dst_clip_w--) { Cx = *xapp >> 16; xap = *xapp & 0xffff; sptr = *yp + *xp + pos; pix = sptr; sptr += src_w; ax = (A_VAL(pix) * xap) >> 9; rx = (R_VAL(pix) * xap) >> 9; gx = (G_VAL(pix) * xap) >> 9; bx = (B_VAL(pix) * xap) >> 9; pix++; for (i = (1 << 14) - xap; i > Cx; i -= Cx) { ax += (A_VAL(pix) * Cx) >> 9; rx += (R_VAL(pix) * Cx) >> 9; gx += (G_VAL(pix) * Cx) >> 9; bx += (B_VAL(pix) * Cx) >> 9; pix++; } if (i > 0) { ax += (A_VAL(pix) * i) >> 9; rx += (R_VAL(pix) * i) >> 9; gx += (G_VAL(pix) * i) >> 9; bx += (B_VAL(pix) * i) >> 9; } a = (ax * yap) >> 14; r = (rx * yap) >> 14; g = (gx * yap) >> 14; b = (bx * yap) >> 14; for (j = (1 << 14) - yap; j > Cy; j -= Cy) { pix = sptr; sptr += src_w; ax = (A_VAL(pix) * xap) >> 9; rx = (R_VAL(pix) * xap) >> 9; gx = (G_VAL(pix) * xap) >> 9; bx = (B_VAL(pix) * xap) >> 9; pix++; for (i = (1 << 14) - xap; i > Cx; i -= Cx) { ax += (A_VAL(pix) * Cx) >> 9; rx += (R_VAL(pix) * Cx) >> 9; gx += (G_VAL(pix) * Cx) >> 9; bx += (B_VAL(pix) * Cx) >> 9; pix++; } if (i > 0) { ax += (A_VAL(pix) * i) >> 9; rx += (R_VAL(pix) * i) >> 9; gx += (G_VAL(pix) * i) >> 9; bx += (B_VAL(pix) * i) >> 9; } a += (ax * Cy) >> 14; r += (rx * Cy) >> 14; g += (gx * Cy) >> 14; b += (bx * Cy) >> 14; } if (j > 0) { pix = sptr; sptr += src_w; ax = (A_VAL(pix) * xap) >> 9; rx = (R_VAL(pix) * xap) >> 9; gx = (G_VAL(pix) * xap) >> 9; bx = (B_VAL(pix) * xap) >> 9; pix++; for (i = (1 << 14) - xap; i > Cx; i -= Cx) { ax += (A_VAL(pix) * Cx) >> 9; rx += (R_VAL(pix) * Cx) >> 9; gx += (G_VAL(pix) * Cx) >> 9; bx += (B_VAL(pix) * Cx) >> 9; pix++; } if (i > 0) { ax += (A_VAL(pix) * i) >> 9; rx += (R_VAL(pix) * i) >> 9; gx += (G_VAL(pix) * i) >> 9; bx += (B_VAL(pix) * i) >> 9; } a += (ax * j) >> 14; r += (rx * j) >> 14; g += (gx * j) >> 14; b += (bx * j) >> 14; } *pbuf++ = ARGB_JOIN(((a + (1 << 4)) >> 5), ((r + (1 << 4)) >> 5), ((g + (1 << 4)) >> 5), ((b + (1 << 4)) >> 5)); xp++; xapp++; } func(buf, NULL, dc->mul.col, dptr, w); pbuf = buf; dptr += dst_w; dst_clip_w = w; xp = xpoints;// + dxx; xapp = xapoints;// + dxx; yp++; yapp++; } } else { #ifdef DIRECT_SCALE if ((!src->cache_entry.flags.alpha) && (!dst->cache_entry.flags.alpha) && (!dc->mul.use)) { while (dst_clip_h--) { Cy = *yapp >> 16; yap = *yapp & 0xffff; pbuf = dptr; while (dst_clip_w--) { Cx = *xapp >> 16; xap = *xapp & 0xffff; sptr = *yp + *xp + pos; pix = sptr; sptr += src_w; rx = (R_VAL(pix) * xap) >> 9; gx = (G_VAL(pix) * xap) >> 9; bx = (B_VAL(pix) * xap) >> 9; pix++; for (i = (1 << 14) - xap; i > Cx; i -= Cx) { rx += (R_VAL(pix) * Cx) >> 9; gx += (G_VAL(pix) * Cx) >> 9; bx += (B_VAL(pix) * Cx) >> 9; pix++; } if (i > 0) { rx += (R_VAL(pix) * i) >> 9; gx += (G_VAL(pix) * i) >> 9; bx += (B_VAL(pix) * i) >> 9; } r = (rx * yap) >> 14; g = (gx * yap) >> 14; b = (bx * yap) >> 14; for (j = (1 << 14) - yap; j > Cy; j -= Cy) { pix = sptr; sptr += src_w; rx = (R_VAL(pix) * xap) >> 9; gx = (G_VAL(pix) * xap) >> 9; bx = (B_VAL(pix) * xap) >> 9; pix++; for (i = (1 << 14) - xap; i > Cx; i -= Cx) { rx += (R_VAL(pix) * Cx) >> 9; gx += (G_VAL(pix) * Cx) >> 9; bx += (B_VAL(pix) * Cx) >> 9; pix++; } if (i > 0) { rx += (R_VAL(pix) * i) >> 9; gx += (G_VAL(pix) * i) >> 9; bx += (B_VAL(pix) * i) >> 9; } r += (rx * Cy) >> 14; g += (gx * Cy) >> 14; b += (bx * Cy) >> 14; } if (j > 0) { pix = sptr; sptr += src_w; rx = (R_VAL(pix) * xap) >> 9; gx = (G_VAL(pix) * xap) >> 9; bx = (B_VAL(pix) * xap) >> 9; pix++; for (i = (1 << 14) - xap; i > Cx; i -= Cx) { rx += (R_VAL(pix) * Cx) >> 9; gx += (G_VAL(pix) * Cx) >> 9; bx += (B_VAL(pix) * Cx) >> 9; pix++; } if (i > 0) { rx += (R_VAL(pix) * i) >> 9; gx += (G_VAL(pix) * i) >> 9; bx += (B_VAL(pix) * i) >> 9; } r += (rx * j) >> 14; g += (gx * j) >> 14; b += (bx * j) >> 14; } *pbuf++ = ARGB_JOIN(0xff, ((r + (1 << 4)) >> 5), ((g + (1 << 4)) >> 5), ((b + (1 << 4)) >> 5)); xp++; xapp++; } dptr += dst_w; dst_clip_w = w; xp = xpoints;// + dxx; xapp = xapoints;// + dxx; yp++; yapp++; } } else #endif { while (dst_clip_h--) { Cy = *yapp >> 16; yap = *yapp & 0xffff; while (dst_clip_w--) { Cx = *xapp >> 16; xap = *xapp & 0xffff; sptr = *yp + *xp + pos; pix = sptr; sptr += src_w; rx = (R_VAL(pix) * xap) >> 9; gx = (G_VAL(pix) * xap) >> 9; bx = (B_VAL(pix) * xap) >> 9; pix++; for (i = (1 << 14) - xap; i > Cx; i -= Cx) { rx += (R_VAL(pix) * Cx) >> 9; gx += (G_VAL(pix) * Cx) >> 9; bx += (B_VAL(pix) * Cx) >> 9; pix++; } if (i > 0) { rx += (R_VAL(pix) * i) >> 9; gx += (G_VAL(pix) * i) >> 9; bx += (B_VAL(pix) * i) >> 9; } r = (rx * yap) >> 14; g = (gx * yap) >> 14; b = (bx * yap) >> 14; for (j = (1 << 14) - yap; j > Cy; j -= Cy) { pix = sptr; sptr += src_w; rx = (R_VAL(pix) * xap) >> 9; gx = (G_VAL(pix) * xap) >> 9; bx = (B_VAL(pix) * xap) >> 9; pix++; for (i = (1 << 14) - xap; i > Cx; i -= Cx) { rx += (R_VAL(pix) * Cx) >> 9; gx += (G_VAL(pix) * Cx) >> 9; bx += (B_VAL(pix) * Cx) >> 9; pix++; } if (i > 0) { rx += (R_VAL(pix) * i) >> 9; gx += (G_VAL(pix) * i) >> 9; bx += (B_VAL(pix) * i) >> 9; } r += (rx * Cy) >> 14; g += (gx * Cy) >> 14; b += (bx * Cy) >> 14; } if (j > 0) { pix = sptr; sptr += src_w; rx = (R_VAL(pix) * xap) >> 9; gx = (G_VAL(pix) * xap) >> 9; bx = (B_VAL(pix) * xap) >> 9; pix++; for (i = (1 << 14) - xap; i > Cx; i -= Cx) { rx += (R_VAL(pix) * Cx) >> 9; gx += (G_VAL(pix) * Cx) >> 9; bx += (B_VAL(pix) * Cx) >> 9; pix++; } if (i > 0) { rx += (R_VAL(pix) * i) >> 9; gx += (G_VAL(pix) * i) >> 9; bx += (B_VAL(pix) * i) >> 9; } r += (rx * j) >> 14; g += (gx * j) >> 14; b += (bx * j) >> 14; } *pbuf++ = ARGB_JOIN(0xff, ((r + (1 << 4)) >> 5), ((g + (1 << 4)) >> 5), ((b + (1 << 4)) >> 5)); xp++; xapp++; } func(buf, NULL, dc->mul.col, dptr, w); pbuf = buf; dptr += dst_w; dst_clip_w = w; xp = xpoints;// + dxx; xapp = xapoints;// + dxx; yp++; yapp++; } } } #else /* MMX scaling down would go here */ #endif } evas-1.7.9/src/lib/engines/common/evas_convert_main.h0000664000175000017500000000052312175475547017562 00000000000000#ifndef _EVAS_CONVERT_MAIN_H #define _EVAS_CONVERT_MAIN_H EAPI void evas_common_convert_init (void); EAPI Gfx_Func_Convert evas_common_convert_func_get (DATA8 *dest, int w, int h, int depth, DATA32 rmask, DATA32 gmask, DATA32 bmask, Convert_Pal_Mode pal_mode, int rotation); #endif /* _EVAS_CONVERT_MAIN_H */ evas-1.7.9/src/lib/engines/common/evas_scale_main.c0000664000175000017500000000212112175475547017160 00000000000000#include "evas_common.h" #include "evas_private.h" EAPI void evas_common_scale_init(void) { } EAPI Eina_Bool evas_common_scale_rgba_in_to_out_clip_prepare(Cutout_Rects *reuse, const RGBA_Image *src __UNUSED__, const RGBA_Image *dst, RGBA_Draw_Context *dc, int dst_region_x, int dst_region_y, int dst_region_w, int dst_region_h) { /* handle cutouts here! */ if ((dst_region_w <= 0) || (dst_region_h <= 0)) return EINA_FALSE; if (!(RECTS_INTERSECT(dst_region_x, dst_region_y, dst_region_w, dst_region_h, 0, 0, dst->cache_entry.w, dst->cache_entry.h))) return EINA_FALSE; /* no cutouts - cut right to the chase */ if (!dc->cutout.rects) return EINA_TRUE; evas_common_draw_context_clip_clip(dc, 0, 0, dst->cache_entry.w, dst->cache_entry.h); evas_common_draw_context_clip_clip(dc, dst_region_x, dst_region_y, dst_region_w, dst_region_h); /* our clip is 0 size.. abort */ if ((dc->clip.w <= 0) || (dc->clip.h <= 0)) return EINA_FALSE; reuse = evas_common_draw_context_apply_cutouts(dc, reuse); return EINA_TRUE; } evas-1.7.9/src/lib/engines/common/evas_blend_main.c0000664000175000017500000002016512175475547017165 00000000000000#include "evas_common.h" #include "evas_blend_private.h" #if defined BUILD_MMX || defined BUILD_SSE #include "evas_mmx.h" #endif const DATA32 ALPHA_255 = 255; const DATA32 ALPHA_256 = 256; static void _composite_span_nothing(DATA32 *s __UNUSED__, DATA8 *m __UNUSED__, DATA32 c __UNUSED__, DATA32 *d __UNUSED__, int l __UNUSED__) { } static void _composite_pt_nothing(DATA32 s __UNUSED__, DATA8 m __UNUSED__, DATA32 c __UNUSED__, DATA32 *d __UNUSED__) { } static RGBA_Gfx_Compositor * evas_gfx_compositor_get(unsigned char op) { RGBA_Gfx_Compositor *comp; switch (op) { case _EVAS_RENDER_BLEND: comp = evas_common_gfx_compositor_blend_get(); break; case _EVAS_RENDER_BLEND_REL: comp = evas_common_gfx_compositor_blend_rel_get(); break; case _EVAS_RENDER_COPY: comp = evas_common_gfx_compositor_copy_get(); break; case _EVAS_RENDER_COPY_REL: comp = evas_common_gfx_compositor_copy_rel_get(); break; /* case _EVAS_RENDER_ADD: comp = evas_common_gfx_compositor_add_get(); break; case _EVAS_RENDER_ADD_REL: comp = evas_common_gfx_compositor_add_rel_get(); break; case _EVAS_RENDER_SUB: comp = evas_common_gfx_compositor_sub_get(); break; case _EVAS_RENDER_SUB_REL: comp = evas_common_gfx_compositor_sub_rel_get(); break; */ case _EVAS_RENDER_MASK: comp = evas_common_gfx_compositor_mask_get(); break; case _EVAS_RENDER_MUL: comp = evas_common_gfx_compositor_mul_get(); break; default: comp = evas_common_gfx_compositor_blend_get(); break; } return comp; } EAPI void evas_common_blend_init(void) { static int gfx_initialised = 0; static int mmx = 0; static int sse = 0; static int sse2 = 0; RGBA_Gfx_Compositor *comp; if (gfx_initialised) return; gfx_initialised = 1; evas_common_cpu_can_do(&mmx, &sse, &sse2); comp = evas_common_gfx_compositor_copy_get(); if (comp) comp->init(); comp = evas_common_gfx_compositor_copy_rel_get(); if (comp) comp->init(); comp = evas_common_gfx_compositor_blend_get(); if (comp) comp->init(); comp = evas_common_gfx_compositor_blend_rel_get(); if (comp) comp->init(); /* comp = evas_common_gfx_compositor_add_get(); if (comp) comp->init(); comp = evas_common_gfx_compositor_add_rel_get(); if (comp) comp->init(); comp = evas_common_gfx_compositor_sub_get(); if (comp) comp->init(); comp = evas_common_gfx_compositor_sub_rel_get(); if (comp) comp->init(); */ comp = evas_common_gfx_compositor_mask_get(); if (comp) comp->init(); comp = evas_common_gfx_compositor_mul_get(); if (comp) comp->init(); } void evas_common_blend_shutdown(void) { RGBA_Gfx_Compositor *comp; comp = evas_common_gfx_compositor_copy_get(); if (comp) comp->shutdown(); comp = evas_common_gfx_compositor_copy_rel_get(); if (comp) comp->shutdown(); comp = evas_common_gfx_compositor_blend_get(); if (comp) comp->shutdown(); comp = evas_common_gfx_compositor_blend_rel_get(); if (comp) comp->shutdown(); /* comp = evas_common_gfx_compositor_add_get(); if (comp) comp->shutdown(); comp = evas_common_gfx_compositor_add_rel_get(); if (comp) comp->shutdown(); comp = evas_common_gfx_compositor_sub_get(); if (comp) comp->shutdown(); comp = evas_common_gfx_compositor_sub_rel_get(); if (comp) comp->shutdown(); */ comp = evas_common_gfx_compositor_mask_get(); if (comp) comp->shutdown(); comp = evas_common_gfx_compositor_mul_get(); if (comp) comp->shutdown(); } RGBA_Gfx_Func evas_common_gfx_func_composite_pixel_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels, int op) { RGBA_Gfx_Compositor *comp; RGBA_Gfx_Func func = NULL; if (src && (!src->cache_entry.flags.alpha)) { if (op == _EVAS_RENDER_BLEND) op = _EVAS_RENDER_COPY; if (op == _EVAS_RENDER_BLEND_REL) op = _EVAS_RENDER_COPY_REL; } comp = evas_gfx_compositor_get(op); if (comp) func = comp->composite_pixel_span_get(src, dst, pixels); if (func) return func; return _composite_span_nothing; } RGBA_Gfx_Func evas_common_gfx_func_composite_color_span_get(DATA32 col, RGBA_Image *dst, int pixels, int op) { RGBA_Gfx_Compositor *comp; RGBA_Gfx_Func func = NULL; if ((col & 0xff000000) == 0xff000000) { if (op == _EVAS_RENDER_BLEND) op = _EVAS_RENDER_COPY; if (op == EVAS_RENDER_BLEND_REL) op = _EVAS_RENDER_COPY_REL; } comp = evas_gfx_compositor_get(op); if (comp) func = comp->composite_color_span_get(col, dst, pixels); if (func) return func; return _composite_span_nothing; } RGBA_Gfx_Func evas_common_gfx_func_composite_pixel_color_span_get(RGBA_Image *src, DATA32 col, RGBA_Image *dst, int pixels, int op) { RGBA_Gfx_Compositor *comp; RGBA_Gfx_Func func = NULL; if ((src && (!src->cache_entry.flags.alpha)) && ((col & 0xff000000) == 0xff000000)) { if (op == _EVAS_RENDER_BLEND) op = _EVAS_RENDER_COPY; if (op == _EVAS_RENDER_BLEND_REL) op = _EVAS_RENDER_COPY_REL; } comp = evas_gfx_compositor_get(op); if (comp) func = comp->composite_pixel_color_span_get(src, col, dst, pixels); if (func) return func; return _composite_span_nothing; } RGBA_Gfx_Func evas_common_gfx_func_composite_mask_color_span_get(DATA32 col, RGBA_Image *dst, int pixels, int op) { RGBA_Gfx_Compositor *comp; RGBA_Gfx_Func func = NULL; comp = evas_gfx_compositor_get(op); if (comp) func = comp->composite_mask_color_span_get(col, dst, pixels); if (func) return func; return _composite_span_nothing; } RGBA_Gfx_Func evas_common_gfx_func_composite_pixel_mask_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels, int op) { RGBA_Gfx_Compositor *comp; RGBA_Gfx_Func func = NULL; comp = evas_gfx_compositor_get(op); if (comp) func = comp->composite_pixel_mask_span_get(src, dst, pixels); if (func) return func; return _composite_span_nothing; } RGBA_Gfx_Pt_Func evas_common_gfx_func_composite_pixel_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst, int op) { RGBA_Gfx_Compositor *comp; RGBA_Gfx_Pt_Func func = NULL; if (!src_flags.alpha) { if (op == _EVAS_RENDER_BLEND) op = _EVAS_RENDER_COPY; if (op == _EVAS_RENDER_BLEND_REL) op = _EVAS_RENDER_COPY_REL; } comp = evas_gfx_compositor_get(op); if (comp) func = comp->composite_pixel_pt_get(src_flags, dst); if (func) return func; return _composite_pt_nothing; } RGBA_Gfx_Pt_Func evas_common_gfx_func_composite_color_pt_get(DATA32 col, RGBA_Image *dst, int op) { RGBA_Gfx_Compositor *comp; RGBA_Gfx_Pt_Func func = NULL; if ((col & 0xff000000) == 0xff000000) { if (op == _EVAS_RENDER_BLEND) op = _EVAS_RENDER_COPY; if (op == EVAS_RENDER_BLEND_REL) op = _EVAS_RENDER_COPY_REL; } comp = evas_gfx_compositor_get(op); if (comp) func = comp->composite_color_pt_get(col, dst); if (func) return func; return _composite_pt_nothing; } RGBA_Gfx_Pt_Func evas_common_gfx_func_composite_pixel_color_pt_get(Image_Entry_Flags src_flags, DATA32 col, RGBA_Image *dst, int op) { RGBA_Gfx_Compositor *comp; RGBA_Gfx_Pt_Func func = NULL; if ((!src_flags.alpha) && ((col & 0xff000000) == 0xff000000)) { if (op == _EVAS_RENDER_BLEND) op = _EVAS_RENDER_COPY; if (op == _EVAS_RENDER_BLEND_REL) op = _EVAS_RENDER_COPY_REL; } comp = evas_gfx_compositor_get(op); if (comp) func = comp->composite_pixel_color_pt_get(src_flags, col, dst); if (func) return func; return _composite_pt_nothing; } RGBA_Gfx_Pt_Func evas_common_gfx_func_composite_mask_color_pt_get(DATA32 col, RGBA_Image *dst, int op) { RGBA_Gfx_Compositor *comp; RGBA_Gfx_Pt_Func func = NULL; comp = evas_gfx_compositor_get(op); if (comp) func = comp->composite_mask_color_pt_get(col, dst); if (func) return func; return _composite_pt_nothing; } RGBA_Gfx_Pt_Func evas_common_gfx_func_composite_pixel_mask_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst, int op) { RGBA_Gfx_Compositor *comp; RGBA_Gfx_Pt_Func func = NULL; comp = evas_gfx_compositor_get(op); if (comp) func = comp->composite_pixel_mask_pt_get(src_flags, dst); if (func) return func; return _composite_pt_nothing; } evas-1.7.9/src/lib/engines/common/evas_font_load.c0000664000175000017500000005561212175475547017047 00000000000000#include "evas_common.h" #include "evas_private.h" #include #include "evas_font_private.h" /* for Frame-Queuing support */ #include "evas_font_ot.h" #include /* Freetype2 OS/2 font table. */ #ifdef EVAS_CSERVE2 # include "../../cserve2/evas_cs2_private.h" #endif #ifdef USE_HARFBUZZ # include # include #endif extern FT_Library evas_ft_lib; static int font_cache_usage = 0; static int font_cache = 0; static int font_dpi = 75; static Eina_Hash *fonts_src = NULL; static Eina_Hash *fonts = NULL; static Eina_List *fonts_lru = NULL; static Eina_Inlist *fonts_use_lru = NULL; static int fonts_use_usage = 0; static void _evas_common_font_int_clear(RGBA_Font_Int *fi); static int _evas_font_cache_int_cmp(const RGBA_Font_Int *k1, int k1_length __UNUSED__, const RGBA_Font_Int *k2, int k2_length __UNUSED__) { /* RGBA_Font_Source->name is a stringshare */ if (k1->src->name == k2->src->name) { if (k1->size == k2->size) return k1->wanted_rend - k2->wanted_rend; else return k1->size - k2->size; } return strcmp(k1->src->name, k2->src->name); } static int _evas_font_cache_int_hash(const RGBA_Font_Int *key, int key_length __UNUSED__) { int hash; unsigned int wanted_rend = key->wanted_rend; hash = eina_hash_djb2(key->src->name, eina_stringshare_strlen(key->src->name) + 1); hash ^= eina_hash_int32(&key->size, sizeof (int)); hash ^= eina_hash_int32(&wanted_rend, sizeof (int)); return hash; } static void _evas_common_font_source_free(RGBA_Font_Source *fs) { FTLOCK(); FT_Done_Face(fs->ft.face); FTUNLOCK(); if (fs->name) eina_stringshare_del(fs->name); if (fs->file) eina_stringshare_del(fs->file); free(fs); } static void _evas_common_font_int_free(RGBA_Font_Int *fi) { FT_Done_Size(fi->ft.size); evas_common_font_int_modify_cache_by(fi, -1); _evas_common_font_int_clear(fi); eina_hash_free(fi->kerning); LKD(fi->ft_mutex); #ifdef USE_HARFBUZZ hb_font_destroy(fi->ft.hb_font); #endif evas_common_font_source_free(fi->src); if (fi->references <= 0) fonts_lru = eina_list_remove(fonts_lru, fi); if (fi->fash) fi->fash->freeme(fi->fash); if (fi->inuse) { fonts_use_lru = eina_inlist_remove(fonts_use_lru, EINA_INLIST_GET(fi)); fi->inuse = 0; fonts_use_usage -= fi->usage; fi->usage = 0; } #ifdef EVAS_CSERVE2 evas_cserve2_font_free(fi->cs2_handler); #endif free(fi); } void evas_common_font_load_init(void) { fonts_src = eina_hash_string_small_new(EINA_FREE_CB(_evas_common_font_source_free)); fonts = eina_hash_new(NULL, EINA_KEY_CMP(_evas_font_cache_int_cmp), EINA_KEY_HASH(_evas_font_cache_int_hash), EINA_FREE_CB(_evas_common_font_int_free), 5); } void evas_common_font_load_shutdown(void) { eina_hash_free(fonts); fonts = NULL; eina_hash_free(fonts_src); fonts_src = NULL; } EAPI void evas_common_font_dpi_set(int dpi) { font_dpi = dpi; } EAPI RGBA_Font_Source * evas_common_font_source_memory_load(const char *name, const void *data, int data_size) { int error; RGBA_Font_Source *fs; assert(name != NULL); fs = calloc(1, sizeof(RGBA_Font_Source) + data_size); if (!fs) return NULL; fs->data = ((unsigned char *)fs) + sizeof(RGBA_Font_Source); fs->data_size = data_size; fs->current_size = 0; memcpy(fs->data, data, data_size); FTLOCK(); error = FT_New_Memory_Face(evas_ft_lib, fs->data, fs->data_size, 0, &(fs->ft.face)); FTUNLOCK(); if (error) { free(fs); return NULL; } fs->name = eina_stringshare_add(name); fs->file = NULL; FTLOCK(); error = FT_Select_Charmap(fs->ft.face, ft_encoding_unicode); if (error) { FT_Done_Face(fs->ft.face); fs->ft.face = NULL; free(fs); return NULL; } FTUNLOCK(); fs->ft.orig_upem = fs->ft.face->units_per_EM; fs->references = 1; eina_hash_direct_add(fonts_src, fs->name, fs); return fs; } EAPI RGBA_Font_Source * evas_common_font_source_load(const char *name) { RGBA_Font_Source *fs; assert(name != NULL); fs = calloc(1, sizeof(RGBA_Font_Source)); if (!fs) return NULL; fs->data = NULL; fs->data_size = 0; fs->current_size = 0; fs->ft.face = NULL; fs->name = eina_stringshare_add(name); fs->file = eina_stringshare_ref(fs->name); fs->ft.orig_upem = 0; fs->references = 1; eina_hash_direct_add(fonts_src, fs->name, fs); return fs; } void evas_common_font_source_unload(RGBA_Font_Source *fs) { FTLOCK(); FT_Done_Face(fs->ft.face); fs->ft.face = NULL; FTUNLOCK(); } void evas_common_font_source_reload(RGBA_Font_Source *fs) { if (fs->ft.face) return; if (fs->data) { int error; FTLOCK(); error = FT_New_Memory_Face(evas_ft_lib, fs->data, fs->data_size, 0, &(fs->ft.face)); FTUNLOCK(); if (error) return; FTLOCK(); error = FT_Select_Charmap(fs->ft.face, ft_encoding_unicode); if (error) { FT_Done_Face(fs->ft.face); fs->ft.face = NULL; } FTUNLOCK(); } else evas_common_font_source_load_complete(fs); } EAPI int evas_common_font_source_load_complete(RGBA_Font_Source *fs) { int error; FTLOCK(); error = FT_New_Face(evas_ft_lib, fs->file, 0, &(fs->ft.face)); if (error) { FTUNLOCK(); fs->ft.face = NULL; return error; } error = FT_Select_Charmap(fs->ft.face, ft_encoding_unicode); if (error) { FT_Done_Face(fs->ft.face); FTUNLOCK(); fs->ft.face = NULL; return error; } FTUNLOCK(); fs->ft.orig_upem = fs->ft.face->units_per_EM; return error; } EAPI RGBA_Font_Source * evas_common_font_source_find(const char *name) { RGBA_Font_Source *fs; if (!name) return NULL; fs = eina_hash_find(fonts_src, name); if (fs) { fs->references++; return fs; } return NULL; } EAPI void evas_common_font_source_free(RGBA_Font_Source *fs) { fs->references--; if (fs->references > 0) return; eina_hash_del(fonts_src, fs->name, fs); } EAPI void evas_common_font_size_use(RGBA_Font *fn) { RGBA_Font_Int *fi; Eina_List *l; EINA_LIST_FOREACH(fn->fonts, l, fi) { if (fi->src->current_size != fi->size) { evas_common_font_source_reload(fi->src); FTLOCK(); FT_Activate_Size(fi->ft.size); FTUNLOCK(); fi->src->current_size = fi->size; } } } static int _evas_common_font_double_int_cmp(const int *key1, __UNUSED__ int key1_length, const int *key2, __UNUSED__ int key2_length) { if (key1[0] - key2[0] == 0) return key1[1] - key2[1]; return key1[0] - key2[0]; } static int _evas_common_font_double_int_hash(const unsigned int key[2], int key_length) { return eina_hash_int32(&key[0], key_length) ^ eina_hash_int32(&key[1], key_length); } static void _evas_common_font_int_cache_init(RGBA_Font_Int *fi) { /* Add some font kerning cache. */ fi->kerning = eina_hash_new(NULL, EINA_KEY_CMP(_evas_common_font_double_int_cmp), EINA_KEY_HASH(_evas_common_font_double_int_hash), free, 3); LKI(fi->ft_mutex); } EAPI RGBA_Font_Int * evas_common_font_int_memory_load(const char *source, const char *name, int size, const void *data, int data_size, Font_Rend_Flags wanted_rend) { RGBA_Font_Int *fi; char *fake_name; fake_name = evas_file_path_join(source, name); fi = evas_common_font_int_find(fake_name, size, wanted_rend); if (fi) { free(fake_name); return fi; } fi = calloc(1, sizeof(RGBA_Font_Int)); if (!fi) { free(fake_name); return NULL; } fi->src = evas_common_font_source_find(fake_name); if (!fi->src) fi->src = evas_common_font_source_memory_load(fake_name, data, data_size); if (!fi->src) { free(fi); free(fake_name); return NULL; } fi->size = size; _evas_common_font_int_cache_init(fi); fi = evas_common_font_int_load_init(fi); evas_common_font_int_load_complete(fi); #ifdef EVAS_CSERVE2 if (evas_cserve2_use_get()) fi->cs2_handler = evas_cserve2_font_load(source, name, size, font_dpi, wanted_rend); #endif free(fake_name); return fi; } EAPI RGBA_Font_Int * evas_common_font_int_load(const char *name, int size, Font_Rend_Flags wanted_rend) { RGBA_Font_Int *fi; fi = evas_common_font_int_find(name, size, wanted_rend); if (fi) return fi; fi = calloc(1, sizeof(RGBA_Font_Int)); if (!fi) return NULL; fi->src = evas_common_font_source_find(name); if (!fi->src && evas_file_path_is_file(name)) fi->src = evas_common_font_source_load(name); if (!fi->src) { free(fi); return NULL; } fi->size = size; fi->wanted_rend = wanted_rend; _evas_common_font_int_cache_init(fi); fi = evas_common_font_int_load_init(fi); #ifdef EVAS_CSERVE2 if (evas_cserve2_use_get()) fi->cs2_handler = evas_cserve2_font_load(NULL, name, size, font_dpi, wanted_rend); #endif // evas_common_font_int_load_complete(fi); return fi; } EAPI RGBA_Font_Int * evas_common_font_int_load_init(RGBA_Font_Int *fi) { fi->ft.size = NULL; fi->references = 1; eina_hash_direct_add(fonts, fi, fi); return fi; } EAPI RGBA_Font_Int * evas_common_font_int_load_complete(RGBA_Font_Int *fi) { int val, dv; int ret; int error; FTLOCK(); error = FT_New_Size(fi->src->ft.face, &(fi->ft.size)); if (!error) { FT_Activate_Size(fi->ft.size); } fi->real_size = fi->size * 64; error = FT_Set_Char_Size(fi->src->ft.face, 0, fi->real_size, font_dpi, font_dpi); if (error) error = FT_Set_Pixel_Sizes(fi->src->ft.face, 0, fi->real_size); FTUNLOCK(); if (error) { int i, maxd = 0x7fffffff; int chosen_size = 0; int chosen_size2 = 0; for (i = 0; i < fi->src->ft.face->num_fixed_sizes; i++) { int s, cd; s = fi->src->ft.face->available_sizes[i].size; cd = chosen_size - fi->real_size; if (cd < 0) cd = -cd; if (cd < maxd) { maxd = cd; chosen_size = s; chosen_size2 = fi->src->ft.face->available_sizes[i].y_ppem; if (maxd == 0) break; } } fi->real_size = chosen_size; FTLOCK(); error = FT_Set_Pixel_Sizes(fi->src->ft.face, 0, fi->real_size); FTUNLOCK(); if (error) { error = FT_Set_Char_Size(fi->src->ft.face, 0, fi->real_size, font_dpi, font_dpi); if (error) { /* hack around broken fonts */ fi->real_size = (chosen_size2 / 64) * 60; error = FT_Set_Char_Size(fi->src->ft.face, 0, fi->real_size, font_dpi, font_dpi); if (error) { /* couldn't choose the size anyway... what now? */ } } } } fi->src->current_size = 0; fi->max_h = 0; val = (int)fi->src->ft.face->bbox.yMax; if (fi->src->ft.face->units_per_EM != 0) { dv = (fi->src->ft.orig_upem * 2048) / fi->src->ft.face->units_per_EM; ret = FONT_METRIC_CONV(val, dv, fi->src->ft.face->size->metrics.y_scale); } else { if ((fi->src->ft.face->bbox.yMax == 0) && (fi->src->ft.face->bbox.yMin == 0)) ret = FONT_METRIC_ROUNDUP((int)fi->ft.size->metrics.ascender); else ret = val; } fi->max_h += ret; val = -(int)fi->src->ft.face->bbox.yMin; if (fi->src->ft.face->units_per_EM != 0) { dv = (fi->src->ft.orig_upem * 2048) / fi->src->ft.face->units_per_EM; ret = FONT_METRIC_CONV(val, dv, fi->src->ft.face->size->metrics.y_scale); } else { if ((fi->src->ft.face->bbox.yMax == 0) && (fi->src->ft.face->bbox.yMin == 0)) ret = FONT_METRIC_ROUNDUP(-(int)fi->ft.size->metrics.descender); else ret = val; } fi->max_h += ret; /* If the loaded font doesn't match with wanted_rend value requested by * textobject and textblock, Set the runtime_rend value as FONT_REND_SLANT * or FONT_REND_WEIGHT for software rendering. */ fi->runtime_rend = FONT_REND_REGULAR; if ((fi->wanted_rend & FONT_REND_SLANT) && !(fi->src->ft.face->style_flags & FT_STYLE_FLAG_ITALIC)) fi->runtime_rend |= FONT_REND_SLANT; if ((fi->wanted_rend & FONT_REND_WEIGHT) && !(fi->src->ft.face->style_flags & FT_STYLE_FLAG_BOLD)) { TT_OS2 *tt_os2 = FT_Get_Sfnt_Table(fi->src->ft.face, ft_sfnt_os2); if (!tt_os2 || (tt_os2->usWeightClass < 600)) { fi->runtime_rend |= FONT_REND_WEIGHT; } } return fi; } EAPI RGBA_Font * evas_common_font_memory_load(const char *source, const char *name, int size, const void *data, int data_size, Font_Rend_Flags wanted_rend) { RGBA_Font *fn; RGBA_Font_Int *fi; fi = evas_common_font_int_memory_load(source, name, size, data, data_size, wanted_rend); if (!fi) return NULL; fn = calloc(1, sizeof(RGBA_Font)); if (!fn) { evas_common_font_int_unref(fi); return NULL; } fn->fonts = eina_list_append(fn->fonts, fi); fn->hinting = FONT_BYTECODE_HINT; fi->hinting = fn->hinting; fn->references = 1; LKI(fn->lock); if (fi->inuse) evas_common_font_int_promote(fi); else { fi->inuse = 1; fonts_use_lru = eina_inlist_prepend(fonts_use_lru, EINA_INLIST_GET(fi)); } return fn; } //ZZZ: font struct looks like: // fn->(fi, fi, fi, ...) // fi->fs EAPI RGBA_Font * evas_common_font_load(const char *name, int size, Font_Rend_Flags wanted_rend) { RGBA_Font *fn; RGBA_Font_Int *fi; fi = evas_common_font_int_load(name, size, wanted_rend); if (!fi) return NULL; /* First font, complete load */ if (!fi->ft.size) { if (!fi->src->ft.face) { if (evas_common_font_source_load_complete(fi->src)) { evas_common_font_int_unref(fi); return NULL; } } evas_common_font_int_load_complete(fi); } fn = calloc(1, sizeof(RGBA_Font)); if (!fn) { evas_common_font_int_unref(fi); return NULL; } fn->fonts = eina_list_append(fn->fonts, fi); fn->hinting = FONT_BYTECODE_HINT; fi->hinting = fn->hinting; fn->references = 1; LKI(fn->lock); if (fi->inuse) evas_common_font_int_promote(fi); else { fi->inuse = 1; fonts_use_lru = eina_inlist_prepend(fonts_use_lru, EINA_INLIST_GET(fi)); } return fn; } EAPI RGBA_Font * evas_common_font_add(RGBA_Font *fn, const char *name, int size, Font_Rend_Flags wanted_rend) { RGBA_Font_Int *fi; if (!fn) return NULL; fi = evas_common_font_int_load(name, size, wanted_rend); if (fi) { fn->fonts = eina_list_append(fn->fonts, fi); fi->hinting = fn->hinting; if (fi->inuse) evas_common_font_int_promote(fi); else { fi->inuse = 1; fonts_use_lru = eina_inlist_prepend(fonts_use_lru, EINA_INLIST_GET(fi)); } return fn; } return NULL; } EAPI RGBA_Font * evas_common_font_memory_add(RGBA_Font *fn, const char *source, const char *name, int size, const void *data, int data_size, Font_Rend_Flags wanted_rend) { RGBA_Font_Int *fi; if (!fn) return NULL; fi = evas_common_font_int_memory_load(source, name, size, data, data_size, wanted_rend); if (fi) { fn->fonts = eina_list_append(fn->fonts, fi); fi->hinting = fn->hinting; if (fi->inuse) evas_common_font_int_promote(fi); else { fi->inuse = 1; fonts_use_lru = eina_inlist_prepend(fonts_use_lru, EINA_INLIST_GET(fi)); } return fn; } return NULL; } EAPI void evas_common_font_int_unref(RGBA_Font_Int *fi) { fi->references--; if (fi->references == 0) { fonts_lru = eina_list_append(fonts_lru, fi); evas_common_font_int_modify_cache_by(fi, 1); evas_common_font_flush(); } } EAPI void evas_common_font_free(RGBA_Font *fn) { Eina_List *l; RGBA_Font_Int *fi; if (!fn) return; fn->references--; if (fn->references > 0) return; EINA_LIST_FOREACH(fn->fonts, l, fi) evas_common_font_int_unref(fi); evas_common_font_flush(); eina_list_free(fn->fonts); if (fn->fash) fn->fash->freeme(fn->fash); LKD(fn->lock); free(fn); } EAPI void evas_common_font_hinting_set(RGBA_Font *fn, Font_Hint_Flags hinting) { Eina_List *l; RGBA_Font_Int *fi; if (!fn) return; fn->hinting = hinting; EINA_LIST_FOREACH(fn->fonts, l, fi) { fi->hinting = fn->hinting; } } EAPI Eina_Bool evas_common_hinting_available(Font_Hint_Flags hinting) { switch (hinting) { case FONT_NO_HINT: case FONT_AUTO_HINT: /* these two hinting modes are always available */ return EINA_TRUE; case FONT_BYTECODE_HINT: /* Only use the bytecode interpreter if support for the _patented_ * algorithms is available because the free bytecode * interpreter's results are too crappy. * * On freetyp 2.2+, we can ask the library about support for * the patented interpreter. On older versions, we need to use * macros to check for it. */ #if FREETYPE_MINOR >= 2 return FT_Get_TrueType_Engine_Type(evas_ft_lib) >= FT_TRUETYPE_ENGINE_TYPE_PATENTED; #else /* we may not rely on TT_CONFIG_OPTION_BYTECODE_INTERPRETER * here to find out whether it's supported. * * so, assume it is. o_O */ return EINA_TRUE; #endif } /* shouldn't get here - need to add another case statement */ return EINA_FALSE; } EAPI RGBA_Font * evas_common_font_memory_hinting_load(const char *source, const char *name, int size, const void *data, int data_size, Font_Hint_Flags hinting, Font_Rend_Flags wanted_rend) { RGBA_Font *fn; fn = evas_common_font_memory_load(source, name, size, data, data_size, wanted_rend); if (fn) evas_common_font_hinting_set(fn, hinting); return fn; } EAPI RGBA_Font * evas_common_font_hinting_load(const char *name, int size, Font_Hint_Flags hinting, Font_Rend_Flags wanted_rend) { RGBA_Font *fn; fn = evas_common_font_load(name, size, wanted_rend); if (fn) evas_common_font_hinting_set(fn, hinting); return fn; } EAPI RGBA_Font * evas_common_font_hinting_add(RGBA_Font *fn, const char *name, int size, Font_Hint_Flags hinting, Font_Rend_Flags wanted_rend) { fn = evas_common_font_add(fn, name, size, wanted_rend); if (fn) evas_common_font_hinting_set(fn, hinting); return fn; } EAPI RGBA_Font * evas_common_font_memory_hinting_add(RGBA_Font *fn, const char *source, const char *name, int size, const void *data, int data_size, Font_Hint_Flags hinting, Font_Rend_Flags wanted_rend) { fn = evas_common_font_memory_add(fn, source, name, size, data, data_size, wanted_rend); if (fn) evas_common_font_hinting_set(fn, hinting); return fn; } static void _evas_common_font_int_clear(RGBA_Font_Int *fi) { LKL(fi->ft_mutex); if (!fi->fash) { LKU(fi->ft_mutex); return; } evas_common_font_int_modify_cache_by(fi, -1); if (fi->references <= 1) { if (fi->fash) { fi->fash->freeme(fi->fash); fi->fash = NULL; } } if (fi->inuse) fonts_use_usage -= fi->usage; fi->usage = 0; fi->generation++; LKU(fi->ft_mutex); } static Eina_Bool _evas_common_font_all_clear_cb(const Eina_Hash *hash __UNUSED__, const void *key __UNUSED__, void *data, void *fdata __UNUSED__) { RGBA_Font_Int *fi = data; _evas_common_font_int_clear(fi); return 1; } EAPI void evas_common_font_all_clear(void) { eina_hash_foreach(fonts, _evas_common_font_all_clear_cb, NULL); } void evas_common_font_int_promote(RGBA_Font_Int *fi) { return; if (fonts_use_lru == (Eina_Inlist *)fi) return; if (!fi->inuse) return; fonts_use_lru = eina_inlist_remove(fonts_use_lru, EINA_INLIST_GET(fi)); fonts_use_lru = eina_inlist_prepend(fonts_use_lru, EINA_INLIST_GET(fi)); } void evas_common_font_int_use_increase(int size) { fonts_use_usage += size; } void evas_common_font_int_use_trim(void) { Eina_Inlist *l; return; if (fonts_use_usage <= (font_cache << 1)) return; if (!fonts_use_lru) return; l = fonts_use_lru->last; while (l) { RGBA_Font_Int *fi = (RGBA_Font_Int *)l; if (fonts_use_usage <= (font_cache << 1)) break; // FIXME: del fi->kerning content _evas_common_font_int_clear(fi); evas_common_font_int_unload(fi); evas_common_font_int_promote(fi); l = l->prev; } } void evas_common_font_int_unload(RGBA_Font_Int *fi) { return; if (!fi->src->ft.face) return; _evas_common_font_int_clear(fi); FT_Done_Size(fi->ft.size); fi->ft.size = NULL; evas_common_font_source_unload(fi->src); } void evas_common_font_int_reload(RGBA_Font_Int *fi) { if (fi->src->ft.face) return; evas_common_font_source_load_complete(fi->src); return; evas_common_font_source_reload(fi->src); evas_common_font_int_load_complete(fi); } /* when the fi->references == 0 we increase this instead of really deleting * we then check if the cache_useage size is larger than allowed * !If the cache is NOT too large we dont delete font_int * !If the cache is too large we really delete font_int */ EAPI void evas_common_font_int_modify_cache_by(RGBA_Font_Int *fi, int dir) { font_cache_usage += dir * (sizeof(RGBA_Font) + fi->usage + sizeof(FT_FaceRec) + 16384); /* fudge values */ } EAPI int evas_common_font_cache_get(void) { return font_cache; } EAPI void evas_common_font_cache_set(int size) { font_cache = size; evas_common_font_flush(); evas_common_font_int_use_trim(); } EAPI void evas_common_font_flush(void) { if (font_cache_usage < font_cache) return; while (font_cache_usage > font_cache) { int pfont_cache_usage; pfont_cache_usage = font_cache_usage; evas_common_font_flush_last(); if (pfont_cache_usage == font_cache_usage) break; } } /* We run this when the cache gets larger than allowed size * We check cache size each time a fi->references goes to 0 * PERFORMS: Find font_int(s) with references == 0 and delete them */ EAPI void evas_common_font_flush_last(void) { RGBA_Font_Int *fi = NULL; if (!fonts_lru) return ; fi = eina_list_data_get(fonts_lru); fonts_lru = eina_list_remove_list(fonts_lru, fonts_lru); eina_hash_del(fonts, fi, fi); } EAPI RGBA_Font_Int * evas_common_font_int_find(const char *name, int size, Font_Rend_Flags wanted_rend) { RGBA_Font_Int tmp_fi; RGBA_Font_Source tmp_fn; RGBA_Font_Int *fi; tmp_fn.name = (char*) eina_stringshare_add(name); tmp_fi.src = &tmp_fn; tmp_fi.size = size; tmp_fi.wanted_rend = wanted_rend; fi = eina_hash_find(fonts, &tmp_fi); if (fi) { if (fi->references == 0) { evas_common_font_int_modify_cache_by(fi, -1); fonts_lru = eina_list_remove(fonts_lru, fi); } fi->references++; } eina_stringshare_del(tmp_fn.name); return fi; } evas-1.7.9/src/lib/engines/common/evas_convert_gry_8.h0000664000175000017500000000165312175475547017673 00000000000000#ifndef _EVAS_CONVERT_GRY_8_H #define _EVAS_CONVERT_GRY_8_H void evas_common_convert_rgba_to_8bpp_gry_256_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); void evas_common_convert_rgba_to_8bpp_gry_64_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); void evas_common_convert_rgba_to_8bpp_gry_16_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); void evas_common_convert_rgba_to_8bpp_gry_4_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); void evas_common_convert_rgba_to_8bpp_gry_1_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); #endif /* _EVAS_CONVERT_GRY_8_H */ evas-1.7.9/src/lib/engines/common/evas_scale_smooth_scaler_up.c0000664000175000017500000001235012175475547021607 00000000000000{ int srx = src_region_x, sry = src_region_y; int srw = src_region_w, srh = src_region_h; int drx = dst_region_x, dry = dst_region_y; int drw = dst_region_w, drh = dst_region_h; int dsxx, dsyy, sxx, syy, sx, sy; int cx, cy; int direct_scale = 0, buf_step = 0; DATA32 *psrc, *pdst, *pdst_end; DATA32 *buf, *pbuf, *pbuf_end; RGBA_Gfx_Func func = NULL; /* check value to make overflow(only check value related with overflow) */ if ((src_region_w > SCALE_SIZE_MAX) || (src_region_h > SCALE_SIZE_MAX)) return; /* a scanline buffer */ pdst = dst_ptr; // it's been set at (dst_clip_x, dst_clip_y) pdst_end = pdst + (dst_clip_h * dst_w); if (!dc->mul.use) { if ((dc->render_op == _EVAS_RENDER_BLEND) && !src->cache_entry.flags.alpha) { direct_scale = 1; buf_step = dst->cache_entry.w; } else if (dc->render_op == _EVAS_RENDER_COPY) { direct_scale = 1; buf_step = dst->cache_entry.w; if (src->cache_entry.flags.alpha) dst->cache_entry.flags.alpha = 1; } } if (!direct_scale) { buf = alloca(dst_clip_w * sizeof(DATA32)); if (dc->mul.use) func = evas_common_gfx_func_composite_pixel_color_span_get(src, dc->mul.col, dst, dst_clip_w, dc->render_op); else func = evas_common_gfx_func_composite_pixel_span_get(src, dst, dst_clip_w, dc->render_op); } else buf = pdst; if ((srw > 1) && (drw > 1)) dsxx = ((srw - 1) << 16) / (drw - 1); else dsxx = (srw << 16) / drw; if ((srh > 1) && (drh > 1)) dsyy = ((srh - 1) << 16) / (drh - 1); else dsyy = (srh << 16) / drh; cx = dst_clip_x - drx; cy = dst_clip_y - dry; sxx = (dsxx * cx); syy = (dsyy * cy); sy = syy >> 16; if (drh == srh) { int sxx0 = sxx; psrc = src->image.data + (src_w * (sry + cy)) + srx; while (pdst < pdst_end) { pbuf = buf; pbuf_end = buf + dst_clip_w; sxx = sxx0; #ifdef SCALE_USING_MMX pxor_r2r(mm0, mm0); MOV_A2R(ALPHA_255, mm5) #endif while (pbuf < pbuf_end) { DATA32 p0, p1; int ax; sx = (sxx >> 16); ax = 1 + ((sxx - (sx << 16)) >> 8); p0 = p1 = *(psrc + sx); if ((sx + 1) < srw) p1 = *(psrc + sx + 1); #ifdef SCALE_USING_MMX MOV_P2R(p0, mm1, mm0) if (p0 | p1) { MOV_A2R(ax, mm3) MOV_P2R(p1, mm2, mm0) INTERP_256_R2R(mm3, mm2, mm1, mm5) } MOV_R2P(mm1, *pbuf, mm0) pbuf++; #else if (p0 | p1) p0 = INTERP_256(ax, p1, p0); *pbuf++ = p0; #endif sxx += dsxx; } /* * blend here [clip_w *] buf -> dptr * */ if (!direct_scale) func(buf, NULL, dc->mul.col, pdst, dst_clip_w); pdst += dst_w; psrc += src_w; buf += buf_step; } goto done_scale_up; } else if (drw == srw) { DATA32 *ps = src->image.data + (src_w * sry) + srx + cx; while (pdst < pdst_end) { int ay; sy = syy >> 16; psrc = ps + (sy * src_w); ay = 1 + ((syy - (sy << 16)) >> 8); #ifdef SCALE_USING_MMX pxor_r2r(mm0, mm0); MOV_A2R(ALPHA_255, mm5) MOV_A2R(ay, mm4) #endif pbuf = buf; pbuf_end = buf + dst_clip_w; while (pbuf < pbuf_end) { DATA32 p0 = *psrc, p2 = p0; if ((sy + 1) < srh) p2 = *(psrc + src_w); #ifdef SCALE_USING_MMX MOV_P2R(p0, mm1, mm0) if (p0 | p2) { MOV_P2R(p2, mm2, mm0) INTERP_256_R2R(mm4, mm2, mm1, mm5) } MOV_R2P(mm1, *pbuf, mm0) pbuf++; #else if (p0 | p2) p0 = INTERP_256(ay, p2, p0); *pbuf++ = p0; #endif psrc++; } /* * blend here [clip_w *] buf -> dptr * */ if (!direct_scale) func(buf, NULL, dc->mul.col, pdst, dst_clip_w); pdst += dst_w; syy += dsyy; buf += buf_step; } goto done_scale_up; } { DATA32 *ps = src->image.data + (src_w * sry) + srx; int sxx0 = sxx; while (pdst < pdst_end) { int ay; sy = syy >> 16; psrc = ps + (sy * src_w); ay = 1 + ((syy - (sy << 16)) >> 8); #ifdef SCALE_USING_MMX MOV_A2R(ay, mm4) pxor_r2r(mm0, mm0); MOV_A2R(ALPHA_255, mm5) #endif pbuf = buf; pbuf_end = buf + dst_clip_w; sxx = sxx0; while (pbuf < pbuf_end) { int ax; DATA32 *p, *q; DATA32 p0, p1, p2, p3; sx = sxx >> 16; ax = 1 + ((sxx - (sx << 16)) >> 8); p = psrc + sx; q = p + src_w; p0 = p1 = p2 = p3 = *p; if ((sx + 1) < srw) p1 = *(p + 1); if ((sy + 1) < srh) { p2 = *q; p3 = p2; if ((sx + 1) < srw) p3 = *(q + 1); } #ifdef SCALE_USING_MMX MOV_A2R(ax, mm6) MOV_P2R(p0, mm1, mm0) if (p0 | p1) { MOV_P2R(p1, mm2, mm0) INTERP_256_R2R(mm6, mm2, mm1, mm5) } MOV_P2R(p2, mm2, mm0) if (p2 | p3) { MOV_P2R(p3, mm3, mm0) INTERP_256_R2R(mm6, mm3, mm2, mm5) } INTERP_256_R2R(mm4, mm2, mm1, mm5) MOV_R2P(mm1, *pbuf, mm0) pbuf++; #else if (p0 | p1) p0 = INTERP_256(ax, p1, p0); if (p2 | p3) p2 = INTERP_256(ax, p3, p2); if (p0 | p2) p0 = INTERP_256(ay, p2, p0); *pbuf++ = p0; #endif sxx += dsxx; } /* * blend here [clip_w *] buf -> dptr * */ if (!direct_scale) func(buf, NULL, dc->mul.col, pdst, dst_clip_w); pdst += dst_w; syy += dsyy; buf += buf_step; } } done_scale_up: return; } evas-1.7.9/src/lib/engines/common/evas_cpu.c0000664000175000017500000001302612175475547015662 00000000000000#include "evas_common.h" #if defined BUILD_MMX || defined BUILD_SSE #include "evas_mmx.h" #endif #if defined BUILD_SSE3 #include #endif #if defined (HAVE_STRUCT_SIGACTION) && defined (HAVE_SIGLONGJMP) #include #include #include static sigjmp_buf detect_buf; #endif static int cpu_feature_mask = 0; #if defined (HAVE_STRUCT_SIGACTION) && defined (HAVE_SIGLONGJMP) static void evas_common_cpu_catch_ill(int sig); static void evas_common_cpu_catch_segv(int sig); static void evas_common_cpu_catch_ill(int sig __UNUSED__) { siglongjmp(detect_buf, 1); } static void evas_common_cpu_catch_segv(int sig __UNUSED__) { siglongjmp(detect_buf, 1); } #endif void evas_common_cpu_mmx_test(void) { #ifdef BUILD_MMX pxor_r2r(mm4, mm4); #endif } void evas_common_cpu_mmx2_test(void) { #ifdef BUILD_MMX char data[16]; data[0] = 0; mmx_r2m(movntq, mm0, data); data[0] = 0; #endif } void evas_common_cpu_sse_test(void) { #ifdef BUILD_SSE int blah[16]; movntq_r2m(mm0, blah); #endif } void evas_common_op_sse3_test(void); void evas_common_cpu_sse3_test(void) { #ifdef BUILD_SSE3 evas_common_op_sse3_test(); #endif } #ifdef BUILD_ALTIVEC void evas_common_cpu_altivec_test(void) { #ifdef __POWERPC__ #ifdef __VEC__ vector unsigned int zero; zero = vec_splat_u32(0); #endif /* __VEC__ */ #endif /* __POWERPC__ */ } #endif /* BUILD_ALTIVEC */ void evas_common_cpu_neon_test(void) { //#if defined(__ARM_ARCH__) && (__ARM_ARCH__ >= 70) #ifdef BUILD_NEON asm volatile ( ".fpu neon \n\t" "vqadd.u8 d0, d1, d0\n" : /* Out */ : /* In */ : /* Clobbered */ "d0", "d1" ); #endif //#endif } void evas_common_cpu_vis_test(void) { #ifdef __SPARC__ #endif /* __SPARC__ */ } int evas_common_cpu_feature_test(void (*feature)(void)) { #if defined (HAVE_STRUCT_SIGACTION) && defined (HAVE_SIGLONGJMP) int enabled = 1; struct sigaction act, oact, oact2; act.sa_handler = evas_common_cpu_catch_ill; act.sa_flags = SA_RESTART; sigemptyset(&act.sa_mask); sigaction(SIGILL, &act, &oact); act.sa_handler = evas_common_cpu_catch_segv; act.sa_flags = SA_RESTART; sigemptyset(&act.sa_mask); sigaction(SIGSEGV, &act, &oact2); if (sigsetjmp(detect_buf, 1)) { sigaction(SIGILL, &oact, NULL); sigaction(SIGSEGV, &oact2, NULL); return 0; } feature(); sigaction(SIGILL, &oact, NULL); sigaction(SIGSEGV, &oact2, NULL); return enabled; #else return 0; #endif } EAPI void evas_common_cpu_init(void) { static int called = 0; if (called) return; called = 1; #ifdef BUILD_MMX cpu_feature_mask |= CPU_FEATURE_MMX * evas_common_cpu_feature_test(evas_common_cpu_mmx_test); evas_common_cpu_end_opt(); if (getenv("EVAS_CPU_NO_MMX")) cpu_feature_mask &= ~CPU_FEATURE_MMX; cpu_feature_mask |= CPU_FEATURE_MMX2 * evas_common_cpu_feature_test(evas_common_cpu_mmx2_test); evas_common_cpu_end_opt(); if (getenv("EVAS_CPU_NO_MMX2")) cpu_feature_mask &= ~CPU_FEATURE_MMX2; #ifdef BUILD_SSE cpu_feature_mask |= CPU_FEATURE_SSE * evas_common_cpu_feature_test(evas_common_cpu_sse_test); evas_common_cpu_end_opt(); if (getenv("EVAS_CPU_NO_SSE")) cpu_feature_mask &= ~CPU_FEATURE_SSE; #ifdef BUILD_SSE3 cpu_feature_mask |= CPU_FEATURE_SSE3 * evas_common_cpu_feature_test(evas_common_cpu_sse3_test); evas_common_cpu_end_opt(); if (getenv("EVAS_CPU_NO_SSE3")) cpu_feature_mask &= ~CPU_FEATURE_SSE3; #endif /* BUILD_SSE3 */ #endif /* BUILD_SSE */ #endif /* BUILD_MMX */ #ifdef BUILD_ALTIVEC #ifdef __POWERPC__ #ifdef __VEC__ cpu_feature_mask |= CPU_FEATURE_ALTIVEC * evas_common_cpu_feature_test(evas_common_cpu_altivec_test); evas_common_cpu_end_opt(); if (getenv("EVAS_CPU_NO_ALTIVEC")) cpu_feature_mask &= ~CPU_FEATURE_ALTIVEC; #endif /* __VEC__ */ #endif /* __POWERPC__ */ #endif /* BUILD_ALTIVEC */ #ifdef __SPARC__ cpu_feature_mask |= CPU_FEATURE_VIS * evas_common_cpu_feature_test(evas_common_cpu_vis_test); evas_common_cpu_end_opt(); if (getenv("EVAS_CPU_NO_VIS")) cpu_feature_mask &= ~CPU_FEATURE_VIS; #endif /* __SPARC__ */ #if defined(__ARM_ARCH__) #ifdef BUILD_NEON cpu_feature_mask |= CPU_FEATURE_NEON * evas_common_cpu_feature_test(evas_common_cpu_neon_test); evas_common_cpu_end_opt(); if (getenv("EVAS_CPU_NO_NEON")) cpu_feature_mask &= ~CPU_FEATURE_NEON; #endif #endif } int evas_common_cpu_has_feature(unsigned int feature) { return (cpu_feature_mask & feature); } int evas_common_cpu_have_cpuid(void) { return 0; /* #ifdef BUILD_MMX unsigned int have_cpu_id; have_cpu_id = 0; have_cpuid(have_cpu_id); return have_cpu_id; #else return 0; #endif */ } EAPI void evas_common_cpu_can_do(int *mmx, int *sse, int *sse2) { static int do_mmx = 0, do_sse = 0, do_sse2 = 0, done = 0; if (!done) { # ifdef HARD_CODED_P3 cpu_feature_mask |= CPU_FEATURE_MMX; cpu_feature_mask |= CPU_FEATURE_SSE; #endif #ifdef HARD_CODED_P2 cpu_feature_mask |= CPU_FEATURE_MMX; #endif if (cpu_feature_mask & CPU_FEATURE_MMX) do_mmx = 1; if (cpu_feature_mask & CPU_FEATURE_MMX2) do_sse = 1; if (cpu_feature_mask & CPU_FEATURE_SSE) do_sse = 1; } // INF("%i %i %i", do_mmx, do_sse, do_sse2); *mmx = do_mmx; *sse = do_sse; *sse2 = do_sse2; done = 1; } #ifdef BUILD_MMX EAPI void evas_common_cpu_end_opt(void) { if (cpu_feature_mask & (CPU_FEATURE_MMX | CPU_FEATURE_MMX2)) { emms(); } } #else EAPI void evas_common_cpu_end_opt(void) { } #endif evas-1.7.9/src/lib/engines/common/evas_convert_yuv.c0000664000175000017500000010525412175475547017463 00000000000000#include "evas_common.h" #include "evas_convert_yuv.h" #if defined BUILD_MMX || defined BUILD_SSE # include "evas_mmx.h" #endif #if defined HAVE_ALTIVEC_H # include #ifdef CONFIG_DARWIN #define AVV(x...) (x) #else #define AVV(x...) {x} #endif #endif #ifdef BUILD_CONVERT_YUV static void _evas_yuv_init (void); static void _evas_yv12torgb_sse (unsigned char **yuv, unsigned char *rgb, int w, int h); static void _evas_yv12torgb_mmx (unsigned char **yuv, unsigned char *rgb, int w, int h); #ifdef BUILD_ALTIVEC static void _evas_yv12torgb_altivec(unsigned char **yuv, unsigned char *rgb, int w, int h); static void _evas_yv12torgb_diz (unsigned char **yuv, unsigned char *rgb, int w, int h); #endif static void _evas_yv12torgb_raster (unsigned char **yuv, unsigned char *rgb, int w, int h); static void _evas_yuy2torgb_raster (unsigned char **yuv, unsigned char *rgb, int w, int h); static void _evas_nv12torgb_raster (unsigned char **yuv, unsigned char *rgb, int w, int h); static void _evas_nv12tiledtorgb_raster(unsigned char **yuv, unsigned char *rgb, int w, int h); #define CRV 104595 #define CBU 132251 #define CGU 25624 #define CGV 53280 #define YMUL 76283 #define OFF 32768 #define BITRES 16 /* calculation float resolution in bits */ /* ie RES = 6 is 10.6 fixed point */ /* RES = 8 is 8.8 fixed point */ /* RES = 4 is 12.4 fixed point */ /* NB: going above 6 will lead to overflow... :( */ #define RES 6 #define RZ(i) (i >> (BITRES - RES)) #define FOUR(i) {i, i, i, i} #if defined BUILD_MMX || defined BUILD_SSE __attribute__ ((aligned (8))) const volatile unsigned short _const_crvcrv[4] = FOUR(RZ(CRV)); __attribute__ ((aligned (8))) const volatile unsigned short _const_cbucbu[4] = FOUR(RZ(CBU)); __attribute__ ((aligned (8))) const volatile unsigned short _const_cgucgu[4] = FOUR(RZ(CGU)); __attribute__ ((aligned (8))) const volatile unsigned short _const_cgvcgv[4] = FOUR(RZ(CGV)); __attribute__ ((aligned (8))) const volatile unsigned short _const_ymul [4] = FOUR(RZ(YMUL)); __attribute__ ((aligned (8))) const volatile unsigned short _const_128 [4] = FOUR(128); __attribute__ ((aligned (8))) const volatile unsigned short _const_32 [4] = FOUR(RZ(OFF)); __attribute__ ((aligned (8))) const volatile unsigned short _const_16 [4] = FOUR(16); __attribute__ ((aligned (8))) const volatile unsigned short _const_ff [4] = FOUR(-1); #define CONST_CRVCRV *_const_crvcrv #define CONST_CBUCBU *_const_cbucbu #define CONST_CGUCGU *_const_cgucgu #define CONST_CGVCGV *_const_cgvcgv #define CONST_YMUL *_const_ymul #define CONST_128 *_const_128 #define CONST_32 *_const_32 #define CONST_16 *_const_16 #define CONST_FF *_const_ff /* for C non aligned cleanup */ const int _crv = RZ(CRV); /* 1.596 */ const int _cbu = RZ(CBU); /* 2.018 */ const int _cgu = RZ(CGU); /* 0.391 */ const int _cgv = RZ(CGV); /* 0.813 */ #endif #ifdef BUILD_ALTIVEC #ifdef __VEC__ const vector unsigned short res = AVV(RES); const vector signed short crv = AVV(RZ(CRV)); const vector signed short cbu = AVV(RZ(CBU)); const vector signed short cgu = AVV(RZ(CGU)); const vector signed short cgv = AVV(RZ(CGV)); const vector signed short ymul = AVV(RZ(YMUL)); const vector signed short c128 = AVV(128); const vector signed short c32 = AVV(RZ(OFF)); const vector signed short c16 = AVV(16); const vector unsigned char zero = AVV(0); const vector signed short maxchar = AVV(255); const vector unsigned char pickrg1 = AVV(0, 0x1, 0x11, 0, 0, 0x3, 0x13, 0, 0, 0x5, 0x15, 0, 0, 0x7, 0x17, 0); const vector unsigned char pickrg2 = AVV(0, 0x9, 0x19, 0, 0, 0xb, 0x1b, 0, 0, 0xd, 0x1d, 0, 0, 0xf, 0x1f, 0); const vector unsigned char pickrgb1 = AVV(0x3, 0x1, 0x2, 0x11, 0x7, 0x5, 0x6, 0x13, 0xb, 0x9, 0xa, 0x15, 0xf, 0xd, 0xe, 0x17); const vector unsigned char pickrgb2 = AVV(0x3, 0x1, 0x2, 0x19, 0x7, 0x5, 0x6, 0x1b, 0xb, 0x9, 0xa, 0x1d, 0xf, 0xd, 0xe, 0x1f); #endif #endif #ifdef BUILD_C /* shortcut speedup lookup-tables */ static short _v1164[256]; static short _v1596[256]; static short _v813[256]; static short _v391[256]; static short _v2018[256]; static unsigned char _clip_lut[1024]; #define LUT_CLIP(i) ((_clip_lut+384)[(i)]) #define CMP_CLIP(i) ((i&256)? (~(i>>10)) : i); static int initted = 0; #endif void evas_common_convert_yuv_420p_601_rgba(DATA8 **src, DATA8 *dst, int w, int h) { int mmx, sse, sse2; #if defined BUILD_MMX || defined BUILD_SSE evas_common_cpu_can_do(&mmx, &sse, &sse2); #endif #ifndef BUILD_SSE sse = 0; sse2 = 0; #endif #ifndef BUILD_MMX mmx = 0; #endif if (evas_common_cpu_has_feature(CPU_FEATURE_MMX2)) _evas_yv12torgb_sse(src, dst, w, h); else if (evas_common_cpu_has_feature(CPU_FEATURE_MMX)) _evas_yv12torgb_mmx(src, dst, w, h); #ifdef BUILD_ALTIVEC if (evas_common_cpu_has_feature(CPU_FEATURE_ALTIVEC)) _evas_yv12torgb_altivec(src, dst, w, h); #endif else { #ifdef BUILD_C if (!initted) _evas_yuv_init(); initted = 1; /* FIXME: diz may be faster sometimes */ _evas_yv12torgb_raster(src, dst, w, h); #endif } } /* Thanks to Diz for this code. i've munged it a little and turned it into */ /* inline macros. I tried beating it with a different algorithm using MMX */ /* but failed. So here we are. This is the fastest YUV->RGB i know of for */ /* x86. It has an issue that it doesn't convert colours accurately so the */ /* image looks a little "yellowy". This is a result of only 10.6 fixed point */ /* resolution as opposed to 16.16 in the C code. This could be fixed by */ /* processing half the number of pixels per cycle and going up to 32bits */ /* per element during compute, but it would all but negate the speedup */ /* from mmx I think :( It might be possible to use SSE and SSE2 here, but */ /* I haven't tried yet. Let's see. */ /* NB: XviD has almost the same code in it's assembly YV12->RGB code. same */ /* algorithm, same constants, same all over actually, except it actually */ /* does a few extra memory accesses that this one doesn't, so in theory */ /* this code should be faster. In the end it's all just an mmx version of */ /* the reference implimentation done with fixed point math */ static void _evas_yv12torgb_sse(unsigned char **yuv, unsigned char *rgb, int w, int h) { #ifdef BUILD_SSE int xx, yy; register unsigned char *yp1, *up, *vp; unsigned char *dp1; /* destination pointers */ dp1 = rgb; for (yy = 0; yy < h; yy++) { /* plane pointers */ yp1 = yuv[yy]; up = yuv[h + (yy / 2)]; vp = yuv[h + (h / 2) + (yy / 2)]; for (xx = 0; xx < (w - 7); xx += 8) { movd_m2r(*up, mm3); movd_m2r(*vp, mm2); movq_m2r(*yp1, mm0); pxor_r2r(mm7, mm7); punpcklbw_r2r(mm7, mm2); punpcklbw_r2r(mm7, mm3); movq_r2r(mm0, mm1); psrlw_i2r(8, mm0); psllw_i2r(8, mm1); psrlw_i2r(8, mm1); movq_m2r(CONST_16, mm4); psubsw_r2r(mm4, mm0); psubsw_r2r(mm4, mm1); movq_m2r(CONST_128, mm5); psubsw_r2r(mm5, mm2); psubsw_r2r(mm5, mm3); movq_m2r(CONST_YMUL, mm4); pmullw_r2r(mm4, mm0); pmullw_r2r(mm4, mm1); movq_m2r(CONST_CRVCRV, mm7); pmullw_r2r(mm3, mm7); movq_m2r(CONST_CBUCBU, mm6); pmullw_r2r(mm2, mm6); movq_m2r(CONST_CGUCGU, mm5); pmullw_r2r(mm2, mm5); movq_m2r(CONST_CGVCGV, mm4); pmullw_r2r(mm3, mm4); movq_r2r(mm0, mm2); paddsw_r2r(mm7, mm2); paddsw_r2r(mm1, mm7); psraw_i2r(RES, mm2); psraw_i2r(RES, mm7); packuswb_r2r(mm7, mm2); pxor_r2r(mm7, mm7); movq_r2r(mm2, mm3); punpckhbw_r2r(mm7, mm2); punpcklbw_r2r(mm3, mm7); por_r2r(mm7, mm2); movq_r2r(mm0, mm3); psubsw_r2r(mm5, mm3); psubsw_r2r(mm4, mm3); paddsw_m2r(CONST_32, mm3); movq_r2r(mm1, mm7); psubsw_r2r(mm5, mm7); psubsw_r2r(mm4, mm7); paddsw_m2r(CONST_32, mm7); psraw_i2r(RES, mm3); psraw_i2r(RES, mm7); packuswb_r2r(mm7, mm3); pxor_r2r(mm7, mm7); movq_r2r(mm3, mm4); punpckhbw_r2r(mm7, mm3); punpcklbw_r2r(mm4, mm7); por_r2r(mm7, mm3); movq_m2r(CONST_32, mm4); paddsw_r2r(mm6, mm0); paddsw_r2r(mm6, mm1); paddsw_r2r(mm4, mm0); paddsw_r2r(mm4, mm1); psraw_i2r(RES, mm0); psraw_i2r(RES, mm1); packuswb_r2r(mm1, mm0); pxor_r2r(mm7, mm7); movq_r2r(mm0, mm5); punpckhbw_r2r(mm7, mm0); punpcklbw_r2r(mm5, mm7); por_r2r(mm7, mm0); movq_m2r(CONST_FF, mm1); movq_r2r(mm0, mm5); movq_r2r(mm3, mm6); movq_r2r(mm2, mm7); punpckhbw_r2r(mm3, mm2); punpcklbw_r2r(mm6, mm7); punpckhbw_r2r(mm1, mm0); punpcklbw_r2r(mm1, mm5); movq_r2r(mm7, mm1); punpckhwd_r2r(mm5, mm7); punpcklwd_r2r(mm5, mm1); movq_r2r(mm2, mm4); punpckhwd_r2r(mm0, mm2); punpcklwd_r2r(mm0, mm4); movntq_r2m(mm1, *(dp1)); movntq_r2m(mm7, *(dp1 + 8)); movntq_r2m(mm4, *(dp1 + 16)); movntq_r2m(mm2, *(dp1 + 24)); yp1 += 8; up += 4; vp += 4; dp1 += 8 * 4; } /* cleanup pixles that arent a multiple of 8 pixels wide */ if (xx < w) { int y, u, v, r, g, b; for (; xx < w; xx += 2) { u = (*up++) - 128; v = (*vp++) - 128; y = RZ(YMUL) * ((*yp1++) - 16); r = LUT_CLIP((y + (_crv * v)) >> RES); g = LUT_CLIP((y - (_cgu * u) - (_cgv * v) + RZ(OFF)) >> RES); b = LUT_CLIP((y + (_cbu * u) + RZ(OFF)) >> RES); *((DATA32 *) dp1) = 0xff000000 + RGB_JOIN(r,g,b); dp1 += 4; y = RZ(YMUL) * ((*yp1++) - 16); r = LUT_CLIP((y + (_crv * v)) >> RES); g = LUT_CLIP((y - (_cgu * u) - (_cgv * v) + RZ(OFF)) >> RES); b = LUT_CLIP((y + (_cbu * u) + RZ(OFF)) >> RES); *((DATA32 *) dp1) = 0xff000000 + RGB_JOIN(r,g,b); dp1 += 4; } } } emms(); #else _evas_yv12torgb_mmx(yuv, rgb, w, h); #endif } static void _evas_yv12torgb_mmx(unsigned char **yuv, unsigned char *rgb, int w, int h) { #ifdef BUILD_MMX int xx, yy; register unsigned char *yp1, *up, *vp; unsigned char *dp1; /* destination pointers */ dp1 = rgb; for (yy = 0; yy < h; yy++) { /* plane pointers */ yp1 = yuv[yy]; up = yuv[h + (yy / 2)]; vp = yuv[h + (h / 2) + (yy / 2)]; for (xx = 0; xx < (w - 7); xx += 8) { movd_m2r(*up, mm3); movd_m2r(*vp, mm2); movq_m2r(*yp1, mm0); pxor_r2r(mm7, mm7); punpcklbw_r2r(mm7, mm2); punpcklbw_r2r(mm7, mm3); movq_r2r(mm0, mm1); psrlw_i2r(8, mm0); psllw_i2r(8, mm1); psrlw_i2r(8, mm1); movq_m2r(CONST_16, mm4); psubsw_r2r(mm4, mm0); psubsw_r2r(mm4, mm1); movq_m2r(CONST_128, mm5); psubsw_r2r(mm5, mm2); psubsw_r2r(mm5, mm3); movq_m2r(CONST_YMUL, mm4); pmullw_r2r(mm4, mm0); pmullw_r2r(mm4, mm1); movq_m2r(CONST_CRVCRV, mm7); pmullw_r2r(mm3, mm7); movq_m2r(CONST_CBUCBU, mm6); pmullw_r2r(mm2, mm6); movq_m2r(CONST_CGUCGU, mm5); pmullw_r2r(mm2, mm5); movq_m2r(CONST_CGVCGV, mm4); pmullw_r2r(mm3, mm4); movq_r2r(mm0, mm2); paddsw_r2r(mm7, mm2); paddsw_r2r(mm1, mm7); psraw_i2r(RES, mm2); psraw_i2r(RES, mm7); packuswb_r2r(mm7, mm2); pxor_r2r(mm7, mm7); movq_r2r(mm2, mm3); punpckhbw_r2r(mm7, mm2); punpcklbw_r2r(mm3, mm7); por_r2r(mm7, mm2); movq_r2r(mm0, mm3); psubsw_r2r(mm5, mm3); psubsw_r2r(mm4, mm3); paddsw_m2r(CONST_32, mm3); movq_r2r(mm1, mm7); psubsw_r2r(mm5, mm7); psubsw_r2r(mm4, mm7); paddsw_m2r(CONST_32, mm7); psraw_i2r(RES, mm3); psraw_i2r(RES, mm7); packuswb_r2r(mm7, mm3); pxor_r2r(mm7, mm7); movq_r2r(mm3, mm4); punpckhbw_r2r(mm7, mm3); punpcklbw_r2r(mm4, mm7); por_r2r(mm7, mm3); movq_m2r(CONST_32, mm4); paddsw_r2r(mm6, mm0); paddsw_r2r(mm6, mm1); paddsw_r2r(mm4, mm0); paddsw_r2r(mm4, mm1); psraw_i2r(RES, mm0); psraw_i2r(RES, mm1); packuswb_r2r(mm1, mm0); pxor_r2r(mm7, mm7); movq_r2r(mm0, mm5); punpckhbw_r2r(mm7, mm0); punpcklbw_r2r(mm5, mm7); por_r2r(mm7, mm0); movq_m2r(CONST_FF, mm1); movq_r2r(mm0, mm5); movq_r2r(mm3, mm6); movq_r2r(mm2, mm7); punpckhbw_r2r(mm3, mm2); punpcklbw_r2r(mm6, mm7); punpckhbw_r2r(mm1, mm0); punpcklbw_r2r(mm1, mm5); movq_r2r(mm7, mm1); punpckhwd_r2r(mm5, mm7); punpcklwd_r2r(mm5, mm1); movq_r2r(mm2, mm4); punpckhwd_r2r(mm0, mm2); punpcklwd_r2r(mm0, mm4); movq_r2m(mm1, *(dp1)); movq_r2m(mm7, *(dp1 + 8)); movq_r2m(mm4, *(dp1 + 16)); movq_r2m(mm2, *(dp1 + 24)); yp1 += 8; up += 4; vp += 4; dp1 += 8 * 4; } /* cleanup pixles that arent a multiple of 8 pixels wide */ if (xx < w) { int y, u, v, r, g, b; for (; xx < w; xx += 2) { u = (*up++) - 128; v = (*vp++) - 128; y = RZ(YMUL) * ((*yp1++) - 16); r = LUT_CLIP((y + (_crv * v)) >> RES); g = LUT_CLIP((y - (_cgu * u) - (_cgv * v) + RZ(OFF)) >> RES); b = LUT_CLIP((y + (_cbu * u) + RZ(OFF)) >> RES); *((DATA32 *) dp1) = 0xff000000 + RGB_JOIN(r,g,b); dp1 += 4; y = RZ(YMUL) * ((*yp1++) - 16); r = LUT_CLIP((y + (_crv * v)) >> RES); g = LUT_CLIP((y - (_cgu * u) - (_cgv * v) + RZ(OFF)) >> RES); b = LUT_CLIP((y + (_cbu * u) + RZ(OFF)) >> RES); *((DATA32 *) dp1) = 0xff000000 + RGB_JOIN(r,g,b); dp1 += 4; } } } emms(); #else _evas_yv12torgb_raster(yuv, rgb, w, h); #endif } #ifdef BUILD_ALTIVEC static void _evas_yv12torgb_altivec(unsigned char **yuv, unsigned char *rgb, int w, int h) { #ifdef __VEC__ int xx, yy; int w2, h2; unsigned char *yp1, *yp2, *up, *vp; unsigned char *dp1, *dp2; vector signed short y, u, v; vector signed short r, g, b; vector signed short tmp1, tmp2, tmp3; vector unsigned char yperm, uperm, vperm, rgb1, rgb2; vector unsigned char alpha; /* handy halved w & h */ w2 = w / 2; h2 = h / 2; /* plane pointers */ yp1 = yuv; yp2 = yuv + w; up = yuv + (w * h); vp = up + (w2 * h2); /* destination pointers */ dp1 = rgb; dp2 = rgb + (w * 4); alpha = vec_mergeh((vector unsigned char)AVV(255), zero); alpha = (vector unsigned char)vec_mergeh((vector unsigned short)alpha, (vector unsigned short)zero); for (yy = 0; yy < h2; yy++) { for (xx = 0; xx < w2; xx += 4) { /* Cycles */ /* * Load 4 y and 4 u & v pixels for the 8x2 pixel block. */ /* 3 */ tmp3 = (vector signed short)vec_lde(0, (unsigned int *)yp1); /* 3 */ tmp1 = (vector signed short)vec_lde(0, (unsigned int *)up); /* 3 */ tmp2 = (vector signed short)vec_lde(0, (unsigned int *)vp); /* Prepare for aligning the data in their vectors */ /* 3 */ yperm = vec_lvsl(0, yp1); /* 3 */ uperm = vec_lvsl(0, up); /* 3 */ vperm = vec_lvsl(0, vp); yp1 += 4; /* Save y and load the next 4 y pixels for a total of 8 */ /* 2 */ y = vec_perm(tmp3, tmp3, yperm); /* 3 */ tmp3 = (vector signed short)vec_lde(0, (unsigned int *)yp1); /* Setup and calculate the 4 u pixels */ /* 2 */ tmp1 = vec_perm(tmp1, tmp1, uperm); /* 2 */ tmp2 = vec_perm(tmp2, tmp2, vperm); /* Avoid dependency stalls on yperm and calculate the 4 u values */ /* 3 */ yperm = vec_lvsr(12, yp1); /* 1 */ tmp1 = (vector signed short)vec_mergeh((vector unsigned char)tmp1, (vector unsigned char)tmp1); /* 1 */ u = (vector signed short)vec_mergeh(zero, (vector unsigned char)tmp1); /* 1 */ u = vec_sub(u, c128); /* 2 */ tmp3 = vec_perm(tmp3, tmp3, yperm); /* Setup and calculate the 4 v values */ /* 1 */ tmp2 = (vector signed short)vec_mergeh((vector unsigned char)tmp2, (vector unsigned char)tmp2); /* 1 */ v = (vector signed short)vec_mergeh(zero, (vector unsigned char)tmp2); /* 4 */ tmp2 = vec_mladd(cgu, u, (vector signed short)zero); /* 1 */ v = vec_sub(v, c128); /* Move the data into y and start loading the next 4 pixels */ /* 1 */ y = (vector signed short)vec_mergeh(zero, (vector unsigned char)y); /* 1 */ tmp3 = (vector signed short)vec_mergeh(zero, (vector unsigned char)tmp3); /* 1 */ y = vec_or(y, tmp3); /* Finish calculating y */ /* 1 */ y = vec_sub(y, c16); /* 4 */ y = vec_mladd(ymul, y, (vector signed short)zero); /* Perform non-dependent multiplies first. */ /* 4 */ tmp1 = vec_mladd(crv, v, y); /* 4 */ tmp2 = vec_mladd(cgv, v, tmp2); /* 4 */ tmp3 = vec_mladd(cbu, u, y); /* Calculate rgb values */ /* 1 */ r = vec_sra(tmp1, res); /* 1 */ tmp2 = vec_sub(y, tmp2); /* 1 */ tmp2 = vec_add(tmp2, c32); /* 1 */ g = vec_sra(tmp2, res); /* 1 */ tmp3 = vec_add(tmp3, c32); /* 1 */ b = vec_sra(tmp3, res); /* Bound to 0 <= x <= 255 */ /* 1 */ r = vec_min(r, maxchar); /* 1 */ g = vec_min(g, maxchar); /* 1 */ b = vec_min(b, maxchar); /* 1 */ r = vec_max(r, (vector signed short)zero); /* 1 */ g = vec_max(g, (vector signed short)zero); /* 1 */ b = vec_max(b, (vector signed short)zero); /* Combine r, g and b. */ /* 2 */ rgb1 = vec_perm((vector unsigned char)r, (vector unsigned char)g, pickrg1); /* 2 */ rgb2 = vec_perm((vector unsigned char)r, (vector unsigned char)g, pickrg2); /* 2 */ rgb1 = vec_perm(rgb1, (vector unsigned char)b, pickrgb1); /* 2 */ rgb2 = vec_perm(rgb2, (vector unsigned char)b, pickrgb2); /* 1 */ rgb1 = vec_or(alpha, rgb1); /* 1 */ rgb2 = vec_or(alpha, rgb2); /* 3 */ vec_stl(rgb1, 0, dp1); dp1 += 16; /* 3 */ vec_stl(rgb2, 0, dp1); /* * Begin the second row calculations */ /* * Load 4 y pixels for the 8x2 pixel block. */ /* 3 */ yperm = vec_lvsl(0, yp2); /* 3 */ tmp3 = (vector signed short)vec_lde(0, (unsigned int *)yp2); yp2 += 4; /* Save y and load the next 4 y pixels for a total of 8 */ /* 2 */ y = vec_perm(tmp3, tmp3, yperm); /* 3 */ yperm = vec_lvsr(12, yp2); /* 3 */ tmp3 = (vector signed short)vec_lde(0, (unsigned int *)yp2); /* 1 */ y = (vector signed short)vec_mergeh(zero, (vector unsigned char)y); /* Avoid dependency stalls on yperm */ /* 2 */ tmp3 = vec_perm(tmp3, tmp3, yperm); /* 1 */ tmp3 = (vector signed short)vec_mergeh(zero, (vector unsigned char)tmp3); /* 1 */ y = vec_or(y, tmp3); /* Start the calculation for g */ /* 4 */ tmp2 = vec_mladd(cgu, u, (vector signed short)zero); /* Finish calculating y */ /* 1 */ y = vec_sub(y, c16); /* 4 */ y = vec_mladd(ymul, y, (vector signed short)zero); /* Perform non-dependent multiplies first. */ /* 4 */ tmp2 = vec_mladd(cgv, v, tmp2); /* 4 */ tmp1 = vec_mladd(crv, v, y); /* 4 */ tmp3 = vec_mladd(cbu, u, y); /* Calculate rgb values */ /* 1 */ r = vec_sra(tmp1, res); /* 1 */ tmp2 = vec_sub(y, tmp2); /* 1 */ tmp2 = vec_add(tmp2, c32); /* 1 */ g = vec_sra(tmp2, res); /* 1 */ tmp3 = vec_add(tmp3, c32); /* 1 */ b = vec_sra(tmp3, res); /* Bound to 0 <= x <= 255 */ /* 1 */ r = vec_min(r, maxchar); /* 1 */ g = vec_min(g, maxchar); /* 1 */ b = vec_min(b, maxchar); /* 1 */ r = vec_max(r, (vector signed short)zero); /* 1 */ g = vec_max(g, (vector signed short)zero); /* 1 */ b = vec_max(b, (vector signed short)zero); /* Combine r, g and b. */ /* 2 */ rgb1 = vec_perm((vector unsigned char)r, (vector unsigned char)g, pickrg1); /* 2 */ rgb2 = vec_perm((vector unsigned char)r, (vector unsigned char)g, pickrg2); /* 2 */ rgb1 = vec_perm(rgb1, (vector unsigned char)b, pickrgb1); /* 2 */ rgb2 = vec_perm(rgb2, (vector unsigned char)b, pickrgb2); /* 1 */ rgb1 = vec_or(alpha, rgb1); /* 1 */ rgb2 = vec_or(alpha, rgb2); /* 3 */ vec_stl(rgb1, 0, dp2); dp2 += 16; /* 3 */ vec_stl(rgb2, 0, dp2); /* Increment the YUV data pointers to the next set of pixels. */ yp1 += 4; yp2 += 4; up += 4; vp += 4; /* Move the destination pointers to the next set of pixels. */ dp1 += 16; dp2 += 16; } /* jump down one line since we are doing 2 at once */ yp1 += w; yp2 += w; dp1 += (w * 4); dp2 += (w * 4); } #else _evas_yv12torgb_diz(yuv, rgb, w, h); #endif } #endif static void _evas_yuv_init(void) { #ifdef BUILD_C int i; for (i = 0; i < 256; i++) { _v1164[i] = (int)(((float)(i - 16 )) * 1.164); _v1596[i] = (int)(((float)(i - 128)) * 1.596); _v813[i] = (int)(((float)(i - 128)) * 0.813); _v391[i] = (int)(((float)(i - 128)) * 0.391); _v2018[i] = (int)(((float)(i - 128)) * 2.018); } for (i = -384; i < 640; i++) { _clip_lut[i+384] = i < 0 ? 0 : (i > 255) ? 255 : i; } #endif } #ifdef BUILD_ALTIVEC static void _evas_yv12torgb_diz(unsigned char **yuv, unsigned char *rgb, int w, int h) { #ifdef BUILD_C int xx, yy; int y, u, v, r, g, b; unsigned char *yp1, *yp2, *up, *vp; unsigned char *dp1, *dp2; int crv, cbu, cgu, cgv; /* destination pointers */ dp1 = rgb; dp2 = rgb + (w * 4); crv = CRV; /* 1.596 */ cbu = CBU; /* 2.018 */ cgu = CGU; /* 0.391 */ cgv = CGV; /* 0.813 */ for (yy = 0; yy < h; yy += 2) { /* plane pointers */ yp1 = yuv[yy]; yp2 = yuv[yy + 1]; up = yuv[h + (yy / 2)]; vp = yuv[h + (h / 2) + (yy / 2)]; for (xx = 0; xx < w; xx += 2) { /* collect u & v for 2x2 pixel block */ u = (*up++) - 128; v = (*vp++) - 128; /* do the top 2 pixels of the 2x2 block which shared u & v */ /* yuv to rgb */ y = YMUL * ((*yp1++) - 16); r = LUT_CLIP((y + (crv * v)) >> 16); g = LUT_CLIP((y - (cgu * u) - (cgv * v) + OFF) >>16); b = LUT_CLIP((y + (cbu * u) + OFF) >> 16); *((DATA32 *) dp1) = 0xff000000 + RGB_JOIN(r,g,b); dp1 += 4; /* yuv to rgb */ y = YMUL * ((*yp1++) - 16); r = LUT_CLIP((y + (crv * v)) >> 16); g = LUT_CLIP((y - (cgu * u) - (cgv * v) + OFF) >>16); b = LUT_CLIP((y + (cbu * u) + OFF) >> 16); *((DATA32 *) dp1) = 0xff000000 + RGB_JOIN(r,g,b); dp1 += 4; /* do the bottom 2 pixels */ /* yuv to rgb */ y = YMUL * ((*yp2++) - 16); r = LUT_CLIP((y + (crv * v)) >> 16); g = LUT_CLIP((y - (cgu * u) - (cgv * v) + OFF) >>16); b = LUT_CLIP((y + (cbu * u) + OFF) >> 16); *((DATA32 *) dp2) = 0xff000000 + RGB_JOIN(r,g,b); dp2 += 4; /* yuv to rgb */ y = YMUL * ((*yp2++) - 16); r = LUT_CLIP((y + (crv * v)) >> 16); g = LUT_CLIP((y - (cgu * u) - (cgv * v) + OFF) >>16); b = LUT_CLIP((y + (cbu * u) + OFF) >> 16); *((DATA32 *) dp2) = 0xff000000 + RGB_JOIN(r,g,b); dp2 += 4; } /* jump down one line since we are doing 2 at once */ dp1 += (w * 4); dp2 += (w * 4); } #endif } #endif static void _evas_yv12torgb_raster(unsigned char **yuv, unsigned char *rgb, int w, int h) { #ifdef BUILD_C int xx, yy; int y, u, v; unsigned char *yp1, *yp2, *up, *vp; unsigned char *dp1, *dp2; /* destination pointers */ dp1 = rgb; dp2 = rgb + (w * 4); for (yy = 0; yy < h; yy += 2) { /* plane pointers */ yp1 = yuv[yy]; yp2 = yuv[yy + 1]; up = yuv[h + (yy / 2)]; vp = yuv[h + (h / 2) + (yy / 2)]; for (xx = 0; xx < w; xx += 2) { int vmu; /* collect u & v for 2x2 pixel block */ u = *up++; v = *vp++; /* save lookups */ vmu = _v813[v] + _v391[u]; u = _v2018[u]; v = _v1596[v]; /* do the top 2 pixels of the 2x2 block which shared u & v */ /* yuv to rgb */ y = _v1164[*yp1++]; *((DATA32 *) dp1) = 0xff000000 + RGB_JOIN(LUT_CLIP(y + v), LUT_CLIP(y - vmu), LUT_CLIP(y + u)); dp1 += 4; /* yuv to rgb */ y = _v1164[*yp1++]; *((DATA32 *) dp1) = 0xff000000 + RGB_JOIN(LUT_CLIP(y + v), LUT_CLIP(y - vmu), LUT_CLIP(y + u)); dp1 += 4; /* do the bottom 2 pixels */ /* yuv to rgb */ y = _v1164[*yp2++]; *((DATA32 *) dp2) = 0xff000000 + RGB_JOIN(LUT_CLIP(y + v), LUT_CLIP(y - vmu), LUT_CLIP(y + u)); dp2 += 4; /* yuv to rgb */ y = _v1164[*yp2++]; *((DATA32 *) dp2) = 0xff000000 + RGB_JOIN(LUT_CLIP(y + v), LUT_CLIP(y - vmu), LUT_CLIP(y + u)); dp2 += 4; } /* jump down one line since we are doing 2 at once */ dp1 += (w * 4); dp2 += (w * 4); } #endif } void evas_common_convert_yuv_422_601_rgba(DATA8 **src, DATA8 *dst, int w, int h) { #ifdef BUILD_C if (!initted) _evas_yuv_init(); initted = 1; _evas_yuy2torgb_raster(src, dst, w, h); #endif } void evas_common_convert_yuv_420_601_rgba(DATA8 **src, DATA8 *dst, int w, int h) { #ifdef BUILD_C if (!initted) _evas_yuv_init(); initted = 1; _evas_nv12torgb_raster(src, dst, w, h); #endif } void evas_common_convert_yuv_420T_601_rgba(DATA8 **src, DATA8 *dst, int w, int h) { #ifdef BUILD_C if (initted) _evas_yuv_init(); initted = 1; _evas_nv12tiledtorgb_raster(src, dst, w, h); #endif } static void _evas_yuy2torgb_raster(unsigned char **yuv, unsigned char *rgb, int w, int h) { #ifdef BUILD_C int xx, yy; int y, u, v; unsigned char *yp1, *yp2, *up, *vp; unsigned char *dp1; dp1 = rgb; /* destination pointers */ for (yy = 0; yy < h; yy++) { /* plane pointers */ unsigned char *line; line = yuv[yy]; yp1 = line + 0; up = line + 1; yp2 = line + 2; vp = line + 3; for (xx = 0; xx < w; xx += 2) { int vmu; /* collect u & v for 2 pixels block */ u = *up; v = *vp; /* save lookups */ vmu = _v813[v] + _v391[u]; u = _v2018[u]; v = _v1596[v]; /* do the top 2 pixels of the 2x2 block which shared u & v */ /* yuv to rgb */ y = _v1164[*yp1]; *((DATA32 *) dp1) = 0xff000000 + RGB_JOIN(LUT_CLIP(y + v), LUT_CLIP(y - vmu), LUT_CLIP(y + u)); dp1 += 4; /* yuv to rgb */ y = _v1164[*yp2]; *((DATA32 *) dp1) = 0xff000000 + RGB_JOIN(LUT_CLIP(y + v), LUT_CLIP(y - vmu), LUT_CLIP(y + u)); dp1 += 4; yp1 += 4; yp2 += 4; up += 4; vp += 4; } } #endif } #ifdef BUILD_C static inline void _evas_yuv2rgb_420_raster(unsigned char *yp1, unsigned char *yp2, unsigned char *up, unsigned char *vp, unsigned char *dp1, unsigned char *dp2) { int y, u, v; int vmu; int rgb; /* collect u & v for 4 pixels block */ u = *up; v = *vp; /* save lookups */ #ifdef MEM_BP vmu = _v813[v] + _v391[u]; u = _v2018[u]; v = _v1596[v]; #else u -= 128; v -= 128; vmu = v * CGV + u * CGU; u = u * CBU; v = v * CRV; #endif /* do the top 2 pixels of the 2x2 block which shared u & v */ /* yuv to rgb */ #ifdef MEM_BP y = _v1164[*yp1]; rgb = RGB_JOIN(LUT_CLIP(y + v), LUT_CLIP(y - vmu), LUT_CLIP(y + u)); #else y = (*yp1 - 16 ) * YMUL; rgb = RGB_JOIN(LUT_CLIP(((y + v) >> 16)), LUT_CLIP(((y - vmu + OFF) >> 16)), LUT_CLIP(((y + u + OFF) >> 16))); #endif *((DATA32 *) dp1) = 0xff000000 + rgb; dp1 += 4; yp1++; /* yuv to rgb */ #ifdef MEM_BP y = _v1164[*yp1]; rgb = RGB_JOIN(LUT_CLIP(y + v), LUT_CLIP(y - vmu), LUT_CLIP(y + u)); #else y = (*yp1 - 16 ) * YMUL; rgb = RGB_JOIN(LUT_CLIP(((y + v) >> 16)), LUT_CLIP(((y - vmu + OFF) >> 16)), LUT_CLIP(((y + u + OFF) >> 16))); #endif *((DATA32 *) dp1) = 0xff000000 + rgb; /* do the bottom 2 pixels of the 2x2 block which shared u & v */ /* yuv to rgb */ #ifdef MEM_BP y = _v1164[*yp2]; rgb = RGB_JOIN(LUT_CLIP(y + v), LUT_CLIP(y - vmu), LUT_CLIP(y + u)); #else y = (*yp2 - 16 ) * YMUL; rgb = RGB_JOIN(LUT_CLIP(((y + v) >> 16)), LUT_CLIP(((y - vmu + OFF) >> 16)), LUT_CLIP(((y + u + OFF) >> 16))); #endif *((DATA32 *) dp2) = 0xff000000 + rgb; dp2 += 4; yp2++; /* yuv to rgb */ #ifdef MEM_BP y = _v1164[*yp2]; rgb = RGB_JOIN(LUT_CLIP(y + v), LUT_CLIP(y - vmu), LUT_CLIP(y + u)); #else y = (*yp2 - 16 ) * YMUL; rgb = RGB_JOIN(LUT_CLIP(((y + v) >> 16)), LUT_CLIP(((y - vmu + OFF) >> 16)), LUT_CLIP(((y + u + OFF) >> 16))); #endif *((DATA32 *) dp2) = 0xff000000 + rgb; } #endif static void _evas_nv12tiledtorgb_raster(unsigned char **yuv, unsigned char *rgb, int w, int h) { #ifdef BUILD_C #define HANDLE_MACROBLOCK(YP1, YP2, UP, VP, DP1, DP2) \ { \ int i; \ int j; \ \ for (i = 0; i < 32; i += 2) \ { \ for (j = 0; j < 64; j += 2) \ { \ _evas_yuv2rgb_420_raster(YP1, YP2, UP, VP, DP1, DP2); \ \ /* the previous call just rendered 2 pixels per lines */ \ DP1 += 8; DP2 += 8; \ \ /* and took for that 2 lines with 2 Y, 1 U and 1 V. Don't forget U & V are in the same plane */ \ YP1 += 2; YP2 += 2; UP += 2; VP += 2; \ } \ \ DP1 += sizeof (int) * ((w << 1) - 64); \ DP2 += sizeof (int) * ((w << 1) - 64); \ YP1 += 64; \ YP2 += 64; \ } \ } /* One macro block is 32 lines of Y and 16 lines of UV */ const int offset_value[2] = { 0, 64 * 16 }; int mb_x, mb_y, mb_w, mb_h; int base_h; int uv_x, uv_step; int stride; /* Idea iterate over each macroblock and convert each of them using _evas_nv12torgb_raster */ /* The layout of the Y macroblock order in RGB non tiled space : */ /* --------------------------------------------------- */ /* | 0 | 1 | 6 | 7 | 8 | 9 | 14 | 15 | 16 | 17 | */ /* --------------------------------------------------- */ /* | 2 | 3 | 4 | 5 | 10 | 11 | 12 | 13 | 18 | 19 | */ /* --------------------------------------------------- */ /* | 20 | 21 | 26 | 27 | 28 | 29 | 34 | 35 | 36 | 37 | */ /* --------------------------------------------------- */ /* | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 38 | 39 | */ /* --------------------------------------------------- */ /* | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | */ /* --------------------------------------------------- */ /* The layout of the UV macroblock order in the same RGB non tiled space : */ /* --------------------------------------------------- */ /* | | | | | | | | | | | */ /* - 0 - 1 - 6 - 7 - 8 - 9 - 14 - 15 - 16 - 17 - */ /* | | | | | | | | | | | */ /* --------------------------------------------------- */ /* | | | | | | | | | | | */ /* - 2 - 3 - 4 - 5 - 10 - 11 - 12 - 13 - 18 - 19 - */ /* | | | | | | | | | | | */ /* --------------------------------------------------- */ /* | | | | | | | | | | | */ /* - 20 - 21 - 22 - 22 - 23 - 24 - 25 - 26 - 27 - 28 - */ /* the number of macroblock should be a multiple of 64x32 */ mb_w = w / 64; mb_h = h / 32; base_h = (mb_h >> 1) + (mb_h & 0x1); stride = w * sizeof (int); uv_x = 0; /* In this format we linearize macroblock on two line to form a Z and it's invert */ for (mb_y = 0; mb_y < (mb_h >> 1); mb_y++) { int step = 2; int offset = 0; int x = 0; int rmb_x = 0; int ry[2]; ry[0] = mb_y * 2 * 32 * stride; ry[1] = ry[0] + 32 * stride; uv_step = (mb_y & 0x1) == 0 ? 4 : 0; uv_x = (mb_y & 0x1) == 0 ? 0 : 2 * 64 * 32; for (mb_x = 0; mb_x < mb_w * 2; mb_x++, rmb_x += 64 * 32) { unsigned char *yp1, *yp2, *up, *vp; unsigned char *dp1, *dp2; dp1 = rgb + x + ry[offset]; dp2 = dp1 + stride; yp1 = yuv[mb_y] + rmb_x; yp2 = yp1 + 64; /* UV plane is two time less bigger in pixel count, but it old two bytes each times */ up = yuv[(mb_y >> 1) + base_h] + uv_x + offset_value[offset]; vp = up + 1; HANDLE_MACROBLOCK(yp1, yp2, up, vp, dp1, dp2); step++; if ((step & 0x3) == 0) { offset = 1 - offset; x -= 64 * sizeof (int); uv_x -= 64 * 32; } else { x += 64 * sizeof (int); uv_x += 64 * 32; } uv_step++; if (uv_step == 8) { uv_step = 0; uv_x += 4 * 64 * 32; } } } if (mb_h & 0x1) { int x = 0; int ry; ry = mb_y << 1; uv_step = 0; uv_x = 0; for (mb_x = 0; mb_x < mb_w; mb_x++, x++, uv_x++) { unsigned char *yp1, *yp2, *up, *vp; unsigned char *dp1, *dp2; dp1 = rgb + (x * 64 + (ry * 32 * w)) * sizeof (int); dp2 = dp1 + sizeof (int) * w; yp1 = yuv[mb_y] + mb_x * 64 * 32; yp2 = yp1 + 64; up = yuv[mb_y / 2 + base_h] + uv_x * 64 * 32; vp = up + 1; HANDLE_MACROBLOCK(yp1, yp2, up, vp, dp1, dp2); } } #endif } static void _evas_nv12torgb_raster(unsigned char **yuv, unsigned char *rgb, int w, int h) { #ifdef BUILD_C int xx, yy; unsigned char *yp1, *yp2, *up, *vp; unsigned char *dp1; unsigned char *dp2; dp1 = rgb; dp2 = dp1 + sizeof (int) * w; for (yy = 0; yy < h; yy++) { yp1 = yuv[yy++]; yp2 = yuv[yy]; up = yuv[h + (yy >> 1)]; vp = up + 1; for (xx = 0; xx < w; xx += 2) { _evas_yuv2rgb_420_raster(yp1, yp2, up, vp, dp1, dp2); /* the previous call just rendered 2 pixels per lines */ dp1 += 8; dp2 += 8; /* and took for that 2 lines with 2 Y, 1 U and 1 V. Don't forget U & V are in the same plane */ yp1 += 2; yp2 += 2; up += 2; vp += 2; } /* jump one line */ dp1 += sizeof (int) * w; dp2 += sizeof (int) * w; yp1 += w; yp2 += w; } #endif } #endif evas-1.7.9/src/lib/engines/common/evas_font_ot.c0000664000175000017500000002036112175475547016543 00000000000000#include "evas_font_ot.h" #ifdef USE_HARFBUZZ # include # include #endif #include "evas_common.h" #include #include "evas_font_private.h" #ifdef USE_HARFBUZZ static const hb_script_t _evas_script_to_harfbuzz[] = { HB_SCRIPT_COMMON, HB_SCRIPT_INHERITED, HB_SCRIPT_ARABIC, HB_SCRIPT_ARMENIAN, HB_SCRIPT_BENGALI, HB_SCRIPT_BOPOMOFO, HB_SCRIPT_CHEROKEE, HB_SCRIPT_COPTIC, HB_SCRIPT_CYRILLIC, HB_SCRIPT_DESERET, HB_SCRIPT_DEVANAGARI, HB_SCRIPT_ETHIOPIC, HB_SCRIPT_GEORGIAN, HB_SCRIPT_GOTHIC, HB_SCRIPT_GREEK, HB_SCRIPT_GUJARATI, HB_SCRIPT_GURMUKHI, HB_SCRIPT_HAN, HB_SCRIPT_HANGUL, HB_SCRIPT_HEBREW, HB_SCRIPT_HIRAGANA, HB_SCRIPT_KANNADA, HB_SCRIPT_KATAKANA, HB_SCRIPT_KHMER, HB_SCRIPT_LAO, HB_SCRIPT_LATIN, HB_SCRIPT_MALAYALAM, HB_SCRIPT_MONGOLIAN, HB_SCRIPT_MYANMAR, HB_SCRIPT_OGHAM, HB_SCRIPT_OLD_ITALIC, HB_SCRIPT_ORIYA, HB_SCRIPT_RUNIC, HB_SCRIPT_SINHALA, HB_SCRIPT_SYRIAC, HB_SCRIPT_TAMIL, HB_SCRIPT_TELUGU, HB_SCRIPT_THAANA, HB_SCRIPT_THAI, HB_SCRIPT_TIBETAN, HB_SCRIPT_CANADIAN_ABORIGINAL, HB_SCRIPT_YI, HB_SCRIPT_TAGALOG, HB_SCRIPT_HANUNOO, HB_SCRIPT_BUHID, HB_SCRIPT_TAGBANWA, /* Unicode-4.0 additions */ HB_SCRIPT_BRAILLE, HB_SCRIPT_CYPRIOT, HB_SCRIPT_LIMBU, HB_SCRIPT_OSMANYA, HB_SCRIPT_SHAVIAN, HB_SCRIPT_LINEAR_B, HB_SCRIPT_TAI_LE, HB_SCRIPT_UGARITIC, /* Unicode-4.1 additions */ HB_SCRIPT_NEW_TAI_LUE, HB_SCRIPT_BUGINESE, HB_SCRIPT_GLAGOLITIC, HB_SCRIPT_TIFINAGH, HB_SCRIPT_SYLOTI_NAGRI, HB_SCRIPT_OLD_PERSIAN, HB_SCRIPT_KHAROSHTHI, /* Unicode-5.0 additions */ HB_SCRIPT_UNKNOWN, HB_SCRIPT_BALINESE, HB_SCRIPT_CUNEIFORM, HB_SCRIPT_PHOENICIAN, HB_SCRIPT_PHAGS_PA, HB_SCRIPT_NKO, /* Unicode-5.1 additions */ HB_SCRIPT_KAYAH_LI, HB_SCRIPT_LEPCHA, HB_SCRIPT_REJANG, HB_SCRIPT_SUNDANESE, HB_SCRIPT_SAURASHTRA, HB_SCRIPT_CHAM, HB_SCRIPT_OL_CHIKI, HB_SCRIPT_VAI, HB_SCRIPT_CARIAN, HB_SCRIPT_LYCIAN, HB_SCRIPT_LYDIAN, /* Unicode-5.2 additions */ HB_SCRIPT_AVESTAN, HB_SCRIPT_BAMUM, HB_SCRIPT_EGYPTIAN_HIEROGLYPHS, HB_SCRIPT_IMPERIAL_ARAMAIC, HB_SCRIPT_INSCRIPTIONAL_PAHLAVI, HB_SCRIPT_INSCRIPTIONAL_PARTHIAN, HB_SCRIPT_JAVANESE, HB_SCRIPT_KAITHI, HB_SCRIPT_TAI_THAM, HB_SCRIPT_LISU, HB_SCRIPT_MEETEI_MAYEK, HB_SCRIPT_OLD_SOUTH_ARABIAN, HB_SCRIPT_OLD_TURKIC, HB_SCRIPT_SAMARITAN, HB_SCRIPT_TAI_VIET, /* Unicode-6.0 additions */ HB_SCRIPT_BATAK, HB_SCRIPT_BRAHMI, HB_SCRIPT_MANDAIC }; #endif #ifdef OT_SUPPORT /* FIXME: doc. returns #items */ EAPI int evas_common_font_ot_cluster_size_get(const Evas_Text_Props *props, size_t char_index) { int i; int items; int left_bound, right_bound; size_t base_cluster; char_index += props->start; base_cluster = EVAS_FONT_OT_POS_GET(props->info->ot[char_index]); for (i = (int) char_index ; (i >= (int) props->start) && (EVAS_FONT_OT_POS_GET(props->info->ot[i]) == base_cluster) ; i--) ; left_bound = i; for (i = (int) char_index + 1; (i < (int) (props->start + props->len)) && (EVAS_FONT_OT_POS_GET(props->info->ot[i]) == base_cluster) ; i++) ; right_bound = i; if (right_bound == left_bound) { items = 1; } else if (props->bidi.dir == EVAS_BIDI_DIRECTION_RTL) { if (left_bound < 0) { items = props->text_offset + props->text_len - base_cluster; } else { items = props->info->ot[left_bound].source_cluster - base_cluster; } } else { if (right_bound >= (int) (props->start + props->len)) { items = props->text_offset + props->text_len - base_cluster; } else { items = props->info->ot[right_bound].source_cluster - base_cluster; } } return (items > 0) ? items : 1; } /* Harfbuzz font functions */ static hb_position_t _evas_common_font_ot_hb_get_glyph_advance(hb_font_t *font, void *font_data, hb_codepoint_t glyph, void *user_data) { /* Use our cache*/ RGBA_Font_Int *fi = (RGBA_Font_Int *) font_data; RGBA_Font_Glyph *fg; (void) font; (void) user_data; fg = evas_common_font_int_cache_glyph_get(fi, glyph); if (fg) { return fg->glyph->advance.x >> 10; } return 0; } static hb_position_t _evas_common_font_ot_hb_get_kerning(hb_font_t *font, void *font_data, hb_codepoint_t first_glyph, hb_codepoint_t second_glyph, void *user_data) { RGBA_Font_Int *fi = (RGBA_Font_Int *) font_data; int kern; (void) font; (void) user_data; if (evas_common_font_query_kerning(fi, first_glyph, second_glyph, &kern)) return kern; return 0; } /* End of harfbuzz font funcs */ static inline hb_font_funcs_t * _evas_common_font_ot_font_funcs_get(void) { static hb_font_funcs_t *font_funcs = NULL; if (!font_funcs) { font_funcs = hb_font_funcs_create(); hb_font_funcs_set_glyph_h_advance_func(font_funcs, _evas_common_font_ot_hb_get_glyph_advance, NULL, NULL); hb_font_funcs_set_glyph_h_kerning_func(font_funcs, _evas_common_font_ot_hb_get_kerning, NULL, NULL); } return font_funcs; } static inline hb_unicode_funcs_t * _evas_common_font_ot_unicode_funcs_get(void) { static hb_unicode_funcs_t *unicode_funcs = NULL; if (!unicode_funcs) { unicode_funcs = hb_unicode_funcs_get_default(); } return unicode_funcs; } static void _evas_common_font_ot_shape(hb_buffer_t *buffer, RGBA_Font_Int *fi, Evas_Text_Props_Mode mode) { /* Create hb_font if not previously created */ if (!fi->ft.hb_font) { hb_font_t *hb_ft_font; hb_ft_font = hb_ft_font_create(fi->src->ft.face, NULL); fi->ft.hb_font = hb_font_create_sub_font(hb_ft_font); hb_font_destroy(hb_ft_font); hb_font_set_funcs(fi->ft.hb_font, _evas_common_font_ot_font_funcs_get(), fi, NULL); } if (mode == EVAS_TEXT_PROPS_MODE_SHAPE) { hb_shape(fi->ft.hb_font, buffer, NULL, 0); } else { const char *shaper_list[] = { "fallback", NULL }; hb_shape_full(fi->ft.hb_font, buffer, NULL, 0, shaper_list); } } EAPI Eina_Bool evas_common_font_ot_populate_text_props(const Eina_Unicode *text, Evas_Text_Props *props, int len, Evas_Text_Props_Mode mode) { RGBA_Font_Int *fi; hb_buffer_t *buffer; hb_glyph_position_t *positions; hb_glyph_info_t *infos; int slen; unsigned int i; Evas_Font_Glyph_Info *gl_itr; Evas_Font_OT_Info *ot_itr; Evas_Coord pen_x = 0; fi = props->font_instance; if (len < 0) { slen = eina_unicode_strlen(text); } else { slen = len; } buffer = hb_buffer_create(); hb_buffer_set_unicode_funcs(buffer, _evas_common_font_ot_unicode_funcs_get()); hb_buffer_set_language(buffer, hb_language_from_string( evas_common_language_from_locale_get(), -1)); hb_buffer_set_script(buffer, _evas_script_to_harfbuzz[props->script]); hb_buffer_set_direction(buffer, (props->bidi.dir == EVAS_BIDI_DIRECTION_RTL) ? HB_DIRECTION_RTL : HB_DIRECTION_LTR); /* FIXME: add run-time conversions if needed, which is very unlikely */ hb_buffer_add_utf32(buffer, (const uint32_t *) text, slen, 0, slen); _evas_common_font_ot_shape(buffer, fi, mode); props->len = hb_buffer_get_length(buffer); props->info->ot = calloc(props->len, sizeof(Evas_Font_OT_Info)); props->info->glyph = calloc(props->len, sizeof(Evas_Font_Glyph_Info)); positions = hb_buffer_get_glyph_positions(buffer, NULL); infos = hb_buffer_get_glyph_infos(buffer, NULL); gl_itr = props->info->glyph; ot_itr = props->info->ot; for (i = 0 ; i < props->len ; i++) { Evas_Coord adv; ot_itr->source_cluster = infos->cluster; ot_itr->x_offset = positions->x_offset; ot_itr->y_offset = positions->y_offset; gl_itr->index = infos->codepoint; adv = positions->x_advance; pen_x += adv; gl_itr->pen_after = EVAS_FONT_ROUND_26_6_TO_INT(pen_x); ot_itr++; gl_itr++; infos++; positions++; } hb_buffer_destroy(buffer); evas_common_font_int_use_trim(); return EINA_FALSE; } #endif evas-1.7.9/src/lib/engines/common/evas_convert_yuv.h0000664000175000017500000000071712175475547017466 00000000000000#ifndef _EVAS_CONVERT_YUV_H #define _EVAS_CONVERT_YUV_H EAPI void evas_common_convert_yuv_420p_601_rgba (DATA8 **src, DATA8 *dst, int w, int h); EAPI void evas_common_convert_yuv_422_601_rgba (DATA8 **src, DATA8 *dst, int w, int h); EAPI void evas_common_convert_yuv_420_601_rgba (DATA8 **src, DATA8 *dst, int w, int h); EAPI void evas_common_convert_yuv_420T_601_rgba (DATA8 **src, DATA8 *dst, int w, int h); #endif /* _EVAS_CONVERT_YUV_H */ evas-1.7.9/src/lib/engines/common/evas_scale_span.c0000664000175000017500000003254312175475547017210 00000000000000#include "evas_common.h" #include "evas_convert_color.h" #include "evas_scale_span.h" static void evas_common_scale_rgba_span_(DATA32 *src, DATA8 *mask __UNUSED__, int src_len, DATA32 mul_col, DATA32 *dst, int dst_len, int dir) { int mul = 0, step = 1; DATA32 *pdst = dst; if (!src || !dst) return; if ((src_len < 1) || (dst_len < 1)) return; if ((src_len > SCALE_SIZE_MAX) || (dst_len > SCALE_SIZE_MAX)) return; if (mul_col != 0xffffffff) mul = 1; if (dir < 0) { pdst += dst_len - 1; step = -1; } if ((src_len == 1) || (dst_len == 1)) { DATA32 c = *src; if (mul) c = MUL4_SYM(mul_col, c); while (dst_len--) *dst++ = c; return; } if (src_len == dst_len) { if (mul) { #ifdef BUILD_MMX pxor_r2r(mm0, mm0); MOV_A2R(ALPHA_255, mm5) MOV_P2R(mul_col, mm7, mm0) #endif while (dst_len--) { #ifdef BUILD_MMX MOV_P2R(*src, mm1, mm0) MUL4_SYM_R2R(mm7, mm1, mm5) MOV_R2P(mm1, *pdst, mm0) #else *pdst = MUL4_SYM(mul_col, *src); #endif src++; pdst += step; } return; } while (dst_len--) { *pdst = *src; src++; pdst += step; } return; } { DATA32 dsxx = (((src_len - 1) << 16) / (dst_len - 1)); DATA32 sxx = 0; int sx = sxx >> 16; #ifdef BUILD_MMX pxor_r2r(mm0, mm0); MOV_A2R(ALPHA_255, mm5) if (mul) { MOV_P2R(mul_col, mm7, mm0) } #endif while (dst_len--) { DATA32 p2, p1 = 0; int a; sx = (sxx >> 16); if (sx < src_len) p1 = *(src + sx); p2 = p1; if ((sx + 1) < src_len) p2 = *(src + sx + 1); a = 1 + ((sxx - (sx << 16)) >> 8); #ifdef BUILD_MMX MOV_A2R(a, mm3) MOV_P2R(p1, mm1, mm0) MOV_P2R(p2, mm2, mm0) INTERP_256_R2R(mm3, mm2, mm1, mm5) if (mul) { MUL4_SYM_R2R(mm7, mm1, mm5) } MOV_R2P(mm1, *pdst, mm0) #else p1 = INTERP_256(a, p2, p1); if (mul) p1 = MUL4_SYM(mul_col, p1); *pdst = p1; #endif pdst += step; sxx += dsxx; } return; } } static void evas_common_scale_rgba_a8_span_(DATA32 *src, DATA8 *mask, int src_len, DATA32 mul_col, DATA32 *dst, int dst_len, int dir) { int mul = 0, step = 1; DATA32 *pdst = dst; if (!src || !mask || !dst) return; if ((src_len < 1) || (dst_len < 1)) return; if ((src_len > SCALE_SIZE_MAX) || (dst_len > SCALE_SIZE_MAX)) return; if (mul_col != 0xffffffff) mul = 1; if (dir < 0) { pdst += dst_len - 1; step = -1; } if ((src_len == 1) || (dst_len == 1)) { DATA32 c = MUL_SYM(*mask, *src); if (mul) c = MUL4_SYM(mul_col, c); while (dst_len--) *dst++ = c; return; } if (src_len == dst_len) { #ifdef BUILD_MMX pxor_r2r(mm0, mm0); MOV_A2R(ALPHA_255, mm5) #endif if (mul) { #ifdef BUILD_MMX MOV_P2R(mul_col, mm7, mm0) #endif while (dst_len--) { #ifdef BUILD_MMX MOV_P2R(*src, mm1, mm0) MOV_A2R(*mask, mm3) MUL4_SYM_R2R(mm3, mm1, mm5) MUL4_SYM_R2R(mm7, mm1, mm5) MOV_R2P(mm1, *pdst, mm0) #else DATA32 c = MUL_SYM(*mask, *src); *pdst = MUL4_SYM(mul_col, c); #endif src++; mask++; pdst += step; } return; } while (dst_len--) { #ifdef BUILD_MMX MOV_P2R(*src, mm1, mm0) MOV_A2R(*mask, mm3) MUL4_SYM_R2R(mm3, mm1, mm5) MOV_R2P(mm1, *pdst, mm0) #else *pdst = MUL_SYM(*mask, *src); #endif src++; mask++; pdst += step; } return; } { DATA32 dsxx = (((src_len - 1) << 16) / (dst_len - 1)); DATA32 sxx = 0; int sx = sxx >> 16; #ifdef BUILD_MMX pxor_r2r(mm0, mm0); MOV_A2R(ALPHA_255, mm5) if (mul) { MOV_P2R(mul_col, mm7, mm0) } #endif while (dst_len--) { DATA32 p2, p1 = 0; int a, a2, a1 = 0; sx = (sxx >> 16); if (sx < src_len) { p1 = *(src + sx); a1 = *(mask + sx); } p2 = p1; a2 = a1; if ((sx + 1) < src_len) { p2 = *(src + sx + 1); a2 = *(mask + sx + 1); } a = 1 + ((sxx - (sx << 16)) >> 8); #ifdef BUILD_MMX MOV_A2R(a, mm3) MOV_P2R(p1, mm1, mm0) MOV_P2R(p2, mm2, mm0) INTERP_256_R2R(mm3, mm2, mm1, mm5) a1 += 1 + ((a * (a2 - a1)) >> 8); MOV_A2R(a1, mm3) MUL4_256_R2R(mm3, mm1) if (mul) { MUL4_SYM_R2R(mm7, mm1, mm5) } MOV_R2P(mm1, *pdst, mm0) #else p1 = INTERP_256(a, p2, p1); a1 += 1 + ((a * (a2 - a1)) >> 8); p1 = MUL_256(a1, p1); if (mul) p1 = MUL4_SYM(mul_col, p1); *pdst = p1; #endif pdst += step; sxx += dsxx; } return; } } static void evas_common_scale_a8_span_(DATA32 *src __UNUSED__, DATA8 *mask, int src_len, DATA32 mul_col, DATA32 *dst, int dst_len, int dir) { int step = 1; DATA32 *pdst = dst; if (!mask || !dst) return; if ((src_len < 1) || (dst_len < 1)) return; if ((src_len > SCALE_SIZE_MAX) || (dst_len > SCALE_SIZE_MAX)) return; if (dir < 0) { pdst += dst_len - 1; step = -1; } if ((src_len == 1) || (dst_len == 1)) { DATA32 c = MUL_SYM(*mask, mul_col); while (dst_len--) *dst++ = c; return; } #ifdef BUILD_MMX pxor_r2r(mm0, mm0); MOV_A2R(ALPHA_255, mm5) MOV_P2R(mul_col, mm7, mm0) #endif if (src_len == dst_len) { while (dst_len--) { #ifdef BUILD_MMX MOV_A2R(*mask, mm3) MUL4_SYM_R2R(mm7, mm3, mm5) MOV_R2P(mm3, *pdst, mm0) #else *pdst = MUL_SYM(*mask, mul_col); #endif mask++; pdst += step; } return; } { DATA32 dsxx = (((src_len - 1) << 16) / (dst_len - 1)); DATA32 sxx = 0; int sx = sxx >> 16; while (dst_len--) { int a, a2, a1 = 0; sx = (sxx >> 16); if (sx < src_len) a1 = *(mask + sx); a2 = a1; if ((sx + 1) < src_len) a2 = *(mask + sx + 1); a = 1 + ((sxx - (sx << 16)) >> 8); a1 += 1 + ((a * (a2 - a1)) >> 8); #ifdef BUILD_MMX MOV_A2R(a1, mm3) MUL4_256_R2R(mm7, mm3) MOV_R2P(mm3, *pdst, mm0) #else *pdst = MUL_256(a1, mul_col); #endif pdst += step; sxx += dsxx; } return; } } static void evas_common_scale_clip_a8_span_(DATA32 *src __UNUSED__, DATA8 *mask, int src_len, DATA32 mul_col, DATA32 *dst, int dst_len, int dir) { int mul = 0, step = 1; DATA32 *pdst = dst; if (!mask || !dst) return; if ((src_len < 1) || (dst_len < 1)) return; if ((src_len > SCALE_SIZE_MAX) || (dst_len > SCALE_SIZE_MAX)) return; if (mul_col != 0xffffffff) mul = 1; if (dir < 0) { pdst += dst_len - 1; step = -1; } #ifdef BUILD_MMX pxor_r2r(mm0, mm0); MOV_A2R(ALPHA_255, mm5) if (mul) { MOV_P2R(mul_col, mm7, mm0) } #endif if ((src_len == 1) || (dst_len == 1)) { #ifdef BUILD_MMX MOV_A2R(*mask, mm3) #else DATA32 c = *mask; #endif if (mul) { #ifdef BUILD_MMX MUL4_SYM_R2R(mm7, mm3, mm5) #else c = MUL_SYM(c, mul_col); #endif while (dst_len--) { #ifdef BUILD_MMX MOV_P2R(*dst, mm1, mm0) MUL4_SYM_R2R(mm3, mm1, mm5) MOV_R2P(mm1, *dst, mm0) #else *dst = MUL4_SYM(c, *dst); #endif dst++; } return; } while (dst_len--) { #ifdef BUILD_MMX MOV_P2R(*dst, mm1, mm0) MUL4_SYM_R2R(mm3, mm1, mm5) MOV_R2P(mm1, *dst, mm0) #else *dst = MUL_SYM(c, *dst); #endif dst++; } return; } if (src_len == dst_len) { if (mul) { while (dst_len--) { #ifdef BUILD_MMX MOV_A2R(*mask, mm3) MUL4_SYM_R2R(mm7, mm3, mm5) MOV_P2R(*pdst, mm1, mm0) MUL4_SYM_R2R(mm3, mm1, mm5) MOV_R2P(mm1, *pdst, mm0) #else DATA32 c = MUL_SYM(*mask, mul_col); *pdst = MUL4_SYM(c, *pdst); #endif mask++; pdst += step; } return; } while (dst_len--) { #ifdef BUILD_MMX MOV_A2R(*mask, mm3) MOV_P2R(*pdst, mm1, mm0) MUL4_SYM_R2R(mm3, mm1, mm5) MOV_R2P(mm1, *pdst, mm0) #else *pdst = MUL_SYM(*mask, *pdst); #endif mask++; pdst += step; } return; } { DATA32 dsxx = (((src_len - 1) << 16) / (dst_len - 1)); DATA32 sxx = 0; int sx = sxx >> 16; while (dst_len--) { int a, a2, a1 = 0; sx = (sxx >> 16); if (sx < src_len) a1 = *(mask + sx); a2 = a1; if ((sx + 1) < src_len) a2 = *(mask + sx + 1); a = 1 + ((sxx - (sx << 16)) >> 8); a1 += 1 + ((a * (a2 - a1)) >> 8); #ifdef BUILD_MMX MOV_A2R(a1, mm3) MOV_P2R(*pdst, mm1, mm0) MUL4_256_R2R(mm3, mm1) if (mul) { MUL4_SYM_R2R(mm7, mm1, mm5) } MOV_R2P(mm1, *pdst, mm0) #else *pdst = MUL_256(a1, *pdst); if (mul) *pdst = MUL4_SYM(mul_col, *pdst); #endif pdst += step; sxx += dsxx; } return; } } EAPI void evas_common_scale_rgba_span(DATA32 *src, DATA8 *mask, int src_len, DATA32 mul_col, DATA32 *dst, int dst_len, int dir) { evas_common_scale_rgba_span_(src, mask, src_len, mul_col, dst, dst_len, dir); evas_common_cpu_end_opt(); } EAPI void evas_common_scale_rgba_a8_span(DATA32 *src, DATA8 *mask, int src_len, DATA32 mul_col, DATA32 *dst, int dst_len, int dir) { evas_common_scale_rgba_a8_span_(src, mask, src_len, mul_col, dst, dst_len, dir); evas_common_cpu_end_opt(); } EAPI void evas_common_scale_a8_span(DATA32 *src, DATA8 *mask, int src_len, DATA32 mul_col, DATA32 *dst, int dst_len, int dir) { evas_common_scale_a8_span_(src, mask, src_len, mul_col, dst, dst_len, dir); evas_common_cpu_end_opt(); } EAPI void evas_common_scale_clip_a8_span(DATA32 *src, DATA8 *mask, int src_len, DATA32 mul_col, DATA32 *dst, int dst_len, int dir) { evas_common_scale_clip_a8_span_(src, mask, src_len, mul_col, dst, dst_len, dir); evas_common_cpu_end_opt(); } EAPI void evas_common_scale_hsva_span(DATA32 *src, DATA8 *mask __UNUSED__, int src_len, DATA32 mul_col, DATA32 *dst, int dst_len, int dir) { int mul = 0, step = 1; DATA32 *pdst = dst; if (!src || !dst) return; if ((src_len < 1) || (dst_len < 1)) return; if ((src_len > SCALE_SIZE_MAX) || (dst_len > SCALE_SIZE_MAX)) return; if (mul_col != 0xffffffff) mul = 1; if (dir < 0) { pdst += dst_len - 1; step = -1; } if ((src_len == 1) || (dst_len == 1)) { DATA32 c = *src; if (mul) c = MUL4_SYM(mul_col, c); while (dst_len--) *dst++ = c; return; } if (src_len == dst_len) { if (mul) { while (dst_len--) { *pdst = MUL4_SYM(mul_col, *src); src++; pdst += step; } return; } while (dst_len--) { *pdst = *src; src++; pdst += step; } return; } { DATA32 dsxx = (((src_len - 1) << 16) / (dst_len - 1)); DATA32 sxx = 0; int sx = sxx >> 16; while (dst_len--) { DATA32 p2, p1 = 0; int a, h1, s1, v1, h2, s2, v2; sx = (sxx >> 16); if (sx < src_len) p1 = *(src + sx); evas_common_convert_color_rgb_to_hsv_int((p1 >> 16) & 0xff, (p1 >> 8) & 0xff, p1 & 0xff, &h1, &s1, &v1); p2 = p1; if ((sx + 1) < src_len) p2 = *(src + sx + 1); evas_common_convert_color_rgb_to_hsv_int((p2 >> 16) & 0xff, (p2 >> 8) & 0xff, p2 & 0xff, &h2, &s2, &v2); a = 1 + ((sxx - (sx << 16)) >> 8); h1 += (a * (h2 - h1)) >> 8; s1 += (a * (s2 - s1)) >> 8; v1 += (a * (v2 - v1)) >> 8; a = (((((p2 >> 8) & 0xff0000) - ((p1 >> 8) & 0xff0000)) * a) + (p1 & 0xff000000)) & 0xff000000; evas_common_convert_color_hsv_to_rgb_int(h1, s1, v1, &h2, &s2, &v2); p1 = a + RGB_JOIN(h2,s2,v2); if (mul) p1 = MUL4_SYM(mul_col, p1); *pdst = p1; pdst += step; sxx += dsxx; } return; } } EAPI void evas_common_scale_hsva_a8_span(DATA32 *src, DATA8 *mask, int src_len, DATA32 mul_col, DATA32 *dst, int dst_len, int dir) { int mul = 0, step = 1; DATA32 *pdst = dst; if (!src || !mask || !dst) return; if ((src_len < 1) || (dst_len < 1)) return; if ((src_len > SCALE_SIZE_MAX) || (dst_len > SCALE_SIZE_MAX)) return; if (mul_col != 0xffffffff) mul = 1; if (dir < 0) { pdst += dst_len - 1; step = -1; } if ((src_len == 1) || (dst_len == 1)) { DATA32 c = MUL_SYM(*mask, *src); if (mul) c = MUL4_SYM(mul_col, c); while (dst_len--) *dst++ = c; return; } if (src_len == dst_len) { if (mul) { while (dst_len--) { DATA32 c = MUL_SYM(*mask, *src); *pdst = MUL4_SYM(mul_col, c); src++; mask++; pdst += step; } return; } while (dst_len--) { *pdst = MUL_SYM(*mask, *src); src++; mask++; pdst += step; } return; } { DATA32 dsxx = (((src_len - 1) << 16) / (dst_len - 1)); DATA32 sxx = 0; int sx = sxx >> 16; while (dst_len--) { DATA32 p2, p1 = 0; int a, a2, a1 = 0; int h1, s1, v1, h2, s2, v2; sx = (sxx >> 16); if (sx < src_len) { p1 = *(src + sx); a1 = *(mask + sx); } p2 = p1; a2 = a1; if ((sx + 1) < src_len) { p2 = *(src + sx + 1); a2 = *(mask + sx + 1); } evas_common_convert_color_rgb_to_hsv_int((p1 >> 16) & 0xff, (p1 >> 8) & 0xff, p1 & 0xff, &h1, &s1, &v1); evas_common_convert_color_rgb_to_hsv_int((p2 >> 16) & 0xff, (p2 >> 8) & 0xff, p2 & 0xff, &h2, &s2, &v2); a = 1 + ((sxx - (sx << 16)) >> 8); a1 += (a * (a2 - a1)) >> 8; h1 += (a * (h2 - h1)) >> 8; s1 += (a * (s2 - s1)) >> 8; v1 += (a * (v2 - v1)) >> 8; a = (((((p2 >> 8) & 0xff0000) - ((p1 >> 8) & 0xff0000)) * a) + (p1 & 0xff000000)) & 0xff000000; evas_common_convert_color_hsv_to_rgb_int(h1, s1, v1, &h2, &s2, &v2); p1 = a + RGB_JOIN(h2,s2,v2); p1 = MUL_SYM(a1, p1); if (mul) p1 = MUL4_SYM(mul_col, p1); *pdst = p1; pdst += step; sxx += dsxx; } return; } } evas-1.7.9/src/lib/engines/common/evas_image_data.c0000664000175000017500000001031712175475547017146 00000000000000#ifdef HAVE_CONFIG_H # include #endif #include #include "evas_common.h" #include "evas_private.h" #include "evas_image.h" int evas_common_rgba_image_from_data(Image_Entry* ie_dst, int w, int h, DATA32 *image_data, int alpha, int cspace) { RGBA_Image *dst = (RGBA_Image *) ie_dst; switch (cspace) { case EVAS_COLORSPACE_ARGB8888: dst->cache_entry.w = w; dst->cache_entry.h = h; dst->image.data = image_data; dst->image.no_free = 1; dst->cache_entry.flags.alpha = alpha ? 1 : 0; break; case EVAS_COLORSPACE_YCBCR422P601_PL: case EVAS_COLORSPACE_YCBCR422P709_PL: case EVAS_COLORSPACE_YCBCR422601_PL: case EVAS_COLORSPACE_YCBCR420TM12601_PL: case EVAS_COLORSPACE_YCBCR420NV12601_PL: w &= ~0x1; dst->cache_entry.w = w; dst->cache_entry.h = h; dst->cs.data = image_data; dst->cs.no_free = 1; break; default: abort(); break; } dst->cache_entry.space = cspace; evas_common_image_colorspace_dirty(dst); _evas_common_rgba_image_post_surface(ie_dst); return 0; } int evas_common_rgba_image_from_copied_data(Image_Entry* ie_dst, int w, int h, DATA32 *image_data, int alpha, int cspace) { RGBA_Image *dst = (RGBA_Image *) ie_dst; /* FIXME: Is dst->image.data valid. */ switch (cspace) { case EVAS_COLORSPACE_ARGB8888: dst->cache_entry.flags.alpha = alpha ? 1 : 0; if (image_data) memcpy(dst->image.data, image_data, w * h * sizeof(DATA32)); break; case EVAS_COLORSPACE_YCBCR422P601_PL: case EVAS_COLORSPACE_YCBCR422P709_PL: case EVAS_COLORSPACE_YCBCR422601_PL: case EVAS_COLORSPACE_YCBCR420TM12601_PL: case EVAS_COLORSPACE_YCBCR420NV12601_PL: dst->cs.data = calloc(1, dst->cache_entry.h * sizeof(unsigned char*) * 2); if (image_data && (dst->cs.data)) memcpy(dst->cs.data, image_data, dst->cache_entry.h * sizeof(unsigned char*) * 2); break; default: abort(); break; } dst->cache_entry.space = cspace; evas_common_image_colorspace_dirty(dst); _evas_common_rgba_image_post_surface(ie_dst); return 0; } int evas_common_rgba_image_size_set(Image_Entry *ie_dst, const Image_Entry *ie_im, unsigned int w, unsigned int h __UNUSED__) { RGBA_Image *dst = (RGBA_Image *) ie_dst; RGBA_Image *im = (RGBA_Image *) ie_im; if ((im->cache_entry.space == EVAS_COLORSPACE_YCBCR422P601_PL) || (im->cache_entry.space == EVAS_COLORSPACE_YCBCR422P709_PL) || (im->cache_entry.space == EVAS_COLORSPACE_YCBCR422601_PL) || (im->cache_entry.space == EVAS_COLORSPACE_YCBCR420TM12601_PL) || (im->cache_entry.space == EVAS_COLORSPACE_YCBCR420NV12601_PL)) { w &= ~0x1; dst->cs.data = calloc(1, dst->cache_entry.h * sizeof(unsigned char *) * 2); } dst->flags = im->flags; dst->cs.no_free = 0; evas_common_image_colorspace_dirty(dst); _evas_common_rgba_image_post_surface(ie_dst); return 0; } int evas_common_rgba_image_colorspace_set(Image_Entry* ie_dst, int cspace) { RGBA_Image *dst = (RGBA_Image *) ie_dst; switch (cspace) { case EVAS_COLORSPACE_ARGB8888: if (dst->cs.data) { if (!dst->cs.no_free) free(dst->cs.data); dst->cs.data = NULL; dst->cs.no_free = 0; } break; case EVAS_COLORSPACE_YCBCR422P601_PL: case EVAS_COLORSPACE_YCBCR422P709_PL: case EVAS_COLORSPACE_YCBCR422601_PL: case EVAS_COLORSPACE_YCBCR420TM12601_PL: case EVAS_COLORSPACE_YCBCR420NV12601_PL: if (dst->image.no_free) { ie_dst->allocated.w = 0; ie_dst->allocated.h = 0; #ifdef BUILD_ASYNC_PRELOAD ie_dst->flags.preload_done = 0; #endif ie_dst->flags.loaded = 0; dst->image.data = NULL; dst->image.no_free = 0; /* FIXME: Must allocate image.data surface cleanly. */ } if (dst->cs.data) { if (!dst->cs.no_free) free(dst->cs.data); } dst->cs.data = calloc(1, dst->cache_entry.h * sizeof(unsigned char *) * 2); dst->cs.no_free = 0; break; default: abort(); break; } dst->cache_entry.space = cspace; evas_common_image_colorspace_dirty(dst); _evas_common_rgba_image_post_surface(ie_dst); return 0; } evas-1.7.9/src/lib/engines/common/evas_op_blend/0000775000175000017500000000000012234557316016556 500000000000000evas-1.7.9/src/lib/engines/common/evas_op_blend/op_blend_color_neon.c0000664000175000017500000001370512175475547022660 00000000000000/* blend color --> dst */ #ifdef BUILD_NEON static void _op_blend_c_dp_neon(DATA32 *s __UNUSED__, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { DATA32 *e, *tmp = 0; #define AP "B_C_DP" asm volatile ( ".fpu neon \n\t" "vdup.u32 q6, %[c] \n\t" "vmov.i8 q5, #1 \n\t" "vmvn.u8 q7,q6 \n\t" "vshr.u32 q7, q7, $0x18 \n\t" "vmul.u32 q7,q5, q7 \n\t" "bic %[e], #3 \n\t" "bic %[d], #3 \n\t" AP "loopchoose: \n\t" // If aligned already - straight to quads "andS %[tmp], %[d],$0x1f \n\t" "beq "AP"quadloops \n\t" "andS %[tmp], %[d],$0x4 \n\t" "beq "AP"dualloop \n\t" // Only ever executes once, fall through to dual AP "singleloop: \n\t" // Use 'tmp' not 'd' "vld1.32 d0[0], [%[d]] \n\t" // Only touch d1 "vmull.u8 q0, d0, d14 \n\t" "vqrshrn.u16 d0, q0, #8 \n\t" "vadd.u8 d0, d12, d0 \n\t" "vst1.32 d0[0], [%[d]] \n\t" "add %[d], #4 \n\t" // Can we go the fast path? "andS %[tmp], %[d],$0x1f \n\t" "beq "AP"quadloops \n\t" AP "dualloop: \n\t" "sub %[tmp], %[e], %[d] \n\t" "cmp %[tmp], #32 \n\t" "blt "AP"loopout \n\t" AP "dualloopint: \n\t" "vldr.32 d0, [%[d]] \n\t" "vmull.u8 q1, d0, d14 \n\t" "vqrshrn.u16 d0, q1, #8 \n\t" "vqadd.u8 d0, d0, d12 \n\t" "vstm %[d]!, {d0} \n\t" "ands %[tmp], %[d], $0x1f \n\t" "bne "AP"dualloopint \n\t" AP "quadloops: \n\t" "sub %[tmp], %[e], %[d] \n\t" "cmp %[tmp], #32 \n\t" "blt "AP"loopout \n\t" "sub %[tmp],%[e],#31 \n\t" AP "quadloopint:\n\t" "vldm %[d], {d0,d1,d2,d3} \n\t" "vmull.u8 q2, d0, d14 \n\t" "vmull.u8 q3, d1, d15 \n\t" "vmull.u8 q4, d2, d14 \n\t" "vmull.u8 q5, d3, d15 \n\t" "vqrshrn.u16 d0, q2, #8 \n\t" "vqrshrn.u16 d1, q3, #8 \n\t" "vqrshrn.u16 d2, q4, #8 \n\t" "vqrshrn.u16 d3, q5, #8 \n\t" "vqadd.u8 q0, q6, q0 \n\t" "vqadd.u8 q1, q6, q1 \n\t" "vstm %[d]!, {d0,d1,d2,d3} \n\t" "cmp %[tmp], %[d]\n\t" "bhi "AP"quadloopint\n\t" AP "loopout: \n\t" "cmp %[d], %[e]\n\t" "beq "AP"done\n\t" "sub %[tmp],%[e], %[d] \n\t" "cmp %[tmp],#8 \n\t" "blt "AP"singleloop2 \n\t" AP "dualloop2: \n\t" "sub %[tmp],%[e],$0x7 \n\t" AP "dualloop2int: \n\t" "vldr.64 d0, [%[d]] \n\t" "vmull.u8 q1, d0, d14 \n\t" "vqrshrn.u16 d0, q1, #8 \n\t" "vqadd.u8 d0, d0, d12 \n\t" "vstr.64 d0, [%[d]] \n\t" "add %[d], #8 \n\t" "cmp %[tmp], %[d] \n\t" "bhi "AP"dualloop2int \n\t" // Single ?? "cmp %[e], %[d] \n\t" "beq "AP"done \n\t" AP "singleloop2: \n\t" "vld1.32 d0[0], [%[d]] \n\t" "vmull.u8 q1, d0, d14 \n\t" "vqrshrn.u16 d0, q1, #8 \n\t" "vqadd.u8 d0, d0, d12 \n\t" "vst1.32 d0[0], [%[d]] \n\t" AP "done:\n\t" : // output regs // Input : [e] "r" (e = d + l), [d] "r" (d), [c] "r" (c), [tmp] "r" (tmp) : "q0", "q1", "q2","q3", "q4","q5","q6", "q7","memory" // clobbered ); #undef AP } #define _op_blend_caa_dp_neon _op_blend_c_dp_neon #define _op_blend_c_dpan_neon _op_blend_c_dp_neon #define _op_blend_caa_dpan_neon _op_blend_c_dpan_neon static void init_blend_color_span_funcs_neon(void) { op_blend_span_funcs[SP_N][SM_N][SC][DP][CPU_NEON] = _op_blend_c_dp_neon; op_blend_span_funcs[SP_N][SM_N][SC_AA][DP][CPU_NEON] = _op_blend_caa_dp_neon; op_blend_span_funcs[SP_N][SM_N][SC][DP_AN][CPU_NEON] = _op_blend_c_dpan_neon; op_blend_span_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_NEON] = _op_blend_caa_dpan_neon; } #endif #ifdef BUILD_NEON static void _op_blend_pt_c_dp_neon(DATA32 s __UNUSED__, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) { s = 256 - (c >> 24); *d = c + MUL_256(s, *d); } #define _op_blend_pt_caa_dp_neon _op_blend_pt_c_dp_neon #define _op_blend_pt_c_dpan_neon _op_blend_pt_c_dp_neon #define _op_blend_pt_caa_dpan_neon _op_blend_pt_c_dpan_neon static void init_blend_color_pt_funcs_neon(void) { op_blend_pt_funcs[SP_N][SM_N][SC][DP][CPU_NEON] = _op_blend_pt_c_dp_neon; op_blend_pt_funcs[SP_N][SM_N][SC_AA][DP][CPU_NEON] = _op_blend_pt_caa_dp_neon; op_blend_pt_funcs[SP_N][SM_N][SC][DP_AN][CPU_NEON] = _op_blend_pt_c_dpan_neon; op_blend_pt_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_NEON] = _op_blend_pt_caa_dpan_neon; } #endif /*-----*/ /* blend_rel color -> dst */ #ifdef BUILD_NEON static void _op_blend_rel_c_dp_neon(DATA32 *s __UNUSED__, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { DATA32 *e; int alpha = 256 - (c >> 24); UNROLL8_PLD_WHILE(d, l, e, { *d = MUL_SYM(*d >> 24, c) + MUL_256(alpha, *d); d++; }); } #define _op_blend_rel_caa_dp_neon _op_blend_rel_c_dp_neon #define _op_blend_rel_c_dpan_neon _op_blend_c_dpan_neon #define _op_blend_rel_caa_dpan_neon _op_blend_caa_dpan_neon static void init_blend_rel_color_span_funcs_neon(void) { op_blend_rel_span_funcs[SP_N][SM_N][SC][DP][CPU_NEON] = _op_blend_rel_c_dp_neon; op_blend_rel_span_funcs[SP_N][SM_N][SC_AA][DP][CPU_NEON] = _op_blend_rel_caa_dp_neon; op_blend_rel_span_funcs[SP_N][SM_N][SC][DP_AN][CPU_NEON] = _op_blend_rel_c_dpan_neon; op_blend_rel_span_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_NEON] = _op_blend_rel_caa_dpan_neon; } #endif #ifdef BUILD_NEON static void _op_blend_rel_pt_c_dp_neon(DATA32 s __UNUSED__, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) { s = *d >> 24; *d = MUL_SYM(s, c) + MUL_256(256 - (c >> 24), *d); } #define _op_blend_rel_pt_caa_dp_neon _op_blend_rel_pt_c_dp_neon #define _op_blend_rel_pt_c_dpan_neon _op_blend_pt_c_dpan_neon #define _op_blend_rel_pt_caa_dpan_neon _op_blend_pt_caa_dpan_neon static void init_blend_rel_color_pt_funcs_neon(void) { op_blend_rel_pt_funcs[SP_N][SM_N][SC][DP][CPU_NEON] = _op_blend_rel_pt_c_dp_neon; op_blend_rel_pt_funcs[SP_N][SM_N][SC_AA][DP][CPU_NEON] = _op_blend_rel_pt_caa_dp_neon; op_blend_rel_pt_funcs[SP_N][SM_N][SC][DP_AN][CPU_NEON] = _op_blend_rel_pt_c_dpan_neon; op_blend_rel_pt_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_NEON] = _op_blend_rel_pt_caa_dpan_neon; } #endif evas-1.7.9/src/lib/engines/common/evas_op_blend/Makefile.in0000664000175000017500000006761612234557302020556 00000000000000# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/lib/engines/common/evas_op_blend DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/efl_attribute.m4 \ $(top_srcdir)/m4/efl_coverage.m4 \ $(top_srcdir)/m4/efl_doxygen.m4 \ $(top_srcdir)/m4/efl_fnmatch.m4 \ $(top_srcdir)/m4/efl_path_max.m4 \ $(top_srcdir)/m4/efl_shm_open.m4 $(top_srcdir)/m4/efl_tests.m4 \ $(top_srcdir)/m4/evas_check_engine.m4 \ $(top_srcdir)/m4/evas_check_loader.m4 \ $(top_srcdir)/m4/evas_converter.m4 \ $(top_srcdir)/m4/evas_dither.m4 \ $(top_srcdir)/m4/evas_scaler.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libevas_engine_common_op_blend_master_sse3_la_LIBADD = am_libevas_engine_common_op_blend_master_sse3_la_OBJECTS = libevas_engine_common_op_blend_master_sse3_la-op_blend_master_sse3.lo libevas_engine_common_op_blend_master_sse3_la_OBJECTS = \ $(am_libevas_engine_common_op_blend_master_sse3_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = libevas_engine_common_op_blend_master_sse3_la_LINK = $(LIBTOOL) \ $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) \ $(libevas_engine_common_op_blend_master_sse3_la_CFLAGS) \ $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libevas_engine_common_op_blend_master_sse3_la_SOURCES) DIST_SOURCES = \ $(libevas_engine_common_op_blend_master_sse3_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHECK_CFLAGS = @CHECK_CFLAGS@ CHECK_LIBS = @CHECK_LIBS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@ DIRECTFB_LIBS = @DIRECTFB_LIBS@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ ECORE_EVAS_CFLAGS = @ECORE_EVAS_CFLAGS@ ECORE_EVAS_LIBS = @ECORE_EVAS_LIBS@ EDB_CFLAGS = @EDB_CFLAGS@ EDB_LIBS = @EDB_LIBS@ EDJE_CFLAGS = @EDJE_CFLAGS@ EDJE_LIBS = @EDJE_LIBS@ EET_CFLAGS = @EET_CFLAGS@ EET_LIBS = @EET_LIBS@ EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@ EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@ EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@ EFL_SHM_OPEN_LIBS = @EFL_SHM_OPEN_LIBS@ EGREP = @EGREP@ EINA_CFLAGS = @EINA_CFLAGS@ EINA_LIBS = @EINA_LIBS@ EVAS_CFLAGS = @EVAS_CFLAGS@ EVAS_GENERAL_CFLAGS = @EVAS_GENERAL_CFLAGS@ EVAS_GENERAL_LIBS = @EVAS_GENERAL_LIBS@ EVAS_LIBS = @EVAS_LIBS@ EVAS_SSE3_CFLAGS = @EVAS_SSE3_CFLAGS@ EVIL_CFLAGS = @EVIL_CFLAGS@ EVIL_LIBS = @EVIL_LIBS@ EXEEXT = @EXEEXT@ EXOTIC_CFLAGS = @EXOTIC_CFLAGS@ EXOTIC_LIBS = @EXOTIC_LIBS@ FGREP = @FGREP@ FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@ FONTCONFIG_LIBS = @FONTCONFIG_LIBS@ FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ FREETYPE_LIBS = @FREETYPE_LIBS@ FRIBIDI_CFLAGS = @FRIBIDI_CFLAGS@ FRIBIDI_LIBS = @FRIBIDI_LIBS@ GL_EET_CFLAGS = @GL_EET_CFLAGS@ GL_EET_LIBS = @GL_EET_LIBS@ GREP = @GREP@ HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@ HARFBUZZ_LIBS = @HARFBUZZ_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LINEBREAK_CFLAGS = @LINEBREAK_CFLAGS@ LINEBREAK_LIBS = @LINEBREAK_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MODULE_ARCH = @MODULE_ARCH@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ SDL_CFLAGS = @SDL_CFLAGS@ SDL_LIBS = @SDL_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ SVG_CFLAGS = @SVG_CFLAGS@ SVG_LIBS = @SVG_LIBS@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ XCB_CFLAGS = @XCB_CFLAGS@ XCB_GL_CFLAGS = @XCB_GL_CFLAGS@ XCB_GL_LIBS = @XCB_GL_LIBS@ XCB_LIBS = @XCB_LIBS@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_ct_OBJC = @ac_ct_OBJC@ altivec_cflags = @altivec_cflags@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ dlopen_libs = @dlopen_libs@ docdir = @docdir@ dvidir = @dvidir@ edje_cc = @edje_cc@ efl_doxygen = @efl_doxygen@ efl_have_doxygen = @efl_have_doxygen@ evas_engine_buffer_cflags = @evas_engine_buffer_cflags@ evas_engine_buffer_libs = @evas_engine_buffer_libs@ evas_engine_direct3d_cflags = @evas_engine_direct3d_cflags@ evas_engine_direct3d_libs = @evas_engine_direct3d_libs@ evas_engine_directfb_cflags = @evas_engine_directfb_cflags@ evas_engine_directfb_libs = @evas_engine_directfb_libs@ evas_engine_fb_cflags = @evas_engine_fb_cflags@ evas_engine_fb_libs = @evas_engine_fb_libs@ evas_engine_gl_cocoa_cflags = @evas_engine_gl_cocoa_cflags@ evas_engine_gl_cocoa_libs = @evas_engine_gl_cocoa_libs@ evas_engine_gl_common_libs = @evas_engine_gl_common_libs@ evas_engine_gl_sdl_cflags = @evas_engine_gl_sdl_cflags@ evas_engine_gl_sdl_libs = @evas_engine_gl_sdl_libs@ evas_engine_gl_xcb_cflags = @evas_engine_gl_xcb_cflags@ evas_engine_gl_xcb_libs = @evas_engine_gl_xcb_libs@ evas_engine_gl_xlib_cflags = @evas_engine_gl_xlib_cflags@ evas_engine_gl_xlib_libs = @evas_engine_gl_xlib_libs@ evas_engine_psl1ght_cflags = @evas_engine_psl1ght_cflags@ evas_engine_psl1ght_libs = @evas_engine_psl1ght_libs@ evas_engine_software_16_sdl_cflags = @evas_engine_software_16_sdl_cflags@ evas_engine_software_16_sdl_libs = @evas_engine_software_16_sdl_libs@ evas_engine_software_16_wince_cflags = @evas_engine_software_16_wince_cflags@ evas_engine_software_16_wince_libs = @evas_engine_software_16_wince_libs@ evas_engine_software_16_x11_cflags = @evas_engine_software_16_x11_cflags@ evas_engine_software_16_x11_libs = @evas_engine_software_16_x11_libs@ evas_engine_software_8_x11_cflags = @evas_engine_software_8_x11_cflags@ evas_engine_software_8_x11_libs = @evas_engine_software_8_x11_libs@ evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@ evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@ evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@ evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ evas_image_loader_edb_libs = @evas_image_loader_edb_libs@ evas_image_loader_eet_cflags = @evas_image_loader_eet_cflags@ evas_image_loader_eet_libs = @evas_image_loader_eet_libs@ evas_image_loader_generic_cflags = @evas_image_loader_generic_cflags@ evas_image_loader_generic_libs = @evas_image_loader_generic_libs@ evas_image_loader_gif_cflags = @evas_image_loader_gif_cflags@ evas_image_loader_gif_libs = @evas_image_loader_gif_libs@ evas_image_loader_ico_cflags = @evas_image_loader_ico_cflags@ evas_image_loader_ico_libs = @evas_image_loader_ico_libs@ evas_image_loader_jpeg_cflags = @evas_image_loader_jpeg_cflags@ evas_image_loader_jpeg_libs = @evas_image_loader_jpeg_libs@ evas_image_loader_pmaps_cflags = @evas_image_loader_pmaps_cflags@ evas_image_loader_pmaps_libs = @evas_image_loader_pmaps_libs@ evas_image_loader_png_cflags = @evas_image_loader_png_cflags@ evas_image_loader_png_libs = @evas_image_loader_png_libs@ evas_image_loader_psd_cflags = @evas_image_loader_psd_cflags@ evas_image_loader_psd_libs = @evas_image_loader_psd_libs@ evas_image_loader_svg_cflags = @evas_image_loader_svg_cflags@ evas_image_loader_svg_libs = @evas_image_loader_svg_libs@ evas_image_loader_tga_cflags = @evas_image_loader_tga_cflags@ evas_image_loader_tga_libs = @evas_image_loader_tga_libs@ evas_image_loader_tiff_cflags = @evas_image_loader_tiff_cflags@ evas_image_loader_tiff_libs = @evas_image_loader_tiff_libs@ evas_image_loader_wbmp_cflags = @evas_image_loader_wbmp_cflags@ evas_image_loader_wbmp_libs = @evas_image_loader_wbmp_libs@ evas_image_loader_xpm_cflags = @evas_image_loader_xpm_cflags@ evas_image_loader_xpm_libs = @evas_image_loader_xpm_libs@ exec_prefix = @exec_prefix@ have_evas_engine_gl_x11 = @have_evas_engine_gl_x11@ have_evas_engine_gl_xcb = @have_evas_engine_gl_xcb@ have_evas_engine_gl_xlib = @have_evas_engine_gl_xlib@ have_evas_engine_software_x11 = @have_evas_engine_software_x11@ have_evas_engine_software_xcb = @have_evas_engine_software_xcb@ have_evas_engine_software_xlib = @have_evas_engine_software_xlib@ have_lcov = @have_lcov@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_enable_auto_import = @lt_enable_auto_import@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgconfig_requires_private = @pkgconfig_requires_private@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pthread_cflags = @pthread_cflags@ pthread_libs = @pthread_libs@ release_info = @release_info@ requirement_evas = @requirement_evas@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ shm_open_libs = @shm_open_libs@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ version_info = @version_info@ MAINTAINERCLEANFILES = Makefile.in EXTRA_DIST = \ op_blend_color_.c \ op_blend_color_i386.c \ op_blend_color_neon.c \ op_blend_color_sse3.c \ op_blend_mask_color_.c \ op_blend_mask_color_i386.c \ op_blend_mask_color_neon.c \ op_blend_mask_color_sse3.c \ op_blend_pixel_.c \ op_blend_pixel_color_.c \ op_blend_pixel_color_i386.c \ op_blend_pixel_color_neon.c \ op_blend_pixel_color_sse3.c \ op_blend_pixel_i386.c \ op_blend_pixel_mask_.c \ op_blend_pixel_mask_i386.c \ op_blend_pixel_mask_neon.c \ op_blend_pixel_mask_sse3.c \ op_blend_pixel_neon.c \ op_blend_pixel_sse3.c noinst_LTLIBRARIES = libevas_engine_common_op_blend_master_sse3.la libevas_engine_common_op_blend_master_sse3_la_SOURCES = \ op_blend_master_sse3.c libevas_engine_common_op_blend_master_sse3_la_CFLAGS = \ -I. \ -I$(top_srcdir)/src/lib \ -I$(top_srcdir)/src/lib/engines/common \ -I$(top_srcdir)/src/lib/engines/common/evas_op_blend \ -I$(top_srcdir)/src/lib/cserve \ -I$(top_srcdir)/src/lib/include \ -DPACKAGE_BIN_DIR=\"$(bindir)\" \ -DPACKAGE_LIB_DIR=\"$(libdir)\" \ -DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \ @FREETYPE_CFLAGS@ @VALGRIND_CFLAGS@ \ @PIXMAN_CFLAGS@ \ @EET_CFLAGS@ @pthread_cflags@ \ @EVAS_GENERAL_CFLAGS@ \ @FRIBIDI_CFLAGS@ @HARFBUZZ_CFLAGS@ \ @PIXMAN_CFLAGS@ \ @EVAS_SSE3_CFLAGS@ all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/lib/engines/common/evas_op_blend/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/lib/engines/common/evas_op_blend/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libevas_engine_common_op_blend_master_sse3.la: $(libevas_engine_common_op_blend_master_sse3_la_OBJECTS) $(libevas_engine_common_op_blend_master_sse3_la_DEPENDENCIES) $(EXTRA_libevas_engine_common_op_blend_master_sse3_la_DEPENDENCIES) $(AM_V_CCLD)$(libevas_engine_common_op_blend_master_sse3_la_LINK) $(libevas_engine_common_op_blend_master_sse3_la_OBJECTS) $(libevas_engine_common_op_blend_master_sse3_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libevas_engine_common_op_blend_master_sse3_la-op_blend_master_sse3.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< libevas_engine_common_op_blend_master_sse3_la-op_blend_master_sse3.lo: op_blend_master_sse3.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libevas_engine_common_op_blend_master_sse3_la_CFLAGS) $(CFLAGS) -MT libevas_engine_common_op_blend_master_sse3_la-op_blend_master_sse3.lo -MD -MP -MF $(DEPDIR)/libevas_engine_common_op_blend_master_sse3_la-op_blend_master_sse3.Tpo -c -o libevas_engine_common_op_blend_master_sse3_la-op_blend_master_sse3.lo `test -f 'op_blend_master_sse3.c' || echo '$(srcdir)/'`op_blend_master_sse3.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libevas_engine_common_op_blend_master_sse3_la-op_blend_master_sse3.Tpo $(DEPDIR)/libevas_engine_common_op_blend_master_sse3_la-op_blend_master_sse3.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='op_blend_master_sse3.c' object='libevas_engine_common_op_blend_master_sse3_la-op_blend_master_sse3.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libevas_engine_common_op_blend_master_sse3_la_CFLAGS) $(CFLAGS) -c -o libevas_engine_common_op_blend_master_sse3_la-op_blend_master_sse3.lo `test -f 'op_blend_master_sse3.c' || echo '$(srcdir)/'`op_blend_master_sse3.c mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES cscopelist-am ctags \ ctags-am distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: evas-1.7.9/src/lib/engines/common/evas_op_blend/op_blend_mask_color_i386.c0000664000175000017500000001657712175475547023437 00000000000000/* blend mask x color -> dst */ #ifdef BUILD_MMX static void _op_blend_mas_c_dp_mmx(DATA32 *s __UNUSED__, DATA8 *m, DATA32 c, DATA32 *d, int l) { DATA32 *e = d + l; pxor_r2r(mm0, mm0); MOV_A2R(ALPHA_256, mm6) MOV_P2R(c, mm2, mm0) c = 256 - (c >> 24); MOV_A2R(c, mm4) while (d < e) { l = *m; switch(l) { case 0: break; case 255: MOV_P2R(*d, mm1, mm0) MUL4_256_R2R(mm4, mm1) paddw_r2r(mm2, mm1); MOV_R2P(mm1, *d, mm0) break; default: l++; MOV_A2R(l, mm3) MUL4_256_R2R(mm2, mm3) MOV_RA2R(mm3, mm1) movq_r2r(mm6, mm7); psubw_r2r(mm1, mm7); MOV_P2R(*d, mm1, mm0) MUL4_256_R2R(mm7, mm1) paddw_r2r(mm3, mm1); MOV_R2P(mm1, *d, mm0) break; } m++; d++; } } static void _op_blend_mas_can_dp_mmx(DATA32 *s __UNUSED__, DATA8 *m, DATA32 c, DATA32 *d, int l) { DATA32 *e = d + l; pxor_r2r(mm0, mm0); MOV_P2R(c, mm2, mm0) MOV_A2R(ALPHA_255, mm5) while (d < e) { l = *m; switch(l) { case 0: break; case 255: *d = c; break; default: l++; MOV_A2R(l, mm3) MOV_P2R(*d, mm1, mm0) movq_r2r(mm2, mm4); INTERP_256_R2R(mm3, mm4, mm1, mm5) MOV_R2P(mm1, *d, mm0) break; } m++; d++; } } #define _op_blend_mas_cn_dp_mmx _op_blend_mas_can_dp_mmx #define _op_blend_mas_caa_dp_mmx _op_blend_mas_c_dp_mmx #define _op_blend_mas_c_dpan_mmx _op_blend_mas_c_dp_mmx #define _op_blend_mas_cn_dpan_mmx _op_blend_mas_cn_dp_mmx #define _op_blend_mas_can_dpan_mmx _op_blend_mas_can_dp_mmx #define _op_blend_mas_caa_dpan_mmx _op_blend_mas_caa_dp_mmx static void init_blend_mask_color_span_funcs_mmx(void) { op_blend_span_funcs[SP_N][SM_AS][SC][DP][CPU_MMX] = _op_blend_mas_c_dp_mmx; op_blend_span_funcs[SP_N][SM_AS][SC_N][DP][CPU_MMX] = _op_blend_mas_cn_dp_mmx; op_blend_span_funcs[SP_N][SM_AS][SC_AN][DP][CPU_MMX] = _op_blend_mas_can_dp_mmx; op_blend_span_funcs[SP_N][SM_AS][SC_AA][DP][CPU_MMX] = _op_blend_mas_caa_dp_mmx; op_blend_span_funcs[SP_N][SM_AS][SC][DP_AN][CPU_MMX] = _op_blend_mas_c_dpan_mmx; op_blend_span_funcs[SP_N][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_blend_mas_cn_dpan_mmx; op_blend_span_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_MMX] = _op_blend_mas_can_dpan_mmx; op_blend_span_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_MMX] = _op_blend_mas_caa_dpan_mmx; } #endif #ifdef BUILD_MMX static void _op_blend_pt_mas_c_dp_mmx(DATA32 s, DATA8 m, DATA32 c, DATA32 *d) { s = m + 1; MOV_A2R(s, mm3) MOV_A2R(ALPHA_256, mm6) pxor_r2r(mm0, mm0); MOV_P2R(c, mm2, mm0) MUL4_256_R2R(mm2, mm3) MOV_RA2R(mm3, mm1) psubw_r2r(mm1, mm6); MOV_P2R(*d, mm1, mm0) MUL4_256_R2R(mm6, mm1) paddw_r2r(mm3, mm1); MOV_R2P(mm1, *d, mm0) } #define _op_blend_pt_mas_cn_dp_mmx _op_blend_pt_mas_c_dp_mmx #define _op_blend_pt_mas_can_dp_mmx _op_blend_pt_mas_c_dp_mmx #define _op_blend_pt_mas_caa_dp_mmx _op_blend_pt_mas_c_dp_mmx #define _op_blend_pt_mas_c_dpan_mmx _op_blend_pt_mas_c_dp_mmx #define _op_blend_pt_mas_cn_dpan_mmx _op_blend_pt_mas_cn_dp_mmx #define _op_blend_pt_mas_can_dpan_mmx _op_blend_pt_mas_can_dp_mmx #define _op_blend_pt_mas_caa_dpan_mmx _op_blend_pt_mas_caa_dp_mmx static void init_blend_mask_color_pt_funcs_mmx(void) { op_blend_pt_funcs[SP_N][SM_AS][SC][DP][CPU_MMX] = _op_blend_pt_mas_c_dp_mmx; op_blend_pt_funcs[SP_N][SM_AS][SC_N][DP][CPU_MMX] = _op_blend_pt_mas_cn_dp_mmx; op_blend_pt_funcs[SP_N][SM_AS][SC_AN][DP][CPU_MMX] = _op_blend_pt_mas_can_dp_mmx; op_blend_pt_funcs[SP_N][SM_AS][SC_AA][DP][CPU_MMX] = _op_blend_pt_mas_caa_dp_mmx; op_blend_pt_funcs[SP_N][SM_AS][SC][DP_AN][CPU_MMX] = _op_blend_pt_mas_c_dpan_mmx; op_blend_pt_funcs[SP_N][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_blend_pt_mas_cn_dpan_mmx; op_blend_pt_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_MMX] = _op_blend_pt_mas_can_dpan_mmx; op_blend_pt_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_MMX] = _op_blend_pt_mas_caa_dpan_mmx; } #endif /*-----*/ /* blend_rel mask x color -> dst */ #ifdef BUILD_MMX static void _op_blend_rel_mas_c_dp_mmx(DATA32 *s __UNUSED__, DATA8 *m, DATA32 c, DATA32 *d, int l) { DATA32 *e = d + l; pxor_r2r(mm0, mm0); MOV_A2R(ALPHA_256, mm6) MOV_A2R(ALPHA_255, mm5) MOV_P2R(c, mm2, mm0) while (d < e) { l = *m; switch(l) { case 0: break; default: l++; MOV_A2R(l, mm3) MUL4_256_R2R(mm2, mm3) MOV_RA2R(mm3, mm1) movq_r2r(mm6, mm7); psubw_r2r(mm1, mm7); MOV_P2R(*d, mm1, mm0) MOV_RA2R(mm1, mm4) MUL4_256_R2R(mm7, mm1) MUL4_SYM_R2R(mm4, mm3, mm5) paddw_r2r(mm3, mm1); MOV_R2P(mm1, *d, mm0) break; } m++; d++; } } #define _op_blend_rel_mas_cn_dp_mmx _op_blend_rel_mas_c_dp_mmx #define _op_blend_rel_mas_can_dp_mmx _op_blend_rel_mas_c_dp_mmx #define _op_blend_rel_mas_caa_dp_mmx _op_blend_rel_mas_c_dp_mmx #define _op_blend_rel_mas_c_dpan_mmx _op_blend_mas_c_dpan_mmx #define _op_blend_rel_mas_cn_dpan_mmx _op_blend_mas_cn_dpan_mmx #define _op_blend_rel_mas_can_dpan_mmx _op_blend_mas_can_dpan_mmx #define _op_blend_rel_mas_caa_dpan_mmx _op_blend_mas_caa_dpan_mmx static void init_blend_rel_mask_color_span_funcs_mmx(void) { op_blend_rel_span_funcs[SP_N][SM_AS][SC][DP][CPU_MMX] = _op_blend_rel_mas_c_dp_mmx; op_blend_rel_span_funcs[SP_N][SM_AS][SC_N][DP][CPU_MMX] = _op_blend_rel_mas_cn_dp_mmx; op_blend_rel_span_funcs[SP_N][SM_AS][SC_AN][DP][CPU_MMX] = _op_blend_rel_mas_can_dp_mmx; op_blend_rel_span_funcs[SP_N][SM_AS][SC_AA][DP][CPU_MMX] = _op_blend_rel_mas_caa_dp_mmx; op_blend_rel_span_funcs[SP_N][SM_AS][SC][DP_AN][CPU_MMX] = _op_blend_rel_mas_c_dpan_mmx; op_blend_rel_span_funcs[SP_N][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_blend_rel_mas_cn_dpan_mmx; op_blend_rel_span_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_MMX] = _op_blend_rel_mas_can_dpan_mmx; op_blend_rel_span_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_MMX] = _op_blend_rel_mas_caa_dpan_mmx; } #endif #ifdef BUILD_MMX static void _op_blend_rel_pt_mas_c_dp_mmx(DATA32 s, DATA8 m, DATA32 c, DATA32 *d) { pxor_r2r(mm0, mm0); MOV_A2R(ALPHA_256, mm6) MOV_A2R(ALPHA_255, mm5) s = m + 1; MOV_A2R(s, mm3) MOV_P2R(c, mm2, mm0) MUL4_256_R2R(mm2, mm3) MOV_RA2R(mm3, mm1) psubw_r2r(mm1, mm6); MOV_P2R(*d, mm1, mm0) MOV_RA2R(mm1, mm4) MUL4_256_R2R(mm6, mm1) MUL4_SYM_R2R(mm4, mm3, mm5) paddw_r2r(mm3, mm1); MOV_R2P(mm1, *d, mm0) } #define _op_blend_rel_pt_mas_cn_dp_mmx _op_blend_rel_pt_mas_c_dp_mmx #define _op_blend_rel_pt_mas_can_dp_mmx _op_blend_rel_pt_mas_c_dp_mmx #define _op_blend_rel_pt_mas_caa_dp_mmx _op_blend_rel_pt_mas_c_dp_mmx #define _op_blend_rel_pt_mas_c_dpan_mmx _op_blend_pt_mas_c_dpan_mmx #define _op_blend_rel_pt_mas_cn_dpan_mmx _op_blend_pt_mas_cn_dpan_mmx #define _op_blend_rel_pt_mas_can_dpan_mmx _op_blend_pt_mas_can_dpan_mmx #define _op_blend_rel_pt_mas_caa_dpan_mmx _op_blend_pt_mas_caa_dpan_mmx static void init_blend_rel_mask_color_pt_funcs_mmx(void) { op_blend_rel_pt_funcs[SP_N][SM_AS][SC][DP][CPU_MMX] = _op_blend_rel_pt_mas_c_dp_mmx; op_blend_rel_pt_funcs[SP_N][SM_AS][SC_N][DP][CPU_MMX] = _op_blend_rel_pt_mas_cn_dp_mmx; op_blend_rel_pt_funcs[SP_N][SM_AS][SC_AN][DP][CPU_MMX] = _op_blend_rel_pt_mas_can_dp_mmx; op_blend_rel_pt_funcs[SP_N][SM_AS][SC_AA][DP][CPU_MMX] = _op_blend_rel_pt_mas_caa_dp_mmx; op_blend_rel_pt_funcs[SP_N][SM_AS][SC][DP_AN][CPU_MMX] = _op_blend_rel_pt_mas_c_dpan_mmx; op_blend_rel_pt_funcs[SP_N][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_blend_rel_pt_mas_cn_dpan_mmx; op_blend_rel_pt_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_MMX] = _op_blend_rel_pt_mas_can_dpan_mmx; op_blend_rel_pt_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_MMX] = _op_blend_rel_pt_mas_caa_dpan_mmx; } #endif evas-1.7.9/src/lib/engines/common/evas_op_blend/op_blend_mask_color_.c0000664000175000017500000001561512175475547023015 00000000000000/* blend mask x color -> dst */ #ifdef BUILD_C static void _op_blend_mas_c_dp(DATA32 *s __UNUSED__, DATA8 *m, DATA32 c, DATA32 *d, int l) { DATA32 *e; int alpha = 256 - (c >> 24); UNROLL8_PLD_WHILE(d, l, e, { DATA32 a = *m; switch(a) { case 0: break; case 255: *d = c + MUL_256(alpha, *d); break; default: { DATA32 mc = MUL_SYM(a, c); a = 256 - (mc >> 24); *d = mc + MUL_256(a, *d); } break; } m++; d++; }); } static void _op_blend_mas_can_dp(DATA32 *s __UNUSED__, DATA8 *m, DATA32 c, DATA32 *d, int l) { DATA32 *e; int alpha; UNROLL8_PLD_WHILE(d, l, e, { alpha = *m; switch(alpha) { case 0: break; case 255: *d = c; break; default: alpha++; *d = INTERP_256(alpha, c, *d); break; } m++; d++; }); } #define _op_blend_mas_cn_dp _op_blend_mas_can_dp #define _op_blend_mas_caa_dp _op_blend_mas_c_dp #define _op_blend_mas_c_dpan _op_blend_mas_c_dp #define _op_blend_mas_cn_dpan _op_blend_mas_cn_dp #define _op_blend_mas_can_dpan _op_blend_mas_can_dp #define _op_blend_mas_caa_dpan _op_blend_mas_caa_dp static void init_blend_mask_color_span_funcs_c(void) { op_blend_span_funcs[SP_N][SM_AS][SC][DP][CPU_C] = _op_blend_mas_c_dp; op_blend_span_funcs[SP_N][SM_AS][SC_N][DP][CPU_C] = _op_blend_mas_cn_dp; op_blend_span_funcs[SP_N][SM_AS][SC_AN][DP][CPU_C] = _op_blend_mas_can_dp; op_blend_span_funcs[SP_N][SM_AS][SC_AA][DP][CPU_C] = _op_blend_mas_caa_dp; op_blend_span_funcs[SP_N][SM_AS][SC][DP_AN][CPU_C] = _op_blend_mas_c_dpan; op_blend_span_funcs[SP_N][SM_AS][SC_N][DP_AN][CPU_C] = _op_blend_mas_cn_dpan; op_blend_span_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_C] = _op_blend_mas_can_dpan; op_blend_span_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_C] = _op_blend_mas_caa_dpan; } #endif #ifdef BUILD_C static void _op_blend_pt_mas_c_dp(DATA32 s, DATA8 m, DATA32 c, DATA32 *d) { s = MUL_SYM(m, c); m = 255 - (s >> 24); *d = s + MUL_256(m, *d); } static void _op_blend_pt_mas_can_dp(DATA32 s __UNUSED__, DATA8 m, DATA32 c, DATA32 *d) { *d = INTERP_256(m + 1, c, *d); } #define _op_blend_pt_mas_cn_dp _op_blend_pt_mas_can_dp #define _op_blend_pt_mas_caa_dp _op_blend_pt_mas_c_dp #define _op_blend_pt_mas_c_dpan _op_blend_pt_mas_c_dp #define _op_blend_pt_mas_cn_dpan _op_blend_pt_mas_cn_dp #define _op_blend_pt_mas_can_dpan _op_blend_pt_mas_can_dp #define _op_blend_pt_mas_caa_dpan _op_blend_pt_mas_caa_dp static void init_blend_mask_color_pt_funcs_c(void) { op_blend_pt_funcs[SP_N][SM_AS][SC][DP][CPU_C] = _op_blend_pt_mas_c_dp; op_blend_pt_funcs[SP_N][SM_AS][SC_N][DP][CPU_C] = _op_blend_pt_mas_cn_dp; op_blend_pt_funcs[SP_N][SM_AS][SC_AN][DP][CPU_C] = _op_blend_pt_mas_can_dp; op_blend_pt_funcs[SP_N][SM_AS][SC_AA][DP][CPU_C] = _op_blend_pt_mas_caa_dp; op_blend_pt_funcs[SP_N][SM_AS][SC][DP_AN][CPU_C] = _op_blend_pt_mas_c_dpan; op_blend_pt_funcs[SP_N][SM_AS][SC_N][DP_AN][CPU_C] = _op_blend_pt_mas_cn_dpan; op_blend_pt_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_C] = _op_blend_pt_mas_can_dpan; op_blend_pt_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_C] = _op_blend_pt_mas_caa_dpan; } #endif /*-----*/ /* blend_rel mask x color --> dst */ #ifdef BUILD_C static void _op_blend_rel_mas_c_dp(DATA32 *s __UNUSED__, DATA8 *m, DATA32 c, DATA32 *d, int l) { DATA32 *e; int alpha; UNROLL8_PLD_WHILE(d, l, e, { DATA32 mc = MUL_SYM(*m, c); alpha = 256 - (mc >> 24); *d = MUL_SYM(*d >> 24, mc) + MUL_256(alpha, *d); d++; m++; }); } #define _op_blend_rel_mas_cn_dp _op_blend_rel_mas_c_dp #define _op_blend_rel_mas_can_dp _op_blend_rel_mas_c_dp #define _op_blend_rel_mas_caa_dp _op_blend_rel_mas_c_dp #define _op_blend_rel_mas_c_dpan _op_blend_mas_c_dpan #define _op_blend_rel_mas_cn_dpan _op_blend_mas_cn_dpan #define _op_blend_rel_mas_can_dpan _op_blend_mas_can_dpan #define _op_blend_rel_mas_caa_dpan _op_blend_mas_caa_dpan static void init_blend_rel_mask_color_span_funcs_c(void) { op_blend_rel_span_funcs[SP_N][SM_AS][SC][DP][CPU_C] = _op_blend_rel_mas_c_dp; op_blend_rel_span_funcs[SP_N][SM_AS][SC_N][DP][CPU_C] = _op_blend_rel_mas_can_dp; op_blend_rel_span_funcs[SP_N][SM_AS][SC_AN][DP][CPU_C] = _op_blend_rel_mas_can_dp; op_blend_rel_span_funcs[SP_N][SM_AS][SC_AA][DP][CPU_C] = _op_blend_rel_mas_caa_dp; op_blend_rel_span_funcs[SP_N][SM_AS][SC][DP_AN][CPU_C] = _op_blend_rel_mas_c_dpan; op_blend_rel_span_funcs[SP_N][SM_AS][SC_N][DP_AN][CPU_C] = _op_blend_rel_mas_cn_dpan; op_blend_rel_span_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_C] = _op_blend_rel_mas_can_dpan; op_blend_rel_span_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_C] = _op_blend_rel_mas_caa_dpan; } #endif #ifdef BUILD_C static void _op_blend_rel_pt_mas_c_dp(DATA32 s, DATA8 m, DATA32 c, DATA32 *d) { s = MUL_SYM(m, c); c = 256 - (s >> 24); *d = MUL_SYM(*d >> 24, s) + MUL_256(c, *d); } #define _op_blend_rel_pt_mas_cn_dp _op_blend_rel_pt_mas_c_dp #define _op_blend_rel_pt_mas_can_dp _op_blend_rel_pt_mas_c_dp #define _op_blend_rel_pt_mas_caa_dp _op_blend_rel_pt_mas_c_dp #define _op_blend_rel_pt_mas_c_dpan _op_blend_pt_mas_c_dpan #define _op_blend_rel_pt_mas_cn_dpan _op_blend_pt_mas_cn_dpan #define _op_blend_rel_pt_mas_can_dpan _op_blend_pt_mas_can_dpan #define _op_blend_rel_pt_mas_caa_dpan _op_blend_pt_mas_caa_dpan static void init_blend_rel_mask_color_pt_funcs_c(void) { op_blend_rel_pt_funcs[SP_N][SM_AS][SC][DP][CPU_C] = _op_blend_rel_pt_mas_c_dp; op_blend_rel_pt_funcs[SP_N][SM_AS][SC_N][DP][CPU_C] = _op_blend_rel_pt_mas_cn_dp; op_blend_rel_pt_funcs[SP_N][SM_AS][SC_AN][DP][CPU_C] = _op_blend_rel_pt_mas_can_dp; op_blend_rel_pt_funcs[SP_N][SM_AS][SC_AA][DP][CPU_C] = _op_blend_rel_pt_mas_caa_dp; op_blend_rel_pt_funcs[SP_N][SM_AS][SC][DP_AN][CPU_C] = _op_blend_rel_pt_mas_c_dpan; op_blend_rel_pt_funcs[SP_N][SM_AS][SC_N][DP_AN][CPU_C] = _op_blend_rel_pt_mas_cn_dpan; op_blend_rel_pt_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_C] = _op_blend_rel_pt_mas_can_dpan; op_blend_rel_pt_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_C] = _op_blend_rel_pt_mas_caa_dpan; } #endif evas-1.7.9/src/lib/engines/common/evas_op_blend/op_blend_pixel_mask_.c0000664000175000017500000001451612175475547023017 00000000000000/* blend pixel x mask --> dst */ #ifdef BUILD_C static void _op_blend_p_mas_dp(DATA32 *s, DATA8 *m, DATA32 c, DATA32 *d, int l) { DATA32 *e; int alpha; UNROLL8_PLD_WHILE(d, l, e, { alpha = *m; switch(alpha) { case 0: break; case 255: alpha = 256 - (*s >> 24); *d = *s + MUL_256(alpha, *d); break; default: c = MUL_SYM(alpha, *s); alpha = 256 - (c >> 24); *d = c + MUL_256(alpha, *d); break; } m++; s++; d++; }); } static void _op_blend_pas_mas_dp(DATA32 *s, DATA8 *m, DATA32 c __UNUSED__, DATA32 *d, int l) { DATA32 *e; int alpha; UNROLL8_PLD_WHILE(d, l, e, { alpha = *m; switch(alpha) { case 0: break; case 255: *d = *s; break; default: alpha++; *d = INTERP_256(alpha, *s, *d); break; } m++; s++; d++; }); } static void _op_blend_pan_mas_dp(DATA32 *s, DATA8 *m, DATA32 c __UNUSED__, DATA32 *d, int l) { DATA32 *e; int alpha; UNROLL8_PLD_WHILE(d, l, e, { alpha = *m; switch(alpha) { case 0: break; case 255: *d = *s; break; default: alpha++; *d = INTERP_256(alpha, *s, *d); break; } m++; s++; d++; }); } #define _op_blend_p_mas_dpan _op_blend_p_mas_dp #define _op_blend_pas_mas_dpan _op_blend_pas_mas_dp #define _op_blend_pan_mas_dpan _op_blend_pan_mas_dp static void init_blend_pixel_mask_span_funcs_c(void) { op_blend_span_funcs[SP][SM_AS][SC_N][DP][CPU_C] = _op_blend_p_mas_dp; op_blend_span_funcs[SP_AS][SM_AS][SC_N][DP][CPU_C] = _op_blend_pas_mas_dp; op_blend_span_funcs[SP_AN][SM_AS][SC_N][DP][CPU_C] = _op_blend_pan_mas_dp; op_blend_span_funcs[SP][SM_AS][SC_N][DP_AN][CPU_C] = _op_blend_p_mas_dpan; op_blend_span_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_C] = _op_blend_pas_mas_dpan; op_blend_span_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_C] = _op_blend_pan_mas_dpan; } #endif #ifdef BUILD_C static void _op_blend_pt_p_mas_dp(DATA32 s, DATA8 m, DATA32 c, DATA32 *d) { s = MUL_SYM(m, s); c = 256 - (s >> 24); *d = s + MUL_256(c, *d); } static void _op_blend_pt_pan_mas_dp(DATA32 s, DATA8 m, DATA32 c __UNUSED__, DATA32 *d) { *d = INTERP_256(m + 1, s, *d); } #define _op_blend_pt_pas_mas_dp _op_blend_pt_p_mas_dp #define _op_blend_pt_p_mas_dpan _op_blend_pt_p_mas_dp #define _op_blend_pt_pas_mas_dpan _op_blend_pt_pas_mas_dp #define _op_blend_pt_pan_mas_dpan _op_blend_pt_pan_mas_dp static void init_blend_pixel_mask_pt_funcs_c(void) { op_blend_pt_funcs[SP][SM_AS][SC_N][DP][CPU_C] = _op_blend_pt_p_mas_dp; op_blend_pt_funcs[SP_AS][SM_AS][SC_N][DP][CPU_C] = _op_blend_pt_pas_mas_dp; op_blend_pt_funcs[SP_AN][SM_AS][SC_N][DP][CPU_C] = _op_blend_pt_pan_mas_dp; op_blend_pt_funcs[SP][SM_AS][SC_N][DP_AN][CPU_C] = _op_blend_pt_p_mas_dpan; op_blend_pt_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_C] = _op_blend_pt_pas_mas_dpan; op_blend_pt_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_C] = _op_blend_pt_pan_mas_dpan; } #endif /*-----*/ /* blend_rel pixel x mask -> dst */ #ifdef BUILD_C static void _op_blend_rel_p_mas_dp(DATA32 *s, DATA8 *m, DATA32 c, DATA32 *d, int l) { DATA32 *e; int alpha; UNROLL8_PLD_WHILE(d, l, e, { c = MUL_SYM(*m, *s); alpha = 256 - (c >> 24); *d = MUL_SYM(*d >> 24, c) + MUL_256(alpha, *d); d++; m++; s++; }); } #define _op_blend_rel_pas_mas_dp _op_blend_rel_p_mas_dp #define _op_blend_rel_pan_mas_dp _op_blend_rel_p_mas_dp #define _op_blend_rel_p_mas_dpan _op_blend_p_mas_dpan #define _op_blend_rel_pas_mas_dpan _op_blend_pas_mas_dpan #define _op_blend_rel_pan_mas_dpan _op_blend_pan_mas_dpan static void init_blend_rel_pixel_mask_span_funcs_c(void) { op_blend_rel_span_funcs[SP][SM_AS][SC_N][DP][CPU_C] = _op_blend_rel_p_mas_dp; op_blend_rel_span_funcs[SP_AS][SM_AS][SC_N][DP][CPU_C] = _op_blend_rel_pas_mas_dp; op_blend_rel_span_funcs[SP_AN][SM_AS][SC_N][DP][CPU_C] = _op_blend_rel_pan_mas_dp; op_blend_rel_span_funcs[SP][SM_AS][SC_N][DP_AN][CPU_C] = _op_blend_rel_p_mas_dpan; op_blend_rel_span_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_C] = _op_blend_rel_pas_mas_dpan; op_blend_rel_span_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_C] = _op_blend_rel_pan_mas_dpan; } #endif #ifdef BUILD_C static void _op_blend_rel_pt_p_mas_dp(DATA32 s, DATA8 m, DATA32 c, DATA32 *d) { s = MUL_SYM(m, s); c = 256 - (s >> 24); *d = MUL_SYM(*d >> 24, s) + MUL_256(c, *d); } #define _op_blend_rel_pt_pas_mas_dp _op_blend_rel_pt_p_mas_dp #define _op_blend_rel_pt_pan_mas_dp _op_blend_rel_pt_p_mas_dp #define _op_blend_rel_pt_p_mas_dpan _op_blend_pt_p_mas_dpan #define _op_blend_rel_pt_pas_mas_dpan _op_blend_pt_pas_mas_dpan #define _op_blend_rel_pt_pan_mas_dpan _op_blend_pt_pan_mas_dpan static void init_blend_rel_pixel_mask_pt_funcs_c(void) { op_blend_rel_pt_funcs[SP][SM_AS][SC_N][DP][CPU_C] = _op_blend_rel_pt_p_mas_dp; op_blend_rel_pt_funcs[SP_AS][SM_AS][SC_N][DP][CPU_C] = _op_blend_rel_pt_pas_mas_dp; op_blend_rel_pt_funcs[SP_AN][SM_AS][SC_N][DP][CPU_C] = _op_blend_rel_pt_pan_mas_dp; op_blend_rel_pt_funcs[SP][SM_AS][SC_N][DP_AN][CPU_C] = _op_blend_rel_pt_p_mas_dpan; op_blend_rel_pt_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_C] = _op_blend_rel_pt_pas_mas_dpan; op_blend_rel_pt_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_C] = _op_blend_rel_pt_pan_mas_dpan; } #endif evas-1.7.9/src/lib/engines/common/evas_op_blend/op_blend_pixel_color_sse3.c0000664000175000017500000005055612175475547024004 00000000000000/* blend pixel x color --> dst */ #ifdef BUILD_SSE3 static void _op_blend_p_c_dp_sse3(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { DATA32 alpha; const __m128i c_packed = _mm_set_epi32(c, c, c, c); LOOP_ALIGNED_U1_A48_SSE3(d, l, { /* UOP */ DATA32 sc = MUL4_SYM(c, *s); alpha = 256 - (sc >> 24); *d = sc + MUL_256(alpha, *d); d++; s++; l--; }, { /* A4OP */ __m128i s0 = _mm_lddqu_si128((__m128i *)s); __m128i d0 = _mm_load_si128((__m128i *)d); __m128i sc0 = mul4_sym_sse3(c_packed, s0); __m128i a0 = sub4_alpha_sse3(sc0); __m128i mul0 = mul_256_sse3(a0, d0); d0 = _mm_add_epi32(sc0, mul0); _mm_store_si128((__m128i *)d, d0); d += 4; s += 4; l -= 4; }, { /* A8OP */ __m128i s0 = _mm_lddqu_si128((__m128i *)s); __m128i d0 = _mm_load_si128((__m128i *)d); __m128i s1 = _mm_lddqu_si128((__m128i *)(s+4)); __m128i d1 = _mm_load_si128((__m128i *)(d+4)); __m128i sc0 = mul4_sym_sse3(c_packed, s0); __m128i sc1 = mul4_sym_sse3(c_packed, s1); __m128i a0 = sub4_alpha_sse3(sc0); __m128i a1 = sub4_alpha_sse3(sc1); __m128i mul0 = mul_256_sse3(a0, d0); __m128i mul1 = mul_256_sse3(a1, d1); d0 = _mm_add_epi32(sc0, mul0); d1 = _mm_add_epi32(sc1, mul1); _mm_store_si128((__m128i *)d, d0); _mm_store_si128((__m128i *)(d+4), d1); d += 8; s += 8; l -= 8; }) } static void _op_blend_pan_c_dp_sse3(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { DATA32 c_a = c & 0xFF000000; DATA32 alpha = 256 - (c >> 24); const __m128i c_packed = _mm_set_epi32(c, c, c, c); const __m128i c_alpha = _mm_set_epi32(c_a, c_a, c_a, c_a); const __m128i a0 = _mm_set_epi32(alpha, alpha, alpha, alpha); LOOP_ALIGNED_U1_A48_SSE3(d, l, { /* UOP */ *d = ((c & 0xff000000) + MUL3_SYM(c, *s)) + MUL_256(alpha, *d); d++; s++; l--; }, { /* A4OP */ __m128i s0 = _mm_lddqu_si128((__m128i *)s); __m128i d0 = _mm_load_si128((__m128i *)d); __m128i r0 = _mm_add_epi32(mul3_sym_sse3(c_packed, s0), mul_256_sse3(a0, d0)); r0 = _mm_add_epi32(r0, c_alpha); _mm_store_si128((__m128i *)d, r0); d += 4; s += 4; l -= 4; }, { /* A8OP */ __m128i s0 = _mm_lddqu_si128((__m128i *)s); __m128i d0 = _mm_load_si128((__m128i *)d); __m128i s1 = _mm_lddqu_si128((__m128i *)(s+4)); __m128i d1 = _mm_load_si128((__m128i *)(d+4)); __m128i r0 = _mm_add_epi32(mul3_sym_sse3(c_packed, s0), mul_256_sse3(a0, d0)); __m128i r1 = _mm_add_epi32(mul3_sym_sse3(c_packed, s1), mul_256_sse3(a0, d1)); r0 = _mm_add_epi32(r0, c_alpha); r1 = _mm_add_epi32(r1, c_alpha); _mm_store_si128((__m128i *)d, r0); _mm_store_si128((__m128i *)(d+4), r1); d += 8; s += 8; l -= 8; }) } static void _op_blend_p_can_dp_sse3(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { int alpha; const __m128i c_packed = _mm_set_epi32(c, c, c, c); LOOP_ALIGNED_U1_A48_SSE3(d, l, { /* UOP */ alpha = 256 - (*s >> 24); *d = ((*s & 0xff000000) + MUL3_SYM(c, *s)) + MUL_256(alpha, *d); d++; s++; l--; }, { /* A4OP */ __m128i s0 = _mm_lddqu_si128((__m128i *)s); __m128i d0 = _mm_load_si128((__m128i *)d); __m128i a0 = sub4_alpha_sse3(s0); __m128i r0 = _mm_add_epi32(mul3_sym_sse3(c_packed, s0), mul_256_sse3(a0, d0)); r0 = _mm_add_epi32(r0, _mm_and_si128(s0, A_MASK_SSE3)); _mm_store_si128((__m128i *)d, r0); d += 4; s += 4; l -= 4; }, { __m128i s0 = _mm_lddqu_si128((__m128i *)s); __m128i d0 = _mm_load_si128((__m128i *)d); __m128i s1 = _mm_lddqu_si128((__m128i *)(s+4)); __m128i d1 = _mm_load_si128((__m128i *)(d+4)); __m128i a0 = sub4_alpha_sse3(s0); __m128i a1 = sub4_alpha_sse3(s1); __m128i r0 = _mm_add_epi32(mul3_sym_sse3(c_packed, s0), mul_256_sse3(a0, d0)); __m128i r1 = _mm_add_epi32(mul3_sym_sse3(c_packed, s1), mul_256_sse3(a1, d1)); r0 = _mm_add_epi32(r0, _mm_and_si128(s0, A_MASK_SSE3)); r1 = _mm_add_epi32(r1, _mm_and_si128(s1, A_MASK_SSE3)); _mm_store_si128((__m128i *)d, r0); _mm_store_si128((__m128i *)(d+4), r1); d += 8; s += 8; l -= 8; }) } static void _op_blend_pan_can_dp_sse3(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { const __m128i c_packed = _mm_set_epi32(c, c, c, c); LOOP_ALIGNED_U1_A48_SSE3(d, l, { /* UOP */ *d++ = 0xff000000 + MUL3_SYM(c, *s); s++; l--; }, { /* A4OP */ __m128i s0 = _mm_lddqu_si128((__m128i *)s); __m128i r0 = mul3_sym_sse3(c_packed, s0); r0 = _mm_add_epi32(r0, A_MASK_SSE3); _mm_store_si128((__m128i *)d, r0); d += 4; s += 4; l -= 4; }, { /* A8OP */ __m128i s0 = _mm_lddqu_si128((__m128i *)s); __m128i s1 = _mm_lddqu_si128((__m128i *)(s+4)); __m128i r0 = mul3_sym_sse3(c_packed, s0); __m128i r1 = mul3_sym_sse3(c_packed, s1); r0 = _mm_add_epi32(r0, A_MASK_SSE3); r1 = _mm_add_epi32(r1, A_MASK_SSE3); _mm_store_si128((__m128i *)d, r0); _mm_store_si128((__m128i *)(d+4), r1); d += 8; s += 8; l -= 8; }) } static void _op_blend_p_caa_dp_sse3(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { int alpha; c = 1 + (c & 0xff); const __m128i c_packed = _mm_set_epi32(c, c, c, c); LOOP_ALIGNED_U1_A48_SSE3(d, l, { /* UOP */ DATA32 sc = MUL_256(c, *s); alpha = 256 - (sc >> 24); *d = sc + MUL_256(alpha, *d); d++; s++; l--; }, { /* A4OP */ __m128i s0 = _mm_lddqu_si128((__m128i *)s); __m128i d0 = _mm_load_si128 ((__m128i *)d); __m128i sc0 = mul_256_sse3(c_packed, s0); __m128i a0 = sub4_alpha_sse3(sc0); __m128i r0 = _mm_add_epi32(mul_256_sse3(a0, d0), sc0); _mm_store_si128((__m128i *)d, r0); d += 4; s += 4; l -= 4; }, { __m128i s0 = _mm_lddqu_si128((__m128i *)s); __m128i d0 = _mm_load_si128((__m128i *)d); __m128i s1 = _mm_lddqu_si128((__m128i *)(s+4)); __m128i d1 = _mm_load_si128((__m128i *)(d+4)); __m128i sc0 = mul_256_sse3(c_packed, s0); __m128i sc1 = mul_256_sse3(c_packed, s1); __m128i a0 = sub4_alpha_sse3(sc0); __m128i a1 = sub4_alpha_sse3(sc1); __m128i r0 = _mm_add_epi32(mul_256_sse3(a0, d0), sc0); __m128i r1 = _mm_add_epi32(mul_256_sse3(a1, d1), sc1); _mm_store_si128((__m128i *)d, r0); _mm_store_si128((__m128i *)(d+4), r1); d += 8; s += 8; l -= 8; }) } static void _op_blend_pan_caa_dp_sse3(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { c = 1 + (c & 0xff); const __m128i c_packed = _mm_set_epi32(c, c, c,c); LOOP_ALIGNED_U1_A48_SSE3(d, l, { /* UOP */ *d = INTERP_256(c, *s, *d); d++; s++; l--; }, { /* A4OP */ __m128i s0 = _mm_lddqu_si128((__m128i *)s); __m128i d0 = _mm_load_si128((__m128i *)d); __m128i r0 = interp4_256_sse3(c_packed, s0, d0); _mm_store_si128((__m128i *)d, r0); d += 4; s += 4; l -= 4; }, { __m128i s0 = _mm_lddqu_si128((__m128i *)s); __m128i d0 = _mm_load_si128((__m128i *)d); __m128i s1 = _mm_lddqu_si128((__m128i *)(s+4)); __m128i d1 = _mm_load_si128((__m128i *)(d+4)); __m128i r0 = interp4_256_sse3(c_packed, s0, d0); __m128i r1 = interp4_256_sse3(c_packed, s1, d1); _mm_store_si128((__m128i *)d, r0); _mm_store_si128((__m128i *)(d+4), r1); d += 8; s += 8; l -= 8; }) } #define _op_blend_pas_c_dp_sse3 _op_blend_p_c_dp_sse3 #define _op_blend_pas_can_dp_sse3 _op_blend_p_can_dp_sse3 #define _op_blend_pas_caa_dp_sse3 _op_blend_p_caa_dp_sse3 #define _op_blend_p_c_dpan_sse3 _op_blend_p_c_dp_sse3 #define _op_blend_pas_c_dpan_sse3 _op_blend_pas_c_dp_sse3 #define _op_blend_pan_c_dpan_sse3 _op_blend_pan_c_dp_sse3 #define _op_blend_p_can_dpan_sse3 _op_blend_p_can_dp_sse3 #define _op_blend_pas_can_dpan_sse3 _op_blend_pas_can_dp_sse3 #define _op_blend_pan_can_dpan_sse3 _op_blend_pan_can_dp_sse3 #define _op_blend_p_caa_dpan_sse3 _op_blend_p_caa_dp_sse3 #define _op_blend_pas_caa_dpan_sse3 _op_blend_pas_caa_dp_sse3 #define _op_blend_pan_caa_dpan_sse3 _op_blend_pan_caa_dp_sse3 static void init_blend_pixel_color_span_funcs_sse3(void) { op_blend_span_funcs[SP][SM_N][SC][DP][CPU_SSE3] = _op_blend_p_c_dp_sse3; op_blend_span_funcs[SP_AS][SM_N][SC][DP][CPU_SSE3] = _op_blend_pas_c_dp_sse3; op_blend_span_funcs[SP_AN][SM_N][SC][DP][CPU_SSE3] = _op_blend_pan_c_dp_sse3; op_blend_span_funcs[SP][SM_N][SC_AN][DP][CPU_SSE3] = _op_blend_p_can_dp_sse3; op_blend_span_funcs[SP_AS][SM_N][SC_AN][DP][CPU_SSE3] = _op_blend_pas_can_dp_sse3; op_blend_span_funcs[SP_AN][SM_N][SC_AN][DP][CPU_SSE3] = _op_blend_pan_can_dp_sse3; op_blend_span_funcs[SP][SM_N][SC_AA][DP][CPU_SSE3] = _op_blend_p_caa_dp_sse3; op_blend_span_funcs[SP_AS][SM_N][SC_AA][DP][CPU_SSE3] = _op_blend_pas_caa_dp_sse3; op_blend_span_funcs[SP_AN][SM_N][SC_AA][DP][CPU_SSE3] = _op_blend_pan_caa_dp_sse3; op_blend_span_funcs[SP][SM_N][SC][DP_AN][CPU_SSE3] = _op_blend_p_c_dpan_sse3; op_blend_span_funcs[SP_AS][SM_N][SC][DP_AN][CPU_SSE3] = _op_blend_pas_c_dpan_sse3; op_blend_span_funcs[SP_AN][SM_N][SC][DP_AN][CPU_SSE3] = _op_blend_pan_c_dpan_sse3; op_blend_span_funcs[SP][SM_N][SC_AN][DP_AN][CPU_SSE3] = _op_blend_p_can_dpan_sse3; op_blend_span_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_SSE3] = _op_blend_pas_can_dpan_sse3; op_blend_span_funcs[SP_AN][SM_N][SC_AN][DP_AN][CPU_SSE3] = _op_blend_pan_can_dpan_sse3; op_blend_span_funcs[SP][SM_N][SC_AA][DP_AN][CPU_SSE3] = _op_blend_p_caa_dpan_sse3; op_blend_span_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_SSE3] = _op_blend_pas_caa_dpan_sse3; op_blend_span_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_SSE3] = _op_blend_pan_caa_dpan_sse3; } #define _op_blend_pt_p_c_dp_sse3 NULL #define _op_blend_pt_pas_c_dp_sse3 _op_blend_pt_p_c_dp_sse3 #define _op_blend_pt_pan_c_dp_sse3 _op_blend_pt_p_c_dp_sse3 #define _op_blend_pt_p_can_dp_sse3 _op_blend_pt_p_c_dp_sse3 #define _op_blend_pt_pas_can_dp_sse3 _op_blend_pt_p_c_dp_sse3 #define _op_blend_pt_pan_can_dp_sse3 _op_blend_pt_p_c_dp_sse3 #define _op_blend_pt_p_caa_dp_sse3 _op_blend_pt_p_c_dp_sse3 #define _op_blend_pt_pas_caa_dp_sse3 _op_blend_pt_p_c_dp_sse3 #define _op_blend_pt_pan_caa_dp_sse3 _op_blend_pt_p_c_dp_sse3 #define _op_blend_pt_p_c_dpan_sse3 _op_blend_pt_p_c_dp_sse3 #define _op_blend_pt_pas_c_dpan_sse3 _op_blend_pt_pas_c_dp_sse3 #define _op_blend_pt_pan_c_dpan_sse3 _op_blend_pt_pan_c_dp_sse3 #define _op_blend_pt_p_can_dpan_sse3 _op_blend_pt_p_can_dp_sse3 #define _op_blend_pt_pas_can_dpan_sse3 _op_blend_pt_pas_can_dp_sse3 #define _op_blend_pt_pan_can_dpan_sse3 _op_blend_pt_pan_can_dp_sse3 #define _op_blend_pt_p_caa_dpan_sse3 _op_blend_pt_p_caa_dp_sse3 #define _op_blend_pt_pas_caa_dpan_sse3 _op_blend_pt_pas_caa_dp_sse3 #define _op_blend_pt_pan_caa_dpan_sse3 _op_blend_pt_pan_caa_dp_sse3 static void init_blend_pixel_color_pt_funcs_sse3(void) { op_blend_pt_funcs[SP][SM_N][SC][DP][CPU_SSE3] = _op_blend_pt_p_c_dp_sse3; op_blend_pt_funcs[SP_AS][SM_N][SC][DP][CPU_SSE3] = _op_blend_pt_pas_c_dp_sse3; op_blend_pt_funcs[SP_AN][SM_N][SC][DP][CPU_SSE3] = _op_blend_pt_pan_c_dp_sse3; op_blend_pt_funcs[SP][SM_N][SC_AN][DP][CPU_SSE3] = _op_blend_pt_p_can_dp_sse3; op_blend_pt_funcs[SP_AS][SM_N][SC_AN][DP][CPU_SSE3] = _op_blend_pt_pas_can_dp_sse3; op_blend_pt_funcs[SP_AN][SM_N][SC_AN][DP][CPU_SSE3] = _op_blend_pt_pan_can_dp_sse3; op_blend_pt_funcs[SP][SM_N][SC_AA][DP][CPU_SSE3] = _op_blend_pt_p_caa_dp_sse3; op_blend_pt_funcs[SP_AS][SM_N][SC_AA][DP][CPU_SSE3] = _op_blend_pt_pas_caa_dp_sse3; op_blend_pt_funcs[SP_AN][SM_N][SC_AA][DP][CPU_SSE3] = _op_blend_pt_pan_caa_dp_sse3; op_blend_pt_funcs[SP][SM_N][SC][DP_AN][CPU_SSE3] = _op_blend_pt_p_c_dpan_sse3; op_blend_pt_funcs[SP_AS][SM_N][SC][DP_AN][CPU_SSE3] = _op_blend_pt_pas_c_dpan_sse3; op_blend_pt_funcs[SP_AN][SM_N][SC][DP_AN][CPU_SSE3] = _op_blend_pt_pan_c_dpan_sse3; op_blend_pt_funcs[SP][SM_N][SC_AN][DP_AN][CPU_SSE3] = _op_blend_pt_p_can_dpan_sse3; op_blend_pt_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_SSE3] = _op_blend_pt_pas_can_dpan_sse3; op_blend_pt_funcs[SP_AN][SM_N][SC_AN][DP_AN][CPU_SSE3] = _op_blend_pt_pan_can_dpan_sse3; op_blend_pt_funcs[SP][SM_N][SC_AA][DP_AN][CPU_SSE3] = _op_blend_pt_p_caa_dpan_sse3; op_blend_pt_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_SSE3] = _op_blend_pt_pas_caa_dpan_sse3; op_blend_pt_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_SSE3] = _op_blend_pt_pan_caa_dpan_sse3; } /*-----*/ /* blend_rel pixel x color -> dst */ static void _op_blend_rel_p_c_dp_sse3(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { int alpha; const __m128i c_packed = _mm_set_epi32(c, c, c, c); LOOP_ALIGNED_U1_A48_SSE3(d, l, { /* UOP */ DATA32 sc = MUL4_SYM(c, *s); alpha = 256 - (sc >> 24); *d = MUL_SYM(*d >> 24, sc) + MUL_256(alpha, *d); d++; s++; l--; }, { /* A4OP */ __m128i s0 = _mm_lddqu_si128((__m128i *)s); __m128i d0 = _mm_load_si128((__m128i *)d); __m128i sc0 = mul4_sym_sse3(c_packed, s0); __m128i a0 = sub4_alpha_sse3(sc0); __m128i l0 = mul_sym_sse3(_mm_srli_epi32(d0, 24), sc0); __m128i r0 = mul_256_sse3(a0, d0); r0 = _mm_add_epi32(l0, r0); _mm_store_si128((__m128i *)d, r0); d += 4; s += 4; l -= 4; }, { /* A8OP */ __m128i s0 = _mm_lddqu_si128((__m128i *)s); __m128i d0 = _mm_load_si128((__m128i *)d); __m128i s1 = _mm_lddqu_si128((__m128i *)(s+4)); __m128i d1 = _mm_load_si128((__m128i *)(d+4)); __m128i sc0 = mul4_sym_sse3(c_packed, s0); __m128i sc1 = mul4_sym_sse3(c_packed, s1); __m128i a0 = sub4_alpha_sse3(sc0); __m128i a1 = sub4_alpha_sse3(sc1); __m128i l0 = mul_sym_sse3(_mm_srli_epi32(d0, 24), sc0); __m128i r0 = mul_256_sse3(a0, d0); __m128i l1 = mul_sym_sse3(_mm_srli_epi32(d1, 24), sc1); __m128i r1 = mul_256_sse3(a1, d1); r0 = _mm_add_epi32(l0, r0); r1 = _mm_add_epi32(l1, r1); _mm_store_si128((__m128i *)d, r0); _mm_store_si128((__m128i *)(d+4), r1); d += 8; s += 8; l -= 8; }) } #define _op_blend_rel_pas_c_dp_sse3 _op_blend_rel_p_c_dp_sse3 #define _op_blend_rel_pan_c_dp_sse3 _op_blend_rel_p_c_dp_sse3 #define _op_blend_rel_p_can_dp_sse3 _op_blend_rel_p_c_dp_sse3 #define _op_blend_rel_pas_can_dp_sse3 _op_blend_rel_p_c_dp_sse3 #define _op_blend_rel_pan_can_dp_sse3 _op_blend_rel_p_c_dp_sse3 #define _op_blend_rel_p_caa_dp_sse3 _op_blend_rel_p_c_dp_sse3 #define _op_blend_rel_pas_caa_dp_sse3 _op_blend_rel_p_c_dp_sse3 #define _op_blend_rel_pan_caa_dp_sse3 _op_blend_rel_p_c_dp_sse3 #define _op_blend_rel_p_c_dpan_sse3 _op_blend_p_c_dpan_sse3 #define _op_blend_rel_pas_c_dpan_sse3 _op_blend_pas_c_dpan_sse3 #define _op_blend_rel_pan_c_dpan_sse3 _op_blend_pan_c_dpan_sse3 #define _op_blend_rel_p_can_dpan_sse3 _op_blend_p_can_dpan_sse3 #define _op_blend_rel_pas_can_dpan_sse3 _op_blend_pas_can_dpan_sse3 #define _op_blend_rel_pan_can_dpan_sse3 _op_blend_pan_can_dpan_sse3 #define _op_blend_rel_p_caa_dpan_sse3 _op_blend_p_caa_dpan_sse3 #define _op_blend_rel_pas_caa_dpan_sse3 _op_blend_pas_caa_dpan_sse3 #define _op_blend_rel_pan_caa_dpan_sse3 _op_blend_pan_caa_dpan_sse3 static void init_blend_rel_pixel_color_span_funcs_sse3(void) { op_blend_rel_span_funcs[SP][SM_N][SC][DP][CPU_SSE3] = _op_blend_rel_p_c_dp_sse3; op_blend_rel_span_funcs[SP_AS][SM_N][SC][DP][CPU_SSE3] = _op_blend_rel_pas_c_dp_sse3; op_blend_rel_span_funcs[SP_AN][SM_N][SC][DP][CPU_SSE3] = _op_blend_rel_pan_c_dp_sse3; op_blend_rel_span_funcs[SP][SM_N][SC_AN][DP][CPU_SSE3] = _op_blend_rel_p_can_dp_sse3; op_blend_rel_span_funcs[SP_AS][SM_N][SC_AN][DP][CPU_SSE3] = _op_blend_rel_pas_can_dp_sse3; op_blend_rel_span_funcs[SP_AN][SM_N][SC_AN][DP][CPU_SSE3] = _op_blend_rel_pan_can_dp_sse3; op_blend_rel_span_funcs[SP][SM_N][SC_AA][DP][CPU_SSE3] = _op_blend_rel_p_caa_dp_sse3; op_blend_rel_span_funcs[SP_AS][SM_N][SC_AA][DP][CPU_SSE3] = _op_blend_rel_pas_caa_dp_sse3; op_blend_rel_span_funcs[SP_AN][SM_N][SC_AA][DP][CPU_SSE3] = _op_blend_rel_pan_caa_dp_sse3; op_blend_rel_span_funcs[SP][SM_N][SC][DP_AN][CPU_SSE3] = _op_blend_rel_p_c_dpan_sse3; op_blend_rel_span_funcs[SP_AS][SM_N][SC][DP_AN][CPU_SSE3] = _op_blend_rel_pas_c_dpan_sse3; op_blend_rel_span_funcs[SP_AN][SM_N][SC][DP_AN][CPU_SSE3] = _op_blend_rel_pan_c_dpan_sse3; op_blend_rel_span_funcs[SP][SM_N][SC_AN][DP_AN][CPU_SSE3] = _op_blend_rel_p_can_dpan_sse3; op_blend_rel_span_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_SSE3] = _op_blend_rel_pas_can_dpan_sse3; op_blend_rel_span_funcs[SP_AN][SM_N][SC_AN][DP_AN][CPU_SSE3] = _op_blend_rel_pan_can_dpan_sse3; op_blend_rel_span_funcs[SP][SM_N][SC_AA][DP_AN][CPU_SSE3] = _op_blend_rel_p_caa_dpan_sse3; op_blend_rel_span_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_SSE3] = _op_blend_rel_pas_caa_dpan_sse3; op_blend_rel_span_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_SSE3] = _op_blend_rel_pan_caa_dpan_sse3; } #define _op_blend_rel_pt_p_c_dp_sse3 NULL #define _op_blend_rel_pt_pas_c_dp_sse3 _op_blend_rel_pt_p_c_dp_sse3 #define _op_blend_rel_pt_pan_c_dp_sse3 _op_blend_rel_pt_p_c_dp_sse3 #define _op_blend_rel_pt_p_can_dp_sse3 _op_blend_rel_pt_p_c_dp_sse3 #define _op_blend_rel_pt_pas_can_dp_sse3 _op_blend_rel_pt_p_c_dp_sse3 #define _op_blend_rel_pt_pan_can_dp_sse3 _op_blend_rel_pt_p_c_dp_sse3 #define _op_blend_rel_pt_p_caa_dp_sse3 _op_blend_rel_pt_p_c_dp_sse3 #define _op_blend_rel_pt_pas_caa_dp_sse3 _op_blend_rel_pt_p_c_dp_sse3 #define _op_blend_rel_pt_pan_caa_dp_sse3 _op_blend_rel_pt_p_c_dp_sse3 #define _op_blend_rel_pt_p_c_dpan_sse3 _op_blend_pt_p_c_dpan_sse3 #define _op_blend_rel_pt_pas_c_dpan_sse3 _op_blend_pt_pas_c_dpan_sse3 #define _op_blend_rel_pt_pan_c_dpan_sse3 _op_blend_pt_pan_c_dpan_sse3 #define _op_blend_rel_pt_p_can_dpan_sse3 _op_blend_pt_p_can_dpan_sse3 #define _op_blend_rel_pt_pas_can_dpan_sse3 _op_blend_pt_pas_can_dpan_sse3 #define _op_blend_rel_pt_pan_can_dpan_sse3 _op_blend_pt_pan_can_dpan_sse3 #define _op_blend_rel_pt_p_caa_dpan_sse3 _op_blend_pt_p_caa_dpan_sse3 #define _op_blend_rel_pt_pas_caa_dpan_sse3 _op_blend_pt_pas_caa_dpan_sse3 #define _op_blend_rel_pt_pan_caa_dpan_sse3 _op_blend_pt_pan_caa_dpan_sse3 static void init_blend_rel_pixel_color_pt_funcs_sse3(void) { op_blend_rel_pt_funcs[SP][SM_N][SC][DP][CPU_SSE3] = _op_blend_rel_pt_p_c_dp_sse3; op_blend_rel_pt_funcs[SP_AS][SM_N][SC][DP][CPU_SSE3] = _op_blend_rel_pt_pas_c_dp_sse3; op_blend_rel_pt_funcs[SP_AN][SM_N][SC][DP][CPU_SSE3] = _op_blend_rel_pt_pan_c_dp_sse3; op_blend_rel_pt_funcs[SP][SM_N][SC_AN][DP][CPU_SSE3] = _op_blend_rel_pt_p_can_dp_sse3; op_blend_rel_pt_funcs[SP_AS][SM_N][SC_AN][DP][CPU_SSE3] = _op_blend_rel_pt_pas_can_dp_sse3; op_blend_rel_pt_funcs[SP_AN][SM_N][SC_AN][DP][CPU_SSE3] = _op_blend_rel_pt_pan_can_dp_sse3; op_blend_rel_pt_funcs[SP][SM_N][SC_AA][DP][CPU_SSE3] = _op_blend_rel_pt_p_caa_dp_sse3; op_blend_rel_pt_funcs[SP_AS][SM_N][SC_AA][DP][CPU_SSE3] = _op_blend_rel_pt_pas_caa_dp_sse3; op_blend_rel_pt_funcs[SP_AN][SM_N][SC_AA][DP][CPU_SSE3] = _op_blend_rel_pt_pan_caa_dp_sse3; op_blend_rel_pt_funcs[SP][SM_N][SC][DP_AN][CPU_SSE3] = _op_blend_rel_pt_p_c_dpan_sse3; op_blend_rel_pt_funcs[SP_AS][SM_N][SC][DP_AN][CPU_SSE3] = _op_blend_rel_pt_pas_c_dpan_sse3; op_blend_rel_pt_funcs[SP_AN][SM_N][SC][DP_AN][CPU_SSE3] = _op_blend_rel_pt_pan_c_dpan_sse3; op_blend_rel_pt_funcs[SP][SM_N][SC_AN][DP_AN][CPU_SSE3] = _op_blend_rel_pt_p_can_dpan_sse3; op_blend_rel_pt_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_SSE3] = _op_blend_rel_pt_pas_can_dpan_sse3; op_blend_rel_pt_funcs[SP_AN][SM_N][SC_AN][DP_AN][CPU_SSE3] = _op_blend_rel_pt_pan_can_dpan_sse3; op_blend_rel_pt_funcs[SP][SM_N][SC_AA][DP_AN][CPU_SSE3] = _op_blend_rel_pt_p_caa_dpan_sse3; op_blend_rel_pt_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_SSE3] = _op_blend_rel_pt_pas_caa_dpan_sse3; op_blend_rel_pt_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_SSE3] = _op_blend_rel_pt_pan_caa_dpan_sse3; } #endif evas-1.7.9/src/lib/engines/common/evas_op_blend/op_blend_color_sse3.c0000664000175000017500000001206312175475547022572 00000000000000/* blend color -> dst */ #ifdef BUILD_SSE3 static void _op_blend_c_dp_sse3(DATA32 *s __UNUSED__, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { DATA32 a = 256 - (c >> 24); const __m128i c_packed = _mm_set_epi32(c, c, c, c); const __m128i a_packed = _mm_set_epi32(a, a, a, a); LOOP_ALIGNED_U1_A48_SSE3(d, l, { /* UOP */ *d = c + MUL_256(a, *d); d++; l--; }, { /* A4OP */ __m128i d0 = _mm_load_si128((__m128i *)d); d0 = mul_256_sse3(a_packed, d0); d0 = _mm_add_epi32(d0, c_packed); _mm_store_si128((__m128i *)d, d0); d += 4; l -= 4; }, { /* A8OP */ __m128i d0 = _mm_load_si128((__m128i *)d); __m128i d1 = _mm_load_si128((__m128i *)(d+4)); d0 = mul_256_sse3(a_packed, d0); d1 = mul_256_sse3(a_packed, d1); d0 = _mm_add_epi32(d0, c_packed); d1 = _mm_add_epi32(d1, c_packed); _mm_store_si128((__m128i *)d, d0); _mm_store_si128((__m128i *)(d+4), d1); d += 8; l -= 8; }) } #define _op_blend_caa_dp_sse3 _op_blend_c_dp_sse3 #define _op_blend_c_dpan_sse3 _op_blend_c_dp_sse3 #define _op_blend_caa_dpan_sse3 _op_blend_c_dpan_sse3 static void init_blend_color_span_funcs_sse3(void) { // FIXME: BUGGY BUGGY Core i5 750 (32bit), 4.5.2 (Ubuntu/Linaro 4.5.2-8ubuntu4), ello (text and rectangle) // op_blend_span_funcs[SP_N][SM_N][SC][DP][CPU_SSE3] = _op_blend_c_dp_sse3; op_blend_span_funcs[SP_N][SM_N][SC_AA][DP][CPU_SSE3] = _op_blend_caa_dp_sse3; // FIXME: BUGGY BUGGY Core i5 750 (32bit), 4.5.2 (Ubuntu/Linaro 4.5.2-8ubuntu4), ello (text and rectangle) // op_blend_span_funcs[SP_N][SM_N][SC][DP_AN][CPU_SSE3] = _op_blend_c_dpan_sse3; op_blend_span_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_SSE3] = _op_blend_caa_dpan_sse3; } #define _op_blend_pt_c_dp_sse3 NULL #define _op_blend_pt_caa_dp_sse3 _op_blend_pt_c_dp_sse3 #define _op_blend_pt_c_dpan_sse3 _op_blend_pt_c_dp_sse3 #define _op_blend_pt_caa_dpan_sse3 _op_blend_pt_c_dpan_sse3 #define _op_blend_pt_c_dpas_sse3 _op_blend_pt_c_dp_sse3 #define _op_blend_pt_caa_dpas_sse3 _op_blend_pt_c_dp_sse3 static void init_blend_color_pt_funcs_sse3(void) { op_blend_pt_funcs[SP_N][SM_N][SC][DP][CPU_SSE3] = _op_blend_pt_c_dp_sse3; op_blend_pt_funcs[SP_N][SM_N][SC_AA][DP][CPU_SSE3] = _op_blend_pt_caa_dp_sse3; op_blend_pt_funcs[SP_N][SM_N][SC][DP_AN][CPU_SSE3] = _op_blend_pt_c_dpan_sse3; op_blend_pt_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_SSE3] = _op_blend_pt_caa_dpan_sse3; } /*-----*/ /* blend_rel color -> dst */ static void _op_blend_rel_c_dp_sse3(DATA32 *s __UNUSED__, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { int alpha = 256 - (c >> 24); const __m128i c_packed = _mm_set_epi32(c, c, c, c); const __m128i alpha_packed = _mm_set_epi32(alpha, alpha, alpha, alpha); LOOP_ALIGNED_U1_A48_SSE3(d, l, { /* UOP */ *d = MUL_SYM(*d >> 24, c) + MUL_256(alpha, *d); d++; l--; }, { /* A4OP */ __m128i d0 = _mm_load_si128((__m128i *)d); __m128i mul0 = mul_256_sse3(alpha_packed, d0); __m128i sym0 = mul_sym_sse3(_mm_srli_epi32(d0, 24), c_packed); d0 = _mm_add_epi32(mul0, sym0); _mm_store_si128((__m128i *)d, d0); d += 4; l -= 4; }, { /* A8OP */ __m128i d0 = _mm_load_si128((__m128i *)d); __m128i d1 = _mm_load_si128((__m128i *)(d+4)); __m128i mul0 = mul_256_sse3(alpha_packed, d0); __m128i mul1 = mul_256_sse3(alpha_packed, d1); __m128i sym0 = mul_sym_sse3(_mm_srli_epi32(d0, 24), c_packed); __m128i sym1 = mul_sym_sse3(_mm_srli_epi32(d1, 24), c_packed); d0 = _mm_add_epi32(mul0, sym0); d1 = _mm_add_epi32(mul1, sym1); _mm_store_si128((__m128i *)d, d0); _mm_store_si128((__m128i *)(d+4), d1); d += 8; l -= 8; }) } #define _op_blend_rel_caa_dp_sse3 _op_blend_rel_c_dp_sse3 #define _op_blend_rel_c_dpan_sse3 _op_blend_c_dpan_sse3 #define _op_blend_rel_caa_dpan_sse3 _op_blend_caa_dpan_sse3 static void init_blend_rel_color_span_funcs_sse3(void) { op_blend_rel_span_funcs[SP_N][SM_N][SC][DP][CPU_SSE3] = _op_blend_rel_c_dp_sse3; op_blend_rel_span_funcs[SP_N][SM_N][SC_AA][DP][CPU_SSE3] = _op_blend_rel_caa_dp_sse3; op_blend_rel_span_funcs[SP_N][SM_N][SC][DP_AN][CPU_SSE3] = _op_blend_rel_c_dpan_sse3; op_blend_rel_span_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_SSE3] = _op_blend_rel_caa_dpan_sse3; } #define _op_blend_rel_pt_c_dp_sse3 NULL #define _op_blend_rel_pt_caa_dp_sse3 _op_blend_rel_pt_c_dp_sse3 #define _op_blend_rel_pt_c_dpan_sse3 _op_blend_pt_c_dpan_sse3 #define _op_blend_rel_pt_caa_dpan_sse3 _op_blend_pt_caa_dpan_sse3 static void init_blend_rel_color_pt_funcs_sse3(void) { op_blend_rel_pt_funcs[SP_N][SM_N][SC][DP][CPU_SSE3] = _op_blend_rel_pt_c_dp_sse3; op_blend_rel_pt_funcs[SP_N][SM_N][SC_AA][DP][CPU_SSE3] = _op_blend_rel_pt_caa_dp_sse3; op_blend_rel_pt_funcs[SP_N][SM_N][SC][DP_AN][CPU_SSE3] = _op_blend_rel_pt_c_dpan_sse3; op_blend_rel_pt_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_SSE3] = _op_blend_rel_pt_caa_dpan_sse3; } #endif evas-1.7.9/src/lib/engines/common/evas_op_blend/op_blend_mask_color_neon.c0000664000175000017500000003641012175475547023671 00000000000000#define NEONDEBUG 0 #if NEONDEBUG #define DEBUG_FNCOUNT(x) \ do { \ static int _foo = 0; \ if (_foo++%10000 ==0) \ printf("%s %+d %s: %d (%s)\n",__FILE__,__LINE__,__FUNCTION__,\ _foo, x " optimised");\ } while (0) #else #define DEBUG_FNCOUNT(x) ((void)x) #endif /* blend mask x color -> dst */ #ifdef BUILD_NEON static void _op_blend_mas_c_dp_neon(DATA32 *s __UNUSED__, DATA8 *m, DATA32 c, DATA32 *d, int l) { DATA32 *e; DEBUG_FNCOUNT(""); #define AP "blend_mas_c_dp_" asm volatile ( ".fpu neon \n\t" " vdup.i32 q15, %[c] \n\t" " vmov.i8 q14, #1 \n\t" // If aligned already - straight to quads " andS %[tmp], %[d],$0xf \n\t" " beq "AP"quadloops \n\t" " andS %[tmp], %[d],$0x4 \n\t" " beq "AP"dualloop \n\t" AP"singleloop: \n\t" " vld1.8 d0[0], [%[m]]! \n\t" " vld1.32 d4[0], [%[d]] \n\t" " vdup.u8 d0, d0[0] \n\t" " vmull.u8 q4, d0, d30 \n\t" " vqrshrn.u16 d12, q4, #8 \n\t" " vmvn.u16 d14, d12 \n\t" " vshr.u32 d16, d14, #24 \n\t" " vmul.u32 d16, d16, d28 \n\t" " vmull.u8 q7, d16, d4 \n\t" " vqrshrn.u16 d0, q7, #8 \n\t" " vqadd.u8 d0, d0, d12 \n\t" " vst1.32 d0[0], [%[d]]! \n\t" // Can we go the fast path? " andS %[tmp], %[d],$0xf \n\t" " beq "AP"quadloops \n\t" AP"dualloop: \n\t" " sub %[tmp], %[e], %[d] \n\t" " cmp %[tmp], #16 \n\t" " blt "AP"loopout \n\t" " vld1.16 d0[0], [%[m]]! \n\t" " vldm %[d], {d4} \n\t" " vmovl.u8 q0, d0 \n\t" " vmovl.u8 q0, d0 \n\t" " vmul.u32 q0, q14 \n\t" " vmull.u8 q4, d0, d30 \n\t" " vqrshrn.u16 d12, q4, #8 \n\t" " vmvn.u16 d14, d12 \n\t" " vshr.u32 d16, d14, #24 \n\t" " vmul.u32 d16, d16, d28 \n\t" " vmull.u8 q7, d16, d4 \n\t" " vqrshrn.u16 d0, q7, #8 \n\t" " vqadd.u8 q0, q0, q6 \n\t" " vstm %[d]!, {d0} \n\t" AP"quadloops: \n\t" " sub %[tmp], %[e], %[d] \n\t" " cmp %[tmp], #16 \n\t" " blt "AP"loopout \n\t" " sub %[tmp], %[e], #15 \n\t" " sub %[d], #16 \n\t" AP"fastloop:" " add %[d], #16 \n\t" " cmp %[tmp], %[d] \n\t" " ble "AP"loopout \n\t" AP"quadloopint: \n\t" " ldr %[x], [%[m]] \n\t" " add %[m], #4 \n\t" " cmp %[x], #0 \n\t" " beq "AP"fastloop \n\t" " vmov.32 d0[0], %[x] \n\t" " vldm %[d], {d4,d5} \n\t" // Expand M: Fixme: Can we do this quicker? " vmovl.u8 q0, d0 \n\t" " vmovl.u8 q0, d0 \n\t" " vmul.u32 q0, q14 \n\t" // Multiply a * c " vmull.u8 q4, d0, d30 \n\t" " vmull.u8 q5, d1, d31 \n\t" // Shorten " vqrshrn.u16 d12, q4, #8 \n\t" " vqrshrn.u16 d13, q5, #8 \n\t" // extract negated alpha " vmvn.u16 q7, q6 \n\t" " vshr.u32 q8, q7, #24 \n\t" " vmul.u32 q8, q8, q14 \n\t" // Multiply " vmull.u8 q7, d16, d4 \n\t" " vmull.u8 q8, d17, d5 \n\t" " vqrshrn.u16 d0, q7, #8 \n\t" " vqrshrn.u16 d1, q8, #8 \n\t" // Add " vqadd.u8 q0, q0, q6 \n\t" " vstm %[d]!, {d0,d1} \n\t" " cmp %[tmp], %[d] \n\t" " bhi "AP"quadloopint \n\t" AP"loopout: \n\t" #if NEONDEBUG "cmp %[d], %[e] \n\t" "ble "AP"foo \n\t" "cmp %[tmp], %[m] \n\t" "sub %[x], %[x] \n\t" "vst1.32 d0[0], [%[x]] \n\t" AP"foo: \n\t" #endif " cmp %[d], %[e] \n\t" " beq "AP"done \n\t" " sub %[tmp],%[e], %[d] \n\t" " cmp %[tmp],#4 \n\t" " beq "AP"singleout \n\t" AP "dualloop2: \n\t" "sub %[tmp],%[e],$0x8 \n\t" " vld1.16 d0[0], [%[m]]! \n\t" " vldm %[d], {d4} \n\t" " vmovl.u8 q0, d0 \n\t" " vmovl.u8 q0, d0 \n\t" " vmul.u32 q0, q14 \n\t" " vmull.u8 q4, d0, d30 \n\t" " vqrshrn.u16 d12, q4, #8 \n\t" " vmvn.u16 d14, d12 \n\t" " vshr.u32 d16, d14, #24 \n\t" " vmul.u32 d16, d16, d28 \n\t" " vmull.u8 q7, d16, d4 \n\t" " vqrshrn.u16 d0, q7, #8 \n\t" " vqadd.u8 q0, q0, q6 \n\t" " vstm %[d]!, {d0} \n\t" " cmp %[e], %[d] \n\t" " beq "AP"done \n\t" AP"singleout: \n\t" " vld1.8 d0[0], [%[m]]! \n\t" " vld1.32 d4[0], [%[d]] \n\t" " vdup.u8 d0, d0[0] \n\t" " vmull.u8 q4, d0, d30 \n\t" " vqrshrn.u16 d12, q4, #8 \n\t" " vmvn.u16 d14, d12 \n\t" " vshr.u32 d16, d14, #24 \n\t" " vmul.u32 d16, d16, d28 \n\t" " vmull.u8 q7, d16, d4 \n\t" " vqrshrn.u16 d0, q7, #8 \n\t" " vqadd.u8 q0, q0, q6 \n\t" " vst1.32 d0[0], [%[d]]! \n\t" AP"done: \n\t" #if NEONDEBUG "cmp %[d], %[e] \n\t" "beq "AP"reallydone \n\t" "sub %[tmp], %[tmp] \n\t" "vst1.32 d0[0], [%[tmp]] \n\t" AP"reallydone:" #endif : // Out : [e] "r" (d + l), [d] "r" (d), [c] "r" (c), [tmp] "r" (7), [m] "r" (m), [x] "r" (0) : "q0", "q1", "q2","q3", "q4","q5","q6", "q7","q8","q14","q15", "memory" // clobbered ); #undef AP } #endif #ifdef BUILD_NEON static void _op_blend_mas_can_dp_neon(DATA32 *s __UNUSED__, DATA8 *m, DATA32 c, DATA32 *d, int l) { DATA32 *e,*tmp; int alpha; DEBUG_FNCOUNT(""); #define AP "_blend_mas_can_dp_neon_" asm volatile ( ".fpu neon \n\t" "vdup.u32 q9, %[c] \n\t" "vmov.i8 q15, #1 \n\t" "vmov.i8 q14, #0 \n\t" // Make C 16 bit (C in q3/q2) "vmovl.u8 q3, d19 \n\t" "vmovl.u8 q2, d18 \n\t" // Which loop to start " andS %[tmp], %[d],$0xf \n\t" " beq "AP"quadloop \n\t" " andS %[tmp], %[d], #4 \n\t" " beq "AP"dualstart \n\t" AP"singleloop: \n\t" " vld1.8 d0[0], [%[m]]! \n\t" " vld1.32 d8[0], [%[d]] \n\t" " vdup.u8 d0, d0[0] \n\t" " vshr.u8 d0, d0, #1 \n\t" " vmovl.u8 q0, d0 \n\t" " vmovl.u8 q4, d8 \n\t" " vsub.s16 q6, q2, q4 \n\t" " vmul.s16 q6, q0 \n\t" " vshr.s16 q6, #7 \n\t" " vadd.s16 q6, q4 \n\t" " vqmovun.s16 d2, q6 \n\t" " vst1.32 d2[0], [%[d]]! \n\t" " andS %[tmp], %[d], $0xf \n\t" " beq "AP"quadloop \n\t" AP"dualstart: \n\t" " sub %[tmp], %[e], %[d] \n\t" " cmp %[tmp], #16 \n\t" " blt "AP"loopout \n\t" AP"dualloop: \n\t" " vld1.16 d0[0], [%[m]]! \n\t" " vldm %[d], {d8} \n\t" " vmovl.u8 q0, d0 \n\t" " vmovl.u8 q0, d0 \n\t" " vmul.u32 d0, d0, d30 \n\t" " vshr.u8 d0, d0, #1 \n\t" " vmovl.u8 q0, d0 \n\t" " vmovl.u8 q4, d8 \n\t" " vsub.s16 q6, q2, q4 \n\t" " vmul.s16 q6, q0 \n\t" " vshr.s16 q6, #7 \n\t" " vadd.s16 q6, q4 \n\t" " vqmovun.s16 d2, q6 \n\t" " vstm %[d]!, {d2} \n\t" AP"quadloop: \n\t" " sub %[tmp], %[e], %[d] \n\t" " cmp %[tmp], #16 \n\t" " blt "AP"loopout \n\t" " sub %[tmp], %[e], #15 \n\t" " sub %[d], #16 \n\t" AP"fastloop: \n\t" " add %[d], #16 \n\t" " cmp %[tmp], %[d] \n\t" " blt "AP"loopout \n\t" AP"quadloopint: \n\t" // Load the mask: 4 bytes: It has d0/d1 " ldr %[x], [%[m]] \n\t" " add %[m], #4 \n\t" // Check for shortcuts " cmp %[x], #0 \n\t" " beq "AP"fastloop \n\t" " cmp %[x], $0xffffffff \n\t" " beq "AP"quadstore \n\t" " vmov.32 d0[0], %[x] \n\t" // Load d into d8/d9 q4 " vldm %[d], {d8,d9} \n\t" // Get the alpha channel ready (m) " vmovl.u8 q0, d0 \n\t" " vmovl.u8 q0, d0 \n\t" " vmul.u32 q0, q0,q15 \n\t" // Lop a bit off to prevent overflow " vshr.u8 q0, q0, #1 \n\t" // Now make it 16 bit " vmovl.u8 q1, d1 \n\t" " vmovl.u8 q0, d0 \n\t" // 16 bit 'd' " vmovl.u8 q5, d9 \n\t" " vmovl.u8 q4, d8 \n\t" // Diff 'd' & 'c' " vsub.s16 q7, q3, q5 \n\t" " vsub.s16 q6, q2, q4 \n\t" " vmul.s16 q7, q1 \n\t" " vmul.s16 q6, q0 \n\t" // Shift results a bit " vshr.s16 q7, #7 \n\t" " vshr.s16 q6, #7 \n\t" // Add 'd' " vadd.s16 q7, q5 \n\t" " vadd.s16 q6, q4 \n\t" // Make sure none are negative " vqmovun.s16 d9, q7 \n\t" " vqmovun.s16 d8, q6 \n\t" " vstm %[d]!, {d8,d9} \n\t" " cmp %[tmp], %[d] \n\t" " bhi "AP"quadloopint \n\t" " b "AP"loopout \n\t" AP"quadstore: \n\t" " vstm %[d]!, {d18,d19} \n\t" " cmp %[tmp], %[d] \n\t" " bhi "AP"quadloopint \n\t" AP"loopout: \n\t" #if NEONDEBUG "cmp %[d], %[e] \n\t" "ble "AP"foo \n\t" "sub %[tmp], %[tmp] \n\t" "vst1.32 d0[0], [%[tmp]] \n\t" AP"foo: \n\t" #endif " cmp %[e], %[d] \n\t" " beq "AP"done \n\t" " sub %[tmp],%[e], %[d] \n\t" " cmp %[tmp],#8 \n\t" " blt "AP"onebyte \n\t" // Load the mask: 2 bytes: It has d0 " vld1.16 d0[0], [%[m]]! \n\t" // Load d into d8/d9 q4 " vldm %[d], {d8} \n\t" // Get the alpha channel ready (m) " vmovl.u8 q0, d0 \n\t" " vmovl.u8 q0, d0 \n\t" " vmul.u32 d0, d0, d30 \n\t" // Lop a bit off to prevent overflow " vshr.u8 d0, d0, #1 \n\t" // Now make it 16 bit " vmovl.u8 q0, d0 \n\t" // 16 bit 'd' " vmovl.u8 q4, d8 \n\t" // Diff 'd' & 'c' " vsub.s16 q6, q2, q4 \n\t" " vmul.s16 q6, q0 \n\t" // Shift results a bit " vshr.s16 q6, #7 \n\t" // Add 'd' "vadd.s16 q6, q4 \n\t" // Make sure none are negative "vqmovun.s16 d2, q6 \n\t" "vstm %[d]!, {d2} \n\t" "cmp %[e], %[d] \n\t" "beq "AP"done \n\t" AP"onebyte: \n\t" "vld1.8 d0[0], [%[m]]! \n\t" "vld1.32 d8[0], [%[d]] \n\t" "vdup.u8 d0, d0[0] \n\t" "vshr.u8 d0, d0, #1 \n\t" "vmovl.u8 q0, d0 \n\t" "vmovl.u8 q4, d8 \n\t" "vsub.s16 q6, q2, q4 \n\t" "vmul.s16 q6, q0 \n\t" "vshr.s16 q6, #7 \n\t" "vadd.s16 q6, q4 \n\t" "vqmovun.s16 d2, q6 \n\t" "vst1.32 d2[0], [%[d]]! \n\t" AP"done: \n\t" #if NEONDEBUG "cmp %[d], %[e] \n\t" "beq "AP"reallydone \n\t" "sub %[m], %[m] \n\t" "vst1.32 d0[0], [%[m]] \n\t" AP"reallydone:" #endif : // output regs // Input : [e] "r" (e = d + l), [d] "r" (d), [c] "r" (c), [m] "r" (m), [tmp] "r" (7), [x] "r" (33) : "q0", "q1", "q2","q3", "q4","q5","q6", "q7","q9","q14","q15", "memory" // clobbered ); #undef AP } #endif #ifdef BUILD_NEON #define _op_blend_mas_cn_dp_neon _op_blend_mas_can_dp_neon #define _op_blend_mas_caa_dp_neon _op_blend_mas_c_dp_neon #define _op_blend_mas_c_dpan_neon _op_blend_mas_c_dp_neon #define _op_blend_mas_cn_dpan_neon _op_blend_mas_cn_dp_neon #define _op_blend_mas_can_dpan_neon _op_blend_mas_can_dp_neon #define _op_blend_mas_caa_dpan_neon _op_blend_mas_caa_dp_neon static void init_blend_mask_color_span_funcs_neon(void) { op_blend_span_funcs[SP_N][SM_AS][SC][DP][CPU_NEON] = _op_blend_mas_c_dp_neon; op_blend_span_funcs[SP_N][SM_AS][SC_N][DP][CPU_NEON] = _op_blend_mas_cn_dp_neon; op_blend_span_funcs[SP_N][SM_AS][SC_AN][DP][CPU_NEON] = _op_blend_mas_can_dp_neon; op_blend_span_funcs[SP_N][SM_AS][SC_AA][DP][CPU_NEON] = _op_blend_mas_caa_dp_neon; op_blend_span_funcs[SP_N][SM_AS][SC][DP_AN][CPU_NEON] = _op_blend_mas_c_dpan_neon; op_blend_span_funcs[SP_N][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_blend_mas_cn_dpan_neon; op_blend_span_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_NEON] = _op_blend_mas_can_dpan_neon; op_blend_span_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_NEON] = _op_blend_mas_caa_dpan_neon; } #endif #ifdef BUILD_NEON static void _op_blend_pt_mas_c_dp_neon(DATA32 s, DATA8 m, DATA32 c, DATA32 *d) { s = MUL_SYM(m, c); c = 256 - (s >> 24); *d = MUL_SYM(*d >> 24, s) + MUL_256(c, *d); } #define _op_blend_pt_mas_cn_dp_neon _op_blend_pt_mas_c_dp_neon #define _op_blend_pt_mas_can_dp_neon _op_blend_pt_mas_c_dp_neon #define _op_blend_pt_mas_caa_dp_neon _op_blend_pt_mas_c_dp_neon #define _op_blend_pt_mas_c_dpan_neon _op_blend_pt_mas_c_dp_neon #define _op_blend_pt_mas_cn_dpan_neon _op_blend_pt_mas_cn_dp_neon #define _op_blend_pt_mas_can_dpan_neon _op_blend_pt_mas_can_dp_neon #define _op_blend_pt_mas_caa_dpan_neon _op_blend_pt_mas_caa_dp_neon static void init_blend_mask_color_pt_funcs_neon(void) { op_blend_pt_funcs[SP_N][SM_AS][SC][DP][CPU_NEON] = _op_blend_pt_mas_c_dp_neon; op_blend_pt_funcs[SP_N][SM_AS][SC_N][DP][CPU_NEON] = _op_blend_pt_mas_cn_dp_neon; op_blend_pt_funcs[SP_N][SM_AS][SC_AN][DP][CPU_NEON] = _op_blend_pt_mas_can_dp_neon; op_blend_pt_funcs[SP_N][SM_AS][SC_AA][DP][CPU_NEON] = _op_blend_pt_mas_caa_dp_neon; op_blend_pt_funcs[SP_N][SM_AS][SC][DP_AN][CPU_NEON] = _op_blend_pt_mas_c_dpan_neon; op_blend_pt_funcs[SP_N][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_blend_pt_mas_cn_dpan_neon; op_blend_pt_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_NEON] = _op_blend_pt_mas_can_dpan_neon; op_blend_pt_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_NEON] = _op_blend_pt_mas_caa_dpan_neon; } #endif /*-----*/ /* blend_rel mask x color -> dst */ #ifdef BUILD_NEON static void _op_blend_rel_mas_c_dp_neon(DATA32 *s __UNUSED__, DATA8 *m, DATA32 c, DATA32 *d, int l) { DATA32 *e; int alpha; DEBUG_FNCOUNT("not"); UNROLL8_PLD_WHILE(d, l, e, { DATA32 mc = MUL_SYM(*m, c); alpha = 256 - (mc >> 24); *d = MUL_SYM(*d >> 24, mc) + MUL_256(alpha, *d); d++; m++; }); } #define _op_blend_rel_mas_cn_dp_neon _op_blend_rel_mas_c_dp_neon #define _op_blend_rel_mas_can_dp_neon _op_blend_rel_mas_c_dp_neon #define _op_blend_rel_mas_caa_dp_neon _op_blend_rel_mas_c_dp_neon #define _op_blend_rel_mas_c_dpan_neon _op_blend_mas_c_dpan_neon #define _op_blend_rel_mas_cn_dpan_neon _op_blend_mas_cn_dpan_neon #define _op_blend_rel_mas_can_dpan_neon _op_blend_mas_can_dpan_neon #define _op_blend_rel_mas_caa_dpan_neon _op_blend_mas_caa_dpan_neon static void init_blend_rel_mask_color_span_funcs_neon(void) { op_blend_rel_span_funcs[SP_N][SM_AS][SC][DP][CPU_NEON] = _op_blend_rel_mas_c_dp_neon; op_blend_rel_span_funcs[SP_N][SM_AS][SC_N][DP][CPU_NEON] = _op_blend_rel_mas_cn_dp_neon; op_blend_rel_span_funcs[SP_N][SM_AS][SC_AN][DP][CPU_NEON] = _op_blend_rel_mas_can_dp_neon; op_blend_rel_span_funcs[SP_N][SM_AS][SC_AA][DP][CPU_NEON] = _op_blend_rel_mas_caa_dp_neon; op_blend_rel_span_funcs[SP_N][SM_AS][SC][DP_AN][CPU_NEON] = _op_blend_rel_mas_c_dpan_neon; op_blend_rel_span_funcs[SP_N][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_blend_rel_mas_cn_dpan_neon; op_blend_rel_span_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_NEON] = _op_blend_rel_mas_can_dpan_neon; op_blend_rel_span_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_NEON] = _op_blend_rel_mas_caa_dpan_neon; } #endif #ifdef BUILD_NEON static void _op_blend_rel_pt_mas_c_dp_neon(DATA32 s, DATA8 m, DATA32 c, DATA32 *d) { s = MUL_SYM(m, c); c = 256 - (s >> 24); *d = MUL_SYM(*d >> 24, s) + MUL_256(c, *d); } #define _op_blend_rel_pt_mas_cn_dp_neon _op_blend_rel_pt_mas_c_dp_neon #define _op_blend_rel_pt_mas_can_dp_neon _op_blend_rel_pt_mas_c_dp_neon #define _op_blend_rel_pt_mas_caa_dp_neon _op_blend_rel_pt_mas_c_dp_neon #define _op_blend_rel_pt_mas_c_dpan_neon _op_blend_pt_mas_c_dpan_neon #define _op_blend_rel_pt_mas_cn_dpan_neon _op_blend_pt_mas_cn_dpan_neon #define _op_blend_rel_pt_mas_can_dpan_neon _op_blend_pt_mas_can_dpan_neon #define _op_blend_rel_pt_mas_caa_dpan_neon _op_blend_pt_mas_caa_dpan_neon static void init_blend_rel_mask_color_pt_funcs_neon(void) { op_blend_rel_pt_funcs[SP_N][SM_AS][SC][DP][CPU_NEON] = _op_blend_rel_pt_mas_c_dp_neon; op_blend_rel_pt_funcs[SP_N][SM_AS][SC_N][DP][CPU_NEON] = _op_blend_rel_pt_mas_cn_dp_neon; op_blend_rel_pt_funcs[SP_N][SM_AS][SC_AN][DP][CPU_NEON] = _op_blend_rel_pt_mas_can_dp_neon; op_blend_rel_pt_funcs[SP_N][SM_AS][SC_AA][DP][CPU_NEON] = _op_blend_rel_pt_mas_caa_dp_neon; op_blend_rel_pt_funcs[SP_N][SM_AS][SC][DP_AN][CPU_NEON] = _op_blend_rel_pt_mas_c_dpan_neon; op_blend_rel_pt_funcs[SP_N][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_blend_rel_pt_mas_cn_dpan_neon; op_blend_rel_pt_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_NEON] = _op_blend_rel_pt_mas_can_dpan_neon; op_blend_rel_pt_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_NEON] = _op_blend_rel_pt_mas_caa_dpan_neon; } #endif evas-1.7.9/src/lib/engines/common/evas_op_blend/op_blend_pixel_.c0000664000175000017500000001224712175475547022003 00000000000000/* blend pixel --> dst */ #ifdef BUILD_C static void _op_blend_p_dp(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c __UNUSED__, DATA32 *d, int l) { DATA32 *e; int alpha; UNROLL8_PLD_WHILE(d, l, e, { alpha = 256 - (*s >> 24); *d = *s++ + MUL_256(alpha, *d); d++; }); } static void _op_blend_pas_dp(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c __UNUSED__, DATA32 *d, int l) { DATA32 *e; int alpha; UNROLL8_PLD_WHILE(d, l, e, { switch (*s & 0xff000000) { case 0: break; case 0xff000000: *d = *s; break; default: alpha = 256 - (*s >> 24); *d = *s + MUL_256(alpha, *d); break; } s++; d++; }); } #define _op_blend_pan_dp NULL #define _op_blend_p_dpan _op_blend_p_dp #define _op_blend_pas_dpan _op_blend_pas_dp #define _op_blend_pan_dpan _op_blend_pan_dp static void init_blend_pixel_span_funcs_c(void) { op_blend_span_funcs[SP][SM_N][SC_N][DP][CPU_C] = _op_blend_p_dp; op_blend_span_funcs[SP_AS][SM_N][SC_N][DP][CPU_C] = _op_blend_pas_dp; op_blend_span_funcs[SP_AN][SM_N][SC_N][DP][CPU_C] = _op_blend_pan_dp; op_blend_span_funcs[SP][SM_N][SC_N][DP_AN][CPU_C] = _op_blend_p_dpan; op_blend_span_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_C] = _op_blend_pas_dpan; op_blend_span_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_C] = _op_blend_pan_dpan; } #endif #ifdef BUILD_C static void _op_blend_pt_p_dp(DATA32 s, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) { c = 256 - (s >> 24); *d = s + MUL_256(c, *d); } #define _op_blend_pt_pas_dp _op_blend_pt_p_dp #define _op_blend_pt_pan_dp NULL #define _op_blend_pt_p_dpan _op_blend_pt_p_dp #define _op_blend_pt_pan_dpan _op_blend_pt_pan_dp #define _op_blend_pt_pas_dpan _op_blend_pt_pas_dp static void init_blend_pixel_pt_funcs_c(void) { op_blend_pt_funcs[SP][SM_N][SC_N][DP][CPU_C] = _op_blend_pt_p_dp; op_blend_pt_funcs[SP_AS][SM_N][SC_N][DP][CPU_C] = _op_blend_pt_pas_dp; op_blend_pt_funcs[SP_AN][SM_N][SC_N][DP][CPU_C] = _op_blend_pt_pan_dp; op_blend_pt_funcs[SP][SM_N][SC_N][DP_AN][CPU_C] = _op_blend_pt_p_dpan; op_blend_pt_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_C] = _op_blend_pt_pas_dpan; op_blend_pt_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_C] = _op_blend_pt_pan_dpan; } #endif /*-----*/ /* blend_rel pixel -> dst */ #ifdef BUILD_C static void _op_blend_rel_p_dp(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { DATA32 *e; int alpha; UNROLL8_PLD_WHILE(d, l, e, { alpha = 256 - (*s >> 24); c = 1 + (*d >> 24); *d = MUL_256(c, *s) + MUL_256(alpha, *d); d++; s++; }); } static void _op_blend_rel_pan_dp(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { DATA32 *e; UNROLL8_PLD_WHILE(d, l, e, { c = 1 + (*d >> 24); *d++ = MUL_256(c, *s); s++; }); } #define _op_blend_rel_pas_dp _op_blend_rel_p_dp #define _op_blend_rel_p_dpan _op_blend_p_dpan #define _op_blend_rel_pan_dpan _op_blend_pan_dpan #define _op_blend_rel_pas_dpan _op_blend_pas_dpan static void init_blend_rel_pixel_span_funcs_c(void) { op_blend_rel_span_funcs[SP][SM_N][SC_N][DP][CPU_C] = _op_blend_rel_p_dp; op_blend_rel_span_funcs[SP_AS][SM_N][SC_N][DP][CPU_C] = _op_blend_rel_pas_dp; op_blend_rel_span_funcs[SP_AN][SM_N][SC_N][DP][CPU_C] = _op_blend_rel_pan_dp; op_blend_rel_span_funcs[SP][SM_N][SC_N][DP_AN][CPU_C] = _op_blend_rel_p_dpan; op_blend_rel_span_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_C] = _op_blend_rel_pas_dpan; op_blend_rel_span_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_C] = _op_blend_rel_pan_dpan; } #endif #ifdef BUILD_C static void _op_blend_rel_pt_p_dp(DATA32 s, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) { c = 256 - (s >> 24); *d = MUL_SYM(*d >> 24, s) + MUL_256(c, *d); } static void _op_blend_rel_pt_pan_dp(DATA32 s, DATA8 m __UNUSED__, DATA32 c __UNUSED__, DATA32 *d) { *d = MUL_SYM(*d >> 24, s); } #define _op_blend_rel_pt_pas_dp _op_blend_rel_pt_p_dp #define _op_blend_rel_pt_p_dpan _op_blend_pt_p_dpan #define _op_blend_rel_pt_pan_dpan _op_blend_pt_pan_dpan #define _op_blend_rel_pt_pas_dpan _op_blend_pt_pas_dpan static void init_blend_rel_pixel_pt_funcs_c(void) { op_blend_rel_pt_funcs[SP][SM_N][SC_N][DP][CPU_C] = _op_blend_rel_pt_p_dp; op_blend_rel_pt_funcs[SP_AS][SM_N][SC_N][DP][CPU_C] = _op_blend_rel_pt_pas_dp; op_blend_rel_pt_funcs[SP_AN][SM_N][SC_N][DP][CPU_C] = _op_blend_rel_pt_pan_dp; op_blend_rel_pt_funcs[SP][SM_N][SC_N][DP_AN][CPU_C] = _op_blend_rel_pt_p_dpan; op_blend_rel_pt_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_C] = _op_blend_rel_pt_pas_dpan; op_blend_rel_pt_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_C] = _op_blend_rel_pt_pan_dpan; } #endif evas-1.7.9/src/lib/engines/common/evas_op_blend/op_blend_mask_color_sse3.c0000664000175000017500000002567512175475547023622 00000000000000/* blend mask x color -> dst */ #ifdef BUILD_SSE3 static void _op_blend_mas_c_dp_sse3(DATA32 *s __UNUSED__, DATA8 *m, DATA32 c, DATA32 *d, int l) { const __m128i c_packed = _mm_set_epi32(c, c, c, c); LOOP_ALIGNED_U1_A48_SSE3(d, l, { /* UOP */ DATA32 a = *m; DATA32 mc = MUL_SYM(a, c); a = 256 - (mc >> 24); *d = mc + MUL_256(a, *d); m++; d++; l--; }, { /* A4OP */ if ((m[3] | m[2] | m[1] | m[0]) == 0) { m += 4; d += 4; l -= 4; continue; } __m128i m0 = _mm_set_epi32(m[3], m[2], m[1], m[0]); __m128i d0 = _mm_load_si128((__m128i *)d); __m128i mc0 = mul_sym_sse3(m0, c_packed); __m128i a0 = sub4_alpha_sse3(mc0); __m128i mul0 = mul_256_sse3(a0, d0); mul0 = _mm_add_epi32(mul0, mc0); _mm_store_si128((__m128i *)d, mul0); m += 4; d += 4; l -= 4; }, { /* A8OP */ if((m[7] | m[6] | m[5] | m[4] | m[3] | m[2] | m[1] | m[0]) == 0) { m += 8; d += 8; l -= 8; continue; } __m128i m0 = _mm_set_epi32(m[3], m[2], m[1], m[0]); __m128i d0 = _mm_load_si128((__m128i *)d); __m128i m1 = _mm_set_epi32(m[7], m[6], m[5], m[4]); __m128i d1 = _mm_load_si128((__m128i *)(d+4)); __m128i mc0 = mul_sym_sse3(m0, c_packed); __m128i a0 = sub4_alpha_sse3(mc0); __m128i mul0 = mul_256_sse3(a0, d0); mul0 = _mm_add_epi32(mc0, mul0); __m128i mc1 = mul_sym_sse3(m1, c_packed); __m128i a1 = sub4_alpha_sse3(mc1); __m128i mul1 = mul_256_sse3(a1, d1); mul1 = _mm_add_epi32(mc1, mul1); _mm_store_si128((__m128i *)d, mul0); _mm_store_si128((__m128i *)(d+4), mul1); m += 8; d += 8; l -= 8; }) } static void _op_blend_mas_can_dp_sse3(DATA32 *s __UNUSED__, DATA8 *m, DATA32 c, DATA32 *d, int l) { DATA32 alpha; const __m128i one = _mm_set_epi32(1, 1, 1, 1); const __m128i c_packed = _mm_set_epi32(c, c, c, c); LOOP_ALIGNED_U1_A48_SSE3(d, l, { /* UOP */ alpha = *m; switch(alpha) { case 0: break; case 255: *d = c; break; default: alpha++; *d = INTERP_256(alpha, c, *d); break; } m++; d++; l--; }, { /* A4OP */ if ((m[3] | m[2] | m[1] | m[0]) == 0) { m += 4; d += 4; l -= 4; continue; } __m128i m0 = _mm_set_epi32(m[3], m[2], m[1], m[0]); __m128i d0 = _mm_load_si128((__m128i *)d); __m128i zm0 = _mm_cmpeq_epi32(m0, _mm_setzero_si128()); m0 = _mm_add_epi32(one, m0); __m128i r0 = interp4_256_sse3(m0, c_packed, d0); r0 = _mm_and_si128(~zm0, r0); d0 = _mm_and_si128(zm0, d0); d0 = _mm_add_epi32(r0, d0); _mm_store_si128((__m128i *)d, d0); m += 4; d += 4; l -= 4; }, { /* A8OP */ if ((m[7] | m[6] | m[5] | m[4] | m[3] | m[2] | m[1] | m[0]) == 0) { m += 8; d += 8; l -= 8; continue; } __m128i m0 = _mm_set_epi32(m[3], m[2], m[1], m[0]); __m128i d0 = _mm_load_si128((__m128i *)d); __m128i m1 = _mm_set_epi32(m[7], m[6], m[5], m[4]); __m128i d1 = _mm_load_si128((__m128i *)(d+4)); __m128i zm0 = _mm_cmpeq_epi32(m0, _mm_setzero_si128()); __m128i zm1 = _mm_cmpeq_epi32(m1, _mm_setzero_si128()); m0 = _mm_add_epi32(one, m0); m1 = _mm_add_epi32(one, m1); __m128i r0 = interp4_256_sse3(m0, c_packed, d0); __m128i r1 = interp4_256_sse3(m1, c_packed, d1); r0 = _mm_and_si128(~zm0, r0); d0 = _mm_and_si128(zm0, d0); r1 = _mm_and_si128(~zm1, r1); d1 = _mm_and_si128(zm1, d1); d0 = _mm_add_epi32(d0, r0); d1 = _mm_add_epi32(d1, r1); _mm_store_si128((__m128i *)d, d0); _mm_store_si128((__m128i *)(d+4), d1); m += 8; d += 8; l -= 8; }) } #define _op_blend_mas_cn_dp_sse3 _op_blend_mas_can_dp_sse3 #define _op_blend_mas_caa_dp_sse3 _op_blend_mas_c_dp_sse3 #define _op_blend_mas_c_dpan_sse3 _op_blend_mas_c_dp_sse3 #define _op_blend_mas_cn_dpan_sse3 _op_blend_mas_cn_dp_sse3 #define _op_blend_mas_can_dpan_sse3 _op_blend_mas_can_dp_sse3 #define _op_blend_mas_caa_dpan_sse3 _op_blend_mas_caa_dp_sse3 static void init_blend_mask_color_span_funcs_sse3(void) { // FIXME: BUGGY BUGGY Core i5 750 (32bit), 4.5.2 (Ubuntu/Linaro 4.5.2-8ubuntu4), ello (text and rectangle) // op_blend_span_funcs[SP_N][SM_AS][SC][DP][CPU_SSE3] = _op_blend_mas_c_dp_sse3; op_blend_span_funcs[SP_N][SM_AS][SC_N][DP][CPU_SSE3] = _op_blend_mas_cn_dp_sse3; op_blend_span_funcs[SP_N][SM_AS][SC_AN][DP][CPU_SSE3] = _op_blend_mas_can_dp_sse3; op_blend_span_funcs[SP_N][SM_AS][SC_AA][DP][CPU_SSE3] = _op_blend_mas_caa_dp_sse3; // FIXME: BUGGY BUGGY Core i5 2500 (64bit), gcc version 4.5.2 (Ubuntu/Linaro 4.5.2-8ubuntu4), ello (text) // op_blend_span_funcs[SP_N][SM_AS][SC][DP_AN][CPU_SSE3] = _op_blend_mas_c_dpan_sse3; op_blend_span_funcs[SP_N][SM_AS][SC_N][DP_AN][CPU_SSE3] = _op_blend_mas_cn_dpan_sse3; op_blend_span_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_SSE3] = _op_blend_mas_can_dpan_sse3; op_blend_span_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_SSE3] = _op_blend_mas_caa_dpan_sse3; } #define _op_blend_pt_mas_c_dp_sse3 NULL #define _op_blend_pt_mas_can_dp_sse3 NULL #define _op_blend_pt_mas_cn_dp_sse3 _op_blend_pt_mas_can_dp_sse3 #define _op_blend_pt_mas_caa_dp_sse3 _op_blend_pt_mas_c_dp_sse3 #define _op_blend_pt_mas_c_dpan_sse3 _op_blend_pt_mas_c_dp_sse3 #define _op_blend_pt_mas_cn_dpan_sse3 _op_blend_pt_mas_cn_dp_sse3 #define _op_blend_pt_mas_can_dpan_sse3 _op_blend_pt_mas_can_dp_sse3 #define _op_blend_pt_mas_caa_dpan_sse3 _op_blend_pt_mas_caa_dp_sse3 static void init_blend_mask_color_pt_funcs_sse3(void) { op_blend_pt_funcs[SP_N][SM_AS][SC][DP][CPU_SSE3] = _op_blend_pt_mas_c_dp_sse3; op_blend_pt_funcs[SP_N][SM_AS][SC_N][DP][CPU_SSE3] = _op_blend_pt_mas_cn_dp_sse3; op_blend_pt_funcs[SP_N][SM_AS][SC_AN][DP][CPU_SSE3] = _op_blend_pt_mas_can_dp_sse3; op_blend_pt_funcs[SP_N][SM_AS][SC_AA][DP][CPU_SSE3] = _op_blend_pt_mas_caa_dp_sse3; op_blend_pt_funcs[SP_N][SM_AS][SC][DP_AN][CPU_SSE3] = _op_blend_pt_mas_c_dpan_sse3; op_blend_pt_funcs[SP_N][SM_AS][SC_N][DP_AN][CPU_SSE3] = _op_blend_pt_mas_cn_dpan_sse3; op_blend_pt_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_SSE3] = _op_blend_pt_mas_can_dpan_sse3; op_blend_pt_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_SSE3] = _op_blend_pt_mas_caa_dpan_sse3; } /*-----*/ /* blend_rel mask x color --> dst */ static void _op_blend_rel_mas_c_dp_sse3(DATA32 *s __UNUSED__, DATA8 *m, DATA32 c, DATA32 *d, int l) { const __m128i c_packed = _mm_set_epi32(c, c, c, c); LOOP_ALIGNED_U1_A48_SSE3(d, l, { /* UOP */ DATA32 mc = MUL_SYM(*m, c); int alpha = 256 - (mc >> 24); *d = MUL_SYM(*d >> 24, mc) + MUL_256(alpha, *d); d++; m++; l--; }, { /* A4OP */ __m128i m0 = _mm_set_epi32(m[3], m[2], m[1], m[0]); __m128i d0 = _mm_load_si128((__m128i *) d); __m128i mc0 = mul_sym_sse3(m0, c_packed); __m128i a0 = sub4_alpha_sse3(mc0); __m128i d0_sym = mul_sym_sse3(_mm_srli_epi32(d0, 24), mc0); d0 = mul_256_sse3(a0, d0); d0 = _mm_add_epi32(d0, d0_sym); _mm_store_si128((__m128i *)d, d0); d += 4; m += 4; l -= 4; }, { /* A8OP */ __m128i m0 = _mm_set_epi32(m[3], m[2], m[1], m[0]); __m128i d0 = _mm_load_si128((__m128i *)d); __m128i m1 = _mm_set_epi32(m[7], m[6], m[5], m[4]); __m128i d1 = _mm_load_si128((__m128i *)(d+4)); __m128i mc0 = mul_sym_sse3(m0, c_packed); __m128i mc1 = mul_sym_sse3(m1, c_packed); __m128i a0 = sub4_alpha_sse3(mc0); __m128i a1 = sub4_alpha_sse3(mc1); __m128i d0_sym = mul_sym_sse3(_mm_srli_epi32(d0, 24), mc0); __m128i d1_sym = mul_sym_sse3(_mm_srli_epi32(d1, 24), mc1); d0 = mul_256_sse3(a0, d0); d1 = mul_256_sse3(a1, d1); d0 = _mm_add_epi32(d0, d0_sym); d1 = _mm_add_epi32(d1, d1_sym); _mm_store_si128((__m128i *)d, d0); _mm_store_si128((__m128i *)(d+4), d1); d += 8; m += 8; l -= 8; }) } #define _op_blend_rel_mas_cn_dp_sse3 _op_blend_rel_mas_c_dp_sse3 #define _op_blend_rel_mas_can_dp_sse3 _op_blend_rel_mas_c_dp_sse3 #define _op_blend_rel_mas_caa_dp_sse3 _op_blend_rel_mas_c_dp_sse3 #define _op_blend_rel_mas_c_dpan_sse3 _op_blend_mas_c_dpan_sse3 #define _op_blend_rel_mas_cn_dpan_sse3 _op_blend_mas_cn_dpan_sse3 #define _op_blend_rel_mas_can_dpan_sse3 _op_blend_mas_can_dpan_sse3 #define _op_blend_rel_mas_caa_dpan_sse3 _op_blend_mas_caa_dpan_sse3 static void init_blend_rel_mask_color_span_funcs_sse3(void) { op_blend_rel_span_funcs[SP_N][SM_AS][SC][DP][CPU_SSE3] = _op_blend_rel_mas_c_dp_sse3; op_blend_rel_span_funcs[SP_N][SM_AS][SC_N][DP][CPU_SSE3] = _op_blend_rel_mas_can_dp_sse3; op_blend_rel_span_funcs[SP_N][SM_AS][SC_AN][DP][CPU_SSE3] = _op_blend_rel_mas_can_dp_sse3; op_blend_rel_span_funcs[SP_N][SM_AS][SC_AA][DP][CPU_SSE3] = _op_blend_rel_mas_caa_dp_sse3; op_blend_rel_span_funcs[SP_N][SM_AS][SC][DP_AN][CPU_SSE3] = _op_blend_rel_mas_c_dpan_sse3; op_blend_rel_span_funcs[SP_N][SM_AS][SC_N][DP_AN][CPU_SSE3] = _op_blend_rel_mas_cn_dpan_sse3; op_blend_rel_span_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_SSE3] = _op_blend_rel_mas_can_dpan_sse3; op_blend_rel_span_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_SSE3] = _op_blend_rel_mas_caa_dpan_sse3; } #define _op_blend_rel_pt_mas_c_dp_sse3 NULL #define _op_blend_rel_pt_mas_cn_dp_sse3 _op_blend_rel_pt_mas_c_dp_sse3 #define _op_blend_rel_pt_mas_can_dp_sse3 _op_blend_rel_pt_mas_c_dp_sse3 #define _op_blend_rel_pt_mas_caa_dp_sse3 _op_blend_rel_pt_mas_c_dp_sse3 #define _op_blend_rel_pt_mas_c_dpan_sse3 _op_blend_pt_mas_c_dpan_sse3 #define _op_blend_rel_pt_mas_cn_dpan_sse3 _op_blend_pt_mas_cn_dpan_sse3 #define _op_blend_rel_pt_mas_can_dpan_sse3 _op_blend_pt_mas_can_dpan_sse3 #define _op_blend_rel_pt_mas_caa_dpan_sse3 _op_blend_pt_mas_caa_dpan_sse3 static void init_blend_rel_mask_color_pt_funcs_sse3(void) { op_blend_rel_pt_funcs[SP_N][SM_AS][SC][DP][CPU_SSE3] = _op_blend_rel_pt_mas_c_dp_sse3; op_blend_rel_pt_funcs[SP_N][SM_AS][SC_N][DP][CPU_SSE3] = _op_blend_rel_pt_mas_cn_dp_sse3; op_blend_rel_pt_funcs[SP_N][SM_AS][SC_AN][DP][CPU_SSE3] = _op_blend_rel_pt_mas_can_dp_sse3; op_blend_rel_pt_funcs[SP_N][SM_AS][SC_AA][DP][CPU_SSE3] = _op_blend_rel_pt_mas_caa_dp_sse3; op_blend_rel_pt_funcs[SP_N][SM_AS][SC][DP_AN][CPU_SSE3] = _op_blend_rel_pt_mas_c_dpan_sse3; op_blend_rel_pt_funcs[SP_N][SM_AS][SC_N][DP_AN][CPU_SSE3] = _op_blend_rel_pt_mas_cn_dpan_sse3; op_blend_rel_pt_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_SSE3] = _op_blend_rel_pt_mas_can_dpan_sse3; op_blend_rel_pt_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_SSE3] = _op_blend_rel_pt_mas_caa_dpan_sse3; } #endif evas-1.7.9/src/lib/engines/common/evas_op_blend/op_blend_color_i386.c0000664000175000017500000000736312175475547022415 00000000000000/* blend color --> dst */ #ifdef BUILD_MMX static void _op_blend_c_dp_mmx(DATA32 *s __UNUSED__, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { DATA32 *e = d + l; pxor_r2r(mm0, mm0); MOV_P2R(c, mm2, mm0) c = 256 - (c >> 24); MOV_A2R(c, mm3) while (d < e) { MOV_P2R(*d, mm1, mm0) MUL4_256_R2R(mm3, mm1) paddw_r2r(mm2, mm1); MOV_R2P(mm1, *d, mm0) d++; } } #define _op_blend_caa_dp_mmx _op_blend_c_dp_mmx #define _op_blend_c_dpan_mmx _op_blend_c_dp_mmx #define _op_blend_caa_dpan_mmx _op_blend_c_dpan_mmx static void init_blend_color_span_funcs_mmx(void) { op_blend_span_funcs[SP_N][SM_N][SC][DP][CPU_MMX] = _op_blend_c_dp_mmx; op_blend_span_funcs[SP_N][SM_N][SC_AA][DP][CPU_MMX] = _op_blend_caa_dp_mmx; op_blend_span_funcs[SP_N][SM_N][SC][DP_AN][CPU_MMX] = _op_blend_c_dpan_mmx; op_blend_span_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_blend_caa_dpan_mmx; } #endif #ifdef BUILD_MMX static void _op_blend_pt_c_dp_mmx(DATA32 s __UNUSED__, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) { pxor_r2r(mm0, mm0); MOV_P2R(c, mm2, mm0) c = 256 - (c >> 24); MOV_A2R(c, mm3) MOV_P2R(*d, mm1, mm0) MUL4_256_R2R(mm3, mm1) paddw_r2r(mm2, mm1); MOV_R2P(mm1, *d, mm0) } #define _op_blend_pt_caa_dp_mmx _op_blend_pt_c_dp_mmx #define _op_blend_pt_c_dpan_mmx _op_blend_pt_c_dp_mmx #define _op_blend_pt_caa_dpan_mmx _op_blend_pt_c_dpan_mmx static void init_blend_color_pt_funcs_mmx(void) { op_blend_pt_funcs[SP_N][SM_N][SC][DP][CPU_MMX] = _op_blend_pt_c_dp_mmx; op_blend_pt_funcs[SP_N][SM_N][SC_AA][DP][CPU_MMX] = _op_blend_pt_caa_dp_mmx; op_blend_pt_funcs[SP_N][SM_N][SC][DP_AN][CPU_MMX] = _op_blend_pt_c_dpan_mmx; op_blend_pt_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_blend_pt_caa_dpan_mmx; } #endif /*-----*/ /* blend_rel color -> dst */ #ifdef BUILD_MMX static void _op_blend_rel_c_dp_mmx(DATA32 *s __UNUSED__, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { DATA32 *e = d + l; pxor_r2r(mm0, mm0); MOV_P2R(c, mm2, mm0) c = 256 - (c >> 24); MOV_A2R(c, mm3) MOV_A2R(ALPHA_255, mm5) while (d < e) { MOV_P2R(*d, mm1, mm0) MOV_RA2R(mm1, mm4) MUL4_256_R2R(mm3, mm1) MUL4_SYM_R2R(mm2, mm4, mm5) paddw_r2r(mm4, mm1); MOV_R2P(mm1, *d, mm0) d++; } } #define _op_blend_rel_caa_dp_mmx _op_blend_rel_c_dp_mmx #define _op_blend_rel_c_dpan_mmx _op_blend_c_dpan_mmx #define _op_blend_rel_caa_dpan_mmx _op_blend_caa_dpan_mmx static void init_blend_rel_color_span_funcs_mmx(void) { op_blend_rel_span_funcs[SP_N][SM_N][SC][DP][CPU_MMX] = _op_blend_rel_c_dp_mmx; op_blend_rel_span_funcs[SP_N][SM_N][SC_AA][DP][CPU_MMX] = _op_blend_rel_caa_dp_mmx; op_blend_rel_span_funcs[SP_N][SM_N][SC][DP_AN][CPU_MMX] = _op_blend_rel_c_dpan_mmx; op_blend_rel_span_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_blend_rel_caa_dpan_mmx; } #endif #ifdef BUILD_MMX static void _op_blend_rel_pt_c_dp_mmx(DATA32 s __UNUSED__, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) { pxor_r2r(mm0, mm0); MOV_A2R(ALPHA_256, mm6) MOV_A2R(ALPHA_255, mm5) MOV_P2R(c, mm2, mm0) MOV_RA2R(mm2, mm1) psubw_r2r(mm1, mm6); MOV_P2R(*d, mm1, mm0) MOV_RA2R(mm1, mm4) MUL4_256_R2R(mm6, mm1) MUL4_SYM_R2R(mm4, mm2, mm5) paddw_r2r(mm2, mm1); MOV_R2P(mm1, *d, mm0) } #define _op_blend_rel_pt_caa_dp_mmx _op_blend_rel_pt_c_dp_mmx #define _op_blend_rel_pt_c_dpan_mmx _op_blend_pt_c_dpan_mmx #define _op_blend_rel_pt_caa_dpan_mmx _op_blend_pt_caa_dpan_mmx static void init_blend_rel_color_pt_funcs_mmx(void) { op_blend_rel_pt_funcs[SP_N][SM_N][SC][DP][CPU_MMX] = _op_blend_rel_pt_c_dp_mmx; op_blend_rel_pt_funcs[SP_N][SM_N][SC_AA][DP][CPU_MMX] = _op_blend_rel_pt_caa_dp_mmx; op_blend_rel_pt_funcs[SP_N][SM_N][SC][DP_AN][CPU_MMX] = _op_blend_rel_pt_c_dpan_mmx; op_blend_rel_pt_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_blend_rel_pt_caa_dpan_mmx; } #endif evas-1.7.9/src/lib/engines/common/evas_op_blend/op_blend_pixel_color_neon.c0000664000175000017500000004173612175475547024066 00000000000000/* blend pixel x color --> dst */ #ifdef BUILD_NEON /* Note: Optimisation is based on keeping _dest_ aligned: else it's a pair of * reads, then two writes, a miss on read is 'just' two reads */ static void _op_blend_p_c_dp_neon(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { #define AP "blend_p_c_dp_" asm volatile ( ".fpu neon \n\t" // Load 'c' "vdup.u32 q7, %[c] \n\t" "vmov.i8 q6, #1 \n\t" // Choose a loop "andS %[tmp], %[d], $0xf \n\t" "beq "AP"quadstart \n\t" "andS %[tmp],%[d], $0x4 \n\t" "beq "AP"dualloop \n\t" AP"singleloop:" "vld1.32 d0[0], [%[s]]! \n\t" "vld1.32 d2[0], [%[d]] \n\t" // Mulitply s * c (= sc) "vmull.u8 q4, d0,d14 \n\t" // sc in d8 "vqrshrn.u16 d4, q4, #8 \n\t" // sca in d9 "vmvn.u32 d6, d4 \n\t" "vshr.u32 d6, d6, #24 \n\t" "vmul.u32 d6, d12, d6 \n\t" /* d * alpha */ "vmull.u8 q4, d6, d2 \n\t" "vqrshrn.u16 d0, q4, #8 \n\t" "vqadd.u8 d2, d0, d4 \n\t" // Save dsc + sc "vst1.32 d2[0], [%[d]]! \n\t" // Now where? // Can we go the fast path? "andS %[tmp], %[d],$0xf \n\t" "beq "AP"quadstart \n\t" AP"dualloop: \n\t" // Check we have enough to bother with! "sub %[tmp], %[e], %[d] \n\t" "cmp %[tmp], #16 \n\t" "blt "AP"loopout \n\t" // load 's' -> q0, 'd' -> q1 "vldm %[s]!, {d0} \n\t" "vldm %[d], {d2} \n\t" // Mulitply s * c (= sc) "vmull.u8 q4, d0,d14 \n\t" // sc in d8 "vqrshrn.u16 d4, q4, #8 \n\t" // sca in d9 "vmvn.u32 d6, d4 \n\t" "vshr.u32 d6, d6, #24 \n\t" "vmul.u32 d6, d12, d6 \n\t" /* d * alpha */ "vmull.u8 q4, d6, d2 \n\t" "vqrshrn.u16 d0, q4, #8 \n\t" "vqadd.u8 d2, d0, d4 \n\t" // Save dsc + sc "vst1.32 d2, [%[d]]! \n\t" AP"quadstart: \n\t" "sub %[tmp], %[e], %[d] \n\t" "cmp %[tmp], #16 \n\t" "blt "AP"loopout \n\t" "sub %[tmp], %[e], #15 \n\t" AP"quadloop:\n\t" // load 's' -> q0, 'd' -> q1 "vldm %[s]!, {d0,d1} \n\t" "vldm %[d], {d2,d3} \n\t" // Mulitply s * c (= sc) "vmull.u8 q4, d0,d14 \n\t" "vmull.u8 q5, d1,d14 \n\t" // Get sc & sc alpha "vqrshrn.u16 d4, q4, #8 \n\t" "vqrshrn.u16 d5, q5, #8 \n\t" // sc is now in q2, 8bpp // Shift out, then spread alpha for q2 "vmvn.u32 q3, q2 \n\t" "vshr.u32 q3, q3, $0x18 \n\t" "vmul.u32 q3, q6,q3 \n\t" // Multiply 'd' by sc.alpha (dsca) "vmull.u8 q4, d6,d2 \n\t" "vmull.u8 q5, d7,d3 \n\t" "vqrshrn.u16 d0, q4, #8 \n\t" "vqrshrn.u16 d1, q5, #8 \n\t" "vqadd.u8 q1, q0, q2 \n\t" // Save dsc + sc "vstm %[d]!, {d2,d3} \n\t" "cmp %[tmp], %[d] \n\t" "bhi "AP"quadloop \n\t" /* Trailing stuff */ AP"loopout: \n\t" "cmp %[d], %[e] \n\t" "beq "AP"done\n\t" "sub %[tmp],%[e], %[d] \n\t" "cmp %[tmp],$0x04 \n\t" "beq "AP"singleloop2 \n\t" "sub %[tmp], %[e], #7 \n\t" /* Dual loop */ AP"dualloop2: \n\t" "vldm %[s]!, {d0} \n\t" "vldm %[d], {d2} \n\t" // Mulitply s * c (= sc) "vmull.u8 q4, d0,d14 \n\t" // sc in d8 "vqrshrn.u16 d4, q4, #8 \n\t" // sca in d9 // XXX: I can probably squash one of these 3 "vmvn.u32 d6, d4 \n\t" "vshr.u32 d6, d6, #24 \n\t" "vmul.u32 d6, d6, d12 \n\t" /* d * alpha */ "vmull.u8 q4, d6, d2 \n\t" "vqrshrn.u16 d0, q4, #8 \n\t" "vqadd.u8 d2, d0, d4 \n\t" // Save dsc + sc "vstm %[d]!, {d2} \n\t" "cmp %[tmp], %[d] \n\t" "bhi "AP"dualloop2 \n\t" "cmp %[d], %[e] \n\t" "beq "AP"done \n\t" AP"singleloop2: \n\t" "vld1.32 d0[0], [%[s]]! \n\t" "vld1.32 d2[0], [%[d]] \n\t" // Mulitply s * c (= sc) "vmull.u8 q4, d0,d14 \n\t" // sc in d8 "vqrshrn.u16 d4, q4, #8 \n\t" // sca in d6 "vmvn.u32 d6, d4 \n\t" "vshr.u32 d6, d6, #24 \n\t" "vmul.u32 d6, d12,d6 \n\t" /* d * alpha */ "vmull.u8 q4, d6, d2 \n\t" "vqrshrn.u16 d0, q4, #8 \n\t" "vqadd.u8 d2, d0, d4 \n\t" // Save dsc + sc "vst1.32 d2[0], [%[d]]! \n\t" AP"done:" : // No output // : [s] "r" (s), [e] "r" (d + l), [d] "r" (d), [c] "r" (c), [tmp] "r" (12) : "q0","q1","q2","q3","q4","q5","q6","q7","memory" ); #undef AP } static void _op_blend_pan_can_dp_neon(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { DATA32 *e; UNROLL8_PLD_WHILE(d, l, e, { *d++ = 0xff000000 + MUL3_SYM(c, *s); s++; }); } static void _op_blend_pan_caa_dp_neon(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { #if 1 DATA32 *e; int alpha; c = 1 + (c & 0xff); UNROLL8_PLD_WHILE(d, l, e, { DATA32 sc = MUL_256(c, *s); alpha = 256 - (sc >> 24); *d = sc + MUL_256(alpha, *d); d++; s++; }); #else // the below neon is buggy!! misses rendering of spans, i think with alignment. quick - just disable this. #define AP "_op_blend_pan_caa_dp_" DATA32 *e = d + l, *tmp = (void*)73; asm volatile ( ".fpu neon \n\t" /* Set up 'c' */ "vdup.u8 d14, %[c] \n\t" "vmov.i8 d15, #1 \n\t" "vaddl.u8 q15, d14, d15 \n\t" "vshr.u8 q15,#1 \n\t" // Pick a loop "andS %[tmp], %[d], $0xf \n\t" "beq "AP"quadstart \n\t" "andS %[tmp], %[d], $0x4 \n\t" "beq "AP"dualstart \n\t" AP"singleloop: \n\t" "vld1.32 d4[0], [%[d]] \n\t" "vld1.32 d0[0], [%[s]]! \n\t" // Long version of 'd' "vmovl.u8 q8, d4 \n\t" // Long version of 's' "vmovl.u8 q6, d0 \n\t" // d8 = s -d "vsub.s16 d8, d12, d16 \n\t" // Multiply "vmul.s16 d8, d8, d30 \n\t" // Shift down "vshr.s16 d8, #7 \n\t" // Add 'd' "vqadd.s16 d8, d8, d16 \n\t" // Shrink to save "vqmovun.s16 d0, q4 \n\t" "vst1.32 d0[0], [%[d]]! \n\t" // Now where? "andS %[tmp], %[d], $0xf \n\t" "beq "AP"quadstart \n\t" AP"dualstart: \n\t" // Check we have enough "sub %[tmp], %[e], %[d] \n\t" "cmp %[tmp], #16 \n\t" "blt "AP"loopout \n\t" AP"dualloop:" "vldm %[d], {d4} \n\t" "vldm %[s]!, {d0} \n\t" // Long version of d "vmovl.u8 q8, d4 \n\t" // Long version of s "vmovl.u8 q6, d0 \n\t" // q4/q5 = s-d "vsub.s16 q4, q6, q8 \n\t" // Multiply "vmul.s16 q4, q4,q15 \n\t" // Shift down "vshr.s16 q4, #7 \n\t" // Add d "vqadd.s16 q4, q4, q8 \n\t" // Shrink to save "vqmovun.s16 d0, q4 \n\t" "vstm %[d]!, {d0} \n\t" AP"quadstart: \n\t" "sub %[tmp], %[e], %[d] \n\t" "cmp %[tmp], #16 \n\t" "blt "AP"loopout \n\t" "sub %[tmp], %[e], #15 \n\t" AP"quadloop: \n\t" // load 's' -> q0, 'd' -> q2 "vldm %[d], {d4,d5} \n\t" "vldm %[s]!, {d0,d1} \n\t" // Long version of d "vmovl.u8 q8, d4 \n\t" "vmovl.u8 q9, d5 \n\t" // Long version of s "vmovl.u8 q6, d0 \n\t" "vmovl.u8 q7, d1 \n\t" // q4/q5 = s-d "vsub.s16 q4, q6, q8 \n\t" "vsub.s16 q5, q7, q9 \n\t" // Multiply "vmul.s16 q4, q4,q15 \n\t" "vmul.s16 q5, q5,q15 \n\t" // Shift down "vshr.s16 q4, #7 \n\t" "vshr.s16 q5, #7 \n\t" // Add d "vqadd.s16 q4, q4, q8 \n\t" "vqadd.s16 q5, q5, q9 \n\t" // Shrink to save "vqmovun.s16 d0, q4 \n\t" "vqmovun.s16 d1, q5 \n\t" "vstm %[d]!, {d0,d1} \n\t" "cmp %[tmp], %[d] \n\t" "bhi "AP"quadloop\n\t" "b "AP"done\n\t" AP"loopout: \n\t" "cmp %[d], %[e] \n\t" "beq "AP"done\n\t" "sub %[tmp],%[e], %[d] \n\t" "cmp %[tmp],$0x04 \n\t" "beq "AP"singleloop2 \n\t" AP"dualloop2: \n\t" "vldm %[d], {d4} \n\t" "vldm %[s]!, {d0} \n\t" // Long version of d "vmovl.u8 q8, d4 \n\t" // Long version of s "vmovl.u8 q6, d0 \n\t" // q4/q5 = s-d "vsub.s16 q4, q6, q8 \n\t" // Multiply "vmul.s16 q4, q4,q15 \n\t" // Shift down "vshr.s16 q4, #7 \n\t" // Add d "vqadd.s16 q4, q4, q8 \n\t" // Shrink to save "vqmovun.s16 d0, q4 \n\t" "vstm %[d]!, {d0} \n\t" "cmp %[d], %[e] \n\t" "beq "AP"done \n\t" AP"singleloop2: \n\t" "vld1.32 d4[0], [%[d]] \n\t" "vld1.32 d0[0], [%[s]]! \n\t" // Long version of 'd' "vmovl.u8 q8, d4 \n\t" // Long version of 's' "vmovl.u8 q6, d0 \n\t" // d8 = s -d "vsub.s16 d8, d12, d16 \n\t" // Multiply "vmul.s16 d8, d8, d30 \n\t" // Shift down "vshr.s16 d8, #7 \n\t" // Add 'd' "vqadd.s16 d8, d8, d16 \n\t" // Shrink to save "vqmovun.s16 d0, q4 \n\t" "vst1.32 d0[0], [%[d]] \n\t" AP"done: \n\t" // No output : // Input : [s] "r" (s), [d] "r" (d), [e] "r" (e), [c] "r" (c), [tmp] "r" (tmp) // Clobbered : "q0", "q1", "q2", "q3", "q4", "q5", "q6", "q7", "q8", "q9", "memory" ); #undef AP #endif } #define _op_blend_pas_c_dp_neon _op_blend_p_c_dp_neon #define _op_blend_pan_c_dp_neon _op_blend_p_c_dp_neon #define _op_blend_p_can_dp_neon _op_blend_p_c_dp_neon #define _op_blend_pas_can_dp_neon _op_blend_p_c_dp_neon #define _op_blend_p_caa_dp_neon _op_blend_p_c_dp_neon #define _op_blend_pas_caa_dp_neon _op_blend_p_c_dp_neon #define _op_blend_p_c_dpan_neon _op_blend_p_c_dp_neon #define _op_blend_pas_c_dpan_neon _op_blend_pas_c_dp_neon #define _op_blend_pan_c_dpan_neon _op_blend_pan_c_dp_neon #define _op_blend_p_can_dpan_neon _op_blend_p_can_dp_neon #define _op_blend_pas_can_dpan_neon _op_blend_pas_can_dp_neon #define _op_blend_pan_can_dpan_neon _op_blend_pan_can_dp_neon #define _op_blend_p_caa_dpan_neon _op_blend_p_caa_dp_neon #define _op_blend_pas_caa_dpan_neon _op_blend_pas_caa_dp_neon #define _op_blend_pan_caa_dpan_neon _op_blend_pan_caa_dp_neon static void init_blend_pixel_color_span_funcs_neon(void) { op_blend_span_funcs[SP][SM_N][SC][DP][CPU_NEON] = _op_blend_p_c_dp_neon; op_blend_span_funcs[SP_AS][SM_N][SC][DP][CPU_NEON] = _op_blend_pas_c_dp_neon; op_blend_span_funcs[SP_AN][SM_N][SC][DP][CPU_NEON] = _op_blend_pan_c_dp_neon; op_blend_span_funcs[SP][SM_N][SC_AN][DP][CPU_NEON] = _op_blend_p_can_dp_neon; op_blend_span_funcs[SP_AS][SM_N][SC_AN][DP][CPU_NEON] = _op_blend_pas_can_dp_neon; op_blend_span_funcs[SP_AN][SM_N][SC_AN][DP][CPU_NEON] = _op_blend_pan_can_dp_neon; op_blend_span_funcs[SP][SM_N][SC_AA][DP][CPU_NEON] = _op_blend_p_caa_dp_neon; op_blend_span_funcs[SP_AS][SM_N][SC_AA][DP][CPU_NEON] = _op_blend_pas_caa_dp_neon; op_blend_span_funcs[SP_AN][SM_N][SC_AA][DP][CPU_NEON] = _op_blend_pan_caa_dp_neon; op_blend_span_funcs[SP][SM_N][SC][DP_AN][CPU_NEON] = _op_blend_p_c_dpan_neon; op_blend_span_funcs[SP_AS][SM_N][SC][DP_AN][CPU_NEON] = _op_blend_pas_c_dpan_neon; op_blend_span_funcs[SP_AN][SM_N][SC][DP_AN][CPU_NEON] = _op_blend_pan_c_dpan_neon; op_blend_span_funcs[SP][SM_N][SC_AN][DP_AN][CPU_NEON] = _op_blend_p_can_dpan_neon; op_blend_span_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_NEON] = _op_blend_pas_can_dpan_neon; op_blend_span_funcs[SP_AN][SM_N][SC_AN][DP_AN][CPU_NEON] = _op_blend_pan_can_dpan_neon; op_blend_span_funcs[SP][SM_N][SC_AA][DP_AN][CPU_NEON] = _op_blend_p_caa_dpan_neon; op_blend_span_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_NEON] = _op_blend_pas_caa_dpan_neon; op_blend_span_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_NEON] = _op_blend_pan_caa_dpan_neon; } #endif #ifdef BUILD_NEON static void _op_blend_pt_p_c_dp_neon(DATA32 s, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) { s = MUL4_SYM(c, s); c = 256 - (s >> 24); *d = s + MUL_256(c, *d); } #define _op_blend_pt_pas_c_dp_neon _op_blend_pt_p_c_dp_neon #define _op_blend_pt_pan_c_dp_neon _op_blend_pt_p_c_dp_neon #define _op_blend_pt_p_can_dp_neon _op_blend_pt_p_c_dp_neon #define _op_blend_pt_pas_can_dp_neon _op_blend_pt_p_c_dp_neon #define _op_blend_pt_pan_can_dp_neon _op_blend_pt_p_c_dp_neon #define _op_blend_pt_p_caa_dp_neon _op_blend_pt_p_c_dp_neon #define _op_blend_pt_pas_caa_dp_neon _op_blend_pt_p_c_dp_neon #define _op_blend_pt_pan_caa_dp_neon _op_blend_pt_p_c_dp_neon #define _op_blend_pt_p_c_dpan_neon _op_blend_pt_p_c_dp_neon #define _op_blend_pt_pas_c_dpan_neon _op_blend_pt_p_c_dp_neon #define _op_blend_pt_pan_c_dpan_neon _op_blend_pt_p_c_dp_neon #define _op_blend_pt_p_can_dpan_neon _op_blend_pt_p_c_dp_neon #define _op_blend_pt_pas_can_dpan_neon _op_blend_pt_p_c_dp_neon #define _op_blend_pt_pan_can_dpan_neon _op_blend_pt_p_c_dp_neon #define _op_blend_pt_p_caa_dpan_neon _op_blend_pt_p_c_dp_neon #define _op_blend_pt_pas_caa_dpan_neon _op_blend_pt_p_c_dp_neon #define _op_blend_pt_pan_caa_dpan_neon _op_blend_pt_p_c_dp_neon static void init_blend_pixel_color_pt_funcs_neon(void) { op_blend_pt_funcs[SP][SM_N][SC][DP][CPU_NEON] = _op_blend_pt_p_c_dp_neon; op_blend_pt_funcs[SP_AS][SM_N][SC][DP][CPU_NEON] = _op_blend_pt_pas_c_dp_neon; op_blend_pt_funcs[SP_AN][SM_N][SC][DP][CPU_NEON] = _op_blend_pt_pan_c_dp_neon; op_blend_pt_funcs[SP][SM_N][SC_AN][DP][CPU_NEON] = _op_blend_pt_p_can_dp_neon; op_blend_pt_funcs[SP_AS][SM_N][SC_AN][DP][CPU_NEON] = _op_blend_pt_pas_can_dp_neon; op_blend_pt_funcs[SP_AN][SM_N][SC_AN][DP][CPU_NEON] = _op_blend_pt_pan_can_dp_neon; op_blend_pt_funcs[SP][SM_N][SC_AA][DP][CPU_NEON] = _op_blend_pt_p_caa_dp_neon; op_blend_pt_funcs[SP_AS][SM_N][SC_AA][DP][CPU_NEON] = _op_blend_pt_pas_caa_dp_neon; op_blend_pt_funcs[SP_AN][SM_N][SC_AA][DP][CPU_NEON] = _op_blend_pt_pan_caa_dp_neon; op_blend_pt_funcs[SP][SM_N][SC][DP_AN][CPU_NEON] = _op_blend_pt_p_c_dpan_neon; op_blend_pt_funcs[SP_AS][SM_N][SC][DP_AN][CPU_NEON] = _op_blend_pt_pas_c_dpan_neon; op_blend_pt_funcs[SP_AN][SM_N][SC][DP_AN][CPU_NEON] = _op_blend_pt_pan_c_dpan_neon; op_blend_pt_funcs[SP][SM_N][SC_AN][DP_AN][CPU_NEON] = _op_blend_pt_p_can_dpan_neon; op_blend_pt_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_NEON] = _op_blend_pt_pas_can_dpan_neon; op_blend_pt_funcs[SP_AN][SM_N][SC_AN][DP_AN][CPU_NEON] = _op_blend_pt_pan_can_dpan_neon; op_blend_pt_funcs[SP][SM_N][SC_AA][DP_AN][CPU_NEON] = _op_blend_pt_p_caa_dpan_neon; op_blend_pt_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_NEON] = _op_blend_pt_pas_caa_dpan_neon; op_blend_pt_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_NEON] = _op_blend_pt_pan_caa_dpan_neon; } #endif /*-----*/ /* blend_rel pixel x color -> dst */ #ifdef BUILD_NEON #define _op_blend_rel_p_c_dpan_neon _op_blend_p_c_dpan_neon #define _op_blend_rel_pas_c_dpan_neon _op_blend_pas_c_dpan_neon #define _op_blend_rel_pan_c_dpan_neon _op_blend_pan_c_dpan_neon #define _op_blend_rel_p_can_dpan_neon _op_blend_p_can_dpan_neon #define _op_blend_rel_pas_can_dpan_neon _op_blend_pas_can_dpan_neon #define _op_blend_rel_pan_can_dpan_neon _op_blend_pan_can_dpan_neon #define _op_blend_rel_p_caa_dpan_neon _op_blend_p_caa_dpan_neon #define _op_blend_rel_pas_caa_dpan_neon _op_blend_pas_caa_dpan_neon #define _op_blend_rel_pan_caa_dpan_neon _op_blend_pan_caa_dpan_neon static void init_blend_rel_pixel_color_span_funcs_neon(void) { op_blend_rel_span_funcs[SP][SM_N][SC][DP_AN][CPU_NEON] = _op_blend_rel_p_c_dpan_neon; op_blend_rel_span_funcs[SP_AS][SM_N][SC][DP_AN][CPU_NEON] = _op_blend_rel_pas_c_dpan_neon; op_blend_rel_span_funcs[SP_AN][SM_N][SC][DP_AN][CPU_NEON] = _op_blend_rel_pan_c_dpan_neon; op_blend_rel_span_funcs[SP][SM_N][SC_AN][DP_AN][CPU_NEON] = _op_blend_rel_p_can_dpan_neon; op_blend_rel_span_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_NEON] = _op_blend_rel_pas_can_dpan_neon; op_blend_rel_span_funcs[SP_AN][SM_N][SC_AN][DP_AN][CPU_NEON] = _op_blend_rel_pan_can_dpan_neon; op_blend_rel_span_funcs[SP][SM_N][SC_AA][DP_AN][CPU_NEON] = _op_blend_rel_p_caa_dpan_neon; op_blend_rel_span_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_NEON] = _op_blend_rel_pas_caa_dpan_neon; op_blend_rel_span_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_NEON] = _op_blend_rel_pan_caa_dpan_neon; } #endif #ifdef BUILD_NEON #define _op_blend_rel_pt_p_c_dpan_neon _op_blend_pt_p_c_dpan_neon #define _op_blend_rel_pt_pas_c_dpan_neon _op_blend_pt_pas_c_dpan_neon #define _op_blend_rel_pt_pan_c_dpan_neon _op_blend_pt_pan_c_dpan_neon #define _op_blend_rel_pt_p_can_dpan_neon _op_blend_pt_p_can_dpan_neon #define _op_blend_rel_pt_pas_can_dpan_neon _op_blend_pt_pas_can_dpan_neon #define _op_blend_rel_pt_pan_can_dpan_neon _op_blend_pt_pan_can_dpan_neon #define _op_blend_rel_pt_p_caa_dpan_neon _op_blend_pt_p_caa_dpan_neon #define _op_blend_rel_pt_pas_caa_dpan_neon _op_blend_pt_pas_caa_dpan_neon #define _op_blend_rel_pt_pan_caa_dpan_neon _op_blend_pt_pan_caa_dpan_neon static void init_blend_rel_pixel_color_pt_funcs_neon(void) { op_blend_rel_pt_funcs[SP][SM_N][SC][DP_AN][CPU_NEON] = _op_blend_rel_pt_p_c_dpan_neon; op_blend_rel_pt_funcs[SP_AS][SM_N][SC][DP_AN][CPU_NEON] = _op_blend_rel_pt_pas_c_dpan_neon; op_blend_rel_pt_funcs[SP_AN][SM_N][SC][DP_AN][CPU_NEON] = _op_blend_rel_pt_pan_c_dpan_neon; op_blend_rel_pt_funcs[SP][SM_N][SC_AN][DP_AN][CPU_NEON] = _op_blend_rel_pt_p_can_dpan_neon; op_blend_rel_pt_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_NEON] = _op_blend_rel_pt_pas_can_dpan_neon; op_blend_rel_pt_funcs[SP_AN][SM_N][SC_AN][DP_AN][CPU_NEON] = _op_blend_rel_pt_pan_can_dpan_neon; op_blend_rel_pt_funcs[SP][SM_N][SC_AA][DP_AN][CPU_NEON] = _op_blend_rel_pt_p_caa_dpan_neon; op_blend_rel_pt_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_NEON] = _op_blend_rel_pt_pas_caa_dpan_neon; op_blend_rel_pt_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_NEON] = _op_blend_rel_pt_pan_caa_dpan_neon; } #endif evas-1.7.9/src/lib/engines/common/evas_op_blend/op_blend_pixel_i386.c0000664000175000017500000001350012175475547022406 00000000000000/* blend pixel --> dst */ #ifdef BUILD_MMX static void _op_blend_p_dp_mmx(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c __UNUSED__, DATA32 *d, int l) { DATA32 *e = d + l; pxor_r2r(mm0, mm0); MOV_A2R(ALPHA_256, mm6) while (d < e) { MOV_P2R(*s, mm2, mm0) MOV_RA2R(mm2, mm1) movq_r2r(mm6, mm3); psubw_r2r(mm1, mm3); MOV_P2R(*d, mm1, mm0) MUL4_256_R2R(mm3, mm1) paddw_r2r(mm2, mm1); MOV_R2P(mm1, *d, mm0) s++; d++; } } static void _op_blend_pas_dp_mmx(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c __UNUSED__, DATA32 *d, int l) { _op_blend_p_dp_mmx(s, m, c, d, l); return; DATA32 *e = d + l; pxor_r2r(mm0, mm0); MOV_A2R(ALPHA_256, mm6) while (d < e) { switch (*s & 0xff000000) { case 0: break; case 0xff000000: *d = *s; break; default : MOV_P2R(*s, mm2, mm0) MOV_RA2R(mm2, mm1) movq_r2r(mm6, mm3); psubw_r2r(mm1, mm3); MOV_P2R(*d, mm1, mm0) MUL4_256_R2R(mm3, mm1) paddw_r2r(mm2, mm1); MOV_R2P(mm1, *d, mm0) break; } s++; d++; } } #define _op_blend_pan_dp_mmx NULL #define _op_blend_p_dpan_mmx _op_blend_p_dp_mmx #define _op_blend_pas_dpan_mmx _op_blend_pas_dp_mmx #define _op_blend_pan_dpan_mmx _op_blend_pan_dp_mmx static void init_blend_pixel_span_funcs_mmx(void) { op_blend_span_funcs[SP][SM_N][SC_N][DP][CPU_MMX] = _op_blend_p_dp_mmx; op_blend_span_funcs[SP_AS][SM_N][SC_N][DP][CPU_MMX] = _op_blend_pas_dp_mmx; op_blend_span_funcs[SP_AN][SM_N][SC_N][DP][CPU_MMX] = _op_blend_pan_dp_mmx; op_blend_span_funcs[SP][SM_N][SC_N][DP_AN][CPU_MMX] = _op_blend_p_dpan_mmx; op_blend_span_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_MMX] = _op_blend_pas_dpan_mmx; op_blend_span_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_MMX] = _op_blend_pan_dpan_mmx; } #endif #ifdef BUILD_MMX static void _op_blend_pt_p_dp_mmx(DATA32 s, DATA8 m __UNUSED__, DATA32 c __UNUSED__, DATA32 *d) { pxor_r2r(mm0, mm0); MOV_A2R(ALPHA_256, mm6) MOV_P2R(s, mm2, mm0) MOV_RA2R(mm2, mm1) movq_r2r(mm6, mm3); psubw_r2r(mm1, mm3); MOV_P2R(*d, mm1, mm0) MUL4_256_R2R(mm3, mm1) paddw_r2r(mm2, mm1); MOV_R2P(mm1, *d, mm0) } #define _op_blend_pt_pan_dp_mmx NULL #define _op_blend_pt_pas_dp_mmx _op_blend_pt_p_dp_mmx #define _op_blend_pt_p_dpan_mmx _op_blend_pt_p_dp_mmx #define _op_blend_pt_pan_dpan_mmx _op_blend_pt_pan_dp_mmx #define _op_blend_pt_pas_dpan_mmx _op_blend_pt_pas_dp_mmx static void init_blend_pixel_pt_funcs_mmx(void) { op_blend_pt_funcs[SP][SM_N][SC_N][DP][CPU_MMX] = _op_blend_pt_p_dp_mmx; op_blend_pt_funcs[SP_AS][SM_N][SC_N][DP][CPU_MMX] = _op_blend_pt_pas_dp_mmx; op_blend_pt_funcs[SP_AN][SM_N][SC_N][DP][CPU_MMX] = _op_blend_pt_pan_dp_mmx; op_blend_pt_funcs[SP][SM_N][SC_N][DP_AN][CPU_MMX] = _op_blend_pt_p_dpan_mmx; op_blend_pt_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_MMX] = _op_blend_pt_pas_dpan_mmx; op_blend_pt_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_MMX] = _op_blend_pt_pan_dpan_mmx; } #endif /*-----*/ /* blend_rel pixel -> dst */ #ifdef BUILD_MMX static void _op_blend_rel_p_dp_mmx(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c __UNUSED__, DATA32 *d, int l) { DATA32 *e = d + l; pxor_r2r(mm0, mm0); MOV_A2R(ALPHA_256, mm6) MOV_A2R(ALPHA_255, mm5) while (d < e) { MOV_P2R(*s, mm2, mm0) MOV_RA2R(mm2, mm1) movq_r2r(mm6, mm3); psubw_r2r(mm1, mm3); MOV_P2R(*d, mm1, mm0) MOV_RA2R(mm1, mm4) MUL4_256_R2R(mm3, mm1) MUL4_SYM_R2R(mm4, mm2, mm5) paddw_r2r(mm2, mm1); MOV_R2P(mm1, *d, mm0) s++; d++; } } static void _op_blend_rel_pan_dp_mmx(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c __UNUSED__, DATA32 *d, int l) { DATA32 *e = d + l; pxor_r2r(mm0, mm0); MOV_A2R(ALPHA_256, mm6) MOV_A2R(ALPHA_255, mm5) while (d < e) { MOV_P2R(*s, mm2, mm0) MOV_PA2R(*d, mm1) MUL4_SYM_R2R(mm2, mm1, mm5) MOV_R2P(mm1, *d, mm0) s++; d++; } } #define _op_blend_rel_pas_dp_mmx _op_blend_rel_p_dp_mmx #define _op_blend_rel_p_dpan_mmx _op_blend_p_dpan_mmx #define _op_blend_rel_pan_dpan_mmx _op_blend_pan_dpan_mmx #define _op_blend_rel_pas_dpan_mmx _op_blend_pas_dpan_mmx static void init_blend_rel_pixel_span_funcs_mmx(void) { op_blend_rel_span_funcs[SP][SM_N][SC_N][DP][CPU_MMX] = _op_blend_rel_p_dp_mmx; op_blend_rel_span_funcs[SP_AS][SM_N][SC_N][DP][CPU_MMX] = _op_blend_rel_pas_dp_mmx; op_blend_rel_span_funcs[SP_AN][SM_N][SC_N][DP][CPU_MMX] = _op_blend_rel_pan_dp_mmx; op_blend_rel_span_funcs[SP][SM_N][SC_N][DP_AN][CPU_MMX] = _op_blend_rel_p_dpan_mmx; op_blend_rel_span_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_MMX] = _op_blend_rel_pas_dpan_mmx; op_blend_rel_span_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_MMX] = _op_blend_rel_pan_dpan_mmx; } #endif #ifdef BUILD_MMX static void _op_blend_rel_pt_p_dp_mmx(DATA32 s, DATA8 m __UNUSED__, DATA32 c __UNUSED__, DATA32 *d) { pxor_r2r(mm0, mm0); MOV_A2R(ALPHA_256, mm6) MOV_A2R(ALPHA_255, mm5) MOV_P2R(s, mm2, mm0) MOV_RA2R(mm2, mm1) psubw_r2r(mm1, mm6); MOV_P2R(*d, mm1, mm0) MOV_RA2R(mm1, mm4) MUL4_256_R2R(mm6, mm1) MUL4_SYM_R2R(mm4, mm2, mm5) paddw_r2r(mm2, mm1); MOV_R2P(mm1, *d, mm0) } #define _op_blend_rel_pt_pas_dp_mmx _op_blend_rel_pt_p_dp_mmx #define _op_blend_rel_pt_pan_dp_mmx _op_blend_rel_pt_p_dp_mmx #define _op_blend_rel_pt_p_dpan_mmx _op_blend_pt_p_dpan_mmx #define _op_blend_rel_pt_pas_dpan_mmx _op_blend_pt_pas_dpan_mmx #define _op_blend_rel_pt_pan_dpan_mmx _op_blend_pt_pan_dpan_mmx static void init_blend_rel_pixel_pt_funcs_mmx(void) { op_blend_rel_pt_funcs[SP][SM_N][SC_N][DP][CPU_MMX] = _op_blend_rel_pt_p_dp_mmx; op_blend_rel_pt_funcs[SP_AS][SM_N][SC_N][DP][CPU_MMX] = _op_blend_rel_pt_pas_dp_mmx; op_blend_rel_pt_funcs[SP_AN][SM_N][SC_N][DP][CPU_MMX] = _op_blend_rel_pt_pan_dp_mmx; op_blend_rel_pt_funcs[SP][SM_N][SC_N][DP_AN][CPU_MMX] = _op_blend_rel_pt_p_dpan_mmx; op_blend_rel_pt_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_MMX] = _op_blend_rel_pt_pas_dpan_mmx; op_blend_rel_pt_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_MMX] = _op_blend_rel_pt_pan_dpan_mmx; } #endif evas-1.7.9/src/lib/engines/common/evas_op_blend/op_blend_pixel_neon.c0000664000175000017500000003135112175475547022660 00000000000000/* blend pixel --> dst */ #ifdef BUILD_NEON static void _op_blend_p_dp_neon(DATA32 *s, DATA8 *m, DATA32 c, DATA32 *d, int l) { #define AP "blend_p_dp_" asm volatile ( ".fpu neon \n\t" //** init "vmov.i8 q8, $0x1 \n\t" AP "loopchoose: \n\t" // If aligned already - straight to octs "andS %[tmp], %[d],$0x1f \n\t" "beq "AP"octloops \n\t" "andS %[tmp], %[d],$0xf \n\t" "beq "AP"quadloops \n\t" "andS %[tmp], %[d],$0x4 \n\t" "beq "AP"dualloop \n\t" // Only ever executes once, fall through to dual AP "singleloop: \n\t" "vld1.32 d0[0], [%[s]]! \n\t" "vld1.32 d4[0], [%[d]] \n\t" "vmvn.u8 d8, d0 \n\t" "vshr.u32 d8, d8, #24 \n\t" "vmul.u32 d8, d16, d8 \n\t" "vmull.u8 q6, d4,d8 \n\t" "vqrshrn.u16 d8, q6, #8 \n\t" // Add to 's' "vqadd.u8 q2, q4,q0 \n\t" "vst1.32 d4[0], [%[d]] \n\t" "add %[d], #4 \n\t" // Can we go the fast path? "andS %[tmp], %[d],$0x1f \n\t" "beq "AP"octloops \n\t" "andS %[tmp], %[d],$0x0f \n\t" "beq "AP"quadloops \n\t" AP "dualloop: \n\t" "sub %[tmp], %[e], %[d] \n\t" "cmp %[tmp], #32 \n\t" "blt "AP"loopout \n\t" AP "dualloopint: \n\t" //** Dual Loop "vldm %[s]!, {d0} \n\t" "vldr d4, [%[d]] \n\t" "vmvn.u8 d8, d0 \n\t" "vshr.u32 d8, d8, #24 \n\t" "vmul.u32 d8, d16, d8 \n\t" "vmull.u8 q6, d4,d8 \n\t" "vqrshrn.u16 d8, q6, #8 \n\t" // Add to 's' "vqadd.u8 d4, d8,d0 \n\t" "vstr d4, [%[d]] \n\t" "add %[d], #8 \n\t" "ands %[tmp], %[d], $0x1f \n\t" "beq "AP"octloops \n\t" AP"quadloops: \n\t" "sub %[tmp], %[e], %[d] \n\t" "cmp %[tmp], #32 \n\t" "blt "AP"loopout \n\t" "vldm %[s]!, {d0,d1) \n\t" "vldm %[d], {d4,d5} \n\t" // Copy s.a into q2 (>> 24) & subtract from 255 "vmvn.u8 q4, q0 \n\t" "vshr.u32 q4, q4,$0x18 \n\t" // Multiply into all fields "vmul.u32 q4, q8,q4 \n\t" // a * d (clobbering 'd'/q7) "vmull.u8 q6, d4,d8 \n\t" "vmull.u8 q2, d5,d9 \n\t" // Shift & narrow it "vqrshrn.u16 d8, q6, #8 \n\t" "vqrshrn.u16 d9, q2, #8 \n\t" // Add to s "vqadd.u8 q2, q4,q0 \n\t" // Write it "vstm %[d]!, {d4,d5} \n\t" AP "octloops: \n\t" "sub %[tmp], %[e], %[d] \n\t" "cmp %[tmp], #32 \n\t" "ble "AP"loopout \n\t" "sub %[tmp],%[e],#64 \n\t" AP "octloopint:\n\t" //** Oct loop "vldm %[s]!, {d0,d1,d2,d3) \n\t" "vldm %[d], {d4,d5,d6,d7} \n\t" "pld [%[s], #64] \n\t" // Copy s.a into q2 (>> 24) & subtract from 255 "vmvn.u8 q4, q0 \n\t" "vmvn.u8 q5, q1 \n\t" "vshr.u32 q4, q4,$0x18 \n\t" "vshr.u32 q5, q5,$0x18\n\t" // Multiply into all fields "vmul.u32 q4, q8,q4 \n\t" "vmul.u32 q5, q8,q5 \n\t" // a * d (clobbering 'd'/q7) "vmull.u8 q6, d4,d8 \n\t" "vmull.u8 q2, d5,d9 \n\t" "vmull.u8 q7, d6,d10 \n\t" "vmull.u8 q3, d7,d11 \n\t" "cmp %[tmp], %[d]\n\t" // Shift & narrow it "vqrshrn.u16 d8, q6, #8 \n\t" "vqrshrn.u16 d9, q2, #8 \n\t" "vqrshrn.u16 d10, q7, #8 \n\t" "vqrshrn.u16 d11, q3, #8 \n\t" // Add to s "vqadd.u8 q2, q4,q0 \n\t" "vqadd.u8 q3, q5,q1 \n\t" // Write it "vstm %[d]!, {d4,d5,d6,d7} \n\t" "bhi "AP"octloopint\n\t" AP "loopout: \n\t" "cmp %[d], %[e] \n\t" "beq "AP"done \n\t" "sub %[tmp],%[e], %[d] \n\t" "cmp %[tmp],$0x04 \n\t" "ble "AP"singleloop2 \n\t" AP "dualloop2: \n\t" "sub %[tmp],%[e],$0x7 \n\t" AP "dualloop2int: \n\t" //** Trailing double "vldm %[s]!, {d0} \n\t" "vldm %[d], {d4} \n\t" "vmvn.u8 d8, d0 \n\t" "vshr.u32 d8, d8, #24 \n\t" "vmul.u32 d8, d16, d8 \n\t" "vmull.u8 q6, d4,d8 \n\t" "vqrshrn.u16 d8, q6, #8 \n\t" // Add to 's' "vqadd.u8 d4, d8,d0 \n\t" "vstr.32 d4, [%[d]] \n\t" "add %[d], #8 \n\t" "cmp %[tmp], %[d] \n\t" "bhi "AP"dualloop2int \n\t" // Single ?? "cmp %[e], %[d] \n\t" "beq "AP"done \n\t" AP"singleloop2: \n\t" "vld1.32 d0[0], [%[s]] \n\t" "vld1.32 d4[0], [%[d]] \n\t" "vmvn.u8 d8, d0 \n\t" "vshr.u32 d8, d8, #24 \n\t" "vmul.u32 d8, d8, d16 \n\t" "vmull.u8 q6, d8,d4 \n\t" "vqrshrn.u16 d8, q6, #8 \n\t" // Add to 's' "vqadd.u8 d0, d0,d8 \n\t" "vst1.32 d0[0], [%[d]] \n\t" //** Trailing single AP"done:\n\t" //"sub %[tmp], %[e], #4 \n\t" //"vmov.i32 d0, $0xffff0000 \n\t" //"vst1.32 d0[0], [%[tmp]] \n\t" : // output regs // Input : [e] "r" (d + l), [d] "r" (d), [s] "r" (s), [c] "r" (c), [tmp] "r" (7) : "q0", "q1", "q2","q3", "q4","q5","q6", "q7","q8","memory" // clobbered ); #undef AP } static void _op_blend_pas_dp_neon(DATA32 *s, DATA8 *m, DATA32 c, DATA32 *d, int l) { #define AP "blend_pas_dp_" DATA32 *e = d + l,*tmp = e + 32,*pl=(void*)912; asm volatile ( ".fpu neon \n\t" "vmov.i8 q8, #1 \n\t" AP"loopchoose: \n\t" // If aliged - go as fast we can "andS %[tmp], %[d], #31 \n\t" "beq "AP"quadstart \n\t" // See if we can at least do our double loop "andS %[tmp], %[d], $0x7 \n\t" "beq "AP"dualstart \n\t" // Ugly single word version AP "singleloop: \n\t" "vld1.32 d0[0], [%[s]]! \n\t" "vld1.32 d4[0], [%[d]] \n\t" "vmvn.u8 d8, d0 \n\t" "vshr.u32 d8, d8,$0x18 \n\t" // Mulitply into all fields "vmul.u32 d8, d8, d16 \n\t" // Multiply out "vmull.u8 q6, d8, d4 \n\t" "vqrshrn.u16 d8, q6, #8 \n\t" // Add to s "vqadd.u8 d0, d0,d8 \n\t" "vst1.32 d0[0], [%[d]]! \n\t" AP"dualstart: \n\t" "sub %[tmp], %[e], %[d] \n\t" "cmp %[tmp], #32 \n\t" "blt "AP"loopout \n\t" // If aligned - go as fast we can "andS %[tmp], %[d], #31 \n\t" "beq "AP"quadstart \n\t" AP"dualloop: \n\t" "vldm %[s]!, {d0) \n\t" "vldm %[d], {d4} \n\t" // Subtract from 255 (ie negate) and extract alpha channel "vmvn.u8 d8, d0 \n\t" "vshr.u32 d8, d8,$0x18 \n\t" // Mulitply into all fields "vmul.u32 d8, d8, d16 \n\t" // Multiply out "vmull.u8 q6, d8, d4 \n\t" "vqrshrn.u16 d8, q6, #8 \n\t" // Add to s "vqadd.u8 d0, d0,d8 \n\t" "vstm %[d]!, {d0} \n\t" "andS %[tmp], %[d], $0x1f \n\t" "bne "AP"dualloop \n\t" AP"quadstart: \n\t" "sub %[tmp], %[e], %[d] \n\t" "cmp %[tmp], #32 \n\t" "blt "AP"loopout \n\t" "sub %[tmp], %[e], #31 \n\t" AP"quadloop:\n\t" "vldm %[s]!, {d0,d1,d2,d3) \n\t" "vldm %[d], {d4,d5,d6,d7} \n\t" // Subtract from 255 (ie negate) and extract alpha channel "vmvn.u8 q4, q0 \n\t" "vmvn.u8 q5, q1 \n\t" "vshr.u32 q4, q4,$0x18 \n\t" "vshr.u32 q5, q5,$0x18 \n\t" // Prepare to preload "add %[pl], %[s], #32 \n\t" // Mulitply into all fields "vmul.u32 q4, q4, q8 \n\t" "vmul.u32 q5, q5, q8 \n\t" "pld [%[pl]] \n\t" // Multiply out "vmull.u8 q6, d8, d4 \n\t" "vmull.u8 q7, d10, d6 \n\t" "vmull.u8 q2, d9, d5 \n\t" "vmull.u8 q3, d11, d7 \n\t" "add %[pl], %[d], #32 \n\t" "vqrshrn.u16 d8, q6, #8 \n\t" "vqrshrn.u16 d10, q7, #8 \n\t" "vqrshrn.u16 d9, q2, #8 \n\t" "vqrshrn.u16 d11, q3, #8 \n\t" "pld [%[pl]] \n\t" "cmp %[tmp], %[pl] \n\t" // Add to s "vqadd.u8 q0, q0,q4 \n\t" "vqadd.u8 q1, q1,q5 \n\t" "vstm %[d]!, {d0,d1,d2,d3} \n\t" "bhi "AP"quadloop \n\t" AP "loopout: \n\t" "cmp %[d], %[e] \n\t" "beq "AP"done \n\t" "sub %[tmp],%[e], %[d] \n\t" "cmp %[tmp],$0x04 \n\t" "beq "AP"singleloop2 \n\t" "sub %[tmp],%[e],$0x7 \n\t" AP"dualloop2: \n\t" "vldm %[s]!, {d0) \n\t" "vldm %[d], {d4} \n\t" // Subtract from 255 (ie negate) and extract alpha channel "vmvn.u8 d8, d0 \n\t" "vshr.u32 d8, d8,$0x18 \n\t" // Mulitply into all fields "vmul.u32 d8, d8, d16 \n\t" // Multiply out "vmull.u8 q6, d8, d4 \n\t" "vqrshrn.u16 d8, q6, #8 \n\t" // Add to s "vqadd.u8 d0, d0,d8 \n\t" "vstm %[d]!, {d0} \n\t" "cmp %[tmp], %[d] \n\t" "bhi "AP"dualloop2 \n\t" // Single ?? "cmp %[e], %[d] \n\t" "beq "AP"done \n\t" AP "singleloop2: \n\t" "vld1.32 d0[0], [%[s]] \n\t" "vld1.32 d4[0], [%[d]] \n\t" "vmvn.u8 d8, d0 \n\t" "vshr.u32 d8, d8,$0x18 \n\t" // Mulitply into all fields "vmul.u32 d8, d8, d16 \n\t" // Multiply out "vmull.u8 q6, d8, d4 \n\t" "vqrshrn.u16 d8, q6, #8 \n\t" // Add to s "vqadd.u8 d0, d0,d8 \n\t" "vst1.32 d0[0], [%[d]] \n\t" AP "done:\n\t" : /* Out */ : /* In */ [s] "r" (s), [e] "r" (e), [d] "r" (d), [tmp] "r" (tmp), [pl] "r" (pl) : /* Clobbered */ "q0","q1","q2","q3","q4","q5","q6","q7","q8","memory" ); #undef AP } #define _op_blend_pan_dp_neon NULL #define _op_blend_p_dpan_neon _op_blend_p_dp_neon #define _op_blend_pas_dpan_neon _op_blend_pas_dp_neon #define _op_blend_pan_dpan_neon _op_blend_pan_dp_neon static void init_blend_pixel_span_funcs_neon(void) { op_blend_span_funcs[SP][SM_N][SC_N][DP][CPU_NEON] = _op_blend_p_dp_neon; op_blend_span_funcs[SP_AS][SM_N][SC_N][DP][CPU_NEON] = _op_blend_pas_dp_neon; op_blend_span_funcs[SP_AN][SM_N][SC_N][DP][CPU_NEON] = _op_blend_pan_dp_neon; op_blend_span_funcs[SP][SM_N][SC_N][DP_AN][CPU_NEON] = _op_blend_p_dpan_neon; op_blend_span_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_NEON] = _op_blend_pas_dpan_neon; op_blend_span_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_NEON] = _op_blend_pan_dpan_neon; } #endif #ifdef BUILD_NEON static void _op_blend_pt_p_dp_neon(DATA32 s, DATA8 m, DATA32 c, DATA32 *d) { c = 256 - (s >> 24); *d = s + MUL_256(c, *d); } #define _op_blend_pt_pan_dp_neon NULL #define _op_blend_pt_pas_dp_neon _op_blend_pt_p_dp_neon #define _op_blend_pt_p_dpan_neon _op_blend_pt_p_dp_neon #define _op_blend_pt_pan_dpan_neon _op_blend_pt_pan_dp_neon #define _op_blend_pt_pas_dpan_neon _op_blend_pt_pas_dp_neon static void init_blend_pixel_pt_funcs_neon(void) { op_blend_pt_funcs[SP][SM_N][SC_N][DP][CPU_NEON] = _op_blend_pt_p_dp_neon; op_blend_pt_funcs[SP_AS][SM_N][SC_N][DP][CPU_NEON] = _op_blend_pt_pas_dp_neon; op_blend_pt_funcs[SP_AN][SM_N][SC_N][DP][CPU_NEON] = _op_blend_pt_pan_dp_neon; op_blend_pt_funcs[SP][SM_N][SC_N][DP_AN][CPU_NEON] = _op_blend_pt_p_dpan_neon; op_blend_pt_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_NEON] = _op_blend_pt_pas_dpan_neon; op_blend_pt_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_NEON] = _op_blend_pt_pan_dpan_neon; } #endif /*-----*/ /* blend_rel pixel -> dst */ #ifdef BUILD_NEON static void _op_blend_rel_p_dp_neon(DATA32 *s, DATA8 *m, DATA32 c, DATA32 *d, int l) { DATA32 *e = d + l; while (d < e) { l = 256 - (*s >> 24); c = 1 + (*d >> 24); *d = MUL_256(c, *s) + MUL_256(l, *d); d++; s++; } } static void _op_blend_rel_pan_dp_neon(DATA32 *s, DATA8 *m, DATA32 c, DATA32 *d, int l) { DATA32 *e = d + l; while (d < e) { c = 1 + (*d >> 24); *d++ = MUL_256(c, *s); s++; } } #define _op_blend_rel_pas_dp_neon _op_blend_rel_p_dp_neon #define _op_blend_rel_p_dpan_neon _op_blend_p_dpan_neon #define _op_blend_rel_pan_dpan_neon _op_blend_pan_dpan_neon #define _op_blend_rel_pas_dpan_neon _op_blend_pas_dpan_neon static void init_blend_rel_pixel_span_funcs_neon(void) { op_blend_rel_span_funcs[SP][SM_N][SC_N][DP][CPU_NEON] = _op_blend_rel_p_dp_neon; op_blend_rel_span_funcs[SP_AS][SM_N][SC_N][DP][CPU_NEON] = _op_blend_rel_pas_dp_neon; op_blend_rel_span_funcs[SP_AN][SM_N][SC_N][DP][CPU_NEON] = _op_blend_rel_pan_dp_neon; op_blend_rel_span_funcs[SP][SM_N][SC_N][DP_AN][CPU_NEON] = _op_blend_rel_p_dpan_neon; op_blend_rel_span_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_NEON] = _op_blend_rel_pas_dpan_neon; op_blend_rel_span_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_NEON] = _op_blend_rel_pan_dpan_neon; } #endif #ifdef BUILD_NEON static void _op_blend_rel_pt_p_dp_neon(DATA32 s, DATA8 m, DATA32 c, DATA32 *d) { c = 256 - (s >> 24); *d = MUL_SYM(*d >> 24, s) + MUL_256(c, *d); } #define _op_blend_rel_pt_pas_dp_neon _op_blend_rel_pt_p_dp_neon #define _op_blend_rel_pt_pan_dp_neon _op_blend_rel_pt_p_dp_neon #define _op_blend_rel_pt_p_dpan_neon _op_blend_pt_p_dpan_neon #define _op_blend_rel_pt_pas_dpan_neon _op_blend_pt_pas_dpan_neon #define _op_blend_rel_pt_pan_dpan_neon _op_blend_pt_pan_dpan_neon static void init_blend_rel_pixel_pt_funcs_neon(void) { op_blend_rel_pt_funcs[SP][SM_N][SC_N][DP][CPU_NEON] = _op_blend_rel_pt_p_dp_neon; op_blend_rel_pt_funcs[SP_AS][SM_N][SC_N][DP][CPU_NEON] = _op_blend_rel_pt_pas_dp_neon; op_blend_rel_pt_funcs[SP_AN][SM_N][SC_N][DP][CPU_NEON] = _op_blend_rel_pt_pan_dp_neon; op_blend_rel_pt_funcs[SP][SM_N][SC_N][DP_AN][CPU_NEON] = _op_blend_rel_pt_p_dpan_neon; op_blend_rel_pt_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_NEON] = _op_blend_rel_pt_pas_dpan_neon; op_blend_rel_pt_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_NEON] = _op_blend_rel_pt_pan_dpan_neon; } #endif evas-1.7.9/src/lib/engines/common/evas_op_blend/op_blend_pixel_mask_neon.c0000664000175000017500000001107112175475547023670 00000000000000/* blend pixel x mask --> dst */ #ifdef BUILD_NEON static void _op_blend_pas_mas_dp_neon(DATA32 *s, DATA8 *m, DATA32 c __UNUSED__, DATA32 *d, int l) { DATA32 *e; int alpha; UNROLL8_PLD_WHILE(d, l, e, { alpha = *m; switch(alpha) { case 0: break; case 255: *d = *s; break; default: alpha++; *d = INTERP_256(alpha, *s, *d); break; } m++; s++; d++; }); } static void _op_blend_pan_mas_dp_neon(DATA32 *s, DATA8 *m, DATA32 c __UNUSED__, DATA32 *d, int l) { DATA32 *e; int alpha; UNROLL8_PLD_WHILE(d, l, e, { alpha = *m; switch(alpha) { case 0: break; case 255: *d = *s; break; default: alpha++; *d = INTERP_256(alpha, *s, *d); break; } m++; s++; d++; }); } #define _op_blend_p_mas_dp_neon _op_blend_pas_mas_dp_neon #define _op_blend_p_mas_dpan_neon _op_blend_p_mas_dp_neon #define _op_blend_pan_mas_dpan_neon _op_blend_pan_mas_dp_neon #define _op_blend_pas_mas_dpan_neon _op_blend_pas_mas_dp_neon static void init_blend_pixel_mask_span_funcs_neon(void) { op_blend_span_funcs[SP][SM_AS][SC_N][DP][CPU_NEON] = _op_blend_p_mas_dp_neon; op_blend_span_funcs[SP_AS][SM_AS][SC_N][DP][CPU_NEON] = _op_blend_pas_mas_dp_neon; op_blend_span_funcs[SP_AN][SM_AS][SC_N][DP][CPU_NEON] = _op_blend_pan_mas_dp_neon; op_blend_span_funcs[SP][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_blend_p_mas_dpan_neon; op_blend_span_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_blend_pas_mas_dpan_neon; op_blend_span_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_blend_pan_mas_dpan_neon; } #endif #ifdef BUILD_NEON static void _op_blend_pt_p_mas_dp_neon(DATA32 s, DATA8 m, DATA32 c, DATA32 *d) { s = MUL_SYM(m, s); c = 256 - (s >> 24); *d = s + MUL_256(c, *d); } #define _op_blend_pt_pan_mas_dp_neon _op_blend_pt_p_mas_dp_neon #define _op_blend_pt_pas_mas_dp_neon _op_blend_pt_p_mas_dp_neon #define _op_blend_pt_p_mas_dpan_neon _op_blend_pt_p_mas_dp_neon #define _op_blend_pt_pas_mas_dpan_neon _op_blend_pt_pas_mas_dp_neon #define _op_blend_pt_pan_mas_dpan_neon _op_blend_pt_pan_mas_dp_neon static void init_blend_pixel_mask_pt_funcs_neon(void) { op_blend_pt_funcs[SP][SM_AS][SC_N][DP][CPU_NEON] = _op_blend_pt_p_mas_dp_neon; op_blend_pt_funcs[SP_AS][SM_AS][SC_N][DP][CPU_NEON] = _op_blend_pt_pas_mas_dp_neon; op_blend_pt_funcs[SP_AN][SM_AS][SC_N][DP][CPU_NEON] = _op_blend_pt_pan_mas_dp_neon; op_blend_pt_funcs[SP][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_blend_pt_p_mas_dpan_neon; op_blend_pt_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_blend_pt_pas_mas_dpan_neon; op_blend_pt_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_blend_pt_pan_mas_dpan_neon; } #endif /*-----*/ /* blend_rel pixel x mask -> dst */ #ifdef BUILD_NEON #define _op_blend_rel_p_mas_dpan_neon _op_blend_p_mas_dpan_neon #define _op_blend_rel_pas_mas_dpan_neon _op_blend_pas_mas_dpan_neon #define _op_blend_rel_pan_mas_dpan_neon _op_blend_pan_mas_dpan_neon static void init_blend_rel_pixel_mask_span_funcs_neon(void) { op_blend_rel_span_funcs[SP][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_blend_rel_p_mas_dpan_neon; op_blend_rel_span_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_blend_rel_pas_mas_dpan_neon; op_blend_rel_span_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_blend_rel_pan_mas_dpan_neon; } #endif #ifdef BUILD_NEON #define _op_blend_rel_pt_p_mas_dpan_neon _op_blend_pt_p_mas_dpan_neon #define _op_blend_rel_pt_pas_mas_dpan_neon _op_blend_pt_pas_mas_dpan_neon #define _op_blend_rel_pt_pan_mas_dpan_neon _op_blend_pt_pan_mas_dpan_neon static void init_blend_rel_pixel_mask_pt_funcs_neon(void) { op_blend_rel_pt_funcs[SP][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_blend_rel_pt_p_mas_dpan_neon; op_blend_rel_pt_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_blend_rel_pt_pas_mas_dpan_neon; op_blend_rel_pt_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_blend_rel_pt_pan_mas_dpan_neon; } #endif evas-1.7.9/src/lib/engines/common/evas_op_blend/op_blend_color_.c0000664000175000017500000000622412175475547021776 00000000000000/* blend color -> dst */ #ifdef BUILD_C static void _op_blend_c_dp(DATA32 *s __UNUSED__, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { DATA32 *e, a = 256 - (c >> 24); UNROLL8_PLD_WHILE(d, l, e, { *d = c + MUL_256(a, *d); d++; }); } #define _op_blend_caa_dp _op_blend_c_dp #define _op_blend_c_dpan _op_blend_c_dp #define _op_blend_caa_dpan _op_blend_c_dpan static void init_blend_color_span_funcs_c(void) { op_blend_span_funcs[SP_N][SM_N][SC][DP][CPU_C] = _op_blend_c_dp; op_blend_span_funcs[SP_N][SM_N][SC_AA][DP][CPU_C] = _op_blend_caa_dp; op_blend_span_funcs[SP_N][SM_N][SC][DP_AN][CPU_C] = _op_blend_c_dpan; op_blend_span_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_C] = _op_blend_caa_dpan; } #endif #ifdef BUILD_C static void _op_blend_pt_c_dp(DATA32 s, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) { s = 256 - (c >> 24); *d = c + MUL_256(s, *d); } #define _op_blend_pt_caa_dp _op_blend_pt_c_dp #define _op_blend_pt_c_dpan _op_blend_pt_c_dp #define _op_blend_pt_caa_dpan _op_blend_pt_c_dpan #define _op_blend_pt_c_dpas _op_blend_pt_c_dp #define _op_blend_pt_caa_dpas _op_blend_pt_c_dp static void init_blend_color_pt_funcs_c(void) { op_blend_pt_funcs[SP_N][SM_N][SC][DP][CPU_C] = _op_blend_pt_c_dp; op_blend_pt_funcs[SP_N][SM_N][SC_AA][DP][CPU_C] = _op_blend_pt_caa_dp; op_blend_pt_funcs[SP_N][SM_N][SC][DP_AN][CPU_C] = _op_blend_pt_c_dpan; op_blend_pt_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_C] = _op_blend_pt_caa_dpan; } #endif /*-----*/ /* blend_rel color -> dst */ #ifdef BUILD_C static void _op_blend_rel_c_dp(DATA32 *s __UNUSED__, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { DATA32 *e; int alpha = 256 - (c >> 24); UNROLL8_PLD_WHILE(d, l, e, { *d = MUL_SYM(*d >> 24, c) + MUL_256(alpha, *d); d++; }); } #define _op_blend_rel_caa_dp _op_blend_rel_c_dp #define _op_blend_rel_c_dpan _op_blend_c_dpan #define _op_blend_rel_caa_dpan _op_blend_caa_dpan static void init_blend_rel_color_span_funcs_c(void) { op_blend_rel_span_funcs[SP_N][SM_N][SC][DP][CPU_C] = _op_blend_rel_c_dp; op_blend_rel_span_funcs[SP_N][SM_N][SC_AA][DP][CPU_C] = _op_blend_rel_caa_dp; op_blend_rel_span_funcs[SP_N][SM_N][SC][DP_AN][CPU_C] = _op_blend_rel_c_dpan; op_blend_rel_span_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_C] = _op_blend_rel_caa_dpan; } #endif #ifdef BUILD_C static void _op_blend_rel_pt_c_dp(DATA32 s, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) { s = *d >> 24; *d = MUL_SYM(s, c) + MUL_256(256 - (c >> 24), *d); } #define _op_blend_rel_pt_caa_dp _op_blend_rel_pt_c_dp #define _op_blend_rel_pt_c_dpan _op_blend_pt_c_dpan #define _op_blend_rel_pt_caa_dpan _op_blend_pt_caa_dpan static void init_blend_rel_color_pt_funcs_c(void) { op_blend_rel_pt_funcs[SP_N][SM_N][SC][DP][CPU_C] = _op_blend_rel_pt_c_dp; op_blend_rel_pt_funcs[SP_N][SM_N][SC_AA][DP][CPU_C] = _op_blend_rel_pt_caa_dp; op_blend_rel_pt_funcs[SP_N][SM_N][SC][DP_AN][CPU_C] = _op_blend_rel_pt_c_dpan; op_blend_rel_pt_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_C] = _op_blend_rel_pt_caa_dpan; } #endif evas-1.7.9/src/lib/engines/common/evas_op_blend/op_blend_pixel_mask_sse3.c0000664000175000017500000002304312175475547023610 00000000000000/* blend pixel x mask --> dst */ #ifdef BUILD_SSE3 static void _op_blend_p_mas_dp_sse3(DATA32 *s, DATA8 *m, DATA32 c, DATA32 *d, int l) { int alpha; LOOP_ALIGNED_U1_A48_SSE3(d, l, { /* UOP */ alpha = *m; c = MUL_SYM(alpha, *s); alpha = 256 - (c >> 24); *d = c + MUL_256(alpha, *d); m++; s++; d++; l--; }, { /* A4OP */ __m128i s0 = _mm_lddqu_si128((__m128i *)s); __m128i d0 = _mm_load_si128((__m128i *)d); __m128i m0 = _mm_set_epi32(m[3], m[2], m[1], m[0]); __m128i c0 = mul_sym_sse3(m0, s0); __m128i a0 = sub4_alpha_sse3(c0); __m128i r0 = mul_256_sse3(a0, d0); r0 = _mm_add_epi32(r0, c0); _mm_store_si128((__m128i *)d, r0); m += 4; s += 4; d += 4; l -= 4; }, { /* A8OP */ __m128i s0 = _mm_lddqu_si128((__m128i *)s); __m128i d0 = _mm_load_si128((__m128i *)d); __m128i m0 = _mm_set_epi32(m[3], m[2], m[1], m[0]); __m128i s1 = _mm_lddqu_si128((__m128i *)(s+4)); __m128i d1 = _mm_load_si128((__m128i *)(d+4)); __m128i m1 = _mm_set_epi32(m[7], m[6], m[5], m[4]); __m128i c0 = mul_sym_sse3(m0, s0); __m128i c1 = mul_sym_sse3(m1, s1); __m128i a0 = sub4_alpha_sse3(c0); __m128i a1 = sub4_alpha_sse3(c1); __m128i r0 = mul_256_sse3(a0, d0); __m128i r1 = mul_256_sse3(a1, d1); r0 = _mm_add_epi32(r0, c0); r1 = _mm_add_epi32(r1, c1); _mm_store_si128((__m128i *)d, r0); _mm_store_si128((__m128i *)(d+4), r1); m += 8; s += 8; d += 8; l -= 8; }) } static void _op_blend_pas_mas_dp_sse3(DATA32 *s, DATA8 *m, DATA32 c __UNUSED__, DATA32 *d, int l) { const __m128i ones = _mm_set_epi32(1, 1, 1, 1); int alpha; LOOP_ALIGNED_U1_A48_SSE3(d, l, { /* UOP */ alpha = *m; switch(alpha) { case 0: break; case 255: *d = *s; break; default: alpha++; *d = INTERP_256(alpha, *s, *d); break; } m++; s++; d++; l--; }, { /*A4OP */ if ((m[3] | m[2] | m[1] | m[0]) == 0) { m += 4; s += 4; d += 4; l -= 4; continue; } __m128i s0 = _mm_lddqu_si128((__m128i *)s); __m128i d0 = _mm_load_si128((__m128i *)d); __m128i m0 = _mm_set_epi32(m[3], m[2], m[1], m[0]); __m128i zm0 = _mm_cmpeq_epi32(m0, _mm_setzero_si128()); m0 = _mm_add_epi32(m0, ones); __m128i r0 = interp4_256_sse3(m0, s0, d0); r0 = _mm_and_si128(~zm0, r0); d0 = _mm_and_si128(zm0, d0); d0 = _mm_add_epi32(r0, d0); _mm_store_si128((__m128i *)d, d0); m += 4; s += 4; d += 4; l -= 4; }, { /* A8OP */ if ((m[7] | m[6] | m[5] | m[4] | m[3] | m[2] | m[1] | m[0]) == 0) { m += 8; s += 8; d += 8; l -= 8; continue; } __m128i s0 = _mm_lddqu_si128((__m128i *)s); __m128i d0 = _mm_load_si128((__m128i *)d); __m128i m0 = _mm_set_epi32(m[3], m[2], m[1], m[0]); __m128i s1 = _mm_lddqu_si128((__m128i *)(s+4)); __m128i d1 = _mm_load_si128((__m128i *)(d+4)); __m128i m1 = _mm_set_epi32(m[7], m[6], m[5], m[4]); __m128i zm0 = _mm_cmpeq_epi32(m0, _mm_setzero_si128()); __m128i zm1 = _mm_cmpeq_epi32(m1, _mm_setzero_si128()); m0 = _mm_add_epi32(m0, ones); m1 = _mm_add_epi32(m1, ones); __m128i r0 = interp4_256_sse3(m0, s0, d0); __m128i r1 = interp4_256_sse3(m1, s1, d1); r0 = _mm_and_si128(~zm0, r0); d0 = _mm_and_si128(zm0, d0); r1 = _mm_and_si128(~zm1, r1); d1 = _mm_and_si128(zm1, d1); d0 = _mm_add_epi32(d0, r0); d1 = _mm_add_epi32(d1, r1); _mm_store_si128((__m128i *)d, d0); _mm_store_si128((__m128i *)(d+4), d1); m += 8; s += 8; d += 8; l -= 8; }) } #define _op_blend_pan_mas_dp_sse3 _op_blend_pas_mas_dp_sse3 #define _op_blend_p_mas_dpan_sse3 _op_blend_p_mas_dp_sse3 #define _op_blend_pas_mas_dpan_sse3 _op_blend_pas_mas_dp_sse3 #define _op_blend_pan_mas_dpan_sse3 _op_blend_pan_mas_dp_sse3 static void init_blend_pixel_mask_span_funcs_sse3(void) { op_blend_span_funcs[SP][SM_AS][SC_N][DP][CPU_SSE3] = _op_blend_p_mas_dp_sse3; op_blend_span_funcs[SP_AS][SM_AS][SC_N][DP][CPU_SSE3] = _op_blend_pas_mas_dp_sse3; op_blend_span_funcs[SP_AN][SM_AS][SC_N][DP][CPU_SSE3] = _op_blend_pan_mas_dp_sse3; op_blend_span_funcs[SP][SM_AS][SC_N][DP_AN][CPU_SSE3] = _op_blend_p_mas_dpan_sse3; op_blend_span_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_SSE3] = _op_blend_pas_mas_dpan_sse3; op_blend_span_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_SSE3] = _op_blend_pan_mas_dpan_sse3; } #define _op_blend_pt_p_mas_dp_sse3 NULL #define _op_blend_pt_pan_mas_dp_sse3 NULL #define _op_blend_pt_pas_mas_dp_sse3 _op_blend_pt_p_mas_dp_sse3 #define _op_blend_pt_p_mas_dpan_sse3 _op_blend_pt_p_mas_dp_sse3 #define _op_blend_pt_pas_mas_dpan_sse3 _op_blend_pt_pas_mas_dp_sse3 #define _op_blend_pt_pan_mas_dpan_sse3 _op_blend_pt_pan_mas_dp_sse3 static void init_blend_pixel_mask_pt_funcs_sse3(void) { op_blend_pt_funcs[SP][SM_AS][SC_N][DP][CPU_SSE3] = _op_blend_pt_p_mas_dp_sse3; op_blend_pt_funcs[SP_AS][SM_AS][SC_N][DP][CPU_SSE3] = _op_blend_pt_pas_mas_dp_sse3; op_blend_pt_funcs[SP_AN][SM_AS][SC_N][DP][CPU_SSE3] = _op_blend_pt_pan_mas_dp_sse3; op_blend_pt_funcs[SP][SM_AS][SC_N][DP_AN][CPU_SSE3] = _op_blend_pt_p_mas_dpan_sse3; op_blend_pt_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_SSE3] = _op_blend_pt_pas_mas_dpan_sse3; op_blend_pt_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_SSE3] = _op_blend_pt_pan_mas_dpan_sse3; } /*-----*/ /* blend_rel pixel x mask -> dst */ static void _op_blend_rel_p_mas_dp_sse3(DATA32 *s, DATA8 *m, DATA32 c, DATA32 *d, int l) { int alpha; LOOP_ALIGNED_U1_A48_SSE3(d, l, { /* UOP */ c = MUL_SYM(*m, *s); alpha = 256 - (c >> 24); *d = MUL_SYM(*d >> 24, c) + MUL_256(alpha, *d); d++; m++; s++; l--; }, { /* A4OP */ __m128i s0 = _mm_lddqu_si128((__m128i *)s); __m128i m0 = _mm_set_epi32(m[3], m[2], m[1], m[0]); __m128i d0 = _mm_load_si128((__m128i *)d); __m128i c0 = mul_sym_sse3(m0, s0); __m128i a0 = sub4_alpha_sse3(c0); __m128i l0 = mul_sym_sse3(_mm_srli_epi32(d0, 24), c0); __m128i r0 = mul_256_sse3(a0, d0); d0 = _mm_add_epi32(l0, r0); _mm_store_si128((__m128i *)d, d0); d += 4; m += 4; s += 4; l -= 4; }, { /* A8OP */ __m128i s0 = _mm_lddqu_si128((__m128i *)s); __m128i m0 = _mm_set_epi32(m[3], m[2], m[1], m[0]); __m128i d0 = _mm_load_si128((__m128i *)d); __m128i s1 = _mm_lddqu_si128((__m128i *)(s+4)); __m128i m1 = _mm_set_epi32(m[7], m[6], m[5], m[4]); __m128i d1 = _mm_load_si128((__m128i *)(d+4)); __m128i c0 = mul_sym_sse3(m0, s0); __m128i c1 = mul_sym_sse3(m1, s1); __m128i a0 = sub4_alpha_sse3(c0); __m128i a1 = sub4_alpha_sse3(c1); __m128i l0 = mul_sym_sse3(_mm_srli_epi32(d0, 24), c0); __m128i r0 = mul_256_sse3(a0, d0); __m128i l1 = mul_sym_sse3(_mm_srli_epi32(d1, 24), c1); __m128i r1 = mul_256_sse3(a1, d1); d0 = _mm_add_epi32(l0, r0); d1 = _mm_add_epi32(l1, r1); _mm_store_si128((__m128i *)d, d0); _mm_store_si128((__m128i *)(d+4), d1); d += 8; m += 8; s += 8; l -= 8; }) } #define _op_blend_rel_pas_mas_dp_sse3 _op_blend_rel_p_mas_dp_sse3 #define _op_blend_rel_pan_mas_dp_sse3 _op_blend_rel_p_mas_dp_sse3 #define _op_blend_rel_p_mas_dpan_sse3 _op_blend_p_mas_dpan_sse3 #define _op_blend_rel_pas_mas_dpan_sse3 _op_blend_pas_mas_dpan_sse3 #define _op_blend_rel_pan_mas_dpan_sse3 _op_blend_pan_mas_dpan_sse3 static void init_blend_rel_pixel_mask_span_funcs_sse3(void) { op_blend_rel_span_funcs[SP][SM_AS][SC_N][DP][CPU_SSE3] = _op_blend_rel_p_mas_dp_sse3; op_blend_rel_span_funcs[SP_AS][SM_AS][SC_N][DP][CPU_SSE3] = _op_blend_rel_pas_mas_dp_sse3; op_blend_rel_span_funcs[SP_AN][SM_AS][SC_N][DP][CPU_SSE3] = _op_blend_rel_pan_mas_dp_sse3; op_blend_rel_span_funcs[SP][SM_AS][SC_N][DP_AN][CPU_SSE3] = _op_blend_rel_p_mas_dpan_sse3; op_blend_rel_span_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_SSE3] = _op_blend_rel_pas_mas_dpan_sse3; op_blend_rel_span_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_SSE3] = _op_blend_rel_pan_mas_dpan_sse3; } #define _op_blend_rel_pt_p_mas_dp_sse3 NULL #define _op_blend_rel_pt_pas_mas_dp_sse3 _op_blend_rel_pt_p_mas_dp_sse3 #define _op_blend_rel_pt_pan_mas_dp_sse3 _op_blend_rel_pt_p_mas_dp_sse3 #define _op_blend_rel_pt_p_mas_dpan_sse3 _op_blend_pt_p_mas_dpan_sse3 #define _op_blend_rel_pt_pas_mas_dpan_sse3 _op_blend_pt_pas_mas_dpan_sse3 #define _op_blend_rel_pt_pan_mas_dpan_sse3 _op_blend_pt_pan_mas_dpan_sse3 static void init_blend_rel_pixel_mask_pt_funcs_sse3(void) { op_blend_rel_pt_funcs[SP][SM_AS][SC_N][DP][CPU_SSE3] = _op_blend_rel_pt_p_mas_dp_sse3; op_blend_rel_pt_funcs[SP_AS][SM_AS][SC_N][DP][CPU_SSE3] = _op_blend_rel_pt_pas_mas_dp_sse3; op_blend_rel_pt_funcs[SP_AN][SM_AS][SC_N][DP][CPU_SSE3] = _op_blend_rel_pt_pan_mas_dp_sse3; op_blend_rel_pt_funcs[SP][SM_AS][SC_N][DP_AN][CPU_SSE3] = _op_blend_rel_pt_p_mas_dpan_sse3; op_blend_rel_pt_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_SSE3] = _op_blend_rel_pt_pas_mas_dpan_sse3; op_blend_rel_pt_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_SSE3] = _op_blend_rel_pt_pan_mas_dpan_sse3; } #endif evas-1.7.9/src/lib/engines/common/evas_op_blend/op_blend_pixel_mask_i386.c0000664000175000017500000001043012175475547023420 00000000000000/* blend pixel x mask --> dst */ #ifdef BUILD_MMX static void _op_blend_pas_mas_dp_mmx(DATA32 *s, DATA8 *m, DATA32 c __UNUSED__, DATA32 *d, int l) { DATA32 *e = d + l; pxor_r2r(mm0, mm0); MOV_A2R(ALPHA_256, mm6) while (d < e) { l = (*s >> 24); switch(*m & l) { case 0: break; case 255: *d = *s; break; default: l = 1 + *m; MOV_A2R(l, mm3) MOV_P2R(*s, mm2, mm0) MUL4_256_R2R(mm3, mm2) MOV_RA2R(mm2, mm1) movq_r2r(mm6, mm3); psubw_r2r(mm1, mm3); MOV_P2R(*d, mm1, mm0) MUL4_256_R2R(mm3, mm1) paddw_r2r(mm2, mm1); MOV_R2P(mm1, *d, mm0) break; } m++; s++; d++; } } static void _op_blend_pan_mas_dp_mmx(DATA32 *s, DATA8 *m, DATA32 c __UNUSED__, DATA32 *d, int l) { DATA32 *e = d + l; MOV_A2R(ALPHA_255, mm5) pxor_r2r(mm0, mm0); while (d < e) { l = *m; switch(l) { case 0: break; case 255: *d = *s; break; default: l++; MOV_A2R(l, mm3) MOV_P2R(*s, mm2, mm0) MOV_P2R(*d, mm1, mm0) INTERP_256_R2R(mm3, mm2, mm1, mm5) MOV_R2P(mm1, *d, mm0) break; } m++; s++; d++; } } #define _op_blend_p_mas_dp_mmx _op_blend_pas_mas_dp_mmx #define _op_blend_p_mas_dpan_mmx _op_blend_p_mas_dp_mmx #define _op_blend_pan_mas_dpan_mmx _op_blend_pan_mas_dp_mmx #define _op_blend_pas_mas_dpan_mmx _op_blend_pas_mas_dp_mmx static void init_blend_pixel_mask_span_funcs_mmx(void) { op_blend_span_funcs[SP][SM_AS][SC_N][DP][CPU_MMX] = _op_blend_p_mas_dp_mmx; op_blend_span_funcs[SP_AS][SM_AS][SC_N][DP][CPU_MMX] = _op_blend_pas_mas_dp_mmx; op_blend_span_funcs[SP_AN][SM_AS][SC_N][DP][CPU_MMX] = _op_blend_pan_mas_dp_mmx; op_blend_span_funcs[SP][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_blend_p_mas_dpan_mmx; op_blend_span_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_blend_pas_mas_dpan_mmx; op_blend_span_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_blend_pan_mas_dpan_mmx; } #endif #ifdef BUILD_MMX static void _op_blend_pt_p_mas_dp_mmx(DATA32 s, DATA8 m, DATA32 c, DATA32 *d) { c = m + 1; MOV_A2R(c, mm3) pxor_r2r(mm0, mm0); MOV_A2R(ALPHA_256, mm6) MOV_P2R(s, mm2, mm0) MUL4_256_R2R(mm3, mm2) MOV_RA2R(mm2, mm1) psubw_r2r(mm1, mm6); MOV_P2R(*d, mm1, mm0) MUL4_256_R2R(mm6, mm1) paddw_r2r(mm2, mm1); MOV_R2P(mm1, *d, mm0) } #define _op_blend_pt_pan_mas_dp_mmx _op_blend_pt_p_mas_dp_mmx #define _op_blend_pt_pas_mas_dp_mmx _op_blend_pt_p_mas_dp_mmx #define _op_blend_pt_p_mas_dpan_mmx _op_blend_pt_p_mas_dp_mmx #define _op_blend_pt_pas_mas_dpan_mmx _op_blend_pt_pas_mas_dp_mmx #define _op_blend_pt_pan_mas_dpan_mmx _op_blend_pt_pan_mas_dp_mmx static void init_blend_pixel_mask_pt_funcs_mmx(void) { op_blend_pt_funcs[SP][SM_AS][SC_N][DP][CPU_MMX] = _op_blend_pt_p_mas_dp_mmx; op_blend_pt_funcs[SP_AS][SM_AS][SC_N][DP][CPU_MMX] = _op_blend_pt_pas_mas_dp_mmx; op_blend_pt_funcs[SP_AN][SM_AS][SC_N][DP][CPU_MMX] = _op_blend_pt_pan_mas_dp_mmx; op_blend_pt_funcs[SP][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_blend_pt_p_mas_dpan_mmx; op_blend_pt_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_blend_pt_pas_mas_dpan_mmx; op_blend_pt_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_blend_pt_pan_mas_dpan_mmx; } #endif /*-----*/ /* blend_rel pixel x mask -> dst */ #ifdef BUILD_MMX #define _op_blend_rel_p_mas_dpan_mmx _op_blend_p_mas_dpan_mmx #define _op_blend_rel_pas_mas_dpan_mmx _op_blend_pas_mas_dpan_mmx #define _op_blend_rel_pan_mas_dpan_mmx _op_blend_pan_mas_dpan_mmx static void init_blend_rel_pixel_mask_span_funcs_mmx(void) { op_blend_rel_span_funcs[SP][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_blend_rel_p_mas_dpan_mmx; op_blend_rel_span_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_blend_rel_pas_mas_dpan_mmx; op_blend_rel_span_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_blend_rel_pan_mas_dpan_mmx; } #endif #ifdef BUILD_MMX #define _op_blend_rel_pt_p_mas_dpan_mmx _op_blend_pt_p_mas_dpan_mmx #define _op_blend_rel_pt_pas_mas_dpan_mmx _op_blend_pt_pas_mas_dpan_mmx #define _op_blend_rel_pt_pan_mas_dpan_mmx _op_blend_pt_pan_mas_dpan_mmx static void init_blend_rel_pixel_mask_pt_funcs_mmx(void) { op_blend_rel_pt_funcs[SP][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_blend_rel_pt_p_mas_dpan_mmx; op_blend_rel_pt_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_blend_rel_pt_pas_mas_dpan_mmx; op_blend_rel_pt_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_blend_rel_pt_pan_mas_dpan_mmx; } #endif evas-1.7.9/src/lib/engines/common/evas_op_blend/op_blend_pixel_sse3.c0000664000175000017500000002307312175475547022600 00000000000000/* blend pixel --> dst */ #ifdef BUILD_SSE3 static void _op_blend_p_dp_sse3(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c __UNUSED__, DATA32 *d, int l) { LOOP_ALIGNED_U1_A48_SSE3(d, l, { /* UOP */ int alpha = 256 - (*s >> 24); *d = *s + MUL_256(alpha, *d); s++; d++; l--; }, { /* A4OP */ __m128i s0 = _mm_lddqu_si128((__m128i *)s); __m128i d0 = _mm_load_si128((__m128i *)d); __m128i a0 = sub4_alpha_sse3(s0); __m128i mul0 = mul_256_sse3(a0, d0); d0 = _mm_add_epi32(mul0, s0); _mm_store_si128((__m128i *)d, d0); s += 4; d += 4; l -= 4; }, { /* A8OP */ __m128i s0 = _mm_lddqu_si128((__m128i *)s); __m128i d0 = _mm_load_si128((__m128i *)d); __m128i s1 = _mm_lddqu_si128((__m128i *)(s+4)); __m128i d1 = _mm_load_si128((__m128i *)(d+4)); __m128i a0 = sub4_alpha_sse3(s0); __m128i a1 = sub4_alpha_sse3(s1); __m128i mul0 = mul_256_sse3(a0, d0); __m128i mul1 = mul_256_sse3(a1, d1); d0 = _mm_add_epi32(mul0, s0); d1 = _mm_add_epi32(mul1, s1); _mm_store_si128((__m128i *)d, d0); _mm_store_si128((__m128i *)(d+4), d1); s += 8; d += 8; l -= 8; }) } static void _op_blend_pas_dp_sse3(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c __UNUSED__, DATA32 *d, int l) { int alpha; const __m128i zero = _mm_setzero_si128(); LOOP_ALIGNED_U1_A48_SSE3(d, l, { /* UOP */ switch (*s & 0xff000000) { case 0: break; case 0xff000000: *d = *s; break; default: alpha = 256 - (*s >> 24); *d = *s + MUL_256(alpha, *d); break; } s++; d++; l--; }, { /* A4OP */ __m128i s0 = _mm_lddqu_si128((__m128i *)s); __m128i d0 = _mm_load_si128((__m128i *)d); __m128i a0 = sub4_alpha_sse3(s0); __m128i mul0 = mul_256_sse3(a0, d0); mul0 = _mm_add_epi32(s0, mul0); __m128i zmask0 = _mm_cmpeq_epi32(_mm_srli_epi32(s0, 24), zero); __m128i imask0 = ~zmask0; mul0 = _mm_and_si128(imask0, mul0); d0 = _mm_and_si128(zmask0, d0); d0 = _mm_add_epi32(mul0, d0); _mm_store_si128((__m128i *)d, d0); s += 4; d += 4; l -= 4; }, { /* A8OP */ __m128i s0 = _mm_lddqu_si128((__m128i *)s); __m128i d0 = _mm_load_si128((__m128i *)d); __m128i s1 = _mm_lddqu_si128((__m128i *)(s+4)); __m128i d1 = _mm_load_si128((__m128i *)(d+4)); __m128i a0 = sub4_alpha_sse3(s0); __m128i a1 = sub4_alpha_sse3(s1); __m128i mul0 = mul_256_sse3(a0, d0); __m128i mul1 = mul_256_sse3(a1, d1); mul0 = _mm_add_epi32(s0, mul0); mul1 = _mm_add_epi32(s1, mul1); __m128i zmask0 = _mm_cmpeq_epi32(_mm_srli_epi32(s0, 24), zero); __m128i zmask1 = _mm_cmpeq_epi32(_mm_srli_epi32(s1, 24), zero); __m128i imask0 = ~zmask0; __m128i imask1 = ~zmask1; mul0 = _mm_and_si128(imask0, mul0); d0 = _mm_and_si128(zmask0, d0); mul1 = _mm_and_si128(imask1, mul1); d1 = _mm_and_si128(zmask1, d1); d0 = _mm_add_epi32(mul0, d0); d1 = _mm_add_epi32(mul1, d1); _mm_store_si128((__m128i *)d, d0); _mm_store_si128((__m128i *)(d+4), d1); s += 8; d += 8; l -= 8; }) } #define _op_blend_pan_dp_sse3 NULL #define _op_blend_p_dpan_sse3 _op_blend_p_dp_sse3 #define _op_blend_pas_dpan_sse3 _op_blend_pas_dp_sse3 #define _op_blend_pan_dpan_sse3 _op_blend_pan_dp_sse3 static void init_blend_pixel_span_funcs_sse3(void) { op_blend_span_funcs[SP][SM_N][SC_N][DP][CPU_SSE3] = _op_blend_p_dp_sse3; op_blend_span_funcs[SP_AS][SM_N][SC_N][DP][CPU_SSE3] = _op_blend_pas_dp_sse3; op_blend_span_funcs[SP_AN][SM_N][SC_N][DP][CPU_SSE3] = _op_blend_pan_dp_sse3; // FIXME: BUGGY BUGGY Core i5 750 (32bit), 4.5.2 (Ubuntu/Linaro 4.5.2-8ubuntu4), ello (text and rectangle) // op_blend_span_funcs[SP][SM_N][SC_N][DP_AN][CPU_SSE3] = _op_blend_p_dpan_sse3; op_blend_span_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_SSE3] = _op_blend_pas_dpan_sse3; op_blend_span_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_SSE3] = _op_blend_pan_dpan_sse3; } #define _op_blend_pt_p_dp_sse3 NULL #define _op_blend_pt_pas_dp_sse3 _op_blend_pt_p_dp_sse3 #define _op_blend_pt_pan_dp_sse3 NULL #define _op_blend_pt_p_dpan_sse3 _op_blend_pt_p_dp_sse3 #define _op_blend_pt_pan_dpan_sse3 _op_blend_pt_pan_dp_sse3 #define _op_blend_pt_pas_dpan_sse3 _op_blend_pt_pas_dp_sse3 static void init_blend_pixel_pt_funcs_sse3(void) { op_blend_pt_funcs[SP][SM_N][SC_N][DP][CPU_SSE3] = _op_blend_pt_p_dp_sse3; op_blend_pt_funcs[SP_AS][SM_N][SC_N][DP][CPU_SSE3] = _op_blend_pt_pas_dp_sse3; op_blend_pt_funcs[SP_AN][SM_N][SC_N][DP][CPU_SSE3] = _op_blend_pt_pan_dp_sse3; op_blend_pt_funcs[SP][SM_N][SC_N][DP_AN][CPU_SSE3] = _op_blend_pt_p_dpan_sse3; op_blend_pt_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_SSE3] = _op_blend_pt_pas_dpan_sse3; op_blend_pt_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_SSE3] = _op_blend_pt_pan_dpan_sse3; } /*-----*/ /* blend_rel pixel -> dst */ static void _op_blend_rel_p_dp_sse3(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { const __m128i ones = _mm_set_epi32(1, 1, 1, 1); LOOP_ALIGNED_U1_A48_SSE3(d, l, { /* UOP */ int alpha = 256 - (*s >> 24); c = 1 + (*d >> 24); *d = MUL_256(c, *s) + MUL_256(alpha, *d); d++; s++; l--; }, { /*A4OP */ __m128i s0 = _mm_lddqu_si128((__m128i *)s); __m128i d0 = _mm_load_si128((__m128i *)d); __m128i c0 = _mm_add_epi32(_mm_srli_epi32(d0, 24), ones); __m128i a0 = sub4_alpha_sse3(s0); d0 = _mm_add_epi32(mul_256_sse3(c0, s0), mul_256_sse3(a0, d0)); _mm_store_si128((__m128i *)d, d0); d += 4; s += 4; l -= 4; }, { /* A8OP */ __m128i s0 = _mm_lddqu_si128((__m128i *)s); __m128i d0 = _mm_load_si128 ((__m128i *)d); __m128i s1 = _mm_lddqu_si128((__m128i *)(s+4)); __m128i d1 = _mm_load_si128 ((__m128i *)(d+4)); __m128i c0 = _mm_add_epi32(_mm_srli_epi32(d0, 24), ones); __m128i c1 = _mm_add_epi32(_mm_srli_epi32(d1, 24), ones); __m128i a0 = sub4_alpha_sse3(s0); __m128i a1 = sub4_alpha_sse3(s1); d0 = _mm_add_epi32(mul_256_sse3(c0, s0), mul_256_sse3(a0, d0)); d1 = _mm_add_epi32(mul_256_sse3(c1, s1), mul_256_sse3(a1, d1)); _mm_store_si128((__m128i *)d, d0); _mm_store_si128((__m128i *)(d+4), d1); d += 8; s += 8; l -= 8; }) } static void _op_blend_rel_pan_dp_sse3(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { const __m128i ones = _mm_set_epi32(1, 1, 1, 1); LOOP_ALIGNED_U1_A48_SSE3(d, l, { /* UOP */ c = 1 + (*d >> 24); *d++ = MUL_256(c, *s); s++; l--; }, { /* A4OP */ __m128i s0 = _mm_lddqu_si128((__m128i *)s); __m128i d0 = _mm_load_si128((__m128i *)d); __m128i c0 = _mm_add_epi32(_mm_srli_epi32(d0, 24), ones); d0 = mul_256_sse3(c0, s0); _mm_store_si128((__m128i *)d, d0); d += 4; s += 4; l -= 4; }, { /* A8OP */ __m128i s0 = _mm_lddqu_si128((__m128i *)s); __m128i d0 = _mm_load_si128 ((__m128i *)d); __m128i s1 = _mm_lddqu_si128((__m128i *)(s+4)); __m128i d1 = _mm_load_si128 ((__m128i *)(d+4)); __m128i c0 = _mm_add_epi32(_mm_srli_epi32(d0, 24), ones); __m128i c1 = _mm_add_epi32(_mm_srli_epi32(d1, 24), ones); d0 = mul_256_sse3(c0, s0); d1 = mul_256_sse3(c1, s1); _mm_store_si128((__m128i *)d, d0); _mm_store_si128((__m128i *)(d+4), d1); d += 8; s += 8; l -= 8; }) } #define _op_blend_rel_pas_dp_sse3 _op_blend_rel_p_dp_sse3 #define _op_blend_rel_p_dpan_sse3 _op_blend_p_dpan_sse3 #define _op_blend_rel_pan_dpan_sse3 _op_blend_pan_dpan_sse3 #define _op_blend_rel_pas_dpan_sse3 _op_blend_pas_dpan_sse3 static void init_blend_rel_pixel_span_funcs_sse3(void) { op_blend_rel_span_funcs[SP][SM_N][SC_N][DP][CPU_SSE3] = _op_blend_rel_p_dp_sse3; op_blend_rel_span_funcs[SP_AS][SM_N][SC_N][DP][CPU_SSE3] = _op_blend_rel_pas_dp_sse3; op_blend_rel_span_funcs[SP_AN][SM_N][SC_N][DP][CPU_SSE3] = _op_blend_rel_pan_dp_sse3; op_blend_rel_span_funcs[SP][SM_N][SC_N][DP_AN][CPU_SSE3] = _op_blend_rel_p_dpan_sse3; op_blend_rel_span_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_SSE3] = _op_blend_rel_pas_dpan_sse3; op_blend_rel_span_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_SSE3] = _op_blend_rel_pan_dpan_sse3; } #define _op_blend_rel_pt_p_dp_sse3 NULL #define _op_blend_rel_pt_pan_dp_sse3 NULL #define _op_blend_rel_pt_pas_dp_sse3 _op_blend_rel_pt_p_dp_sse3 #define _op_blend_rel_pt_p_dpan_sse3 _op_blend_pt_p_dpan_sse3 #define _op_blend_rel_pt_pan_dpan_sse3 _op_blend_pt_pan_dpan_sse3 #define _op_blend_rel_pt_pas_dpan_sse3 _op_blend_pt_pas_dpan_sse3 static void init_blend_rel_pixel_pt_funcs_sse3(void) { op_blend_rel_pt_funcs[SP][SM_N][SC_N][DP][CPU_SSE3] = _op_blend_rel_pt_p_dp_sse3; op_blend_rel_pt_funcs[SP_AS][SM_N][SC_N][DP][CPU_SSE3] = _op_blend_rel_pt_pas_dp_sse3; op_blend_rel_pt_funcs[SP_AN][SM_N][SC_N][DP][CPU_SSE3] = _op_blend_rel_pt_pan_dp_sse3; op_blend_rel_pt_funcs[SP][SM_N][SC_N][DP_AN][CPU_SSE3] = _op_blend_rel_pt_p_dpan_sse3; op_blend_rel_pt_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_SSE3] = _op_blend_rel_pt_pas_dpan_sse3; op_blend_rel_pt_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_SSE3] = _op_blend_rel_pt_pan_dpan_sse3; } #endif evas-1.7.9/src/lib/engines/common/evas_op_blend/op_blend_pixel_color_i386.c0000664000175000017500000002274512175475547023617 00000000000000/* blend pixel x color --> dst */ #ifdef BUILD_MMX static void _op_blend_p_c_dp_mmx(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { DATA32 *e = d + l; MOV_A2R(ALPHA_256, mm6) MOV_A2R(ALPHA_255, mm5) pxor_r2r(mm0, mm0); MOV_P2R(c, mm2, mm0) while (d < e) { MOV_P2R(*s, mm3, mm0) MUL4_SYM_R2R(mm2, mm3, mm5) MOV_RA2R(mm3, mm1) movq_r2r(mm6, mm4); psubw_r2r(mm1, mm4); MOV_P2R(*d, mm1, mm0) MUL4_256_R2R(mm4, mm1) paddw_r2r(mm3, mm1); MOV_R2P(mm1, *d, mm0) s++; d++; } } static void _op_blend_pan_can_dp_mmx(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { DATA32 *e = d + l; pxor_r2r(mm0, mm0); MOV_P2R(c, mm2, mm0) MOV_A2R(ALPHA_255, mm5) while (d < e) { MOV_P2R(*s, mm1, mm0) MUL4_SYM_R2R(mm2, mm1, mm5) MOV_R2P(mm1, *d, mm0) s++; d++; } } static void _op_blend_pan_caa_dp_mmx(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { DATA32 *e = d + l; c = 1 + (c & 0xff); MOV_A2R(c, mm2) MOV_A2R(ALPHA_255, mm5) pxor_r2r(mm0, mm0); while (d < e) { MOV_P2R(*s, mm3, mm0) MOV_P2R(*d, mm1, mm0) INTERP_256_R2R(mm2, mm3, mm1, mm5) MOV_R2P(mm1, *d, mm0) s++; d++; } } #define _op_blend_pas_c_dp_mmx _op_blend_p_c_dp_mmx #define _op_blend_pan_c_dp_mmx _op_blend_p_c_dp_mmx #define _op_blend_p_can_dp_mmx _op_blend_p_c_dp_mmx #define _op_blend_pas_can_dp_mmx _op_blend_p_c_dp_mmx #define _op_blend_p_caa_dp_mmx _op_blend_p_c_dp_mmx #define _op_blend_pas_caa_dp_mmx _op_blend_p_c_dp_mmx #define _op_blend_p_c_dpan_mmx _op_blend_p_c_dp_mmx #define _op_blend_pas_c_dpan_mmx _op_blend_pas_c_dp_mmx #define _op_blend_pan_c_dpan_mmx _op_blend_pan_c_dp_mmx #define _op_blend_p_can_dpan_mmx _op_blend_p_can_dp_mmx #define _op_blend_pas_can_dpan_mmx _op_blend_pas_can_dp_mmx #define _op_blend_pan_can_dpan_mmx _op_blend_pan_can_dp_mmx #define _op_blend_p_caa_dpan_mmx _op_blend_p_caa_dp_mmx #define _op_blend_pas_caa_dpan_mmx _op_blend_pas_caa_dp_mmx #define _op_blend_pan_caa_dpan_mmx _op_blend_pan_caa_dp_mmx static void init_blend_pixel_color_span_funcs_mmx(void) { op_blend_span_funcs[SP][SM_N][SC][DP][CPU_MMX] = _op_blend_p_c_dp_mmx; op_blend_span_funcs[SP_AS][SM_N][SC][DP][CPU_MMX] = _op_blend_pas_c_dp_mmx; op_blend_span_funcs[SP_AN][SM_N][SC][DP][CPU_MMX] = _op_blend_pan_c_dp_mmx; op_blend_span_funcs[SP][SM_N][SC_AN][DP][CPU_MMX] = _op_blend_p_can_dp_mmx; op_blend_span_funcs[SP_AS][SM_N][SC_AN][DP][CPU_MMX] = _op_blend_pas_can_dp_mmx; op_blend_span_funcs[SP_AN][SM_N][SC_AN][DP][CPU_MMX] = _op_blend_pan_can_dp_mmx; op_blend_span_funcs[SP][SM_N][SC_AA][DP][CPU_MMX] = _op_blend_p_caa_dp_mmx; op_blend_span_funcs[SP_AS][SM_N][SC_AA][DP][CPU_MMX] = _op_blend_pas_caa_dp_mmx; op_blend_span_funcs[SP_AN][SM_N][SC_AA][DP][CPU_MMX] = _op_blend_pan_caa_dp_mmx; op_blend_span_funcs[SP][SM_N][SC][DP_AN][CPU_MMX] = _op_blend_p_c_dpan_mmx; op_blend_span_funcs[SP_AS][SM_N][SC][DP_AN][CPU_MMX] = _op_blend_pas_c_dpan_mmx; op_blend_span_funcs[SP_AN][SM_N][SC][DP_AN][CPU_MMX] = _op_blend_pan_c_dpan_mmx; op_blend_span_funcs[SP][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_blend_p_can_dpan_mmx; op_blend_span_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_blend_pas_can_dpan_mmx; op_blend_span_funcs[SP_AN][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_blend_pan_can_dpan_mmx; op_blend_span_funcs[SP][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_blend_p_caa_dpan_mmx; op_blend_span_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_blend_pas_caa_dpan_mmx; op_blend_span_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_blend_pan_caa_dpan_mmx; } #endif #ifdef BUILD_MMX static void _op_blend_pt_p_c_dp_mmx(DATA32 s, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) { MOV_A2R(ALPHA_256, mm4) MOV_A2R(ALPHA_255, mm5) pxor_r2r(mm0, mm0); MOV_P2R(c, mm2, mm0) MOV_P2R(s, mm3, mm0) MUL4_SYM_R2R(mm2, mm3, mm5) MOV_RA2R(mm3, mm1) psubw_r2r(mm1, mm4); MOV_P2R(*d, mm1, mm0) MUL4_256_R2R(mm4, mm1) paddw_r2r(mm3, mm1); MOV_R2P(mm1, *d, mm0) } #define _op_blend_pt_pas_c_dp_mmx _op_blend_pt_p_c_dp_mmx #define _op_blend_pt_pan_c_dp_mmx _op_blend_pt_p_c_dp_mmx #define _op_blend_pt_p_can_dp_mmx _op_blend_pt_p_c_dp_mmx #define _op_blend_pt_pas_can_dp_mmx _op_blend_pt_p_c_dp_mmx #define _op_blend_pt_pan_can_dp_mmx _op_blend_pt_p_c_dp_mmx #define _op_blend_pt_p_caa_dp_mmx _op_blend_pt_p_c_dp_mmx #define _op_blend_pt_pas_caa_dp_mmx _op_blend_pt_p_c_dp_mmx #define _op_blend_pt_pan_caa_dp_mmx _op_blend_pt_p_c_dp_mmx #define _op_blend_pt_p_c_dpan_mmx _op_blend_pt_p_c_dp_mmx #define _op_blend_pt_pas_c_dpan_mmx _op_blend_pt_p_c_dp_mmx #define _op_blend_pt_pan_c_dpan_mmx _op_blend_pt_p_c_dp_mmx #define _op_blend_pt_p_can_dpan_mmx _op_blend_pt_p_c_dp_mmx #define _op_blend_pt_pas_can_dpan_mmx _op_blend_pt_p_c_dp_mmx #define _op_blend_pt_pan_can_dpan_mmx _op_blend_pt_p_c_dp_mmx #define _op_blend_pt_p_caa_dpan_mmx _op_blend_pt_p_c_dp_mmx #define _op_blend_pt_pas_caa_dpan_mmx _op_blend_pt_p_c_dp_mmx #define _op_blend_pt_pan_caa_dpan_mmx _op_blend_pt_p_c_dp_mmx static void init_blend_pixel_color_pt_funcs_mmx(void) { op_blend_pt_funcs[SP][SM_N][SC][DP][CPU_MMX] = _op_blend_pt_p_c_dp_mmx; op_blend_pt_funcs[SP_AS][SM_N][SC][DP][CPU_MMX] = _op_blend_pt_pas_c_dp_mmx; op_blend_pt_funcs[SP_AN][SM_N][SC][DP][CPU_MMX] = _op_blend_pt_pan_c_dp_mmx; op_blend_pt_funcs[SP][SM_N][SC_AN][DP][CPU_MMX] = _op_blend_pt_p_can_dp_mmx; op_blend_pt_funcs[SP_AS][SM_N][SC_AN][DP][CPU_MMX] = _op_blend_pt_pas_can_dp_mmx; op_blend_pt_funcs[SP_AN][SM_N][SC_AN][DP][CPU_MMX] = _op_blend_pt_pan_can_dp_mmx; op_blend_pt_funcs[SP][SM_N][SC_AA][DP][CPU_MMX] = _op_blend_pt_p_caa_dp_mmx; op_blend_pt_funcs[SP_AS][SM_N][SC_AA][DP][CPU_MMX] = _op_blend_pt_pas_caa_dp_mmx; op_blend_pt_funcs[SP_AN][SM_N][SC_AA][DP][CPU_MMX] = _op_blend_pt_pan_caa_dp_mmx; op_blend_pt_funcs[SP][SM_N][SC][DP_AN][CPU_MMX] = _op_blend_pt_p_c_dpan_mmx; op_blend_pt_funcs[SP_AS][SM_N][SC][DP_AN][CPU_MMX] = _op_blend_pt_pas_c_dpan_mmx; op_blend_pt_funcs[SP_AN][SM_N][SC][DP_AN][CPU_MMX] = _op_blend_pt_pan_c_dpan_mmx; op_blend_pt_funcs[SP][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_blend_pt_p_can_dpan_mmx; op_blend_pt_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_blend_pt_pas_can_dpan_mmx; op_blend_pt_funcs[SP_AN][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_blend_pt_pan_can_dpan_mmx; op_blend_pt_funcs[SP][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_blend_pt_p_caa_dpan_mmx; op_blend_pt_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_blend_pt_pas_caa_dpan_mmx; op_blend_pt_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_blend_pt_pan_caa_dpan_mmx; } #endif /*-----*/ /* blend_rel pixel x color -> dst */ #ifdef BUILD_MMX #define _op_blend_rel_p_c_dpan_mmx _op_blend_p_c_dpan_mmx #define _op_blend_rel_pas_c_dpan_mmx _op_blend_pas_c_dpan_mmx #define _op_blend_rel_pan_c_dpan_mmx _op_blend_pan_c_dpan_mmx #define _op_blend_rel_p_can_dpan_mmx _op_blend_p_can_dpan_mmx #define _op_blend_rel_pas_can_dpan_mmx _op_blend_pas_can_dpan_mmx #define _op_blend_rel_pan_can_dpan_mmx _op_blend_pan_can_dpan_mmx #define _op_blend_rel_p_caa_dpan_mmx _op_blend_p_caa_dpan_mmx #define _op_blend_rel_pas_caa_dpan_mmx _op_blend_pas_caa_dpan_mmx #define _op_blend_rel_pan_caa_dpan_mmx _op_blend_pan_caa_dpan_mmx static void init_blend_rel_pixel_color_span_funcs_mmx(void) { op_blend_rel_span_funcs[SP][SM_N][SC][DP_AN][CPU_MMX] = _op_blend_rel_p_c_dpan_mmx; op_blend_rel_span_funcs[SP_AS][SM_N][SC][DP_AN][CPU_MMX] = _op_blend_rel_pas_c_dpan_mmx; op_blend_rel_span_funcs[SP_AN][SM_N][SC][DP_AN][CPU_MMX] = _op_blend_rel_pan_c_dpan_mmx; op_blend_rel_span_funcs[SP][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_blend_rel_p_can_dpan_mmx; op_blend_rel_span_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_blend_rel_pas_can_dpan_mmx; op_blend_rel_span_funcs[SP_AN][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_blend_rel_pan_can_dpan_mmx; op_blend_rel_span_funcs[SP][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_blend_rel_p_caa_dpan_mmx; op_blend_rel_span_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_blend_rel_pas_caa_dpan_mmx; op_blend_rel_span_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_blend_rel_pan_caa_dpan_mmx; } #endif #ifdef BUILD_MMX #define _op_blend_rel_pt_p_c_dpan_mmx _op_blend_pt_p_c_dpan_mmx #define _op_blend_rel_pt_pas_c_dpan_mmx _op_blend_pt_pas_c_dpan_mmx #define _op_blend_rel_pt_pan_c_dpan_mmx _op_blend_pt_pan_c_dpan_mmx #define _op_blend_rel_pt_p_can_dpan_mmx _op_blend_pt_p_can_dpan_mmx #define _op_blend_rel_pt_pas_can_dpan_mmx _op_blend_pt_pas_can_dpan_mmx #define _op_blend_rel_pt_pan_can_dpan_mmx _op_blend_pt_pan_can_dpan_mmx #define _op_blend_rel_pt_p_caa_dpan_mmx _op_blend_pt_p_caa_dpan_mmx #define _op_blend_rel_pt_pas_caa_dpan_mmx _op_blend_pt_pas_caa_dpan_mmx #define _op_blend_rel_pt_pan_caa_dpan_mmx _op_blend_pt_pan_caa_dpan_mmx static void init_blend_rel_pixel_color_pt_funcs_mmx(void) { op_blend_rel_pt_funcs[SP][SM_N][SC][DP_AN][CPU_MMX] = _op_blend_rel_pt_p_c_dpan_mmx; op_blend_rel_pt_funcs[SP_AS][SM_N][SC][DP_AN][CPU_MMX] = _op_blend_rel_pt_pas_c_dpan_mmx; op_blend_rel_pt_funcs[SP_AN][SM_N][SC][DP_AN][CPU_MMX] = _op_blend_rel_pt_pan_c_dpan_mmx; op_blend_rel_pt_funcs[SP][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_blend_rel_pt_p_can_dpan_mmx; op_blend_rel_pt_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_blend_rel_pt_pas_can_dpan_mmx; op_blend_rel_pt_funcs[SP_AN][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_blend_rel_pt_pan_can_dpan_mmx; op_blend_rel_pt_funcs[SP][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_blend_rel_pt_p_caa_dpan_mmx; op_blend_rel_pt_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_blend_rel_pt_pas_caa_dpan_mmx; op_blend_rel_pt_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_blend_rel_pt_pan_caa_dpan_mmx; } #endif evas-1.7.9/src/lib/engines/common/evas_op_blend/op_blend_pixel_color_.c0000664000175000017500000003071412175475547023200 00000000000000/* blend pixel x color --> dst */ #ifdef BUILD_C static void _op_blend_p_c_dp(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { DATA32 *e; int alpha; UNROLL8_PLD_WHILE(d, l, e, { DATA32 sc = MUL4_SYM(c, *s); alpha = 256 - (sc >> 24); *d = sc + MUL_256(alpha, *d); d++; s++; }); } static void _op_blend_pan_c_dp(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { DATA32 *e; int alpha = 256 - (c >> 24); UNROLL8_PLD_WHILE(d, l, e, { *d = ((c & 0xff000000) + MUL3_SYM(c, *s)) + MUL_256(alpha, *d); d++; s++; }); } static void _op_blend_p_can_dp(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { DATA32 *e; int alpha; UNROLL8_PLD_WHILE(d, l, e, { alpha = 256 - (*s >> 24); *d = ((*s & 0xff000000) + MUL3_SYM(c, *s)) + MUL_256(alpha, *d); d++; s++; }); } static void _op_blend_pan_can_dp(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { DATA32 *e; UNROLL8_PLD_WHILE(d, l, e, { *d++ = 0xff000000 + MUL3_SYM(c, *s); s++; }); } static void _op_blend_p_caa_dp(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { DATA32 *e; int alpha; c = 1 + (c & 0xff); UNROLL8_PLD_WHILE(d, l, e, { DATA32 sc = MUL_256(c, *s); alpha = 256 - (sc >> 24); *d = sc + MUL_256(alpha, *d); d++; s++; }); } static void _op_blend_pan_caa_dp(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { DATA32 *e; c = 1 + (c & 0xff); UNROLL8_PLD_WHILE(d, l, e, { *d = INTERP_256(c, *s, *d); d++; s++; }); } #define _op_blend_pas_c_dp _op_blend_p_c_dp #define _op_blend_pas_can_dp _op_blend_p_can_dp #define _op_blend_pas_caa_dp _op_blend_p_caa_dp #define _op_blend_p_c_dpan _op_blend_p_c_dp #define _op_blend_pas_c_dpan _op_blend_pas_c_dp #define _op_blend_pan_c_dpan _op_blend_pan_c_dp #define _op_blend_p_can_dpan _op_blend_p_can_dp #define _op_blend_pas_can_dpan _op_blend_pas_can_dp #define _op_blend_pan_can_dpan _op_blend_pan_can_dp #define _op_blend_p_caa_dpan _op_blend_p_caa_dp #define _op_blend_pas_caa_dpan _op_blend_pas_caa_dp #define _op_blend_pan_caa_dpan _op_blend_pan_caa_dp static void init_blend_pixel_color_span_funcs_c(void) { op_blend_span_funcs[SP][SM_N][SC][DP][CPU_C] = _op_blend_p_c_dp; op_blend_span_funcs[SP_AS][SM_N][SC][DP][CPU_C] = _op_blend_pas_c_dp; op_blend_span_funcs[SP_AN][SM_N][SC][DP][CPU_C] = _op_blend_pan_c_dp; op_blend_span_funcs[SP][SM_N][SC_AN][DP][CPU_C] = _op_blend_p_can_dp; op_blend_span_funcs[SP_AS][SM_N][SC_AN][DP][CPU_C] = _op_blend_pas_can_dp; op_blend_span_funcs[SP_AN][SM_N][SC_AN][DP][CPU_C] = _op_blend_pan_can_dp; op_blend_span_funcs[SP][SM_N][SC_AA][DP][CPU_C] = _op_blend_p_caa_dp; op_blend_span_funcs[SP_AS][SM_N][SC_AA][DP][CPU_C] = _op_blend_pas_caa_dp; op_blend_span_funcs[SP_AN][SM_N][SC_AA][DP][CPU_C] = _op_blend_pan_caa_dp; op_blend_span_funcs[SP][SM_N][SC][DP_AN][CPU_C] = _op_blend_p_c_dpan; op_blend_span_funcs[SP_AS][SM_N][SC][DP_AN][CPU_C] = _op_blend_pas_c_dpan; op_blend_span_funcs[SP_AN][SM_N][SC][DP_AN][CPU_C] = _op_blend_pan_c_dpan; op_blend_span_funcs[SP][SM_N][SC_AN][DP_AN][CPU_C] = _op_blend_p_can_dpan; op_blend_span_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_C] = _op_blend_pas_can_dpan; op_blend_span_funcs[SP_AN][SM_N][SC_AN][DP_AN][CPU_C] = _op_blend_pan_can_dpan; op_blend_span_funcs[SP][SM_N][SC_AA][DP_AN][CPU_C] = _op_blend_p_caa_dpan; op_blend_span_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_C] = _op_blend_pas_caa_dpan; op_blend_span_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_C] = _op_blend_pan_caa_dpan; } #endif #ifdef BUILD_C static void _op_blend_pt_p_c_dp(DATA32 s, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) { s = MUL4_SYM(c, s); c = 256 - (s >> 24); *d = s + MUL_256(c, *d); } #define _op_blend_pt_pas_c_dp _op_blend_pt_p_c_dp #define _op_blend_pt_pan_c_dp _op_blend_pt_p_c_dp #define _op_blend_pt_p_can_dp _op_blend_pt_p_c_dp #define _op_blend_pt_pas_can_dp _op_blend_pt_p_c_dp #define _op_blend_pt_pan_can_dp _op_blend_pt_p_c_dp #define _op_blend_pt_p_caa_dp _op_blend_pt_p_c_dp #define _op_blend_pt_pas_caa_dp _op_blend_pt_p_c_dp #define _op_blend_pt_pan_caa_dp _op_blend_pt_p_c_dp #define _op_blend_pt_p_c_dpan _op_blend_pt_p_c_dp #define _op_blend_pt_pas_c_dpan _op_blend_pt_pas_c_dp #define _op_blend_pt_pan_c_dpan _op_blend_pt_pan_c_dp #define _op_blend_pt_p_can_dpan _op_blend_pt_p_can_dp #define _op_blend_pt_pas_can_dpan _op_blend_pt_pas_can_dp #define _op_blend_pt_pan_can_dpan _op_blend_pt_pan_can_dp #define _op_blend_pt_p_caa_dpan _op_blend_pt_p_caa_dp #define _op_blend_pt_pas_caa_dpan _op_blend_pt_pas_caa_dp #define _op_blend_pt_pan_caa_dpan _op_blend_pt_pan_caa_dp static void init_blend_pixel_color_pt_funcs_c(void) { op_blend_pt_funcs[SP][SM_N][SC][DP][CPU_C] = _op_blend_pt_p_c_dp; op_blend_pt_funcs[SP_AS][SM_N][SC][DP][CPU_C] = _op_blend_pt_pas_c_dp; op_blend_pt_funcs[SP_AN][SM_N][SC][DP][CPU_C] = _op_blend_pt_pan_c_dp; op_blend_pt_funcs[SP][SM_N][SC_AN][DP][CPU_C] = _op_blend_pt_p_can_dp; op_blend_pt_funcs[SP_AS][SM_N][SC_AN][DP][CPU_C] = _op_blend_pt_pas_can_dp; op_blend_pt_funcs[SP_AN][SM_N][SC_AN][DP][CPU_C] = _op_blend_pt_pan_can_dp; op_blend_pt_funcs[SP][SM_N][SC_AA][DP][CPU_C] = _op_blend_pt_p_caa_dp; op_blend_pt_funcs[SP_AS][SM_N][SC_AA][DP][CPU_C] = _op_blend_pt_pas_caa_dp; op_blend_pt_funcs[SP_AN][SM_N][SC_AA][DP][CPU_C] = _op_blend_pt_pan_caa_dp; op_blend_pt_funcs[SP][SM_N][SC][DP_AN][CPU_C] = _op_blend_pt_p_c_dpan; op_blend_pt_funcs[SP_AS][SM_N][SC][DP_AN][CPU_C] = _op_blend_pt_pas_c_dpan; op_blend_pt_funcs[SP_AN][SM_N][SC][DP_AN][CPU_C] = _op_blend_pt_pan_c_dpan; op_blend_pt_funcs[SP][SM_N][SC_AN][DP_AN][CPU_C] = _op_blend_pt_p_can_dpan; op_blend_pt_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_C] = _op_blend_pt_pas_can_dpan; op_blend_pt_funcs[SP_AN][SM_N][SC_AN][DP_AN][CPU_C] = _op_blend_pt_pan_can_dpan; op_blend_pt_funcs[SP][SM_N][SC_AA][DP_AN][CPU_C] = _op_blend_pt_p_caa_dpan; op_blend_pt_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_C] = _op_blend_pt_pas_caa_dpan; op_blend_pt_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_C] = _op_blend_pt_pan_caa_dpan; } #endif /*-----*/ /* blend_rel pixel x color -> dst */ #ifdef BUILD_C static void _op_blend_rel_p_c_dp(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { DATA32 *e; int alpha; UNROLL8_PLD_WHILE(d, l, e, { DATA32 sc = MUL4_SYM(c, *s); alpha = 256 - (sc >> 24); *d = MUL_SYM(*d >> 24, sc) + MUL_256(alpha, *d); d++; s++; }); } #define _op_blend_rel_pas_c_dp _op_blend_rel_p_c_dp #define _op_blend_rel_pan_c_dp _op_blend_rel_p_c_dp #define _op_blend_rel_p_can_dp _op_blend_rel_p_c_dp #define _op_blend_rel_pas_can_dp _op_blend_rel_p_c_dp #define _op_blend_rel_pan_can_dp _op_blend_rel_p_c_dp #define _op_blend_rel_p_caa_dp _op_blend_rel_p_c_dp #define _op_blend_rel_pas_caa_dp _op_blend_rel_p_c_dp #define _op_blend_rel_pan_caa_dp _op_blend_rel_p_c_dp #define _op_blend_rel_p_c_dpan _op_blend_p_c_dpan #define _op_blend_rel_pas_c_dpan _op_blend_pas_c_dpan #define _op_blend_rel_pan_c_dpan _op_blend_pan_c_dpan #define _op_blend_rel_p_can_dpan _op_blend_p_can_dpan #define _op_blend_rel_pas_can_dpan _op_blend_pas_can_dpan #define _op_blend_rel_pan_can_dpan _op_blend_pan_can_dpan #define _op_blend_rel_p_caa_dpan _op_blend_p_caa_dpan #define _op_blend_rel_pas_caa_dpan _op_blend_pas_caa_dpan #define _op_blend_rel_pan_caa_dpan _op_blend_pan_caa_dpan static void init_blend_rel_pixel_color_span_funcs_c(void) { op_blend_rel_span_funcs[SP][SM_N][SC][DP][CPU_C] = _op_blend_rel_p_c_dp; op_blend_rel_span_funcs[SP_AS][SM_N][SC][DP][CPU_C] = _op_blend_rel_pas_c_dp; op_blend_rel_span_funcs[SP_AN][SM_N][SC][DP][CPU_C] = _op_blend_rel_pan_c_dp; op_blend_rel_span_funcs[SP][SM_N][SC_AN][DP][CPU_C] = _op_blend_rel_p_can_dp; op_blend_rel_span_funcs[SP_AS][SM_N][SC_AN][DP][CPU_C] = _op_blend_rel_pas_can_dp; op_blend_rel_span_funcs[SP_AN][SM_N][SC_AN][DP][CPU_C] = _op_blend_rel_pan_can_dp; op_blend_rel_span_funcs[SP][SM_N][SC_AA][DP][CPU_C] = _op_blend_rel_p_caa_dp; op_blend_rel_span_funcs[SP_AS][SM_N][SC_AA][DP][CPU_C] = _op_blend_rel_pas_caa_dp; op_blend_rel_span_funcs[SP_AN][SM_N][SC_AA][DP][CPU_C] = _op_blend_rel_pan_caa_dp; op_blend_rel_span_funcs[SP][SM_N][SC][DP_AN][CPU_C] = _op_blend_rel_p_c_dpan; op_blend_rel_span_funcs[SP_AS][SM_N][SC][DP_AN][CPU_C] = _op_blend_rel_pas_c_dpan; op_blend_rel_span_funcs[SP_AN][SM_N][SC][DP_AN][CPU_C] = _op_blend_rel_pan_c_dpan; op_blend_rel_span_funcs[SP][SM_N][SC_AN][DP_AN][CPU_C] = _op_blend_rel_p_can_dpan; op_blend_rel_span_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_C] = _op_blend_rel_pas_can_dpan; op_blend_rel_span_funcs[SP_AN][SM_N][SC_AN][DP_AN][CPU_C] = _op_blend_rel_pan_can_dpan; op_blend_rel_span_funcs[SP][SM_N][SC_AA][DP_AN][CPU_C] = _op_blend_rel_p_caa_dpan; op_blend_rel_span_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_C] = _op_blend_rel_pas_caa_dpan; op_blend_rel_span_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_C] = _op_blend_rel_pan_caa_dpan; } #endif #ifdef BUILD_C static void _op_blend_rel_pt_p_c_dp(DATA32 s, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) { s = MUL4_SYM(c, s); c = 256 - (s >> 24); *d = MUL_SYM(*d >> 24, s) + MUL_256(c, *d); } #define _op_blend_rel_pt_pas_c_dp _op_blend_rel_pt_p_c_dp #define _op_blend_rel_pt_pan_c_dp _op_blend_rel_pt_p_c_dp #define _op_blend_rel_pt_p_can_dp _op_blend_rel_pt_p_c_dp #define _op_blend_rel_pt_pas_can_dp _op_blend_rel_pt_p_c_dp #define _op_blend_rel_pt_pan_can_dp _op_blend_rel_pt_p_c_dp #define _op_blend_rel_pt_p_caa_dp _op_blend_rel_pt_p_c_dp #define _op_blend_rel_pt_pas_caa_dp _op_blend_rel_pt_p_c_dp #define _op_blend_rel_pt_pan_caa_dp _op_blend_rel_pt_p_c_dp #define _op_blend_rel_pt_p_c_dpan _op_blend_pt_p_c_dpan #define _op_blend_rel_pt_pas_c_dpan _op_blend_pt_pas_c_dpan #define _op_blend_rel_pt_pan_c_dpan _op_blend_pt_pan_c_dpan #define _op_blend_rel_pt_p_can_dpan _op_blend_pt_p_can_dpan #define _op_blend_rel_pt_pas_can_dpan _op_blend_pt_pas_can_dpan #define _op_blend_rel_pt_pan_can_dpan _op_blend_pt_pan_can_dpan #define _op_blend_rel_pt_p_caa_dpan _op_blend_pt_p_caa_dpan #define _op_blend_rel_pt_pas_caa_dpan _op_blend_pt_pas_caa_dpan #define _op_blend_rel_pt_pan_caa_dpan _op_blend_pt_pan_caa_dpan static void init_blend_rel_pixel_color_pt_funcs_c(void) { op_blend_rel_pt_funcs[SP][SM_N][SC][DP][CPU_C] = _op_blend_rel_pt_p_c_dp; op_blend_rel_pt_funcs[SP_AS][SM_N][SC][DP][CPU_C] = _op_blend_rel_pt_pas_c_dp; op_blend_rel_pt_funcs[SP_AN][SM_N][SC][DP][CPU_C] = _op_blend_rel_pt_pan_c_dp; op_blend_rel_pt_funcs[SP][SM_N][SC_AN][DP][CPU_C] = _op_blend_rel_pt_p_can_dp; op_blend_rel_pt_funcs[SP_AS][SM_N][SC_AN][DP][CPU_C] = _op_blend_rel_pt_pas_can_dp; op_blend_rel_pt_funcs[SP_AN][SM_N][SC_AN][DP][CPU_C] = _op_blend_rel_pt_pan_can_dp; op_blend_rel_pt_funcs[SP][SM_N][SC_AA][DP][CPU_C] = _op_blend_rel_pt_p_caa_dp; op_blend_rel_pt_funcs[SP_AS][SM_N][SC_AA][DP][CPU_C] = _op_blend_rel_pt_pas_caa_dp; op_blend_rel_pt_funcs[SP_AN][SM_N][SC_AA][DP][CPU_C] = _op_blend_rel_pt_pan_caa_dp; op_blend_rel_pt_funcs[SP][SM_N][SC][DP_AN][CPU_C] = _op_blend_rel_pt_p_c_dpan; op_blend_rel_pt_funcs[SP_AS][SM_N][SC][DP_AN][CPU_C] = _op_blend_rel_pt_pas_c_dpan; op_blend_rel_pt_funcs[SP_AN][SM_N][SC][DP_AN][CPU_C] = _op_blend_rel_pt_pan_c_dpan; op_blend_rel_pt_funcs[SP][SM_N][SC_AN][DP_AN][CPU_C] = _op_blend_rel_pt_p_can_dpan; op_blend_rel_pt_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_C] = _op_blend_rel_pt_pas_can_dpan; op_blend_rel_pt_funcs[SP_AN][SM_N][SC_AN][DP_AN][CPU_C] = _op_blend_rel_pt_pan_can_dpan; op_blend_rel_pt_funcs[SP][SM_N][SC_AA][DP_AN][CPU_C] = _op_blend_rel_pt_p_caa_dpan; op_blend_rel_pt_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_C] = _op_blend_rel_pt_pas_caa_dpan; op_blend_rel_pt_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_C] = _op_blend_rel_pt_pan_caa_dpan; } #endif evas-1.7.9/src/lib/engines/common/evas_op_blend/Makefile.am0000664000175000017500000000240212175475547020541 00000000000000MAINTAINERCLEANFILES = Makefile.in EXTRA_DIST = \ op_blend_color_.c \ op_blend_color_i386.c \ op_blend_color_neon.c \ op_blend_color_sse3.c \ op_blend_mask_color_.c \ op_blend_mask_color_i386.c \ op_blend_mask_color_neon.c \ op_blend_mask_color_sse3.c \ op_blend_pixel_.c \ op_blend_pixel_color_.c \ op_blend_pixel_color_i386.c \ op_blend_pixel_color_neon.c \ op_blend_pixel_color_sse3.c \ op_blend_pixel_i386.c \ op_blend_pixel_mask_.c \ op_blend_pixel_mask_i386.c \ op_blend_pixel_mask_neon.c \ op_blend_pixel_mask_sse3.c \ op_blend_pixel_neon.c \ op_blend_pixel_sse3.c noinst_LTLIBRARIES = libevas_engine_common_op_blend_master_sse3.la libevas_engine_common_op_blend_master_sse3_la_SOURCES = \ op_blend_master_sse3.c libevas_engine_common_op_blend_master_sse3_la_CFLAGS = \ -I. \ -I$(top_srcdir)/src/lib \ -I$(top_srcdir)/src/lib/engines/common \ -I$(top_srcdir)/src/lib/engines/common/evas_op_blend \ -I$(top_srcdir)/src/lib/cserve \ -I$(top_srcdir)/src/lib/include \ -DPACKAGE_BIN_DIR=\"$(bindir)\" \ -DPACKAGE_LIB_DIR=\"$(libdir)\" \ -DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \ @FREETYPE_CFLAGS@ @VALGRIND_CFLAGS@ \ @PIXMAN_CFLAGS@ \ @EET_CFLAGS@ @pthread_cflags@ \ @EVAS_GENERAL_CFLAGS@ \ @FRIBIDI_CFLAGS@ @HARFBUZZ_CFLAGS@ \ @PIXMAN_CFLAGS@ \ @EVAS_SSE3_CFLAGS@ evas-1.7.9/src/lib/engines/common/evas_op_blend/op_blend_master_sse3.c0000664000175000017500000000462212175475547022751 00000000000000#define NEED_SSE3 1 #include "evas_common.h" #ifdef BUILD_SSE3 static __m128i A_MASK_SSE3; #endif extern RGBA_Gfx_Func op_blend_span_funcs[SP_LAST][SM_LAST][SC_LAST][DP_LAST][CPU_LAST]; extern RGBA_Gfx_Pt_Func op_blend_pt_funcs[SP_LAST][SM_LAST][SC_LAST][DP_LAST][CPU_LAST]; extern RGBA_Gfx_Func op_blend_rel_span_funcs[SP_LAST][SM_LAST][SC_LAST][DP_LAST][CPU_LAST]; extern RGBA_Gfx_Pt_Func op_blend_rel_pt_funcs[SP_LAST][SM_LAST][SC_LAST][DP_LAST][CPU_LAST]; # include "op_blend_pixel_sse3.c" # include "op_blend_color_sse3.c" # include "op_blend_pixel_color_sse3.c" # include "op_blend_pixel_mask_sse3.c" # include "op_blend_mask_color_sse3.c" void evas_common_op_blend_init_sse3(void) { #ifdef BUILD_SSE3 GA_MASK_SSE3 = _mm_set_epi32(0x00FF00FF, 0x00FF00FF, 0x00FF00FF, 0x00FF00FF); RB_MASK_SSE3 = _mm_set_epi32(0xFF00FF00, 0xFF00FF00, 0xFF00FF00, 0xFF00FF00); SYM4_MASK_SSE3 = _mm_set_epi32(0x00FF00FF, 0x000000FF, 0x00FF00FF, 0x000000FF); RGB_MASK_SSE3 = _mm_set_epi32(0xFFFFFF, 0xFFFFFF, 0xFFFFFF, 0xFFFFFF); A_MASK_SSE3 = _mm_set_epi32(0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000); ALPHA_SSE3 = _mm_set_epi32(256, 256, 256, 256); init_blend_pixel_span_funcs_sse3(); init_blend_pixel_color_span_funcs_sse3(); init_blend_pixel_mask_span_funcs_sse3(); init_blend_color_span_funcs_sse3(); init_blend_mask_color_span_funcs_sse3(); init_blend_pixel_pt_funcs_sse3(); init_blend_pixel_color_pt_funcs_sse3(); init_blend_pixel_mask_pt_funcs_sse3(); init_blend_color_pt_funcs_sse3(); init_blend_mask_color_pt_funcs_sse3(); #endif } void evas_common_op_blend_rel_init_sse3(void) { #ifdef BUILD_SSE3 init_blend_rel_pixel_span_funcs_sse3(); init_blend_rel_pixel_color_span_funcs_sse3(); init_blend_rel_pixel_mask_span_funcs_sse3(); init_blend_rel_color_span_funcs_sse3(); init_blend_rel_mask_color_span_funcs_sse3(); init_blend_rel_pixel_pt_funcs_sse3(); init_blend_rel_pixel_color_pt_funcs_sse3(); init_blend_rel_pixel_mask_pt_funcs_sse3(); init_blend_rel_color_pt_funcs_sse3(); init_blend_rel_mask_color_pt_funcs_sse3(); #endif } //#pragma GCC push_options //#pragma GCC optimize ("O0") void evas_common_op_sse3_test(void) { #ifdef BUILD_SSE3 DATA32 s[64] = {0x11883399}, d[64] = {0xff88cc33}; s[0] = rand(); d[1] = rand(); _op_blend_pas_dp_sse3(s, NULL, 0, d, 64); evas_common_cpu_end_opt(); #endif } //#pragma GCC pop_options evas-1.7.9/src/lib/engines/common/evas_map_image.c0000664000175000017500000005316512175475547017022 00000000000000#include "evas_common.h" #include "evas_private.h" #include "evas_blend_private.h" #ifdef EVAS_CSERVE2 #include "evas_cs2_private.h" #endif #ifdef BUILD_SCALE_SMOOTH # ifdef BUILD_MMX # undef SCALE_USING_MMX # define SCALE_USING_MMX # endif #endif #define FPI 8 #define FPI1 (1 << (FPI)) #define FPIH (1 << (FPI - 1)) #define FPFPI1 (1 << (FP + FPI)) typedef struct _Line Line; typedef struct _Span Span; struct _Span { int x1, x2; FPc o1, o2, z1, z2; FPc u[2], v[2]; DATA32 col[2]; }; struct _Line { Span span[2]; }; static inline FPc _interp(int x1, int x2, int p, FPc u1, FPc u2) { FPc u; x2 -= x1; p -= x1; u = u2 - u1; u = (u * p) / (x2 + 1); // FIXME: do z persp return u1 + u; } static inline DATA32 _interp_col(int x1, int x2, int p, DATA32 col1, DATA32 col2) { x2 -= x1; p -= x1; p = (p << 8) / (x2 + 1); // FIXME: do z persp return INTERP_256(p, col2, col1); } static inline void _limit(Span *s, int c1, int c2, int nocol) { if (s->x1 < c1) { s->u[0] = _interp(s->x1, s->x2, c1, s->u[0], s->u[1]); s->v[0] = _interp(s->x1, s->x2, c1, s->v[0], s->v[1]); if (!nocol) s->col[0] = _interp_col(s->x1, s->x2, c1, s->col[0], s->col[1]); s->x1 = c1; s->o1 = c1 << FP; // FIXME: do s->z1 } if (s->x2 > c2) { s->u[1] = _interp(s->x1, s->x2, c2, s->u[0], s->u[1]); s->v[1] = _interp(s->x1, s->x2, c2, s->v[0], s->v[1]); if (!nocol) s->col[1] = _interp_col(s->x1, s->x2, c2, s->col[0], s->col[1]); s->x2 = c2; s->o2 = c2 << FP; // FIXME: do s->z2 } } // 12.63 % of time - this can improve static void _calc_spans(RGBA_Map_Point *p, Line *spans, int ystart, int yend, int cx, int cy __UNUSED__, int cw, int ch __UNUSED__) { int i, y, yp, yy; int py[4]; int edge[4][4], edge_num, swapped, order[4]; FPc uv[4][2], u, v, x, h, t, uu, vv; DATA32 col[4]; #if 1 // maybe faster on x86? for (i = 0; i < 4; i++) py[i] = p[i].y >> FP; # define PY(x) (py[x]) #else # define PY(x) (p[x].y >> FP) #endif if ((PY(0) == PY(1)) && (PY(0) == PY(2)) && (PY(0) == PY(3))) { int leftp, rightp; int nocol = 1; leftp = rightp = 0; for (i = 1; i < 4; i++) { if (p[i].x < p[leftp].x) leftp = i; if (p[i].x > p[rightp].x) rightp = i; if (p[i].col != 0xffffffff) nocol = 0; } for (y = ystart; y <= yend; y++) { yp = y - ystart; if (y == PY(0)) { i = 0; spans[yp].span[i].x1 = p[leftp].x >> FP; spans[yp].span[i].o1 = p[leftp].x; spans[yp].span[i].u[0] = p[leftp].u; spans[yp].span[i].v[0] = p[leftp].v; spans[yp].span[i].col[0] = p[leftp].col; spans[yp].span[i].x2 = p[rightp].x >> FP; spans[yp].span[i].o2 = p[rightp].x; spans[yp].span[i].u[1] = p[rightp].u; spans[yp].span[i].v[1] = p[rightp].v; spans[yp].span[i].col[1] = p[rightp].col; if ((spans[yp].span[i].x1 >= (cx + cw)) || (spans[yp].span[i].x2 < cx)) spans[yp].span[i].x1 = -1; else { _limit(&(spans[yp].span[i]), cx, cx + cw, nocol); i++; spans[yp].span[i].x1 = -1; } } else spans[yp].span[0].x1 = -1; } return; } for (y = ystart; y <= yend; y++) { int nocol = 1; yp = y - ystart; edge_num = 0; for (i = 0; i < 4; i++) { if ((PY(i) <= y) && (PY((i + 1) % 4) > y)) { edge[edge_num][0] = i; edge[edge_num][1] = (i + 1) % 4; edge_num++; } else if ((PY((i + 1) % 4) <= y) && (PY(i) > y)) { edge[edge_num][0] = (i + 1) % 4; edge[edge_num][1] = i; edge_num++; } if (p[i].col != 0xffffffff) nocol = 0; } // calculate line x points for each edge for (i = 0; i < edge_num; i++) { int e1 = edge[i][0]; int e2 = edge[i][1]; FPc t256; h = (p[e2].y - p[e1].y) >> FP; // height of edge if (h < 1) h = 1; t = (((y << FP) + (FP1 / 2) - 1) - p[e1].y) >> FP; x = p[e2].x - p[e1].x; x = p[e1].x + ((x * t) / h); /* // FIXME: 3d accuracy here // XXX t needs adjusting. above its a linear interp point // only. // // // FIXME: do in fixed pt. reduce divides evas_common_cpu_end_opt(); // int foc = 512, z0 = 0, px = 320, py = 240; // FIXME: need from map points // float focf, hf; float z1, z2, y1, y2, dz, dy, zt, dydz, yt; focf = foc; hf = h; // adjust for fixed point and focal length and z0 for map z1 = (p[e1].z >> FP) - z0 + foc; z2 = (p[e2].z >> FP) - z0 + foc; // deltas dz = z1 - z2; if (dz != 0) { int pt; // adjust for perspective point (being 0 0) y1 = (p[e1].y >> FP) - py; y2 = (p[e2].y >> FP) - py; // correct for x &y not being in world coords - screen coords y1 = (y1 * z1) / focf; y2 = (y2 * z2) / focf; // deltas dy = y1 - y2; yt = y - py; dydz = dy / dz; zt = (y2 - (dydz * z2)) / ((yt / focf) - dydz); pt = t; t = ((z1 - zt) * hf) / dz; } */ u = p[e2].u - p[e1].u; uu = u >> FP; if (uu < 0) uu = -uu; if (uu == h) { yy = ((y << FP) - p[e1].y) >> FP; if (u > 0) u = p[e1].u + (yy << FP); else u = p[e1].u - (yy << FP) - (FP1 - 1); } else { if (u >= 0) u = p[e1].u + ((u * t) / h); else u = p[e1].u + (((u * t) - (FP1 / 2)) / h); } v = p[e2].v - p[e1].v; vv = v >> FP; if (vv < 0) vv = -vv; if (vv == h) { yy = ((y << FP) - p[e1].y) >> FP; if (v > 0) v = p[e1].v + (yy << FP); else v = p[e1].v - (yy << FP) - (FP1 - 1); } else { if (v >= 0) v = p[e1].v + ((v * t) / h); else v = p[e1].v + (((v * t) - (FP1 / 2)) / h); } // FIXME: 3d accuracy for color too t256 = (t << 8) / h; // maybe * 255? col[i] = INTERP_256(t256, p[e2].col, p[e1].col); // FIXME: store z persp uv[i][1] = v; uv[i][0] = u; edge[i][2] = x >> FP; edge[i][3] = x; // also fill in order order[i] = i; } // sort edges from left to right - bubble. its a small list! do { swapped = 0; for (i = 0; i < (edge_num - 1); i++) { if (edge[order[i]][2] > edge[order[i + 1]][2]) { t = order[i]; order[i] = order[i + 1]; order[i + 1] = t; swapped = 1; } } } while (swapped); if (edge_num == 2) { i = 0; spans[yp].span[i].x1 = edge[order[0]][2]; spans[yp].span[i].o1 = edge[order[0]][3]; spans[yp].span[i].u[0] = uv[order[0]][0]; spans[yp].span[i].v[0] = uv[order[0]][1]; spans[yp].span[i].col[0] = col[order[0]]; spans[yp].span[i].x2 = edge[order[1]][2]; spans[yp].span[i].o2 = edge[order[1]][3]; spans[yp].span[i].u[1] = uv[order[1]][0]; spans[yp].span[i].v[1] = uv[order[1]][1]; spans[yp].span[i].col[1] = col[order[1]]; if ((spans[yp].span[i].x1 >= (cx + cw)) || (spans[yp].span[i].x2 < cx)) spans[yp].span[i].x1 = -1; else { _limit(&(spans[yp].span[i]), cx, cx + cw, nocol); i++; spans[yp].span[i].x1 = -1; } } else if (edge_num == 4) { i = 0; spans[yp].span[i].x1 = edge[order[0]][2]; spans[yp].span[i].u[0] = uv[order[0]][0]; spans[yp].span[i].v[0] = uv[order[0]][1]; spans[yp].span[i].col[0] = col[order[0]]; spans[yp].span[i].x2 = edge[order[1]][2]; spans[yp].span[i].u[1] = uv[order[1]][0]; spans[yp].span[i].v[1] = uv[order[1]][1]; spans[yp].span[i].col[1] = col[order[1]]; if ((spans[yp].span[i].x1 >= (cx + cw)) || (spans[yp].span[i].x2 < cx)) spans[yp].span[i].x1 = -1; else { _limit(&(spans[yp].span[i]), cx, cx + cw, nocol); i++; } spans[yp].span[i].x1 = edge[order[2]][2]; spans[yp].span[i].u[0] = uv[order[2]][0]; spans[yp].span[i].v[0] = uv[order[2]][1]; spans[yp].span[i].col[0] = col[order[2]]; spans[yp].span[i].x2 = edge[order[3]][2]; spans[yp].span[i].u[1] = uv[order[3]][0]; spans[yp].span[i].v[1] = uv[order[3]][1]; spans[yp].span[i].col[1] = col[order[3]]; if ((spans[yp].span[i].x1 >= (cx + cw)) || (spans[yp].span[i].x2 < cx)) spans[yp].span[i].x1 = -1; else { int l = cx; if (i > 0) l = spans[yp].span[i - 1].x2; _limit(&(spans[yp].span[i]), l, cx + cw, nocol); } } else spans[yp].span[0].x1 = -1; } } /* FIXME: Account for 10% during pipe rendering, should be improved * Could be computing the interpolation once somehow. */ static void _clip_spans(Line *spans, int ystart, int yend, int cx, int cw, Eina_Bool nocol) { int y, yp; for (y = ystart, yp = 0; y <= yend; y++, yp++) { if (spans[yp].span[0].x1 > -1) { if ((spans[yp].span[0].x1 >= (cx + cw)) || (spans[yp].span[0].x2 < cx)) { spans[yp].span[0].x1 = -1; } else { _limit(&(spans[yp].span[0]), cx, cx + cw, nocol); if ((spans[yp].span[1].x1 >= (cx + cw)) || (spans[yp].span[1].x2 < cx)) { spans[yp].span[1].x1 = -1; } else { _limit(&(spans[yp].span[1]), spans[yp].span[0].x2, cx + cw, nocol); } } } } } typedef struct _RGBA_Map_Spans RGBA_Map_Spans; typedef struct _RGBA_Map_Cutout RGBA_Map_Cutout; struct _RGBA_Map_Spans { Line *spans; int size; int ystart; int yend; int havecol; Eina_Bool nocol; Eina_Bool havea; Eina_Bool direct; }; struct _RGBA_Map_Cutout { int count; Cutout_Rects *rects; RGBA_Map_Spans spans[1]; }; EAPI void evas_common_map_rgba_clean(RGBA_Map *m) { RGBA_Map_Cutout *spans = m->engine_data; if (spans) { int i; if (spans->rects) evas_common_draw_context_apply_clear_cutouts(spans->rects); for (i = 0; i < spans->count; i++) free(spans->spans[i].spans); free(spans); } m->engine_data = NULL; } static void _rgba_map_cutout_resize(RGBA_Map *m, int count) { RGBA_Map_Cutout *old = m->engine_data; RGBA_Map_Cutout *r; int size; int i; if (count == 0) goto empty; if (old && old->count == count) { return ; } size = sizeof (RGBA_Map_Cutout) + sizeof (RGBA_Map_Spans) * (count - 1); if (old) { for (i = 0; i < old->count; i++) { free(old->spans[i].spans); old->spans[i].spans = NULL; } } r = realloc(old, size); if (!r) goto empty; memset(r, 0, size); m->engine_data = r; r->count = count; return ; empty: evas_common_map_rgba_clean(m); return ; } static void _evas_common_map_rgba_span(RGBA_Map_Spans *span, RGBA_Image *src, RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Map_Point *p, int cx, int cy, int cw, int ch) { int ytop, ybottom, sw; unsigned int i; span->havecol = 4; span->havea = 0; span->direct = 0; // find y yop line and y bottom line ytop = p[0].y; if ((p[0].col >> 24) < 0xff) span->havea = 1; if (p[0].col == 0xffffffff) span->havecol--; for (i = 1; i < 4; i++) { if (p[i].y < ytop) ytop = p[i].y; if ((p[i].col >> 24) < 0xff) span->havea = 1; if (p[i].col == 0xffffffff) span->havecol--; } ybottom = p[0].y; for (i = 1; i < 4; i++) { if (p[i].y > ybottom) ybottom = p[i].y; } // convert to screen space from fixed point ytop = ytop >> FP; ybottom = ybottom >> FP; // if its outside the clip vertical bounds - don't bother if ((ytop >= (cy + ch)) || (ybottom < cy)) return; // limit to the clip vertical bounds if (ytop < cy) span->ystart = cy; else span->ystart = ytop; if (ybottom >= (cy + ch)) span->yend = (cy + ch) - 1; else span->yend = ybottom; // get some source image information sw = src->cache_entry.w; // limit u,v coords of points to be within the source image for (i = 0; i < 4; i++) { if (p[i].u < 0) p[i].u = 0; else if (p[i].u > (int)(sw << FP)) p[i].u = src->cache_entry.w << FP; if (p[i].v < 0) p[i].v = 0; else if (p[i].v > (int)(sw << FP)) p[i].v = src->cache_entry.h << FP; } // allocate some spans to hold out span list if (span->size < (span->yend - span->ystart + 1)) { free(span->spans); span->size = (span->yend - span->ystart + 1); span->spans = calloc(1, span->size * sizeof(Line)); } if (!span->spans) return; // calculate the spans list _calc_spans(p, span->spans, span->ystart, span->yend, cx, cy, cw, ch); // if operation is solid, bypass buf and draw func and draw direct to dst if ((!src->cache_entry.flags.alpha) && (!dst->cache_entry.flags.alpha) && (!dc->mul.use) && (!span->havea)) { span->direct = 1; } } EAPI Eina_Bool evas_common_map_rgba_prepare(RGBA_Image *src, RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Map *m) { RGBA_Map_Cutout *spans; Cutout_Rects *rects; Cutout_Rect *r; int i; if ((!dc->cutout.rects) && (!dc->clip.use)) { evas_common_draw_context_clip_clip(dc, 0, 0, dst->cache_entry.w, dst->cache_entry.h); if ((dc->clip.w <= 0) || (dc->clip.h <= 0)) { _rgba_map_cutout_resize(m, 0); return EINA_FALSE; } _rgba_map_cutout_resize(m, 1); if (!m->engine_data) return EINA_FALSE; spans = m->engine_data; _evas_common_map_rgba_span(&spans->spans[0], src, dst, dc, m->pts, 0, 0, dst->cache_entry.w, dst->cache_entry.h); return EINA_TRUE; } evas_common_draw_context_clip_clip(dc, 0, 0, dst->cache_entry.w, dst->cache_entry.h); /* our clip is 0 size.. abort */ if ((dc->clip.w <= 0) || (dc->clip.h <= 0)) { _rgba_map_cutout_resize(m, 0); return EINA_FALSE; } spans = m->engine_data; if (spans) { rects = spans->rects; spans->rects = NULL; } else { rects = evas_common_draw_context_cutouts_new(); } rects = evas_common_draw_context_apply_cutouts(dc, rects); _rgba_map_cutout_resize(m, rects->active); spans = m->engine_data; if (!spans) { evas_common_draw_context_apply_clear_cutouts(rects); return EINA_FALSE; } spans->rects = rects; for (i = 0; i < spans->rects->active; ++i) { r = spans->rects->rects + i; _evas_common_map_rgba_span(&spans->spans[i], src, dst, dc, m->pts, r->x, r->y, r->w, r->h); } return EINA_TRUE; } #ifdef BUILD_SCALE_SMOOTH # ifdef BUILD_MMX # undef FUNC_NAME # undef FUNC_NAME_DO # define FUNC_NAME evas_common_map_rgba_internal_mmx # define FUNC_NAME_DO evas_common_map_rgba_internal_mmx_do # undef SCALE_USING_MMX # define SCALE_USING_MMX # include "evas_map_image_internal.c" # endif # ifdef BUILD_C # undef FUNC_NAME # undef FUNC_NAME_DO # define FUNC_NAME evas_common_map_rgba_internal # define FUNC_NAME_DO evas_common_map_rgba_internal_do # undef SCALE_USING_MMX # include "evas_map_image_internal.c" # endif #endif EAPI void evas_common_map_rgba(RGBA_Image *src, RGBA_Image *dst, RGBA_Draw_Context *dc, int npoints __UNUSED__, RGBA_Map_Point *p, int smooth, int level) { #ifdef BUILD_MMX int mmx, sse, sse2; #endif static Cutout_Rects *rects = NULL; Cutout_Rect *r; int c, cx, cy, cw, ch; int i; if (src->cache_entry.space == EVAS_COLORSPACE_ARGB8888) { #ifdef EVAS_CSERVE2 if (evas_cserve2_use_get()) evas_cache2_image_load_data(&src->cache_entry); else #endif evas_cache_image_load_data(&src->cache_entry); } evas_common_image_colorspace_normalize(src); if (!src->image.data) return; #ifdef BUILD_MMX evas_common_cpu_can_do(&mmx, &sse, &sse2); #endif if ((!dc->cutout.rects) && (!dc->clip.use)) { #ifdef BUILD_MMX if (mmx) evas_common_map_rgba_internal_mmx(src, dst, dc, p, smooth, level); else #endif #ifdef BUILD_C evas_common_map_rgba_internal(src, dst, dc, p, smooth, level); #endif return; } /* save out clip info */ c = dc->clip.use; cx = dc->clip.x; cy = dc->clip.y; cw = dc->clip.w; ch = dc->clip.h; evas_common_draw_context_clip_clip(dc, 0, 0, dst->cache_entry.w, dst->cache_entry.h); /* our clip is 0 size.. abort */ if ((dc->clip.w <= 0) || (dc->clip.h <= 0)) { dc->clip.use = c; dc->clip.x = cx; dc->clip.y = cy; dc->clip.w = cw; dc->clip.h = ch; return; } rects = evas_common_draw_context_apply_cutouts(dc, rects); for (i = 0; i < rects->active; ++i) { r = rects->rects + i; evas_common_draw_context_set_clip(dc, r->x, r->y, r->w, r->h); #ifdef BUILD_MMX if (mmx) evas_common_map_rgba_internal_mmx(src, dst, dc, p, smooth, level); else #endif #ifdef BUILD_C evas_common_map_rgba_internal(src, dst, dc, p, smooth, level); #endif } /* restore clip info */ dc->clip.use = c; dc->clip.x = cx; dc->clip.y = cy; dc->clip.w = cw; dc->clip.h = ch; } EAPI void evas_common_map_rgba_do(const Eina_Rectangle *clip, RGBA_Image *src, RGBA_Image *dst, RGBA_Draw_Context *dc, const RGBA_Map *m, int smooth, int level) { #ifdef BUILD_MMX int mmx, sse, sse2; #endif const Cutout_Rects *rects; const RGBA_Map_Cutout *spans; Eina_Rectangle area; Cutout_Rect *r; int i; #ifdef BUILD_MMX evas_common_cpu_can_do(&mmx, &sse, &sse2); #endif spans = m->engine_data; rects = spans->rects; if (rects->active == 0 && spans->count == 1) { evas_common_draw_context_set_clip(dc, clip->x, clip->y, clip->w, clip->h); #ifdef BUILD_MMX if (mmx) evas_common_map_rgba_internal_mmx_do(src, dst, dc, &spans->spans[0], smooth, level); else #endif #ifdef BUILD_C evas_common_map_rgba_internal_do(src, dst, dc, &spans->spans[0], smooth, level); #endif return ; } for (i = 0; i < rects->active; ++i) { r = rects->rects + i; EINA_RECTANGLE_SET(&area, r->x, r->y, r->w, r->h); if (!eina_rectangle_intersection(&area, clip)) continue ; evas_common_draw_context_set_clip(dc, area.x, area.y, area.w, area.h); #ifdef BUILD_MMX if (mmx) evas_common_map_rgba_internal_mmx_do(src, dst, dc, &spans->spans[i], smooth, level); else #endif #ifdef BUILD_C evas_common_map_rgba_internal_do(src, dst, dc, &spans->spans[i], smooth, level); #endif } } evas-1.7.9/src/lib/engines/common/evas_rectangle.h0000664000175000017500000000111512175475547017040 00000000000000#ifndef _EVAS_RECTANGLE_H #define _EVAS_RECTANGLE_H EAPI void evas_common_rectangle_init (void); EAPI void evas_common_rectangle_draw (RGBA_Image *dst, RGBA_Draw_Context *dc, int x, int y, int w, int h); EAPI void evas_common_rectangle_draw_do(const Cutout_Rects *reuse, const Eina_Rectangle *clip, RGBA_Image *dst, RGBA_Draw_Context *dc, int x, int y, int w, int h); EAPI Eina_Bool evas_common_rectangle_draw_prepare(Cutout_Rects *reuse, const RGBA_Image *dst, RGBA_Draw_Context *dc, int x, int y, int w, int h); #endif /* _EVAS_RECTANGLE_H */ evas-1.7.9/src/lib/engines/common/language/0000775000175000017500000000000012234557316015541 500000000000000evas-1.7.9/src/lib/engines/common/language/evas_language_utils.c0000664000175000017500000000666312175475547021672 00000000000000/** * @internal * @addtogroup Evas_Utils * * @{ */ /** * @internal * @defgroup Evas_Script Evas Script (language) utility functions * * This set of functions and types helps evas handle scripts correctly. * @todo Document types, structures and macros. * * @{ */ #ifdef HAVE_CONFIG_H # include #endif #include #include #include "evas_language_utils.h" #include "evas_bidi_utils.h" /* Used for splitting according to bidi */ #include "../evas_font_ot.h" /* Used for harfbuzz info */ #ifdef USE_HARFBUZZ # include #endif #include "evas_script_table.h" static Evas_Script_Type _evas_common_language_char_script_search(Eina_Unicode unicode) { int min = 0; int max = (sizeof(_evas_script_slow_table) / sizeof(_evas_script_slow_table[0])) - 1; int mid; do { mid = (min + max) / 2; if (unicode < _evas_script_slow_table[mid].start) max = mid - 1; else if (unicode >= _evas_script_slow_table[mid].start + _evas_script_slow_table[mid].len) min = mid + 1; else return _evas_script_slow_table[mid].script; } while (min <= max); return EVAS_SCRIPT_UNKNOWN; } Evas_Script_Type evas_common_language_char_script_get(Eina_Unicode unicode) { if ((unicode >= 0) && (unicode < EVAS_SCRIPT_DIRECT_TABLE_LIMIT)) return _evas_script_fast_table[unicode]; else return _evas_common_language_char_script_search(unicode); } int evas_common_language_script_end_of_run_get(const Eina_Unicode *str, const Evas_BiDi_Paragraph_Props *bidi_props, size_t start, int len) { /* FIXME: Use the standard segmentation instead */ Evas_Script_Type first = EVAS_SCRIPT_UNKNOWN; int i; for (i = 0 ; i < len ; i++, str++) { Evas_Script_Type tmp; tmp = evas_common_language_char_script_get(*str); /* Arabic is the first script in the array that's not * common/inherited. */ if ((first == EVAS_SCRIPT_UNKNOWN) && (tmp >= EVAS_SCRIPT_ARABIC)) { first = tmp; continue; } if ((first != tmp) && (tmp >= EVAS_SCRIPT_ARABIC)) { break; } } #ifdef BIDI_SUPPORT { int bidi_end; bidi_end = evas_bidi_end_of_run_get(bidi_props, start, len); if (bidi_end > 0) { i = (i < bidi_end) ? i : bidi_end; } } #else (void) bidi_props; (void) start; #endif return (i < len) ? i : 0; } Evas_Script_Type evas_common_language_script_type_get(const Eina_Unicode *str, size_t len) { Evas_Script_Type script = EVAS_SCRIPT_COMMON; const Eina_Unicode *end = str + len; /* Arabic is the first script in the array that's not a common/inherited */ for ( ; str < end && ((script = evas_common_language_char_script_get(*str)) < EVAS_SCRIPT_ARABIC) ; str++) ; return script; } const char * evas_common_language_from_locale_get(void) { static char lang[6]; /* FIXME: Maximum length I know about */ if (*lang) return lang; const char *locale; locale = getenv("LANG"); if (locale && *locale) { char *itr; strncpy(lang, locale, 5); lang[5] = '\0'; itr = lang; while (*itr) { if (*itr == '_') { *itr = '\0'; } itr++; } return lang; } return ""; } /* * @} */ /* * @} */ evas-1.7.9/src/lib/engines/common/language/evas_bidi_utils.h0000664000175000017500000001175612175475547021022 00000000000000#ifndef _EVAS_BIDI_UTILS #define _EVAS_BIDI_UTILS /** * @internal * @addtogroup Evas_Utils * * @{ */ /** * @internal * @defgroup Evas_BiDi Evas BiDi utility functions * * This set of functions and types helps evas handle BiDi strings correctly. * @todo Document types, structures and macros. * * @{ */ #ifdef HAVE_CONFIG_H # include "config.h" #endif #ifdef HAVE_FRIBIDI # define USE_FRIBIDI # define BIDI_SUPPORT #endif #include #ifdef USE_FRIBIDI # include #endif /* abstract fribidi - we statically define sizes here because otherwise we would * have to ifdef everywhere (because function decorations may change with/without * bidi support) * These types should only be passed as pointers! i.e do not directely use any of * these types in function declarations. Defining as void should help ensuring that. */ /* Evas_BiDi_Direction is defined in evas.h */ #ifdef USE_FRIBIDI # define _EVAS_BIDI_TYPEDEF(type) \ typedef FriBidi ## type EvasBiDi ## type #else # define _EVAS_BIDI_TYPEDEF(type) \ typedef void EvasBiDi ## type #endif #if 0 /* We are using Eina_Unicode instead */ _EVAS_BIDI_TYPEDEF(Char); #endif _EVAS_BIDI_TYPEDEF(CharType); _EVAS_BIDI_TYPEDEF(ParType); _EVAS_BIDI_TYPEDEF(StrIndex); _EVAS_BIDI_TYPEDEF(Level); _EVAS_BIDI_TYPEDEF(JoiningType); typedef struct _Evas_BiDi_Paragraph_Props Evas_BiDi_Paragraph_Props; typedef struct _Evas_BiDi_Props Evas_BiDi_Props; /* This structure defines a set of properties of a BiDi string. In case of a * non-bidi string, all values should be NULL. * To check if a structure describes a bidi string or not, use the macro * EVAS_BIDI_IS_BIDI_PROP. RTL-only strings are also treated as bidi ATM. */ struct _Evas_BiDi_Paragraph_Props { EvasBiDiCharType *char_types; /* BiDi char types */ EvasBiDiLevel *embedding_levels; /* BiDi embedding levels */ int refcount; /* The number of references to this object */ #ifdef USE_FRIBIDI EvasBiDiParType direction; #endif }; #include "Evas.h" struct _Evas_BiDi_Props { Evas_BiDi_Direction dir; }; #ifdef USE_FRIBIDI #define EVAS_BIDI_PARAGRAPH_NEUTRAL FRIBIDI_PAR_ON #define EVAS_BIDI_PARAGRAPH_LTR FRIBIDI_PAR_LTR #define EVAS_BIDI_PARAGRAPH_RTL FRIBIDI_PAR_RTL #define EVAS_BIDI_PARAGRAPH_WLTR FRIBIDI_PAR_WLTR #define EVAS_BIDI_PARAGRAPH_WRTL FRIBIDI_PAR_WRTL #define EVAS_BIDI_DIRECTION_IS_RTL(x) \ ((((x) == EVAS_BIDI_PARAGRAPH_RTL) || \ ((x) == EVAS_BIDI_PARAGRAPH_WRTL)) ? \ EINA_TRUE : EINA_FALSE) #define EVAS_BIDI_PARAGRAPH_DIRECTION_IS_RTL(x) \ ((x) && EVAS_BIDI_DIRECTION_IS_RTL((x)->direction)) #define EVAS_BIDI_PAR_TYPE_TO_DIRECTION(x) \ _evas_bidi_par_type_to_direction(x) static inline Evas_BiDi_Direction _evas_bidi_par_type_to_direction(EvasBiDiParType par_type) { switch (par_type) { case EVAS_BIDI_PARAGRAPH_LTR: case EVAS_BIDI_PARAGRAPH_WLTR: return EVAS_BIDI_DIRECTION_LTR; break; case EVAS_BIDI_PARAGRAPH_RTL: case EVAS_BIDI_PARAGRAPH_WRTL: return EVAS_BIDI_DIRECTION_RTL; break; case EVAS_BIDI_PARAGRAPH_NEUTRAL: default: return EVAS_BIDI_DIRECTION_NEUTRAL; break; } } # define evas_bidi_position_visual_to_logical(list, position) \ (list) ? list[position] : position; EvasBiDiStrIndex evas_bidi_position_logical_to_visual(EvasBiDiStrIndex *v_to_l, int len, EvasBiDiStrIndex position); EvasBiDiStrIndex evas_bidi_position_reverse(const Evas_BiDi_Props *props, int len, EvasBiDiStrIndex position); Eina_Bool evas_bidi_is_rtl_str(const Eina_Unicode *str); Eina_Bool evas_bidi_is_rtl_char(const Evas_BiDi_Paragraph_Props *bidi_props, size_t start, EvasBiDiStrIndex index); int evas_bidi_end_of_run_get(const Evas_BiDi_Paragraph_Props *bidi_props, size_t start, int len); Eina_Bool evas_bidi_props_reorder_line(Eina_Unicode *eina_ustr, size_t start, size_t len, const Evas_BiDi_Paragraph_Props *props, EvasBiDiStrIndex **_v_to_l); Evas_BiDi_Paragraph_Props * evas_bidi_paragraph_props_get(const Eina_Unicode *eina_ustr, size_t len, int *segment_idxs) EINA_ARG_NONNULL(1) EINA_MALLOC EINA_WARN_UNUSED_RESULT; void evas_bidi_props_copy_and_ref(const Evas_BiDi_Props *src, Evas_BiDi_Props *dst); EAPI Eina_Bool evas_bidi_shape_string(Eina_Unicode *eina_ustr, const Evas_BiDi_Paragraph_Props *bidi_props, size_t start, size_t len); void evas_bidi_props_clean(Evas_BiDi_Props *intl_props) EINA_ARG_NONNULL(1); void evas_bidi_paragraph_props_clean(Evas_BiDi_Paragraph_Props *bidi_props) EINA_ARG_NONNULL(1); Evas_BiDi_Paragraph_Props * evas_bidi_paragraph_props_ref(Evas_BiDi_Paragraph_Props *bidi_props) EINA_ARG_NONNULL(1); void evas_bidi_paragraph_props_unref(Evas_BiDi_Paragraph_Props *bidi_props) EINA_ARG_NONNULL(1); Evas_BiDi_Paragraph_Props * evas_bidi_paragraph_props_new(void) EINA_MALLOC EINA_WARN_UNUSED_RESULT; int * evas_bidi_segment_idxs_get(const Eina_Unicode *str, const char *delim) EINA_ARG_NONNULL(1, 2) EINA_WARN_UNUSED_RESULT EINA_MALLOC; #endif /** * @} */ /** * @} */ #endif evas-1.7.9/src/lib/engines/common/language/evas_script_table.h0000664000175000017500000060223712175475547021346 00000000000000/* evas_script_table.h: Mostly based on output by gen-script-table.pl * which is available in glib's tools. * * NOTICE: This is temporary and will only stay here until there will be * a nice "UNICODE DATA" library to use. From my understanding it's already * being worked on. * * Date: Sun May 1 15:48:56 2011 * Source: Scripts-6.0.0.txt * * Do not edit. */ #define EVAS_SCRIPT_DIRECT_TABLE_LIMIT 8192 static const Eina_Unicode _evas_script_fast_table[EVAS_SCRIPT_DIRECT_TABLE_LIMIT] = { EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_BOPOMOFO, EVAS_SCRIPT_BOPOMOFO, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_COPTIC, EVAS_SCRIPT_COPTIC, EVAS_SCRIPT_COPTIC, EVAS_SCRIPT_COPTIC, EVAS_SCRIPT_COPTIC, EVAS_SCRIPT_COPTIC, EVAS_SCRIPT_COPTIC, EVAS_SCRIPT_COPTIC, EVAS_SCRIPT_COPTIC, EVAS_SCRIPT_COPTIC, EVAS_SCRIPT_COPTIC, EVAS_SCRIPT_COPTIC, EVAS_SCRIPT_COPTIC, EVAS_SCRIPT_COPTIC, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_MANDAIC, EVAS_SCRIPT_MANDAIC, EVAS_SCRIPT_MANDAIC, EVAS_SCRIPT_MANDAIC, EVAS_SCRIPT_MANDAIC, EVAS_SCRIPT_MANDAIC, EVAS_SCRIPT_MANDAIC, EVAS_SCRIPT_MANDAIC, EVAS_SCRIPT_MANDAIC, EVAS_SCRIPT_MANDAIC, EVAS_SCRIPT_MANDAIC, EVAS_SCRIPT_MANDAIC, EVAS_SCRIPT_MANDAIC, EVAS_SCRIPT_MANDAIC, EVAS_SCRIPT_MANDAIC, EVAS_SCRIPT_MANDAIC, EVAS_SCRIPT_MANDAIC, EVAS_SCRIPT_MANDAIC, EVAS_SCRIPT_MANDAIC, EVAS_SCRIPT_MANDAIC, EVAS_SCRIPT_MANDAIC, EVAS_SCRIPT_MANDAIC, EVAS_SCRIPT_MANDAIC, EVAS_SCRIPT_MANDAIC, EVAS_SCRIPT_MANDAIC, EVAS_SCRIPT_MANDAIC, EVAS_SCRIPT_MANDAIC, EVAS_SCRIPT_MANDAIC, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_MANDAIC, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_LAO, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_LAO, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_LAO, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_LAO, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_LAO, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_LAO, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_OGHAM, EVAS_SCRIPT_OGHAM, EVAS_SCRIPT_OGHAM, EVAS_SCRIPT_OGHAM, EVAS_SCRIPT_OGHAM, EVAS_SCRIPT_OGHAM, EVAS_SCRIPT_OGHAM, EVAS_SCRIPT_OGHAM, EVAS_SCRIPT_OGHAM, EVAS_SCRIPT_OGHAM, EVAS_SCRIPT_OGHAM, EVAS_SCRIPT_OGHAM, EVAS_SCRIPT_OGHAM, EVAS_SCRIPT_OGHAM, EVAS_SCRIPT_OGHAM, EVAS_SCRIPT_OGHAM, EVAS_SCRIPT_OGHAM, EVAS_SCRIPT_OGHAM, EVAS_SCRIPT_OGHAM, EVAS_SCRIPT_OGHAM, EVAS_SCRIPT_OGHAM, EVAS_SCRIPT_OGHAM, EVAS_SCRIPT_OGHAM, EVAS_SCRIPT_OGHAM, EVAS_SCRIPT_OGHAM, EVAS_SCRIPT_OGHAM, EVAS_SCRIPT_OGHAM, EVAS_SCRIPT_OGHAM, EVAS_SCRIPT_OGHAM, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TAGALOG, EVAS_SCRIPT_TAGALOG, EVAS_SCRIPT_TAGALOG, EVAS_SCRIPT_TAGALOG, EVAS_SCRIPT_TAGALOG, EVAS_SCRIPT_TAGALOG, EVAS_SCRIPT_TAGALOG, EVAS_SCRIPT_TAGALOG, EVAS_SCRIPT_TAGALOG, EVAS_SCRIPT_TAGALOG, EVAS_SCRIPT_TAGALOG, EVAS_SCRIPT_TAGALOG, EVAS_SCRIPT_TAGALOG, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TAGALOG, EVAS_SCRIPT_TAGALOG, EVAS_SCRIPT_TAGALOG, EVAS_SCRIPT_TAGALOG, EVAS_SCRIPT_TAGALOG, EVAS_SCRIPT_TAGALOG, EVAS_SCRIPT_TAGALOG, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_HANUNOO, EVAS_SCRIPT_HANUNOO, EVAS_SCRIPT_HANUNOO, EVAS_SCRIPT_HANUNOO, EVAS_SCRIPT_HANUNOO, EVAS_SCRIPT_HANUNOO, EVAS_SCRIPT_HANUNOO, EVAS_SCRIPT_HANUNOO, EVAS_SCRIPT_HANUNOO, EVAS_SCRIPT_HANUNOO, EVAS_SCRIPT_HANUNOO, EVAS_SCRIPT_HANUNOO, EVAS_SCRIPT_HANUNOO, EVAS_SCRIPT_HANUNOO, EVAS_SCRIPT_HANUNOO, EVAS_SCRIPT_HANUNOO, EVAS_SCRIPT_HANUNOO, EVAS_SCRIPT_HANUNOO, EVAS_SCRIPT_HANUNOO, EVAS_SCRIPT_HANUNOO, EVAS_SCRIPT_HANUNOO, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_BUHID, EVAS_SCRIPT_BUHID, EVAS_SCRIPT_BUHID, EVAS_SCRIPT_BUHID, EVAS_SCRIPT_BUHID, EVAS_SCRIPT_BUHID, EVAS_SCRIPT_BUHID, EVAS_SCRIPT_BUHID, EVAS_SCRIPT_BUHID, EVAS_SCRIPT_BUHID, EVAS_SCRIPT_BUHID, EVAS_SCRIPT_BUHID, EVAS_SCRIPT_BUHID, EVAS_SCRIPT_BUHID, EVAS_SCRIPT_BUHID, EVAS_SCRIPT_BUHID, EVAS_SCRIPT_BUHID, EVAS_SCRIPT_BUHID, EVAS_SCRIPT_BUHID, EVAS_SCRIPT_BUHID, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TAGBANWA, EVAS_SCRIPT_TAGBANWA, EVAS_SCRIPT_TAGBANWA, EVAS_SCRIPT_TAGBANWA, EVAS_SCRIPT_TAGBANWA, EVAS_SCRIPT_TAGBANWA, EVAS_SCRIPT_TAGBANWA, EVAS_SCRIPT_TAGBANWA, EVAS_SCRIPT_TAGBANWA, EVAS_SCRIPT_TAGBANWA, EVAS_SCRIPT_TAGBANWA, EVAS_SCRIPT_TAGBANWA, EVAS_SCRIPT_TAGBANWA, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TAGBANWA, EVAS_SCRIPT_TAGBANWA, EVAS_SCRIPT_TAGBANWA, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TAGBANWA, EVAS_SCRIPT_TAGBANWA, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_TAI_LE, EVAS_SCRIPT_TAI_LE, EVAS_SCRIPT_TAI_LE, EVAS_SCRIPT_TAI_LE, EVAS_SCRIPT_TAI_LE, EVAS_SCRIPT_TAI_LE, EVAS_SCRIPT_TAI_LE, EVAS_SCRIPT_TAI_LE, EVAS_SCRIPT_TAI_LE, EVAS_SCRIPT_TAI_LE, EVAS_SCRIPT_TAI_LE, EVAS_SCRIPT_TAI_LE, EVAS_SCRIPT_TAI_LE, EVAS_SCRIPT_TAI_LE, EVAS_SCRIPT_TAI_LE, EVAS_SCRIPT_TAI_LE, EVAS_SCRIPT_TAI_LE, EVAS_SCRIPT_TAI_LE, EVAS_SCRIPT_TAI_LE, EVAS_SCRIPT_TAI_LE, EVAS_SCRIPT_TAI_LE, EVAS_SCRIPT_TAI_LE, EVAS_SCRIPT_TAI_LE, EVAS_SCRIPT_TAI_LE, EVAS_SCRIPT_TAI_LE, EVAS_SCRIPT_TAI_LE, EVAS_SCRIPT_TAI_LE, EVAS_SCRIPT_TAI_LE, EVAS_SCRIPT_TAI_LE, EVAS_SCRIPT_TAI_LE, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TAI_LE, EVAS_SCRIPT_TAI_LE, EVAS_SCRIPT_TAI_LE, EVAS_SCRIPT_TAI_LE, EVAS_SCRIPT_TAI_LE, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_BUGINESE, EVAS_SCRIPT_BUGINESE, EVAS_SCRIPT_BUGINESE, EVAS_SCRIPT_BUGINESE, EVAS_SCRIPT_BUGINESE, EVAS_SCRIPT_BUGINESE, EVAS_SCRIPT_BUGINESE, EVAS_SCRIPT_BUGINESE, EVAS_SCRIPT_BUGINESE, EVAS_SCRIPT_BUGINESE, EVAS_SCRIPT_BUGINESE, EVAS_SCRIPT_BUGINESE, EVAS_SCRIPT_BUGINESE, EVAS_SCRIPT_BUGINESE, EVAS_SCRIPT_BUGINESE, EVAS_SCRIPT_BUGINESE, EVAS_SCRIPT_BUGINESE, EVAS_SCRIPT_BUGINESE, EVAS_SCRIPT_BUGINESE, EVAS_SCRIPT_BUGINESE, EVAS_SCRIPT_BUGINESE, EVAS_SCRIPT_BUGINESE, EVAS_SCRIPT_BUGINESE, EVAS_SCRIPT_BUGINESE, EVAS_SCRIPT_BUGINESE, EVAS_SCRIPT_BUGINESE, EVAS_SCRIPT_BUGINESE, EVAS_SCRIPT_BUGINESE, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_BUGINESE, EVAS_SCRIPT_BUGINESE, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_UNKNOWN, }; static const struct { Eina_Unicode start; short len; Evas_Script_Type script; } _evas_script_slow_table[] = { { 0x2000, 12, EVAS_SCRIPT_COMMON }, { 0x200c, 2, EVAS_SCRIPT_INHERITED }, { 0x200e, 87, EVAS_SCRIPT_COMMON }, { 0x206a, 7, EVAS_SCRIPT_COMMON }, { 0x2071, 1, EVAS_SCRIPT_LATIN }, { 0x2074, 11, EVAS_SCRIPT_COMMON }, { 0x207f, 1, EVAS_SCRIPT_LATIN }, { 0x2080, 15, EVAS_SCRIPT_COMMON }, { 0x2090, 13, EVAS_SCRIPT_LATIN }, { 0x20a0, 26, EVAS_SCRIPT_COMMON }, { 0x20d0, 33, EVAS_SCRIPT_INHERITED }, { 0x2100, 38, EVAS_SCRIPT_COMMON }, { 0x2126, 1, EVAS_SCRIPT_GREEK }, { 0x2127, 3, EVAS_SCRIPT_COMMON }, { 0x212a, 2, EVAS_SCRIPT_LATIN }, { 0x212c, 6, EVAS_SCRIPT_COMMON }, { 0x2132, 1, EVAS_SCRIPT_LATIN }, { 0x2133, 27, EVAS_SCRIPT_COMMON }, { 0x214e, 1, EVAS_SCRIPT_LATIN }, { 0x214f, 17, EVAS_SCRIPT_COMMON }, { 0x2160, 41, EVAS_SCRIPT_LATIN }, { 0x2189, 1, EVAS_SCRIPT_COMMON }, { 0x2190, 612, EVAS_SCRIPT_COMMON }, { 0x2400, 39, EVAS_SCRIPT_COMMON }, { 0x2440, 11, EVAS_SCRIPT_COMMON }, { 0x2460, 672, EVAS_SCRIPT_COMMON }, { 0x2701, 202, EVAS_SCRIPT_COMMON }, { 0x27cc, 1, EVAS_SCRIPT_COMMON }, { 0x27ce, 50, EVAS_SCRIPT_COMMON }, { 0x2800, 256, EVAS_SCRIPT_BRAILLE }, { 0x2900, 589, EVAS_SCRIPT_COMMON }, { 0x2b50, 10, EVAS_SCRIPT_COMMON }, { 0x2c00, 47, EVAS_SCRIPT_GLAGOLITIC }, { 0x2c30, 47, EVAS_SCRIPT_GLAGOLITIC }, { 0x2c60, 32, EVAS_SCRIPT_LATIN }, { 0x2c80, 114, EVAS_SCRIPT_COPTIC }, { 0x2cf9, 7, EVAS_SCRIPT_COPTIC }, { 0x2d00, 38, EVAS_SCRIPT_GEORGIAN }, { 0x2d30, 54, EVAS_SCRIPT_TIFINAGH }, { 0x2d6f, 2, EVAS_SCRIPT_TIFINAGH }, { 0x2d7f, 1, EVAS_SCRIPT_TIFINAGH }, { 0x2d80, 23, EVAS_SCRIPT_ETHIOPIC }, { 0x2da0, 7, EVAS_SCRIPT_ETHIOPIC }, { 0x2da8, 7, EVAS_SCRIPT_ETHIOPIC }, { 0x2db0, 7, EVAS_SCRIPT_ETHIOPIC }, { 0x2db8, 7, EVAS_SCRIPT_ETHIOPIC }, { 0x2dc0, 7, EVAS_SCRIPT_ETHIOPIC }, { 0x2dc8, 7, EVAS_SCRIPT_ETHIOPIC }, { 0x2dd0, 7, EVAS_SCRIPT_ETHIOPIC }, { 0x2dd8, 7, EVAS_SCRIPT_ETHIOPIC }, { 0x2de0, 32, EVAS_SCRIPT_CYRILLIC }, { 0x2e00, 50, EVAS_SCRIPT_COMMON }, { 0x2e80, 26, EVAS_SCRIPT_HAN }, { 0x2e9b, 89, EVAS_SCRIPT_HAN }, { 0x2f00, 214, EVAS_SCRIPT_HAN }, { 0x2ff0, 12, EVAS_SCRIPT_COMMON }, { 0x3000, 5, EVAS_SCRIPT_COMMON }, { 0x3005, 1, EVAS_SCRIPT_HAN }, { 0x3006, 1, EVAS_SCRIPT_COMMON }, { 0x3007, 1, EVAS_SCRIPT_HAN }, { 0x3008, 25, EVAS_SCRIPT_COMMON }, { 0x3021, 9, EVAS_SCRIPT_HAN }, { 0x302a, 4, EVAS_SCRIPT_INHERITED }, { 0x302e, 2, EVAS_SCRIPT_HANGUL }, { 0x3030, 8, EVAS_SCRIPT_COMMON }, { 0x3038, 4, EVAS_SCRIPT_HAN }, { 0x303c, 4, EVAS_SCRIPT_COMMON }, { 0x3041, 86, EVAS_SCRIPT_HIRAGANA }, { 0x3099, 2, EVAS_SCRIPT_INHERITED }, { 0x309b, 2, EVAS_SCRIPT_COMMON }, { 0x309d, 3, EVAS_SCRIPT_HIRAGANA }, { 0x30a0, 1, EVAS_SCRIPT_COMMON }, { 0x30a1, 90, EVAS_SCRIPT_KATAKANA }, { 0x30fb, 2, EVAS_SCRIPT_COMMON }, { 0x30fd, 3, EVAS_SCRIPT_KATAKANA }, { 0x3105, 41, EVAS_SCRIPT_BOPOMOFO }, { 0x3131, 94, EVAS_SCRIPT_HANGUL }, { 0x3190, 16, EVAS_SCRIPT_COMMON }, { 0x31a0, 27, EVAS_SCRIPT_BOPOMOFO }, { 0x31c0, 36, EVAS_SCRIPT_COMMON }, { 0x31f0, 16, EVAS_SCRIPT_KATAKANA }, { 0x3200, 31, EVAS_SCRIPT_HANGUL }, { 0x3220, 64, EVAS_SCRIPT_COMMON }, { 0x3260, 31, EVAS_SCRIPT_HANGUL }, { 0x327f, 81, EVAS_SCRIPT_COMMON }, { 0x32d0, 47, EVAS_SCRIPT_KATAKANA }, { 0x3300, 88, EVAS_SCRIPT_KATAKANA }, { 0x3358, 168, EVAS_SCRIPT_COMMON }, { 0x3400, 6582, EVAS_SCRIPT_HAN }, { 0x4dc0, 64, EVAS_SCRIPT_COMMON }, { 0x4e00, 20940, EVAS_SCRIPT_HAN }, { 0xa000, 1165, EVAS_SCRIPT_YI }, { 0xa490, 55, EVAS_SCRIPT_YI }, { 0xa4d0, 48, EVAS_SCRIPT_LISU }, { 0xa500, 300, EVAS_SCRIPT_VAI }, { 0xa640, 52, EVAS_SCRIPT_CYRILLIC }, { 0xa67c, 28, EVAS_SCRIPT_CYRILLIC }, { 0xa6a0, 88, EVAS_SCRIPT_BAMUM }, { 0xa700, 34, EVAS_SCRIPT_COMMON }, { 0xa722, 102, EVAS_SCRIPT_LATIN }, { 0xa788, 3, EVAS_SCRIPT_COMMON }, { 0xa78b, 4, EVAS_SCRIPT_LATIN }, { 0xa790, 2, EVAS_SCRIPT_LATIN }, { 0xa7a0, 10, EVAS_SCRIPT_LATIN }, { 0xa7fa, 6, EVAS_SCRIPT_LATIN }, { 0xa800, 44, EVAS_SCRIPT_SYLOTI_NAGRI }, { 0xa830, 10, EVAS_SCRIPT_COMMON }, { 0xa840, 56, EVAS_SCRIPT_PHAGS_PA }, { 0xa880, 69, EVAS_SCRIPT_SAURASHTRA }, { 0xa8ce, 12, EVAS_SCRIPT_SAURASHTRA }, { 0xa8e0, 28, EVAS_SCRIPT_DEVANAGARI }, { 0xa900, 48, EVAS_SCRIPT_KAYAH_LI }, { 0xa930, 36, EVAS_SCRIPT_REJANG }, { 0xa95f, 1, EVAS_SCRIPT_REJANG }, { 0xa960, 29, EVAS_SCRIPT_HANGUL }, { 0xa980, 78, EVAS_SCRIPT_JAVANESE }, { 0xa9cf, 11, EVAS_SCRIPT_JAVANESE }, { 0xa9de, 2, EVAS_SCRIPT_JAVANESE }, { 0xaa00, 55, EVAS_SCRIPT_CHAM }, { 0xaa40, 14, EVAS_SCRIPT_CHAM }, { 0xaa50, 10, EVAS_SCRIPT_CHAM }, { 0xaa5c, 4, EVAS_SCRIPT_CHAM }, { 0xaa60, 28, EVAS_SCRIPT_MYANMAR }, { 0xaa80, 67, EVAS_SCRIPT_TAI_VIET }, { 0xaadb, 5, EVAS_SCRIPT_TAI_VIET }, { 0xab01, 6, EVAS_SCRIPT_ETHIOPIC }, { 0xab09, 6, EVAS_SCRIPT_ETHIOPIC }, { 0xab11, 6, EVAS_SCRIPT_ETHIOPIC }, { 0xab20, 7, EVAS_SCRIPT_ETHIOPIC }, { 0xab28, 7, EVAS_SCRIPT_ETHIOPIC }, { 0xabc0, 46, EVAS_SCRIPT_MEETEI_MAYEK }, { 0xabf0, 10, EVAS_SCRIPT_MEETEI_MAYEK }, { 0xac00, 11172, EVAS_SCRIPT_HANGUL }, { 0xd7b0, 23, EVAS_SCRIPT_HANGUL }, { 0xd7cb, 49, EVAS_SCRIPT_HANGUL }, { 0xf900, 302, EVAS_SCRIPT_HAN }, { 0xfa30, 62, EVAS_SCRIPT_HAN }, { 0xfa70, 106, EVAS_SCRIPT_HAN }, { 0xfb00, 7, EVAS_SCRIPT_LATIN }, { 0xfb13, 5, EVAS_SCRIPT_ARMENIAN }, { 0xfb1d, 26, EVAS_SCRIPT_HEBREW }, { 0xfb38, 5, EVAS_SCRIPT_HEBREW }, { 0xfb3e, 1, EVAS_SCRIPT_HEBREW }, { 0xfb40, 2, EVAS_SCRIPT_HEBREW }, { 0xfb43, 2, EVAS_SCRIPT_HEBREW }, { 0xfb46, 10, EVAS_SCRIPT_HEBREW }, { 0xfb50, 114, EVAS_SCRIPT_ARABIC }, { 0xfbd3, 363, EVAS_SCRIPT_ARABIC }, { 0xfd3e, 2, EVAS_SCRIPT_COMMON }, { 0xfd50, 64, EVAS_SCRIPT_ARABIC }, { 0xfd92, 54, EVAS_SCRIPT_ARABIC }, { 0xfdf0, 13, EVAS_SCRIPT_ARABIC }, { 0xfdfd, 1, EVAS_SCRIPT_COMMON }, { 0xfe00, 16, EVAS_SCRIPT_INHERITED }, { 0xfe10, 10, EVAS_SCRIPT_COMMON }, { 0xfe20, 7, EVAS_SCRIPT_INHERITED }, { 0xfe30, 35, EVAS_SCRIPT_COMMON }, { 0xfe54, 19, EVAS_SCRIPT_COMMON }, { 0xfe68, 4, EVAS_SCRIPT_COMMON }, { 0xfe70, 5, EVAS_SCRIPT_ARABIC }, { 0xfe76, 135, EVAS_SCRIPT_ARABIC }, { 0xfeff, 1, EVAS_SCRIPT_COMMON }, { 0xff01, 32, EVAS_SCRIPT_COMMON }, { 0xff21, 26, EVAS_SCRIPT_LATIN }, { 0xff3b, 6, EVAS_SCRIPT_COMMON }, { 0xff41, 26, EVAS_SCRIPT_LATIN }, { 0xff5b, 11, EVAS_SCRIPT_COMMON }, { 0xff66, 10, EVAS_SCRIPT_KATAKANA }, { 0xff70, 1, EVAS_SCRIPT_COMMON }, { 0xff71, 45, EVAS_SCRIPT_KATAKANA }, { 0xff9e, 2, EVAS_SCRIPT_COMMON }, { 0xffa0, 31, EVAS_SCRIPT_HANGUL }, { 0xffc2, 6, EVAS_SCRIPT_HANGUL }, { 0xffca, 6, EVAS_SCRIPT_HANGUL }, { 0xffd2, 6, EVAS_SCRIPT_HANGUL }, { 0xffda, 3, EVAS_SCRIPT_HANGUL }, { 0xffe0, 7, EVAS_SCRIPT_COMMON }, { 0xffe8, 7, EVAS_SCRIPT_COMMON }, { 0xfff9, 5, EVAS_SCRIPT_COMMON }, { 0x10000, 12, EVAS_SCRIPT_LINEAR_B }, { 0x1000d, 26, EVAS_SCRIPT_LINEAR_B }, { 0x10028, 19, EVAS_SCRIPT_LINEAR_B }, { 0x1003c, 2, EVAS_SCRIPT_LINEAR_B }, { 0x1003f, 15, EVAS_SCRIPT_LINEAR_B }, { 0x10050, 14, EVAS_SCRIPT_LINEAR_B }, { 0x10080, 123, EVAS_SCRIPT_LINEAR_B }, { 0x10100, 3, EVAS_SCRIPT_COMMON }, { 0x10107, 45, EVAS_SCRIPT_COMMON }, { 0x10137, 9, EVAS_SCRIPT_COMMON }, { 0x10140, 75, EVAS_SCRIPT_GREEK }, { 0x10190, 12, EVAS_SCRIPT_COMMON }, { 0x101d0, 45, EVAS_SCRIPT_COMMON }, { 0x101fd, 1, EVAS_SCRIPT_INHERITED }, { 0x10280, 29, EVAS_SCRIPT_LYCIAN }, { 0x102a0, 49, EVAS_SCRIPT_CARIAN }, { 0x10300, 31, EVAS_SCRIPT_OLD_ITALIC }, { 0x10320, 4, EVAS_SCRIPT_OLD_ITALIC }, { 0x10330, 27, EVAS_SCRIPT_GOTHIC }, { 0x10380, 30, EVAS_SCRIPT_UGARITIC }, { 0x1039f, 1, EVAS_SCRIPT_UGARITIC }, { 0x103a0, 36, EVAS_SCRIPT_OLD_PERSIAN }, { 0x103c8, 14, EVAS_SCRIPT_OLD_PERSIAN }, { 0x10400, 80, EVAS_SCRIPT_DESERET }, { 0x10450, 48, EVAS_SCRIPT_SHAVIAN }, { 0x10480, 30, EVAS_SCRIPT_OSMANYA }, { 0x104a0, 10, EVAS_SCRIPT_OSMANYA }, { 0x10800, 6, EVAS_SCRIPT_CYPRIOT }, { 0x10808, 1, EVAS_SCRIPT_CYPRIOT }, { 0x1080a, 44, EVAS_SCRIPT_CYPRIOT }, { 0x10837, 2, EVAS_SCRIPT_CYPRIOT }, { 0x1083c, 1, EVAS_SCRIPT_CYPRIOT }, { 0x1083f, 1, EVAS_SCRIPT_CYPRIOT }, { 0x10840, 22, EVAS_SCRIPT_IMPERIAL_ARAMAIC }, { 0x10857, 9, EVAS_SCRIPT_IMPERIAL_ARAMAIC }, { 0x10900, 28, EVAS_SCRIPT_PHOENICIAN }, { 0x1091f, 1, EVAS_SCRIPT_PHOENICIAN }, { 0x10920, 26, EVAS_SCRIPT_LYDIAN }, { 0x1093f, 1, EVAS_SCRIPT_LYDIAN }, { 0x10a00, 4, EVAS_SCRIPT_KHAROSHTHI }, { 0x10a05, 2, EVAS_SCRIPT_KHAROSHTHI }, { 0x10a0c, 8, EVAS_SCRIPT_KHAROSHTHI }, { 0x10a15, 3, EVAS_SCRIPT_KHAROSHTHI }, { 0x10a19, 27, EVAS_SCRIPT_KHAROSHTHI }, { 0x10a38, 3, EVAS_SCRIPT_KHAROSHTHI }, { 0x10a3f, 9, EVAS_SCRIPT_KHAROSHTHI }, { 0x10a50, 9, EVAS_SCRIPT_KHAROSHTHI }, { 0x10a60, 32, EVAS_SCRIPT_OLD_SOUTH_ARABIAN }, { 0x10b00, 54, EVAS_SCRIPT_AVESTAN }, { 0x10b39, 7, EVAS_SCRIPT_AVESTAN }, { 0x10b40, 22, EVAS_SCRIPT_INSCRIPTIONAL_PARTHIAN }, { 0x10b58, 8, EVAS_SCRIPT_INSCRIPTIONAL_PARTHIAN }, { 0x10b60, 19, EVAS_SCRIPT_INSCRIPTIONAL_PAHLAVI }, { 0x10b78, 8, EVAS_SCRIPT_INSCRIPTIONAL_PAHLAVI }, { 0x10c00, 73, EVAS_SCRIPT_OLD_TURKIC }, { 0x10e60, 31, EVAS_SCRIPT_ARABIC }, { 0x11000, 78, EVAS_SCRIPT_BRAHMI }, { 0x11052, 30, EVAS_SCRIPT_BRAHMI }, { 0x11080, 66, EVAS_SCRIPT_KAITHI }, { 0x12000, 879, EVAS_SCRIPT_CUNEIFORM }, { 0x12400, 99, EVAS_SCRIPT_CUNEIFORM }, { 0x12470, 4, EVAS_SCRIPT_CUNEIFORM }, { 0x13000, 1071, EVAS_SCRIPT_EGYPTIAN_HIEROGLYPHS }, { 0x16800, 569, EVAS_SCRIPT_BAMUM }, { 0x1b000, 1, EVAS_SCRIPT_KATAKANA }, { 0x1b001, 1, EVAS_SCRIPT_HIRAGANA }, { 0x1d000, 246, EVAS_SCRIPT_COMMON }, { 0x1d100, 39, EVAS_SCRIPT_COMMON }, { 0x1d129, 62, EVAS_SCRIPT_COMMON }, { 0x1d167, 3, EVAS_SCRIPT_INHERITED }, { 0x1d16a, 17, EVAS_SCRIPT_COMMON }, { 0x1d17b, 8, EVAS_SCRIPT_INHERITED }, { 0x1d183, 2, EVAS_SCRIPT_COMMON }, { 0x1d185, 7, EVAS_SCRIPT_INHERITED }, { 0x1d18c, 30, EVAS_SCRIPT_COMMON }, { 0x1d1aa, 4, EVAS_SCRIPT_INHERITED }, { 0x1d1ae, 48, EVAS_SCRIPT_COMMON }, { 0x1d200, 70, EVAS_SCRIPT_GREEK }, { 0x1d300, 87, EVAS_SCRIPT_COMMON }, { 0x1d360, 18, EVAS_SCRIPT_COMMON }, { 0x1d400, 85, EVAS_SCRIPT_COMMON }, { 0x1d456, 71, EVAS_SCRIPT_COMMON }, { 0x1d49e, 2, EVAS_SCRIPT_COMMON }, { 0x1d4a2, 1, EVAS_SCRIPT_COMMON }, { 0x1d4a5, 2, EVAS_SCRIPT_COMMON }, { 0x1d4a9, 4, EVAS_SCRIPT_COMMON }, { 0x1d4ae, 12, EVAS_SCRIPT_COMMON }, { 0x1d4bb, 1, EVAS_SCRIPT_COMMON }, { 0x1d4bd, 7, EVAS_SCRIPT_COMMON }, { 0x1d4c5, 65, EVAS_SCRIPT_COMMON }, { 0x1d507, 4, EVAS_SCRIPT_COMMON }, { 0x1d50d, 8, EVAS_SCRIPT_COMMON }, { 0x1d516, 7, EVAS_SCRIPT_COMMON }, { 0x1d51e, 28, EVAS_SCRIPT_COMMON }, { 0x1d53b, 4, EVAS_SCRIPT_COMMON }, { 0x1d540, 5, EVAS_SCRIPT_COMMON }, { 0x1d546, 1, EVAS_SCRIPT_COMMON }, { 0x1d54a, 7, EVAS_SCRIPT_COMMON }, { 0x1d552, 340, EVAS_SCRIPT_COMMON }, { 0x1d6a8, 292, EVAS_SCRIPT_COMMON }, { 0x1d7ce, 50, EVAS_SCRIPT_COMMON }, { 0x1f000, 44, EVAS_SCRIPT_COMMON }, { 0x1f030, 100, EVAS_SCRIPT_COMMON }, { 0x1f0a0, 15, EVAS_SCRIPT_COMMON }, { 0x1f0b1, 14, EVAS_SCRIPT_COMMON }, { 0x1f0c1, 15, EVAS_SCRIPT_COMMON }, { 0x1f0d1, 15, EVAS_SCRIPT_COMMON }, { 0x1f100, 11, EVAS_SCRIPT_COMMON }, { 0x1f110, 31, EVAS_SCRIPT_COMMON }, { 0x1f130, 58, EVAS_SCRIPT_COMMON }, { 0x1f170, 43, EVAS_SCRIPT_COMMON }, { 0x1f1e6, 26, EVAS_SCRIPT_COMMON }, { 0x1f200, 1, EVAS_SCRIPT_HIRAGANA }, { 0x1f201, 2, EVAS_SCRIPT_COMMON }, { 0x1f210, 43, EVAS_SCRIPT_COMMON }, { 0x1f240, 9, EVAS_SCRIPT_COMMON }, { 0x1f250, 2, EVAS_SCRIPT_COMMON }, { 0x1f300, 33, EVAS_SCRIPT_COMMON }, { 0x1f330, 6, EVAS_SCRIPT_COMMON }, { 0x1f337, 70, EVAS_SCRIPT_COMMON }, { 0x1f380, 20, EVAS_SCRIPT_COMMON }, { 0x1f3a0, 37, EVAS_SCRIPT_COMMON }, { 0x1f3c6, 5, EVAS_SCRIPT_COMMON }, { 0x1f3e0, 17, EVAS_SCRIPT_COMMON }, { 0x1f400, 63, EVAS_SCRIPT_COMMON }, { 0x1f440, 1, EVAS_SCRIPT_COMMON }, { 0x1f442, 182, EVAS_SCRIPT_COMMON }, { 0x1f4f9, 4, EVAS_SCRIPT_COMMON }, { 0x1f500, 62, EVAS_SCRIPT_COMMON }, { 0x1f550, 24, EVAS_SCRIPT_COMMON }, { 0x1f5fb, 5, EVAS_SCRIPT_COMMON }, { 0x1f601, 16, EVAS_SCRIPT_COMMON }, { 0x1f612, 3, EVAS_SCRIPT_COMMON }, { 0x1f616, 1, EVAS_SCRIPT_COMMON }, { 0x1f618, 1, EVAS_SCRIPT_COMMON }, { 0x1f61a, 1, EVAS_SCRIPT_COMMON }, { 0x1f61c, 3, EVAS_SCRIPT_COMMON }, { 0x1f620, 6, EVAS_SCRIPT_COMMON }, { 0x1f628, 4, EVAS_SCRIPT_COMMON }, { 0x1f62d, 1, EVAS_SCRIPT_COMMON }, { 0x1f630, 4, EVAS_SCRIPT_COMMON }, { 0x1f635, 12, EVAS_SCRIPT_COMMON }, { 0x1f645, 11, EVAS_SCRIPT_COMMON }, { 0x1f680, 70, EVAS_SCRIPT_COMMON }, { 0x1f700, 116, EVAS_SCRIPT_COMMON }, { 0x20000, 42711, EVAS_SCRIPT_HAN }, { 0x2a700, 4149, EVAS_SCRIPT_HAN }, { 0x2b740, 222, EVAS_SCRIPT_HAN }, { 0x2f800, 542, EVAS_SCRIPT_HAN }, { 0xe0001, 1, EVAS_SCRIPT_COMMON }, { 0xe0020, 96, EVAS_SCRIPT_COMMON }, { 0xe0100, 240, EVAS_SCRIPT_INHERITED }, }; evas-1.7.9/src/lib/engines/common/language/evas_bidi_utils.c0000664000175000017500000004034312213647747021003 00000000000000#ifdef HAVE_CONFIG_H # include #endif #include #include #include "evas_common.h" #include "evas_bidi_utils.h" #include "evas_font_private.h" #ifdef BIDI_SUPPORT #include /** * @internal * @addtogroup Evas_Utils * * @{ */ /** * @internal * @addtogroup Evas_BiDi * * @{ */ /** * @internal * @def _SAFE_FREE(x) * checks if x is not NULL, if it's not, it's freed and set to NULL. */ #define _SAFE_FREE(x) \ do { \ if (x) \ { \ free(x); \ x = NULL; \ } \ } while(0) #if SIZEOF_FRIBIDICHAR != SIZEOF_EINA_UNICODE # define EVAS_FRIBIDI_EINA_UNICODE_UNEQUAL #endif #ifdef EVAS_FRIBIDI_EINA_UNICODE_UNEQUAL /* Convert bidichar to eina_unicode assume both are valid pointers */ static Eina_Unicode * _evas_bidi_fribidichar_to_unicode(Eina_Unicode *dest, const FriBidiChar *src) { Eina_Unicode *ret = dest; while (*src) *dest++ = *src++; *dest = 0; return ret; } /* Convert eina_unicode to bidi_char assume both are valid pointers */ static FriBidiChar * _evas_bidi_unicode_to_fribidichar(FriBidiChar *dest, const Eina_Unicode *src) { FriBidiChar *ret = dest; while (*src) *dest++ = *src++; *dest = 0; return ret; } #endif /** * @internal * Checks if the string has RTL characters. * * @param str The string to be checked * @return #EINA_TRUE if true, #EINA_FALSE otherwise. */ Eina_Bool evas_bidi_is_rtl_str(const Eina_Unicode *str) { EvasBiDiCharType type; if (!str) return EINA_FALSE; for ( ; *str ; str++) { type = fribidi_get_bidi_type((FriBidiChar) *str); if (FRIBIDI_IS_RTL(type)) { return EINA_TRUE; } } return EINA_FALSE; } /** * @internal * Shapes the string ustr according to the bidi properties. * * @param str The string to shape * @param bidi_props the bidi props to shaped according. * @param start the start of the string to shape (offset in bidi_props) * @param len the length of th string. * @return #EINA_TRUE on success, #EINA_FALSE otherwise. */ EAPI Eina_Bool evas_bidi_shape_string(Eina_Unicode *eina_ustr, const Evas_BiDi_Paragraph_Props *bidi_props, size_t start, size_t len) { FriBidiChar *ustr, *base_ustr = NULL; if (!bidi_props) return EINA_FALSE; /* The size of fribidichar is different than eina_unicode, convert */ #ifdef EVAS_FRIBIDI_EINA_UNICODE_UNEQUAL base_ustr = ustr = calloc(len + 1, sizeof(FriBidiChar)); ustr = _evas_bidi_unicode_to_fribidichar(ustr, eina_ustr); #else (void) base_ustr; ustr = (FriBidiChar *) eina_ustr; #endif EvasBiDiJoiningType *join_types = NULL; join_types = (EvasBiDiJoiningType *) malloc(sizeof(EvasBiDiJoiningType) * len); if (!join_types) { return EINA_FALSE; } fribidi_get_joining_types(ustr, len, join_types); fribidi_join_arabic(bidi_props->char_types + start, len, bidi_props->embedding_levels + start, join_types); /* Actually modify the string */ fribidi_shape(FRIBIDI_FLAGS_DEFAULT | FRIBIDI_FLAGS_ARABIC, bidi_props->embedding_levels + start, len, join_types, ustr); if (join_types) free(join_types); /* Convert back */ #ifdef EVAS_FRIBIDI_EINA_UNICODE_UNEQUAL eina_ustr = _evas_bidi_fribidichar_to_unicode(eina_ustr, ustr); if (base_ustr) free(base_ustr); #endif return EINA_TRUE; } /** * @internal * Return a -1 terminated array of the indexes of the delimiters (passed in * delim) found in the string. This result should be used with par_props_get. * * @param str The string to parse * @param delim a list of delimiters to work with. * @return returns a -1 terminated array of indexes according to positions of the delimiters found. NULL if there were none. */ int * evas_bidi_segment_idxs_get(const Eina_Unicode *str, const char *delim) { Eina_Unicode *udelim; const Eina_Unicode *str_base = str; int *ret, *tmp_ret; int ret_idx = 0, ret_len = 10; /* arbitrary choice */ udelim = eina_unicode_utf8_to_unicode(delim, NULL); ret = malloc(ret_len * sizeof(int)); for ( ; *str ; str++) { const Eina_Unicode *del; for (del = udelim ; *del ; del++) { if (*str == *del) { if (ret_idx >= ret_len) { /* arbitrary choice */ ret_len += 20; tmp_ret = realloc(ret, ret_len * sizeof(int)); if (!tmp_ret) { free(ret); free(udelim); return NULL; } ret = tmp_ret; } ret[ret_idx++] = str - str_base; break; } } } free(udelim); /* If no indexes were found return NULL */ if (ret_idx == 0) { free(ret); return NULL; } ret[ret_idx] = -1; tmp_ret = realloc(ret, (ret_idx + 1) * sizeof(int)); return (tmp_ret) ? tmp_ret : ret; } /** * @internal * Allocates bidi properties according to ustr. First checks to see if the * passed has rtl chars, if not, it returns NULL. * * Assumes all the segment_idxs are either -1 or legal, and > 0 indexes. * Also assumes that the characters at the override points are of weak/neutral * bidi type, otherwise unexpected results may occur. * * @param ustr The string to update according to. * @param len The length of the string * @param segment_idxs A -1 terminated array of points to start a new bidi analysis at (used for section high level bidi overrides). - NULL means none. * @return returns allocated paragraph props on success, NULL otherwise. */ Evas_BiDi_Paragraph_Props * evas_bidi_paragraph_props_get(const Eina_Unicode *eina_ustr, size_t len, int *segment_idxs) { Evas_BiDi_Paragraph_Props *bidi_props = NULL; EvasBiDiCharType *char_types = NULL; EvasBiDiLevel *embedding_levels = NULL; const FriBidiChar *ustr; FriBidiChar *base_ustr = NULL; if (!eina_ustr) return NULL; if (!evas_bidi_is_rtl_str(eina_ustr)) /* No need to handle bidi */ { len = -1; goto cleanup; } len = eina_unicode_strlen(eina_ustr); /* The size of fribidichar s different than eina_unicode, convert */ #ifdef EVAS_FRIBIDI_EINA_UNICODE_UNEQUAL base_ustr = calloc(len + 1, sizeof(FriBidiChar)); base_ustr = _evas_bidi_unicode_to_fribidichar(base_ustr, eina_ustr); ustr = base_ustr; #else ustr = (const FriBidiChar *) eina_ustr; #endif bidi_props = evas_bidi_paragraph_props_new(); /* Prep work for reordering */ char_types = (EvasBiDiCharType *) malloc(sizeof(EvasBiDiCharType) * len); if (!char_types) { len = -2; goto cleanup; } fribidi_get_bidi_types(ustr, len, char_types); embedding_levels = (EvasBiDiLevel *)malloc(sizeof(EvasBiDiLevel) * len); if (!embedding_levels) { len = -2; goto cleanup; } if (segment_idxs) { size_t pos = 0; int *itr; EvasBiDiLevel base_level = 0; EvasBiDiParType direction; for (itr = segment_idxs ; *itr > 0 ; itr++) { direction = EVAS_BIDI_PARAGRAPH_NEUTRAL; if (!fribidi_get_par_embedding_levels(char_types + pos, *itr - pos, &direction, embedding_levels + pos)) { len = -2; goto cleanup; } /* Only on the first run */ if (itr == segment_idxs) { bidi_props->direction = direction; /* adjust base_level to be 1 for rtl paragraphs, and 0 for * ltr paragraphs. */ base_level = EVAS_BIDI_PARAGRAPH_DIRECTION_IS_RTL(bidi_props) ? 1 : 0; } /* We want those chars at the override points to be on the base * level and we also remove -2 cause we later increment them, * just for simpler code paths */ embedding_levels[*itr] = base_level - 2; pos = *itr + 1; } direction = EVAS_BIDI_PARAGRAPH_NEUTRAL; if (!fribidi_get_par_embedding_levels(char_types + pos, len - pos, &direction, embedding_levels + pos)) { len = -2; goto cleanup; } /* Increment all levels by 2 to emulate embedding. */ { EvasBiDiLevel *bitr = embedding_levels, *end; end = bitr + len; for ( ; bitr < end ; bitr++) { *bitr += 2; } } } else { if (!fribidi_get_par_embedding_levels(char_types, len, &bidi_props->direction, embedding_levels)) { len = -2; goto cleanup; } } /* clean up */ if (bidi_props->embedding_levels) { free(bidi_props->embedding_levels); } bidi_props->embedding_levels = embedding_levels; /* clean up */ if (bidi_props->char_types) { free(bidi_props->char_types); } bidi_props->char_types = char_types; if (base_ustr) free(base_ustr); return bidi_props; /* Cleanup */ cleanup: if (char_types) free(char_types); if (embedding_levels) free(embedding_levels); if (base_ustr) free(base_ustr); if (bidi_props) evas_bidi_paragraph_props_unref(bidi_props); /* Clean up the bidi props */ return NULL; } /** * @internal * Copies dst to src and refs (doesn't copy) the paragraph props. * * @param src the props to copy * @param dst the props to copy to. */ void evas_bidi_props_copy_and_ref(const Evas_BiDi_Props *src, Evas_BiDi_Props *dst) { dst->dir = src->dir; } /** * @internal * Reorders ustr according to the bidi props. * * @param ustr the string to reorder. - Null is ok, will just populate the map. * @param start the start of the line * @param len the length of the line * @param props the paragraph props to reorder according to * @param _v_to_l The visual to logical map to populate - if NULL it won't populate it. * @return #EINA_FALSE on success, #EINA_TRUE on error. */ Eina_Bool evas_bidi_props_reorder_line(Eina_Unicode *eina_ustr, size_t start, size_t len, const Evas_BiDi_Paragraph_Props *props, EvasBiDiStrIndex **_v_to_l) { EvasBiDiStrIndex *v_to_l = NULL; FriBidiChar *ustr = NULL, *base_ustr = NULL; if (!props) return EINA_FALSE; if (eina_ustr) { /* The size of fribidichar is different than eina_unicode, convert */ #ifdef EVAS_FRIBIDI_EINA_UNICODE_UNEQUAL base_ustr = ustr = calloc(len + 1, sizeof(FriBidiChar)); ustr = _evas_bidi_unicode_to_fribidichar(ustr, eina_ustr); #else ustr = (FriBidiChar *) eina_ustr; #endif } if (_v_to_l) { size_t i; v_to_l = *_v_to_l = calloc(len, sizeof(EvasBiDiStrIndex)); if (!v_to_l) { goto error; } /* init the array for fribidi */ for (i = 0 ; i < len ; i++) { v_to_l[i] = i; } } { EvasBiDiLevel *emb_lvl; emb_lvl = malloc((start + len) * sizeof(EvasBiDiLevel)); memcpy(emb_lvl, props->embedding_levels, (start + len) * sizeof(EvasBiDiLevel)); /* We pass v_to_l - start, because fribidi assumes start is the offset * from the start of v_to_l as well, not just the props. */ if (!fribidi_reorder_line (FRIBIDI_FLAGS_DEFAULT, props->char_types, len, start, props->direction, emb_lvl, ustr, v_to_l - start)) { free(emb_lvl); goto error; } free(emb_lvl); } /* The size of fribidichar is different than eina_unicode, convert */ #ifdef EVAS_FRIBIDI_EINA_UNICODE_UNEQUAL _evas_bidi_fribidichar_to_unicode(eina_ustr, base_ustr); free(base_ustr); #endif return EINA_FALSE; /* ERROR HANDLING */ error: if (base_ustr) free(base_ustr); _SAFE_FREE(v_to_l); return EINA_TRUE; } /** * @internal * Returns the end of the current run of text * * @param bidi_props the paragraph properties * @param start where to start looking from * @param len the length of the string * @return the position of the end of the run (offset from * bidi_props->props->start), 0 when there is no end (i.e all the text) */ int evas_bidi_end_of_run_get(const Evas_BiDi_Paragraph_Props *bidi_props, size_t start, int len) { EvasBiDiLevel *i; EvasBiDiLevel base; if (!bidi_props || (len <= 0)) return 0; i = bidi_props->embedding_levels + start; base = *i; for ( ; (len > 0) && (base == *i) ; len--, i++) ; if (len == 0) { return 0; } return i - (bidi_props->embedding_levels + start); } /** * @internal * Returns the visual string index from the logical string index. * * @param v_to_l the visual to logical map * @param len the length of the map. * @param position the position to convert. * @return on success the visual position, on failure the same position. */ EvasBiDiStrIndex evas_bidi_position_logical_to_visual(EvasBiDiStrIndex *v_to_l, int len, EvasBiDiStrIndex position) { int i; EvasBiDiStrIndex *ind; if (position >= len || !v_to_l) return position; for (i = 0, ind = v_to_l ; i < len ; i++, ind++) { if (*ind == position) { return i; } } return position; } /** * @internal * Returns the reversed pos of the index. * * @param dir the direction of the string * @param len the length of the map. * @param position the position to convert. * @return on success the visual position, on failure the same position. */ EvasBiDiStrIndex evas_bidi_position_reverse(const Evas_BiDi_Props *props, int len, EvasBiDiStrIndex position) { if (!props || position >= len) return position; return (props->dir == EVAS_BIDI_DIRECTION_RTL) ? (len - 1) - position : position; } /** * @internal * Checks if the char is rtl oriented. I.e even a neutral char can become rtl * if surrounded by rtl chars. * * @param bidi_props The bidi paragraph properties * @param start the base position * @param index the offset from the base position. * @return #EINA_TRUE if true, #EINA_FALSE otherwise. */ Eina_Bool evas_bidi_is_rtl_char(const Evas_BiDi_Paragraph_Props *bidi_props, size_t start, EvasBiDiStrIndex ind) { if(!bidi_props || ind < 0) return EINA_FALSE; return (FRIBIDI_IS_RTL( bidi_props->embedding_levels[ind + start])) ? EINA_TRUE : EINA_FALSE; } Evas_BiDi_Paragraph_Props * evas_bidi_paragraph_props_new(void) { Evas_BiDi_Paragraph_Props *ret; ret = calloc(1, sizeof(Evas_BiDi_Paragraph_Props)); ret->direction = EVAS_BIDI_PARAGRAPH_NEUTRAL; ret->refcount = 1; return ret; } /** * @internal * Refs the bidi props. * * @param bidi_props the props to ref. */ Evas_BiDi_Paragraph_Props * evas_bidi_paragraph_props_ref(Evas_BiDi_Paragraph_Props *bidi_props) { if (!bidi_props) return NULL; BIDILOCK(); bidi_props->refcount++; BIDIUNLOCK(); return bidi_props; } /** * @internal * Unrefs and potentially frees the props. * * @param bidi_props the properties to unref */ void evas_bidi_paragraph_props_unref(Evas_BiDi_Paragraph_Props *bidi_props) { if (!bidi_props) return; BIDILOCK(); if (--bidi_props->refcount == 0) { evas_bidi_paragraph_props_clean(bidi_props); free(bidi_props); } BIDIUNLOCK(); } /** * @internal * Cleans the paragraph properties. * * @param bidi_props the properties to clean. */ void evas_bidi_paragraph_props_clean(Evas_BiDi_Paragraph_Props *bidi_props) { _SAFE_FREE(bidi_props->embedding_levels); _SAFE_FREE(bidi_props->char_types); } /** * @internal * Cleans the bidi properties. * * @param bidi_props the properties to clean. */ void evas_bidi_props_clean(Evas_BiDi_Props *bidi_props) { if (!bidi_props) return; bidi_props->dir = EVAS_BIDI_DIRECTION_NEUTRAL; } /** * @} */ /** * @} */ #endif #if 0 /* Good for debugging */ static void dump_levels(Eina_Unicode *ustr, EvasBiDiLevel *emb) { for ( ; *ustr ; ustr++, emb++) { printf("%lc %d\n", *ustr, *emb); } } #endif evas-1.7.9/src/lib/engines/common/language/evas_language_utils.h0000664000175000017500000001207712175475547021673 00000000000000#ifndef _EVAS_LANGUAGE_UTILS #define _EVAS_LANGUAGE_UTILS #include #include "evas_bidi_utils.h" /* Unicode Script property */ typedef enum { EVAS_SCRIPT_COMMON = 0, /* Zyyy */ EVAS_SCRIPT_INHERITED, /* Qaai */ EVAS_SCRIPT_ARABIC, /* Arab */ EVAS_SCRIPT_ARMENIAN, /* Armn */ EVAS_SCRIPT_BENGALI, /* Beng */ EVAS_SCRIPT_BOPOMOFO, /* Bopo */ EVAS_SCRIPT_CHEROKEE, /* Cher */ EVAS_SCRIPT_COPTIC, /* Qaac */ EVAS_SCRIPT_CYRILLIC, /* Cyrl (Cyrs) */ EVAS_SCRIPT_DESERET, /* Dsrt */ EVAS_SCRIPT_DEVANAGARI, /* Deva */ EVAS_SCRIPT_ETHIOPIC, /* Ethi */ EVAS_SCRIPT_GEORGIAN, /* Geor (Geon, Geoa) */ EVAS_SCRIPT_GOTHIC, /* Goth */ EVAS_SCRIPT_GREEK, /* Grek */ EVAS_SCRIPT_GUJARATI, /* Gujr */ EVAS_SCRIPT_GURMUKHI, /* Guru */ EVAS_SCRIPT_HAN, /* Hani */ EVAS_SCRIPT_HANGUL, /* Hang */ EVAS_SCRIPT_HEBREW, /* Hebr */ EVAS_SCRIPT_HIRAGANA, /* Hira */ EVAS_SCRIPT_KANNADA, /* Knda */ EVAS_SCRIPT_KATAKANA, /* Kana */ EVAS_SCRIPT_KHMER, /* Khmr */ EVAS_SCRIPT_LAO, /* Laoo */ EVAS_SCRIPT_LATIN, /* Latn (Latf, Latg) */ EVAS_SCRIPT_MALAYALAM, /* Mlym */ EVAS_SCRIPT_MONGOLIAN, /* Mong */ EVAS_SCRIPT_MYANMAR, /* Mymr */ EVAS_SCRIPT_OGHAM, /* Ogam */ EVAS_SCRIPT_OLD_ITALIC, /* Ital */ EVAS_SCRIPT_ORIYA, /* Orya */ EVAS_SCRIPT_RUNIC, /* Runr */ EVAS_SCRIPT_SINHALA, /* Sinh */ EVAS_SCRIPT_SYRIAC, /* Syrc (Syrj, Syrn, Syre) */ EVAS_SCRIPT_TAMIL, /* Taml */ EVAS_SCRIPT_TELUGU, /* Telu */ EVAS_SCRIPT_THAANA, /* Thaa */ EVAS_SCRIPT_THAI, /* Thai */ EVAS_SCRIPT_TIBETAN, /* Tibt */ EVAS_SCRIPT_CANADIAN_ABORIGINAL, /* Cans */ EVAS_SCRIPT_YI, /* Yiii */ EVAS_SCRIPT_TAGALOG, /* Tglg */ EVAS_SCRIPT_HANUNOO, /* Hano */ EVAS_SCRIPT_BUHID, /* Buhd */ EVAS_SCRIPT_TAGBANWA, /* Tagb */ /* Unicode-4.0 additions */ EVAS_SCRIPT_BRAILLE, /* Brai */ EVAS_SCRIPT_CYPRIOT, /* Cprt */ EVAS_SCRIPT_LIMBU, /* Limb */ EVAS_SCRIPT_OSMANYA, /* Osma */ EVAS_SCRIPT_SHAVIAN, /* Shaw */ EVAS_SCRIPT_LINEAR_B, /* Linb */ EVAS_SCRIPT_TAI_LE, /* Tale */ EVAS_SCRIPT_UGARITIC, /* Ugar */ /* Unicode-4.1 additions */ EVAS_SCRIPT_NEW_TAI_LUE, /* Talu */ EVAS_SCRIPT_BUGINESE, /* Bugi */ EVAS_SCRIPT_GLAGOLITIC, /* Glag */ EVAS_SCRIPT_TIFINAGH, /* Tfng */ EVAS_SCRIPT_SYLOTI_NAGRI, /* Sylo */ EVAS_SCRIPT_OLD_PERSIAN, /* Xpeo */ EVAS_SCRIPT_KHAROSHTHI, /* Khar */ /* Unicode-5.0 additions */ EVAS_SCRIPT_UNKNOWN, /* Zzzz */ EVAS_SCRIPT_BALINESE, /* Bali */ EVAS_SCRIPT_CUNEIFORM, /* Xsux */ EVAS_SCRIPT_PHOENICIAN, /* Phnx */ EVAS_SCRIPT_PHAGS_PA, /* Phag */ EVAS_SCRIPT_NKO, /* Nkoo */ /* Unicode-5.1 additions */ EVAS_SCRIPT_KAYAH_LI, /* Kali */ EVAS_SCRIPT_LEPCHA, /* Lepc */ EVAS_SCRIPT_REJANG, /* Rjng */ EVAS_SCRIPT_SUNDANESE, /* Sund */ EVAS_SCRIPT_SAURASHTRA, /* Saur */ EVAS_SCRIPT_CHAM, /* Cham */ EVAS_SCRIPT_OL_CHIKI, /* Olck */ EVAS_SCRIPT_VAI, /* Vaii */ EVAS_SCRIPT_CARIAN, /* Cari */ EVAS_SCRIPT_LYCIAN, /* Lyci */ EVAS_SCRIPT_LYDIAN, /* Lydi */ /* Unicode-5.2 additions */ EVAS_SCRIPT_AVESTAN, /* Avst */ EVAS_SCRIPT_BAMUM, /* Bamu */ EVAS_SCRIPT_EGYPTIAN_HIEROGLYPHS, /* Egyp */ EVAS_SCRIPT_IMPERIAL_ARAMAIC, /* Armi */ EVAS_SCRIPT_INSCRIPTIONAL_PAHLAVI, /* Phli */ EVAS_SCRIPT_INSCRIPTIONAL_PARTHIAN, /* Prti */ EVAS_SCRIPT_JAVANESE, /* Java */ EVAS_SCRIPT_KAITHI, /* Kthi */ EVAS_SCRIPT_LISU, /* Lisu */ EVAS_SCRIPT_MEETEI_MAYEK, /* Mtei */ EVAS_SCRIPT_OLD_SOUTH_ARABIAN, /* Sarb */ EVAS_SCRIPT_OLD_TURKIC, /* Orkh */ EVAS_SCRIPT_SAMARITAN, /* Samr */ EVAS_SCRIPT_TAI_THAM, /* Lana */ EVAS_SCRIPT_TAI_VIET, /* Tavt */ /* Unicode-6.0 additions */ EVAS_SCRIPT_BATAK, /* Batk */ EVAS_SCRIPT_BRAHMI, /* Brah */ EVAS_SCRIPT_MANDAIC, /* Mand */ } Evas_Script_Type; int evas_common_language_script_end_of_run_get(const Eina_Unicode *str, const Evas_BiDi_Paragraph_Props *bidi_props, size_t start, int len); Evas_Script_Type evas_common_language_script_type_get(const Eina_Unicode *str, size_t len); Evas_Script_Type evas_common_language_char_script_get(Eina_Unicode unicode); const char * evas_common_language_from_locale_get(void); #endif evas-1.7.9/src/lib/engines/common/evas_image.h0000664000175000017500000000757412175475547016175 00000000000000#ifndef _EVAS_IMAGE_H #define _EVAS_IMAGE_H EAPI void evas_common_image_init (void); EAPI void evas_common_image_shutdown (void); EAPI void evas_common_image_image_all_unload (void); EAPI void evas_common_rgba_image_free (Image_Entry *ie); EAPI void evas_common_rgba_image_unload (Image_Entry *ie); EAPI void evas_common_image_colorspace_normalize (RGBA_Image *im); EAPI void evas_common_image_colorspace_dirty (RGBA_Image *im); EAPI void evas_common_image_cache_free (void); /*2*/ EAPI void evas_common_image_premul (Image_Entry *ie); /*2*/ EAPI void evas_common_image_set_alpha_sparse (Image_Entry *ie); /*2*/ /* EAPI RGBA_Image *evas_common_image_alpha_create (int w, int h); */ /* EAPI RGBA_Image *evas_common_image_create (int w, int h); */ EAPI RGBA_Image *evas_common_image_new (unsigned int w, unsigned int h, unsigned int alpha); EAPI Evas_Cache_Image *evas_common_image_cache_get (void); #ifdef EVAS_CSERVE2 EAPI Evas_Cache2 *evas_common_image_cache2_get (void); #endif EAPI void evas_common_image_set_cache (unsigned int size); EAPI int evas_common_image_get_cache (void); EAPI RGBA_Image *evas_common_image_line_buffer_obtain (int len); EAPI void evas_common_image_line_buffer_release (RGBA_Image *im); EAPI RGBA_Image *evas_common_image_alpha_line_buffer_obtain (int len); EAPI void evas_common_image_alpha_line_buffer_release (RGBA_Image *im); EAPI void evas_common_image_alpha_line_buffer_free (RGBA_Image *im); EAPI RGBA_Image *evas_common_load_image_from_file (const char *file, const char *key, RGBA_Image_Loadopts *lo, int *error); EAPI int evas_common_save_image_to_file (RGBA_Image *im, const char *file, const char *key, int quality, int compress); EAPI void evas_common_rgba_image_scalecache_init(Image_Entry *ie); EAPI void evas_common_rgba_image_scalecache_shutdown(Image_Entry *ie); EAPI void evas_common_rgba_image_scalecache_size_set(unsigned int size); EAPI unsigned int evas_common_rgba_image_scalecache_size_get(void); EAPI void evas_common_rgba_image_scalecache_flush(void); EAPI void evas_common_rgba_image_scalecache_dump(void); EAPI void evas_common_rgba_image_scalecache_prepare(Image_Entry *ie, RGBA_Image *dst, RGBA_Draw_Context *dc, int smooth, 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); EAPI void evas_common_rgba_image_scalecache_do(Image_Entry *ie, RGBA_Image *dst, RGBA_Draw_Context *dc, int smooth, 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); EAPI int evas_common_load_rgba_image_module_from_file (Image_Entry *im); EAPI int evas_common_load_rgba_image_data_from_file (Image_Entry *im); EAPI double evas_common_load_rgba_image_frame_duration_from_file(Image_Entry *im, int start_frame, int frame_num); void _evas_common_rgba_image_post_surface(Image_Entry *ie); EAPI Eina_Bool evas_common_extension_can_load_get(const char *file); #endif /* _EVAS_IMAGE_H */ evas-1.7.9/src/lib/engines/common/evas_scale_smooth_scaler_downy.c0000664000175000017500000001272112175475547022325 00000000000000{ int Cy, j; DATA32 *dptr, *pix, *pbuf, **yp; int r, g, b, a, rr, gg, bb, aa; int *xp, xap, yap, pos; //int dyy, dxx; int w = dst_clip_w; dptr = dst_ptr; pos = (src_region_y * src_w) + src_region_x; //dyy = dst_clip_y - dst_region_y; //dxx = dst_clip_x - dst_region_x; xp = xpoints;// + dxx; yp = ypoints;// + dyy; xapp = xapoints;// + dxx; yapp = yapoints;// + dyy; pbuf = buf; if (src->cache_entry.flags.alpha) { while (dst_clip_h--) { Cy = *yapp >> 16; yap = *yapp & 0xffff; while (dst_clip_w--) { pix = *yp + *xp + pos; a = (A_VAL(pix) * yap) >> 10; r = (R_VAL(pix) * yap) >> 10; g = (G_VAL(pix) * yap) >> 10; b = (B_VAL(pix) * yap) >> 10; for (j = (1 << 14) - yap; j > Cy; j -= Cy) { pix += src_w; a += (A_VAL(pix) * Cy) >> 10; r += (R_VAL(pix) * Cy) >> 10; g += (G_VAL(pix) * Cy) >> 10; b += (B_VAL(pix) * Cy) >> 10; } if (j > 0) { pix += src_w; a += (A_VAL(pix) * j) >> 10; r += (R_VAL(pix) * j) >> 10; g += (G_VAL(pix) * j) >> 10; b += (B_VAL(pix) * j) >> 10; } if ((xap = *xapp) > 0) { pix = *yp + *xp + 1 + pos; aa = (A_VAL(pix) * yap) >> 10; rr = (R_VAL(pix) * yap) >> 10; gg = (G_VAL(pix) * yap) >> 10; bb = (B_VAL(pix) * yap) >> 10; for (j = (1 << 14) - yap; j > Cy; j -= Cy) { pix += src_w; aa += (A_VAL(pix) * Cy) >> 10; rr += (R_VAL(pix) * Cy) >> 10; gg += (G_VAL(pix) * Cy) >> 10; bb += (B_VAL(pix) * Cy) >> 10; } if (j > 0) { pix += src_w; aa += (A_VAL(pix) * j) >> 10; rr += (R_VAL(pix) * j) >> 10; gg += (G_VAL(pix) * j) >> 10; bb += (B_VAL(pix) * j) >> 10; } a += ((aa - a) * xap) >> 8; r += ((rr - r) * xap) >> 8; g += ((gg - g) * xap) >> 8; b += ((bb - b) * xap) >> 8; } *pbuf++ = ARGB_JOIN(((a + (1 << 3)) >> 4), ((r + (1 << 3)) >> 4), ((g + (1 << 3)) >> 4), ((b + (1 << 3)) >> 4)); xp++; xapp++; } func(buf, NULL, dc->mul.col, dptr, w); pbuf = buf; dptr += dst_w; dst_clip_w = w; yp++; yapp++; xp = xpoints;// + dxx; xapp = xapoints;// + dxx; } } else { #ifdef DIRECT_SCALE if ((!src->cache_entry.flags.alpha) && (!dst->cache_entry.flags.alpha) && (!dc->mul.use)) { while (dst_clip_h--) { Cy = *yapp >> 16; yap = *yapp & 0xffff; pbuf = dptr; while (dst_clip_w--) { pix = *yp + *xp + pos; r = (R_VAL(pix) * yap) >> 10; g = (G_VAL(pix) * yap) >> 10; b = (B_VAL(pix) * yap) >> 10; for (j = (1 << 14) - yap; j > Cy; j -= Cy) { pix += src_w; r += (R_VAL(pix) * Cy) >> 10; g += (G_VAL(pix) * Cy) >> 10; b += (B_VAL(pix) * Cy) >> 10; } if (j > 0) { pix += src_w; r += (R_VAL(pix) * j) >> 10; g += (G_VAL(pix) * j) >> 10; b += (B_VAL(pix) * j) >> 10; } if ((xap = *xapp) > 0) { pix = *yp + *xp + 1 + pos; rr = (R_VAL(pix) * yap) >> 10; gg = (G_VAL(pix) * yap) >> 10; bb = (B_VAL(pix) * yap) >> 10; for (j = (1 << 14) - yap; j > Cy; j -= Cy) { pix += src_w; rr += (R_VAL(pix) * Cy) >> 10; gg += (G_VAL(pix) * Cy) >> 10; bb += (B_VAL(pix) * Cy) >> 10; } if (j > 0) { pix += src_w; rr += (R_VAL(pix) * j) >> 10; gg += (G_VAL(pix) * j) >> 10; bb += (B_VAL(pix) * j) >> 10; } r += ((rr - r) * xap) >> 8; g += ((gg - g) * xap) >> 8; b += ((bb - b) * xap) >> 8; } *pbuf++ = ARGB_JOIN(0xff, ((r + (1 << 3)) >> 4), ((g + (1 << 3)) >> 4), ((b + (1 << 3)) >> 4)); xp++; xapp++; } dptr += dst_w; dst_clip_w = w; yp++; yapp++; xp = xpoints;// + dxx; xapp = xapoints;// + dxx; } } else #endif { while (dst_clip_h--) { Cy = *yapp >> 16; yap = *yapp & 0xffff; while (dst_clip_w--) { pix = *yp + *xp + pos; r = (R_VAL(pix) * yap) >> 10; g = (G_VAL(pix) * yap) >> 10; b = (B_VAL(pix) * yap) >> 10; for (j = (1 << 14) - yap; j > Cy; j -= Cy) { pix += src_w; r += (R_VAL(pix) * Cy) >> 10; g += (G_VAL(pix) * Cy) >> 10; b += (B_VAL(pix) * Cy) >> 10; } if (j > 0) { pix += src_w; r += (R_VAL(pix) * j) >> 10; g += (G_VAL(pix) * j) >> 10; b += (B_VAL(pix) * j) >> 10; } if ((xap = *xapp) > 0) { pix = *yp + *xp + 1 + pos; rr = (R_VAL(pix) * yap) >> 10; gg = (G_VAL(pix) * yap) >> 10; bb = (B_VAL(pix) * yap) >> 10; for (j = (1 << 14) - yap; j > Cy; j -= Cy) { pix += src_w; rr += (R_VAL(pix) * Cy) >> 10; gg += (G_VAL(pix) * Cy) >> 10; bb += (B_VAL(pix) * Cy) >> 10; } if (j > 0) { pix += src_w; rr += (R_VAL(pix) * j) >> 10; gg += (G_VAL(pix) * j) >> 10; bb += (B_VAL(pix) * j) >> 10; } r += ((rr - r) * xap) >> 8; g += ((gg - g) * xap) >> 8; b += ((bb - b) * xap) >> 8; } *pbuf++ = ARGB_JOIN(0xff, ((r + (1 << 3)) >> 4), ((g + (1 << 3)) >> 4), ((b + (1 << 3)) >> 4)); xp++; xapp++; } func(buf, NULL, dc->mul.col, dptr, w); pbuf = buf; dptr += dst_w; dst_clip_w = w; yp++; yapp++; xp = xpoints;// + dxx; xapp = xapoints;// + dxx; } } } } evas-1.7.9/src/lib/engines/common/evas_font_private.h0000664000175000017500000000363612175475547017606 00000000000000#ifndef _EVAS_FONT_PRIVATE_H # define _EVAS_FONT_PRIVATE_H #include "evas_font_ot.h" #ifdef BUILD_PTHREAD extern LK(lock_font_draw); // for freetype2 API calls extern LK(lock_bidi); // for fribidi API calls extern LK(lock_ot); // for harfbuzz calls # define FTLOCK() LKL(lock_font_draw) # define FTUNLOCK() LKU(lock_font_draw) # define BIDILOCK() LKL(lock_bidi) # define BIDIUNLOCK() LKU(lock_bidi) /* Macros for text walking */ # define OTLOCK() LKL(lock_ot) # define OTUNLOCK() LKU(lock_ot) #else # define FTLOCK() # define FTUNLOCK() # define BIDILOCK() # define BIDIUNLOCK() /* Macros for text walking */ # define OTLOCK() # define OTUNLOCK() #endif void evas_common_font_source_unload(RGBA_Font_Source *fs); void evas_common_font_source_reload(RGBA_Font_Source *fs); void evas_common_font_int_promote(RGBA_Font_Int *fi); void evas_common_font_int_use_increase(int size); void evas_common_font_int_use_trim(void); void evas_common_font_int_unload(RGBA_Font_Int *fi); void evas_common_font_int_reload(RGBA_Font_Int *fi); /* 6th bit is on is the same as frac part >= 0.5 */ # define EVAS_FONT_ROUND_26_6_TO_INT(x) \ (((x + 0x20) & -0x40) >> 6) # define EVAS_FONT_CHARACTER_IS_INVISIBLE(x) ( \ ((0x200C <= (x)) && ((x) <= 0x200D)) || /* ZWNJ..ZWH */ \ ((0x200E <= (x)) && ((x) <= 0x200F)) || /* BIDI stuff */ \ ((0x202A <= (x)) && ((x) <= 0x202E)) /* BIDI stuff */ \ ) # if 1 // do proper round (up or down like 1.4 -> 1 and 1.6 -> 2 etc # define FONT_METRIC_CONV(val, dv, scale) \ (((long long)((val) * (scale)) + (long long)((dv) * (dv) / 2LL)) \ / (long long)((dv) * (dv))) # define FONT_METRIC_ROUNDUP(val) \ (((val) + 31) >> 6) # else // truncate/round down # define FONT_METRIC_CONV(val, dv, scale) \ (((val) * (scale)) / ((dv) * (dv))) # define FONT_METRIC_ROUNDUP(val) \ ((val) >> 6) # endif # include "evas_font_default_walk.x" #endif /* !_EVAS_FONT_PRIVATE_H */ evas-1.7.9/src/lib/engines/common/evas_scale_smooth.h0000664000175000017500000000311512175475547017556 00000000000000#ifndef _EVAS_SCALE_SMOOTH_H #define _EVAS_SCALE_SMOOTH_H EAPI void evas_common_scale_rgba_mipmap_down_2x2_c (DATA32 *src, DATA32 *dst, int src_w, int src_h); EAPI void evas_common_scale_rgba_mipmap_down_2x1_c (DATA32 *src, DATA32 *dst, int src_w, int src_h); EAPI void evas_common_scale_rgba_mipmap_down_1x2_c (DATA32 *src, DATA32 *dst, int src_w, int src_h); EAPI void evas_common_scale_rgb_mipmap_down_2x2_c (DATA32 *src, DATA32 *dst, int src_w, int src_h); EAPI void evas_common_scale_rgb_mipmap_down_2x1_c (DATA32 *src, DATA32 *dst, int src_w, int src_h); EAPI void evas_common_scale_rgb_mipmap_down_1x2_c (DATA32 *src, DATA32 *dst, int src_w, int src_h); EAPI void evas_common_scale_rgba_mipmap_down_2x2_mmx (DATA32 *src, DATA32 *dst, int src_w, int src_h); EAPI void evas_common_scale_rgba_mipmap_down_2x1_mmx (DATA32 *src, DATA32 *dst, int src_w, int src_h); EAPI void evas_common_scale_rgba_mipmap_down_1x2_mmx (DATA32 *src, DATA32 *dst, int src_w, int src_h); EAPI void evas_common_scale_rgba_in_to_out_clip_smooth_mmx (RGBA_Image *src, RGBA_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); EAPI void evas_common_scale_rgba_in_to_out_clip_smooth_c (RGBA_Image *src, RGBA_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); #endif /* _EVAS_SCALE_SMOOTH_H */ evas-1.7.9/src/lib/engines/common/evas_rectangle_main.c0000664000175000017500000001006212175475547020040 00000000000000#include "evas_common.h" #include "evas_private.h" #include "evas_blend_private.h" static void rectangle_draw_internal(RGBA_Image *dst, RGBA_Draw_Context *dc, int x, int y, int w, int h); EAPI void evas_common_rectangle_init(void) { } EAPI void evas_common_rectangle_draw(RGBA_Image *dst, RGBA_Draw_Context *dc, int x, int y, int w, int h) { static Cutout_Rects *rects = NULL; Cutout_Rect *r; int c, cx, cy, cw, ch; int i; /* handle cutouts here! */ if ((w <= 0) || (h <= 0)) return; if (!(RECTS_INTERSECT(x, y, w, h, 0, 0, dst->cache_entry.w, dst->cache_entry.h))) return; /* save out clip info */ c = dc->clip.use; cx = dc->clip.x; cy = dc->clip.y; cw = dc->clip.w; ch = dc->clip.h; evas_common_draw_context_clip_clip(dc, 0, 0, dst->cache_entry.w, dst->cache_entry.h); /* no cutouts - cut right to the chase */ if (!dc->cutout.rects) { rectangle_draw_internal(dst, dc, x, y, w, h); } else { evas_common_draw_context_clip_clip(dc, x, y, w, h); /* our clip is 0 size.. abort */ if ((dc->clip.w > 0) && (dc->clip.h > 0)) { rects = evas_common_draw_context_apply_cutouts(dc, rects); for (i = 0; i < rects->active; ++i) { r = rects->rects + i; evas_common_draw_context_set_clip(dc, r->x, r->y, r->w, r->h); rectangle_draw_internal(dst, dc, x, y, w, h); } } } /* restore clip info */ dc->clip.use = c; dc->clip.x = cx; dc->clip.y = cy; dc->clip.w = cw; dc->clip.h = ch; } EAPI Eina_Bool evas_common_rectangle_draw_prepare(Cutout_Rects *reuse, const RGBA_Image *dst, RGBA_Draw_Context *dc, int x, int y, int w, int h) { if ((w <= 0) || (h <= 0)) return EINA_FALSE; if (!(RECTS_INTERSECT(x, y, w, h, 0, 0, dst->cache_entry.w, dst->cache_entry.h))) return EINA_FALSE; /* save out clip info */ evas_common_draw_context_clip_clip(dc, 0, 0, dst->cache_entry.w, dst->cache_entry.h); /* no cutouts - cut right to the chase */ if (dc->cutout.rects) { evas_common_draw_context_clip_clip(dc, x, y, w, h); /* our clip is 0 size.. abort */ if ((dc->clip.w > 0) && (dc->clip.h > 0)) reuse = evas_common_draw_context_apply_cutouts(dc, reuse); } return EINA_TRUE; } EAPI void evas_common_rectangle_draw_do(const Cutout_Rects *reuse, const Eina_Rectangle *clip, RGBA_Image *dst, RGBA_Draw_Context *dc, int x, int y, int w, int h) { Eina_Rectangle area; Cutout_Rect *r; int i; if (!reuse) { evas_common_draw_context_clip_clip(dc, clip->x, clip->y, clip->w, clip->h); rectangle_draw_internal(dst, dc, x, y, w, h); return ; } for (i = 0; i < reuse->active; ++i) { r = reuse->rects + i; EINA_RECTANGLE_SET(&area, r->x, r->y, r->w, r->h); if (!eina_rectangle_intersection(&area, clip)) continue ; evas_common_draw_context_set_clip(dc, area.x, area.y, area.w, area.h); rectangle_draw_internal(dst, dc, x, y, w, h); } } static void rectangle_draw_internal(RGBA_Image *dst, RGBA_Draw_Context *dc, int x, int y, int w, int h) { RGBA_Gfx_Func func; int yy; DATA32 *ptr; RECTS_CLIP_TO_RECT(x, y, w, h, dc->clip.x, dc->clip.y, dc->clip.w, dc->clip.h); if ((w <= 0) || (h <= 0)) return; #ifdef HAVE_PIXMAN # ifdef PIXMAN_RECT pixman_op_t op = PIXMAN_OP_SRC; // _EVAS_RENDER_COPY if (dc->render_op == _EVAS_RENDER_BLEND) op = PIXMAN_OP_OVER; if ((dst->pixman.im) && (dc->col.pixman_color_image)) { pixman_image_composite(op, dc->col.pixman_color_image, NULL, dst->pixman.im, x, y, 0, 0, x, y, w, h); } else # endif #endif { func = evas_common_gfx_func_composite_color_span_get(dc->col.col, dst, w, dc->render_op); ptr = dst->image.data + (y * dst->cache_entry.w) + x; for (yy = 0; yy < h; yy++) { func(NULL, NULL, dc->col.col, ptr, w); ptr += dst->cache_entry.w; } } } evas-1.7.9/src/lib/engines/common/evas_image_load.c0000664000175000017500000002762712175475547017170 00000000000000#ifdef HAVE_CONFIG_H # include #endif #include #include #include #include "evas_common.h" #include "evas_private.h" #include "evas_cs.h" #ifdef EVAS_CSERVE2 #include "evas_cs2_private.h" #endif struct ext_loader_s { unsigned int length; const char *extension; const char *loader; }; #define MATCHING(Ext, Module) \ { sizeof (Ext), Ext, Module } static const struct ext_loader_s loaders[] = { /* map extensions to loaders to use for good first-guess tries */ MATCHING(".png", "png"), MATCHING(".jpg", "jpeg"), MATCHING(".jpeg", "jpeg"), MATCHING(".jfif", "jpeg"), MATCHING(".eet", "eet"), MATCHING(".edj", "eet"), MATCHING(".eap", "eet"), MATCHING(".edb", "edb"), MATCHING(".xpm", "xpm"), MATCHING(".tiff", "tiff"), MATCHING(".tif", "tiff"), MATCHING(".svg", "svg"), MATCHING(".svgz", "svg"), MATCHING(".svg.gz", "svg"), MATCHING(".gif", "gif"), MATCHING(".pbm", "pmaps"), MATCHING(".pgm", "pmaps"), MATCHING(".ppm", "pmaps"), MATCHING(".pnm", "pmaps"), MATCHING(".bmp", "bmp"), MATCHING(".tga", "tga"), MATCHING(".wbmp", "wbmp"), MATCHING(".ico", "ico"), MATCHING(".cur", "ico"), MATCHING(".psd", "psd"), MATCHING(".pdf", "generic"), MATCHING(".ps", "generic"), MATCHING(".xcf", "generic"), MATCHING(".xcf.gz", "generic"), /* RAW */ MATCHING(".arw", "generic"), MATCHING(".cr2", "generic"), MATCHING(".crw", "generic"), MATCHING(".dcr", "generic"), MATCHING(".dng", "generic"), MATCHING(".k25", "generic"), MATCHING(".kdc", "generic"), MATCHING(".erf", "generic"), MATCHING(".mrw", "generic"), MATCHING(".nef", "generic"), MATCHING(".nrf", "generic"), MATCHING(".nrw", "generic"), MATCHING(".orf", "generic"), MATCHING(".raw", "generic"), MATCHING(".rw2", "generic"), MATCHING(".pef", "generic"), MATCHING(".raf", "generic"), MATCHING(".sr2", "generic"), MATCHING(".srf", "generic"), MATCHING(".x3f", "generic"), /* video */ MATCHING(".264", "generic"), MATCHING(".3g2", "generic"), MATCHING(".3gp", "generic"), MATCHING(".3gp2", "generic"), MATCHING(".3gpp", "generic"), MATCHING(".3gpp2", "generic"), MATCHING(".3p2", "generic"), MATCHING(".asf", "generic"), MATCHING(".avi", "generic"), MATCHING(".bdm", "generic"), MATCHING(".bdmv", "generic"), MATCHING(".clpi", "generic"), MATCHING(".clp", "generic"), MATCHING(".fla", "generic"), MATCHING(".flv", "generic"), MATCHING(".m1v", "generic"), MATCHING(".m2v", "generic"), MATCHING(".m2t", "generic"), MATCHING(".m4v", "generic"), MATCHING(".mkv", "generic"), MATCHING(".mov", "generic"), MATCHING(".mp2", "generic"), MATCHING(".mp2ts", "generic"), MATCHING(".mp4", "generic"), MATCHING(".mpe", "generic"), MATCHING(".mpeg", "generic"), MATCHING(".mpg", "generic"), MATCHING(".mpl", "generic"), MATCHING(".mpls", "generic"), MATCHING(".mts", "generic"), MATCHING(".mxf", "generic"), MATCHING(".nut", "generic"), MATCHING(".nuv", "generic"), MATCHING(".ogg", "generic"), MATCHING(".ogm", "generic"), MATCHING(".ogv", "generic"), MATCHING(".rm", "generic"), MATCHING(".rmj", "generic"), MATCHING(".rmm", "generic"), MATCHING(".rms", "generic"), MATCHING(".rmx", "generic"), MATCHING(".rmvb", "generic"), MATCHING(".swf", "generic"), MATCHING(".ts", "generic"), MATCHING(".weba", "generic"), MATCHING(".webm", "generic"), MATCHING(".wmv", "generic") }; static const char *loaders_name[] = { /* in order of most likely needed */ "png", "jpeg", "eet", "xpm", "tiff", "gif", "svg", "pmaps", "bmp", "tga", "wbmp", "ico", "psd", "edb", "generic" }; struct evas_image_foreach_loader_data { Image_Entry *ie; int *error; Evas_Module *em; }; static Eina_Bool _evas_image_foreach_loader(const Eina_Hash *hash __UNUSED__, const void *key __UNUSED__, void *data, void *fdata) { Evas_Image_Load_Func *evas_image_load_func = NULL; Evas_Module *em = data; struct evas_image_foreach_loader_data *d = fdata; Image_Entry *ie = d->ie; if (!evas_module_load(em)) return EINA_TRUE; evas_image_load_func = em->functions; evas_module_use(em); *(d->error) = EVAS_LOAD_ERROR_NONE; if (evas_image_load_func && evas_image_load_func->file_head(ie, ie->file, ie->key, d->error) && (*(d->error) == EVAS_LOAD_ERROR_NONE)) { d->em = em; return EINA_FALSE; } return EINA_TRUE; } EAPI int evas_common_load_rgba_image_module_from_file(Image_Entry *ie) { Evas_Image_Load_Func *evas_image_load_func = NULL; const char *loader = NULL, *end; Evas_Module *em; struct stat st; unsigned int i; int len, ret = EVAS_LOAD_ERROR_NONE; struct evas_image_foreach_loader_data fdata; #ifdef EVAS_CSERVE if (evas_cserve_use_get()) { // TODO: handle errors from server and return them? DBG("try cserve '%s' '%s'", ie->file, ie->key ? ie->key : ""); if (evas_cserve_image_load(ie, ie->file, ie->key, &(ie->load_opts))) { DBG("try cserve '%s' '%s' loaded!", ie->file, ie->key ? ie->key : ""); return EVAS_LOAD_ERROR_NONE; } } #endif #ifdef EVAS_CSERVE2 if (evas_cserve2_use_get()) { ERR("This function shouldn't be called anymore!"); // DBG("try cserve2 '%s' '%s'", ie->file, ie->key ? ie->key : ""); // if (evas_cserve2_image_load(ie, ie->file, ie->key, &(ie->load_opts))) // { // DBG("try cserve2 '%s' '%s' loaded!", // ie->file, ie->key ? ie->key : ""); // return EVAS_LOAD_ERROR_NONE; // } } #endif if (stat(ie->file, &st) != 0 || S_ISDIR(st.st_mode)) { DBG("trying to open directory '%s' !", ie->file); return EVAS_LOAD_ERROR_DOES_NOT_EXIST; } len = strlen(ie->file); end = ie->file + len; for (i = 0; i < (sizeof (loaders) / sizeof(struct ext_loader_s)); i++) { int len2 = strlen(loaders[i].extension); if (len2 > len) continue; if (!strcasecmp(end - len2, loaders[i].extension)) { loader = loaders[i].loader; DBG("known loader '%s' handles extension '%s' of file '%s'", loader, end - len2, ie->file); break; } } if (loader) { em = evas_module_find_type(EVAS_MODULE_TYPE_IMAGE_LOADER, loader); if (em) { DBG("found image loader '%s' (%p)", loader, em); if (evas_module_load(em)) { evas_module_use(em); evas_image_load_func = em->functions; ret = EVAS_LOAD_ERROR_NONE; if (evas_image_load_func->file_head(ie, ie->file, ie->key, &ret)) { DBG("loaded file head using module '%s' (%p): %s", loader, em, ie->file); goto end; } evas_module_unload(em); INF("failed to load file head using module '%s' (%p): " "%s (%s)", loader, em, ie->file, evas_load_error_str(ret)); } else WRN("failed to load module '%s' (%p)", loader, em); } else INF("image loader '%s' is not enabled or missing!", loader); } fdata.ie = ie; fdata.error = &ret; fdata.em = NULL; ret = EVAS_LOAD_ERROR_NONE; evas_module_foreach_image_loader(_evas_image_foreach_loader, &fdata); em = fdata.em; evas_image_load_func = em ? em->functions : NULL; if (em) goto end; /* This is our last chance, try all known image loader. */ /* FIXME: We could use eina recursive module search ability. */ for (i = 0; i < sizeof (loaders_name) / sizeof (char *); i++) { em = evas_module_find_type(EVAS_MODULE_TYPE_IMAGE_LOADER, loaders_name[i]); if (em) { if (evas_module_load(em)) { evas_module_use(em); evas_image_load_func = em->functions; ret = EVAS_LOAD_ERROR_NONE; if (evas_image_load_func->file_head(ie, ie->file, ie->key, &ret)) { DBG("brute force loader '%s' (%p) worked on %s", loaders_name[i], em, ie->file); goto end; } else INF("brute force loader '%s' (%p) failed on %s (%s)", loaders_name[i], em, ie->file, evas_load_error_str(ret)); evas_module_unload(em); } else INF("failed to load module '%s' (%p)", loaders_name[i], em); } else DBG("could not find module '%s'", loaders_name[i]); } INF("exhausted all means to load image '%s'", ie->file); return EVAS_LOAD_ERROR_UNKNOWN_FORMAT; end: if (ret != EVAS_LOAD_ERROR_NONE) { const char *modname = NULL; int modversion = -1; if (em && em->definition) { modname = em->definition->name; modversion = em->definition->version; } WRN("loader '%s' (version %d) " "handled file '%s', key '%s' with errors: %s", modname ? modname : "", modversion, ie->file, ie->key ? ie->key : "", evas_load_error_str(ret)); goto end; } DBG("loader '%s' used for file %s", (em && em->definition && em->definition->name) ? em->definition->name : "", ie->file); ie->info.module = (void*) em; ie->info.loader = (void*) evas_image_load_func; evas_module_ref((Evas_Module*) ie->info.module); return ret; } EAPI int evas_common_load_rgba_image_data_from_file(Image_Entry *ie) { Evas_Image_Load_Func *evas_image_load_func = NULL; int ret = EVAS_LOAD_ERROR_NONE; if ((ie->flags.loaded) && (!ie->flags.animated)) return EVAS_LOAD_ERROR_GENERIC; #ifdef EVAS_CSERVE if (ie->data1) { if (evas_cserve_image_data_load(ie)) { RGBA_Image *im = (RGBA_Image *)ie; Mem *mem = ie->data2; if (mem) { im->image.data = (void*) (mem->data + mem->offset); im->image.no_free = 1; return EVAS_LOAD_ERROR_NONE; } } return EVAS_LOAD_ERROR_GENERIC; } #endif #ifdef EVAS_CSERVE2 if (ie->data1) { ERR("This function shouldn't be called anymore!"); // DBG("try cserve2 image data '%s' '%s'", // ie->file, ie->key ? ie->key : ""); // if (evas_cserve2_image_data_load(ie)) // { // RGBA_Image *im = (RGBA_Image *)ie; // im->image.data = evas_cserve2_image_data_get(ie); // DBG("try cserve2 image data '%s' '%s' loaded!", // ie->file, ie->key ? ie->key : ""); // if (im->image.data) // { // im->image.no_free = 1; // return EVAS_LOAD_ERROR_NONE; // } // } // return EVAS_LOAD_ERROR_GENERIC; } #endif if (!ie->info.module) return EVAS_LOAD_ERROR_GENERIC; // printf("load data [%p] %s %s\n", ie, ie->file, ie->key); evas_image_load_func = ie->info.loader; evas_module_use((Evas_Module*) ie->info.module); if (!evas_image_load_func->file_data(ie, ie->file, ie->key, &ret)) { return ret; } // evas_module_unref((Evas_Module*) ie->info.module); // ie->info.module = NULL; return EVAS_LOAD_ERROR_NONE; } EAPI double evas_common_load_rgba_image_frame_duration_from_file(Image_Entry *ie, const int start, const int frame_num) { Evas_Image_Load_Func *evas_image_load_func = NULL; if (!ie->info.module) return -1; evas_image_load_func = ie->info.loader; evas_module_use((Evas_Module*) ie->info.module); if (evas_image_load_func->frame_duration) return evas_image_load_func->frame_duration(ie, ie->file, start, frame_num); return -1; } EAPI Eina_Bool evas_common_extension_can_load_get(const char *file) { unsigned int length; unsigned int i; length = eina_stringshare_strlen(file) + 1; if (length < 5) return EINA_FALSE; for (i = 0; i < sizeof (loaders) / sizeof (struct ext_loader_s); ++i) { if (loaders[i].length > length) continue; if (!strcasecmp(loaders[i].extension, file + length - loaders[i].length)) return EINA_TRUE; } return EINA_FALSE; } evas-1.7.9/src/lib/engines/common/evas_scale_main.h0000664000175000017500000000311112175475547017165 00000000000000#ifndef _EVAS_SCALE_MAIN_H #define _EVAS_SCALE_MAIN_H EAPI void evas_common_scale_init (void); EAPI void evas_common_scale_rgba_in_to_out_clip_smooth (RGBA_Image *src, RGBA_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); EAPI void evas_common_scale_rgba_in_to_out_clip_sample (RGBA_Image *src, RGBA_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); EAPI void evas_common_rgba_image_scalecache_dump(void); EAPI void evas_common_scale_rgba_in_to_out_clip_sample_do (const Cutout_Rects *reuse, const Eina_Rectangle *clip, RGBA_Image *src, RGBA_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); EAPI void evas_common_scale_rgba_in_to_out_clip_smooth_do (const Cutout_Rects *reuse, const Eina_Rectangle *clip, RGBA_Image *src, RGBA_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); EAPI Eina_Bool evas_common_scale_rgba_in_to_out_clip_prepare (Cutout_Rects *reuse, const RGBA_Image *src, const RGBA_Image *dst, RGBA_Draw_Context *dc, int dst_region_x, int dst_region_y, int dst_region_w, int dst_region_h); #endif /* _EVAS_SCALE_MAIN_H */ evas-1.7.9/src/lib/engines/common/evas_op_sub/0000775000175000017500000000000012234557316016263 500000000000000evas-1.7.9/src/lib/engines/common/evas_op_sub/op_sub_mask_color_i386.c0000664000175000017500000000063012175475547022630 00000000000000/* sub mask x color -> dst */ #ifdef BUILD_MMX static void init_sub_mask_color_span_funcs_mmx(void) { } #endif #ifdef BUILD_MMX static void init_sub_mask_color_pt_funcs_mmx(void) { } #endif /*-----*/ /* sub_rel mask x color -> dst */ #ifdef BUILD_MMX static void init_sub_rel_mask_color_span_funcs_mmx(void) { } #endif #ifdef BUILD_MMX static void init_sub_rel_mask_color_pt_funcs_mmx(void) { } #endif evas-1.7.9/src/lib/engines/common/evas_op_sub/Makefile.in0000664000175000017500000004645412234557302020260 00000000000000# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/lib/engines/common/evas_op_sub DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/efl_attribute.m4 \ $(top_srcdir)/m4/efl_coverage.m4 \ $(top_srcdir)/m4/efl_doxygen.m4 \ $(top_srcdir)/m4/efl_fnmatch.m4 \ $(top_srcdir)/m4/efl_path_max.m4 \ $(top_srcdir)/m4/efl_shm_open.m4 $(top_srcdir)/m4/efl_tests.m4 \ $(top_srcdir)/m4/evas_check_engine.m4 \ $(top_srcdir)/m4/evas_check_loader.m4 \ $(top_srcdir)/m4/evas_converter.m4 \ $(top_srcdir)/m4/evas_dither.m4 \ $(top_srcdir)/m4/evas_scaler.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHECK_CFLAGS = @CHECK_CFLAGS@ CHECK_LIBS = @CHECK_LIBS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@ DIRECTFB_LIBS = @DIRECTFB_LIBS@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ ECORE_EVAS_CFLAGS = @ECORE_EVAS_CFLAGS@ ECORE_EVAS_LIBS = @ECORE_EVAS_LIBS@ EDB_CFLAGS = @EDB_CFLAGS@ EDB_LIBS = @EDB_LIBS@ EDJE_CFLAGS = @EDJE_CFLAGS@ EDJE_LIBS = @EDJE_LIBS@ EET_CFLAGS = @EET_CFLAGS@ EET_LIBS = @EET_LIBS@ EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@ EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@ EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@ EFL_SHM_OPEN_LIBS = @EFL_SHM_OPEN_LIBS@ EGREP = @EGREP@ EINA_CFLAGS = @EINA_CFLAGS@ EINA_LIBS = @EINA_LIBS@ EVAS_CFLAGS = @EVAS_CFLAGS@ EVAS_GENERAL_CFLAGS = @EVAS_GENERAL_CFLAGS@ EVAS_GENERAL_LIBS = @EVAS_GENERAL_LIBS@ EVAS_LIBS = @EVAS_LIBS@ EVAS_SSE3_CFLAGS = @EVAS_SSE3_CFLAGS@ EVIL_CFLAGS = @EVIL_CFLAGS@ EVIL_LIBS = @EVIL_LIBS@ EXEEXT = @EXEEXT@ EXOTIC_CFLAGS = @EXOTIC_CFLAGS@ EXOTIC_LIBS = @EXOTIC_LIBS@ FGREP = @FGREP@ FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@ FONTCONFIG_LIBS = @FONTCONFIG_LIBS@ FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ FREETYPE_LIBS = @FREETYPE_LIBS@ FRIBIDI_CFLAGS = @FRIBIDI_CFLAGS@ FRIBIDI_LIBS = @FRIBIDI_LIBS@ GL_EET_CFLAGS = @GL_EET_CFLAGS@ GL_EET_LIBS = @GL_EET_LIBS@ GREP = @GREP@ HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@ HARFBUZZ_LIBS = @HARFBUZZ_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LINEBREAK_CFLAGS = @LINEBREAK_CFLAGS@ LINEBREAK_LIBS = @LINEBREAK_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MODULE_ARCH = @MODULE_ARCH@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ SDL_CFLAGS = @SDL_CFLAGS@ SDL_LIBS = @SDL_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ SVG_CFLAGS = @SVG_CFLAGS@ SVG_LIBS = @SVG_LIBS@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ XCB_CFLAGS = @XCB_CFLAGS@ XCB_GL_CFLAGS = @XCB_GL_CFLAGS@ XCB_GL_LIBS = @XCB_GL_LIBS@ XCB_LIBS = @XCB_LIBS@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_ct_OBJC = @ac_ct_OBJC@ altivec_cflags = @altivec_cflags@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ dlopen_libs = @dlopen_libs@ docdir = @docdir@ dvidir = @dvidir@ edje_cc = @edje_cc@ efl_doxygen = @efl_doxygen@ efl_have_doxygen = @efl_have_doxygen@ evas_engine_buffer_cflags = @evas_engine_buffer_cflags@ evas_engine_buffer_libs = @evas_engine_buffer_libs@ evas_engine_direct3d_cflags = @evas_engine_direct3d_cflags@ evas_engine_direct3d_libs = @evas_engine_direct3d_libs@ evas_engine_directfb_cflags = @evas_engine_directfb_cflags@ evas_engine_directfb_libs = @evas_engine_directfb_libs@ evas_engine_fb_cflags = @evas_engine_fb_cflags@ evas_engine_fb_libs = @evas_engine_fb_libs@ evas_engine_gl_cocoa_cflags = @evas_engine_gl_cocoa_cflags@ evas_engine_gl_cocoa_libs = @evas_engine_gl_cocoa_libs@ evas_engine_gl_common_libs = @evas_engine_gl_common_libs@ evas_engine_gl_sdl_cflags = @evas_engine_gl_sdl_cflags@ evas_engine_gl_sdl_libs = @evas_engine_gl_sdl_libs@ evas_engine_gl_xcb_cflags = @evas_engine_gl_xcb_cflags@ evas_engine_gl_xcb_libs = @evas_engine_gl_xcb_libs@ evas_engine_gl_xlib_cflags = @evas_engine_gl_xlib_cflags@ evas_engine_gl_xlib_libs = @evas_engine_gl_xlib_libs@ evas_engine_psl1ght_cflags = @evas_engine_psl1ght_cflags@ evas_engine_psl1ght_libs = @evas_engine_psl1ght_libs@ evas_engine_software_16_sdl_cflags = @evas_engine_software_16_sdl_cflags@ evas_engine_software_16_sdl_libs = @evas_engine_software_16_sdl_libs@ evas_engine_software_16_wince_cflags = @evas_engine_software_16_wince_cflags@ evas_engine_software_16_wince_libs = @evas_engine_software_16_wince_libs@ evas_engine_software_16_x11_cflags = @evas_engine_software_16_x11_cflags@ evas_engine_software_16_x11_libs = @evas_engine_software_16_x11_libs@ evas_engine_software_8_x11_cflags = @evas_engine_software_8_x11_cflags@ evas_engine_software_8_x11_libs = @evas_engine_software_8_x11_libs@ evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@ evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@ evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@ evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ evas_image_loader_edb_libs = @evas_image_loader_edb_libs@ evas_image_loader_eet_cflags = @evas_image_loader_eet_cflags@ evas_image_loader_eet_libs = @evas_image_loader_eet_libs@ evas_image_loader_generic_cflags = @evas_image_loader_generic_cflags@ evas_image_loader_generic_libs = @evas_image_loader_generic_libs@ evas_image_loader_gif_cflags = @evas_image_loader_gif_cflags@ evas_image_loader_gif_libs = @evas_image_loader_gif_libs@ evas_image_loader_ico_cflags = @evas_image_loader_ico_cflags@ evas_image_loader_ico_libs = @evas_image_loader_ico_libs@ evas_image_loader_jpeg_cflags = @evas_image_loader_jpeg_cflags@ evas_image_loader_jpeg_libs = @evas_image_loader_jpeg_libs@ evas_image_loader_pmaps_cflags = @evas_image_loader_pmaps_cflags@ evas_image_loader_pmaps_libs = @evas_image_loader_pmaps_libs@ evas_image_loader_png_cflags = @evas_image_loader_png_cflags@ evas_image_loader_png_libs = @evas_image_loader_png_libs@ evas_image_loader_psd_cflags = @evas_image_loader_psd_cflags@ evas_image_loader_psd_libs = @evas_image_loader_psd_libs@ evas_image_loader_svg_cflags = @evas_image_loader_svg_cflags@ evas_image_loader_svg_libs = @evas_image_loader_svg_libs@ evas_image_loader_tga_cflags = @evas_image_loader_tga_cflags@ evas_image_loader_tga_libs = @evas_image_loader_tga_libs@ evas_image_loader_tiff_cflags = @evas_image_loader_tiff_cflags@ evas_image_loader_tiff_libs = @evas_image_loader_tiff_libs@ evas_image_loader_wbmp_cflags = @evas_image_loader_wbmp_cflags@ evas_image_loader_wbmp_libs = @evas_image_loader_wbmp_libs@ evas_image_loader_xpm_cflags = @evas_image_loader_xpm_cflags@ evas_image_loader_xpm_libs = @evas_image_loader_xpm_libs@ exec_prefix = @exec_prefix@ have_evas_engine_gl_x11 = @have_evas_engine_gl_x11@ have_evas_engine_gl_xcb = @have_evas_engine_gl_xcb@ have_evas_engine_gl_xlib = @have_evas_engine_gl_xlib@ have_evas_engine_software_x11 = @have_evas_engine_software_x11@ have_evas_engine_software_xcb = @have_evas_engine_software_xcb@ have_evas_engine_software_xlib = @have_evas_engine_software_xlib@ have_lcov = @have_lcov@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_enable_auto_import = @lt_enable_auto_import@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgconfig_requires_private = @pkgconfig_requires_private@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pthread_cflags = @pthread_cflags@ pthread_libs = @pthread_libs@ release_info = @release_info@ requirement_evas = @requirement_evas@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ shm_open_libs = @shm_open_libs@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ version_info = @version_info@ MAINTAINERCLEANFILES = Makefile.in EXTRA_DIST = \ op_sub_color_.c \ op_sub_color_i386.c \ op_sub_mask_color_.c \ op_sub_mask_color_i386.c \ op_sub_pixel_.c \ op_sub_pixel_color_.c \ op_sub_pixel_color_i386.c \ op_sub_pixel_i386.c \ op_sub_pixel_mask_.c \ op_sub_pixel_mask_i386.c all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/lib/engines/common/evas_op_sub/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/lib/engines/common/evas_op_sub/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags TAGS: ctags CTAGS: cscope cscopelist: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ cscopelist-am ctags-am distclean distclean-generic \ distclean-libtool distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: evas-1.7.9/src/lib/engines/common/evas_op_sub/op_sub_mask_color_.c0000664000175000017500000000061012175475547022214 00000000000000/* sub mask x color -> dst */ #ifdef BUILD_C static void init_sub_mask_color_span_funcs_c(void) { } #endif #ifdef BUILD_C static void init_sub_mask_color_pt_funcs_c(void) { } #endif /*-----*/ /* sub_rel mask x color -> dst */ #ifdef BUILD_C static void init_sub_rel_mask_color_span_funcs_c(void) { } #endif #ifdef BUILD_C static void init_sub_rel_mask_color_pt_funcs_c(void) { } #endif evas-1.7.9/src/lib/engines/common/evas_op_sub/op_sub_pixel_.c0000664000175000017500000000055012175475547021207 00000000000000/* sub pixel --> dst */ #ifdef BUILD_C static void init_sub_pixel_span_funcs_c(void) { } #endif #ifdef BUILD_C static void init_sub_pixel_pt_funcs_c(void) { } #endif /*-----*/ /* sub_rel pixel --> dst */ #ifdef BUILD_C static void init_sub_rel_pixel_span_funcs_c(void) { } #endif #ifdef BUILD_C static void init_sub_rel_pixel_pt_funcs_c(void) { } #endif evas-1.7.9/src/lib/engines/common/evas_op_sub/op_sub_color_.c0000664000175000017500000000054612175475547021211 00000000000000/* sub color -> dst */ #ifdef BUILD_C static void init_sub_color_span_funcs_c(void) { } #endif #ifdef BUILD_C static void init_sub_color_pt_funcs_c(void) { } #endif /*-----*/ /* sub_rel color -> dst */ #ifdef BUILD_C static void init_sub_rel_color_span_funcs_c(void) { } #endif #ifdef BUILD_C static void init_sub_rel_color_pt_funcs_c(void) { } #endif evas-1.7.9/src/lib/engines/common/evas_op_sub/op_sub_pixel_color_i386.c0000664000175000017500000000064012175475547023017 00000000000000/* sub pixel x color --> dst */ #ifdef BUILD_MMX static void init_sub_pixel_color_span_funcs_mmx(void) { } #endif #ifdef BUILD_MMX static void init_sub_pixel_color_pt_funcs_mmx(void) { } #endif /*-----*/ /* sub_rel pixel x color --> dst */ #ifdef BUILD_MMX static void init_sub_rel_pixel_color_span_funcs_mmx(void) { } #endif #ifdef BUILD_MMX static void init_sub_rel_pixel_color_pt_funcs_mmx(void) { } #endif evas-1.7.9/src/lib/engines/common/evas_op_sub/op_sub_color_i386.c0000664000175000017500000000056612175475547021625 00000000000000/* sub color -> dst */ #ifdef BUILD_MMX static void init_sub_color_span_funcs_mmx(void) { } #endif #ifdef BUILD_MMX static void init_sub_color_pt_funcs_mmx(void) { } #endif /*-----*/ /* sub_rel color -> dst */ #ifdef BUILD_MMX static void init_sub_rel_color_span_funcs_mmx(void) { } #endif #ifdef BUILD_MMX static void init_sub_rel_color_pt_funcs_mmx(void) { } #endif evas-1.7.9/src/lib/engines/common/evas_op_sub/op_sub_pixel_mask_i386.c0000664000175000017500000000063012175475547022633 00000000000000/* sub pixel x mask -> dst */ #ifdef BUILD_MMX static void init_sub_pixel_mask_span_funcs_mmx(void) { } #endif #ifdef BUILD_MMX static void init_sub_pixel_mask_pt_funcs_mmx(void) { } #endif /*-----*/ /* sub_rel pixel x mask -> dst */ #ifdef BUILD_MMX static void init_sub_rel_pixel_mask_span_funcs_mmx(void) { } #endif #ifdef BUILD_MMX static void init_sub_rel_pixel_mask_pt_funcs_mmx(void) { } #endif evas-1.7.9/src/lib/engines/common/evas_op_sub/op_sub_pixel_color_.c0000664000175000017500000000062012175475547022403 00000000000000/* sub pixel x color --> dst */ #ifdef BUILD_C static void init_sub_pixel_color_span_funcs_c(void) { } #endif #ifdef BUILD_C static void init_sub_pixel_color_pt_funcs_c(void) { } #endif /*-----*/ /* sub_rel pixel x color --> dst */ #ifdef BUILD_C static void init_sub_rel_pixel_color_span_funcs_c(void) { } #endif #ifdef BUILD_C static void init_sub_rel_pixel_color_pt_funcs_c(void) { } #endif evas-1.7.9/src/lib/engines/common/evas_op_sub/Makefile.am0000664000175000017500000000043212175475547020247 00000000000000MAINTAINERCLEANFILES = Makefile.in EXTRA_DIST = \ op_sub_color_.c \ op_sub_color_i386.c \ op_sub_mask_color_.c \ op_sub_mask_color_i386.c \ op_sub_pixel_.c \ op_sub_pixel_color_.c \ op_sub_pixel_color_i386.c \ op_sub_pixel_i386.c \ op_sub_pixel_mask_.c \ op_sub_pixel_mask_i386.c evas-1.7.9/src/lib/engines/common/evas_op_sub/op_sub_pixel_mask_.c0000664000175000017500000000066212175475547022226 00000000000000/* sub pixel x mask --> dst */ #ifdef BUILD_C /* XXX: not used static void init_sub_pixel_mask_span_funcs_c(void) { } */ #endif #ifdef BUILD_C /* XXX: not used static void init_sub_pixel_mask_pt_funcs_c(void) { } */ #endif /*-----*/ /* sub_rel pixel x mask --> dst */ #ifdef BUILD_C static void init_sub_rel_pixel_mask_span_funcs_c(void) { } #endif #ifdef BUILD_C static void init_sub_rel_pixel_mask_pt_funcs_c(void) { } #endif evas-1.7.9/src/lib/engines/common/evas_op_sub/op_sub_pixel_i386.c0000664000175000017500000000057012175475547021623 00000000000000/* sub pixel --> dst */ #ifdef BUILD_MMX static void init_sub_pixel_span_funcs_mmx(void) { } #endif #ifdef BUILD_MMX static void init_sub_pixel_pt_funcs_mmx(void) { } #endif /*-----*/ /* sub_rel pixel --> dst */ #ifdef BUILD_MMX static void init_sub_rel_pixel_span_funcs_mmx(void) { } #endif #ifdef BUILD_MMX static void init_sub_rel_pixel_pt_funcs_mmx(void) { } #endif evas-1.7.9/src/lib/engines/common/evas_convert_grypal_6.h0000664000175000017500000000041112175475547020355 00000000000000#ifndef _EVAS_CONVERT_GRY_4_H #define _EVAS_CONVERT_GRY_4_H void evas_common_convert_rgba_to_8bpp_pal_gray64 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); #endif /* _EVAS_CONVERT_GRY_4_H */ evas-1.7.9/src/lib/engines/common/evas_convert_color.h0000664000175000017500000000171012175475547017753 00000000000000#ifndef _EVAS_CONVERT_COLOR_H #define _EVAS_CONVERT_COLOR_H EAPI DATA32 evas_common_convert_argb_premul (DATA32 *src, unsigned int len); EAPI void evas_common_convert_argb_unpremul (DATA32 *src, unsigned int len); EAPI void evas_common_convert_color_argb_premul (int a, int *r, int *g, int *b); EAPI void evas_common_convert_color_argb_unpremul (int a, int *r, int *g, int *b); EAPI void evas_common_convert_color_hsv_to_rgb (float h, float s, float v, int *r, int *g, int *b); EAPI void evas_common_convert_color_rgb_to_hsv (int r, int g, int b, float *h, float *s, float *v); EAPI void evas_common_convert_color_hsv_to_rgb_int (int h, int s, int v, int *r, int *g, int *b); EAPI void evas_common_convert_color_rgb_to_hsv_int (int r, int g, int b, int *h, int *s, int *v); #endif /* _EVAS_CONVERT_COLOR_H */ evas-1.7.9/src/lib/engines/common/evas_convert_grypal_6.c0000664000175000017500000000112512175475547020353 00000000000000#include "evas_common.h" #include "evas_convert_grypal_6.h" #ifdef BUILD_CONVERT_8_GRAYSCALE_64 void evas_common_convert_rgba_to_8bpp_pal_gray64(DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x __UNUSED__, int dith_y __UNUSED__, DATA8 *pal) { DATA32 *src_ptr; DATA8 *dst_ptr; int x, y; DATA8 Y; dst_ptr = dst; CONVERT_LOOP_START_ROT_0(); /* RGB -> YUV conversion */ Y = ((R_VAL(src_ptr) * 76) + (G_VAL(src_ptr) * 151) + (B_VAL(src_ptr) * 29)) >> 10; *dst_ptr = pal[Y]; CONVERT_LOOP_END_ROT_0(); } #endif evas-1.7.9/src/lib/engines/common/evas_op_mul_main_.c0000664000175000017500000001744412175475547017541 00000000000000#include "evas_common.h" static RGBA_Gfx_Func op_mul_span_funcs[SP_LAST][SM_LAST][SC_LAST][DP_LAST][CPU_LAST]; static RGBA_Gfx_Pt_Func op_mul_pt_funcs[SP_LAST][SM_LAST][SC_LAST][DP_LAST][CPU_LAST]; static void op_mul_init(void); static void op_mul_shutdown(void); static RGBA_Gfx_Func op_mul_pixel_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels); static RGBA_Gfx_Func op_mul_color_span_get(DATA32 col, RGBA_Image *dst, int pixels); static RGBA_Gfx_Func op_mul_pixel_color_span_get(RGBA_Image *src, DATA32 col, RGBA_Image *dst, int pixels); static RGBA_Gfx_Func op_mul_mask_color_span_get(DATA32 col, RGBA_Image *dst, int pixels); static RGBA_Gfx_Func op_mul_pixel_mask_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels); static RGBA_Gfx_Pt_Func op_mul_pixel_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst); static RGBA_Gfx_Pt_Func op_mul_color_pt_get(DATA32 col, RGBA_Image *dst); static RGBA_Gfx_Pt_Func op_mul_pixel_color_pt_get(Image_Entry_Flags src_flags, DATA32 col, RGBA_Image *dst); static RGBA_Gfx_Pt_Func op_mul_mask_color_pt_get(DATA32 col, RGBA_Image *dst); static RGBA_Gfx_Pt_Func op_mul_pixel_mask_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst); static RGBA_Gfx_Compositor _composite_mul = { "mul", op_mul_init, op_mul_shutdown, op_mul_pixel_span_get, op_mul_color_span_get, op_mul_pixel_color_span_get, op_mul_mask_color_span_get, op_mul_pixel_mask_span_get, op_mul_pixel_pt_get, op_mul_color_pt_get, op_mul_pixel_color_pt_get, op_mul_mask_color_pt_get, op_mul_pixel_mask_pt_get }; RGBA_Gfx_Compositor * evas_common_gfx_compositor_mul_get(void) { return &(_composite_mul); } # include "./evas_op_mul/op_mul_pixel_.c" # include "./evas_op_mul/op_mul_color_.c" # include "./evas_op_mul/op_mul_pixel_color_.c" # include "./evas_op_mul/op_mul_pixel_mask_.c" # include "./evas_op_mul/op_mul_mask_color_.c" //# include "./evas_op_mul/op_mul_pixel_mask_color_.c" # include "./evas_op_mul/op_mul_pixel_i386.c" # include "./evas_op_mul/op_mul_color_i386.c" # include "./evas_op_mul/op_mul_pixel_color_i386.c" # include "./evas_op_mul/op_mul_pixel_mask_i386.c" # include "./evas_op_mul/op_mul_mask_color_i386.c" // # include "./evas_op_mul/op_mul_pixel_mask_color_i386.c" static void op_mul_init(void) { memset(op_mul_span_funcs, 0, sizeof(op_mul_span_funcs)); memset(op_mul_pt_funcs, 0, sizeof(op_mul_pt_funcs)); #ifdef BUILD_MMX init_mul_pixel_span_funcs_mmx(); init_mul_pixel_color_span_funcs_mmx(); init_mul_pixel_mask_span_funcs_mmx(); init_mul_color_span_funcs_mmx(); init_mul_mask_color_span_funcs_mmx(); init_mul_pixel_pt_funcs_mmx(); init_mul_pixel_color_pt_funcs_mmx(); init_mul_pixel_mask_pt_funcs_mmx(); init_mul_color_pt_funcs_mmx(); init_mul_mask_color_pt_funcs_mmx(); #endif #ifdef BUILD_C init_mul_pixel_span_funcs_c(); init_mul_pixel_color_span_funcs_c(); init_mul_pixel_mask_span_funcs_c(); init_mul_color_span_funcs_c(); init_mul_mask_color_span_funcs_c(); init_mul_pixel_pt_funcs_c(); init_mul_pixel_color_pt_funcs_c(); init_mul_pixel_mask_pt_funcs_c(); init_mul_color_pt_funcs_c(); init_mul_mask_color_pt_funcs_c(); #endif } static void op_mul_shutdown(void) { } static RGBA_Gfx_Func mul_gfx_span_func_cpu(int s, int m, int c, int d) { RGBA_Gfx_Func func = NULL; int cpu = CPU_N; #ifdef BUILD_MMX if (evas_common_cpu_has_feature(CPU_FEATURE_MMX)) { cpu = CPU_MMX; func = op_mul_span_funcs[s][m][c][d][cpu]; if (func) return func; } #endif #ifdef BUILD_C cpu = CPU_C; func = op_mul_span_funcs[s][m][c][d][cpu]; if (func) return func; #endif return func; } static RGBA_Gfx_Func op_mul_pixel_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels __UNUSED__) { int s = SP_AN, m = SM_N, c = SC_N, d = DP_AN; if (src && src->cache_entry.flags.alpha) { dst->cache_entry.flags.alpha = 1; s = SP; } if (dst && dst->cache_entry.flags.alpha) d = DP; return mul_gfx_span_func_cpu(s, m, c, d); } static RGBA_Gfx_Func op_mul_color_span_get(DATA32 col, RGBA_Image *dst, int pixels __UNUSED__) { int s = SP_N, m = SM_N, c = SC_AN, d = DP_AN; if ((col >> 24) < 255) { if (dst) dst->cache_entry.flags.alpha = 1; c = SC; } if (col == (col | 0x00ffffff)) c = SC_AA; if (col == 0xffffffff) c = SC_N; if (dst && dst->cache_entry.flags.alpha) d = DP; return mul_gfx_span_func_cpu(s, m, c, d); } static RGBA_Gfx_Func op_mul_pixel_color_span_get(RGBA_Image *src, DATA32 col, RGBA_Image *dst, int pixels __UNUSED__) { int s = SP_AN, m = SM_N, c = SC_AN, d = DP_AN; if (src && src->cache_entry.flags.alpha) { if (dst) dst->cache_entry.flags.alpha = 1; s = SP; } if ((col >> 24) < 255) { if (dst) dst->cache_entry.flags.alpha = 1; c = SC; } if (col == (col | 0x00ffffff)) c = SC_AA; if (col == 0xffffffff) c = SC_N; if (dst && dst->cache_entry.flags.alpha) d = DP; return mul_gfx_span_func_cpu(s, m, c, d); } static RGBA_Gfx_Func op_mul_mask_color_span_get(DATA32 col, RGBA_Image *dst, int pixels __UNUSED__) { int s = SP_N, m = SM_AS, c = SC_AN, d = DP; if (dst) dst->cache_entry.flags.alpha = 1; if ((col >> 24) < 255) c = SC; if (col == (col | 0x00ffffff)) c = SC_AA; if (col == 0xffffffff) c = SC_N; return mul_gfx_span_func_cpu(s, m, c, d); } static RGBA_Gfx_Func op_mul_pixel_mask_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels __UNUSED__) { int s = SP_AN, m = SM_AS, c = SC_N, d = DP; if (dst) dst->cache_entry.flags.alpha = 1; if (src && src->cache_entry.flags.alpha) s = SP; return mul_gfx_span_func_cpu(s, m, c, d); } static RGBA_Gfx_Pt_Func mul_gfx_pt_func_cpu(int s, int m, int c, int d) { RGBA_Gfx_Pt_Func func = NULL; int cpu = CPU_N; #ifdef BUILD_MMX if (evas_common_cpu_has_feature(CPU_FEATURE_MMX)) { cpu = CPU_MMX; func = op_mul_pt_funcs[s][m][c][d][cpu]; if (func) return func; } #endif #ifdef BUILD_C cpu = CPU_C; func = op_mul_pt_funcs[s][m][c][d][cpu]; if (func) return func; #endif return func; } static RGBA_Gfx_Pt_Func op_mul_pixel_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst) { int s = SP_AN, m = SM_N, c = SC_N, d = DP_AN; if (src_flags.alpha) { dst->cache_entry.flags.alpha = 1; s = SP; } if (dst && dst->cache_entry.flags.alpha) d = DP; return mul_gfx_pt_func_cpu(s, m, c, d); } static RGBA_Gfx_Pt_Func op_mul_color_pt_get(DATA32 col, RGBA_Image *dst) { int s = SP_N, m = SM_N, c = SC_AN, d = DP_AN; if ((col >> 24) < 255) { if (dst) dst->cache_entry.flags.alpha = 1; c = SC; } if (col == (col | 0x00ffffff)) c = SC_AA; if (col == 0xffffffff) c = SC_N; if (dst && dst->cache_entry.flags.alpha) d = DP; return mul_gfx_pt_func_cpu(s, m, c, d); } static RGBA_Gfx_Pt_Func op_mul_pixel_color_pt_get(Image_Entry_Flags src_flags, DATA32 col, RGBA_Image *dst) { int s = SP_AN, m = SM_N, c = SC_AN, d = DP_AN; if (src_flags.alpha) { if (dst) dst->cache_entry.flags.alpha = 1; s = SP; } if ((col >> 24) < 255) { if (dst) dst->cache_entry.flags.alpha = 1; c = SC; } if (col == (col | 0x00ffffff)) c = SC_AA; if (col == 0xffffffff) c = SC_N; if (dst && dst->cache_entry.flags.alpha) d = DP; return mul_gfx_pt_func_cpu(s, m, c, d); } static RGBA_Gfx_Pt_Func op_mul_mask_color_pt_get(DATA32 col, RGBA_Image *dst) { int s = SP_N, m = SM_AS, c = SC_AN, d = DP; if (dst) dst->cache_entry.flags.alpha = 1; if ((col >> 24) < 255) c = SC; if (col == (col | 0x00ffffff)) c = SC_AA; if (col == 0xffffffff) c = SC_N; return mul_gfx_pt_func_cpu(s, m, c, d); } static RGBA_Gfx_Pt_Func op_mul_pixel_mask_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst) { int s = SP_AN, m = SM_AS, c = SC_N, d = DP; if (dst) dst->cache_entry.flags.alpha = 1; if (src_flags.alpha) s = SP; return mul_gfx_pt_func_cpu(s, m, c, d); } evas-1.7.9/src/lib/engines/common/evas_scale_span.h0000664000175000017500000000175312175475547017214 00000000000000#ifndef _EVAS_SCALE_SPAN_H #define _EVAS_SCALE_SPAN_H EAPI void evas_common_scale_rgba_span (DATA32 *src, DATA8 *mask, int src_len, DATA32 mul_col, DATA32 *dst, int dst_len, int dir); EAPI void evas_common_scale_rgba_a8_span (DATA32 *src, DATA8 *mask, int src_len, DATA32 mul_col, DATA32 *dst, int dst_len, int dir); EAPI void evas_common_scale_a8_span (DATA32 *src, DATA8 *mask, int src_len, DATA32 mul_col, DATA32 *dst, int dst_len, int dir); EAPI void evas_common_scale_clip_a8_span (DATA32 *src, DATA8 *mask, int src_len, DATA32 mul_col, DATA32 *dst, int dst_len, int dir); EAPI void evas_common_scale_hsva_span (DATA32 *src, DATA8 *mask, int src_len, DATA32 mul_col, DATA32 *dst, int dst_len, int dir); EAPI void evas_common_scale_hsva_a8_span (DATA32 *src, DATA8 *mask, int src_len, DATA32 mul_col, DATA32 *dst, int dst_len, int dir); #endif /* _EVAS_SCALE_SPAN_H */ evas-1.7.9/src/lib/engines/common/evas_tiler.c0000664000175000017500000010411512175475547016212 00000000000000#include "evas_common.h" #ifdef EVAS_RECT_SPLIT static inline void rect_list_node_pool_set_max(int max); static inline void rect_list_node_pool_flush(void); static inline list_node_t *rect_list_node_pool_get(void); static inline void rect_list_node_pool_put(list_node_t *node); static inline void rect_init(rect_t *r, int x, int y, int w, int h); static inline void rect_list_append_node(list_t *rects, list_node_t *node); static inline void rect_list_append(list_t *rects, const rect_t r); static inline void rect_list_append_xywh(list_t *rects, int x, int y, int w, int h); static inline void rect_list_concat(list_t *rects, list_t *other); static inline list_node_t *rect_list_unlink_next(list_t *rects, list_node_t *parent_node); static inline void rect_list_del_next(list_t *rects, list_node_t *parent_node); static inline void rect_list_clear(list_t *rects); static inline void rect_list_del_split_strict(list_t *rects, const rect_t del_r); static inline void rect_list_add_split_strict(list_t *rects, list_node_t *node); static inline list_node_t *rect_list_add_split_fuzzy(list_t *rects, list_node_t *node, int accepted_error); static inline void rect_list_merge_rects(list_t *rects, list_t *to_merge, int accepted_error); static inline void rect_list_add_split_fuzzy_and_merge(list_t *rects, list_node_t *node, int split_accepted_error, int merge_accepted_error); static inline void rect_print(const rect_t r); #if 0 static inline void rect_list_print(const list_t rects); #endif static const list_node_t list_node_zeroed = { NULL }; static const list_t list_zeroed = { NULL, NULL }; typedef struct list_node_pool { list_node_t *node; int len; int max; } list_node_pool_t; static list_node_pool_t list_node_pool = { NULL, 0, 1024 }; static inline void rect_list_node_pool_set_max(int max) { int diff; diff = list_node_pool.len - max; for (; diff > 0 && list_node_pool.node; diff--) { list_node_t *node; node = list_node_pool.node; list_node_pool.node = node->next; list_node_pool.len--; free(node); } list_node_pool.max = max; } static inline void rect_list_node_pool_flush(void) { while (list_node_pool.node) { list_node_t *node; node = list_node_pool.node; list_node_pool.node = node->next; list_node_pool.len--; free(node); } } static inline list_node_t * rect_list_node_pool_get(void) { if (list_node_pool.node) { list_node_t *node; node = list_node_pool.node; list_node_pool.node = node->next; list_node_pool.len--; return node; } else return malloc(sizeof(rect_node_t)); } static inline void rect_list_node_pool_put(list_node_t *node) { if (list_node_pool.len < list_node_pool.max) { node->next = list_node_pool.node; list_node_pool.node = node; list_node_pool.len++; } else free(node); } static inline void rect_init(rect_t *r, int x, int y, int w, int h) { r->area = w * h; r->left = x; r->top = y; r->right = x + w; r->bottom = y + h; r->width = w; r->height = h; } static inline void rect_print(const rect_t r) { INF("", r.left, r.top, r.width, r.height); } #if 0 static inline void rect_list_print(const list_t rects) { list_node_t *node; int len; len = 0; for (node = rects.head; node; node = node->next) len++; putchar('['); for (node = rects.head; node; node = node->next) { rect_print(((rect_node_t *)node)->rect); if (node->next) { putchar(','); if (len < 4) putchar(' '); else { putchar('\n'); putchar(' '); } } } putchar(']'); } #endif static inline void rect_list_append_node(list_t *rects, list_node_t *node) { if (rects->tail) { rects->tail->next = node; rects->tail = node; } else { rects->head = node; rects->tail = node; } } static inline void rect_list_append(list_t *rects, const rect_t r) { rect_node_t *rect_node; rect_node = (rect_node_t *)rect_list_node_pool_get(); rect_node->rect = r; rect_node->_lst = list_node_zeroed; rect_list_append_node(rects, (list_node_t *)rect_node); } static inline void rect_list_append_xywh(list_t *rects, int x, int y, int w, int h) { rect_t r; rect_init(&r, x, y, w, h); rect_list_append(rects, r); } static inline void rect_list_concat(list_t *rects, list_t *other) { if (!other->head) return; if (rects->tail) { rects->tail->next = other->head; rects->tail = other->tail; } else { rects->head = other->head; rects->tail = other->tail; } *other = list_zeroed; } static inline list_node_t * rect_list_unlink_next(list_t *rects, list_node_t *parent_node) { list_node_t *node; if (parent_node) { node = parent_node->next; parent_node->next = node->next; } else { node = rects->head; rects->head = node->next; } if (rects->tail == node) rects->tail = parent_node; *node = list_node_zeroed; return node; } static inline void rect_list_del_next(list_t *rects, list_node_t *parent_node) { list_node_t *node; node = rect_list_unlink_next(rects, parent_node); rect_list_node_pool_put(node); } static inline void rect_list_clear(list_t *rects) { list_node_t *node; node = rects->head; while (node) { list_node_t *aux; aux = node->next; rect_list_node_pool_put(node); node = aux; } *rects = list_zeroed; } static inline void _calc_intra_rect_area(const rect_t a, const rect_t b, int *width, int *height) { int max_left, min_right, max_top, min_bottom; if (a.left < b.left) max_left = b.left; else max_left = a.left; if (a.right < b.right) min_right = a.right; else min_right = b.right; *width = min_right - max_left; if (a.top < b.top) max_top = b.top; else max_top = a.top; if (a.bottom < b.bottom) min_bottom = a.bottom; else min_bottom = b.bottom; *height = min_bottom - max_top; } static inline void _split_strict(list_t *dirty, const rect_t current, rect_t r) { int h_1, h_2, w_1, w_2; h_1 = current.top - r.top; h_2 = r.bottom - current.bottom; w_1 = current.left - r.left; w_2 = r.right - current.right; if (h_1 > 0) { /* .--.r (b) .---.r2 * | | | | * .-------.cur (a) .---.r '---' * | | | | -> | | + * | `--' | `---' * `-------' */ rect_list_append_xywh(dirty, r.left, r.top, r.width, h_1); r.height -= h_1; r.top = current.top; } if (h_2 > 0) { /* .-------.cur (a) * | .---. | .---.r * | | | | -> | | * `-------' `---' + .---.r2 * | | | | * `---'r (b) `---' */ rect_list_append_xywh(dirty, r.left, current.bottom, r.width, h_2); r.height -= h_2; } if (w_1 > 0) { /* (b) r .----.cur (a) * .--|-. | .--.r2 .-.r * | | | | -> | | + | | * `--|-' | `--' `-' * `----' */ rect_list_append_xywh(dirty, r.left, r.top, w_1, r.height); /* not necessary to keep these, r (b) will be destroyed */ /* r.width -= w_1; */ /* r.left = current.left; */ } if (w_2 > 0) { /* .----.cur (a) * | | * | .-|--.r (b) .-.r .--.r2 * | | | | -> | | + | | * | `-|--' `-' `--' * `----' */ rect_list_append_xywh(dirty, current.right, r.top, w_2, r.height); /* not necessary to keep this, r (b) will be destroyed */ /* r.width -= w_2; */ } } static inline void rect_list_del_split_strict(list_t *rects, const rect_t del_r) { list_t modified = list_zeroed; list_node_t *cur_node, *prev_node; prev_node = NULL; cur_node = rects->head; while (cur_node) { int intra_width, intra_height; rect_t current; current = ((rect_node_t*)cur_node)->rect; _calc_intra_rect_area(del_r, current, &intra_width, &intra_height); if ((intra_width <= 0) || (intra_height <= 0)) { /* .---.current .---.del_r * | | | | * `---+---.del_r `---+---.current * | | | | * `---' `---' * no interception, nothing to do */ prev_node = cur_node; cur_node = cur_node->next; } else if ((intra_width == current.width) && (intra_height == current.height)) { /* .-------.del_r * | .---. | * | | | | * | `---'current * `-------' * current is contained, remove from rects */ cur_node = cur_node->next; rect_list_del_next(rects, prev_node); } else { _split_strict(&modified, del_r, current); cur_node = cur_node->next; rect_list_del_next(rects, prev_node); } } rect_list_concat(rects, &modified); } static inline void rect_list_add_split_strict(list_t *rects, list_node_t *node) { list_t dirty = list_zeroed; list_t new_dirty = list_zeroed; list_node_t *cur_node; if (!rects->head) { rect_list_append_node(rects, node); return; } rect_list_append_node(&dirty, node); cur_node = rects->head; while (dirty.head) { rect_t current; if (!cur_node) { rect_list_concat(rects, &dirty); break; } current = ((rect_node_t*)cur_node)->rect; while (dirty.head) { int intra_width, intra_height; rect_t r; r = ((rect_node_t *)dirty.head)->rect; _calc_intra_rect_area(r, current, &intra_width, &intra_height); if ((intra_width == r.width) && (intra_height == r.height)) /* .-------.cur * | .---.r| * | | | | * | `---' | * `-------' */ rect_list_del_next(&dirty, NULL); else if ((intra_width <= 0) || (intra_height <= 0)) { /* .---.cur .---.r * | | | | * `---+---.r `---+---.cur * | | | | * `---' `---' */ list_node_t *tmp; tmp = rect_list_unlink_next(&dirty, NULL); rect_list_append_node(&new_dirty, tmp); } else { _split_strict(&new_dirty, current, r); rect_list_del_next(&dirty, NULL); } } dirty = new_dirty; new_dirty = list_zeroed; cur_node = cur_node->next; } } static inline void _calc_intra_outer_rect_area(const rect_t a, const rect_t b, rect_t *intra, rect_t *outer) { int min_left, max_left, min_right, max_right; int min_top, max_top, min_bottom, max_bottom; if (a.left < b.left) { max_left = b.left; min_left = a.left; } else { max_left = a.left; min_left = b.left; } if (a.right < b.right) { min_right = a.right; max_right = b.right; } else { min_right = b.right; max_right = a.right; } intra->left = max_left; intra->right = min_right; intra->width = min_right - max_left; outer->left = min_left; outer->right = max_right; outer->width = max_right - min_left; if (a.top < b.top) { max_top = b.top; min_top = a.top; } else { max_top = a.top; min_top = b.top; } if (a.bottom < b.bottom) { min_bottom = a.bottom; max_bottom = b.bottom; } else { min_bottom = b.bottom; max_bottom = a.bottom; } intra->top = max_top; intra->bottom = min_bottom; intra->height = min_bottom - max_top; if ((intra->width > 0) && (intra->height > 0)) intra->area = intra->width * intra->height; else intra->area = 0; outer->top = min_top; outer->bottom = max_bottom; outer->height = max_bottom - min_top; outer->area = outer->width * outer->height; } enum { SPLIT_FUZZY_ACTION_NONE, SPLIT_FUZZY_ACTION_SPLIT, SPLIT_FUZZY_ACTION_MERGE }; static inline int _split_fuzzy(list_t *dirty, const rect_t a, rect_t *b) { int h_1, h_2, w_1, w_2, action; h_1 = a.top - b->top; h_2 = b->bottom - a.bottom; w_1 = a.left - b->left; w_2 = b->right - a.right; action = SPLIT_FUZZY_ACTION_NONE; if (h_1 > 0) { /* .--.r (b) .---.r2 * | | | | * .-------.cur (a) .---.r '---' * | | | | -> | | + * | `--' | `---' * `-------' */ rect_list_append_xywh(dirty, b->left, b->top, b->width, h_1); b->height -= h_1; b->top = a.top; action = SPLIT_FUZZY_ACTION_SPLIT; } if (h_2 > 0) { /* .-------.cur (a) * | .---. | .---.r * | | | | -> | | * `-------' `---' + .---.r2 * | | | | * `---'r (b) `---' */ rect_list_append_xywh(dirty, b->left, a.bottom, b->width, h_2); b->height -= h_2; action = SPLIT_FUZZY_ACTION_SPLIT; } if (((w_1 > 0) || (w_2 > 0)) && (a.height == b->height)) return SPLIT_FUZZY_ACTION_MERGE; if (w_1 > 0) { /* (b) r .----.cur (a) * .--|-. | .--.r2 .-.r * | | | | -> | | + | | * `--|-' | `--' `-' * `----' */ rect_list_append_xywh(dirty, b->left, b->top, w_1, b->height); /* not necessary to keep these, r (b) will be destroyed */ /* b->width -= w_1; */ /* b->left = a.left; */ action = SPLIT_FUZZY_ACTION_SPLIT; } if (w_2 > 0) { /* .----.cur (a) * | | * | .-|--.r (b) .-.r .--.r2 * | | | | -> | | + | | * | `-|--' `-' `--' * `----' */ rect_list_append_xywh(dirty, a.right, b->top, w_2, b->height); /* not necessary to keep these, r (b) will be destroyed */ /* b->width -= w_2; */ action = SPLIT_FUZZY_ACTION_SPLIT; } return action; } static inline list_node_t * rect_list_add_split_fuzzy(list_t *rects, list_node_t *node, int accepted_error) { list_t dirty = list_zeroed; list_node_t *old_last; old_last = rects->tail; if (!rects->head) { rect_list_append_node(rects, node); return old_last; } rect_list_append_node(&dirty, node); while (dirty.head) { list_node_t *d_node, *cur_node, *prev_cur_node; int keep_dirty; rect_t r; d_node = rect_list_unlink_next(&dirty, NULL); r = ((rect_node_t *)d_node)->rect; prev_cur_node = NULL; cur_node = rects->head; keep_dirty = 1; while (cur_node) { int area, action; rect_t current, intra, outer; current = ((rect_node_t *)cur_node)->rect; _calc_intra_outer_rect_area(r, current, &intra, &outer); area = current.area + r.area - intra.area; if ((intra.width == r.width) && (intra.height == r.height)) { /* .-------.cur * | .---.r| * | | | | * | `---' | * `-------' */ keep_dirty = 0; break; } else if ((intra.width == current.width) && (intra.height == current.height)) { /* .-------.r * | .---.cur * | | | | * | `---' | * `-------' */ if (old_last == cur_node) old_last = prev_cur_node; cur_node = cur_node->next; rect_list_del_next(rects, prev_cur_node); } else if ((outer.area - area) <= accepted_error) { /* .-----------. bounding box (outer) * |.---. .---.| * ||cur| |r || * || | | || * |`---' `---'| * `-----------' * merge them, remove both and add merged */ rect_node_t *n; if (old_last == cur_node) old_last = prev_cur_node; n = (rect_node_t *)rect_list_unlink_next(rects, prev_cur_node); n->rect = outer; rect_list_append_node(&dirty, (list_node_t *)n); keep_dirty = 0; break; } else if (intra.area <= accepted_error) { /* .---.cur .---.r * | | | | * `---+---.r `---+---.cur * | | | | * `---' `---' * no split, no merge */ prev_cur_node = cur_node; cur_node = cur_node->next; } else { /* split is required */ action = _split_fuzzy(&dirty, current, &r); if (action == SPLIT_FUZZY_ACTION_MERGE) { /* horizontal merge is possible: remove both, add merged */ rect_node_t *n; if (old_last == cur_node) old_last = prev_cur_node; n = (rect_node_t *) rect_list_unlink_next(rects, prev_cur_node); n->rect.left = outer.left; n->rect.width = outer.width; n->rect.right = outer.right; n->rect.area = outer.width * r.height; rect_list_append_node(&dirty, (list_node_t *)n); } else if (action == SPLIT_FUZZY_ACTION_NONE) { /* * this rect check was totally useless, * should never happen */ /* prev_cur_node = cur_node; */ /* cur_node = cur_node->next; */ WRN("Should not get here!"); abort(); } keep_dirty = 0; break; } } if (UNLIKELY(keep_dirty)) rect_list_append_node(rects, d_node); else rect_list_node_pool_put(d_node); } return old_last; } static inline void _calc_outer_rect_area(const rect_t a, const rect_t b, rect_t *outer) { int min_left, max_right; int min_top, max_bottom; if (a.left < b.left) min_left = a.left; else min_left = b.left; if (a.right < b.right) max_right = b.right; else max_right = a.right; outer->left = min_left; outer->right = max_right; outer->width = max_right - min_left; if (a.top < b.top) min_top = a.top; else min_top = b.top; if (a.bottom < b.bottom) max_bottom = b.bottom; else max_bottom = a.bottom; outer->top = min_top; outer->bottom = max_bottom; outer->height = max_bottom - min_top; outer->area = outer->width * outer->height; } static inline void rect_list_merge_rects(list_t *rects, list_t *to_merge, int accepted_error) { while (to_merge->head) { list_node_t *node, *parent_node; rect_t r1; int merged; r1 = ((rect_node_t *)to_merge->head)->rect; merged = 0; parent_node = NULL; node = rects->head; while (node) { rect_t r2, outer; int area; r2 = ((rect_node_t *)node)->rect; _calc_outer_rect_area(r1, r2, &outer); area = r1.area + r2.area; /* intra area is taken as 0 */ if (outer.area - area <= accepted_error) { /* * remove both r1 and r2, create r3 * actually r3 uses r2 instance, saves memory */ rect_node_t *n; n = (rect_node_t *)rect_list_unlink_next(rects, parent_node); n->rect = outer; rect_list_append_node(to_merge, (list_node_t *)n); merged = 1; break; } parent_node = node; node = node->next; } if (!merged) { list_node_t *n; n = rect_list_unlink_next(to_merge, NULL); rect_list_append_node(rects, n); } else rect_list_del_next(to_merge, NULL); } } static inline void rect_list_add_split_fuzzy_and_merge(list_t *rects, list_node_t *node, int split_accepted_error, int merge_accepted_error) { list_node_t *n; n = rect_list_add_split_fuzzy(rects, node, split_accepted_error); if (n && n->next) { list_t to_merge; /* split list into 2 segments, already merged and to merge */ to_merge.head = n->next; to_merge.tail = rects->tail; rects->tail = n; n->next = NULL; rect_list_merge_rects(rects, &to_merge, merge_accepted_error); } } #endif /* EVAS_RECT_SPLIT */ #define TILE(tb, x, y) ((tb)->tiles.tiles[((y) * (tb)->tiles.w) + (x)]) #ifdef RECTUPDATE #elif defined(EVAS_RECT_SPLIT) #else /* static int tilebuf_x_intersect(Tilebuf *tb, int x, int w, int *x1, int *x2, int *x1_fill, int *x2_fill); static int tilebuf_y_intersect(Tilebuf *tb, int y, int h, int *y1, int *y2, int *y1_fill, int *y2_fill); static int tilebuf_intersect(int tsize, int tlen, int tnum, int x, int w, int *x1, int *x2, int *x1_fill, int *x2_fill); */ #endif /* static void tilebuf_setup(Tilebuf *tb); */ EAPI void evas_common_tilebuf_init(void) { } EAPI Tilebuf * evas_common_tilebuf_new(int w, int h) { Tilebuf *tb; tb = calloc(1, sizeof(Tilebuf)); if (!tb) return NULL; tb->tile_size.w = 8; tb->tile_size.h = 8; tb->outbuf_w = w; tb->outbuf_h = h; return tb; } EAPI void evas_common_tilebuf_free(Tilebuf *tb) { #ifdef RECTUPDATE /* evas_common_regionbuf_free(tb->rb); */ #elif defined(EVAS_RECT_SPLIT) rect_list_clear(&tb->rects); rect_list_node_pool_flush(); #else /* if (tb->tiles.tiles) free(tb->tiles.tiles); */ #endif free(tb); } EAPI void evas_common_tilebuf_set_tile_size(Tilebuf *tb, int tw, int th) { tb->tile_size.w = tw; tb->tile_size.h = th; /* tilebuf_setup(tb); */ } EAPI void evas_common_tilebuf_get_tile_size(Tilebuf *tb, int *tw, int *th) { if (tw) *tw = tb->tile_size.w; if (th) *th = tb->tile_size.h; } #ifdef EVAS_RECT_SPLIT static inline int _add_redraw(list_t *rects, int x, int y, int w, int h) { rect_node_t *rn; /* we dont need to do this fuzz stuff - it actually creates overdraw bugs * when evas shouldnt draw at all. x >>= 1; y >>= 1; w += 2; w >>= 1; h += 2; h >>= 1; */ rn = (rect_node_t *)rect_list_node_pool_get(); rn->_lst = list_node_zeroed; rect_init(&rn->rect, x, y, w, h); //INF("ACCOUNTING: add_redraw: %4d,%4d %3dx%3d", x, y, w, h); //testing on my core2 duo desktop - fuzz of 32 or 48 is best. #define FUZZ 32 rect_list_add_split_fuzzy_and_merge(rects, (list_node_t *)rn, FUZZ * FUZZ, FUZZ * FUZZ); return 1; } #endif EAPI int evas_common_tilebuf_add_redraw(Tilebuf *tb, int x, int y, int w, int h) { #ifdef RECTUPDATE /* int i; if ((w <= 0) || (h <= 0)) return 0; RECTS_CLIP_TO_RECT(x, y, w, h, 0, 0, tb->outbuf_w, tb->outbuf_h); if ((w <= 0) || (h <= 0)) return 0; for (i = 0; i < h; i++) evas_common_regionbuf_span_add(tb->rb, x, x + w - 1, y + i); return 1; */ #elif defined(EVAS_RECT_SPLIT) if ((w <= 0) || (h <= 0)) return 0; RECTS_CLIP_TO_RECT(x, y, w, h, 0, 0, tb->outbuf_w, tb->outbuf_h); if ((w <= 0) || (h <= 0)) return 0; // optimize a common case -> adding the exact same rect 2x in a row if ((tb->prev_add.x == x) && (tb->prev_add.y == y) && (tb->prev_add.w == w) && (tb->prev_add.h == h)) return 1; tb->prev_add.x = x; tb->prev_add.y = y; tb->prev_add.w = w; tb->prev_add.h = h; tb->prev_del.w = 0; tb->prev_del.h = 0; return _add_redraw(&tb->rects, x, y, w, h); #else /* int tx1, tx2, ty1, ty2, tfx1, tfx2, tfy1, tfy2, xx, yy; int num; if ((w <= 0) || (h <= 0)) return 0; RECTS_CLIP_TO_RECT(x, y, w, h, 0, 0, tb->outbuf_w, tb->outbuf_h); if ((w <= 0) || (h <= 0)) return 0; num = 0; // wipes out any motion vectors in tiles it touches into redraws if (tilebuf_x_intersect(tb, x, w, &tx1, &tx2, &tfx1, &tfx2) && tilebuf_y_intersect(tb, y, h, &ty1, &ty2, &tfy1, &tfy2)) { Tilebuf_Tile *tbt; int delta_x; int delta_y; tbt = &(TILE(tb, tx1, ty1)); delta_x = tx2 - tx1 + 1; delta_y = ty2 - ty1 + 1; for (yy = delta_y; yy > 0; yy--) { Tilebuf_Tile *tbti; tbti = tbt; for (xx = delta_x; xx > 0; xx--) { tbti->redraw = 1; tbti++; } tbt += tb->tiles.w; } num = (tx2 - tx1 + 1) * (ty2 - ty1 + 1); } return num; */ #endif } EAPI int evas_common_tilebuf_del_redraw(Tilebuf *tb, int x, int y, int w, int h) { #ifdef RECTUPDATE /* int i; for (i = 0; i < h; i++) evas_common_regionbuf_span_del(tb->rb, x, x + w - 1, y + i); */ #elif defined(EVAS_RECT_SPLIT) rect_t r; if (!tb->rects.head) return 0; if ((w <= 0) || (h <= 0)) return 0; RECTS_CLIP_TO_RECT(x, y, w, h, 0, 0, tb->outbuf_w, tb->outbuf_h); if ((w <= 0) || (h <= 0)) return 0; /* we dont need to do this fuzz stuff - it actually creates overdraw bugs * when evas shouldnt draw at all. x += 1; y += 1; x >>= 1; y >>= 1; w -= 1; w >>= 1; h -= 1; h >>= 1; if ((w <= 0) || (h <= 0)) return 0; */ // optimize a common case -> deleting the exact same rect 2x in a row if ((tb->prev_del.x == x) && (tb->prev_del.y == y) && (tb->prev_del.w == w) && (tb->prev_del.h == h)) return 1; tb->prev_del.x = x; tb->prev_del.y = y; tb->prev_del.w = w; tb->prev_del.h = h; tb->prev_add.w = 0; tb->prev_add.h = 0; rect_init(&r, x, y, w, h); rect_list_del_split_strict(&tb->rects, r); tb->need_merge = 1; return 0; #else /* int tx1, tx2, ty1, ty2, tfx1, tfx2, tfy1, tfy2, xx, yy; int num; num = 0; // wipes out any motion vectors in tiles it touches into redraws if (tilebuf_x_intersect(tb, x, w, &tx1, &tx2, &tfx1, &tfx2) && tilebuf_y_intersect(tb, y, h, &ty1, &ty2, &tfy1, &tfy2)) { Tilebuf_Tile *tbt; int delta_y; int delta_x; if (!tfx1) tx1++; if (!tfx2) tx2--; if (!tfy1) ty1++; if (!tfy2) ty2--; tbt = &(TILE(tb, tx1, ty1)); delta_x = tx2 - tx1 + 1; delta_y = ty2 - ty1 + 1; for (yy = delta_y; yy > 0; yy--) { Tilebuf_Tile *tbti; tbti = tbt; for (xx = delta_x; xx > 0; xx--) { tbti->redraw = 0; tbti++; } tbt += tb->tiles.w; } num = (tx2 - tx1 + 1) * (ty2 - ty1 + 1); } return num; */ #endif } EAPI int evas_common_tilebuf_add_motion_vector(Tilebuf *tb __UNUSED__, int x __UNUSED__, int y __UNUSED__, int w __UNUSED__, int h __UNUSED__, int dx __UNUSED__, int dy __UNUSED__, int alpha __UNUSED__) { #ifdef EVAS_RECT_SPLIT /* motion vector handling never has been used -> disable it list_t lr = list_zeroed; int num; num = _add_redraw(&lr, x, y, w, h); num += _add_redraw(&lr, x + dx, y + dy, w, h); while (lr.head) { list_node_t *node = rect_list_unlink_next(&lr, NULL); rect_list_add_split_fuzzy_and_merge(&tb->rects, node, FUZZ * FUZZ, FUZZ * FUZZ); } return num; */ return 0; #else /* int num; num = evas_common_tilebuf_add_redraw(tb, x, y, w, h); num += evas_common_tilebuf_add_redraw(tb, x + dx, y + dy, w, h); return num; */ #endif } EAPI void evas_common_tilebuf_clear(Tilebuf *tb) { #ifdef RECTUPDATE /* evas_common_regionbuf_clear(tb->rb); */ #elif defined(EVAS_RECT_SPLIT) tb->prev_add.x = tb->prev_add.y = tb->prev_add.w = tb->prev_add.h = 0; tb->prev_del.x = tb->prev_del.y = tb->prev_del.w = tb->prev_del.h = 0; rect_list_clear(&tb->rects); tb->need_merge = 0; #else /* if (!tb->tiles.tiles) return; memset(tb->tiles.tiles, 0, tb->tiles.w * tb->tiles.h * sizeof(Tilebuf_Tile)); */ #endif } EAPI Tilebuf_Rect * evas_common_tilebuf_get_render_rects(Tilebuf *tb) { #ifdef RECTUPDATE /* return evas_common_regionbuf_rects_get(tb->rb); */ #elif defined(EVAS_RECT_SPLIT) list_node_t *n; Tilebuf_Rect *rects = NULL; int bx1 = 0, bx2 = 0, by1 = 0, by2 = 0, num = 0; if (tb->need_merge) { list_t to_merge; to_merge = tb->rects; tb->rects = list_zeroed; rect_list_merge_rects(&tb->rects, &to_merge, FUZZ * FUZZ); tb->need_merge = 0; } n = tb->rects.head; if (n) { bx1 = ((rect_node_t *)n)->rect.left; bx2 = bx1 + ((rect_node_t *)n)->rect.width; by1 = ((rect_node_t *)n)->rect.top; by2 = by1 + ((rect_node_t *)n)->rect.height; n = n->next; for (; n; n = n->next) { int x1, x2, y1, y2; x1 = ((rect_node_t *)n)->rect.left; if (x1 < bx1) bx1 = x1; x2 = x1 + ((rect_node_t *)n)->rect.width; if (x2 > bx2) bx2 = x2; y1 = ((rect_node_t *)n)->rect.top; if (y1 < by1) by1 = y1; y2 = y1 + ((rect_node_t *)n)->rect.height; if (y2 > by2) by2 = y2; num++; } } #define MAXREG 24 /* magic number - but if we have > MAXREG regions to update, take bounding box */ if (num > MAXREG) { Tilebuf_Rect *r; r = malloc(sizeof(Tilebuf_Rect)); r->x = bx1; r->y = by1; r->w = bx2 - bx1; r->h = by2 - by1; rects = (Tilebuf_Rect *)eina_inlist_append(EINA_INLIST_GET(rects), EINA_INLIST_GET(r)); return rects; } for (n = tb->rects.head; n; n = n->next) { rect_t cur; cur = ((rect_node_t *)n)->rect; /* disable fuzz - created bugs. cur.left <<= 1; cur.top <<= 1; cur.width <<= 1; cur.height <<= 1; */ RECTS_CLIP_TO_RECT(cur.left, cur.top, cur.width, cur.height, 0, 0, tb->outbuf_w, tb->outbuf_h); if ((cur.width > 0) && (cur.height > 0)) { Tilebuf_Rect *r; r = malloc(sizeof(Tilebuf_Rect)); r->x = cur.left; r->y = cur.top; r->w = cur.width; r->h = cur.height; rects = (Tilebuf_Rect *)eina_inlist_append(EINA_INLIST_GET(rects), EINA_INLIST_GET(r)); } } return rects; #else /* Tilebuf_Rect *rects = NULL; Tilebuf_Tile *tbt; int x, y; tbt = &(TILE(tb, 0, 0)); for (y = 0; y < tb->tiles.h; y++) { for (x = 0; x < tb->tiles.w; x++, tbt++) { if (tbt->redraw) { Tilebuf_Tile *tbti; int can_expand_x = 1, can_expand_y = 1; Tilebuf_Rect *r = NULL; int xx = 0, yy = 0; r = malloc(sizeof(Tilebuf_Rect)); r->_list_data.next = NULL; r->_list_data.prev = NULL; r->_list_data.last = NULL; // amalgamate tiles #if 1 tbti = tbt; while (can_expand_x) { tbti++; xx++; if ((x + xx) >= tb->tiles.w) can_expand_x = 0; else if (!(tbti->redraw)) can_expand_x = 0; if (can_expand_x) tbti->redraw = 0; } tbti = tbt; while (can_expand_y) { int i; tbti += tb->tiles.w; yy++; if ((y + yy) >= tb->tiles.h) can_expand_y = 0; if (can_expand_y) { Tilebuf_Tile *tbtj; tbtj = tbti; for (i = x; i < x + xx; i++, tbtj++) { if (!(tbtj->redraw)) { can_expand_y = 0; break; } } } if (can_expand_y) { Tilebuf_Tile *tbtj; tbtj = tbti; for (i = x; i < x + xx; i++, tbtj++) tbtj->redraw = 0; } } tbt->redraw = 0; #else xx = 1; yy = 1; #endif r->x = x * tb->tile_size.w; r->y = y * tb->tile_size.h; r->w = (xx) * tb->tile_size.w; r->h = (yy) * tb->tile_size.h; rects = eina_inlist_append(rects, r); x = x + (xx - 1); tbt += xx - 1; } } } return rects; */ #endif } EAPI void evas_common_tilebuf_free_render_rects(Tilebuf_Rect *rects) { while (rects) { Tilebuf_Rect *r; r = rects; rects = (Tilebuf_Rect *)eina_inlist_remove(EINA_INLIST_GET(rects), EINA_INLIST_GET(r)); free(r); } } /* need a way of getting rectangles to: blit, re-render */ /* internal usage */ /* static void tilebuf_setup(Tilebuf *tb) { if ((tb->outbuf_w <= 0) || (tb->outbuf_h <= 0)) return; #ifdef RECTUPDATE tb->rb = evas_common_regionbuf_new(tb->outbuf_w, tb->outbuf_h); #elif defined(EVAS_RECT_SPLIT) tb->rects = list_zeroed; #else if (tb->tiles.tiles) free(tb->tiles.tiles); tb->tiles.tiles = NULL; tb->tiles.w = (tb->outbuf_w + (tb->tile_size.w - 1)) / tb->tile_size.w; tb->tiles.h = (tb->outbuf_h + (tb->tile_size.h - 1)) / tb->tile_size.h; tb->tiles.tiles = malloc(tb->tiles.w * tb->tiles.h * sizeof(Tilebuf_Tile)); if (!tb->tiles.tiles) { tb->tiles.w = 0; tb->tiles.h = 0; return; } memset(tb->tiles.tiles, 0, tb->tiles.w * tb->tiles.h * sizeof(Tilebuf_Tile)); #endif } */ #ifdef RECTUPDATE #elif defined(EVAS_RECT_SPLIT) #else /* static int tilebuf_x_intersect(Tilebuf *tb, int x, int w, int *x1, int *x2, int *x1_fill, int *x2_fill) { return tilebuf_intersect(tb->tile_size.w, tb->outbuf_w, tb->tiles.w, x, w, x1, x2, x1_fill, x2_fill); } static int tilebuf_y_intersect(Tilebuf *tb, int y, int h, int *y1, int *y2, int *y1_fill, int *y2_fill) { return tilebuf_intersect(tb->tile_size.h, tb->outbuf_h, tb->tiles.h, y, h, y1, y2, y1_fill, y2_fill); } static int tilebuf_intersect(int tsize, int tlen, int tnum, int x, int w, int *x1, int *x2, int *x1_fill, int *x2_fill) { int p1, p2; // initial clip out of region if ((x + w) <= 0) return 0; if (x >= tlen) return 0; // adjust x & w so it all fits in region if (x < 0) { w += x; x = 0; } if (w < 0) return 0; if ((x + w) > tlen) w = tlen - x; // now figure if the first edge is fully filling its tile p1 = (x) / tsize; if ((p1 * tsize) == (x)) *x1_fill = 1; else *x1_fill = 0; *x1 = p1; // now figure if the last edge is fully filling its tile p2 = (x + w - 1) / tsize; if (((p2 + 1) * tsize) == (x + w)) *x2_fill = 1; else *x2_fill = 0; *x2 = p2; return 1; tnum = 0; } */ #endif evas-1.7.9/src/lib/engines/common/evas_convert_rgb_32.c0000664000175000017500000004400512175475547017712 00000000000000#include "evas_common.h" #include "evas_convert_rgb_32.h" #ifdef BUILD_CONVERT_32_RGB_8888 #ifdef BUILD_CONVERT_32_RGB_ROT0 void evas_common_convert_rgba_to_32bpp_rgb_8888 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x __UNUSED__, int dith_y __UNUSED__, DATA8 *pal __UNUSED__) { DATA32 *src_ptr; DATA32 *dst_ptr; int y; Gfx_Func_Copy func; dst_ptr = (DATA32 *)dst; src_ptr = src; func = evas_common_draw_func_copy_get(w, 0); for (y = 0; y < h; y++) { func(src_ptr, dst_ptr, w); src_ptr += w + src_jump; dst_ptr += w + dst_jump; } return; } #endif #endif #ifdef BUILD_CONVERT_32_RGB_8888 #ifdef BUILD_CONVERT_32_RGB_ROT180 void evas_common_convert_rgba_to_32bpp_rgb_8888_rot_180 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x __UNUSED__, int dith_y __UNUSED__, DATA8 *pal __UNUSED__) { DATA32 *src_ptr; DATA32 *dst_ptr; int x, y; dst_ptr = (DATA32 *)dst; CONVERT_LOOP_START_ROT_180(); *dst_ptr = *src_ptr; CONVERT_LOOP_END_ROT_180(); return; } #endif #endif #ifdef TILE_ROTATE #define FAST_SIMPLE_ROTATE(suffix, pix_type) \ static void \ blt_rotated_90_trivial_##suffix(pix_type *dst, \ int dst_stride, \ const pix_type *src, \ int src_stride, \ int w, \ int h) \ { \ int x, y; \ for (y = 0; y < h; y++) \ { \ const pix_type *s = src + (h - y - 1); \ pix_type *d = dst + (dst_stride * y); \ for (x = 0; x < w; x++) \ { \ *d++ = *s; \ s += src_stride; \ } \ } \ } \ static void \ blt_rotated_270_trivial_##suffix(pix_type *dst, \ int dst_stride, \ const pix_type *src, \ int src_stride, \ int w, \ int h) \ { \ int x, y; \ for (y = 0; y < h; y++) \ { \ const pix_type *s = src + (src_stride * (w - 1)) + y; \ pix_type *d = dst + (dst_stride * y); \ for (x = 0; x < w; x++) \ { \ *d++ = *s; \ s -= src_stride; \ } \ } \ } \ static void \ blt_rotated_90_##suffix(pix_type *dst, \ int dst_stride, \ const pix_type *src, \ int src_stride, \ int w, \ int h) \ { \ int x, leading_pixels = 0, trailing_pixels = 0; \ const int TILE_SIZE = TILE_CACHE_LINE_SIZE / sizeof(pix_type); \ if ((uintptr_t)dst & (TILE_CACHE_LINE_SIZE - 1)) \ { \ leading_pixels = TILE_SIZE - \ (((uintptr_t)dst & (TILE_CACHE_LINE_SIZE - 1)) / sizeof(pix_type)); \ if (leading_pixels > w) \ leading_pixels = w; \ blt_rotated_90_trivial_##suffix(dst, \ dst_stride, \ src, \ src_stride, \ leading_pixels, \ h); \ dst += leading_pixels; \ src += leading_pixels * src_stride; \ w -= leading_pixels; \ } \ if ((uintptr_t)(dst + w) & (TILE_CACHE_LINE_SIZE - 1)) \ { \ trailing_pixels = (((uintptr_t)(dst + w) & \ (TILE_CACHE_LINE_SIZE - 1)) / sizeof(pix_type)); \ if (trailing_pixels > w) \ trailing_pixels = w; \ w -= trailing_pixels; \ } \ for (x = 0; x < w; x += TILE_SIZE) \ { \ blt_rotated_90_trivial_##suffix(dst + x, \ dst_stride, \ src + (src_stride * x), \ src_stride, \ TILE_SIZE, \ h); \ } \ if (trailing_pixels) \ blt_rotated_90_trivial_##suffix(dst + w, \ dst_stride, \ src + (w * src_stride), \ src_stride, \ trailing_pixels, \ h); \ } \ static void \ blt_rotated_270_##suffix(pix_type *dst, \ int dst_stride, \ const pix_type *src, \ int src_stride, \ int w, \ int h) \ { \ int x, leading_pixels = 0, trailing_pixels = 0; \ const int TILE_SIZE = TILE_CACHE_LINE_SIZE / sizeof(pix_type); \ if ((uintptr_t)dst & (TILE_CACHE_LINE_SIZE - 1)) \ { \ leading_pixels = TILE_SIZE - \ (((uintptr_t)dst & (TILE_CACHE_LINE_SIZE - 1)) / sizeof(pix_type)); \ if (leading_pixels > w) \ leading_pixels = w; \ blt_rotated_270_trivial_##suffix(dst, \ dst_stride, \ src + (src_stride * (w - leading_pixels)), \ src_stride, \ leading_pixels, \ h); \ dst += leading_pixels; \ w -= leading_pixels; \ } \ if ((uintptr_t)(dst + w) & (TILE_CACHE_LINE_SIZE - 1)) \ { \ trailing_pixels = (((uintptr_t)(dst + w) & \ (TILE_CACHE_LINE_SIZE - 1)) / sizeof(pix_type)); \ if (trailing_pixels > w) \ trailing_pixels = w; \ w -= trailing_pixels; \ src += trailing_pixels * src_stride; \ } \ for (x = 0; x < w; x += TILE_SIZE) \ { \ blt_rotated_270_trivial_##suffix(dst + x, \ dst_stride, \ src + (src_stride * (w - x - TILE_SIZE)), \ src_stride, \ TILE_SIZE, \ h); \ } \ if (trailing_pixels) \ blt_rotated_270_trivial_##suffix(dst + w, \ dst_stride, \ src - (trailing_pixels * src_stride), \ src_stride, \ trailing_pixels, \ h); \ } FAST_SIMPLE_ROTATE(8888, DATA32) #endif #ifdef BUILD_CONVERT_32_RGB_8888 #ifdef BUILD_CONVERT_32_RGB_ROT270 void evas_common_convert_rgba_to_32bpp_rgb_8888_rot_270 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x __UNUSED__, int dith_y __UNUSED__, DATA8 *pal __UNUSED__) { #ifdef TILE_ROTATE blt_rotated_270_8888((DATA8 *)dst, dst_jump+w, (const DATA8 *)src, src_jump+h, w, h) ; #else DATA32 *src_ptr; DATA32 *dst_ptr; int x, y; dst_ptr = (DATA32 *)dst; CONVERT_LOOP_START_ROT_270(); *dst_ptr = *src_ptr; CONVERT_LOOP_END_ROT_270(); #endif return; } #endif #endif #ifdef BUILD_CONVERT_32_RGB_8888 #ifdef BUILD_CONVERT_32_RGB_ROT90 void evas_common_convert_rgba_to_32bpp_rgb_8888_rot_90 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x __UNUSED__, int dith_y __UNUSED__, DATA8 *pal __UNUSED__) { # ifndef BUILD_NEON # ifdef TILE_ROTATE blt_rotated_90_8888((DATA8 *)dst, dst_jump+w, (const DATA8 *)src, src_jump+h, w, h) ; # else DATA32 *src_ptr; DATA32 *dst_ptr; int x, y; dst_ptr = (DATA32 *)dst; CONVERT_LOOP_START_ROT_90(); *dst_ptr = *src_ptr; CONVERT_LOOP_END_ROT_90(); # endif # else # ifdef TILE_ROTATE blt_rotated_90_8888((DATA8 *)dst, dst_jump+w, (const DATA8 *)src, src_jump+h, w, h) ; # else if ((w & 1) || (h & 1)) { /* Rarely (if ever) if ever: so slow path is fine */ DATA32 *src_ptr; DATA32 *dst_ptr; int x, y; dst_ptr = (DATA32 *)dst; CONVERT_LOOP_START_ROT_90(); *dst_ptr = *src_ptr; CONVERT_LOOP_END_ROT_90(); } else { # define AP "convert_rgba32_rot_90_" asm volatile ( ".fpu neon \n\t" " mov %[s1], %[src] \n\t" " add %[s1], %[s1], %[h],lsl #2 \n\t" " sub %[s1], #8 \n\t" " mov %[s2], %[src] \n\t" " add %[s2], %[s2], %[h], lsl #3 \n\t" " add %[s2], %[s2], %[sjmp], lsr #1 \n\t" " sub %[s2], #8 \n\t" " mov %[d1], %[dst] \n\t" " add %[d2], %[d1], %[djmp] \n\t" " add %[d2], %[d2], %[w], lsl #2 \n\t" " mov %[sadv], %[h], lsl #3 \n\t" " add %[sadv], %[sadv], %[sjmp], lsl #1\n\t" " mov %[y], #0 \n\t" " mov %[x], #0 \n\t" AP"loop: \n\t" " vld1.u32 d0, [%[s1]] \n\t" " vld1.u32 d1, [%[s2]] \n\t" " add %[x], #2 \n\t" " add %[s1], %[sadv] \n\t" " add %[s2], %[sadv] \n\t" " vtrn.u32 d0, d1 \n\t" " cmp %[x], %[w] \n\t" " vst1.u32 d1, [%[d1]]! \n\t" " vst1.u32 d0, [%[d2]]! \n\t" " blt "AP"loop \n\t" " mov %[x], #0 \n\t" " add %[d1], %[djmp] \n\t" " add %[d1], %[d1], %[w], lsl #2 \n\t" " add %[d2], %[djmp] \n\t" " add %[d2], %[d2], %[w], lsl #2 \n\t" " mov %[s1], %[src] \n\t" " add %[s1], %[s1], %[h], lsl #2 \n\t" " sub %[s1], %[s1], %[y], lsl #2 \n\t" " sub %[s1], #16 \n\t" " add %[s2], %[s1], %[h], lsl #2 \n\t" " add %[s2], %[s2], %[sjmp], lsl #2 \n\t" " add %[y], #2 \n\t" " cmp %[y], %[h] \n\t" " blt "AP"loop \n\t" : // Out : [s1] "r" (1), [s2] "r" (11), [d1] "r" (2), [d2] "r" (12), [src] "r" (src), [dst] "r" (dst), [x] "r" (3), [y] "r" (4), [w] "r" (w), [h] "r" (h), [sadv] "r" (5), [sjmp] "r" (src_jump * 4), [djmp] "r" (dst_jump * 4 * 2) : "d0", "d1", "memory", "cc"// Clober ); } # undef AP # endif # endif return; } #endif #endif #ifdef BUILD_CONVERT_32_RGBX_8888 #ifdef BUILD_CONVERT_32_RGB_ROT0 void evas_common_convert_rgba_to_32bpp_rgbx_8888 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x __UNUSED__, int dith_y __UNUSED__, DATA8 *pal __UNUSED__) { DATA32 *src_ptr; DATA32 *dst_ptr; int x, y; dst_ptr = (DATA32 *)dst; CONVERT_LOOP_START_ROT_0(); // *dst_ptr = (R_VAL(src_ptr) << 24) | (G_VAL(src_ptr) << 16) | (B_VAL(src_ptr) << 8); *dst_ptr = (*src_ptr << 8); CONVERT_LOOP_END_ROT_0(); return; } #endif #endif #ifdef BUILD_CONVERT_32_RGBX_8888 #ifdef BUILD_CONVERT_32_RGB_ROT180 void evas_common_convert_rgba_to_32bpp_rgbx_8888_rot_180 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x __UNUSED__, int dith_y __UNUSED__, DATA8 *pal __UNUSED__) { DATA32 *src_ptr; DATA32 *dst_ptr; int x, y; dst_ptr = (DATA32 *)dst; CONVERT_LOOP_START_ROT_180(); // *dst_ptr = (R_VAL(src_ptr) << 24) | (G_VAL(src_ptr) << 16) | (B_VAL(src_ptr) << 8); *dst_ptr = (*src_ptr << 8); CONVERT_LOOP_END_ROT_180(); return; } #endif #endif #ifdef BUILD_CONVERT_32_RGBX_8888 #ifdef BUILD_CONVERT_32_RGB_ROT270 void evas_common_convert_rgba_to_32bpp_rgbx_8888_rot_270 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x __UNUSED__, int dith_y __UNUSED__, DATA8 *pal __UNUSED__) { DATA32 *src_ptr; DATA32 *dst_ptr; int x, y; dst_ptr = (DATA32 *)dst; CONVERT_LOOP_START_ROT_270(); // *dst_ptr = (R_VAL(src_ptr) << 24) | (G_VAL(src_ptr) << 16) | (B_VAL(src_ptr) << 8); *dst_ptr = (*src_ptr << 8); CONVERT_LOOP_END_ROT_270(); return; } #endif #endif #ifdef BUILD_CONVERT_32_RGBX_8888 #ifdef BUILD_CONVERT_32_RGB_ROT90 void evas_common_convert_rgba_to_32bpp_rgbx_8888_rot_90 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x __UNUSED__, int dith_y __UNUSED__, DATA8 *pal __UNUSED__) { DATA32 *src_ptr; DATA32 *dst_ptr; int x, y; dst_ptr = (DATA32 *)dst; CONVERT_LOOP_START_ROT_90(); // *dst_ptr = (R_VAL(src_ptr) << 24) | (G_VAL(src_ptr) << 16) | (B_VAL(src_ptr) << 8); *dst_ptr = (*src_ptr << 8); CONVERT_LOOP_END_ROT_90(); return; } #endif #endif #ifdef BUILD_CONVERT_32_BGR_8888 #ifdef BUILD_CONVERT_32_RGB_ROT0 void evas_common_convert_rgba_to_32bpp_bgr_8888 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x __UNUSED__, int dith_y __UNUSED__, DATA8 *pal __UNUSED__) { DATA32 *src_ptr; DATA32 *dst_ptr; int x, y; dst_ptr = (DATA32 *)dst; CONVERT_LOOP_START_ROT_0(); *dst_ptr = (B_VAL(src_ptr) << 16) | (G_VAL(src_ptr) << 8) | (R_VAL(src_ptr)); CONVERT_LOOP_END_ROT_0(); return; } #endif #endif #ifdef BUILD_CONVERT_32_BGR_8888 #ifdef BUILD_CONVERT_32_RGB_ROT180 void evas_common_convert_rgba_to_32bpp_bgr_8888_rot_180 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x __UNUSED__, int dith_y __UNUSED__, DATA8 *pal __UNUSED__) { DATA32 *src_ptr; DATA32 *dst_ptr; int x, y; dst_ptr = (DATA32 *)dst; CONVERT_LOOP_START_ROT_180(); *dst_ptr = (B_VAL(src_ptr) << 16) | (G_VAL(src_ptr) << 8) | (R_VAL(src_ptr)); CONVERT_LOOP_END_ROT_180(); return; } #endif #endif #ifdef BUILD_CONVERT_32_BGR_8888 #ifdef BUILD_CONVERT_32_RGB_ROT270 void evas_common_convert_rgba_to_32bpp_bgr_8888_rot_270 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x __UNUSED__, int dith_y __UNUSED__, DATA8 *pal __UNUSED__) { DATA32 *src_ptr; DATA32 *dst_ptr; int x, y; dst_ptr = (DATA32 *)dst; CONVERT_LOOP_START_ROT_270(); *dst_ptr = (B_VAL(src_ptr) << 16) | (G_VAL(src_ptr) << 8) | (R_VAL(src_ptr)); CONVERT_LOOP_END_ROT_270(); return; } #endif #endif #ifdef BUILD_CONVERT_32_BGR_8888 #ifdef BUILD_CONVERT_32_RGB_ROT90 void evas_common_convert_rgba_to_32bpp_bgr_8888_rot_90 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x __UNUSED__, int dith_y __UNUSED__, DATA8 *pal __UNUSED__) { DATA32 *src_ptr; DATA32 *dst_ptr; int x, y; dst_ptr = (DATA32 *)dst; CONVERT_LOOP_START_ROT_90(); *dst_ptr = (B_VAL(src_ptr) << 16) | (G_VAL(src_ptr) << 8) | (R_VAL(src_ptr)); CONVERT_LOOP_END_ROT_90(); return; } #endif #endif #ifdef BUILD_CONVERT_32_BGRX_8888 #ifdef BUILD_CONVERT_32_RGB_ROT0 void evas_common_convert_rgba_to_32bpp_bgrx_8888 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x __UNUSED__, int dith_y __UNUSED__, DATA8 *pal __UNUSED__) { DATA32 *src_ptr; DATA32 *dst_ptr; int x, y; dst_ptr = (DATA32 *)dst; CONVERT_LOOP_START_ROT_0(); *dst_ptr = (B_VAL(src_ptr) << 24) | (G_VAL(src_ptr) << 16) | (R_VAL(src_ptr) << 8); CONVERT_LOOP_END_ROT_0(); return; } #endif #endif #ifdef BUILD_CONVERT_32_BGRX_8888 #ifdef BUILD_CONVERT_32_RGB_ROT180 void evas_common_convert_rgba_to_32bpp_bgrx_8888_rot_180 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x __UNUSED__, int dith_y __UNUSED__, DATA8 *pal __UNUSED__) { DATA32 *src_ptr; DATA32 *dst_ptr; int x, y; dst_ptr = (DATA32 *)dst; CONVERT_LOOP_START_ROT_180(); *dst_ptr = (B_VAL(src_ptr) << 24) | (G_VAL(src_ptr) << 16) | (R_VAL(src_ptr) << 8); CONVERT_LOOP_END_ROT_180(); return; } #endif #endif #ifdef BUILD_CONVERT_32_BGRX_8888 #ifdef BUILD_CONVERT_32_RGB_ROT270 void evas_common_convert_rgba_to_32bpp_bgrx_8888_rot_270 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x __UNUSED__, int dith_y __UNUSED__, DATA8 *pal __UNUSED__) { DATA32 *src_ptr; DATA32 *dst_ptr; int x, y; dst_ptr = (DATA32 *)dst; CONVERT_LOOP_START_ROT_270(); *dst_ptr = (B_VAL(src_ptr) << 24) | (G_VAL(src_ptr) << 16) | (R_VAL(src_ptr) << 8); CONVERT_LOOP_END_ROT_270(); return; } #endif #endif #ifdef BUILD_CONVERT_32_BGRX_8888 #ifdef BUILD_CONVERT_32_RGB_ROT90 void evas_common_convert_rgba_to_32bpp_bgrx_8888_rot_90 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x __UNUSED__, int dith_y __UNUSED__, DATA8 *pal __UNUSED__) { DATA32 *src_ptr; DATA32 *dst_ptr; int x, y; dst_ptr = (DATA32 *)dst; CONVERT_LOOP_START_ROT_90(); *dst_ptr = (B_VAL(src_ptr) << 24) | (G_VAL(src_ptr) << 16) | (R_VAL(src_ptr) << 8); CONVERT_LOOP_END_ROT_90(); return; } #endif #endif #ifdef BUILD_CONVERT_32_RGB_666 #ifdef BUILD_CONVERT_32_RGB_ROT0 void evas_common_convert_rgba_to_32bpp_rgb_666(DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x __UNUSED__, int dith_y __UNUSED__, DATA8 *pal __UNUSED__) { DATA32 *src_ptr; DATA32 *dst_ptr; int x, y; dst_ptr = (DATA32 *)dst; CONVERT_LOOP_START_ROT_0(); *dst_ptr = (((R_VAL(src_ptr) << 12) | (B_VAL(src_ptr) >> 2)) & 0x03f03f) | ((G_VAL(src_ptr) << 4) & 0x000fc0); CONVERT_LOOP_END_ROT_0(); return; } #endif #endif evas-1.7.9/src/lib/engines/common/evas_text_utils.c0000664000175000017500000003416612175475547017307 00000000000000#include "evas_common.h" #include "evas_font_private.h" #include "evas_text_utils.h" #include "language/evas_bidi_utils.h" #include "language/evas_language_utils.h" #include "evas_font_ot.h" #define PROPS_CHANGE(Props) Props->changed = EINA_TRUE; void evas_common_text_props_bidi_set(Evas_Text_Props *props, Evas_BiDi_Paragraph_Props *bidi_par_props, size_t start) { #ifdef BIDI_SUPPORT props->bidi.dir = (evas_bidi_is_rtl_char( bidi_par_props, 0, start)) ? EVAS_BIDI_DIRECTION_RTL : EVAS_BIDI_DIRECTION_LTR; #else (void) start; (void) bidi_par_props; props->bidi.dir = EVAS_BIDI_DIRECTION_LTR; #endif PROPS_CHANGE(props); } void evas_common_text_props_script_set(Evas_Text_Props *props, Evas_Script_Type scr) { props->script = scr; PROPS_CHANGE(props); } void evas_common_text_props_content_copy_and_ref(Evas_Text_Props *dst, const Evas_Text_Props *src) { memcpy(dst, src, sizeof(Evas_Text_Props)); dst->glyphs = NULL; dst->glyphs_length = 0; evas_common_text_props_content_ref(dst); } void evas_common_text_props_content_ref(Evas_Text_Props *props) { /* No content in this case */ if (!props->info) return; props->info->refcount++; if (props->font_instance) ((RGBA_Font_Int *)props->font_instance)->references++; } void evas_common_text_props_content_nofree_unref(Evas_Text_Props *props) { /* No content in this case */ if (!props->info) return; if (--(props->info->refcount) == 0) { if (props->font_instance) { evas_common_font_int_unref(props->font_instance); props->font_instance = NULL; } free(props->glyphs); props->glyphs = NULL; props->glyphs_length = 0; if (props->info->glyph) free(props->info->glyph); #ifdef OT_SUPPORT if (props->info->ot) free(props->info->ot); #endif free(props->info); props->info = NULL; } } void evas_common_text_props_content_unref(Evas_Text_Props *props) { /* No content in this case */ if (!props->info) return; free(props->glyphs); props->glyphs = NULL; props->glyphs_length = 0; if (--(props->info->refcount) == 0) { if (props->font_instance) { evas_common_font_int_unref(props->font_instance); props->font_instance = NULL; } if (props->info->glyph) free(props->info->glyph); #ifdef OT_SUPPORT if (props->info->ot) free(props->info->ot); #endif free(props->info); props->info = NULL; } } static int _evas_common_text_props_cluster_move(const Evas_Text_Props *props, int pos, Eina_Bool right) { int prop_pos = evas_common_text_props_index_find(props, pos); if (!right && (prop_pos > 0)) { #ifdef OT_SUPPORT return props->info->ot[props->start + prop_pos - 1].source_cluster - props->text_offset; #else return props->start + prop_pos - 1 - props->text_offset; #endif } else if (right && (prop_pos < (int) (props->len - 1))) { #ifdef OT_SUPPORT return props->info->ot[props->start + prop_pos + 1].source_cluster - props->text_offset; #else return props->start + prop_pos + 1 - props->text_offset; #endif } return pos; } EAPI int evas_common_text_props_cluster_next(const Evas_Text_Props *props, int pos) { Eina_Bool right; /* Move right if we are in a non-rtl text */ right = (props->bidi.dir != EVAS_BIDI_DIRECTION_RTL); return _evas_common_text_props_cluster_move(props, pos, right); } EAPI int evas_common_text_props_cluster_prev(const Evas_Text_Props *props, int pos) { Eina_Bool right; /* Move right if we are in an rtl text */ right = (props->bidi.dir == EVAS_BIDI_DIRECTION_RTL); return _evas_common_text_props_cluster_move(props, pos, right); } /* Returns the index of the logical char in the props. */ EAPI int evas_common_text_props_index_find(const Evas_Text_Props *props, int _cutoff) { #ifdef OT_SUPPORT Evas_Font_OT_Info *ot_info; int min = 0; int max = props->len - 1; int mid; _cutoff += props->text_offset; ot_info = props->info->ot + props->start; /* Should get us closer to the right place. */ if ((min <= _cutoff) && (_cutoff <= max)) mid = _cutoff; else mid = (min + max) / 2; if (props->bidi.dir == EVAS_BIDI_DIRECTION_RTL) { /* Monotonic in a descending order */ do { if (_cutoff > (int) ot_info[mid].source_cluster) max = mid - 1; else if (_cutoff < (int) ot_info[mid].source_cluster) min = mid + 1; else break; mid = (min + max) / 2; } while (min <= max); } else { /* Monotonic in an ascending order */ do { if (_cutoff < (int) ot_info[mid].source_cluster) max = mid - 1; else if (_cutoff > (int) ot_info[mid].source_cluster) min = mid + 1; else break; mid = (min + max) / 2; } while (min <= max); } /* If we didn't find, abort */ if (min > max) return -1; ot_info += mid; if (props->bidi.dir == EVAS_BIDI_DIRECTION_RTL) { /* Walk to the last one of the same cluster */ for ( ; mid < (int) props->len ; mid++, ot_info++) { if (ot_info->source_cluster != (size_t) _cutoff) break; } mid--; } else { /* Walk to the last one of the same cluster */ for ( ; mid >= 0 ; mid--, ot_info--) { if (ot_info->source_cluster != (size_t) _cutoff) break; } mid++; } return mid; #else if (props->bidi.dir == EVAS_BIDI_DIRECTION_RTL) { return props->len - _cutoff - 1; } else { return _cutoff; } #endif } /* Won't work in the middle of ligatures, assumes cutoff < len. * Also won't work in the middle of indic words, should handle that in a * smart way. */ EAPI void evas_common_text_props_split(Evas_Text_Props *base, Evas_Text_Props *ext, int _cutoff) { size_t cutoff; /* Translate text cutoff pos to string object cutoff point */ _cutoff = evas_common_text_props_index_find(base, _cutoff); if (_cutoff >= 0) { cutoff = (size_t) _cutoff; } else { ERR("Couldn't find the cutoff position. Is it inside a cluster?"); return; } evas_common_text_props_content_copy_and_ref(ext, base); if (base->bidi.dir == EVAS_BIDI_DIRECTION_RTL) { ext->start = base->start; ext->len = cutoff + 1; base->start = base->start + ext->len; base->len = base->len - ext->len; #ifdef OT_SUPPORT ext->text_offset = ext->info->ot[ext->start + ext->len - 1].source_cluster; #else ext->text_offset = base->text_offset + base->len; #endif } else { ext->start = base->start + cutoff; ext->len = base->len - cutoff; base->len = cutoff; #ifdef OT_SUPPORT ext->text_offset = ext->info->ot[ext->start].source_cluster; #else ext->text_offset = base->text_offset + base->len; #endif } ext->text_len = base->text_len - (ext->text_offset - base->text_offset); base->text_len = (ext->text_offset - base->text_offset); PROPS_CHANGE(base); PROPS_CHANGE(ext); } /* Won't work in the middle of ligatures */ EAPI void evas_common_text_props_merge(Evas_Text_Props *item1, const Evas_Text_Props *item2) { if (item1->info != item2->info) { ERR("tried merge back items that weren't together in the first place."); return; } if (item1->bidi.dir == EVAS_BIDI_DIRECTION_RTL) { item1->start = item2->start; } item1->len += item2->len; item1->text_len += item2->text_len; PROPS_CHANGE(item1); } #ifdef OT_SUPPORT static inline void _content_create_ot(RGBA_Font_Int *fi, const Eina_Unicode *text, Evas_Text_Props *text_props, int len, Evas_Text_Props_Mode mode) { size_t char_index; Evas_Font_Glyph_Info *gl_itr; Evas_Coord pen_x = 0, adjust_x = 0; evas_common_font_ot_populate_text_props(text, text_props, len, mode); gl_itr = text_props->info->glyph; for (char_index = 0 ; char_index < text_props->len ; char_index++) { FT_UInt idx; RGBA_Font_Glyph *fg; Eina_Bool is_replacement = EINA_FALSE; /* If we got a malformed index, show the replacement char instead */ if (gl_itr->index == 0) { gl_itr->index = evas_common_get_char_index(fi, REPLACEMENT_CHAR); is_replacement = EINA_TRUE; } idx = gl_itr->index; LKL(fi->ft_mutex); fg = evas_common_font_int_cache_glyph_get(fi, idx); if (!fg) { LKU(fi->ft_mutex); continue; } LKU(fi->ft_mutex); gl_itr->x_bear = fg->x_bear; gl_itr->y_bear = fg->y_bear; gl_itr->width = fg->width; /* text_props->info->glyph[char_index].advance = * text_props->info->glyph[char_index].index = * already done by the ot function */ if (EVAS_FONT_CHARACTER_IS_INVISIBLE( text[text_props->info->ot[char_index].source_cluster])) { gl_itr->index = 0; /* Reduce the current advance */ if (gl_itr > text_props->info->glyph) { adjust_x -= gl_itr->pen_after - (gl_itr - 1)->pen_after; } else { adjust_x -= gl_itr->pen_after; } } else { if (is_replacement) { /* Update the advance accordingly */ adjust_x += (pen_x + (fg->glyph->advance.x >> 16)) - gl_itr->pen_after; } pen_x = gl_itr->pen_after; } gl_itr->pen_after += adjust_x; fi = text_props->font_instance; gl_itr++; } } #endif static inline void _content_create_regular(RGBA_Font_Int *fi, const Eina_Unicode *text, Evas_Text_Props *text_props, const Evas_BiDi_Paragraph_Props *par_props, size_t par_pos, int len, Evas_Text_Props_Mode mode) { /* We are walking the string in visual ordering */ Evas_Font_Glyph_Info *gl_itr; Eina_Bool use_kerning; FT_UInt prev_index; FT_Face pface = NULL; Evas_Coord pen_x = 0; int adv_d, i; #if !defined(OT_SUPPORT) && defined(BIDI_SUPPORT) Eina_Unicode *base_str = NULL; if (mode == EVAS_TEXT_PROPS_MODE_SHAPE) { if (text_props->bidi.dir == EVAS_BIDI_DIRECTION_RTL) { text = base_str = eina_unicode_strndup(text, len); evas_bidi_shape_string(base_str, par_props, par_pos, len); } } #else (void) mode; (void) par_props; (void) par_pos; #endif FTLOCK(); use_kerning = FT_HAS_KERNING(fi->src->ft.face); FTUNLOCK(); prev_index = 0; i = len; text_props->info->glyph = calloc(len, sizeof(Evas_Font_Glyph_Info)); if (text_props->bidi.dir == EVAS_BIDI_DIRECTION_RTL) { text += len - 1; adv_d = -1; } else { adv_d = 1; } gl_itr = text_props->info->glyph; for ( ; i > 0 ; gl_itr++, text += adv_d, i--) { FT_UInt idx; RGBA_Font_Glyph *fg; int _gl, kern; Evas_Coord adv; _gl = *text; if (_gl == 0) break; idx = evas_common_get_char_index(fi, _gl); if (idx == 0) { idx = evas_common_get_char_index(fi, REPLACEMENT_CHAR); } fg = evas_common_font_int_cache_glyph_get(fi, idx); if (!fg) continue; kern = 0; if ((use_kerning) && (prev_index) && (idx) && (pface == fi->src->ft.face)) { if (evas_common_font_query_kerning(fi, prev_index, idx, &kern)) { pen_x += kern; (gl_itr - 1)->pen_after += EVAS_FONT_ROUND_26_6_TO_INT(kern); } } pface = fi->src->ft.face; gl_itr->index = idx; gl_itr->x_bear = fg->x_bear; gl_itr->y_bear = fg->y_bear; adv = fg->glyph->advance.x >> 10; gl_itr->width = fg->width; if (EVAS_FONT_CHARACTER_IS_INVISIBLE(_gl)) { gl_itr->index = 0; } else { pen_x += adv; } gl_itr->pen_after = EVAS_FONT_ROUND_26_6_TO_INT(pen_x); prev_index = idx; } text_props->len = len; # if !defined(OT_SUPPORT) && defined(BIDI_SUPPORT) if (base_str) free(base_str); # endif } EAPI Eina_Bool evas_common_text_props_content_create(void *_fi, const Eina_Unicode *text, Evas_Text_Props *text_props, const Evas_BiDi_Paragraph_Props *par_props, size_t par_pos, int len, Evas_Text_Props_Mode mode) { RGBA_Font_Int *fi = (RGBA_Font_Int *) _fi; if (text_props->info) { evas_common_text_props_content_unref(text_props); } if (len == 0) { text_props->info = NULL; text_props->start = text_props->len = text_props->text_offset = 0; } text_props->info = calloc(1, sizeof(Evas_Text_Props_Info)); if (text_props->font_instance != fi) { if (text_props->font_instance) evas_common_font_int_unref(text_props->font_instance); text_props->font_instance = fi; fi->references++; } evas_common_font_int_reload(fi); if (fi->src->current_size != fi->size) { evas_common_font_source_reload(fi->src); FTLOCK(); FT_Activate_Size(fi->ft.size); FTUNLOCK(); fi->src->current_size = fi->size; } text_props->changed = EINA_TRUE; #ifdef OT_SUPPORT (void) par_props; (void) par_pos; _content_create_ot(fi, text, text_props, len, mode); #else _content_create_regular(fi, text, text_props, par_props, par_pos, len, mode); #endif text_props->text_len = len; text_props->info->refcount = 1; return EINA_TRUE; } evas-1.7.9/src/lib/engines/common/evas_op_mul/0000775000175000017500000000000012234557316016267 500000000000000evas-1.7.9/src/lib/engines/common/evas_op_mul/op_mul_pixel_i386.c0000664000175000017500000000412712175475547021635 00000000000000/* mul pixel --> dst */ #ifdef BUILD_MMX static void _op_mul_p_dp_mmx(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c __UNUSED__, DATA32 *d, int l) { DATA32 *e = s + l; pxor_r2r(mm0, mm0); MOV_A2R(ALPHA_255, mm5) for (; s < e; s++, d++) { MOV_P2R(*d, mm1, mm0) MOV_P2R(*s, mm2, mm0) MUL4_SYM_R2R(mm2, mm1, mm5) MOV_R2P(mm1, *d, mm0) } } #define _op_mul_pas_dp_mmx _op_mul_p_dp_mmx #define _op_mul_pan_dp_mmx _op_mul_p_dp_mmx #define _op_mul_p_dpan_mmx _op_mul_p_dp_mmx #define _op_mul_pan_dpan_mmx _op_mul_pan_dp_mmx #define _op_mul_pas_dpan_mmx _op_mul_pas_dp_mmx static void init_mul_pixel_span_funcs_mmx(void) { op_mul_span_funcs[SP][SM_N][SC_N][DP][CPU_MMX] = _op_mul_p_dp_mmx; op_mul_span_funcs[SP_AN][SM_N][SC_N][DP][CPU_MMX] = _op_mul_pan_dp_mmx; op_mul_span_funcs[SP_AS][SM_N][SC_N][DP][CPU_MMX] = _op_mul_pas_dp_mmx; op_mul_span_funcs[SP][SM_N][SC_N][DP_AN][CPU_MMX] = _op_mul_p_dpan_mmx; op_mul_span_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_MMX] = _op_mul_pan_dpan_mmx; op_mul_span_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_MMX] = _op_mul_pas_dpan_mmx; } #endif #ifdef BUILD_MMX static void _op_mul_pt_p_dp_mmx(DATA32 s, DATA8 m __UNUSED__, DATA32 c __UNUSED__, DATA32 *d) { pxor_r2r(mm0, mm0); MOV_A2R(ALPHA_255, mm5) MOV_P2R(*d, mm1, mm0) MOV_P2R(s, mm2, mm0) MUL4_SYM_R2R(mm2, mm1, mm5) MOV_R2P(mm1, *d, mm0) } #define _op_mul_pt_pan_dp_mmx _op_mul_pt_p_dp_mmx #define _op_mul_pt_pas_dp_mmx _op_mul_pt_p_dp_mmx #define _op_mul_pt_p_dpan_mmx _op_mul_pt_p_dp_mmx #define _op_mul_pt_pan_dpan_mmx _op_mul_pt_pan_dp_mmx #define _op_mul_pt_pas_dpan_mmx _op_mul_pt_pas_dp_mmx static void init_mul_pixel_pt_funcs_mmx(void) { op_mul_pt_funcs[SP][SM_N][SC_N][DP][CPU_MMX] = _op_mul_pt_p_dp_mmx; op_mul_pt_funcs[SP_AN][SM_N][SC_N][DP][CPU_MMX] = _op_mul_pt_pan_dp_mmx; op_mul_pt_funcs[SP_AS][SM_N][SC_N][DP][CPU_MMX] = _op_mul_pt_pas_dp_mmx; op_mul_pt_funcs[SP][SM_N][SC_N][DP_AN][CPU_MMX] = _op_mul_pt_p_dpan_mmx; op_mul_pt_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_MMX] = _op_mul_pt_pan_dpan_mmx; op_mul_pt_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_MMX] = _op_mul_pt_pas_dpan_mmx; } #endif evas-1.7.9/src/lib/engines/common/evas_op_mul/Makefile.in0000664000175000017500000004645412234557302020264 00000000000000# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/lib/engines/common/evas_op_mul DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/efl_attribute.m4 \ $(top_srcdir)/m4/efl_coverage.m4 \ $(top_srcdir)/m4/efl_doxygen.m4 \ $(top_srcdir)/m4/efl_fnmatch.m4 \ $(top_srcdir)/m4/efl_path_max.m4 \ $(top_srcdir)/m4/efl_shm_open.m4 $(top_srcdir)/m4/efl_tests.m4 \ $(top_srcdir)/m4/evas_check_engine.m4 \ $(top_srcdir)/m4/evas_check_loader.m4 \ $(top_srcdir)/m4/evas_converter.m4 \ $(top_srcdir)/m4/evas_dither.m4 \ $(top_srcdir)/m4/evas_scaler.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHECK_CFLAGS = @CHECK_CFLAGS@ CHECK_LIBS = @CHECK_LIBS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@ DIRECTFB_LIBS = @DIRECTFB_LIBS@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ ECORE_EVAS_CFLAGS = @ECORE_EVAS_CFLAGS@ ECORE_EVAS_LIBS = @ECORE_EVAS_LIBS@ EDB_CFLAGS = @EDB_CFLAGS@ EDB_LIBS = @EDB_LIBS@ EDJE_CFLAGS = @EDJE_CFLAGS@ EDJE_LIBS = @EDJE_LIBS@ EET_CFLAGS = @EET_CFLAGS@ EET_LIBS = @EET_LIBS@ EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@ EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@ EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@ EFL_SHM_OPEN_LIBS = @EFL_SHM_OPEN_LIBS@ EGREP = @EGREP@ EINA_CFLAGS = @EINA_CFLAGS@ EINA_LIBS = @EINA_LIBS@ EVAS_CFLAGS = @EVAS_CFLAGS@ EVAS_GENERAL_CFLAGS = @EVAS_GENERAL_CFLAGS@ EVAS_GENERAL_LIBS = @EVAS_GENERAL_LIBS@ EVAS_LIBS = @EVAS_LIBS@ EVAS_SSE3_CFLAGS = @EVAS_SSE3_CFLAGS@ EVIL_CFLAGS = @EVIL_CFLAGS@ EVIL_LIBS = @EVIL_LIBS@ EXEEXT = @EXEEXT@ EXOTIC_CFLAGS = @EXOTIC_CFLAGS@ EXOTIC_LIBS = @EXOTIC_LIBS@ FGREP = @FGREP@ FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@ FONTCONFIG_LIBS = @FONTCONFIG_LIBS@ FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ FREETYPE_LIBS = @FREETYPE_LIBS@ FRIBIDI_CFLAGS = @FRIBIDI_CFLAGS@ FRIBIDI_LIBS = @FRIBIDI_LIBS@ GL_EET_CFLAGS = @GL_EET_CFLAGS@ GL_EET_LIBS = @GL_EET_LIBS@ GREP = @GREP@ HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@ HARFBUZZ_LIBS = @HARFBUZZ_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LINEBREAK_CFLAGS = @LINEBREAK_CFLAGS@ LINEBREAK_LIBS = @LINEBREAK_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MODULE_ARCH = @MODULE_ARCH@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ SDL_CFLAGS = @SDL_CFLAGS@ SDL_LIBS = @SDL_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ SVG_CFLAGS = @SVG_CFLAGS@ SVG_LIBS = @SVG_LIBS@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ XCB_CFLAGS = @XCB_CFLAGS@ XCB_GL_CFLAGS = @XCB_GL_CFLAGS@ XCB_GL_LIBS = @XCB_GL_LIBS@ XCB_LIBS = @XCB_LIBS@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_ct_OBJC = @ac_ct_OBJC@ altivec_cflags = @altivec_cflags@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ dlopen_libs = @dlopen_libs@ docdir = @docdir@ dvidir = @dvidir@ edje_cc = @edje_cc@ efl_doxygen = @efl_doxygen@ efl_have_doxygen = @efl_have_doxygen@ evas_engine_buffer_cflags = @evas_engine_buffer_cflags@ evas_engine_buffer_libs = @evas_engine_buffer_libs@ evas_engine_direct3d_cflags = @evas_engine_direct3d_cflags@ evas_engine_direct3d_libs = @evas_engine_direct3d_libs@ evas_engine_directfb_cflags = @evas_engine_directfb_cflags@ evas_engine_directfb_libs = @evas_engine_directfb_libs@ evas_engine_fb_cflags = @evas_engine_fb_cflags@ evas_engine_fb_libs = @evas_engine_fb_libs@ evas_engine_gl_cocoa_cflags = @evas_engine_gl_cocoa_cflags@ evas_engine_gl_cocoa_libs = @evas_engine_gl_cocoa_libs@ evas_engine_gl_common_libs = @evas_engine_gl_common_libs@ evas_engine_gl_sdl_cflags = @evas_engine_gl_sdl_cflags@ evas_engine_gl_sdl_libs = @evas_engine_gl_sdl_libs@ evas_engine_gl_xcb_cflags = @evas_engine_gl_xcb_cflags@ evas_engine_gl_xcb_libs = @evas_engine_gl_xcb_libs@ evas_engine_gl_xlib_cflags = @evas_engine_gl_xlib_cflags@ evas_engine_gl_xlib_libs = @evas_engine_gl_xlib_libs@ evas_engine_psl1ght_cflags = @evas_engine_psl1ght_cflags@ evas_engine_psl1ght_libs = @evas_engine_psl1ght_libs@ evas_engine_software_16_sdl_cflags = @evas_engine_software_16_sdl_cflags@ evas_engine_software_16_sdl_libs = @evas_engine_software_16_sdl_libs@ evas_engine_software_16_wince_cflags = @evas_engine_software_16_wince_cflags@ evas_engine_software_16_wince_libs = @evas_engine_software_16_wince_libs@ evas_engine_software_16_x11_cflags = @evas_engine_software_16_x11_cflags@ evas_engine_software_16_x11_libs = @evas_engine_software_16_x11_libs@ evas_engine_software_8_x11_cflags = @evas_engine_software_8_x11_cflags@ evas_engine_software_8_x11_libs = @evas_engine_software_8_x11_libs@ evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@ evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@ evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@ evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ evas_image_loader_edb_libs = @evas_image_loader_edb_libs@ evas_image_loader_eet_cflags = @evas_image_loader_eet_cflags@ evas_image_loader_eet_libs = @evas_image_loader_eet_libs@ evas_image_loader_generic_cflags = @evas_image_loader_generic_cflags@ evas_image_loader_generic_libs = @evas_image_loader_generic_libs@ evas_image_loader_gif_cflags = @evas_image_loader_gif_cflags@ evas_image_loader_gif_libs = @evas_image_loader_gif_libs@ evas_image_loader_ico_cflags = @evas_image_loader_ico_cflags@ evas_image_loader_ico_libs = @evas_image_loader_ico_libs@ evas_image_loader_jpeg_cflags = @evas_image_loader_jpeg_cflags@ evas_image_loader_jpeg_libs = @evas_image_loader_jpeg_libs@ evas_image_loader_pmaps_cflags = @evas_image_loader_pmaps_cflags@ evas_image_loader_pmaps_libs = @evas_image_loader_pmaps_libs@ evas_image_loader_png_cflags = @evas_image_loader_png_cflags@ evas_image_loader_png_libs = @evas_image_loader_png_libs@ evas_image_loader_psd_cflags = @evas_image_loader_psd_cflags@ evas_image_loader_psd_libs = @evas_image_loader_psd_libs@ evas_image_loader_svg_cflags = @evas_image_loader_svg_cflags@ evas_image_loader_svg_libs = @evas_image_loader_svg_libs@ evas_image_loader_tga_cflags = @evas_image_loader_tga_cflags@ evas_image_loader_tga_libs = @evas_image_loader_tga_libs@ evas_image_loader_tiff_cflags = @evas_image_loader_tiff_cflags@ evas_image_loader_tiff_libs = @evas_image_loader_tiff_libs@ evas_image_loader_wbmp_cflags = @evas_image_loader_wbmp_cflags@ evas_image_loader_wbmp_libs = @evas_image_loader_wbmp_libs@ evas_image_loader_xpm_cflags = @evas_image_loader_xpm_cflags@ evas_image_loader_xpm_libs = @evas_image_loader_xpm_libs@ exec_prefix = @exec_prefix@ have_evas_engine_gl_x11 = @have_evas_engine_gl_x11@ have_evas_engine_gl_xcb = @have_evas_engine_gl_xcb@ have_evas_engine_gl_xlib = @have_evas_engine_gl_xlib@ have_evas_engine_software_x11 = @have_evas_engine_software_x11@ have_evas_engine_software_xcb = @have_evas_engine_software_xcb@ have_evas_engine_software_xlib = @have_evas_engine_software_xlib@ have_lcov = @have_lcov@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_enable_auto_import = @lt_enable_auto_import@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgconfig_requires_private = @pkgconfig_requires_private@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pthread_cflags = @pthread_cflags@ pthread_libs = @pthread_libs@ release_info = @release_info@ requirement_evas = @requirement_evas@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ shm_open_libs = @shm_open_libs@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ version_info = @version_info@ MAINTAINERCLEANFILES = Makefile.in EXTRA_DIST = \ op_mul_color_.c \ op_mul_color_i386.c \ op_mul_mask_color_.c \ op_mul_mask_color_i386.c \ op_mul_pixel_.c \ op_mul_pixel_color_.c \ op_mul_pixel_color_i386.c \ op_mul_pixel_i386.c \ op_mul_pixel_mask_.c \ op_mul_pixel_mask_i386.c all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/lib/engines/common/evas_op_mul/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/lib/engines/common/evas_op_mul/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags TAGS: ctags CTAGS: cscope cscopelist: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ cscopelist-am ctags-am distclean distclean-generic \ distclean-libtool distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: evas-1.7.9/src/lib/engines/common/evas_op_mul/op_mul_pixel_color_i386.c0000664000175000017500000001267212175475547023037 00000000000000/* mul pixel x color --> dst */ #ifdef BUILD_MMX static void _op_mul_p_c_dp_mmx(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { DATA32 *e = d + l; MOV_A2R(ALPHA_255, mm5) pxor_r2r(mm0, mm0); MOV_P2R(c, mm2, mm0) while (d < e) { MOV_P2R(*s, mm3, mm0) MUL4_SYM_R2R(mm2, mm3, mm5) MOV_P2R(*d, mm1, mm0) MUL4_SYM_R2R(mm3, mm1, mm5) MOV_R2P(mm1, *d, mm0) s++; d++; } } #define _op_mul_pas_c_dp_mmx _op_mul_p_c_dp_mmx #define _op_mul_pan_c_dp_mmx _op_mul_p_c_dp_mmx #define _op_mul_p_can_dp_mmx _op_mul_p_c_dp_mmx #define _op_mul_pas_can_dp_mmx _op_mul_p_c_dp_mmx #define _op_mul_pan_can_dp_mmx _op_mul_p_c_dp_mmx #define _op_mul_p_caa_dp_mmx _op_mul_p_c_dp_mmx #define _op_mul_pas_caa_dp_mmx _op_mul_p_c_dp_mmx #define _op_mul_pan_caa_dp_mmx _op_mul_p_c_dp_mmx #define _op_mul_p_c_dpan_mmx _op_mul_p_c_dp_mmx #define _op_mul_pan_c_dpan_mmx _op_mul_pan_c_dp_mmx #define _op_mul_pas_c_dpan_mmx _op_mul_pas_c_dp_mmx #define _op_mul_p_can_dpan_mmx _op_mul_p_can_dp_mmx #define _op_mul_pan_can_dpan_mmx _op_mul_pan_can_dp_mmx #define _op_mul_pas_can_dpan_mmx _op_mul_pas_can_dp_mmx #define _op_mul_p_caa_dpan_mmx _op_mul_p_caa_dp_mmx #define _op_mul_pan_caa_dpan_mmx _op_mul_pan_caa_dp_mmx #define _op_mul_pas_caa_dpan_mmx _op_mul_pas_caa_dp_mmx static void init_mul_pixel_color_span_funcs_mmx(void) { op_mul_span_funcs[SP][SM_N][SC][DP][CPU_MMX] = _op_mul_p_c_dp_mmx; op_mul_span_funcs[SP_AS][SM_N][SC][DP][CPU_MMX] = _op_mul_pas_c_dp_mmx; op_mul_span_funcs[SP_AN][SM_N][SC][DP][CPU_MMX] = _op_mul_pan_c_dp_mmx; op_mul_span_funcs[SP][SM_N][SC_AN][DP][CPU_MMX] = _op_mul_p_can_dp_mmx; op_mul_span_funcs[SP_AS][SM_N][SC_AN][DP][CPU_MMX] = _op_mul_pas_can_dp_mmx; op_mul_span_funcs[SP_AN][SM_N][SC_AN][DP][CPU_MMX] = _op_mul_pan_can_dp_mmx; op_mul_span_funcs[SP][SM_N][SC_AA][DP][CPU_MMX] = _op_mul_p_caa_dp_mmx; op_mul_span_funcs[SP_AS][SM_N][SC_AA][DP][CPU_MMX] = _op_mul_pas_caa_dp_mmx; op_mul_span_funcs[SP_AN][SM_N][SC_AA][DP][CPU_MMX] = _op_mul_pan_caa_dp_mmx; op_mul_span_funcs[SP][SM_N][SC][DP_AN][CPU_MMX] = _op_mul_p_c_dpan_mmx; op_mul_span_funcs[SP_AS][SM_N][SC][DP_AN][CPU_MMX] = _op_mul_pas_c_dpan_mmx; op_mul_span_funcs[SP_AN][SM_N][SC][DP_AN][CPU_MMX] = _op_mul_pan_c_dpan_mmx; op_mul_span_funcs[SP][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_mul_p_can_dpan_mmx; op_mul_span_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_mul_pas_can_dpan_mmx; op_mul_span_funcs[SP_AN][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_mul_pan_can_dpan_mmx; op_mul_span_funcs[SP][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_mul_p_caa_dpan_mmx; op_mul_span_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_mul_pas_caa_dpan_mmx; op_mul_span_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_mul_pan_caa_dpan_mmx; } #endif #ifdef BUILD_MMX static void _op_mul_pt_p_c_dp_mmx(DATA32 s, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) { MOV_A2R(ALPHA_255, mm5) pxor_r2r(mm0, mm0); MOV_P2R(c, mm2, mm0) MOV_P2R(s, mm3, mm0) MUL4_SYM_R2R(mm2, mm3, mm5) MOV_P2R(*d, mm1, mm0) MUL4_SYM_R2R(mm3, mm1, mm5) MOV_R2P(mm1, *d, mm0) } #define _op_mul_pt_pas_c_dp_mmx _op_mul_pt_p_c_dp_mmx #define _op_mul_pt_pan_c_dp_mmx _op_mul_pt_p_c_dp_mmx #define _op_mul_pt_p_can_dp_mmx _op_mul_pt_p_c_dp_mmx #define _op_mul_pt_pas_can_dp_mmx _op_mul_pt_p_c_dp_mmx #define _op_mul_pt_pan_can_dp_mmx _op_mul_pt_p_c_dp_mmx #define _op_mul_pt_p_caa_dp_mmx _op_mul_pt_p_c_dp_mmx #define _op_mul_pt_pas_caa_dp_mmx _op_mul_pt_p_c_dp_mmx #define _op_mul_pt_pan_caa_dp_mmx _op_mul_pt_p_c_dp_mmx #define _op_mul_pt_p_c_dpan_mmx _op_mul_pt_p_c_dp_mmx #define _op_mul_pt_pan_c_dpan_mmx _op_mul_pt_pan_c_dp_mmx #define _op_mul_pt_pas_c_dpan_mmx _op_mul_pt_pas_c_dp_mmx #define _op_mul_pt_p_can_dpan_mmx _op_mul_pt_p_can_dp_mmx #define _op_mul_pt_pan_can_dpan_mmx _op_mul_pt_pan_can_dp_mmx #define _op_mul_pt_pas_can_dpan_mmx _op_mul_pt_pas_can_dp_mmx #define _op_mul_pt_p_caa_dpan_mmx _op_mul_pt_p_caa_dp_mmx #define _op_mul_pt_pan_caa_dpan_mmx _op_mul_pt_pan_caa_dp_mmx #define _op_mul_pt_pas_caa_dpan_mmx _op_mul_pt_pas_caa_dp_mmx static void init_mul_pixel_color_pt_funcs_mmx(void) { op_mul_pt_funcs[SP][SM_N][SC][DP][CPU_MMX] = _op_mul_pt_p_c_dp_mmx; op_mul_pt_funcs[SP_AS][SM_N][SC][DP][CPU_MMX] = _op_mul_pt_pas_c_dp_mmx; op_mul_pt_funcs[SP_AN][SM_N][SC][DP][CPU_MMX] = _op_mul_pt_pan_c_dp_mmx; op_mul_pt_funcs[SP][SM_N][SC_AN][DP][CPU_MMX] = _op_mul_pt_p_can_dp_mmx; op_mul_pt_funcs[SP_AS][SM_N][SC_AN][DP][CPU_MMX] = _op_mul_pt_pas_can_dp_mmx; op_mul_pt_funcs[SP_AN][SM_N][SC_AN][DP][CPU_MMX] = _op_mul_pt_pan_can_dp_mmx; op_mul_pt_funcs[SP][SM_N][SC_AA][DP][CPU_MMX] = _op_mul_pt_p_caa_dp_mmx; op_mul_pt_funcs[SP_AS][SM_N][SC_AA][DP][CPU_MMX] = _op_mul_pt_pas_caa_dp_mmx; op_mul_pt_funcs[SP_AN][SM_N][SC_AA][DP][CPU_MMX] = _op_mul_pt_pan_caa_dp_mmx; op_mul_pt_funcs[SP][SM_N][SC][DP_AN][CPU_MMX] = _op_mul_pt_p_c_dpan_mmx; op_mul_pt_funcs[SP_AS][SM_N][SC][DP_AN][CPU_MMX] = _op_mul_pt_pas_c_dpan_mmx; op_mul_pt_funcs[SP_AN][SM_N][SC][DP_AN][CPU_MMX] = _op_mul_pt_pan_c_dpan_mmx; op_mul_pt_funcs[SP][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_mul_pt_p_can_dpan_mmx; op_mul_pt_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_mul_pt_pas_can_dpan_mmx; op_mul_pt_funcs[SP_AN][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_mul_pt_pan_can_dpan_mmx; op_mul_pt_funcs[SP][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_mul_pt_p_caa_dpan_mmx; op_mul_pt_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_mul_pt_pas_caa_dpan_mmx; op_mul_pt_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_mul_pt_pan_caa_dpan_mmx; } #endif evas-1.7.9/src/lib/engines/common/evas_op_mul/op_mul_color_.c0000664000175000017500000000354212175475547021220 00000000000000/* mul color --> dst */ #ifdef BUILD_C static void _op_mul_c_dp(DATA32 *s __UNUSED__, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { DATA32 *e = d + l; for (; d < e; d++) { *d = MUL4_SYM(c, *d); } } static void _op_mul_caa_dp(DATA32 *s __UNUSED__, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { DATA32 *e = d + l; c = 1 + (c >> 24); for (; d < e; d++) { *d = MUL_256(c, *d); } } #define _op_mul_can_dp _op_mul_c_dp #define _op_mul_c_dpan _op_mul_c_dp #define _op_mul_can_dpan _op_mul_can_dp #define _op_mul_caa_dpan _op_mul_caa_dp static void init_mul_color_span_funcs_c(void) { op_mul_span_funcs[SP_N][SM_N][SC][DP][CPU_C] = _op_mul_c_dp; op_mul_span_funcs[SP_N][SM_N][SC_AN][DP][CPU_C] = _op_mul_can_dp; op_mul_span_funcs[SP_N][SM_N][SC_AA][DP][CPU_C] = _op_mul_caa_dp; op_mul_span_funcs[SP_N][SM_N][SC][DP_AN][CPU_C] = _op_mul_c_dpan; op_mul_span_funcs[SP_N][SM_N][SC_AN][DP_AN][CPU_C] = _op_mul_can_dpan; op_mul_span_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_C] = _op_mul_caa_dpan; } #endif #ifdef BUILD_C static void _op_mul_pt_c_dp(DATA32 s __UNUSED__, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) { *d = MUL4_SYM(c, *d); } #define _op_mul_pt_can_dp _op_mul_pt_c_dp #define _op_mul_pt_caa_dp _op_mul_pt_c_dp #define _op_mul_pt_c_dpan _op_mul_pt_c_dp #define _op_mul_pt_can_dpan _op_mul_pt_can_dp #define _op_mul_pt_caa_dpan _op_mul_pt_caa_dp static void init_mul_color_pt_funcs_c(void) { op_mul_pt_funcs[SP_N][SM_N][SC][DP][CPU_C] = _op_mul_pt_c_dp; op_mul_pt_funcs[SP_N][SM_N][SC_AN][DP][CPU_C] = _op_mul_pt_can_dp; op_mul_pt_funcs[SP_N][SM_N][SC_AA][DP][CPU_C] = _op_mul_pt_caa_dp; op_mul_pt_funcs[SP_N][SM_N][SC][DP_AN][CPU_C] = _op_mul_pt_c_dpan; op_mul_pt_funcs[SP_N][SM_N][SC_AN][DP_AN][CPU_C] = _op_mul_pt_can_dpan; op_mul_pt_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_C] = _op_mul_pt_caa_dpan; } #endif evas-1.7.9/src/lib/engines/common/evas_op_mul/op_mul_mask_color_i386.c0000664000175000017500000000516012175475547022643 00000000000000/* mul mask x color -> dst */ #ifdef BUILD_MMX static void _op_mul_mas_c_dp_mmx(DATA32 *s __UNUSED__, DATA8 *m, DATA32 c, DATA32 *d, int l) { DATA32 *e = d + l; MOV_P2R(c, mm2, mm0) c = ~c; MOV_P2R(c, mm3, mm0) MOV_A2R(ALPHA_255, mm5) pxor_r2r(mm0, mm0); while (d < e) { DATA32 a = *m; switch(a) { case 0: break; case 255: MOV_P2R(*d, mm1, mm0) MUL4_SYM_R2R(mm2, mm1, mm5) MOV_R2P(mm1, *d, mm0) break; default: a++; MOV_A2R(a, mm1) MUL4_256_R2R(mm3, mm1) movq_r2r(mm5, mm4); psubw_r2r(mm1, mm4); MOV_P2R(*d, mm1, mm0) MUL4_SYM_R2R(mm4, mm1, mm5) MOV_R2P(mm1, *d, mm0) break; } m++; d++; } } #define _op_mul_mas_can_dp_mmx _op_mul_mas_c_dp_mmx #define _op_mul_mas_caa_dp_mmx _op_mul_mas_c_dp_mmx #define _op_mul_mas_c_dpan_mmx _op_mul_mas_c_dp_mmx #define _op_mul_mas_can_dpan_mmx _op_mul_mas_can_dp_mmx #define _op_mul_mas_caa_dpan_mmx _op_mul_mas_caa_dp_mmx static void init_mul_mask_color_span_funcs_mmx(void) { op_mul_span_funcs[SP_N][SM_AS][SC][DP][CPU_MMX] = _op_mul_mas_c_dp_mmx; op_mul_span_funcs[SP_N][SM_AS][SC_AN][DP][CPU_MMX] = _op_mul_mas_can_dp_mmx; op_mul_span_funcs[SP_N][SM_AS][SC_AA][DP][CPU_MMX] = _op_mul_mas_caa_dp_mmx; op_mul_span_funcs[SP_N][SM_AS][SC][DP_AN][CPU_MMX] = _op_mul_mas_c_dpan_mmx; op_mul_span_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_MMX] = _op_mul_mas_can_dpan_mmx; op_mul_span_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_MMX] = _op_mul_mas_caa_dpan_mmx; } #endif #ifdef BUILD_MMX static void _op_mul_pt_mas_c_dp_mmx(DATA32 s, DATA8 m, DATA32 c, DATA32 *d) { s = m + 1; c = ~c; MOV_P2R(c, mm3, mm0) MOV_A2R(ALPHA_255, mm4) pxor_r2r(mm0, mm0); MOV_A2R(s, mm1) MUL4_256_R2R(mm3, mm1) psubw_r2r(mm1, mm4); MOV_P2R(*d, mm1, mm0) MUL4_SYM_R2R(mm4, mm1, mm5) MOV_R2P(mm1, *d, mm0) } #define _op_mul_pt_mas_can_dp_mmx _op_mul_pt_mas_c_dp_mmx #define _op_mul_pt_mas_caa_dp_mmx _op_mul_pt_mas_c_dp_mmx #define _op_mul_pt_mas_c_dpan_mmx _op_mul_pt_mas_c_dp_mmx #define _op_mul_pt_mas_can_dpan_mmx _op_mul_pt_mas_can_dp_mmx #define _op_mul_pt_mas_caa_dpan_mmx _op_mul_pt_mas_caa_dp_mmx static void init_mul_mask_color_pt_funcs_mmx(void) { op_mul_pt_funcs[SP_N][SM_AS][SC][DP][CPU_MMX] = _op_mul_pt_mas_c_dp_mmx; op_mul_pt_funcs[SP_N][SM_AS][SC_AN][DP][CPU_MMX] = _op_mul_pt_mas_can_dp_mmx; op_mul_pt_funcs[SP_N][SM_AS][SC_AA][DP][CPU_MMX] = _op_mul_pt_mas_caa_dp_mmx; op_mul_pt_funcs[SP_N][SM_AS][SC][DP_AN][CPU_MMX] = _op_mul_pt_mas_c_dpan_mmx; op_mul_pt_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_MMX] = _op_mul_pt_mas_can_dpan_mmx; op_mul_pt_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_MMX] = _op_mul_pt_mas_caa_dpan_mmx; } #endif evas-1.7.9/src/lib/engines/common/evas_op_mul/op_mul_pixel_.c0000664000175000017500000000330512175475547021220 00000000000000/* mul pixel --> dst */ #ifdef BUILD_C static void _op_mul_p_dp(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c __UNUSED__, DATA32 *d, int l) { DATA32 *e = d + l; for (; d < e; d++, s++) { *d = MUL4_SYM(*s, *d); } } #define _op_mul_pas_dp _op_mul_p_dp #define _op_mul_pan_dp _op_mul_p_dp #define _op_mul_p_dpan _op_mul_p_dp #define _op_mul_pas_dpan _op_mul_pas_dp #define _op_mul_pan_dpan _op_mul_pan_dp static void init_mul_pixel_span_funcs_c(void) { op_mul_span_funcs[SP][SM_N][SC_N][DP][CPU_C] = _op_mul_p_dp; op_mul_span_funcs[SP_AS][SM_N][SC_N][DP][CPU_C] = _op_mul_pas_dp; op_mul_span_funcs[SP_AN][SM_N][SC_N][DP][CPU_C] = _op_mul_pan_dp; op_mul_span_funcs[SP][SM_N][SC_N][DP_AN][CPU_C] = _op_mul_p_dpan; op_mul_span_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_C] = _op_mul_pas_dpan; op_mul_span_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_C] = _op_mul_pan_dpan; } #endif #ifdef BUILD_C static void _op_mul_pt_p_dp(DATA32 s, DATA8 m __UNUSED__, DATA32 c __UNUSED__, DATA32 *d) { *d = MUL4_SYM(s, *d); } #define _op_mul_pt_pas_dp _op_mul_pt_p_dp #define _op_mul_pt_pan_dp _op_mul_pt_p_dp #define _op_mul_pt_p_dpan _op_mul_pt_p_dp #define _op_mul_pt_pan_dpan _op_mul_pt_pan_dp #define _op_mul_pt_pas_dpan _op_mul_pt_pas_dp static void init_mul_pixel_pt_funcs_c(void) { op_mul_pt_funcs[SP][SM_N][SC_N][DP][CPU_C] = _op_mul_pt_p_dp; op_mul_pt_funcs[SP_AS][SM_N][SC_N][DP][CPU_C] = _op_mul_pt_pas_dp; op_mul_pt_funcs[SP_AN][SM_N][SC_N][DP][CPU_C] = _op_mul_pt_pan_dp; op_mul_pt_funcs[SP][SM_N][SC_N][DP_AN][CPU_C] = _op_mul_pt_p_dpan; op_mul_pt_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_C] = _op_mul_pt_pas_dpan; op_mul_pt_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_C] = _op_mul_pt_pan_dpan; } #endif evas-1.7.9/src/lib/engines/common/evas_op_mul/op_mul_mask_color_.c0000664000175000017500000000402212175475547022225 00000000000000/* mul mask x color -> dst */ #ifdef BUILD_C static void _op_mul_mas_c_dp(DATA32 *s __UNUSED__, DATA8 *m, DATA32 c, DATA32 *d, int l) { DATA32 *e = d + l, nc = ~c; while (d < e) { DATA32 a = *m; switch(a) { case 0: break; case 255: *d = MUL4_SYM(c, *d); break; default: a = ~MUL_SYM(a, nc); *d = MUL4_SYM(a, *d); break; } m++; d++; } } #define _op_mul_mas_can_dp _op_mul_mas_c_dp #define _op_mul_mas_caa_dp _op_mul_mas_c_dp #define _op_mul_mas_c_dpan _op_mul_mas_c_dp #define _op_mul_mas_can_dpan _op_mul_mas_can_dp #define _op_mul_mas_caa_dpan _op_mul_mas_caa_dp static void init_mul_mask_color_span_funcs_c(void) { op_mul_span_funcs[SP_N][SM_AS][SC][DP][CPU_C] = _op_mul_mas_c_dp; op_mul_span_funcs[SP_N][SM_AS][SC_AN][DP][CPU_C] = _op_mul_mas_can_dp; op_mul_span_funcs[SP_N][SM_AS][SC_AA][DP][CPU_C] = _op_mul_mas_caa_dp; op_mul_span_funcs[SP_N][SM_AS][SC][DP_AN][CPU_C] = _op_mul_mas_c_dpan; op_mul_span_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_C] = _op_mul_mas_can_dpan; op_mul_span_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_C] = _op_mul_mas_caa_dpan; } #endif #ifdef BUILD_C static void _op_mul_pt_mas_c_dp(DATA32 s __UNUSED__, DATA8 m, DATA32 c, DATA32 *d) { c = ~c; c = ~MUL_SYM(m, c); *d = MUL4_SYM(c, *d); } #define _op_mul_pt_mas_can_dp _op_mul_pt_mas_c_dp #define _op_mul_pt_mas_caa_dp _op_mul_pt_mas_c_dp #define _op_mul_pt_mas_c_dpan _op_mul_pt_mas_c_dp #define _op_mul_pt_mas_can_dpan _op_mul_pt_mas_can_dp #define _op_mul_pt_mas_caa_dpan _op_mul_pt_mas_caa_dp static void init_mul_mask_color_pt_funcs_c(void) { op_mul_pt_funcs[SP_N][SM_AS][SC][DP][CPU_C] = _op_mul_pt_mas_c_dp; op_mul_pt_funcs[SP_N][SM_AS][SC_AN][DP][CPU_C] = _op_mul_pt_mas_can_dp; op_mul_pt_funcs[SP_N][SM_AS][SC_AA][DP][CPU_C] = _op_mul_pt_mas_caa_dp; op_mul_pt_funcs[SP_N][SM_AS][SC][DP_AN][CPU_C] = _op_mul_pt_mas_c_dpan; op_mul_pt_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_C] = _op_mul_pt_mas_can_dpan; op_mul_pt_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_C] = _op_mul_pt_mas_caa_dpan; } #endif evas-1.7.9/src/lib/engines/common/evas_op_mul/op_mul_color_i386.c0000664000175000017500000000412312175475547021626 00000000000000/* mul color --> dst */ #ifdef BUILD_MMX static void _op_mul_c_dp_mmx(DATA32 *s __UNUSED__, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { DATA32 *e = d + l; pxor_r2r(mm0, mm0); MOV_A2R(ALPHA_255, mm5) MOV_P2R(c, mm2, mm0) for (; d < e; d++) { MOV_P2R(*d, mm1, mm0) MUL4_SYM_R2R(mm2, mm1, mm5) MOV_R2P(mm1, *d, mm0) } } #define _op_mul_can_dp_mmx _op_mul_c_dp_mmx #define _op_mul_caa_dp_mmx _op_mul_c_dp_mmx #define _op_mul_c_dpan_mmx _op_mul_c_dp_mmx #define _op_mul_can_dpan_mmx _op_mul_can_dp_mmx #define _op_mul_caa_dpan_mmx _op_mul_caa_dp_mmx static void init_mul_color_span_funcs_mmx(void) { op_mul_span_funcs[SP_N][SM_N][SC][DP][CPU_MMX] = _op_mul_c_dp_mmx; op_mul_span_funcs[SP_N][SM_N][SC_AN][DP][CPU_MMX] = _op_mul_can_dp_mmx; op_mul_span_funcs[SP_N][SM_N][SC_AA][DP][CPU_MMX] = _op_mul_caa_dp_mmx; op_mul_span_funcs[SP_N][SM_N][SC][DP_AN][CPU_MMX] = _op_mul_c_dpan_mmx; op_mul_span_funcs[SP_N][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_mul_can_dpan_mmx; op_mul_span_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_mul_caa_dpan_mmx; } #endif #ifdef BUILD_MMX static void _op_mul_pt_c_dp_mmx(DATA32 s __UNUSED__, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) { pxor_r2r(mm0, mm0); MOV_A2R(ALPHA_255, mm5) MOV_P2R(c, mm2, mm0) MOV_P2R(*d, mm1, mm0) MUL4_SYM_R2R(mm2, mm1, mm5) MOV_R2P(mm1, *d, mm0) } #define _op_mul_pt_caa_dp_mmx _op_mul_pt_c_dp_mmx #define _op_mul_pt_can_dp_mmx _op_mul_pt_c_dp_mmx #define _op_mul_pt_c_dpan_mmx _op_mul_pt_c_dp_mmx #define _op_mul_pt_can_dpan_mmx _op_mul_pt_can_dp_mmx #define _op_mul_pt_caa_dpan_mmx _op_mul_pt_caa_dp_mmx static void init_mul_color_pt_funcs_mmx(void) { op_mul_pt_funcs[SP_N][SM_N][SC][DP][CPU_MMX] = _op_mul_pt_c_dp_mmx; op_mul_pt_funcs[SP_N][SM_N][SC_AN][DP][CPU_MMX] = _op_mul_pt_can_dp_mmx; op_mul_pt_funcs[SP_N][SM_N][SC_AA][DP][CPU_MMX] = _op_mul_pt_caa_dp_mmx; op_mul_pt_funcs[SP_N][SM_N][SC][DP_AN][CPU_MMX] = _op_mul_pt_c_dpan_mmx; op_mul_pt_funcs[SP_N][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_mul_pt_can_dpan_mmx; op_mul_pt_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_mul_pt_caa_dpan_mmx; } #endif evas-1.7.9/src/lib/engines/common/evas_op_mul/op_mul_pixel_mask_i386.c0000664000175000017500000000303212175475547022642 00000000000000/* mul pixel x mask --> dst */ #ifdef BUILD_MMX static void _op_mul_p_mas_dp_mmx(DATA32 *s, DATA8 *m, DATA32 c, DATA32 *d, int l) { DATA32 *e = d + l; MOV_A2R(ALPHA_255, mm5) pxor_r2r(mm0, mm0); while (d < e) { c = *m; switch(c) { case 0: break; case 255: MOV_P2R(*d, mm1, mm0) MOV_P2R(*s, mm2, mm0) MUL4_SYM_R2R(mm2, mm1, mm5) MOV_R2P(mm1, *d, mm0) break; default: c++; MOV_A2R(c, mm1) c = ~(*s); MOV_P2R(c, mm3, mm0) MUL4_256_R2R(mm3, mm1) movq_r2r(mm5, mm4); psubw_r2r(mm1, mm4); MOV_P2R(*d, mm1, mm0) MUL4_SYM_R2R(mm4, mm1, mm5) MOV_R2P(mm1, *d, mm0) break; } s++; m++; d++; } } #define _op_mul_pas_mas_dp_mmx _op_mul_p_mas_dp_mmx #define _op_mul_pan_mas_dp_mmx _op_mul_p_mas_dp_mmx #define _op_mul_p_mas_dpan_mmx _op_mul_p_mas_dp_mmx #define _op_mul_pas_mas_dpan_mmx _op_mul_pas_mas_dp_mmx #define _op_mul_pan_mas_dpan_mmx _op_mul_pan_mas_dp_mmx static void init_mul_pixel_mask_span_funcs_mmx(void) { op_mul_span_funcs[SP][SM_AS][SC_N][DP][CPU_MMX] = _op_mul_p_mas_dp_mmx; op_mul_span_funcs[SP_AS][SM_AS][SC_N][DP][CPU_MMX] = _op_mul_pas_mas_dp_mmx; op_mul_span_funcs[SP_AN][SM_AS][SC_N][DP][CPU_MMX] = _op_mul_pan_mas_dp_mmx; op_mul_span_funcs[SP][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_mul_p_mas_dpan_mmx; op_mul_span_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_mul_pas_mas_dpan_mmx; op_mul_span_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_mul_pan_mas_dpan_mmx; } #endif #ifdef BUILD_MMX static void init_mul_pixel_mask_pt_funcs_mmx(void) { } #endif evas-1.7.9/src/lib/engines/common/evas_op_mul/op_mul_pixel_color_.c0000664000175000017500000001167012175475547022422 00000000000000/* mul pixel x color --> dst */ #ifdef BUILD_C static void _op_mul_p_c_dp(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { DATA32 *e = d + l; while (d < e) { DATA32 cs = MUL4_SYM(c, *s); *d = MUL4_SYM(cs, *d); s++; d++; } } static void _op_mul_p_caa_dp(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { DATA32 *e = d + l; c = 1 + (c >> 24); while (d < e) { DATA32 cs = MUL_256(c, *s); *d = MUL4_SYM(cs, *d); s++; d++; } } #define _op_mul_pas_c_dp _op_mul_p_c_dp #define _op_mul_pan_c_dp _op_mul_p_c_dp #define _op_mul_p_can_dp _op_mul_p_c_dp #define _op_mul_pas_can_dp _op_mul_p_c_dp #define _op_mul_pan_can_dp _op_mul_p_c_dp #define _op_mul_pas_caa_dp _op_mul_p_caa_dp #define _op_mul_pan_caa_dp _op_mul_p_caa_dp #define _op_mul_p_c_dpan _op_mul_p_c_dp #define _op_mul_pas_c_dpan _op_mul_pas_c_dp #define _op_mul_pan_c_dpan _op_mul_pan_c_dp #define _op_mul_p_can_dpan _op_mul_p_can_dp #define _op_mul_pas_can_dpan _op_mul_pas_can_dp #define _op_mul_pan_can_dpan _op_mul_pan_can_dp #define _op_mul_p_caa_dpan _op_mul_p_caa_dp #define _op_mul_pas_caa_dpan _op_mul_pas_caa_dp #define _op_mul_pan_caa_dpan _op_mul_pan_caa_dp static void init_mul_pixel_color_span_funcs_c(void) { op_mul_span_funcs[SP][SM_N][SC][DP][CPU_C] = _op_mul_p_c_dp; op_mul_span_funcs[SP_AS][SM_N][SC][DP][CPU_C] = _op_mul_pas_c_dp; op_mul_span_funcs[SP_AN][SM_N][SC][DP][CPU_C] = _op_mul_pan_c_dp; op_mul_span_funcs[SP][SM_N][SC_AN][DP][CPU_C] = _op_mul_p_can_dp; op_mul_span_funcs[SP_AS][SM_N][SC_AN][DP][CPU_C] = _op_mul_pas_can_dp; op_mul_span_funcs[SP_AN][SM_N][SC_AN][DP][CPU_C] = _op_mul_pan_can_dp; op_mul_span_funcs[SP][SM_N][SC_AA][DP][CPU_C] = _op_mul_p_caa_dp; op_mul_span_funcs[SP_AS][SM_N][SC_AA][DP][CPU_C] = _op_mul_pas_caa_dp; op_mul_span_funcs[SP_AN][SM_N][SC_AA][DP][CPU_C] = _op_mul_pan_caa_dp; op_mul_span_funcs[SP][SM_N][SC][DP_AN][CPU_C] = _op_mul_p_c_dpan; op_mul_span_funcs[SP_AS][SM_N][SC][DP_AN][CPU_C] = _op_mul_pas_c_dpan; op_mul_span_funcs[SP_AN][SM_N][SC][DP_AN][CPU_C] = _op_mul_pan_c_dpan; op_mul_span_funcs[SP][SM_N][SC_AN][DP_AN][CPU_C] = _op_mul_p_can_dpan; op_mul_span_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_C] = _op_mul_pas_can_dpan; op_mul_span_funcs[SP_AN][SM_N][SC_AN][DP_AN][CPU_C] = _op_mul_pan_can_dpan; op_mul_span_funcs[SP][SM_N][SC_AA][DP_AN][CPU_C] = _op_mul_p_caa_dpan; op_mul_span_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_C] = _op_mul_pas_caa_dpan; op_mul_span_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_C] = _op_mul_pan_caa_dpan; } #endif #ifdef BUILD_C static void _op_mul_pt_p_c_dp(DATA32 s, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) { s = MUL4_SYM(c, s); *d = MUL4_SYM(s, *d); } static void _op_mul_pt_p_caa_dp(DATA32 s, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) { s = MUL_SYM(c >> 24, s); *d = MUL4_SYM(s, *d); } #define _op_mul_pt_pas_c_dp _op_mul_pt_p_c_dp #define _op_mul_pt_pan_c_dp _op_mul_pt_p_c_dp #define _op_mul_pt_p_can_dp _op_mul_pt_p_c_dp #define _op_mul_pt_pas_can_dp _op_mul_pt_p_c_dp #define _op_mul_pt_pan_can_dp _op_mul_pt_p_c_dp #define _op_mul_pt_pas_caa_dp _op_mul_pt_p_caa_dp #define _op_mul_pt_pan_caa_dp _op_mul_pt_p_caa_dp #define _op_mul_pt_p_c_dpan _op_mul_pt_p_c_dp #define _op_mul_pt_pan_c_dpan _op_mul_pt_pan_c_dp #define _op_mul_pt_pas_c_dpan _op_mul_pt_pas_c_dp #define _op_mul_pt_p_can_dpan _op_mul_pt_p_can_dp #define _op_mul_pt_pan_can_dpan _op_mul_pt_pan_can_dp #define _op_mul_pt_pas_can_dpan _op_mul_pt_pas_can_dp #define _op_mul_pt_p_caa_dpan _op_mul_pt_p_caa_dp #define _op_mul_pt_pan_caa_dpan _op_mul_pt_pan_caa_dp #define _op_mul_pt_pas_caa_dpan _op_mul_pt_pas_caa_dp static void init_mul_pixel_color_pt_funcs_c(void) { op_mul_pt_funcs[SP][SM_N][SC][DP][CPU_C] = _op_mul_pt_p_c_dp; op_mul_pt_funcs[SP_AS][SM_N][SC][DP][CPU_C] = _op_mul_pt_pas_c_dp; op_mul_pt_funcs[SP_AN][SM_N][SC][DP][CPU_C] = _op_mul_pt_pan_c_dp; op_mul_pt_funcs[SP][SM_N][SC_AN][DP][CPU_C] = _op_mul_pt_p_can_dp; op_mul_pt_funcs[SP_AS][SM_N][SC_AN][DP][CPU_C] = _op_mul_pt_pas_can_dp; op_mul_pt_funcs[SP_AN][SM_N][SC_AN][DP][CPU_C] = _op_mul_pt_pan_can_dp; op_mul_pt_funcs[SP][SM_N][SC_AA][DP][CPU_C] = _op_mul_pt_p_caa_dp; op_mul_pt_funcs[SP_AS][SM_N][SC_AA][DP][CPU_C] = _op_mul_pt_pas_caa_dp; op_mul_pt_funcs[SP_AN][SM_N][SC_AA][DP][CPU_C] = _op_mul_pt_pan_caa_dp; op_mul_pt_funcs[SP][SM_N][SC][DP_AN][CPU_C] = _op_mul_pt_p_c_dpan; op_mul_pt_funcs[SP_AS][SM_N][SC][DP_AN][CPU_C] = _op_mul_pt_pas_c_dpan; op_mul_pt_funcs[SP_AN][SM_N][SC][DP_AN][CPU_C] = _op_mul_pt_pan_c_dpan; op_mul_pt_funcs[SP][SM_N][SC_AN][DP_AN][CPU_C] = _op_mul_pt_p_can_dpan; op_mul_pt_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_C] = _op_mul_pt_pas_can_dpan; op_mul_pt_funcs[SP_AN][SM_N][SC_AN][DP_AN][CPU_C] = _op_mul_pt_pan_can_dpan; op_mul_pt_funcs[SP][SM_N][SC_AA][DP_AN][CPU_C] = _op_mul_pt_p_caa_dpan; op_mul_pt_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_C] = _op_mul_pt_pas_caa_dpan; op_mul_pt_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_C] = _op_mul_pt_pan_caa_dpan; } #endif evas-1.7.9/src/lib/engines/common/evas_op_mul/op_mul_pixel_mask_.c0000664000175000017500000000524112175475547022234 00000000000000/* mul pixel x mask --> dst */ #ifdef BUILD_C static void _op_mul_p_mas_dp(DATA32 *s, DATA8 *m, DATA32 c, DATA32 *d, int l) { DATA32 *e = d + l; while (d < e) { c = *m; switch(c) { case 0: break; case 255: *d = MUL4_SYM(*s, *d); break; default: c = ~(*s); c = ~MUL_SYM(*m, c); *d = MUL4_SYM(c, *d); break; } m++; s++; d++; } } static void _op_mul_pan_mas_dp(DATA32 *s, DATA8 *m, DATA32 c, DATA32 *d, int l) { DATA32 *e = d + l; while (d < e) { c = *m; switch(c) { case 0: break; case 255: *d = (*d & 0xff000000) + MUL3_SYM(*s, *d); break; default: c = ~(*s); c = ~MUL_SYM(*m, c); *d = (*d & 0xff000000) + MUL3_SYM(c, *d); break; } m++; s++; d++; } } static void _op_mul_p_mas_dpan(DATA32 *s, DATA8 *m, DATA32 c, DATA32 *d, int l) { DATA32 *e = d + l; while (d < e) { c = *m; switch(c) { case 0: break; case 255: *d = (*s & 0xff000000) + MUL3_SYM(*s, *d); break; default: c = ~(*s); c = ~MUL_SYM(*m, c); *d = (c & 0xff000000) + MUL3_SYM(c, *d); break; } m++; d++; } } #define _op_mul_pas_mas_dp _op_mul_p_mas_dp #define _op_mul_pan_mas_dpan _op_mul_p_mas_dpan #define _op_mul_pas_mas_dpan _op_mul_p_mas_dpan static void init_mul_pixel_mask_span_funcs_c(void) { op_mul_span_funcs[SP][SM_AS][SC_N][DP][CPU_C] = _op_mul_p_mas_dp; op_mul_span_funcs[SP_AS][SM_AS][SC_N][DP][CPU_C] = _op_mul_pas_mas_dp; op_mul_span_funcs[SP_AN][SM_AS][SC_N][DP][CPU_C] = _op_mul_pan_mas_dp; op_mul_span_funcs[SP][SM_AS][SC_N][DP_AN][CPU_C] = _op_mul_p_mas_dpan; op_mul_span_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_C] = _op_mul_pas_mas_dpan; op_mul_span_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_C] = _op_mul_pan_mas_dpan; } #endif #ifdef BUILD_C static void _op_mul_pt_p_mas_dp(DATA32 s, DATA8 m, DATA32 c __UNUSED__, DATA32 *d) { s = ~s; s = ~MUL_SYM(m, s); *d = MUL4_SYM(s, *d); } #define _op_mul_pt_pas_mas_dp _op_mul_pt_p_mas_dp #define _op_mul_pt_pan_mas_dp _op_mul_pt_p_mas_dp #define _op_mul_pt_p_mas_dpan _op_mul_pt_p_mas_dp #define _op_mul_pt_pas_mas_dpan _op_mul_pt_p_mas_dp #define _op_mul_pt_pan_mas_dpan _op_mul_pt_p_mas_dp static void init_mul_pixel_mask_pt_funcs_c(void) { op_mul_pt_funcs[SP][SM_AS][SC_N][DP][CPU_C] = _op_mul_pt_p_mas_dp; op_mul_pt_funcs[SP_AS][SM_AS][SC_N][DP][CPU_C] = _op_mul_pt_pas_mas_dp; op_mul_pt_funcs[SP_AN][SM_AS][SC_N][DP][CPU_C] = _op_mul_pt_pan_mas_dp; op_mul_pt_funcs[SP][SM_AS][SC_N][DP_AN][CPU_C] = _op_mul_pt_p_mas_dpan; op_mul_pt_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_C] = _op_mul_pt_pas_mas_dpan; op_mul_pt_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_C] = _op_mul_pt_pan_mas_dpan; } #endif evas-1.7.9/src/lib/engines/common/evas_op_mul/Makefile.am0000664000175000017500000000043112175475547020252 00000000000000MAINTAINERCLEANFILES = Makefile.in EXTRA_DIST = \ op_mul_color_.c \ op_mul_color_i386.c \ op_mul_mask_color_.c \ op_mul_mask_color_i386.c \ op_mul_pixel_.c \ op_mul_pixel_color_.c \ op_mul_pixel_color_i386.c \ op_mul_pixel_i386.c \ op_mul_pixel_mask_.c \ op_mul_pixel_mask_i386.c evas-1.7.9/src/lib/engines/common/evas_blit_main.c0000664000175000017500000003521312175475547017033 00000000000000#include "evas_common.h" #if defined BUILD_MMX || defined BUILD_SSE #include "evas_mmx.h" #endif #define ALIGN_FIX static void evas_common_copy_pixels_c (DATA32 *src, DATA32 *dst, int len); static void evas_common_copy_pixels_mmx (DATA32 *src, DATA32 *dst, int len); static void evas_common_copy_pixels_mmx2 (DATA32 *src, DATA32 *dst, int len); static void evas_common_copy_pixels_sse/*NB*/ (DATA32 *src, DATA32 *dst, int len); #ifdef BUILD_NEON static void evas_common_copy_pixels_neon (DATA32 *src, DATA32 *dst, int len); static void evas_common_copy_pixels_rev_neon (DATA32 *src, DATA32 *dst, int len); #endif static void evas_common_copy_pixels_rev_c (DATA32 *src, DATA32 *dst, int len); static void evas_common_copy_pixels_rev_mmx (DATA32 *src, DATA32 *dst, int len); static void evas_common_copy_pixels_rev_sse/*NB*/ (DATA32 *src, DATA32 *dst, int len); static void evas_common_copy_rev_pixels_c (DATA32 *src, DATA32 *dst, int len); EAPI void evas_common_blit_init(void) { } EAPI 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) { int y; Gfx_Func_Copy func; DATA32 *src_ptr, *dst_ptr; /* clip clip clip */ if (w <= 0) return; if (src_x + w > (int)src->cache_entry.w) w = src->cache_entry.w - src_x; if (w <= 0) return; if (src_x < 0) { dst_x -= src_x; w += src_x; src_x = 0; } if (w <= 0) return; if (h <= 0) return; if (src_y + h > (int)src->cache_entry.h) h = src->cache_entry.h - src_y; if (h <= 0) return; if (src_y < 0) { dst_y -= src_y; h += src_y; src_y = 0; } if (h <= 0) return; if (w <= 0) return; if (dst_x + w > (int)dst->cache_entry.w) w = dst->cache_entry.w - dst_x; if (w <= 0) return; if (dst_x < 0) { src_x -= dst_x; w += dst_x; dst_x = 0; } if (w <= 0) return; if (h <= 0) return; if (dst_y + h > (int)dst->cache_entry.h) h = dst->cache_entry.h - dst_y; if (h <= 0) return; if (dst_y < 0) { src_y -= dst_y; h += dst_y; dst_y = 0; } if (h <= 0) return; if (dst == src) { /* src after dst - go forward */ if (((src_y * src->cache_entry.w) + src_x) > ((dst_y * dst->cache_entry.w) + dst_x)) { func = evas_common_draw_func_copy_get(w, 0); for (y = 0; y < h; y++) { src_ptr = src->image.data + ((y + src_y) * src->cache_entry.w) + src_x; dst_ptr = dst->image.data + ((y + dst_y) * dst->cache_entry.w) + dst_x; func(src_ptr, dst_ptr, w); } } /* reverse */ else { func = evas_common_draw_func_copy_get(w, 1); for (y = h - 1; y >= 0; y--) { src_ptr = src->image.data + ((y + src_y) * src->cache_entry.w) + src_x; dst_ptr = dst->image.data + ((y + dst_y) * dst->cache_entry.w) + dst_x; func(src_ptr, dst_ptr, w); } } } else { func = evas_common_draw_func_copy_get(w, 0); for (y = 0; y < h; y++) { src_ptr = src->image.data + ((y + src_y) * src->cache_entry.w) + src_x; dst_ptr = dst->image.data + ((y + dst_y) * dst->cache_entry.w) + dst_x; func(src_ptr, dst_ptr, w); } } } /****************************************************************************/ static void evas_common_copy_rev_pixels_c(DATA32 *src, DATA32 *dst, int len) { DATA32 *dst_end = dst + len; src += len - 1; while (dst < dst_end) *dst++ = *src--; } #ifdef BUILD_NEON static void evas_common_copy_pixels_rev_neon(DATA32 *src, DATA32 *dst, int len) { uint32_t *tmp = (void *)37; #define AP "evas_common_copy_rev_pixels_neon_" asm volatile ( ".fpu neon \n\t" // Can we do 32 byte? "andS %[tmp], %[d], $0x1f \n\t" "beq "AP"quadstart \n\t" // Can we do at least 16 byte? "andS %[tmp], %[d], $0x4 \n\t" "beq "AP"dualstart \n\t" // Only once AP"singleloop: \n\t" "sub %[s], #4 \n\t" "vld1.32 d0[0], [%[s]] \n\t" "vst1.32 d0[0], [%[d]]! \n\t" // Up to 3 times AP"dualstart: \n\t" "sub %[tmp], %[e], %[d] \n\t" "cmp %[tmp], #31 \n\t" "blt "AP"loopout \n\t" "andS %[tmp], %[d], $0x1f \n\t" "beq "AP"quadstart \n\t" AP"dualloop: \n\t" "sub %[s], #8 \n\t" "vldm %[s], {d0} \n\t" "vrev64.32 d1, d0 \n\t" "vstm %[d]!, {d1} \n\t" "andS %[tmp], %[d], $0x1f \n\t" "bne "AP"dualloop \n\t" AP"quadstart: \n\t" "sub %[tmp], %[e], %[d] \n\t" "cmp %[tmp], #32 \n\t" "blt "AP"loopout \n\t" "sub %[tmp],%[e],#32 \n\t" AP "quadloop: \n\t" "sub %[s], #32 \n\t" "vldm %[s], {d0,d1,d2,d3} \n\t" "vrev64.32 d7,d0 \n\t" "vrev64.32 d6,d1 \n\t" "vrev64.32 d5,d2 \n\t" "vrev64.32 d4,d3 \n\t" "vstm %[d]!, {d4,d5,d6,d7} \n\t" "cmp %[tmp], %[d] \n\t" "bhi "AP"quadloop \n\t" AP "loopout: \n\t" "cmp %[d], %[e] \n\t" "beq "AP"done \n\t" "sub %[tmp],%[e], %[d] \n\t" "cmp %[tmp],$0x04 \n\t" "beq "AP"singleloop2 \n\t" AP "dualloop2: \n\t" "sub %[tmp],%[e],$0x7 \n\t" AP "dualloop2int: \n\t" "sub %[s], #8 \n\t" "vldm %[s], {d0} \n\t" "vrev64.32 d1,d0 \n\t" "vstm %[d]!, {d1} \n\t" "cmp %[tmp], %[d] \n\t" "bhi "AP"dualloop2int \n\t" // Single ?? "cmp %[e], %[d] \n\t" "beq "AP"done \n\t" AP "singleloop2: \n\t" "sub %[s], #4 \n\t" "vld1.32 d0[0], [%[s]] \n\t" "vst1.32 d0[0], [%[d]] \n\t" AP "done:\n\t" : // No output regs // Input : [s] "r" (src + len), [e] "r" (dst + len), [d] "r" (dst),[tmp] "r" (tmp) // Clobbered : "q0","q1","q2","q3","0","1","memory" ); #undef AP } #endif #ifdef BUILD_C static void evas_common_copy_pixels_c(DATA32 *src, DATA32 *dst, int len) { DATA32 *dst_end = dst + len; while (dst < dst_end) *dst++ = *src++; } #endif #ifdef BUILD_MMX static void evas_common_copy_pixels_mmx(DATA32 *src, DATA32 *dst, int len) { // XXX cppcheck: [./src/lib/engines/common/evas_blit_main.c:248]: (error) Invalid number of character ({). Can't process file. // so... wtf? what's wrong with this { ? or anytrhing surrounding it? DATA32 *dst_end, *dst_end_pre; #ifdef ALIGN_FIX intptr_t src_align; intptr_t dst_align; src_align = (intptr_t)src & 0x3f; /* 64 byte alignment */ dst_align = (intptr_t)dst & 0x3f; /* 64 byte alignment */ if ((src_align != dst_align) || ((src_align & 0x3) != 0)) { #ifdef BUILD_C evas_common_copy_pixels_c(src, dst, len); return; } #endif while ((src_align > 0) && (len > 0)) { *dst++ = *src++; len--; src_align -= sizeof(DATA32); } #endif /* ALIGN_FIX */ dst_end = dst + len; dst_end_pre = dst + ((len / 16) * 16); while (dst < dst_end_pre) { MOVE_16DWORDS_MMX(src, dst); src += 16; dst += 16; } while (dst < dst_end) *dst++ = *src++; } #endif #ifdef BUILD_MMX static void evas_common_copy_pixels_mmx2(DATA32 *src, DATA32 *dst, int len) { DATA32 *dst_end, *dst_end_pre; #ifdef ALIGN_FIX intptr_t src_align; intptr_t dst_align; src_align = (intptr_t)src & 0x3f; /* 64 byte alignment */ dst_align = (intptr_t)dst & 0x3f; /* 64 byte alignment */ if ((src_align != dst_align) || ((src_align & 0x3) != 0)) { #ifdef BUILD_C evas_common_copy_pixels_c(src, dst, len); #endif return; } while ((src_align > 0) && (len > 0)) { *dst++ = *src++; len--; src_align -= sizeof(DATA32); } #endif dst_end = dst + len; dst_end_pre = dst + ((len / 16) * 16); while (dst < dst_end_pre) { MOVE_16DWORDS_MMX(src, dst); src += 16; dst += 16; } while (dst < dst_end) *dst++ = *src++; } #endif #ifdef BUILD_NEON static void evas_common_copy_pixels_neon(DATA32 *src, DATA32 *dst, int len){ uint32_t *e,*tmp = (void *)37; e = dst + len; #define AP "evas_common_copy_pixels_neon_" asm volatile ( ".fpu neon \n\t" // Can we do 32 byte? "andS %[tmp], %[d], $0x1f \n\t" "beq "AP"quadstart \n\t" // Can we do at least 16 byte? "andS %[tmp], %[d], $0x4 \n\t" "beq "AP"dualstart \n\t" // Only once AP"singleloop: \n\t" "vld1.32 d0[0], [%[s]]! \n\t" "vst1.32 d0[0], [%[d]]! \n\t" // Up to 3 times AP"dualstart: \n\t" "sub %[tmp], %[e], %[d] \n\t" "cmp %[tmp], #31 \n\t" "blt "AP"loopout \n\t" "andS %[tmp], %[d], $0x1f \n\t" "beq "AP"quadstart \n\t" AP"dualloop: \n\t" "vldm %[s]!, {d0} \n\t" "vstm %[d]!, {d0} \n\t" "andS %[tmp], %[d], $0x1f \n\t" "bne "AP"dualloop \n\t" AP"quadstart: \n\t" "sub %[tmp], %[e], %[d] \n\t" "cmp %[tmp], #64 \n\t" "blt "AP"loopout \n\t" "sub %[tmp],%[e],#63 \n\t" AP "quadloop: \n\t" "vldm %[s]!, {d0,d1,d2,d3} \n\t" "vldm %[s]!, {d4,d5,d6,d7} \n\t" "vstm %[d]!, {d0,d1,d2,d3} \n\t" "vstm %[d]!, {d4,d5,d6,d7} \n\t" "cmp %[tmp], %[d] \n\t" "bhi "AP"quadloop \n\t" AP "loopout: \n\t" "cmp %[d], %[e] \n\t" "beq "AP"done \n\t" "sub %[tmp],%[e], %[d] \n\t" "cmp %[tmp],$0x04 \n\t" "beq "AP"singleloop2 \n\t" AP "dualloop2: \n\t" "sub %[tmp],%[e],$0x7 \n\t" AP "dualloop2int: \n\t" "vldm %[s]!, {d0} \n\t" "vstm %[d]!, {d0} \n\t" "cmp %[tmp], %[d] \n\t" "bhi "AP"dualloop2int \n\t" // Single ?? "cmp %[e], %[d] \n\t" "beq "AP"done \n\t" AP "singleloop2: \n\t" "vld1.32 d0[0], [%[s]] \n\t" "vst1.32 d0[0], [%[d]] \n\t" AP "done:\n\t" : // No output regs // Input : [s] "r" (src), [e] "r" (e), [d] "r" (dst),[tmp] "r" (tmp) // Clobbered : "q0","q1","q2","q3","memory" ); #undef AP } #endif /* BUILD_NEON */ #ifdef BUILD_SSE static void evas_common_copy_pixels_sse(DATA32 *src, DATA32 *dst, int len) { DATA32 *src_ptr, *dst_ptr, *dst_end_ptr; dst_end_ptr = dst + len; dst_end_ptr -= 15; src_ptr = src; dst_ptr = dst; while (dst_ptr < dst_end_ptr) { MOVE_16DWORDS_MMX2(src_ptr, dst_ptr); src_ptr+=16; dst_ptr+=16; } dst_end_ptr = dst + len; while (dst_ptr < dst_end_ptr) { *dst_ptr = *src_ptr; src_ptr++; dst_ptr++; } #if 0 #ifdef ALIGN_FIX int src_align; int dst_align; src_align = (int)src & 0x3f; /* 64 byte alignment */ dst_align = (int)dst & 0x3f; /* 64 byte alignment */ if ((src_align != dst_align) || ((src_align & 0x3) != 0)) { #ifdef BUILD_C evas_common_copy_pixels_c(src, dst, len); #endif return; } while ((src_align > 0) && (len > 0)) { *dst = *src; dst++; src++; len--; src_align -= sizeof(DATA32); } #endif /* ALIGN_FIX */ src_ptr = src; dst_ptr = dst; dst_end_ptr = dst + len; dst_end_ptr_pre = dst + ((len / 16) * 16); while (dst_ptr < dst_end_ptr_pre) { prefetch(&src_ptr[16]); MOVE_16DWORDS_MMX(src_ptr, dst_ptr); src_ptr+=16; dst_ptr+=16; } while (dst_ptr < dst_end_ptr) { *dst_ptr = *src_ptr; src_ptr++; dst_ptr++; } #endif } #endif /****************************************************************************/ #ifdef BUILD_C static void evas_common_copy_pixels_rev_c(DATA32 *src, DATA32 *dst, int len) { DATA32 *dst_end; src = src + len - 1; dst_end = dst - 1; dst = dst + len - 1; while (dst > dst_end) *dst-- = *src--; } #endif #ifdef BUILD_MMX static void evas_common_copy_pixels_rev_mmx(DATA32 *src, DATA32 *dst, int len) { DATA32 *dst_end, *dst_end_pre; if (len >= 16) { src = src + len - 16; dst_end = dst; dst_end_pre = dst + len - ((len / 16) * 16); dst = dst + len - 16; while (dst >= dst_end_pre) { MOVE_16DWORDS_MMX(src, dst); src -= 16; dst -= 16; } src += 15; dst += 15; while (dst >= dst_end) *dst-- = *src--; } else { src = src + len - 1; dst_end = dst - 1; dst = dst + len - 1; while (dst > dst_end) *dst-- = *src--; } } #endif #ifdef BUILD_SSE static void evas_common_copy_pixels_rev_sse(DATA32 *src, DATA32 *dst, int len) { DATA32 *src_ptr, *dst_ptr, *dst_end_ptr, *dst_end_ptr_pre; src_ptr = src + len - 16; dst_ptr = dst + len - 16; dst_end_ptr = dst; dst_end_ptr_pre = dst + len - ((len / 16) * 16); if (len >= 16) { while (dst_ptr >= dst_end_ptr_pre) { prefetch(&src_ptr[-16]); MOVE_10DWORDS_MMX(src_ptr, dst_ptr); src_ptr -= 16; dst_ptr -= 16; } src_ptr += 15; dst_ptr += 15; while (dst_ptr >= dst_end_ptr) { *dst_ptr = *src_ptr; src_ptr--; dst_ptr--; } } else { src_ptr = src + len - 1; dst_ptr = dst + len - 1; while (dst_ptr >= dst_end_ptr) { *dst_ptr = *src_ptr; src_ptr--; dst_ptr--; } } } #endif Gfx_Func_Copy evas_common_draw_func_copy_get(int pixels, int reverse) { if (reverse == -1) return evas_common_copy_rev_pixels_c; if (reverse) { #ifdef BUILD_SSE if (evas_common_cpu_has_feature(CPU_FEATURE_SSE) && (pixels > 256 * 256)) return evas_common_copy_pixels_rev_sse; #endif #ifdef BUILD_MMX # ifdef BUILD_SSE else # endif if (evas_common_cpu_has_feature(CPU_FEATURE_MMX)) return evas_common_copy_pixels_rev_mmx; #endif #ifdef BUILD_NEON # if defined(BUILD_SSE) || defined(BUILD_MMX) else # endif if (evas_common_cpu_has_feature(CPU_FEATURE_NEON)) return evas_common_copy_pixels_rev_neon; #endif #ifdef BUILD_C # if defined(BUILD_MMX) || defined(BUILD_NEON) else # endif return evas_common_copy_pixels_rev_c; #endif } else { #if 1 # ifdef BUILD_MMX # ifdef BUILD_C if (evas_common_cpu_has_feature(CPU_FEATURE_MMX2)) # endif return evas_common_copy_pixels_mmx2; # ifdef BUILD_SSE else # endif #endif #ifdef BUILD_SSE # ifdef BUILD_C if (evas_common_cpu_has_feature(CPU_FEATURE_SSE) && (pixels > 64 * 64)) # endif return evas_common_copy_pixels_sse; # ifdef BUILD_MMX else # endif #endif # ifdef BUILD_NEON # ifdef BUILD_C if (evas_common_cpu_has_feature(CPU_FEATURE_NEON)) # endif return evas_common_copy_pixels_neon; # ifdef BUILD_SSE else # endif #endif #ifdef BUILD_MMX # ifdef BUILD_C if (evas_common_cpu_has_feature(CPU_FEATURE_MMX)) # endif return evas_common_copy_pixels_mmx; # ifdef BUILD_C else # endif #endif #ifdef BUILD_C return evas_common_copy_pixels_c; #endif #else # ifdef BUILD_SSE if (evas_common_cpu_has_feature(CPU_FEATURE_SSE) && (pixels > 256 * 256)) return evas_common_copy_pixels_sse; # ifdef BUILD_MMX else # endif #endif #ifdef BUILD_MMX # ifdef BUILD_C if (evas_common_cpu_has_feature(CPU_FEATURE_MMX2)) # endif return evas_common_copy_pixels_mmx2; # ifdef BUILD_C else if (evas_common_cpu_has_feature(CPU_FEATURE_MMX)) # endif return evas_common_copy_pixels_mmx; # ifdef BUILD_C else # endif #endif #ifdef BUILD_C return evas_common_copy_pixels_c; #endif #endif } #ifdef BUILD_C return evas_common_copy_pixels_c; #else return NULL; #endif } evas-1.7.9/src/lib/engines/common/evas_convert_rgb_16.c0000664000175000017500000016013112175475547017713 00000000000000#include "evas_common.h" #include "evas_convert_rgb_16.h" #ifndef BUILD_NO_DITHER_MASK #ifdef USE_DITHER_44 extern const DATA8 _evas_dither_44[4][4]; #endif #ifdef USE_DITHER_128128 extern const DATA8 _evas_dither_128128[128][128]; #endif #endif #ifdef BUILD_CONVERT_16_RGB_565 #ifdef BUILD_CONVERT_16_RGB_ROT0 void evas_common_convert_rgba2_to_16bpp_rgb_565_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal) { #ifndef BUILD_NO_DITHER_MASK DATA16 *d = (DATA16 *)dst; DATA32 r1, g1, b1; DATA32 r2, g2, b2; unsigned int dith, dith2; int x, y; #ifdef BUILD_LINE_DITHER_MASK for (y = 0; y < h; y++) { if ((y + dith_y) & 0x1) { for (x = 0; x < w; x+=2) { DATA32 p = *src++, q = *src++; r1 = ((p & 0xff0000) + 0x030000) >> 19; if (r1 > 0x1f) r1 = 0x1f; g1 = ((p & 0xff00) + 0x000100) >> 10; if (g1 > 0x3f) g1 = 0x3f; b1 = ((p & 0xff) + 0x000003) >> 3; if (b1 > 0x1f) b1 = 0x1f; r2 = ((q & 0xff0000) + 0x030000) >> 19; if (r2 > 0x1f) r2 = 0x1f; g2 = ((q & 0xff00) + 0x000100) >> 10; if (g2 > 0x3f) g2 = 0x3f; b2 = ((q & 0xff) + 0x000003) >> 3; if (b2 > 0x1f) b2 = 0x1f; #ifndef WORDS_BIGENDIAN *((DATA32 *)d) = (r2 << 27) | (g2 << 21) | (b2 << 16) | (r1 << 11) | (g1 << 5) | (b1); #else *((DATA32 *)d) = (r1 << 27) | (g1 << 21) | (b1 << 16) | (r2 << 11) | (g2 << 5) | (b2); #endif d += 2; } } else { x = w; while (w > 0) { DATA32 p = *src++, q = *src++; #ifndef WORDS_BIGENDIAN *((DATA32 *)d) = (((q & 0xff0000) >> 19) << 27) | (((q & 0xff00) >> 10) << 21) | (((q & 0xff) >> 3) << 16) | (((p & 0xff0000) >> 19) << 11) | (((p & 0xff00) >> 10) << 5) | ((p & 0xff) >> 3); #else *((DATA32 *)d) = (((p & 0xff0000) >> 19) << 27) | (((p & 0xff00) >> 10) << 21) | (((p & 0xff) >> 3) << 16) | (((q & 0xff0000) >> 19) << 11) | (((q & 0xff00) >> 10) << 5) | ((q & 0xff) >> 3); #endif d += 2; w -= 2; } w = x; } src += src_jump; d += dst_jump; } #else for (y = 0; y < h; y++) { for (x = 0; x < w; x++) { DATA32 p = *src++, q = *src++; dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK]; dith2 = dith >> DM_SHF(6); dith >>= DM_SHF(5); r1 = (p & 0xff0000) >> 19; g1 = (p & 0xff00) >> 10; b1 = (p & 0xff) >> 3; if ((r1 < 0x1f) && ((((p & 0xff0000) >> 16) - (r1 << 3)) >= dith )) r1++; if ((g1 < 0x3f) && ((((p & 0xff00) >> 8) - (g1 << 2)) >= dith2)) g1++; if ((b1 < 0x1f) && (((p & 0xff) - (b1 << 3)) >= dith )) b1++; x++; dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK]; dith2 = dith >> DM_SHF(6); dith >>= DM_SHF(5); r2 = (q & 0xff0000) >> 19; g2 = (q & 0xff00) >> 10; b2 = (q & 0xff) >> 3; if ((r2 < 0x1f) && ((((q & 0xff0000) >> 16) - (r2 << 3)) >= dith )) r2++; if ((g2 < 0x3f) && ((((q & 0xff00) >> 8) - (g2 << 2)) >= dith2)) g2++; if ((b2 < 0x1f) && (((q & 0xff) - (b2 << 3)) >= dith )) b2++; #ifndef WORDS_BIGENDIAN *((DATA32 *)d) = (r2 << 27) | (g2 << 21) | (b2 << 16) | (r1 << 11) | (g1 << 5) | (b1); #else *((DATA32 *)d) = (r1 << 27) | (g1 << 21) | (b1 << 16) | (r2 << 11) | (g2 << 5) | (b2); #endif d += 2; } src += src_jump; d += dst_jump; } #endif return; (void)pal; #else DATA16 *d = (DATA16 *)dst; int w0 = w; while (h--) { while (w > 0) { DATA32 p = *src++, q = *src++; #ifndef WORDS_BIGENDIAN *((DATA32 *)d) = (((q & 0xff0000) >> 19) << 27) | (((q & 0xff00) >> 10) << 21) | (((q & 0xff) >> 3) << 16) | (((p & 0xff0000) >> 19) << 11) | (((p & 0xff00) >> 10) << 5) | ((p & 0xff) >> 3); #else *((DATA32 *)d) = (((p & 0xff0000) >> 19) << 27) | (((p & 0xff00) >> 10) << 21) | (((p & 0xff) >> 3) << 16) | (((q & 0xff0000) >> 19) << 11) | (((q & 0xff00) >> 10) << 5) | ((q & 0xff) >> 3); #endif d += 2; w -= 2; } w = w0; src += src_jump; d += dst_jump; } return; (void)pal; #endif } #endif #endif #ifdef BUILD_CONVERT_16_RGB_565 #ifdef BUILD_CONVERT_16_RGB_ROT0 void evas_common_convert_rgba_to_16bpp_rgb_565_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal) { #ifndef BUILD_NO_DITHER_MASK DATA16 *d = (DATA16 *)dst; DATA32 r, g, b; unsigned int dith, dith2; int x, y; #ifdef BUILD_LINE_DITHER_MASK for (y = 0; y < h; y++) { if ((y + dith_y) & 0x1) { for (x = 0; x < w; x++) { DATA32 p = *src++; r = (p & 0xff0000) >> 19; if (r > 0x1f) r = 0x1f; g = (p & 0xff00) >> 10; if (g > 0x3f) g = 0x3f; b = (p & 0xff) >> 3; if (b > 0x1f) b = 0x1f; *d++ = (r << 11) | (g << 5) | b; } } else { x = w; while (w--) { *d++ = (((*src & 0xff0000) >> 19) << 11) | (((*src & 0xff00) >> 10) << 5) | ((*src & 0xff) >> 3); src++; } w = x; } src += src_jump; d += dst_jump; } #else for (y = 0; y < h; y++) { for (x = 0; x < w; x++) { DATA32 p = *src++; dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK]; dith2 = dith >> DM_SHF(6); dith >>= DM_SHF(5); r = (p & 0xff0000) >> 19; g = (p & 0xff00) >> 10; b = (p & 0xff) >> 3; if ((r < 0x1f) && ((((p & 0xff0000) >> 16) - (r << 3)) >= dith )) r++; if ((g < 0x3f) && ((((p & 0xff00) >> 8) - (g << 2)) >= dith2)) g++; if ((b < 0x1f) && (((p & 0xff) - (b << 3)) >= dith )) b++; *d++ = (r << 11) | (g << 5) | b; } src += src_jump; d += dst_jump; } #endif return; (void)pal; #else DATA16 *d = (DATA16 *)dst; int w0 = w; while (h--) { while (w--) { *d++ = (((*src & 0xff0000) >> 19) << 11) | (((*src & 0xff00) >> 10) << 5) | ((*src & 0xff) >> 3); src++; } w = w0; src += src_jump; d += dst_jump; } return; (void)pal; #endif } #endif #endif #ifdef BUILD_CONVERT_16_RGB_565 #ifdef BUILD_CONVERT_16_RGB_ROT180 void evas_common_convert_rgba2_to_16bpp_rgb_565_dith_rot_180 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal) { DATA32 *src_ptr; DATA16 *dst_ptr; int x, y; DATA8 r1, g1, b1; DATA8 r2, g2, b2; #ifndef BUILD_NO_DITHER_MASK DATA8 dith, dith2; #endif dst_ptr = (DATA16 *)dst; CONVERT_LOOP2_START_ROT_180(); r1 = (R_VAL(src_ptr)) >> 3; g1 = (G_VAL(src_ptr)) >> 2; b1 = (B_VAL(src_ptr)) >> 3; #ifndef BUILD_NO_DITHER_MASK dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5); dith2 = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(6); if (((R_VAL(src_ptr) - (r1 << 3)) >= dith ) && (r1 < 0x1f)) r1++; if (((G_VAL(src_ptr) - (g1 << 2)) >= dith2) && (g1 < 0x3f)) g1++; if (((B_VAL(src_ptr) - (b1 << 3)) >= dith ) && (b1 < 0x1f)) b1++; #endif CONVERT_LOOP2_INC_ROT_180(); r2 = (R_VAL(src_ptr)) >> 3; g2 = (G_VAL(src_ptr)) >> 2; b2 = (B_VAL(src_ptr)) >> 3; #ifndef BUILD_NO_DITHER_MASK dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5); dith2 = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(6); if (((R_VAL(src_ptr) - (r2 << 3)) >= dith ) && (r2 < 0x1f)) r2++; if (((G_VAL(src_ptr) - (g2 << 2)) >= dith2) && (g2 < 0x3f)) g2++; if (((B_VAL(src_ptr) - (b2 << 3)) >= dith ) && (b2 < 0x1f)) b2++; #endif #ifndef WORDS_BIGENDIAN *((DATA32 *)dst_ptr) = (r2 << 27) | (g2 << 21) | (b2 << 16) | (r1 << 11) | (g1 << 5 ) | (b1 ); #else *((DATA32 *)dst_ptr) = (r1 << 27) | (g1 << 21) | (b1 << 16) | (r2 << 11) | (g2 << 5 ) | (b2 ); #endif CONVERT_LOOP2_END_ROT_180(); return; (void)pal; } #endif #endif #ifdef BUILD_CONVERT_16_RGB_565 #ifdef BUILD_CONVERT_16_RGB_ROT180 void evas_common_convert_rgba_to_16bpp_rgb_565_dith_rot_180 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal) { DATA32 *src_ptr; DATA16 *dst_ptr; int x, y; DATA8 r, g, b; #ifndef BUILD_NO_DITHER_MASK DATA8 dith, dith2; #endif dst_ptr = (DATA16 *)dst; CONVERT_LOOP_START_ROT_180(); r = (R_VAL(src_ptr)) >> 3; g = (G_VAL(src_ptr)) >> 2; b = (B_VAL(src_ptr)) >> 3; #ifndef BUILD_NO_DITHER_MASK dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5); dith2 = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(6); if (((R_VAL(src_ptr) - (r << 3)) >= dith ) && (r < 0x1f)) r++; if (((G_VAL(src_ptr) - (g << 2)) >= dith2) && (g < 0x3f)) g++; if (((B_VAL(src_ptr) - (b << 3)) >= dith ) && (b < 0x1f)) b++; #endif *dst_ptr = (r << 11) | (g << 5) | (b); CONVERT_LOOP_END_ROT_180(); return; (void)pal; } #endif #endif #ifdef BUILD_CONVERT_16_RGB_565 #ifdef BUILD_CONVERT_16_RGB_ROT270 void evas_common_convert_rgba2_to_16bpp_rgb_565_dith_rot_270 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal) { DATA32 *src_ptr; DATA16 *dst_ptr; int x, y; DATA8 r1, g1, b1; DATA8 r2, g2, b2; #ifndef BUILD_NO_DITHER_MASK DATA8 dith, dith2; #endif dst_ptr = (DATA16 *)dst; CONVERT_LOOP2_START_ROT_270(); r1 = (R_VAL(src_ptr)) >> 3; g1 = (G_VAL(src_ptr)) >> 2; b1 = (B_VAL(src_ptr)) >> 3; #ifndef BUILD_NO_DITHER_MASK dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5); dith2 = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(6); if (((R_VAL(src_ptr) - (r1 << 3)) >= dith ) && (r1 < 0x1f)) r1++; if (((G_VAL(src_ptr) - (g1 << 2)) >= dith2) && (g1 < 0x3f)) g1++; if (((B_VAL(src_ptr) - (b1 << 3)) >= dith ) && (b1 < 0x1f)) b1++; #endif CONVERT_LOOP2_INC_ROT_270(); r2 = (R_VAL(src_ptr)) >> 3; g2 = (G_VAL(src_ptr)) >> 2; b2 = (B_VAL(src_ptr)) >> 3; #ifndef BUILD_NO_DITHER_MASK dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5); dith2 = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(6); if (((R_VAL(src_ptr) - (r2 << 3)) >= dith ) && (r2 < 0x1f)) r2++; if (((G_VAL(src_ptr) - (g2 << 2)) >= dith2) && (g2 < 0x3f)) g2++; if (((B_VAL(src_ptr) - (b2 << 3)) >= dith ) && (b2 < 0x1f)) b2++; #endif #ifndef WORDS_BIGENDIAN *((DATA32 *)dst_ptr) = (r2 << 27) | (g2 << 21) | (b2 << 16) | (r1 << 11) | (g1 << 5 ) | (b1 ); #else *((DATA32 *)dst_ptr) = (r1 << 27) | (g1 << 21) | (b1 << 16) | (r2 << 11) | (g2 << 5 ) | (b2 ); #endif CONVERT_LOOP2_END_ROT_270(); return; (void)pal; } #endif #endif #ifdef BUILD_CONVERT_16_RGB_565 #ifdef BUILD_CONVERT_16_RGB_ROT270 void evas_common_convert_rgba_to_16bpp_rgb_565_dith_rot_270 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal) { DATA32 *src_ptr; DATA16 *dst_ptr; int x, y; DATA8 r, g, b; #ifndef BUILD_NO_DITHER_MASK DATA8 dith, dith2; #endif dst_ptr = (DATA16 *)dst; CONVERT_LOOP_START_ROT_270(); r = (R_VAL(src_ptr)) >> 3; g = (G_VAL(src_ptr)) >> 2; b = (B_VAL(src_ptr)) >> 3; #ifndef BUILD_NO_DITHER_MASK dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5); dith2 = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(6); if (((R_VAL(src_ptr) - (r << 3)) >= dith ) && (r < 0x1f)) r++; if (((G_VAL(src_ptr) - (g << 2)) >= dith2) && (g < 0x3f)) g++; if (((B_VAL(src_ptr) - (b << 3)) >= dith ) && (b < 0x1f)) b++; #endif *dst_ptr = (r << 11) | (g << 5) | (b); CONVERT_LOOP_END_ROT_270(); return; (void)pal; } #endif #endif #ifdef BUILD_CONVERT_16_RGB_565 #ifdef BUILD_CONVERT_16_RGB_ROT90 void evas_common_convert_rgba2_to_16bpp_rgb_565_dith_rot_90 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal) { DATA32 *src_ptr; DATA16 *dst_ptr; int x, y; DATA8 r1, g1, b1; DATA8 r2, g2, b2; #ifndef BUILD_NO_DITHER_MASK DATA8 dith, dith2; #endif dst_ptr = (DATA16 *)dst; CONVERT_LOOP2_START_ROT_90(); r1 = (R_VAL(src_ptr)) >> 3; g1 = (G_VAL(src_ptr)) >> 2; b1 = (B_VAL(src_ptr)) >> 3; #ifndef BUILD_NO_DITHER_MASK dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5); dith2 = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(6); if (((R_VAL(src_ptr) - (r1 << 3)) >= dith ) && (r1 < 0x1f)) r1++; if (((G_VAL(src_ptr) - (g1 << 2)) >= dith2) && (g1 < 0x3f)) g1++; if (((B_VAL(src_ptr) - (b1 << 3)) >= dith ) && (b1 < 0x1f)) b1++; #endif CONVERT_LOOP2_INC_ROT_90(); r2 = (R_VAL(src_ptr)) >> 3; g2 = (G_VAL(src_ptr)) >> 2; b2 = (B_VAL(src_ptr)) >> 3; #ifndef BUILD_NO_DITHER_MASK dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5); dith2 = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(6); if (((R_VAL(src_ptr) - (r2 << 3)) >= dith ) && (r2 < 0x1f)) r2++; if (((G_VAL(src_ptr) - (g2 << 2)) >= dith2) && (g2 < 0x3f)) g2++; if (((B_VAL(src_ptr) - (b2 << 3)) >= dith ) && (b2 < 0x1f)) b2++; #endif #ifndef WORDS_BIGENDIAN *((DATA32 *)dst_ptr) = (r2 << 27) | (g2 << 21) | (b2 << 16) | (r1 << 11) | (g1 << 5 ) | (b1 ); #else *((DATA32 *)dst_ptr) = (r1 << 27) | (g1 << 21) | (b1 << 16) | (r2 << 11) | (g2 << 5 ) | (b2 ); #endif CONVERT_LOOP2_END_ROT_90(); return; (void)pal; } #endif #endif #ifdef BUILD_CONVERT_16_RGB_565 #ifdef BUILD_CONVERT_16_RGB_ROT90 void evas_common_convert_rgba_to_16bpp_rgb_565_dith_rot_90 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal) { DATA32 *src_ptr; DATA16 *dst_ptr; int x, y; DATA8 r, g, b; #ifndef BUILD_NO_DITHER_MASK DATA8 dith, dith2; #endif dst_ptr = (DATA16 *)dst; CONVERT_LOOP_START_ROT_90(); r = (R_VAL(src_ptr)) >> 3; g = (G_VAL(src_ptr)) >> 2; b = (B_VAL(src_ptr)) >> 3; #ifndef BUILD_NO_DITHER_MASK dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5); dith2 = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(6); if (((R_VAL(src_ptr) - (r << 3)) >= dith ) && (r < 0x1f)) r++; if (((G_VAL(src_ptr) - (g << 2)) >= dith2) && (g < 0x3f)) g++; if (((B_VAL(src_ptr) - (b << 3)) >= dith ) && (b < 0x1f)) b++; #endif *dst_ptr = (r << 11) | (g << 5) | (b); CONVERT_LOOP_END_ROT_90(); return; (void)pal; } #endif #endif #ifdef BUILD_CONVERT_16_BGR_565 #ifdef BUILD_CONVERT_16_RGB_ROT0 void evas_common_convert_rgba2_to_16bpp_bgr_565_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal) { DATA32 *src_ptr; DATA16 *dst_ptr; int x, y; DATA8 r1, g1, b1; DATA8 r2, g2, b2; #ifndef BUILD_NO_DITHER_MASK DATA8 dith, dith2; #endif dst_ptr = (DATA16 *)dst; CONVERT_LOOP2_START_ROT_0(); r1 = (R_VAL(src_ptr)) >> 3; g1 = (G_VAL(src_ptr)) >> 2; b1 = (B_VAL(src_ptr)) >> 3; #ifndef BUILD_NO_DITHER_MASK dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5); dith2 = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(6); if (((R_VAL(src_ptr) - (r1 << 3)) >= dith ) && (r1 < 0x1f)) r1++; if (((G_VAL(src_ptr) - (g1 << 2)) >= dith2) && (g1 < 0x3f)) g1++; if (((B_VAL(src_ptr) - (b1 << 3)) >= dith ) && (b1 < 0x1f)) b1++; #endif CONVERT_LOOP2_INC_ROT_0(); r2 = (R_VAL(src_ptr)) >> 3; g2 = (G_VAL(src_ptr)) >> 2; b2 = (B_VAL(src_ptr)) >> 3; #ifndef BUILD_NO_DITHER_MASK dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5); dith2 = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(6); if (((R_VAL(src_ptr) - (r2 << 3)) >= dith ) && (r2 < 0x1f)) r2++; if (((G_VAL(src_ptr) - (g2 << 2)) >= dith2) && (g2 < 0x3f)) g2++; if (((B_VAL(src_ptr) - (b2 << 3)) >= dith ) && (b2 < 0x1f)) b2++; #endif #ifndef WORDS_BIGENDIAN *((DATA32 *)dst_ptr) = (b2 << 27) | (g2 << 21) | (r2 << 16) | (b1 << 11) | (g1 << 5 ) | (r1 ); #else *((DATA32 *)dst_ptr) = (b1 << 27) | (g1 << 21) | (r1 << 16) | (b2 << 11) | (g2 << 5 ) | (r2 ); #endif CONVERT_LOOP2_END_ROT_0(); return; (void)pal; } #endif #endif #ifdef BUILD_CONVERT_16_BGR_565 #ifdef BUILD_CONVERT_16_RGB_ROT0 void evas_common_convert_rgba_to_16bpp_bgr_565_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal) { DATA32 *src_ptr; DATA16 *dst_ptr; int x, y; DATA8 r, g, b; #ifndef BUILD_NO_DITHER_MASK DATA8 dith, dith2; #endif dst_ptr = (DATA16 *)dst; CONVERT_LOOP_START_ROT_0(); r = (R_VAL(src_ptr)) >> 3; g = (G_VAL(src_ptr)) >> 2; b = (B_VAL(src_ptr)) >> 3; #ifndef BUILD_NO_DITHER_MASK dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5); dith2 = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(6); if (((R_VAL(src_ptr) - (r << 3)) >= dith ) && (r < 0x1f)) r++; if (((G_VAL(src_ptr) - (g << 2)) >= dith2) && (g < 0x3f)) g++; if (((B_VAL(src_ptr) - (b << 3)) >= dith ) && (b < 0x1f)) b++; #endif *dst_ptr = (b << 11) | (g << 5) | (r); CONVERT_LOOP_END_ROT_0(); return; (void)pal; } #endif #endif #ifdef BUILD_CONVERT_16_BGR_565 #ifdef BUILD_CONVERT_16_RGB_ROT180 void evas_common_convert_rgba2_to_16bpp_bgr_565_dith_rot_180 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal) { DATA32 *src_ptr; DATA16 *dst_ptr; int x, y; DATA8 r1, g1, b1; DATA8 r2, g2, b2; #ifndef BUILD_NO_DITHER_MASK DATA8 dith, dith2; #endif dst_ptr = (DATA16 *)dst; CONVERT_LOOP2_START_ROT_180(); r1 = (R_VAL(src_ptr)) >> 3; g1 = (G_VAL(src_ptr)) >> 2; b1 = (B_VAL(src_ptr)) >> 3; #ifndef BUILD_NO_DITHER_MASK dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5); dith2 = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(6); if (((R_VAL(src_ptr) - (r1 << 3)) >= dith ) && (r1 < 0x1f)) r1++; if (((G_VAL(src_ptr) - (g1 << 2)) >= dith2) && (g1 < 0x3f)) g1++; if (((B_VAL(src_ptr) - (b1 << 3)) >= dith ) && (b1 < 0x1f)) b1++; #endif CONVERT_LOOP2_INC_ROT_180(); r2 = (R_VAL(src_ptr)) >> 3; g2 = (G_VAL(src_ptr)) >> 2; b2 = (B_VAL(src_ptr)) >> 3; #ifndef BUILD_NO_DITHER_MASK dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5); dith2 = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(6); if (((R_VAL(src_ptr) - (r2 << 3)) >= dith ) && (r2 < 0x1f)) r2++; if (((G_VAL(src_ptr) - (g2 << 2)) >= dith2) && (g2 < 0x3f)) g2++; if (((B_VAL(src_ptr) - (b2 << 3)) >= dith ) && (b2 < 0x1f)) b2++; #endif #ifndef WORDS_BIGENDIAN *((DATA32 *)dst_ptr) = (b2 << 27) | (g2 << 21) | (r2 << 16) | (b1 << 11) | (g1 << 5 ) | (r1 ); #else *((DATA32 *)dst_ptr) = (b1 << 27) | (g1 << 21) | (r1 << 16) | (b2 << 11) | (g2 << 5 ) | (r2 ); #endif CONVERT_LOOP2_END_ROT_180(); return; (void)pal; } #endif #endif #ifdef BUILD_CONVERT_16_BGR_565 #ifdef BUILD_CONVERT_16_RGB_ROT180 void evas_common_convert_rgba_to_16bpp_bgr_565_dith_rot_180 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal) { DATA32 *src_ptr; DATA16 *dst_ptr; int x, y; DATA8 r, g, b; #ifndef BUILD_NO_DITHER_MASK DATA8 dith, dith2; #endif dst_ptr = (DATA16 *)dst; ERR("evas_common_convert_rgba_to_16bpp_bgr_565_dith_rot_180"); CONVERT_LOOP_START_ROT_180(); r = (R_VAL(src_ptr)) >> 3; g = (G_VAL(src_ptr)) >> 2; b = (B_VAL(src_ptr)) >> 3; #ifndef BUILD_NO_DITHER_MASK dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5); dith2 = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(6); if (((R_VAL(src_ptr) - (r << 3)) >= dith ) && (r < 0x1f)) r++; if (((G_VAL(src_ptr) - (g << 2)) >= dith2) && (g < 0x3f)) g++; if (((B_VAL(src_ptr) - (b << 3)) >= dith ) && (b < 0x1f)) b++; #endif *dst_ptr = (b << 11) | (g << 5) | (r); CONVERT_LOOP_END_ROT_180(); return; (void)pal; } #endif #endif #ifdef BUILD_CONVERT_16_BGR_565 #ifdef BUILD_CONVERT_16_RGB_ROT270 void evas_common_convert_rgba2_to_16bpp_bgr_565_dith_rot_270 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal) { DATA32 *src_ptr; DATA16 *dst_ptr; int x, y; DATA8 r1, g1, b1; DATA8 r2, g2, b2; #ifndef BUILD_NO_DITHER_MASK DATA8 dith, dith2; #endif dst_ptr = (DATA16 *)dst; CONVERT_LOOP2_START_ROT_270(); r1 = (R_VAL(src_ptr)) >> 3; g1 = (G_VAL(src_ptr)) >> 2; b1 = (B_VAL(src_ptr)) >> 3; #ifndef BUILD_NO_DITHER_MASK dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5); dith2 = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(6); if (((R_VAL(src_ptr) - (r1 << 3)) >= dith ) && (r1 < 0x1f)) r1++; if (((G_VAL(src_ptr) - (g1 << 2)) >= dith2) && (g1 < 0x3f)) g1++; if (((B_VAL(src_ptr) - (b1 << 3)) >= dith ) && (b1 < 0x1f)) b1++; #endif CONVERT_LOOP2_INC_ROT_270(); r2 = (R_VAL(src_ptr)) >> 3; g2 = (G_VAL(src_ptr)) >> 2; b2 = (B_VAL(src_ptr)) >> 3; #ifndef BUILD_NO_DITHER_MASK dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5); dith2 = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(6); if (((R_VAL(src_ptr) - (r2 << 3)) >= dith ) && (r2 < 0x1f)) r2++; if (((G_VAL(src_ptr) - (g2 << 2)) >= dith2) && (g2 < 0x3f)) g2++; if (((B_VAL(src_ptr) - (b2 << 3)) >= dith ) && (b2 < 0x1f)) b2++; #endif #ifndef WORDS_BIGENDIAN *((DATA32 *)dst_ptr) = (b2 << 27) | (g2 << 21) | (r2 << 16) | (b1 << 11) | (g1 << 5 ) | (r1 ); #else *((DATA32 *)dst_ptr) = (b1 << 27) | (g1 << 21) | (r1 << 16) | (b2 << 11) | (g2 << 5 ) | (r2 ); #endif CONVERT_LOOP2_END_ROT_270(); return; (void)pal; } #endif #endif #ifdef BUILD_CONVERT_16_BGR_565 #ifdef BUILD_CONVERT_16_RGB_ROT270 void evas_common_convert_rgba_to_16bpp_bgr_565_dith_rot_270 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal) { DATA32 *src_ptr; DATA16 *dst_ptr; int x, y; DATA8 r, g, b; #ifndef BUILD_NO_DITHER_MASK DATA8 dith, dith2; #endif dst_ptr = (DATA16 *)dst; CONVERT_LOOP_START_ROT_270(); r = (R_VAL(src_ptr)) >> 3; g = (G_VAL(src_ptr)) >> 2; b = (B_VAL(src_ptr)) >> 3; #ifndef BUILD_NO_DITHER_MASK dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5); dith2 = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(6); if (((R_VAL(src_ptr) - (r << 3)) >= dith ) && (r < 0x1f)) r++; if (((G_VAL(src_ptr) - (g << 2)) >= dith2) && (g < 0x3f)) g++; if (((B_VAL(src_ptr) - (b << 3)) >= dith ) && (b < 0x1f)) b++; #endif *dst_ptr = (b << 11) | (g << 5) | (r); CONVERT_LOOP_END_ROT_270(); return; (void)pal; } #endif #endif #ifdef BUILD_CONVERT_16_BGR_565 #ifdef BUILD_CONVERT_16_RGB_ROT90 void evas_common_convert_rgba2_to_16bpp_bgr_565_dith_rot_90 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal) { DATA32 *src_ptr; DATA16 *dst_ptr; int x, y; DATA8 r1, g1, b1; DATA8 r2, g2, b2; #ifndef BUILD_NO_DITHER_MASK DATA8 dith, dith2; #endif dst_ptr = (DATA16 *)dst; CONVERT_LOOP2_START_ROT_90(); r1 = (R_VAL(src_ptr)) >> 3; g1 = (G_VAL(src_ptr)) >> 2; b1 = (B_VAL(src_ptr)) >> 3; #ifndef BUILD_NO_DITHER_MASK dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5); dith2 = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(6); if (((R_VAL(src_ptr) - (r1 << 3)) >= dith ) && (r1 < 0x1f)) r1++; if (((G_VAL(src_ptr) - (g1 << 2)) >= dith2) && (g1 < 0x3f)) g1++; if (((B_VAL(src_ptr) - (b1 << 3)) >= dith ) && (b1 < 0x1f)) b1++; #endif CONVERT_LOOP2_INC_ROT_90(); r2 = (R_VAL(src_ptr)) >> 3; g2 = (G_VAL(src_ptr)) >> 2; b2 = (B_VAL(src_ptr)) >> 3; #ifndef BUILD_NO_DITHER_MASK dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5); dith2 = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(6); if (((R_VAL(src_ptr) - (r2 << 3)) >= dith ) && (r2 < 0x1f)) r2++; if (((G_VAL(src_ptr) - (g2 << 2)) >= dith2) && (g2 < 0x3f)) g2++; if (((B_VAL(src_ptr) - (b2 << 3)) >= dith ) && (b2 < 0x1f)) b2++; #endif #ifndef WORDS_BIGENDIAN *((DATA32 *)dst_ptr) = (b2 << 27) | (g2 << 21) | (r2 << 16) | (b1 << 11) | (g1 << 5 ) | (r1 ); #else *((DATA32 *)dst_ptr) = (b1 << 27) | (g1 << 21) | (r1 << 16) | (b2 << 11) | (g2 << 5 ) | (r2 ); #endif CONVERT_LOOP2_END_ROT_90(); return; (void)pal; } #endif #endif #ifdef BUILD_CONVERT_16_BGR_565 #ifdef BUILD_CONVERT_16_RGB_ROT90 void evas_common_convert_rgba_to_16bpp_bgr_565_dith_rot_90 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal) { DATA32 *src_ptr; DATA16 *dst_ptr; int x, y; DATA8 r, g, b; #ifndef BUILD_NO_DITHER_MASK DATA8 dith, dith2; #endif dst_ptr = (DATA16 *)dst; CONVERT_LOOP_START_ROT_90(); r = (R_VAL(src_ptr)) >> 3; g = (G_VAL(src_ptr)) >> 2; b = (B_VAL(src_ptr)) >> 3; #ifndef BUILD_NO_DITHER_MASK dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5); dith2 = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(6); if (((R_VAL(src_ptr) - (r << 3)) >= dith ) && (r < 0x1f)) r++; if (((G_VAL(src_ptr) - (g << 2)) >= dith2) && (g < 0x3f)) g++; if (((B_VAL(src_ptr) - (b << 3)) >= dith ) && (b < 0x1f)) b++; #endif *dst_ptr = (b << 11) | (g << 5) | (r); CONVERT_LOOP_END_ROT_90(); return; (void)pal; } #endif #endif #ifdef BUILD_CONVERT_16_RGB_444 #ifdef BUILD_CONVERT_16_RGB_ROT0 void evas_common_convert_rgba2_to_16bpp_rgb_444_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal) { DATA32 *src_ptr; DATA16 *dst_ptr; int x, y; DATA8 r1, g1, b1; DATA8 r2, g2, b2; #ifndef BUILD_NO_DITHER_MASK DATA8 dith; #endif dst_ptr = (DATA16 *)dst; CONVERT_LOOP2_START_ROT_0(); r1 = (R_VAL(src_ptr)) >> 4; g1 = (G_VAL(src_ptr)) >> 4; b1 = (B_VAL(src_ptr)) >> 4; #ifndef BUILD_NO_DITHER_MASK dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(4); if (((R_VAL(src_ptr) - (r1 << 4)) >= dith ) && (r1 < 0x0f)) r1++; if (((G_VAL(src_ptr) - (g1 << 4)) >= dith ) && (g1 < 0x0f)) g1++; if (((B_VAL(src_ptr) - (b1 << 4)) >= dith ) && (b1 < 0x0f)) b1++; #endif CONVERT_LOOP2_INC_ROT_0(); r2 = (R_VAL(src_ptr)) >> 4; g2 = (G_VAL(src_ptr)) >> 4; b2 = (B_VAL(src_ptr)) >> 4; #ifndef BUILD_NO_DITHER_MASK dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(4); if (((R_VAL(src_ptr) - (r2 << 4)) >= dith ) && (r2 < 0x0f)) r2++; if (((G_VAL(src_ptr) - (g2 << 4)) >= dith ) && (g2 < 0x0f)) g2++; if (((B_VAL(src_ptr) - (b2 << 4)) >= dith ) && (b2 < 0x0f)) b2++; #endif #ifndef WORDS_BIGENDIAN *((DATA32 *)dst_ptr) = (r2 << 24) | (g2 << 20) | (b2 << 16) | (r1 << 8 ) | (g1 << 4 ) | (b1 ); #else *((DATA32 *)dst_ptr) = (r1 << 24) | (g1 << 20) | (b1 << 16) | (r2 << 8 ) | (g2 << 4 ) | (b2 ); #endif CONVERT_LOOP2_END_ROT_0(); return; (void)pal; } #endif #endif #ifdef BUILD_CONVERT_16_RGB_444 #ifdef BUILD_CONVERT_16_RGB_ROT0 void evas_common_convert_rgba_to_16bpp_rgb_444_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal) { DATA32 *src_ptr; DATA16 *dst_ptr; int x, y; DATA8 r, g, b; #ifndef BUILD_NO_DITHER_MASK DATA8 dith; #endif dst_ptr = (DATA16 *)dst; CONVERT_LOOP_START_ROT_0(); r = (R_VAL(src_ptr)) >> 4; g = (G_VAL(src_ptr)) >> 4; b = (B_VAL(src_ptr)) >> 4; #ifndef BUILD_NO_DITHER_MASK dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(4); if (((R_VAL(src_ptr) - (r << 4)) >= dith ) && (r < 0x0f)) r++; if (((G_VAL(src_ptr) - (g << 4)) >= dith ) && (g < 0x0f)) g++; if (((B_VAL(src_ptr) - (b << 4)) >= dith ) && (b < 0x0f)) b++; #endif *dst_ptr = (r << 8) | (g << 4) | (b); CONVERT_LOOP_END_ROT_0(); return; (void)pal; } #endif #endif #ifdef BUILD_CONVERT_16_RGB_444 #ifdef BUILD_CONVERT_16_RGB_ROT180 void evas_common_convert_rgba2_to_16bpp_rgb_444_dith_rot_180 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal) { DATA32 *src_ptr; DATA16 *dst_ptr; int x, y; DATA8 r1, g1, b1; DATA8 r2, g2, b2; #ifndef BUILD_NO_DITHER_MASK DATA8 dith; #endif dst_ptr = (DATA16 *)dst; CONVERT_LOOP2_START_ROT_180(); r1 = (R_VAL(src_ptr)) >> 4; g1 = (G_VAL(src_ptr)) >> 4; b1 = (B_VAL(src_ptr)) >> 4; #ifndef BUILD_NO_DITHER_MASK dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(4); if (((R_VAL(src_ptr) - (r1 << 4)) >= dith ) && (r1 < 0x0f)) r1++; if (((G_VAL(src_ptr) - (g1 << 4)) >= dith ) && (g1 < 0x0f)) g1++; if (((B_VAL(src_ptr) - (b1 << 4)) >= dith ) && (b1 < 0x0f)) b1++; #endif CONVERT_LOOP2_INC_ROT_180(); r2 = (R_VAL(src_ptr)) >> 4; g2 = (G_VAL(src_ptr)) >> 4; b2 = (B_VAL(src_ptr)) >> 4; #ifndef BUILD_NO_DITHER_MASK dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(4); if (((R_VAL(src_ptr) - (r2 << 4)) >= dith ) && (r2 < 0x0f)) r2++; if (((G_VAL(src_ptr) - (g2 << 4)) >= dith ) && (g2 < 0x0f)) g2++; if (((B_VAL(src_ptr) - (b2 << 4)) >= dith ) && (b2 < 0x0f)) b2++; #endif #ifndef WORDS_BIGENDIAN *((DATA32 *)dst_ptr) = (r2 << 24) | (g2 << 20) | (b2 << 16) | (r1 << 8 ) | (g1 << 4 ) | (b1 ); #else *((DATA32 *)dst_ptr) = (r1 << 24) | (g1 << 20) | (b1 << 16) | (r2 << 8 ) | (g2 << 4 ) | (b2 ); #endif CONVERT_LOOP2_END_ROT_180(); return; (void)pal; } #endif #endif #ifdef BUILD_CONVERT_16_RGB_444 #ifdef BUILD_CONVERT_16_RGB_ROT180 void evas_common_convert_rgba_to_16bpp_rgb_444_dith_rot_180 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal) { DATA32 *src_ptr; DATA16 *dst_ptr; int x, y; DATA8 r, g, b; #ifndef BUILD_NO_DITHER_MASK DATA8 dith; #endif dst_ptr = (DATA16 *)dst; CONVERT_LOOP_START_ROT_180(); r = (R_VAL(src_ptr)) >> 4; g = (G_VAL(src_ptr)) >> 4; b = (B_VAL(src_ptr)) >> 4; #ifndef BUILD_NO_DITHER_MASK dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(4); if (((R_VAL(src_ptr) - (r << 4)) >= dith ) && (r < 0x0f)) r++; if (((G_VAL(src_ptr) - (g << 4)) >= dith ) && (g < 0x0f)) g++; if (((B_VAL(src_ptr) - (b << 4)) >= dith ) && (b < 0x0f)) b++; #endif *dst_ptr = (r << 8) | (g << 4) | (b); CONVERT_LOOP_END_ROT_180(); return; (void)pal; } #endif #endif #ifdef BUILD_CONVERT_16_RGB_444 #ifdef BUILD_CONVERT_16_RGB_ROT270 void evas_common_convert_rgba2_to_16bpp_rgb_444_dith_rot_270 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal) { DATA32 *src_ptr; DATA16 *dst_ptr; int x, y; DATA8 r1, g1, b1; DATA8 r2, g2, b2; #ifndef BUILD_NO_DITHER_MASK DATA8 dith; #endif dst_ptr = (DATA16 *)dst; CONVERT_LOOP2_START_ROT_270(); r1 = (R_VAL(src_ptr)) >> 4; g1 = (G_VAL(src_ptr)) >> 4; b1 = (B_VAL(src_ptr)) >> 4; #ifndef BUILD_NO_DITHER_MASK dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(4); if (((R_VAL(src_ptr) - (r1 << 4)) >= dith ) && (r1 < 0x0f)) r1++; if (((G_VAL(src_ptr) - (g1 << 4)) >= dith ) && (g1 < 0x0f)) g1++; if (((B_VAL(src_ptr) - (b1 << 4)) >= dith ) && (b1 < 0x0f)) b1++; #endif CONVERT_LOOP2_INC_ROT_270(); r2 = (R_VAL(src_ptr)) >> 4; g2 = (G_VAL(src_ptr)) >> 4; b2 = (B_VAL(src_ptr)) >> 4; #ifndef BUILD_NO_DITHER_MASK dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(4); if (((R_VAL(src_ptr) - (r2 << 4)) >= dith ) && (r2 < 0x0f)) r2++; if (((G_VAL(src_ptr) - (g2 << 4)) >= dith ) && (g2 < 0x0f)) g2++; if (((B_VAL(src_ptr) - (b2 << 4)) >= dith ) && (b2 < 0x0f)) b2++; #endif #ifndef WORDS_BIGENDIAN *((DATA32 *)dst_ptr) = (r2 << 24) | (g2 << 20) | (b2 << 16) | (r1 << 8 ) | (g1 << 4 ) | (b1 ); #else *((DATA32 *)dst_ptr) = (r1 << 24) | (g1 << 20) | (b1 << 16) | (r2 << 8 ) | (g2 << 4 ) | (b2 ); #endif CONVERT_LOOP2_END_ROT_270(); return; (void)pal; } #endif #endif #ifdef BUILD_CONVERT_16_RGB_444 #ifdef BUILD_CONVERT_16_RGB_ROT270 void evas_common_convert_rgba_to_16bpp_rgb_444_dith_rot_270 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal) { DATA32 *src_ptr; DATA16 *dst_ptr; int x, y; DATA8 r, g, b; #ifndef BUILD_NO_DITHER_MASK DATA8 dith; #endif dst_ptr = (DATA16 *)dst; CONVERT_LOOP_START_ROT_270(); r = (R_VAL(src_ptr)) >> 4; g = (G_VAL(src_ptr)) >> 4; b = (B_VAL(src_ptr)) >> 4; #ifndef BUILD_NO_DITHER_MASK dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(4); if (((R_VAL(src_ptr) - (r << 4)) >= dith ) && (r < 0x0f)) r++; if (((G_VAL(src_ptr) - (g << 4)) >= dith ) && (g < 0x0f)) g++; if (((B_VAL(src_ptr) - (b << 4)) >= dith ) && (b < 0x0f)) b++; #endif *dst_ptr = (r << 8) | (g << 4) | (b); CONVERT_LOOP_END_ROT_270(); return; (void)pal; } #endif #endif #ifdef BUILD_CONVERT_16_RGB_444 #ifdef BUILD_CONVERT_16_RGB_ROT90 void evas_common_convert_rgba2_to_16bpp_rgb_444_dith_rot_90 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal) { DATA32 *src_ptr; DATA16 *dst_ptr; int x, y; DATA8 r1, g1, b1; DATA8 r2, g2, b2; #ifndef BUILD_NO_DITHER_MASK DATA8 dith; #endif dst_ptr = (DATA16 *)dst; CONVERT_LOOP2_START_ROT_90(); r1 = (R_VAL(src_ptr)) >> 4; g1 = (G_VAL(src_ptr)) >> 4; b1 = (B_VAL(src_ptr)) >> 4; #ifndef BUILD_NO_DITHER_MASK dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(4); if (((R_VAL(src_ptr) - (r1 << 4)) >= dith ) && (r1 < 0x0f)) r1++; if (((G_VAL(src_ptr) - (g1 << 4)) >= dith ) && (g1 < 0x0f)) g1++; if (((B_VAL(src_ptr) - (b1 << 4)) >= dith ) && (b1 < 0x0f)) b1++; #endif CONVERT_LOOP2_INC_ROT_90(); r2 = (R_VAL(src_ptr)) >> 4; g2 = (G_VAL(src_ptr)) >> 4; b2 = (B_VAL(src_ptr)) >> 4; #ifndef BUILD_NO_DITHER_MASK dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(4); if (((R_VAL(src_ptr) - (r2 << 4)) >= dith ) && (r2 < 0x0f)) r2++; if (((G_VAL(src_ptr) - (g2 << 4)) >= dith ) && (g2 < 0x0f)) g2++; if (((B_VAL(src_ptr) - (b2 << 4)) >= dith ) && (b2 < 0x0f)) b2++; #endif #ifndef WORDS_BIGENDIAN *((DATA32 *)dst_ptr) = (r2 << 24) | (g2 << 20) | (b2 << 16) | (r1 << 8 ) | (g1 << 4 ) | (b1 ); #else *((DATA32 *)dst_ptr) = (r1 << 24) | (g1 << 20) | (b1 << 16) | (r2 << 8 ) | (g2 << 4 ) | (b2 ); #endif CONVERT_LOOP2_END_ROT_90(); return; (void)pal; } #endif #endif #ifdef BUILD_CONVERT_16_RGB_444 #ifdef BUILD_CONVERT_16_RGB_ROT90 void evas_common_convert_rgba_to_16bpp_rgb_444_dith_rot_90 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal) { DATA32 *src_ptr; DATA16 *dst_ptr; int x, y; DATA8 r, g, b; #ifndef BUILD_NO_DITHER_MASK DATA8 dith; #endif dst_ptr = (DATA16 *)dst; CONVERT_LOOP_START_ROT_90(); r = (R_VAL(src_ptr)) >> 4; g = (G_VAL(src_ptr)) >> 4; b = (B_VAL(src_ptr)) >> 4; #ifndef BUILD_NO_DITHER_MASK dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(4); if (((R_VAL(src_ptr) - (r << 4)) >= dith ) && (r < 0x0f)) r++; if (((G_VAL(src_ptr) - (g << 4)) >= dith ) && (g < 0x0f)) g++; if (((B_VAL(src_ptr) - (b << 4)) >= dith ) && (b < 0x0f)) b++; #endif *dst_ptr = (r << 8) | (g << 4) | (b); CONVERT_LOOP_END_ROT_90(); return; (void)pal; } #endif #endif #ifdef BUILD_CONVERT_16_RGB_454645 #ifdef BUILD_CONVERT_16_RGB_ROT0 void evas_common_convert_rgba2_to_16bpp_rgb_454645_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal) { DATA32 *src_ptr; DATA16 *dst_ptr; int x, y; DATA8 r1, g1, b1; DATA8 r2, g2, b2; #ifndef BUILD_NO_DITHER_MASK DATA8 dith; #endif dst_ptr = (DATA16 *)dst; CONVERT_LOOP2_START_ROT_0(); r1 = (R_VAL(src_ptr)) >> 4; g1 = (G_VAL(src_ptr)) >> 4; b1 = (B_VAL(src_ptr)) >> 4; #ifndef BUILD_NO_DITHER_MASK dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(4); if (((R_VAL(src_ptr) - (r1 << 4)) >= dith ) && (r1 < 0x0f)) r1++; if (((G_VAL(src_ptr) - (g1 << 4)) >= dith ) && (g1 < 0x0f)) g1++; if (((B_VAL(src_ptr) - (b1 << 4)) >= dith ) && (b1 < 0x0f)) b1++; #endif CONVERT_LOOP2_INC_ROT_0(); r2 = (R_VAL(src_ptr)) >> 4; g2 = (G_VAL(src_ptr)) >> 4; b2 = (B_VAL(src_ptr)) >> 4; #ifndef BUILD_NO_DITHER_MASK dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(4); if (((R_VAL(src_ptr) - (r2 << 4)) >= dith ) && (r2 < 0x0f)) r2++; if (((G_VAL(src_ptr) - (g2 << 4)) >= dith ) && (g2 < 0x0f)) g2++; if (((B_VAL(src_ptr) - (b2 << 4)) >= dith ) && (b2 < 0x0f)) b2++; #endif #ifndef WORDS_BIGENDIAN *((DATA32 *)dst_ptr) = (r2 << 28) | (g2 << 23) | (b2 << 17) | (r1 << 12) | (g1 << 7 ) | (b1 << 1 ); #else *((DATA32 *)dst_ptr) = (r1 << 28) | (g1 << 23) | (b1 << 17) | (r2 << 12) | (g2 << 7 ) | (b2 << 1 ); #endif CONVERT_LOOP2_END_ROT_0(); return; (void)pal; } #endif #endif #ifdef BUILD_CONVERT_16_RGB_454645 #ifdef BUILD_CONVERT_16_RGB_ROT0 void evas_common_convert_rgba_to_16bpp_rgb_454645_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal) { DATA32 *src_ptr; DATA16 *dst_ptr; int x, y; DATA8 r, g, b; #ifndef BUILD_NO_DITHER_MASK DATA8 dith; #endif dst_ptr = (DATA16 *)dst; CONVERT_LOOP_START_ROT_0(); r = (R_VAL(src_ptr)) >> 4; g = (G_VAL(src_ptr)) >> 4; b = (B_VAL(src_ptr)) >> 4; #ifndef BUILD_NO_DITHER_MASK dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(4); if (((R_VAL(src_ptr) - (r << 4)) >= dith ) && (r < 0x0f)) r++; if (((G_VAL(src_ptr) - (g << 4)) >= dith ) && (g < 0x0f)) g++; if (((B_VAL(src_ptr) - (b << 4)) >= dith ) && (b < 0x0f)) b++; #endif *dst_ptr = (r << 12) | (g << 7) | (b << 1); CONVERT_LOOP_END_ROT_0(); return; (void)pal; } #endif #endif #ifdef BUILD_CONVERT_16_RGB_454645 #ifdef BUILD_CONVERT_16_RGB_ROT180 void evas_common_convert_rgba2_to_16bpp_rgb_454645_dith_rot_180 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal) { DATA32 *src_ptr; DATA16 *dst_ptr; int x, y; DATA8 r1, g1, b1; DATA8 r2, g2, b2; #ifndef BUILD_NO_DITHER_MASK DATA8 dith; #endif dst_ptr = (DATA16 *)dst; CONVERT_LOOP2_START_ROT_180(); r1 = (R_VAL(src_ptr)) >> 4; g1 = (G_VAL(src_ptr)) >> 4; b1 = (B_VAL(src_ptr)) >> 4; #ifndef BUILD_NO_DITHER_MASK dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(4); if (((R_VAL(src_ptr) - (r1 << 4)) >= dith ) && (r1 < 0x0f)) r1++; if (((G_VAL(src_ptr) - (g1 << 4)) >= dith ) && (g1 < 0x0f)) g1++; if (((B_VAL(src_ptr) - (b1 << 4)) >= dith ) && (b1 < 0x0f)) b1++; #endif CONVERT_LOOP2_INC_ROT_180(); r2 = (R_VAL(src_ptr)) >> 4; g2 = (G_VAL(src_ptr)) >> 4; b2 = (B_VAL(src_ptr)) >> 4; #ifndef BUILD_NO_DITHER_MASK dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(4); if (((R_VAL(src_ptr) - (r2 << 4)) >= dith ) && (r2 < 0x0f)) r2++; if (((G_VAL(src_ptr) - (g2 << 4)) >= dith ) && (g2 < 0x0f)) g2++; if (((B_VAL(src_ptr) - (b2 << 4)) >= dith ) && (b2 < 0x0f)) b2++; #endif #ifndef WORDS_BIGENDIAN *((DATA32 *)dst_ptr) = (r2 << 28) | (g2 << 23) | (b2 << 17) | (r1 << 12) | (g1 << 7 ) | (b1 << 1 ); #else *((DATA32 *)dst_ptr) = (r1 << 28) | (g1 << 23) | (b1 << 17) | (r2 << 12) | (g2 << 7 ) | (b2 << 1 ); #endif CONVERT_LOOP2_END_ROT_180(); return; (void)pal; } #endif #endif #ifdef BUILD_CONVERT_16_RGB_454645 #ifdef BUILD_CONVERT_16_RGB_ROT180 void evas_common_convert_rgba_to_16bpp_rgb_454645_dith_rot_180 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal) { DATA32 *src_ptr; DATA16 *dst_ptr; int x, y; DATA8 r, g, b; #ifndef BUILD_NO_DITHER_MASK DATA8 dith; #endif dst_ptr = (DATA16 *)dst; CONVERT_LOOP_START_ROT_180(); r = (R_VAL(src_ptr)) >> 4; g = (G_VAL(src_ptr)) >> 4; b = (B_VAL(src_ptr)) >> 4; #ifndef BUILD_NO_DITHER_MASK dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(4); if (((R_VAL(src_ptr) - (r << 4)) >= dith ) && (r < 0x0f)) r++; if (((G_VAL(src_ptr) - (g << 4)) >= dith ) && (g < 0x0f)) g++; if (((B_VAL(src_ptr) - (b << 4)) >= dith ) && (b < 0x0f)) b++; #endif *dst_ptr = (r << 12) | (g << 7) | (b << 1); CONVERT_LOOP_END_ROT_180(); return; (void)pal; } #endif #endif #ifdef BUILD_CONVERT_16_RGB_454645 #ifdef BUILD_CONVERT_16_RGB_ROT270 void evas_common_convert_rgba2_to_16bpp_rgb_454645_dith_rot_270 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal) { DATA32 *src_ptr; DATA16 *dst_ptr; int x, y; DATA8 r1, g1, b1; DATA8 r2, g2, b2; #ifndef BUILD_NO_DITHER_MASK DATA8 dith; #endif dst_ptr = (DATA16 *)dst; CONVERT_LOOP2_START_ROT_270(); r1 = (R_VAL(src_ptr)) >> 4; g1 = (G_VAL(src_ptr)) >> 4; b1 = (B_VAL(src_ptr)) >> 4; #ifndef BUILD_NO_DITHER_MASK dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(4); if (((R_VAL(src_ptr) - (r1 << 4)) >= dith ) && (r1 < 0x0f)) r1++; if (((G_VAL(src_ptr) - (g1 << 4)) >= dith ) && (g1 < 0x0f)) g1++; if (((B_VAL(src_ptr) - (b1 << 4)) >= dith ) && (b1 < 0x0f)) b1++; #endif CONVERT_LOOP2_INC_ROT_270(); r2 = (R_VAL(src_ptr)) >> 4; g2 = (G_VAL(src_ptr)) >> 4; b2 = (B_VAL(src_ptr)) >> 4; #ifndef BUILD_NO_DITHER_MASK dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(4); if (((R_VAL(src_ptr) - (r2 << 4)) >= dith ) && (r2 < 0x0f)) r2++; if (((G_VAL(src_ptr) - (g2 << 4)) >= dith ) && (g2 < 0x0f)) g2++; if (((B_VAL(src_ptr) - (b2 << 4)) >= dith ) && (b2 < 0x0f)) b2++; #endif #ifndef WORDS_BIGENDIAN *((DATA32 *)dst_ptr) = (r2 << 28) | (g2 << 23) | (b2 << 17) | (r1 << 12) | (g1 << 7 ) | (b1 << 1 ); #else *((DATA32 *)dst_ptr) = (r1 << 28) | (g1 << 23) | (b1 << 17) | (r2 << 12) | (g2 << 7 ) | (b2 << 1 ); #endif CONVERT_LOOP2_END_ROT_270(); return; (void)pal; } #endif #endif #ifdef BUILD_CONVERT_16_RGB_454645 #ifdef BUILD_CONVERT_16_RGB_ROT270 void evas_common_convert_rgba_to_16bpp_rgb_454645_dith_rot_270 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal) { DATA32 *src_ptr; DATA16 *dst_ptr; int x, y; DATA8 r, g, b; #ifndef BUILD_NO_DITHER_MASK DATA8 dith; #endif dst_ptr = (DATA16 *)dst; CONVERT_LOOP_START_ROT_270(); r = (R_VAL(src_ptr)) >> 4; g = (G_VAL(src_ptr)) >> 4; b = (B_VAL(src_ptr)) >> 4; #ifndef BUILD_NO_DITHER_MASK dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(4); if (((R_VAL(src_ptr) - (r << 4)) >= dith ) && (r < 0x0f)) r++; if (((G_VAL(src_ptr) - (g << 4)) >= dith ) && (g < 0x0f)) g++; if (((B_VAL(src_ptr) - (b << 4)) >= dith ) && (b < 0x0f)) b++; #endif *dst_ptr = (r << 12) | (g << 7) | (b << 1); CONVERT_LOOP_END_ROT_270(); return; (void)pal; } #endif #endif #ifdef BUILD_CONVERT_16_RGB_454645 #ifdef BUILD_CONVERT_16_RGB_ROT90 void evas_common_convert_rgba2_to_16bpp_rgb_454645_dith_rot_90 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal) { DATA32 *src_ptr; DATA16 *dst_ptr; int x, y; DATA8 r1, g1, b1; DATA8 r2, g2, b2; #ifndef BUILD_NO_DITHER_MASK DATA8 dith; #endif dst_ptr = (DATA16 *)dst; CONVERT_LOOP2_START_ROT_90(); r1 = (R_VAL(src_ptr)) >> 4; g1 = (G_VAL(src_ptr)) >> 4; b1 = (B_VAL(src_ptr)) >> 4; #ifndef BUILD_NO_DITHER_MASK dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(4); if (((R_VAL(src_ptr) - (r1 << 4)) >= dith ) && (r1 < 0x0f)) r1++; if (((G_VAL(src_ptr) - (g1 << 4)) >= dith ) && (g1 < 0x0f)) g1++; if (((B_VAL(src_ptr) - (b1 << 4)) >= dith ) && (b1 < 0x0f)) b1++; #endif CONVERT_LOOP2_INC_ROT_90(); r2 = (R_VAL(src_ptr)) >> 4; g2 = (G_VAL(src_ptr)) >> 4; b2 = (B_VAL(src_ptr)) >> 4; #ifndef BUILD_NO_DITHER_MASK dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(4); if (((R_VAL(src_ptr) - (r2 << 4)) >= dith ) && (r2 < 0x0f)) r2++; if (((G_VAL(src_ptr) - (g2 << 4)) >= dith ) && (g2 < 0x0f)) g2++; if (((B_VAL(src_ptr) - (b2 << 4)) >= dith ) && (b2 < 0x0f)) b2++; #endif #ifndef WORDS_BIGENDIAN *((DATA32 *)dst_ptr) = (r2 << 28) | (g2 << 23) | (b2 << 17) | (r1 << 12) | (g1 << 7 ) | (b1 << 1 ); #else *((DATA32 *)dst_ptr) = (r1 << 28) | (g1 << 23) | (b1 << 17) | (r2 << 12) | (g2 << 7 ) | (b2 << 1 ); #endif CONVERT_LOOP2_END_ROT_90(); return; (void)pal; } #endif #endif #ifdef BUILD_CONVERT_16_RGB_454645 #ifdef BUILD_CONVERT_16_RGB_ROT90 void evas_common_convert_rgba_to_16bpp_rgb_454645_dith_rot_90 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal) { DATA32 *src_ptr; DATA16 *dst_ptr; int x, y; DATA8 r, g, b; #ifndef BUILD_NO_DITHER_MASK DATA8 dith; #endif dst_ptr = (DATA16 *)dst; CONVERT_LOOP_START_ROT_90(); r = (R_VAL(src_ptr)) >> 4; g = (G_VAL(src_ptr)) >> 4; b = (B_VAL(src_ptr)) >> 4; #ifndef BUILD_NO_DITHER_MASK dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(4); if (((R_VAL(src_ptr) - (r << 4)) >= dith ) && (r < 0x0f)) r++; if (((G_VAL(src_ptr) - (g << 4)) >= dith ) && (g < 0x0f)) g++; if (((B_VAL(src_ptr) - (b << 4)) >= dith ) && (b < 0x0f)) b++; #endif *dst_ptr = (r << 12) | (g << 7) | (b << 1); CONVERT_LOOP_END_ROT_90(); return; (void)pal; } #endif #endif #ifdef BUILD_CONVERT_16_RGB_555 #ifdef BUILD_CONVERT_16_RGB_ROT0 void evas_common_convert_rgba2_to_16bpp_rgb_555_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal) { DATA32 *src_ptr; DATA16 *dst_ptr; int x, y; DATA8 r1, g1, b1; DATA8 r2, g2, b2; #ifndef BUILD_NO_DITHER_MASK DATA8 dith; #endif dst_ptr = (DATA16 *)dst; CONVERT_LOOP2_START_ROT_0(); r1 = (R_VAL(src_ptr)) >> 3; g1 = (G_VAL(src_ptr)) >> 3; b1 = (B_VAL(src_ptr)) >> 3; #ifndef BUILD_NO_DITHER_MASK dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5); if (((R_VAL(src_ptr) - (r1 << 3)) >= dith) && (r1 < 0x1f)) r1++; if (((G_VAL(src_ptr) - (g1 << 3)) >= dith) && (g1 < 0x1f)) g1++; if (((B_VAL(src_ptr) - (b1 << 3)) >= dith) && (b1 < 0x1f)) b1++; #endif CONVERT_LOOP2_INC_ROT_0(); r2 = (R_VAL(src_ptr)) >> 3; g2 = (G_VAL(src_ptr)) >> 3; b2 = (B_VAL(src_ptr)) >> 3; #ifndef BUILD_NO_DITHER_MASK dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5); if (((R_VAL(src_ptr) - (r2 << 3)) >= dith) && (r2 < 0x1f)) r2++; if (((G_VAL(src_ptr) - (g2 << 3)) >= dith) && (g2 < 0x1f)) g2++; if (((B_VAL(src_ptr) - (b2 << 3)) >= dith) && (b2 < 0x1f)) b2++; #endif #ifndef WORDS_BIGENDIAN *((DATA32 *)dst_ptr) = (r2 << 26) | (g2 << 21) | (b2 << 16) | (r1 << 10) | (g1 << 5 ) | (b1 ); #else *((DATA32 *)dst_ptr) = (r1 << 26) | (g1 << 21) | (b1 << 16) | (r2 << 10) | (g2 << 5 ) | (b2 ); #endif CONVERT_LOOP2_END_ROT_0(); return; (void)pal; } #endif #endif #ifdef BUILD_CONVERT_16_RGB_555 #ifdef BUILD_CONVERT_16_RGB_ROT0 void evas_common_convert_rgba_to_16bpp_rgb_555_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal) { DATA32 *src_ptr; DATA16 *dst_ptr; int x, y; DATA8 r, g, b; #ifndef BUILD_NO_DITHER_MASK DATA8 dith; #endif dst_ptr = (DATA16 *)dst; CONVERT_LOOP_START_ROT_0(); r = (R_VAL(src_ptr)) >> 3; g = (G_VAL(src_ptr)) >> 3; b = (B_VAL(src_ptr)) >> 3; #ifndef BUILD_NO_DITHER_MASK dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5); if (((R_VAL(src_ptr) - (r << 3)) >= dith) && (r < 0x1f)) r++; if (((G_VAL(src_ptr) - (g << 3)) >= dith) && (g < 0x1f)) g++; if (((B_VAL(src_ptr) - (b << 3)) >= dith) && (b < 0x1f)) b++; #endif *dst_ptr = (r << 10) | (g << 5) | (b); CONVERT_LOOP_END_ROT_0(); return; (void)pal; } #endif #endif #ifdef BUILD_CONVERT_16_RGB_555 #ifdef BUILD_CONVERT_16_RGB_ROT180 void evas_common_convert_rgba2_to_16bpp_rgb_555_dith_rot_180 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal) { DATA32 *src_ptr; DATA16 *dst_ptr; int x, y; DATA8 r1, g1, b1; DATA8 r2, g2, b2; #ifndef BUILD_NO_DITHER_MASK DATA8 dith; #endif dst_ptr = (DATA16 *)dst; CONVERT_LOOP2_START_ROT_180(); r1 = (R_VAL(src_ptr)) >> 3; g1 = (G_VAL(src_ptr)) >> 3; b1 = (B_VAL(src_ptr)) >> 3; #ifndef BUILD_NO_DITHER_MASK dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5); if (((R_VAL(src_ptr) - (r1 << 3)) >= dith) && (r1 < 0x1f)) r1++; if (((G_VAL(src_ptr) - (g1 << 3)) >= dith) && (g1 < 0x1f)) g1++; if (((B_VAL(src_ptr) - (b1 << 3)) >= dith) && (b1 < 0x1f)) b1++; #endif CONVERT_LOOP2_INC_ROT_180(); r2 = (R_VAL(src_ptr)) >> 3; g2 = (G_VAL(src_ptr)) >> 3; b2 = (B_VAL(src_ptr)) >> 3; #ifndef BUILD_NO_DITHER_MASK dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5); if (((R_VAL(src_ptr) - (r2 << 3)) >= dith) && (r2 < 0x1f)) r2++; if (((G_VAL(src_ptr) - (g2 << 3)) >= dith) && (g2 < 0x1f)) g2++; if (((B_VAL(src_ptr) - (b2 << 3)) >= dith) && (b2 < 0x1f)) b2++; #endif #ifndef WORDS_BIGENDIAN *((DATA32 *)dst_ptr) = (r2 << 26) | (g2 << 21) | (b2 << 16) | (r1 << 10) | (g1 << 5 ) | (b1 ); #else *((DATA32 *)dst_ptr) = (r1 << 26) | (g1 << 21) | (b1 << 16) | (r2 << 10) | (g2 << 5 ) | (b2 ); #endif CONVERT_LOOP2_END_ROT_180(); return; (void)pal; } #endif #endif #ifdef BUILD_CONVERT_16_RGB_555 #ifdef BUILD_CONVERT_16_RGB_ROT180 void evas_common_convert_rgba_to_16bpp_rgb_555_dith_rot_180 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal) { DATA32 *src_ptr; DATA16 *dst_ptr; int x, y; DATA8 r, g, b; #ifndef BUILD_NO_DITHER_MASK DATA8 dith; #endif dst_ptr = (DATA16 *)dst; CONVERT_LOOP_START_ROT_180(); r = (R_VAL(src_ptr)) >> 3; g = (G_VAL(src_ptr)) >> 3; b = (B_VAL(src_ptr)) >> 3; #ifndef BUILD_NO_DITHER_MASK dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5); if (((R_VAL(src_ptr) - (r << 3)) >= dith) && (r < 0x1f)) r++; if (((G_VAL(src_ptr) - (g << 3)) >= dith) && (g < 0x1f)) g++; if (((B_VAL(src_ptr) - (b << 3)) >= dith) && (b < 0x1f)) b++; #endif *dst_ptr = (r << 10) | (g << 5) | (b); CONVERT_LOOP_END_ROT_180(); return; (void)pal; } #endif #endif #ifdef BUILD_CONVERT_16_RGB_555 #ifdef BUILD_CONVERT_16_RGB_ROT270 void evas_common_convert_rgba2_to_16bpp_rgb_555_dith_rot_270 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal) { DATA32 *src_ptr; DATA16 *dst_ptr; int x, y; DATA8 r1, g1, b1; DATA8 r2, g2, b2; #ifndef BUILD_NO_DITHER_MASK DATA8 dith; #endif dst_ptr = (DATA16 *)dst; CONVERT_LOOP2_START_ROT_270(); r1 = (R_VAL(src_ptr)) >> 3; g1 = (G_VAL(src_ptr)) >> 3; b1 = (B_VAL(src_ptr)) >> 3; #ifndef BUILD_NO_DITHER_MASK dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5); if (((R_VAL(src_ptr) - (r1 << 3)) >= dith) && (r1 < 0x1f)) r1++; if (((G_VAL(src_ptr) - (g1 << 3)) >= dith) && (g1 < 0x1f)) g1++; if (((B_VAL(src_ptr) - (b1 << 3)) >= dith) && (b1 < 0x1f)) b1++; #endif CONVERT_LOOP2_INC_ROT_270(); r2 = (R_VAL(src_ptr)) >> 3; g2 = (G_VAL(src_ptr)) >> 3; b2 = (B_VAL(src_ptr)) >> 3; #ifndef BUILD_NO_DITHER_MASK dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5); if (((R_VAL(src_ptr) - (r2 << 3)) >= dith) && (r2 < 0x1f)) r2++; if (((G_VAL(src_ptr) - (g2 << 3)) >= dith) && (g2 < 0x1f)) g2++; if (((B_VAL(src_ptr) - (b2 << 3)) >= dith) && (b2 < 0x1f)) b2++; #endif #ifndef WORDS_BIGENDIAN *((DATA32 *)dst_ptr) = (r2 << 26) | (g2 << 21) | (b2 << 16) | (r1 << 10) | (g1 << 5 ) | (b1 ); #else *((DATA32 *)dst_ptr) = (r1 << 26) | (g1 << 21) | (b1 << 16) | (r2 << 10) | (g2 << 5 ) | (b2 ); #endif CONVERT_LOOP2_END_ROT_270(); return; (void)pal; } #endif #endif #ifdef BUILD_CONVERT_16_RGB_555 #ifdef BUILD_CONVERT_16_RGB_ROT270 void evas_common_convert_rgba_to_16bpp_rgb_555_dith_rot_270 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal) { DATA32 *src_ptr; DATA16 *dst_ptr; int x, y; DATA8 r, g, b; #ifndef BUILD_NO_DITHER_MASK DATA8 dith; #endif dst_ptr = (DATA16 *)dst; CONVERT_LOOP_START_ROT_270(); r = (R_VAL(src_ptr)) >> 3; g = (G_VAL(src_ptr)) >> 3; b = (B_VAL(src_ptr)) >> 3; #ifndef BUILD_NO_DITHER_MASK dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5); if (((R_VAL(src_ptr) - (r << 3)) >= dith) && (r < 0x1f)) r++; if (((G_VAL(src_ptr) - (g << 3)) >= dith) && (g < 0x1f)) g++; if (((B_VAL(src_ptr) - (b << 3)) >= dith) && (b < 0x1f)) b++; #endif *dst_ptr = (r << 10) | (g << 5) | (b); CONVERT_LOOP_END_ROT_270(); return; (void)pal; } #endif #endif #ifdef BUILD_CONVERT_16_RGB_555 #ifdef BUILD_CONVERT_16_RGB_ROT90 void evas_common_convert_rgba2_to_16bpp_rgb_555_dith_rot_90 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal) { DATA32 *src_ptr; DATA16 *dst_ptr; int x, y; DATA8 r1, g1, b1; DATA8 r2, g2, b2; #ifndef BUILD_NO_DITHER_MASK DATA8 dith; #endif dst_ptr = (DATA16 *)dst; CONVERT_LOOP2_START_ROT_90(); r1 = (R_VAL(src_ptr)) >> 3; g1 = (G_VAL(src_ptr)) >> 3; b1 = (B_VAL(src_ptr)) >> 3; #ifndef BUILD_NO_DITHER_MASK dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5); if (((R_VAL(src_ptr) - (r1 << 3)) >= dith) && (r1 < 0x1f)) r1++; if (((G_VAL(src_ptr) - (g1 << 3)) >= dith) && (g1 < 0x1f)) g1++; if (((B_VAL(src_ptr) - (b1 << 3)) >= dith) && (b1 < 0x1f)) b1++; #endif CONVERT_LOOP2_INC_ROT_90(); r2 = (R_VAL(src_ptr)) >> 3; g2 = (G_VAL(src_ptr)) >> 3; b2 = (B_VAL(src_ptr)) >> 3; #ifndef BUILD_NO_DITHER_MASK dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5); if (((R_VAL(src_ptr) - (r2 << 3)) >= dith) && (r2 < 0x1f)) r2++; if (((G_VAL(src_ptr) - (g2 << 3)) >= dith) && (g2 < 0x1f)) g2++; if (((B_VAL(src_ptr) - (b2 << 3)) >= dith) && (b2 < 0x1f)) b2++; #endif #ifndef WORDS_BIGENDIAN *((DATA32 *)dst_ptr) = (r2 << 26) | (g2 << 21) | (b2 << 16) | (r1 << 10) | (g1 << 5 ) | (b1 ); #else *((DATA32 *)dst_ptr) = (r1 << 26) | (g1 << 21) | (b1 << 16) | (r2 << 10) | (g2 << 5 ) | (b2 ); #endif CONVERT_LOOP2_END_ROT_90(); return; (void)pal; } #endif #endif #ifdef BUILD_CONVERT_16_RGB_555 #ifdef BUILD_CONVERT_16_RGB_ROT90 void evas_common_convert_rgba_to_16bpp_rgb_555_dith_rot_90 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal) { DATA32 *src_ptr; DATA16 *dst_ptr; int x, y; DATA8 r, g, b; #ifndef BUILD_NO_DITHER_MASK DATA8 dith; #endif dst_ptr = (DATA16 *)dst; CONVERT_LOOP_START_ROT_90(); r = (R_VAL(src_ptr)) >> 3; g = (G_VAL(src_ptr)) >> 3; b = (B_VAL(src_ptr)) >> 3; #ifndef BUILD_NO_DITHER_MASK dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5); if (((R_VAL(src_ptr) - (r << 3)) >= dith) && (r < 0x1f)) r++; if (((G_VAL(src_ptr) - (g << 3)) >= dith) && (g < 0x1f)) g++; if (((B_VAL(src_ptr) - (b << 3)) >= dith) && (b < 0x1f)) b++; #endif *dst_ptr = (r << 10) | (g << 5) | (b); CONVERT_LOOP_END_ROT_90(); return; (void)pal; } #endif #endif evas-1.7.9/src/lib/engines/common/evas_font_ot.h0000664000175000017500000000166012175475547016551 00000000000000#ifndef _EVAS_FONT_OT_H # define _EVAS_FONT_OT_H # ifdef HAVE_CONFIG_H # include "config.h" # endif # ifdef HAVE_HARFBUZZ # define OT_SUPPORT # define USE_HARFBUZZ # endif # ifdef OT_SUPPORT # include typedef struct _Evas_Font_OT_Info Evas_Font_OT_Info; # else typedef void *Evas_Font_OT_Info; # endif # include "Evas.h" # ifdef OT_SUPPORT struct _Evas_Font_OT_Info { size_t source_cluster; Evas_Coord x_offset; Evas_Coord y_offset; }; # endif # ifdef OT_SUPPORT # define EVAS_FONT_OT_X_OFF_GET(a) ((a).x_offset) # define EVAS_FONT_OT_Y_OFF_GET(a) ((a).y_offset) # define EVAS_FONT_OT_POS_GET(a) ((a).source_cluster) # endif # include "evas_text_utils.h" EAPI int evas_common_font_ot_cluster_size_get(const Evas_Text_Props *props, size_t char_index); EAPI Eina_Bool evas_common_font_ot_populate_text_props(const Eina_Unicode *text, Evas_Text_Props *props, int len, Evas_Text_Props_Mode mode); #endif evas-1.7.9/src/lib/engines/common/evas_draw.h0000664000175000017500000000606612175475547016043 00000000000000#ifndef _EVAS_DRAW_H #define _EVAS_DRAW_H EAPI void evas_common_draw_init (void); EAPI RGBA_Draw_Context *evas_common_draw_context_new (void); EAPI void evas_common_draw_context_free (RGBA_Draw_Context *dc); EAPI void evas_common_draw_context_font_ext_set (RGBA_Draw_Context *dc, void *data, void *(*gl_new) (void *data, RGBA_Font_Glyph *fg), void (*gl_free) (void *ext_dat), void (*gl_draw) (void *data, void *dest, void *context, RGBA_Font_Glyph *fg, int x, int y)); EAPI void evas_common_draw_context_clip_clip (RGBA_Draw_Context *dc, int x, int y, int w, int h); EAPI void evas_common_draw_context_set_clip (RGBA_Draw_Context *dc, int x, int y, int w, int h); EAPI void evas_common_draw_context_unset_clip (RGBA_Draw_Context *dc); EAPI void evas_common_draw_context_set_color (RGBA_Draw_Context *dc, int r, int g, int b, int a); EAPI void evas_common_draw_context_set_multiplier (RGBA_Draw_Context *dc, int r, int g, int b, int a); EAPI void evas_common_draw_context_unset_multiplier (RGBA_Draw_Context *dc); EAPI void evas_common_draw_context_set_mask (RGBA_Draw_Context *dc, RGBA_Image *im, int x, int y, int w, int h); EAPI void evas_common_draw_context_unset_mask (RGBA_Draw_Context *dc); EAPI Cutout_Rects *evas_common_draw_context_cutouts_new (void); EAPI void evas_common_draw_context_cutouts_free (Cutout_Rects* rects); EAPI void evas_common_draw_context_cutouts_del (Cutout_Rects* rects, int idx); EAPI void evas_common_draw_context_add_cutout (RGBA_Draw_Context *dc, int x, int y, int w, int h); EAPI void evas_common_draw_context_clear_cutouts (RGBA_Draw_Context *dc); EAPI Cutout_Rects *evas_common_draw_context_apply_cutouts (RGBA_Draw_Context *dc, Cutout_Rects *recycle); EAPI void evas_common_draw_context_apply_clear_cutouts (Cutout_Rects* rects); EAPI void evas_common_draw_context_apply_clean_cutouts (Cutout_Rects* rects); EAPI void evas_common_draw_context_set_anti_alias (RGBA_Draw_Context *dc, unsigned char aa); EAPI void evas_common_draw_context_set_color_interpolation (RGBA_Draw_Context *dc, int color_space); EAPI void evas_common_draw_context_set_render_op (RGBA_Draw_Context *dc, int op); EAPI void evas_common_draw_context_set_sli (RGBA_Draw_Context *dc, int y, int h); #endif /* _EVAS_DRAW_H */ evas-1.7.9/src/lib/engines/common/evas_map_image.h0000664000175000017500000000127612175475547017023 00000000000000#ifndef _EVAS_MAP_H #define _EVAS_MAP_H EAPI void evas_common_map_rgba(RGBA_Image *src, RGBA_Image *dst, RGBA_Draw_Context *dc, int npoints, RGBA_Map_Point *points, int smooth, int level); EAPI Eina_Bool evas_common_map_rgba_prepare(RGBA_Image *src, RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Map *m); EAPI void evas_common_map_rgba_do(const Eina_Rectangle *clip, RGBA_Image *src, RGBA_Image *dst, RGBA_Draw_Context *dc, const RGBA_Map *m, int smooth, int level); EAPI void evas_common_map_rgba_clean(RGBA_Map *m); #endif /* _EVAS_MAP_H */ evas-1.7.9/src/lib/engines/common/evas_polygon_main.c0000664000175000017500000002047712175475547017576 00000000000000#ifdef HAVE_CONFIG_H # include #endif #include #include "evas_common.h" #include "evas_blend_private.h" typedef struct _RGBA_Span RGBA_Span; typedef struct _RGBA_Edge RGBA_Edge; typedef struct _RGBA_Vertex RGBA_Vertex; struct _RGBA_Span { EINA_INLIST; int x, y, w; }; struct _RGBA_Edge { double x, dx; int i; }; struct _RGBA_Vertex { double x, y; int i; }; #define POLY_EDGE_DEL(_i) \ { \ int _j; \ \ for (_j = 0; (_j < num_active_edges) && (edges[_j].i != _i); _j++); \ if (_j < num_active_edges) \ { \ num_active_edges--; \ memmove(&(edges[_j]), &(edges[_j + 1]), \ (num_active_edges - _j) * sizeof(RGBA_Edge)); \ } \ } #define POLY_EDGE_ADD(_i, _y) \ { \ int _j; \ float _dx; \ RGBA_Vertex *_p, *_q; \ if (_i < (n - 1)) _j = _i + 1; \ else _j = 0; \ if (point[_i].y < point[_j].y) \ { \ _p = &(point[_i]); \ _q = &(point[_j]); \ } \ else \ { \ _p = &(point[_j]); \ _q = &(point[_i]); \ } \ edges[num_active_edges].dx = _dx = (_q->x - _p->x) / (_q->y - _p->y); \ edges[num_active_edges].x = (_dx * ((float)_y + 0.5 - _p->y)) + _p->x; \ edges[num_active_edges].i = _i; \ num_active_edges++; \ } EAPI void evas_common_polygon_init(void) { } EAPI RGBA_Polygon_Point * evas_common_polygon_point_add(RGBA_Polygon_Point *points, int x, int y) { RGBA_Polygon_Point *pt; pt = malloc(sizeof(RGBA_Polygon_Point)); if (!pt) return points; pt->x = x; pt->y = y; points = (RGBA_Polygon_Point *)eina_inlist_append(EINA_INLIST_GET(points), EINA_INLIST_GET(pt)); return points; } EAPI RGBA_Polygon_Point * evas_common_polygon_points_clear(RGBA_Polygon_Point *points) { if (points) { while (points) { RGBA_Polygon_Point *old_p; old_p = points; points = (RGBA_Polygon_Point *)eina_inlist_remove(EINA_INLIST_GET(points), EINA_INLIST_GET(points)); free(old_p); } } return NULL; } static int polygon_point_sorter(const void *a, const void *b) { RGBA_Vertex *p, *q; p = (RGBA_Vertex *)a; q = (RGBA_Vertex *)b; if (p->y <= q->y) return -1; return 1; } static int polygon_edge_sorter(const void *a, const void *b) { RGBA_Edge *p, *q; p = (RGBA_Edge *)a; q = (RGBA_Edge *)b; if (p->x <= q->x) return -1; return 1; } EAPI void evas_common_polygon_draw(RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Polygon_Point *points, int x, int y) { RGBA_Gfx_Func func; RGBA_Polygon_Point *pt; RGBA_Vertex *point; RGBA_Edge *edges; Eina_Inlist *spans; int num_active_edges; int n; int i, j, k; int yy0, yy1, yi; int ext_x, ext_y, ext_w, ext_h; int *sorted_index; #ifdef HAVE_PIXMAN # ifdef PIXMAN_POLY pixman_op_t op = PIXMAN_OP_SRC; // _EVAS_RENDER_COPY if (dc->render_op == _EVAS_RENDER_BLEND) op = PIXMAN_OP_OVER; # endif #endif ext_x = 0; ext_y = 0; ext_w = dst->cache_entry.w; ext_h = dst->cache_entry.h; if (dc->clip.use) { if (dc->clip.x > ext_x) { ext_w += ext_x - dc->clip.x; ext_x = dc->clip.x; } if ((ext_x + ext_w) > (dc->clip.x + dc->clip.w)) { ext_w = (dc->clip.x + dc->clip.w) - ext_x; } if (dc->clip.y > ext_y) { ext_h += ext_y - dc->clip.y; ext_y = dc->clip.y; } if ((ext_y + ext_h) > (dc->clip.y + dc->clip.h)) { ext_h = (dc->clip.y + dc->clip.h) - ext_y; } } if ((ext_w <= 0) || (ext_h <= 0)) return; evas_common_cpu_end_opt(); n = 0; EINA_INLIST_FOREACH(points, pt) n++; if (n < 3) return; edges = malloc(sizeof(RGBA_Edge) * n); if (!edges) return; point = malloc(sizeof(RGBA_Vertex) * n); if (!point) { free(edges); return; } sorted_index = malloc(sizeof(int) * n); if (!sorted_index) { free(edges); free(point); return; } k = 0; EINA_INLIST_FOREACH(points, pt) { point[k].x = pt->x + x; point[k].y = pt->y + y; point[k].i = k; k++; } qsort(point, n, sizeof(RGBA_Vertex), polygon_point_sorter); for (k = 0; k < n; k++) sorted_index[k] = point[k].i; k = 0; EINA_INLIST_FOREACH(points, pt) { point[k].x = pt->x + x; point[k].y = pt->y + y; point[k].i = k; k++; } yy0 = MAX(ext_y, ceil(point[sorted_index[0]].y - 0.5)); yy1 = MIN(ext_y + ext_h - 1, floor(point[sorted_index[n - 1]].y - 0.5)); k = 0; num_active_edges = 0; spans = NULL; for (yi = yy0; yi <= yy1; yi++) { for (; (k < n) && (point[sorted_index[k]].y <= ((double)yi + 0.5)); k++) { i = sorted_index[k]; if (i > 0) j = i - 1; else j = n - 1; if (point[j].y <= ((double)yi - 0.5)) { POLY_EDGE_DEL(j) } else if (point[j].y > ((double)yi + 0.5)) { POLY_EDGE_ADD(j, yi) } if (i < (n - 1)) j = i + 1; else j = 0; if (point[j].y <= ((double)yi - 0.5)) { POLY_EDGE_DEL(i) } else if (point[j].y > ((double)yi + 0.5)) { POLY_EDGE_ADD(i, yi) } } qsort(edges, num_active_edges, sizeof(RGBA_Edge), polygon_edge_sorter); for (j = 0; j < num_active_edges; j += 2) { int x0, x1; x0 = ceil(edges[j].x - 0.5); if (j < (num_active_edges - 1)) x1 = floor(edges[j + 1].x - 0.5); else x1 = x0; if ((x1 >= ext_x) && (x0 < (ext_x + ext_w)) && (x0 <= x1)) { RGBA_Span *span; if (x0 < ext_x) x0 = ext_x; if (x1 >= (ext_x + ext_w)) x1 = ext_x + ext_w - 1; span = malloc(sizeof(RGBA_Span)); spans = eina_inlist_append(spans, EINA_INLIST_GET(span)); span->y = yi; span->x = x0; span->w = (x1 - x0) + 1; } edges[j].x += edges[j].dx; edges[j + 1].x += edges[j + 1].dx; } } free(edges); free(point); free(sorted_index); func = evas_common_gfx_func_composite_color_span_get(dc->col.col, dst, 1, dc->render_op); if (spans) { RGBA_Span *span; EINA_INLIST_FOREACH(spans, span) { DATA32 *ptr; #ifdef HAVE_PIXMAN # ifdef PIXMAN_POLY if ((dst->pixman.im) && (dc->col.pixman_color_image) && (!dc->mask.mask)) pixman_image_composite(op, dc->col.pixman_color_image, NULL, dst->pixman.im, span->x, span->y, 0, 0, span->x, span->y, span->w, 1); else if ((dst->pixman.im) && (dc->col.pixman_color_image) && (dc->mask.mask)) pixman_image_composite(op, dc->col.pixman_color_image, dc->mask.mask->pixman.im, dst->pixman.im, span->x, span->y, 0, 0, span->x, span->y, span->w, 1); else # endif #endif { ptr = dst->image.data + (span->y * (dst->cache_entry.w)) + span->x; func(NULL, NULL, dc->col.col, ptr, span->w); } } while (spans) { span = (RGBA_Span *)spans; spans = eina_inlist_remove(spans, spans); free(span); } } } evas-1.7.9/src/lib/engines/common/evas_font_draw.c0000664000175000017500000003277312175475547017070 00000000000000#include "evas_common.h" #include "evas_private.h" #include "evas_blend_private.h" #include "language/evas_bidi_utils.h" /*defines BIDI_SUPPORT if possible */ #include "evas_font_private.h" /* for Frame-Queuing support */ #include "evas_font_ot.h" struct _Evas_Glyph { RGBA_Font_Glyph *fg; void *data; Eina_Rectangle coord; FT_UInt idx; int j; }; EAPI void evas_common_font_draw_init(void) { } /* * BiDi handling: We receive the shaped string + other props from text_props, * we need to reorder it so we'll have the visual string (the way we draw) * and then for kerning we have to switch the order of the kerning query (as the prev * is on the right, and not on the left). */ static void evas_common_font_draw_internal(RGBA_Image *dst, RGBA_Draw_Context *dc, int x, int y, const Evas_Text_Props *text_props, RGBA_Gfx_Func func, int ext_x, int ext_y, int ext_w, int ext_h, int im_w, int im_h __UNUSED__) { DATA32 *im; Evas_Glyph *glyphs; unsigned int length; unsigned int it; im = dst->image.data; if (!text_props->glyphs) return ; glyphs = text_props->glyphs; length = text_props->glyphs_length; for (it = 0; it < length; ++it, ++glyphs) { RGBA_Font_Glyph *fg; int chr_x, chr_y; fg = glyphs->fg; /* FIXME: Why was that moved out of prepare ? This increase cache miss. */ glyphs->coord.w = fg->glyph_out->bitmap.width; glyphs->coord.h = fg->glyph_out->bitmap.rows; glyphs->j = fg->glyph_out->bitmap.pitch; glyphs->data = fg->glyph_out->bitmap.buffer; if (dc->font_ext.func.gl_new) { /* extension calls */ fg->ext_dat = dc->font_ext.func.gl_new(dc->font_ext.data, fg); fg->ext_dat_free = dc->font_ext.func.gl_free; } chr_x = x + glyphs->coord.x/* EVAS_FONT_WALK_PEN_X + EVAS_FONT_WALK_X_OFF + EVAS_FONT_WALK_X_BEAR */; chr_y = y + glyphs->coord.y/* EVAS_FONT_WALK_PEN_Y + EVAS_FONT_WALK_Y_OFF + EVAS_FONT_WALK_Y_BEAR */; if (chr_x < (ext_x + ext_w)) { DATA8 *data; int i, j, w, h; data = glyphs->data; j = glyphs->j; w = glyphs->coord.w; if (j < w) j = w; h = glyphs->coord.h; #ifdef HAVE_PIXMAN # ifdef PIXMAN_FONT int index; DATA32 *font_alpha_buffer; pixman_image_t *font_mask_image; font_alpha_buffer = alloca(w * h * sizeof(DATA32)); for (index = 0; index < (w * h); index++) font_alpha_buffer[index] = data[index] << 24; font_mask_image = pixman_image_create_bits(PIXMAN_a8r8g8b8, w, h, font_alpha_buffer, w * sizeof(DATA32)); if (!font_mask_image) return; # endif #endif { if ((j > 0) && (chr_x + w > ext_x)) { if ((fg->ext_dat) && (dc->font_ext.func.gl_draw)) { /* ext glyph draw */ dc->font_ext.func.gl_draw(dc->font_ext.data, (void *)dst, dc, fg, chr_x, y - (chr_y - y)); } else { if ((fg->glyph_out->bitmap.num_grays == 256) && (fg->glyph_out->bitmap.pixel_mode == FT_PIXEL_MODE_GRAY)) { #ifdef HAVE_PIXMAN # ifdef PIXMAN_FONT if ((dst->pixman.im) && (dc->col.pixman_color_image)) pixman_image_composite(PIXMAN_OP_OVER, dc->col.pixman_color_image, font_mask_image, dst->pixman.im, chr_x, y - (chr_y - y), 0, 0, chr_x, y - (chr_y - y), w, h); else # endif #endif { for (i = 0; i < h; i++) { int dx, dy; int in_x, in_w; in_x = 0; in_w = 0; dx = chr_x; dy = y - (chr_y - i - y); if ((dx < (ext_x + ext_w)) && (dy >= (ext_y)) && (dy < (ext_y + ext_h))) { if (dx + w > (ext_x + ext_w)) in_w += (dx + w) - (ext_x + ext_w); if (dx < ext_x) { in_w += ext_x - dx; in_x = ext_x - dx; dx = ext_x; } if (in_w < w) { func(NULL, data + (i * j) + in_x, dc->col.col, im + (dy * im_w) + dx, w - in_w); } } } } } else { DATA8 *tmpbuf = NULL, *dp, *tp, bits; int bi, bj; const DATA8 bitrepl[2] = {0x0, 0xff}; tmpbuf = alloca(w); for (i = 0; i < h; i++) { int dx, dy; int in_x, in_w, end; in_x = 0; in_w = 0; dx = chr_x; dy = y - (chr_y - i - y); tp = tmpbuf; dp = data + (i * fg->glyph_out->bitmap.pitch); for (bi = 0; bi < w; bi += 8) { bits = *dp; if ((w - bi) < 8) end = w - bi; else end = 8; for (bj = 0; bj < end; bj++) { *tp = bitrepl[(bits >> (7 - bj)) & 0x1]; tp++; } dp++; } if ((dx < (ext_x + ext_w)) && (dy >= (ext_y)) && (dy < (ext_y + ext_h))) { if (dx + w > (ext_x + ext_w)) in_w += (dx + w) - (ext_x + ext_w); if (dx < ext_x) { in_w += ext_x - dx; in_x = ext_x - dx; dx = ext_x; } if (in_w < w) { func(NULL, tmpbuf + in_x, dc->col.col, im + (dy * im_w) + dx, w - in_w); } } } } } } } #ifdef HAVE_PIXMAN # ifdef PIXMAN_FONT pixman_image_unref(font_mask_image); # endif #endif } else break; } } EAPI void evas_common_font_draw_prepare(Evas_Text_Props *text_props) { RGBA_Font_Int *fi; RGBA_Font_Glyph *fg; Evas_Glyph *glyphs; int glyphs_length; int glyphs_max; EVAS_FONT_WALK_TEXT_INIT(); fi = text_props->font_instance; if (!fi) return; if (!text_props->changed && text_props->generation == fi->generation && text_props->glyphs) return ; glyphs = text_props->glyphs; glyphs_length = 0; glyphs_max = text_props->glyphs_length; text_props->glyphs_length = 0; evas_common_font_int_reload(fi); if (fi->src->current_size != fi->size) { evas_common_font_source_reload(fi->src); FTLOCK(); FT_Activate_Size(fi->ft.size); FTUNLOCK(); fi->src->current_size = fi->size; } EVAS_FONT_WALK_TEXT_START() { Evas_Glyph *glyph; FT_UInt idx; if (!EVAS_FONT_WALK_IS_VISIBLE) continue; idx = EVAS_FONT_WALK_INDEX; fg = evas_common_font_int_cache_glyph_get(fi, idx); if (!fg) continue; if (!fg->glyph_out) evas_common_font_int_cache_glyph_render(fg); if (glyphs_length + 1 >= glyphs_max) { Evas_Glyph *tmp; glyphs_max += 8; tmp = realloc(glyphs, glyphs_max * sizeof (Evas_Glyph)); if (!tmp) return ; glyphs = tmp; text_props->glyphs = glyphs; } glyph = glyphs + glyphs_length++; glyph->fg = fg; glyph->idx = idx; glyph->coord.x = EVAS_FONT_WALK_PEN_X + EVAS_FONT_WALK_X_OFF + EVAS_FONT_WALK_X_BEAR; glyph->coord.y = EVAS_FONT_WALK_PEN_Y + EVAS_FONT_WALK_Y_OFF + EVAS_FONT_WALK_Y_BEAR; } EVAS_FONT_WALK_TEXT_END(); text_props->glyphs_length = glyphs_length; text_props->glyphs = glyphs; /* check if there's a request queue in fi, if so ask cserve2 to render * those glyphs */ text_props->generation = fi->generation; } EAPI void evas_common_font_draw(RGBA_Image *dst, RGBA_Draw_Context *dc, int x, int y, const Evas_Text_Props *text_props) { static Cutout_Rects *rects = NULL; int ext_x, ext_y, ext_w, ext_h; int im_w, im_h; RGBA_Gfx_Func func; Cutout_Rect *r; int c, cx, cy, cw, ch; int i; im_w = dst->cache_entry.w; im_h = dst->cache_entry.h; ext_x = 0; ext_y = 0; ext_w = im_w; ext_h = im_h; if (dc->clip.use) { ext_x = dc->clip.x; ext_y = dc->clip.y; ext_w = dc->clip.w; ext_h = dc->clip.h; if (ext_x < 0) { ext_w += ext_x; ext_x = 0; } if (ext_y < 0) { ext_h += ext_y; ext_y = 0; } if ((ext_x + ext_w) > im_w) ext_w = im_w - ext_x; if ((ext_y + ext_h) > im_h) ext_h = im_h - ext_y; } if (ext_w <= 0) return; if (ext_h <= 0) return; // evas_common_font_size_use(fn); func = evas_common_gfx_func_composite_mask_color_span_get(dc->col.col, dst, 1, dc->render_op); if (!dc->cutout.rects) { evas_common_font_draw_internal(dst, dc, x, y, text_props, func, ext_x, ext_y, ext_w, ext_h, im_w, im_h); } else { c = dc->clip.use; cx = dc->clip.x; cy = dc->clip.y; cw = dc->clip.w; ch = dc->clip.h; evas_common_draw_context_clip_clip(dc, 0, 0, dst->cache_entry.w, dst->cache_entry.h); /* our clip is 0 size.. abort */ if ((dc->clip.w > 0) && (dc->clip.h > 0)) { rects = evas_common_draw_context_apply_cutouts(dc, rects); for (i = 0; i < rects->active; ++i) { r = rects->rects + i; evas_common_draw_context_set_clip(dc, r->x, r->y, r->w, r->h); evas_common_font_draw_internal(dst, dc, x, y, text_props, func, r->x, r->y, r->w, r->h, im_w, im_h); } } dc->clip.use = c; dc->clip.x = cx; dc->clip.y = cy; dc->clip.w = cw; dc->clip.h = ch; } } EAPI void evas_common_font_draw_do(const Cutout_Rects *reuse, const Eina_Rectangle *clip, RGBA_Gfx_Func func, RGBA_Image *dst, RGBA_Draw_Context *dc, int x, int y, const Evas_Text_Props *text_props) { Eina_Rectangle area; Cutout_Rect *r; int i; int im_w, im_h; im_w = dst->cache_entry.w; im_h = dst->cache_entry.h; if (!reuse) { evas_common_draw_context_clip_clip(dc, clip->x, clip->y, clip->w, clip->h); evas_common_font_draw_internal(dst, dc, x, y, text_props, func, dc->clip.x, dc->clip.y, dc->clip.w, dc->clip.h, im_w, im_h); return ; } for (i = 0; i < reuse->active; ++i) { r = reuse->rects + i; EINA_RECTANGLE_SET(&area, r->x, r->y, r->w - 1, r->h - 1); if (!eina_rectangle_intersection(&area, clip)) continue ; evas_common_draw_context_set_clip(dc, area.x, area.y, area.w, area.h); evas_common_font_draw_internal(dst, dc, x, y, text_props, func, area.x, area.y, area.w, area.h, im_w, im_h); } } EAPI Eina_Bool evas_common_font_draw_prepare_cutout(Cutout_Rects *reuse, RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Gfx_Func *func) { int im_w, im_h; im_w = dst->cache_entry.w; im_h = dst->cache_entry.h; *func = evas_common_gfx_func_composite_mask_color_span_get(dc->col.col, dst, 1, dc->render_op); evas_common_draw_context_clip_clip(dc, 0, 0, im_w, im_h); if (dc->clip.w <= 0) return EINA_FALSE; if (dc->clip.h <= 0) return EINA_FALSE; if (dc->cutout.rects) { reuse = evas_common_draw_context_apply_cutouts(dc, reuse); } return EINA_TRUE; } evas-1.7.9/src/lib/engines/common/evas_convert_gry_4.h0000664000175000017500000000066312175475547017667 00000000000000#ifndef _EVAS_CONVERT_GRY_4_H #define _EVAS_CONVERT_GRY_4_H void evas_common_convert_rgba_to_4bpp_gry_4_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); void evas_common_convert_rgba_to_4bpp_gry_1_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal); #endif /* _EVAS_CONVERT_GRY_4_H */ evas-1.7.9/src/lib/engines/common/evas_op_add/0000775000175000017500000000000012234557316016222 500000000000000evas-1.7.9/src/lib/engines/common/evas_op_add/op_add_pixel_mask_i386.c0000664000175000017500000000063012175475547022531 00000000000000/* add pixel x mask -> dst */ #ifdef BUILD_MMX static void init_add_pixel_mask_span_funcs_mmx(void) { } #endif #ifdef BUILD_MMX static void init_add_pixel_mask_pt_funcs_mmx(void) { } #endif /*-----*/ /* add_rel pixel x mask -> dst */ #ifdef BUILD_MMX static void init_add_rel_pixel_mask_span_funcs_mmx(void) { } #endif #ifdef BUILD_MMX static void init_add_rel_pixel_mask_pt_funcs_mmx(void) { } #endif evas-1.7.9/src/lib/engines/common/evas_op_add/op_add_pixel_color_i386.c0000664000175000017500000000064012175475547022715 00000000000000/* add pixel x color --> dst */ #ifdef BUILD_MMX static void init_add_pixel_color_span_funcs_mmx(void) { } #endif #ifdef BUILD_MMX static void init_add_pixel_color_pt_funcs_mmx(void) { } #endif /*-----*/ /* add_rel pixel x color --> dst */ #ifdef BUILD_MMX static void init_add_rel_pixel_color_span_funcs_mmx(void) { } #endif #ifdef BUILD_MMX static void init_add_rel_pixel_color_pt_funcs_mmx(void) { } #endif evas-1.7.9/src/lib/engines/common/evas_op_add/Makefile.in0000664000175000017500000004645412234557302020217 00000000000000# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/lib/engines/common/evas_op_add DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/efl_attribute.m4 \ $(top_srcdir)/m4/efl_coverage.m4 \ $(top_srcdir)/m4/efl_doxygen.m4 \ $(top_srcdir)/m4/efl_fnmatch.m4 \ $(top_srcdir)/m4/efl_path_max.m4 \ $(top_srcdir)/m4/efl_shm_open.m4 $(top_srcdir)/m4/efl_tests.m4 \ $(top_srcdir)/m4/evas_check_engine.m4 \ $(top_srcdir)/m4/evas_check_loader.m4 \ $(top_srcdir)/m4/evas_converter.m4 \ $(top_srcdir)/m4/evas_dither.m4 \ $(top_srcdir)/m4/evas_scaler.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHECK_CFLAGS = @CHECK_CFLAGS@ CHECK_LIBS = @CHECK_LIBS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@ DIRECTFB_LIBS = @DIRECTFB_LIBS@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ ECORE_EVAS_CFLAGS = @ECORE_EVAS_CFLAGS@ ECORE_EVAS_LIBS = @ECORE_EVAS_LIBS@ EDB_CFLAGS = @EDB_CFLAGS@ EDB_LIBS = @EDB_LIBS@ EDJE_CFLAGS = @EDJE_CFLAGS@ EDJE_LIBS = @EDJE_LIBS@ EET_CFLAGS = @EET_CFLAGS@ EET_LIBS = @EET_LIBS@ EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@ EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@ EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@ EFL_SHM_OPEN_LIBS = @EFL_SHM_OPEN_LIBS@ EGREP = @EGREP@ EINA_CFLAGS = @EINA_CFLAGS@ EINA_LIBS = @EINA_LIBS@ EVAS_CFLAGS = @EVAS_CFLAGS@ EVAS_GENERAL_CFLAGS = @EVAS_GENERAL_CFLAGS@ EVAS_GENERAL_LIBS = @EVAS_GENERAL_LIBS@ EVAS_LIBS = @EVAS_LIBS@ EVAS_SSE3_CFLAGS = @EVAS_SSE3_CFLAGS@ EVIL_CFLAGS = @EVIL_CFLAGS@ EVIL_LIBS = @EVIL_LIBS@ EXEEXT = @EXEEXT@ EXOTIC_CFLAGS = @EXOTIC_CFLAGS@ EXOTIC_LIBS = @EXOTIC_LIBS@ FGREP = @FGREP@ FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@ FONTCONFIG_LIBS = @FONTCONFIG_LIBS@ FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ FREETYPE_LIBS = @FREETYPE_LIBS@ FRIBIDI_CFLAGS = @FRIBIDI_CFLAGS@ FRIBIDI_LIBS = @FRIBIDI_LIBS@ GL_EET_CFLAGS = @GL_EET_CFLAGS@ GL_EET_LIBS = @GL_EET_LIBS@ GREP = @GREP@ HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@ HARFBUZZ_LIBS = @HARFBUZZ_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LINEBREAK_CFLAGS = @LINEBREAK_CFLAGS@ LINEBREAK_LIBS = @LINEBREAK_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MODULE_ARCH = @MODULE_ARCH@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ SDL_CFLAGS = @SDL_CFLAGS@ SDL_LIBS = @SDL_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ SVG_CFLAGS = @SVG_CFLAGS@ SVG_LIBS = @SVG_LIBS@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ XCB_CFLAGS = @XCB_CFLAGS@ XCB_GL_CFLAGS = @XCB_GL_CFLAGS@ XCB_GL_LIBS = @XCB_GL_LIBS@ XCB_LIBS = @XCB_LIBS@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_ct_OBJC = @ac_ct_OBJC@ altivec_cflags = @altivec_cflags@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ dlopen_libs = @dlopen_libs@ docdir = @docdir@ dvidir = @dvidir@ edje_cc = @edje_cc@ efl_doxygen = @efl_doxygen@ efl_have_doxygen = @efl_have_doxygen@ evas_engine_buffer_cflags = @evas_engine_buffer_cflags@ evas_engine_buffer_libs = @evas_engine_buffer_libs@ evas_engine_direct3d_cflags = @evas_engine_direct3d_cflags@ evas_engine_direct3d_libs = @evas_engine_direct3d_libs@ evas_engine_directfb_cflags = @evas_engine_directfb_cflags@ evas_engine_directfb_libs = @evas_engine_directfb_libs@ evas_engine_fb_cflags = @evas_engine_fb_cflags@ evas_engine_fb_libs = @evas_engine_fb_libs@ evas_engine_gl_cocoa_cflags = @evas_engine_gl_cocoa_cflags@ evas_engine_gl_cocoa_libs = @evas_engine_gl_cocoa_libs@ evas_engine_gl_common_libs = @evas_engine_gl_common_libs@ evas_engine_gl_sdl_cflags = @evas_engine_gl_sdl_cflags@ evas_engine_gl_sdl_libs = @evas_engine_gl_sdl_libs@ evas_engine_gl_xcb_cflags = @evas_engine_gl_xcb_cflags@ evas_engine_gl_xcb_libs = @evas_engine_gl_xcb_libs@ evas_engine_gl_xlib_cflags = @evas_engine_gl_xlib_cflags@ evas_engine_gl_xlib_libs = @evas_engine_gl_xlib_libs@ evas_engine_psl1ght_cflags = @evas_engine_psl1ght_cflags@ evas_engine_psl1ght_libs = @evas_engine_psl1ght_libs@ evas_engine_software_16_sdl_cflags = @evas_engine_software_16_sdl_cflags@ evas_engine_software_16_sdl_libs = @evas_engine_software_16_sdl_libs@ evas_engine_software_16_wince_cflags = @evas_engine_software_16_wince_cflags@ evas_engine_software_16_wince_libs = @evas_engine_software_16_wince_libs@ evas_engine_software_16_x11_cflags = @evas_engine_software_16_x11_cflags@ evas_engine_software_16_x11_libs = @evas_engine_software_16_x11_libs@ evas_engine_software_8_x11_cflags = @evas_engine_software_8_x11_cflags@ evas_engine_software_8_x11_libs = @evas_engine_software_8_x11_libs@ evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@ evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@ evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@ evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ evas_image_loader_edb_libs = @evas_image_loader_edb_libs@ evas_image_loader_eet_cflags = @evas_image_loader_eet_cflags@ evas_image_loader_eet_libs = @evas_image_loader_eet_libs@ evas_image_loader_generic_cflags = @evas_image_loader_generic_cflags@ evas_image_loader_generic_libs = @evas_image_loader_generic_libs@ evas_image_loader_gif_cflags = @evas_image_loader_gif_cflags@ evas_image_loader_gif_libs = @evas_image_loader_gif_libs@ evas_image_loader_ico_cflags = @evas_image_loader_ico_cflags@ evas_image_loader_ico_libs = @evas_image_loader_ico_libs@ evas_image_loader_jpeg_cflags = @evas_image_loader_jpeg_cflags@ evas_image_loader_jpeg_libs = @evas_image_loader_jpeg_libs@ evas_image_loader_pmaps_cflags = @evas_image_loader_pmaps_cflags@ evas_image_loader_pmaps_libs = @evas_image_loader_pmaps_libs@ evas_image_loader_png_cflags = @evas_image_loader_png_cflags@ evas_image_loader_png_libs = @evas_image_loader_png_libs@ evas_image_loader_psd_cflags = @evas_image_loader_psd_cflags@ evas_image_loader_psd_libs = @evas_image_loader_psd_libs@ evas_image_loader_svg_cflags = @evas_image_loader_svg_cflags@ evas_image_loader_svg_libs = @evas_image_loader_svg_libs@ evas_image_loader_tga_cflags = @evas_image_loader_tga_cflags@ evas_image_loader_tga_libs = @evas_image_loader_tga_libs@ evas_image_loader_tiff_cflags = @evas_image_loader_tiff_cflags@ evas_image_loader_tiff_libs = @evas_image_loader_tiff_libs@ evas_image_loader_wbmp_cflags = @evas_image_loader_wbmp_cflags@ evas_image_loader_wbmp_libs = @evas_image_loader_wbmp_libs@ evas_image_loader_xpm_cflags = @evas_image_loader_xpm_cflags@ evas_image_loader_xpm_libs = @evas_image_loader_xpm_libs@ exec_prefix = @exec_prefix@ have_evas_engine_gl_x11 = @have_evas_engine_gl_x11@ have_evas_engine_gl_xcb = @have_evas_engine_gl_xcb@ have_evas_engine_gl_xlib = @have_evas_engine_gl_xlib@ have_evas_engine_software_x11 = @have_evas_engine_software_x11@ have_evas_engine_software_xcb = @have_evas_engine_software_xcb@ have_evas_engine_software_xlib = @have_evas_engine_software_xlib@ have_lcov = @have_lcov@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_enable_auto_import = @lt_enable_auto_import@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgconfig_requires_private = @pkgconfig_requires_private@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pthread_cflags = @pthread_cflags@ pthread_libs = @pthread_libs@ release_info = @release_info@ requirement_evas = @requirement_evas@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ shm_open_libs = @shm_open_libs@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ version_info = @version_info@ MAINTAINERCLEANFILES = Makefile.in EXTRA_DIST = \ op_add_color_.c \ op_add_color_i386.c \ op_add_mask_color_.c \ op_add_mask_color_i386.c \ op_add_pixel_.c \ op_add_pixel_color_.c \ op_add_pixel_color_i386.c \ op_add_pixel_i386.c \ op_add_pixel_mask_.c \ op_add_pixel_mask_i386.c all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/lib/engines/common/evas_op_add/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/lib/engines/common/evas_op_add/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags TAGS: ctags CTAGS: cscope cscopelist: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ cscopelist-am ctags-am distclean distclean-generic \ distclean-libtool distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: evas-1.7.9/src/lib/engines/common/evas_op_add/op_add_color_.c0000664000175000017500000000054612175475547021107 00000000000000/* add color -> dst */ #ifdef BUILD_C static void init_add_color_span_funcs_c(void) { } #endif #ifdef BUILD_C static void init_add_color_pt_funcs_c(void) { } #endif /*-----*/ /* add_rel color -> dst */ #ifdef BUILD_C static void init_add_rel_color_span_funcs_c(void) { } #endif #ifdef BUILD_C static void init_add_rel_color_pt_funcs_c(void) { } #endif evas-1.7.9/src/lib/engines/common/evas_op_add/op_add_pixel_.c0000664000175000017500000000055012175475547021105 00000000000000/* add pixel --> dst */ #ifdef BUILD_C static void init_add_pixel_span_funcs_c(void) { } #endif #ifdef BUILD_C static void init_add_pixel_pt_funcs_c(void) { } #endif /*-----*/ /* add_rel pixel --> dst */ #ifdef BUILD_C static void init_add_rel_pixel_span_funcs_c(void) { } #endif #ifdef BUILD_C static void init_add_rel_pixel_pt_funcs_c(void) { } #endif evas-1.7.9/src/lib/engines/common/evas_op_add/op_add_pixel_mask_.c0000664000175000017500000000066212175475547022124 00000000000000/* add pixel x mask --> dst */ #ifdef BUILD_C /* XXX: not used static void init_add_pixel_mask_span_funcs_c(void) { } */ #endif #ifdef BUILD_C /* XXX: not used static void init_add_pixel_mask_pt_funcs_c(void) { } */ #endif /*-----*/ /* add_rel pixel x mask --> dst */ #ifdef BUILD_C static void init_add_rel_pixel_mask_span_funcs_c(void) { } #endif #ifdef BUILD_C static void init_add_rel_pixel_mask_pt_funcs_c(void) { } #endif evas-1.7.9/src/lib/engines/common/evas_op_add/op_add_pixel_i386.c0000664000175000017500000000057012175475547021521 00000000000000/* add pixel --> dst */ #ifdef BUILD_MMX static void init_add_pixel_span_funcs_mmx(void) { } #endif #ifdef BUILD_MMX static void init_add_pixel_pt_funcs_mmx(void) { } #endif /*-----*/ /* add_rel pixel --> dst */ #ifdef BUILD_MMX static void init_add_rel_pixel_span_funcs_mmx(void) { } #endif #ifdef BUILD_MMX static void init_add_rel_pixel_pt_funcs_mmx(void) { } #endif evas-1.7.9/src/lib/engines/common/evas_op_add/op_add_color_i386.c0000664000175000017500000000056612175475547021523 00000000000000/* add color -> dst */ #ifdef BUILD_MMX static void init_add_color_span_funcs_mmx(void) { } #endif #ifdef BUILD_MMX static void init_add_color_pt_funcs_mmx(void) { } #endif /*-----*/ /* add_rel color -> dst */ #ifdef BUILD_MMX static void init_add_rel_color_span_funcs_mmx(void) { } #endif #ifdef BUILD_MMX static void init_add_rel_color_pt_funcs_mmx(void) { } #endif evas-1.7.9/src/lib/engines/common/evas_op_add/op_add_mask_color_.c0000664000175000017500000000061012175475547022112 00000000000000/* add mask x color -> dst */ #ifdef BUILD_C static void init_add_mask_color_span_funcs_c(void) { } #endif #ifdef BUILD_C static void init_add_mask_color_pt_funcs_c(void) { } #endif /*-----*/ /* add_rel mask x color -> dst */ #ifdef BUILD_C static void init_add_rel_mask_color_span_funcs_c(void) { } #endif #ifdef BUILD_C static void init_add_rel_mask_color_pt_funcs_c(void) { } #endif evas-1.7.9/src/lib/engines/common/evas_op_add/op_add_mask_color_i386.c0000664000175000017500000000063012175475547022526 00000000000000/* add mask x color -> dst */ #ifdef BUILD_MMX static void init_add_mask_color_span_funcs_mmx(void) { } #endif #ifdef BUILD_MMX static void init_add_mask_color_pt_funcs_mmx(void) { } #endif /*-----*/ /* add_rel mask x color -> dst */ #ifdef BUILD_MMX static void init_add_rel_mask_color_span_funcs_mmx(void) { } #endif #ifdef BUILD_MMX static void init_add_rel_mask_color_pt_funcs_mmx(void) { } #endif evas-1.7.9/src/lib/engines/common/evas_op_add/op_add_pixel_color_.c0000664000175000017500000000062012175475547022301 00000000000000/* add pixel x color --> dst */ #ifdef BUILD_C static void init_add_pixel_color_span_funcs_c(void) { } #endif #ifdef BUILD_C static void init_add_pixel_color_pt_funcs_c(void) { } #endif /*-----*/ /* add_rel pixel x color --> dst */ #ifdef BUILD_C static void init_add_rel_pixel_color_span_funcs_c(void) { } #endif #ifdef BUILD_C static void init_add_rel_pixel_color_pt_funcs_c(void) { } #endif evas-1.7.9/src/lib/engines/common/evas_op_add/Makefile.am0000664000175000017500000000043112175475547020205 00000000000000MAINTAINERCLEANFILES = Makefile.in EXTRA_DIST = \ op_add_color_.c \ op_add_color_i386.c \ op_add_mask_color_.c \ op_add_mask_color_i386.c \ op_add_pixel_.c \ op_add_pixel_color_.c \ op_add_pixel_color_i386.c \ op_add_pixel_i386.c \ op_add_pixel_mask_.c \ op_add_pixel_mask_i386.c evas-1.7.9/src/lib/engines/common/evas_map_image_internal.c0000664000175000017500000001164212175475547020710 00000000000000// 66.74 % of time static void FUNC_NAME(RGBA_Image *src, RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Map_Point *p, int smooth, int level __UNUSED__) // level unused for now - for future use { int i; int c, cx, cy, cw, ch; int ytop, ybottom, ystart, yend, y, sw, shp, swp, direct; Line *spans; DATA32 *buf = NULL, *sp; RGBA_Gfx_Func func = NULL; int havea = 0; int havecol = 4; // get the clip c = dc->clip.use; cx = dc->clip.x; cy = dc->clip.y; cw = dc->clip.w; ch = dc->clip.h; if (!c) { cx = 0; cy = 0; cw = dst->cache_entry.w; ch = dst->cache_entry.h; } // find y yop line and y bottom line ytop = p[0].y; if ((p[0].col >> 24) < 0xff) havea = 1; if (p[0].col == 0xffffffff) havecol--; for (i = 1; i < 4; i++) { if (p[i].y < ytop) ytop = p[i].y; if ((p[i].col >> 24) < 0xff) havea = 1; if (p[i].col == 0xffffffff) havecol--; } ybottom = p[0].y; for (i = 1; i < 4; i++) { if (p[i].y > ybottom) ybottom = p[i].y; } // convert to screen space from fixed point ytop = ytop >> FP; ybottom = ybottom >> FP; // if its outside the clip vertical bounds - don't bother if ((ytop >= (cy + ch)) || (ybottom < cy)) return; // limit to the clip vertical bounds if (ytop < cy) ystart = cy; else ystart = ytop; if (ybottom >= (cy + ch)) yend = (cy + ch) - 1; else yend = ybottom; // get some source image information sp = src->image.data; sw = src->cache_entry.w; swp = sw << (FP + FPI); shp = src->cache_entry.h << (FP + FPI); // limit u,v coords of points to be within the source image for (i = 0; i < 4; i++) { if (p[i].u < 0) p[i].u = 0; else if (p[i].u > (int)(src->cache_entry.w << FP)) p[i].u = src->cache_entry.w << FP; if (p[i].v < 0) p[i].v = 0; else if (p[i].v > (int)(src->cache_entry.h << FP)) p[i].v = src->cache_entry.h << FP; } // allocate some spans to hold out span list spans = alloca((yend - ystart + 1) * sizeof(Line)); memset(spans, 0, (yend - ystart + 1) * sizeof(Line)); // calculate the spans list _calc_spans(p, spans, ystart, yend, cx, cy, cw, ch); // walk through spans and render // if operation is solid, bypass buf and draw func and draw direct to dst direct = 0; if ((!src->cache_entry.flags.alpha) && (!dst->cache_entry.flags.alpha) && (!dc->mul.use) && (!havea)) { direct = 1; } else { int pa; buf = alloca(cw * sizeof(DATA32)); pa = src->cache_entry.flags.alpha; if (havea) src->cache_entry.flags.alpha = 1; if (dc->mul.use) func = evas_common_gfx_func_composite_pixel_color_span_get(src, dc->mul.col, dst, cw, dc->render_op); else func = evas_common_gfx_func_composite_pixel_span_get(src, dst, cw, dc->render_op); src->cache_entry.flags.alpha = pa; } if (!havecol) { #undef COLMUL #include "evas_map_image_core.c" } else { #define COLMUL 1 #include "evas_map_image_core.c" } } static void FUNC_NAME_DO(RGBA_Image *src, RGBA_Image *dst, RGBA_Draw_Context *dc, const RGBA_Map_Spans *ms, int smooth, int level __UNUSED__) // level unused for now - for future use { Line *spans; DATA32 *buf = NULL, *sp; RGBA_Gfx_Func func = NULL; int cx, cy, cw, ch; int ystart, yend, y, sw, shp, swp, direct; int havecol; int i; cx = dc->clip.x; cy = dc->clip.y; cw = dc->clip.w; ch = dc->clip.h; if (ms->ystart < cy) ystart = cy; else ystart = ms->ystart; if (ms->yend >= (cy + ch)) yend = (cy + ch) - 1; else yend = ms->yend; // get some source image information sp = src->image.data; sw = src->cache_entry.w; swp = sw << (FP + FPI); shp = src->cache_entry.h << (FP + FPI); havecol = ms->havecol; direct = ms->direct; // allocate some s to hold out span list spans = alloca((yend - ystart + 1) * sizeof(Line)); memcpy(spans, &ms->spans[ystart - ms->ystart], (yend - ystart + 1) * sizeof(Line)); _clip_spans(spans, ystart, yend, cx, cw, ms->nocol); // if operation is solid, bypass buf and draw func and draw direct to dst if (!direct) { int pa; buf = alloca(cw * sizeof(DATA32)); pa = src->cache_entry.flags.alpha; if (ms->havea) src->cache_entry.flags.alpha = 1; if (dc->mul.use) func = evas_common_gfx_func_composite_pixel_color_span_get(src, dc->mul.col, dst, cw, dc->render_op); else func = evas_common_gfx_func_composite_pixel_span_get(src, dst, cw, dc->render_op); src->cache_entry.flags.alpha = pa; } if (!havecol) { #undef COLMUL #include "evas_map_image_core.c" } else { #define COLMUL 1 #include "evas_map_image_core.c" } } evas-1.7.9/src/lib/engines/common/evas_scale_smooth_scaler_noscale.c0000664000175000017500000000227512175475547022614 00000000000000{ DATA32 *ptr; RGBA_Gfx_Func func; RGBA_Image *maskobj; DATA8 *mask = NULL; ptr = src->image.data + ((dst_clip_y - dst_region_y + src_region_y) * src_w) + (dst_clip_x - dst_region_x) + src_region_x; if (dc->mask.mask) { func = evas_common_gfx_func_composite_pixel_mask_span_get(NULL, NULL, dst_clip_w, dc->render_op); maskobj = dc->mask.mask; mask = maskobj->mask.mask; } else if (dc->mul.use) func = evas_common_gfx_func_composite_pixel_color_span_get(src, dc->mul.col, dst, dst_clip_w, dc->render_op); else func = evas_common_gfx_func_composite_pixel_span_get(src, dst, dst_clip_w, dc->render_op); if (mask) { // mask += dst_clip_x - dc->mask.x; // mask += (dst_clip_y - dc->mask.y) * maskobj->cache_entry.w; while (dst_clip_h--) { func(ptr, mask, dc->mul.col, dst_ptr, dst_clip_w); ptr += src_w; dst_ptr += dst_w; mask += maskobj->cache_entry.w; } } else { while (dst_clip_h--) { func(ptr, NULL, dc->mul.col, dst_ptr, dst_clip_w); ptr += src_w; dst_ptr += dst_w; } } } /* vim:set ts=8 sw=3 sts=3 expandtab cino=>5n-2f0^-2{2(0W1st0 :*/ evas-1.7.9/src/lib/engines/common/evas_op_mask/0000775000175000017500000000000012234557316016425 500000000000000evas-1.7.9/src/lib/engines/common/evas_op_mask/op_mask_color_.c0000664000175000017500000000245412175475547021515 00000000000000/* mask color --> dst */ #ifdef BUILD_C static void _op_mask_c_dp(DATA32 *s __UNUSED__, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { DATA32 *e = d + l; c = 1 + (c >> 24); for (; d < e; d++) { *d = MUL_256(c, *d); } } #define _op_mask_caa_dp _op_mask_c_dp #define _op_mask_c_dpan _op_mask_c_dp #define _op_mask_caa_dpan _op_mask_caa_dp static void init_mask_color_span_funcs_c(void) { op_mask_span_funcs[SP_N][SM_N][SC][DP][CPU_C] = _op_mask_c_dp; op_mask_span_funcs[SP_N][SM_N][SC_AA][DP][CPU_C] = _op_mask_caa_dp; op_mask_span_funcs[SP_N][SM_N][SC][DP_AN][CPU_C] = _op_mask_c_dpan; op_mask_span_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_C] = _op_mask_caa_dpan; } #endif #ifdef BUILD_C static void _op_mask_pt_c_dp(DATA32 s __UNUSED__, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) { *d = MUL_SYM(c >> 24, *d); } #define _op_mask_pt_caa_dp _op_mask_pt_c_dp #define _op_mask_pt_c_dpan _op_mask_pt_c_dp #define _op_mask_pt_caa_dpan _op_mask_pt_caa_dp static void init_mask_color_pt_funcs_c(void) { op_mask_pt_funcs[SP_N][SM_N][SC][DP][CPU_C] = _op_mask_pt_c_dp; op_mask_pt_funcs[SP_N][SM_N][SC_AA][DP][CPU_C] = _op_mask_pt_caa_dp; op_mask_pt_funcs[SP_N][SM_N][SC][DP_AN][CPU_C] = _op_mask_pt_c_dpan; op_mask_pt_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_C] = _op_mask_pt_caa_dpan; } #endif evas-1.7.9/src/lib/engines/common/evas_op_mask/op_mask_pixel_color_i386.c0000664000175000017500000000030712175475547023323 00000000000000/* mask pixel x color --> dst */ #ifdef BUILD_MMX static void init_mask_pixel_color_span_funcs_mmx(void) { } #endif #ifdef BUILD_MMX static void init_mask_pixel_color_pt_funcs_mmx(void) { } #endif evas-1.7.9/src/lib/engines/common/evas_op_mask/op_mask_mask_color_i386.c0000664000175000017500000000030112175475547023127 00000000000000/* mask mask x color -> dst */ #ifdef BUILD_MMX static void init_mask_mask_color_span_funcs_mmx(void) {} #endif #ifdef BUILD_MMX static void init_mask_mask_color_pt_funcs_mmx(void) {} #endif evas-1.7.9/src/lib/engines/common/evas_op_mask/Makefile.in0000664000175000017500000004647112234557302020421 00000000000000# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/lib/engines/common/evas_op_mask DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/efl_attribute.m4 \ $(top_srcdir)/m4/efl_coverage.m4 \ $(top_srcdir)/m4/efl_doxygen.m4 \ $(top_srcdir)/m4/efl_fnmatch.m4 \ $(top_srcdir)/m4/efl_path_max.m4 \ $(top_srcdir)/m4/efl_shm_open.m4 $(top_srcdir)/m4/efl_tests.m4 \ $(top_srcdir)/m4/evas_check_engine.m4 \ $(top_srcdir)/m4/evas_check_loader.m4 \ $(top_srcdir)/m4/evas_converter.m4 \ $(top_srcdir)/m4/evas_dither.m4 \ $(top_srcdir)/m4/evas_scaler.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHECK_CFLAGS = @CHECK_CFLAGS@ CHECK_LIBS = @CHECK_LIBS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@ DIRECTFB_LIBS = @DIRECTFB_LIBS@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ ECORE_EVAS_CFLAGS = @ECORE_EVAS_CFLAGS@ ECORE_EVAS_LIBS = @ECORE_EVAS_LIBS@ EDB_CFLAGS = @EDB_CFLAGS@ EDB_LIBS = @EDB_LIBS@ EDJE_CFLAGS = @EDJE_CFLAGS@ EDJE_LIBS = @EDJE_LIBS@ EET_CFLAGS = @EET_CFLAGS@ EET_LIBS = @EET_LIBS@ EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@ EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@ EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@ EFL_SHM_OPEN_LIBS = @EFL_SHM_OPEN_LIBS@ EGREP = @EGREP@ EINA_CFLAGS = @EINA_CFLAGS@ EINA_LIBS = @EINA_LIBS@ EVAS_CFLAGS = @EVAS_CFLAGS@ EVAS_GENERAL_CFLAGS = @EVAS_GENERAL_CFLAGS@ EVAS_GENERAL_LIBS = @EVAS_GENERAL_LIBS@ EVAS_LIBS = @EVAS_LIBS@ EVAS_SSE3_CFLAGS = @EVAS_SSE3_CFLAGS@ EVIL_CFLAGS = @EVIL_CFLAGS@ EVIL_LIBS = @EVIL_LIBS@ EXEEXT = @EXEEXT@ EXOTIC_CFLAGS = @EXOTIC_CFLAGS@ EXOTIC_LIBS = @EXOTIC_LIBS@ FGREP = @FGREP@ FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@ FONTCONFIG_LIBS = @FONTCONFIG_LIBS@ FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ FREETYPE_LIBS = @FREETYPE_LIBS@ FRIBIDI_CFLAGS = @FRIBIDI_CFLAGS@ FRIBIDI_LIBS = @FRIBIDI_LIBS@ GL_EET_CFLAGS = @GL_EET_CFLAGS@ GL_EET_LIBS = @GL_EET_LIBS@ GREP = @GREP@ HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@ HARFBUZZ_LIBS = @HARFBUZZ_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LINEBREAK_CFLAGS = @LINEBREAK_CFLAGS@ LINEBREAK_LIBS = @LINEBREAK_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MODULE_ARCH = @MODULE_ARCH@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ SDL_CFLAGS = @SDL_CFLAGS@ SDL_LIBS = @SDL_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ SVG_CFLAGS = @SVG_CFLAGS@ SVG_LIBS = @SVG_LIBS@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ XCB_CFLAGS = @XCB_CFLAGS@ XCB_GL_CFLAGS = @XCB_GL_CFLAGS@ XCB_GL_LIBS = @XCB_GL_LIBS@ XCB_LIBS = @XCB_LIBS@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_ct_OBJC = @ac_ct_OBJC@ altivec_cflags = @altivec_cflags@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ dlopen_libs = @dlopen_libs@ docdir = @docdir@ dvidir = @dvidir@ edje_cc = @edje_cc@ efl_doxygen = @efl_doxygen@ efl_have_doxygen = @efl_have_doxygen@ evas_engine_buffer_cflags = @evas_engine_buffer_cflags@ evas_engine_buffer_libs = @evas_engine_buffer_libs@ evas_engine_direct3d_cflags = @evas_engine_direct3d_cflags@ evas_engine_direct3d_libs = @evas_engine_direct3d_libs@ evas_engine_directfb_cflags = @evas_engine_directfb_cflags@ evas_engine_directfb_libs = @evas_engine_directfb_libs@ evas_engine_fb_cflags = @evas_engine_fb_cflags@ evas_engine_fb_libs = @evas_engine_fb_libs@ evas_engine_gl_cocoa_cflags = @evas_engine_gl_cocoa_cflags@ evas_engine_gl_cocoa_libs = @evas_engine_gl_cocoa_libs@ evas_engine_gl_common_libs = @evas_engine_gl_common_libs@ evas_engine_gl_sdl_cflags = @evas_engine_gl_sdl_cflags@ evas_engine_gl_sdl_libs = @evas_engine_gl_sdl_libs@ evas_engine_gl_xcb_cflags = @evas_engine_gl_xcb_cflags@ evas_engine_gl_xcb_libs = @evas_engine_gl_xcb_libs@ evas_engine_gl_xlib_cflags = @evas_engine_gl_xlib_cflags@ evas_engine_gl_xlib_libs = @evas_engine_gl_xlib_libs@ evas_engine_psl1ght_cflags = @evas_engine_psl1ght_cflags@ evas_engine_psl1ght_libs = @evas_engine_psl1ght_libs@ evas_engine_software_16_sdl_cflags = @evas_engine_software_16_sdl_cflags@ evas_engine_software_16_sdl_libs = @evas_engine_software_16_sdl_libs@ evas_engine_software_16_wince_cflags = @evas_engine_software_16_wince_cflags@ evas_engine_software_16_wince_libs = @evas_engine_software_16_wince_libs@ evas_engine_software_16_x11_cflags = @evas_engine_software_16_x11_cflags@ evas_engine_software_16_x11_libs = @evas_engine_software_16_x11_libs@ evas_engine_software_8_x11_cflags = @evas_engine_software_8_x11_cflags@ evas_engine_software_8_x11_libs = @evas_engine_software_8_x11_libs@ evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@ evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@ evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@ evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ evas_image_loader_edb_libs = @evas_image_loader_edb_libs@ evas_image_loader_eet_cflags = @evas_image_loader_eet_cflags@ evas_image_loader_eet_libs = @evas_image_loader_eet_libs@ evas_image_loader_generic_cflags = @evas_image_loader_generic_cflags@ evas_image_loader_generic_libs = @evas_image_loader_generic_libs@ evas_image_loader_gif_cflags = @evas_image_loader_gif_cflags@ evas_image_loader_gif_libs = @evas_image_loader_gif_libs@ evas_image_loader_ico_cflags = @evas_image_loader_ico_cflags@ evas_image_loader_ico_libs = @evas_image_loader_ico_libs@ evas_image_loader_jpeg_cflags = @evas_image_loader_jpeg_cflags@ evas_image_loader_jpeg_libs = @evas_image_loader_jpeg_libs@ evas_image_loader_pmaps_cflags = @evas_image_loader_pmaps_cflags@ evas_image_loader_pmaps_libs = @evas_image_loader_pmaps_libs@ evas_image_loader_png_cflags = @evas_image_loader_png_cflags@ evas_image_loader_png_libs = @evas_image_loader_png_libs@ evas_image_loader_psd_cflags = @evas_image_loader_psd_cflags@ evas_image_loader_psd_libs = @evas_image_loader_psd_libs@ evas_image_loader_svg_cflags = @evas_image_loader_svg_cflags@ evas_image_loader_svg_libs = @evas_image_loader_svg_libs@ evas_image_loader_tga_cflags = @evas_image_loader_tga_cflags@ evas_image_loader_tga_libs = @evas_image_loader_tga_libs@ evas_image_loader_tiff_cflags = @evas_image_loader_tiff_cflags@ evas_image_loader_tiff_libs = @evas_image_loader_tiff_libs@ evas_image_loader_wbmp_cflags = @evas_image_loader_wbmp_cflags@ evas_image_loader_wbmp_libs = @evas_image_loader_wbmp_libs@ evas_image_loader_xpm_cflags = @evas_image_loader_xpm_cflags@ evas_image_loader_xpm_libs = @evas_image_loader_xpm_libs@ exec_prefix = @exec_prefix@ have_evas_engine_gl_x11 = @have_evas_engine_gl_x11@ have_evas_engine_gl_xcb = @have_evas_engine_gl_xcb@ have_evas_engine_gl_xlib = @have_evas_engine_gl_xlib@ have_evas_engine_software_x11 = @have_evas_engine_software_x11@ have_evas_engine_software_xcb = @have_evas_engine_software_xcb@ have_evas_engine_software_xlib = @have_evas_engine_software_xlib@ have_lcov = @have_lcov@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_enable_auto_import = @lt_enable_auto_import@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgconfig_requires_private = @pkgconfig_requires_private@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pthread_cflags = @pthread_cflags@ pthread_libs = @pthread_libs@ release_info = @release_info@ requirement_evas = @requirement_evas@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ shm_open_libs = @shm_open_libs@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ version_info = @version_info@ MAINTAINERCLEANFILES = Makefile.in EXTRA_DIST = \ op_mask_color_.c \ op_mask_color_i386.c \ op_mask_mask_color_.c \ op_mask_mask_color_i386.c \ op_mask_pixel_.c \ op_mask_pixel_color_.c \ op_mask_pixel_color_i386.c \ op_mask_pixel_i386.c \ op_mask_pixel_mask_.c \ op_mask_pixel_mask_i386.c all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/lib/engines/common/evas_op_mask/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/lib/engines/common/evas_op_mask/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags TAGS: ctags CTAGS: cscope cscopelist: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ cscopelist-am ctags-am distclean distclean-generic \ distclean-libtool distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: evas-1.7.9/src/lib/engines/common/evas_op_mask/op_mask_pixel_color_.c0000664000175000017500000001045412175475547022715 00000000000000/* mask pixel x color --> dst */ #ifdef BUILD_C static void _op_mask_p_c_dp(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { DATA32 *e = d + l; l = 1 + (c >> 24); while (d < e) { c = 1 + ((l * (*s >> 24)) >> 8); *d = MUL_256(c, *d); s++; d++; } } #define _op_mask_pas_c_dp _op_mask_p_c_dp #define _op_mask_pan_c_dp _op_mask_p_c_dp #define _op_mask_p_can_dp _op_mask_p_c_dp #define _op_mask_pas_can_dp _op_mask_p_c_dp #define _op_mask_p_caa_dp _op_mask_p_c_dp #define _op_mask_pas_caa_dp _op_mask_p_c_dp #define _op_mask_pan_caa_dp _op_mask_p_c_dp #define _op_mask_p_c_dpan _op_mask_p_c_dp #define _op_mask_pas_c_dpan _op_mask_p_c_dp #define _op_mask_pan_c_dpan _op_mask_p_c_dp #define _op_mask_p_can_dpan _op_mask_p_c_dp #define _op_mask_pas_can_dpan _op_mask_p_c_dp #define _op_mask_p_caa_dpan _op_mask_p_c_dp #define _op_mask_pas_caa_dpan _op_mask_p_c_dp #define _op_mask_pan_caa_dpan _op_mask_p_c_dp static void init_mask_pixel_color_span_funcs_c(void) { op_mask_span_funcs[SP][SM_N][SC][DP][CPU_C] = _op_mask_p_c_dp; op_mask_span_funcs[SP_AS][SM_N][SC][DP][CPU_C] = _op_mask_pas_c_dp; op_mask_span_funcs[SP_AN][SM_N][SC][DP][CPU_C] = _op_mask_pan_c_dp; op_mask_span_funcs[SP][SM_N][SC_AN][DP][CPU_C] = _op_mask_p_can_dp; op_mask_span_funcs[SP_AS][SM_N][SC_AN][DP][CPU_C] = _op_mask_pas_can_dp; op_mask_span_funcs[SP][SM_N][SC_AA][DP][CPU_C] = _op_mask_p_caa_dp; op_mask_span_funcs[SP_AS][SM_N][SC_AA][DP][CPU_C] = _op_mask_pas_caa_dp; op_mask_span_funcs[SP_AN][SM_N][SC_AA][DP][CPU_C] = _op_mask_pan_caa_dp; op_mask_span_funcs[SP][SM_N][SC][DP_AN][CPU_C] = _op_mask_p_c_dpan; op_mask_span_funcs[SP_AS][SM_N][SC][DP_AN][CPU_C] = _op_mask_pas_c_dpan; op_mask_span_funcs[SP_AN][SM_N][SC][DP_AN][CPU_C] = _op_mask_pan_c_dpan; op_mask_span_funcs[SP][SM_N][SC_AN][DP_AN][CPU_C] = _op_mask_p_can_dpan; op_mask_span_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_C] = _op_mask_pas_can_dpan; op_mask_span_funcs[SP][SM_N][SC_AA][DP_AN][CPU_C] = _op_mask_p_caa_dpan; op_mask_span_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_C] = _op_mask_pas_caa_dpan; op_mask_span_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_C] = _op_mask_pan_caa_dpan; } #endif #ifdef BUILD_C static void _op_mask_pt_p_c_dp(DATA32 s, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) { c = 1 + ((((c >> 24) * (s >> 24)) + 255) >> 8); *d = MUL_256(c, *d); } #define _op_mask_pt_pas_c_dp _op_mask_pt_p_c_dp #define _op_mask_pt_pan_c_dp _op_mask_pt_p_c_dp #define _op_mask_pt_p_can_dp _op_mask_pt_p_c_dp #define _op_mask_pt_pas_can_dp _op_mask_pt_p_c_dp #define _op_mask_pt_p_caa_dp _op_mask_pt_p_c_dp #define _op_mask_pt_pas_caa_dp _op_mask_pt_p_c_dp #define _op_mask_pt_pan_caa_dp _op_mask_pt_p_c_dp #define _op_mask_pt_p_c_dpan _op_mask_pt_p_c_dp #define _op_mask_pt_pas_c_dpan _op_mask_pt_p_c_dp #define _op_mask_pt_pan_c_dpan _op_mask_pt_p_c_dp #define _op_mask_pt_p_can_dpan _op_mask_pt_p_c_dp #define _op_mask_pt_pas_can_dpan _op_mask_pt_p_c_dp #define _op_mask_pt_p_caa_dpan _op_mask_pt_p_c_dp #define _op_mask_pt_pas_caa_dpan _op_mask_pt_p_c_dp #define _op_mask_pt_pan_caa_dpan _op_mask_pt_p_c_dp static void init_mask_pixel_color_pt_funcs_c(void) { op_mask_pt_funcs[SP][SM_N][SC][DP][CPU_C] = _op_mask_pt_p_c_dp; op_mask_pt_funcs[SP_AS][SM_N][SC][DP][CPU_C] = _op_mask_pt_pas_c_dp; op_mask_pt_funcs[SP_AN][SM_N][SC][DP][CPU_C] = _op_mask_pt_pan_c_dp; op_mask_pt_funcs[SP][SM_N][SC_AN][DP][CPU_C] = _op_mask_pt_p_can_dp; op_mask_pt_funcs[SP_AS][SM_N][SC_AN][DP][CPU_C] = _op_mask_pt_pas_can_dp; op_mask_pt_funcs[SP][SM_N][SC_AA][DP][CPU_C] = _op_mask_pt_p_caa_dp; op_mask_pt_funcs[SP_AS][SM_N][SC_AA][DP][CPU_C] = _op_mask_pt_pas_caa_dp; op_mask_pt_funcs[SP_AN][SM_N][SC_AA][DP][CPU_C] = _op_mask_pt_pan_caa_dp; op_mask_pt_funcs[SP][SM_N][SC][DP_AN][CPU_C] = _op_mask_pt_p_c_dpan; op_mask_pt_funcs[SP_AS][SM_N][SC][DP_AN][CPU_C] = _op_mask_pt_pas_c_dpan; op_mask_pt_funcs[SP_AN][SM_N][SC][DP_AN][CPU_C] = _op_mask_pt_pan_c_dpan; op_mask_pt_funcs[SP][SM_N][SC_AN][DP_AN][CPU_C] = _op_mask_pt_p_can_dpan; op_mask_pt_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_C] = _op_mask_pt_pas_can_dpan; op_mask_pt_funcs[SP][SM_N][SC_AA][DP_AN][CPU_C] = _op_mask_pt_p_caa_dpan; op_mask_pt_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_C] = _op_mask_pt_pas_caa_dpan; op_mask_pt_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_C] = _op_mask_pt_pan_caa_dpan; } #endif evas-1.7.9/src/lib/engines/common/evas_op_mask/op_mask_pixel_.c0000664000175000017500000000244212175475547021515 00000000000000/* mask pixel --> dst */ #ifdef BUILD_C static void _op_mask_p_dp(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c __UNUSED__, DATA32 *d, int l) { DATA32 *e = d + l; for (; d < e; d++, s++) { *d = MUL_SYM(*s >> 24, *d); } } #define _op_mask_pas_dp _op_mask_p_dp #define _op_mask_p_dpan _op_mask_p_dp #define _op_mask_pas_dpan _op_mask_pas_dp static void init_mask_pixel_span_funcs_c(void) { op_mask_span_funcs[SP][SM_N][SC_N][DP][CPU_C] = _op_mask_p_dp; op_mask_span_funcs[SP_AS][SM_N][SC_N][DP][CPU_C] = _op_mask_pas_dp; op_mask_span_funcs[SP][SM_N][SC_N][DP_AN][CPU_C] = _op_mask_p_dpan; op_mask_span_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_C] = _op_mask_pas_dpan; } #endif #ifdef BUILD_C static void _op_mask_pt_p_dp(DATA32 s, DATA8 m __UNUSED__, DATA32 c __UNUSED__, DATA32 *d) { *d = MUL_SYM(s >> 24, *d); } #define _op_mask_pt_pas_dp _op_mask_pt_p_dp #define _op_mask_pt_p_dpan _op_mask_pt_p_dp #define _op_mask_pt_pas_dpan _op_mask_pt_pas_dp static void init_mask_pixel_pt_funcs_c(void) { op_mask_pt_funcs[SP][SM_N][SC_N][DP][CPU_C] = _op_mask_pt_p_dp; op_mask_pt_funcs[SP_AS][SM_N][SC_N][DP][CPU_C] = _op_mask_pt_pas_dp; op_mask_pt_funcs[SP][SM_N][SC_N][DP_AN][CPU_C] = _op_mask_pt_p_dpan; op_mask_pt_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_C] = _op_mask_pt_pas_dpan; } #endif evas-1.7.9/src/lib/engines/common/evas_op_mask/op_mask_color_i386.c0000664000175000017500000000313212175475547022121 00000000000000/* mask color --> dst */ #ifdef BUILD_MMX static void _op_mask_c_dp_mmx(DATA32 *s __UNUSED__, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { DATA32 *e = d + l; c = 1 + (c >> 24); MOV_A2R(c, mm2) pxor_r2r(mm0, mm0); for (; d < e; d++) { MOV_P2R(*d, mm1, mm0) MUL4_256_R2R(mm2, mm1) MOV_R2P(mm1, *d, mm0) } } #define _op_mask_caa_dp_mmx _op_mask_c_dp_mmx #define _op_mask_c_dpan_mmx _op_mask_c_dp_mmx #define _op_mask_caa_dpan_mmx _op_mask_caa_dp_mmx static void init_mask_color_span_funcs_mmx(void) { op_mask_span_funcs[SP_N][SM_N][SC][DP][CPU_MMX] = _op_mask_c_dp_mmx; op_mask_span_funcs[SP_N][SM_N][SC_AA][DP][CPU_MMX] = _op_mask_caa_dp_mmx; op_mask_span_funcs[SP_N][SM_N][SC][DP_AN][CPU_MMX] = _op_mask_c_dpan_mmx; op_mask_span_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_mask_caa_dpan_mmx; } #endif #ifdef BUILD_MMX static void _op_mask_pt_c_dp_mmx(DATA32 s __UNUSED__, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) { c = 1 + (c >> 24); MOV_A2R(c, mm2) pxor_r2r(mm0, mm0); MOV_P2R(*d, mm1, mm0) MUL4_256_R2R(mm2, mm1) MOV_R2P(mm1, *d, mm0) } #define _op_mask_pt_caa_dp_mmx _op_mask_pt_c_dp_mmx #define _op_mask_pt_c_dpan_mmx _op_mask_pt_c_dp_mmx #define _op_mask_pt_caa_dpan_mmx _op_mask_pt_caa_dp_mmx static void init_mask_color_pt_funcs_mmx(void) { op_mask_pt_funcs[SP_N][SM_N][SC][DP][CPU_MMX] = _op_mask_pt_c_dp_mmx; op_mask_pt_funcs[SP_N][SM_N][SC_AA][DP][CPU_MMX] = _op_mask_pt_caa_dp_mmx; op_mask_pt_funcs[SP_N][SM_N][SC][DP_AN][CPU_MMX] = _op_mask_pt_c_dpan_mmx; op_mask_pt_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_mask_pt_caa_dpan_mmx; } #endif evas-1.7.9/src/lib/engines/common/evas_op_mask/op_mask_mask_color_.c0000664000175000017500000000312312175475547022522 00000000000000/* mask mask x color -> dst */ #ifdef BUILD_C static void _op_mask_mas_c_dp(DATA32 *s __UNUSED__, DATA8 *m, DATA32 c, DATA32 *d, int l) { DATA32 *e = d + l; c = 1 + (c >> 24); while (d < e) { l = *m; switch(l) { case 0: break; case 255: *d = MUL_256(c, *d); break; default: l = 256 - (((257 - c) * l) >> 8); *d = MUL_256(l, *d); break; } m++; d++; } } #define _op_mask_mas_caa_dp _op_mask_mas_c_dp #define _op_mask_mas_c_dpan _op_mask_mas_c_dp #define _op_mask_mas_caa_dpan _op_mask_mas_caa_dp static void init_mask_mask_color_span_funcs_c(void) { op_mask_span_funcs[SP_N][SM_AS][SC][DP][CPU_C] = _op_mask_mas_c_dp; op_mask_span_funcs[SP_N][SM_AS][SC_AA][DP][CPU_C] = _op_mask_mas_caa_dp; op_mask_span_funcs[SP_N][SM_AS][SC][DP_AN][CPU_C] = _op_mask_mas_c_dpan; op_mask_span_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_C] = _op_mask_mas_caa_dpan; } #endif #ifdef BUILD_C static void _op_mask_pt_mas_c_dp(DATA32 s __UNUSED__, DATA8 m, DATA32 c, DATA32 *d) { c = 256 - (((256 - (c >> 24)) * m) >> 8); *d = MUL_256(c, *d); } #define _op_mask_pt_mas_caa_dp _op_mask_pt_mas_c_dp #define _op_mask_pt_mas_c_dpan _op_mask_pt_mas_c_dp #define _op_mask_pt_mas_caa_dpan _op_mask_pt_mas_caa_dp static void init_mask_mask_color_pt_funcs_c(void) { op_mask_pt_funcs[SP_N][SM_AS][SC][DP][CPU_C] = _op_mask_pt_mas_c_dp; op_mask_pt_funcs[SP_N][SM_AS][SC_AA][DP][CPU_C] = _op_mask_pt_mas_caa_dp; op_mask_pt_funcs[SP_N][SM_AS][SC][DP_AN][CPU_C] = _op_mask_pt_mas_c_dpan; op_mask_pt_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_C] = _op_mask_pt_mas_caa_dpan; } #endif evas-1.7.9/src/lib/engines/common/evas_op_mask/op_mask_pixel_mask_i386.c0000664000175000017500000000030412175475547023135 00000000000000/* mask pixel x mask --> dst */ #ifdef BUILD_MMX static void init_mask_pixel_mask_span_funcs_mmx(void) { } #endif #ifdef BUILD_MMX static void init_mask_pixel_mask_pt_funcs_mmx(void) { } #endif evas-1.7.9/src/lib/engines/common/evas_op_mask/op_mask_pixel_mask_.c0000664000175000017500000000312612175475547022530 00000000000000/* mask pixel x mask --> dst */ #ifdef BUILD_C static void _op_mask_p_mas_dp(DATA32 *s, DATA8 *m, DATA32 c __UNUSED__, DATA32 *d, int l) { DATA32 *e = d + l; while (d < e) { l = *m; switch(l) { case 0: break; case 255: *d = MUL_SYM(*s >> 24, *d); break; default: l = 256 - (((256 - (*s >> 24)) * l) >> 8); *d = MUL_256(l, *d); break; } m++; s++; d++; } } #define _op_mask_pas_mas_dp _op_mask_p_mas_dp #define _op_mask_p_mas_dpan _op_mask_p_mas_dp #define _op_mask_pas_mas_dpan _op_mask_pas_mas_dp static void init_mask_pixel_mask_span_funcs_c(void) { op_mask_span_funcs[SP][SM_AS][SC_N][DP][CPU_C] = _op_mask_p_mas_dp; op_mask_span_funcs[SP_AS][SM_AS][SC_N][DP][CPU_C] = _op_mask_pas_mas_dp; op_mask_span_funcs[SP][SM_AS][SC_N][DP_AN][CPU_C] = _op_mask_p_mas_dpan; op_mask_span_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_C] = _op_mask_pas_mas_dpan; } #endif #ifdef BUILD_C static void _op_mask_pt_p_mas_dp(DATA32 s, DATA8 m, DATA32 c __UNUSED__, DATA32 *d) { s = 256 - (((256 - (s >> 24)) * m) >> 8); *d = MUL_256(s, *d); } #define _op_mask_pt_pas_mas_dp _op_mask_pt_p_mas_dp #define _op_mask_pt_p_mas_dpan _op_mask_pt_p_mas_dp #define _op_mask_pt_pas_mas_dpan _op_mask_pt_pas_mas_dp static void init_mask_pixel_mask_pt_funcs_c(void) { op_mask_pt_funcs[SP][SM_AS][SC_N][DP][CPU_C] = _op_mask_pt_p_mas_dp; op_mask_pt_funcs[SP_AS][SM_AS][SC_N][DP][CPU_C] = _op_mask_pt_pas_mas_dp; op_mask_pt_funcs[SP][SM_AS][SC_N][DP_AN][CPU_C] = _op_mask_pt_p_mas_dpan; op_mask_pt_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_C] = _op_mask_pt_pas_mas_dpan; } #endif evas-1.7.9/src/lib/engines/common/evas_op_mask/op_mask_pixel_i386.c0000664000175000017500000000315712175475547022133 00000000000000/* mask pixel --> dst */ #ifdef BUILD_MMX static void _op_mask_p_dp_mmx(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c __UNUSED__, DATA32 *d, int l) { DATA32 *e = d + l; MOV_A2R(ALPHA_255, mm5) pxor_r2r(mm0, mm0); for (; d < e; d++) { MOV_P2R(*d, mm1, mm0) MOV_PA2R(*s, mm2) MUL4_SYM_R2R(mm2, mm1, mm5) MOV_R2P(mm1, *d, mm0) } } #define _op_mask_pas_dp_mmx _op_mask_p_dp_mmx #define _op_mask_p_dpan_mmx _op_mask_p_dp_mmx #define _op_mask_pas_dpan_mmx _op_mask_pas_dp_mmx static void init_mask_pixel_span_funcs_mmx(void) { op_mask_span_funcs[SP][SM_N][SC_N][DP][CPU_MMX] = _op_mask_p_dp_mmx; op_mask_span_funcs[SP_AS][SM_N][SC_N][DP][CPU_MMX] = _op_mask_pas_dp_mmx; op_mask_span_funcs[SP][SM_N][SC_N][DP_AN][CPU_MMX] = _op_mask_p_dpan_mmx; op_mask_span_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_MMX] = _op_mask_pas_dpan_mmx; } #endif #ifdef BUILD_MMX static void _op_mask_pt_p_dp_mmx(DATA32 s, DATA8 m __UNUSED__, DATA32 c __UNUSED__, DATA32 *d) { MOV_A2R(ALPHA_255, mm5) pxor_r2r(mm0, mm0); MOV_P2R(*d, mm1, mm0) MOV_PA2R(s, mm2) MUL4_SYM_R2R(mm2, mm1, mm5) MOV_R2P(mm1, *d, mm0) } #define _op_mask_pt_pas_dp_mmx _op_mask_pt_p_dp_mmx #define _op_mask_pt_p_dpan_mmx _op_mask_pt_p_dp_mmx #define _op_mask_pt_pas_dpan_mmx _op_mask_pt_pas_dp_mmx static void init_mask_pixel_pt_funcs_mmx(void) { op_mask_pt_funcs[SP][SM_N][SC_N][DP][CPU_MMX] = _op_mask_pt_p_dp_mmx; op_mask_pt_funcs[SP_AS][SM_N][SC_N][DP][CPU_MMX] = _op_mask_pt_pas_dp_mmx; op_mask_pt_funcs[SP][SM_N][SC_N][DP_AN][CPU_MMX] = _op_mask_pt_p_dpan_mmx; op_mask_pt_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_MMX] = _op_mask_pt_pas_dpan_mmx; } #endif evas-1.7.9/src/lib/engines/common/evas_op_mask/Makefile.am0000664000175000017500000000044312175475547020413 00000000000000MAINTAINERCLEANFILES = Makefile.in EXTRA_DIST = \ op_mask_color_.c \ op_mask_color_i386.c \ op_mask_mask_color_.c \ op_mask_mask_color_i386.c \ op_mask_pixel_.c \ op_mask_pixel_color_.c \ op_mask_pixel_color_i386.c \ op_mask_pixel_i386.c \ op_mask_pixel_mask_.c \ op_mask_pixel_mask_i386.c evas-1.7.9/src/lib/engines/common/evas_convert_gry_4.c0000664000175000017500000000070512175475547017657 00000000000000#include "evas_common.h" #include "evas_convert_gry_4.h" #ifdef BUILD_CONVERT_4_GRY_4 void evas_common_convert_rgba_to_4bpp_gry_4_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal){} #endif #ifdef BUILD_CONVERT_4_GRY_1 void evas_common_convert_rgba_to_4bpp_gry_1_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal){} #endif evas-1.7.9/src/lib/engines/common/evas_convert_rgb_24.c0000664000175000017500000000406612175475547017716 00000000000000#include "evas_common.h" #include "evas_convert_rgb_24.h" #ifdef BUILD_CONVERT_24_RGB_888 void evas_common_convert_rgba_to_24bpp_rgb_888(DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x __UNUSED__, int dith_y __UNUSED__, DATA8 *pal __UNUSED__) { DATA32 *src_ptr; DATA8 *dst_ptr; int x, y; dst_ptr = (DATA8 *)dst; src_ptr = (DATA32 *)src; for (y = 0; y < h; y++) { for (x = 0; x < w; x++) { dst_ptr[0] = R_VAL(src_ptr); dst_ptr[1] = G_VAL(src_ptr); dst_ptr[2] = B_VAL(src_ptr); src_ptr++; dst_ptr+=3; } src_ptr += src_jump; dst_ptr += dst_jump; } return; } #endif #ifdef BUILD_CONVERT_24_RGB_666 void evas_common_convert_rgba_to_24bpp_rgb_666(DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x __UNUSED__, int dith_y __UNUSED__, DATA8 *pal __UNUSED__) { DATA32 *src_ptr; DATA8 *dst_ptr, *scratch_ptr; DATA32 scratch; int x, y; dst_ptr = (DATA8 *)dst; src_ptr = (DATA32 *)src; scratch_ptr = (DATA8 *)(&scratch); for (y = 0; y < h; y++) { for (x = 0; x < w; x++) { scratch = (((R_VAL(src_ptr) << 12) | (B_VAL(src_ptr) >> 2)) & 0x03f03f) | ((G_VAL(src_ptr) << 4) & 0x000fc0); dst_ptr[0] = scratch_ptr[1]; dst_ptr[1] = scratch_ptr[2]; dst_ptr[2] = scratch_ptr[3]; src_ptr++; dst_ptr+=3; } src_ptr += src_jump; dst_ptr += dst_jump; } return; } #endif #ifdef BUILD_CONVERT_24_BGR_888 void evas_common_convert_rgba_to_24bpp_bgr_888(DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x __UNUSED__, int dith_y __UNUSED__, DATA8 *pal __UNUSED__) { DATA32 *src_ptr; DATA8 *dst_ptr; int x, y; dst_ptr = (DATA8 *)dst; src_ptr = (DATA32 *)src; for (y = 0; y < h; y++) { for (x = 0; x < w; x++) { dst_ptr[2] = R_VAL(src_ptr); dst_ptr[1] = G_VAL(src_ptr); dst_ptr[0] = B_VAL(src_ptr); src_ptr++; dst_ptr+=3; } src_ptr += src_jump; dst_ptr += dst_jump; } return; } #endif evas-1.7.9/src/lib/engines/common/evas_convert_main.c0000664000175000017500000023262312175475547017565 00000000000000#include "evas_common.h" #include "evas_convert_rgb_8.h" #include "evas_convert_rgb_16.h" #include "evas_convert_rgb_24.h" #include "evas_convert_rgb_32.h" #include "evas_convert_grypal_6.h" #include "evas_convert_gry_8.h" #include "evas_convert_yuv.h" #ifdef USE_DITHER_44 const DATA8 _evas_dither_44[4][4] = { { 0, 8, 2, 10}, {12, 4, 14, 6}, { 3, 11, 1, 9}, {15, 7, 13, 5} }; #endif #ifdef USE_DITHER_128128 const DATA8 _evas_dither_128128[128][128] = { { 0, 41, 23, 5, 17, 39, 7, 15, 62, 23, 40, 51, 31, 47, 9, 32, 52, 27, 57, 25, 6, 61, 27, 52, 37, 7, 40, 63, 18, 36, 10, 42, 25, 62, 45, 34, 20, 42, 37, 14, 35, 29, 50, 10, 61, 2, 40, 8, 37, 12, 58, 22, 5, 41, 10, 39, 0, 60, 11, 46, 2, 55, 38, 17, 36, 59, 13, 54, 37, 56, 8, 29, 16, 13, 63, 22, 41, 55, 7, 20, 49, 14, 23, 55, 37, 23, 19, 36, 15, 49, 23, 63, 30, 14, 38, 27, 53, 13, 22, 41, 19, 31, 7, 19, 50, 30, 49, 16, 3, 32, 56, 40, 29, 34, 8, 48, 19, 45, 4, 51, 12, 46, 35, 49, 16, 42, 12, 62 }, { 30, 57, 36, 54, 47, 34, 52, 27, 43, 4, 28, 7, 17, 36, 62, 13, 44, 7, 18, 48, 33, 21, 44, 14, 30, 47, 12, 33, 5, 55, 31, 58, 13, 30, 4, 17, 52, 10, 60, 26, 46, 0, 39, 27, 42, 22, 47, 25, 60, 32, 9, 38, 48, 17, 59, 30, 49, 18, 34, 25, 51, 19, 5, 48, 21, 8, 28, 46, 1, 32, 41, 19, 54, 47, 37, 18, 28, 11, 44, 30, 39, 56, 2, 33, 8, 42, 61, 28, 58, 8, 46, 9, 41, 4, 58, 7, 21, 48, 59, 10, 52, 14, 42, 57, 12, 25, 7, 53, 42, 24, 11, 50, 17, 59, 42, 2, 36, 60, 32, 17, 63, 29, 21, 7, 59, 32, 24, 39 }, { 22, 8, 16, 32, 3, 25, 13, 57, 18, 45, 58, 39, 55, 20, 5, 42, 23, 34, 63, 1, 51, 10, 58, 4, 60, 23, 53, 27, 44, 21, 3, 48, 8, 50, 43, 54, 27, 32, 5, 55, 21, 58, 12, 53, 6, 36, 14, 50, 17, 29, 53, 15, 24, 52, 7, 36, 13, 42, 4, 53, 9, 35, 61, 26, 56, 32, 49, 15, 62, 23, 6, 60, 2, 31, 4, 48, 58, 38, 15, 61, 5, 25, 47, 28, 50, 15, 7, 40, 3, 32, 33, 52, 25, 50, 35, 42, 61, 3, 28, 36, 23, 63, 4, 33, 46, 62, 36, 23, 60, 6, 54, 28, 4, 37, 23, 55, 25, 8, 42, 54, 14, 6, 56, 38, 19, 52, 4, 46 }, { 48, 53, 43, 12, 45, 63, 30, 37, 9, 34, 21, 1, 25, 47, 29, 58, 3, 54, 15, 39, 29, 17, 38, 35, 20, 43, 1, 49, 15, 59, 29, 39, 22, 35, 16, 23, 1, 47, 39, 18, 8, 44, 25, 31, 57, 19, 63, 4, 45, 3, 42, 61, 1, 31, 45, 20, 57, 29, 62, 21, 32, 41, 14, 44, 3, 39, 5, 34, 10, 43, 51, 35, 23, 52, 40, 10, 21, 1, 53, 18, 51, 43, 12, 62, 18, 54, 26, 51, 20, 57, 14, 1, 62, 16, 11, 18, 32, 39, 17, 44, 1, 48, 26, 37, 18, 2, 51, 14, 28, 45, 35, 18, 57, 13, 47, 11, 51, 20, 2, 39, 31, 47, 25, 1, 50, 11, 60, 7 }, { 18, 28, 1, 56, 21, 10, 51, 2, 46, 54, 14, 61, 11, 50, 13, 38, 19, 31, 45, 9, 55, 24, 47, 5, 54, 9, 62, 11, 35, 8, 51, 14, 57, 6, 63, 40, 58, 14, 51, 28, 62, 34, 15, 48, 1, 41, 30, 35, 55, 21, 34, 11, 49, 37, 8, 52, 4, 23, 15, 43, 1, 58, 11, 23, 53, 16, 55, 26, 58, 18, 27, 12, 45, 14, 25, 63, 42, 33, 27, 35, 9, 31, 21, 38, 1, 44, 34, 12, 48, 38, 21, 44, 29, 47, 26, 53, 1, 46, 54, 8, 59, 29, 11, 55, 22, 41, 33, 20, 39, 1, 48, 9, 44, 32, 5, 62, 29, 44, 57, 23, 10, 58, 34, 43, 15, 37, 26, 33 }, { 51, 38, 59, 24, 35, 42, 19, 60, 5, 32, 41, 26, 43, 33, 7, 53, 48, 11, 59, 23, 42, 2, 61, 30, 16, 40, 32, 24, 56, 41, 19, 33, 37, 26, 47, 9, 31, 22, 2, 45, 9, 54, 4, 37, 21, 52, 11, 23, 7, 57, 16, 25, 55, 18, 63, 27, 46, 39, 56, 10, 50, 37, 29, 47, 19, 63, 24, 9, 46, 2, 39, 60, 9, 57, 30, 7, 49, 11, 59, 3, 45, 57, 5, 60, 29, 22, 5, 60, 30, 9, 59, 18, 40, 6, 57, 36, 30, 12, 24, 34, 15, 40, 52, 6, 49, 9, 58, 4, 63, 12, 26, 61, 22, 53, 38, 16, 35, 14, 28, 50, 42, 17, 5, 28, 62, 20, 54, 12 }, { 26, 6, 31, 15, 49, 6, 38, 27, 22, 49, 16, 56, 2, 62, 30, 21, 0, 36, 28, 6, 49, 32, 13, 52, 26, 50, 19, 46, 3, 26, 62, 0, 53, 12, 29, 3, 53, 41, 60, 24, 38, 13, 58, 16, 43, 9, 59, 39, 46, 28, 44, 40, 2, 33, 13, 41, 16, 6, 47, 31, 26, 17, 57, 6, 38, 0, 42, 36, 29, 52, 20, 31, 48, 0, 34, 56, 20, 36, 23, 54, 14, 41, 24, 37, 10, 55, 46, 25, 16, 45, 36, 4, 55, 23, 15, 8, 50, 62, 5, 56, 44, 20, 13, 28, 59, 31, 24, 47, 31, 52, 37, 17, 40, 0, 26, 49, 3, 60, 7, 33, 0, 61, 53, 40, 8, 45, 2, 41 }, { 16, 63, 43, 4, 61, 24, 56, 13, 53, 8, 36, 12, 24, 41, 16, 46, 60, 26, 52, 39, 14, 57, 21, 37, 0, 45, 7, 59, 38, 17, 43, 10, 45, 20, 61, 43, 19, 11, 33, 17, 50, 32, 23, 61, 28, 49, 26, 0, 18, 51, 5, 60, 22, 58, 29, 0, 59, 34, 19, 62, 3, 52, 7, 44, 30, 59, 13, 50, 15, 62, 7, 17, 38, 22, 44, 15, 40, 4, 47, 28, 33, 17, 49, 16, 51, 40, 10, 56, 0, 53, 13, 49, 28, 38, 60, 21, 43, 19, 37, 27, 3, 51, 34, 39, 0, 45, 15, 43, 10, 21, 3, 55, 8, 33, 59, 10, 41, 18, 52, 24, 46, 20, 30, 13, 58, 22, 36, 57 }, { 50, 34, 11, 47, 29, 17, 44, 0, 33, 63, 28, 46, 52, 5, 57, 10, 42, 18, 4, 63, 20, 8, 44, 10, 56, 34, 14, 29, 5, 54, 23, 59, 32, 49, 7, 34, 49, 27, 56, 0, 42, 7, 46, 3, 40, 6, 54, 32, 62, 13, 36, 10, 47, 8, 35, 49, 24, 51, 12, 40, 22, 35, 60, 12, 22, 51, 33, 4, 40, 25, 43, 55, 5, 54, 12, 61, 26, 51, 8, 62, 0, 53, 7, 63, 2, 32, 19, 34, 42, 24, 31, 63, 2, 10, 45, 33, 0, 48, 9, 61, 22, 47, 8, 62, 18, 56, 7, 54, 27, 57, 46, 30, 50, 19, 45, 30, 56, 36, 22, 47, 11, 38, 3, 51, 32, 48, 18, 9 }, { 0, 21, 40, 19, 52, 9, 37, 48, 20, 40, 3, 18, 27, 38, 35, 22, 31, 56, 13, 35, 46, 28, 60, 40, 27, 18, 61, 50, 41, 30, 7, 36, 2, 25, 16, 57, 5, 15, 47, 29, 55, 19, 30, 52, 15, 34, 20, 12, 43, 30, 20, 54, 25, 44, 53, 12, 38, 5, 55, 27, 48, 15, 33, 27, 45, 8, 19, 28, 56, 11, 33, 49, 18, 36, 29, 2, 45, 16, 39, 19, 31, 43, 27, 35, 20, 52, 26, 6, 61, 11, 41, 17, 29, 51, 20, 56, 25, 32, 41, 17, 53, 31, 25, 14, 42, 23, 35, 16, 38, 6, 34, 12, 15, 62, 6, 21, 13, 1, 63, 9, 55, 27, 43, 25, 14, 4, 31, 55 }, { 44, 29, 61, 2, 35, 58, 26, 15, 60, 10, 51, 59, 14, 55, 8, 50, 2, 44, 25, 51, 1, 33, 16, 4, 48, 36, 2, 21, 12, 57, 48, 13, 51, 55, 40, 28, 37, 62, 8, 39, 12, 63, 36, 10, 59, 24, 56, 47, 9, 50, 41, 1, 32, 17, 6, 21, 61, 30, 9, 43, 1, 54, 41, 2, 54, 37, 48, 61, 1, 46, 21, 3, 58, 24, 50, 32, 60, 10, 57, 25, 46, 12, 59, 4, 45, 13, 57, 47, 27, 39, 5, 58, 47, 14, 35, 4, 52, 13, 60, 6, 36, 10, 45, 55, 4, 50, 29, 2, 61, 50, 25, 58, 44, 24, 36, 42, 54, 28, 40, 32, 16, 56, 6, 62, 46, 39, 60, 23 }, { 7, 48, 14, 54, 23, 40, 4, 45, 30, 22, 42, 32, 1, 44, 20, 29, 58, 8, 37, 19, 41, 54, 24, 58, 9, 53, 25, 46, 34, 16, 23, 38, 27, 11, 18, 1, 52, 21, 35, 22, 48, 5, 25, 45, 18, 38, 2, 27, 35, 4, 57, 15, 62, 39, 57, 28, 42, 16, 36, 60, 24, 18, 10, 63, 20, 5, 16, 23, 37, 14, 59, 27, 41, 8, 13, 42, 21, 35, 6, 50, 3, 38, 15, 48, 30, 39, 17, 3, 49, 14, 53, 33, 24, 7, 61, 44, 11, 39, 23, 49, 19, 58, 1, 32, 36, 12, 60, 41, 20, 13, 41, 4, 39, 1, 48, 8, 18, 51, 14, 44, 5, 37, 21, 34, 1, 26, 10, 37 }, { 53, 36, 27, 9, 50, 12, 32, 55, 2, 57, 7, 17, 48, 34, 63, 15, 40, 26, 62, 11, 49, 6, 31, 39, 22, 42, 6, 63, 1, 39, 60, 4, 42, 61, 32, 45, 24, 44, 2, 60, 16, 41, 53, 1, 33, 61, 49, 17, 63, 23, 45, 26, 33, 3, 23, 46, 2, 50, 20, 4, 45, 34, 49, 30, 39, 58, 44, 31, 53, 34, 6, 52, 30, 47, 63, 1, 53, 22, 42, 31, 58, 23, 54, 22, 61, 8, 36, 59, 22, 35, 21, 1, 55, 40, 27, 16, 30, 54, 2, 29, 43, 16, 39, 63, 21, 46, 26, 10, 48, 32, 19, 53, 30, 56, 26, 60, 33, 4, 61, 23, 49, 59, 15, 53, 19, 58, 42, 16 }, { 20, 5, 59, 46, 25, 62, 7, 19, 43, 25, 37, 61, 11, 24, 4, 54, 12, 52, 3, 32, 17, 61, 12, 47, 15, 55, 18, 31, 53, 28, 9, 50, 21, 6, 55, 9, 58, 14, 54, 26, 33, 7, 31, 58, 13, 21, 8, 42, 29, 6, 37, 11, 48, 52, 14, 60, 11, 39, 56, 32, 14, 58, 7, 26, 17, 4, 42, 8, 11, 47, 19, 38, 10, 17, 26, 37, 9, 55, 28, 13, 18, 40, 6, 33, 1, 43, 25, 11, 51, 7, 62, 43, 18, 37, 3, 57, 45, 9, 38, 58, 5, 52, 27, 7, 17, 53, 5, 57, 37, 2, 63, 9, 22, 15, 11, 38, 25, 45, 35, 0, 28, 10, 41, 30, 50, 8, 31, 57 }, { 49, 33, 16, 38, 1, 42, 51, 34, 53, 14, 28, 49, 30, 56, 36, 23, 43, 20, 38, 56, 22, 45, 28, 0, 62, 35, 26, 44, 11, 19, 52, 35, 44, 15, 30, 38, 10, 31, 40, 4, 46, 50, 20, 40, 27, 44, 51, 14, 56, 53, 19, 59, 7, 29, 41, 19, 35, 25, 8, 52, 22, 44, 13, 53, 50, 32, 61, 24, 56, 25, 63, 0, 45, 57, 33, 59, 16, 46, 4, 62, 50, 11, 60, 37, 52, 19, 55, 29, 37, 46, 13, 26, 48, 10, 50, 34, 21, 63, 26, 13, 42, 33, 22, 55, 35, 28, 43, 15, 24, 51, 27, 34, 46, 49, 58, 3, 52, 9, 57, 19, 48, 55, 3, 35, 12, 45, 24, 3 }, { 41, 11, 56, 28, 18, 31, 22, 10, 37, 6, 47, 13, 3, 41, 9, 46, 0, 48, 29, 6, 34, 10, 55, 37, 20, 8, 49, 3, 41, 59, 14, 25, 0, 63, 19, 47, 27, 51, 17, 57, 23, 10, 61, 6, 54, 3, 38, 31, 0, 22, 34, 43, 20, 55, 31, 0, 49, 63, 29, 38, 3, 62, 28, 40, 0, 22, 14, 35, 2, 48, 15, 43, 23, 14, 3, 29, 49, 20, 39, 34, 0, 44, 29, 9, 15, 47, 5, 42, 0, 31, 58, 5, 31, 61, 23, 15, 0, 47, 19, 50, 24, 3, 59, 11, 44, 0, 31, 59, 6, 42, 17, 60, 0, 39, 20, 31, 43, 17, 29, 40, 12, 25, 60, 22, 52, 15, 63, 29 }, { 20, 52, 8, 44, 62, 4, 59, 49, 17, 63, 21, 39, 60, 18, 52, 27, 33, 59, 14, 51, 59, 43, 24, 5, 51, 30, 57, 17, 32, 5, 37, 56, 48, 34, 42, 3, 60, 5, 36, 13, 43, 37, 18, 34, 25, 12, 59, 24, 47, 36, 11, 50, 3, 38, 9, 58, 16, 5, 43, 18, 47, 10, 37, 18, 59, 46, 29, 52, 40, 12, 34, 28, 56, 36, 53, 7, 43, 8, 24, 52, 26, 17, 56, 43, 24, 32, 63, 20, 57, 16, 22, 52, 36, 8, 41, 56, 29, 32, 54, 7, 35, 57, 14, 48, 20, 62, 13, 39, 53, 29, 8, 45, 13, 29, 7, 61, 14, 54, 6, 63, 38, 32, 18, 43, 2, 39, 6, 47 }, { 0, 58, 23, 35, 13, 46, 12, 39, 0, 31, 55, 24, 5, 35, 15, 61, 17, 5, 39, 25, 18, 2, 50, 33, 41, 13, 39, 23, 62, 46, 29, 12, 22, 8, 56, 25, 20, 49, 32, 62, 0, 56, 11, 46, 63, 42, 9, 16, 55, 5, 60, 15, 62, 26, 45, 21, 36, 51, 13, 57, 31, 24, 55, 6, 35, 9, 57, 5, 20, 60, 7, 51, 5, 19, 40, 25, 61, 32, 56, 12, 36, 48, 21, 2, 58, 12, 39, 28, 9, 50, 40, 12, 44, 18, 25, 49, 6, 38, 11, 62, 18, 46, 30, 9, 40, 25, 49, 19, 10, 36, 55, 22, 33, 52, 41, 18, 37, 27, 49, 21, 2, 46, 7, 53, 33, 61, 27, 35 }, { 41, 31, 5, 39, 51, 26, 33, 57, 27, 41, 9, 44, 54, 29, 48, 7, 44, 36, 57, 10, 31, 63, 16, 45, 11, 60, 1, 47, 7, 20, 43, 3, 58, 36, 13, 52, 39, 7, 15, 28, 22, 48, 30, 21, 1, 29, 49, 44, 27, 17, 40, 30, 24, 42, 12, 53, 33, 7, 47, 20, 1, 42, 11, 49, 25, 43, 17, 32, 45, 27, 41, 21, 31, 62, 11, 49, 2, 15, 42, 5, 63, 7, 41, 27, 49, 6, 54, 23, 46, 34, 2, 28, 54, 3, 59, 12, 46, 17, 42, 28, 40, 1, 37, 51, 5, 55, 2, 34, 47, 16, 3, 62, 47, 5, 23, 56, 1, 44, 12, 34, 51, 16, 57, 11, 25, 17, 54, 13 }, { 60, 26, 55, 18, 3, 60, 20, 6, 52, 15, 50, 19, 32, 11, 23, 53, 26, 21, 1, 47, 42, 27, 8, 58, 21, 27, 53, 36, 26, 54, 31, 50, 17, 30, 45, 1, 29, 59, 44, 53, 41, 4, 35, 58, 51, 19, 32, 4, 52, 34, 48, 8, 51, 5, 56, 2, 25, 61, 27, 38, 54, 27, 62, 21, 51, 1, 39, 62, 10, 50, 1, 58, 13, 47, 38, 18, 35, 54, 22, 51, 30, 19, 59, 34, 14, 32, 44, 4, 60, 15, 52, 62, 20, 43, 30, 35, 21, 60, 4, 52, 12, 24, 61, 18, 30, 42, 23, 61, 25, 50, 27, 38, 11, 59, 12, 35, 50, 30, 59, 24, 8, 42, 28, 37, 48, 9, 44, 21 }, { 10, 47, 15, 50, 30, 43, 8, 45, 29, 2, 36, 59, 1, 58, 41, 3, 63, 31, 54, 20, 13, 55, 35, 38, 4, 44, 15, 9, 61, 2, 14, 38, 61, 10, 23, 54, 18, 12, 24, 2, 14, 55, 16, 8, 38, 14, 41, 60, 10, 23, 1, 58, 32, 17, 28, 37, 41, 15, 3, 60, 15, 33, 4, 36, 16, 59, 28, 14, 23, 55, 37, 18, 44, 28, 2, 57, 30, 10, 27, 46, 14, 38, 3, 53, 21, 61, 17, 35, 10, 41, 26, 7, 33, 9, 57, 1, 53, 37, 26, 20, 56, 48, 9, 33, 58, 16, 37, 7, 45, 1, 57, 15, 32, 26, 42, 23, 7, 20, 4, 54, 31, 62, 22, 1, 59, 30, 4, 51 }, { 36, 2, 38, 11, 24, 36, 54, 22, 62, 47, 25, 8, 28, 45, 16, 38, 12, 43, 9, 37, 49, 3, 23, 52, 18, 30, 50, 33, 19, 42, 49, 26, 6, 40, 47, 35, 63, 38, 50, 33, 60, 26, 36, 47, 24, 57, 6, 26, 39, 63, 19, 44, 14, 46, 61, 9, 50, 30, 45, 23, 10, 50, 44, 8, 31, 54, 6, 46, 36, 4, 30, 54, 8, 52, 22, 41, 4, 60, 40, 0, 58, 24, 45, 10, 37, 1, 48, 30, 56, 17, 38, 48, 24, 47, 19, 39, 14, 8, 45, 32, 2, 34, 27, 44, 4, 52, 11, 56, 31, 21, 40, 19, 44, 51, 2, 63, 46, 58, 36, 43, 14, 5, 50, 38, 14, 56, 40, 23 }, { 61, 46, 32, 63, 54, 1, 14, 34, 12, 40, 18, 49, 37, 10, 61, 30, 51, 24, 60, 7, 29, 40, 62, 11, 46, 58, 6, 56, 24, 10, 34, 52, 21, 59, 16, 3, 27, 5, 20, 46, 9, 40, 7, 62, 2, 30, 53, 15, 48, 10, 28, 35, 54, 6, 21, 34, 18, 55, 7, 40, 57, 19, 26, 60, 41, 13, 24, 51, 19, 61, 9, 25, 34, 15, 63, 11, 45, 17, 20, 47, 33, 8, 31, 62, 43, 26, 53, 7, 24, 59, 0, 13, 55, 4, 62, 27, 51, 31, 63, 15, 58, 7, 54, 14, 46, 22, 28, 43, 12, 63, 8, 54, 5, 17, 39, 33, 15, 10, 27, 17, 47, 34, 19, 45, 27, 12, 33, 17 }, { 5, 28, 21, 7, 17, 48, 42, 58, 23, 4, 63, 14, 55, 21, 34, 5, 19, 0, 45, 17, 52, 15, 25, 32, 0, 22, 40, 13, 45, 62, 18, 0, 43, 11, 33, 55, 30, 42, 57, 19, 51, 31, 22, 43, 18, 45, 34, 0, 43, 31, 56, 3, 23, 40, 59, 0, 44, 13, 48, 35, 2, 32, 46, 0, 21, 48, 35, 3, 40, 32, 43, 59, 0, 48, 33, 26, 53, 36, 55, 12, 51, 16, 55, 5, 18, 29, 11, 39, 51, 19, 45, 31, 42, 21, 35, 6, 22, 47, 10, 38, 23, 50, 20, 36, 0, 60, 38, 4, 50, 35, 48, 34, 24, 57, 9, 53, 28, 48, 61, 0, 56, 24, 53, 3, 63, 6, 42, 57 }, { 13, 53, 45, 40, 58, 27, 6, 16, 38, 51, 33, 30, 43, 2, 47, 56, 40, 50, 33, 57, 27, 5, 47, 42, 60, 36, 16, 54, 28, 4, 37, 57, 28, 51, 22, 8, 45, 14, 6, 39, 0, 54, 11, 59, 28, 12, 50, 21, 61, 13, 19, 38, 49, 11, 25, 37, 58, 29, 22, 63, 14, 56, 12, 53, 30, 63, 9, 57, 26, 12, 47, 16, 23, 39, 50, 6, 31, 2, 25, 6, 28, 41, 36, 22, 50, 57, 42, 3, 34, 8, 28, 61, 11, 50, 16, 54, 41, 0, 55, 43, 5, 29, 41, 63, 25, 16, 53, 18, 26, 10, 21, 0, 61, 30, 41, 22, 3, 38, 20, 39, 29, 8, 41, 16, 36, 52, 22, 19 }, { 55, 34, 0, 25, 10, 32, 56, 44, 28, 0, 57, 7, 26, 53, 23, 8, 13, 35, 22, 12, 36, 60, 20, 8, 14, 29, 48, 2, 41, 49, 23, 13, 39, 7, 48, 58, 25, 53, 34, 62, 28, 16, 48, 4, 37, 56, 27, 5, 36, 52, 46, 7, 62, 33, 52, 11, 17, 53, 5, 28, 41, 24, 38, 17, 5, 39, 20, 45, 15, 56, 5, 38, 60, 8, 14, 57, 21, 48, 62, 39, 59, 13, 1, 60, 9, 32, 16, 63, 44, 25, 52, 15, 36, 2, 60, 29, 12, 33, 25, 17, 59, 45, 13, 8, 49, 32, 6, 40, 59, 29, 45, 37, 13, 47, 6, 55, 30, 45, 9, 52, 13, 59, 25, 47, 32, 1, 49, 30 }, { 9, 39, 14, 61, 49, 37, 3, 20, 50, 13, 41, 19, 46, 17, 38, 59, 28, 62, 4, 44, 54, 1, 34, 51, 55, 7, 63, 32, 21, 8, 56, 31, 62, 19, 36, 1, 41, 17, 24, 12, 42, 35, 25, 52, 20, 8, 44, 59, 25, 2, 22, 42, 16, 29, 4, 46, 20, 36, 43, 9, 51, 8, 49, 26, 58, 33, 54, 1, 37, 29, 52, 20, 27, 45, 19, 35, 42, 16, 10, 32, 20, 49, 46, 27, 40, 4, 47, 22, 13, 55, 4, 47, 26, 44, 23, 40, 58, 19, 48, 13, 31, 2, 57, 34, 42, 19, 61, 32, 14, 55, 5, 51, 26, 19, 58, 16, 49, 14, 62, 5, 33, 44, 21, 7, 60, 26, 11, 41 }, { 62, 24, 47, 29, 8, 19, 53, 11, 60, 24, 32, 61, 4, 55, 31, 2, 49, 16, 39, 9, 31, 24, 43, 17, 26, 38, 11, 25, 58, 43, 12, 35, 3, 46, 15, 32, 63, 4, 49, 56, 2, 60, 10, 32, 63, 17, 39, 12, 55, 30, 57, 9, 48, 55, 39, 24, 60, 2, 58, 31, 19, 61, 34, 3, 42, 11, 22, 46, 7, 61, 10, 42, 3, 55, 32, 1, 58, 28, 44, 54, 4, 34, 23, 15, 56, 20, 37, 58, 6, 30, 38, 18, 63, 9, 32, 5, 51, 3, 62, 37, 52, 18, 39, 23, 3, 51, 9, 47, 1, 23, 43, 15, 60, 35, 11, 40, 1, 36, 31, 26, 57, 2, 37, 54, 18, 44, 58, 16 }, { 5, 51, 3, 33, 43, 62, 21, 42, 35, 9, 48, 15, 36, 10, 22, 42, 20, 46, 26, 56, 50, 12, 59, 3, 48, 19, 45, 53, 1, 27, 47, 17, 52, 24, 56, 11, 51, 21, 37, 30, 20, 46, 14, 41, 1, 47, 33, 7, 41, 17, 35, 27, 20, 1, 14, 54, 26, 33, 18, 47, 1, 44, 14, 59, 16, 52, 28, 18, 49, 31, 25, 34, 63, 13, 51, 24, 9, 50, 3, 23, 38, 63, 7, 52, 29, 46, 11, 33, 50, 22, 57, 36, 1, 57, 49, 17, 39, 28, 9, 35, 6, 27, 53, 15, 55, 30, 24, 58, 36, 41, 11, 52, 32, 3, 44, 25, 62, 23, 51, 15, 42, 22, 50, 10, 39, 4, 31, 35 }, { 46, 22, 57, 17, 12, 39, 26, 5, 31, 59, 1, 45, 27, 62, 52, 7, 58, 33, 6, 18, 39, 22, 33, 41, 57, 5, 35, 18, 40, 16, 60, 5, 29, 42, 7, 39, 27, 44, 9, 47, 8, 26, 54, 22, 51, 29, 24, 49, 15, 61, 4, 51, 31, 63, 43, 6, 50, 8, 39, 12, 53, 37, 23, 30, 40, 6, 62, 43, 14, 53, 2, 49, 7, 36, 17, 41, 61, 37, 18, 56, 11, 18, 44, 35, 2, 19, 61, 0, 41, 14, 8, 30, 43, 12, 24, 46, 14, 54, 42, 21, 44, 61, 10, 46, 37, 11, 44, 7, 18, 63, 20, 29, 7, 49, 28, 54, 8, 43, 4, 48, 18, 63, 12, 29, 48, 24, 59, 20 }, { 13, 36, 28, 54, 35, 2, 56, 46, 16, 49, 22, 40, 11, 34, 14, 43, 29, 12, 63, 48, 2, 61, 7, 15, 28, 30, 50, 9, 61, 33, 38, 23, 54, 13, 61, 33, 3, 59, 16, 35, 58, 40, 5, 38, 13, 57, 3, 58, 37, 21, 45, 12, 39, 7, 35, 30, 13, 56, 22, 62, 27, 6, 55, 10, 48, 21, 33, 2, 38, 23, 40, 20, 44, 29, 59, 4, 26, 12, 33, 47, 28, 53, 31, 13, 59, 41, 27, 49, 26, 54, 45, 16, 53, 21, 35, 7, 59, 26, 11, 56, 1, 24, 33, 4, 28, 62, 21, 49, 31, 2, 56, 39, 24, 58, 13, 17, 37, 21, 56, 10, 38, 0, 34, 55, 15, 43, 1, 52 }, { 42, 9, 50, 6, 25, 60, 14, 38, 10, 29, 53, 18, 57, 3, 25, 51, 0, 53, 25, 17, 29, 37, 52, 46, 0, 62, 14, 37, 4, 50, 10, 44, 0, 46, 20, 25, 50, 19, 55, 0, 23, 31, 62, 34, 11, 45, 19, 32, 0, 53, 10, 59, 23, 47, 18, 60, 42, 28, 37, 3, 50, 15, 35, 44, 0, 51, 27, 60, 9, 57, 16, 58, 11, 22, 46, 15, 53, 48, 7, 42, 0, 60, 5, 49, 24, 54, 9, 17, 39, 5, 34, 62, 3, 40, 60, 31, 0, 47, 29, 16, 49, 39, 59, 17, 50, 0, 40, 13, 53, 38, 16, 46, 0, 42, 34, 60, 2, 53, 29, 31, 58, 46, 27, 6, 61, 8, 37, 28 }, { 0, 63, 21, 40, 45, 18, 51, 23, 63, 34, 6, 43, 28, 38, 55, 19, 40, 35, 8, 41, 54, 10, 21, 32, 39, 23, 53, 26, 55, 28, 22, 63, 30, 34, 9, 48, 6, 38, 29, 43, 49, 6, 18, 52, 27, 61, 9, 43, 28, 42, 33, 26, 56, 3, 51, 23, 0, 48, 16, 45, 32, 25, 63, 20, 57, 17, 42, 12, 35, 47, 5, 31, 39, 56, 6, 30, 34, 21, 61, 25, 14, 40, 22, 38, 15, 6, 36, 56, 20, 60, 25, 12, 51, 27, 10, 56, 42, 20, 36, 63, 32, 6, 21, 41, 12, 34, 60, 26, 5, 48, 27, 10, 62, 19, 6, 47, 39, 14, 45, 7, 24, 17, 41, 32, 23, 51, 19, 56 }, { 45, 31, 15, 59, 4, 33, 7, 47, 0, 41, 13, 61, 4, 47, 9, 23, 60, 14, 57, 31, 4, 45, 59, 6, 58, 10, 44, 20, 8, 42, 15, 6, 55, 17, 58, 31, 53, 12, 61, 10, 15, 57, 43, 2, 23, 35, 48, 14, 54, 6, 18, 49, 15, 38, 11, 34, 62, 9, 21, 58, 11, 41, 4, 31, 38, 8, 29, 55, 19, 36, 27, 52, 0, 25, 50, 43, 1, 39, 8, 55, 35, 51, 10, 30, 45, 62, 29, 2, 46, 10, 32, 48, 18, 38, 5, 22, 33, 8, 51, 3, 14, 44, 54, 25, 57, 30, 18, 52, 33, 22, 59, 28, 36, 52, 32, 21, 26, 50, 5, 55, 35, 60, 14, 54, 4, 40, 16, 33 }, { 27, 3, 49, 10, 30, 40, 55, 27, 57, 24, 52, 21, 32, 17, 60, 30, 5, 44, 27, 49, 19, 34, 13, 24, 43, 36, 3, 49, 31, 59, 37, 48, 26, 41, 2, 41, 14, 36, 21, 32, 40, 26, 13, 49, 55, 5, 16, 40, 25, 60, 36, 1, 63, 29, 17, 44, 25, 40, 52, 5, 29, 47, 54, 13, 46, 24, 60, 4, 51, 22, 63, 14, 45, 18, 12, 62, 17, 57, 19, 42, 3, 26, 58, 48, 1, 21, 40, 52, 23, 37, 44, 1, 29, 58, 43, 50, 15, 61, 19, 45, 58, 28, 7, 48, 2, 46, 8, 42, 3, 55, 8, 50, 12, 4, 55, 10, 63, 33, 20, 40, 11, 3, 46, 20, 48, 26, 61, 11 }, { 44, 56, 24, 36, 53, 19, 12, 37, 16, 44, 7, 36, 49, 54, 11, 37, 48, 21, 15, 1, 62, 25, 47, 56, 16, 18, 51, 12, 40, 1, 24, 11, 52, 16, 23, 59, 28, 1, 45, 53, 4, 60, 37, 21, 39, 30, 63, 20, 52, 10, 30, 45, 8, 41, 54, 4, 57, 7, 34, 55, 36, 18, 23, 59, 2, 48, 11, 32, 44, 1, 41, 8, 33, 54, 38, 23, 30, 46, 6, 29, 62, 18, 32, 16, 55, 34, 14, 11, 61, 7, 55, 16, 53, 13, 23, 2, 55, 37, 26, 10, 33, 23, 36, 16, 38, 22, 56, 15, 24, 43, 35, 17, 44, 40, 25, 46, 16, 1, 57, 25, 49, 36, 28, 62, 9, 35, 7, 53 }, { 17, 38, 8, 61, 1, 50, 26, 62, 3, 31, 56, 15, 1, 26, 40, 2, 34, 51, 56, 36, 42, 9, 38, 2, 29, 60, 32, 57, 19, 62, 34, 47, 4, 57, 39, 7, 44, 63, 24, 18, 46, 28, 8, 54, 1, 34, 7, 46, 3, 37, 50, 23, 57, 21, 13, 46, 31, 20, 43, 15, 1, 61, 8, 33, 37, 17, 56, 26, 15, 49, 24, 59, 28, 3, 56, 9, 52, 32, 13, 49, 10, 43, 5, 45, 8, 25, 59, 42, 28, 33, 19, 40, 8, 63, 35, 47, 25, 4, 40, 52, 1, 60, 12, 53, 63, 9, 29, 60, 37, 19, 1, 62, 31, 20, 58, 12, 41, 30, 43, 9, 18, 52, 22, 1, 39, 30, 58, 21 }, { 13, 47, 29, 18, 43, 34, 5, 48, 20, 42, 10, 45, 30, 58, 20, 63, 24, 11, 6, 28, 54, 14, 22, 52, 41, 7, 26, 5, 45, 15, 53, 13, 35, 27, 18, 50, 12, 33, 5, 56, 10, 17, 45, 24, 59, 15, 50, 26, 56, 13, 19, 5, 32, 52, 27, 36, 2, 61, 12, 26, 49, 40, 27, 52, 13, 50, 6, 39, 61, 34, 10, 37, 48, 20, 41, 27, 2, 36, 59, 24, 54, 33, 63, 20, 38, 50, 3, 17, 52, 4, 58, 27, 45, 21, 32, 11, 48, 17, 57, 20, 46, 38, 25, 43, 4, 34, 51, 6, 13, 45, 57, 26, 6, 48, 2, 35, 53, 23, 61, 34, 59, 6, 42, 56, 13, 51, 2, 41 }, { 32, 5, 55, 23, 58, 14, 22, 52, 29, 15, 61, 25, 51, 8, 43, 13, 53, 41, 46, 20, 3, 33, 63, 11, 48, 21, 54, 38, 28, 3, 30, 43, 21, 62, 9, 31, 55, 22, 51, 29, 37, 62, 32, 12, 42, 29, 41, 9, 33, 44, 62, 28, 43, 1, 59, 19, 48, 30, 51, 39, 24, 4, 58, 19, 42, 29, 22, 43, 3, 18, 53, 5, 13, 50, 16, 60, 45, 21, 7, 40, 15, 0, 26, 53, 13, 31, 43, 24, 47, 31, 15, 49, 2, 41, 6, 59, 29, 42, 9, 30, 14, 7, 49, 18, 31, 47, 20, 39, 49, 32, 11, 41, 54, 15, 61, 18, 7, 38, 4, 13, 44, 28, 15, 32, 45, 19, 27, 49 }, { 63, 34, 11, 39, 2, 45, 37, 8, 59, 39, 33, 4, 36, 17, 48, 5, 29, 18, 32, 61, 39, 50, 5, 27, 35, 0, 46, 12, 22, 49, 60, 6, 54, 0, 38, 49, 2, 42, 15, 40, 0, 47, 20, 51, 3, 57, 18, 61, 22, 0, 39, 16, 55, 12, 35, 8, 41, 22, 6, 59, 16, 45, 10, 36, 0, 62, 9, 54, 30, 58, 21, 43, 63, 31, 7, 35, 12, 48, 58, 28, 47, 37, 41, 9, 57, 20, 61, 0, 36, 11, 57, 35, 23, 52, 37, 18, 0, 62, 22, 55, 35, 62, 27, 54, 0, 15, 61, 28, 2, 59, 22, 9, 37, 27, 33, 51, 29, 48, 19, 50, 25, 37, 10, 57, 5, 37, 60, 8 }, { 20, 25, 46, 52, 31, 60, 12, 55, 0, 19, 11, 46, 62, 35, 23, 38, 57, 0, 55, 10, 16, 30, 58, 44, 17, 59, 29, 63, 42, 8, 36, 20, 33, 46, 16, 61, 25, 35, 8, 54, 26, 7, 58, 22, 34, 6, 47, 14, 53, 31, 48, 9, 37, 25, 49, 63, 16, 55, 45, 14, 34, 63, 21, 53, 25, 33, 46, 16, 35, 7, 46, 29, 0, 39, 25, 55, 22, 34, 18, 4, 56, 11, 23, 51, 28, 6, 39, 14, 62, 44, 19, 8, 60, 12, 56, 28, 50, 34, 39, 5, 51, 3, 41, 12, 57, 35, 10, 53, 25, 17, 52, 30, 47, 0, 43, 14, 5, 57, 31, 55, 0, 63, 47, 23, 54, 24, 14, 43 }, { 0, 57, 16, 6, 26, 19, 35, 28, 49, 42, 54, 26, 21, 1, 59, 27, 9, 47, 26, 44, 50, 22, 13, 40, 8, 37, 10, 34, 17, 56, 25, 58, 13, 27, 44, 9, 20, 58, 31, 17, 60, 36, 10, 41, 53, 25, 36, 39, 4, 24, 58, 17, 60, 4, 22, 38, 10, 32, 0, 50, 31, 7, 28, 47, 12, 57, 5, 26, 52, 23, 14, 40, 57, 17, 47, 5, 53, 1, 44, 31, 19, 60, 46, 2, 35, 48, 30, 54, 22, 5, 51, 39, 25, 31, 4, 43, 14, 9, 45, 16, 24, 44, 19, 29, 40, 23, 44, 7, 38, 42, 4, 63, 12, 54, 23, 59, 22, 42, 8, 15, 40, 21, 8, 34, 3, 41, 30, 50 }, { 39, 10, 48, 33, 41, 54, 5, 47, 23, 13, 32, 7, 52, 44, 14, 39, 58, 18, 35, 6, 37, 2, 60, 24, 55, 19, 53, 2, 51, 32, 1, 41, 51, 4, 40, 29, 47, 3, 52, 44, 13, 49, 28, 16, 1, 62, 11, 27, 52, 35, 5, 42, 29, 47, 14, 56, 28, 53, 26, 38, 9, 56, 40, 3, 38, 15, 41, 60, 1, 37, 50, 25, 11, 28, 61, 19, 42, 62, 10, 52, 39, 6, 32, 14, 58, 17, 7, 26, 42, 34, 27, 10, 54, 40, 20, 63, 26, 53, 21, 61, 32, 7, 59, 48, 3, 56, 18, 31, 58, 14, 49, 21, 36, 16, 45, 9, 36, 24, 62, 45, 27, 31, 53, 17, 49, 12, 62, 18 }, { 28, 59, 21, 58, 2, 16, 38, 9, 62, 3, 56, 41, 10, 31, 50, 4, 32, 52, 12, 63, 23, 46, 33, 31, 4, 48, 25, 43, 14, 23, 47, 11, 22, 55, 14, 60, 23, 37, 11, 39, 23, 2, 45, 56, 31, 43, 19, 55, 16, 46, 21, 51, 11, 33, 44, 2, 41, 18, 5, 52, 23, 44, 17, 60, 27, 49, 11, 32, 44, 10, 54, 2, 56, 33, 8, 38, 13, 29, 36, 16, 24, 63, 27, 51, 21, 43, 56, 12, 49, 3, 59, 48, 1, 15, 46, 7, 36, 2, 47, 11, 50, 27, 37, 13, 33, 8, 51, 46, 1, 34, 28, 40, 3, 33, 60, 29, 47, 1, 35, 11, 59, 42, 2, 60, 26, 46, 6, 35 }, { 4, 43, 9, 29, 36, 63, 24, 44, 20, 50, 30, 17, 60, 22, 16, 43, 25, 3, 42, 19, 51, 15, 8, 54, 42, 15, 61, 5, 39, 57, 18, 61, 31, 48, 34, 2, 50, 19, 57, 5, 63, 33, 19, 38, 13, 27, 48, 7, 32, 61, 2, 26, 58, 6, 24, 50, 13, 61, 42, 20, 62, 2, 35, 20, 51, 4, 62, 18, 23, 58, 20, 31, 43, 15, 51, 45, 26, 50, 4, 55, 45, 3, 35, 9, 38, 1, 32, 61, 20, 45, 17, 33, 24, 57, 29, 51, 22, 58, 38, 30, 15, 1, 54, 21, 63, 43, 26, 12, 24, 56, 8, 60, 50, 19, 5, 52, 13, 54, 17, 50, 4, 16, 36, 12, 32, 56, 22, 54 }, { 51, 25, 40, 53, 12, 49, 15, 57, 34, 7, 38, 47, 2, 36, 55, 8, 61, 30, 56, 7, 28, 59, 48, 11, 27, 35, 21, 45, 28, 36, 9, 38, 6, 16, 24, 63, 10, 32, 28, 43, 21, 53, 5, 60, 8, 57, 3, 45, 11, 37, 15, 54, 40, 20, 62, 36, 27, 34, 11, 48, 30, 15, 54, 8, 30, 42, 22, 34, 48, 13, 35, 63, 4, 37, 22, 2, 59, 9, 41, 23, 13, 41, 49, 18, 59, 24, 40, 5, 37, 30, 9, 61, 44, 6, 37, 11, 33, 17, 5, 55, 41, 60, 23, 39, 17, 5, 30, 62, 41, 16, 46, 25, 11, 56, 39, 26, 20, 38, 29, 39, 22, 52, 44, 20, 48, 1, 38, 14 }, { 15, 33, 2, 18, 44, 6, 27, 0, 32, 61, 25, 12, 58, 28, 40, 20, 47, 13, 34, 43, 38, 1, 23, 62, 40, 0, 51, 10, 63, 3, 52, 26, 44, 30, 45, 6, 41, 54, 0, 51, 12, 30, 46, 24, 49, 22, 40, 33, 63, 23, 43, 30, 9, 47, 0, 17, 54, 7, 57, 3, 37, 47, 24, 46, 13, 55, 7, 52, 2, 42, 6, 26, 49, 18, 60, 34, 16, 57, 33, 20, 61, 30, 8, 54, 14, 46, 12, 53, 16, 55, 38, 13, 22, 53, 18, 59, 46, 27, 43, 19, 32, 10, 45, 6, 49, 36, 52, 2, 20, 55, 6, 39, 32, 15, 44, 3, 58, 10, 63, 6, 56, 30, 7, 58, 9, 40, 19, 63 }, { 10, 47, 61, 23, 55, 31, 52, 42, 17, 45, 4, 51, 27, 6, 15, 53, 0, 49, 26, 10, 56, 18, 36, 6, 20, 58, 32, 30, 13, 49, 19, 56, 0, 59, 12, 53, 27, 17, 38, 25, 48, 9, 15, 36, 14, 30, 59, 17, 0, 50, 8, 58, 18, 56, 31, 45, 21, 41, 29, 19, 60, 6, 32, 59, 0, 36, 29, 39, 19, 59, 46, 12, 55, 30, 10, 47, 24, 3, 28, 48, 0, 55, 44, 27, 33, 4, 63, 29, 49, 0, 26, 50, 34, 2, 42, 14, 0, 62, 9, 56, 3, 52, 28, 34, 58, 9, 20, 48, 37, 32, 22, 53, 0, 62, 27, 49, 34, 46, 21, 33, 41, 14, 25, 37, 53, 29, 31, 45 }, { 56, 28, 7, 37, 11, 36, 20, 9, 54, 14, 39, 19, 34, 63, 45, 37, 24, 17, 60, 31, 21, 45, 53, 29, 47, 15, 7, 55, 40, 23, 34, 14, 42, 20, 37, 35, 15, 59, 7, 62, 34, 40, 59, 1, 51, 42, 10, 28, 54, 21, 35, 5, 38, 13, 36, 4, 59, 12, 39, 53, 15, 43, 9, 21, 39, 62, 16, 56, 25, 9, 32, 38, 0, 41, 14, 51, 40, 53, 43, 11, 37, 17, 5, 22, 57, 39, 19, 7, 42, 21, 60, 10, 31, 63, 25, 52, 30, 49, 36, 25, 48, 17, 61, 14, 22, 42, 29, 13, 60, 11, 47, 18, 35, 41, 7, 23, 4, 16, 51, 11, 0, 48, 61, 3, 17, 50, 5, 24 }, { 0, 42, 21, 49, 60, 3, 57, 40, 29, 48, 23, 56, 42, 11, 22, 5, 59, 39, 4, 50, 3, 41, 12, 57, 25, 50, 44, 18, 4, 46, 7, 62, 33, 50, 4, 56, 21, 32, 43, 18, 3, 23, 55, 34, 20, 4, 53, 38, 12, 46, 29, 52, 25, 61, 23, 51, 26, 46, 1, 34, 25, 57, 28, 51, 26, 11, 50, 3, 44, 28, 53, 21, 57, 27, 62, 6, 31, 19, 8, 63, 26, 59, 36, 47, 15, 29, 50, 25, 35, 47, 18, 41, 4, 48, 8, 40, 12, 23, 6, 44, 13, 40, 1, 31, 55, 0, 61, 43, 4, 50, 26, 58, 9, 53, 24, 61, 42, 55, 31, 43, 57, 20, 34, 27, 43, 8, 59, 39 }, { 18, 51, 30, 13, 26, 16, 46, 22, 2, 59, 8, 30, 1, 48, 33, 51, 29, 9, 46, 16, 62, 14, 33, 2, 38, 9, 27, 60, 37, 26, 53, 17, 28, 10, 24, 46, 2, 49, 8, 57, 29, 45, 6, 26, 62, 44, 18, 25, 61, 3, 42, 14, 49, 10, 43, 6, 17, 32, 63, 10, 49, 4, 40, 14, 45, 33, 22, 37, 12, 61, 5, 17, 43, 7, 23, 37, 15, 58, 49, 13, 39, 21, 10, 52, 1, 62, 9, 56, 12, 2, 58, 28, 36, 16, 56, 28, 56, 35, 20, 63, 24, 37, 51, 8, 45, 25, 16, 33, 27, 38, 2, 44, 13, 30, 17, 36, 12, 26, 5, 18, 28, 47, 13, 60, 23, 45, 13, 33 }, { 55, 4, 62, 34, 52, 38, 7, 63, 32, 37, 13, 53, 25, 62, 18, 12, 55, 41, 27, 35, 24, 49, 31, 52, 17, 63, 34, 1, 56, 12, 41, 2, 48, 58, 39, 16, 61, 27, 41, 52, 13, 19, 50, 39, 11, 31, 57, 6, 32, 40, 20, 55, 1, 28, 33, 57, 48, 8, 37, 22, 44, 18, 53, 1, 61, 5, 54, 16, 47, 36, 50, 24, 55, 34, 48, 45, 1, 30, 33, 46, 2, 50, 32, 42, 25, 34, 43, 21, 38, 52, 23, 45, 14, 54, 21, 4, 44, 16, 53, 29, 10, 47, 19, 57, 12, 54, 39, 10, 51, 15, 63, 21, 57, 40, 51, 1, 48, 57, 37, 62, 2, 38, 9, 52, 1, 35, 58, 22 }, { 36, 46, 10, 42, 1, 27, 43, 15, 50, 21, 45, 16, 41, 3, 35, 44, 20, 1, 57, 11, 55, 7, 43, 8, 22, 42, 13, 46, 21, 39, 31, 60, 22, 5, 29, 44, 11, 35, 20, 4, 36, 58, 32, 15, 47, 2, 36, 48, 16, 60, 8, 35, 44, 63, 16, 2, 40, 26, 55, 14, 58, 35, 24, 31, 19, 42, 31, 58, 1, 29, 10, 40, 2, 19, 12, 54, 22, 61, 7, 24, 56, 5, 28, 16, 54, 3, 15, 58, 6, 30, 8, 62, 1, 43, 31, 47, 7, 59, 1, 38, 58, 4, 34, 27, 38, 5, 31, 59, 7, 46, 30, 3, 34, 6, 28, 59, 20, 8, 32, 15, 53, 24, 55, 31, 19, 49, 11, 26 }, { 2, 24, 16, 58, 19, 55, 5, 35, 10, 61, 4, 28, 57, 24, 58, 7, 31, 47, 22, 38, 19, 28, 61, 36, 54, 5, 59, 29, 6, 52, 15, 11, 43, 36, 8, 54, 52, 1, 62, 25, 47, 9, 1, 60, 28, 53, 24, 14, 46, 27, 51, 22, 12, 24, 38, 53, 20, 11, 51, 3, 29, 7, 48, 63, 8, 49, 9, 21, 52, 14, 63, 32, 46, 60, 35, 4, 41, 16, 52, 35, 18, 42, 59, 7, 36, 61, 45, 27, 33, 51, 19, 39, 34, 11, 61, 18, 33, 41, 28, 15, 54, 22, 42, 3, 49, 21, 47, 18, 36, 23, 55, 19, 48, 24, 45, 10, 33, 44, 50, 40, 7, 35, 15, 41, 63, 6, 40, 54 }, { 62, 41, 32, 8, 47, 28, 60, 24, 44, 30, 38, 49, 9, 33, 14, 40, 50, 14, 60, 2, 54, 40, 0, 20, 25, 39, 16, 49, 24, 35, 57, 47, 19, 61, 33, 18, 23, 37, 13, 55, 31, 43, 22, 41, 17, 8, 42, 58, 0, 37, 5, 56, 31, 54, 7, 30, 60, 33, 42, 17, 59, 39, 12, 27, 38, 17, 35, 41, 27, 45, 20, 7, 25, 15, 29, 58, 27, 47, 11, 40, 14, 54, 23, 46, 19, 31, 11, 40, 13, 49, 5, 58, 24, 51, 26, 6, 50, 20, 49, 9, 32, 46, 17, 60, 14, 63, 24, 1, 57, 41, 9, 43, 14, 62, 16, 52, 3, 27, 14, 22, 61, 45, 4, 28, 9, 47, 29, 17 }, { 5, 50, 12, 53, 38, 18, 11, 51, 0, 55, 17, 6, 47, 54, 19, 63, 5, 26, 34, 45, 13, 30, 47, 58, 10, 48, 32, 3, 62, 9, 26, 0, 25, 14, 50, 3, 47, 30, 42, 16, 6, 63, 12, 49, 33, 55, 21, 10, 34, 63, 18, 41, 3, 47, 19, 43, 0, 49, 8, 28, 46, 20, 52, 0, 56, 24, 60, 3, 59, 5, 39, 57, 48, 52, 9, 38, 3, 21, 26, 60, 0, 32, 12, 38, 4, 48, 53, 0, 60, 15, 29, 44, 18, 10, 38, 57, 13, 60, 2, 26, 62, 7, 50, 29, 35, 8, 40, 53, 28, 12, 60, 33, 38, 5, 37, 29, 60, 39, 56, 0, 30, 18, 50, 34, 59, 25, 14, 44 }, { 20, 31, 60, 22, 3, 49, 33, 25, 40, 13, 34, 59, 22, 36, 0, 28, 37, 56, 8, 18, 51, 16, 4, 45, 27, 12, 53, 42, 18, 44, 51, 31, 55, 40, 28, 58, 7, 60, 10, 51, 27, 37, 24, 56, 5, 26, 44, 29, 50, 23, 45, 11, 34, 15, 59, 27, 13, 23, 62, 37, 4, 57, 15, 32, 42, 6, 47, 11, 30, 43, 23, 13, 0, 36, 18, 44, 63, 51, 37, 29, 49, 20, 57, 27, 62, 9, 24, 35, 23, 53, 37, 3, 42, 55, 0, 36, 23, 39, 31, 43, 17, 37, 24, 11, 52, 43, 19, 32, 5, 50, 26, 0, 56, 21, 54, 11, 19, 6, 47, 25, 59, 42, 12, 54, 21, 3, 38, 57 }, { 48, 0, 35, 27, 44, 14, 59, 7, 57, 46, 26, 2, 42, 12, 52, 43, 10, 27, 53, 42, 32, 62, 37, 21, 34, 61, 7, 23, 36, 4, 38, 12, 41, 5, 17, 45, 22, 27, 39, 21, 59, 0, 45, 18, 39, 62, 3, 38, 14, 7, 54, 26, 61, 39, 9, 52, 45, 36, 18, 50, 10, 34, 44, 22, 50, 14, 36, 55, 17, 34, 53, 62, 33, 26, 56, 6, 31, 12, 6, 53, 9, 44, 2, 50, 20, 40, 55, 17, 47, 7, 26, 63, 22, 32, 48, 16, 46, 8, 52, 12, 57, 41, 0, 56, 25, 3, 61, 14, 45, 35, 18, 44, 12, 46, 23, 42, 32, 51, 35, 10, 17, 36, 23, 1, 45, 52, 32, 10 }, { 37, 15, 43, 8, 63, 39, 21, 31, 16, 37, 19, 62, 30, 46, 17, 60, 21, 48, 1, 23, 6, 25, 11, 56, 1, 40, 30, 58, 15, 54, 21, 59, 9, 63, 35, 56, 11, 51, 2, 46, 34, 14, 53, 7, 30, 11, 51, 19, 60, 40, 30, 1, 24, 50, 20, 32, 3, 56, 5, 25, 31, 13, 61, 2, 29, 60, 25, 20, 51, 2, 27, 8, 18, 42, 10, 45, 21, 34, 43, 17, 62, 29, 41, 14, 34, 6, 30, 43, 2, 57, 33, 13, 45, 12, 27, 62, 4, 55, 21, 35, 5, 27, 45, 33, 16, 47, 30, 54, 22, 10, 51, 27, 63, 7, 49, 1, 58, 22, 15, 43, 53, 7, 57, 39, 27, 12, 61, 24 }, { 56, 51, 26, 56, 19, 2, 41, 54, 5, 52, 9, 48, 6, 23, 39, 4, 32, 15, 63, 35, 59, 49, 43, 15, 52, 19, 50, 9, 46, 33, 1, 29, 48, 20, 32, 1, 38, 33, 19, 54, 9, 32, 24, 48, 58, 35, 16, 48, 4, 52, 13, 57, 33, 5, 45, 59, 15, 29, 41, 55, 47, 39, 23, 53, 9, 40, 4, 57, 10, 44, 48, 40, 50, 14, 61, 24, 55, 1, 59, 22, 33, 8, 51, 25, 58, 46, 11, 59, 20, 41, 17, 51, 6, 56, 35, 25, 42, 30, 15, 58, 48, 18, 61, 9, 58, 39, 13, 2, 37, 59, 40, 2, 31, 16, 34, 41, 8, 30, 62, 3, 29, 48, 33, 5, 63, 16, 41, 7 }, { 22, 4, 46, 11, 33, 51, 29, 10, 62, 24, 43, 27, 15, 58, 50, 25, 54, 44, 9, 38, 18, 3, 29, 57, 32, 5, 26, 43, 17, 61, 24, 52, 8, 42, 23, 53, 15, 61, 7, 28, 57, 43, 4, 40, 20, 2, 43, 25, 32, 35, 21, 43, 17, 48, 10, 22, 38, 54, 11, 21, 1, 58, 16, 30, 48, 18, 46, 32, 38, 13, 22, 4, 59, 35, 2, 51, 30, 39, 15, 47, 4, 56, 13, 37, 1, 28, 16, 52, 32, 9, 61, 29, 38, 19, 3, 52, 10, 48, 1, 32, 11, 40, 20, 36, 6, 22, 49, 29, 55, 6, 20, 56, 36, 52, 19, 60, 26, 46, 18, 54, 40, 13, 20, 46, 35, 19, 49, 29 }, { 61, 17, 34, 53, 23, 6, 48, 35, 20, 40, 1, 56, 36, 29, 11, 34, 7, 41, 14, 30, 55, 20, 46, 8, 24, 38, 63, 2, 37, 10, 45, 14, 34, 49, 6, 13, 44, 25, 49, 41, 21, 12, 61, 15, 54, 29, 63, 12, 56, 8, 49, 2, 62, 36, 28, 61, 0, 25, 41, 63, 35, 8, 44, 6, 37, 62, 7, 21, 63, 28, 55, 31, 16, 24, 41, 19, 9, 57, 27, 36, 18, 42, 31, 62, 22, 55, 38, 4, 27, 47, 1, 40, 14, 54, 43, 20, 60, 23, 38, 63, 25, 51, 2, 53, 26, 63, 10, 42, 17, 34, 47, 25, 13, 5, 44, 11, 55, 2, 38, 27, 6, 60, 52, 25, 9, 55, 1, 40 }, { 8, 30, 58, 3, 42, 61, 17, 38, 13, 59, 32, 10, 54, 3, 51, 20, 61, 26, 57, 2, 46, 33, 12, 60, 41, 13, 48, 29, 55, 20, 39, 27, 57, 18, 62, 29, 55, 2, 31, 16, 37, 50, 26, 36, 6, 46, 9, 41, 27, 57, 23, 39, 26, 6, 51, 12, 31, 46, 7, 16, 27, 52, 19, 56, 26, 12, 33, 53, 1, 41, 8, 57, 46, 7, 54, 32, 47, 5, 49, 11, 60, 23, 5, 48, 10, 43, 19, 63, 35, 24, 49, 21, 59, 5, 31, 37, 14, 44, 7, 42, 6, 30, 46, 13, 44, 32, 19, 50, 4, 58, 8, 30, 62, 38, 28, 53, 21, 36, 13, 50, 21, 33, 15, 2, 44, 31, 14, 47 }, { 37, 13, 39, 16, 28, 9, 57, 0, 25, 49, 21, 45, 18, 47, 12, 42, 0, 49, 22, 39, 16, 53, 25, 36, 0, 52, 22, 16, 6, 60, 4, 51, 0, 26, 37, 47, 10, 36, 63, 5, 57, 0, 18, 59, 23, 33, 51, 19, 0, 44, 15, 11, 54, 17, 42, 35, 53, 18, 58, 33, 49, 4, 34, 42, 0, 50, 43, 25, 16, 49, 34, 20, 37, 28, 12, 63, 16, 38, 25, 44, 0, 40, 52, 17, 35, 3, 50, 14, 8, 53, 11, 36, 25, 45, 9, 62, 0, 54, 28, 17, 50, 55, 15, 24, 57, 0, 53, 34, 23, 41, 15, 45, 0, 49, 16, 4, 48, 9, 63, 45, 0, 42, 58, 37, 61, 22, 54, 26 }, { 0, 50, 21, 47, 54, 36, 27, 45, 52, 4, 34, 15, 63, 29, 37, 59, 17, 31, 6, 61, 28, 5, 48, 18, 59, 27, 34, 56, 44, 31, 35, 12, 41, 59, 16, 3, 40, 20, 50, 22, 30, 40, 52, 10, 45, 3, 59, 22, 37, 61, 29, 46, 31, 58, 2, 22, 9, 43, 3, 39, 14, 61, 24, 54, 15, 29, 11, 60, 39, 17, 5, 61, 0, 44, 50, 3, 31, 14, 58, 21, 54, 28, 15, 45, 60, 26, 33, 58, 44, 22, 60, 2, 57, 34, 49, 27, 18, 34, 21, 59, 29, 4, 36, 41, 8, 39, 28, 11, 62, 26, 53, 20, 35, 24, 59, 32, 29, 39, 24, 31, 57, 23, 11, 28, 5, 36, 11, 59 }, { 44, 32, 63, 5, 20, 12, 41, 7, 30, 61, 42, 8, 39, 5, 33, 8, 24, 53, 45, 11, 37, 58, 7, 44, 10, 50, 3, 40, 8, 22, 53, 19, 46, 9, 33, 52, 24, 58, 8, 44, 13, 47, 8, 34, 38, 30, 14, 47, 7, 34, 4, 55, 9, 19, 40, 49, 56, 26, 60, 21, 30, 45, 10, 19, 40, 58, 23, 36, 3, 52, 45, 23, 54, 13, 22, 42, 53, 45, 7, 33, 10, 36, 57, 6, 29, 12, 41, 0, 30, 15, 41, 30, 17, 7, 16, 53, 40, 56, 2, 39, 12, 61, 10, 52, 31, 60, 16, 45, 1, 37, 7, 61, 40, 10, 43, 17, 58, 7, 54, 14, 4, 51, 39, 49, 18, 56, 42, 20 }, { 14, 6, 24, 36, 56, 49, 22, 60, 18, 14, 23, 51, 26, 57, 21, 52, 41, 14, 35, 50, 19, 31, 40, 23, 33, 14, 63, 17, 32, 47, 7, 62, 23, 30, 56, 11, 42, 27, 14, 60, 35, 19, 28, 61, 17, 55, 25, 39, 53, 17, 42, 21, 38, 63, 25, 5, 14, 36, 12, 50, 1, 37, 59, 32, 2, 51, 6, 56, 27, 32, 11, 30, 38, 26, 60, 8, 26, 19, 62, 39, 50, 2, 21, 39, 53, 23, 56, 19, 49, 39, 5, 46, 55, 23, 42, 4, 31, 11, 47, 26, 45, 22, 48, 18, 21, 5, 48, 25, 57, 14, 47, 30, 3, 56, 12, 50, 1, 42, 19, 47, 35, 17, 8, 30, 45, 25, 4, 51 }, { 28, 58, 43, 1, 31, 8, 33, 2, 44, 55, 32, 1, 60, 12, 46, 27, 4, 62, 23, 1, 56, 13, 62, 2, 54, 36, 25, 51, 1, 57, 26, 42, 3, 49, 17, 38, 1, 48, 31, 4, 54, 3, 50, 24, 1, 49, 5, 63, 13, 27, 52, 1, 48, 13, 45, 33, 52, 30, 46, 20, 55, 28, 6, 48, 24, 38, 20, 47, 14, 62, 48, 9, 58, 4, 36, 30, 56, 1, 34, 12, 18, 63, 25, 48, 4, 16, 37, 7, 62, 10, 52, 28, 13, 50, 36, 63, 24, 51, 15, 58, 8, 33, 1, 38, 56, 35, 42, 9, 33, 51, 22, 18, 48, 32, 27, 37, 23, 61, 33, 11, 59, 29, 62, 1, 53, 10, 60, 33 }, { 12, 39, 17, 52, 26, 46, 53, 38, 25, 11, 48, 36, 16, 43, 2, 35, 55, 17, 39, 29, 43, 9, 28, 45, 20, 5, 46, 12, 42, 28, 13, 52, 36, 6, 60, 22, 54, 17, 62, 39, 25, 42, 15, 55, 44, 20, 31, 10, 35, 57, 24, 32, 29, 6, 59, 18, 7, 62, 3, 41, 10, 44, 16, 54, 13, 62, 31, 9, 41, 1, 21, 43, 18, 47, 15, 40, 11, 49, 28, 55, 46, 30, 8, 43, 32, 61, 28, 47, 25, 34, 21, 61, 32, 1, 20, 9, 46, 6, 35, 19, 41, 54, 27, 63, 14, 3, 51, 20, 62, 2, 38, 55, 8, 21, 63, 6, 46, 9, 26, 51, 3, 24, 43, 34, 16, 41, 18, 48 }, { 62, 23, 55, 9, 15, 62, 19, 13, 58, 40, 6, 30, 54, 19, 50, 31, 10, 44, 6, 59, 21, 47, 51, 15, 60, 39, 30, 54, 21, 61, 19, 33, 14, 29, 43, 11, 34, 45, 7, 21, 10, 56, 36, 6, 38, 11, 58, 42, 2, 47, 11, 60, 50, 16, 41, 28, 38, 23, 47, 17, 35, 63, 22, 33, 42, 5, 45, 17, 53, 35, 25, 56, 33, 6, 51, 19, 60, 23, 43, 15, 5, 40, 58, 13, 51, 1, 45, 11, 54, 3, 43, 8, 37, 48, 59, 29, 39, 21, 61, 43, 3, 31, 10, 44, 24, 29, 60, 12, 28, 40, 11, 25, 43, 52, 14, 41, 16, 57, 44, 20, 40, 55, 12, 21, 57, 27, 35, 2 }, { 37, 6, 31, 42, 40, 4, 29, 50, 0, 20, 63, 28, 9, 58, 14, 24, 63, 26, 48, 16, 34, 4, 32, 38, 23, 11, 58, 4, 37, 9, 45, 5, 63, 48, 26, 57, 2, 28, 32, 51, 46, 29, 13, 62, 27, 46, 28, 18, 50, 15, 40, 4, 19, 34, 54, 0, 53, 9, 26, 58, 28, 5, 49, 0, 57, 27, 19, 60, 29, 8, 59, 12, 37, 63, 24, 46, 3, 37, 6, 52, 26, 32, 20, 36, 9, 22, 59, 18, 35, 51, 14, 57, 17, 24, 12, 44, 56, 0, 30, 13, 59, 20, 49, 17, 54, 43, 6, 34, 46, 17, 58, 36, 0, 34, 29, 54, 25, 2, 36, 15, 60, 6, 37, 46, 4, 50, 9, 45 }, { 19, 59, 48, 3, 24, 60, 44, 22, 34, 51, 15, 45, 41, 5, 33, 47, 0, 37, 12, 55, 25, 54, 8, 57, 0, 47, 18, 34, 49, 15, 55, 24, 40, 20, 8, 35, 53, 13, 41, 18, 0, 59, 22, 33, 4, 52, 8, 60, 24, 36, 31, 56, 45, 26, 10, 43, 15, 56, 36, 4, 51, 14, 39, 30, 12, 55, 36, 2, 39, 49, 4, 44, 17, 0, 32, 13, 53, 35, 59, 17, 62, 0, 55, 24, 52, 38, 31, 6, 42, 19, 29, 40, 4, 54, 33, 5, 16, 27, 52, 37, 23, 55, 7, 37, 0, 39, 23, 49, 4, 53, 31, 15, 59, 10, 50, 4, 60, 34, 48, 7, 31, 49, 27, 14, 62, 22, 53, 29 }, { 46, 21, 14, 51, 36, 17, 7, 57, 10, 32, 3, 37, 22, 60, 39, 18, 56, 20, 42, 3, 36, 10, 44, 26, 41, 29, 53, 27, 2, 39, 30, 52, 0, 59, 15, 48, 23, 61, 6, 58, 37, 12, 40, 49, 16, 39, 20, 44, 0, 62, 8, 21, 3, 59, 23, 32, 49, 31, 12, 44, 22, 59, 18, 50, 24, 7, 43, 52, 15, 23, 41, 26, 51, 28, 55, 39, 21, 27, 10, 42, 12, 45, 27, 47, 3, 15, 63, 26, 55, 0, 60, 26, 45, 18, 62, 38, 58, 49, 8, 47, 4, 33, 46, 29, 57, 13, 56, 16, 59, 21, 5, 47, 23, 39, 18, 44, 13, 22, 28, 53, 19, 0, 58, 32, 41, 7, 26, 13 }, { 0, 56, 34, 28, 11, 55, 31, 47, 26, 41, 56, 13, 53, 28, 11, 49, 7, 52, 32, 61, 50, 22, 63, 17, 13, 56, 7, 19, 43, 62, 10, 21, 37, 32, 43, 4, 38, 19, 44, 25, 31, 54, 5, 23, 61, 30, 53, 12, 35, 22, 43, 53, 37, 48, 7, 62, 20, 2, 61, 41, 8, 34, 47, 9, 63, 34, 28, 10, 55, 33, 14, 57, 7, 47, 9, 61, 4, 49, 31, 50, 21, 38, 8, 16, 57, 44, 33, 5, 49, 36, 12, 50, 7, 34, 10, 25, 2, 22, 36, 15, 26, 61, 18, 9, 22, 46, 32, 8, 27, 37, 44, 30, 55, 3, 62, 24, 38, 56, 5, 45, 38, 24, 43, 10, 19, 54, 39, 61 }, { 41, 30, 8, 63, 43, 23, 38, 3, 62, 19, 8, 49, 25, 1, 58, 30, 23, 40, 9, 28, 18, 40, 6, 38, 49, 22, 35, 59, 8, 27, 50, 5, 56, 17, 11, 50, 30, 9, 55, 2, 51, 19, 34, 47, 9, 41, 6, 26, 48, 57, 14, 28, 17, 12, 39, 13, 37, 46, 25, 19, 54, 27, 1, 37, 16, 45, 20, 60, 1, 48, 20, 38, 31, 22, 42, 15, 19, 44, 1, 61, 6, 34, 56, 40, 29, 10, 20, 46, 13, 22, 41, 23, 59, 42, 30, 51, 45, 13, 63, 53, 42, 12, 51, 38, 62, 2, 26, 41, 50, 1, 61, 10, 19, 42, 31, 8, 49, 32, 12, 63, 9, 52, 16, 56, 36, 2, 31, 16 }, { 52, 5, 47, 20, 1, 53, 12, 50, 16, 35, 43, 21, 33, 43, 16, 44, 3, 59, 14, 46, 1, 30, 60, 33, 2, 45, 12, 42, 31, 47, 14, 33, 46, 25, 55, 27, 60, 36, 16, 42, 14, 46, 26, 1, 55, 15, 63, 32, 2, 38, 5, 47, 33, 61, 30, 52, 4, 57, 6, 38, 11, 43, 61, 24, 52, 3, 31, 22, 42, 10, 62, 3, 59, 11, 35, 57, 33, 54, 24, 14, 29, 48, 18, 2, 60, 41, 53, 24, 32, 62, 3, 53, 15, 1, 55, 17, 32, 40, 6, 31, 1, 40, 28, 5, 35, 52, 19, 63, 13, 33, 17, 41, 52, 26, 15, 57, 1, 20, 42, 17, 35, 27, 48, 5, 25, 50, 44, 11 }, { 35, 25, 38, 57, 33, 17, 40, 6, 59, 27, 54, 5, 61, 10, 52, 26, 36, 19, 51, 35, 57, 48, 11, 20, 54, 25, 61, 16, 1, 58, 24, 61, 3, 39, 7, 47, 1, 22, 49, 28, 63, 10, 58, 32, 17, 36, 45, 19, 51, 29, 59, 10, 50, 1, 23, 42, 18, 29, 51, 21, 56, 32, 14, 5, 40, 58, 47, 13, 54, 35, 29, 45, 18, 52, 26, 2, 38, 8, 46, 36, 58, 11, 52, 35, 17, 28, 1, 58, 9, 39, 17, 28, 37, 48, 20, 9, 57, 24, 50, 19, 58, 16, 48, 25, 43, 11, 35, 6, 45, 24, 56, 4, 36, 7, 47, 35, 52, 28, 59, 30, 2, 61, 21, 33, 63, 12, 18, 59 }, { 3, 49, 15, 10, 27, 61, 25, 45, 30, 0, 14, 47, 31, 38, 17, 62, 7, 55, 27, 4, 15, 24, 42, 52, 10, 34, 5, 51, 36, 18, 41, 11, 35, 21, 62, 13, 33, 57, 8, 35, 5, 40, 21, 43, 52, 3, 24, 56, 11, 16, 33, 25, 41, 20, 55, 8, 60, 35, 15, 48, 2, 57, 30, 49, 18, 25, 6, 39, 17, 57, 7, 25, 43, 5, 49, 16, 62, 22, 55, 4, 25, 43, 23, 7, 50, 11, 37, 48, 14, 51, 33, 57, 7, 27, 39, 46, 4, 29, 11, 43, 34, 56, 7, 60, 20, 54, 30, 57, 22, 49, 9, 33, 54, 14, 63, 23, 6, 43, 10, 40, 50, 13, 44, 8, 38, 33, 46, 23 }, { 55, 39, 22, 50, 44, 4, 36, 9, 52, 23, 37, 59, 21, 2, 46, 13, 31, 41, 11, 45, 62, 29, 6, 37, 19, 48, 30, 23, 44, 7, 53, 28, 54, 16, 41, 29, 44, 18, 52, 24, 60, 15, 48, 7, 27, 59, 9, 34, 42, 54, 7, 63, 4, 46, 31, 27, 45, 0, 40, 26, 34, 17, 37, 10, 53, 29, 36, 50, 2, 27, 51, 11, 61, 37, 23, 41, 30, 7, 18, 50, 39, 14, 63, 32, 45, 61, 19, 30, 25, 44, 2, 47, 23, 63, 11, 34, 59, 37, 60, 3, 22, 14, 44, 30, 15, 0, 47, 15, 3, 38, 61, 20, 27, 45, 11, 39, 51, 16, 55, 3, 22, 54, 29, 58, 1, 57, 6, 29 }, { 9, 17, 60, 2, 34, 56, 20, 62, 39, 12, 49, 6, 29, 56, 34, 48, 0, 58, 22, 38, 18, 43, 56, 0, 63, 14, 55, 3, 59, 31, 15, 45, 0, 49, 6, 58, 3, 38, 12, 45, 0, 37, 29, 57, 13, 39, 30, 49, 0, 23, 44, 36, 16, 57, 13, 54, 11, 24, 63, 9, 53, 7, 62, 42, 0, 59, 15, 23, 63, 34, 40, 16, 32, 0, 53, 12, 48, 28, 59, 33, 0, 53, 9, 27, 3, 22, 54, 5, 56, 9, 61, 13, 42, 14, 52, 19, 0, 21, 47, 27, 53, 36, 3, 50, 39, 58, 25, 40, 53, 28, 12, 50, 0, 59, 32, 2, 21, 34, 26, 46, 37, 7, 18, 47, 24, 14, 53, 42 }, { 61, 32, 13, 54, 29, 7, 46, 13, 28, 57, 18, 41, 53, 15, 9, 39, 24, 49, 33, 3, 53, 9, 26, 32, 40, 28, 46, 39, 25, 9, 56, 21, 63, 37, 26, 22, 51, 27, 17, 56, 31, 53, 4, 43, 22, 46, 12, 18, 60, 40, 20, 26, 50, 21, 39, 5, 49, 33, 16, 44, 22, 46, 20, 32, 24, 45, 8, 43, 12, 46, 4, 48, 56, 20, 29, 58, 3, 40, 10, 42, 31, 21, 47, 41, 56, 38, 15, 42, 36, 27, 20, 33, 55, 3, 26, 44, 31, 54, 12, 35, 9, 63, 28, 10, 21, 32, 9, 60, 17, 8, 43, 29, 40, 16, 36, 48, 60, 7, 57, 14, 62, 31, 42, 15, 36, 40, 20, 26 }, { 0, 37, 47, 23, 41, 18, 32, 48, 1, 35, 8, 25, 4, 26, 63, 20, 54, 8, 16, 61, 35, 23, 51, 15, 58, 7, 12, 20, 50, 34, 42, 4, 38, 10, 32, 47, 8, 60, 41, 20, 9, 25, 50, 19, 62, 1, 37, 56, 28, 8, 53, 11, 3, 58, 34, 43, 19, 60, 38, 4, 58, 31, 3, 51, 11, 55, 38, 30, 21, 58, 19, 26, 9, 44, 36, 13, 46, 20, 62, 24, 13, 60, 5, 28, 12, 34, 7, 59, 0, 53, 45, 6, 38, 30, 50, 7, 62, 16, 41, 5, 46, 18, 55, 42, 51, 5, 45, 23, 34, 48, 19, 58, 5, 25, 54, 19, 13, 41, 28, 21, 0, 49, 10, 60, 4, 51, 9, 45 }, { 19, 28, 6, 58, 10, 51, 4, 22, 55, 42, 60, 45, 34, 51, 42, 5, 30, 45, 27, 40, 13, 47, 4, 49, 21, 38, 60, 29, 2, 57, 17, 27, 52, 19, 61, 14, 30, 34, 2, 44, 63, 33, 11, 35, 16, 51, 25, 6, 14, 47, 31, 61, 37, 29, 18, 8, 52, 2, 28, 54, 13, 41, 15, 62, 35, 18, 2, 60, 6, 33, 41, 61, 31, 6, 56, 17, 34, 50, 6, 52, 44, 35, 16, 51, 59, 24, 48, 18, 31, 40, 16, 49, 21, 60, 17, 39, 10, 49, 32, 57, 24, 39, 1, 25, 18, 62, 37, 12, 56, 1, 37, 11, 52, 44, 9, 30, 47, 4, 51, 40, 55, 25, 34, 27, 56, 30, 32, 54 }, { 63, 40, 49, 15, 43, 26, 63, 38, 16, 20, 30, 12, 57, 14, 19, 60, 36, 12, 59, 2, 57, 17, 42, 31, 1, 44, 16, 35, 47, 11, 32, 48, 13, 43, 1, 39, 51, 12, 57, 23, 6, 40, 53, 3, 55, 31, 39, 60, 35, 44, 5, 15, 45, 1, 62, 41, 26, 14, 47, 22, 36, 27, 50, 9, 26, 47, 52, 28, 54, 16, 1, 13, 51, 39, 23, 63, 1, 30, 15, 26, 2, 57, 19, 37, 1, 44, 21, 50, 13, 63, 8, 24, 56, 1, 35, 25, 58, 20, 2, 28, 14, 51, 33, 59, 13, 30, 4, 49, 31, 24, 63, 26, 33, 3, 58, 38, 62, 24, 32, 8, 17, 45, 5, 48, 18, 3, 43, 11 }, { 21, 4, 24, 34, 59, 1, 37, 11, 53, 5, 47, 2, 22, 40, 32, 1, 24, 50, 21, 29, 38, 25, 63, 8, 55, 24, 53, 6, 62, 23, 59, 3, 54, 20, 58, 24, 5, 46, 15, 38, 48, 14, 27, 42, 23, 7, 46, 10, 17, 58, 25, 52, 23, 32, 49, 12, 55, 30, 40, 7, 59, 1, 56, 21, 39, 4, 23, 15, 37, 46, 55, 42, 21, 4, 48, 8, 45, 54, 37, 55, 32, 8, 46, 10, 30, 54, 4, 41, 25, 29, 36, 48, 11, 43, 14, 47, 5, 43, 53, 36, 61, 10, 45, 6, 41, 54, 27, 43, 16, 55, 6, 46, 18, 42, 23, 15, 1, 45, 12, 60, 37, 22, 62, 12, 39, 59, 16, 52 }, { 47, 35, 56, 7, 19, 46, 31, 50, 33, 24, 61, 35, 50, 7, 53, 44, 55, 6, 46, 10, 52, 5, 21, 43, 36, 10, 18, 41, 26, 37, 8, 29, 40, 36, 9, 49, 34, 26, 61, 21, 7, 59, 18, 62, 29, 54, 20, 32, 51, 0, 40, 10, 55, 6, 20, 36, 9, 61, 5, 51, 44, 19, 33, 43, 13, 57, 40, 63, 8, 24, 29, 10, 60, 34, 27, 40, 25, 18, 10, 42, 21, 49, 26, 62, 38, 12, 33, 61, 5, 57, 2, 19, 54, 28, 62, 22, 38, 31, 16, 7, 22, 47, 29, 17, 35, 8, 20, 51, 2, 40, 22, 50, 13, 61, 28, 53, 35, 20, 56, 30, 2, 53, 14, 41, 23, 34, 8, 31 }, { 12, 2, 42, 29, 52, 13, 21, 8, 55, 14, 41, 17, 28, 58, 23, 11, 17, 36, 31, 62, 17, 34, 50, 14, 28, 61, 33, 52, 2, 51, 17, 45, 7, 25, 62, 30, 18, 55, 0, 42, 30, 35, 45, 1, 12, 48, 3, 63, 21, 36, 30, 48, 19, 59, 43, 27, 46, 17, 34, 25, 12, 29, 53, 6, 48, 31, 11, 34, 49, 3, 36, 50, 19, 47, 14, 61, 11, 36, 58, 4, 60, 14, 39, 22, 6, 52, 15, 35, 17, 46, 31, 42, 9, 34, 3, 52, 12, 60, 26, 56, 40, 2, 53, 23, 57, 38, 62, 14, 36, 59, 10, 31, 39, 6, 49, 9, 41, 26, 5, 48, 43, 27, 33, 58, 1, 50, 25, 57 }, { 61, 37, 15, 61, 3, 39, 58, 43, 26, 0, 44, 10, 47, 3, 37, 63, 28, 43, 13, 39, 3, 57, 30, 59, 0, 48, 5, 43, 13, 22, 60, 33, 55, 15, 42, 4, 52, 10, 45, 13, 54, 4, 24, 49, 37, 26, 41, 14, 42, 9, 61, 13, 38, 23, 3, 53, 0, 58, 21, 42, 63, 10, 17, 61, 25, 0, 58, 28, 17, 44, 57, 12, 27, 0, 55, 5, 52, 28, 23, 47, 29, 0, 43, 17, 58, 28, 47, 23, 55, 10, 58, 23, 51, 40, 18, 33, 45, 0, 49, 8, 32, 61, 19, 48, 0, 26, 7, 47, 29, 18, 44, 0, 56, 34, 20, 59, 15, 51, 37, 18, 10, 52, 7, 20, 46, 9, 38, 17 }, { 6, 27, 48, 23, 45, 29, 5, 18, 38, 62, 27, 56, 20, 32, 15, 9, 48, 0, 54, 22, 45, 20, 7, 41, 23, 39, 19, 27, 58, 31, 44, 0, 12, 50, 23, 56, 20, 39, 32, 59, 16, 52, 33, 9, 57, 22, 6, 58, 28, 50, 24, 2, 56, 35, 16, 45, 32, 38, 15, 54, 2, 38, 46, 22, 35, 45, 20, 5, 52, 25, 7, 35, 59, 32, 22, 43, 38, 3, 51, 16, 34, 53, 32, 50, 3, 40, 8, 43, 0, 39, 27, 4, 14, 61, 8, 55, 15, 41, 20, 44, 27, 13, 39, 11, 46, 42, 54, 33, 4, 52, 23, 61, 14, 25, 43, 2, 33, 11, 63, 29, 61, 17, 40, 55, 22, 62, 28, 44 }, { 20, 54, 8, 56, 35, 10, 63, 31, 52, 12, 48, 6, 59, 41, 52, 33, 19, 58, 25, 49, 11, 37, 47, 12, 54, 15, 56, 35, 7, 47, 16, 53, 28, 34, 5, 37, 28, 8, 48, 3, 28, 38, 18, 61, 16, 43, 53, 32, 4, 17, 47, 27, 44, 8, 63, 10, 25, 49, 6, 37, 24, 52, 32, 3, 50, 12, 41, 56, 38, 14, 62, 20, 40, 16, 53, 31, 18, 63, 41, 9, 59, 7, 13, 25, 57, 20, 63, 26, 53, 18, 48, 62, 30, 46, 21, 25, 58, 29, 36, 4, 55, 34, 6, 60, 31, 16, 21, 12, 58, 38, 9, 29, 47, 7, 52, 30, 57, 44, 22, 0, 35, 45, 3, 31, 14, 36, 0, 51 }, { 42, 14, 33, 24, 16, 49, 40, 2, 22, 33, 16, 36, 25, 1, 21, 61, 38, 8, 33, 4, 62, 26, 29, 60, 6, 46, 30, 11, 63, 4, 36, 40, 19, 57, 46, 11, 41, 63, 22, 25, 58, 10, 46, 2, 34, 27, 11, 38, 56, 34, 12, 53, 18, 33, 41, 51, 13, 28, 60, 20, 47, 14, 29, 59, 16, 62, 8, 22, 32, 47, 9, 49, 2, 44, 7, 12, 45, 6, 20, 27, 45, 24, 62, 42, 36, 11, 33, 15, 37, 7, 32, 10, 37, 1, 35, 50, 6, 11, 63, 24, 52, 15, 50, 24, 3, 37, 56, 27, 34, 22, 49, 16, 36, 62, 17, 39, 4, 15, 54, 24, 50, 8, 58, 26, 49, 54, 11, 30 }, { 4, 59, 41, 1, 53, 12, 25, 45, 59, 7, 51, 39, 54, 14, 46, 4, 27, 53, 16, 44, 18, 51, 1, 32, 25, 2, 50, 40, 20, 54, 24, 9, 62, 2, 27, 60, 1, 17, 36, 50, 6, 40, 30, 55, 41, 19, 49, 1, 21, 60, 40, 5, 62, 1, 22, 30, 57, 4, 43, 31, 1, 55, 40, 7, 27, 37, 30, 54, 1, 19, 42, 30, 56, 26, 62, 49, 24, 57, 37, 56, 2, 39, 16, 5, 30, 55, 3, 49, 60, 23, 56, 44, 17, 52, 13, 42, 28, 48, 18, 45, 9, 37, 21, 41, 58, 10, 48, 1, 63, 5, 41, 57, 2, 24, 12, 48, 27, 42, 32, 46, 13, 38, 19, 34, 5, 41, 25, 60 }, { 39, 28, 21, 46, 32, 57, 36, 9, 19, 42, 4, 29, 11, 43, 30, 49, 13, 42, 35, 56, 9, 39, 15, 52, 36, 61, 18, 26, 45, 14, 31, 48, 21, 43, 14, 33, 49, 54, 14, 44, 21, 62, 13, 23, 8, 62, 15, 51, 44, 7, 30, 37, 20, 42, 56, 7, 39, 18, 50, 11, 61, 9, 19, 43, 57, 2, 48, 11, 39, 60, 28, 4, 37, 17, 35, 1, 33, 11, 31, 14, 48, 19, 35, 51, 46, 21, 44, 29, 12, 41, 2, 22, 58, 26, 54, 4, 59, 38, 2, 33, 57, 1, 63, 13, 28, 51, 15, 40, 18, 45, 8, 30, 43, 37, 54, 19, 8, 59, 21, 6, 60, 29, 55, 10, 63, 15, 47, 17 }, { 3, 50, 10, 62, 18, 5, 27, 49, 60, 23, 55, 18, 62, 24, 56, 10, 59, 28, 2, 23, 34, 59, 43, 20, 10, 42, 8, 49, 1, 37, 57, 6, 51, 29, 53, 7, 23, 31, 5, 32, 51, 0, 35, 54, 45, 31, 5, 26, 36, 24, 55, 15, 48, 29, 14, 48, 26, 60, 21, 41, 36, 26, 50, 33, 14, 44, 17, 24, 52, 15, 46, 23, 54, 6, 47, 21, 60, 50, 4, 53, 29, 61, 8, 23, 1, 60, 19, 6, 53, 16, 47, 34, 6, 39, 16, 31, 12, 20, 53, 22, 30, 43, 25, 46, 35, 6, 44, 32, 53, 26, 55, 19, 11, 59, 5, 33, 51, 1, 35, 53, 25, 3, 42, 23, 44, 32, 7, 53 }, { 22, 44, 37, 6, 26, 51, 38, 0, 34, 13, 31, 46, 3, 37, 6, 19, 40, 21, 47, 63, 12, 5, 29, 55, 22, 58, 34, 28, 60, 22, 11, 41, 17, 38, 9, 44, 59, 39, 56, 19, 11, 47, 25, 15, 3, 39, 57, 17, 61, 11, 46, 3, 58, 9, 54, 35, 2, 34, 8, 45, 15, 56, 5, 23, 53, 33, 63, 35, 4, 59, 10, 51, 13, 61, 29, 41, 15, 25, 43, 19, 40, 10, 54, 33, 41, 12, 38, 51, 31, 26, 61, 9, 30, 45, 24, 62, 49, 40, 10, 61, 14, 49, 5, 17, 54, 20, 60, 23, 3, 13, 35, 50, 32, 23, 46, 27, 38, 63, 16, 12, 39, 48, 18, 51, 1, 27, 56, 35 }, { 63, 15, 30, 55, 43, 14, 57, 17, 53, 44, 7, 48, 26, 50, 32, 60, 0, 53, 14, 31, 50, 24, 46, 0, 38, 13, 4, 52, 16, 45, 30, 59, 0, 25, 55, 35, 16, 10, 26, 42, 58, 29, 60, 38, 50, 22, 28, 47, 0, 50, 28, 19, 33, 39, 11, 44, 16, 52, 24, 59, 3, 38, 27, 51, 0, 21, 7, 42, 26, 34, 21, 40, 33, 18, 39, 3, 54, 38, 8, 59, 0, 44, 27, 15, 58, 28, 57, 9, 43, 0, 36, 50, 20, 59, 8, 34, 0, 27, 47, 7, 36, 19, 56, 32, 0, 38, 11, 29, 62, 47, 6, 61, 0, 41, 14, 56, 10, 23, 45, 31, 57, 8, 36, 13, 58, 38, 11, 19 }, { 0, 34, 12, 47, 21, 2, 40, 30, 11, 25, 61, 20, 40, 15, 35, 22, 45, 36, 7, 41, 17, 57, 9, 48, 32, 62, 44, 24, 35, 3, 54, 13, 33, 63, 19, 4, 48, 22, 62, 2, 37, 8, 33, 6, 20, 52, 9, 32, 43, 13, 39, 63, 25, 4, 49, 23, 62, 32, 9, 30, 48, 18, 63, 12, 46, 29, 58, 13, 48, 8, 57, 31, 0, 51, 9, 58, 12, 22, 47, 29, 35, 22, 49, 5, 46, 4, 34, 20, 63, 24, 56, 11, 41, 3, 51, 19, 56, 35, 17, 58, 28, 42, 9, 45, 59, 26, 51, 42, 17, 36, 25, 15, 53, 21, 44, 3, 30, 55, 5, 50, 21, 28, 61, 32, 6, 49, 28, 46 }, { 58, 42, 60, 4, 31, 59, 22, 63, 35, 38, 9, 54, 1, 57, 8, 51, 16, 58, 27, 53, 3, 38, 30, 15, 27, 6, 19, 56, 10, 50, 21, 36, 47, 5, 43, 28, 51, 32, 13, 46, 18, 54, 16, 43, 63, 12, 36, 59, 22, 34, 5, 52, 17, 59, 27, 41, 0, 19, 55, 37, 13, 43, 6, 34, 41, 10, 36, 55, 19, 44, 3, 16, 58, 27, 49, 25, 32, 62, 17, 55, 13, 63, 18, 52, 25, 37, 17, 48, 13, 32, 5, 46, 28, 37, 14, 43, 25, 5, 51, 39, 3, 52, 33, 22, 8, 40, 12, 4, 57, 9, 46, 39, 28, 58, 13, 62, 17, 42, 19, 36, 0, 47, 16, 43, 24, 21, 54, 13 }, { 25, 9, 23, 50, 36, 8, 45, 14, 3, 51, 16, 28, 44, 12, 42, 29, 4, 26, 10, 47, 22, 61, 18, 54, 51, 39, 46, 13, 41, 26, 58, 7, 18, 39, 12, 57, 15, 1, 52, 27, 41, 23, 48, 1, 27, 45, 18, 2, 57, 26, 55, 8, 43, 31, 6, 58, 14, 51, 40, 5, 61, 31, 24, 54, 17, 60, 22, 1, 39, 30, 53, 45, 36, 13, 43, 5, 45, 2, 37, 6, 34, 42, 2, 39, 10, 62, 7, 54, 40, 18, 60, 15, 52, 21, 63, 8, 55, 46, 15, 30, 23, 13, 62, 16, 50, 24, 58, 31, 48, 21, 34, 2, 49, 7, 31, 37, 26, 48, 9, 61, 40, 11, 52, 2, 60, 40, 4, 37 }, { 52, 28, 39, 16, 54, 19, 29, 55, 42, 20, 58, 33, 24, 63, 18, 55, 39, 62, 43, 34, 12, 40, 6, 35, 2, 25, 8, 62, 34, 1, 31, 42, 61, 27, 53, 24, 40, 61, 34, 8, 59, 4, 30, 56, 40, 6, 53, 42, 10, 48, 16, 37, 12, 46, 21, 36, 47, 11, 28, 45, 22, 10, 57, 2, 49, 31, 14, 44, 61, 11, 25, 6, 23, 63, 18, 36, 28, 56, 20, 51, 11, 48, 27, 56, 32, 22, 45, 30, 2, 42, 27, 39, 1, 44, 23, 31, 38, 22, 11, 61, 43, 54, 4, 47, 35, 2, 44, 16, 28, 54, 12, 62, 18, 43, 10, 52, 1, 58, 33, 15, 29, 56, 20, 34, 9, 30, 48, 17 }, { 46, 2, 56, 11, 41, 1, 49, 6, 27, 47, 2, 48, 5, 32, 37, 3, 13, 19, 32, 1, 55, 28, 60, 17, 43, 59, 32, 20, 49, 16, 55, 23, 14, 46, 2, 36, 6, 30, 20, 49, 12, 47, 35, 14, 21, 60, 29, 14, 35, 24, 46, 1, 56, 29, 53, 8, 33, 23, 56, 1, 35, 46, 20, 39, 26, 4, 53, 28, 17, 38, 60, 34, 48, 9, 55, 15, 46, 7, 41, 31, 60, 24, 16, 36, 1, 59, 19, 52, 35, 6, 55, 11, 59, 33, 7, 57, 4, 29, 48, 1, 19, 26, 37, 30, 18, 63, 37, 6, 59, 1, 40, 24, 56, 33, 46, 22, 35, 7, 24, 53, 39, 5, 26, 45, 55, 18, 62, 7 }, { 20, 60, 29, 34, 20, 62, 33, 52, 10, 36, 13, 60, 41, 21, 50, 27, 56, 49, 8, 51, 21, 45, 11, 48, 8, 23, 53, 3, 29, 44, 5, 52, 9, 32, 50, 17, 43, 56, 3, 38, 24, 10, 62, 25, 51, 9, 33, 49, 61, 7, 30, 62, 22, 19, 2, 42, 63, 5, 49, 18, 60, 15, 52, 7, 43, 56, 23, 50, 5, 50, 2, 20, 41, 30, 1, 52, 22, 61, 14, 26, 3, 43, 53, 7, 47, 28, 11, 14, 23, 58, 33, 25, 47, 13, 50, 17, 40, 54, 34, 60, 41, 6, 59, 14, 50, 7, 25, 55, 20, 42, 51, 8, 27, 4, 16, 60, 28, 50, 44, 3, 22, 49, 63, 12, 33, 1, 43, 31 }, { 36, 5, 46, 8, 44, 24, 13, 39, 25, 57, 31, 18, 8, 52, 10, 45, 6, 30, 36, 24, 63, 4, 33, 26, 57, 40, 15, 56, 37, 12, 40, 25, 37, 58, 11, 63, 21, 45, 16, 60, 31, 53, 18, 33, 3, 45, 23, 0, 20, 54, 40, 15, 50, 38, 60, 16, 25, 42, 29, 38, 7, 41, 25, 62, 18, 33, 8, 35, 42, 16, 32, 56, 12, 39, 59, 19, 34, 9, 49, 38, 57, 12, 21, 50, 14, 40, 61, 44, 50, 9, 49, 19, 3, 29, 35, 62, 12, 24, 7, 18, 52, 32, 10, 46, 21, 41, 32, 11, 36, 29, 14, 34, 60, 38, 54, 11, 41, 14, 19, 57, 32, 16, 7, 41, 51, 25, 14, 57 }, { 53, 18, 26, 50, 15, 58, 4, 63, 17, 43, 7, 40, 61, 35, 15, 41, 23, 60, 16, 38, 14, 42, 19, 50, 0, 31, 10, 46, 27, 63, 18, 60, 0, 20, 29, 39, 8, 26, 37, 5, 42, 0, 44, 39, 57, 17, 58, 41, 28, 37, 4, 32, 9, 44, 12, 31, 54, 10, 59, 14, 27, 53, 12, 36, 0, 47, 13, 63, 21, 58, 10, 24, 50, 27, 4, 26, 44, 53, 31, 0, 18, 42, 29, 33, 57, 4, 32, 26, 0, 38, 16, 61, 41, 53, 20, 0, 42, 44, 49, 27, 10, 56, 39, 0, 57, 15, 53, 49, 3, 61, 22, 47, 17, 5, 49, 26, 2, 63, 39, 10, 47, 27, 37, 23, 4, 59, 38, 10 }, { 23, 39, 61, 3, 37, 28, 48, 31, 0, 34, 51, 23, 2, 26, 58, 0, 53, 11, 46, 1, 57, 29, 52, 14, 37, 61, 21, 35, 2, 49, 7, 34, 47, 55, 4, 33, 54, 13, 58, 52, 19, 50, 22, 7, 13, 29, 36, 11, 51, 17, 60, 25, 55, 4, 34, 51, 0, 35, 20, 48, 32, 3, 51, 30, 59, 28, 40, 3, 46, 29, 54, 43, 7, 62, 47, 11, 39, 4, 23, 46, 55, 8, 63, 5, 25, 37, 18, 46, 21, 56, 31, 5, 36, 8, 45, 58, 26, 15, 2, 36, 47, 21, 29, 44, 25, 34, 3, 27, 43, 10, 52, 0, 45, 30, 24, 36, 43, 18, 34, 59, 0, 52, 61, 15, 44, 19, 30, 49 }, { 0, 27, 12, 43, 54, 9, 22, 53, 21, 46, 15, 55, 29, 47, 20, 33, 39, 28, 59, 35, 9, 44, 5, 24, 47, 7, 52, 17, 56, 22, 30, 42, 14, 26, 45, 18, 49, 1, 24, 34, 11, 27, 55, 32, 61, 47, 2, 56, 6, 44, 13, 47, 36, 27, 58, 22, 16, 47, 40, 4, 57, 38, 21, 45, 16, 9, 56, 26, 11, 38, 0, 22, 36, 17, 33, 57, 16, 30, 62, 15, 35, 40, 20, 45, 59, 10, 54, 8, 63, 13, 52, 27, 22, 57, 28, 12, 32, 51, 55, 22, 63, 4, 16, 54, 12, 62, 45, 19, 58, 13, 32, 40, 20, 56, 7, 57, 9, 54, 6, 29, 42, 21, 8, 55, 35, 47, 6, 41 }, { 56, 33, 58, 32, 19, 35, 42, 6, 59, 11, 38, 5, 49, 12, 62, 7, 52, 17, 5, 25, 54, 20, 61, 31, 54, 27, 41, 11, 44, 5, 59, 12, 36, 51, 10, 61, 28, 41, 48, 9, 43, 63, 5, 40, 20, 8, 49, 26, 34, 21, 58, 1, 18, 45, 7, 39, 61, 26, 8, 50, 23, 10, 63, 5, 55, 37, 19, 49, 52, 15, 59, 47, 13, 54, 1, 25, 42, 58, 10, 48, 3, 27, 50, 1, 17, 48, 34, 41, 16, 40, 2, 45, 10, 39, 17, 61, 5, 38, 19, 9, 41, 31, 60, 38, 5, 23, 36, 8, 30, 55, 24, 63, 12, 48, 14, 51, 31, 20, 45, 25, 12, 50, 32, 2, 28, 11, 62, 14 }, { 44, 16, 7, 48, 1, 62, 16, 50, 27, 33, 61, 25, 17, 44, 31, 14, 22, 43, 32, 48, 18, 40, 8, 36, 3, 16, 33, 62, 23, 38, 25, 53, 2, 21, 41, 6, 22, 15, 59, 29, 16, 37, 26, 15, 52, 42, 23, 15, 54, 39, 10, 30, 53, 11, 49, 24, 2, 43, 55, 17, 34, 44, 15, 31, 24, 44, 2, 32, 7, 35, 25, 5, 40, 45, 29, 51, 6, 21, 37, 52, 24, 60, 13, 31, 53, 23, 2, 28, 49, 24, 31, 60, 20, 51, 1, 34, 48, 14, 59, 33, 50, 1, 18, 33, 48, 60, 17, 51, 39, 6, 38, 2, 35, 29, 40, 23, 1, 62, 15, 53, 37, 17, 46, 57, 40, 51, 24, 22 }, { 5, 37, 52, 24, 45, 13, 40, 3, 45, 9, 19, 42, 56, 4, 37, 46, 56, 2, 63, 11, 51, 1, 49, 13, 59, 45, 39, 1, 48, 15, 58, 9, 46, 31, 54, 35, 57, 38, 3, 46, 56, 4, 47, 57, 1, 30, 38, 63, 3, 46, 28, 63, 41, 14, 33, 62, 19, 32, 13, 28, 61, 1, 53, 42, 11, 60, 22, 62, 27, 42, 61, 31, 19, 8, 61, 12, 32, 55, 2, 18, 33, 12, 43, 36, 9, 62, 30, 55, 6, 58, 35, 7, 43, 29, 54, 23, 43, 30, 3, 25, 11, 45, 52, 28, 7, 14, 42, 1, 22, 50, 16, 53, 19, 59, 4, 46, 33, 41, 4, 35, 58, 5, 26, 13, 20, 2, 34, 54 }, { 30, 63, 21, 10, 26, 55, 29, 59, 23, 39, 53, 1, 36, 24, 59, 27, 10, 34, 23, 38, 30, 60, 22, 42, 28, 19, 9, 57, 30, 19, 43, 33, 13, 63, 3, 19, 11, 50, 31, 20, 14, 34, 10, 35, 17, 59, 7, 31, 19, 25, 50, 5, 20, 57, 29, 6, 52, 41, 4, 46, 20, 37, 26, 17, 49, 6, 39, 18, 53, 14, 3, 49, 57, 23, 34, 48, 14, 41, 28, 38, 56, 6, 58, 25, 39, 19, 43, 15, 37, 11, 47, 18, 53, 4, 37, 9, 62, 21, 53, 40, 57, 24, 13, 40, 56, 26, 47, 31, 59, 25, 45, 27, 10, 43, 21, 61, 13, 27, 48, 9, 23, 43, 31, 62, 38, 59, 9, 47 }, { 25, 4, 40, 60, 34, 6, 18, 36, 8, 57, 12, 30, 49, 14, 6, 54, 41, 16, 50, 6, 43, 15, 34, 4, 53, 24, 50, 35, 4, 51, 7, 55, 28, 24, 39, 44, 60, 7, 25, 62, 42, 53, 24, 61, 28, 45, 52, 12, 48, 37, 9, 35, 43, 3, 37, 48, 12, 58, 30, 52, 9, 59, 6, 57, 33, 29, 48, 4, 37, 45, 20, 34, 10, 39, 0, 60, 22, 45, 8, 63, 21, 42, 14, 49, 3, 56, 11, 46, 21, 61, 0, 42, 25, 13, 63, 17, 36, 8, 46, 16, 6, 35, 63, 0, 21, 37, 4, 57, 9, 34, 5, 61, 48, 32, 8, 37, 54, 17, 56, 30, 60, 0, 50, 16, 7, 29, 42, 17 }, { 32, 50, 15, 48, 2, 43, 52, 25, 47, 16, 32, 63, 21, 52, 40, 19, 0, 61, 29, 58, 20, 56, 26, 46, 12, 55, 6, 22, 62, 32, 17, 40, 0, 49, 34, 8, 27, 32, 48, 0, 21, 39, 5, 44, 12, 6, 22, 40, 0, 57, 16, 60, 23, 17, 54, 22, 36, 15, 24, 39, 19, 34, 47, 23, 0, 54, 13, 51, 24, 9, 55, 16, 52, 27, 44, 20, 4, 54, 26, 49, 0, 30, 46, 16, 29, 51, 34, 4, 52, 28, 33, 15, 57, 39, 26, 49, 0, 56, 27, 31, 48, 20, 43, 29, 53, 11, 46, 19, 41, 13, 55, 18, 0, 57, 26, 51, 2, 44, 6, 38, 14, 40, 22, 45, 36, 53, 3, 57 }, { 44, 12, 37, 28, 22, 57, 11, 38, 0, 51, 9, 41, 4, 29, 11, 47, 33, 45, 12, 26, 3, 36, 9, 63, 31, 16, 38, 44, 14, 47, 25, 61, 20, 58, 15, 47, 17, 57, 13, 36, 9, 51, 18, 29, 50, 36, 54, 20, 61, 27, 32, 13, 53, 44, 9, 27, 0, 63, 45, 2, 56, 10, 14, 43, 41, 28, 58, 11, 35, 60, 30, 41, 6, 63, 11, 51, 37, 32, 15, 10, 35, 53, 5, 61, 22, 7, 26, 59, 23, 9, 44, 48, 21, 3, 51, 32, 24, 41, 12, 61, 2, 55, 9, 15, 35, 58, 28, 15, 62, 30, 37, 23, 42, 29, 11, 17, 35, 24, 63, 20, 52, 28, 8, 55, 11, 23, 47, 19 }, { 0, 56, 8, 53, 14, 31, 61, 20, 55, 28, 62, 18, 35, 60, 25, 57, 7, 23, 39, 54, 47, 17, 43, 0, 40, 59, 29, 2, 56, 10, 37, 5, 43, 11, 29, 52, 1, 23, 54, 41, 59, 30, 55, 1, 62, 15, 33, 4, 43, 10, 47, 39, 1, 31, 40, 60, 49, 33, 7, 55, 26, 50, 31, 61, 8, 18, 21, 32, 44, 1, 25, 47, 18, 36, 30, 23, 59, 7, 40, 59, 27, 19, 38, 32, 44, 54, 40, 17, 38, 60, 27, 6, 35, 55, 10, 14, 44, 5, 50, 17, 38, 26, 42, 50, 18, 3, 44, 52, 2, 49, 7, 52, 15, 46, 62, 39, 55, 10, 31, 48, 3, 58, 33, 18, 61, 34, 13, 59 }, { 39, 27, 63, 20, 35, 41, 4, 45, 26, 5, 38, 13, 44, 2, 50, 17, 37, 52, 2, 13, 28, 58, 24, 51, 21, 8, 34, 48, 27, 42, 18, 51, 31, 56, 5, 36, 38, 44, 4, 17, 26, 11, 38, 23, 42, 8, 56, 39, 24, 51, 5, 56, 21, 59, 14, 6, 18, 42, 22, 35, 16, 37, 3, 25, 39, 46, 63, 5, 50, 17, 58, 8, 55, 3, 50, 12, 43, 17, 47, 2, 51, 9, 62, 12, 1, 35, 13, 50, 1, 37, 12, 51, 19, 29, 46, 59, 22, 58, 33, 45, 22, 60, 10, 32, 61, 39, 8, 33, 25, 36, 20, 60, 38, 4, 21, 5, 28, 45, 12, 18, 42, 11, 49, 1, 27, 40, 6, 30 }, { 24, 16, 42, 1, 50, 10, 48, 17, 33, 43, 24, 48, 21, 55, 31, 42, 10, 21, 63, 35, 49, 6, 33, 13, 41, 53, 10, 20, 60, 6, 53, 26, 12, 41, 22, 60, 14, 28, 63, 33, 49, 3, 45, 16, 48, 26, 14, 46, 18, 30, 35, 26, 8, 50, 29, 51, 25, 57, 12, 47, 53, 9, 62, 20, 54, 2, 36, 15, 40, 28, 33, 13, 38, 24, 46, 1, 29, 56, 33, 20, 44, 24, 41, 26, 57, 20, 63, 8, 30, 55, 5, 41, 62, 8, 34, 2, 37, 10, 19, 6, 37, 1, 53, 23, 5, 27, 58, 22, 43, 12, 50, 26, 9, 34, 54, 32, 49, 1, 59, 37, 22, 46, 25, 36, 51, 15, 54, 46 }, { 52, 7, 45, 33, 26, 58, 14, 60, 7, 54, 3, 58, 8, 34, 14, 5, 59, 30, 18, 44, 8, 22, 48, 62, 3, 26, 55, 38, 23, 16, 39, 1, 62, 24, 49, 9, 53, 19, 46, 7, 19, 60, 31, 58, 2, 34, 53, 7, 59, 2, 62, 42, 46, 19, 36, 11, 44, 4, 38, 28, 1, 43, 32, 51, 12, 29, 56, 22, 52, 2, 62, 49, 22, 60, 14, 35, 63, 5, 25, 57, 14, 53, 4, 46, 18, 31, 42, 22, 47, 20, 58, 31, 16, 43, 23, 54, 30, 42, 52, 57, 29, 49, 30, 13, 45, 48, 16, 55, 6, 63, 1, 44, 14, 58, 19, 47, 15, 24, 51, 34, 6, 55, 5, 63, 20, 41, 21, 9 }, { 30, 62, 18, 55, 5, 23, 39, 29, 49, 30, 15, 36, 28, 46, 60, 25, 39, 46, 4, 32, 61, 40, 15, 30, 36, 45, 14, 2, 49, 33, 57, 45, 18, 32, 3, 45, 30, 2, 35, 52, 40, 27, 13, 21, 38, 63, 20, 28, 37, 23, 16, 10, 13, 55, 2, 62, 21, 32, 60, 17, 58, 23, 5, 40, 16, 48, 7, 45, 10, 26, 43, 19, 6, 31, 52, 21, 39, 16, 48, 9, 37, 28, 36, 55, 7, 48, 3, 59, 15, 45, 25, 1, 53, 13, 47, 7, 62, 15, 4, 25, 12, 41, 18, 60, 38, 11, 34, 19, 39, 31, 29, 56, 23, 42, 3, 27, 60, 41, 8, 16, 61, 29, 43, 9, 32, 2, 60, 34 }, { 3, 38, 13, 37, 52, 44, 2, 19, 12, 42, 63, 19, 40, 1, 20, 50, 12, 55, 15, 56, 27, 1, 54, 11, 57, 18, 32, 63, 44, 4, 29, 13, 37, 61, 35, 16, 42, 57, 12, 22, 6, 55, 43, 10, 50, 5, 44, 11, 48, 52, 34, 58, 28, 41, 38, 30, 7, 52, 11, 49, 30, 14, 45, 27, 59, 34, 21, 38, 32, 58, 11, 36, 56, 42, 9, 41, 3, 54, 31, 42, 0, 60, 16, 11, 39, 24, 52, 33, 6, 36, 10, 40, 32, 60, 26, 20, 39, 28, 47, 34, 63, 8, 54, 3, 24, 56, 0, 51, 13, 47, 16, 40, 7, 35, 52, 11, 36, 4, 57, 30, 39, 13, 18, 50, 58, 28, 12, 48 }, { 57, 24, 49, 21, 10, 31, 61, 36, 56, 0, 22, 53, 11, 56, 32, 7, 36, 27, 41, 9, 46, 19, 34, 42, 25, 7, 50, 9, 28, 21, 54, 8, 50, 7, 27, 59, 10, 25, 48, 62, 37, 0, 33, 58, 25, 18, 32, 61, 0, 15, 45, 5, 50, 3, 23, 55, 47, 17, 40, 6, 60, 34, 53, 8, 41, 0, 61, 13, 54, 4, 46, 28, 0, 17, 48, 27, 58, 13, 23, 61, 33, 21, 50, 30, 62, 8, 14, 29, 56, 27, 61, 49, 17, 2, 44, 11, 51, 0, 59, 17, 40, 20, 32, 47, 36, 21, 42, 28, 60, 4, 54, 10, 59, 17, 30, 62, 21, 43, 26, 48, 0, 56, 36, 25, 8, 44, 39, 17 }, { 10, 42, 4, 59, 27, 47, 8, 23, 51, 32, 45, 6, 37, 26, 48, 43, 62, 0, 21, 53, 38, 12, 51, 5, 60, 47, 24, 37, 59, 15, 35, 47, 22, 55, 0, 50, 21, 40, 6, 29, 15, 52, 24, 8, 41, 55, 13, 29, 40, 56, 24, 31, 19, 33, 61, 15, 0, 35, 24, 42, 21, 2, 19, 57, 24, 15, 30, 50, 20, 25, 40, 16, 57, 34, 61, 8, 29, 45, 6, 49, 11, 47, 2, 44, 19, 57, 38, 50, 12, 42, 21, 4, 35, 52, 28, 56, 23, 36, 13, 45, 4, 52, 27, 14, 6, 62, 9, 45, 21, 37, 25, 46, 33, 49, 0, 44, 7, 53, 13, 19, 53, 31, 3, 47, 15, 56, 22, 51 }, { 35, 28, 53, 32, 1, 16, 54, 40, 9, 17, 25, 58, 14, 59, 3, 22, 16, 51, 31, 5, 23, 58, 28, 17, 35, 20, 0, 42, 11, 52, 3, 31, 41, 17, 43, 13, 32, 54, 18, 60, 32, 45, 17, 49, 2, 36, 51, 22, 7, 36, 9, 63, 48, 12, 46, 26, 43, 28, 63, 13, 48, 37, 51, 33, 5, 47, 55, 9, 42, 63, 7, 51, 24, 12, 37, 19, 55, 34, 18, 38, 15, 28, 54, 34, 5, 43, 22, 0, 48, 14, 54, 24, 58, 9, 38, 5, 32, 55, 21, 30, 49, 9, 59, 43, 30, 51, 35, 26, 7, 53, 2, 22, 14, 27, 57, 18, 38, 24, 33, 45, 10, 41, 20, 60, 37, 5, 32, 0 }, { 63, 19, 15, 40, 62, 35, 14, 28, 46, 61, 4, 49, 35, 10, 29, 54, 33, 8, 45, 62, 37, 1, 43, 55, 10, 52, 61, 30, 19, 40, 25, 62, 11, 38, 27, 58, 36, 3, 46, 8, 39, 4, 62, 28, 47, 20, 4, 54, 47, 27, 43, 1, 21, 38, 8, 58, 10, 54, 4, 56, 9, 26, 12, 39, 60, 27, 18, 37, 1, 31, 35, 5, 45, 50, 2, 43, 26, 1, 59, 23, 56, 40, 7, 26, 58, 17, 32, 63, 25, 39, 7, 31, 45, 19, 63, 15, 48, 8, 37, 61, 16, 34, 1, 56, 18, 3, 15, 58, 49, 32, 63, 41, 55, 5, 40, 22, 50, 6, 59, 2, 63, 23, 52, 11, 26, 61, 44, 23 }, { 11, 56, 46, 6, 22, 43, 58, 3, 34, 21, 38, 30, 18, 44, 52, 13, 41, 57, 17, 28, 14, 49, 25, 7, 33, 39, 26, 6, 56, 48, 1, 20, 56, 5, 46, 9, 19, 51, 30, 25, 56, 21, 35, 14, 57, 42, 16, 33, 10, 57, 17, 59, 41, 25, 53, 37, 20, 40, 30, 18, 31, 62, 44, 22, 3, 44, 11, 48, 23, 53, 18, 60, 29, 22, 62, 15, 53, 47, 10, 41, 3, 19, 52, 36, 13, 46, 10, 35, 3, 61, 41, 16, 1, 50, 26, 42, 18, 46, 2, 25, 54, 20, 39, 23, 47, 31, 41, 12, 38, 17, 8, 19, 31, 48, 12, 61, 9, 54, 29, 35, 15, 38, 6, 43, 34, 14, 7, 47 }, { 39, 2, 33, 26, 53, 8, 18, 50, 41, 12, 53, 1, 63, 24, 19, 39, 2, 24, 47, 10, 60, 38, 19, 63, 48, 4, 15, 45, 32, 14, 60, 36, 29, 53, 23, 63, 34, 12, 61, 1, 43, 11, 53, 30, 1, 26, 60, 45, 23, 39, 3, 29, 12, 50, 4, 16, 51, 3, 45, 36, 50, 1, 16, 54, 35, 14, 57, 30, 58, 9, 46, 14, 41, 10, 32, 38, 4, 30, 21, 51, 32, 63, 25, 1, 60, 27, 53, 18, 51, 22, 28, 55, 34, 12, 40, 3, 60, 29, 57, 41, 6, 44, 11, 53, 8, 61, 24, 57, 1, 28, 44, 59, 36, 3, 34, 25, 41, 31, 16, 44, 22, 47, 28, 58, 1, 49, 54, 29 }, { 58, 25, 50, 13, 38, 30, 60, 24, 6, 57, 27, 42, 9, 45, 6, 61, 30, 50, 4, 34, 29, 3, 46, 13, 22, 42, 58, 28, 9, 39, 23, 44, 7, 15, 44, 2, 40, 15, 47, 41, 23, 37, 7, 59, 38, 11, 34, 6, 62, 14, 52, 35, 55, 19, 32, 61, 33, 24, 57, 6, 22, 59, 29, 7, 49, 25, 40, 3, 17, 39, 27, 52, 0, 55, 16, 57, 24, 61, 36, 6, 29, 12, 48, 39, 20, 44, 6, 40, 33, 5, 48, 10, 57, 36, 22, 51, 33, 9, 24, 12, 62, 29, 50, 35, 14, 43, 5, 33, 47, 52, 13, 23, 10, 51, 56, 16, 46, 1, 49, 4, 61, 9, 52, 18, 31, 21, 36, 17 }, { 19, 42, 9, 48, 2, 44, 11, 37, 48, 20, 33, 16, 55, 35, 49, 15, 37, 20, 59, 16, 53, 22, 56, 31, 50, 11, 34, 54, 16, 51, 4, 49, 33, 53, 21, 28, 56, 24, 31, 9, 52, 16, 48, 24, 44, 13, 51, 20, 31, 49, 18, 6, 34, 2, 44, 14, 47, 8, 15, 43, 13, 41, 33, 52, 20, 61, 7, 51, 34, 62, 4, 20, 36, 33, 43, 8, 46, 13, 53, 17, 45, 42, 9, 31, 52, 11, 30, 56, 13, 59, 17, 44, 27, 6, 62, 11, 43, 17, 49, 38, 26, 2, 16, 27, 58, 21, 54, 18, 26, 5, 35, 61, 43, 27, 7, 39, 14, 58, 37, 55, 20, 33, 13, 40, 62, 10, 55, 5 }, { 51, 14, 61, 29, 59, 20, 55, 31, 0, 49, 11, 60, 3, 26, 22, 56, 0, 40, 12, 43, 41, 8, 36, 0, 17, 57, 24, 2, 46, 26, 61, 18, 0, 38, 12, 59, 6, 49, 3, 57, 19, 63, 5, 33, 18, 54, 28, 56, 0, 43, 26, 46, 63, 27, 56, 22, 27, 54, 38, 28, 63, 24, 10, 45, 0, 31, 42, 21, 12, 25, 44, 49, 59, 6, 26, 50, 3, 34, 27, 59, 0, 35, 62, 16, 4, 58, 47, 0, 43, 24, 37, 2, 54, 20, 46, 31, 0, 56, 34, 5, 55, 45, 60, 37, 0, 40, 10, 38, 63, 46, 15, 20, 0, 53, 21, 62, 30, 11, 24, 27, 40, 0, 57, 26, 3, 45, 27, 35 } }; #endif /* USE_DITHER_128128 */ EAPI void evas_common_convert_init(void) { } EAPI Gfx_Func_Convert evas_common_convert_func_get(DATA8 *dest, int w, int h __UNUSED__, int depth, DATA32 rmask, DATA32 gmask, DATA32 bmask, Convert_Pal_Mode pal_mode, int rotation) { if ((rmask == 0) && (gmask == 0) && (bmask == 0)) { if (depth == 8) { #ifdef BUILD_CONVERT_8_GRY_1 if (pal_mode == PAL_MODE_NONE) return evas_common_convert_rgba_to_8bpp_gry_256_dith; #endif #ifdef BUILD_CONVERT_8_GRY_16 if (pal_mode == PAL_MODE_NONE) return evas_common_convert_rgba_to_8bpp_gry_16_dith; #endif #ifdef BUILD_CONVERT_8_RGB_332 if (pal_mode == PAL_MODE_RGB332) return evas_common_convert_rgba_to_8bpp_rgb_332_dith; #endif #ifdef BUILD_CONVERT_8_RGB_666 if (pal_mode == PAL_MODE_RGB666) return evas_common_convert_rgba_to_8bpp_rgb_666_dith; #endif #ifdef BUILD_CONVERT_8_RGB_232 if (pal_mode == PAL_MODE_RGB232) return evas_common_convert_rgba_to_8bpp_rgb_232_dith; #endif #ifdef BUILD_CONVERT_8_RGB_222 if (pal_mode == PAL_MODE_RGB222) return evas_common_convert_rgba_to_8bpp_rgb_222_dith; #endif #ifdef BUILD_CONVERT_8_RGB_221 if (pal_mode == PAL_MODE_RGB221) return evas_common_convert_rgba_to_8bpp_rgb_221_dith; #endif #ifdef BUILD_CONVERT_8_RGB_121 if (pal_mode == PAL_MODE_RGB121) return evas_common_convert_rgba_to_8bpp_rgb_121_dith; #endif #ifdef BUILD_CONVERT_8_RGB_111 if (pal_mode == PAL_MODE_RGB111) return evas_common_convert_rgba_to_8bpp_rgb_111_dith; #endif #ifdef BUILD_CONVERT_8_GRAYSCALE_64 if (pal_mode == PAL_MODE_GRAY64) return evas_common_convert_rgba_to_8bpp_pal_gray64; #endif } } else { if (depth == 16) { #ifdef BUILD_CONVERT_16_RGB_565 if ((rmask == 0x0000f800) && (gmask == 0x000007e0) && (bmask == 0x0000001f)) { #ifdef BUILD_CONVERT_16_RGB_ROT0 if (rotation == 0) { if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3))) return evas_common_convert_rgba2_to_16bpp_rgb_565_dith; else return evas_common_convert_rgba_to_16bpp_rgb_565_dith; } #endif #ifdef BUILD_CONVERT_16_RGB_ROT180 if (rotation == 180) { if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3))) return evas_common_convert_rgba2_to_16bpp_rgb_565_dith_rot_180; else return evas_common_convert_rgba_to_16bpp_rgb_565_dith_rot_180; } #endif #ifdef BUILD_CONVERT_16_RGB_ROT270 if (rotation == 270) { if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3))) return evas_common_convert_rgba2_to_16bpp_rgb_565_dith_rot_270; else return evas_common_convert_rgba_to_16bpp_rgb_565_dith_rot_270; } #endif #ifdef BUILD_CONVERT_16_RGB_ROT90 if (rotation == 90) { if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3))) return evas_common_convert_rgba2_to_16bpp_rgb_565_dith_rot_90; else return evas_common_convert_rgba_to_16bpp_rgb_565_dith_rot_90; } #endif } #endif #ifdef BUILD_CONVERT_16_BGR_565 if ((rmask == 0x0000001f) && (gmask == 0x000007e0) && (bmask == 0x0000f800)) { #ifdef BUILD_CONVERT_16_RGB_ROT0 if (rotation == 0) { if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3))) return evas_common_convert_rgba2_to_16bpp_bgr_565_dith; else return evas_common_convert_rgba_to_16bpp_bgr_565_dith; } #endif #ifdef BUILD_CONVERT_16_RGB_ROT180 if (rotation == 180) { if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3))) return evas_common_convert_rgba2_to_16bpp_bgr_565_dith_rot_180; else return evas_common_convert_rgba_to_16bpp_bgr_565_dith_rot_180; } #endif #ifdef BUILD_CONVERT_16_RGB_ROT270 if (rotation == 270) { if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3))) return evas_common_convert_rgba2_to_16bpp_bgr_565_dith_rot_270; else return evas_common_convert_rgba_to_16bpp_bgr_565_dith_rot_270; } #endif #ifdef BUILD_CONVERT_16_RGB_ROT90 if (rotation == 90) { if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3))) return evas_common_convert_rgba2_to_16bpp_bgr_565_dith_rot_90; else return evas_common_convert_rgba_to_16bpp_bgr_565_dith_rot_90; } #endif } #endif #ifdef BUILD_CONVERT_16_RGB_555 if ((rmask == 0x00007c00) && (gmask == 0x000003e0) && (bmask == 0x0000001f)) { #ifdef BUILD_CONVERT_16_RGB_ROT0 if (rotation == 0) { if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3))) return evas_common_convert_rgba2_to_16bpp_rgb_555_dith; else return evas_common_convert_rgba_to_16bpp_rgb_555_dith; } #endif #ifdef BUILD_CONVERT_16_RGB_ROT180 if (rotation == 180) { if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3))) return evas_common_convert_rgba2_to_16bpp_rgb_555_dith_rot_180; else return evas_common_convert_rgba_to_16bpp_rgb_555_dith_rot_180; } #endif #ifdef BUILD_CONVERT_16_RGB_ROT270 if (rotation == 270) { if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3))) return evas_common_convert_rgba2_to_16bpp_rgb_555_dith_rot_270; else return evas_common_convert_rgba_to_16bpp_rgb_555_dith_rot_270; } #endif #ifdef BUILD_CONVERT_16_RGB_ROT90 if (rotation == 90) { if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3))) return evas_common_convert_rgba2_to_16bpp_rgb_555_dith_rot_90; else return evas_common_convert_rgba_to_16bpp_rgb_555_dith_rot_90; } #endif } #endif #ifdef BUILD_CONVERT_16_RGB_444 if ((rmask == 0x00000f00) && (gmask == 0x000000f0) && (bmask == 0x0000000f)) { #ifdef BUILD_CONVERT_16_RGB_ROT0 if (rotation == 0) { if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3))) return evas_common_convert_rgba2_to_16bpp_rgb_444_dith; else return evas_common_convert_rgba_to_16bpp_rgb_444_dith; } #endif #ifdef BUILD_CONVERT_16_RGB_ROT180 if (rotation == 180) { if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3))) return evas_common_convert_rgba2_to_16bpp_rgb_444_dith_rot_180; else return evas_common_convert_rgba_to_16bpp_rgb_444_dith_rot_180; } #endif #ifdef BUILD_CONVERT_16_RGB_ROT270 if (rotation == 270) { if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3))) return evas_common_convert_rgba2_to_16bpp_rgb_444_dith_rot_270; else return evas_common_convert_rgba_to_16bpp_rgb_444_dith_rot_270; } #endif #ifdef BUILD_CONVERT_16_RGB_ROT90 if (rotation == 90) { if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3))) return evas_common_convert_rgba2_to_16bpp_rgb_444_dith_rot_90; else return evas_common_convert_rgba_to_16bpp_rgb_444_dith_rot_90; } #endif } #endif #ifdef BUILD_CONVERT_16_RGB_454645 if ((rmask == 0x0000f000) && (gmask == 0x00000780) && (bmask == 0x0000001e)) { #ifdef BUILD_CONVERT_16_RGB_ROT0 if (rotation == 0) { if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3))) return evas_common_convert_rgba2_to_16bpp_rgb_454645_dith; else return evas_common_convert_rgba_to_16bpp_rgb_454645_dith; } #endif #ifdef BUILD_CONVERT_16_RGB_ROT180 if (rotation == 180) { if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3))) return evas_common_convert_rgba2_to_16bpp_rgb_454645_dith_rot_180; else return evas_common_convert_rgba_to_16bpp_rgb_454645_dith_rot_180; } #endif #ifdef BUILD_CONVERT_16_RGB_ROT270 if (rotation == 270) { if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3))) return evas_common_convert_rgba2_to_16bpp_rgb_454645_dith_rot_270; else return evas_common_convert_rgba_to_16bpp_rgb_454645_dith_rot_270; } #endif #ifdef BUILD_CONVERT_16_RGB_ROT90 if (rotation == 270) { if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3))) return evas_common_convert_rgba2_to_16bpp_rgb_454645_dith_rot_90; else return evas_common_convert_rgba_to_16bpp_rgb_454645_dith_rot_90; } #endif } #endif #ifdef BUILD_CONVERT_16_RGB_454645 if ((rmask == 0x0000f800) && (gmask == 0x000007e0) && (bmask == 0x0000001f)) { #ifdef BUILD_CONVERT_16_RGB_ROT0 if (rotation == 0) { if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3))) return evas_common_convert_rgba2_to_16bpp_rgb_454645_dith; else return evas_common_convert_rgba_to_16bpp_rgb_454645_dith; } #endif #ifdef BUILD_CONVERT_16_RGB_ROT180 if (rotation == 180) { if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3))) return evas_common_convert_rgba2_to_16bpp_rgb_454645_dith_rot_180; else return evas_common_convert_rgba_to_16bpp_rgb_454645_dith_rot_180; } #endif #ifdef BUILD_CONVERT_16_RGB_ROT270 if (rotation == 270) { if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3))) return evas_common_convert_rgba2_to_16bpp_rgb_454645_dith_rot_270; else return evas_common_convert_rgba_to_16bpp_rgb_454645_dith_rot_270; } #endif #ifdef BUILD_CONVERT_16_RGB_ROT90 if (rotation == 90) { if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3))) return evas_common_convert_rgba2_to_16bpp_rgb_454645_dith_rot_90; else return evas_common_convert_rgba_to_16bpp_rgb_454645_dith_rot_90; } #endif } #endif } if (depth == 32) { #ifdef BUILD_CONVERT_32_RGB_8888 if ((rmask == 0x00ff0000) && (gmask == 0x0000ff00) && (bmask == 0x000000ff)) { #ifdef BUILD_CONVERT_32_RGB_ROT0 if (rotation == 0) return evas_common_convert_rgba_to_32bpp_rgb_8888; #endif #ifdef BUILD_CONVERT_32_RGB_ROT180 if (rotation == 180) return evas_common_convert_rgba_to_32bpp_rgb_8888_rot_180; #endif #ifdef BUILD_CONVERT_32_RGB_ROT270 if (rotation == 270) return evas_common_convert_rgba_to_32bpp_rgb_8888_rot_270; #endif #ifdef BUILD_CONVERT_32_RGB_ROT90 if (rotation == 90) return evas_common_convert_rgba_to_32bpp_rgb_8888_rot_90; #endif } #endif #ifdef BUILD_CONVERT_32_RGBX_8888 if ((rmask == 0xff000000) && (gmask == 0x00ff0000) && (bmask == 0x0000ff00)) { #ifdef BUILD_CONVERT_32_RGB_ROT0 if (rotation == 0) return evas_common_convert_rgba_to_32bpp_rgbx_8888; #endif #ifdef BUILD_CONVERT_32_RGB_ROT180 if (rotation == 180) return evas_common_convert_rgba_to_32bpp_rgbx_8888_rot_180; #endif #ifdef BUILD_CONVERT_32_RGB_ROT270 if (rotation == 270) return evas_common_convert_rgba_to_32bpp_rgbx_8888_rot_270; #endif #ifdef BUILD_CONVERT_32_RGB_ROT90 if (rotation == 90) return evas_common_convert_rgba_to_32bpp_rgbx_8888_rot_90; #endif } #endif #ifdef BUILD_CONVERT_32_BGR_8888 if ((rmask == 0x000000ff) && (gmask == 0x0000ff00) && (bmask == 0x00ff0000)) { #ifdef BUILD_CONVERT_32_RGB_ROT0 if (rotation == 0) return evas_common_convert_rgba_to_32bpp_bgr_8888; #endif #ifdef BUILD_CONVERT_32_RGB_ROT180 if (rotation == 180) return evas_common_convert_rgba_to_32bpp_bgr_8888_rot_180; #endif #ifdef BUILD_CONVERT_32_RGB_ROT270 if (rotation == 270) return evas_common_convert_rgba_to_32bpp_bgr_8888_rot_270; #endif #ifdef BUILD_CONVERT_32_RGB_ROT90 if (rotation == 90) return evas_common_convert_rgba_to_32bpp_bgr_8888_rot_90; #endif } #endif #ifdef BUILD_CONVERT_32_BGRX_8888 if ((rmask == 0x0000ff00) && (gmask == 0x00ff0000) && (bmask == 0xff000000)) { #ifdef BUILD_CONVERT_32_RGB_ROT0 if (rotation == 0) return evas_common_convert_rgba_to_32bpp_bgrx_8888; #endif #ifdef BUILD_CONVERT_32_RGB_ROT180 if (rotation == 180) return evas_common_convert_rgba_to_32bpp_bgrx_8888_rot_180; #endif #ifdef BUILD_CONVERT_32_RGB_ROT270 if (rotation == 270) return evas_common_convert_rgba_to_32bpp_bgrx_8888_rot_270; #endif #ifdef BUILD_CONVERT_32_RGB_ROT90 if (rotation == 90) return evas_common_convert_rgba_to_32bpp_bgrx_8888_rot_90; #endif } #endif #ifdef BUILD_CONVERT_32_RGB_666 if ((rmask == 0x0003f000) && (gmask == 0x00000fc0) && (bmask == 0x0000003f)) { #ifdef BUILD_CONVERT_32_RGB_ROT0 if (rotation == 0) return evas_common_convert_rgba_to_32bpp_rgb_666; #endif #ifdef BUILD_CONVERT_32_RGB_ROT180 // if (rotation == 180) // return evas_common_convert_rgba_to_32bpp_rgb_8888_rot_180; #endif #ifdef BUILD_CONVERT_32_RGB_ROT270 // if (rotation == 270) // return evas_common_convert_rgba_to_32bpp_rgb_8888_rot_270; #endif #ifdef BUILD_CONVERT_32_RGB_ROT90 // if (rotation == 90) // return evas_common_convert_rgba_to_32bpp_rgb_8888_rot_90; #endif } #endif } if (depth == 24) { #ifdef BUILD_CONVERT_24_RGB_888 if ((rmask == 0x000000ff) && (gmask == 0x0000ff00) && (bmask == 0x00ff0000)) { if (rotation == 0) return evas_common_convert_rgba_to_24bpp_rgb_888; } #endif #ifdef BUILD_CONVERT_24_RGB_666 if ((rmask == 0x0003f000) && (gmask == 0x00000fc0) && (bmask == 0x0000003f)) { if (rotation == 0) return evas_common_convert_rgba_to_24bpp_rgb_666; } #endif #ifdef BUILD_CONVERT_24_BGR_888 if ((rmask == 0x00ff0000) && (gmask == 0x0000ff00) && (bmask == 0x000000ff)) { if (rotation == 0) return evas_common_convert_rgba_to_24bpp_bgr_888; } #endif } INF("depth = %i mode = %i", depth, pal_mode); if (depth == 8) { #ifdef BUILD_CONVERT_8_RGB_332 if (pal_mode == PAL_MODE_RGB332) return evas_common_convert_rgba_to_8bpp_rgb_332_dith; #endif #ifdef BUILD_CONVERT_8_RGB_666 if (pal_mode == PAL_MODE_RGB666) return evas_common_convert_rgba_to_8bpp_rgb_666_dith; #endif #ifdef BUILD_CONVERT_8_RGB_232 if (pal_mode == PAL_MODE_RGB232) return evas_common_convert_rgba_to_8bpp_rgb_232_dith; #endif #ifdef BUILD_CONVERT_8_RGB_222 if (pal_mode == PAL_MODE_RGB222) return evas_common_convert_rgba_to_8bpp_rgb_222_dith; #endif #ifdef BUILD_CONVERT_8_RGB_221 if (pal_mode == PAL_MODE_RGB221) return evas_common_convert_rgba_to_8bpp_rgb_221_dith; #endif #ifdef BUILD_CONVERT_8_RGB_121 if (pal_mode == PAL_MODE_RGB121) return evas_common_convert_rgba_to_8bpp_rgb_121_dith; #endif #ifdef BUILD_CONVERT_8_RGB_111 if (pal_mode == PAL_MODE_RGB111) return evas_common_convert_rgba_to_8bpp_rgb_111_dith; #endif } } /* no optimised converter for this... no generic one either. NULL */ return NULL; } evas-1.7.9/src/lib/engines/common/evas_font_default_walk.x0000664000175000017500000001172712175475547020616 00000000000000#ifndef _EVAS_FONT_DEFAULT_WALK_X #define _EVAS_FONT_DEFAULT_WALK_X /* Macros for text walking */ /** * @def EVAS_FONT_WALK_TEXT_INIT * @internal * This macro defines the variables that will later be used with the following * macros, and by font handling functions. * @see EVAS_FONT_WALK_TEXT_START * @see EVAS_FONT_WALK_TEXT_WORK * @see EVAS_FONT_WALK_TEXT_END */ # define EVAS_FONT_WALK_TEXT_INIT() \ int _pen_x = 0, _pen_y = 0; \ Evas_Coord _start_pen = (text_props->info && \ (text_props->start > 0)) ? \ text_props->info->glyph[text_props->start - 1].pen_after : 0 ; \ size_t char_index; \ (void) _pen_x; /* Sometimes it won't be used */ \ (void) _pen_y; /* Sometimes it won't be used */ /* Visual walk helper macros */ #ifdef OT_SUPPORT #define _EVAS_FONT_WALK_TEXT_START() \ Evas_Font_OT_Info *_ot_itr = (text_props->info) ? \ text_props->info->ot + text_props->start : NULL; \ if (!_ot_itr) break; \ for (char_index = 0 ; char_index < text_props->len ; char_index++, _glyph_itr++, _ot_itr++) \ { #else #define _EVAS_FONT_WALK_TEXT_START() \ for (char_index = 0 ; char_index < text_props->len ; char_index++, _glyph_itr++) \ { #endif /** * @def EVAS_FONT_WALK_TEXT_START * @internal * This runs through the text in visual order while updating char_index, * which is the current index in the text. * Does not end with a ; * Take a look at EVAS_FONT_WALK_X_OFF and the like. * @see EVAS_FONT_WALK_TEXT_INIT * @see EVAS_FONT_WALK_TEXT_WORK * @see EVAS_FONT_WALK_TEXT_END */ #define EVAS_FONT_WALK_TEXT_START() \ do \ { \ Evas_Font_Glyph_Info *_glyph_itr = (text_props->info) ? \ text_props->info->glyph + text_props->start : NULL; \ if (!_glyph_itr) break; \ _EVAS_FONT_WALK_TEXT_START() /*FIXME: doc */ #ifdef OT_SUPPORT # define EVAS_FONT_WALK_X_OFF \ (EVAS_FONT_ROUND_26_6_TO_INT(EVAS_FONT_OT_X_OFF_GET(*_ot_itr))) # define EVAS_FONT_WALK_Y_OFF \ (EVAS_FONT_ROUND_26_6_TO_INT(EVAS_FONT_OT_Y_OFF_GET(*_ot_itr))) # define EVAS_FONT_WALK_POS \ (EVAS_FONT_OT_POS_GET(*_ot_itr) - text_props->text_offset) # define EVAS_FONT_WALK_POS_NEXT \ ((!EVAS_FONT_WALK_IS_LAST) ? \ EVAS_FONT_OT_POS_GET(*(_ot_itr + 1)) - \ text_props->text_offset : \ EVAS_FONT_WALK_POS \ ) # define EVAS_FONT_WALK_POS_PREV \ ((char_index > 0) ? \ EVAS_FONT_OT_POS_GET(*(_ot_itr - 1)) - \ text_props->text_offset : \ EVAS_FONT_WALK_POS \ ) #else # define EVAS_FONT_WALK_X_OFF 0 # define EVAS_FONT_WALK_Y_OFF 0 # define EVAS_FONT_WALK_POS \ ((text_props->bidi.dir == EVAS_BIDI_DIRECTION_RTL) ? \ (text_props->len - char_index - 1) : \ (char_index)) # define EVAS_FONT_WALK_POS_NEXT \ ((!EVAS_FONT_WALK_IS_LAST) ? \ ((text_props->bidi.dir == EVAS_BIDI_DIRECTION_RTL) ? \ text_props->len - char_index - 2 \ : (char_index + 1)) : \ EVAS_FONT_WALK_POS) # define EVAS_FONT_WALK_POS_PREV \ ((char_index > 0) ? \ ((text_props->bidi.dir == EVAS_BIDI_DIRECTION_RTL) ? \ text_props->len - char_index \ : (char_index - 1)) : \ EVAS_FONT_WALK_POS) #endif #define EVAS_FONT_WALK_IS_VISIBLE (_glyph_itr->index != 0) #define EVAS_FONT_WALK_X_BEAR (_glyph_itr->x_bear) #define EVAS_FONT_WALK_Y_BEAR (_glyph_itr->y_bear) #define EVAS_FONT_WALK_X_ADV ((_glyph_itr > text_props->info->glyph) ? \ _glyph_itr->pen_after - (_glyph_itr - 1)->pen_after : \ _glyph_itr->pen_after) #define EVAS_FONT_WALK_WIDTH (_glyph_itr->width) #define EVAS_FONT_WALK_INDEX (_glyph_itr->index) #define EVAS_FONT_WALK_PEN_X (_pen_x) #define EVAS_FONT_WALK_PEN_X_AFTER (_glyph_itr->pen_after - _start_pen) #define EVAS_FONT_WALK_PEN_Y (EVAS_FONT_ROUND_26_6_TO_INT(_pen_y)) #define EVAS_FONT_WALK_Y_ADV (0) #define EVAS_FONT_WALK_IS_LAST \ (char_index + 1 == text_props->len) #define EVAS_FONT_WALK_IS_FIRST \ (char_index == 0) #define EVAS_FONT_WALK_LEN (text_props->len) /** * @def EVAS_FONT_WALK_TEXT_WORK * @internal * This macro actually updates the values mentioned in EVAS_FONT_WALK_TEXT_START * according to the current positing in the walk. * @see EVAS_FONT_WALK_TEXT_START * @see EVAS_FONT_WALK_TEXT_INIT * @see EVAS_FONT_WALK_TEXT_END */ #define EVAS_FONT_WALK_TEXT_WORK() do {} while(0) /** * @def EVAS_FONT_WALK_TEXT_END * @internal * Closes EVAS_FONT_WALK_TEXT_START, needs to end with a ; * @see EVAS_FONT_WALK_TEXT_START * @see EVAS_FONT_WALK_TEXT_INIT * @see EVAS_FONT_WALK_TEXT_WORK */ #define EVAS_FONT_WALK_TEXT_END() \ if (EVAS_FONT_WALK_IS_VISIBLE) \ { \ _pen_x = _glyph_itr->pen_after - _start_pen; \ } \ } \ } \ while(0) #endif evas-1.7.9/src/lib/engines/common/evas_op_mask_main_.c0000664000175000017500000001763312175475547017677 00000000000000#include "evas_common.h" static RGBA_Gfx_Func op_mask_span_funcs[SP_LAST][SM_LAST][SC_LAST][DP_LAST][CPU_LAST]; static RGBA_Gfx_Pt_Func op_mask_pt_funcs[SP_LAST][SM_LAST][SC_LAST][DP_LAST][CPU_LAST]; static void op_mask_init(void); static void op_mask_shutdown(void); static RGBA_Gfx_Func op_mask_pixel_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels); static RGBA_Gfx_Func op_mask_color_span_get(DATA32 col, RGBA_Image *dst, int pixels); static RGBA_Gfx_Func op_mask_pixel_color_span_get(RGBA_Image *src, DATA32 col, RGBA_Image *dst, int pixels); static RGBA_Gfx_Func op_mask_mask_color_span_get(DATA32 col, RGBA_Image *dst, int pixels); static RGBA_Gfx_Func op_mask_pixel_mask_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels); static RGBA_Gfx_Pt_Func op_mask_pixel_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst); static RGBA_Gfx_Pt_Func op_mask_color_pt_get(DATA32 col, RGBA_Image *dst); static RGBA_Gfx_Pt_Func op_mask_pixel_color_pt_get(Image_Entry_Flags src_flags, DATA32 col, RGBA_Image *dst); static RGBA_Gfx_Pt_Func op_mask_mask_color_pt_get(DATA32 col, RGBA_Image *dst); static RGBA_Gfx_Pt_Func op_mask_pixel_mask_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst); static RGBA_Gfx_Compositor _composite_mask = { "mask", op_mask_init, op_mask_shutdown, op_mask_pixel_span_get, op_mask_color_span_get, op_mask_pixel_color_span_get, op_mask_mask_color_span_get, op_mask_pixel_mask_span_get, op_mask_pixel_pt_get, op_mask_color_pt_get, op_mask_pixel_color_pt_get, op_mask_mask_color_pt_get, op_mask_pixel_mask_pt_get }; RGBA_Gfx_Compositor * evas_common_gfx_compositor_mask_get(void) { return &(_composite_mask); } # include "./evas_op_mask/op_mask_pixel_.c" # include "./evas_op_mask/op_mask_color_.c" # include "./evas_op_mask/op_mask_pixel_color_.c" # include "./evas_op_mask/op_mask_pixel_mask_.c" # include "./evas_op_mask/op_mask_mask_color_.c" //# include "./evas_op_mask/op_mask_pixel_mask_color_.c" # include "./evas_op_mask/op_mask_pixel_i386.c" # include "./evas_op_mask/op_mask_color_i386.c" # include "./evas_op_mask/op_mask_pixel_color_i386.c" # include "./evas_op_mask/op_mask_pixel_mask_i386.c" # include "./evas_op_mask/op_mask_mask_color_i386.c" //# include "./evas_op_mask/op_mask_pixel_mask_color_i386.c" static void op_mask_init(void) { memset(op_mask_span_funcs, 0, sizeof(op_mask_span_funcs)); memset(op_mask_pt_funcs, 0, sizeof(op_mask_pt_funcs)); #ifdef BUILD_MMX init_mask_pixel_span_funcs_mmx(); init_mask_pixel_color_span_funcs_mmx(); init_mask_pixel_mask_span_funcs_mmx(); init_mask_color_span_funcs_mmx(); init_mask_mask_color_span_funcs_mmx(); init_mask_pixel_pt_funcs_mmx(); init_mask_pixel_color_pt_funcs_mmx(); init_mask_pixel_mask_pt_funcs_mmx(); init_mask_color_pt_funcs_mmx(); init_mask_mask_color_pt_funcs_mmx(); #endif #ifdef BUILD_C init_mask_pixel_span_funcs_c(); init_mask_pixel_color_span_funcs_c(); init_mask_pixel_mask_span_funcs_c(); init_mask_color_span_funcs_c(); init_mask_mask_color_span_funcs_c(); init_mask_pixel_pt_funcs_c(); init_mask_pixel_color_pt_funcs_c(); init_mask_pixel_mask_pt_funcs_c(); init_mask_color_pt_funcs_c(); init_mask_mask_color_pt_funcs_c(); #endif } static void op_mask_shutdown(void) { } static RGBA_Gfx_Func mask_gfx_span_func_cpu(int s, int m, int c, int d) { RGBA_Gfx_Func func = NULL; int cpu = CPU_N; #ifdef BUILD_MMX if (evas_common_cpu_has_feature(CPU_FEATURE_MMX)) { cpu = CPU_MMX; func = op_mask_span_funcs[s][m][c][d][cpu]; if (func) return func; } #endif #ifdef BUILD_C cpu = CPU_C; func = op_mask_span_funcs[s][m][c][d][cpu]; if (func) return func; #endif return func; } static RGBA_Gfx_Func op_mask_pixel_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels __UNUSED__) { int s = SP_AN, m = SM_N, c = SC_N, d = DP_AN; if (src && src->cache_entry.flags.alpha) { dst->cache_entry.flags.alpha = 1; s = SP; } if (dst && dst->cache_entry.flags.alpha) d = DP; return mask_gfx_span_func_cpu(s, m, c, d); } static RGBA_Gfx_Func op_mask_color_span_get(DATA32 col, RGBA_Image *dst, int pixels __UNUSED__) { int s = SP_N, m = SM_N, c = SC_AN, d = DP_AN; if ((col >> 24) < 255) { if (dst) dst->cache_entry.flags.alpha = 1; c = SC; } if (col == (col | 0x00ffffff)) c = SC_AA; if (col == 0xffffffff) c = SC_N; if (dst && dst->cache_entry.flags.alpha) d = DP; return mask_gfx_span_func_cpu(s, m, c, d); } static RGBA_Gfx_Func op_mask_pixel_color_span_get(RGBA_Image *src, DATA32 col, RGBA_Image *dst, int pixels __UNUSED__) { int s = SP_AN, m = SM_N, c = SC_AN, d = DP_AN; if (src && src->cache_entry.flags.alpha) { if (dst) dst->cache_entry.flags.alpha = 1; s = SP; } if ((col >> 24) < 255) { if (dst) dst->cache_entry.flags.alpha = 1; c = SC; } if (col == (col | 0x00ffffff)) c = SC_AA; if (col == 0xffffffff) c = SC_N; if (dst && dst->cache_entry.flags.alpha) d = DP; return mask_gfx_span_func_cpu(s, m, c, d); } static RGBA_Gfx_Func op_mask_mask_color_span_get(DATA32 col, RGBA_Image *dst, int pixels __UNUSED__) { int s = SP_N, m = SM_AS, c = SC_AN, d = DP; if (dst) dst->cache_entry.flags.alpha = 1; if ((col >> 24) < 255) c = SC; if (col == (col | 0x00ffffff)) c = SC_AA; if (col == 0xffffffff) c = SC_N; return mask_gfx_span_func_cpu(s, m, c, d); } static RGBA_Gfx_Func op_mask_pixel_mask_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels __UNUSED__) { int s = SP_AN, m = SM_AS, c = SC_N, d = DP; if (dst) dst->cache_entry.flags.alpha = 1; if (src && src->cache_entry.flags.alpha) s = SP; return mask_gfx_span_func_cpu(s, m, c, d); } static RGBA_Gfx_Pt_Func mask_gfx_pt_func_cpu(int s, int m, int c, int d) { RGBA_Gfx_Pt_Func func = NULL; int cpu = CPU_N; #ifdef BUILD_MMX if (evas_common_cpu_has_feature(CPU_FEATURE_MMX)) { cpu = CPU_MMX; func = op_mask_pt_funcs[s][m][c][d][cpu]; if (func) return func; } #endif #ifdef BUILD_C cpu = CPU_C; func = op_mask_pt_funcs[s][m][c][d][cpu]; if (func) return func; #endif return func; } static RGBA_Gfx_Pt_Func op_mask_pixel_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst) { int s = SP_AN, m = SM_N, c = SC_N, d = DP_AN; if (src_flags.alpha) { dst->cache_entry.flags.alpha = 1; s = SP; } if (dst && dst->cache_entry.flags.alpha) d = DP; return mask_gfx_pt_func_cpu(s, m, c, d); } static RGBA_Gfx_Pt_Func op_mask_color_pt_get(DATA32 col, RGBA_Image *dst) { int s = SP_N, m = SM_N, c = SC_AN, d = DP_AN; if ((col >> 24) < 255) { if (dst) dst->cache_entry.flags.alpha = 1; c = SC; } if (col == (col | 0x00ffffff)) c = SC_AA; if (col == 0xffffffff) c = SC_N; if (dst && dst->cache_entry.flags.alpha) d = DP; return mask_gfx_pt_func_cpu(s, m, c, d); } static RGBA_Gfx_Pt_Func op_mask_pixel_color_pt_get(Image_Entry_Flags src_flags, DATA32 col, RGBA_Image *dst) { int s = SP_AN, m = SM_N, c = SC_AN, d = DP_AN; if (src_flags.alpha) { if (dst) dst->cache_entry.flags.alpha = 1; s = SP; } if ((col >> 24) < 255) { if (dst) dst->cache_entry.flags.alpha = 1; c = SC; } if (col == (col | 0x00ffffff)) c = SC_AA; if (col == 0xffffffff) c = SC_N; if (dst && dst->cache_entry.flags.alpha) d = DP; return mask_gfx_pt_func_cpu(s, m, c, d); } static RGBA_Gfx_Pt_Func op_mask_mask_color_pt_get(DATA32 col, RGBA_Image *dst) { int s = SP_N, m = SM_AS, c = SC_AN, d = DP; if (dst) dst->cache_entry.flags.alpha = 1; if ((col >> 24) < 255) c = SC; if (col == (col | 0x00ffffff)) c = SC_AA; if (col == 0xffffffff) c = SC_N; return mask_gfx_pt_func_cpu(s, m, c, d); } static RGBA_Gfx_Pt_Func op_mask_pixel_mask_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst) { int s = SP_AN, m = SM_AS, c = SC_N, d = DP; if (dst) dst->cache_entry.flags.alpha = 1; if (src_flags.alpha) s = SP; return mask_gfx_pt_func_cpu(s, m, c, d); } evas-1.7.9/src/lib/engines/common/Makefile.am0000664000175000017500000000556612175475547015757 00000000000000 SUBDIRS = evas_op_add evas_op_blend evas_op_copy evas_op_mask evas_op_mul evas_op_sub MAINTAINERCLEANFILES = Makefile.in AM_CPPFLAGS = -I. \ -I$(top_srcdir)/src/lib \ -I$(top_srcdir)/src/lib/cserve \ -I$(top_srcdir)/src/lib/cserve2 \ -I$(top_srcdir)/src/lib/include \ -DPACKAGE_BIN_DIR=\"$(bindir)\" \ -DPACKAGE_LIB_DIR=\"$(libdir)\" \ -DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \ @FREETYPE_CFLAGS@ @VALGRIND_CFLAGS@ \ @PIXMAN_CFLAGS@ \ @EET_CFLAGS@ @pthread_cflags@ \ @EVAS_GENERAL_CFLAGS@ \ @FRIBIDI_CFLAGS@ @HARFBUZZ_CFLAGS@ \ @PIXMAN_CFLAGS@ noinst_LTLIBRARIES = libevas_engine_common.la libevas_engine_common_la_SOURCES = \ evas_op_copy_main_.c \ evas_op_blend_main_.c \ evas_op_add_main_.c \ evas_op_sub_main_.c \ evas_op_mask_main_.c \ evas_op_mul_main_.c \ evas_blend_main.c \ evas_blit_main.c \ evas_convert_color.c \ evas_convert_colorspace.c \ evas_convert_gry_1.c \ evas_convert_gry_4.c \ evas_convert_gry_8.c \ evas_convert_main.c \ evas_convert_rgb_16.c \ evas_convert_rgb_24.c \ evas_convert_rgb_32.c \ evas_convert_rgb_8.c \ evas_convert_grypal_6.c \ evas_convert_yuv.c \ evas_cpu.c \ evas_draw_main.c \ evas_font_draw.c \ evas_font_load.c \ evas_font_main.c \ evas_font_query.c \ evas_image_load.c \ evas_image_save.c \ evas_image_main.c \ evas_image_data.c \ evas_image_scalecache.c \ evas_line_main.c \ evas_polygon_main.c \ evas_rectangle_main.c \ evas_scale_main.c \ evas_scale_sample.c \ evas_scale_smooth.c \ evas_scale_span.c \ evas_tiler.c \ evas_regionbuf.c \ evas_pipe.c \ language/evas_bidi_utils.c \ language/evas_language_utils.c \ evas_text_utils.c \ evas_font_ot.c \ evas_map_image.c \ evas_map_image.h EXTRA_DIST = \ evas_blend.h \ evas_blend_private.h \ evas_convert_color.h \ evas_convert_colorspace.h \ evas_convert_gry_1.h \ evas_convert_gry_4.h \ evas_convert_gry_8.h \ evas_convert_grypal_6.h \ evas_convert_main.h \ evas_convert_rgb_16.h \ evas_convert_rgb_24.h \ evas_convert_rgb_32.h \ evas_convert_rgb_8.h \ evas_convert_yuv.h \ evas_draw.h \ evas_font.h \ evas_font_default_walk.x \ evas_font_private.h \ evas_image.h \ evas_image_private.h \ evas_line.h \ evas_polygon.h \ evas_rectangle.h \ evas_scale_main.h \ evas_scale_smooth.h \ evas_scale_smooth_scaler.c \ evas_scale_smooth_scaler_down.c \ evas_scale_smooth_scaler_downx.c \ evas_scale_smooth_scaler_downx_downy.c \ evas_scale_smooth_scaler_downy.c \ evas_scale_smooth_scaler_noscale.c \ evas_scale_smooth_scaler_up.c \ evas_scale_span.h \ evas_pipe.h \ language/evas_bidi_utils.h \ language/evas_language_utils.h \ language/evas_script_table.h \ evas_text_utils.h \ evas_font_ot.h \ evas_map_image_internal.c \ evas_map_image_core.c \ evas_map_image_loop.c libevas_engine_common_la_LIBADD = \ evas_op_blend/libevas_engine_common_op_blend_master_sse3.la evas-1.7.9/src/lib/engines/common/evas_text_utils.h0000664000175000017500000000547712175475547017317 00000000000000#ifndef _EVAS_TEXT_UTILS_H # define _EVAS_TEXT_UTILS_H typedef struct _Evas_Text_Props Evas_Text_Props; typedef struct _Evas_Text_Props_Info Evas_Text_Props_Info; typedef struct _Evas_Font_Glyph_Info Evas_Font_Glyph_Info; typedef enum { EVAS_TEXT_PROPS_MODE_NONE = 0, EVAS_TEXT_PROPS_MODE_SHAPE } Evas_Text_Props_Mode; # include "evas_font_ot.h" # include "language/evas_bidi_utils.h" # include "language/evas_language_utils.h" /* Used for showing "malformed" or missing chars */ #define REPLACEMENT_CHAR 0xFFFD typedef struct _Evas_Glyph Evas_Glyph; struct _Evas_Text_Props { /* Start and len represent the start offset and the length in the * glyphs_info and ot_data fields, they are both internal */ size_t start; size_t len; size_t text_offset; /* The text offset from the start of the info */ size_t text_len; /* The length of the original text */ Evas_BiDi_Props bidi; Evas_Script_Type script; Evas_Text_Props_Info *info; void *font_instance; Evas_Glyph *glyphs; int glyphs_length; int generation; Eina_Bool changed : 1; Eina_Bool prepare : 1; }; struct _Evas_Text_Props_Info { unsigned int refcount; Evas_Font_Glyph_Info *glyph; Evas_Font_OT_Info *ot; }; /* Sorted in visual order when created */ struct _Evas_Font_Glyph_Info { unsigned int index; /* Should conform to FT */ Evas_Coord x_bear; /* This one is rarely used, only in draw, in which we already get the glyph * so it doesn't really save time. Leaving it here just so no one will * add it thinking it was accidentally skipped */ Evas_Coord y_bear; Evas_Coord width; Evas_Coord pen_after; }; void evas_common_text_props_bidi_set(Evas_Text_Props *props, Evas_BiDi_Paragraph_Props *bidi_par_props, size_t start); void evas_common_text_props_script_set(Evas_Text_Props *props, Evas_Script_Type scr); EAPI Eina_Bool evas_common_text_props_content_create(void *_fi, const Eina_Unicode *text, Evas_Text_Props *text_props, const Evas_BiDi_Paragraph_Props *par_props, size_t par_pos, int len, Evas_Text_Props_Mode mode); void evas_common_text_props_content_copy_and_ref(Evas_Text_Props *dst, const Evas_Text_Props *src); void evas_common_text_props_content_ref(Evas_Text_Props *props); void evas_common_text_props_content_nofree_unref(Evas_Text_Props *props); void evas_common_text_props_content_unref(Evas_Text_Props *props); EAPI int evas_common_text_props_cluster_next(const Evas_Text_Props *props, int pos); EAPI int evas_common_text_props_cluster_prev(const Evas_Text_Props *props, int pos); EAPI int evas_common_text_props_index_find(const Evas_Text_Props *props, int _cutoff); EAPI void evas_common_text_props_split(Evas_Text_Props *base, Evas_Text_Props *ext, int cutoff); EAPI void evas_common_text_props_merge(Evas_Text_Props *item1, const Evas_Text_Props *item2); #endif evas-1.7.9/src/lib/engines/common/evas_op_sub_main_.c0000664000175000017500000003467012175475547017535 00000000000000#include "evas_common.h" static RGBA_Gfx_Func op_sub_span_funcs[SP_LAST][SM_LAST][SC_LAST][DP_LAST][CPU_LAST]; static RGBA_Gfx_Pt_Func op_sub_pt_funcs[SP_LAST][SM_LAST][SC_LAST][DP_LAST][CPU_LAST]; static void op_sub_init(void); static void op_sub_shutdown(void); static RGBA_Gfx_Func op_sub_pixel_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels); static RGBA_Gfx_Func op_sub_color_span_get(DATA32 col, RGBA_Image *dst, int pixels); static RGBA_Gfx_Func op_sub_pixel_color_span_get(RGBA_Image *src, DATA32 col, RGBA_Image *dst, int pixels); static RGBA_Gfx_Func op_sub_mask_color_span_get(DATA32 col, RGBA_Image *dst, int pixels); static RGBA_Gfx_Func op_sub_pixel_mask_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels); static RGBA_Gfx_Pt_Func op_sub_pixel_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst); static RGBA_Gfx_Pt_Func op_sub_color_pt_get(DATA32 col, RGBA_Image *dst); static RGBA_Gfx_Pt_Func op_sub_pixel_color_pt_get(Image_Entry_Flags src_flags, DATA32 col, RGBA_Image *dst); static RGBA_Gfx_Pt_Func op_sub_mask_color_pt_get(DATA32 col, RGBA_Image *dst); static RGBA_Gfx_Pt_Func op_sub_pixel_mask_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst); static RGBA_Gfx_Compositor _composite_sub = { "sub", op_sub_init, op_sub_shutdown, op_sub_pixel_span_get, op_sub_color_span_get, op_sub_pixel_color_span_get, op_sub_mask_color_span_get, op_sub_pixel_mask_span_get, op_sub_pixel_pt_get, op_sub_color_pt_get, op_sub_pixel_color_pt_get, op_sub_mask_color_pt_get, op_sub_pixel_mask_pt_get }; RGBA_Gfx_Compositor * evas_common_gfx_compositor_sub_get(void) { return &(_composite_sub); } static RGBA_Gfx_Func op_sub_rel_span_funcs[SP_LAST][SM_LAST][SC_LAST][DP_LAST][CPU_LAST]; static RGBA_Gfx_Pt_Func op_sub_rel_pt_funcs[SP_LAST][SM_LAST][SC_LAST][DP_LAST][CPU_LAST]; static void op_sub_rel_init(void); static void op_sub_rel_shutdown(void); static RGBA_Gfx_Func op_sub_rel_pixel_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels); static RGBA_Gfx_Func op_sub_rel_color_span_get(DATA32 col, RGBA_Image *dst, int pixels); static RGBA_Gfx_Func op_sub_rel_pixel_color_span_get(RGBA_Image *src, DATA32 col, RGBA_Image *dst, int pixels); static RGBA_Gfx_Func op_sub_rel_mask_color_span_get(DATA32 col, RGBA_Image *dst, int pixels); static RGBA_Gfx_Func op_sub_rel_pixel_mask_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels); static RGBA_Gfx_Pt_Func op_sub_rel_pixel_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst); static RGBA_Gfx_Pt_Func op_sub_rel_color_pt_get(DATA32 col, RGBA_Image *dst); static RGBA_Gfx_Pt_Func op_sub_rel_pixel_color_pt_get(Image_Entry_Flags src_flags, DATA32 col, RGBA_Image *dst); static RGBA_Gfx_Pt_Func op_sub_rel_mask_color_pt_get(DATA32 col, RGBA_Image *dst); static RGBA_Gfx_Pt_Func op_sub_rel_pixel_mask_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst); static RGBA_Gfx_Compositor _composite_sub_rel = { "sub_rel", op_sub_rel_init, op_sub_rel_shutdown, op_sub_rel_pixel_span_get, op_sub_rel_color_span_get, op_sub_rel_pixel_color_span_get, op_sub_rel_mask_color_span_get, op_sub_rel_pixel_mask_span_get, op_sub_rel_pixel_pt_get, op_sub_rel_color_pt_get, op_sub_rel_pixel_color_pt_get, op_sub_rel_mask_color_pt_get, op_sub_rel_pixel_mask_pt_get }; RGBA_Gfx_Compositor * evas_common_gfx_compositor_sub_rel_get(void) { return &(_composite_sub_rel); } # include "./evas_op_sub/op_sub_pixel_.c" # include "./evas_op_sub/op_sub_color_.c" # include "./evas_op_sub/op_sub_pixel_color_.c" # include "./evas_op_sub/op_sub_pixel_mask_.c" # include "./evas_op_sub/op_sub_mask_color_.c" //# include "./evas_op_sub/op_sub_pixel_mask_color_.c" # include "./evas_op_sub/op_sub_pixel_i386.c" # include "./evas_op_sub/op_sub_color_i386.c" # include "./evas_op_sub/op_sub_pixel_color_i386.c" # include "./evas_op_sub/op_sub_pixel_mask_i386.c" # include "./evas_op_sub/op_sub_mask_color_i386.c" //# include "./evas_op_sub/op_sub_pixel_mask_color_i386.c" static void op_sub_init(void) { memset(op_sub_span_funcs, 0, sizeof(op_sub_span_funcs)); memset(op_sub_pt_funcs, 0, sizeof(op_sub_pt_funcs)); #ifdef BUILD_MMX init_sub_pixel_span_funcs_mmx(); init_sub_pixel_color_span_funcs_mmx(); init_sub_pixel_mask_span_funcs_mmx(); init_sub_color_span_funcs_mmx(); init_sub_mask_color_span_funcs_mmx(); init_sub_pixel_pt_funcs_mmx(); init_sub_pixel_color_pt_funcs_mmx(); init_sub_pixel_mask_pt_funcs_mmx(); init_sub_color_pt_funcs_mmx(); init_sub_mask_color_pt_funcs_mmx(); #endif #ifdef BUILD_C init_sub_pixel_span_funcs_c(); init_sub_pixel_color_span_funcs_c(); init_sub_rel_pixel_mask_span_funcs_c(); init_sub_color_span_funcs_c(); init_sub_mask_color_span_funcs_c(); init_sub_pixel_pt_funcs_c(); init_sub_pixel_color_pt_funcs_c(); init_sub_rel_pixel_mask_pt_funcs_c(); init_sub_color_pt_funcs_c(); init_sub_mask_color_pt_funcs_c(); #endif } static void op_sub_shutdown(void) { } static RGBA_Gfx_Func sub_gfx_span_func_cpu(int s, int m, int c, int d) { RGBA_Gfx_Func func = NULL; int cpu = CPU_N; #ifdef BUILD_MMX if (evas_common_cpu_has_feature(CPU_FEATURE_MMX)) { cpu = CPU_MMX; func = op_sub_span_funcs[s][m][c][d][cpu]; if (func) return func; } #endif #ifdef BUILD_C cpu = CPU_C; func = op_sub_span_funcs[s][m][c][d][cpu]; if (func) return func; #endif return func; } static RGBA_Gfx_Func op_sub_pixel_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels __UNUSED__) { int s = SP_AN, m = SM_N, c = SC_N, d = DP_AN; if (src && src->cache_entry.flags.alpha) s = SP; if (dst && dst->cache_entry.flags.alpha) d = DP; return sub_gfx_span_func_cpu(s, m, c, d); } static RGBA_Gfx_Func op_sub_color_span_get(DATA32 col, RGBA_Image *dst, int pixels __UNUSED__) { int s = SP_N, m = SM_N, c = SC_AN, d = DP_AN; if ((col >> 24) < 255) c = SC; if (col == (col | 0x00ffffff)) c = SC_AA; if (col == 0xffffffff) c = SC_N; if (dst && dst->cache_entry.flags.alpha) d = DP; return sub_gfx_span_func_cpu(s, m, c, d); } static RGBA_Gfx_Func op_sub_pixel_color_span_get(RGBA_Image *src, DATA32 col, RGBA_Image *dst, int pixels __UNUSED__) { int s = SP_AN, m = SM_N, c = SC_AN, d = DP_AN; if (src && src->cache_entry.flags.alpha) s = SP; if ((col >> 24) < 255) c = SC; if (col == (col | 0x00ffffff)) c = SC_AA; if (col == 0xffffffff) c = SC_N; if (dst && dst->cache_entry.flags.alpha) d = DP; return sub_gfx_span_func_cpu(s, m, c, d); } static RGBA_Gfx_Func op_sub_mask_color_span_get(DATA32 col, RGBA_Image *dst, int pixels __UNUSED__) { int s = SP_N, m = SM_AS, c = SC_AN, d = DP_AN; if ((col >> 24) < 255) c = SC; if (col == (col | 0x00ffffff)) c = SC_AA; if (col == 0xffffffff) c = SC_N; if (dst && dst->cache_entry.flags.alpha) d = DP; return sub_gfx_span_func_cpu(s, m, c, d); } static RGBA_Gfx_Func op_sub_pixel_mask_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels __UNUSED__) { int s = SP_AN, m = SM_AS, c = SC_N, d = DP_AN; if (src && src->cache_entry.flags.alpha) s = SP; if (dst && dst->cache_entry.flags.alpha) d = DP; return sub_gfx_span_func_cpu(s, m, c, d); } static RGBA_Gfx_Pt_Func sub_gfx_pt_func_cpu(int s, int m, int c, int d) { RGBA_Gfx_Pt_Func func = NULL; int cpu = CPU_N; #ifdef BUILD_MMX if (evas_common_cpu_has_feature(CPU_FEATURE_MMX)) { cpu = CPU_MMX; func = op_sub_pt_funcs[s][m][c][d][cpu]; if (func) return func; } #endif #ifdef BUILD_C cpu = CPU_C; func = op_sub_pt_funcs[s][m][c][d][cpu]; if (func) return func; #endif return func; } static RGBA_Gfx_Pt_Func op_sub_pixel_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst) { int s = SP_AN, m = SM_N, c = SC_N, d = DP_AN; if (src_flags.alpha) s = SP; if (dst && dst->cache_entry.flags.alpha) d = DP; return sub_gfx_pt_func_cpu(s, m, c, d); } static RGBA_Gfx_Pt_Func op_sub_color_pt_get(DATA32 col, RGBA_Image *dst) { int s = SP_N, m = SM_N, c = SC_AN, d = DP_AN; if ((col >> 24) < 255) c = SC; if (col == (col | 0x00ffffff)) c = SC_AA; if (col == 0xffffffff) c = SC_N; if (dst && dst->cache_entry.flags.alpha) d = DP; return sub_gfx_pt_func_cpu(s, m, c, d); } static RGBA_Gfx_Pt_Func op_sub_pixel_color_pt_get(Image_Entry_Flags src_flags, DATA32 col, RGBA_Image *dst) { int s = SP_AN, m = SM_N, c = SC_AN, d = DP_AN; if (src_flags.alpha) s = SP; if ((col >> 24) < 255) c = SC; if (col == (col | 0x00ffffff)) c = SC_AA; if (col == 0xffffffff) c = SC_N; if (dst && dst->cache_entry.flags.alpha) d = DP; return sub_gfx_pt_func_cpu(s, m, c, d); } static RGBA_Gfx_Pt_Func op_sub_mask_color_pt_get(DATA32 col, RGBA_Image *dst) { int s = SP_N, m = SM_AS, c = SC_AN, d = DP_AN; if ((col >> 24) < 255) c = SC; if (col == (col | 0x00ffffff)) c = SC_AA; if (col == 0xffffffff) c = SC_N; if (dst && dst->cache_entry.flags.alpha) d = DP; return sub_gfx_pt_func_cpu(s, m, c, d); } static RGBA_Gfx_Pt_Func op_sub_pixel_mask_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst) { int s = SP_AN, m = SM_AS, c = SC_N, d = DP_AN; if (src_flags.alpha) s = SP; if (dst && dst->cache_entry.flags.alpha) d = DP; return sub_gfx_pt_func_cpu(s, m, c, d); } static void op_sub_rel_init(void) { memset(op_sub_rel_span_funcs, 0, sizeof(op_sub_rel_span_funcs)); memset(op_sub_rel_pt_funcs, 0, sizeof(op_sub_rel_pt_funcs)); #ifdef BUILD_MMX init_sub_rel_pixel_span_funcs_mmx(); init_sub_rel_pixel_color_span_funcs_mmx(); init_sub_rel_pixel_mask_span_funcs_mmx(); init_sub_rel_color_span_funcs_mmx(); init_sub_rel_mask_color_span_funcs_mmx(); init_sub_rel_pixel_pt_funcs_mmx(); init_sub_rel_pixel_color_pt_funcs_mmx(); init_sub_rel_pixel_mask_pt_funcs_mmx(); init_sub_rel_color_pt_funcs_mmx(); init_sub_rel_mask_color_pt_funcs_mmx(); #endif #ifdef BUILD_C init_sub_rel_pixel_span_funcs_c(); init_sub_rel_pixel_color_span_funcs_c(); init_sub_rel_pixel_mask_span_funcs_c(); init_sub_rel_color_span_funcs_c(); init_sub_rel_mask_color_span_funcs_c(); init_sub_rel_pixel_pt_funcs_c(); init_sub_rel_pixel_color_pt_funcs_c(); init_sub_rel_pixel_mask_pt_funcs_c(); init_sub_rel_color_pt_funcs_c(); init_sub_rel_mask_color_pt_funcs_c(); #endif } static void op_sub_rel_shutdown(void) { } static RGBA_Gfx_Func sub_rel_gfx_span_func_cpu(int s, int m, int c, int d) { RGBA_Gfx_Func func = NULL; int cpu = CPU_N; #ifdef BUILD_MMX if (evas_common_cpu_has_feature(CPU_FEATURE_MMX)) { cpu = CPU_MMX; func = op_sub_rel_span_funcs[s][m][c][d][cpu]; if (func) return func; } #endif #ifdef BUILD_C cpu = CPU_C; func = op_sub_rel_span_funcs[s][m][c][d][cpu]; if (func) return func; #endif return func; } static RGBA_Gfx_Func op_sub_rel_pixel_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels __UNUSED__) { int s = SP_AN, m = SM_N, c = SC_N, d = DP_AN; if (src && src->cache_entry.flags.alpha) s = SP; if (dst && dst->cache_entry.flags.alpha) d = DP; return sub_rel_gfx_span_func_cpu(s, m, c, d); } static RGBA_Gfx_Func op_sub_rel_color_span_get(DATA32 col, RGBA_Image *dst, int pixels __UNUSED__) { int s = SP_N, m = SM_N, c = SC_AN, d = DP_AN; if ((col >> 24) < 255) c = SC; if (col == (col | 0x00ffffff)) c = SC_AA; if (col == 0xffffffff) c = SC_N; if (dst && dst->cache_entry.flags.alpha) d = DP; return sub_rel_gfx_span_func_cpu(s, m, c, d); } static RGBA_Gfx_Func op_sub_rel_pixel_color_span_get(RGBA_Image *src, DATA32 col, RGBA_Image *dst, int pixels __UNUSED__) { int s = SP_AN, m = SM_N, c = SC_AN, d = DP_AN; if (src && src->cache_entry.flags.alpha) s = SP; if ((col >> 24) < 255) c = SC; if (col == (col | 0x00ffffff)) c = SC_AA; if (col == 0xffffffff) c = SC_N; if (dst && dst->cache_entry.flags.alpha) d = DP; return sub_rel_gfx_span_func_cpu(s, m, c, d); } static RGBA_Gfx_Func op_sub_rel_mask_color_span_get(DATA32 col, RGBA_Image *dst, int pixels __UNUSED__) { int s = SP_N, m = SM_AS, c = SC_AN, d = DP_AN; if ((col >> 24) < 255) c = SC; if (col == (col | 0x00ffffff)) c = SC_AA; if (col == 0xffffffff) c = SC_N; if (dst && dst->cache_entry.flags.alpha) d = DP; return sub_rel_gfx_span_func_cpu(s, m, c, d); } static RGBA_Gfx_Func op_sub_rel_pixel_mask_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels __UNUSED__) { int s = SP_AN, m = SM_AS, c = SC_N, d = DP_AN; if (src && src->cache_entry.flags.alpha) s = SP; if (dst && dst->cache_entry.flags.alpha) d = DP; return sub_rel_gfx_span_func_cpu(s, m, c, d); } static RGBA_Gfx_Pt_Func sub_rel_gfx_pt_func_cpu(int s, int m, int c, int d) { RGBA_Gfx_Pt_Func func = NULL; int cpu = CPU_N; #ifdef BUILD_MMX if (evas_common_cpu_has_feature(CPU_FEATURE_MMX)) { cpu = CPU_MMX; func = op_sub_rel_pt_funcs[s][m][c][d][cpu]; if (func) return func; } #endif #ifdef BUILD_C cpu = CPU_C; func = op_sub_rel_pt_funcs[s][m][c][d][cpu]; if (func) return func; #endif return func; } static RGBA_Gfx_Pt_Func op_sub_rel_pixel_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst) { int s = SP_AN, m = SM_N, c = SC_N, d = DP_AN; if (src_flags.alpha) s = SP; if (dst && dst->cache_entry.flags.alpha) d = DP; return sub_rel_gfx_pt_func_cpu(s, m, c, d); } static RGBA_Gfx_Pt_Func op_sub_rel_color_pt_get(DATA32 col, RGBA_Image *dst) { int s = SP_N, m = SM_N, c = SC_AN, d = DP_AN; if ((col >> 24) < 255) c = SC; if (col == (col | 0x00ffffff)) c = SC_AA; if (col == 0xffffffff) c = SC_N; if (dst && dst->cache_entry.flags.alpha) d = DP; return sub_rel_gfx_pt_func_cpu(s, m, c, d); } static RGBA_Gfx_Pt_Func op_sub_rel_pixel_color_pt_get(Image_Entry_Flags src_flags, DATA32 col, RGBA_Image *dst) { int s = SP_AN, m = SM_N, c = SC_AN, d = DP_AN; if (src_flags.alpha) s = SP; if ((col >> 24) < 255) c = SC; if (col == (col | 0x00ffffff)) c = SC_AA; if (col == 0xffffffff) c = SC_N; if (dst && dst->cache_entry.flags.alpha) d = DP; return sub_rel_gfx_pt_func_cpu(s, m, c, d); } static RGBA_Gfx_Pt_Func op_sub_rel_mask_color_pt_get(DATA32 col, RGBA_Image *dst) { int s = SP_N, m = SM_AS, c = SC_AN, d = DP_AN; if ((col >> 24) < 255) c = SC; if (col == (col | 0x00ffffff)) c = SC_AA; if (col == 0xffffffff) c = SC_N; if (dst && dst->cache_entry.flags.alpha) d = DP; return sub_rel_gfx_pt_func_cpu(s, m, c, d); } static RGBA_Gfx_Pt_Func op_sub_rel_pixel_mask_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst) { int s = SP_AN, m = SM_AS, c = SC_N, d = DP_AN; if (src_flags.alpha) s = SP; if (dst && dst->cache_entry.flags.alpha) d = DP; return sub_rel_gfx_pt_func_cpu(s, m, c, d); } evas-1.7.9/src/lib/engines/common/evas_convert_color.c0000664000175000017500000001036112175475547017750 00000000000000#include "evas_common.h" #include "evas_convert_color.h" EAPI DATA32 evas_common_convert_argb_premul(DATA32 *data, unsigned int len) { DATA32 *de = data + len; DATA32 nas = 0; while (data < de) { DATA32 a = 1 + (*data >> 24); *data = (*data & 0xff000000) + (((((*data) >> 8) & 0xff) * a) & 0xff00) + (((((*data) & 0x00ff00ff) * a) >> 8) & 0x00ff00ff); data++; if ((a == 1) || (a == 256)) nas++; } return nas; } EAPI void evas_common_convert_argb_unpremul(DATA32 *data, unsigned int len) { DATA32 *de = data + len; while (data < de) { DATA32 a = (*data >> 24); if ((a > 0) && (a < 255)) *data = ARGB_JOIN(a, (R_VAL(data) * 255) / a, (G_VAL(data) * 255) / a, (B_VAL(data) * 255) / a); data++; } } EAPI void evas_common_convert_color_argb_premul(int a, int *r, int *g, int *b) { a++; if (r) { *r = (a * *r) >> 8; } if (g) { *g = (a * *g) >> 8; } if (b) { *b = (a * *b) >> 8; } } EAPI void evas_common_convert_color_argb_unpremul(int a, int *r, int *g, int *b) { if (!a) return; if (r) { *r = (255 * *r) / a; } if (g) { *g = (255 * *g) / a; } if (b) { *b = (255 * *b) / a; } } EAPI void evas_common_convert_color_hsv_to_rgb(float h, float s, float v, int *r, int *g, int *b) { int i; float f; v *= 255; if (s == 0) { if (r) *r = v; if (g) *g = v; if (b) *b = v; return; } h /= 60; i = h; f = h - i; s *= v; f *= s; s = v - s; switch (i) { case 1: if (r) *r = v - f; if (g) *g = v; if (b) *b = s; return; case 2: if (r) *r = s; if (g) *g = v; if (b) *b = s + f; return; case 3: if (r) *r = s; if (g) *g = v - f; if (b) *b = v; return; case 4: if (r) *r = s + f; if (g) *g = s; if (b) *b = v; return; case 5: if (r) *r = v; if (g) *g = s; if (b) *b = v - f; return; default: if (r) *r = v; if (g) *g = s + f; if (b) *b = s; break; } } EAPI void evas_common_convert_color_rgb_to_hsv(int r, int g, int b, float *h, float *s, float *v) { int max, min, d = r - g; //set min to MIN(g,r) d = (d & (~(d >> 8))); min = r - d; //set max to MAX(g,r) max = g + d; //set min to MIN(b,min) d = min - b; min -= (d & (~(d >> 8))); //set max to MAX(max,b) d = b - max; max += (d & (~(d >> 8))); d = max - min; if (v) *v = (max / 255.0); if (!max || !d) { if (s) *s = 0; if (h) *h = 0; return; } if (s) *s = (d / (float)max); if (r == max) { if (h) { *h = 60 * ((g - b) / (float)d); if (*h < 0) *h += 360; } return; } if (g == max) { if (h) { *h = 120 + (60 * ((b - r) / (float)d)); if (*h < 0) *h += 360; } return; } if (h) { *h = 240 + (60 * ((r - g) / (float)d)); if (*h < 0) *h += 360; } } EAPI void evas_common_convert_color_hsv_to_rgb_int(int h, int s, int v, int *r, int *g, int *b) { int i, f; if (!s) { *r = *g = *b = v; return; } i = h / 255; f = h - (i * 255); s = (v * s) / 255; f = (s * f) / 255; s = v - s; switch (i) { case 1: *r = v - f; *g = v; *b = s; return; case 2: *r = s; *g = v; *b = s + f; return; case 3: *r = s; *g = v - f; *b = v; return; case 4: *r = s + f; *g = s; *b = v; return; case 5: *r = v; *g = s; *b = v - f; return; default: *r = v; *g = s + f; *b = s; break; } } EAPI void evas_common_convert_color_rgb_to_hsv_int(int r, int g, int b, int *h, int *s, int *v) { int min, max, d = r - g; d = (d & (~(d >> 8))); min = r - d; max = g + d; d = min - b; min -= (d & (~(d >> 8))); d = b - max; max += (d & (~(d >> 8))); d = max - min; *v = max; if (!max) { *s = *h = 0; return; } *s = ((d * 255) / max); if (r == max) { *h = (((g - b) * 255) / d); if (*h < 0) *h += 1530; return; } if (g == max) { *h = 510 + (((b - r) * 255) / d); if (*h < 0) *h += 1530; return; } *h = 1020 + (((r - g) * 255) / d); if (*h < 0) *h += 1530; } evas-1.7.9/src/lib/engines/common_8/0000775000175000017500000000000012234557316014205 500000000000000evas-1.7.9/src/lib/engines/common_8/Makefile.in0000664000175000017500000006360212234557302016174 00000000000000# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/lib/engines/common_8 DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/efl_attribute.m4 \ $(top_srcdir)/m4/efl_coverage.m4 \ $(top_srcdir)/m4/efl_doxygen.m4 \ $(top_srcdir)/m4/efl_fnmatch.m4 \ $(top_srcdir)/m4/efl_path_max.m4 \ $(top_srcdir)/m4/efl_shm_open.m4 $(top_srcdir)/m4/efl_tests.m4 \ $(top_srcdir)/m4/evas_check_engine.m4 \ $(top_srcdir)/m4/evas_check_loader.m4 \ $(top_srcdir)/m4/evas_converter.m4 \ $(top_srcdir)/m4/evas_dither.m4 \ $(top_srcdir)/m4/evas_scaler.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libevas_engine_common_8_la_LIBADD = am_libevas_engine_common_8_la_OBJECTS = evas_soft8_dither_mask.lo \ evas_soft8_font.lo evas_soft8_image_unscaled.lo \ evas_soft8_main.lo evas_soft8_rectangle.lo evas_soft8_line.lo \ evas_soft8_polygon.lo evas_soft8_image_scaled_sampled.lo libevas_engine_common_8_la_OBJECTS = \ $(am_libevas_engine_common_8_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libevas_engine_common_8_la_SOURCES) DIST_SOURCES = $(libevas_engine_common_8_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHECK_CFLAGS = @CHECK_CFLAGS@ CHECK_LIBS = @CHECK_LIBS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@ DIRECTFB_LIBS = @DIRECTFB_LIBS@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ ECORE_EVAS_CFLAGS = @ECORE_EVAS_CFLAGS@ ECORE_EVAS_LIBS = @ECORE_EVAS_LIBS@ EDB_CFLAGS = @EDB_CFLAGS@ EDB_LIBS = @EDB_LIBS@ EDJE_CFLAGS = @EDJE_CFLAGS@ EDJE_LIBS = @EDJE_LIBS@ EET_CFLAGS = @EET_CFLAGS@ EET_LIBS = @EET_LIBS@ EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@ EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@ EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@ EFL_SHM_OPEN_LIBS = @EFL_SHM_OPEN_LIBS@ EGREP = @EGREP@ EINA_CFLAGS = @EINA_CFLAGS@ EINA_LIBS = @EINA_LIBS@ EVAS_CFLAGS = @EVAS_CFLAGS@ EVAS_GENERAL_CFLAGS = @EVAS_GENERAL_CFLAGS@ EVAS_GENERAL_LIBS = @EVAS_GENERAL_LIBS@ EVAS_LIBS = @EVAS_LIBS@ EVAS_SSE3_CFLAGS = @EVAS_SSE3_CFLAGS@ EVIL_CFLAGS = @EVIL_CFLAGS@ EVIL_LIBS = @EVIL_LIBS@ EXEEXT = @EXEEXT@ EXOTIC_CFLAGS = @EXOTIC_CFLAGS@ EXOTIC_LIBS = @EXOTIC_LIBS@ FGREP = @FGREP@ FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@ FONTCONFIG_LIBS = @FONTCONFIG_LIBS@ FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ FREETYPE_LIBS = @FREETYPE_LIBS@ FRIBIDI_CFLAGS = @FRIBIDI_CFLAGS@ FRIBIDI_LIBS = @FRIBIDI_LIBS@ GL_EET_CFLAGS = @GL_EET_CFLAGS@ GL_EET_LIBS = @GL_EET_LIBS@ GREP = @GREP@ HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@ HARFBUZZ_LIBS = @HARFBUZZ_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LINEBREAK_CFLAGS = @LINEBREAK_CFLAGS@ LINEBREAK_LIBS = @LINEBREAK_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MODULE_ARCH = @MODULE_ARCH@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ SDL_CFLAGS = @SDL_CFLAGS@ SDL_LIBS = @SDL_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ SVG_CFLAGS = @SVG_CFLAGS@ SVG_LIBS = @SVG_LIBS@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ XCB_CFLAGS = @XCB_CFLAGS@ XCB_GL_CFLAGS = @XCB_GL_CFLAGS@ XCB_GL_LIBS = @XCB_GL_LIBS@ XCB_LIBS = @XCB_LIBS@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_ct_OBJC = @ac_ct_OBJC@ altivec_cflags = @altivec_cflags@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ dlopen_libs = @dlopen_libs@ docdir = @docdir@ dvidir = @dvidir@ edje_cc = @edje_cc@ efl_doxygen = @efl_doxygen@ efl_have_doxygen = @efl_have_doxygen@ evas_engine_buffer_cflags = @evas_engine_buffer_cflags@ evas_engine_buffer_libs = @evas_engine_buffer_libs@ evas_engine_direct3d_cflags = @evas_engine_direct3d_cflags@ evas_engine_direct3d_libs = @evas_engine_direct3d_libs@ evas_engine_directfb_cflags = @evas_engine_directfb_cflags@ evas_engine_directfb_libs = @evas_engine_directfb_libs@ evas_engine_fb_cflags = @evas_engine_fb_cflags@ evas_engine_fb_libs = @evas_engine_fb_libs@ evas_engine_gl_cocoa_cflags = @evas_engine_gl_cocoa_cflags@ evas_engine_gl_cocoa_libs = @evas_engine_gl_cocoa_libs@ evas_engine_gl_common_libs = @evas_engine_gl_common_libs@ evas_engine_gl_sdl_cflags = @evas_engine_gl_sdl_cflags@ evas_engine_gl_sdl_libs = @evas_engine_gl_sdl_libs@ evas_engine_gl_xcb_cflags = @evas_engine_gl_xcb_cflags@ evas_engine_gl_xcb_libs = @evas_engine_gl_xcb_libs@ evas_engine_gl_xlib_cflags = @evas_engine_gl_xlib_cflags@ evas_engine_gl_xlib_libs = @evas_engine_gl_xlib_libs@ evas_engine_psl1ght_cflags = @evas_engine_psl1ght_cflags@ evas_engine_psl1ght_libs = @evas_engine_psl1ght_libs@ evas_engine_software_16_sdl_cflags = @evas_engine_software_16_sdl_cflags@ evas_engine_software_16_sdl_libs = @evas_engine_software_16_sdl_libs@ evas_engine_software_16_wince_cflags = @evas_engine_software_16_wince_cflags@ evas_engine_software_16_wince_libs = @evas_engine_software_16_wince_libs@ evas_engine_software_16_x11_cflags = @evas_engine_software_16_x11_cflags@ evas_engine_software_16_x11_libs = @evas_engine_software_16_x11_libs@ evas_engine_software_8_x11_cflags = @evas_engine_software_8_x11_cflags@ evas_engine_software_8_x11_libs = @evas_engine_software_8_x11_libs@ evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@ evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@ evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@ evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ evas_image_loader_edb_libs = @evas_image_loader_edb_libs@ evas_image_loader_eet_cflags = @evas_image_loader_eet_cflags@ evas_image_loader_eet_libs = @evas_image_loader_eet_libs@ evas_image_loader_generic_cflags = @evas_image_loader_generic_cflags@ evas_image_loader_generic_libs = @evas_image_loader_generic_libs@ evas_image_loader_gif_cflags = @evas_image_loader_gif_cflags@ evas_image_loader_gif_libs = @evas_image_loader_gif_libs@ evas_image_loader_ico_cflags = @evas_image_loader_ico_cflags@ evas_image_loader_ico_libs = @evas_image_loader_ico_libs@ evas_image_loader_jpeg_cflags = @evas_image_loader_jpeg_cflags@ evas_image_loader_jpeg_libs = @evas_image_loader_jpeg_libs@ evas_image_loader_pmaps_cflags = @evas_image_loader_pmaps_cflags@ evas_image_loader_pmaps_libs = @evas_image_loader_pmaps_libs@ evas_image_loader_png_cflags = @evas_image_loader_png_cflags@ evas_image_loader_png_libs = @evas_image_loader_png_libs@ evas_image_loader_psd_cflags = @evas_image_loader_psd_cflags@ evas_image_loader_psd_libs = @evas_image_loader_psd_libs@ evas_image_loader_svg_cflags = @evas_image_loader_svg_cflags@ evas_image_loader_svg_libs = @evas_image_loader_svg_libs@ evas_image_loader_tga_cflags = @evas_image_loader_tga_cflags@ evas_image_loader_tga_libs = @evas_image_loader_tga_libs@ evas_image_loader_tiff_cflags = @evas_image_loader_tiff_cflags@ evas_image_loader_tiff_libs = @evas_image_loader_tiff_libs@ evas_image_loader_wbmp_cflags = @evas_image_loader_wbmp_cflags@ evas_image_loader_wbmp_libs = @evas_image_loader_wbmp_libs@ evas_image_loader_xpm_cflags = @evas_image_loader_xpm_cflags@ evas_image_loader_xpm_libs = @evas_image_loader_xpm_libs@ exec_prefix = @exec_prefix@ have_evas_engine_gl_x11 = @have_evas_engine_gl_x11@ have_evas_engine_gl_xcb = @have_evas_engine_gl_xcb@ have_evas_engine_gl_xlib = @have_evas_engine_gl_xlib@ have_evas_engine_software_x11 = @have_evas_engine_software_x11@ have_evas_engine_software_xcb = @have_evas_engine_software_xcb@ have_evas_engine_software_xlib = @have_evas_engine_software_xlib@ have_lcov = @have_lcov@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_enable_auto_import = @lt_enable_auto_import@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgconfig_requires_private = @pkgconfig_requires_private@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pthread_cflags = @pthread_cflags@ pthread_libs = @pthread_libs@ release_info = @release_info@ requirement_evas = @requirement_evas@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ shm_open_libs = @shm_open_libs@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ version_info = @version_info@ MAINTAINERCLEANFILES = Makefile.in AM_CPPFLAGS = \ -I. \ -I$(top_srcdir)/src/lib \ -I$(top_srcdir)/src/lib/include \ @FREETYPE_CFLAGS@ \ @PIXMAN_CFLAGS@ \ @VALGRIND_CFLAGS@ \ @EVAS_GENERAL_CFLAGS@ \ @EET_CFLAGS@ \ @pthread_cflags@ noinst_LTLIBRARIES = libevas_engine_common_8.la libevas_engine_common_8_la_SOURCES = \ evas_soft8_dither_mask.c \ evas_soft8_font.c \ evas_soft8_image_unscaled.c \ evas_soft8_main.c \ evas_soft8_rectangle.c \ evas_soft8_line.c \ evas_soft8_polygon.c \ evas_soft8_image_scaled_sampled.c libevas_engine_common_8_la_DEPENDENCIES = $(top_builddir)/config.h EXTRA_DIST = \ evas_soft8_scanline_blend.c \ evas_soft8_scanline_fill.c all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/lib/engines/common_8/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/lib/engines/common_8/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libevas_engine_common_8.la: $(libevas_engine_common_8_la_OBJECTS) $(libevas_engine_common_8_la_DEPENDENCIES) $(EXTRA_libevas_engine_common_8_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libevas_engine_common_8_la_OBJECTS) $(libevas_engine_common_8_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_soft8_dither_mask.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_soft8_font.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_soft8_image_scaled_sampled.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_soft8_image_unscaled.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_soft8_line.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_soft8_main.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_soft8_polygon.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_soft8_rectangle.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES cscopelist-am ctags \ ctags-am distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: evas-1.7.9/src/lib/engines/common_8/evas_soft8_scanline_fill.c0000664000175000017500000000236712175475547021255 00000000000000/** NOTE: This file is meant to be included by users **/ /***************************************************************************** * Point processing * * _soft8_pt___[_]() * * Scanline processing * * _soft8_scanline___[_]() * ****************************************************************************/ EFL_ALWAYS_INLINE void _soft8_pt_fill_solid_solid(DATA8 * dst, DATA8 gry8) { *dst = gry8; } EFL_ALWAYS_INLINE void _soft8_scanline_fill_solid_solid(DATA8 * dst, int size, DATA8 gry8) { memset(dst, gry8, size); } EFL_ALWAYS_INLINE void _soft8_pt_fill_transp_solid(DATA8 * dst, DATA8 gry8, DATA8 alpha) { *dst = GRY_8_BLEND(gry8, *dst, alpha); } static void _soft8_scanline_fill_transp_solid(DATA8 * dst, int size, DATA8 gry8, DATA8 alpha) { DATA8 *start, *end; start = dst; pld(start, 0); end = start + (size & ~7); while (start < end) { pld(start, 32); UNROLL8( { _soft8_pt_fill_transp_solid(start, gry8, alpha); start++;} ); } end = start + (size & 7); for (; start < end; start++) _soft8_pt_fill_transp_solid(start, gry8, alpha); } evas-1.7.9/src/lib/engines/common_8/evas_soft8_scanline_blend.c0000664000175000017500000003000212175475547021376 00000000000000/** NOTE: This file is meant to be included by users **/ /** NOTE2: r, g, b parameters are 16bits, so you can pass 0 to 256 inclusive. ** this is due our division by 256 when multiplying the color. **/ /***************************************************************************** * Scanline processing * * _soft8_scanline___[_]() * ****************************************************************************/ EFL_ALWAYS_INLINE void _soft8_pt_blend_transp_solid(DATA8 * p_dst, DATA8 src, DATA8 alpha) { if (alpha == 0xff) *p_dst = src; else if (alpha != 0) { *p_dst = GRY_8_BLEND(src, *p_dst, alpha); } } /*********************************************************************** * Regular blend operations */ static void _soft8_scanline_blend_transp_solid(DATA8 * src, DATA8 * alpha, DATA8 * dst, int size) { DATA8 *start, *end; start = dst; end = start + (size & ~7); pld(alpha, 0); pld(src, 0); /* work on 8 pixels per time, do data preload */ while (start < end) { DATA8 alpha1, alpha2; alpha1 = alpha[0]; alpha += 8; /* empirical tests show these give the best performance */ pld(alpha, 8); pld(src, 32); src += 8; start += 8; alpha2 = alpha[-7]; _soft8_pt_blend_transp_solid(start - 8, src[-8], alpha1); alpha1 = alpha[-6]; _soft8_pt_blend_transp_solid(start - 7, src[-7], alpha2); alpha2 = alpha[-5]; _soft8_pt_blend_transp_solid(start - 6, src[-6], alpha1); alpha1 = alpha[-4]; _soft8_pt_blend_transp_solid(start - 5, src[-5], alpha2); alpha2 = alpha[-3]; _soft8_pt_blend_transp_solid(start - 4, src[-4], alpha1); alpha1 = alpha[-2]; _soft8_pt_blend_transp_solid(start - 3, src[-3], alpha2); alpha2 = alpha[-1]; _soft8_pt_blend_transp_solid(start - 2, src[-2], alpha1); _soft8_pt_blend_transp_solid(start - 1, src[-1], alpha2); } /* remaining pixels (up to 7) */ end = start + (size & 7); for (; start < end; start++, src++, alpha++) _soft8_pt_blend_transp_solid(start, *src, *alpha); } EFL_ALWAYS_INLINE void _soft8_pt_blend_solid_solid(DATA8 * p_dst, DATA8 src) { *p_dst = src; } static inline void _soft8_scanline_blend_solid_solid(DATA8 * src, DATA8 * dst, int size) { memcpy(dst, src, size * sizeof(DATA8)); } /*********************************************************************** * Blend operations taking an extra alpha (fade in, out) */ static inline void _soft8_pt_blend_transp_solid_mul_alpha(DATA8 * p_dst, DATA8 src, DATA8 alpha, DATA8 rel_alpha) { alpha = alpha * rel_alpha; if (alpha == 0) return; alpha++; *p_dst = GRY_8_BLEND((src * rel_alpha) & 0xff, *p_dst, alpha); } static void _soft8_scanline_blend_transp_solid_mul_alpha(DATA8 * src, DATA8 * alpha, DATA8 * dst, int size, const DATA8 rel_alpha) { DATA8 *start, *end; start = dst; end = start + (size & ~7); pld(alpha, 0); pld(src, 0); while (start < end) { DATA8 alpha1, alpha2; alpha1 = alpha[0]; alpha += 8; pld(alpha, 8); pld(src, 32); src += 8; start += 8; alpha2 = alpha[-7]; _soft8_pt_blend_transp_solid_mul_alpha (start - 8, src[-8], alpha1, rel_alpha); alpha1 = alpha[-6]; _soft8_pt_blend_transp_solid_mul_alpha (start - 7, src[-7], alpha2, rel_alpha); alpha2 = alpha[-5]; _soft8_pt_blend_transp_solid_mul_alpha (start - 6, src[-6], alpha1, rel_alpha); alpha1 = alpha[-4]; _soft8_pt_blend_transp_solid_mul_alpha (start - 5, src[-5], alpha2, rel_alpha); alpha2 = alpha[-3]; _soft8_pt_blend_transp_solid_mul_alpha (start - 4, src[-4], alpha1, rel_alpha); alpha1 = alpha[-2]; _soft8_pt_blend_transp_solid_mul_alpha (start - 3, src[-3], alpha2, rel_alpha); alpha2 = alpha[-1]; _soft8_pt_blend_transp_solid_mul_alpha (start - 2, src[-2], alpha1, rel_alpha); _soft8_pt_blend_transp_solid_mul_alpha (start - 1, src[-1], alpha2, rel_alpha); } end = start + (size & 7); for (; start < end; start++, src++, alpha++) _soft8_pt_blend_transp_solid_mul_alpha(start, *src, *alpha, rel_alpha); } EFL_ALWAYS_INLINE void _soft8_pt_blend_solid_solid_mul_alpha(DATA8 * p_dst, DATA8 src, DATA8 rel_alpha) { *p_dst = GRY_8_BLEND_UNMUL(src, *p_dst, rel_alpha); } static void _soft8_scanline_blend_solid_solid_mul_alpha(DATA8 * src, DATA8 * dst, int size, DATA8 rel_alpha) { DATA8 *start, *end; start = dst; end = start + (size & ~7); pld(src, 0); while (start < end) { pld(src, 32); UNROLL8( { _soft8_pt_blend_solid_solid_mul_alpha(start, *src, rel_alpha); start++; src++;} ); } end = start + (size & 7); for (; start < end; start++, src++) _soft8_pt_blend_solid_solid_mul_alpha(start, *src, rel_alpha); } /*********************************************************************** * Blend operations with extra alpha and multiply color */ EFL_ALWAYS_INLINE void _soft8_pt_blend_transp_solid_mul_color_transp(DATA8 * p_dst, DATA8 src, DATA8 alpha, DATA8 rel_alpha, DATA8 r, DATA8 g, DATA8 b) { alpha = alpha * rel_alpha; if (alpha == 0) return; alpha++; DATA8 gry8 = (src * GRY_8_FROM_COMPONENTS(r, g, b)) >> 8; *p_dst = GRY_8_BLEND(gry8, *p_dst, alpha); } static void _soft8_scanline_blend_transp_solid_mul_color_transp(DATA8 * src, DATA8 * alpha, DATA8 * dst, int size, DATA8 rel_alpha, DATA8 r, DATA8 g, DATA8 b) { DATA8 *start, *end; start = dst; end = start + (size & ~7); pld(alpha, 0); pld(src, 0); while (start < end) { DATA8 alpha1, alpha2; alpha1 = alpha[0]; alpha += 8; pld(src, 32); pld(start, 32); src += 8; start += 8; alpha2 = alpha[-7]; _soft8_pt_blend_transp_solid_mul_color_transp (start - 8, src[-8], alpha1, rel_alpha, r, g, b); alpha1 = alpha[-6]; _soft8_pt_blend_transp_solid_mul_color_transp (start - 7, src[-7], alpha2, rel_alpha, r, g, b); alpha2 = alpha[-5]; _soft8_pt_blend_transp_solid_mul_color_transp (start - 6, src[-6], alpha1, rel_alpha, r, g, b); alpha1 = alpha[-4]; _soft8_pt_blend_transp_solid_mul_color_transp (start - 5, src[-5], alpha2, rel_alpha, r, g, b); alpha2 = alpha[-3]; _soft8_pt_blend_transp_solid_mul_color_transp (start - 4, src[-4], alpha1, rel_alpha, r, g, b); alpha1 = alpha[-2]; _soft8_pt_blend_transp_solid_mul_color_transp (start - 3, src[-3], alpha2, rel_alpha, r, g, b); alpha2 = alpha[-1]; _soft8_pt_blend_transp_solid_mul_color_transp (start - 2, src[-2], alpha1, rel_alpha, r, g, b); _soft8_pt_blend_transp_solid_mul_color_transp (start - 1, src[-1], alpha2, rel_alpha, r, g, b); } end = start + (size & 7); for (; start < end; start++, src++, alpha++) _soft8_pt_blend_transp_solid_mul_color_transp (start, *src, *alpha, rel_alpha, r, g, b); } EFL_ALWAYS_INLINE void _soft8_pt_blend_solid_solid_mul_color_transp(DATA8 * p_dst, DATA8 src, DATA8 rel_alpha, DATA8 r, DATA8 g, DATA8 b) { DATA8 gry8 = (src * GRY_8_FROM_COMPONENTS(r, g, b)) >> 8; *p_dst = GRY_8_BLEND(gry8, *p_dst, rel_alpha); } static void _soft8_scanline_blend_solid_solid_mul_color_transp(DATA8 * src, DATA8 * dst, int size, DATA8 rel_alpha, DATA8 r, DATA8 g, DATA8 b) { DATA8 *start, *end; start = dst; end = start + (size & ~7); pld(src, 0); while (start < end) { pld(src, 32); UNROLL8( { _soft8_pt_blend_solid_solid_mul_color_transp (start, *src, rel_alpha, r, g, b); start++; src++;} ); } end = start + (size & 7); for (; start < end; start++, src++) _soft8_pt_blend_solid_solid_mul_color_transp (start, *src, rel_alpha, r, g, b); } /*********************************************************************** * Blend operations with extra multiply color */ EFL_ALWAYS_INLINE void _soft8_pt_blend_transp_solid_mul_color_solid(DATA8 * p_dst, DATA8 src, DATA8 alpha, DATA8 r, DATA8 g, DATA8 b) { if (alpha == 0) return; DATA8 gry8 = (src * GRY_8_FROM_COMPONENTS(r, g, b)) >> 8; if (alpha == 0xff) *p_dst = gry8; else { *p_dst = GRY_8_BLEND(gry8, *p_dst, alpha); } } static void _soft8_scanline_blend_transp_solid_mul_color_solid(DATA8 * src, DATA8 * alpha, DATA8 * dst, int size, DATA8 r, DATA8 g, DATA8 b) { DATA8 *start, *end; start = dst; end = start + (size & ~7); pld(alpha, 0); pld(src, 0); while (start < end) { DATA8 alpha1, alpha2; alpha1 = alpha[0]; alpha += 8; pld(alpha, 8); pld(src, 32); src += 8; start += 8; alpha2 = alpha[-7]; _soft8_pt_blend_transp_solid_mul_color_solid (start - 8, src[-8], alpha1, r, g, b); alpha1 = alpha[-6]; _soft8_pt_blend_transp_solid_mul_color_solid (start - 7, src[-7], alpha2, r, g, b); alpha2 = alpha[-5]; _soft8_pt_blend_transp_solid_mul_color_solid (start - 6, src[-6], alpha1, r, g, b); alpha1 = alpha[-4]; _soft8_pt_blend_transp_solid_mul_color_solid (start - 5, src[-5], alpha2, r, g, b); alpha2 = alpha[-3]; _soft8_pt_blend_transp_solid_mul_color_solid (start - 4, src[-4], alpha1, r, g, b); alpha1 = alpha[-2]; _soft8_pt_blend_transp_solid_mul_color_solid (start - 3, src[-3], alpha2, r, g, b); alpha2 = alpha[-1]; _soft8_pt_blend_transp_solid_mul_color_solid (start - 2, src[-2], alpha1, r, g, b); _soft8_pt_blend_transp_solid_mul_color_solid (start - 1, src[-1], alpha2, r, g, b); } end = start + (size & 7); for (; start < end; start++, src++, alpha++) _soft8_pt_blend_transp_solid_mul_color_solid (start, *src, *alpha, r, g, b); } EFL_ALWAYS_INLINE void _soft8_pt_blend_solid_solid_mul_color_solid(DATA8 * p_dst, DATA8 src, DATA8 r, DATA8 g, DATA8 b) { *p_dst = (src * GRY_8_FROM_COMPONENTS(r, g, b)) >> 8; } static void _soft8_scanline_blend_solid_solid_mul_color_solid(DATA8 * src, DATA8 * dst, int size, DATA8 r, DATA8 g, DATA8 b) { DATA8 *start, *end; start = dst; end = start + (size & ~7); pld(src, 0); while (start < end) { pld(src, 32); UNROLL8( { _soft8_pt_blend_solid_solid_mul_color_solid(start, *src, r, g, b); start++; src++;} ); } end = start + (size & 7); for (; start < end; start++, src++) _soft8_pt_blend_solid_solid_mul_color_solid(start, *src, r, g, b); } evas-1.7.9/src/lib/engines/common_8/evas_soft8_main.c0000664000175000017500000004447112175475547017401 00000000000000#include "evas_common_soft8.h" static Evas_Cache_Image *eci = NULL; static int reference = 0; static Image_Entry *_evas_common_soft8_image_new(void); static void _evas_common_soft8_image_delete(Image_Entry * ie); static int _evas_common_soft8_image_surface_alloc(Image_Entry * ie, unsigned int w, unsigned int h); static void _evas_common_soft8_image_surface_delete(Image_Entry * ie); static DATA32 *_evas_common_soft8_image_surface_pixels(Image_Entry * ie); static int _evas_common_load_soft8_image_from_file(Image_Entry * ie); static void _evas_common_soft8_image_unload(Image_Entry * ie); static void _evas_common_soft8_image_dirty_region(Image_Entry * im, unsigned int x, unsigned int y, unsigned int w, unsigned int h); static int _evas_common_soft8_image_dirty(Image_Entry * ie_dst, const Image_Entry * ie_src); static int _evas_common_soft8_image_ram_usage(Image_Entry * ie); static int _evas_common_soft8_image_size_set(Image_Entry * ie_dst, const Image_Entry * ie_im, unsigned int w, unsigned int h); static int _evas_common_soft8_image_from_copied_data(Image_Entry * ie_dst, unsigned int w, unsigned int h, DATA32 * image_data, int alpha, int cspace); static int _evas_common_soft8_image_from_data(Image_Entry * ie_dst, unsigned int w, unsigned int h, DATA32 * image_data, int alpha, int cspace); static int _evas_common_soft8_image_colorspace_set(Image_Entry * ie_dst, int cspace); static int _evas_common_load_soft8_image_data_from_file(Image_Entry * ie); /* static void _evas_common_soft8_image_debug(const char* context, Image_Entry *eim) { DBG("[8] %p = [%s] {%s,%s} %i [%i|%i]", eim, context, eim->file, eim->key, eim->references, eim->w, eim->h); } */ static const Evas_Cache_Image_Func _evas_common_soft8_image_func = { _evas_common_soft8_image_new, _evas_common_soft8_image_delete, _evas_common_soft8_image_surface_alloc, _evas_common_soft8_image_surface_delete, _evas_common_soft8_image_surface_pixels, _evas_common_load_soft8_image_from_file, _evas_common_soft8_image_unload, _evas_common_soft8_image_dirty_region, _evas_common_soft8_image_dirty, _evas_common_soft8_image_size_set, _evas_common_soft8_image_from_copied_data, _evas_common_soft8_image_from_data, _evas_common_soft8_image_colorspace_set, _evas_common_load_soft8_image_data_from_file, _evas_common_soft8_image_ram_usage, /* _evas_common_soft8_image_debug */ NULL }; EAPI void evas_common_soft8_image_init(void) { if (!eci) eci = evas_cache_image_init(&_evas_common_soft8_image_func); reference++; } EAPI void evas_common_soft8_image_shutdown(void) { if (--reference == 0) { // DISABLE for now - something wrong with cache shutdown freeing things // still in use - rage_thumb segv's now. // // actually - i think i see it. cache ref goes to 0 (and thus gets freed) // because in eng_setup() when a buffer changes size it is FIRST freed // THEN allocated again - thus brignhjing ref to 0 then back to 1 immediately // where it should stay at 1. - see evas_engine.c in the buffer enigne for // example. eng_output_free() is called BEFORE _output_setup(). although this // is only a SIGNE of the problem. we can patch this up with either freeing // after the setup (so we just pt a ref of 2 then back to 1), or just // evas_common_image_init() at the start and evas_common_image_shutdown() // after it all. really ref 0 should only be reached when no more canvases // with no more objects exist anywhere. // ENABLE IT AGAIN, hope it is fixed. Gustavo @ January 22nd, 2009. //evas_cache_image_shutdown(eci); //eci = NULL; } } EAPI Evas_Cache_Image * evas_common_soft8_image_cache_get(void) { return eci; } static Image_Entry * _evas_common_soft8_image_new(void) { Soft8_Image *im; im = calloc(1, sizeof(Soft8_Image)); if (!im) return NULL; im->stride = -1; return (Image_Entry *) im; } static void _evas_common_soft8_image_delete(Image_Entry * ie) { memset(ie, 0xFF, sizeof(Soft8_Image)); free(ie); } static int _evas_common_soft8_image_surface_alloc(Image_Entry * ie, unsigned int w, unsigned int h) { Soft8_Image *im = (Soft8_Image *) ie; if (im->stride < 0) im->stride = _calc_stride(w); im->pixels = realloc(im->pixels, IMG_BYTE_SIZE(im->stride, h, ie->flags.alpha)); if (!im->pixels) return -1; if (ie->flags.alpha) { im->alpha = (DATA8 *) (im->pixels + (im->stride * h)); im->flags.free_alpha = 0; } im->flags.free_pixels = 1; return 0; } static void _evas_common_soft8_image_surface_delete(Image_Entry * ie) { Soft8_Image *im = (Soft8_Image *) ie; if (im->flags.free_pixels) free(im->pixels); im->pixels = NULL; im->flags.free_pixels = 0; if (im->flags.free_alpha) free(im->alpha); im->alpha = NULL; im->flags.free_alpha = 0; } static DATA32 * _evas_common_soft8_image_surface_pixels(Image_Entry * ie __UNUSED__) { abort(); return NULL; } static int _evas_common_load_soft8_image_from_file(Image_Entry * ie) { Soft8_Image *sim = (Soft8_Image *) ie; RGBA_Image *im; int error = 0; im = (RGBA_Image *) evas_cache_image_request(evas_common_image_cache_get(), sim->cache_entry.file, sim->cache_entry.key, &sim->cache_entry.load_opts, &error); sim->source = im; if (!sim->source) return -1; sim->cache_entry.w = sim->source->cache_entry.w; sim->cache_entry.h = sim->source->cache_entry.h; ie->flags.alpha = im->cache_entry.flags.alpha; if (sim->stride < 0) sim->stride = _calc_stride(sim->cache_entry.w); return 0; } static void _evas_common_soft8_image_unload(Image_Entry * ie __UNUSED__) { } static void _evas_common_soft8_image_dirty_region(Image_Entry * im __UNUSED__, unsigned int x __UNUSED__, unsigned int y __UNUSED__, unsigned int w __UNUSED__, unsigned int h __UNUSED__) { } static int _evas_common_soft8_image_dirty(Image_Entry * ie_dst, const Image_Entry * ie_src) { Soft8_Image *dst = (Soft8_Image *) ie_dst; Soft8_Image *src = (Soft8_Image *) ie_src; evas_cache_image_load_data(&src->cache_entry); evas_cache_image_surface_alloc(&dst->cache_entry, src->cache_entry.w, src->cache_entry.h); /* evas_common_blit_rectangle(src, dst, 0, 0, src->cache_entry.w, src->cache_entry.h, 0, 0); */ return 0; } static int _evas_common_soft8_image_ram_usage(Image_Entry * ie) { Soft8_Image *im = (Soft8_Image *) ie; if (im->pixels && im->flags.free_pixels) return IMG_BYTE_SIZE(im->stride, im->cache_entry.h, ie->flags.alpha); return 0; } static int _evas_common_soft8_image_size_set(Image_Entry * ie_dst, const Image_Entry * ie_im, unsigned int w __UNUSED__, unsigned int h __UNUSED__) { Soft8_Image *dst = (Soft8_Image *) ie_dst; Soft8_Image *im = (Soft8_Image *) ie_im; dst->flags = im->flags; return 0; } static int _evas_common_soft8_image_from_data(Image_Entry * ie_dst, unsigned int w, unsigned int h, DATA32 * image_data, int alpha, int cspace __UNUSED__) { Soft8_Image *im = (Soft8_Image *) ie_dst; /* FIXME: handle colorspace */ ie_dst->w = w; ie_dst->h = h; ie_dst->flags.alpha = alpha; im->flags.free_pixels = 0; im->flags.free_alpha = 0; if (im->stride < 0) im->stride = _calc_stride(w); /* FIXME: That's bad, the application must be aware of the engine internal. */ im->pixels = (DATA8 *) image_data; if (ie_dst->flags.alpha) im->alpha = (DATA8 *) (im->pixels + (im->stride * h)); return 0; } static int _evas_common_soft8_image_from_copied_data(Image_Entry * ie_dst, unsigned int w __UNUSED__, unsigned int h, DATA32 * image_data, int alpha __UNUSED__, int cspace __UNUSED__) { Soft8_Image *im = (Soft8_Image *) ie_dst; /* FIXME: handle colorspace */ if (image_data) memcpy(im->pixels, image_data, IMG_BYTE_SIZE(im->stride, h, ie_dst->flags.alpha)); else memset(im->pixels, 0, IMG_BYTE_SIZE(im->stride, h, ie_dst->flags.alpha)); return 0; } static int _evas_common_soft8_image_colorspace_set(Image_Entry * ie_dst __UNUSED__, int cspace __UNUSED__) { /* FIXME: handle colorspace */ return 0; } static int _evas_common_load_soft8_image_data_from_file(Image_Entry * ie) { Soft8_Image *im = (Soft8_Image *) ie; if (im->pixels) return 0; if (!im->source) return -1; evas_cache_image_load_data(&im->source->cache_entry); if (im->source->image.data) { DATA32 *sp; evas_cache_image_surface_alloc(&im->cache_entry, im->source->cache_entry.w, im->source->cache_entry.h); sp = im->source->image.data; if (im->alpha) evas_common_soft8_image_convert_from_rgba(im, sp); else evas_common_soft8_image_convert_from_rgb(im, sp); } evas_cache_image_drop(&im->source->cache_entry); im->source = NULL; return 0; } /* Soft16_Image * */ /* evas_common_soft16_image_new(int w, unsigned int h, unsigned int stride, int have_alpha, DATA16 *pixels, */ /* int copy) */ /* { */ /* Soft16_Image *im; */ /* if (stride < 0) stride = _calc_stride(w); */ /* im = evas_common_soft16_image_alloc(w, h, stride, have_alpha, copy); */ /* if (!im) return NULL; */ /* if (pixels) */ /* { */ /* if (copy) */ /* memcpy(im->pixels, pixels, IMG_BYTE_SIZE(stride, h, have_alpha)); */ /* else */ /* { */ /* im->pixels = pixels; */ /* if (have_alpha) im->alpha = (DATA8 *)(im->pixels + (stride * h)); */ /* } */ /* } */ /* return im; */ /* } */ static inline void _get_clip(const RGBA_Draw_Context * dc, const Soft8_Image * im, Eina_Rectangle * clip) { if (dc->clip.use) { EINA_RECTANGLE_SET(clip, dc->clip.x, dc->clip.y, dc->clip.w, dc->clip.h); if (clip->x < 0) { clip->w += clip->x; clip->x = 0; } if (clip->y < 0) { clip->h += clip->y; clip->y = 0; } if ((clip->x + clip->w) > (int)im->cache_entry.w) clip->w = im->cache_entry.w - clip->x; if ((clip->y + clip->h) > (int)im->cache_entry.h) clip->h = im->cache_entry.h - clip->y; } else { EINA_RECTANGLE_SET(clip, 0, 0, im->cache_entry.w, im->cache_entry.h); } } static inline int _is_empty_rectangle(const Eina_Rectangle * r) { return (r->w < 1) || (r->h < 1); } static inline void _shrink(int *s_pos, int *s_size, int pos, int size) { int d; d = (*s_pos) - pos; if (d < 0) { (*s_size) += d; (*s_pos) = pos; } d = size + pos - (*s_pos); if ((*s_size) > d) (*s_size) = d; } static int _soft8_adjust_areas(Eina_Rectangle * src, int src_max_x, int src_max_y, Eina_Rectangle * dst, int dst_max_x, int dst_max_y, Eina_Rectangle * dst_clip) { if (_is_empty_rectangle(src) || _is_empty_rectangle(dst) || _is_empty_rectangle(dst_clip)) return 0; /* shrink clip */ _shrink(&dst_clip->x, &dst_clip->w, dst->x, dst->w); _shrink(&dst_clip->y, &dst_clip->h, dst->y, dst->h); if (_is_empty_rectangle(dst_clip)) return 0; /* sanitise x */ if (src->x < 0) { dst->x -= (src->x * dst->w) / src->w; dst->w += (src->x * dst->w) / src->w; src->w += src->x; src->x = 0; } if (src->x >= src_max_x) return 0; if ((src->x + src->w) > src_max_x) { dst->w = (dst->w * (src_max_x - src->x)) / (src->w); src->w = src_max_x - src->x; } if (dst->w <= 0) return 0; if (src->w <= 0) return 0; if (dst_clip->x < 0) { dst_clip->w += dst_clip->x; dst_clip->x = 0; } if (dst_clip->w <= 0) return 0; if (dst_clip->x >= dst_max_x) return 0; _shrink(&dst_clip->x, &dst_clip->w, 0, dst_max_x); if (dst_clip->w <= 0) return 0; /* sanitise y */ if (src->y < 0) { dst->y -= (src->y * dst->h) / src->h; dst->h += (src->y * dst->h) / src->h; src->h += src->y; src->y = 0; } if (src->y >= src_max_y) return 0; if ((src->y + src->h) > src_max_y) { dst->h = (dst->h * (src_max_y - src->y)) / (src->h); src->h = src_max_y - src->y; } if (dst->h <= 0) return 0; if (src->h <= 0) return 0; if (dst_clip->y < 0) { dst_clip->h += dst_clip->y; dst_clip->y = 0; } if (dst_clip->h <= 0) return 0; if (dst_clip->y >= dst_max_y) return 0; _shrink(&dst_clip->y, &dst_clip->h, 0, dst_max_y); if (dst_clip->h <= 0) return 0; return 1; } static void _soft8_image_draw_sampled_int(Soft8_Image * src, Soft8_Image * dst, RGBA_Draw_Context * dc, Eina_Rectangle sr, Eina_Rectangle dr) { Eina_Rectangle cr; if (! (RECTS_INTERSECT (dr.x, dr.y, dr.w, dr.h, 0, 0, dst->cache_entry.w, dst->cache_entry.h))) return; if (! (RECTS_INTERSECT (sr.x, sr.y, sr.w, sr.h, 0, 0, src->cache_entry.w, src->cache_entry.h))) return; _get_clip(dc, dst, &cr); if (!_soft8_adjust_areas (&sr, src->cache_entry.w, src->cache_entry.h, &dr, dst->cache_entry.w, dst->cache_entry.h, &cr)) return; if ((dr.w == sr.w) && (dr.h == sr.h)) evas_common_soft8_image_draw_unscaled(src, dst, dc, sr, dr, cr); else evas_common_soft8_image_draw_scaled_sampled(src, dst, dc, sr, dr, cr); } EAPI 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 __UNUSED__) { static Cutout_Rects *rects = NULL; Eina_Rectangle sr, dr; Cutout_Rect *r; struct RGBA_Draw_Context_clip clip_bkp; int i; /* handle cutouts here! */ EINA_RECTANGLE_SET(&dr, dst_region_x, dst_region_y, dst_region_w, dst_region_h); if (_is_empty_rectangle(&dr)) return; if (! (RECTS_INTERSECT (dr.x, dr.y, dr.w, dr.h, 0, 0, dst->cache_entry.w, dst->cache_entry.h))) return; EINA_RECTANGLE_SET(&sr, src_region_x, src_region_y, src_region_w, src_region_h); if (_is_empty_rectangle(&sr)) return; if (! (RECTS_INTERSECT (sr.x, sr.y, sr.w, sr.h, 0, 0, src->cache_entry.w, src->cache_entry.h))) return; /* no cutouts - cut right to the chase */ if (!dc->cutout.rects) { _soft8_image_draw_sampled_int(src, dst, dc, sr, dr); return; } /* save out clip info */ clip_bkp = dc->clip; evas_common_draw_context_clip_clip(dc, 0, 0, dst->cache_entry.w, dst->cache_entry.h); evas_common_draw_context_clip_clip(dc, dst_region_x, dst_region_y, dst_region_w, dst_region_h); /* our clip is 0 size.. abort */ if ((dc->clip.w <= 0) || (dc->clip.h <= 0)) { dc->clip = clip_bkp; return; } rects = evas_common_draw_context_apply_cutouts(dc, rects); for (i = 0; i < rects->active; i++) { r = rects->rects + i; evas_common_draw_context_set_clip(dc, r->x, r->y, r->w, r->h); _soft8_image_draw_sampled_int(src, dst, dc, sr, dr); } dc->clip = clip_bkp; } EAPI Soft8_Image * evas_common_soft8_image_alpha_set(Soft8_Image * im, int have_alpha) { Soft8_Image *new_im; if (im->cache_entry.flags.alpha == have_alpha) return im; new_im = (Soft8_Image *) evas_cache_image_alone(&im->cache_entry); new_im->cache_entry.flags.alpha = have_alpha; if (im->cache_entry.w > 0 && im->cache_entry.h) new_im = (Soft8_Image *) evas_cache_image_size_set(&new_im->cache_entry, im->cache_entry.w, im->cache_entry.h); return new_im; } /* Soft16_Image * */ /* evas_common_soft16_image_size_set(Soft16_Image *old_im, unsigned int w, unsigned int h) */ /* { */ /* Soft16_Image *new_im; */ /* DATA16 *dp, *sp; */ /* int i, cw, ch, ew; */ /* if ((old_im->cache_entry.w == w) && (old_im->cache_entry.h == h)) return old_im; */ /* new_im = evas_common_soft16_image_new(w, h, -1, old_im->flags.have_alpha, NULL, 1); */ /* if (old_im->cache_entry.w < new_im->cache_entry.w) */ /* cw = old_im->cache_entry.w; */ /* else */ /* cw = new_im->cache_entry.w; */ /* ew = new_im->cache_entry.w - cw; */ /* if (old_im->cache_entry.h < new_im->cache_entry.h) */ /* ch = old_im->cache_entry.h; */ /* else */ /* ch = new_im->cache_entry.h; */ /* dp = new_im->pixels; */ /* sp = old_im->pixels; */ /* for (i = 0; i < ch; i++) */ /* { */ /* memcpy(dp, sp, cw * sizeof(DATA16)); */ /* if (ew > 0) memset(dp, 0, ew * sizeof(DATA16)); */ /* dp += new_im->stride; */ /* sp += old_im->stride; */ /* } */ /* if (old_im->flags.have_alpha) */ /* { */ /* DATA8 *dp, *sp; */ /* dp = new_im->alpha; */ /* sp = old_im->alpha; */ /* for (i = 0; i < ch; i++) */ /* { */ /* memcpy(dp, sp, cw * sizeof(DATA8)); */ /* if (ew > 0) memset(dp, 0, ew * sizeof(DATA8)); */ /* dp += new_im->stride; */ /* sp += old_im->stride; */ /* } */ /* } */ /* evas_cache_image_drop(&old_im->cache_entry); */ /* return new_im; */ /* } */ evas-1.7.9/src/lib/engines/common_8/evas_soft8_image_unscaled.c0000664000175000017500000002420712175475547021410 00000000000000#include "evas_common_soft8.h" #include "evas_soft8_scanline_blend.c" static void _soft8_image_draw_unscaled_solid_solid(Soft8_Image * src, Soft8_Image * dst, RGBA_Draw_Context * dc __UNUSED__, int src_offset, int dst_offset, int w, int h) { DATA8 *src_itr, *dst_itr; int y; src_itr = src->pixels + src_offset; dst_itr = dst->pixels + dst_offset; for (y = 0; y < h; y++) { _soft8_scanline_blend_solid_solid(src_itr, dst_itr, w); src_itr += src->stride; dst_itr += dst->stride; } } static void _soft8_image_draw_unscaled_transp_solid(Soft8_Image * src, Soft8_Image * dst, RGBA_Draw_Context * dc __UNUSED__, int src_offset, int dst_offset, int w, int h) { DATA8 *src_itr, *dst_itr; DATA8 *alpha_itr; int y; src_itr = src->pixels + src_offset; alpha_itr = src->alpha + src_offset; dst_itr = dst->pixels + dst_offset; for (y = 0; y < h; y++) { _soft8_scanline_blend_transp_solid(src_itr, alpha_itr, dst_itr, w); src_itr += src->stride; alpha_itr += src->stride; dst_itr += dst->stride; } } static inline void _soft8_image_draw_unscaled_no_mul(Soft8_Image * src, Soft8_Image * dst, RGBA_Draw_Context * dc, int src_offset, int dst_offset, int width, int height) { if (src->cache_entry.flags.alpha && (!dst->cache_entry.flags.alpha)) _soft8_image_draw_unscaled_transp_solid(src, dst, dc, src_offset, dst_offset, width, height); else if ((!src->cache_entry.flags.alpha) && (!dst->cache_entry.flags.alpha)) _soft8_image_draw_unscaled_solid_solid(src, dst, dc, src_offset, dst_offset, width, height); else ERR("Unsupported draw of unscaled images src->cache_entry.flags.alpha=%d, " "dst->cache_entry.flags.alpha=%d, WITHOUT COLOR MUL", src->cache_entry.flags.alpha, dst->cache_entry.flags.alpha); } static void _soft8_image_draw_unscaled_solid_solid_mul_alpha(Soft8_Image * src, Soft8_Image * dst, RGBA_Draw_Context * dc __UNUSED__, int src_offset, int dst_offset, int w, int h, DATA8 a) { DATA8 *src_itr, *dst_itr; int y; src_itr = src->pixels + src_offset; dst_itr = dst->pixels + dst_offset; for (y = 0; y < h; y++) { _soft8_scanline_blend_solid_solid_mul_alpha(src_itr, dst_itr, w, a); src_itr += src->stride; dst_itr += dst->stride; } } static void _soft8_image_draw_unscaled_transp_solid_mul_alpha(Soft8_Image * src, Soft8_Image * dst, RGBA_Draw_Context * dc __UNUSED__, int src_offset, int dst_offset, int w, int h, DATA8 a) { DATA8 *src_itr, *dst_itr; DATA8 *alpha_itr; int y; src_itr = src->pixels + src_offset; alpha_itr = src->alpha + src_offset; dst_itr = dst->pixels + dst_offset; for (y = 0; y < h; y++) { _soft8_scanline_blend_transp_solid_mul_alpha(src_itr, alpha_itr, dst_itr, w, a); src_itr += src->stride; alpha_itr += src->stride; dst_itr += dst->stride; } } static inline void _soft8_image_draw_unscaled_mul_alpha(Soft8_Image * src, Soft8_Image * dst, RGBA_Draw_Context * dc, int src_offset, int dst_offset, int width, int height, DATA8 a) { if (src->cache_entry.flags.alpha && (!dst->cache_entry.flags.alpha)) _soft8_image_draw_unscaled_transp_solid_mul_alpha (src, dst, dc, src_offset, dst_offset, width, height, a); else if ((!src->cache_entry.flags.alpha) && (!dst->cache_entry.flags.alpha)) _soft8_image_draw_unscaled_solid_solid_mul_alpha (src, dst, dc, src_offset, dst_offset, width, height, a); else ERR("Unsupported draw of unscaled images src->cache_entry.flags.alpha=%d, " "dst->cache_entry.flags.alpha=%d, WITH ALPHA MUL %d", src->cache_entry.flags.alpha, dst->cache_entry.flags.alpha, A_VAL(&dc->mul.col)); } static void _soft8_image_draw_unscaled_solid_solid_mul_color(Soft8_Image * src, Soft8_Image * dst, RGBA_Draw_Context * dc __UNUSED__, int src_offset, int dst_offset, int w, int h, DATA8 r, DATA8 g, DATA8 b, DATA8 a) { DATA8 *src_itr, *dst_itr; int y; src_itr = src->pixels + src_offset; dst_itr = dst->pixels + dst_offset; if (a == 0xff) for (y = 0; y < h; y++) { _soft8_scanline_blend_solid_solid_mul_color_solid (src_itr, dst_itr, w, r, g, b); src_itr += src->stride; dst_itr += dst->stride; } else for (y = 0; y < h; y++) { _soft8_scanline_blend_solid_solid_mul_color_transp (src_itr, dst_itr, w, a, r, g, b); src_itr += src->stride; dst_itr += dst->stride; } } static void _soft8_image_draw_unscaled_transp_solid_mul_color(Soft8_Image * src, Soft8_Image * dst, RGBA_Draw_Context * dc __UNUSED__, int src_offset, int dst_offset, int w, int h, DATA8 r, DATA8 g, DATA8 b, DATA8 a) { DATA8 *src_itr, *dst_itr; DATA8 *alpha_itr; int y; src_itr = src->pixels + src_offset; alpha_itr = src->alpha + src_offset; dst_itr = dst->pixels + dst_offset; if (a == 0xff) for (y = 0; y < h; y++) { _soft8_scanline_blend_transp_solid_mul_color_solid (src_itr, alpha_itr, dst_itr, w, r, g, b); src_itr += src->stride; alpha_itr += src->stride; dst_itr += dst->stride; } else for (y = 0; y < h; y++) { _soft8_scanline_blend_transp_solid_mul_color_transp (src_itr, alpha_itr, dst_itr, w, a, r, g, b); src_itr += src->stride; alpha_itr += src->stride; dst_itr += dst->stride; } } static inline void _soft8_image_draw_unscaled_mul_color(Soft8_Image * src, Soft8_Image * dst, RGBA_Draw_Context * dc, int src_offset, int dst_offset, int width, int height, DATA8 r, DATA8 g, DATA8 b, DATA8 a) { if (src->cache_entry.flags.alpha && (!dst->cache_entry.flags.alpha)) _soft8_image_draw_unscaled_transp_solid_mul_color (src, dst, dc, src_offset, dst_offset, width, height, r, g, b, a); else if ((!src->cache_entry.flags.alpha) && (!dst->cache_entry.flags.alpha)) _soft8_image_draw_unscaled_solid_solid_mul_color (src, dst, dc, src_offset, dst_offset, width, height, r, g, b, a); else ERR("Unsupported draw of unscaled images src->cache_entry.flags.alpha=%d, " "dst->cache_entry.flags.alpha=%d, WITH COLOR MUL 0x%08x", src->cache_entry.flags.alpha, dst->cache_entry.flags.alpha, dc->mul.col); } static inline void _soft8_image_draw_unscaled_mul(Soft8_Image * src, Soft8_Image * dst, RGBA_Draw_Context * dc, int src_offset, int dst_offset, int width, int height, DATA8 r, DATA8 g, DATA8 b, DATA8 a) { if ((a == r) && (a == g) && (a == b)) _soft8_image_draw_unscaled_mul_alpha(src, dst, dc, src_offset, dst_offset, width, height, a); else _soft8_image_draw_unscaled_mul_color(src, dst, dc, src_offset, dst_offset, width, height, r, g, b, a); } void 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) { int src_offset_rows, src_offset, dst_offset; DATA8 mul_gry8; DATA8 r, g, b, a; if (!dc->mul.use) { r = g = b = a = 0xff; mul_gry8 = 0xff; } else { a = A_VAL(&dc->mul.col); if (a == 0) return; r = R_VAL(&dc->mul.col); g = G_VAL(&dc->mul.col); b = B_VAL(&dc->mul.col); if (r > a) r = a; if (g > a) g = a; if (b > a) b = a; mul_gry8 = GRY_8_FROM_COMPONENTS(r, g, b); } src_offset_rows = (cr.y - dr.y) + sr.y; src_offset = (src_offset_rows * src->stride) + (cr.x - dr.x) + sr.x; dst_offset = cr.x + (cr.y * dst->stride); if (mul_gry8 == 0xff) _soft8_image_draw_unscaled_no_mul(src, dst, dc, src_offset, dst_offset, cr.w, cr.h); else _soft8_image_draw_unscaled_mul(src, dst, dc, src_offset, dst_offset, cr.w, cr.h, r, g, b, a); } evas-1.7.9/src/lib/engines/common_8/evas_soft8_font.c0000664000175000017500000001562612175475547017423 00000000000000#include "evas_common_soft8.h" #include "evas_soft8_scanline_blend.c" EFL_ALWAYS_INLINE void _glyph_pt_mask_solid_solid(DATA8 * dst, const DATA8 gry8, const DATA8 * mask) { DATA8 alpha = *mask; if (alpha == 0xff) *dst = gry8; else if (alpha > 0) { *dst = GRY_8_BLEND_UNMUL(gry8, *dst, alpha); } } static void _glyph_scanline_mask_solid_solid(DATA8 * dst, int size, const DATA8 gry8, const DATA8 * mask) { DATA8 *start, *end; start = dst; pld(start, 0); pld(mask, 0); end = start + (size & ~3); while (start < end) { pld(start, 8); pld(mask, 4); UNROLL4( { _glyph_pt_mask_solid_solid(start, gry8, mask); start++; mask++;} ); } end = start + (size & 3); for (; start < end; start++, mask++) _glyph_pt_mask_solid_solid(start, gry8, mask); } EFL_ALWAYS_INLINE void _glyph_pt_mask_transp_solid(DATA8 * dst, DATA8 gry8, DATA8 alpha, const DATA8 * mask) { int rel_alpha; rel_alpha = *mask; alpha = (alpha * rel_alpha) >> 8; if (alpha == 0) return; alpha++; *dst = GRY_8_BLEND((gry8 * rel_alpha) >> 8, *dst, alpha); } static void _glyph_scanline_mask_transp_solid(DATA8 * dst, int size, const DATA8 gry8, const DATA8 rel_alpha, const DATA8 * mask) { DATA8 *start, *end; start = dst; pld(start, 0); pld(mask, 0); end = start + (size & ~3); while (start < end) { pld(start, 8); pld(mask, 4); UNROLL4( { _glyph_pt_mask_transp_solid(start, gry8, rel_alpha, mask); start++; mask++;} ); } end = start + (size & 3); for (; start < end; start++, mask++) _glyph_pt_mask_transp_solid(start, gry8, rel_alpha, mask); } static inline void _calc_ext(const Soft8_Image * dst, const RGBA_Draw_Context * dc, Eina_Rectangle * ext) { EINA_RECTANGLE_SET(ext, 0, 0, dst->cache_entry.w, dst->cache_entry.h); if (dc->clip.use) { int v; EINA_RECTANGLE_SET(ext, dc->clip.x, dc->clip.y, dc->clip.w, dc->clip.h); if (ext->x < 0) { ext->w += ext->x; ext->x = 0; } if (ext->y < 0) { ext->h += ext->y; ext->y = 0; } v = dst->cache_entry.w - ext->x; if (ext->w > v) ext->w = v; v = dst->cache_entry.h - ext->y; if (ext->h > v) ext->h = v; } } static inline void _glyph_scanline(Soft8_Image * dst, const DATA8 * p_mask, const Eina_Rectangle ext, int dx, int dy, int max_x, int max_y, int w, DATA8 alpha, const DATA8 gry8) { int size, in_x, in_w; DATA8 *p_pixels; if ((dx >= max_x) || (dy < ext.y) || (dy >= max_y)) return; in_x = 0; in_w = 0; if (dx + w > max_x) in_w += (dx + w) - max_x; if (dx < ext.x) { in_w += ext.x - dx; in_x = ext.x - dx; dx = ext.x; } size = w - in_w; p_pixels = dst->pixels + (dy * dst->stride) + dx; p_mask += in_x; if (size > 1) { if (alpha == 0xff) _glyph_scanline_mask_solid_solid(p_pixels, size, gry8, p_mask); else if (alpha != 0) _glyph_scanline_mask_transp_solid (p_pixels, size, gry8, alpha, p_mask); } else if (size == 1) { if (alpha == 0xff) _glyph_pt_mask_solid_solid(p_pixels, gry8, p_mask); else if (alpha != 0) _glyph_pt_mask_transp_solid(p_pixels, gry8, alpha, p_mask); } } static void _soft8_font_glyph_draw_grayscale(Soft8_Image * dst, RGBA_Draw_Context * dc __UNUSED__, RGBA_Font_Glyph * fg __UNUSED__, int x, int y, DATA8 alpha, DATA8 gry8, const Eina_Rectangle ext, int bw, int bh, int bpitch, const DATA8 * bitmap) { int i, max_x, max_y; max_x = ext.x + ext.w; max_y = ext.y + ext.h; for (i = 0; i < bh; i++, bitmap += bpitch) _glyph_scanline(dst, bitmap, ext, x, y + i, max_x, max_y, bw, alpha, gry8); } static inline void _glyph_create_mask_line(DATA8 * mask, const DATA8 * bitmap, int w) { const DATA8 bitrepl[2] = { 0x0, 0xff }; int i; for (i = 0; i < w; i += 8, bitmap++) { int j, size; DATA32 bits; if (i + 8 < w) size = 8; else size = w - i; bits = *bitmap; for (j = size - 1; j >= 0; j--, mask++) *mask = bitrepl[(bits >> j) & 0x1]; } } static void _soft8_font_glyph_draw_mono(Soft8_Image * dst, RGBA_Draw_Context * dc __UNUSED__, RGBA_Font_Glyph * fg __UNUSED__, int x, int y, DATA8 alpha, DATA8 gry8, const Eina_Rectangle ext, int bw, int bh, int bpitch, const DATA8 * bitmap) { DATA8 *mask; int i, max_x, max_y; max_x = ext.x + ext.w; max_y = ext.y + ext.h; mask = alloca(bpitch); for (i = 0; i < bh; i++, bitmap += bpitch) { _glyph_create_mask_line(mask, bitmap, bw); _glyph_scanline(dst, mask, ext, x, y + i, max_x, max_y, bw, alpha, gry8); } } void evas_common_soft8_font_glyph_draw(void *data, void *dest __UNUSED__, void *context, RGBA_Font_Glyph * fg, int x, int y) { Soft8_Image *dst; RGBA_Draw_Context *dc; const DATA8 *bitmap; DATA8 alpha; // r, g, b DATA8 gry8; Eina_Rectangle ext; int bpitch, bw, bh; dst = data; dc = context; alpha = A_VAL(&dc->col.col); if (alpha == 0) return; gry8 = GRY_8_FROM_RGB(&dc->col.col); /* * if (r > alpha) r = alpha; * if (g > alpha) g = alpha; * if (b > alpha) b = alpha; * * gry8 = GRY_8_FROM_COMPONENTS(r, g, b); */ bitmap = fg->glyph_out->bitmap.buffer; bh = fg->glyph_out->bitmap.rows; bw = fg->glyph_out->bitmap.width; bpitch = fg->glyph_out->bitmap.pitch; if (bpitch < bw) bpitch = bw; _calc_ext(dst, dc, &ext); if ((fg->glyph_out->bitmap.num_grays == 256) && (fg->glyph_out->bitmap.pixel_mode == ft_pixel_mode_grays)) _soft8_font_glyph_draw_grayscale(dst, dc, fg, x, y, alpha, gry8, ext, bw, bh, bpitch, bitmap); else _soft8_font_glyph_draw_mono(dst, dc, fg, x, y, alpha, gry8, ext, bw, bh, bpitch, bitmap); } void * evas_common_soft8_font_glyph_new(void *data __UNUSED__, RGBA_Font_Glyph * fg __UNUSED__) { return (void *)1; /* core requires != NULL to work */ } void evas_common_soft8_font_glyph_free(void *ext_dat __UNUSED__) { } evas-1.7.9/src/lib/engines/common_8/evas_soft8_line.c0000664000175000017500000002145612175475547017402 00000000000000#include "evas_common_soft8.h" #include "evas_soft8_scanline_fill.c" /* * All functions except by evas_common_soft8_line_draw() expect x0 <= x1. */ static inline int _in_range(int value, int min, int max) { return min <= value && value <= max; } static inline int _is_xy_inside_clip(int x, int y, const struct RGBA_Draw_Context_clip clip) { if (!clip.use) return 1; if (!_in_range(x, clip.x, clip.x + clip.w - 1)) return 0; if (!_in_range(y, clip.y, clip.y + clip.h - 1)) return 0; return 1; } static inline int _is_x_inside_clip(int x, const struct RGBA_Draw_Context_clip clip) { if (!clip.use) return 1; return _in_range(x, clip.x, clip.x + clip.w - 1); } static inline int _is_y_inside_clip(int y, const struct RGBA_Draw_Context_clip clip) { if (!clip.use) return 1; return _in_range(y, clip.y, clip.y + clip.h - 1); } static inline int _is_xy_inside_rect(int x, int y, int w, int h) { return _in_range(x, 0, w - 1) && _in_range(y, 0, h - 1); } static inline int _is_empty_clip(const struct RGBA_Draw_Context_clip clip) { return clip.w < 1 || clip.h < 1; } static void _soft8_line_point(Soft8_Image * dst, RGBA_Draw_Context * dc, int x, int y) { DATA8 gry8, *dst_itr; DATA8 alpha; if (!_is_xy_inside_rect(x, y, dst->cache_entry.w, dst->cache_entry.h)) return; if (!_is_xy_inside_clip(x, y, dc->clip)) return; dst_itr = dst->pixels + (dst->stride * y) + x; alpha = A_VAL(&dc->col.col); gry8 = GRY_8_FROM_RGB(&dc->col.col); if (alpha == 0xff) _soft8_pt_fill_solid_solid(dst_itr, gry8); else if (alpha > 0) { alpha++; _soft8_pt_fill_transp_solid(dst_itr, gry8, alpha); } } static void _soft8_line_horiz(Soft8_Image * dst, RGBA_Draw_Context * dc, int x0, int x1, int y) { DATA8 gry8, *dst_itr; DATA8 alpha; int w; if (!_is_y_inside_clip(y, dc->clip)) return; if (x0 < dc->clip.x) x0 = dc->clip.x; if (x1 >= dc->clip.x + dc->clip.w) x1 = dc->clip.x + dc->clip.w - 1; w = x1 - x0; if (w < 1) return; dst_itr = dst->pixels + (dst->stride * y) + x0; alpha = A_VAL(&dc->col.col); gry8 = GRY_8_FROM_RGB(&dc->col.col); if (alpha == 0xff) _soft8_scanline_fill_solid_solid(dst_itr, w, gry8); else if (alpha > 0) { alpha++; _soft8_scanline_fill_transp_solid(dst_itr, w, gry8, alpha); } } static void _soft8_line_vert(Soft8_Image * dst, RGBA_Draw_Context * dc, int x, int y0, int y1) { DATA8 gry8, *dst_itr; DATA8 alpha; int h; if (!_is_x_inside_clip(x, dc->clip)) return; if (y1 < y0) { int t; t = y0; y0 = y1; y1 = t; } if (y0 < dc->clip.y) y0 = dc->clip.y; if (y1 >= dc->clip.y + dc->clip.h) y1 = dc->clip.y + dc->clip.h - 1; h = y1 - y0; if (h < 1) return; dst_itr = dst->pixels + (dst->stride * y0) + x; alpha = A_VAL(&dc->col.col); gry8 = GRY_8_FROM_RGB(&dc->col.col); if (alpha == 0xff) { for (; h > 0; h--, dst_itr += dst->stride) _soft8_pt_fill_solid_solid(dst_itr, gry8); } else if (alpha > 0) { alpha++; for (; h > 0; h--, dst_itr += dst->stride) _soft8_pt_fill_transp_solid(dst_itr, gry8, alpha); } } static inline void _soft8_line_45deg_adjust_boundaries(const struct RGBA_Draw_Context_clip clip, int *p_x0, int *p_y0, int *p_x1, int *p_y1) { int diff, dy, x0, y0, x1, y1; x0 = *p_x0; y0 = *p_y0; x1 = *p_x1; y1 = *p_y1; dy = y1 - y0; diff = clip.x - x0; if (diff > 0) { x0 = clip.x; y0 += (dy > 0) ? diff : -diff; } diff = x1 - (clip.x + clip.w); if (diff > 0) { x1 = clip.x + clip.w; y1 += (dy > 0) ? -diff : diff; } if (dy > 0) { diff = clip.y - y0; if (diff > 0) { y0 = clip.y; x0 += diff; } diff = y1 - (clip.y + clip.h); if (diff > 0) { y1 = clip.y + clip.h; x1 -= diff; } } else { diff = clip.y - y1; if (diff > 0) { y1 = clip.y; x1 -= diff; } diff = y0 - (clip.y + clip.h - 1); if (diff > 0) { y0 = clip.y + clip.h - 1; x0 += diff; } } *p_x0 = x0; *p_y0 = y0; *p_x1 = x1; *p_y1 = y1; } static void _soft8_line_45deg(Soft8_Image * dst, RGBA_Draw_Context * dc, int x0, int y0, int x1, int y1) { int dy, step_dst_itr, len; DATA8 alpha; DATA8 *dst_itr, gry8; alpha = A_VAL(&dc->col.col); if (alpha < 1) return; gry8 = GRY_8_FROM_RGB(&dc->col.col); dy = y1 - y0; step_dst_itr = 1 + ((dy > 0) ? dst->stride : -dst->stride); _soft8_line_45deg_adjust_boundaries(dc->clip, &x0, &y0, &x1, &y1); len = (dy > 0) ? (y1 - y0) : (y0 - y1); if (len < 1) return; dst_itr = dst->pixels + dst->stride * y0 + x0; if (alpha == 0xff) { for (; len > 0; len--, dst_itr += step_dst_itr) _soft8_pt_fill_solid_solid(dst_itr, gry8); } else { alpha++; for (; len > 0; len--, dst_itr += step_dst_itr) _soft8_pt_fill_transp_solid(dst_itr, gry8, alpha); } } EFL_ALWAYS_INLINE void _soft8_line_aliased_pt(DATA8 * dst_itr, DATA8 gry8, DATA8 alpha) { if (alpha == 32) _soft8_pt_fill_solid_solid(dst_itr, gry8); else _soft8_pt_fill_transp_solid(dst_itr, gry8, alpha); } static void _soft8_line_aliased(Soft8_Image * dst, RGBA_Draw_Context * dc, int x0, int y0, int x1, int y1) { int dx, dy, step_y, step_dst_itr; DATA8 gry8; DATA8 alpha; alpha = A_VAL(&dc->col.col); if (alpha == 0) return; alpha++; gry8 = GRY_8_FROM_RGB(&dc->col.col); dx = x1 - x0; dy = y1 - y0; if (dy >= 0) { step_y = 1; step_dst_itr = dst->stride; } else { dy = -dy; step_y = -1; step_dst_itr = -dst->stride; } if (dx > dy) { DATA8 *dst_itr; int e, x, y; e = -(dx / 2); y = y0; dst_itr = dst->pixels + dst->stride * y0 + x0; for (x = x0; x <= x1; x++, dst_itr++) { if (_is_xy_inside_clip(x, y, dc->clip)) _soft8_line_aliased_pt(dst_itr, gry8, alpha); e += dy; if (e >= 0) { dst_itr += step_dst_itr; y += step_y; e -= dx; } } } else { DATA8 *dst_itr; int e, x, y; e = -(dy / 2); x = x0; dst_itr = dst->pixels + dst->stride * y0 + x0; for (y = y0; y != y1; y += step_y, dst_itr += step_dst_itr) { if (_is_xy_inside_clip(x, y, dc->clip)) _soft8_line_aliased_pt(dst_itr, gry8, alpha); e += dx; if (e >= 0) { dst_itr++; x++; e -= dy; } } } } void evas_common_soft8_line_draw(Soft8_Image * dst, RGBA_Draw_Context * dc, int x0, int y0, int x1, int y1) { struct RGBA_Draw_Context_clip c_bkp, c_tmp; int dx, dy; int x, y, w, h; c_tmp.use = 1; c_tmp.x = 0; c_tmp.y = 0; c_tmp.w = dst->cache_entry.w; c_tmp.h = dst->cache_entry.h; /* save out clip info */ c_bkp = dc->clip; if (c_bkp.use) { RECTS_CLIP_TO_RECT(c_tmp.x, c_tmp.y, c_tmp.w, c_tmp.h, c_bkp.x, c_bkp.y, c_bkp.w, c_bkp.h); if (_is_empty_clip(c_tmp)) return; } x = MIN(x0, x1); y = MIN(y0, y1); w = MAX(x0, x1) - x + 1; h = MAX(y0, y1) - y + 1; RECTS_CLIP_TO_RECT(c_tmp.x, c_tmp.y, c_tmp.w, c_tmp.h, x, y, w, h); if (_is_empty_clip(c_tmp)) return; /* Check if the line doesn't cross the clip area */ if (x0 < c_tmp.x && x1 < c_tmp.x) return; if (x0 >= c_tmp.x + c_tmp.w && x1 >= c_tmp.x + c_tmp.w) return; if (y0 < c_tmp.y && y1 < c_tmp.y) return; if (y0 >= c_tmp.y + c_tmp.h && y1 >= c_tmp.y + c_tmp.h) return; dc->clip = c_tmp; dx = x1 - x0; dy = y1 - y0; if (dx < 0) { int t; t = x0; x0 = x1; x1 = t; t = y0; y0 = y1; y1 = t; } if (dx == 0 && dy == 0) _soft8_line_point(dst, dc, x0, y0); else if (dx == 0) _soft8_line_vert(dst, dc, x0, y0, y1); else if (dy == 0) _soft8_line_horiz(dst, dc, x0, x1, y0); else if (dy == dx || dy == -dx) _soft8_line_45deg(dst, dc, x0, y0, x1, y1); else _soft8_line_aliased(dst, dc, x0, y0, x1, y1); /* restore clip info */ dc->clip = c_bkp; } evas-1.7.9/src/lib/engines/common_8/evas_soft8_rectangle.c0000664000175000017500000000634312175475547020415 00000000000000#include "evas_common_soft8.h" #include "evas_soft8_scanline_fill.c" static inline int _is_empty_rectangle(const Eina_Rectangle * r) { return (r->w < 1) || (r->h < 1); } static inline void _soft8_rectangle_draw_solid_solid(Soft8_Image * dst, int offset, int w, int h, DATA8 gry8) { DATA8 *dst_itr; int i; dst_itr = dst->pixels + offset; for (i = 0; i < h; i++, dst_itr += dst->stride) _soft8_scanline_fill_solid_solid(dst_itr, w, gry8); } static inline void _soft8_rectangle_draw_transp_solid(Soft8_Image * dst, int offset, int w, int h, DATA8 gry8, DATA8 alpha) { DATA8 *dst_itr; int i; dst_itr = dst->pixels + offset; alpha++; for (i = 0; i < h; i++, dst_itr += dst->stride) _soft8_scanline_fill_transp_solid(dst_itr, w, gry8, alpha); } static void _soft8_rectangle_draw_int(Soft8_Image * dst, RGBA_Draw_Context * dc, Eina_Rectangle dr) { int dst_offset; if (_is_empty_rectangle(&dr)) return; RECTS_CLIP_TO_RECT(dr.x, dr.y, dr.w, dr.h, 0, 0, dst->cache_entry.w, dst->cache_entry.h); if (_is_empty_rectangle(&dr)) return; if (dc->clip.use) RECTS_CLIP_TO_RECT(dr.x, dr.y, dr.w, dr.h, dc->clip.x, dc->clip.y, dc->clip.w, dc->clip.h); if (_is_empty_rectangle(&dr)) return; if (A_VAL(&dc->col.col) == 0) return; dst_offset = dr.x + (dr.y * dst->stride); if (!dst->cache_entry.flags.alpha) { DATA8 gry8; DATA8 alpha; alpha = A_VAL(&dc->col.col); gry8 = GRY_8_FROM_RGB(&dc->col.col); if (alpha == 0xff) _soft8_rectangle_draw_solid_solid(dst, dst_offset, dr.w, dr.h, gry8); else if (alpha > 0) _soft8_rectangle_draw_transp_solid (dst, dst_offset, dr.w, dr.h, gry8, alpha); } else ERR("Unsupported feature: drawing rectangle to non-opaque destination."); } void evas_common_soft8_rectangle_draw(Soft8_Image * dst, RGBA_Draw_Context * dc, int x, int y, int w, int h) { static Cutout_Rects *rects = NULL; Eina_Rectangle dr; Cutout_Rect *r; struct RGBA_Draw_Context_clip c_bkp; int i; /* handle cutouts here! */ EINA_RECTANGLE_SET(&dr, x, y, w, h); if (_is_empty_rectangle(&dr)) return; if (! (RECTS_INTERSECT (dr.x, dr.y, dr.w, dr.h, 0, 0, dst->cache_entry.w, dst->cache_entry.h))) return; /* no cutouts - cut right to the chase */ if (!dc->cutout.rects) { _soft8_rectangle_draw_int(dst, dc, dr); return; } c_bkp = dc->clip; evas_common_draw_context_clip_clip(dc, 0, 0, dst->cache_entry.w, dst->cache_entry.h); evas_common_draw_context_clip_clip(dc, x, y, w, h); /* our clip is 0 size.. abort */ if ((dc->clip.w <= 0) || (dc->clip.h <= 0)) { dc->clip = c_bkp; return; } rects = evas_common_draw_context_apply_cutouts(dc, rects); for (i = 0; i < rects->active; ++i) { r = rects->rects + i; evas_common_draw_context_set_clip(dc, r->x, r->y, r->w, r->h); _soft8_rectangle_draw_int(dst, dc, dr); } dc->clip = c_bkp; } evas-1.7.9/src/lib/engines/common_8/evas_soft8_dither_mask.c0000664000175000017500000000405412175475547020740 00000000000000#include "evas_common_soft8.h" EFL_ALWAYS_INLINE void _soft8_convert_from_rgba_pt(const DATA32 * src, DATA8 * dst, DATA8 * alpha) { if (A_VAL(src) == 0) { *dst = 0; *alpha = 0; } else { *dst = GRY_8_FROM_RGB(src); *alpha = A_VAL(src); } } static inline void _soft8_convert_from_rgba_scanline(const DATA32 * src, DATA8 * dst, DATA8 * alpha, const int w) { int x, m; m = (w & ~7); x = 0; pld(src, 0); while (x < m) { pld(src, 32); UNROLL8( { _soft8_convert_from_rgba_pt(src, dst, alpha); src++; dst++; alpha++; x++;} ); } for (; x < w; x++, src++, dst++, alpha++) _soft8_convert_from_rgba_pt(src, dst, alpha); } void evas_common_soft8_image_convert_from_rgba(Soft8_Image * im, const DATA32 * src) { const DATA32 *sp; DATA8 *dp; DATA8 *ap; unsigned int y; sp = src; dp = im->pixels; ap = im->alpha; for (y = 0; y < im->cache_entry.h; y++, sp += im->cache_entry.w, dp += im->stride, ap += im->stride) _soft8_convert_from_rgba_scanline(sp, dp, ap, im->cache_entry.w); } EFL_ALWAYS_INLINE void _soft8_convert_from_rgb_pt(const DATA32 * src, DATA8 * dst) { *dst = GRY_8_FROM_RGB(src); } static inline void _soft8_convert_from_rgb_scanline(const DATA32 * src, DATA8 * dst, const int w) { int x, m; m = (w & ~7); x = 0; pld(src, 0); while (x < m) { pld(src, 32); UNROLL8( { _soft8_convert_from_rgb_pt(src, dst); src++; dst++; x++;} ); } for (; x < w; x++, src++, dst++) _soft8_convert_from_rgb_pt(src, dst); } void evas_common_soft8_image_convert_from_rgb(Soft8_Image * im, const DATA32 * src) { const DATA32 *sp; DATA8 *dp; unsigned int y; sp = src; dp = im->pixels; for (y = 0; y < im->cache_entry.h; y++, sp += im->cache_entry.w, dp += im->stride) _soft8_convert_from_rgb_scanline(sp, dp, im->cache_entry.w); } evas-1.7.9/src/lib/engines/common_8/evas_soft8_image_scaled_sampled.c0000664000175000017500000003377212175475547022561 00000000000000#include "evas_common_soft8.h" #include "evas_soft8_scanline_blend.c" static void _soft8_image_draw_scaled_solid_solid(Soft8_Image * src, Soft8_Image * dst, RGBA_Draw_Context * dc __UNUSED__, int dst_offset, int w, int h, int *offset_x, int *offset_y) { DATA8 *dst_itr; int y, w_align; w_align = w & ~7; dst_itr = dst->pixels + dst_offset; for (y = 0; y < h; y++, dst_itr += dst->stride) { DATA8 *d, *s; int x; s = src->pixels + offset_y[y]; pld(s, 0); pld(offset_x, 0); d = dst_itr; x = 0; while (x < w_align) { pld(s, 32); pld(offset_x + x, 32); UNROLL8( { _soft8_pt_blend_solid_solid(d, s[offset_x[x]]); x++; d++;} ); } for (; x < w; x++, d++) _soft8_pt_blend_solid_solid(d, s[offset_x[x]]); } } static void _soft8_image_draw_scaled_transp_solid(Soft8_Image * src, Soft8_Image * dst, RGBA_Draw_Context * dc __UNUSED__, int dst_offset, int w, int h, int *offset_x, int *offset_y) { DATA8 *dst_itr; int y, w_align; w_align = w & ~7; dst_itr = dst->pixels + dst_offset; for (y = 0; y < h; y++, dst_itr += dst->stride) { DATA8 *d, *s; DATA8 *a; int x; s = src->pixels + offset_y[y]; a = src->alpha + offset_y[y]; pld(s, 0); pld(a, 0); pld(offset_x, 0); d = dst_itr; x = 0; while (x < w_align) { pld(s, 32); pld(a, 8); pld(offset_x + x, 32); UNROLL8( { int off_x = offset_x[x]; _soft8_pt_blend_transp_solid(d, s[off_x], a[off_x]); x++; d++;}); } for (; x < w; x++, d++) _soft8_pt_blend_transp_solid(d, s[offset_x[x]], a[offset_x[x]]); } } static inline void _soft8_image_draw_scaled_no_mul(Soft8_Image * src, Soft8_Image * dst, RGBA_Draw_Context * dc, int dst_offset, int w, int h, int *offset_x, int *offset_y) { if ((src->cache_entry.flags.alpha && src->alpha) && (!dst->cache_entry.flags.alpha)) _soft8_image_draw_scaled_transp_solid (src, dst, dc, dst_offset, w, h, offset_x, offset_y); else if (!dst->cache_entry.flags.alpha) _soft8_image_draw_scaled_solid_solid (src, dst, dc, dst_offset, w, h, offset_x, offset_y); else ERR("Unsupported draw of scaled images src->cache_entry.flags.alpha=%d, " "dst->cache_entry.flags.alpha=%d, WITHOUT COLOR MUL", src->cache_entry.flags.alpha, dst->cache_entry.flags.alpha); } static void _soft8_image_draw_scaled_solid_solid_mul_alpha(Soft8_Image * src, Soft8_Image * dst, RGBA_Draw_Context * dc __UNUSED__, int dst_offset, int w, int h, int *offset_x, int *offset_y, DATA8 alpha) { DATA8 *dst_itr; int y, w_align; w_align = w & ~7; dst_itr = dst->pixels + dst_offset; for (y = 0; y < h; y++, dst_itr += dst->stride) { DATA8 *d, *s; int x; s = src->pixels + offset_y[y]; pld(s, 0); pld(offset_x, 0); d = dst_itr; x = 0; while (x < w_align) { pld(s, 32); pld(offset_x + x, 32); UNROLL8( { _soft8_pt_blend_solid_solid_mul_alpha (d, s[offset_x[x]], alpha); x++; d++;} ); } for (; x < w; x++, d++) _soft8_pt_blend_solid_solid_mul_alpha(d, s[offset_x[x]], alpha); } } static void _soft8_image_draw_scaled_transp_solid_mul_alpha(Soft8_Image * src, Soft8_Image * dst, RGBA_Draw_Context * dc __UNUSED__, int dst_offset, int w, int h, int *offset_x, int *offset_y, DATA8 alpha) { DATA8 *dst_itr; int y, w_align; w_align = w & ~7; dst_itr = dst->pixels + dst_offset; for (y = 0; y < h; y++, dst_itr += dst->stride) { DATA8 *d, *s; DATA8 *a; int x; s = src->pixels + offset_y[y]; a = src->alpha + offset_y[y]; pld(s, 0); pld(a, 0); pld(offset_x, 0); d = dst_itr; x = 0; while (x < w_align) { pld(s, 32); pld(a, 8); pld(offset_x + x, 32); UNROLL8( { int off_x = offset_x[x]; _soft8_pt_blend_transp_solid_mul_alpha (d, s[off_x], a[off_x], alpha); x++; d++;}); } for (; x < w; x++, d++) _soft8_pt_blend_transp_solid_mul_alpha (d, s[offset_x[x]], a[offset_x[x]], alpha); } } static inline void _soft8_image_draw_scaled_mul_alpha(Soft8_Image * src, Soft8_Image * dst, RGBA_Draw_Context * dc, int dst_offset, int w, int h, int *offset_x, int *offset_y, DATA8 a) { if ((src->cache_entry.flags.alpha && src->alpha) && (!dst->cache_entry.flags.alpha)) _soft8_image_draw_scaled_transp_solid_mul_alpha (src, dst, dc, dst_offset, w, h, offset_x, offset_y, a); else if (!dst->cache_entry.flags.alpha) _soft8_image_draw_scaled_solid_solid_mul_alpha (src, dst, dc, dst_offset, w, h, offset_x, offset_y, a); else ERR("Unsupported draw of scaled images src->cache_entry.flags.alpha=%d, " "dst->cache_entry.flags.alpha=%d, WITH ALPHA MUL %d", src->cache_entry.flags.alpha, dst->cache_entry.flags.alpha, A_VAL(&dc->mul.col)); } static void _soft8_image_draw_scaled_solid_solid_mul_color(Soft8_Image * src, Soft8_Image * dst, RGBA_Draw_Context * dc __UNUSED__, int dst_offset, int w, int h, int *offset_x, int *offset_y, DATA8 r, DATA8 g, DATA8 b, DATA8 alpha) { DATA8 *dst_itr; int y, w_align; w_align = w & ~7; dst_itr = dst->pixels + dst_offset; if (alpha == 0xff) for (y = 0; y < h; y++, dst_itr += dst->stride) { DATA8 *d, *s; int x; s = src->pixels + offset_y[y]; pld(s, 0); pld(offset_x, 0); d = dst_itr; x = 0; while (x < w_align) { pld(s, 32); pld(offset_x + x, 32); UNROLL8( { _soft8_pt_blend_solid_solid_mul_color_solid (d, s[offset_x[x]], r, g, b); x++; d++;} ); } for (; x < w; x++, d++) _soft8_pt_blend_solid_solid_mul_color_solid (d, s[offset_x[x]], r, g, b); } else for (y = 0; y < h; y++, dst_itr += dst->stride) { DATA8 *d, *s; int x; s = src->pixels + offset_y[y]; pld(s, 0); pld(offset_x, 0); d = dst_itr; x = 0; while (x < w_align) { pld(s, 32); pld(offset_x + x, 32); UNROLL8( { _soft8_pt_blend_solid_solid_mul_color_transp (d, s[offset_x[x]], alpha, r, g, b); x++; d++;} ); } for (; x < w; x++, d++) _soft8_pt_blend_solid_solid_mul_color_transp (d, s[offset_x[x]], alpha, r, g, b); } } static void _soft8_image_draw_scaled_transp_solid_mul_color(Soft8_Image * src, Soft8_Image * dst, RGBA_Draw_Context * dc __UNUSED__, int dst_offset, int w, int h, int *offset_x, int *offset_y, DATA8 r, DATA8 g, DATA8 b, DATA8 alpha) { DATA8 *dst_itr; int y, w_align; w_align = w & ~7; dst_itr = dst->pixels + dst_offset; if (alpha == 0xff) for (y = 0; y < h; y++, dst_itr += dst->stride) { DATA8 *d, *s; DATA8 *a; int x; s = src->pixels + offset_y[y]; a = src->alpha + offset_y[y]; pld(s, 0); pld(a, 0); pld(offset_x, 0); d = dst_itr; x = 0; while (x < w_align) { pld(s, 32); pld(a, 8); pld(offset_x + x, 32); UNROLL8( { int off_x = offset_x[x]; _soft8_pt_blend_transp_solid_mul_color_solid (d, s[off_x], a[off_x], r, g, b); x++; d++;}); } for (; x < w; x++, d++) _soft8_pt_blend_transp_solid_mul_color_solid (d, s[offset_x[x]], a[offset_x[x]], r, g, b); } else for (y = 0; y < h; y++, dst_itr += dst->stride) { DATA8 *d, *s; DATA8 *a; int x; s = src->pixels + offset_y[y]; a = src->alpha + offset_y[y]; pld(s, 0); pld(a, 0); pld(offset_x, 0); d = dst_itr; x = 0; while (x < w_align) { pld(s, 32); pld(a, 8); pld(offset_x + x, 32); UNROLL8( { int off_x = offset_x[x]; _soft8_pt_blend_transp_solid_mul_color_transp (d, s[off_x], a[off_x], alpha, r, g, b); x++; d++;}); } for (; x < w; x++, d++) _soft8_pt_blend_transp_solid_mul_color_transp (d, s[offset_x[x]], a[offset_x[x]], alpha, r, g, b); } } static inline void _soft8_image_draw_scaled_mul_color(Soft8_Image * src, Soft8_Image * dst, RGBA_Draw_Context * dc, int dst_offset, int w, int h, int *offset_x, int *offset_y, DATA8 r, DATA8 g, DATA8 b, DATA8 a) { if ((src->cache_entry.flags.alpha && src->alpha) && (!dst->cache_entry.flags.alpha)) _soft8_image_draw_scaled_transp_solid_mul_color (src, dst, dc, dst_offset, w, h, offset_x, offset_y, r, g, b, a); else if (!dst->cache_entry.flags.alpha) _soft8_image_draw_scaled_solid_solid_mul_color (src, dst, dc, dst_offset, w, h, offset_x, offset_y, r, g, b, a); else ERR("Unsupported draw of scaled images src->cache_entry.flags.alpha=%d, " "dst->cache_entry.flags.alpha=%d, WITH COLOR MUL 0x%08x", src->cache_entry.flags.alpha, dst->cache_entry.flags.alpha, dc->mul.col); } static inline void _soft8_image_draw_scaled_mul(Soft8_Image * src, Soft8_Image * dst, RGBA_Draw_Context * dc, int dst_offset, int w, int h, int *offset_x, int *offset_y, DATA8 r, DATA8 g, DATA8 b, DATA8 a) { if ((a == r) && (a == g) && (a == b)) _soft8_image_draw_scaled_mul_alpha (src, dst, dc, dst_offset, w, h, offset_x, offset_y, a); else _soft8_image_draw_scaled_mul_color (src, dst, dc, dst_offset, w, h, offset_x, offset_y, r, g, b, a); } void 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) { int x, y, dst_offset, *offset_x, *offset_y; DATA8 mul_gry8; DATA8 r, g, b, a; if (!dc->mul.use) { r = g = b = a = 0xff; mul_gry8 = 0xff; } else { a = A_VAL(&dc->mul.col); if (a == 0) return; r = R_VAL(&dc->mul.col); g = G_VAL(&dc->mul.col); b = B_VAL(&dc->mul.col); if (r > a) r = a; if (g > a) g = a; if (b > a) b = a; mul_gry8 = GRY_8_FROM_COMPONENTS(r, g, b); } /* pre-calculated scale tables */ offset_x = alloca(cr.w * sizeof(*offset_x)); for (x = 0; x < cr.w; x++) offset_x[x] = (((x + cr.x - dr.x) * sr.w) / dr.w) + sr.x; offset_y = alloca(cr.h * sizeof(*offset_y)); for (y = 0; y < cr.h; y++) offset_y[y] = (((((y + cr.y - dr.y) * sr.h) / dr.h) + sr.y) * src->stride); dst_offset = cr.x + (cr.y * dst->stride); if (mul_gry8 == 0xff) _soft8_image_draw_scaled_no_mul (src, dst, dc, dst_offset, cr.w, cr.h, offset_x, offset_y); else _soft8_image_draw_scaled_mul (src, dst, dc, dst_offset, cr.w, cr.h, offset_x, offset_y, r, g, b, a); } evas-1.7.9/src/lib/engines/common_8/evas_soft8_polygon.c0000664000175000017500000001505712175475547020142 00000000000000#include #include "evas_soft8_scanline_fill.c" #include typedef struct _RGBA_Edge RGBA_Edge; typedef struct _RGBA_Vertex RGBA_Vertex; struct _RGBA_Edge { float x, dx; int i; }; struct _RGBA_Vertex { float x, y; int i; }; #define POLY_EDGE_DEL(_i) \ { \ int _j; \ \ for (_j = 0; (_j < num_active_edges) && (edges[_j].i != _i); _j++); \ if (_j < num_active_edges) \ { \ num_active_edges--; \ memmove(&(edges[_j]), &(edges[_j + 1]), \ (num_active_edges - _j) * sizeof(RGBA_Edge)); \ } \ } #define POLY_EDGE_ADD(_i, _y) \ { \ int _j; \ float _dx; \ RGBA_Vertex *_p, *_q; \ if (_i < (n - 1)) _j = _i + 1; \ else _j = 0; \ if (point[_i].y < point[_j].y) \ { \ _p = &(point[_i]); \ _q = &(point[_j]); \ } \ else \ { \ _p = &(point[_j]); \ _q = &(point[_i]); \ } \ edges[num_active_edges].dx = _dx = (_q->x - _p->x) / (_q->y - _p->y); \ edges[num_active_edges].x = (_dx * ((float)_y + 0.5 - _p->y)) + _p->x; \ edges[num_active_edges].i = _i; \ num_active_edges++; \ } static int polygon_point_sorter(const void *a, const void *b) { RGBA_Vertex *p, *q; p = (RGBA_Vertex *) a; q = (RGBA_Vertex *) b; if (p->y <= q->y) return -1; return 1; } static int polygon_edge_sorter(const void *a, const void *b) { RGBA_Edge *p, *q; p = (RGBA_Edge *) a; q = (RGBA_Edge *) b; if (p->x <= q->x) return -1; return 1; } void evas_common_soft8_polygon_draw(Soft8_Image * dst, RGBA_Draw_Context * dc, RGBA_Polygon_Point * points, int x, int y) { RGBA_Polygon_Point *pt; RGBA_Vertex *point; RGBA_Edge *edges; int num_active_edges; int n; int i, j, k; int y0, y1, yi; int ext_x, ext_y, ext_w, ext_h; int *sorted_index; DATA8 alpha; DATA8 gry8; alpha = A_VAL(&dc->col.col); if (alpha == 0) return; alpha++; gry8 = GRY_8_FROM_RGB(&dc->col.col); ext_x = 0; ext_y = 0; ext_w = dst->cache_entry.w; ext_h = dst->cache_entry.h; if (dc->clip.use) RECTS_CLIP_TO_RECT(ext_x, ext_y, ext_w, ext_h, dc->clip.x, dc->clip.y, dc->clip.w, dc->clip.h); if ((ext_w <= 0) || (ext_h <= 0)) return; n = 0; EINA_INLIST_FOREACH(points, pt) n++; if (n < 3) return; edges = malloc(sizeof(RGBA_Edge) * n); if (!edges) return; point = malloc(sizeof(RGBA_Vertex) * n); if (!point) { free(edges); return; } sorted_index = malloc(sizeof(int) * n); if (!sorted_index) { free(edges); free(point); return; } k = 0; EINA_INLIST_FOREACH(points, pt) { point[k].x = pt->x + x; point[k].y = pt->y + y; point[k].i = k; k++; } qsort(point, n, sizeof(RGBA_Vertex), polygon_point_sorter); for (k = 0; k < n; k++) sorted_index[k] = point[k].i; k = 0; EINA_INLIST_FOREACH(points, pt) { point[k].x = pt->x + x; point[k].y = pt->y + y; point[k].i = k; k++; } y0 = MAX(ext_y, ceil(point[sorted_index[0]].y - 0.5)); y1 = MIN(ext_y + ext_h - 1, floor(point[sorted_index[n - 1]].y - 0.5)); k = 0; num_active_edges = 0; for (yi = y0; yi <= y1; yi++) { for (; (k < n) && (point[sorted_index[k]].y <= ((float)yi + 0.5)); k++) { i = sorted_index[k]; if (i > 0) j = i - 1; else j = n - 1; if (point[j].y <= ((float)yi - 0.5)) { POLY_EDGE_DEL(j)} else if (point[j].y > ((float)yi + 0.5)) { POLY_EDGE_ADD(j, yi)} if (i < (n - 1)) j = i + 1; else j = 0; if (point[j].y <= ((float)yi - 0.5)) { POLY_EDGE_DEL(i)} else if (point[j].y > ((float)yi + 0.5)) { POLY_EDGE_ADD(i, yi)} } qsort(edges, num_active_edges, sizeof(RGBA_Edge), polygon_edge_sorter); for (j = 0; j < num_active_edges; j += 2) { int x0, x1; x0 = ceil(edges[j].x - 0.5); if (j < (num_active_edges - 1)) x1 = floor(edges[j + 1].x - 0.5); else x1 = x0; if ((x1 >= ext_x) && (x0 < (ext_x + ext_w)) && (x0 <= x1)) { DATA8 *dst_itr; int w; if (x0 < ext_x) x0 = ext_x; if (x1 >= (ext_x + ext_w)) x1 = ext_x + ext_w - 1; w = (x1 - x0) + 1; dst_itr = dst->pixels + (yi * dst->stride) + x0; if (alpha == 0xff) _soft8_scanline_fill_solid_solid(dst_itr, w, gry8); else _soft8_scanline_fill_transp_solid(dst_itr, w, gry8, alpha); } edges[j].x += edges[j].dx; edges[j + 1].x += edges[j + 1].dx; } } free(edges); free(point); free(sorted_index); } evas-1.7.9/src/lib/engines/common_8/Makefile.am0000664000175000017500000000122712175475547016174 00000000000000 MAINTAINERCLEANFILES = Makefile.in AM_CPPFLAGS = \ -I. \ -I$(top_srcdir)/src/lib \ -I$(top_srcdir)/src/lib/include \ @FREETYPE_CFLAGS@ \ @PIXMAN_CFLAGS@ \ @VALGRIND_CFLAGS@ \ @EVAS_GENERAL_CFLAGS@ \ @EET_CFLAGS@ \ @pthread_cflags@ noinst_LTLIBRARIES = libevas_engine_common_8.la libevas_engine_common_8_la_SOURCES = \ evas_soft8_dither_mask.c \ evas_soft8_font.c \ evas_soft8_image_unscaled.c \ evas_soft8_main.c \ evas_soft8_rectangle.c \ evas_soft8_line.c \ evas_soft8_polygon.c \ evas_soft8_image_scaled_sampled.c libevas_engine_common_8_la_DEPENDENCIES = $(top_builddir)/config.h EXTRA_DIST = \ evas_soft8_scanline_blend.c \ evas_soft8_scanline_fill.c evas-1.7.9/src/lib/engines/Makefile.am0000664000175000017500000000025012175475547014450 00000000000000 MAINTAINERCLEANFILES = Makefile.in SUBDIRS = common if BUILD_ENGINE_SOFTWARE_16 SUBDIRS += common_16 endif if BUILD_ENGINE_SOFTWARE_8 SUBDIRS += common_8 endif evas-1.7.9/src/lib/cache/0000775000175000017500000000000012234557316012101 500000000000000evas-1.7.9/src/lib/cache/Makefile.in0000664000175000017500000006202112234557302014062 00000000000000# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/lib/cache DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/efl_attribute.m4 \ $(top_srcdir)/m4/efl_coverage.m4 \ $(top_srcdir)/m4/efl_doxygen.m4 \ $(top_srcdir)/m4/efl_fnmatch.m4 \ $(top_srcdir)/m4/efl_path_max.m4 \ $(top_srcdir)/m4/efl_shm_open.m4 $(top_srcdir)/m4/efl_tests.m4 \ $(top_srcdir)/m4/evas_check_engine.m4 \ $(top_srcdir)/m4/evas_check_loader.m4 \ $(top_srcdir)/m4/evas_converter.m4 \ $(top_srcdir)/m4/evas_dither.m4 \ $(top_srcdir)/m4/evas_scaler.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libevas_cache_la_LIBADD = am_libevas_cache_la_OBJECTS = evas_cache_image.lo \ evas_cache_engine_image.lo evas_preload.lo libevas_cache_la_OBJECTS = $(am_libevas_cache_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libevas_cache_la_SOURCES) DIST_SOURCES = $(libevas_cache_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHECK_CFLAGS = @CHECK_CFLAGS@ CHECK_LIBS = @CHECK_LIBS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@ DIRECTFB_LIBS = @DIRECTFB_LIBS@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ ECORE_EVAS_CFLAGS = @ECORE_EVAS_CFLAGS@ ECORE_EVAS_LIBS = @ECORE_EVAS_LIBS@ EDB_CFLAGS = @EDB_CFLAGS@ EDB_LIBS = @EDB_LIBS@ EDJE_CFLAGS = @EDJE_CFLAGS@ EDJE_LIBS = @EDJE_LIBS@ EET_CFLAGS = @EET_CFLAGS@ EET_LIBS = @EET_LIBS@ EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@ EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@ EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@ EFL_SHM_OPEN_LIBS = @EFL_SHM_OPEN_LIBS@ EGREP = @EGREP@ EINA_CFLAGS = @EINA_CFLAGS@ EINA_LIBS = @EINA_LIBS@ EVAS_CFLAGS = @EVAS_CFLAGS@ EVAS_GENERAL_CFLAGS = @EVAS_GENERAL_CFLAGS@ EVAS_GENERAL_LIBS = @EVAS_GENERAL_LIBS@ EVAS_LIBS = @EVAS_LIBS@ EVAS_SSE3_CFLAGS = @EVAS_SSE3_CFLAGS@ EVIL_CFLAGS = @EVIL_CFLAGS@ EVIL_LIBS = @EVIL_LIBS@ EXEEXT = @EXEEXT@ EXOTIC_CFLAGS = @EXOTIC_CFLAGS@ EXOTIC_LIBS = @EXOTIC_LIBS@ FGREP = @FGREP@ FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@ FONTCONFIG_LIBS = @FONTCONFIG_LIBS@ FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ FREETYPE_LIBS = @FREETYPE_LIBS@ FRIBIDI_CFLAGS = @FRIBIDI_CFLAGS@ FRIBIDI_LIBS = @FRIBIDI_LIBS@ GL_EET_CFLAGS = @GL_EET_CFLAGS@ GL_EET_LIBS = @GL_EET_LIBS@ GREP = @GREP@ HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@ HARFBUZZ_LIBS = @HARFBUZZ_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LINEBREAK_CFLAGS = @LINEBREAK_CFLAGS@ LINEBREAK_LIBS = @LINEBREAK_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MODULE_ARCH = @MODULE_ARCH@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ SDL_CFLAGS = @SDL_CFLAGS@ SDL_LIBS = @SDL_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ SVG_CFLAGS = @SVG_CFLAGS@ SVG_LIBS = @SVG_LIBS@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ XCB_CFLAGS = @XCB_CFLAGS@ XCB_GL_CFLAGS = @XCB_GL_CFLAGS@ XCB_GL_LIBS = @XCB_GL_LIBS@ XCB_LIBS = @XCB_LIBS@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_ct_OBJC = @ac_ct_OBJC@ altivec_cflags = @altivec_cflags@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ dlopen_libs = @dlopen_libs@ docdir = @docdir@ dvidir = @dvidir@ edje_cc = @edje_cc@ efl_doxygen = @efl_doxygen@ efl_have_doxygen = @efl_have_doxygen@ evas_engine_buffer_cflags = @evas_engine_buffer_cflags@ evas_engine_buffer_libs = @evas_engine_buffer_libs@ evas_engine_direct3d_cflags = @evas_engine_direct3d_cflags@ evas_engine_direct3d_libs = @evas_engine_direct3d_libs@ evas_engine_directfb_cflags = @evas_engine_directfb_cflags@ evas_engine_directfb_libs = @evas_engine_directfb_libs@ evas_engine_fb_cflags = @evas_engine_fb_cflags@ evas_engine_fb_libs = @evas_engine_fb_libs@ evas_engine_gl_cocoa_cflags = @evas_engine_gl_cocoa_cflags@ evas_engine_gl_cocoa_libs = @evas_engine_gl_cocoa_libs@ evas_engine_gl_common_libs = @evas_engine_gl_common_libs@ evas_engine_gl_sdl_cflags = @evas_engine_gl_sdl_cflags@ evas_engine_gl_sdl_libs = @evas_engine_gl_sdl_libs@ evas_engine_gl_xcb_cflags = @evas_engine_gl_xcb_cflags@ evas_engine_gl_xcb_libs = @evas_engine_gl_xcb_libs@ evas_engine_gl_xlib_cflags = @evas_engine_gl_xlib_cflags@ evas_engine_gl_xlib_libs = @evas_engine_gl_xlib_libs@ evas_engine_psl1ght_cflags = @evas_engine_psl1ght_cflags@ evas_engine_psl1ght_libs = @evas_engine_psl1ght_libs@ evas_engine_software_16_sdl_cflags = @evas_engine_software_16_sdl_cflags@ evas_engine_software_16_sdl_libs = @evas_engine_software_16_sdl_libs@ evas_engine_software_16_wince_cflags = @evas_engine_software_16_wince_cflags@ evas_engine_software_16_wince_libs = @evas_engine_software_16_wince_libs@ evas_engine_software_16_x11_cflags = @evas_engine_software_16_x11_cflags@ evas_engine_software_16_x11_libs = @evas_engine_software_16_x11_libs@ evas_engine_software_8_x11_cflags = @evas_engine_software_8_x11_cflags@ evas_engine_software_8_x11_libs = @evas_engine_software_8_x11_libs@ evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@ evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@ evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@ evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ evas_image_loader_edb_libs = @evas_image_loader_edb_libs@ evas_image_loader_eet_cflags = @evas_image_loader_eet_cflags@ evas_image_loader_eet_libs = @evas_image_loader_eet_libs@ evas_image_loader_generic_cflags = @evas_image_loader_generic_cflags@ evas_image_loader_generic_libs = @evas_image_loader_generic_libs@ evas_image_loader_gif_cflags = @evas_image_loader_gif_cflags@ evas_image_loader_gif_libs = @evas_image_loader_gif_libs@ evas_image_loader_ico_cflags = @evas_image_loader_ico_cflags@ evas_image_loader_ico_libs = @evas_image_loader_ico_libs@ evas_image_loader_jpeg_cflags = @evas_image_loader_jpeg_cflags@ evas_image_loader_jpeg_libs = @evas_image_loader_jpeg_libs@ evas_image_loader_pmaps_cflags = @evas_image_loader_pmaps_cflags@ evas_image_loader_pmaps_libs = @evas_image_loader_pmaps_libs@ evas_image_loader_png_cflags = @evas_image_loader_png_cflags@ evas_image_loader_png_libs = @evas_image_loader_png_libs@ evas_image_loader_psd_cflags = @evas_image_loader_psd_cflags@ evas_image_loader_psd_libs = @evas_image_loader_psd_libs@ evas_image_loader_svg_cflags = @evas_image_loader_svg_cflags@ evas_image_loader_svg_libs = @evas_image_loader_svg_libs@ evas_image_loader_tga_cflags = @evas_image_loader_tga_cflags@ evas_image_loader_tga_libs = @evas_image_loader_tga_libs@ evas_image_loader_tiff_cflags = @evas_image_loader_tiff_cflags@ evas_image_loader_tiff_libs = @evas_image_loader_tiff_libs@ evas_image_loader_wbmp_cflags = @evas_image_loader_wbmp_cflags@ evas_image_loader_wbmp_libs = @evas_image_loader_wbmp_libs@ evas_image_loader_xpm_cflags = @evas_image_loader_xpm_cflags@ evas_image_loader_xpm_libs = @evas_image_loader_xpm_libs@ exec_prefix = @exec_prefix@ have_evas_engine_gl_x11 = @have_evas_engine_gl_x11@ have_evas_engine_gl_xcb = @have_evas_engine_gl_xcb@ have_evas_engine_gl_xlib = @have_evas_engine_gl_xlib@ have_evas_engine_software_x11 = @have_evas_engine_software_x11@ have_evas_engine_software_xcb = @have_evas_engine_software_xcb@ have_evas_engine_software_xlib = @have_evas_engine_software_xlib@ have_lcov = @have_lcov@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_enable_auto_import = @lt_enable_auto_import@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgconfig_requires_private = @pkgconfig_requires_private@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pthread_cflags = @pthread_cflags@ pthread_libs = @pthread_libs@ release_info = @release_info@ requirement_evas = @requirement_evas@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ shm_open_libs = @shm_open_libs@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ version_info = @version_info@ MAINTAINERCLEANFILES = Makefile.in AM_CPPFLAGS = -I. -I$(top_srcdir)/src/lib -I$(top_srcdir)/src/lib/include \ -DPACKAGE_BIN_DIR=\"$(bindir)\" \ -DPACKAGE_LIB_DIR=\"$(libdir)\" \ -DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \ @EVIL_CFLAGS@ \ @FREETYPE_CFLAGS@ \ @PIXMAN_CFLAGS@ \ @FRIBIDI_CFLAGS@ \ @EVAS_GENERAL_CFLAGS@ noinst_LTLIBRARIES = libevas_cache.la libevas_cache_la_SOURCES = \ evas_cache_image.c \ evas_cache_engine_image.c \ evas_preload.c \ evas_cache.h libevas_cache_la_LIBAD = @EVIL_LIBS@ all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/lib/cache/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/lib/cache/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libevas_cache.la: $(libevas_cache_la_OBJECTS) $(libevas_cache_la_DEPENDENCIES) $(EXTRA_libevas_cache_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libevas_cache_la_OBJECTS) $(libevas_cache_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_cache_engine_image.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_cache_image.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_preload.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES cscopelist-am ctags \ ctags-am distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: evas-1.7.9/src/lib/cache/evas_preload.c0000664000175000017500000001443712175475547014653 00000000000000#ifdef HAVE_CONFIG_H # include #endif #ifdef HAVE_EVIL # include #endif #ifdef BUILD_ASYNC_PRELOAD # include # ifdef __linux__ # include # endif #endif #include "evas_common.h" #include "evas_private.h" #include "Evas.h" #ifdef BUILD_ASYNC_PRELOAD static int _threads_max = 0; typedef struct _Evas_Preload_Pthread_Worker Evas_Preload_Pthread_Worker; typedef struct _Evas_Preload_Pthread_Data Evas_Preload_Pthread_Data; typedef void (*_evas_preload_pthread_func)(void *data); struct _Evas_Preload_Pthread_Worker { EINA_INLIST; _evas_preload_pthread_func func_heavy; _evas_preload_pthread_func func_end; _evas_preload_pthread_func func_cancel; void *data; Eina_Bool cancel : 1; }; struct _Evas_Preload_Pthread_Data { pthread_t thread; }; static int _threads_count = 0; static Evas_Preload_Pthread_Worker *_workers = NULL; static LK(_mutex); static void _evas_preload_thread_end(void *data) { Evas_Preload_Pthread_Data *pth = data; Evas_Preload_Pthread_Data *p = NULL; if (pthread_join(pth->thread, (void **)&p) == 0) free(p); else return; eina_threads_shutdown(); } static void _evas_preload_thread_done(void *target __UNUSED__, Evas_Callback_Type type __UNUSED__, void *event_info) { Evas_Preload_Pthread_Worker *work = event_info; if (work->cancel) { if (work->func_cancel) work->func_cancel(work->data); } else work->func_end(work->data); free(work); } static void * _evas_preload_thread_worker(void *data) { Evas_Preload_Pthread_Data *pth = data; Evas_Preload_Pthread_Worker *work; eina_sched_prio_drop(); pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL); pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, NULL); on_error: for (;;) { LKL(_mutex); if (!_workers) { LKU(_mutex); break; } work = _workers; _workers = EINA_INLIST_CONTAINER_GET(eina_inlist_remove(EINA_INLIST_GET(_workers), EINA_INLIST_GET(_workers)), Evas_Preload_Pthread_Worker); LKU(_mutex); if (work->func_heavy) work->func_heavy(work->data); evas_async_events_put(pth, 0, work, _evas_preload_thread_done); } LKL(_mutex); if (_workers) { LKU(_mutex); goto on_error; } _threads_count--; LKU(_mutex); // dummy worker to wake things up work = malloc(sizeof(Evas_Preload_Pthread_Worker)); if (!work) return NULL; work->data = pth; work->func_heavy = NULL; work->func_end = (_evas_preload_pthread_func) _evas_preload_thread_end; work->func_cancel = NULL; work->cancel = EINA_FALSE; evas_async_events_put(pth, 0, work, _evas_preload_thread_done); return pth; } #endif void _evas_preload_thread_init(void) { #ifdef BUILD_ASYNC_PRELOAD _threads_max = eina_cpu_count(); if (_threads_max < 1) _threads_max = 1; LKI(_mutex); #endif } void _evas_preload_thread_shutdown(void) { /* FIXME: If function are still running in the background, should we kill them ? */ #ifdef BUILD_ASYNC_PRELOAD Evas_Preload_Pthread_Worker *work; /* Force processing of async events. */ evas_async_events_process(); LKL(_mutex); while (_workers) { work = _workers; _workers = EINA_INLIST_CONTAINER_GET(eina_inlist_remove(EINA_INLIST_GET(_workers), EINA_INLIST_GET(_workers)), Evas_Preload_Pthread_Worker); if (work->func_cancel) work->func_cancel(work->data); free(work); } LKU(_mutex); LKD(_mutex); #endif } Evas_Preload_Pthread * evas_preload_thread_run(void (*func_heavy) (void *data), void (*func_end) (void *data), void (*func_cancel) (void *data), const void *data) { #ifdef BUILD_ASYNC_PRELOAD Evas_Preload_Pthread_Worker *work; Evas_Preload_Pthread_Data *pth; work = malloc(sizeof(Evas_Preload_Pthread_Worker)); if (!work) { func_cancel((void *)data); return NULL; } work->func_heavy = func_heavy; work->func_end = func_end; work->func_cancel = func_cancel; work->cancel = EINA_FALSE; work->data = (void *)data; LKL(_mutex); _workers = (Evas_Preload_Pthread_Worker *)eina_inlist_append(EINA_INLIST_GET(_workers), EINA_INLIST_GET(work)); if (_threads_count == _threads_max) { LKU(_mutex); return (Evas_Preload_Pthread *)work; } LKU(_mutex); /* One more thread could be created. */ pth = malloc(sizeof(Evas_Preload_Pthread_Data)); if (!pth) goto on_error; eina_threads_init(); if (pthread_create(&pth->thread, NULL, _evas_preload_thread_worker, pth) == 0) { LKL(_mutex); _threads_count++; LKU(_mutex); return (Evas_Preload_Pthread*)work; } eina_threads_shutdown(); on_error: LKL(_mutex); if (_threads_count == 0) { _workers = EINA_INLIST_CONTAINER_GET(eina_inlist_remove(EINA_INLIST_GET(_workers), EINA_INLIST_GET(work)), Evas_Preload_Pthread_Worker); LKU(_mutex); if (work->func_cancel) work->func_cancel(work->data); free(work); return NULL; } LKU(_mutex); return NULL; #else /* If no thread and as we don't want to break app that rely on this facility, we will lock the interface until we are done. */ (void)func_cancel; func_heavy((void *)data); func_end((void *)data); return (void *)1; #endif } Eina_Bool evas_preload_thread_cancel(Evas_Preload_Pthread *thread) { #ifdef BUILD_ASYNC_PRELOAD Evas_Preload_Pthread_Worker *work; if (!thread) return EINA_TRUE; LKL(_mutex); EINA_INLIST_FOREACH(_workers, work) { if (work == (Evas_Preload_Pthread_Worker *)thread) { _workers = EINA_INLIST_CONTAINER_GET(eina_inlist_remove(EINA_INLIST_GET(_workers), EINA_INLIST_GET(work)), Evas_Preload_Pthread_Worker); LKU(_mutex); if (work->func_cancel) work->func_cancel(work->data); free(work); return EINA_TRUE; } } LKU(_mutex); /* Delay the destruction */ work = (Evas_Preload_Pthread_Worker *)thread; work->cancel = EINA_TRUE; return EINA_FALSE; #else (void) thread; return EINA_TRUE; #endif } evas-1.7.9/src/lib/cache/evas_cache.h0000664000175000017500000002153612175475547014273 00000000000000#ifndef _EVAS_CACHE_H #define _EVAS_CACHE_H typedef struct _Evas_Cache_Image Evas_Cache_Image; typedef struct _Evas_Cache_Image_Func Evas_Cache_Image_Func; typedef struct _Evas_Cache_Engine_Image Evas_Cache_Engine_Image; typedef struct _Evas_Cache_Engine_Image_Func Evas_Cache_Engine_Image_Func; struct _Evas_Cache_Image_Func { Image_Entry *(*alloc)(void); void (*dealloc)(Image_Entry *im); /* The cache provide some helpers for surface manipulation. */ int (*surface_alloc)(Image_Entry *im, unsigned int w, unsigned int h); void (*surface_delete)(Image_Entry *im); DATA32 *(*surface_pixels)(Image_Entry *im); /* The cache is doing the allocation and deallocation, you must just do the rest. */ int (*constructor)(Image_Entry *im); /**< return is EVAS_LOAD_ERROR_* or EVAS_LOAD_ERROR_NONE! */ void (*destructor)(Image_Entry *im); void (*dirty_region)(Image_Entry *im, unsigned int x, unsigned int y, unsigned int w, unsigned int h); /* Only called when references > 0. Need to provide a fresh copie of im. */ /* The destination surface does have a surface, but no allocated pixel data. */ int (*dirty)(Image_Entry *dst, const Image_Entry *src); /* Only called when references == 1. We will call drop on `im'. */ /* The destination surface does not have any surface. */ int (*size_set)(Image_Entry *dst, const Image_Entry *src, unsigned int w, unsigned int h); /* The destination surface does not have any surface. */ int (*copied_data)(Image_Entry *dst, unsigned int w, unsigned int h, DATA32 *image_data, int alpha, int cspace); /* The destination surface does not have any surface. */ int (*data)(Image_Entry *dst, unsigned int w, unsigned int h, DATA32 *image_data, int alpha, int cspace); int (*color_space)(Image_Entry *dst, int cspace); /* This function need to update im->w and im->h. */ int (*load)(Image_Entry *im); /**< return is EVAS_LOAD_ERROR_* or EVAS_LOAD_ERROR_NONE! */ int (*mem_size_get)(Image_Entry *im); void (*debug)(const char *context, Image_Entry *im); }; struct _Evas_Cache_Image { Evas_Cache_Image_Func func; Eina_List *preload; Eina_List *pending; Eina_Inlist *dirty; Eina_Inlist *lru; Eina_Inlist *lru_nodata; Eina_Hash *inactiv; Eina_Hash *activ; void *data; int usage; unsigned int limit; int references; }; struct _Evas_Cache_Engine_Image_Func { /* Must return a char* allocated with eina_stringshare_add. */ char* (*key)(Image_Entry *im, const char *file, const char *key, RGBA_Image_Loadopts *lo, int *error); Engine_Image_Entry* (*alloc)(void); void (*dealloc)(Engine_Image_Entry *eim); int (*constructor)(Engine_Image_Entry *eim, void* data); void (*destructor)(Engine_Image_Entry *eim); void (*dirty_region)(Engine_Image_Entry *eim, unsigned int x, unsigned int y, unsigned int w, unsigned int h); /* Only called when references > 0. Need to provide a fresh copie of im. */ int (*dirty)(Engine_Image_Entry *dst, const Engine_Image_Entry *src); /* Only called when references == 1. We will call drop on `im'. */ int (*size_set)(Engine_Image_Entry *dst, const Engine_Image_Entry *src); int (*update_data)(Engine_Image_Entry* dst, void* data); void (*load)(Engine_Image_Entry *eim, const Image_Entry* im); int (*mem_size_get)(Engine_Image_Entry *eim); void (*debug)(const char* context, Engine_Image_Entry *eim); }; struct _Evas_Cache_Engine_Image { Evas_Cache_Engine_Image_Func func; Eina_Inlist* dirty; Eina_Hash* activ; Eina_Hash* inactiv; Eina_Inlist* lru; Evas_Cache_Image* parent; Evas_Cache_Engine_Image* brother; int usage; int limit; int references; }; #ifdef __cplusplus extern "C" { #endif EAPI Evas_Cache_Image* evas_cache_image_init(const Evas_Cache_Image_Func *cb); EAPI void evas_cache_image_shutdown(Evas_Cache_Image *cache); EAPI Image_Entry* evas_cache_image_request(Evas_Cache_Image *cache, const char *file, const char *key, RGBA_Image_Loadopts *lo, int *error); EAPI void evas_cache_image_drop(Image_Entry *im); EAPI void evas_cache_image_data_not_needed(Image_Entry *im); EAPI int evas_cache_image_flush(Evas_Cache_Image *cache); EAPI void evas_cache_private_set(Evas_Cache_Image *cache, const void *data); EAPI void* evas_cache_private_get(Evas_Cache_Image *cache); EAPI void* evas_cache_private_from_image_entry_get(Image_Entry *im); EAPI int evas_cache_image_usage_get(Evas_Cache_Image *cache); EAPI int evas_cache_image_get(Evas_Cache_Image *cache); EAPI void evas_cache_image_set(Evas_Cache_Image *cache, unsigned int size); EAPI Image_Entry* evas_cache_image_alone(Image_Entry *im); EAPI Image_Entry* evas_cache_image_dirty(Image_Entry *im, unsigned int x, unsigned int y, unsigned int w, unsigned int h); EAPI int evas_cache_image_load_data(Image_Entry *im); EAPI void evas_cache_image_unload_data(Image_Entry *im); EAPI Eina_Bool evas_cache_image_is_loaded(Image_Entry *im); EAPI void evas_cache_image_unload_all(Evas_Cache_Image *cache); EAPI void evas_cache_image_surface_alloc(Image_Entry *im, unsigned int w, unsigned int h); EAPI DATA32* evas_cache_image_pixels(Image_Entry *im); EAPI Image_Entry* evas_cache_image_copied_data(Evas_Cache_Image *cache, unsigned int w, unsigned int h, DATA32 *image_data, int alpha, int cspace); EAPI Image_Entry* evas_cache_image_data(Evas_Cache_Image *cache, unsigned int w, unsigned int h, DATA32 *image_data, int alpha, int cspace); EAPI void evas_cache_image_colorspace(Image_Entry *im, int cspace); EAPI Image_Entry* evas_cache_image_empty(Evas_Cache_Image *cache); EAPI Image_Entry* evas_cache_image_size_set(Image_Entry *im, unsigned int w, unsigned int h); EAPI Evas_Cache_Engine_Image* evas_cache_engine_image_init(const Evas_Cache_Engine_Image_Func *cb, Evas_Cache_Image *parent); EAPI void evas_cache_engine_image_shutdown(Evas_Cache_Engine_Image *cache); EAPI int evas_cache_engine_image_usage_get(Evas_Cache_Engine_Image *cache); EAPI int evas_cache_engine_image_get(Evas_Cache_Engine_Image *cache); EAPI void evas_cache_engine_image_set(Evas_Cache_Engine_Image *cache, int limit); EAPI Engine_Image_Entry* evas_cache_engine_image_request(Evas_Cache_Engine_Image *cache, const char *file, const char *key, RGBA_Image_Loadopts *lo, void *engine_data, int *error); EAPI void evas_cache_engine_parent_not_needed(Engine_Image_Entry *eim); EAPI Engine_Image_Entry* evas_cache_engine_image_engine(Evas_Cache_Engine_Image *cache, void *engine_data); EAPI void evas_cache_engine_image_drop(Engine_Image_Entry *eim); EAPI Engine_Image_Entry* evas_cache_engine_image_alone(Engine_Image_Entry *eim, void *data); EAPI Engine_Image_Entry* evas_cache_engine_image_dirty(Engine_Image_Entry *eim, unsigned int x, unsigned int y, unsigned int w, unsigned int h); EAPI Engine_Image_Entry* evas_cache_engine_image_copied_data(Evas_Cache_Engine_Image *cache, unsigned int w, unsigned int h, DATA32 *image_data, int alpha, int cspace, void *engine_data); EAPI Engine_Image_Entry* evas_cache_engine_image_data(Evas_Cache_Engine_Image *cache, unsigned int w, unsigned int h, DATA32 *image_data, int alpha, int cspace, void *engine_data); EAPI void evas_cache_engine_image_colorspace(Engine_Image_Entry *eim, int cspace, void *engine_data); EAPI Engine_Image_Entry* evas_cache_engine_image_size_set(Engine_Image_Entry *eim, unsigned int w, unsigned int h); EAPI void evas_cache_engine_image_load_data(Engine_Image_Entry *eim); EAPI void evas_cache_image_preload_data(Image_Entry *im, const void *target); EAPI void evas_cache_image_preload_cancel(Image_Entry *im, const void *target); EAPI void evas_cache_image_wakeup(void); #ifdef __cplusplus } #endif #endif /* _EVAS_CACHE_H */ evas-1.7.9/src/lib/cache/evas_cache_engine_image.c0000664000175000017500000004076512175475547016762 00000000000000#ifdef HAVE_CONFIG_H # include #endif #include #include "evas_common.h" #include "evas_private.h" static void _evas_cache_engine_image_make_dirty(Evas_Cache_Engine_Image *cache, Engine_Image_Entry *eim) { eim->flags.cached = 1; eim->flags.dirty = 1; eim->flags.loaded = 1; eim->flags.activ = 0; cache->dirty = eina_inlist_prepend(cache->dirty, EINA_INLIST_GET(eim)); } static void _evas_cache_engine_image_make_active(Evas_Cache_Engine_Image *cache, Engine_Image_Entry *eim, const char *key) { eim->flags.cached = 1; eim->flags.activ = 1; eim->flags.dirty = 0; eina_hash_add(cache->activ, key, eim); } static void _evas_cache_engine_image_make_inactive(Evas_Cache_Engine_Image *cache, Engine_Image_Entry *eim, const char *key) { eim->flags.cached = 1; eim->flags.dirty = 0; eim->flags.activ = 0; eina_hash_add(cache->inactiv, key, eim); cache->lru = eina_inlist_prepend(cache->lru, EINA_INLIST_GET(eim)); cache->usage += cache->func.mem_size_get(eim); } static void _evas_cache_engine_image_remove_activ(Evas_Cache_Engine_Image *cache, Engine_Image_Entry *eim) { if (eim->flags.cached) { if (eim->flags.dirty) { cache->dirty = eina_inlist_remove(cache->dirty, EINA_INLIST_GET(eim)); } else if (eim->flags.activ) { eina_hash_del(cache->activ, eim->cache_key, eim); } else { cache->usage -= cache->func.mem_size_get(eim); eina_hash_del(cache->inactiv, eim->cache_key, eim); cache->lru = eina_inlist_remove(cache->lru, EINA_INLIST_GET(eim)); } eim->flags.cached = 0; eim->flags.dirty = 0; eim->flags.activ = 0; } } static Engine_Image_Entry * _evas_cache_engine_image_alloc(Evas_Cache_Engine_Image *cache, Image_Entry *ie, const char *hkey) { Engine_Image_Entry *eim; assert(cache); if (cache->func.alloc) eim = cache->func.alloc(); else eim = malloc(sizeof (Engine_Image_Entry)); if (!eim) goto on_error; memset(eim, 0, sizeof (Engine_Image_Entry)); eim->cache = cache; if (ie) { eim->w = ie->w; eim->h = ie->h; eim->src = ie; eim->flags.need_parent = 1; } else { eim->w = -1; eim->h = -1; eim->flags.need_parent = 0; eim->src = NULL; } eim->flags.cached = 0; eim->references = 0; eim->cache_key = hkey; if (hkey) _evas_cache_engine_image_make_active(cache, eim, hkey); else _evas_cache_engine_image_make_dirty(cache, eim); return eim; on_error: if (eim) evas_cache_engine_image_drop(eim); eina_stringshare_del(hkey); evas_cache_image_drop(ie); return NULL; } static void _evas_cache_engine_image_dealloc(Evas_Cache_Engine_Image *cache, Engine_Image_Entry *eim) { Image_Entry *im; if (cache->func.debug) cache->func.debug("delete", eim); _evas_cache_engine_image_remove_activ(cache, eim); im = eim->src; cache->func.destructor(eim); if (im) evas_cache_image_drop(im); if (cache->func.dealloc) { cache->func.dealloc(eim); } else { memset(eim, 0, sizeof (Engine_Image_Entry)); free(eim); } } EAPI int evas_cache_engine_image_usage_get(Evas_Cache_Engine_Image *cache) { assert(cache != NULL); return cache->usage; } EAPI int evas_cache_engine_image_get(Evas_Cache_Engine_Image *cache) { assert(cache != NULL); return cache->limit; } EAPI void evas_cache_engine_image_set(Evas_Cache_Engine_Image *cache, int limit) { assert(cache != NULL); cache->limit = limit; } EAPI Evas_Cache_Engine_Image * evas_cache_engine_image_init(const Evas_Cache_Engine_Image_Func *cb, Evas_Cache_Image *parent) { Evas_Cache_Engine_Image *new; new = malloc(sizeof (Evas_Cache_Engine_Image)); if (!new) return NULL; new->func = *cb; new->limit = 0; new->usage = 0; new->dirty = NULL; new->lru = NULL; new->activ = eina_hash_string_superfast_new(NULL); new->inactiv = eina_hash_string_superfast_new(NULL); new->parent = parent; parent->references++; new->brother = NULL; return new; } EAPI Evas_Cache_Engine_Image * evas_cache_engine_image_dup(const Evas_Cache_Engine_Image_Func *cb, Evas_Cache_Engine_Image *brother) { Evas_Cache_Engine_Image *new; new = calloc(1, sizeof (Evas_Cache_Engine_Image)); if (!new) return NULL; new->func = brother->func; #define ORD(Func) if (cb->Func) new->func.Func = cb->Func; ORD(key); ORD(constructor); ORD(destructor); ORD(dirty_region); ORD(dirty); ORD(size_set); ORD(update_data); ORD(load); ORD(mem_size_get); ORD(debug); #undef ORD new->limit = -1; new->usage = 0; new->references = 1; new->dirty = NULL; new->activ = NULL; new->parent = brother->parent; new->parent->references++; new->brother = brother; brother->references++; return new; } static Eina_Bool _evas_cache_engine_image_free_cb(__UNUSED__ const Eina_Hash *hash, __UNUSED__ const void *key, void *data, void *fdata) { Eina_List **delete_list = fdata; *delete_list = eina_list_prepend(*delete_list, data); return EINA_TRUE; } EAPI void evas_cache_engine_image_flush(Evas_Cache_Engine_Image *cache) { assert(cache != NULL); while ((cache->lru) && (cache->limit < cache->usage)) { Engine_Image_Entry *eim; eim = (Engine_Image_Entry *) cache->lru->last; _evas_cache_engine_image_dealloc(cache, eim); } } EAPI void evas_cache_engine_image_shutdown(Evas_Cache_Engine_Image *cache) { Engine_Image_Entry *eim; Eina_List *delete_list = NULL; assert(cache != NULL); if (cache->func.debug) cache->func.debug("shutdown-engine", NULL); eina_hash_foreach(cache->inactiv, _evas_cache_engine_image_free_cb, &delete_list); eina_hash_foreach(cache->activ, _evas_cache_engine_image_free_cb, &delete_list); while (delete_list) { _evas_cache_engine_image_dealloc(cache, eina_list_data_get(delete_list)); delete_list = eina_list_remove_list(delete_list, delete_list); } eina_hash_free(cache->inactiv); eina_hash_free(cache->activ); /* This is mad, I am about to destroy image still alive, but we need to prevent leak. */ while (cache->dirty) { eim = (Engine_Image_Entry *) cache->dirty; _evas_cache_engine_image_dealloc(cache, eim); } evas_cache_image_shutdown(cache->parent); if (cache->brother) evas_cache_engine_image_shutdown(cache->brother); free(cache); } EAPI Engine_Image_Entry * evas_cache_engine_image_request(Evas_Cache_Engine_Image *cache, const char *file, const char *key, RGBA_Image_Loadopts *lo, void *data, int *error) { Engine_Image_Entry *eim; Image_Entry *im; const char *ekey; assert(cache != NULL); *error = EVAS_LOAD_ERROR_NONE; ekey = NULL; eim = NULL; im = evas_cache_image_request(cache->parent, file, key, lo, error); if (!im) goto on_error; if (cache->func.key) ekey = cache->func.key(im, file, key, lo, data); else ekey = eina_stringshare_add(im->cache_key); if (!ekey) { *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; goto on_error; } eim = eina_hash_find(cache->activ, ekey); if (eim) { evas_cache_image_drop(im); goto on_ok; } eim = eina_hash_find(cache->inactiv, ekey); if (eim) { _evas_cache_engine_image_remove_activ(cache, eim); _evas_cache_engine_image_make_active(cache, eim, ekey); evas_cache_image_drop(im); goto on_ok; } eim = _evas_cache_engine_image_alloc(cache, im, ekey); if (!eim) { *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; return NULL; } *error = cache->func.constructor(eim, data); if (*error != EVAS_LOAD_ERROR_NONE) goto on_error; if (cache->func.debug) cache->func.debug("constructor-engine", eim); on_ok: eim->references++; return eim; on_error: if (!eim) { if (im) evas_cache_image_drop(im); if (ekey) eina_stringshare_del(ekey); } else { _evas_cache_engine_image_dealloc(cache, eim); } return NULL; } EAPI void evas_cache_engine_image_drop(Engine_Image_Entry *eim) { Evas_Cache_Engine_Image *cache; assert(eim); assert(eim->cache); eim->references--; cache = eim->cache; if (eim->flags.dirty) { _evas_cache_engine_image_dealloc(cache, eim); return ; } if (eim->references == 0) { _evas_cache_engine_image_remove_activ(cache, eim); _evas_cache_engine_image_make_inactive(cache, eim, eim->cache_key); evas_cache_engine_image_flush(cache); return ; } } EAPI Engine_Image_Entry * evas_cache_engine_image_dirty(Engine_Image_Entry *eim, unsigned int x, unsigned int y, unsigned int w, unsigned int h) { Engine_Image_Entry *eim_dirty = eim; Image_Entry *im_dirty = NULL; Image_Entry *im; Evas_Cache_Engine_Image *cache; unsigned char alloc_eim; assert(eim); assert(eim->cache); cache = eim->cache; if (!(eim->flags.dirty)) { alloc_eim = 0; if (eim->flags.need_parent == 1) { im = eim->src; im_dirty = evas_cache_image_dirty(im, x, y, w, h); /* If im == im_dirty, this meens that we have only one reference to the eim. */ if (im != im_dirty) { if (eim->references == 1) { _evas_cache_engine_image_remove_activ(cache, eim); _evas_cache_engine_image_make_dirty(cache, eim); eim->src = im_dirty; } else alloc_eim = 1; } } else if (eim->references > 1) { alloc_eim = 1; } else { _evas_cache_engine_image_remove_activ(cache, eim_dirty); _evas_cache_engine_image_make_dirty(cache, eim_dirty); } if (alloc_eim == 1) { int error; eim_dirty = _evas_cache_engine_image_alloc(cache, im_dirty, NULL); if (!eim_dirty) goto on_error; eim_dirty->w = eim->w; eim_dirty->h = eim->h; eim_dirty->references = 1; error = cache->func.dirty(eim_dirty, eim); if (cache->func.debug) cache->func.debug("dirty-engine", eim_dirty); if (error != 0) goto on_error; evas_cache_engine_image_drop(eim); } } if (cache->func.dirty_region) cache->func.dirty_region(eim_dirty, x, y, w, h); if (cache->func.debug) cache->func.debug("dirty-region-engine", eim_dirty); return eim_dirty; on_error: if (eim) evas_cache_engine_image_drop(eim); if (eim_dirty && eim_dirty != eim) evas_cache_engine_image_drop(eim_dirty); else if (im_dirty) evas_cache_image_drop(im_dirty); return NULL; } EAPI Engine_Image_Entry * evas_cache_engine_image_alone(Engine_Image_Entry *eim, void *data) { Evas_Cache_Engine_Image *cache; Image_Entry *im; assert(eim); assert(eim->cache); cache = eim->cache; im = evas_cache_image_alone(eim->src); if (im != eim->src) { eim = _evas_cache_engine_image_alloc(cache, im, NULL); if (!eim) goto on_error; eim->references = 1; if (cache->func.constructor(eim, data) != EVAS_LOAD_ERROR_NONE) goto on_error; } /* FIXME */ return eim; on_error: evas_cache_image_drop(im); return NULL; } static Engine_Image_Entry * _evas_cache_engine_image_push_dirty(Evas_Cache_Engine_Image *cache, Image_Entry *im, void *engine_data) { Engine_Image_Entry *eim; int error; eim = _evas_cache_engine_image_alloc(cache, im, NULL); if (!eim) goto on_error; eim->references = 1; error = cache->func.update_data(eim, engine_data); if (cache->func.debug) cache->func.debug("dirty-update_data-engine", eim); if (error != 0) goto on_error; return eim; on_error: if (eim) evas_cache_engine_image_drop(eim); return NULL; } EAPI Engine_Image_Entry * evas_cache_engine_image_copied_data(Evas_Cache_Engine_Image *cache, unsigned int w, unsigned int h, DATA32 *image_data, int alpha, int cspace, void *engine_data) { Image_Entry *im; assert(cache); im = evas_cache_image_copied_data(cache->parent, w, h, image_data, alpha, cspace); return _evas_cache_engine_image_push_dirty(cache, im, engine_data); } EAPI Engine_Image_Entry * evas_cache_engine_image_data(Evas_Cache_Engine_Image *cache, unsigned int w, unsigned int h, DATA32 *image_data, int alpha, int cspace, void *engine_data) { Image_Entry *im; assert(cache); im = evas_cache_image_data(cache->parent, w, h, image_data, alpha, cspace); return _evas_cache_engine_image_push_dirty(cache, im, engine_data); } EAPI Engine_Image_Entry * evas_cache_engine_image_size_set(Engine_Image_Entry *eim, unsigned int w, unsigned int h) { Evas_Cache_Engine_Image *cache; Engine_Image_Entry *new; Image_Entry *im; const char *hkey; int error; assert(eim); assert(eim->cache); assert(eim->references > 0); im = NULL; cache = eim->cache; if (eim->flags.need_parent == 1) { assert(eim->src); if (eim->src->w == w && eim->src->h == h) return eim; im = evas_cache_image_size_set(eim->src, w, h); /* FIXME: Good idea to call update_data ? */ if (im == eim->src) return eim; eim->src = NULL; } hkey = (eim->references > 1 ) ? eina_stringshare_add(eim->cache_key) : NULL; new = _evas_cache_engine_image_alloc(cache, im, hkey); if (!new) goto on_error; new->w = w; new->h = h; new->references = 1; error = cache->func.size_set(new, eim); if (error) goto on_error; evas_cache_engine_image_drop(eim); return new; on_error: if (new) evas_cache_engine_image_drop(new); else if (im) evas_cache_image_drop(im); evas_cache_engine_image_drop(eim); return NULL; } EAPI void evas_cache_engine_image_load_data(Engine_Image_Entry *eim) { Evas_Cache_Engine_Image *cache; int size = 0; assert(eim); assert(eim->src); assert(eim->cache); if (eim->flags.loaded) return; if (eim->src) evas_cache_image_load_data(eim->src); cache = eim->cache; if (cache->func.debug) cache->func.debug("load-engine", eim); if (eim->flags.dirty) size = cache->func.mem_size_get(eim); cache = eim->cache; cache->func.load(eim, eim->src); if (eim->flags.dirty) cache->usage += cache->func.mem_size_get(eim) - size; eim->flags.loaded = 1; } EAPI Engine_Image_Entry * evas_cache_engine_image_engine(Evas_Cache_Engine_Image *cache, void *engine_data) { Engine_Image_Entry *eim; Image_Entry *ie; int error; ie = evas_cache_image_empty(cache->parent); if (!ie) return NULL; eim = _evas_cache_engine_image_alloc(cache, ie, NULL); if (!eim) goto on_error; eim->references = 1; error = cache->func.update_data(eim, engine_data); if (cache->func.debug) cache->func.debug("update_data-engine", eim); if (error != 0) goto on_error; return eim; on_error: if (!eim) evas_cache_image_drop(ie); else evas_cache_engine_image_drop(eim); return NULL; } EAPI void evas_cache_engine_image_colorspace(Engine_Image_Entry *eim, int cspace, void *engine_data) { Evas_Cache_Engine_Image *cache = eim->cache; assert(cache); cache->func.destructor(eim); evas_cache_image_colorspace(eim->src, cspace); cache->func.constructor(eim, engine_data); if (cache->func.debug) cache->func.debug("cosntructor-colorspace-engine", eim); } EAPI void evas_cache_engine_parent_not_needed(Engine_Image_Entry *eim) { assert(eim); assert(eim->cache); eim->flags.need_parent = 0; evas_cache_image_data_not_needed(eim->src); } evas-1.7.9/src/lib/cache/evas_cache_image.c0000664000175000017500000010263612175475547015431 00000000000000#ifdef HAVE_CONFIG_H # include #endif #include #include #include #include #include #ifdef HAVE_EVIL # include #endif #include "evas_common.h" #include "evas_private.h" //#define CACHEDUMP 1 #ifdef BUILD_ASYNC_PRELOAD typedef struct _Evas_Cache_Preload Evas_Cache_Preload; struct _Evas_Cache_Preload { EINA_INLIST; Image_Entry *ie; }; static LK(engine_lock); static LK(wakeup); static int _evas_cache_mutex_init = 0; static Eina_Condition cond_wakeup; static void _evas_cache_image_entry_preload_remove(Image_Entry *ie, const void *target); #endif #define FREESTRC(Var) \ if (Var) \ { \ eina_stringshare_del(Var); \ Var = NULL; \ } static void _evas_cache_image_dirty_add(Image_Entry *im); static void _evas_cache_image_dirty_del(Image_Entry *im); static void _evas_cache_image_activ_add(Image_Entry *im); static void _evas_cache_image_activ_del(Image_Entry *im); static void _evas_cache_image_lru_add(Image_Entry *im); static void _evas_cache_image_lru_del(Image_Entry *im); static void _evas_cache_image_lru_nodata_add(Image_Entry *im); static void _evas_cache_image_lru_nodata_del(Image_Entry *im); static void _evas_cache_image_dirty_add(Image_Entry *im) { if (im->flags.dirty) return; _evas_cache_image_activ_del(im); _evas_cache_image_lru_del(im); _evas_cache_image_lru_nodata_del(im); im->flags.dirty = 1; im->flags.cached = 1; im->cache->dirty = eina_inlist_prepend(im->cache->dirty, EINA_INLIST_GET(im)); if (im->cache_key) { eina_stringshare_del(im->cache_key); im->cache_key = NULL; } } static void _evas_cache_image_dirty_del(Image_Entry *im) { if (!im->flags.dirty) return; im->flags.dirty = 0; im->flags.cached = 0; im->cache->dirty = eina_inlist_remove(im->cache->dirty, EINA_INLIST_GET(im)); } static void _evas_cache_image_activ_add(Image_Entry *im) { if (im->flags.activ) return; _evas_cache_image_dirty_del(im); _evas_cache_image_lru_del(im); _evas_cache_image_lru_nodata_del(im); if (!im->cache_key) return; im->flags.activ = 1; im->flags.cached = 1; eina_hash_direct_add(im->cache->activ, im->cache_key, im); } static void _evas_cache_image_activ_del(Image_Entry *im) { if (!im->flags.activ) return; if (!im->cache_key) return; im->flags.activ = 0; im->flags.cached = 0; eina_hash_del(im->cache->activ, im->cache_key, im); } static void _evas_cache_image_lru_add(Image_Entry *im) { if (im->flags.lru) return; _evas_cache_image_dirty_del(im); _evas_cache_image_activ_del(im); _evas_cache_image_lru_nodata_del(im); if (!im->cache_key) return; im->flags.lru = 1; im->flags.cached = 1; eina_hash_direct_add(im->cache->inactiv, im->cache_key, im); im->cache->lru = eina_inlist_prepend(im->cache->lru, EINA_INLIST_GET(im)); im->cache->usage += im->cache->func.mem_size_get(im); } static void _evas_cache_image_lru_del(Image_Entry *im) { if (!im->flags.lru) return; if (!im->cache_key) return; im->flags.lru = 0; im->flags.cached = 0; eina_hash_del(im->cache->inactiv, im->cache_key, im); im->cache->lru = eina_inlist_remove(im->cache->lru, EINA_INLIST_GET(im)); im->cache->usage -= im->cache->func.mem_size_get(im); } static void _evas_cache_image_lru_nodata_add(Image_Entry *im) { if (im->flags.lru_nodata) return; _evas_cache_image_dirty_del(im); _evas_cache_image_activ_del(im); _evas_cache_image_lru_del(im); im->flags.lru = 1; im->flags.cached = 1; im->cache->lru_nodata = eina_inlist_prepend(im->cache->lru_nodata, EINA_INLIST_GET(im)); } static void _evas_cache_image_lru_nodata_del(Image_Entry *im) { if (!im->flags.lru_nodata) return; im->flags.lru = 0; im->flags.cached = 0; im->cache->lru_nodata = eina_inlist_remove(im->cache->lru_nodata, EINA_INLIST_GET(im)); } static void _evas_cache_image_entry_delete(Evas_Cache_Image *cache, Image_Entry *ie) { if (!ie) return; if (cache->func.debug) cache->func.debug("deleting", ie); #ifdef BUILD_ASYNC_PRELOAD if (ie->flags.delete_me == 1) return; if (ie->preload) { ie->flags.delete_me = 1; _evas_cache_image_entry_preload_remove(ie, NULL); return; } #endif _evas_cache_image_dirty_del(ie); _evas_cache_image_activ_del(ie); _evas_cache_image_lru_del(ie); _evas_cache_image_lru_nodata_del(ie); cache->func.destructor(ie); FREESTRC(ie->cache_key); FREESTRC(ie->file); FREESTRC(ie->key); ie->cache = NULL; cache->func.surface_delete(ie); #ifdef BUILD_ASYNC_PRELOAD LKD(ie->lock); LKD(ie->lock_cancel); #endif cache->func.dealloc(ie); } static Eina_Bool _timestamp_compare(Image_Timestamp *tstamp, struct stat *st) { if (tstamp->mtime != st->st_mtime) return EINA_FALSE; if (tstamp->size != st->st_size) return EINA_FALSE; if (tstamp->ino != st->st_ino) return EINA_FALSE; #ifdef _STAT_VER_LINUX #if (defined __USE_MISC && defined st_mtime) if (tstamp->mtime_nsec != (unsigned long int)st->st_mtim.tv_nsec) return EINA_FALSE; #else if (tstamp->mtime_nsec != (unsigned long int)st->st_mtimensec) return EINA_FALSE; #endif #endif return EINA_TRUE; } static void _timestamp_build(Image_Timestamp *tstamp, struct stat *st) { tstamp->mtime = st->st_mtime; tstamp->size = st->st_size; tstamp->ino = st->st_ino; #ifdef _STAT_VER_LINUX #if (defined __USE_MISC && defined st_mtime) tstamp->mtime_nsec = (unsigned long int)st->st_mtim.tv_nsec; #else tstamp->mtime_nsec = (unsigned long int)st->st_mtimensec; #endif #endif } static Image_Entry * _evas_cache_image_entry_new(Evas_Cache_Image *cache, const char *hkey, Image_Timestamp *tstamp, const char *file, const char *key, RGBA_Image_Loadopts *lo, int *error) { Image_Entry *ie; ie = cache->func.alloc(); if (!ie) { *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; return NULL; } ie->cache = cache; if (hkey) ie->cache_key = eina_stringshare_add(hkey); ie->flags.need_data = 1; ie->space = EVAS_COLORSPACE_ARGB8888; ie->w = -1; ie->h = -1; ie->scale = 1; if (file) ie->file = eina_stringshare_add(file); if (key) ie->key = eina_stringshare_add(key); if (tstamp) ie->tstamp = *tstamp; else memset(&ie->tstamp, 0, sizeof(Image_Timestamp)); #ifdef BUILD_ASYNC_PRELOAD LKI(ie->lock); LKI(ie->lock_cancel); #endif if (lo) ie->load_opts = *lo; if (ie->file) { *error = cache->func.constructor(ie); if (*error != EVAS_LOAD_ERROR_NONE) { _evas_cache_image_entry_delete(cache, ie); return NULL; } } if (cache->func.debug) cache->func.debug("build", ie); if (ie->cache_key) _evas_cache_image_activ_add(ie); else _evas_cache_image_dirty_add(ie); return ie; } static void _evas_cache_image_entry_surface_alloc__locked(Evas_Cache_Image *cache, Image_Entry *ie, unsigned int wmin, unsigned int hmin) { if ((ie->allocated.w == wmin) && (ie->allocated.h == hmin)) return; if (cache->func.surface_alloc(ie, wmin, hmin)) { wmin = 0; hmin = 0; } ie->w = wmin; ie->h = hmin; ie->allocated.w = wmin; ie->allocated.h = hmin; } static void _evas_cache_image_entry_surface_alloc(Evas_Cache_Image *cache, Image_Entry *ie, int w, int h) { int wmin = w > 0 ? w : 1; int hmin = h > 0 ? h : 1; #ifdef BUILD_ASYNC_PRELOAD LKL(engine_lock); #endif _evas_cache_image_entry_surface_alloc__locked(cache, ie, wmin, hmin); #ifdef BUILD_ASYNC_PRELOAD LKU(engine_lock); #endif } #ifdef BUILD_ASYNC_PRELOAD static void _evas_cache_image_async_heavy(void *data) { Evas_Cache_Image *cache; Image_Entry *current; int error; int pchannel; current = data; LKL(current->lock); pchannel = current->channel; current->channel++; cache = current->cache; if ((!current->flags.loaded) && ((Evas_Image_Load_Func*) current->info.loader)->threadable) { error = cache->func.load(current); if (cache->func.debug) cache->func.debug("load", current); current->load_error = error; if (error != EVAS_LOAD_ERROR_NONE) { current->flags.loaded = 0; _evas_cache_image_entry_surface_alloc(cache, current, current->w, current->h); } else { current->flags.loaded = 1; } } current->channel = pchannel; // check the unload cancel flag LKL(current->lock_cancel); if (current->unload_cancel) { current->unload_cancel = EINA_FALSE; cache->func.surface_delete(current); current->flags.loaded = 0; current->flags.preload_done = 0; } LKU(current->lock_cancel); LKU(current->lock); } static void _evas_cache_image_async_end(void *data) { Image_Entry *ie = (Image_Entry *)data; Evas_Cache_Target *tmp; ie->cache->preload = eina_list_remove(ie->cache->preload, ie); ie->cache->pending = eina_list_remove(ie->cache->pending, ie); ie->preload = NULL; ie->flags.preload_done = ie->flags.loaded; while ((tmp = ie->targets)) { evas_object_inform_call_image_preloaded((Evas_Object*) tmp->target); ie->targets = (Evas_Cache_Target *) eina_inlist_remove(EINA_INLIST_GET(ie->targets), EINA_INLIST_GET(ie->targets)); free(tmp); } } static void _evas_cache_image_async_cancel(void *data) { Evas_Cache_Image *cache = NULL; Image_Entry *ie = (Image_Entry *)data; ie->preload = NULL; ie->cache->pending = eina_list_remove(ie->cache->pending, ie); if ((ie->flags.delete_me) || (ie->flags.dirty)) { ie->flags.delete_me = 0; _evas_cache_image_entry_delete(ie->cache, ie); return; } if (ie->flags.loaded) _evas_cache_image_async_end(ie); if (ie->references == 0) { _evas_cache_image_lru_add(ie); cache = ie->cache; } if (cache) evas_cache_image_flush(cache); } // note - preload_add assumes a target is ONLY added ONCE to the image // entry. make sure you only add once, or remove first, then add static int _evas_cache_image_entry_preload_add(Image_Entry *ie, const void *target) { Evas_Cache_Target *tg; if (ie->flags.preload_done) return 0; tg = malloc(sizeof (Evas_Cache_Target)); if (!tg) return 0; tg->target = target; ie->targets = (Evas_Cache_Target *) eina_inlist_append(EINA_INLIST_GET(ie->targets), EINA_INLIST_GET(tg)); if (!ie->preload) { ie->cache->preload = eina_list_append(ie->cache->preload, ie); ie->flags.pending = 0; ie->preload = evas_preload_thread_run(_evas_cache_image_async_heavy, _evas_cache_image_async_end, _evas_cache_image_async_cancel, ie); } return 1; } static void _evas_cache_image_entry_preload_remove(Image_Entry *ie, const void *target) { if (target) { Evas_Cache_Target *tg; EINA_INLIST_FOREACH(ie->targets, tg) { if (tg->target == target) { // FIXME: No callback when we cancel only for one target ? ie->targets = (Evas_Cache_Target *) eina_inlist_remove(EINA_INLIST_GET(ie->targets), EINA_INLIST_GET(tg)); free(tg); break; } } } else { Evas_Cache_Target *tg; while (ie->targets) { tg = ie->targets; ie->targets = (Evas_Cache_Target *) eina_inlist_remove(EINA_INLIST_GET(ie->targets), EINA_INLIST_GET(tg)); free(tg); } } if ((!ie->targets) && (ie->preload) && (!ie->flags.pending)) { ie->cache->preload = eina_list_remove(ie->cache->preload, ie); ie->cache->pending = eina_list_append(ie->cache->pending, ie); ie->flags.pending = 1; evas_preload_thread_cancel(ie->preload); } } #endif EAPI int evas_cache_image_usage_get(Evas_Cache_Image *cache) { return cache->usage; } EAPI int evas_cache_image_get(Evas_Cache_Image *cache) { return cache->limit; } EAPI void evas_cache_image_set(Evas_Cache_Image *cache, unsigned int limit) { if (cache->limit == limit) { return; } cache->limit = limit; evas_cache_image_flush(cache); } EAPI Evas_Cache_Image * evas_cache_image_init(const Evas_Cache_Image_Func *cb) { Evas_Cache_Image *cache; #ifdef BUILD_ASYNC_PRELOAD if (_evas_cache_mutex_init++ == 0) { LKI(engine_lock); LKI(wakeup); eina_condition_new(&cond_wakeup, &wakeup); } #endif cache = calloc(1, sizeof(Evas_Cache_Image)); if (!cache) return NULL; cache->func = *cb; cache->inactiv = eina_hash_string_superfast_new(NULL); cache->activ = eina_hash_string_superfast_new(NULL); cache->references = 1; return cache; } static Eina_Bool _evas_cache_image_free_cb(__UNUSED__ const Eina_Hash *hash, __UNUSED__ const void *key, void *data, void *fdata) { Eina_List **delete_list = fdata; *delete_list = eina_list_prepend(*delete_list, data); return EINA_TRUE; } EAPI void evas_cache_image_shutdown(Evas_Cache_Image *cache) { Eina_List *delete_list; Image_Entry *im; cache->references--; if (cache->references != 0) { return; } #ifdef BUILD_ASYNC_PRELOAD EINA_LIST_FREE(cache->preload, im) { /* By doing that we are protecting us from destroying image when the cache is no longer available. */ im->flags.delete_me = 1; _evas_cache_image_entry_preload_remove(im, NULL); } evas_async_events_process(); #endif while (cache->lru) { im = (Image_Entry *)cache->lru; _evas_cache_image_entry_delete(cache, im); } while (cache->lru_nodata) { im = (Image_Entry *)cache->lru_nodata; _evas_cache_image_entry_delete(cache, im); } /* This is mad, I am about to destroy image still alive, but we need to prevent leak. */ while (cache->dirty) { im = (Image_Entry *)cache->dirty; _evas_cache_image_entry_delete(cache, im); } delete_list = NULL; eina_hash_foreach(cache->activ, _evas_cache_image_free_cb, &delete_list); while (delete_list) { _evas_cache_image_entry_delete(cache, eina_list_data_get(delete_list)); delete_list = eina_list_remove_list(delete_list, delete_list); } #ifdef BUILD_ASYNC_PRELOAD /* Now wait for all pending image to die */ while (cache->pending) { evas_async_events_process(); LKL(wakeup); // the lazy bum who did eain threads and converted this code // didn't bother to worry about Eina_Lock being a different type // to a pthread mutex. if (cache->pending) eina_condition_wait(&cond_wakeup); LKU(wakeup); } #endif eina_hash_free(cache->activ); eina_hash_free(cache->inactiv); free(cache); #ifdef BUILD_ASYNC_PRELOAD if (--_evas_cache_mutex_init == 0) { eina_condition_free(&cond_wakeup); LKD(engine_lock); LKD(wakeup); } #endif } EAPI Image_Entry * evas_cache_image_request(Evas_Cache_Image *cache, const char *file, const char *key, RGBA_Image_Loadopts *lo, int *error) { const char *ckey = "(null)"; char *hkey; Image_Entry *im; Evas_Image_Load_Opts prevent = { 0, 0.0, 0, 0, 0, { 0, 0, 0, 0 }, EINA_FALSE }; size_t size; int stat_done = 0, stat_failed = 0; size_t file_length; size_t key_length; struct stat st; Image_Timestamp tstamp; if ((!file) || ((!file) && (!key))) { *error = EVAS_LOAD_ERROR_GENERIC; return NULL; } /* generate hkey from file+key+load opts */ file_length = strlen(file); key_length = key ? strlen(key) : 6; size = file_length + key_length + 132; hkey = alloca(sizeof (char) * size); memcpy(hkey, file, file_length); size = file_length; memcpy(hkey + size, "//://", 5); size += 5; if (key) ckey = key; memcpy(hkey + size, ckey, key_length); size += key_length; if ((!lo) || (lo && (lo->scale_down_by == 0) && (lo->dpi == 0.0) && ((lo->w == 0) || (lo->h == 0)) && ((lo->region.w == 0) || (lo->region.h == 0)) && (lo->orientation == 0) )) { lo = &prevent; } else { memcpy(hkey + size, "//@/", 4); size += 4; size += eina_convert_xtoa(lo->scale_down_by, hkey + size); hkey[size] = '/'; size += 1; size += eina_convert_dtoa(lo->dpi, hkey + size); hkey[size] = '/'; size += 1; size += eina_convert_xtoa(lo->w, hkey + size); hkey[size] = 'x'; size += 1; size += eina_convert_xtoa(lo->h, hkey + size); hkey[size] = '/'; size += 1; size += eina_convert_xtoa(lo->region.x, hkey + size); hkey[size] = '+'; size += 1; size += eina_convert_xtoa(lo->region.y, hkey + size); hkey[size] = '.'; size += 1; size += eina_convert_xtoa(lo->region.w, hkey + size); hkey[size] = 'x'; size += 1; size += eina_convert_xtoa(lo->region.h, hkey + size); if (lo->orientation) { hkey[size] = '/'; size += 1; hkey[size] = 'o'; size += 1; } } hkey[size] = '\0'; /* find image by key in active hash */ im = eina_hash_find(cache->activ, hkey); if (im) { int ok = 1; stat_done = 1; if (stat(file, &st) < 0) { stat_failed = 1; ok = 0; } else if (!_timestamp_compare(&(im->tstamp), &st)) ok = 0; if (ok) goto on_ok; /* image we found doesn't match what's on disk (stat info wise) * so dirty the active cache entry so we never find it again. this * also implicitly guarantees that we only have 1 active copy * of an image at a given key. we wither find it and keep re-reffing * it or we dirty it and get it out */ _evas_cache_image_dirty_add(im); im = NULL; } /* find image by key in inactive/lru hash */ im = eina_hash_find(cache->inactiv, hkey); if (im) { int ok = 1; if (!stat_done) { stat_done = 1; if (stat(file, &st) < 0) { stat_failed = 1; ok = 0; } else if (!_timestamp_compare(&(im->tstamp), &st)) ok = 0; } else if (!_timestamp_compare(&(im->tstamp), &st)) ok = 0; if (ok) { /* remove from lru and make it active again */ _evas_cache_image_lru_del(im); _evas_cache_image_activ_add(im); goto on_ok; } /* as avtive cache find - if we match in lru and its invalid, dirty */ _evas_cache_image_dirty_add(im); /* this image never used, so it have to be deleted */ _evas_cache_image_entry_delete(cache, im); im = NULL; } if (stat_failed) goto on_stat_error; if (!stat_done) { if (stat(file, &st) < 0) goto on_stat_error; } _timestamp_build(&tstamp, &st); im = _evas_cache_image_entry_new(cache, hkey, &tstamp, file, key, lo, error); if (!im) goto on_stat_error; if (cache->func.debug) cache->func.debug("request", im); on_ok: *error = EVAS_LOAD_ERROR_NONE; im->references++; return im; on_stat_error: #ifndef _WIN32 if ((errno == ENOENT) || (errno == ENOTDIR) || (errno == ENAMETOOLONG) || (errno == ELOOP)) #else if (errno == ENOENT) #endif *error = EVAS_LOAD_ERROR_DOES_NOT_EXIST; #ifndef _WIN32 else if ((errno == ENOMEM) || (errno == EOVERFLOW)) #else else if (errno == ENOMEM) #endif *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; else if (errno == EACCES) *error = EVAS_LOAD_ERROR_PERMISSION_DENIED; else *error = EVAS_LOAD_ERROR_GENERIC; if (im) _evas_cache_image_entry_delete(cache, im); return NULL; } EAPI void evas_cache_image_drop(Image_Entry *im) { Evas_Cache_Image *cache; int references; im->references--; if (im->references < 0) im->references = 0; references = im->references; cache = im->cache; if (references == 0) { #ifdef BUILD_ASYNC_PRELOAD if (im->preload) { _evas_cache_image_entry_preload_remove(im, NULL); return; } #endif if (im->flags.dirty) { _evas_cache_image_entry_delete(cache, im); return; } _evas_cache_image_lru_add(im); if (cache) evas_cache_image_flush(cache); } } EAPI void evas_cache_image_data_not_needed(Image_Entry *im) { int references; references = im->references; if (references > 1) return; if ((im->flags.dirty) || (!im->flags.need_data)) return; _evas_cache_image_lru_nodata_add(im); } EAPI Image_Entry * evas_cache_image_dirty(Image_Entry *im, unsigned int x, unsigned int y, unsigned int w, unsigned int h) { Image_Entry *im_dirty = im; Evas_Cache_Image *cache; cache = im->cache; if (!(im->flags.dirty)) { #ifndef EVAS_CSERVE int references; references = im->references; // if ref 1 also copy if using shared cache as its read-only if (references == 1) im_dirty = im; else #endif { im_dirty = evas_cache_image_copied_data(cache, im->w, im->h, evas_cache_image_pixels(im), im->flags.alpha, im->space); if (!im_dirty) goto on_error; if (cache->func.debug) cache->func.debug("dirty-src", im); cache->func.dirty(im_dirty, im); if (cache->func.debug) cache->func.debug("dirty-out", im_dirty); im_dirty->references = 1; evas_cache_image_drop(im); } _evas_cache_image_dirty_add(im_dirty); } if (cache->func.debug) cache->func.debug("dirty-region", im_dirty); if (cache->func.dirty_region) cache->func.dirty_region(im_dirty, x, y, w, h); return im_dirty; on_error: if (im_dirty) _evas_cache_image_entry_delete(cache, im_dirty); evas_cache_image_drop(im); return NULL; } EAPI Image_Entry * evas_cache_image_alone(Image_Entry *im) { Evas_Cache_Image *cache; Image_Entry *im_dirty = im; int references; cache = im->cache; references = im->references; if (references <= 1) { if (!im->flags.dirty) _evas_cache_image_dirty_add(im); } else { im_dirty = evas_cache_image_copied_data(cache, im->w, im->h, evas_cache_image_pixels(im), im->flags.alpha, im->space); if (!im_dirty) goto on_error; if (cache->func.debug) cache->func.debug("dirty-src", im); cache->func.dirty(im_dirty, im); if (cache->func.debug) cache->func.debug("dirty-out", im_dirty); im_dirty->references = 1; evas_cache_image_drop(im); } return im_dirty; on_error: if (im_dirty) _evas_cache_image_entry_delete(cache, im_dirty); evas_cache_image_drop(im); return NULL; } EAPI Image_Entry * evas_cache_image_copied_data(Evas_Cache_Image *cache, unsigned int w, unsigned int h, DATA32 *image_data, int alpha, int cspace) { Image_Entry *im; if ((cspace == EVAS_COLORSPACE_YCBCR422P601_PL) || (cspace == EVAS_COLORSPACE_YCBCR422P709_PL) || (cspace == EVAS_COLORSPACE_YCBCR422601_PL)) w &= ~0x1; im = _evas_cache_image_entry_new(cache, NULL, NULL, NULL, NULL, NULL, NULL); if (!im) return NULL; im->space = cspace; im->flags.alpha = alpha; _evas_cache_image_entry_surface_alloc(cache, im, w, h); if (cache->func.copied_data(im, w, h, image_data, alpha, cspace) != 0) { _evas_cache_image_entry_delete(cache, im); return NULL; } im->references = 1; im->flags.loaded = EINA_TRUE; if (cache->func.debug) cache->func.debug("copied-data", im); return im; } EAPI Image_Entry * evas_cache_image_data(Evas_Cache_Image *cache, unsigned int w, unsigned int h, DATA32 *image_data, int alpha, int cspace) { Image_Entry *im; if ((cspace == EVAS_COLORSPACE_YCBCR422P601_PL) || (cspace == EVAS_COLORSPACE_YCBCR422P709_PL) || (cspace == EVAS_COLORSPACE_YCBCR422601_PL)) w &= ~0x1; im = _evas_cache_image_entry_new(cache, NULL, NULL, NULL, NULL, NULL, NULL); if (!im) return NULL; im->w = w; im->h = h; im->flags.alpha = alpha; if (cache->func.data(im, w, h, image_data, alpha, cspace) != 0) { _evas_cache_image_entry_delete(cache, im); return NULL; } im->references = 1; if (cache->func.debug) cache->func.debug("data", im); return im; } EAPI void evas_cache_image_surface_alloc(Image_Entry *im, unsigned int w, unsigned int h) { Evas_Cache_Image *cache = im->cache; if ((im->space == EVAS_COLORSPACE_YCBCR422P601_PL) || (im->space == EVAS_COLORSPACE_YCBCR422P709_PL) || (im->space == EVAS_COLORSPACE_YCBCR422601_PL)) w &= ~0x1; _evas_cache_image_entry_surface_alloc(cache, im, w, h); if (cache->func.debug) cache->func.debug("surface-alloc", im); } EAPI Image_Entry * evas_cache_image_size_set(Image_Entry *im, unsigned int w, unsigned int h) { Evas_Cache_Image *cache; Image_Entry *im2 = NULL; int error; if ((im->space == EVAS_COLORSPACE_YCBCR422P601_PL) || (im->space == EVAS_COLORSPACE_YCBCR422P709_PL) || (im->space == EVAS_COLORSPACE_YCBCR422601_PL)) w &= ~0x1; if ((im->w == w) && (im->h == h)) return im; cache = im->cache; im2 = _evas_cache_image_entry_new(cache, NULL, NULL, NULL, NULL, NULL, &error); if (!im2) goto on_error; im2->flags.alpha = im->flags.alpha; im2->space = im->space; im2->load_opts = im->load_opts; _evas_cache_image_entry_surface_alloc(cache, im2, w, h); error = cache->func.size_set(im2, im, w, h); if (error != 0) goto on_error; im2->references = 1; evas_cache_image_drop(im); if (cache->func.debug) cache->func.debug("size_set", im2); return im2; on_error: if (im2) _evas_cache_image_entry_delete(cache, im2); evas_cache_image_drop(im); return NULL; } EAPI int evas_cache_image_load_data(Image_Entry *im) { #ifdef BUILD_ASYNC_PRELOAD Eina_Bool preload = EINA_FALSE; #endif int error = EVAS_LOAD_ERROR_NONE; if ((im->flags.loaded) && (!im->flags.animated)) return error; #ifdef BUILD_ASYNC_PRELOAD if (im->preload) { preload = EINA_TRUE; if (!im->flags.pending) { im->cache->preload = eina_list_remove(im->cache->preload, im); im->cache->pending = eina_list_append(im->cache->pending, im); im->flags.pending = 1; evas_preload_thread_cancel(im->preload); } evas_async_events_process(); LKL(wakeup); while (im->preload) { eina_condition_wait(&cond_wakeup); LKU(wakeup); evas_async_events_process(); LKL(wakeup); } LKU(wakeup); } if ((im->flags.loaded) && (!im->flags.animated)) return error; LKL(im->lock); #endif im->flags.in_progress = EINA_TRUE; error = im->cache->func.load(im); im->flags.in_progress = EINA_FALSE; #ifdef BUILD_ASYNC_PRELOAD LKU(im->lock); #endif im->flags.loaded = 1; if (im->cache->func.debug) im->cache->func.debug("load", im); if (error != EVAS_LOAD_ERROR_NONE) { _evas_cache_image_entry_surface_alloc(im->cache, im, im->w, im->h); im->flags.loaded = 0; } #ifdef BUILD_ASYNC_PRELOAD if (preload) _evas_cache_image_async_end(im); #endif return error; } EAPI void evas_cache_image_unload_data(Image_Entry *im) { if (im->flags.in_progress) return; evas_cache_image_preload_cancel(im, NULL); #ifdef BUILD_ASYNC_PRELOAD LKL(im->lock_cancel); if (LKT(im->lock) == EINA_FALSE) /* can't get image lock - busy async load */ { im->unload_cancel = EINA_TRUE; LKU(im->lock_cancel); return; } LKU(im->lock_cancel); #endif if ((!im->flags.loaded) || (!im->file) || (!im->info.module) || (im->flags.dirty)) { #ifdef BUILD_ASYNC_PRELOAD LKU(im->lock); #endif return; } im->cache->func.destructor(im); #ifdef BUILD_ASYNC_PRELOAD LKU(im->lock); #endif //FIXME: imagedataunload - inform owners } static Eina_Bool _evas_cache_image_unload_cb(__UNUSED__ const Eina_Hash *hash, __UNUSED__ const void *key, void *data, __UNUSED__ void *fdata) { evas_cache_image_unload_data(data); return EINA_TRUE; } EAPI void evas_cache_image_unload_all(Evas_Cache_Image *cache) { Image_Entry *im; EINA_INLIST_FOREACH(cache->lru, im) evas_cache_image_unload_data(im); EINA_INLIST_FOREACH(cache->lru_nodata, im) evas_cache_image_unload_data(im); eina_hash_foreach(cache->activ, _evas_cache_image_unload_cb, NULL); eina_hash_foreach(cache->inactiv, _evas_cache_image_unload_cb, NULL); } EAPI Eina_Bool evas_cache_image_is_loaded(Image_Entry *im) { if (im->flags.loaded) return EINA_TRUE; return EINA_FALSE; } EAPI void evas_cache_image_preload_data(Image_Entry *im, const void *target) { #ifdef BUILD_ASYNC_PRELOAD RGBA_Image *img = (RGBA_Image *)im; if ((im->flags.loaded) && (img->image.data)) { evas_object_inform_call_image_preloaded((Evas_Object *)target); return; } im->flags.loaded = 0; if (!_evas_cache_image_entry_preload_add(im, target)) evas_object_inform_call_image_preloaded((Evas_Object *)target); #else evas_cache_image_load_data(im); evas_object_inform_call_image_preloaded((Evas_Object *)target); #endif } EAPI void evas_cache_image_preload_cancel(Image_Entry *im, const void *target) { #ifdef BUILD_ASYNC_PRELOAD if (!target) return; _evas_cache_image_entry_preload_remove(im, target); #else (void)im; (void)target; #endif } #ifdef CACHEDUMP static int total = 0; static void _dump_img(Image_Entry *im, const char *type) { total += im->cache->func.mem_size_get(im); printf("%s: %4i: %4ib, %4ix%4i alloc[%4ix%4i] [%s] [%s]\n", type, im->references, im->cache->func.mem_size_get(im), im->w, im->h, im->allocated.w, im->allocated.h, im->file, im->key); } static Eina_Bool _dump_cache_active(__UNUSED__ const Eina_Hash *hash, __UNUSED__ const void *key, void *data, void *fdata __UNUSED__) { Image_Entry *im = data; _dump_img(im, "ACTIVE"); return EINA_TRUE; } static void _dump_cache(Evas_Cache_Image *cache) { Image_Entry *im; printf("--CACHE DUMP----------------------------------------------------\n"); printf("cache: %ikb / %ikb\n", cache->usage / 1024, cache->limit / 1024); printf("................................................................\n"); total = 0; EINA_INLIST_FOREACH(cache->lru_nodata, im) _dump_img(im, "NODATA"); EINA_INLIST_FOREACH(cache->lru, im) _dump_img(im, "DATA "); printf("tot: %i\n" "usg: %i\n", total, cache->usage); eina_hash_foreach(cache->activ, _dump_cache_active, NULL); } #endif EAPI int evas_cache_image_flush(Evas_Cache_Image *cache) { #ifdef CACHEDUMP _dump_cache(cache); #endif if (cache->limit == (unsigned int)-1) return -1; while ((cache->lru) && (cache->limit < (unsigned int)cache->usage)) { Image_Entry *im; im = (Image_Entry *)cache->lru->last; _evas_cache_image_entry_delete(cache, im); } while ((cache->lru_nodata) && (cache->limit < (unsigned int)cache->usage)) { Image_Entry *im; im = (Image_Entry *) cache->lru_nodata->last; _evas_cache_image_lru_nodata_del(im); cache->func.surface_delete(im); im->flags.loaded = 0; } return cache->usage; } EAPI Image_Entry * evas_cache_image_empty(Evas_Cache_Image *cache) { Image_Entry *im; im = _evas_cache_image_entry_new(cache, NULL, NULL, NULL, NULL, NULL, NULL); if (!im) return NULL; im->references = 1; return im; } EAPI void evas_cache_image_colorspace(Image_Entry *im, int cspace) { if (im->space == cspace) return; im->space = cspace; im->cache->func.color_space(im, cspace); } EAPI void * evas_cache_private_from_image_entry_get(Image_Entry *im) { return (void *)im->cache->data; } EAPI void * evas_cache_private_get(Evas_Cache_Image *cache) { return cache->data; } EAPI void evas_cache_private_set(Evas_Cache_Image *cache, const void *data) { cache->data = (void *)data; } EAPI DATA32 * evas_cache_image_pixels(Image_Entry *im) { return im->cache->func.surface_pixels(im); } EAPI void evas_cache_image_wakeup(void) { #ifdef BUILD_ASYNC_PRELOAD if (_evas_cache_mutex_init > 0) eina_condition_broadcast(&cond_wakeup); #endif } evas-1.7.9/src/lib/cache/Makefile.am0000664000175000017500000000100212175475547014057 00000000000000 MAINTAINERCLEANFILES = Makefile.in AM_CPPFLAGS = -I. -I$(top_srcdir)/src/lib -I$(top_srcdir)/src/lib/include \ -DPACKAGE_BIN_DIR=\"$(bindir)\" \ -DPACKAGE_LIB_DIR=\"$(libdir)\" \ -DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \ @EVIL_CFLAGS@ \ @FREETYPE_CFLAGS@ \ @PIXMAN_CFLAGS@ \ @FRIBIDI_CFLAGS@ \ @EVAS_GENERAL_CFLAGS@ noinst_LTLIBRARIES = libevas_cache.la libevas_cache_la_SOURCES = \ evas_cache_image.c \ evas_cache_engine_image.c \ evas_preload.c \ evas_cache.h libevas_cache_la_LIBAD = @EVIL_LIBS@ evas-1.7.9/src/lib/main.c0000664000175000017500000000703512175475547012064 00000000000000#include "evas_common.h" #include "evas_private.h" static Evas_Version _version = { VMAJ, VMIN, VMIC, VREV }; EAPI Evas_Version *evas_version = &_version; int _evas_alloc_error = 0; static int _evas_debug_init = 0; static enum { _EVAS_DEBUG_DEFAULT, _EVAS_DEBUG_HIDE, _EVAS_DEBUG_SHOW } _evas_debug_show = _EVAS_DEBUG_DEFAULT; static int _evas_debug_abort = 0; EAPI Evas_Alloc_Error evas_alloc_error(void) { return _evas_alloc_error; } /* free cached items only in ram for speed reasons. return 0 if can't free */ int evas_mem_free(int mem_required __UNUSED__) { return 0; } /* start reducing quality of images etc. return 0 if can't free anything */ int evas_mem_degrade(int mem_required __UNUSED__) { return 0; } void * evas_mem_calloc(int size) { void *ptr; ptr = calloc(1, size); if (ptr) return ptr; MERR_BAD(); while ((!ptr) && (evas_mem_free(size))) ptr = calloc(1, size); if (ptr) return ptr; while ((!ptr) && (evas_mem_degrade(size))) ptr = calloc(1, size); if (ptr) return ptr; MERR_FATAL(); return NULL; } static void _evas_debug_init_from_env() { const char *tmp = getenv("EVAS_DEBUG_SHOW"); if (tmp) { int dbgshow = atoi(tmp); _evas_debug_show = (dbgshow) ? _EVAS_DEBUG_SHOW : _EVAS_DEBUG_HIDE; } if (getenv("EVAS_DEBUG_ABORT")) _evas_debug_abort = 1; _evas_debug_init = 1; } void evas_debug_error(void) { if (!_evas_debug_init) { _evas_debug_init_from_env(); } if (_evas_debug_show == _EVAS_DEBUG_SHOW) CRIT("Evas Magic Check Failed!!!"); } void evas_debug_input_null(void) { if (!_evas_debug_init) { _evas_debug_init_from_env(); } if (_evas_debug_show == _EVAS_DEBUG_SHOW) CRIT("Input object pointer is NULL!"); if (_evas_debug_abort) abort(); } void evas_debug_magic_null(void) { if (!_evas_debug_init) { _evas_debug_init_from_env(); } if ((_evas_debug_show == _EVAS_DEBUG_SHOW) || (_evas_debug_show == _EVAS_DEBUG_DEFAULT)) CRIT("Input object is zero'ed out (maybe a freed object or zero-filled RAM)!"); if (_evas_debug_abort) abort(); } void evas_debug_magic_wrong(DATA32 expected, DATA32 supplied) { if (!_evas_debug_init) { _evas_debug_init_from_env(); } if ((_evas_debug_show == _EVAS_DEBUG_SHOW) || (_evas_debug_show == _EVAS_DEBUG_DEFAULT)) CRIT("Input object is wrong type\n" " Expected: %08x - %s\n" " Supplied: %08x - %s", expected, evas_debug_magic_string_get(expected), supplied, evas_debug_magic_string_get(supplied)); if (_evas_debug_abort) abort(); } void evas_debug_generic(const char *str) { if (!_evas_debug_init) { _evas_debug_init_from_env(); } if ((_evas_debug_show == _EVAS_DEBUG_SHOW) || (_evas_debug_show == _EVAS_DEBUG_DEFAULT)) CRIT("%s", str); if (_evas_debug_abort) abort(); } const char * evas_debug_magic_string_get(DATA32 magic) { switch (magic) { case MAGIC_EVAS: return "Evas"; case MAGIC_OBJ: return "Evas_Object"; case MAGIC_OBJ_RECTANGLE: return "Evas_Object (Rectangle)"; case MAGIC_OBJ_LINE: return "Evas_Object (Line)"; case MAGIC_OBJ_POLYGON: return "Evas_Object (Polygon)"; case MAGIC_OBJ_IMAGE: return "Evas_Object (Image)"; case MAGIC_OBJ_TEXT: return "Evas_Object (Text)"; case MAGIC_OBJ_SMART: return "Evas_Object (Smart)"; case MAGIC_EVAS_GL: return "Evas_GL"; case MAGIC_MAP: return "Evas_Map"; default: return ""; }; return ""; } evas-1.7.9/src/lib/Evas.h0000664000175000017500000175072612176500122012033 00000000000000/** @mainpage Evas @version 1.7.5 @date 2000-2013 Please see the @ref authors page for contact details. @link Evas.h Evas API @endlink @link Evas.h Evas API @endlink @section toc Table of Contents @li @ref intro @li @ref work @li @ref compiling @li @ref install @li @ref next_steps @li @ref intro_example @section intro What is Evas? Evas is a clean display canvas API for several target display systems that can draw anti-aliased text, smooth super and sub-sampled scaled images, alpha-blend objects and much more. It abstracts any need to know much about what the characteristics of your display system are or what graphics calls are used to draw them and how. It deals on an object level where all you do is create and manipulate objects in a canvas, set their properties, and the rest is done for you. Evas optimises the rendering pipeline to minimise effort in redrawing changes made to the canvas and so takes this work out of the programmers hand, saving a lot of time and energy. It's small and lean, designed to work on embedded systems all the way to large and powerful multi-cpu workstations. It can be compiled to only have the features you need for your target platform if you so wish, thus keeping it small and lean. It has several display back-ends, letting it display on several display systems, making it portable for cross-device and cross-platform development. @subsection intro_not_evas What Evas is not? Evas is not a widget set or widget toolkit, however it is their base. See Elementary (http://docs.enlightenment.org/auto/elementary/) for a toolkit based on Evas, Edje, Ecore and other Enlightenment technologies. It is not dependent or aware of main loops, input or output systems. Input should be polled from various sources and fed to Evas. Similarly, it will not create windows or report windows updates to your system, rather just drawing the pixels and reporting to the user the areas that were changed. Of course these operations are quite common and thus they are ready to use in Ecore, particularly in Ecore_Evas (http://docs.enlightenment.org/auto/ecore/). @section work How does Evas work? Evas is a canvas display library. This is markedly different from most display and windowing systems as a canvas is structural and is also a state engine, whereas most display and windowing systems are immediate mode display targets. Evas handles the logic between a structural display via its state engine, and controls the target windowing system in order to produce rendered results of the current canvas' state on the display. Immediate mode display systems retain very little, or no state. A program will execute a series of commands, as in the pseudo code: @verbatim draw line from position (0, 0) to position (100, 200); draw rectangle from position (10, 30) to position (50, 500); bitmap_handle = create_bitmap(); scale bitmap_handle to size 100 x 100; draw image bitmap_handle at position (10, 30); @endverbatim The series of commands is executed by the windowing system and the results are displayed on the screen (normally). Once the commands are executed the display system has little or no idea of how to reproduce this image again, and so has to be instructed by the application how to redraw sections of the screen whenever needed. Each successive command will be executed as instructed by the application and either emulated by software or sent to the graphics hardware on the device to be performed. The advantage of such a system is that it is simple, and gives a program tight control over how something looks and is drawn. Given the increasing complexity of displays and demands by users to have better looking interfaces, more and more work is needing to be done at this level by the internals of widget sets, custom display widgets and other programs. This means more and more logic and display rendering code needs to be written time and time again, each time the application needs to figure out how to minimise redraws so that display is fast and interactive, and keep track of redraw logic. The power comes at a high-price, lots of extra code and work. Programmers not very familiar with graphics programming will often make mistakes at this level and produce code that is sub optimal. Those familiar with this kind of programming will simply get bored by writing the same code again and again. For example, if in the above scene, the windowing system requires the application to redraw the area from 0, 0 to 50, 50 (also referred as "expose event"), then the programmer must calculate manually the updates and repaint it again: @verbatim Redraw from position (0, 0) to position (50, 50): // what was in area (0, 0, 50, 50)? // 1. intersection part of line (0, 0) to (100, 200)? draw line from position (0, 0) to position (25, 50); // 2. intersection part of rectangle (10, 30) to (50, 500)? draw rectangle from position (10, 30) to position (50, 50) // 3. intersection part of image at (10, 30), size 100 x 100? bitmap_subimage = subregion from position (0, 0) to position (40, 20) draw image bitmap_subimage at position (10, 30); @endverbatim The clever reader might have noticed that, if all elements in the above scene are opaque, then the system is doing useless paints: part of the line is behind the rectangle, and part of the rectangle is behind the image. These useless paints tend to be very costly, as pixels tend to be 4 bytes in size, thus an overlapping region of 100 x 100 pixels is around 40000 useless writes! The developer could write code to calculate the overlapping areas and avoid painting then, but then it should be mixed with the "expose event" handling mentioned above and quickly one realizes the initially simpler method became really complex. Evas is a structural system in which the programmer creates and manages display objects and their properties, and as a result of this higher level state management, the canvas is able to redraw the set of objects when needed to represent the current state of the canvas. For example, the pseudo code: @verbatim line_handle = create_line(); set line_handle from position (0, 0) to position (100, 200); show line_handle; rectangle_handle = create_rectangle(); move rectangle_handle to position (10, 30); resize rectangle_handle to size 40 x 470; show rectangle_handle; bitmap_handle = create_bitmap(); scale bitmap_handle to size 100 x 100; move bitmap_handle to position (10, 30); show bitmap_handle; render scene; @endverbatim This may look longer, but when the display needs to be refreshed or updated, the programmer only moves, resizes, shows, hides etc. the objects that need to change. The programmer simply thinks at the object logic level, and the canvas software does the rest of the work for them, figuring out what actually changed in the canvas since it was last drawn, how to most efficiently redraw the canvas and its contents to reflect the current state, and then it can go off and do the actual drawing of the canvas. This lets the programmer think in a more natural way when dealing with a display, and saves time and effort of working out how to load and display images, render given the current display system etc. Since Evas also is portable across different display systems, this also gives the programmer the ability to have their code ported and displayed on different display systems with very little work. Evas can be seen as a display system that stands somewhere between a widget set and an immediate mode display system. It retains basic display logic, but does very little high-level logic such as scrollbars, sliders, push buttons etc. @section compiling How to compile using Evas ? Evas is a library your application links to. The procedure for this is very simple. You simply have to compile your application with the appropriate compiler flags that the @c pkg-config script outputs. For example: Compiling C or C++ files into object files: @verbatim gcc -c -o main.o main.c `pkg-config --cflags evas` @endverbatim Linking object files into a binary executable: @verbatim gcc -o my_application main.o `pkg-config --libs evas` @endverbatim You simply have to make sure that @c pkg-config is in your shell's @c PATH (see the manual page for your appropriate shell) and @c evas.pc in @c /usr/lib/pkgconfig or its path in the @c PKG_CONFIG_PATH environment variable. It's that simple to link and use Evas once you have written your code to use it. Since the program is linked to Evas, it is now able to use any advertised API calls to display graphics in a canvas managed by it, as well as use the API calls provided to manage data. You should make sure you add any extra compile and link flags to your compile commands that your application may need as well. The above example is only guaranteed to make Evas add it's own requirements. @section install How is it installed? Simple: @verbatim ./configure make su - ... make install @endverbatim @section next_steps Next Steps After you understood what Evas is and installed it in your system you should proceed understanding the programming interface for all objects, then see the specific for the most used elements. We'd recommend you to take a while to learn Ecore (http://docs.enlightenment.org/auto/ecore/) and Edje (http://docs.enlightenment.org/auto/edje/) as they will likely save you tons of work compared to using just Evas directly. Recommended reading: @li @ref Evas_Object_Group, where you'll get how to basically manipulate generic objects lying on an Evas canvas, handle canvas and object events, etc. @li @ref Evas_Object_Rectangle, to learn about the most basic object type on Evas -- the rectangle. @li @ref Evas_Object_Polygon, to learn how to create polygon elements on the canvas. @li @ref Evas_Line_Group, to learn how to create line elements on the canvas. @li @ref Evas_Object_Image, to learn about image objects, over which Evas can do a plethora of operations. @li @ref Evas_Object_Text, to learn how to create textual elements on the canvas. @li @ref Evas_Object_Textblock, to learn how to create multiline textual elements on the canvas. @li @ref Evas_Smart_Object_Group and @ref Evas_Smart_Group, to define new objects that provide @b custom functions to handle clipping, hiding, moving, resizing, color setting and more. These could be as simple as a group of objects that move together (see @ref Evas_Smart_Object_Clipped) up to implementations of what ends to be a widget, providing some intelligence (thus the name) to Evas objects -- like a button or check box, for example. @section intro_example Introductory Example @include evas-buffer-simple.c */ /** @page authors Authors @author Carsten Haitzler @author Till Adam @author Steve Ireland @author Brett Nash @author Tilman Sauerbeck @author Corey Donohoe @author Yuri Hudobin @author Nathan Ingersoll @author Willem Monsuwe @author Jose O Gonzalez @author Bernhard Nemec @author Jorge Luis Zapata Muga @author Cedric Bail @author Gustavo Sverzut Barbieri @author Vincent Torri @author Tim Horton @author Tom Hacohen @author Mathieu Taillefumier @author Iván Briano @author Gustavo Lima Chaves @author Samsung Electronics @author Samsung SAIT @author Sung W. Park @author Jiyoun Park @author Myoungwoon Roy Kim(roy_kim) @author Thierry el Borgi @author Shilpa Singh @author ChunEon Park @author Christopher 'devilhorns' Michael @author Seungsoo Woo @author Youness Alaoui @author Jim Kukunas @author Nicolas Aguirre @author Rafal Krypa @author Hyoyoung Chang @author Jérôme Pinot @author Rafael Antognolli Please contact to get in contact with the developers and maintainers. */ #ifndef _EVAS_H #define _EVAS_H #include #include #ifdef EAPI # undef EAPI #endif #ifdef _WIN32 # ifdef EFL_EVAS_BUILD # ifdef DLL_EXPORT # define EAPI __declspec(dllexport) # else # define EAPI # endif /* ! DLL_EXPORT */ # else # define EAPI __declspec(dllimport) # endif /* ! EFL_EVAS_BUILD */ #else # ifdef __GNUC__ # if __GNUC__ >= 4 # define EAPI __attribute__ ((visibility("default"))) # else # define EAPI # endif # else # define EAPI # endif #endif /* ! _WIN32 */ #ifdef __cplusplus extern "C" { #endif #define EVAS_VERSION_MAJOR 1 #define EVAS_VERSION_MINOR 7 typedef struct _Evas_Version { int major; int minor; int micro; int revision; } Evas_Version; EAPI extern Evas_Version * evas_version; /** * @file * @brief These routines are used for Evas library interaction. * * @todo check boolean return values and convert to Eina_Bool * @todo change all api to use EINA_SAFETY_* * @todo finish api documentation */ /* BiDi exposed stuff */ /*FIXME: document */ typedef enum _Evas_BiDi_Direction { EVAS_BIDI_DIRECTION_NATURAL, EVAS_BIDI_DIRECTION_NEUTRAL = EVAS_BIDI_DIRECTION_NATURAL, EVAS_BIDI_DIRECTION_LTR, EVAS_BIDI_DIRECTION_RTL } Evas_BiDi_Direction; /** * Identifier of callbacks to be set for Evas canvases or Evas * objects. * * The following figure illustrates some Evas callbacks: * * @image html evas-callbacks.png * @image rtf evas-callbacks.png * @image latex evas-callbacks.eps * * @see evas_object_event_callback_add() * @see evas_event_callback_add() */ typedef enum _Evas_Callback_Type { /* * The following events are only for use with Evas objects, with * evas_object_event_callback_add(): */ EVAS_CALLBACK_MOUSE_IN, /**< Mouse In Event */ EVAS_CALLBACK_MOUSE_OUT, /**< Mouse Out Event */ EVAS_CALLBACK_MOUSE_DOWN, /**< Mouse Button Down Event */ EVAS_CALLBACK_MOUSE_UP, /**< Mouse Button Up Event */ EVAS_CALLBACK_MOUSE_MOVE, /**< Mouse Move Event */ EVAS_CALLBACK_MOUSE_WHEEL, /**< Mouse Wheel Event */ EVAS_CALLBACK_MULTI_DOWN, /**< Multi-touch Down Event */ EVAS_CALLBACK_MULTI_UP, /**< Multi-touch Up Event */ EVAS_CALLBACK_MULTI_MOVE, /**< Multi-touch Move Event */ EVAS_CALLBACK_FREE, /**< Object Being Freed (Called after Del) */ EVAS_CALLBACK_KEY_DOWN, /**< Key Press Event */ EVAS_CALLBACK_KEY_UP, /**< Key Release Event */ EVAS_CALLBACK_FOCUS_IN, /**< Focus In Event */ EVAS_CALLBACK_FOCUS_OUT, /**< Focus Out Event */ EVAS_CALLBACK_SHOW, /**< Show Event */ EVAS_CALLBACK_HIDE, /**< Hide Event */ EVAS_CALLBACK_MOVE, /**< Move Event */ EVAS_CALLBACK_RESIZE, /**< Resize Event */ EVAS_CALLBACK_RESTACK, /**< Restack Event */ EVAS_CALLBACK_DEL, /**< Object Being Deleted (called before Free) */ EVAS_CALLBACK_HOLD, /**< Events go on/off hold */ EVAS_CALLBACK_CHANGED_SIZE_HINTS, /**< Size hints changed event */ EVAS_CALLBACK_IMAGE_PRELOADED, /**< Image has been preloaded */ /* * The following events are only for use with Evas canvases, with * evas_event_callback_add(): */ EVAS_CALLBACK_CANVAS_FOCUS_IN, /**< Canvas got focus as a whole */ EVAS_CALLBACK_CANVAS_FOCUS_OUT, /**< Canvas lost focus as a whole */ EVAS_CALLBACK_RENDER_FLUSH_PRE, /**< Called just before rendering is updated on the canvas target */ EVAS_CALLBACK_RENDER_FLUSH_POST, /**< Called just after rendering is updated on the canvas target */ EVAS_CALLBACK_CANVAS_OBJECT_FOCUS_IN, /**< Canvas object got focus */ EVAS_CALLBACK_CANVAS_OBJECT_FOCUS_OUT, /**< Canvas object lost focus */ /* * More Evas object event types - see evas_object_event_callback_add(): */ EVAS_CALLBACK_IMAGE_UNLOADED, /**< Image data has been unloaded (by some mechanism in Evas that throw out original image data) */ EVAS_CALLBACK_RENDER_PRE, /**< Called just before rendering starts on the canvas target @since 1.2 */ EVAS_CALLBACK_RENDER_POST, /**< Called just after rendering stops on the canvas target @since 1.2 */ EVAS_CALLBACK_LAST /**< kept as last element/sentinel -- not really an event */ } Evas_Callback_Type; /**< The types of events triggering a callback */ /** * @def EVAS_CALLBACK_PRIORITY_BEFORE * Slightly more prioritized than default. * @since 1.1 */ #define EVAS_CALLBACK_PRIORITY_BEFORE -100 /** * @def EVAS_CALLBACK_PRIORITY_DEFAULT * Default callback priority level * @since 1.1 */ #define EVAS_CALLBACK_PRIORITY_DEFAULT 0 /** * @def EVAS_CALLBACK_PRIORITY_AFTER * Slightly less prioritized than default. * @since 1.1 */ #define EVAS_CALLBACK_PRIORITY_AFTER 100 /** * @typedef Evas_Callback_Priority * * Callback priority value. Range is -32k - 32k. The lower the number, the * bigger the priority. * * @see EVAS_CALLBACK_PRIORITY_AFTER * @see EVAS_CALLBACK_PRIORITY_BEFORE * @see EVAS_CALLBACK_PRIORITY_DEFAULT * * @since 1.1 */ typedef short Evas_Callback_Priority; /** * Flags for Mouse Button events */ typedef enum _Evas_Button_Flags { EVAS_BUTTON_NONE = 0, /**< No extra mouse button data */ EVAS_BUTTON_DOUBLE_CLICK = (1 << 0), /**< This mouse button press was the 2nd press of a double click */ EVAS_BUTTON_TRIPLE_CLICK = (1 << 1) /**< This mouse button press was the 3rd press of a triple click */ } Evas_Button_Flags; /**< Flags for Mouse Button events */ /** * Flags for Events */ typedef enum _Evas_Event_Flags { EVAS_EVENT_FLAG_NONE = 0, /**< No fancy flags set */ EVAS_EVENT_FLAG_ON_HOLD = (1 << 0), /**< This event is being delivered but should be put "on hold" until the on hold flag is unset. the event should be used for informational purposes and maybe some indications visually, but not actually perform anything */ EVAS_EVENT_FLAG_ON_SCROLL = (1 << 1) /**< This event flag indicates the event occurs while scrolling; for example, DOWN event occurs during scrolling; the event should be used for informational purposes and maybe some indications visually, but not actually perform anything */ } Evas_Event_Flags; /**< Flags for Events */ /** * State of Evas_Coord_Touch_Point */ typedef enum _Evas_Touch_Point_State { EVAS_TOUCH_POINT_DOWN, /**< Touch point is pressed down */ EVAS_TOUCH_POINT_UP, /**< Touch point is released */ EVAS_TOUCH_POINT_MOVE, /**< Touch point is moved */ EVAS_TOUCH_POINT_STILL, /**< Touch point is not moved after pressed */ EVAS_TOUCH_POINT_CANCEL /**< Touch point is cancelled */ } Evas_Touch_Point_State; /** * Flags for Font Hinting * @ingroup Evas_Font_Group */ typedef enum _Evas_Font_Hinting_Flags { EVAS_FONT_HINTING_NONE, /**< No font hinting */ EVAS_FONT_HINTING_AUTO, /**< Automatic font hinting */ EVAS_FONT_HINTING_BYTECODE /**< Bytecode font hinting */ } Evas_Font_Hinting_Flags; /**< Flags for Font Hinting */ /** * Colorspaces for pixel data supported by Evas * @ingroup Evas_Object_Image */ typedef enum _Evas_Colorspace { EVAS_COLORSPACE_ARGB8888, /**< ARGB 32 bits per pixel, high-byte is Alpha, accessed 1 32bit word at a time */ /* these are not currently supported - but planned for the future */ EVAS_COLORSPACE_YCBCR422P601_PL, /**< YCbCr 4:2:2 Planar, ITU.BT-601 specifications. The data pointed to is just an array of row pointer, pointing to the Y rows, then the Cb, then Cr rows */ EVAS_COLORSPACE_YCBCR422P709_PL, /**< YCbCr 4:2:2 Planar, ITU.BT-709 specifications. The data pointed to is just an array of row pointer, pointing to the Y rows, then the Cb, then Cr rows */ EVAS_COLORSPACE_RGB565_A5P, /**< 16bit rgb565 + Alpha plane at end - 5 bits of the 8 being used per alpha byte */ EVAS_COLORSPACE_GRY8, /**< 8bit grayscale */ EVAS_COLORSPACE_YCBCR422601_PL, /**< YCbCr 4:2:2, ITU.BT-601 specifications. The data pointed to is just an array of row pointer, pointing to line of Y,Cb,Y,Cr bytes */ EVAS_COLORSPACE_YCBCR420NV12601_PL, /**< YCbCr 4:2:0, ITU.BT-601 specification. The data pointed to is just an array of row pointer, pointing to the Y rows, then the Cb,Cr rows. */ EVAS_COLORSPACE_YCBCR420TM12601_PL, /**< YCbCr 4:2:0, ITU.BT-601 specification. The data pointed to is just an array of tiled row pointer, pointing to the Y rows, then the Cb,Cr rows. */ } Evas_Colorspace; /**< Colorspaces for pixel data supported by Evas */ /** * How to pack items into cells in a table. * @ingroup Evas_Object_Table * * @see evas_object_table_homogeneous_set() for an explanation of the function of * each one. */ typedef enum _Evas_Object_Table_Homogeneous_Mode { EVAS_OBJECT_TABLE_HOMOGENEOUS_NONE = 0, EVAS_OBJECT_TABLE_HOMOGENEOUS_TABLE = 1, EVAS_OBJECT_TABLE_HOMOGENEOUS_ITEM = 2 } Evas_Object_Table_Homogeneous_Mode; /**< Table cell pack mode. */ typedef struct _Evas_Coord_Rectangle Evas_Coord_Rectangle; /**< A generic rectangle handle */ typedef struct _Evas_Point Evas_Point; /**< integer point */ typedef struct _Evas_Coord_Point Evas_Coord_Point; /**< Evas_Coord point */ typedef struct _Evas_Coord_Precision_Point Evas_Coord_Precision_Point; /**< Evas_Coord point with sub-pixel precision */ typedef struct _Evas_Position Evas_Position; /**< associates given point in Canvas and Output */ typedef struct _Evas_Precision_Position Evas_Precision_Position; /**< associates given point in Canvas and Output, with sub-pixel precision */ /** * @typedef Evas_Smart_Class * * A smart object's @b base class definition * * @ingroup Evas_Smart_Group */ typedef struct _Evas_Smart_Class Evas_Smart_Class; /** * @typedef Evas_Smart_Interface * * A smart object's @b base interface definition * * An Evas interface is exactly like the OO-concept: an 'contract' or * API a given object is declared to support. A smart object may have * more than one interface, thus extending the behavior it gets from * sub-classing. * * @since 1.7 * * @ingroup Evas_Smart_Group */ typedef struct _Evas_Smart_Interface Evas_Smart_Interface; /** * @typedef Evas_Smart_Cb_Description * * A smart object callback description, used to provide introspection * * @ingroup Evas_Smart_Group */ typedef struct _Evas_Smart_Cb_Description Evas_Smart_Cb_Description; /** * @typedef Evas_Map * * An opaque handle to map points * * @see evas_map_new() * @see evas_map_free() * @see evas_map_dup() * * @ingroup Evas_Object_Group_Map */ typedef struct _Evas_Map Evas_Map; /** * @typedef Evas * * An opaque handle to an Evas canvas. * * @see evas_new() * @see evas_free() * * @ingroup Evas_Canvas */ typedef struct _Evas Evas; /** * @typedef Evas_Object * An Evas Object handle. * @ingroup Evas_Object_Group */ typedef struct _Evas_Object Evas_Object; typedef void Evas_Performance; /**< An Evas Performance handle */ typedef struct _Evas_Modifier Evas_Modifier; /**< An opaque type containing information on which modifier keys are registered in an Evas canvas */ typedef struct _Evas_Lock Evas_Lock; /**< An opaque type containing information on which lock keys are registered in an Evas canvas */ typedef struct _Evas_Smart Evas_Smart; /**< An Evas Smart Object handle */ typedef struct _Evas_Native_Surface Evas_Native_Surface; /**< A generic datatype for engine specific native surface information */ /** * @typedef Evas_Video_Surface * * A generic datatype for video specific surface information * @see evas_object_image_video_surface_set * @see evas_object_image_video_surface_get * @since 1.1 */ typedef struct _Evas_Video_Surface Evas_Video_Surface; typedef unsigned long long Evas_Modifier_Mask; /**< An Evas modifier mask type */ typedef int Evas_Coord; typedef int Evas_Font_Size; typedef int Evas_Angle; struct _Evas_Coord_Rectangle /**< A rectangle in Evas_Coord */ { Evas_Coord x; /**< top-left x co-ordinate of rectangle */ Evas_Coord y; /**< top-left y co-ordinate of rectangle */ Evas_Coord w; /**< width of rectangle */ Evas_Coord h; /**< height of rectangle */ }; struct _Evas_Point { int x, y; }; struct _Evas_Coord_Point { Evas_Coord x, y; }; struct _Evas_Coord_Precision_Point { Evas_Coord x, y; double xsub, ysub; }; struct _Evas_Position { Evas_Point output; Evas_Coord_Point canvas; }; struct _Evas_Precision_Position { Evas_Point output; Evas_Coord_Precision_Point canvas; }; typedef enum _Evas_Aspect_Control { EVAS_ASPECT_CONTROL_NONE = 0, /**< Preference on scaling unset */ EVAS_ASPECT_CONTROL_NEITHER = 1, /**< Same effect as unset preference on scaling */ EVAS_ASPECT_CONTROL_HORIZONTAL = 2, /**< Use all horizontal container space to place an object, using the given aspect */ EVAS_ASPECT_CONTROL_VERTICAL = 3, /**< Use all vertical container space to place an object, using the given aspect */ EVAS_ASPECT_CONTROL_BOTH = 4 /**< Use all horizontal @b and vertical container spaces to place an object (never growing it out of those bounds), using the given aspect */ } Evas_Aspect_Control; /**< Aspect types/policies for scaling size hints, used for evas_object_size_hint_aspect_set() */ typedef struct _Evas_Pixel_Import_Source Evas_Pixel_Import_Source; /**< A source description of pixels for importing pixels */ typedef struct _Evas_Engine_Info Evas_Engine_Info; /**< A generic Evas Engine information structure */ typedef struct _Evas_Device Evas_Device; /**< A source device handle - where the event came from */ typedef struct _Evas_Event_Mouse_Down Evas_Event_Mouse_Down; /**< Event structure for #EVAS_CALLBACK_MOUSE_DOWN event callbacks */ typedef struct _Evas_Event_Mouse_Up Evas_Event_Mouse_Up; /**< Event structure for #EVAS_CALLBACK_MOUSE_UP event callbacks */ typedef struct _Evas_Event_Mouse_In Evas_Event_Mouse_In; /**< Event structure for #EVAS_CALLBACK_MOUSE_IN event callbacks */ typedef struct _Evas_Event_Mouse_Out Evas_Event_Mouse_Out; /**< Event structure for #EVAS_CALLBACK_MOUSE_OUT event callbacks */ typedef struct _Evas_Event_Mouse_Move Evas_Event_Mouse_Move; /**< Event structure for #EVAS_CALLBACK_MOUSE_MOVE event callbacks */ typedef struct _Evas_Event_Mouse_Wheel Evas_Event_Mouse_Wheel; /**< Event structure for #EVAS_CALLBACK_MOUSE_WHEEL event callbacks */ typedef struct _Evas_Event_Multi_Down Evas_Event_Multi_Down; /**< Event structure for #EVAS_CALLBACK_MULTI_DOWN event callbacks */ typedef struct _Evas_Event_Multi_Up Evas_Event_Multi_Up; /**< Event structure for #EVAS_CALLBACK_MULTI_UP event callbacks */ typedef struct _Evas_Event_Multi_Move Evas_Event_Multi_Move; /**< Event structure for #EVAS_CALLBACK_MULTI_MOVE event callbacks */ typedef struct _Evas_Event_Key_Down Evas_Event_Key_Down; /**< Event structure for #EVAS_CALLBACK_KEY_DOWN event callbacks */ typedef struct _Evas_Event_Key_Up Evas_Event_Key_Up; /**< Event structure for #EVAS_CALLBACK_KEY_UP event callbacks */ typedef struct _Evas_Event_Hold Evas_Event_Hold; /**< Event structure for #EVAS_CALLBACK_HOLD event callbacks */ typedef enum _Evas_Load_Error { EVAS_LOAD_ERROR_NONE = 0, /**< No error on load */ EVAS_LOAD_ERROR_GENERIC = 1, /**< A non-specific error occurred */ EVAS_LOAD_ERROR_DOES_NOT_EXIST = 2, /**< File (or file path) does not exist */ EVAS_LOAD_ERROR_PERMISSION_DENIED = 3, /**< Permission denied to an existing file (or path) */ EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED = 4, /**< Allocation of resources failure prevented load */ EVAS_LOAD_ERROR_CORRUPT_FILE = 5, /**< File corrupt (but was detected as a known format) */ EVAS_LOAD_ERROR_UNKNOWN_FORMAT = 6 /**< File is not a known format */ } Evas_Load_Error; /**< Evas image load error codes one can get - see evas_load_error_str() too. */ typedef enum _Evas_Alloc_Error { EVAS_ALLOC_ERROR_NONE = 0, /**< No allocation error */ EVAS_ALLOC_ERROR_FATAL = 1, /**< Allocation failed despite attempts to free up memory */ EVAS_ALLOC_ERROR_RECOVERED = 2 /**< Allocation succeeded, but extra memory had to be found by freeing up speculative resources */ } Evas_Alloc_Error; /**< Possible allocation errors returned by evas_alloc_error() */ typedef enum _Evas_Fill_Spread { EVAS_TEXTURE_REFLECT = 0, /**< image fill tiling mode - tiling reflects */ EVAS_TEXTURE_REPEAT = 1, /**< tiling repeats */ EVAS_TEXTURE_RESTRICT = 2, /**< tiling clamps - range offset ignored */ EVAS_TEXTURE_RESTRICT_REFLECT = 3, /**< tiling clamps and any range offset reflects */ EVAS_TEXTURE_RESTRICT_REPEAT = 4, /**< tiling clamps and any range offset repeats */ EVAS_TEXTURE_PAD = 5 /**< tiling extends with end values */ } Evas_Fill_Spread; /**< Fill types used for evas_object_image_fill_spread_set() */ typedef enum _Evas_Pixel_Import_Pixel_Format { EVAS_PIXEL_FORMAT_NONE = 0, /**< No pixel format */ EVAS_PIXEL_FORMAT_ARGB32 = 1, /**< ARGB 32bit pixel format with A in the high byte per 32bit pixel word */ EVAS_PIXEL_FORMAT_YUV420P_601 = 2 /**< YUV 420 Planar format with CCIR 601 color encoding with contiguous planes in the order Y, U and V */ } Evas_Pixel_Import_Pixel_Format; /**< Pixel format for import call. See evas_object_image_pixels_import() */ struct _Evas_Pixel_Import_Source { Evas_Pixel_Import_Pixel_Format format; /**< pixel format type ie ARGB32, YUV420P_601 etc. */ int w, h; /**< width and height of source in pixels */ void **rows; /**< an array of pointers (size depends on format) pointing to left edge of each scanline */ }; /* magic version number to know what the native surf struct looks like */ #define EVAS_NATIVE_SURFACE_VERSION 2 typedef enum _Evas_Native_Surface_Type { EVAS_NATIVE_SURFACE_NONE, EVAS_NATIVE_SURFACE_X11, EVAS_NATIVE_SURFACE_OPENGL } Evas_Native_Surface_Type; struct _Evas_Native_Surface { int version; Evas_Native_Surface_Type type; union { struct { void *visual; /**< visual of the pixmap to use (Visual) */ unsigned long pixmap; /**< pixmap id to use (Pixmap) */ } x11; struct { unsigned int texture_id; /**< opengl texture id to use from glGenTextures() */ unsigned int framebuffer_id; /**< 0 if not a FBO, FBO id otherwise from glGenFramebuffers() */ unsigned int internal_format; /**< same as 'internalFormat' for glTexImage2D() */ unsigned int format; /**< same as 'format' for glTexImage2D() */ unsigned int x, y, w, h; /**< region inside the texture to use (image size is assumed as texture size, with 0, 0 being the top-left and co-ordinates working down to the right and bottom being positive) */ } opengl; } data; }; /** * @def EVAS_VIDEO_SURFACE_VERSION * Magic version number to know what the video surf struct looks like * @since 1.1 */ #define EVAS_VIDEO_SURFACE_VERSION 1 typedef void (*Evas_Video_Cb)(void *data, Evas_Object *obj, const Evas_Video_Surface *surface); typedef void (*Evas_Video_Coord_Cb)(void *data, Evas_Object *obj, const Evas_Video_Surface *surface, Evas_Coord a, Evas_Coord b); struct _Evas_Video_Surface { int version; Evas_Video_Coord_Cb move; /**< Move the video surface to this position */ Evas_Video_Coord_Cb resize; /**< Resize the video surface to that size */ Evas_Video_Cb show; /**< Show the video overlay surface */ Evas_Video_Cb hide; /**< Hide the video overlay surface */ Evas_Video_Cb update_pixels; /**< Please update the Evas_Object_Image pixels when called */ Evas_Object *parent; void *data; }; #define EVAS_LAYER_MIN -32768 /**< bottom-most layer number */ #define EVAS_LAYER_MAX 32767 /**< top-most layer number */ #define EVAS_COLOR_SPACE_ARGB 0 /**< Not used for anything */ #define EVAS_COLOR_SPACE_AHSV 1 /**< Not used for anything */ #define EVAS_TEXT_INVALID -1 /**< Not used for anything */ #define EVAS_TEXT_SPECIAL -2 /**< Not used for anything */ #define EVAS_HINT_EXPAND 1.0 /**< Use with evas_object_size_hint_weight_set(), evas_object_size_hint_weight_get(), evas_object_size_hint_expand_set(), evas_object_size_hint_expand_get() */ #define EVAS_HINT_FILL -1.0 /**< Use with evas_object_size_hint_align_set(), evas_object_size_hint_align_get(), evas_object_size_hint_fill_set(), evas_object_size_hint_fill_get() */ #define evas_object_size_hint_fill_set evas_object_size_hint_align_set /**< Convenience macro to make it easier to understand that align is also used for fill properties (as fill is mutually exclusive to align) */ #define evas_object_size_hint_fill_get evas_object_size_hint_align_get /**< Convenience macro to make it easier to understand that align is also used for fill properties (as fill is mutually exclusive to align) */ #define evas_object_size_hint_expand_set evas_object_size_hint_weight_set /**< Convenience macro to make it easier to understand that weight is also used for expand properties */ #define evas_object_size_hint_expand_get evas_object_size_hint_weight_get /**< Convenience macro to make it easier to understand that weight is also used for expand properties */ /** * How the object should be rendered to output. * @ingroup Evas_Object_Group_Extras */ typedef enum _Evas_Render_Op { EVAS_RENDER_BLEND = 0, /**< default op: d = d*(1-sa) + s */ EVAS_RENDER_BLEND_REL = 1, /**< d = d*(1 - sa) + s*da */ EVAS_RENDER_COPY = 2, /**< d = s */ EVAS_RENDER_COPY_REL = 3, /**< d = s*da */ EVAS_RENDER_ADD = 4, /* d = d + s */ EVAS_RENDER_ADD_REL = 5, /**< d = d + s*da */ EVAS_RENDER_SUB = 6, /**< d = d - s */ EVAS_RENDER_SUB_REL = 7, /* d = d - s*da */ EVAS_RENDER_TINT = 8, /**< d = d*s + d*(1 - sa) + s*(1 - da) */ EVAS_RENDER_TINT_REL = 9, /**< d = d*(1 - sa + s) */ EVAS_RENDER_MASK = 10, /**< d = d*sa */ EVAS_RENDER_MUL = 11 /**< d = d*s */ } Evas_Render_Op; /**< How the object should be rendered to output. */ typedef enum _Evas_Border_Fill_Mode { EVAS_BORDER_FILL_NONE = 0, /**< Image's center region is @b not to be rendered */ EVAS_BORDER_FILL_DEFAULT = 1, /**< Image's center region is to be @b blended with objects underneath it, if it has transparency. This is the default behavior for image objects */ EVAS_BORDER_FILL_SOLID = 2 /**< Image's center region is to be made solid, even if it has transparency on it */ } Evas_Border_Fill_Mode; /**< How an image's center region (the complement to the border region) should be rendered by Evas */ typedef enum _Evas_Image_Scale_Hint { EVAS_IMAGE_SCALE_HINT_NONE = 0, /**< No scale hint at all */ EVAS_IMAGE_SCALE_HINT_DYNAMIC = 1, /**< Image is being re-scaled over time, thus turning scaling cache @b off for its data */ EVAS_IMAGE_SCALE_HINT_STATIC = 2 /**< Image is not being re-scaled over time, thus turning scaling cache @b on for its data */ } Evas_Image_Scale_Hint; /**< How an image's data is to be treated by Evas, with regard to scaling cache */ typedef enum _Evas_Image_Animated_Loop_Hint { EVAS_IMAGE_ANIMATED_HINT_NONE = 0, EVAS_IMAGE_ANIMATED_HINT_LOOP = 1, /**< Image's animation mode is loop like 1->2->3->1->2->3 */ EVAS_IMAGE_ANIMATED_HINT_PINGPONG = 2 /**< Image's animation mode is pingpong like 1->2->3->2->1-> ... */ } Evas_Image_Animated_Loop_Hint; typedef enum _Evas_Engine_Render_Mode { EVAS_RENDER_MODE_BLOCKING = 0, EVAS_RENDER_MODE_NONBLOCKING = 1, } Evas_Engine_Render_Mode; typedef enum _Evas_Image_Content_Hint { EVAS_IMAGE_CONTENT_HINT_NONE = 0, /**< No hint at all */ EVAS_IMAGE_CONTENT_HINT_DYNAMIC = 1, /**< The contents will change over time */ EVAS_IMAGE_CONTENT_HINT_STATIC = 2 /**< The contents won't change over time */ } Evas_Image_Content_Hint; /**< How an image's data is to be treated by Evas, for optimization */ struct _Evas_Engine_Info /** Generic engine information. Generic info is useless */ { int magic; /**< Magic number */ }; struct _Evas_Event_Mouse_Down /** Mouse button press event */ { int button; /**< Mouse button number that went down (1 - 32) */ Evas_Point output; /**< The X/Y location of the cursor */ Evas_Coord_Point canvas; /**< The X/Y location of the cursor */ void *data; Evas_Modifier *modifiers; /**< modifier keys pressed during the event */ Evas_Lock *locks; Evas_Button_Flags flags; /**< button flags set during the event */ unsigned int timestamp; Evas_Event_Flags event_flags; Evas_Device *dev; }; struct _Evas_Event_Mouse_Up /** Mouse button release event */ { int button; /**< Mouse button number that was raised (1 - 32) */ Evas_Point output; /**< The X/Y location of the cursor */ Evas_Coord_Point canvas; /**< The X/Y location of the cursor */ void *data; Evas_Modifier *modifiers; /**< modifier keys pressed during the event */ Evas_Lock *locks; Evas_Button_Flags flags; /**< button flags set during the event */ unsigned int timestamp; Evas_Event_Flags event_flags; Evas_Device *dev; }; struct _Evas_Event_Mouse_In /** Mouse enter event */ { int buttons; /**< Button pressed mask, Bits set to 1 are buttons currently pressed (bit 0 = mouse button 1, bit 1 = mouse button 2 etc.) */ Evas_Point output; /**< The X/Y location of the cursor */ Evas_Coord_Point canvas; /**< The X/Y location of the cursor */ void *data; Evas_Modifier *modifiers; /**< modifier keys pressed during the event */ Evas_Lock *locks; unsigned int timestamp; Evas_Event_Flags event_flags; Evas_Device *dev; }; struct _Evas_Event_Mouse_Out /** Mouse leave event */ { int buttons; /**< Button pressed mask, Bits set to 1 are buttons currently pressed (bit 0 = mouse button 1, bit 1 = mouse button 2 etc.) */ Evas_Point output; /**< The X/Y location of the cursor */ Evas_Coord_Point canvas; /**< The X/Y location of the cursor */ void *data; Evas_Modifier *modifiers; /**< modifier keys pressed during the event */ Evas_Lock *locks; unsigned int timestamp; Evas_Event_Flags event_flags; Evas_Device *dev; }; struct _Evas_Event_Mouse_Move /** Mouse button down event */ { int buttons; /**< Button pressed mask, Bits set to 1 are buttons currently pressed (bit 0 = mouse button 1, bit 1 = mouse button 2 etc.) */ Evas_Position cur, prev; void *data; Evas_Modifier *modifiers; /**< modifier keys pressed during the event */ Evas_Lock *locks; unsigned int timestamp; Evas_Event_Flags event_flags; Evas_Device *dev; }; struct _Evas_Event_Mouse_Wheel /** Wheel event */ { int direction; /* 0 = default up/down wheel FIXME: more wheel types */ int z; /* ...,-2,-1 = down, 1,2,... = up */ Evas_Point output; /**< The X/Y location of the cursor */ Evas_Coord_Point canvas; /**< The X/Y location of the cursor */ void *data; Evas_Modifier *modifiers; /**< modifier keys pressed during the event */ Evas_Lock *locks; unsigned int timestamp; Evas_Event_Flags event_flags; Evas_Device *dev; }; struct _Evas_Event_Multi_Down /** Multi button press event */ { int device; /**< Multi device number that went down (1 or more for extra touches) */ double radius, radius_x, radius_y; double pressure, angle; Evas_Point output; Evas_Coord_Precision_Point canvas; void *data; Evas_Modifier *modifiers; /**< modifier keys pressed during the event */ Evas_Lock *locks; Evas_Button_Flags flags; /**< button flags set during the event */ unsigned int timestamp; Evas_Event_Flags event_flags; Evas_Device *dev; }; struct _Evas_Event_Multi_Up /** Multi button release event */ { int device; /**< Multi device number that went up (1 or more for extra touches) */ double radius, radius_x, radius_y; double pressure, angle; Evas_Point output; Evas_Coord_Precision_Point canvas; void *data; Evas_Modifier *modifiers; /**< modifier keys pressed during the event */ Evas_Lock *locks; Evas_Button_Flags flags; /**< button flags set during the event */ unsigned int timestamp; Evas_Event_Flags event_flags; Evas_Device *dev; }; struct _Evas_Event_Multi_Move /** Multi button down event */ { int device; /**< Multi device number that moved (1 or more for extra touches) */ double radius, radius_x, radius_y; double pressure, angle; Evas_Precision_Position cur; void *data; Evas_Modifier *modifiers; /**< modifier keys pressed during the event */ Evas_Lock *locks; unsigned int timestamp; Evas_Event_Flags event_flags; Evas_Device *dev; }; struct _Evas_Event_Key_Down /** Key press event */ { char *keyname; /**< the name string of the key pressed */ void *data; Evas_Modifier *modifiers; /**< modifier keys pressed during the event */ Evas_Lock *locks; const char *key; /**< The logical key : (eg shift+1 == exclamation) */ const char *string; /**< A UTF8 string if this keystroke has produced a visible string to be ADDED */ const char *compose; /**< A UTF8 string if this keystroke has modified a string in the middle of being composed - this string replaces the previous one */ unsigned int timestamp; Evas_Event_Flags event_flags; Evas_Device *dev; }; struct _Evas_Event_Key_Up /** Key release event */ { char *keyname; /**< the name string of the key released */ void *data; Evas_Modifier *modifiers; /**< modifier keys pressed during the event */ Evas_Lock *locks; const char *key; /**< The logical key : (eg shift+1 == exclamation) */ const char *string; /**< A UTF8 string if this keystroke has produced a visible string to be ADDED */ const char *compose; /**< A UTF8 string if this keystroke has modified a string in the middle of being composed - this string replaces the previous one */ unsigned int timestamp; Evas_Event_Flags event_flags; Evas_Device *dev; }; struct _Evas_Event_Hold /** Hold change event */ { int hold; /**< The hold flag */ void *data; unsigned int timestamp; Evas_Event_Flags event_flags; Evas_Device *dev; }; /** * How the mouse pointer should be handled by Evas. * * In the mode #EVAS_OBJECT_POINTER_MODE_AUTOGRAB, when a mouse button * is pressed down over an object and held, with the mouse pointer * being moved outside of it, the pointer still behaves as being bound * to that object, albeit out of its drawing region. When the button * is released, the event will be fed to the object, that may check if * the final position is over it or not and do something about it. * * In the mode #EVAS_OBJECT_POINTER_MODE_NOGRAB, the pointer will * always be bound to the object right below it. * * @ingroup Evas_Object_Group_Extras */ typedef enum _Evas_Object_Pointer_Mode { EVAS_OBJECT_POINTER_MODE_AUTOGRAB, /**< default, X11-like */ EVAS_OBJECT_POINTER_MODE_NOGRAB, /**< pointer always bound to the object right below it */ EVAS_OBJECT_POINTER_MODE_NOGRAB_NO_REPEAT_UPDOWN /**< useful on object with "repeat events" enabled, where mouse/touch up and down events WONT be repeated to objects and these objects wont be auto-grabbed. @since 1.2 */ } Evas_Object_Pointer_Mode; /**< How the mouse pointer should be handled by Evas. */ typedef void (*Evas_Smart_Cb)(void *data, Evas_Object *obj, void *event_info); /**< Evas smart objects' "smart callback" function signature */ typedef void (*Evas_Event_Cb)(void *data, Evas *e, void *event_info); /**< Evas event callback function signature */ typedef Eina_Bool (*Evas_Object_Event_Post_Cb)(void *data, Evas *e); typedef void (*Evas_Object_Event_Cb)(void *data, Evas *e, Evas_Object *obj, void *event_info); /**< Evas object event callback function signature */ typedef void (*Evas_Async_Events_Put_Cb)(void *target, Evas_Callback_Type type, void *event_info); /** * @defgroup Evas_Group Top Level Functions * * Functions that affect Evas as a whole. */ /** * Initialize Evas * * @return The init counter value. * * This function initializes Evas and increments a counter of the * number of calls to it. It returns the new counter's value. * * @see evas_shutdown(). * * Most EFL users wouldn't be using this function directly, because * they wouldn't access Evas directly by themselves. Instead, they * would be using higher level helpers, like @c ecore_evas_init(). * See http://docs.enlightenment.org/auto/ecore/. * * You should be using this if your use is something like the * following. The buffer engine is just one of the many ones Evas * provides. * * @dontinclude evas-buffer-simple.c * @skip int main * @until return -1; * And being the canvas creation something like: * @skip static Evas *create_canvas * @until evas_output_viewport_set(canvas, * * Note that this is code creating an Evas canvas with no usage of * Ecore helpers at all -- no linkage with Ecore on this scenario, * thus. Again, this wouldn't be on Evas common usage for most * developers. See the full @ref Example_Evas_Buffer_Simple "example". * * @ingroup Evas_Group */ EAPI int evas_init(void); /** * Shutdown Evas * * @return Evas' init counter value. * * This function finalizes Evas, decrementing the counter of the * number of calls to the function evas_init(). This new value for the * counter is returned. * * @see evas_init(). * * If you were the sole user of Evas, by means of evas_init(), you can * check if it's being properly shut down by expecting a return value * of 0. * * Example code follows. * @dontinclude evas-buffer-simple.c * @skip // NOTE: use ecore_evas_buffer_new * @until evas_shutdown * Where that function would contain: * @skip evas_free(canvas) * @until evas_free(canvas) * * Most users would be using ecore_evas_shutdown() instead, like told * in evas_init(). See the full @ref Example_Evas_Buffer_Simple * "example". * * @ingroup Evas_Group */ EAPI int evas_shutdown(void); /** * Return if any allocation errors have occurred during the prior function * @return The allocation error flag * * This function will return if any memory allocation errors occurred during, * and what kind they were. The return value will be one of * EVAS_ALLOC_ERROR_NONE, EVAS_ALLOC_ERROR_FATAL or EVAS_ALLOC_ERROR_RECOVERED * with each meaning something different. * * EVAS_ALLOC_ERROR_NONE means that no errors occurred at all and the function * worked as expected. * * EVAS_ALLOC_ERROR_FATAL means the function was completely unable to perform * its job and will have exited as cleanly as possible. The programmer * should consider this as a sign of very low memory and should try and safely * recover from the prior functions failure (or try free up memory elsewhere * and try again after more memory is freed). * * EVAS_ALLOC_ERROR_RECOVERED means that an allocation error occurred, but was * recovered from by evas finding memory of its own it has allocated and * freeing what it sees as not really usefully allocated memory. What is freed * may vary. Evas may reduce the resolution of images, free cached images or * fonts, trhow out pre-rendered data, reduce the complexity of change lists * etc. Evas and the program will function as per normal after this, but this * is a sign of low memory, and it is suggested that the program try and * identify memory it doesn't need, and free it. * * Example: * @code * extern Evas_Object *object; * void callback (void *data, Evas *e, Evas_Object *obj, void *event_info); * * evas_object_event_callback_add(object, EVAS_CALLBACK_MOUSE_DOWN, callback, NULL); * if (evas_alloc_error() == EVAS_ALLOC_ERROR_FATAL) * { * fprintf(stderr, "ERROR: Completely unable to attach callback. Must\n"); * fprintf(stderr, " destroy object now as it cannot be used.\n"); * evas_object_del(object); * object = NULL; * fprintf(stderr, "WARNING: Memory is really low. Cleaning out RAM.\n"); * my_memory_cleanup(); * } * if (evas_alloc_error() == EVAS_ALLOC_ERROR_RECOVERED) * { * fprintf(stderr, "WARNING: Memory is really low. Cleaning out RAM.\n"); * my_memory_cleanup(); * } * @endcode * * @ingroup Evas_Group */ EAPI Evas_Alloc_Error evas_alloc_error(void); /** * @brief Get evas' internal asynchronous events read file descriptor. * * @return The canvas' asynchronous events read file descriptor. * * Evas' asynchronous events are meant to be dealt with internally, * i. e., when building stuff to be glued together into the EFL * infrastructure -- a module, for example. The context which demands * its use is when calculations need to be done out of the main * thread, asynchronously, and some action must be performed after * that. * * An example of actual use of this API is for image asynchronous * preload inside evas. If the canvas was instantiated through * ecore-evas usage, ecore itself will take care of calling those * events' processing. * * This function returns the read file descriptor where to get the * asynchronous events of the canvas. Naturally, other mainloops, * apart from ecore, may make use of it. * * @ingroup Evas_Group */ EAPI int evas_async_events_fd_get(void) EINA_WARN_UNUSED_RESULT; /** * @brief Trigger the processing of all events waiting on the file * descriptor returned by evas_async_events_fd_get(). * * @return The number of events processed. * * All asynchronous events queued up by evas_async_events_put() are * processed here. More precisely, the callback functions, informed * together with other event parameters, when queued, get called (with * those parameters), in that order. * * @ingroup Evas_Group */ EAPI int evas_async_events_process(void); /** * Insert asynchronous events on the canvas. * * @param target The target to be affected by the events. * @param type The type of callback function. * @param event_info Information about the event. * @param func The callback function pointer. * * This is the way, for a routine running outside evas' main thread, * to report an asynchronous event. A callback function is informed, * whose call is to happen after evas_async_events_process() is * called. * * @ingroup Evas_Group */ EAPI Eina_Bool evas_async_events_put(const void *target, Evas_Callback_Type type, void *event_info, Evas_Async_Events_Put_Cb func) EINA_ARG_NONNULL(1, 4); /** * @defgroup Evas_Canvas Canvas Functions * * Low level Evas canvas functions. Sub groups will present more high * level ones, though. * * Most of these functions deal with low level Evas actions, like: * @li create/destroy raw canvases, not bound to any displaying engine * @li tell a canvas i got focused (in a windowing context, for example) * @li tell a canvas a region should not be calculated anymore in rendering * @li tell a canvas to render its contents, immediately * * Most users will be using Evas by means of the @c Ecore_Evas * wrapper, which deals with all the above mentioned issues * automatically for them. Thus, you'll be looking at this section * only if you're building low level stuff. * * The groups within present you functions that deal with the canvas * directly, too, and not yet with its @b objects. They are the * functions you need to use at a minimum to get a working canvas. * * Some of the functions in this group are exemplified @ref * Example_Evas_Events "here". */ /** * Creates a new empty evas. * * Note that before you can use the evas, you will to at a minimum: * @li Set its render method with @ref evas_output_method_set . * @li Set its viewport size with @ref evas_output_viewport_set . * @li Set its size of the canvas with @ref evas_output_size_set . * @li Ensure that the render engine is given the correct settings * with @ref evas_engine_info_set . * * This function should only fail if the memory allocation fails * * @note this function is very low level. Instead of using it * directly, consider using the high level functions in * Ecore_Evas such as @c ecore_evas_new(). See * http://docs.enlightenment.org/auto/ecore/. * * @attention it is recommended that one calls evas_init() before * creating new canvas. * * @return A new uninitialised Evas canvas on success. Otherwise, @c NULL. * @ingroup Evas_Canvas */ EAPI Evas *evas_new(void) EINA_WARN_UNUSED_RESULT EINA_MALLOC; /** * Frees the given evas and any objects created on it. * * Any objects with 'free' callbacks will have those callbacks called * in this function. * * @param e The given evas. * * @ingroup Evas_Canvas */ EAPI void evas_free(Evas *e) EINA_ARG_NONNULL(1); /** * Inform to the evas that it got the focus. * * @param e The evas to change information. * @ingroup Evas_Canvas */ EAPI void evas_focus_in(Evas *e); /** * Inform to the evas that it lost the focus. * * @param e The evas to change information. * @ingroup Evas_Canvas */ EAPI void evas_focus_out(Evas *e); /** * Get the focus state known by the given evas * * @param e The evas to query information. * @ingroup Evas_Canvas */ EAPI Eina_Bool evas_focus_state_get(const Evas *e); /** * Push the nochange flag up 1 * * This tells evas, that while the nochange flag is greater than 0, do not * mark objects as "changed" when making changes. * * @param e The evas to change information. * @ingroup Evas_Canvas */ EAPI void evas_nochange_push(Evas *e); /** * Pop the nochange flag down 1 * * This tells evas, that while the nochange flag is greater than 0, do not * mark objects as "changed" when making changes. * * @param e The evas to change information. * @ingroup Evas_Canvas */ EAPI void evas_nochange_pop(Evas *e); /** * Attaches a specific pointer to the evas for fetching later * * @param e The canvas to attach the pointer to * @param data The pointer to attach * @ingroup Evas_Canvas */ EAPI void evas_data_attach_set(Evas *e, void *data) EINA_ARG_NONNULL(1); /** * Returns the pointer attached by evas_data_attach_set() * * @param e The canvas to attach the pointer to * @return The pointer attached * @ingroup Evas_Canvas */ EAPI void *evas_data_attach_get(const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Add a damage rectangle. * * @param e The given canvas pointer. * @param x The rectangle's left position. * @param y The rectangle's top position. * @param w The rectangle's width. * @param h The rectangle's height. * * This is the function by which one tells evas that a part of the * canvas has to be repainted. * * @note All newly created Evas rectangles get the default color values of 255 255 255 255 (opaque white). * * @ingroup Evas_Canvas */ EAPI void evas_damage_rectangle_add(Evas *e, int x, int y, int w, int h) EINA_ARG_NONNULL(1); /** * Add an "obscured region" to an Evas canvas. * * @param e The given canvas pointer. * @param x The rectangle's top left corner's horizontal coordinate. * @param y The rectangle's top left corner's vertical coordinate * @param w The rectangle's width. * @param h The rectangle's height. * * This is the function by which one tells an Evas canvas that a part * of it must not be repainted. The region must be * rectangular and its coordinates inside the canvas viewport are * passed in the call. After this call, the region specified won't * participate in any form in Evas' calculations and actions during * its rendering updates, having its displaying content frozen as it * was just after this function took place. * * We call it "obscured region" because the most common use case for * this rendering (partial) freeze is something else (most probably * other canvas) being on top of the specified rectangular region, * thus shading it completely from the user's final scene in a * display. To avoid unnecessary processing, one should indicate to the * obscured canvas not to bother about the non-important area. * * The majority of users won't have to worry about this function, as * they'll be using just one canvas in their applications, with * nothing inset or on top of it in any form. * * To make this region one that @b has to be repainted again, call the * function evas_obscured_clear(). * * @note This is a very low level function, which most of * Evas' users wouldn't care about. * * @note This function does @b not flag the canvas as having its state * changed. If you want to re-render it afterwards expecting new * contents, you have to add "damage" regions yourself (see * evas_damage_rectangle_add()). * * @see evas_obscured_clear() * @see evas_render_updates() * * Example code follows. * @dontinclude evas-events.c * @skip add an obscured * @until evas_obscured_clear(evas); * * In that example, pressing the "Ctrl" and "o" keys will impose or * remove an obscured region in the middle of the canvas. You'll get * the same contents at the time the key was pressed, if toggling it * on, until you toggle it off again (make sure the animation is * running on to get the idea better). See the full @ref * Example_Evas_Events "example". * * @ingroup Evas_Canvas */ EAPI void evas_obscured_rectangle_add(Evas *e, int x, int y, int w, int h) EINA_ARG_NONNULL(1); /** * Remove all "obscured regions" from an Evas canvas. * * @param e The given canvas pointer. * * This function removes all the rectangles from the obscured regions * list of the canvas @p e. It takes obscured areas added with * evas_obscured_rectangle_add() and make them again a regions that @b * have to be repainted on rendering updates. * * @note This is a very low level function, which most of * Evas' users wouldn't care about. * * @note This function does @b not flag the canvas as having its state * changed. If you want to re-render it afterwards expecting new * contents, you have to add "damage" regions yourself (see * evas_damage_rectangle_add()). * * @see evas_obscured_rectangle_add() for an example * @see evas_render_updates() * * @ingroup Evas_Canvas */ EAPI void evas_obscured_clear(Evas *e) EINA_ARG_NONNULL(1); /** * Force immediate renderization of the given Evas canvas. * * @param e The given canvas pointer. * @return A newly allocated list of updated rectangles of the canvas * (@c Eina_Rectangle structs). Free this list with * evas_render_updates_free(). * * This function forces an immediate renderization update of the given * canvas @p e. * * @note This is a very low level function, which most of * Evas' users wouldn't care about. One would use it, for example, to * grab an Evas' canvas update regions and paint them back, using the * canvas' pixmap, on a displaying system working below Evas. * * @note Evas is a stateful canvas. If no operations changing its * state took place since the last rendering action, you won't see no * changes and this call will be a no-op. * * Example code follows. * @dontinclude evas-events.c * @skip add an obscured * @until d.obscured = !d.obscured; * * See the full @ref Example_Evas_Events "example". * * @ingroup Evas_Canvas */ EAPI Eina_List *evas_render_updates(Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Free the rectangles returned by evas_render_updates(). * * @param updates The list of updated rectangles of the canvas. * * This function removes the region from the render updates list. It * makes the region doesn't be render updated anymore. * * @see evas_render_updates() for an example * * @ingroup Evas_Canvas */ EAPI void evas_render_updates_free(Eina_List *updates); /** * Force renderization of the given canvas. * * @param e The given canvas pointer. * * @ingroup Evas_Canvas */ EAPI void evas_render(Evas *e) EINA_ARG_NONNULL(1); /** * Update the canvas internal objects but not triggering immediate * renderization. * * @param e The given canvas pointer. * * This function updates the canvas internal objects not triggering * renderization. To force renderization function evas_render() should * be used. * * @see evas_render. * * @ingroup Evas_Canvas */ EAPI void evas_norender(Evas *e) EINA_ARG_NONNULL(1); /** * Make the canvas discard internally cached data used for rendering. * * @param e The given canvas pointer. * * This function flushes the arrays of delete, active and render objects. * Other things it may also discard are: shared memory segments, * temporary scratch buffers, cached data to avoid re-compute of that data etc. * * @ingroup Evas_Canvas */ EAPI void evas_render_idle_flush(Evas *e) EINA_ARG_NONNULL(1); /** * Make the canvas discard as much data as possible used by the engine at * runtime. * * @param e The given canvas pointer. * * This function will unload images, delete textures and much more, where * possible. You may also want to call evas_render_idle_flush() immediately * prior to this to perhaps discard a little more, though evas_render_dump() * should implicitly delete most of what evas_render_idle_flush() might * discard too. * * @ingroup Evas_Canvas */ EAPI void evas_render_dump(Evas *e) EINA_ARG_NONNULL(1); /** * @defgroup Evas_Output_Method Render Engine Functions * * Functions that are used to set the render engine for a given * function, and then get that engine working. * * The following code snippet shows how they can be used to * initialise an evas that uses the X11 software engine: * @code * Evas *evas; * Evas_Engine_Info_Software_X11 *einfo; * extern Display *display; * extern Window win; * * evas_init(); * * evas = evas_new(); * evas_output_method_set(evas, evas_render_method_lookup("software_x11")); * evas_output_size_set(evas, 640, 480); * evas_output_viewport_set(evas, 0, 0, 640, 480); * einfo = (Evas_Engine_Info_Software_X11 *)evas_engine_info_get(evas); * einfo->info.display = display; * einfo->info.visual = DefaultVisual(display, DefaultScreen(display)); * einfo->info.colormap = DefaultColormap(display, DefaultScreen(display)); * einfo->info.drawable = win; * einfo->info.depth = DefaultDepth(display, DefaultScreen(display)); * evas_engine_info_set(evas, (Evas_Engine_Info *)einfo); * @endcode * * @ingroup Evas_Canvas */ /** * Look up a numeric ID from a string name of a rendering engine. * * @param name the name string of an engine * @return A numeric (opaque) ID for the rendering engine * @ingroup Evas_Output_Method * * This function looks up a numeric return value for the named engine * in the string @p name. This is a normal C string, NUL byte * terminated. The name is case sensitive. If the rendering engine is * available, a numeric ID for that engine is returned that is not * 0. If the engine is not available, 0 is returned, indicating an * invalid engine. * * The programmer should NEVER rely on the numeric ID of an engine * unless it is returned by this function. Programs should NOT be * written accessing render method ID's directly, without first * obtaining it from this function. * * @attention it is mandatory that one calls evas_init() before * looking up the render method. * * Example: * @code * int engine_id; * Evas *evas; * * evas_init(); * * evas = evas_new(); * if (!evas) * { * fprintf(stderr, "ERROR: Canvas creation failed. Fatal error.\n"); * exit(-1); * } * engine_id = evas_render_method_lookup("software_x11"); * if (!engine_id) * { * fprintf(stderr, "ERROR: Requested rendering engine is absent.\n"); * exit(-1); * } * evas_output_method_set(evas, engine_id); * @endcode */ EAPI int evas_render_method_lookup(const char *name) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * List all the rendering engines compiled into the copy of the Evas library * * @return A linked list whose data members are C strings of engine names * @ingroup Evas_Output_Method * * Calling this will return a handle (pointer) to an Evas linked * list. Each node in the linked list will have the data pointer be a * (char *) pointer to the name string of the rendering engine * available. The strings should never be modified, neither should the * list be modified. This list should be cleaned up as soon as the * program no longer needs it using evas_render_method_list_free(). If * no engines are available from Evas, @c NULL will be returned. * * Example: * @code * Eina_List *engine_list, *l; * char *engine_name; * * engine_list = evas_render_method_list(); * if (!engine_list) * { * fprintf(stderr, "ERROR: Evas supports no engines! Exit.\n"); * exit(-1); * } * printf("Available Evas Engines:\n"); * EINA_LIST_FOREACH(engine_list, l, engine_name) * printf("%s\n", engine_name); * evas_render_method_list_free(engine_list); * @endcode */ EAPI Eina_List *evas_render_method_list(void) EINA_WARN_UNUSED_RESULT; /** * This function should be called to free a list of engine names * * @param list The Eina_List base pointer for the engine list to be freed * @ingroup Evas_Output_Method * * When this function is called it will free the engine list passed in * as @p list. The list should only be a list of engines generated by * calling evas_render_method_list(). If @p list is NULL, nothing will * happen. * * Example: * @code * Eina_List *engine_list, *l; * char *engine_name; * * engine_list = evas_render_method_list(); * if (!engine_list) * { * fprintf(stderr, "ERROR: Evas supports no engines! Exit.\n"); * exit(-1); * } * printf("Available Evas Engines:\n"); * EINA_LIST_FOREACH(engine_list, l, engine_name) * printf("%s\n", engine_name); * evas_render_method_list_free(engine_list); * @endcode */ EAPI void evas_render_method_list_free(Eina_List *list); /** * Sets the output engine for the given evas. * * Once the output engine for an evas is set, any attempt to change it * will be ignored. The value for @p render_method can be found using * @ref evas_render_method_lookup . * * @param e The given evas. * @param render_method The numeric engine value to use. * * @attention it is mandatory that one calls evas_init() before * setting the output method. * * @ingroup Evas_Output_Method */ EAPI void evas_output_method_set(Evas *e, int render_method) EINA_ARG_NONNULL(1); /** * Retrieves the number of the output engine used for the given evas. * @param e The given evas. * @return The ID number of the output engine being used. @c 0 is * returned if there is an error. * @ingroup Evas_Output_Method */ EAPI int evas_output_method_get(const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Retrieves the current render engine info struct from the given evas. * * The returned structure is publicly modifiable. The contents are * valid until either @ref evas_engine_info_set or @ref evas_render * are called. * * This structure does not need to be freed by the caller. * * @param e The given evas. * @return A pointer to the Engine Info structure. @c NULL is returned if * an engine has not yet been assigned. * @ingroup Evas_Output_Method */ EAPI Evas_Engine_Info *evas_engine_info_get(const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Applies the engine settings for the given evas from the given @c * Evas_Engine_Info structure. * * To get the Evas_Engine_Info structure to use, call @ref * evas_engine_info_get . Do not try to obtain a pointer to an * @c Evas_Engine_Info structure in any other way. * * You will need to call this function at least once before you can * create objects on an evas or render that evas. Some engines allow * their settings to be changed more than once. * * Once called, the @p info pointer should be considered invalid. * * @param e The pointer to the Evas Canvas * @param info The pointer to the Engine Info to use * @return @c EINA_TRUE if no error occurred, @c EINA_FALSE otherwise. * @ingroup Evas_Output_Method */ EAPI Eina_Bool evas_engine_info_set(Evas *e, Evas_Engine_Info *info) EINA_ARG_NONNULL(1); /** * @defgroup Evas_Output_Size Output and Viewport Resizing Functions * * Functions that set and retrieve the output and viewport size of an * evas. * * @ingroup Evas_Canvas */ /** * Sets the output size of the render engine of the given evas. * * The evas will render to a rectangle of the given size once this * function is called. The output size is independent of the viewport * size. The viewport will be stretched to fill the given rectangle. * * The units used for @p w and @p h depend on the engine used by the * evas. * * @param e The given evas. * @param w The width in output units, usually pixels. * @param h The height in output units, usually pixels. * @ingroup Evas_Output_Size */ EAPI void evas_output_size_set(Evas *e, int w, int h) EINA_ARG_NONNULL(1); /** * Retrieve the output size of the render engine of the given evas. * * The output size is given in whatever the output units are for the * engine. * * If either @p w or @p h is @c NULL, then it is ignored. If @p e is * invalid, the returned results are undefined. * * @param e The given evas. * @param w The pointer to an integer to store the width in. * @param h The pointer to an integer to store the height in. * @ingroup Evas_Output_Size */ EAPI void evas_output_size_get(const Evas *e, int *w, int *h) EINA_ARG_NONNULL(1); /** * Sets the output viewport of the given evas in evas units. * * The output viewport is the area of the evas that will be visible to * the viewer. The viewport will be stretched to fit the output * target of the evas when rendering is performed. * * @note The coordinate values do not have to map 1-to-1 with the output * target. However, it is generally advised that it is done for ease * of use. * * @param e The given evas. * @param x The top-left corner x value of the viewport. * @param y The top-left corner y value of the viewport. * @param w The width of the viewport. Must be greater than 0. * @param h The height of the viewport. Must be greater than 0. * @ingroup Evas_Output_Size */ EAPI void evas_output_viewport_set(Evas *e, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h) EINA_ARG_NONNULL(1); /** * Get the render engine's output viewport co-ordinates in canvas units. * @param e The pointer to the Evas Canvas * @param x The pointer to a x variable to be filled in * @param y The pointer to a y variable to be filled in * @param w The pointer to a width variable to be filled in * @param h The pointer to a height variable to be filled in * @ingroup Evas_Output_Size * * Calling this function writes the current canvas output viewport * size and location values into the variables pointed to by @p x, @p * y, @p w and @p h. On success the variables have the output * location and size values written to them in canvas units. Any of @p * x, @p y, @p w or @p h that are @c NULL will not be written to. If @p e * is invalid, the results are undefined. * * Example: * @code * extern Evas *evas; * Evas_Coord x, y, width, height; * * evas_output_viewport_get(evas, &x, &y, &w, &h); * @endcode */ EAPI void evas_output_viewport_get(const Evas *e, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h) EINA_ARG_NONNULL(1); /** * Sets the output framespace size of the render engine of the given evas. * * The framespace size is used in the Wayland engines to denote space where * the output is not drawn. This is mainly used in ecore_evas to draw borders * * The units used for @p w and @p h depend on the engine used by the * evas. * * @param e The given evas. * @param x The left coordinate in output units, usually pixels. * @param y The top coordinate in output units, usually pixels. * @param w The width in output units, usually pixels. * @param h The height in output units, usually pixels. * @ingroup Evas_Output_Size * @since 1.1 */ EAPI void evas_output_framespace_set(Evas *e, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h); /** * Get the render engine's output framespace co-ordinates in canvas units. * * @param e The pointer to the Evas Canvas * @param x The pointer to a x variable to be filled in * @param y The pointer to a y variable to be filled in * @param w The pointer to a width variable to be filled in * @param h The pointer to a height variable to be filled in * @ingroup Evas_Output_Size * @since 1.1 */ EAPI void evas_output_framespace_get(const Evas *e, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h); /** * @defgroup Evas_Coord_Mapping_Group Coordinate Mapping Functions * * Functions that are used to map coordinates from the canvas to the * screen or the screen to the canvas. * * @ingroup Evas_Canvas */ /** * Convert/scale an ouput screen co-ordinate into canvas co-ordinates * * @param e The pointer to the Evas Canvas * @param x The screen/output x co-ordinate * @return The screen co-ordinate translated to canvas unit co-ordinates * @ingroup Evas_Coord_Mapping_Group * * This function takes in a horizontal co-ordinate as the @p x * parameter and converts it into canvas units, accounting for output * size, viewport size and location, returning it as the function * return value. If @p e is invalid, the results are undefined. * * Example: * @code * extern Evas *evas; * extern int screen_x; * Evas_Coord canvas_x; * * canvas_x = evas_coord_screen_x_to_world(evas, screen_x); * @endcode */ EAPI Evas_Coord evas_coord_screen_x_to_world(const Evas *e, int x) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Convert/scale an ouput screen co-ordinate into canvas co-ordinates * * @param e The pointer to the Evas Canvas * @param y The screen/output y co-ordinate * @return The screen co-ordinate translated to canvas unit co-ordinates * @ingroup Evas_Coord_Mapping_Group * * This function takes in a vertical co-ordinate as the @p y parameter * and converts it into canvas units, accounting for output size, * viewport size and location, returning it as the function return * value. If @p e is invalid, the results are undefined. * * Example: * @code * extern Evas *evas; * extern int screen_y; * Evas_Coord canvas_y; * * canvas_y = evas_coord_screen_y_to_world(evas, screen_y); * @endcode */ EAPI Evas_Coord evas_coord_screen_y_to_world(const Evas *e, int y) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Convert/scale a canvas co-ordinate into output screen co-ordinates * * @param e The pointer to the Evas Canvas * @param x The canvas x co-ordinate * @return The output/screen co-ordinate translated to output co-ordinates * @ingroup Evas_Coord_Mapping_Group * * This function takes in a horizontal co-ordinate as the @p x * parameter and converts it into output units, accounting for output * size, viewport size and location, returning it as the function * return value. If @p e is invalid, the results are undefined. * * Example: * @code * extern Evas *evas; * int screen_x; * extern Evas_Coord canvas_x; * * screen_x = evas_coord_world_x_to_screen(evas, canvas_x); * @endcode */ EAPI int evas_coord_world_x_to_screen(const Evas *e, Evas_Coord x) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Convert/scale a canvas co-ordinate into output screen co-ordinates * * @param e The pointer to the Evas Canvas * @param y The canvas y co-ordinate * @return The output/screen co-ordinate translated to output co-ordinates * @ingroup Evas_Coord_Mapping_Group * * This function takes in a vertical co-ordinate as the @p x parameter * and converts it into output units, accounting for output size, * viewport size and location, returning it as the function return * value. If @p e is invalid, the results are undefined. * * Example: * @code * extern Evas *evas; * int screen_y; * extern Evas_Coord canvas_y; * * screen_y = evas_coord_world_y_to_screen(evas, canvas_y); * @endcode */ EAPI int evas_coord_world_y_to_screen(const Evas *e, Evas_Coord y) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * @defgroup Evas_Pointer_Group Pointer (Mouse) Functions * * Functions that deal with the status of the pointer (mouse cursor). * * @ingroup Evas_Canvas */ /** * This function returns the current known pointer co-ordinates * * @param e The pointer to the Evas Canvas * @param x The pointer to an integer to be filled in * @param y The pointer to an integer to be filled in * @ingroup Evas_Pointer_Group * * This function returns the current known screen/output co-ordinates * of the mouse pointer and sets the contents of the integers pointed * to by @p x and @p y to contain these co-ordinates. If @p e is not a * valid canvas the results of this function are undefined. * * Example: * @code * extern Evas *evas; * int mouse_x, mouse_y; * * evas_pointer_output_xy_get(evas, &mouse_x, &mouse_y); * printf("Mouse is at screen position %i, %i\n", mouse_x, mouse_y); * @endcode */ EAPI void evas_pointer_output_xy_get(const Evas *e, int *x, int *y) EINA_ARG_NONNULL(1); /** * This function returns the current known pointer co-ordinates * * @param e The pointer to the Evas Canvas * @param x The pointer to a Evas_Coord to be filled in * @param y The pointer to a Evas_Coord to be filled in * @ingroup Evas_Pointer_Group * * This function returns the current known canvas unit co-ordinates of * the mouse pointer and sets the contents of the Evas_Coords pointed * to by @p x and @p y to contain these co-ordinates. If @p e is not a * valid canvas the results of this function are undefined. * * Example: * @code * extern Evas *evas; * Evas_Coord mouse_x, mouse_y; * * evas_pointer_output_xy_get(evas, &mouse_x, &mouse_y); * printf("Mouse is at canvas position %d, %d\n", mouse_x, mouse_y); * @endcode */ EAPI void evas_pointer_canvas_xy_get(const Evas *e, Evas_Coord *x, Evas_Coord *y) EINA_ARG_NONNULL(1); /** * Returns a bitmask with the mouse buttons currently pressed, set to 1 * * @param e The pointer to the Evas Canvas * @return A bitmask of the currently depressed buttons on the canvas * @ingroup Evas_Pointer_Group * * Calling this function will return a 32-bit integer with the * appropriate bits set to 1 that correspond to a mouse button being * depressed. This limits Evas to a mouse devices with a maximum of 32 * buttons, but that is generally in excess of any host system's * pointing device abilities. * * A canvas by default begins with no mouse buttons being pressed and * only calls to evas_event_feed_mouse_down(), * evas_event_feed_mouse_down_data(), evas_event_feed_mouse_up() and * evas_event_feed_mouse_up_data() will alter that. * * The least significant bit corresponds to the first mouse button * (button 1) and the most significant bit corresponds to the last * mouse button (button 32). * * If @p e is not a valid canvas, the return value is undefined. * * Example: * @code * extern Evas *evas; * int button_mask, i; * * button_mask = evas_pointer_button_down_mask_get(evas); * printf("Buttons currently pressed:\n"); * for (i = 0; i < 32; i++) * { * if ((button_mask & (1 << i)) != 0) printf("Button %i\n", i + 1); * } * @endcode */ EAPI int evas_pointer_button_down_mask_get(const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Returns whether the mouse pointer is logically inside the canvas * * @param e The pointer to the Evas Canvas * @return An integer that is 1 if the mouse is inside the canvas, 0 otherwise * @ingroup Evas_Pointer_Group * * When this function is called it will return a value of either 0 or * 1, depending on if evas_event_feed_mouse_in(), * evas_event_feed_mouse_in_data(), or evas_event_feed_mouse_out(), * evas_event_feed_mouse_out_data() have been called to feed in a * mouse enter event into the canvas. * * A return value of 1 indicates the mouse is logically inside the * canvas, and 0 implies it is logically outside the canvas. * * A canvas begins with the mouse being assumed outside (0). * * If @p e is not a valid canvas, the return value is undefined. * * Example: * @code * extern Evas *evas; * * if (evas_pointer_inside_get(evas)) printf("Mouse is in!\n"); * else printf("Mouse is out!\n"); * @endcode */ EAPI Eina_Bool evas_pointer_inside_get(const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); EAPI void evas_sync(Evas *e) EINA_ARG_NONNULL(1); /** * @defgroup Evas_Canvas_Events Canvas Events * * Functions relating to canvas events, which are mainly reports on * its internal states changing (an object got focused, the rendering * is updated, etc). * * Some of the functions in this group are exemplified @ref * Example_Evas_Events "here". * * @ingroup Evas_Canvas */ /** * @addtogroup Evas_Canvas_Events * @{ */ /** * Add (register) a callback function to a given canvas event. * * @param e Canvas to attach a callback to * @param type The type of event that will trigger the callback * @param func The (callback) function to be called when the event is * triggered * @param data The data pointer to be passed to @p func * * This function adds a function callback to the canvas @p e when the * event of type @p type occurs on it. The function pointer is @p * func. * * In the event of a memory allocation error during the addition of * the callback to the canvas, evas_alloc_error() should be used to * determine the nature of the error, if any, and the program should * sensibly try and recover. * * A callback function must have the ::Evas_Event_Cb prototype * definition. The first parameter (@p data) in this definition will * have the same value passed to evas_event_callback_add() as the @p * data parameter, at runtime. The second parameter @p e is the canvas * pointer on which the event occurred. The third parameter @p * event_info is a pointer to a data structure that may or may not be * passed to the callback, depending on the event type that triggered * the callback. This is so because some events don't carry extra * context with them, but others do. * * The event type @p type to trigger the function may be one of * #EVAS_CALLBACK_RENDER_FLUSH_PRE, #EVAS_CALLBACK_RENDER_FLUSH_POST, * #EVAS_CALLBACK_CANVAS_FOCUS_IN, #EVAS_CALLBACK_CANVAS_FOCUS_OUT, * #EVAS_CALLBACK_CANVAS_OBJECT_FOCUS_IN and * #EVAS_CALLBACK_CANVAS_OBJECT_FOCUS_OUT. This determines the kind of * event that will trigger the callback to be called. Only the last * two of the event types listed here provide useful event information * data -- a pointer to the recently focused Evas object. For the * others the @p event_info pointer is going to be @c NULL. * * Example: * @dontinclude evas-events.c * @skip evas_event_callback_add(d.canvas, EVAS_CALLBACK_RENDER_FLUSH_PRE * @until two canvas event callbacks * * Looking to the callbacks registered above, * @dontinclude evas-events.c * @skip called when our rectangle gets focus * @until let's have our events back * * we see that the canvas flushes its rendering pipeline * (#EVAS_CALLBACK_RENDER_FLUSH_PRE) whenever the @c _resize_cb * routine takes place: it has to redraw that image at a different * size. Also, the callback on an object being focused comes just * after we focus it explicitly, on code. * * See the full @ref Example_Evas_Events "example". * * @note Be careful not to add the same callback multiple times, if * that's not what you want, because Evas won't check if a callback * existed before exactly as the one being registered (and thus, call * it more than once on the event, in this case). This would make * sense if you passed different functions and/or callback data, only. */ EAPI void evas_event_callback_add(Evas *e, Evas_Callback_Type type, Evas_Event_Cb func, const void *data) EINA_ARG_NONNULL(1, 3); /** * Add (register) a callback function to a given canvas event with a * non-default priority set. Except for the priority field, it's exactly the * same as @ref evas_event_callback_add * * @param e Canvas to attach a callback to * @param type The type of event that will trigger the callback * @param priority The priority of the callback, lower values called first. * @param func The (callback) function to be called when the event is * triggered * @param data The data pointer to be passed to @p func * * @see evas_event_callback_add * @since 1.1 */ EAPI void evas_event_callback_priority_add(Evas *e, Evas_Callback_Type type, Evas_Callback_Priority priority, Evas_Event_Cb func, const void *data) EINA_ARG_NONNULL(1, 4); /** * Delete a callback function from the canvas. * * @param e Canvas to remove a callback from * @param type The type of event that was triggering the callback * @param func The function that was to be called when the event was triggered * @return The data pointer that was to be passed to the callback * * This function removes the most recently added callback from the * canvas @p e which was triggered by the event type @p type and was * calling the function @p func when triggered. If the removal is * successful it will also return the data pointer that was passed to * evas_event_callback_add() when the callback was added to the * canvas. If not successful @c NULL will be returned. * * Example: * @code * extern Evas *e; * void *my_data; * void focus_in_callback(void *data, Evas *e, void *event_info); * * my_data = evas_event_callback_del(ebject, EVAS_CALLBACK_CANVAS_FOCUS_IN, focus_in_callback); * @endcode */ EAPI void *evas_event_callback_del(Evas *e, Evas_Callback_Type type, Evas_Event_Cb func) EINA_ARG_NONNULL(1, 3); /** * Delete (unregister) a callback function registered to a given * canvas event. * * @param e Canvas to remove an event callback from * @param type The type of event that was triggering the callback * @param func The function that was to be called when the event was * triggered * @param data The data pointer that was to be passed to the callback * @return The data pointer that was to be passed to the callback * * This function removes the first added callback from the * canvas @p e matching the event type @p type, the registered * function pointer @p func and the callback data pointer @p data. If * the removal is successful it will also return the data pointer that * was passed to evas_event_callback_add() (that will be the same as * the parameter) when the callback(s) was(were) added to the * canvas. If not successful @c NULL will be returned. A common use * would be to remove an exact match of a callback. * * Example: * @dontinclude evas-events.c * @skip evas_event_callback_del_full(evas, EVAS_CALLBACK_RENDER_FLUSH_PRE, * @until _object_focus_in_cb, NULL); * * See the full @ref Example_Evas_Events "example". * * @note For deletion of canvas events callbacks filtering by just * type and function pointer, user evas_event_callback_del(). */ EAPI void *evas_event_callback_del_full(Evas *e, Evas_Callback_Type type, Evas_Event_Cb func, const void *data) EINA_ARG_NONNULL(1, 3); /** * Push a callback on the post-event callback stack * * @param e Canvas to push the callback on * @param func The function that to be called when the stack is unwound * @param data The data pointer to be passed to the callback * * Evas has a stack of callbacks that get called after all the callbacks for * an event have triggered (all the objects it triggers on and all the callbacks * in each object triggered). When all these have been called, the stack is * unwond from most recently to least recently pushed item and removed from the * stack calling the callback set for it. * * This is intended for doing reverse logic-like processing, example - when a * child object that happens to get the event later is meant to be able to * "steal" functions from a parent and thus on unwind of this stack have its * function called first, thus being able to set flags, or return 0 from the * post-callback that stops all other post-callbacks in the current stack from * being called (thus basically allowing a child to take control, if the event * callback prepares information ready for taking action, but the post callback * actually does the action). * */ EAPI void evas_post_event_callback_push(Evas *e, Evas_Object_Event_Post_Cb func, const void *data); /** * Remove a callback from the post-event callback stack * * @param e Canvas to push the callback on * @param func The function that to be called when the stack is unwound * * This removes a callback from the stack added with * evas_post_event_callback_push(). The first instance of the function in * the callback stack is removed from being executed when the stack is * unwound. Further instances may still be run on unwind. */ EAPI void evas_post_event_callback_remove(Evas *e, Evas_Object_Event_Post_Cb func); /** * Remove a callback from the post-event callback stack * * @param e Canvas to push the callback on * @param func The function that to be called when the stack is unwound * @param data The data pointer to be passed to the callback * * This removes a callback from the stack added with * evas_post_event_callback_push(). The first instance of the function and data * in the callback stack is removed from being executed when the stack is * unwound. Further instances may still be run on unwind. */ EAPI void evas_post_event_callback_remove_full(Evas *e, Evas_Object_Event_Post_Cb func, const void *data); /** * @defgroup Evas_Event_Freezing_Group Input Events Freezing Functions * * Functions that deal with the freezing of input event processing of * an Evas canvas. * * There might be scenarios during a graphical user interface * program's use when the developer wishes the users wouldn't be able * to deliver input events to this application. It may, for example, * be the time for it to populate a view or to change some * layout. Assuming proper behavior with user interaction during this * exact time would be hard, as things are in a changing state. The * programmer can then tell the canvas to ignore input events, * bringing it back to normal behavior when he/she wants. * * Most of the time use of freezing events is done like this: * @code * evas_event_freeze(my_evas_canvas); * function_that_does_work_which_cant_be_interrupted_by_events(); * evas_event_thaw(my_evas_canvas); * @endcode * * Some of the functions in this group are exemplified @ref * Example_Evas_Events "here". * * @ingroup Evas_Canvas_Events */ /** * @addtogroup Evas_Event_Freezing_Group * @{ */ /** * Set the default set of flags an event begins with * * @param e The canvas to set the default event flags of * @param flags The default flags to use * * Events in evas can have an event_flags member. This starts out with * and initial value (no flags). this lets you set the default flags that * an event begins with to be @p flags * * @since 1.2 */ EAPI void evas_event_default_flags_set(Evas *e, Evas_Event_Flags flags) EINA_ARG_NONNULL(1); /** * Get the defaulty set of flags an event begins with * * @param e The canvas to get the default event flags from * @return The default event flags for that canvas * * This gets the default event flags events are produced with when fed in. * * @see evas_event_default_flags_set() * @since 1.2 */ EAPI Evas_Event_Flags evas_event_default_flags_get(const Evas *e) EINA_ARG_NONNULL(1); /** * Freeze all input events processing. * * @param e The canvas to freeze input events processing on. * * This function will indicate to Evas that the canvas @p e is to have * all input event processing frozen until a matching * evas_event_thaw() function is called on the same canvas. All events * of this kind during the freeze will get @b discarded. Every freeze * call must be matched by a thaw call in order to completely thaw out * a canvas (i.e. these calls may be nested). The most common use is * when you don't want the user to interact with your user interface * when you're populating a view or changing the layout. * * Example: * @dontinclude evas-events.c * @skip freeze input for 3 seconds * @until } * @dontinclude evas-events.c * @skip let's have our events back * @until } * * See the full @ref Example_Evas_Events "example". * * If you run that example, you'll see the canvas ignoring all input * events for 3 seconds, when the "f" key is pressed. In a more * realistic code we would be freezing while a toolkit or Edje was * doing some UI changes, thawing it back afterwards. */ EAPI void evas_event_freeze(Evas *e) EINA_ARG_NONNULL(1); /** * Thaw a canvas out after freezing (for input events). * * @param e The canvas to thaw out. * * This will thaw out a canvas after a matching evas_event_freeze() * call. If this call completely thaws out a canvas, i.e., there's no * other unbalanced call to evas_event_freeze(), events will start to * be processed again, but any "missed" events will @b not be * evaluated. * * See evas_event_freeze() for an example. */ EAPI void evas_event_thaw(Evas *e) EINA_ARG_NONNULL(1); /** * Return the freeze count on input events of a given canvas. * * @param e The canvas to fetch the freeze count from. * * This returns the number of times the canvas has been told to freeze * input events. It is possible to call evas_event_freeze() multiple * times, and these must be matched by evas_event_thaw() calls. This * call allows the program to discover just how many times things have * been frozen in case it may want to break out of a deep freeze state * where the count is high. * * Example: * @code * extern Evas *evas; * * while (evas_event_freeze_get(evas) > 0) evas_event_thaw(evas); * @endcode * */ EAPI int evas_event_freeze_get(const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * After thaw of a canvas, re-evaluate the state of objects and call callbacks * * @param e The canvas to evaluate after a thaw * * This is normally called after evas_event_thaw() to re-evaluate mouse * containment and other states and thus also call callbacks for mouse in and * out on new objects if the state change demands it. */ EAPI void evas_event_thaw_eval(Evas *e) EINA_ARG_NONNULL(1); /** * @} */ /** * @defgroup Evas_Event_Feeding_Group Input Events Feeding Functions * * Functions to tell Evas that input events happened and should be * processed. * * @warning Most of the time these functions are @b not what you're looking for. * These functions should only be used if you're not working with ecore evas(or * another input handling system). If you're not using ecore evas please * consider using it, in most situation it will make life a lot easier. * * As explained in @ref intro_not_evas, Evas does not know how to poll * for input events, so the developer should do it and then feed such * events to the canvas to be processed. This is only required if * operating Evas directly. Modules such as Ecore_Evas do that for * you. * * Some of the functions in this group are exemplified @ref * Example_Evas_Events "here". * * @ingroup Evas_Canvas_Events */ /** * @addtogroup Evas_Event_Feeding_Group * @{ */ /** * Get the number of mouse or multi presses currently active * * @p e The given canvas pointer. * @return The numer of presses (0 if none active). * * @since 1.2 */ EAPI int evas_event_down_count_get(const Evas *e) EINA_ARG_NONNULL(1); /** * Mouse down event feed. * * @param e The given canvas pointer. * @param b The button number. * @param flags The evas button flags. * @param timestamp The timestamp of the mouse down event. * @param data The data for canvas. * * This function will set some evas properties that is necessary when * the mouse button is pressed. It prepares information to be treated * by the callback function. * */ EAPI void evas_event_feed_mouse_down(Evas *e, int b, Evas_Button_Flags flags, unsigned int timestamp, const void *data) EINA_ARG_NONNULL(1); /** * Mouse up event feed. * * @param e The given canvas pointer. * @param b The button number. * @param flags evas button flags. * @param timestamp The timestamp of the mouse up event. * @param data The data for canvas. * * This function will set some evas properties that is necessary when * the mouse button is released. It prepares information to be treated * by the callback function. * */ EAPI void evas_event_feed_mouse_up(Evas *e, int b, Evas_Button_Flags flags, unsigned int timestamp, const void *data) EINA_ARG_NONNULL(1); /** * Mouse move event feed. * * @param e The given canvas pointer. * @param x The horizontal position of the mouse pointer. * @param y The vertical position of the mouse pointer. * @param timestamp The timestamp of the mouse up event. * @param data The data for canvas. * * This function will set some evas properties that is necessary when * the mouse is moved from its last position. It prepares information * to be treated by the callback function. * */ EAPI void evas_event_feed_mouse_move(Evas *e, int x, int y, unsigned int timestamp, const void *data) EINA_ARG_NONNULL(1); /** * Mouse in event feed. * * @param e The given canvas pointer. * @param timestamp The timestamp of the mouse up event. * @param data The data for canvas. * * This function will set some evas properties that is necessary when * the mouse in event happens. It prepares information to be treated * by the callback function. * */ EAPI void evas_event_feed_mouse_in(Evas *e, unsigned int timestamp, const void *data) EINA_ARG_NONNULL(1); /** * Mouse out event feed. * * @param e The given canvas pointer. * @param timestamp Timestamp of the mouse up event. * @param data The data for canvas. * * This function will set some evas properties that is necessary when * the mouse out event happens. It prepares information to be treated * by the callback function. * */ EAPI void evas_event_feed_mouse_out(Evas *e, unsigned int timestamp, const void *data) EINA_ARG_NONNULL(1); EAPI void evas_event_feed_multi_down(Evas *e, int d, int x, int y, double rad, double radx, double rady, double pres, double ang, double fx, double fy, Evas_Button_Flags flags, unsigned int timestamp, const void *data); EAPI void evas_event_feed_multi_up(Evas *e, int d, int x, int y, double rad, double radx, double rady, double pres, double ang, double fx, double fy, Evas_Button_Flags flags, unsigned int timestamp, const void *data); EAPI void evas_event_feed_multi_move(Evas *e, int d, int x, int y, double rad, double radx, double rady, double pres, double ang, double fx, double fy, unsigned int timestamp, const void *data); /** * Mouse cancel event feed. * * @param e The given canvas pointer. * @param timestamp The timestamp of the mouse up event. * @param data The data for canvas. * * This function will call evas_event_feed_mouse_up() when a * mouse cancel event happens. * */ EAPI void evas_event_feed_mouse_cancel(Evas *e, unsigned int timestamp, const void *data) EINA_ARG_NONNULL(1); /** * Mouse wheel event feed. * * @param e The given canvas pointer. * @param direction The wheel mouse direction. * @param z How much mouse wheel was scrolled up or down. * @param timestamp The timestamp of the mouse up event. * @param data The data for canvas. * * This function will set some evas properties that is necessary when * the mouse wheel is scrolled up or down. It prepares information to * be treated by the callback function. * */ EAPI void evas_event_feed_mouse_wheel(Evas *e, int direction, int z, unsigned int timestamp, const void *data) EINA_ARG_NONNULL(1); /** * Key down event feed * * @param e The canvas to thaw out * @param keyname Name of the key * @param key The key pressed. * @param string A String * @param compose The compose string * @param timestamp Timestamp of the mouse up event * @param data Data for canvas. * * This function will set some evas properties that is necessary when * a key is pressed. It prepares information to be treated by the * callback function. * */ EAPI void evas_event_feed_key_down(Evas *e, const char *keyname, const char *key, const char *string, const char *compose, unsigned int timestamp, const void *data) EINA_ARG_NONNULL(1); /** * Key up event feed * * @param e The canvas to thaw out * @param keyname Name of the key * @param key The key released. * @param string string * @param compose compose * @param timestamp Timestamp of the mouse up event * @param data Data for canvas. * * This function will set some evas properties that is necessary when * a key is released. It prepares information to be treated by the * callback function. * */ EAPI void evas_event_feed_key_up(Evas *e, const char *keyname, const char *key, const char *string, const char *compose, unsigned int timestamp, const void *data) EINA_ARG_NONNULL(1); /** * Hold event feed * * @param e The given canvas pointer. * @param hold The hold. * @param timestamp The timestamp of the mouse up event. * @param data The data for canvas. * * This function makes the object to stop sending events. * */ EAPI void evas_event_feed_hold(Evas *e, int hold, unsigned int timestamp, const void *data) EINA_ARG_NONNULL(1); /** * Re feed event. * * @param e The given canvas pointer. * @param event_copy the event to refeed * @param event_type Event type * * This function re-feeds the event pointed by event_copy * * This function call evas_event_feed_* functions, so it can * cause havoc if not used wisely. Please use it responsibly. */ EAPI void evas_event_refeed_event(Evas *e, void *event_copy, Evas_Callback_Type event_type) EINA_ARG_NONNULL(1); /** * @} */ /** * @} */ /** * @defgroup Evas_Image_Group Image Functions * * Functions that deals with images at canvas level. * * @ingroup Evas_Canvas */ /** * @addtogroup Evas_Image_Group * @{ */ /** * Flush the image cache of the canvas. * * @param e The given evas pointer. * * This function flushes image cache of canvas. * */ EAPI void evas_image_cache_flush(Evas *e) EINA_ARG_NONNULL(1); /** * Reload the image cache * * @param e The given evas pointer. * * This function reloads the image cache of canvas. * */ EAPI void evas_image_cache_reload(Evas *e) EINA_ARG_NONNULL(1); /** * Set the image cache. * * @param e The given evas pointer. * @param size The cache size. * * This function sets the image cache of canvas in bytes. * */ EAPI void evas_image_cache_set(Evas *e, int size) EINA_ARG_NONNULL(1); /** * Get the image cache * * @param e The given evas pointer. * * This function returns the image cache size of canvas in bytes. * */ EAPI int evas_image_cache_get(const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Get the maximum image size evas can possibly handle * * @param e The given evas pointer. * @param maxw Pointer to hold the return value in pixels of the maxumum width * @param maxh Pointer to hold the return value in pixels of the maximum height * * This function returns the larges image or surface size that evas can handle * in pixels, and if there is one, returns @c EINA_TRUE. It returns * @c EINA_FALSE if no extra constraint on maximum image size exists. You still * should check the return values of @p maxw and @p maxh as there may still be * a limit, just a much higher one. * * @since 1.1 */ EAPI Eina_Bool evas_image_max_size_get(const Evas *e, int *maxw, int *maxh) EINA_ARG_NONNULL(1); /** * @} */ /** * @defgroup Evas_Font_Group Font Functions * * Functions that deals with fonts. * * @ingroup Evas_Canvas */ /** * Changes the font hinting for the given evas. * * @param e The given evas. * @param hinting The hinting to use, one of #EVAS_FONT_HINTING_NONE, * #EVAS_FONT_HINTING_AUTO, #EVAS_FONT_HINTING_BYTECODE. * @ingroup Evas_Font_Group */ EAPI void evas_font_hinting_set(Evas *e, Evas_Font_Hinting_Flags hinting) EINA_ARG_NONNULL(1); /** * Retrieves the font hinting used by the given evas. * * @param e The given evas to query. * @return The hinting in use, one of #EVAS_FONT_HINTING_NONE, * #EVAS_FONT_HINTING_AUTO, #EVAS_FONT_HINTING_BYTECODE. * @ingroup Evas_Font_Group */ EAPI Evas_Font_Hinting_Flags evas_font_hinting_get(const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Checks if the font hinting is supported by the given evas. * * @param e The given evas to query. * @param hinting The hinting to use, one of #EVAS_FONT_HINTING_NONE, * #EVAS_FONT_HINTING_AUTO, #EVAS_FONT_HINTING_BYTECODE. * @return @c EINA_TRUE if it is supported, @c EINA_FALSE otherwise. * @ingroup Evas_Font_Group */ EAPI Eina_Bool evas_font_hinting_can_hint(const Evas *e, Evas_Font_Hinting_Flags hinting) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Force the given evas and associated engine to flush its font cache. * * @param e The given evas to flush font cache. * @ingroup Evas_Font_Group */ EAPI void evas_font_cache_flush(Evas *e) EINA_ARG_NONNULL(1); /** * Changes the size of font cache of the given evas. * * @param e The given evas to flush font cache. * @param size The size, in bytes. * * @ingroup Evas_Font_Group */ EAPI void evas_font_cache_set(Evas *e, int size) EINA_ARG_NONNULL(1); /** * Changes the size of font cache of the given evas. * * @param e The given evas to flush font cache. * @return The size, in bytes. * * @ingroup Evas_Font_Group */ EAPI int evas_font_cache_get(const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * List of available font descriptions known or found by this evas. * * The list depends on Evas compile time configuration, such as * fontconfig support, and the paths provided at runtime as explained * in @ref Evas_Font_Path_Group. * * @param e The evas instance to query. * @return a newly allocated list of strings. Do not change the * strings. Be sure to call evas_font_available_list_free() * after you're done. * * @ingroup Evas_Font_Group */ EAPI Eina_List *evas_font_available_list(const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Free list of font descriptions returned by evas_font_dir_available_list(). * * @param e The evas instance that returned such list. * @param available the list returned by evas_font_dir_available_list(). * * @ingroup Evas_Font_Group */ EAPI void evas_font_available_list_free(Evas *e, Eina_List *available) EINA_ARG_NONNULL(1); /** * @defgroup Evas_Font_Path_Group Font Path Functions * * Functions that edit the paths being used to load fonts. * * @ingroup Evas_Font_Group */ /** * Removes all font paths loaded into memory for the given evas. * @param e The given evas. * @ingroup Evas_Font_Path_Group */ EAPI void evas_font_path_clear(Evas *e) EINA_ARG_NONNULL(1); /** * Appends a font path to the list of font paths used by the given evas. * @param e The given evas. * @param path The new font path. * @ingroup Evas_Font_Path_Group */ EAPI void evas_font_path_append(Evas *e, const char *path) EINA_ARG_NONNULL(1, 2); /** * Prepends a font path to the list of font paths used by the given evas. * @param e The given evas. * @param path The new font path. * @ingroup Evas_Font_Path_Group */ EAPI void evas_font_path_prepend(Evas *e, const char *path) EINA_ARG_NONNULL(1, 2); /** * Retrieves the list of font paths used by the given evas. * @param e The given evas. * @return The list of font paths used. * @ingroup Evas_Font_Path_Group */ EAPI const Eina_List *evas_font_path_list(const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * @defgroup Evas_Object_Group Generic Object Functions * * Functions that manipulate generic Evas objects. * * All Evas displaying units are Evas objects. One handles them all by * means of the handle ::Evas_Object. Besides Evas treats their * objects equally, they have @b types, which define their specific * behavior (and individual API). * * Evas comes with a set of built-in object types: * - rectangle, * - line, * - polygon, * - text, * - textblock and * - image. * * These functions apply to @b any Evas object, whichever type that * may have. * * @note The built-in types which are most used are rectangles, text * and images. In fact, with these ones one can create 2D interfaces * of arbitrary complexity and EFL makes it easy. */ /** * @defgroup Evas_Object_Group_Basic Basic Object Manipulation * * Almost every evas object created will have some generic function used to * manipulate it. That's because there are a number of basic actions to be done * to objects that are irrespective of the object's type, things like: * @li Showing/Hiding * @li Setting(and getting) geometry * @li Bring up or down a layer * @li Color management * @li Handling focus * @li Clipping * @li Reference counting * * All of this issues are handled through the functions here grouped. Examples * of these function can be seen in @ref Example_Evas_Object_Manipulation(which * deals with the most common ones) and in @ref Example_Evas_Stacking(which * deals with stacking functions). * * @ingroup Evas_Object_Group */ /** * @addtogroup Evas_Object_Group_Basic * @{ */ /** * Clip one object to another. * * @param obj The object to be clipped * @param clip The object to clip @p obj by * * This function will clip the object @p obj to the area occupied by * the object @p clip. This means the object @p obj will only be * visible within the area occupied by the clipping object (@p clip). * * The color of the object being clipped will be multiplied by the * color of the clipping one, so the resulting color for the former * will be RESULT = (OBJ * CLIP) / (255 * 255), per color * element (red, green, blue and alpha). * * Clipping is recursive, so clipping objects may be clipped by * others, and their color will in term be multiplied. You may @b not * set up circular clipping lists (i.e. object 1 clips object 2, which * clips object 1): the behavior of Evas is undefined in this case. * * Objects which do not clip others are visible in the canvas as * normal; those that clip one or more objects become invisible * themselves, only affecting what they clip. If an object ceases * to have other objects being clipped by it, it will become visible * again. * * The visibility of an object affects the objects that are clipped by * it, so if the object clipping others is not shown (as in * evas_object_show()), the objects clipped by it will not be shown * either. * * If @p obj was being clipped by another object when this function is * called, it gets implicitly removed from the old clipper's domain * and is made now to be clipped by its new clipper. * * The following figure illustrates some clipping in Evas: * * @image html clipping.png * @image rtf clipping.png * @image latex clipping.eps * * @note At the moment the only objects that can validly be used to * clip other objects are rectangle objects. All other object * types are invalid and the result of using them is undefined. The * clip object @p clip must be a valid object, but can also be @c * NULL, in which case the effect of this function is the same as * calling evas_object_clip_unset() on the @p obj object. * * Example: * @dontinclude evas-object-manipulation.c * @skip solid white clipper (note that it's the default color for a * @until evas_object_show(d.clipper); * * See the full @ref Example_Evas_Object_Manipulation "example". */ EAPI void evas_object_clip_set(Evas_Object *obj, Evas_Object *clip) EINA_ARG_NONNULL(1, 2); /** * Get the object clipping @p obj (if any). * * @param obj The object to get the clipper from * * This function returns the object clipping @p obj. If @p obj is * not being clipped at all, @c NULL is returned. The object @p obj * must be a valid ::Evas_Object. * * See also evas_object_clip_set(), evas_object_clip_unset() and * evas_object_clipees_get(). * * Example: * @dontinclude evas-object-manipulation.c * @skip if (evas_object_clip_get(d.img) == d.clipper) * @until return * * See the full @ref Example_Evas_Object_Manipulation "example". */ EAPI Evas_Object *evas_object_clip_get(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Disable/cease clipping on a clipped @p obj object. * * @param obj The object to cease clipping on * * This function disables clipping for the object @p obj, if it was * already clipped, i.e., its visibility and color get detached from * the previous clipper. If it wasn't, this has no effect. The object * @p obj must be a valid ::Evas_Object. * * See also evas_object_clip_set() (for an example), * evas_object_clipees_get() and evas_object_clip_get(). * */ EAPI void evas_object_clip_unset(Evas_Object *obj); /** * Return a list of objects currently clipped by @p obj. * * @param obj The object to get a list of clippees from * @return a list of objects being clipped by @p obj * * This returns the internal list handle that contains all objects * clipped by the object @p obj. If none are clipped by it, the call * returns @c NULL. This list is only valid until the clip list is * changed and should be fetched again with another call to * evas_object_clipees_get() if any objects being clipped by this * object are unclipped, clipped by a new object, deleted or get the * clipper deleted. These operations will invalidate the list * returned, so it should not be used anymore after that point. Any * use of the list after this may have undefined results, possibly * leading to crashes. The object @p obj must be a valid * ::Evas_Object. * * See also evas_object_clip_set(), evas_object_clip_unset() and * evas_object_clip_get(). * * Example: * @code * extern Evas_Object *obj; * Evas_Object *clipper; * * clipper = evas_object_clip_get(obj); * if (clipper) * { * Eina_List *clippees, *l; * Evas_Object *obj_tmp; * * clippees = evas_object_clipees_get(clipper); * printf("Clipper clips %i objects\n", eina_list_count(clippees)); * EINA_LIST_FOREACH(clippees, l, obj_tmp) * evas_object_show(obj_tmp); * } * @endcode */ EAPI const Eina_List *evas_object_clipees_get(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Sets or unsets a given object as the currently focused one on its * canvas. * * @param obj The object to be focused or unfocused. * @param focus @c EINA_TRUE, to set it as focused or @c EINA_FALSE, * to take away the focus from it. * * Changing focus only affects where (key) input events go. There can * be only one object focused at any time. If @p focus is @c EINA_TRUE, * @p obj will be set as the currently focused object and it will * receive all keyboard events that are not exclusive key grabs on * other objects. * * Example: * @dontinclude evas-events.c * @skip evas_object_focus_set * @until evas_object_focus_set * * See the full example @ref Example_Evas_Events "here". * * @see evas_object_focus_get * @see evas_focus_get * @see evas_object_key_grab * @see evas_object_key_ungrab */ EAPI void evas_object_focus_set(Evas_Object *obj, Eina_Bool focus) EINA_ARG_NONNULL(1); /** * Retrieve whether an object has the focus. * * @param obj The object to retrieve focus information from. * @return @c EINA_TRUE if the object has the focus, @c EINA_FALSE otherwise. * * If the passed object is the currently focused one, @c EINA_TRUE is * returned. @c EINA_FALSE is returned, otherwise. * * Example: * @dontinclude evas-events.c * @skip And again * @until something is bad * * See the full example @ref Example_Evas_Events "here". * * @see evas_object_focus_set * @see evas_focus_get * @see evas_object_key_grab * @see evas_object_key_ungrab */ EAPI Eina_Bool evas_object_focus_get(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Sets the layer of its canvas that the given object will be part of. * * @param obj The given Evas object. * @param l The number of the layer to place the object on. * Must be between #EVAS_LAYER_MIN and #EVAS_LAYER_MAX. * * If you don't use this function, you'll be dealing with an @b unique * layer of objects, the default one. Additional layers are handy when * you don't want a set of objects to interfere with another set with * regard to @b stacking. Two layers are completely disjoint in that * matter. * * This is a low-level function, which you'd be using when something * should be always on top, for example. * * @warning Be careful, it doesn't make sense to change the layer of * smart objects' children. Smart objects have a layer of their own, * which should contain all their children objects. * * @see evas_object_layer_get() */ EAPI void evas_object_layer_set(Evas_Object *obj, short l) EINA_ARG_NONNULL(1); /** * Retrieves the layer of its canvas that the given object is part of. * * @param obj The given Evas object to query layer from * @return Number of its layer * * @see evas_object_layer_set() */ EAPI short evas_object_layer_get(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Sets the name of the given Evas object to the given name. * * @param obj The given object. * @param name The given name. * * There might be occasions where one would like to name his/her * objects. * * Example: * @dontinclude evas-events.c * @skip d.bg = evas_object_rectangle_add(d.canvas); * @until evas_object_name_set(d.bg, "our dear rectangle"); * * See the full @ref Example_Evas_Events "example". */ EAPI void evas_object_name_set(Evas_Object *obj, const char *name) EINA_ARG_NONNULL(1); /** * Retrieves the name of the given Evas object. * * @param obj The given object. * @return The name of the object or @c NULL, if no name has been given * to it. * * Example: * @dontinclude evas-events.c * @skip fprintf(stdout, "An object got focused: %s\n", * @until evas_focus_get * * See the full @ref Example_Evas_Events "example". */ EAPI const char *evas_object_name_get(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Increments object reference count to defer its deletion. * * @param obj The given Evas object to reference * * This increments the reference count of an object, which if greater * than 0 will defer deletion by evas_object_del() until all * references are released back (counter back to 0). References cannot * go below 0 and unreferencing past that will result in the reference * count being limited to 0. References are limited to 2^32 - 1 * for an object. Referencing it more than this will result in it * being limited to this value. * * @see evas_object_unref() * @see evas_object_del() * * @note This is a very simple reference counting mechanism! For * instance, Evas is not ready to check for pending references on a * canvas deletion, or things like that. This is useful on scenarios * where, inside a code block, callbacks exist which would possibly * delete an object we are operating on afterwards. Then, one would * evas_object_ref() it on the beginning of the block and * evas_object_unref() it on the end. It would then be deleted at this * point, if it should be. * * Example: * @code * evas_object_ref(obj); * * // action here... * evas_object_smart_callback_call(obj, SIG_SELECTED, NULL); * // more action here... * evas_object_unref(obj); * @endcode * * @ingroup Evas_Object_Group_Basic * @since 1.1 */ EAPI void evas_object_ref(Evas_Object *obj); /** * Decrements object reference count. * * @param obj The given Evas object to unreference * * This decrements the reference count of an object. If the object has * had evas_object_del() called on it while references were more than * 0, it will be deleted at the time this function is called and puts * the counter back to 0. See evas_object_ref() for more information. * * @see evas_object_ref() (for an example) * @see evas_object_del() * * @ingroup Evas_Object_Group_Basic * @since 1.1 */ EAPI void evas_object_unref(Evas_Object *obj); /** * Get the object reference count. * * @param obj The given Evas object to query * * This gets the reference count for an object (normally 0 until it is * referenced). Values of 1 or greater mean that someone is holding a * reference to this object that needs to be unreffed before it can be * deleted. * * @see evas_object_ref() * @see evas_object_unref() * @see evas_object_del() * * @ingroup Evas_Object_Group_Basic * @since 1.2 */ EAPI int evas_object_ref_get(const Evas_Object *obj); /** * Marks the given Evas object for deletion (when Evas will free its * memory). * * @param obj The given Evas object. * * This call will mark @p obj for deletion, which will take place * whenever it has no more references to it (see evas_object_ref() and * evas_object_unref()). * * At actual deletion time, which may or may not be just after this * call, ::EVAS_CALLBACK_DEL and ::EVAS_CALLBACK_FREE callbacks will * be called. If the object currently had the focus, its * ::EVAS_CALLBACK_FOCUS_OUT callback will also be called. * * @see evas_object_ref() * @see evas_object_unref() * * @ingroup Evas_Object_Group_Basic */ EAPI void evas_object_del(Evas_Object *obj) EINA_ARG_NONNULL(1); /** * Move the given Evas object to the given location inside its * canvas' viewport. * * @param obj The given Evas object. * @param x X position to move the object to, in canvas units. * @param y Y position to move the object to, in canvas units. * * Besides being moved, the object's ::EVAS_CALLBACK_MOVE callback * will be called. * * @note Naturally, newly created objects are placed at the canvas' * origin: 0, 0. * * Example: * @dontinclude evas-object-manipulation.c * @skip evas_object_image_border_set(d.clipper_border, 3, 3, 3, 3); * @until evas_object_show * * See the full @ref Example_Evas_Object_Manipulation "example". * * @ingroup Evas_Object_Group_Basic */ EAPI void evas_object_move(Evas_Object *obj, Evas_Coord x, Evas_Coord y) EINA_ARG_NONNULL(1); /** * Changes the size of the given Evas object. * * @param obj The given Evas object. * @param w The new width of the Evas object. * @param h The new height of the Evas object. * * Besides being resized, the object's ::EVAS_CALLBACK_RESIZE callback * will be called. * * @note Newly created objects have zeroed dimensions. Then, you most * probably want to use evas_object_resize() on them after they are * created. * * @note Be aware that resizing an object changes its drawing area, * but that does imply the object is rescaled! For instance, images * are filled inside their drawing area using the specifications of * evas_object_image_fill_set(). Thus to scale the image to match * exactly your drawing area, you need to change the * evas_object_image_fill_set() as well. * * @note This is more evident in images, but text, textblock, lines * and polygons will behave similarly. Check their specific APIs to * know how to achieve your desired behavior. Consider the following * example: * * @code * // rescale image to fill exactly its area without tiling: * evas_object_resize(img, w, h); * evas_object_image_fill_set(img, 0, 0, w, h); * @endcode * * @ingroup Evas_Object_Group_Basic */ EAPI void evas_object_resize(Evas_Object *obj, Evas_Coord w, Evas_Coord h) EINA_ARG_NONNULL(1); /** * Retrieves the position and (rectangular) size of the given Evas * object. * * @param obj The given Evas object. * @param x Pointer to an integer in which to store the X coordinate * of the object. * @param y Pointer to an integer in which to store the Y coordinate * of the object. * @param w Pointer to an integer in which to store the width of the * object. * @param h Pointer to an integer in which to store the height of the * object. * * The position, naturally, will be relative to the top left corner of * the canvas' viewport. * * @note Use @c NULL pointers on the geometry components you're not * interested in: they'll be ignored by the function. * * Example: * @dontinclude evas-events.c * @skip int w, h, cw, ch; * @until return * * See the full @ref Example_Evas_Events "example". * * @ingroup Evas_Object_Group_Basic */ EAPI void evas_object_geometry_get(const Evas_Object *obj, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h) EINA_ARG_NONNULL(1); /** * Makes the given Evas object visible. * * @param obj The given Evas object. * * Besides becoming visible, the object's ::EVAS_CALLBACK_SHOW * callback will be called. * * @see evas_object_hide() for more on object visibility. * @see evas_object_visible_get() * * @ingroup Evas_Object_Group_Basic */ EAPI void evas_object_show(Evas_Object *obj) EINA_ARG_NONNULL(1); /** * Makes the given Evas object invisible. * * @param obj The given Evas object. * * Hidden objects, besides not being shown at all in your canvas, * won't be checked for changes on the canvas rendering * process. Furthermore, they will not catch input events. Thus, they * are much ligher (in processing needs) than an object that is * invisible due to indirect causes, such as being clipped or out of * the canvas' viewport. * * Besides becoming hidden, @p obj object's ::EVAS_CALLBACK_SHOW * callback will be called. * * @note All objects are created in the hidden state! If you want them * shown, use evas_object_show() after their creation. * * @see evas_object_show() * @see evas_object_visible_get() * * Example: * @dontinclude evas-object-manipulation.c * @skip if (evas_object_visible_get(d.clipper)) * @until return * * See the full @ref Example_Evas_Object_Manipulation "example". * * @ingroup Evas_Object_Group_Basic */ EAPI void evas_object_hide(Evas_Object *obj) EINA_ARG_NONNULL(1); /** * Retrieves whether or not the given Evas object is visible. * * @param obj The given Evas object. * @return @c EINA_TRUE if the object is visible, @c EINA_FALSE * otherwise. * * This retrieves an object's visibility as the one enforced by * evas_object_show() and evas_object_hide(). * * @note The value returned isn't, by any means, influenced by * clippers covering @p obj, it being out of its canvas' viewport or * stacked below other object. * * @see evas_object_show() * @see evas_object_hide() (for an example) * * @ingroup Evas_Object_Group_Basic */ EAPI Eina_Bool evas_object_visible_get(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Sets the general/main color of the given Evas object to the given * one. * * @param obj The given Evas object. * @param r The red component of the given color. * @param g The green component of the given color. * @param b The blue component of the given color. * @param a The alpha component of the given color. * * @see evas_object_color_get() (for an example) * @note These color values are expected to be premultiplied by @p a. * * @ingroup Evas_Object_Group_Basic */ EAPI void evas_object_color_set(Evas_Object *obj, int r, int g, int b, int a) EINA_ARG_NONNULL(1); /** * Retrieves the general/main color of the given Evas object. * * @param obj The given Evas object to retrieve color from. * @param r Pointer to an integer in which to store the red component * of the color. * @param g Pointer to an integer in which to store the green * component of the color. * @param b Pointer to an integer in which to store the blue component * of the color. * @param a Pointer to an integer in which to store the alpha * component of the color. * * Retrieves the “main” color's RGB component (and alpha channel) * values, which range from 0 to 255. For the alpha channel, * which defines the object's transparency level, 0 means totally * transparent, while 255 means opaque. These color values are * premultiplied by the alpha value. * * Usually you’ll use this attribute for text and rectangle objects, * where the “main” color is their unique one. If set for objects * which themselves have colors, like the images one, those colors get * modulated by this one. * * @note All newly created Evas rectangles get the default color * values of 255 255 255 255 (opaque white). * * @note Use @c NULL pointers on the components you're not interested * in: they'll be ignored by the function. * * Example: * @dontinclude evas-object-manipulation.c * @skip int alpha, r, g, b; * @until return * * See the full @ref Example_Evas_Object_Manipulation "example". * * @ingroup Evas_Object_Group_Basic */ EAPI void evas_object_color_get(const Evas_Object *obj, int *r, int *g, int *b, int *a) EINA_ARG_NONNULL(1); /** * Retrieves the Evas canvas that the given object lives on. * * @param obj The given Evas object. * @return A pointer to the canvas where the object is on. * * This function is most useful at code contexts where you need to * operate on the canvas but have only the object pointer. * * @ingroup Evas_Object_Group_Basic */ EAPI Evas *evas_object_evas_get(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Retrieves the type of the given Evas object. * * @param obj The given object. * @return The type of the object. * * For Evas' builtin types, the return strings will be one of: * - "rectangle", * - "line", * - "polygon", * - "text", * - "textblock" and * - "image". * * For Evas smart objects (see @ref Evas_Smart_Group), the name of the * smart class itself is returned on this call. For the built-in smart * objects, these names are: * - "EvasObjectSmartClipped", for the clipped smart object * - "Evas_Object_Box", for the box object and * - "Evas_Object_Table", for the table object. * * Example: * @dontinclude evas-object-manipulation.c * @skip d.img = evas_object_image_filled_add(d.canvas); * @until border on the * * See the full @ref Example_Evas_Object_Manipulation "example". */ EAPI const char *evas_object_type_get(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Raise @p obj to the top of its layer. * * @param obj the object to raise * * @p obj will, then, be the highest one in the layer it belongs * to. Object on other layers won't get touched. * * @see evas_object_stack_above() * @see evas_object_stack_below() * @see evas_object_lower() */ EAPI void evas_object_raise(Evas_Object *obj) EINA_ARG_NONNULL(1); /** * Lower @p obj to the bottom of its layer. * * @param obj the object to lower * * @p obj will, then, be the lowest one in the layer it belongs * to. Objects on other layers won't get touched. * * @see evas_object_stack_above() * @see evas_object_stack_below() * @see evas_object_raise() */ EAPI void evas_object_lower(Evas_Object *obj) EINA_ARG_NONNULL(1); /** * Stack @p obj immediately above @p above * * @param obj the object to stack * @param above the object above which to stack * * Objects, in a given canvas, are stacked in the order they get added * to it. This means that, if they overlap, the highest ones will * cover the lowest ones, in that order. This function is a way to * change the stacking order for the objects. * * This function is intended to be used with objects belonging to * the same layer in a given canvas, otherwise it will fail (and * accomplish nothing). * * If you have smart objects on your canvas and @p obj is a member of * one of them, then @p above must also be a member of the same * smart object. * * Similarly, if @p obj is not a member of a smart object, @p above * must not be either. * * @see evas_object_layer_get() * @see evas_object_layer_set() * @see evas_object_stack_below() */ EAPI void evas_object_stack_above(Evas_Object *obj, Evas_Object *above) EINA_ARG_NONNULL(1, 2); /** * Stack @p obj immediately below @p below * * @param obj the object to stack * @param below the object below which to stack * * Objects, in a given canvas, are stacked in the order they get added * to it. This means that, if they overlap, the highest ones will * cover the lowest ones, in that order. This function is a way to * change the stacking order for the objects. * * This function is intended to be used with objects belonging to * the same layer in a given canvas, otherwise it will fail (and * accomplish nothing). * * If you have smart objects on your canvas and @p obj is a member of * one of them, then @p below must also be a member of the same * smart object. * * Similarly, if @p obj is not a member of a smart object, @p below * must not be either. * * @see evas_object_layer_get() * @see evas_object_layer_set() * @see evas_object_stack_below() */ EAPI void evas_object_stack_below(Evas_Object *obj, Evas_Object *below) EINA_ARG_NONNULL(1, 2); /** * Get the Evas object stacked right above @p obj * * @param obj an #Evas_Object * @return the #Evas_Object directly above @p obj, if any, or @c NULL, * if none * * This function will traverse layers in its search, if there are * objects on layers above the one @p obj is placed at. * * @see evas_object_layer_get() * @see evas_object_layer_set() * @see evas_object_below_get() * */ EAPI Evas_Object *evas_object_above_get(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Get the Evas object stacked right below @p obj * * @param obj an #Evas_Object * @return the #Evas_Object directly below @p obj, if any, or @c NULL, * if none * * This function will traverse layers in its search, if there are * objects on layers below the one @p obj is placed at. * * @see evas_object_layer_get() * @see evas_object_layer_set() * @see evas_object_below_get() */ EAPI Evas_Object *evas_object_below_get(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * @} */ /** * @defgroup Evas_Object_Group_Events Object Events * * Objects generate events when they are moved, resized, when their * visibility change, when they are deleted and so on. These methods * allow one to be notified about and to handle such events. * * Objects also generate events on input (keyboard and mouse), if they * accept them (are visible, focused, etc). * * For each of those events, Evas provides a way for one to register * callback functions to be issued just after they happen. * * The following figure illustrates some Evas (event) callbacks: * * @image html evas-callbacks.png * @image rtf evas-callbacks.png * @image latex evas-callbacks.eps * * These events have their values in the #Evas_Callback_Type * enumeration, which has also ones happening on the canvas level (see * @ref Evas_Canvas_Events ). * * Examples on this group of functions can be found @ref * Example_Evas_Stacking "here" and @ref Example_Evas_Events "here". * * @ingroup Evas_Object_Group */ /** * @addtogroup Evas_Object_Group_Events * @{ */ /** * Add (register) a callback function to a given Evas object event. * * @param obj Object to attach a callback to * @param type The type of event that will trigger the callback * @param func The function to be called when the event is triggered * @param data The data pointer to be passed to @p func * * This function adds a function callback to an object when the event * of type @p type occurs on object @p obj. The function is @p func. * * In the event of a memory allocation error during addition of the * callback to the object, evas_alloc_error() should be used to * determine the nature of the error, if any, and the program should * sensibly try and recover. * * A callback function must have the ::Evas_Object_Event_Cb prototype * definition. The first parameter (@p data) in this definition will * have the same value passed to evas_object_event_callback_add() as * the @p data parameter, at runtime. The second parameter @p e is the * canvas pointer on which the event occurred. The third parameter is * a pointer to the object on which event occurred. Finally, the * fourth parameter @p event_info is a pointer to a data structure * that may or may not be passed to the callback, depending on the * event type that triggered the callback. This is so because some * events don't carry extra context with them, but others do. * * The event type @p type to trigger the function may be one of * #EVAS_CALLBACK_MOUSE_IN, #EVAS_CALLBACK_MOUSE_OUT, * #EVAS_CALLBACK_MOUSE_DOWN, #EVAS_CALLBACK_MOUSE_UP, * #EVAS_CALLBACK_MOUSE_MOVE, #EVAS_CALLBACK_MOUSE_WHEEL, * #EVAS_CALLBACK_MULTI_DOWN, #EVAS_CALLBACK_MULTI_UP, * #EVAS_CALLBACK_MULTI_MOVE, #EVAS_CALLBACK_FREE, * #EVAS_CALLBACK_KEY_DOWN, #EVAS_CALLBACK_KEY_UP, * #EVAS_CALLBACK_FOCUS_IN, #EVAS_CALLBACK_FOCUS_OUT, * #EVAS_CALLBACK_SHOW, #EVAS_CALLBACK_HIDE, #EVAS_CALLBACK_MOVE, * #EVAS_CALLBACK_RESIZE, #EVAS_CALLBACK_RESTACK, #EVAS_CALLBACK_DEL, * #EVAS_CALLBACK_HOLD, #EVAS_CALLBACK_CHANGED_SIZE_HINTS, * #EVAS_CALLBACK_IMAGE_PRELOADED or #EVAS_CALLBACK_IMAGE_UNLOADED. * * This determines the kind of event that will trigger the callback. * What follows is a list explaining better the nature of each type of * event, along with their associated @p event_info pointers: * * - #EVAS_CALLBACK_MOUSE_IN: @p event_info is a pointer to an * #Evas_Event_Mouse_In struct\n\n * This event is triggered when the mouse pointer enters the area * (not shaded by other objects) of the object @p obj. This may * occur by the mouse pointer being moved by * evas_event_feed_mouse_move() calls, or by the object being shown, * raised, moved, resized, or other objects being moved out of the * way, hidden or lowered, whatever may cause the mouse pointer to * get on top of @p obj, having been on top of another object * previously. * * - #EVAS_CALLBACK_MOUSE_OUT: @p event_info is a pointer to an * #Evas_Event_Mouse_Out struct\n\n * This event is triggered exactly like #EVAS_CALLBACK_MOUSE_IN is, * but it occurs when the mouse pointer exits an object's area. Note * that no mouse out events will be reported if the mouse pointer is * implicitly grabbed to an object (mouse buttons are down, having * been pressed while the pointer was over that object). In these * cases, mouse out events will be reported once all buttons are * released, if the mouse pointer has left the object's area. The * indirect ways of taking off the mouse pointer from an object, * like cited above, for #EVAS_CALLBACK_MOUSE_IN, also apply here, * naturally. * * - #EVAS_CALLBACK_MOUSE_DOWN: @p event_info is a pointer to an * #Evas_Event_Mouse_Down struct\n\n * This event is triggered by a mouse button being pressed while the * mouse pointer is over an object. If the pointer mode for Evas is * #EVAS_OBJECT_POINTER_MODE_AUTOGRAB (default), this causes this * object to passively grab the mouse until all mouse buttons * have been released: all future mouse events will be reported to * only this object until no buttons are down. That includes mouse * move events, mouse in and mouse out events, and further button * presses. When all buttons are released, event propagation will * occur as normal (see #Evas_Object_Pointer_Mode). * * - #EVAS_CALLBACK_MOUSE_UP: @p event_info is a pointer to an * #Evas_Event_Mouse_Up struct\n\n * This event is triggered by a mouse button being released while * the mouse pointer is over an object's area (or when passively * grabbed to an object). * * - #EVAS_CALLBACK_MOUSE_MOVE: @p event_info is a pointer to an * #Evas_Event_Mouse_Move struct\n\n * This event is triggered by the mouse pointer being moved while * over an object's area (or while passively grabbed to an object). * * - #EVAS_CALLBACK_MOUSE_WHEEL: @p event_info is a pointer to an * #Evas_Event_Mouse_Wheel struct\n\n * This event is triggered by the mouse wheel being rolled while the * mouse pointer is over an object (or passively grabbed to an * object). * * - #EVAS_CALLBACK_MULTI_DOWN: @p event_info is a pointer to an * #Evas_Event_Multi_Down struct * * - #EVAS_CALLBACK_MULTI_UP: @p event_info is a pointer to an * #Evas_Event_Multi_Up struct * * - #EVAS_CALLBACK_MULTI_MOVE: @p event_info is a pointer to an * #Evas_Event_Multi_Move struct * * - #EVAS_CALLBACK_FREE: @p event_info is @c NULL \n\n * This event is triggered just before Evas is about to free all * memory used by an object and remove all references to it. This is * useful for programs to use if they attached data to an object and * want to free it when the object is deleted. The object is still * valid when this callback is called, but after it returns, there * is no guarantee on the object's validity. * * - #EVAS_CALLBACK_KEY_DOWN: @p event_info is a pointer to an * #Evas_Event_Key_Down struct\n\n * This callback is called when a key is pressed and the focus is on * the object, or a key has been grabbed to a particular object * which wants to intercept the key press regardless of what object * has the focus. * * - #EVAS_CALLBACK_KEY_UP: @p event_info is a pointer to an * #Evas_Event_Key_Up struct \n\n * This callback is called when a key is released and the focus is * on the object, or a key has been grabbed to a particular object * which wants to intercept the key release regardless of what * object has the focus. * * - #EVAS_CALLBACK_FOCUS_IN: @p event_info is @c NULL \n\n * This event is called when an object gains the focus. When it is * called the object has already gained the focus. * * - #EVAS_CALLBACK_FOCUS_OUT: @p event_info is @c NULL \n\n * This event is triggered when an object loses the focus. When it * is called the object has already lost the focus. * * - #EVAS_CALLBACK_SHOW: @p event_info is @c NULL \n\n * This event is triggered by the object being shown by * evas_object_show(). * * - #EVAS_CALLBACK_HIDE: @p event_info is @c NULL \n\n * This event is triggered by an object being hidden by * evas_object_hide(). * * - #EVAS_CALLBACK_MOVE: @p event_info is @c NULL \n\n * This event is triggered by an object being * moved. evas_object_move() can trigger this, as can any * object-specific manipulations that would mean the object's origin * could move. * * - #EVAS_CALLBACK_RESIZE: @p event_info is @c NULL \n\n * This event is triggered by an object being resized. Resizes can * be triggered by evas_object_resize() or by any object-specific * calls that may cause the object to resize. * * - #EVAS_CALLBACK_RESTACK: @p event_info is @c NULL \n\n * This event is triggered by an object being re-stacked. Stacking * changes can be triggered by * evas_object_stack_below()/evas_object_stack_above() and others. * * - #EVAS_CALLBACK_DEL: @p event_info is @c NULL. * * - #EVAS_CALLBACK_HOLD: @p event_info is a pointer to an * #Evas_Event_Hold struct * * - #EVAS_CALLBACK_CHANGED_SIZE_HINTS: @p event_info is @c NULL. * * - #EVAS_CALLBACK_IMAGE_PRELOADED: @p event_info is @c NULL. * * - #EVAS_CALLBACK_IMAGE_UNLOADED: @p event_info is @c NULL. * * @note Be careful not to add the same callback multiple times, if * that's not what you want, because Evas won't check if a callback * existed before exactly as the one being registered (and thus, call * it more than once on the event, in this case). This would make * sense if you passed different functions and/or callback data, only. * * Example: * @dontinclude evas-events.c * @skip evas_object_event_callback_add( * @until } * * See the full example @ref Example_Evas_Events "here". * */ EAPI void evas_object_event_callback_add(Evas_Object *obj, Evas_Callback_Type type, Evas_Object_Event_Cb func, const void *data) EINA_ARG_NONNULL(1, 3); /** * Add (register) a callback function to a given Evas object event with a * non-default priority set. Except for the priority field, it's exactly the * same as @ref evas_object_event_callback_add * * @param obj Object to attach a callback to * @param type The type of event that will trigger the callback * @param priority The priority of the callback, lower values called first. * @param func The function to be called when the event is triggered * @param data The data pointer to be passed to @p func * * @see evas_object_event_callback_add * @since 1.1 */ EAPI void evas_object_event_callback_priority_add(Evas_Object *obj, Evas_Callback_Type type, Evas_Callback_Priority priority, Evas_Object_Event_Cb func, const void *data) EINA_ARG_NONNULL(1, 4); /** * Delete a callback function from an object * * @param obj Object to remove a callback from * @param type The type of event that was triggering the callback * @param func The function that was to be called when the event was triggered * @return The data pointer that was to be passed to the callback * * This function removes the most recently added callback from the * object @p obj which was triggered by the event type @p type and was * calling the function @p func when triggered. If the removal is * successful it will also return the data pointer that was passed to * evas_object_event_callback_add() when the callback was added to the * object. If not successful @c NULL will be returned. * * Example: * @code * extern Evas_Object *object; * void *my_data; * void up_callback(void *data, Evas *e, Evas_Object *obj, void *event_info); * * my_data = evas_object_event_callback_del(object, EVAS_CALLBACK_MOUSE_UP, up_callback); * @endcode */ EAPI void *evas_object_event_callback_del(Evas_Object *obj, Evas_Callback_Type type, Evas_Object_Event_Cb func) EINA_ARG_NONNULL(1, 3); /** * Delete (unregister) a callback function registered to a given * Evas object event. * * @param obj Object to remove a callback from * @param type The type of event that was triggering the callback * @param func The function that was to be called when the event was * triggered * @param data The data pointer that was to be passed to the callback * @return The data pointer that was to be passed to the callback * * This function removes the most recently added callback from the * object @p obj, which was triggered by the event type @p type and was * calling the function @p func with data @p data, when triggered. If * the removal is successful it will also return the data pointer that * was passed to evas_object_event_callback_add() (that will be the * same as the parameter) when the callback was added to the * object. In errors, @c NULL will be returned. * * @note For deletion of Evas object events callbacks filtering by * just type and function pointer, user * evas_object_event_callback_del(). * * Example: * @code * extern Evas_Object *object; * void *my_data; * void up_callback(void *data, Evas *e, Evas_Object *obj, void *event_info); * * my_data = evas_object_event_callback_del_full(object, EVAS_CALLBACK_MOUSE_UP, up_callback, data); * @endcode */ EAPI void *evas_object_event_callback_del_full(Evas_Object *obj, Evas_Callback_Type type, Evas_Object_Event_Cb func, const void *data) EINA_ARG_NONNULL(1, 3); /** * Set whether an Evas object is to pass (ignore) events. * * @param obj the Evas object to operate on * @param pass whether @p obj is to pass events (@c EINA_TRUE) or not * (@c EINA_FALSE) * * If @p pass is @c EINA_TRUE, it will make events on @p obj to be @b * ignored. They will be triggered on the @b next lower object (that * is not set to pass events), instead (see evas_object_below_get()). * * If @p pass is @c EINA_FALSE, events will be processed on that * object as normal. * * @see evas_object_pass_events_get() for an example * @see evas_object_repeat_events_set() * @see evas_object_propagate_events_set() * @see evas_object_freeze_events_set() */ EAPI void evas_object_pass_events_set(Evas_Object *obj, Eina_Bool pass) EINA_ARG_NONNULL(1); /** * Determine whether an object is set to pass (ignore) events. * * @param obj the Evas object to get information from. * @return pass whether @p obj is set to pass events (@c EINA_TRUE) or not * (@c EINA_FALSE) * * Example: * @dontinclude evas-stacking.c * @skip if (strcmp(ev->keyname, "p") == 0) * @until } * * See the full @ref Example_Evas_Stacking "example". * * @see evas_object_pass_events_set() * @see evas_object_repeat_events_get() * @see evas_object_propagate_events_get() * @see evas_object_freeze_events_get() */ EAPI Eina_Bool evas_object_pass_events_get(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Set whether an Evas object is to repeat events. * * @param obj the Evas object to operate on * @param repeat whether @p obj is to repeat events (@c EINA_TRUE) or not * (@c EINA_FALSE) * * If @p repeat is @c EINA_TRUE, it will make events on @p obj to also * be repeated for the @b next lower object in the objects' stack (see * see evas_object_below_get()). * * If @p repeat is @c EINA_FALSE, events occurring on @p obj will be * processed only on it. * * Example: * @dontinclude evas-stacking.c * @skip if (strcmp(ev->keyname, "r") == 0) * @until } * * See the full @ref Example_Evas_Stacking "example". * * @see evas_object_repeat_events_get() * @see evas_object_pass_events_set() * @see evas_object_propagate_events_set() * @see evas_object_freeze_events_set() */ EAPI void evas_object_repeat_events_set(Evas_Object *obj, Eina_Bool repeat) EINA_ARG_NONNULL(1); /** * Determine whether an object is set to repeat events. * * @param obj the given Evas object pointer * @return whether @p obj is set to repeat events (@c EINA_TRUE) * or not (@c EINA_FALSE) * * @see evas_object_repeat_events_set() for an example * @see evas_object_pass_events_get() * @see evas_object_propagate_events_get() * @see evas_object_freeze_events_get() */ EAPI Eina_Bool evas_object_repeat_events_get(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Set whether events on a smart object's member should get propagated * up to its parent. * * @param obj the smart object's child to operate on * @param prop whether to propagate events (@c EINA_TRUE) or not * (@c EINA_FALSE) * * This function has @b no effect if @p obj is not a member of a smart * object. * * If @p prop is @c EINA_TRUE, events occurring on this object will be * propagated on to the smart object of which @p obj is a member. If * @p prop is @c EINA_FALSE, events occurring on this object will @b * not be propagated on to the smart object of which @p obj is a * member. The default value is @c EINA_TRUE. * * @see evas_object_propagate_events_get() * @see evas_object_repeat_events_set() * @see evas_object_pass_events_set() * @see evas_object_freeze_events_set() */ EAPI void evas_object_propagate_events_set(Evas_Object *obj, Eina_Bool prop) EINA_ARG_NONNULL(1); /** * Retrieve whether an Evas object is set to propagate events. * * @param obj the given Evas object pointer * @return whether @p obj is set to propagate events (@c EINA_TRUE) * or not (@c EINA_FALSE) * * @see evas_object_propagate_events_set() * @see evas_object_repeat_events_get() * @see evas_object_pass_events_get() * @see evas_object_freeze_events_get() */ EAPI Eina_Bool evas_object_propagate_events_get(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Set whether an Evas object is to freeze (discard) events. * * @param obj the Evas object to operate on * @param freeze pass whether @p obj is to freeze events (@c EINA_TRUE) or not * (@c EINA_FALSE) * * If @p freeze is @c EINA_TRUE, it will make events on @p obj to be @b * discarded. Unlike evas_object_pass_events_set(), events will not be * passed to @b next lower object. This API can be used for blocking * events while @p obj is on transiting. * * If @p freeze is @c EINA_FALSE, events will be processed on that * object as normal. * * @see evas_object_freeze_events_get() * @see evas_object_pass_events_set() * @see evas_object_repeat_events_set() * @see evas_object_propagate_events_set() * @since 1.1 */ EAPI void evas_object_freeze_events_set(Evas_Object *obj, Eina_Bool freeze) EINA_ARG_NONNULL(1); /** * Determine whether an object is set to freeze (discard) events. * * @param obj the Evas object to get information from. * @return freeze whether @p obj is set to freeze events (@c EINA_TRUE) or * not (@c EINA_FALSE) * * @see evas_object_freeze_events_set() * @see evas_object_pass_events_get() * @see evas_object_repeat_events_get() * @see evas_object_propagate_events_get() * @since 1.1 */ EAPI Eina_Bool evas_object_freeze_events_get(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * @} */ /** * @defgroup Evas_Object_Group_Map UV Mapping (Rotation, Perspective, 3D...) * * Evas allows different transformations to be applied to all kinds of * objects. These are applied by means of UV mapping. * * With UV mapping, one maps points in the source object to a 3D space * positioning at target. This allows rotation, perspective, scale and * lots of other effects, depending on the map that is used. * * Each map point may carry a multiplier color. If properly * calculated, these can do shading effects on the object, producing * 3D effects. * * As usual, Evas provides both the raw and easy to use methods. The * raw methods allow developers to create their maps somewhere else, * possibly loading them from some file format. The easy to use methods * calculate the points given some high-level parameters such as * rotation angle, ambient light, and so on. * * @note applying mapping will reduce performance, so use with * care. The impact on performance depends on engine in * use. Software is quite optimized, but not as fast as OpenGL. * * @section sec-map-points Map points * @subsection subsec-rotation Rotation * * A map consists of a set of points, currently only four are supported. Each * of these points contains a set of canvas coordinates @c x and @c y that * can be used to alter the geometry of the mapped object, and a @c z * coordinate that indicates the depth of that point. This last coordinate * does not normally affect the map, but it's used by several of the utility * functions to calculate the right position of the point given other * parameters. * * The coordinates for each point are set with evas_map_point_coord_set(). * The following image shows a map set to match the geometry of an existing * object. * * @image html map-set-map-points-1.png * @image rtf map-set-map-points-1.png * @image latex map-set-map-points-1.eps * * This is a common practice, so there are a few functions that help make it * easier. * * evas_map_util_points_populate_from_geometry() sets the coordinates of each * point in the given map to match the rectangle defined by the function * parameters. * * evas_map_util_points_populate_from_object() and * evas_map_util_points_populate_from_object_full() both take an object and * set the map points to match its geometry. The difference between the two * is that the first function sets the @c z value of all points to 0, while * the latter receives the value to set in said coordinate as a parameter. * * The following lines of code all produce the same result as in the image * above. * @code * evas_map_util_points_populate_from_geometry(m, 100, 100, 200, 200, 0); * // Assuming o is our original object * evas_object_move(o, 100, 100); * evas_object_resize(o, 200, 200); * evas_map_util_points_populate_from_object(m, o); * evas_map_util_points_populate_from_object_full(m, o, 0); * @endcode * * Several effects can be applied to an object by simply setting each point * of the map to the right coordinates. For example, a simulated perspective * could be achieve as follows. * * @image html map-set-map-points-2.png * @image rtf map-set-map-points-2.png * @image latex map-set-map-points-2.eps * * As said before, the @c z coordinate is unused here so when setting points * by hand, its value is of no importance. * * @image html map-set-map-points-3.png * @image rtf map-set-map-points-3.png * @image latex map-set-map-points-3.eps * * In all three cases above, setting the map to be used by the object is the * same. * @code * evas_object_map_set(o, m); * evas_object_map_enable_set(o, EINA_TRUE); * @endcode * * Doing things this way, however, is a lot of work that can be avoided by * using the provided utility functions, as described in the next section. * * @section map-utils Utility functions * * Utility functions take an already set up map and alter it to produce a * specific effect. For example, to rotate an object around its own center * you would need to take the rotation angle, the coordinates of each corner * of the object and do all the math to get the new set of coordinates that * need to tbe set in the map. * * Or you can use this code: * @code * evas_object_geometry_get(o, &x, &y, &w, &h); * m = evas_map_new(4); * evas_map_util_points_populate_from_object(m, o); * evas_map_util_rotate(m, 45, x + (w / 2), y + (h / 2)); * evas_object_map_set(o, m); * evas_object_map_enable_set(o, EINA_TRUE); * evas_map_free(m); * @endcode * * Which will rotate the object around its center point in a 45 degree angle * in the clockwise direction, taking it from this * * @image html map-rotation-2d-1.png * @image rtf map-rotation-2d-1.png * @image latex map-rotation-2d-1.eps * * to this * * @image html map-rotation-2d-2.png * @image rtf map-rotation-2d-2.png * @image latex map-rotation-2d-2.eps * * Objects may be rotated around any other point just by setting the last two * paramaters of the evas_map_util_rotate() function to the right values. A * circle of roughly the diameter of the object overlaid on each image shows * where the center of rotation is set for each example. * * For example, this code * @code * evas_object_geometry_get(o, &x, &y, &w, &h); * m = evas_map_new(4); * evas_map_util_points_populate_from_object(m, o); * evas_map_util_rotate(m, 45, x + w - 20, y + h - 20); * evas_object_map_set(o, m); * evas_object_map_enable_set(o, EINA_TRUE); * evas_map_free(m); * @endcode * * produces something like * * @image html map-rotation-2d-3.png * @image rtf map-rotation-2d-3.png * @image latex map-rotation-2d-3.eps * * And the following * @code * evas_output_size_get(evas, &w, &h); * m = evas_map_new(4); * evas_map_util_points_populate_from_object(m, o); * evas_map_util_rotate(m, 45, w, h); * evas_object_map_set(o, m); * evas_object_map_enable_set(o, EINA_TRUE); * evas_map_free(m); * @endcode * * rotates the object around the center of the window * * @image html map-rotation-2d-4.png * @image rtf map-rotation-2d-4.png * @image latex map-rotation-2d-4.eps * * @subsection subsec-3d 3D Maps * * Maps can also be used to achieve the effect of 3-dimensionality. When doing * this, the @c z coordinate of each point counts, with higher values meaning * the point is further into the screen, and smaller values (negative, usually) * meaning the point is closer towards the user. * * Thinking in 3D also introduces the concept of back-face of an object. An * object is said to be facing the user when all its points are placed in a * clockwise fashion. The next image shows this, with each point showing the * with which is identified within the map. * * @image html map-point-order-face.png * @image rtf map-point-order-face.png * @image latex map-point-order-face.eps * * Rotating this map around the @c Y axis would leave the order of the points * in a counter-clockwise fashion, as seen in the following image. * * @image html map-point-order-back.png * @image rtf map-point-order-back.png * @image latex map-point-order-back.eps * * This way we can say that we are looking at the back face of the object. * This will have stronger implications later when we talk about lighting. * * To know if a map is facing towards the user or not it's enough to use * the evas_map_util_clockwise_get() function, but this is normally done * after all the other operations are applied on the map. * * @subsection subsec-3d-rot 3D rotation and perspective * * Much like evas_map_util_rotate(), there's the function * evas_map_util_3d_rotate() that transforms the map to apply a 3D rotation * to an object. As in its 2D counterpart, the rotation can be applied around * any point in the canvas, this time with a @c z coordinate too. The rotation * can also be around any of the 3 axis. * * Starting from this simple setup * * @image html map-3d-basic-1.png * @image rtf map-3d-basic-1.png * @image latex map-3d-basic-1.eps * * and setting maps so that the blue square to rotate on all axis around a * sphere that uses the object as its center, and the red square to rotate * around the @c Y axis, we get the following. A simple overlay over the image * shows the original geometry of each object and the axis around which they * are being rotated, with the @c Z one not appearing due to being orthogonal * to the screen. * * @image html map-3d-basic-2.png * @image rtf map-3d-basic-2.png * @image latex map-3d-basic-2.eps * * which doesn't look very real. This can be helped by adding perspective * to the transformation, which can be simply done by calling * evas_map_util_3d_perspective() on the map after its position has been set. * The result in this case, making the vanishing point the center of each * object: * * @image html map-3d-basic-3.png * @image rtf map-3d-basic-3.png * @image latex map-3d-basic-3.eps * * @section sec-color Color and lighting * * Each point in a map can be set to a color, which will be multiplied with * the objects own color and linearly interpolated in between adjacent points. * This is done with evas_map_point_color_set() for each point of the map, * or evas_map_util_points_color_set() to set every point to the same color. * * When using 3D effects, colors can be used to improve the looks of them by * simulating a light source. The evas_map_util_3d_lighting() function makes * this task easier by taking the coordinates of the light source and its * color, along with the color of the ambient light. Evas then sets the color * of each point based on the distance to the light source, the angle with * which the object is facing the light and the ambient light. Here, the * orientation of each point as explained before, becomes more important. * If the map is defined counter-clockwise, the object will be facing away * from the user and thus become obscured, since no light would be reflecting * from it. * * @image html map-light.png * @image rtf map-light.png * @image latex map-light.eps * @note Object facing the light source * * @image html map-light2.png * @image rtf map-light2.png * @image latex map-light2.eps * @note Same object facing away from the user * * @section Image mapping * * @image html map-uv-mapping-1.png * @image rtf map-uv-mapping-1.png * @image latex map-uv-mapping-1.eps * * Images need some special handling when mapped. Evas can easily take care * of objects and do almost anything with them, but it's completely oblivious * to the content of images, so each point in the map needs to be told to what * pixel in the source image it belongs. Failing to do may sometimes result * in the expected behavior, or it may look like a partial work. * * The next image illustrates one possibility of a map being set to an image * object, without setting the right UV mapping for each point. The objects * themselves are mapped properly to their new geometry, but the image content * may not be displayed correctly within the mapped object. * * @image html map-uv-mapping-2.png * @image rtf map-uv-mapping-2.png * @image latex map-uv-mapping-2.eps * * Once Evas knows how to handle the source image within the map, it will * transform it as needed. This is done with evas_map_point_image_uv_set(), * which tells the map to which pixel in image it maps. * * To match our example images to the maps above all we need is the size of * each image, which can always be found with evas_object_image_size_get(). * * @code * evas_map_point_image_uv_set(m, 0, 0, 0); * evas_map_point_image_uv_set(m, 1, 150, 0); * evas_map_point_image_uv_set(m, 2, 150, 200); * evas_map_point_image_uv_set(m, 3, 0, 200); * evas_object_map_set(o, m); * evas_object_map_enable_set(o, EINA_TRUE); * * evas_map_point_image_uv_set(m, 0, 0, 0); * evas_map_point_image_uv_set(m, 1, 120, 0); * evas_map_point_image_uv_set(m, 2, 120, 160); * evas_map_point_image_uv_set(m, 3, 0, 160); * evas_object_map_set(o2, m); * evas_object_map_enable_set(o2, EINA_TRUE); * @endcode * * To get * * @image html map-uv-mapping-3.png * @image rtf map-uv-mapping-3.png * @image latex map-uv-mapping-3.eps * * Maps can also be set to use part of an image only, or even map them inverted, * and combined with evas_object_image_source_set() it can be used to achieve * more interesting results. * * @code * evas_object_image_size_get(evas_object_image_source_get(o), &w, &h); * evas_map_point_image_uv_set(m, 0, 0, h); * evas_map_point_image_uv_set(m, 1, w, h); * evas_map_point_image_uv_set(m, 2, w, h / 3); * evas_map_point_image_uv_set(m, 3, 0, h / 3); * evas_object_map_set(o, m); * evas_object_map_enable_set(o, EINA_TRUE); * @endcode * * @image html map-uv-mapping-4.png * @image rtf map-uv-mapping-4.png * @image latex map-uv-mapping-4.eps * * Examples: * @li @ref Example_Evas_Map_Overview * * @ingroup Evas_Object_Group * * @{ */ /** * Enable or disable the map that is set. * * Enable or disable the use of map for the object @p obj. * On enable, the object geometry will be saved, and the new geometry will * change (position and size) to reflect the map geometry set. * * If the object doesn't have a map set (with evas_object_map_set()), the * initial geometry will be undefined. It is advised to always set a map * to the object first, and then call this function to enable its use. * * @param obj object to enable the map on * @param enabled enabled state */ EAPI void evas_object_map_enable_set(Evas_Object *obj, Eina_Bool enabled); /** * Get the map enabled state * * This returns the currently enabled state of the map on the object indicated. * The default map enable state is off. You can enable and disable it with * evas_object_map_enable_set(). * * @param obj object to get the map enabled state from * @return the map enabled state */ EAPI Eina_Bool evas_object_map_enable_get(const Evas_Object *obj); /** * Set current object transformation map. * * This sets the map on a given object. It is copied from the @p map pointer, * so there is no need to keep the @p map object if you don't need it anymore. * * A map is a set of 4 points which have canvas x, y coordinates per point, * with an optional z point value as a hint for perspective correction, if it * is available. As well each point has u and v coordinates. These are like * "texture coordinates" in OpenGL in that they define a point in the source * image that is mapped to that map vertex/point. The u corresponds to the x * coordinate of this mapped point and v, the y coordinate. Note that these * coordinates describe a bounding region to sample. If you have a 200x100 * source image and want to display it at 200x100 with proper pixel * precision, then do: * * @code * Evas_Map *m = evas_map_new(4); * evas_map_point_coord_set(m, 0, 0, 0, 0); * evas_map_point_coord_set(m, 1, 200, 0, 0); * evas_map_point_coord_set(m, 2, 200, 100, 0); * evas_map_point_coord_set(m, 3, 0, 100, 0); * evas_map_point_image_uv_set(m, 0, 0, 0); * evas_map_point_image_uv_set(m, 1, 200, 0); * evas_map_point_image_uv_set(m, 2, 200, 100); * evas_map_point_image_uv_set(m, 3, 0, 100); * evas_object_map_set(obj, m); * evas_map_free(m); * @endcode * * Note that the map points a uv coordinates match the image geometry. If * the @p map parameter is NULL, the stored map will be freed and geometry * prior to enabling/setting a map will be restored. * * @param obj object to change transformation map * @param map new map to use * * @see evas_map_new() */ EAPI void evas_object_map_set(Evas_Object *obj, const Evas_Map *map); /** * Get current object transformation map. * * This returns the current internal map set on the indicated object. It is * intended for read-only access and is only valid as long as the object is * not deleted or the map on the object is not changed. If you wish to modify * the map and set it back do the following: * * @code * const Evas_Map *m = evas_object_map_get(obj); * Evas_Map *m2 = evas_map_dup(m); * evas_map_util_rotate(m2, 30.0, 0, 0); * evas_object_map_set(obj); * evas_map_free(m2); * @endcode * * @param obj object to query transformation map. * @return map reference to map in use. This is an internal data structure, so * do not modify it. * * @see evas_object_map_set() */ EAPI const Evas_Map *evas_object_map_get(const Evas_Object *obj); /** * Populate source and destination map points to match exactly object. * * Usually one initialize map of an object to match it's original * position and size, then transform these with evas_map_util_* * functions, such as evas_map_util_rotate() or * evas_map_util_3d_rotate(). The original set is done by this * function, avoiding code duplication all around. * * @param m map to change all 4 points (must be of size 4). * @param obj object to use unmapped geometry to populate map coordinates. * @param z Point Z Coordinate hint (pre-perspective transform). This value * will be used for all four points. * * @see evas_map_util_points_populate_from_object() * @see evas_map_point_coord_set() * @see evas_map_point_image_uv_set() */ EAPI void evas_map_util_points_populate_from_object_full(Evas_Map *m, const Evas_Object *obj, Evas_Coord z); /** * Populate source and destination map points to match exactly object. * * Usually one initialize map of an object to match it's original * position and size, then transform these with evas_map_util_* * functions, such as evas_map_util_rotate() or * evas_map_util_3d_rotate(). The original set is done by this * function, avoiding code duplication all around. * * Z Point coordinate is assumed as 0 (zero). * * @param m map to change all 4 points (must be of size 4). * @param obj object to use unmapped geometry to populate map coordinates. * * @see evas_map_util_points_populate_from_object_full() * @see evas_map_util_points_populate_from_geometry() * @see evas_map_point_coord_set() * @see evas_map_point_image_uv_set() */ EAPI void evas_map_util_points_populate_from_object(Evas_Map *m, const Evas_Object *obj); /** * Populate source and destination map points to match given geometry. * * Similar to evas_map_util_points_populate_from_object_full(), this * call takes raw values instead of querying object's unmapped * geometry. The given width will be used to calculate destination * points (evas_map_point_coord_set()) and set the image uv * (evas_map_point_image_uv_set()). * * @param m map to change all 4 points (must be of size 4). * @param x Point X Coordinate * @param y Point Y Coordinate * @param w width to use to calculate second and third points. * @param h height to use to calculate third and fourth points. * @param z Point Z Coordinate hint (pre-perspective transform). This value * will be used for all four points. * * @see evas_map_util_points_populate_from_object() * @see evas_map_point_coord_set() * @see evas_map_point_image_uv_set() */ EAPI void evas_map_util_points_populate_from_geometry(Evas_Map *m, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h, Evas_Coord z); /** * Set color of all points to given color. * * This call is useful to reuse maps after they had 3d lightning or * any other colorization applied before. * * @param m map to change the color of. * @param r red (0 - 255) * @param g green (0 - 255) * @param b blue (0 - 255) * @param a alpha (0 - 255) * * @see evas_map_point_color_set() */ EAPI void evas_map_util_points_color_set(Evas_Map *m, int r, int g, int b, int a); /** * Change the map to apply the given rotation. * * This rotates the indicated map's coordinates around the center coordinate * given by @p cx and @p cy as the rotation center. The points will have their * X and Y coordinates rotated clockwise by @p degrees degrees (360.0 is a * full rotation). Negative values for degrees will rotate counter-clockwise * by that amount. All coordinates are canvas global coordinates. * * @param m map to change. * @param degrees amount of degrees from 0.0 to 360.0 to rotate. * @param cx rotation's center horizontal position. * @param cy rotation's center vertical position. * * @see evas_map_point_coord_set() * @see evas_map_util_zoom() */ EAPI void evas_map_util_rotate(Evas_Map *m, double degrees, Evas_Coord cx, Evas_Coord cy); /** * Change the map to apply the given zooming. * * Like evas_map_util_rotate(), this zooms the points of the map from a center * point. That center is defined by @p cx and @p cy. The @p zoomx and @p zoomy * parameters specify how much to zoom in the X and Y direction respectively. * A value of 1.0 means "don't zoom". 2.0 means "double the size". 0.5 is * "half the size" etc. All coordinates are canvas global coordinates. * * @param m map to change. * @param zoomx horizontal zoom to use. * @param zoomy vertical zoom to use. * @param cx zooming center horizontal position. * @param cy zooming center vertical position. * * @see evas_map_point_coord_set() * @see evas_map_util_rotate() */ EAPI void evas_map_util_zoom(Evas_Map *m, double zoomx, double zoomy, Evas_Coord cx, Evas_Coord cy); /** * Rotate the map around 3 axes in 3D * * This will rotate not just around the "Z" axis as in evas_map_util_rotate() * (which is a convenience call for those only wanting 2D). This will rotate * around the X, Y and Z axes. The Z axis points "into" the screen with low * values at the screen and higher values further away. The X axis runs from * left to right on the screen and the Y axis from top to bottom. Like with * evas_map_util_rotate() you provide a center point to rotate around (in 3D). * * @param m map to change. * @param dx amount of degrees from 0.0 to 360.0 to rotate around X axis. * @param dy amount of degrees from 0.0 to 360.0 to rotate around Y axis. * @param dz amount of degrees from 0.0 to 360.0 to rotate around Z axis. * @param cx rotation's center horizontal position. * @param cy rotation's center vertical position. * @param cz rotation's center vertical position. */ EAPI void evas_map_util_3d_rotate(Evas_Map *m, double dx, double dy, double dz, Evas_Coord cx, Evas_Coord cy, Evas_Coord cz); /** * Perform lighting calculations on the given Map * * This is used to apply lighting calculations (from a single light source) * to a given map. The R, G and B values of each vertex will be modified to * reflect the lighting based on the lixth point coordinates, the light * color and the ambient color, and at what angle the map is facing the * light source. A surface should have its points be declared in a * clockwise fashion if the face is "facing" towards you (as opposed to * away from you) as faces have a "logical" side for lighting. * * @image html map-light3.png * @image rtf map-light3.png * @image latex map-light3.eps * @note Grey object, no lighting used * * @image html map-light4.png * @image rtf map-light4.png * @image latex map-light4.eps * @note Lights out! Every color set to 0 * * @image html map-light5.png * @image rtf map-light5.png * @image latex map-light5.eps * @note Ambient light to full black, red light coming from close at the * bottom-left vertex * * @image html map-light6.png * @image rtf map-light6.png * @image latex map-light6.eps * @note Same light as before, but not the light is set to 0 and ambient light * is cyan * * @image html map-light7.png * @image rtf map-light7.png * @image latex map-light7.eps * @note Both lights are on * * @image html map-light8.png * @image rtf map-light8.png * @image latex map-light8.eps * @note Both lights again, but this time both are the same color. * * @param m map to change. * @param lx X coordinate in space of light point * @param ly Y coordinate in space of light point * @param lz Z coordinate in space of light point * @param lr light red value (0 - 255) * @param lg light green value (0 - 255) * @param lb light blue value (0 - 255) * @param ar ambient color red value (0 - 255) * @param ag ambient color green value (0 - 255) * @param ab ambient color blue value (0 - 255) */ EAPI void evas_map_util_3d_lighting(Evas_Map *m, Evas_Coord lx, Evas_Coord ly, Evas_Coord lz, int lr, int lg, int lb, int ar, int ag, int ab); /** * Apply a perspective transform to the map * * This applies a given perspective (3D) to the map coordinates. X, Y and Z * values are used. The px and py points specify the "infinite distance" point * in the 3D conversion (where all lines converge to like when artists draw * 3D by hand). The @p z0 value specifies the z value at which there is a 1:1 * mapping between spatial coordinates and screen coordinates. Any points * on this z value will not have their X and Y values modified in the transform. * Those further away (Z value higher) will shrink into the distance, and * those less than this value will expand and become bigger. The @p foc value * determines the "focal length" of the camera. This is in reality the distance * between the camera lens plane itself (at or closer than this rendering * results are undefined) and the "z0" z value. This allows for some "depth" * control and @p foc must be greater than 0. * * @param m map to change. * @param px The perspective distance X coordinate * @param py The perspective distance Y coordinate * @param z0 The "0" z plane value * @param foc The focal distance */ EAPI void evas_map_util_3d_perspective(Evas_Map *m, Evas_Coord px, Evas_Coord py, Evas_Coord z0, Evas_Coord foc); /** * Get the clockwise state of a map * * This determines if the output points (X and Y. Z is not used) are * clockwise or anti-clockwise. This can be used for "back-face culling". This * is where you hide objects that "face away" from you. In this case objects * that are not clockwise. * * @param m map to query. * @return 1 if clockwise, 0 otherwise */ EAPI Eina_Bool evas_map_util_clockwise_get(Evas_Map *m); /** * Create map of transformation points to be later used with an Evas object. * * This creates a set of points (currently only 4 is supported. no other * number for @p count will work). That is empty and ready to be modified * with evas_map calls. * * @param count number of points in the map. * @return a newly allocated map or @c NULL on errors. * * @see evas_map_free() * @see evas_map_dup() * @see evas_map_point_coord_set() * @see evas_map_point_image_uv_set() * @see evas_map_util_points_populate_from_object_full() * @see evas_map_util_points_populate_from_object() * * @see evas_object_map_set() */ EAPI Evas_Map *evas_map_new(int count); /** * Set the smoothing for map rendering * * This sets smoothing for map rendering. If the object is a type that has * its own smoothing settings, then both the smooth settings for this object * and the map must be turned off. By default smooth maps are enabled. * * @param m map to modify. Must not be NULL. * @param enabled enable or disable smooth map rendering */ EAPI void evas_map_smooth_set(Evas_Map *m, Eina_Bool enabled); /** * get the smoothing for map rendering * * This gets smoothing for map rendering. * * @param m map to get the smooth from. Must not be NULL. */ EAPI Eina_Bool evas_map_smooth_get(const Evas_Map *m); /** * Set the alpha flag for map rendering * * This sets alpha flag for map rendering. If the object is a type that has * its own alpha settings, then this will take precedence. Only image objects * have this currently. * Setting this off stops alpha blending of the map area, and is * useful if you know the object and/or all sub-objects is 100% solid. * * @param m map to modify. Must not be NULL. * @param enabled enable or disable alpha map rendering */ EAPI void evas_map_alpha_set(Evas_Map *m, Eina_Bool enabled); /** * get the alpha flag for map rendering * * This gets the alpha flag for map rendering. * * @param m map to get the alpha from. Must not be NULL. */ EAPI Eina_Bool evas_map_alpha_get(const Evas_Map *m); /** * Copy a previously allocated map. * * This makes a duplicate of the @p m object and returns it. * * @param m map to copy. Must not be NULL. * @return newly allocated map with the same count and contents as @p m. */ EAPI Evas_Map *evas_map_dup(const Evas_Map *m); /** * Free a previously allocated map. * * This frees a givem map @p m and all memory associated with it. You must NOT * free a map returned by evas_object_map_get() as this is internal. * * @param m map to free. */ EAPI void evas_map_free(Evas_Map *m); /** * Get a maps size. * * Returns the number of points in a map. Should be at least 4. * * @param m map to get size. * @return -1 on error, points otherwise. */ EAPI int evas_map_count_get(const Evas_Map *m) EINA_CONST; /** * Change the map point's coordinate. * * This sets the fixed point's coordinate in the map. Note that points * describe the outline of a quadrangle and are ordered either clockwise * or anti-clock-wise. It is suggested to keep your quadrangles concave and * non-complex, though these polygon modes may work, they may not render * a desired set of output. The quadrangle will use points 0 and 1 , 1 and 2, * 2 and 3, and 3 and 0 to describe the edges of the quadrangle. * * The X and Y and Z coordinates are in canvas units. Z is optional and may * or may not be honored in drawing. Z is a hint and does not affect the * X and Y rendered coordinates. It may be used for calculating fills with * perspective correct rendering. * * Remember all coordinates are canvas global ones like with move and resize * in evas. * * @param m map to change point. Must not be @c NULL. * @param idx index of point to change. Must be smaller than map size. * @param x Point X Coordinate * @param y Point Y Coordinate * @param z Point Z Coordinate hint (pre-perspective transform) * * @see evas_map_util_rotate() * @see evas_map_util_zoom() * @see evas_map_util_points_populate_from_object_full() * @see evas_map_util_points_populate_from_object() */ EAPI void evas_map_point_coord_set(Evas_Map *m, int idx, Evas_Coord x, Evas_Coord y, Evas_Coord z); /** * Get the map point's coordinate. * * This returns the coordinates of the given point in the map. * * @param m map to query point. * @param idx index of point to query. Must be smaller than map size. * @param x where to return the X coordinate. * @param y where to return the Y coordinate. * @param z where to return the Z coordinate. */ EAPI void evas_map_point_coord_get(const Evas_Map *m, int idx, Evas_Coord *x, Evas_Coord *y, Evas_Coord *z); /** * Change the map point's U and V texture source point * * This sets the U and V coordinates for the point. This determines which * coordinate in the source image is mapped to the given point, much like * OpenGL and textures. Notes that these points do select the pixel, but * are double floating point values to allow for accuracy and sub-pixel * selection. * * @param m map to change the point of. * @param idx index of point to change. Must be smaller than map size. * @param u the X coordinate within the image/texture source * @param v the Y coordinate within the image/texture source * * @see evas_map_point_coord_set() * @see evas_object_map_set() * @see evas_map_util_points_populate_from_object_full() * @see evas_map_util_points_populate_from_object() */ EAPI void evas_map_point_image_uv_set(Evas_Map *m, int idx, double u, double v); /** * Get the map point's U and V texture source points * * This returns the texture points set by evas_map_point_image_uv_set(). * * @param m map to query point. * @param idx index of point to query. Must be smaller than map size. * @param u where to write the X coordinate within the image/texture source * @param v where to write the Y coordinate within the image/texture source */ EAPI void evas_map_point_image_uv_get(const Evas_Map *m, int idx, double *u, double *v); /** * Set the color of a vertex in the map * * This sets the color of the vertex in the map. Colors will be linearly * interpolated between vertex points through the map. Color will multiply * the "texture" pixels (like GL_MODULATE in OpenGL). The default color of * a vertex in a map is white solid (255, 255, 255, 255) which means it will * have no affect on modifying the texture pixels. * * @param m map to change the color of. * @param idx index of point to change. Must be smaller than map size. * @param r red (0 - 255) * @param g green (0 - 255) * @param b blue (0 - 255) * @param a alpha (0 - 255) * * @see evas_map_util_points_color_set() * @see evas_map_point_coord_set() * @see evas_object_map_set() */ EAPI void evas_map_point_color_set(Evas_Map *m, int idx, int r, int g, int b, int a); /** * Get the color set on a vertex in the map * * This gets the color set by evas_map_point_color_set() on the given vertex * of the map. * * @param m map to get the color of the vertex from. * @param idx index of point get. Must be smaller than map size. * @param r pointer to red return * @param g pointer to green return * @param b pointer to blue return * @param a pointer to alpha return (0 - 255) * * @see evas_map_point_coord_set() * @see evas_object_map_set() */ EAPI void evas_map_point_color_get(const Evas_Map *m, int idx, int *r, int *g, int *b, int *a); /** * @} */ /** * @defgroup Evas_Object_Group_Size_Hints Size Hints * * Objects may carry hints, so that another object that acts as a * manager (see @ref Evas_Smart_Object_Group) may know how to properly * position and resize its subordinate objects. The Size Hints provide * a common interface that is recommended as the protocol for such * information. * * For example, box objects use alignment hints to align its * lines/columns inside its container, padding hints to set the * padding between each individual child, etc. * * Examples on their usage: * - @ref Example_Evas_Size_Hints "evas-hints.c" * - @ref Example_Evas_Aspect_Hints "evas-aspect-hints.c" * * @ingroup Evas_Object_Group */ /** * @addtogroup Evas_Object_Group_Size_Hints * @{ */ /** * Retrieves the hints for an object's minimum size. * * @param obj The given Evas object to query hints from. * @param w Pointer to an integer in which to store the minimum width. * @param h Pointer to an integer in which to store the minimum height. * * These are hints on the minimim sizes @p obj should have. This is * not a size enforcement in any way, it's just a hint that should be * used whenever appropriate. * * @note Use @c NULL pointers on the hint components you're not * interested in: they'll be ignored by the function. * * @see evas_object_size_hint_min_set() for an example */ EAPI void evas_object_size_hint_min_get(const Evas_Object *obj, Evas_Coord *w, Evas_Coord *h) EINA_ARG_NONNULL(1); /** * Sets the hints for an object's minimum size. * * @param obj The given Evas object to query hints from. * @param w Integer to use as the minimum width hint. * @param h Integer to use as the minimum height hint. * * This is not a size enforcement in any way, it's just a hint that * should be used whenever appropriate. * * Values @c 0 will be treated as unset hint components, when queried * by managers. * * Example: * @dontinclude evas-hints.c * @skip evas_object_size_hint_min_set * @until return * * In this example the minimum size hints change the behavior of an * Evas box when layouting its children. See the full @ref * Example_Evas_Size_Hints "example". * * @see evas_object_size_hint_min_get() */ EAPI void evas_object_size_hint_min_set(Evas_Object *obj, Evas_Coord w, Evas_Coord h) EINA_ARG_NONNULL(1); /** * Retrieves the hints for an object's maximum size. * * @param obj The given Evas object to query hints from. * @param w Pointer to an integer in which to store the maximum width. * @param h Pointer to an integer in which to store the maximum height. * * These are hints on the maximum sizes @p obj should have. This is * not a size enforcement in any way, it's just a hint that should be * used whenever appropriate. * * @note Use @c NULL pointers on the hint components you're not * interested in: they'll be ignored by the function. * * @see evas_object_size_hint_max_set() */ EAPI void evas_object_size_hint_max_get(const Evas_Object *obj, Evas_Coord *w, Evas_Coord *h) EINA_ARG_NONNULL(1); /** * Sets the hints for an object's maximum size. * * @param obj The given Evas object to query hints from. * @param w Integer to use as the maximum width hint. * @param h Integer to use as the maximum height hint. * * This is not a size enforcement in any way, it's just a hint that * should be used whenever appropriate. * * Values @c -1 will be treated as unset hint components, when queried * by managers. * * Example: * @dontinclude evas-hints.c * @skip evas_object_size_hint_max_set * @until return * * In this example the maximum size hints change the behavior of an * Evas box when layouting its children. See the full @ref * Example_Evas_Size_Hints "example". * * @see evas_object_size_hint_max_get() */ EAPI void evas_object_size_hint_max_set(Evas_Object *obj, Evas_Coord w, Evas_Coord h) EINA_ARG_NONNULL(1); /** * Retrieves the hints for an object's optimum size. * * @param obj The given Evas object to query hints from. * @param w Pointer to an integer in which to store the requested width. * @param h Pointer to an integer in which to store the requested height. * * These are hints on the optimum sizes @p obj should have. This is * not a size enforcement in any way, it's just a hint that should be * used whenever appropriate. * * @note Use @c NULL pointers on the hint components you're not * interested in: they'll be ignored by the function. * * @see evas_object_size_hint_request_set() */ EAPI void evas_object_size_hint_request_get(const Evas_Object *obj, Evas_Coord *w, Evas_Coord *h) EINA_ARG_NONNULL(1); /** * Sets the hints for an object's optimum size. * * @param obj The given Evas object to query hints from. * @param w Integer to use as the preferred width hint. * @param h Integer to use as the preferred height hint. * * This is not a size enforcement in any way, it's just a hint that * should be used whenever appropriate. * * Values @c 0 will be treated as unset hint components, when queried * by managers. * * @see evas_object_size_hint_request_get() */ EAPI void evas_object_size_hint_request_set(Evas_Object *obj, Evas_Coord w, Evas_Coord h) EINA_ARG_NONNULL(1); /** * Retrieves the hints for an object's aspect ratio. * * @param obj The given Evas object to query hints from. * @param aspect Returns the policy/type of aspect ratio applied to @p obj. * @param w Pointer to an integer in which to store the aspect's width * ratio term. * @param h Pointer to an integer in which to store the aspect's * height ratio term. * * The different aspect ratio policies are documented in the * #Evas_Aspect_Control type. A container respecting these size hints * would @b resize its children accordingly to those policies. * * For any policy, if any of the given aspect ratio terms are @c 0, * the object's container should ignore the aspect and scale @p obj to * occupy the whole available area. If they are both positive * integers, that proportion will be respected, under each scaling * policy. * * These images illustrate some of the #Evas_Aspect_Control policies: * * @image html any-policy.png * @image rtf any-policy.png * @image latex any-policy.eps * * @image html aspect-control-none-neither.png * @image rtf aspect-control-none-neither.png * @image latex aspect-control-none-neither.eps * * @image html aspect-control-both.png * @image rtf aspect-control-both.png * @image latex aspect-control-both.eps * * @image html aspect-control-horizontal.png * @image rtf aspect-control-horizontal.png * @image latex aspect-control-horizontal.eps * * This is not a size enforcement in any way, it's just a hint that * should be used whenever appropriate. * * @note Use @c NULL pointers on the hint components you're not * interested in: they'll be ignored by the function. * * Example: * @dontinclude evas-aspect-hints.c * @skip if (strcmp(ev->keyname, "c") == 0) * @until } * * See the full @ref Example_Evas_Aspect_Hints "example". * * @see evas_object_size_hint_aspect_set() */ EAPI void evas_object_size_hint_aspect_get(const Evas_Object *obj, Evas_Aspect_Control *aspect, Evas_Coord *w, Evas_Coord *h) EINA_ARG_NONNULL(1); /** * Sets the hints for an object's aspect ratio. * * @param obj The given Evas object to query hints from. * @param aspect The policy/type of aspect ratio to apply to @p obj. * @param w Integer to use as aspect width ratio term. * @param h Integer to use as aspect height ratio term. * * This is not a size enforcement in any way, it's just a hint that should * be used whenever appropriate. * * If any of the given aspect ratio terms are @c 0, * the object's container will ignore the aspect and scale @p obj to * occupy the whole available area, for any given policy. * * @see evas_object_size_hint_aspect_get() for more information. */ EAPI void evas_object_size_hint_aspect_set(Evas_Object *obj, Evas_Aspect_Control aspect, Evas_Coord w, Evas_Coord h) EINA_ARG_NONNULL(1); /** * Retrieves the hints for on object's alignment. * * @param obj The given Evas object to query hints from. * @param x Pointer to a double in which to store the horizontal * alignment hint. * @param y Pointer to a double in which to store the vertical * alignment hint. * * This is not a size enforcement in any way, it's just a hint that * should be used whenever appropriate. * * @note Use @c NULL pointers on the hint components you're not * interested in: they'll be ignored by the function. * @note If @c obj is invalid, then the hint components will be set with 0.5 * * @see evas_object_size_hint_align_set() for more information */ EAPI void evas_object_size_hint_align_get(const Evas_Object *obj, double *x, double *y) EINA_ARG_NONNULL(1); /** * Sets the hints for an object's alignment. * * @param obj The given Evas object to query hints from. * @param x Double, ranging from @c 0.0 to @c 1.0 or with the * special value #EVAS_HINT_FILL, to use as horizontal alignment hint. * @param y Double, ranging from @c 0.0 to @c 1.0 or with the * special value #EVAS_HINT_FILL, to use as vertical alignment hint. * * These are hints on how to align an object inside the boundaries * of a container/manager. Accepted values are in the @c 0.0 to @c * 1.0 range, with the special value #EVAS_HINT_FILL used to specify * "justify" or "fill" by some users. In this case, maximum size hints * should be enforced with higher priority, if they are set. Also, any * padding hint set on objects should add up to the alignment space on * the final scene composition. * * See documentation of possible users: in Evas, they are the @ref * Evas_Object_Box "box" and @ref Evas_Object_Table "table" smart * objects. * * For the horizontal component, @c 0.0 means to the left, @c 1.0 * means to the right. Analogously, for the vertical component, @c 0.0 * to the top, @c 1.0 means to the bottom. * * See the following figure: * * @image html alignment-hints.png * @image rtf alignment-hints.png * @image latex alignment-hints.eps * * This is not a size enforcement in any way, it's just a hint that * should be used whenever appropriate. * * Example: * @dontinclude evas-hints.c * @skip evas_object_size_hint_align_set * @until return * * In this example the alignment hints change the behavior of an Evas * box when layouting its children. See the full @ref * Example_Evas_Size_Hints "example". * * @see evas_object_size_hint_align_get() * @see evas_object_size_hint_max_set() * @see evas_object_size_hint_padding_set() */ EAPI void evas_object_size_hint_align_set(Evas_Object *obj, double x, double y) EINA_ARG_NONNULL(1); /** * Retrieves the hints for an object's weight. * * @param obj The given Evas object to query hints from. * @param x Pointer to a double in which to store the horizontal weight. * @param y Pointer to a double in which to store the vertical weight. * * Accepted values are zero or positive values. Some users might use * this hint as a boolean, but some might consider it as a @b * proportion, see documentation of possible users, which in Evas are * the @ref Evas_Object_Box "box" and @ref Evas_Object_Table "table" * smart objects. * * This is not a size enforcement in any way, it's just a hint that * should be used whenever appropriate. * * @note Use @c NULL pointers on the hint components you're not * interested in: they'll be ignored by the function. * @note If @c obj is invalid, then the hint components will be set with 0.0 * * @see evas_object_size_hint_weight_set() for an example */ EAPI void evas_object_size_hint_weight_get(const Evas_Object *obj, double *x, double *y) EINA_ARG_NONNULL(1); /** * Sets the hints for an object's weight. * * @param obj The given Evas object to query hints from. * @param x Nonnegative double value to use as horizontal weight hint. * @param y Nonnegative double value to use as vertical weight hint. * * This is not a size enforcement in any way, it's just a hint that * should be used whenever appropriate. * * This is a hint on how a container object should @b resize a given * child within its area. Containers may adhere to the simpler logic * of just expanding the child object's dimensions to fit its own (see * the #EVAS_HINT_EXPAND helper weight macro) or the complete one of * taking each child's weight hint as real @b weights to how much of * its size to allocate for them in each axis. A container is supposed * to, after @b normalizing the weights of its children (with weight * hints), distribute the space it has to layout them by those factors * -- most weighted children get larger in this process than the least * ones. * * Example: * @dontinclude evas-hints.c * @skip evas_object_size_hint_weight_set * @until return * * In this example the weight hints change the behavior of an Evas box * when layouting its children. See the full @ref * Example_Evas_Size_Hints "example". * * @see evas_object_size_hint_weight_get() for more information */ EAPI void evas_object_size_hint_weight_set(Evas_Object *obj, double x, double y) EINA_ARG_NONNULL(1); /** * Retrieves the hints for an object's padding space. * * @param obj The given Evas object to query hints from. * @param l Pointer to an integer in which to store left padding. * @param r Pointer to an integer in which to store right padding. * @param t Pointer to an integer in which to store top padding. * @param b Pointer to an integer in which to store bottom padding. * * Padding is extra space an object takes on each of its delimiting * rectangle sides, in canvas units. This space will be rendered * transparent, naturally, as in the following figure: * * @image html padding-hints.png * @image rtf padding-hints.png * @image latex padding-hints.eps * * This is not a size enforcement in any way, it's just a hint that * should be used whenever appropriate. * * @note Use @c NULL pointers on the hint components you're not * interested in: they'll be ignored by the function. * * Example: * @dontinclude evas-hints.c * @skip evas_object_size_hint_padding_set * @until return * * In this example the padding hints change the behavior of an Evas box * when layouting its children. See the full @ref * Example_Evas_Size_Hints "example". * * @see evas_object_size_hint_padding_set() */ EAPI void evas_object_size_hint_padding_get(const Evas_Object *obj, Evas_Coord *l, Evas_Coord *r, Evas_Coord *t, Evas_Coord *b) EINA_ARG_NONNULL(1); /** * Sets the hints for an object's padding space. * * @param obj The given Evas object to query hints from. * @param l Integer to specify left padding. * @param r Integer to specify right padding. * @param t Integer to specify top padding. * @param b Integer to specify bottom padding. * * This is not a size enforcement in any way, it's just a hint that * should be used whenever appropriate. * * @see evas_object_size_hint_padding_get() for more information */ EAPI void evas_object_size_hint_padding_set(Evas_Object *obj, Evas_Coord l, Evas_Coord r, Evas_Coord t, Evas_Coord b) EINA_ARG_NONNULL(1); /** * @} */ /** * @defgroup Evas_Object_Group_Extras Extra Object Manipulation * * Miscellaneous functions that also apply to any object, but are less * used or not implemented by all objects. * * Examples on this group of functions can be found @ref * Example_Evas_Stacking "here" and @ref Example_Evas_Events "here". * * @ingroup Evas_Object_Group */ /** * @addtogroup Evas_Object_Group_Extras * @{ */ /** * Set an attached data pointer to an object with a given string key. * * @param obj The object to attach the data pointer to * @param key The string key for the data to access it * @param data The pointer to the data to be attached * * This attaches the pointer @p data to the object @p obj, given the * access string @p key. This pointer will stay "hooked" to the object * until a new pointer with the same string key is attached with * evas_object_data_set() or it is deleted with * evas_object_data_del(). On deletion of the object @p obj, the * pointers will not be accessible from the object anymore. * * You can find the pointer attached under a string key using * evas_object_data_get(). It is the job of the calling application to * free any data pointed to by @p data when it is no longer required. * * If @p data is @c NULL, the old value stored at @p key will be * removed but no new value will be stored. This is synonymous with * calling evas_object_data_del() with @p obj and @p key. * * @note This function is very handy when you have data associated * specifically to an Evas object, being of use only when dealing with * it. Than you don't have the burden to a pointer to it elsewhere, * using this family of functions. * * Example: * * @code * int *my_data; * extern Evas_Object *obj; * * my_data = malloc(500); * evas_object_data_set(obj, "name_of_data", my_data); * printf("The data that was attached was %p\n", evas_object_data_get(obj, "name_of_data")); * @endcode */ EAPI void evas_object_data_set(Evas_Object *obj, const char *key, const void *data) EINA_ARG_NONNULL(1, 2); /** * Return an attached data pointer on an Evas object by its given * string key. * * @param obj The object to which the data was attached * @param key The string key the data was stored under * @return The data pointer stored, or @c NULL if none was stored * * This function will return the data pointer attached to the object * @p obj, stored using the string key @p key. If the object is valid * and a data pointer was stored under the given key, that pointer * will be returned. If this is not the case, @c NULL will be * returned, signifying an invalid object or a non-existent key. It is * possible that a @c NULL pointer was stored given that key, but this * situation is non-sensical and thus can be considered an error as * well. @c NULL pointers are never stored as this is the return value * if an error occurs. * * Example: * * @code * int *my_data; * extern Evas_Object *obj; * * my_data = evas_object_data_get(obj, "name_of_my_data"); * if (my_data) printf("Data stored was %p\n", my_data); * else printf("No data was stored on the object\n"); * @endcode */ EAPI void *evas_object_data_get(const Evas_Object *obj, const char *key) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2); /** * Delete an attached data pointer from an object. * * @param obj The object to delete the data pointer from * @param key The string key the data was stored under * @return The original data pointer stored at @p key on @p obj * * This will remove the stored data pointer from @p obj stored under * @p key and return this same pointer, if actually there was data * there, or @c NULL, if nothing was stored under that key. * * Example: * * @code * int *my_data; * extern Evas_Object *obj; * * my_data = evas_object_data_del(obj, "name_of_my_data"); * @endcode */ EAPI void *evas_object_data_del(Evas_Object *obj, const char *key) EINA_ARG_NONNULL(1, 2); /** * Set pointer behavior. * * @param obj * @param setting desired behavior. * * This function has direct effect on event callbacks related to * mouse. * * If @p setting is EVAS_OBJECT_POINTER_MODE_AUTOGRAB, then when mouse * is down at this object, events will be restricted to it as source, * mouse moves, for example, will be emitted even if outside this * object area. * * If @p setting is EVAS_OBJECT_POINTER_MODE_NOGRAB, then events will * be emitted just when inside this object area. * * The default value is EVAS_OBJECT_POINTER_MODE_AUTOGRAB. * * @ingroup Evas_Object_Group_Extras */ EAPI void evas_object_pointer_mode_set(Evas_Object *obj, Evas_Object_Pointer_Mode setting) EINA_ARG_NONNULL(1); /** * Determine how pointer will behave. * @param obj * @return pointer behavior. * @ingroup Evas_Object_Group_Extras */ EAPI Evas_Object_Pointer_Mode evas_object_pointer_mode_get(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Sets whether or not the given Evas object is to be drawn anti-aliased. * * @param obj The given Evas object. * @param antialias 1 if the object is to be anti_aliased, 0 otherwise. * @ingroup Evas_Object_Group_Extras */ EAPI void evas_object_anti_alias_set(Evas_Object *obj, Eina_Bool antialias) EINA_ARG_NONNULL(1); /** * Retrieves whether or not the given Evas object is to be drawn anti_aliased. * @param obj The given Evas object. * @return @c 1 if the object is to be anti_aliased. @c 0 otherwise. * @ingroup Evas_Object_Group_Extras */ EAPI Eina_Bool evas_object_anti_alias_get(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Sets the scaling factor for an Evas object. Does not affect all * objects. * * @param obj The given Evas object. * @param scale The scaling factor. 1.0 means no scaling, * default size. * * This will multiply the object's dimension by the given factor, thus * altering its geometry (width and height). Useful when you want * scalable UI elements, possibly at run time. * * @note Only text and textblock objects have scaling change * handlers. Other objects won't change visually on this call. * * @see evas_object_scale_get() * * @ingroup Evas_Object_Group_Extras */ EAPI void evas_object_scale_set(Evas_Object *obj, double scale) EINA_ARG_NONNULL(1); /** * Retrieves the scaling factor for the given Evas object. * * @param obj The given Evas object. * @return The scaling factor. * * @ingroup Evas_Object_Group_Extras * * @see evas_object_scale_set() */ EAPI double evas_object_scale_get(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Sets the render_op to be used for rendering the Evas object. * @param obj The given Evas object. * @param op one of the Evas_Render_Op values. * @ingroup Evas_Object_Group_Extras */ EAPI void evas_object_render_op_set(Evas_Object *obj, Evas_Render_Op op) EINA_ARG_NONNULL(1); /** * Retrieves the current value of the operation used for rendering the Evas object. * @param obj The given Evas object. * @return one of the enumerated values in Evas_Render_Op. * @ingroup Evas_Object_Group_Extras */ EAPI Evas_Render_Op evas_object_render_op_get(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Set whether to use precise (usually expensive) point collision * detection for a given Evas object. * * @param obj The given object. * @param precise Whether to use precise point collision detection or * not. The default value is false. * * Use this function to make Evas treat objects' transparent areas as * @b not belonging to it with regard to mouse pointer events. By * default, all of the object's boundary rectangle will be taken in * account for them. * * @warning By using precise point collision detection you'll be * making Evas more resource intensive. * * Example code follows. * @dontinclude evas-events.c * @skip if (strcmp(ev->keyname, "p") == 0) * @until } * * See the full example @ref Example_Evas_Events "here". * * @see evas_object_precise_is_inside_get() * @ingroup Evas_Object_Group_Extras */ EAPI void evas_object_precise_is_inside_set(Evas_Object *obj, Eina_Bool precise) EINA_ARG_NONNULL(1); /** * Determine whether an object is set to use precise point collision * detection. * * @param obj The given object. * @return whether @p obj is set to use precise point collision * detection or not The default value is false. * * @see evas_object_precise_is_inside_set() for an example * * @ingroup Evas_Object_Group_Extras */ EAPI Eina_Bool evas_object_precise_is_inside_get(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Set a hint flag on the given Evas object that it's used as a "static * clipper". * * @param obj The given object. * @param is_static_clip @c EINA_TRUE if it's to be used as a static * clipper, @c EINA_FALSE otherwise. * * This is a hint to Evas that this object is used as a big static * clipper and shouldn't be moved with children and otherwise * considered specially. The default value for new objects is * @c EINA_FALSE. * * @see evas_object_static_clip_get() * * @ingroup Evas_Object_Group_Extras */ EAPI void evas_object_static_clip_set(Evas_Object *obj, Eina_Bool is_static_clip) EINA_ARG_NONNULL(1); /** * Get the "static clipper" hint flag for a given Evas object. * * @param obj The given object. * @return @c EINA_TRUE if it's set as a static clipper, * @c EINA_FALSE otherwise. * * @see evas_object_static_clip_set() for more details * * @ingroup Evas_Object_Group_Extras */ EAPI Eina_Bool evas_object_static_clip_get(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * @} */ /** * @defgroup Evas_Object_Group_Find Finding Objects * * Functions that allows finding objects by their position, name or * other properties. * * @ingroup Evas_Object_Group */ /** * @addtogroup Evas_Object_Group_Find * @{ */ /** * Retrieve the object that currently has focus. * * @param e The Evas canvas to query for focused object on. * @return The object that has focus or @c NULL if there is not one. * * Evas can have (at most) one of its objects focused at a time. * Focused objects will be the ones having key events delivered * to, which the programmer can act upon by means of * evas_object_event_callback_add() usage. * * @note Most users wouldn't be dealing directly with Evas' focused * objects. Instead, they would be using a higher level library for * that (like a toolkit, as Elementary) to handle focus and who's * receiving input for them. * * This call returns the object that currently has focus on the canvas * @p e or @c NULL, if none. * * @see evas_object_focus_set * @see evas_object_focus_get * @see evas_object_key_grab * @see evas_object_key_ungrab * * Example: * @dontinclude evas-events.c * @skip evas_event_callback_add(d.canvas, EVAS_CALLBACK_CANVAS_OBJECT_FOCUS_IN, * @until evas_object_focus_set(d.bg, EINA_TRUE); * @dontinclude evas-events.c * @skip called when our rectangle gets focus * @until } * * In this example the @c event_info is exactly a pointer to that * focused rectangle. See the full @ref Example_Evas_Events "example". * * @ingroup Evas_Object_Group_Find */ EAPI Evas_Object *evas_focus_get(const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Retrieves the object on the given evas with the given name. * @param e The given evas. * @param name The given name. * @return If successful, the Evas object with the given name. Otherwise, * @c NULL. * * This looks for the evas object given a name by evas_object_name_set(). If * the name is not unique canvas-wide, then which one of the many objects * with that name is returned is undefined, so only use this if you can ensure * the object name is unique. * * @ingroup Evas_Object_Group_Find */ EAPI Evas_Object *evas_object_name_find(const Evas *e, const char *name) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Retrieves the object from children of the given object with the given name. * @param obj The parent (smart) object whose children to search. * @param name The given name. * @param recurse Set to the number of child levels to recurse (0 == don't recurse, 1 == only look at the children of @p obj or their immediate children, but no further etc.). * @return If successful, the Evas object with the given name. Otherwise, * @c NULL. * * This looks for the evas object given a name by evas_object_name_set(), but * it ONLY looks at the children of the object *p obj, and will only recurse * into those children if @p recurse is greater than 0. If the name is not * unique within immediate children (or the whole child tree) then it is not * defined which child object will be returned. If @p recurse is set to -1 then * it will recurse without limit. * * @since 1.2 * * @ingroup Evas_Object_Group_Find */ EAPI Evas_Object *evas_object_name_child_find(const Evas_Object *obj, const char *name, int recurse) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Retrieve the Evas object stacked at the top of a given position in * a canvas * * @param e A handle to the canvas. * @param x The horizontal coordinate of the position * @param y The vertical coordinate of the position * @param include_pass_events_objects Boolean flag to include or not * objects which pass events in this calculation * @param include_hidden_objects Boolean flag to include or not hidden * objects in this calculation * @return The Evas object that is over all other objects at the given * position. * * This function will traverse all the layers of the given canvas, * from top to bottom, querying for objects with areas covering the * given position. The user can remove from the query * objects which are hidden and/or which are set to pass events. * * @warning This function will @b skip objects parented by smart * objects, acting only on the ones at the "top level", with regard to * object parenting. */ EAPI Evas_Object *evas_object_top_at_xy_get(const Evas *e, Evas_Coord x, Evas_Coord y, Eina_Bool include_pass_events_objects, Eina_Bool include_hidden_objects) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Retrieve the Evas object stacked at the top at the position of the * mouse cursor, over a given canvas * * @param e A handle to the canvas. * @return The Evas object that is over all other objects at the mouse * pointer's position * * This function will traverse all the layers of the given canvas, * from top to bottom, querying for objects with areas covering the * mouse pointer's position, over @p e. * * @warning This function will @b skip objects parented by smart * objects, acting only on the ones at the "top level", with regard to * object parenting. */ EAPI Evas_Object *evas_object_top_at_pointer_get(const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Retrieve the Evas object stacked at the top of a given rectangular * region in a canvas * * @param e A handle to the canvas. * @param x The top left corner's horizontal coordinate for the * rectangular region * @param y The top left corner's vertical coordinate for the * rectangular region * @param w The width of the rectangular region * @param h The height of the rectangular region * @param include_pass_events_objects Boolean flag to include or not * objects which pass events in this calculation * @param include_hidden_objects Boolean flag to include or not hidden * objects in this calculation * @return The Evas object that is over all other objects at the given * rectangular region. * * This function will traverse all the layers of the given canvas, * from top to bottom, querying for objects with areas overlapping * with the given rectangular region inside @p e. The user can remove * from the query objects which are hidden and/or which are set to * pass events. * * @warning This function will @b skip objects parented by smart * objects, acting only on the ones at the "top level", with regard to * object parenting. */ EAPI Evas_Object *evas_object_top_in_rectangle_get(const Evas *e, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h, Eina_Bool include_pass_events_objects, Eina_Bool include_hidden_objects) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Retrieve a list of Evas objects lying over a given position in * a canvas * * @param e A handle to the canvas. * @param x The horizontal coordinate of the position * @param y The vertical coordinate of the position * @param include_pass_events_objects Boolean flag to include or not * objects which pass events in this calculation * @param include_hidden_objects Boolean flag to include or not hidden * objects in this calculation * @return The list of Evas objects that are over the given position * in @p e * * This function will traverse all the layers of the given canvas, * from top to bottom, querying for objects with areas covering the * given position. The user can remove from query * objects which are hidden and/or which are set to pass events. * * @warning This function will @b skip objects parented by smart * objects, acting only on the ones at the "top level", with regard to * object parenting. */ EAPI Eina_List *evas_objects_at_xy_get(const Evas *e, Evas_Coord x, Evas_Coord y, Eina_Bool include_pass_events_objects, Eina_Bool include_hidden_objects) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); EAPI Eina_List *evas_objects_in_rectangle_get(const Evas *e, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h, Eina_Bool include_pass_events_objects, Eina_Bool include_hidden_objects) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Get the lowest (stacked) Evas object on the canvas @p e. * * @param e a valid canvas pointer * @return a pointer to the lowest object on it, if any, or @c NULL, * otherwise * * This function will take all populated layers in the canvas into * account, getting the lowest object for the lowest layer, naturally. * * @see evas_object_layer_get() * @see evas_object_layer_set() * @see evas_object_below_get() * @see evas_object_above_get() * * @warning This function will @b skip objects parented by smart * objects, acting only on the ones at the "top level", with regard to * object parenting. */ EAPI Evas_Object *evas_object_bottom_get(const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Get the highest (stacked) Evas object on the canvas @p e. * * @param e a valid canvas pointer * @return a pointer to the highest object on it, if any, or @c NULL, * otherwise * * This function will take all populated layers in the canvas into * account, getting the highest object for the highest layer, * naturally. * * @see evas_object_layer_get() * @see evas_object_layer_set() * @see evas_object_below_get() * @see evas_object_above_get() * * @warning This function will @b skip objects parented by smart * objects, acting only on the ones at the "top level", with regard to * object parenting. */ EAPI Evas_Object *evas_object_top_get(const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * @} */ /** * @defgroup Evas_Object_Group_Interceptors Object Method Interceptors * * Evas provides a way to intercept method calls. The interceptor * callback may opt to completely deny the call, or may check and * change the parameters before continuing. The continuation of an * intercepted call is done by calling the intercepted call again, * from inside the interceptor callback. * * @ingroup Evas_Object_Group */ /** * @addtogroup Evas_Object_Group_Interceptors * @{ */ typedef void (*Evas_Object_Intercept_Show_Cb)(void *data, Evas_Object *obj); typedef void (*Evas_Object_Intercept_Hide_Cb)(void *data, Evas_Object *obj); typedef void (*Evas_Object_Intercept_Move_Cb)(void *data, Evas_Object *obj, Evas_Coord x, Evas_Coord y); typedef void (*Evas_Object_Intercept_Resize_Cb)(void *data, Evas_Object *obj, Evas_Coord w, Evas_Coord h); typedef void (*Evas_Object_Intercept_Raise_Cb)(void *data, Evas_Object *obj); typedef void (*Evas_Object_Intercept_Lower_Cb)(void *data, Evas_Object *obj); typedef void (*Evas_Object_Intercept_Stack_Above_Cb)(void *data, Evas_Object *obj, Evas_Object *above); typedef void (*Evas_Object_Intercept_Stack_Below_Cb)(void *data, Evas_Object *obj, Evas_Object *above); typedef void (*Evas_Object_Intercept_Layer_Set_Cb)(void *data, Evas_Object *obj, int l); typedef void (*Evas_Object_Intercept_Color_Set_Cb)(void *data, Evas_Object *obj, int r, int g, int b, int a); typedef void (*Evas_Object_Intercept_Clip_Set_Cb)(void *data, Evas_Object *obj, Evas_Object *clip); typedef void (*Evas_Object_Intercept_Clip_Unset_Cb)(void *data, Evas_Object *obj); /** * Set the callback function that intercepts a show event of a object. * * @param obj The given canvas object pointer. * @param func The given function to be the callback function. * @param data The data passed to the callback function. * * This function sets a callback function to intercepts a show event * of a canvas object. * * @see evas_object_intercept_show_callback_del(). * */ EAPI void evas_object_intercept_show_callback_add(Evas_Object *obj, Evas_Object_Intercept_Show_Cb func, const void *data) EINA_ARG_NONNULL(1, 2); /** * Unset the callback function that intercepts a show event of a * object. * * @param obj The given canvas object pointer. * @param func The given callback function. * * This function sets a callback function to intercepts a show event * of a canvas object. * * @see evas_object_intercept_show_callback_add(). * */ EAPI void *evas_object_intercept_show_callback_del(Evas_Object *obj, Evas_Object_Intercept_Show_Cb func) EINA_ARG_NONNULL(1, 2); /** * Set the callback function that intercepts a hide event of a object. * * @param obj The given canvas object pointer. * @param func The given function to be the callback function. * @param data The data passed to the callback function. * * This function sets a callback function to intercepts a hide event * of a canvas object. * * @see evas_object_intercept_hide_callback_del(). * */ EAPI void evas_object_intercept_hide_callback_add(Evas_Object *obj, Evas_Object_Intercept_Hide_Cb func, const void *data) EINA_ARG_NONNULL(1, 2); /** * Unset the callback function that intercepts a hide event of a * object. * * @param obj The given canvas object pointer. * @param func The given callback function. * * This function sets a callback function to intercepts a hide event * of a canvas object. * * @see evas_object_intercept_hide_callback_add(). * */ EAPI void *evas_object_intercept_hide_callback_del(Evas_Object *obj, Evas_Object_Intercept_Hide_Cb func) EINA_ARG_NONNULL(1, 2); /** * Set the callback function that intercepts a move event of a object. * * @param obj The given canvas object pointer. * @param func The given function to be the callback function. * @param data The data passed to the callback function. * * This function sets a callback function to intercepts a move event * of a canvas object. * * @see evas_object_intercept_move_callback_del(). * */ EAPI void evas_object_intercept_move_callback_add(Evas_Object *obj, Evas_Object_Intercept_Move_Cb func, const void *data) EINA_ARG_NONNULL(1, 2); /** * Unset the callback function that intercepts a move event of a * object. * * @param obj The given canvas object pointer. * @param func The given callback function. * * This function sets a callback function to intercepts a move event * of a canvas object. * * @see evas_object_intercept_move_callback_add(). * */ EAPI void *evas_object_intercept_move_callback_del(Evas_Object *obj, Evas_Object_Intercept_Move_Cb func) EINA_ARG_NONNULL(1, 2); EAPI void evas_object_intercept_resize_callback_add(Evas_Object *obj, Evas_Object_Intercept_Resize_Cb func, const void *data) EINA_ARG_NONNULL(1, 2); EAPI void *evas_object_intercept_resize_callback_del(Evas_Object *obj, Evas_Object_Intercept_Resize_Cb func) EINA_ARG_NONNULL(1, 2); EAPI void evas_object_intercept_raise_callback_add(Evas_Object *obj, Evas_Object_Intercept_Raise_Cb func, const void *data) EINA_ARG_NONNULL(1, 2); EAPI void *evas_object_intercept_raise_callback_del(Evas_Object *obj, Evas_Object_Intercept_Raise_Cb func) EINA_ARG_NONNULL(1, 2); EAPI void evas_object_intercept_lower_callback_add(Evas_Object *obj, Evas_Object_Intercept_Lower_Cb func, const void *data) EINA_ARG_NONNULL(1, 2); EAPI void *evas_object_intercept_lower_callback_del(Evas_Object *obj, Evas_Object_Intercept_Lower_Cb func) EINA_ARG_NONNULL(1, 2); EAPI void evas_object_intercept_stack_above_callback_add(Evas_Object *obj, Evas_Object_Intercept_Stack_Above_Cb func, const void *data) EINA_ARG_NONNULL(1, 2); EAPI void *evas_object_intercept_stack_above_callback_del(Evas_Object *obj, Evas_Object_Intercept_Stack_Above_Cb func) EINA_ARG_NONNULL(1, 2); EAPI void evas_object_intercept_stack_below_callback_add(Evas_Object *obj, Evas_Object_Intercept_Stack_Below_Cb func, const void *data) EINA_ARG_NONNULL(1, 2); EAPI void *evas_object_intercept_stack_below_callback_del(Evas_Object *obj, Evas_Object_Intercept_Stack_Below_Cb func) EINA_ARG_NONNULL(1, 2); EAPI void evas_object_intercept_layer_set_callback_add(Evas_Object *obj, Evas_Object_Intercept_Layer_Set_Cb func, const void *data) EINA_ARG_NONNULL(1, 2); EAPI void *evas_object_intercept_layer_set_callback_del(Evas_Object *obj, Evas_Object_Intercept_Layer_Set_Cb func) EINA_ARG_NONNULL(1, 2); EAPI void evas_object_intercept_color_set_callback_add(Evas_Object *obj, Evas_Object_Intercept_Color_Set_Cb func, const void *data) EINA_ARG_NONNULL(1, 2); EAPI void *evas_object_intercept_color_set_callback_del(Evas_Object *obj, Evas_Object_Intercept_Color_Set_Cb func) EINA_ARG_NONNULL(1, 2); EAPI void evas_object_intercept_clip_set_callback_add(Evas_Object *obj, Evas_Object_Intercept_Clip_Set_Cb func, const void *data) EINA_ARG_NONNULL(1, 2); EAPI void *evas_object_intercept_clip_set_callback_del(Evas_Object *obj, Evas_Object_Intercept_Clip_Set_Cb func) EINA_ARG_NONNULL(1, 2); EAPI void evas_object_intercept_clip_unset_callback_add(Evas_Object *obj, Evas_Object_Intercept_Clip_Unset_Cb func, const void *data) EINA_ARG_NONNULL(1, 2); EAPI void *evas_object_intercept_clip_unset_callback_del(Evas_Object *obj, Evas_Object_Intercept_Clip_Unset_Cb func) EINA_ARG_NONNULL(1, 2); /** * @} */ /** * @defgroup Evas_Object_Specific Specific Object Functions * * Functions that work on specific objects. * */ /** * @defgroup Evas_Object_Rectangle Rectangle Object Functions * * @brief Function to create evas rectangle objects. * * There is only one function to deal with rectangle objects, this may make this * function seem useless given there are no functions to manipulate the created * rectangle, however the rectangle is actually very useful and should be * manipulated using the generic @ref Evas_Object_Group "evas object functions". * * The evas rectangle serves a number of key functions when working on evas * programs: * @li Background * @li Debugging * @li Clipper * * @section Background * * One extremely common requirement of evas programs is to have a solid color * background, this can be accomplished with the following very simple code: * @code * Evas_Object *bg = evas_object_rectangle_add(evas_canvas); * //Here we set the rectangles red, green, blue and opacity levels * evas_object_color_set(bg, 255, 255, 255, 255); // opaque white background * evas_object_resize(bg, WIDTH, HEIGHT); // covers full canvas * evas_object_show(bg); * @endcode * * This however will have issues if the @c evas_canvas is resized, however most * windows are created using ecore evas and that has a solution to using the * rectangle as a background: * @code * Evas_Object *bg = evas_object_rectangle_add(ecore_evas_get(ee)); * //Here we set the rectangles red, green, blue and opacity levels * evas_object_color_set(bg, 255, 255, 255, 255); // opaque white background * evas_object_resize(bg, WIDTH, HEIGHT); // covers full canvas * evas_object_show(bg); * ecore_evas_object_associate(ee, bg, ECORE_EVAS_OBJECT_ASSOCIATE_BASE); * @endcode * So this gives us a white background to our window that will be resized * together with it. * * @section Debugging * * Debugging is a major part of any programmers task and when debugging visual * issues with evas programs the rectangle is an extremely useful tool. The * rectangle's simplicity means that it's easier to pinpoint issues with it than * with more complex objects. Therefore a common technique to use when writing * an evas program and not getting the desired visual result is to replace the * misbehaving object for a solid color rectangle and seeing how it interacts * with the other elements, this often allows us to notice clipping, parenting * or positioning issues. Once the issues have been identified and corrected the * rectangle can be replaced for the original part and in all likelihood any * remaining issues will be specific to that object's type. * * @section clipping Clipping * * Clipping serves two main functions: * @li Limiting visibility(i.e. hiding portions of an object). * @li Applying a layer of color to an object. * * @subsection hiding Limiting visibility * * It is often necessary to show only parts of an object, while it may be * possible to create an object that corresponds only to the part that must be * shown(and it isn't always possible) it's usually easier to use a a clipper. A * clipper is a rectangle that defines what's visible and what is not. The way * to do this is to create a solid white rectangle(which is the default, no need * to call evas_object_color_set()) and give it a position and size of what * should be visible. The following code exemplifies showing the center half of * @c my_evas_object: * @code * Evas_Object *clipper = evas_object_rectangle_add(evas_canvas); * evas_object_move(clipper, my_evas_object_x / 4, my_evas_object_y / 4); * evas_object_resize(clipper, my_evas_object_width / 2, my_evas_object_height / 2); * evas_object_clip_set(my_evas_object, clipper); * evas_object_show(clipper); * @endcode * * @subsection color Layer of color * * In the @ref clipping section we used a solid white clipper, which produced no * change in the color of the clipped object, it just hid what was outside the * clippers area. It is however sometimes desirable to change the of color an * object, this can be accomplished using a clipper that has a non-white color. * Clippers with color work by multiplying the colors of clipped object. The * following code will show how to remove all the red from an object: * @code * Evas_Object *clipper = evas_object_rectangle_add(evas); * evas_object_move(clipper, my_evas_object_x, my_evas_object_y); * evas_object_resize(clipper, my_evas_object_width, my_evas_object_height); * evas_object_color_set(clipper, 0, 255, 255, 255); * evas_object_clip_set(obj, clipper); * evas_object_show(clipper); * @endcode * * @warning We don't guarantee any proper results if you create a Rectangle * object without setting the evas engine. * * For an example that more fully exercise the use of an evas object rectangle * see @ref Example_Evas_Object_Manipulation. * * @ingroup Evas_Object_Specific */ /** * Adds a rectangle to the given evas. * @param e The given evas. * @return The new rectangle object. * * @ingroup Evas_Object_Rectangle */ EAPI Evas_Object *evas_object_rectangle_add(Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC; /** * @defgroup Evas_Object_Image Image Object Functions * * Here are grouped together functions used to create and manipulate * image objects. They are available to whichever occasion one needs * complex imagery on a GUI that could not be achieved by the other * Evas' primitive object types, or to make image manipulations. * * Evas will support whichever image file types it was compiled with * support to (its image loaders) -- check your software packager for * that information and see * evas_object_image_extension_can_load_get(). * * @section Evas_Object_Image_Basics Image object basics * * The most common use of image objects -- to display an image on the * canvas -- is achieved by a common function triplet: * @code * img = evas_object_image_add(canvas); * evas_object_image_file_set(img, "path/to/img", NULL); * evas_object_image_fill_set(img, 0, 0, w, h); * @endcode * The first function, naturally, is creating the image object. Then, * one must set an source file on it, so that it knows where to fetch * image data from. Next, one must set how to fill the image * object's area with that given pixel data. One could use just a * sub-region of the original image or even have it tiled repeatedly * on the image object. For the common case of having the whole source * image to be displayed on the image object, stretched to the * destination's size, there's also a function helper, to be used * instead of evas_object_image_fill_set(): * @code * evas_object_image_filled_set(img, EINA_TRUE); * @endcode * See those functions' documentation for more details. * * @section Evas_Object_Image_Scale Scale and resizing * * Resizing of image objects will scale their respective source images * to their areas, if they are set to "fill" the object's area * (evas_object_image_filled_set()). If the user wants any control on * the aspect ratio of an image for different sizes, he/she has to * take care of that themselves. There are functions to make images to * get loaded scaled (up or down) in memory, already, if the user is * going to use them at pre-determined sizes and wants to save * computations. * * Evas has even a scale cache, which will take care of caching scaled * versions of images with more often usage/hits. Finally, one can * have images being rescaled @b smoothly by Evas (more * computationally expensive) or not. * * @section Evas_Object_Image_Performance Performance hints * * When dealing with image objects, there are some tricks to boost the * performance of your application, if it does intense image loading * and/or manipulations, as in animations on a UI. * * @subsection Evas_Object_Image_Load Load hints * * In image viewer applications, for example, the user will be looking * at a given image, at full size, and will desire that the navigation * to the adjacent images on his/her album be fluid and fast. Thus, * while displaying a given image, the program can be on the * background loading the next and previous images already, so that * displaying them on the sequence is just a matter of repainting the * screen (and not decoding image data). * * Evas addresses this issue with image pre-loading. The code * for the situation above would be something like the following: * @code * prev = evas_object_image_filled_add(canvas); * evas_object_image_file_set(prev, "/path/to/prev", NULL); * evas_object_image_preload(prev, EINA_TRUE); * * next = evas_object_image_filled_add(canvas); * evas_object_image_file_set(next, "/path/to/next", NULL); * evas_object_image_preload(next, EINA_TRUE); * @endcode * * If you're loading images which are too big, consider setting * previously it's loading size to something smaller, in case you * won't expose them in real size. It may speed up the loading * considerably: * @code * //to load a scaled down version of the image in memory, if that's * //the size you'll be displaying it anyway * evas_object_image_load_scale_down_set(img, zoom); * * //optional: if you know you'll be showing a sub-set of the image's * //pixels, you can avoid loading the complementary data * evas_object_image_load_region_set(img, x, y, w, h); * @endcode * Refer to Elementary's Photocam widget for a high level (smart) * object which does lots of loading speed-ups for you. * * @subsection Evas_Object_Image_Animation Animation hints * * If you want to animate image objects on a UI (what you'd get by * concomitant usage of other libraries, like Ecore and Edje), there * are also some tips on how to boost the performance of your * application. If the animation involves resizing of an image (thus, * re-scaling), you'd better turn off smooth scaling on it @b during * the animation, turning it back on afterwards, for less * computations. Also, in this case you'd better flag the image object * in question not to cache scaled versions of it: * @code * evas_object_image_scale_hint_set(wd->img, EVAS_IMAGE_SCALE_HINT_DYNAMIC); * * // resizing takes place in between * * evas_object_image_scale_hint_set(wd->img, EVAS_IMAGE_SCALE_HINT_STATIC); * @endcode * * Finally, movement of opaque images through the canvas is less * expensive than of translucid ones, because of blending * computations. * * @section Evas_Object_Image_Borders Borders * * Evas provides facilities for one to specify an image's region to be * treated specially -- as "borders". This will make those regions be * treated specially on resizing scales, by keeping their aspect. This * makes setting frames around other objects on UIs easy. * See the following figures for a visual explanation:\n * @htmlonly * *
Full-size * @endhtmlonly * @image rtf image-borders.png * @image latex image-borders.eps width=\textwidth * @htmlonly * * Full-size * @endhtmlonly * @image rtf border-effect.png * @image latex border-effect.eps width=\textwidth * * @section Evas_Object_Image_Manipulation Manipulating pixels * * Evas image objects can be used to manipulate raw pixels in many * ways. The meaning of the data in the pixel arrays will depend on * the image's color space, be warned (see next section). You can set * your own data as an image's pixel data, fetch an image's pixel data * for saving/altering, convert images between different color spaces * and even advanced operations like setting a native surface as image * objects' data. * * @section Evas_Object_Image_Color_Spaces Color spaces * * Image objects may return or accept "image data" in multiple * formats. This is based on the color space of an object. Here is a * rundown on formats: * * - #EVAS_COLORSPACE_ARGB8888: * This pixel format is a linear block of pixels, starting at the * top-left row by row until the bottom right of the image or pixel * region. All pixels are 32-bit unsigned int's with the high-byte * being alpha and the low byte being blue in the format ARGB. Alpha * may or may not be used by evas depending on the alpha flag of the * image, but if not used, should be set to 0xff anyway. * \n\n * This colorspace uses premultiplied alpha. That means that R, G * and B cannot exceed A in value. The conversion from * non-premultiplied colorspace is: * \n\n * R = (r * a) / 255; G = (g * a) / 255; B = (b * a) / 255; * \n\n * So 50% transparent blue will be: 0x80000080. This will not be * "dark" - just 50% transparent. Values are 0 == black, 255 == * solid or full red, green or blue. * . * - #EVAS_COLORSPACE_YCBCR422P601_PL: * This is a pointer-list indirected set of YUV (YCbCr) pixel * data. This means that the data returned or set is not actual * pixel data, but pointers TO lines of pixel data. The list of * pointers will first be N rows of pointers to the Y plane - * pointing to the first pixel at the start of each row in the Y * plane. N is the height of the image data in pixels. Each pixel in * the Y, U and V planes is 1 byte exactly, packed. The next N / 2 * pointers will point to rows in the U plane, and the next N / 2 * pointers will point to the V plane rows. U and V planes are half * the horizontal and vertical resolution of the Y plane. * \n\n * Row order is top to bottom and row pixels are stored left to * right. * \n\n * There is a limitation that these images MUST be a multiple of 2 * pixels in size horizontally or vertically. This is due to the U * and V planes being half resolution. Also note that this assumes * the itu601 YUV colorspace specification. This is defined for * standard television and mpeg streams. HDTV may use the itu709 * specification. * \n\n * Values are 0 to 255, indicating full or no signal in that plane * respectively. * . * - #EVAS_COLORSPACE_YCBCR422P709_PL: * Not implemented yet. * . * - #EVAS_COLORSPACE_RGB565_A5P: * In the process of being implemented in 1 engine only. This may * change. * \n\n * This is a pointer to image data for 16-bit half-word pixel data * in 16bpp RGB 565 format (5 bits red, 6 bits green, 5 bits blue), * with the high-byte containing red and the low byte containing * blue, per pixel. This data is packed row by row from the top-left * to the bottom right. * \n\n * If the image has an alpha channel enabled there will be an extra * alpha plane after the color pixel plane. If not, then this data * will not exist and should not be accessed in any way. This plane * is a set of pixels with 1 byte per pixel defining the alpha * values of all pixels in the image from the top-left to the bottom * right of the image, row by row. Even though the values of the * alpha pixels can be 0 to 255, only values 0 through to 32 are * used, 32 being solid and 0 being transparent. * \n\n * RGB values can be 0 to 31 for red and blue and 0 to 63 for green, * with 0 being black and 31 or 63 being full red, green or blue * respectively. This colorspace is also pre-multiplied like * EVAS_COLORSPACE_ARGB8888 so: * \n\n * R = (r * a) / 32; G = (g * a) / 32; B = (b * a) / 32; * . * - #EVAS_COLORSPACE_GRY8: * The image is just a alpha mask (8 bit's per pixel). This is used * for alpha masking. * * @warning We don't guarantee any proper results if you create a Image object * without setting the evas engine. * * Some examples on this group of functions can be found @ref * Example_Evas_Images "here". * * @ingroup Evas_Object_Specific */ /** * @addtogroup Evas_Object_Image * @{ */ typedef void (*Evas_Object_Image_Pixels_Get_Cb)(void *data, Evas_Object *o); /** * Creates a new image object on the given Evas @p e canvas. * * @param e The given canvas. * @return The created image object handle. * * @note If you intend to @b display an image somehow in a GUI, * besides binding it to a real image file/source (with * evas_object_image_file_set(), for example), you'll have to tell * this image object how to fill its space with the pixels it can get * from the source. See evas_object_image_filled_add(), for a helper * on the common case of scaling up an image source to the whole area * of the image object. * * @see evas_object_image_fill_set() * * Example: * @code * img = evas_object_image_add(canvas); * evas_object_image_file_set(img, "/path/to/img", NULL); * @endcode */ EAPI Evas_Object *evas_object_image_add(Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC; /** * Creates a new image object that @b automatically scales its bound * image to the object's area, on both axis. * * @param e The given canvas. * @return The created image object handle. * * This is a helper function around evas_object_image_add() and * evas_object_image_filled_set(). It has the same effect of applying * those functions in sequence, which is a very common use case. * * @note Whenever this object gets resized, the bound image will be * rescaled, too. * * @see evas_object_image_add() * @see evas_object_image_filled_set() * @see evas_object_image_fill_set() */ EAPI Evas_Object *evas_object_image_filled_add(Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC; /** * Sets the data for an image from memory to be loaded * * This is the same as evas_object_image_file_set() but the file to be loaded * may exist at an address in memory (the data for the file, not the filename * itself). The @p data at the address is copied and stored for future use, so * no @p data needs to be kept after this call is made. It will be managed and * freed for you when no longer needed. The @p size is limited to 2 gigabytes * in size, and must be greater than 0. A @c NULL @p data pointer is also * invalid. Set the filename to @c NULL to reset to empty state and have the * image file data freed from memory using evas_object_image_file_set(). * * The @p format is optional (pass @c NULL if you don't need/use it). It is * used to help Evas guess better which loader to use for the data. It may * simply be the "extension" of the file as it would normally be on disk * such as "jpg" or "png" or "gif" etc. * * @param obj The given image object. * @param data The image file data address * @param size The size of the image file data in bytes * @param format The format of the file (optional), or @c NULL if not needed * @param key The image key in file, or @c NULL. */ EAPI void evas_object_image_memfile_set(Evas_Object *obj, void *data, int size, char *format, char *key) EINA_ARG_NONNULL(1, 2); /** * Set the source file from where an image object must fetch the real * image data (it may be an Eet file, besides pure image ones). * * @param obj The given image object. * @param file The image file path. * @param key The image key in @p file (if its an Eet one), or @c * NULL, otherwise. * * If the file supports multiple data stored in it (as Eet files do), * you can specify the key to be used as the index of the image in * this file. * * Example: * @code * img = evas_object_image_add(canvas); * evas_object_image_file_set(img, "/path/to/img", NULL); * err = evas_object_image_load_error_get(img); * if (err != EVAS_LOAD_ERROR_NONE) * { * fprintf(stderr, "could not load image '%s'. error string is \"%s\"\n", * valid_path, evas_load_error_str(err)); * } * else * { * evas_object_image_fill_set(img, 0, 0, w, h); * evas_object_resize(img, w, h); * evas_object_show(img); * } * @endcode */ EAPI void evas_object_image_file_set(Evas_Object *obj, const char *file, const char *key) EINA_ARG_NONNULL(1); /** * Retrieve the source file from where an image object is to fetch the * real image data (it may be an Eet file, besides pure image ones). * * @param obj The given image object. * @param file Location to store the image file path. * @param key Location to store the image key (if @p file is an Eet * one). * * You must @b not modify the strings on the returned pointers. * * @note Use @c NULL pointers on the file components you're not * interested in: they'll be ignored by the function. */ EAPI void evas_object_image_file_get(const Evas_Object *obj, const char **file, const char **key) EINA_ARG_NONNULL(1, 2); /** * Set the dimensions for an image object's border, a region which @b * won't ever be scaled together with its center. * * @param obj The given image object. * @param l The border's left width. * @param r The border's right width. * @param t The border's top width. * @param b The border's bottom width. * * When Evas is rendering, an image source may be scaled to fit the * size of its image object. This function sets an area from the * borders of the image inwards which is @b not to be scaled. This * function is useful for making frames and for widget theming, where, * for example, buttons may be of varying sizes, but their border size * must remain constant. * * The units used for @p l, @p r, @p t and @p b are canvas units. * * @note The border region itself @b may be scaled by the * evas_object_image_border_scale_set() function. * * @note By default, image objects have no borders set, i. e. @c l, @c * r, @c t and @c b start as @c 0. * * See the following figures for visual explanation:\n * @htmlonly * * Full-size * @endhtmlonly * @image rtf image-borders.png * @image latex image-borders.eps width=\textwidth * @htmlonly * * Full-size * @endhtmlonly * @image rtf border-effect.png * @image latex border-effect.eps width=\textwidth * * @see evas_object_image_border_get() * @see evas_object_image_border_center_fill_set() */ EAPI void evas_object_image_border_set(Evas_Object *obj, int l, int r, int t, int b) EINA_ARG_NONNULL(1); /** * Retrieve the dimensions for an image object's border, a region * which @b won't ever be scaled together with its center. * * @param obj The given image object. * @param l Location to store the border's left width in. * @param r Location to store the border's right width in. * @param t Location to store the border's top width in. * @param b Location to store the border's bottom width in. * * @note Use @c NULL pointers on the border components you're not * interested in: they'll be ignored by the function. * * See @ref evas_object_image_border_set() for more details. */ EAPI void evas_object_image_border_get(const Evas_Object *obj, int *l, int *r, int *t, int *b) EINA_ARG_NONNULL(1); /** * Sets @b how the center part of the given image object (not the * borders) should be drawn when Evas is rendering it. * * @param obj The given image object. * @param fill Fill mode of the center region of @p obj (a value in * #Evas_Border_Fill_Mode). * * This function sets how the center part of the image object's source * image is to be drawn, which must be one of the values in * #Evas_Border_Fill_Mode. By center we mean the complementary part of * that defined by evas_object_image_border_set(). This one is very * useful for making frames and decorations. You would most probably * also be using a filled image (as in evas_object_image_filled_set()) * to use as a frame. * * @see evas_object_image_border_center_fill_get() */ EAPI void evas_object_image_border_center_fill_set(Evas_Object *obj, Evas_Border_Fill_Mode fill) EINA_ARG_NONNULL(1); /** * Retrieves @b how the center part of the given image object (not the * borders) is to be drawn when Evas is rendering it. * * @param obj The given image object. * @return fill Fill mode of the center region of @p obj (a value in * #Evas_Border_Fill_Mode). * * See @ref evas_object_image_fill_set() for more details. */ EAPI Evas_Border_Fill_Mode evas_object_image_border_center_fill_get(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Set whether the image object's fill property should track the * object's size. * * @param obj The given image object. * @param setting @c EINA_TRUE, to make the fill property follow * object size or @c EINA_FALSE, otherwise. * * If @p setting is @c EINA_TRUE, then every evas_object_resize() will * @b automatically trigger a call to evas_object_image_fill_set() * with the that new size (and @c 0, @c 0 as source image's origin), * so the bound image will fill the whole object's area. * * @see evas_object_image_filled_add() * @see evas_object_image_fill_get() */ EAPI void evas_object_image_filled_set(Evas_Object *obj, Eina_Bool setting) EINA_ARG_NONNULL(1); /** * Retrieve whether the image object's fill property should track the * object's size. * * @param obj The given image object. * @return @c EINA_TRUE if it is tracking, @c EINA_FALSE, if not (and * evas_object_fill_set() must be called manually). * * @see evas_object_image_filled_set() for more information */ EAPI Eina_Bool evas_object_image_filled_get(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Sets the scaling factor (multiplier) for the borders of an image * object. * * @param obj The given image object. * @param scale The scale factor (default is @c 1.0 - i.e. no scaling) * * @see evas_object_image_border_set() * @see evas_object_image_border_scale_get() */ EAPI void evas_object_image_border_scale_set(Evas_Object *obj, double scale); /** * Retrieves the scaling factor (multiplier) for the borders of an * image object. * * @param obj The given image object. * @return The scale factor set for its borders * * @see evas_object_image_border_set() * @see evas_object_image_border_scale_set() */ EAPI double evas_object_image_border_scale_get(const Evas_Object *obj); /** * Set how to fill an image object's drawing rectangle given the * (real) image bound to it. * * @param obj The given image object to operate on. * @param x The x coordinate (from the top left corner of the bound * image) to start drawing from. * @param y The y coordinate (from the top left corner of the bound * image) to start drawing from. * @param w The width the bound image will be displayed at. * @param h The height the bound image will be displayed at. * * Note that if @p w or @p h are smaller than the dimensions of * @p obj, the displayed image will be @b tiled around the object's * area. To have only one copy of the bound image drawn, @p x and @p y * must be 0 and @p w and @p h need to be the exact width and height * of the image object itself, respectively. * * See the following image to better understand the effects of this * call. On this diagram, both image object and original image source * have @c a x @c a dimensions and the image itself is a circle, with * empty space around it: * * @image html image-fill.png * @image rtf image-fill.png * @image latex image-fill.eps * * @warning The default values for the fill parameters are @p x = 0, * @p y = 0, @p w = 0 and @p h = 0. Thus, if you're not using the * evas_object_image_filled_add() helper and want your image * displayed, you'll have to set valid values with this function on * your object. * * @note evas_object_image_filled_set() is a helper function which * will @b override the values set here automatically, for you, in a * given way. */ EAPI void evas_object_image_fill_set(Evas_Object *obj, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h) EINA_ARG_NONNULL(1); /** * Retrieve how an image object is to fill its drawing rectangle, * given the (real) image bound to it. * * @param obj The given image object. * @param x Location to store the x coordinate (from the top left * corner of the bound image) to start drawing from. * @param y Location to store the y coordinate (from the top left * corner of the bound image) to start drawing from. * @param w Location to store the width the bound image is to be * displayed at. * @param h Location to store the height the bound image is to be * displayed at. * * @note Use @c NULL pointers on the fill components you're not * interested in: they'll be ignored by the function. * * See @ref evas_object_image_fill_set() for more details. */ EAPI void evas_object_image_fill_get(const Evas_Object *obj, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h) EINA_ARG_NONNULL(1); /** * Sets the tiling mode for the given evas image object's fill. * @param obj The given evas image object. * @param spread One of EVAS_TEXTURE_REFLECT, EVAS_TEXTURE_REPEAT, * EVAS_TEXTURE_RESTRICT, or EVAS_TEXTURE_PAD. */ EAPI void evas_object_image_fill_spread_set(Evas_Object *obj, Evas_Fill_Spread spread) EINA_ARG_NONNULL(1); /** * Retrieves the spread (tiling mode) for the given image object's * fill. * * @param obj The given evas image object. * @return The current spread mode of the image object. */ EAPI Evas_Fill_Spread evas_object_image_fill_spread_get(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Sets the size of the given image object. * * @param obj The given image object. * @param w The new width of the image. * @param h The new height of the image. * * This function will scale down or crop the image so that it is * treated as if it were at the given size. If the size given is * smaller than the image, it will be cropped. If the size given is * larger, then the image will be treated as if it were in the upper * left hand corner of a larger image that is otherwise transparent. */ EAPI void evas_object_image_size_set(Evas_Object *obj, int w, int h) EINA_ARG_NONNULL(1); /** * Retrieves the size of the given image object. * * @param obj The given image object. * @param w Location to store the width of the image in, or @c NULL. * @param h Location to store the height of the image in, or @c NULL. * * See @ref evas_object_image_size_set() for more details. */ EAPI void evas_object_image_size_get(const Evas_Object *obj, int *w, int *h) EINA_ARG_NONNULL(1); /** * Retrieves the row stride of the given image object. * * @param obj The given image object. * @return The stride of the image (in bytes). * * The row stride is the number of bytes between the start of a row * and the start of the next row for image data. */ EAPI int evas_object_image_stride_get(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Retrieves a number representing any error that occurred during the * last loading of the given image object's source image. * * @param obj The given image object. * @return A value giving the last error that occurred. It should be * one of the #Evas_Load_Error values. #EVAS_LOAD_ERROR_NONE * is returned if there was no error. */ EAPI Evas_Load_Error evas_object_image_load_error_get(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Sets the raw image data of the given image object. * * @param obj The given image object. * @param data The raw data, or @c NULL. * * Note that the raw data must be of the same size (see * evas_object_image_size_set(), which has to be called @b before this * one) and colorspace (see evas_object_image_colorspace_set()) of the * image. If data is @c NULL, the current image data will be * freed. Naturally, if one does not set an image object's data * manually, it will still have one, allocated by Evas. * * @see evas_object_image_data_get() */ EAPI void evas_object_image_data_set(Evas_Object *obj, void *data) EINA_ARG_NONNULL(1); /** * Get a pointer to the raw image data of the given image object. * * @param obj The given image object. * @param for_writing Whether the data being retrieved will be * modified (@c EINA_TRUE) or not (@c EINA_FALSE). * @return The raw image data. * * This function returns a pointer to an image object's internal pixel * buffer, for reading only or read/write. If you request it for * writing, the image will be marked dirty so that it gets redrawn at * the next update. * * Each time you call this function on an image object, its data * buffer will have an internal reference counter * incremented. Decrement it back by using * evas_object_image_data_set(). This is specially important for the * directfb Evas engine. * * This is best suited for when you want to modify an existing image, * without changing its dimensions. * * @note The contents' format returned by it depend on the color * space of the given image object. * * @note You may want to use evas_object_image_data_update_add() to * inform data changes, if you did any. * * @see evas_object_image_data_set() */ EAPI void *evas_object_image_data_get(const Evas_Object *obj, Eina_Bool for_writing) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Converts the raw image data of the given image object to the * specified colorspace. * * Note that this function does not modify the raw image data. If the * requested colorspace is the same as the image colorspace nothing is * done and @c NULL is returned. You should use * evas_object_image_colorspace_get() to check the current image * colorspace. * * See @ref evas_object_image_colorspace_get. * * @param obj The given image object. * @param to_cspace The colorspace to which the image raw data will be converted. * @return data A newly allocated data in the format specified by to_cspace. */ EAPI void *evas_object_image_data_convert(Evas_Object *obj, Evas_Colorspace to_cspace) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Replaces the raw image data of the given image object. * * @param obj The given image object. * @param data The raw data to replace. * * This function lets the application replace an image object's * internal pixel buffer with an user-allocated one. For best results, * you should generally first call evas_object_image_size_set() with * the width and height for the new buffer. * * This call is best suited for when you will be using image data with * different dimensions than the existing image data, if any. If you * only need to modify the existing image in some fashion, then using * evas_object_image_data_get() is probably what you are after. * * Note that the caller is responsible for freeing the buffer when * finished with it, as user-set image data will not be automatically * freed when the image object is deleted. * * See @ref evas_object_image_data_get() for more details. * */ EAPI void evas_object_image_data_copy_set(Evas_Object *obj, void *data) EINA_ARG_NONNULL(1); /** * Mark a sub-region of the given image object to be redrawn. * * @param obj The given image object. * @param x X-offset of the region to be updated. * @param y Y-offset of the region to be updated. * @param w Width of the region to be updated. * @param h Height of the region to be updated. * * This function schedules a particular rectangular region of an image * object to be updated (redrawn) at the next rendering cycle. */ EAPI void evas_object_image_data_update_add(Evas_Object *obj, int x, int y, int w, int h) EINA_ARG_NONNULL(1); /** * Enable or disable alpha channel usage on the given image object. * * @param obj The given image object. * @param has_alpha Whether to use alpha channel (@c EINA_TRUE) data * or not (@c EINA_FALSE). * * This function sets a flag on an image object indicating whether or * not to use alpha channel data. A value of @c EINA_TRUE makes it use * alpha channel data, and @c EINA_FALSE makes it ignore that * data. Note that this has nothing to do with an object's color as * manipulated by evas_object_color_set(). * * @see evas_object_image_alpha_get() */ EAPI void evas_object_image_alpha_set(Evas_Object *obj, Eina_Bool has_alpha) EINA_ARG_NONNULL(1); /** * Retrieve whether alpha channel data is being used on the given * image object. * * @param obj The given image object. * @return Whether the alpha channel data is being used (@c EINA_TRUE) * or not (@c EINA_FALSE). * * This function returns @c EINA_TRUE if the image object's alpha * channel is being used, or @c EINA_FALSE otherwise. * * See @ref evas_object_image_alpha_set() for more details. */ EAPI Eina_Bool evas_object_image_alpha_get(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Sets whether to use high-quality image scaling algorithm on the * given image object. * * @param obj The given image object. * @param smooth_scale Whether to use smooth scale or not. * * When enabled, a higher quality image scaling algorithm is used when * scaling images to sizes other than the source image's original * one. This gives better results but is more computationally * expensive. * * @note Image objects get created originally with smooth scaling @b * on. * * @see evas_object_image_smooth_scale_get() */ EAPI void evas_object_image_smooth_scale_set(Evas_Object *obj, Eina_Bool smooth_scale) EINA_ARG_NONNULL(1); /** * Retrieves whether the given image object is using high-quality * image scaling algorithm. * * @param obj The given image object. * @return Whether smooth scale is being used. * * See @ref evas_object_image_smooth_scale_set() for more details. */ EAPI Eina_Bool evas_object_image_smooth_scale_get(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Preload an image object's image data in the background * * @param obj The given image object. * @param cancel @c EINA_FALSE will add it the preloading work queue, * @c EINA_TRUE will remove it (if it was issued before). * * This function requests the preload of the data image in the * background. The work is queued before being processed (because * there might be other pending requests of this type). * * Whenever the image data gets loaded, Evas will call * #EVAS_CALLBACK_IMAGE_PRELOADED registered callbacks on @p obj (what * may be immediately, if the data was already preloaded before). * * Use @c EINA_TRUE for @p cancel on scenarios where you don't need * the image data preloaded anymore. * * @note Any evas_object_show() call after evas_object_image_preload() * will make the latter to be @b cancelled, with the loading process * now taking place @b synchronously (and, thus, blocking the return * of the former until the image is loaded). It is highly advisable, * then, that the user preload an image with it being @b hidden, just * to be shown on the #EVAS_CALLBACK_IMAGE_PRELOADED event's callback. */ EAPI void evas_object_image_preload(Evas_Object *obj, Eina_Bool cancel) EINA_ARG_NONNULL(1); /** * Reload an image object's image data. * * @param obj The given image object pointer. * * This function reloads the image data bound to image object @p obj. */ EAPI void evas_object_image_reload(Evas_Object *obj) EINA_ARG_NONNULL(1); /** * Save the given image object's contents to an (image) file. * * @param obj The given image object. * @param file The filename to be used to save the image (extension * obligatory). * @param key The image key in the file (if an Eet one), or @c NULL, * otherwise. * @param flags String containing the flags to be used (@c NULL for * none). * * The extension suffix on @p file will determine which saver * module Evas is to use when saving, thus the final file's * format. If the file supports multiple data stored in it (Eet ones), * you can specify the key to be used as the index of the image in it. * * You can specify some flags when saving the image. Currently * acceptable flags are @c quality and @c compress. Eg.: @c * "quality=100 compress=9" */ EAPI Eina_Bool evas_object_image_save(const Evas_Object *obj, const char *file, const char *key, const char *flags) EINA_ARG_NONNULL(1, 2); /** * Import pixels from given source to a given canvas image object. * * @param obj The given canvas object. * @param pixels The pixel's source to be imported. * * This function imports pixels from a given source to a given canvas image. * */ EAPI Eina_Bool evas_object_image_pixels_import(Evas_Object *obj, Evas_Pixel_Import_Source *pixels) EINA_ARG_NONNULL(1, 2); /** * Set the callback function to get pixels from a canvas' image. * * @param obj The given canvas pointer. * @param func The callback function. * @param data The data pointer to be passed to @a func. * * This functions sets a function to be the callback function that get * pixels from a image of the canvas. * */ EAPI void evas_object_image_pixels_get_callback_set(Evas_Object *obj, Evas_Object_Image_Pixels_Get_Cb func, void *data) EINA_ARG_NONNULL(1, 2); /** * Mark whether the given image object is dirty and needs to request its pixels. * * @param obj The given image object. * @param dirty Whether the image is dirty. * * This function will only properly work if a pixels get callback has been set. * * @warning use this function if you really know what you are doing. * * @see evas_object_image_pixels_get_callback_set() */ EAPI void evas_object_image_pixels_dirty_set(Evas_Object *obj, Eina_Bool dirty) EINA_ARG_NONNULL(1); /** * Retrieves whether the given image object is dirty (needs to be redrawn). * * @param obj The given image object. * @return Whether the image is dirty. */ EAPI Eina_Bool evas_object_image_pixels_dirty_get(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Set the DPI resolution of an image object's source image. * * @param obj The given canvas pointer. * @param dpi The new DPI resolution. * * This function sets the DPI resolution of a given loaded canvas * image. Most useful for the SVG image loader. * * @see evas_object_image_load_dpi_get() */ EAPI void evas_object_image_load_dpi_set(Evas_Object *obj, double dpi) EINA_ARG_NONNULL(1); /** * Get the DPI resolution of a loaded image object in the canvas. * * @param obj The given canvas pointer. * @return The DPI resolution of the given canvas image. * * This function returns the DPI resolution of the given canvas image. * * @see evas_object_image_load_dpi_set() for more details */ EAPI double evas_object_image_load_dpi_get(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Set the size of a given image object's source image, when loading * it. * * @param obj The given canvas object. * @param w The new width of the image's load size. * @param h The new height of the image's load size. * * This function sets a new (loading) size for the given canvas * image. * * @see evas_object_image_load_size_get() */ EAPI void evas_object_image_load_size_set(Evas_Object *obj, int w, int h) EINA_ARG_NONNULL(1); /** * Get the size of a given image object's source image, when loading * it. * * @param obj The given image object. * @param w Where to store the new width of the image's load size. * @param h Where to store the new height of the image's load size. * * @note Use @c NULL pointers on the size components you're not * interested in: they'll be ignored by the function. * * @see evas_object_image_load_size_set() for more details */ EAPI void evas_object_image_load_size_get(const Evas_Object *obj, int *w, int *h) EINA_ARG_NONNULL(1); /** * Set the scale down factor of a given image object's source image, * when loading it. * * @param obj The given image object pointer. * @param scale_down The scale down factor. * * This function sets the scale down factor of a given canvas * image. Most useful for the SVG image loader. * * @see evas_object_image_load_scale_down_get() */ EAPI void evas_object_image_load_scale_down_set(Evas_Object *obj, int scale_down) EINA_ARG_NONNULL(1); /** * get the scale down factor of a given image object's source image, * when loading it. * * @param obj The given image object pointer. * * @see evas_object_image_load_scale_down_set() for more details */ EAPI int evas_object_image_load_scale_down_get(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Inform a given image object to load a selective region of its * source image. * * @param obj The given image object pointer. * @param x X-offset of the region to be loaded. * @param y Y-offset of the region to be loaded. * @param w Width of the region to be loaded. * @param h Height of the region to be loaded. * * This function is useful when one is not showing all of an image's * area on its image object. * * @note The image loader for the image format in question has to * support selective region loading in order to this function to take * effect. * * @see evas_object_image_load_region_get() */ EAPI void evas_object_image_load_region_set(Evas_Object *obj, int x, int y, int w, int h) EINA_ARG_NONNULL(1); /** * Retrieve the coordinates of a given image object's selective * (source image) load region. * * @param obj The given image object pointer. * @param x Where to store the X-offset of the region to be loaded. * @param y Where to store the Y-offset of the region to be loaded. * @param w Where to store the width of the region to be loaded. * @param h Where to store the height of the region to be loaded. * * @note Use @c NULL pointers on the coordinates you're not interested * in: they'll be ignored by the function. * * @see evas_object_image_load_region_get() */ EAPI void evas_object_image_load_region_get(const Evas_Object *obj, int *x, int *y, int *w, int *h) EINA_ARG_NONNULL(1); /** * Define if the orientation information in the image file should be honored. * * @param obj The given image object pointer. * @param enable @c EINA_TRUE means that it should honor the orientation information * @since 1.1 */ EAPI void evas_object_image_load_orientation_set(Evas_Object *obj, Eina_Bool enable) EINA_ARG_NONNULL(1); /** * Get if the orientation information in the image file should be honored. * * @param obj The given image object pointer. * @since 1.1 */ EAPI Eina_Bool evas_object_image_load_orientation_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); /** * Set the colorspace of a given image of the canvas. * * @param obj The given image object pointer. * @param cspace The new color space. * * This function sets the colorspace of given canvas image. * */ EAPI void evas_object_image_colorspace_set(Evas_Object *obj, Evas_Colorspace cspace) EINA_ARG_NONNULL(1); /** * Get the colorspace of a given image of the canvas. * * @param obj The given image object pointer. * @return The colorspace of the image. * * This function returns the colorspace of given canvas image. * */ EAPI Evas_Colorspace evas_object_image_colorspace_get(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Get the support state of a given image * * @param obj The given image object pointer * @return The region support state * @since 1.2 * * This function returns the state of the region support of given image */ EAPI Eina_Bool evas_object_image_region_support_get(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Set the native surface of a given image of the canvas * * @param obj The given canvas pointer. * @param surf The new native surface. * * This function sets a native surface of a given canvas image. * */ EAPI void evas_object_image_native_surface_set(Evas_Object *obj, Evas_Native_Surface *surf) EINA_ARG_NONNULL(1, 2); /** * Get the native surface of a given image of the canvas * * @param obj The given canvas pointer. * @return The native surface of the given canvas image. * * This function returns the native surface of a given canvas image. * */ EAPI Evas_Native_Surface *evas_object_image_native_surface_get(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Set the video surface linked to a given image of the canvas * * @param obj The given canvas pointer. * @param surf The new video surface. * @since 1.1 * * This function link a video surface to a given canvas image. * */ EAPI void evas_object_image_video_surface_set(Evas_Object *obj, Evas_Video_Surface *surf) EINA_ARG_NONNULL(1); /** * Get the video surface linekd to a given image of the canvas * * @param obj The given canvas pointer. * @return The video surface of the given canvas image. * @since 1.1 * * This function returns the video surface linked to a given canvas image. * */ EAPI const Evas_Video_Surface *evas_object_image_video_surface_get(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Set the scale hint of a given image of the canvas. * * @param obj The given image object pointer. * @param hint The scale hint, a value in * #Evas_Image_Scale_Hint. * * This function sets the scale hint value of the given image object * in the canvas, which will affect how Evas is to cache scaled * versions of its original source image. * * @see evas_object_image_scale_hint_get() */ EAPI void evas_object_image_scale_hint_set(Evas_Object *obj, Evas_Image_Scale_Hint hint) EINA_ARG_NONNULL(1); /** * Get the scale hint of a given image of the canvas. * * @param obj The given image object pointer. * @return The scale hint value set on @p obj, a value in * #Evas_Image_Scale_Hint. * * This function returns the scale hint value of the given image * object of the canvas. * * @see evas_object_image_scale_hint_set() for more details. */ EAPI Evas_Image_Scale_Hint evas_object_image_scale_hint_get(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Set the content hint setting of a given image object of the canvas. * * @param obj The given canvas pointer. * @param hint The content hint value, one of the * #Evas_Image_Content_Hint ones. * * This function sets the content hint value of the given image of the * canvas. For example, if you're on the GL engine and your driver * implementation supports it, setting this hint to * #EVAS_IMAGE_CONTENT_HINT_DYNAMIC will make it need @b zero copies * at texture upload time, which is an "expensive" operation. * * @see evas_object_image_content_hint_get() */ EAPI void evas_object_image_content_hint_set(Evas_Object *obj, Evas_Image_Content_Hint hint) EINA_ARG_NONNULL(1); /** * Get the content hint setting of a given image object of the canvas. * * @param obj The given canvas pointer. * @return hint The content hint value set on it, one of the * #Evas_Image_Content_Hint ones (#EVAS_IMAGE_CONTENT_HINT_NONE means * an error). * * This function returns the content hint value of the given image of * the canvas. * * @see evas_object_image_content_hint_set() */ EAPI Evas_Image_Content_Hint evas_object_image_content_hint_get(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Enable an image to be used as an alpha mask. * * This will set any flags, and discard any excess image data not used as an * alpha mask. * * Note there is little point in using a image as alpha mask unless it has an * alpha channel. * * @param obj Object to use as an alpha mask. * @param ismask Use image as alphamask, must be true. */ EAPI void evas_object_image_alpha_mask_set(Evas_Object *obj, Eina_Bool ismask) EINA_ARG_NONNULL(1); /** * Set the source object on an image object to used as a @b proxy. * * @param obj Proxy (image) object. * @param src Source object to use for the proxy. * @return @c EINA_TRUE on success, @c EINA_FALSE on error. * * If an image object is set to behave as a @b proxy, it will mirror * the rendering contents of a given @b source object in its drawing * region, without affecting that source in any way. The source must * be another valid Evas object. Other effects may be applied to the * proxy, such as a map (see evas_object_map_set()) to create a * reflection of the original object (for example). * * Any existing source object on @p obj will be removed after this * call. Setting @p src to @c NULL clears the proxy object (not in * "proxy state" anymore). * * @warning You cannot set a proxy as another proxy's source. * * @see evas_object_image_source_get() * @see evas_object_image_source_unset() */ EAPI Eina_Bool evas_object_image_source_set(Evas_Object *obj, Evas_Object *src) EINA_ARG_NONNULL(1); /** * Get the current source object of an image object. * * @param obj Image object * @return Source object (if any), or @c NULL, if not in "proxy mode" * (or on errors). * * @see evas_object_image_source_set() for more details */ EAPI Evas_Object *evas_object_image_source_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); /** * Clear the source object on a proxy image object. * * @param obj Image object to clear source of. * @return @c EINA_TRUE on success, @c EINA_FALSE on error. * * This is equivalent to calling evas_object_image_source_set() with a * @c NULL source. */ EAPI Eina_Bool evas_object_image_source_unset(Evas_Object *obj) EINA_ARG_NONNULL(1); /** * Check if a file extension may be supported by @ref Evas_Object_Image. * * @param file The file to check * @return @c EINA_TRUE if we may be able to open it, @c EINA_FALSE if it's * unlikely. * @since 1.1 * * If file is a Eina_Stringshare, use directly @ref evas_object_image_extension_can_load_fast_get. * * This functions is threadsafe. */ EAPI Eina_Bool evas_object_image_extension_can_load_get(const char *file); /** * Check if a file extension may be supported by @ref Evas_Object_Image. * * @param file The file to check, it should be an Eina_Stringshare. * @return @c EINA_TRUE if we may be able to open it, @c EINA_FALSE if it's * unlikely. * @since 1.1 * * This functions is threadsafe. */ EAPI Eina_Bool evas_object_image_extension_can_load_fast_get(const char *file); /** * Check if an image object can be animated (have multiple frames) * * @param obj Image object * @return whether obj support animation * * This returns if the image file of an image object is capable of animation * such as an animated gif file might. This is only useful to be called once * the image object file has been set. * * Example: * @code * extern Evas_Object *obj; * * if (evas_object_image_animated_get(obj)) * { * int frame_count; * int loop_count; * Evas_Image_Animated_Loop_Hint loop_type; * double duration; * * frame_count = evas_object_image_animated_frame_count_get(obj); * printf("This image has %d frames\n",frame_count); * * duration = evas_object_image_animated_frame_duration_get(obj,1,0); * printf("Frame 1's duration is %f. You had better set object's frame to 2 after this duration using timer\n"); * * loop_count = evas_object_image_animated_loop_count_get(obj); * printf("loop count is %d. You had better run loop %d times\n",loop_count,loop_count); * * loop_type = evas_object_image_animated_loop_type_get(obj); * if (loop_type == EVAS_IMAGE_ANIMATED_HINT_LOOP) * printf("You had better set frame like 1->2->3->1->2->3...\n"); * else if (loop_type == EVAS_IMAGE_ANIMATED_HINT_PINGPONG) * printf("You had better set frame like 1->2->3->2->1->2...\n"); * else * printf("Unknown loop type\n"); * * evas_object_image_animated_frame_set(obj,1); * printf("You set image object's frame to 1. You can see frame 1\n"); * } * @endcode * * @see evas_object_image_animated_get() * @see evas_object_image_animated_frame_count_get() * @see evas_object_image_animated_loop_type_get() * @see evas_object_image_animated_loop_count_get() * @see evas_object_image_animated_frame_duration_get() * @see evas_object_image_animated_frame_set() * @since 1.1 */ EAPI Eina_Bool evas_object_image_animated_get(const Evas_Object *obj); /** * Get the total number of frames of the image object. * * @param obj Image object * @return The number of frames * * This returns total number of frames the image object supports (if animated) * * @see evas_object_image_animated_get() * @see evas_object_image_animated_frame_count_get() * @see evas_object_image_animated_loop_type_get() * @see evas_object_image_animated_loop_count_get() * @see evas_object_image_animated_frame_duration_get() * @see evas_object_image_animated_frame_set() * @since 1.1 */ EAPI int evas_object_image_animated_frame_count_get(const Evas_Object *obj); /** * Get the kind of looping the image object does. * * @param obj Image object * @return Loop type of the image object * * This returns the kind of looping the image object wants to do. * * If it returns EVAS_IMAGE_ANIMATED_HINT_LOOP, you should display frames in a sequence like: * 1->2->3->1->2->3->1... * If it returns EVAS_IMAGE_ANIMATED_HINT_PINGPONG, it is better to * display frames in a sequence like: 1->2->3->2->1->2->3->1... * * The default type is EVAS_IMAGE_ANIMATED_HINT_LOOP. * * @see evas_object_image_animated_get() * @see evas_object_image_animated_frame_count_get() * @see evas_object_image_animated_loop_type_get() * @see evas_object_image_animated_loop_count_get() * @see evas_object_image_animated_frame_duration_get() * @see evas_object_image_animated_frame_set() * @since 1.1 */ EAPI Evas_Image_Animated_Loop_Hint evas_object_image_animated_loop_type_get(const Evas_Object *obj); /** * Get the number times the animation of the object loops. * * @param obj Image object * @return The number of loop of an animated image object * * This returns loop count of image. The loop count is the number of times * the animation will play fully from first to last frame until the animation * should stop (at the final frame). * * If 0 is returned, then looping should happen indefinitely (no limit to * the number of times it loops). * * @see evas_object_image_animated_get() * @see evas_object_image_animated_frame_count_get() * @see evas_object_image_animated_loop_type_get() * @see evas_object_image_animated_loop_count_get() * @see evas_object_image_animated_frame_duration_get() * @see evas_object_image_animated_frame_set() * @since 1.1 */ EAPI int evas_object_image_animated_loop_count_get(const Evas_Object *obj); /** * Get the duration of a sequence of frames. * * @param obj Image object * @param start_frame The first frame * @param fram_num Number of frames in the sequence * * This returns total duration that the specified sequence of frames should * take in seconds. * * If you set start_frame to 1 and frame_num 0, you get frame 1's duration * If you set start_frame to 1 and frame_num 1, you get frame 1's duration + * frame2's duration * * @see evas_object_image_animated_get() * @see evas_object_image_animated_frame_count_get() * @see evas_object_image_animated_loop_type_get() * @see evas_object_image_animated_loop_count_get() * @see evas_object_image_animated_frame_duration_get() * @see evas_object_image_animated_frame_set() * @since 1.1 */ EAPI double evas_object_image_animated_frame_duration_get(const Evas_Object *obj, int start_frame, int fram_num); /** * Set the frame to current frame of an image object * * @param obj The given image object. * @param frame_num The index of current frame * * This set image object's current frame to frame_num with 1 being the first * frame. * * @see evas_object_image_animated_get() * @see evas_object_image_animated_frame_count_get() * @see evas_object_image_animated_loop_type_get() * @see evas_object_image_animated_loop_count_get() * @see evas_object_image_animated_frame_duration_get() * @see evas_object_image_animated_frame_set() * @since 1.1 */ EAPI void evas_object_image_animated_frame_set(Evas_Object *obj, int frame_num); /** * @} */ /** * @defgroup Evas_Object_Text Text Object Functions * * Functions that operate on single line, single style text objects. * * For multiline and multiple style text, see @ref Evas_Object_Textblock. * * See some @ref Example_Evas_Text "examples" on this group of functions. * * @warning We don't guarantee any proper results if you create a Text object * without setting the evas engine. * * @ingroup Evas_Object_Specific */ /** * @addtogroup Evas_Object_Text * @{ */ /* basic styles (4 bits allocated use 0->10 now, 5 left) */ #define EVAS_TEXT_STYLE_MASK_BASIC 0xf /** * Text style type creation macro. Use style types on the 's' * arguments, being 'x' your style variable. */ #define EVAS_TEXT_STYLE_BASIC_SET(x, s) \ do { x = ((x) & ~EVAS_TEXT_STYLE_MASK_BASIC) | (s); } while (0) #define EVAS_TEXT_STYLE_MASK_SHADOW_DIRECTION (0x7 << 4) /** * Text style type creation macro. This one will impose shadow * directions on the style type variable -- use the @c * EVAS_TEXT_STYLE_SHADOW_DIRECTION_* values on 's', incrementally. */ #define EVAS_TEXT_STYLE_SHADOW_DIRECTION_SET(x, s) \ do { x = ((x) & ~EVAS_TEXT_STYLE_MASK_SHADOW_DIRECTION) | (s); } while (0) typedef enum _Evas_Text_Style_Type { EVAS_TEXT_STYLE_PLAIN, /**< plain, standard text */ EVAS_TEXT_STYLE_SHADOW, /**< text with shadow underneath */ EVAS_TEXT_STYLE_OUTLINE, /**< text with an outline */ EVAS_TEXT_STYLE_SOFT_OUTLINE, /**< text with a soft outline */ EVAS_TEXT_STYLE_GLOW, /**< text with a glow effect */ EVAS_TEXT_STYLE_OUTLINE_SHADOW, /**< text with both outline and shadow effects */ EVAS_TEXT_STYLE_FAR_SHADOW, /**< text with (far) shadow underneath */ EVAS_TEXT_STYLE_OUTLINE_SOFT_SHADOW, /**< text with outline and soft shadow effects combined */ EVAS_TEXT_STYLE_SOFT_SHADOW, /**< text with (soft) shadow underneath */ EVAS_TEXT_STYLE_FAR_SOFT_SHADOW, /**< text with (far soft) shadow underneath */ /* OR these to modify shadow direction (3 bits needed) */ EVAS_TEXT_STYLE_SHADOW_DIRECTION_BOTTOM_RIGHT = (0x0 << 4), /**< shadow growing to bottom right */ EVAS_TEXT_STYLE_SHADOW_DIRECTION_BOTTOM = (0x1 << 4), /**< shadow growing to the bottom */ EVAS_TEXT_STYLE_SHADOW_DIRECTION_BOTTOM_LEFT = (0x2 << 4), /**< shadow growing to bottom left */ EVAS_TEXT_STYLE_SHADOW_DIRECTION_LEFT = (0x3 << 4), /**< shadow growing to the left */ EVAS_TEXT_STYLE_SHADOW_DIRECTION_TOP_LEFT = (0x4 << 4), /**< shadow growing to top left */ EVAS_TEXT_STYLE_SHADOW_DIRECTION_TOP = (0x5 << 4), /**< shadow growing to the top */ EVAS_TEXT_STYLE_SHADOW_DIRECTION_TOP_RIGHT = (0x6 << 4), /**< shadow growing to top right */ EVAS_TEXT_STYLE_SHADOW_DIRECTION_RIGHT = (0x7 << 4) /**< shadow growing to the right */ } Evas_Text_Style_Type; /**< Types of styles to be applied on text objects. The @c EVAS_TEXT_STYLE_SHADOW_DIRECTION_* ones are to be ORed together with others imposing shadow, to change shadow's direction */ /** * Creates a new text object on the provided canvas. * * @param e The canvas to create the text object on. * @return @c NULL on error, a pointer to a new text object on * success. * * Text objects are for simple, single line text elements. If you want * more elaborated text blocks, see @ref Evas_Object_Textblock. * * @see evas_object_text_font_source_set() * @see evas_object_text_font_set() * @see evas_object_text_text_set() */ EAPI Evas_Object *evas_object_text_add(Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC; /** * Set the font (source) file to be used on a given text object. * * @param obj The text object to set font for. * @param font The font file's path. * * This function allows the font file to be explicitly set for a given * text object, overriding system lookup, which will first occur in * the given file's contents. * * @see evas_object_text_font_get() */ EAPI void evas_object_text_font_source_set(Evas_Object *obj, const char *font) EINA_ARG_NONNULL(1); /** * Get the font file's path which is being used on a given text * object. * * @param obj The text object to set font for. * @return The font file's path. * * @see evas_object_text_font_get() for more details */ EAPI const char *evas_object_text_font_source_get(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Set the font family or filename, and size on a given text object. * * @param obj The text object to set font for. * @param font The font family name or filename. * @param size The font size, in points. * * This function allows the font name and size of a text object to be * set. The @p font string has to follow fontconfig's convention on * naming fonts, as it's the underlying library used to query system * fonts by Evas (see the @c fc-list command's output, on your system, * to get an idea). Alternatively, one can use a full path to a font file. * * @see evas_object_text_font_get() * @see evas_object_text_font_source_set() */ EAPI void evas_object_text_font_set(Evas_Object *obj, const char *font, Evas_Font_Size size) EINA_ARG_NONNULL(1); /** * Retrieve the font family and size in use on a given text object. * * @param obj The evas text object to query for font information. * @param font A pointer to the location to store the font name in. * @param size A pointer to the location to store the font size in. * * This function allows the font name and size of a text object to be * queried. Be aware that the font name string is still owned by Evas * and should @b not have free() called on it by the caller of the * function. * * @see evas_object_text_font_set() */ EAPI void evas_object_text_font_get(const Evas_Object *obj, const char **font, Evas_Font_Size *size) EINA_ARG_NONNULL(1); /** * Sets the text string to be displayed by the given text object. * * @param obj The text object to set text string on. * @param text Text string to display on it. * * @see evas_object_text_text_get() */ EAPI void evas_object_text_text_set(Evas_Object *obj, const char *text) EINA_ARG_NONNULL(1); /** * Retrieves the text string currently being displayed by the given * text object. * * @param obj The given text object. * @return The text string currently being displayed on it. * * @note Do not free() the return value. * * @see evas_object_text_text_set() */ EAPI const char *evas_object_text_text_get(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * @brief Sets the BiDi delimiters used in the textblock. * * BiDi delimiters are use for in-paragraph separation of bidi segments. This * is useful for example in recipients fields of e-mail clients where bidi * oddities can occur when mixing RTL and LTR. * * @param obj The given text object. * @param delim A null terminated string of delimiters, e.g ",|". * @since 1.1 */ EAPI void evas_object_text_bidi_delimiters_set(Evas_Object *obj, const char *delim); /** * @brief Gets the BiDi delimiters used in the textblock. * * BiDi delimiters are use for in-paragraph separation of bidi segments. This * is useful for example in recipients fields of e-mail clients where bidi * oddities can occur when mixing RTL and LTR. * * @param obj The given text object. * @return A null terminated string of delimiters, e.g ",|". If empty, returns NULL. * @since 1.1 */ EAPI const char *evas_object_text_bidi_delimiters_get(const Evas_Object *obj); EAPI Evas_Coord evas_object_text_ascent_get(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); EAPI Evas_Coord evas_object_text_descent_get(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); EAPI Evas_Coord evas_object_text_max_ascent_get(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); EAPI Evas_Coord evas_object_text_max_descent_get(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); EAPI Evas_Coord evas_object_text_horiz_advance_get(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); EAPI Evas_Coord evas_object_text_vert_advance_get(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); EAPI Evas_Coord evas_object_text_inset_get(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Retrieve position and dimension information of a character within a text @c Evas_Object. * * This function is used to obtain the X, Y, width and height of a the character * located at @p pos within the @c Evas_Object @p obj. @p obj must be a text object * as created with evas_object_text_add(). Any of the @c Evas_Coord parameters (@p cx, * @p cy, @p cw, @p ch) may be @c NULL in which case no value will be assigned to that * parameter. * * @param obj The text object to retrieve position information for. * @param pos The character position to request co-ordinates for. * @param cx A pointer to an @c Evas_Coord to store the X value in (can be NULL). * @param cy A pointer to an @c Evas_Coord to store the Y value in (can be NULL). * @param cw A pointer to an @c Evas_Coord to store the Width value in (can be NULL). * @param ch A pointer to an @c Evas_Coord to store the Height value in (can be NULL). * * @return @c EINA_FALSE on success, @c EINA_TRUE on error. */ EAPI Eina_Bool evas_object_text_char_pos_get(const Evas_Object *obj, int pos, Evas_Coord *cx, Evas_Coord *cy, Evas_Coord *cw, Evas_Coord *ch) EINA_ARG_NONNULL(1); EAPI int evas_object_text_char_coords_get(const Evas_Object *obj, Evas_Coord x, Evas_Coord y, Evas_Coord *cx, Evas_Coord *cy, Evas_Coord *cw, Evas_Coord *ch) EINA_ARG_NONNULL(1); /** * Returns the logical position of the last char in the text * up to the pos given. this is NOT the position of the last char * because of the possibility of RTL in the text. */ EAPI int evas_object_text_last_up_to_pos(const Evas_Object *obj, Evas_Coord x, Evas_Coord y) EINA_ARG_NONNULL(1); /** * Retrieves the style on use on the given text object. * * @param obj the given text object to set style on. * @return the style type in use. * * @see evas_object_text_style_set() for more details. */ EAPI Evas_Text_Style_Type evas_object_text_style_get(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Sets the style to apply on the given text object. * * @param obj the given text object to set style on. * @param type a style type. * * Text object styles are one of the values in * #Evas_Text_Style_Type. Some of those values are combinations of * more than one style, and some account for the direction of the * rendering of shadow effects. * * @note One may use the helper macros #EVAS_TEXT_STYLE_BASIC_SET and * #EVAS_TEXT_STYLE_SHADOW_DIRECTION_SET to assemble a style value. * * The following figure illustrates the text styles: * * @image html text-styles.png * @image rtf text-styles.png * @image latex text-styles.eps * * @see evas_object_text_style_get() * @see evas_object_text_shadow_color_set() * @see evas_object_text_outline_color_set() * @see evas_object_text_glow_color_set() * @see evas_object_text_glow2_color_set() */ EAPI void evas_object_text_style_set(Evas_Object *obj, Evas_Text_Style_Type type) EINA_ARG_NONNULL(1); /** * Sets the shadow color for the given text object. * * @param obj The given Evas text object. * @param r The red component of the given color. * @param g The green component of the given color. * @param b The blue component of the given color. * @param a The alpha component of the given color. * * Shadow effects, which are fading colors decorating the text * underneath it, will just be shown if the object is set to one of * the following styles: * * - #EVAS_TEXT_STYLE_SHADOW * - #EVAS_TEXT_STYLE_OUTLINE_SHADOW * - #EVAS_TEXT_STYLE_FAR_SHADOW * - #EVAS_TEXT_STYLE_OUTLINE_SOFT_SHADOW * - #EVAS_TEXT_STYLE_SOFT_SHADOW * - #EVAS_TEXT_STYLE_FAR_SOFT_SHADOW * * One can also change the direction where the shadow grows to, with * evas_object_text_style_set(). * * @see evas_object_text_shadow_color_get() */ EAPI void evas_object_text_shadow_color_set(Evas_Object *obj, int r, int g, int b, int a) EINA_ARG_NONNULL(1); /** * Retrieves the shadow color for the given text object. * * @param obj The given Evas text object. * @param r Pointer to variable to hold the red component of the given * color. * @param g Pointer to variable to hold the green component of the * given color. * @param b Pointer to variable to hold the blue component of the * given color. * @param a Pointer to variable to hold the alpha component of the * given color. * * @note Use @c NULL pointers on the color components you're not * interested in: they'll be ignored by the function. * * @see evas_object_text_shadow_color_set() for more details. */ EAPI void evas_object_text_shadow_color_get(const Evas_Object *obj, int *r, int *g, int *b, int *a) EINA_ARG_NONNULL(1); /** * Sets the glow color for the given text object. * * @param obj The given Evas text object. * @param r The red component of the given color. * @param g The green component of the given color. * @param b The blue component of the given color. * @param a The alpha component of the given color. * * Glow effects, which are glowing colors decorating the text's * surroundings, will just be shown if the object is set to the * #EVAS_TEXT_STYLE_GLOW style. * * @note Glow effects are placed from a short distance of the text * itself, but no touching it. For glowing effects right on the * borders of the glyphs, see 'glow 2' effects * (evas_object_text_glow2_color_set()). * * @see evas_object_text_glow_color_get() */ EAPI void evas_object_text_glow_color_set(Evas_Object *obj, int r, int g, int b, int a) EINA_ARG_NONNULL(1); /** * Retrieves the glow color for the given text object. * * @param obj The given Evas text object. * @param r Pointer to variable to hold the red component of the given * color. * @param g Pointer to variable to hold the green component of the * given color. * @param b Pointer to variable to hold the blue component of the * given color. * @param a Pointer to variable to hold the alpha component of the * given color. * * @note Use @c NULL pointers on the color components you're not * interested in: they'll be ignored by the function. * * @see evas_object_text_glow_color_set() for more details. */ EAPI void evas_object_text_glow_color_get(const Evas_Object *obj, int *r, int *g, int *b, int *a) EINA_ARG_NONNULL(1); /** * Sets the 'glow 2' color for the given text object. * * @param obj The given Evas text object. * @param r The red component of the given color. * @param g The green component of the given color. * @param b The blue component of the given color. * @param a The alpha component of the given color. * * 'Glow 2' effects, which are glowing colors decorating the text's * (immediate) surroundings, will just be shown if the object is set * to the #EVAS_TEXT_STYLE_GLOW style. See also * evas_object_text_glow_color_set(). * * @see evas_object_text_glow2_color_get() */ EAPI void evas_object_text_glow2_color_set(Evas_Object *obj, int r, int g, int b, int a) EINA_ARG_NONNULL(1); /** * Retrieves the 'glow 2' color for the given text object. * * @param obj The given Evas text object. * @param r Pointer to variable to hold the red component of the given * color. * @param g Pointer to variable to hold the green component of the * given color. * @param b Pointer to variable to hold the blue component of the * given color. * @param a Pointer to variable to hold the alpha component of the * given color. * * @note Use @c NULL pointers on the color components you're not * interested in: they'll be ignored by the function. * * @see evas_object_text_glow2_color_set() for more details. */ EAPI void evas_object_text_glow2_color_get(const Evas_Object *obj, int *r, int *g, int *b, int *a) EINA_ARG_NONNULL(1); /** * Sets the outline color for the given text object. * * @param obj The given Evas text object. * @param r The red component of the given color. * @param g The green component of the given color. * @param b The blue component of the given color. * @param a The alpha component of the given color. * * Outline effects (colored lines around text glyphs) will just be * shown if the object is set to one of the following styles: * - #EVAS_TEXT_STYLE_OUTLINE * - #EVAS_TEXT_STYLE_SOFT_OUTLINE * - #EVAS_TEXT_STYLE_OUTLINE_SHADOW * - #EVAS_TEXT_STYLE_OUTLINE_SOFT_SHADOW * * @see evas_object_text_outline_color_get() */ EAPI void evas_object_text_outline_color_set(Evas_Object *obj, int r, int g, int b, int a) EINA_ARG_NONNULL(1); /** * Retrieves the outline color for the given text object. * * @param obj The given Evas text object. * @param r Pointer to variable to hold the red component of the given * color. * @param g Pointer to variable to hold the green component of the * given color. * @param b Pointer to variable to hold the blue component of the * given color. * @param a Pointer to variable to hold the alpha component of the * given color. * * @note Use @c NULL pointers on the color components you're not * interested in: they'll be ignored by the function. * * @see evas_object_text_outline_color_set() for more details. */ EAPI void evas_object_text_outline_color_get(const Evas_Object *obj, int *r, int *g, int *b, int *a) EINA_ARG_NONNULL(1); /** * Gets the text style pad of a text object. * * @param obj The given text object. * @param l The left pad (or @c NULL). * @param r The right pad (or @c NULL). * @param t The top pad (or @c NULL). * @param b The bottom pad (or @c NULL). * */ EAPI void evas_object_text_style_pad_get(const Evas_Object *obj, int *l, int *r, int *t, int *b) EINA_ARG_NONNULL(1); /** * Retrieves the direction of the text currently being displayed in the * text object. * @param obj The given evas text object. * @return the direction of the text */ EAPI Evas_BiDi_Direction evas_object_text_direction_get(const Evas_Object *obj) EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT; /** * @} */ /** * @defgroup Evas_Object_Textblock Textblock Object Functions * * Functions used to create and manipulate textblock objects. Unlike * @ref Evas_Object_Text, these handle complex text, doing multiple * styles and multiline text based on HTML-like tags. Of these extra * features will be heavier on memory and processing cost. * * @section Evas_Object_Textblock_Tutorial Textblock Object Tutorial * * This part explains about the textblock object's API and proper usage. * The main user of the textblock object is the edje entry object in Edje, so * that's a good place to learn from, but I think this document is more than * enough, if it's not, please contact me and I'll update it. * * @subsection textblock_intro Introduction * The textblock objects is, as implied, an object that can show big chunks of * text. Textblock supports many features including: Text formatting, automatic * and manual text alignment, embedding items (for example icons) and more. * Textblock has three important parts, the text paragraphs, the format nodes * and the cursors. * * You can use markup to format text, for example: "Big!". * You can also put more than one style directive in one tag: * "Big and Red!". * Please notice that we used "" although the format also included * color, this is because the first format determines the matching closing tag's * name. You can also use anonymous tags, like: "Big" which * just pop any type of format, but it's advised to use the named alternatives * instead. * * @subsection textblock_cursors Textblock Object Cursors * A textblock Cursor is data type that represents * a position in a textblock. Each cursor contains information about the * paragraph it points to, the position in that paragraph and the object itself. * Cursors register to textblock objects upon creation, this means that once * you created a cursor, it belongs to a specific obj and you can't for example * copy a cursor "into" a cursor of a different object. Registered cursors * also have the added benefit of updating automatically upon textblock changes, * this means that if you have a cursor pointing to a specific character, it'll * still point to it even after you change the whole object completely (as long * as the char was not deleted), this is not possible without updating, because * as mentioned, each cursor holds a character position. There are many * functions that handle cursors, just check out the evas_textblock_cursor* * functions. For creation and deletion of cursors check out: * @see evas_object_textblock_cursor_new() * @see evas_textblock_cursor_free() * @note Cursors are generally the correct way to handle text in the textblock object, and there are enough functions to do everything you need with them (no need to get big chunks of text and processing them yourself). * * @subsection textblock_paragraphs Textblock Object Paragraphs * The textblock object is made out of text splitted to paragraphs (delimited * by the paragraph separation character). Each paragraph has many (or none) * format nodes associated with it which are responsible for the formatting * of that paragraph. * * @subsection textblock_format_nodes Textblock Object Format Nodes * As explained in @ref textblock_paragraphs each one of the format nodes * is associated with a paragraph. * There are two types of format nodes, visible and invisible: * Visible: formats that a cursor can point to, i.e formats that * occupy space, for example: newlines, tabs, items and etc. Some visible items * are made of two parts, in this case, only the opening tag is visible. * A closing tag (i.e a \ tag) should NEVER be visible. * Invisible: formats that don't occupy space, for example: bold and underline. * Being able to access format nodes is very important for some uses. For * example, edje uses the "" format to create links in the text (and pop * popups above them when clicked). For the textblock object a is just a * formatting instruction (how to color the text), but edje utilizes the access * to the format nodes to make it do more. * For more information, take a look at all the evas_textblock_node_format_* * functions. * The translation of "" tags to actual format is done according to the * tags defined in the style, see @ref evas_textblock_style_set * * @subsection textblock_special_formats Special Formats * Textblock supports various format directives that can be used in markup. In * addition to the mentioned format directives, textblock allows creating * additional format directives using "tags" that can be set in the style see * @ref evas_textblock_style_set . * * For more details see @ref evas_textblock_style_page * * Textblock supports the following formats: * @li font - Font description in fontconfig like format, e.g: "Sans:style=Italic:lang=hi". or "Serif:style=Bold". * @li font_weight - Overrides the weight defined in "font". E.g: "font_weight=Bold" is the same as "font=:style=Bold". Supported weights: "normal", "thin", "ultralight", "light", "book", "medium", "semibold", "bold", "ultrabold", "black", and "extrablack". * @li font_style - Overrides the style defined in "font". E.g: "font_style=Italic" is the same as "font=:style=Italic". Supported styles: "normal", "oblique", and "italic". * @li font_width - Overrides the width defined in "font". E.g: "font_width=Condensed" is the same as "font=:style=Condensed". Supported widths: "normal", "ultracondensed", "extracondensed", "condensed", "semicondensed", "semiexpanded", "expanded", "extraexpanded", and "ultraexpanded". * @li lang - Overrides the language defined in "font". E.g: "lang=he" is the same as "font=:lang=he". * @li font_fallbacks - A comma delimited list of fonts to try if finding the main font fails. * @li font_size - The font size in points. * @li font_source - The source of the font, e.g an eet file. * @li color - Text color in one of the following formats: "#RRGGBB", "#RRGGBBAA", "#RGB", and "#RGBA". * @li underline_color - color in one of the following formats: "#RRGGBB", "#RRGGBBAA", "#RGB", and "#RGBA". * @li underline2_color - color in one of the following formats: "#RRGGBB", "#RRGGBBAA", "#RGB", and "#RGBA". * @li outline_color - color in one of the following formats: "#RRGGBB", "#RRGGBBAA", "#RGB", and "#RGBA". * @li shadow_color - color in one of the following formats: "#RRGGBB", "#RRGGBBAA", "#RGB", and "#RGBA". * @li glow_color - color in one of the following formats: "#RRGGBB", "#RRGGBBAA", "#RGB", and "#RGBA". * @li glow2_color - color in one of the following formats: "#RRGGBB", "#RRGGBBAA", "#RGB", and "#RGBA". * @li strikethrough_color - color in one of the following formats: "#RRGGBB", "#RRGGBBAA", "#RGB", and "#RGBA". * @li align - Either "auto" (meaning according to text direction), "left", "right", "center", "middle", a value between 0.0 and 1.0, or a value between 0% to 100%. * @li valign - Either "top", "bottom", "middle", "center", "baseline", "base", a value between 0.0 and 1.0, or a value between 0% to 100%. * @li wrap - "word", "char", "mixed", or "none". * @li left_margin - Either "reset", or a pixel value indicating the margin. * @li right_margin - Either "reset", or a pixel value indicating the margin. * @li underline - "on", "off", "single", or "double". * @li strikethrough - "on" or "off" * @li backing_color - Background color in one of the following formats: "#RRGGBB", "#RRGGBBAA", "#RGB", and "#RGBA". * @li backing - Enable/disable background color. ex) "on" or "off" * @li style - Either "off", "none", "plain", "shadow", "outline", "soft_outline", "outline_shadow", "outline_soft_shadow", "glow", "far_shadow", "soft_shadow", or "far_soft_shadow". * @li tabstops - Pixel value for tab width. * @li linesize - Force a line size in pixels. * @li linerelsize - Either a floating point value or a percentage indicating the wanted size of the line relative to the calculated size. * @li linegap - Force a line gap in pixels. * @li linerelgap - Either a floating point value or a percentage indicating the wanted size of the line relative to the calculated size. * @li item - Creates an empty space that should be filled by an upper layer. Use "size", "abssize", or "relsize". To define the items size, and an optional: vsize=full/ascent to define the item's position in the line. * @li linefill - Either a float value or percentage indicating how much to fill the line. * @li ellipsis - Value between 0.0-1.0 to indicate the type of ellipsis, or -1.0 to indicate ellipsis isn't wanted. * @li password - "on" or "off". This is used to specifically turn replacing chars with the replacement char (i.e password mode) on and off. * * @warning We don't guarantee any proper results if you create a Textblock * object * without setting the evas engine. * * @todo put here some usage examples * * @ingroup Evas_Object_Specific * * @{ */ typedef struct _Evas_Textblock_Style Evas_Textblock_Style; typedef struct _Evas_Textblock_Cursor Evas_Textblock_Cursor; /** * @typedef Evas_Object_Textblock_Node_Format * A format node. */ typedef struct _Evas_Object_Textblock_Node_Format Evas_Object_Textblock_Node_Format; typedef struct _Evas_Textblock_Rectangle Evas_Textblock_Rectangle; struct _Evas_Textblock_Rectangle { Evas_Coord x, y, w, h; }; typedef enum _Evas_Textblock_Text_Type { EVAS_TEXTBLOCK_TEXT_RAW, EVAS_TEXTBLOCK_TEXT_PLAIN, EVAS_TEXTBLOCK_TEXT_MARKUP } Evas_Textblock_Text_Type; typedef enum _Evas_Textblock_Cursor_Type { EVAS_TEXTBLOCK_CURSOR_UNDER, EVAS_TEXTBLOCK_CURSOR_BEFORE } Evas_Textblock_Cursor_Type; /** * Adds a textblock to the given evas. * @param e The given evas. * @return The new textblock object. */ EAPI Evas_Object *evas_object_textblock_add(Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC; /** * Returns the unescaped version of escape. * @param escape the string to be escaped * @return the unescaped version of escape */ EAPI const char *evas_textblock_escape_string_get(const char *escape) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Returns the escaped version of the string. * @param string to escape * @param len_ret the len of the part of the string that was used. * @return the escaped string. */ EAPI const char *evas_textblock_string_escape_get(const char *string, int *len_ret) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Return the unescaped version of the string between start and end. * * @param escape_start the start of the string. * @param escape_end the end of the string. * @return the unescaped version of the range */ EAPI const char *evas_textblock_escape_string_range_get(const char *escape_start, const char *escape_end) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2); /** * Return the plain version of the markup. * * Works as if you set the markup to a textblock and then retrieve the plain * version of the text. i.e:
and <\n> will be replaced with \n, &...; with * the actual char and etc. * * @param obj The textblock object to work with. (if @c NULL, tries the * default). * @param text The markup text (if @c NULL, return @c NULL). * @return An allocated plain text version of the markup. * @since 1.2 */ EAPI char *evas_textblock_text_markup_to_utf8(const Evas_Object *obj, const char *text) EINA_WARN_UNUSED_RESULT EINA_MALLOC; /** * Return the markup version of the plain text. * * Replaces \\n -\> \
\\t -\> \ and etc. Generally needed before you pass * plain text to be set in a textblock. * * @param obj the textblock object to work with (if @c NULL, it just does the * default behaviour, i.e with no extra object information). * @param text The markup text (if @c NULL, return @c NULL). * @return An allocated plain text version of the markup. * @since 1.2 */ EAPI char *evas_textblock_text_utf8_to_markup(const Evas_Object *obj, const char *text) EINA_WARN_UNUSED_RESULT EINA_MALLOC; /** * Creates a new textblock style. * @return The new textblock style. */ EAPI Evas_Textblock_Style *evas_textblock_style_new(void) EINA_WARN_UNUSED_RESULT EINA_MALLOC; /** * Destroys a textblock style. * @param ts The textblock style to free. */ EAPI void evas_textblock_style_free(Evas_Textblock_Style *ts) EINA_ARG_NONNULL(1); /** * Sets the style ts to the style passed as text by text. * Expected a string consisting of many (or none) tag='format' pairs. * * @param ts the style to set. * @param text the text to parse - NOT NULL. * @return Returns no value. */ EAPI void evas_textblock_style_set(Evas_Textblock_Style *ts, const char *text) EINA_ARG_NONNULL(1); /** * Return the text of the style ts. * @param ts the style to get it's text. * @return the text of the style or null on error. */ EAPI const char *evas_textblock_style_get(const Evas_Textblock_Style *ts) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Set the objects style to ts. * @param obj the Evas object to set the style to. * @param ts the style to set. * @return Returns no value. */ EAPI void evas_object_textblock_style_set(Evas_Object *obj, Evas_Textblock_Style *ts) EINA_ARG_NONNULL(1); /** * Return the style of an object. * @param obj the object to get the style from. * @return the style of the object. */ EAPI const Evas_Textblock_Style *evas_object_textblock_style_get(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Push ts to the top of the user style stack. * * FIXME: API is solid but currently only supports 1 style in the stack. * * The user style overrides the corresponding elements of the regular style. * This is the proper way to do theme overrides in code. * @param obj the Evas object to set the style to. * @param ts the style to set. * @return Returns no value. * @see evas_object_textblock_style_set * @since 1.2 */ EAPI void evas_object_textblock_style_user_push(Evas_Object *obj, Evas_Textblock_Style *ts) EINA_ARG_NONNULL(1); /** * Del the from the top of the user style stack. * * @param obj the object to get the style from. * @see evas_object_textblock_style_get * @since 1.2 */ EAPI void evas_object_textblock_style_user_pop(Evas_Object *obj) EINA_ARG_NONNULL(1); /** * Get (don't remove) the style at the top of the user style stack. * * @param obj the object to get the style from. * @return the style of the object. * @see evas_object_textblock_style_get * @since 1.2 */ EAPI const Evas_Textblock_Style *evas_object_textblock_style_user_peek(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * @brief Set the "replacement character" to use for the given textblock object. * * @param obj The given textblock object. * @param ch The charset name. */ EAPI void evas_object_textblock_replace_char_set(Evas_Object *obj, const char *ch) EINA_ARG_NONNULL(1); /** * @brief Get the "replacement character" for given textblock object. Returns * @c NULL if no replacement character is in use. * * @param obj The given textblock object * @return Replacement character or @c NULL. */ EAPI const char *evas_object_textblock_replace_char_get(Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * @brief Sets the vertical alignment of text within the textblock object * as a whole. * * Normally alignment is 0.0 (top of object). Values given should be * between 0.0 and 1.0 (1.0 bottom of object, 0.5 being vertically centered * etc.). * * @param obj The given textblock object. * @param align A value between @c 0.0 and @c 1.0. * @since 1.1 */ EAPI void evas_object_textblock_valign_set(Evas_Object *obj, double align); /** * @brief Gets the vertical alignment of a textblock * * @param obj The given textblock object. * @return The alignment set for the object. * @since 1.1 */ EAPI double evas_object_textblock_valign_get(const Evas_Object *obj); /** * @brief Sets the BiDi delimiters used in the textblock. * * BiDi delimiters are use for in-paragraph separation of bidi segments. This * is useful for example in recipients fields of e-mail clients where bidi * oddities can occur when mixing RTL and LTR. * * @param obj The given textblock object. * @param delim A null terminated string of delimiters, e.g ",|". * @since 1.1 */ EAPI void evas_object_textblock_bidi_delimiters_set(Evas_Object *obj, const char *delim); /** * @brief Gets the BiDi delimiters used in the textblock. * * BiDi delimiters are use for in-paragraph separation of bidi segments. This * is useful for example in recipients fields of e-mail clients where bidi * oddities can occur when mixing RTL and LTR. * * @param obj The given textblock object. * @return A null terminated string of delimiters, e.g ",|". If empty, returns * @c NULL. * @since 1.1 */ EAPI const char *evas_object_textblock_bidi_delimiters_get(const Evas_Object *obj); /** * @brief Sets newline mode. When true, newline character will behave * as a paragraph separator. * * @param obj The given textblock object. * @param mode @c EINA_TRUE for legacy mode, @c EINA_FALSE otherwise. * @since 1.1 */ EAPI void evas_object_textblock_legacy_newline_set(Evas_Object *obj, Eina_Bool mode) EINA_ARG_NONNULL(1); /** * @brief Gets newline mode. When true, newline character behaves * as a paragraph separator. * * @param obj The given textblock object. * @return @c EINA_TRUE if in legacy mode, @c EINA_FALSE otherwise. * @since 1.1 */ EAPI Eina_Bool evas_object_textblock_legacy_newline_get(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Sets the tetxblock's text to the markup text. * * @note assumes text does not include the unicode object replacement char (0xFFFC) * * @param obj the textblock object. * @param text the markup text to use. * @return Return no value. */ EAPI void evas_object_textblock_text_markup_set(Evas_Object *obj, const char *text) EINA_ARG_NONNULL(1); /** * Prepends markup to the cursor cur. * * @note assumes text does not include the unicode object replacement char (0xFFFC) * * @param cur the cursor to prepend to. * @param text the markup text to prepend. * @return Return no value. */ EAPI void evas_object_textblock_text_markup_prepend(Evas_Textblock_Cursor *cur, const char *text) EINA_ARG_NONNULL(1, 2); /** * Return the markup of the object. * * @param obj the Evas object. * @return the markup text of the object. */ EAPI const char *evas_object_textblock_text_markup_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); /** * Return the object's main cursor. * * @param obj the object. * @return The @p obj's main cursor. */ EAPI Evas_Textblock_Cursor *evas_object_textblock_cursor_get(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Create a new cursor, associate it to the obj and init it to point * to the start of the textblock. Association to the object means the cursor * will be updated when the object will change. * * @note if you need speed and you know what you are doing, it's slightly faster to just allocate the cursor yourself and not associate it. (only people developing the actual object, and not users of the object). * * @param obj the object to associate to. * @return the new cursor. */ EAPI Evas_Textblock_Cursor *evas_object_textblock_cursor_new(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC; /** * Free the cursor and unassociate it from the object. * @note do not use it to free unassociated cursors. * * @param cur the cursor to free. * @return Returns no value. */ EAPI void evas_textblock_cursor_free(Evas_Textblock_Cursor *cur) EINA_ARG_NONNULL(1); /** * Sets the cursor to the start of the first text node. * * @param cur the cursor to update. * @return Returns no value. */ EAPI void evas_textblock_cursor_paragraph_first(Evas_Textblock_Cursor *cur) EINA_ARG_NONNULL(1); /** * sets the cursor to the end of the last text node. * * @param cur the cursor to set. * @return Returns no value. */ EAPI void evas_textblock_cursor_paragraph_last(Evas_Textblock_Cursor *cur) EINA_ARG_NONNULL(1); /** * Advances to the start of the next text node * * @param cur the cursor to update * @return @c EINA_TRUE if it managed to advance a paragraph, @c EINA_FALSE * otherwise. */ EAPI Eina_Bool evas_textblock_cursor_paragraph_next(Evas_Textblock_Cursor *cur) EINA_ARG_NONNULL(1); /** * Advances to the end of the previous text node * * @param cur the cursor to update * @return @c EINA_TRUE if it managed to advance a paragraph, @c EINA_FALSE * otherwise. */ EAPI Eina_Bool evas_textblock_cursor_paragraph_prev(Evas_Textblock_Cursor *cur) EINA_ARG_NONNULL(1); /** * Returns the * * @param obj The evas, must not be @c NULL. * @param anchor the anchor name to get * @return Returns the list format node corresponding to the anchor, may be null if there are none. */ EAPI const Eina_List *evas_textblock_node_format_list_get(const Evas_Object *obj, const char *anchor) EINA_ARG_NONNULL(1, 2); /** * Returns the first format node. * * @param obj The evas, must not be @c NULL. * @return Returns the first format node, may be null if there are none. */ EAPI const Evas_Object_Textblock_Node_Format *evas_textblock_node_format_first_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); /** * Returns the last format node. * * @param obj The evas textblock, must not be NULL. * @return Returns the first format node, may be null if there are none. */ EAPI const Evas_Object_Textblock_Node_Format *evas_textblock_node_format_last_get(const Evas_Object *obj) EINA_ARG_NONNULL(1); /** * Returns the next format node (after n) * * @param n the current format node - not null. * @return Returns the next format node, may be null. */ EAPI const Evas_Object_Textblock_Node_Format *evas_textblock_node_format_next_get(const Evas_Object_Textblock_Node_Format *n) EINA_ARG_NONNULL(1); /** * Returns the prev format node (after n) * * @param n the current format node - not null. * @return Returns the prev format node, may be null. */ EAPI const Evas_Object_Textblock_Node_Format *evas_textblock_node_format_prev_get(const Evas_Object_Textblock_Node_Format *n) EINA_ARG_NONNULL(1); /** * Remove a format node and it's match. i.e, removes a \ \ pair. * Assumes the node is the first part of \ i.e, this won't work if * n is a closing tag. * * @param obj the Evas object of the textblock - not null. * @param n the current format node - not null. */ EAPI void evas_textblock_node_format_remove_pair(Evas_Object *obj, Evas_Object_Textblock_Node_Format *n) EINA_ARG_NONNULL(1, 2); /** * Sets the cursor to point to the place where format points to. * * @param cur the cursor to update. * @param n the format node to update according. * @deprecated duplicate of evas_textblock_cursor_at_format_set */ EAPI void evas_textblock_cursor_set_at_format(Evas_Textblock_Cursor *cur, const Evas_Object_Textblock_Node_Format *n) EINA_ARG_NONNULL(1, 2); /** * Return the format node at the position pointed by cur. * * @param cur the position to look at. * @return the format node if found, @c NULL otherwise. * @see evas_textblock_cursor_format_is_visible_get() */ EAPI const Evas_Object_Textblock_Node_Format *evas_textblock_cursor_format_get(const Evas_Textblock_Cursor *cur) EINA_ARG_NONNULL(1); /** * Get the text format representation of the format node. * * @param fnode the format node. * @return the textual format of the format node. */ EAPI const char *evas_textblock_node_format_text_get(const Evas_Object_Textblock_Node_Format *fnode) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Set the cursor to point to the position of fmt. * * @param cur the cursor to update * @param fmt the format to update according to. */ EAPI void evas_textblock_cursor_at_format_set(Evas_Textblock_Cursor *cur, const Evas_Object_Textblock_Node_Format *fmt) EINA_ARG_NONNULL(1, 2); /** * Check if the current cursor position is a visible format. This way is more * efficient than evas_textblock_cursor_format_get() to check for the existence * of a visible format. * * @param cur the cursor to look at. * @return @c EINA_TRUE if the cursor points to a visible format, @c EINA_FALSE * otherwise. * @see evas_textblock_cursor_format_get() */ EAPI Eina_Bool evas_textblock_cursor_format_is_visible_get(const Evas_Textblock_Cursor *cur) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Advances to the next format node * * @param cur the cursor to be updated. * @return @c EINA_TRUE on success @c EINA_FALSE otherwise. */ EAPI Eina_Bool evas_textblock_cursor_format_next(Evas_Textblock_Cursor *cur) EINA_ARG_NONNULL(1); /** * Advances to the previous format node. * * @param cur the cursor to update. * @return @c EINA_TRUE on success @c EINA_FALSE otherwise. */ EAPI Eina_Bool evas_textblock_cursor_format_prev(Evas_Textblock_Cursor *cur) EINA_ARG_NONNULL(1); /** * Returns true if the cursor points to a format. * * @param cur the cursor to check. * @return @c EINA_TRUE if a cursor points to a format @c EINA_FALSE * otherwise. */ EAPI Eina_Bool evas_textblock_cursor_is_format(const Evas_Textblock_Cursor *cur) EINA_ARG_NONNULL(1); /** * Advances 1 char forward. * * @param cur the cursor to advance. * @return @c EINA_TRUE on success @c EINA_FALSE otherwise. */ EAPI Eina_Bool evas_textblock_cursor_char_next(Evas_Textblock_Cursor *cur) EINA_ARG_NONNULL(1); /** * Advances 1 char backward. * * @param cur the cursor to advance. * @return @c EINA_TRUE on success @c EINA_FALSE otherwise. */ EAPI Eina_Bool evas_textblock_cursor_char_prev(Evas_Textblock_Cursor *cur) EINA_ARG_NONNULL(1); /** * Moves the cursor to the start of the word under the cursor. * * @param cur the cursor to move. * @return @c EINA_TRUE on success @c EINA_FALSE otherwise. * @since 1.2 */ EAPI Eina_Bool evas_textblock_cursor_word_start(Evas_Textblock_Cursor *cur) EINA_ARG_NONNULL(1); /** * Moves the cursor to the end of the word under the cursor. * * @param cur the cursor to move. * @return @c EINA_TRUE on success @c EINA_FALSE otherwise. * @since 1.2 */ EAPI Eina_Bool evas_textblock_cursor_word_end(Evas_Textblock_Cursor *cur) EINA_ARG_NONNULL(1); /** * Go to the first char in the node the cursor is pointing on. * * @param cur the cursor to update. * @return Returns no value. */ EAPI void evas_textblock_cursor_paragraph_char_first(Evas_Textblock_Cursor *cur) EINA_ARG_NONNULL(1); /** * Go to the last char in a text node. * * @param cur the cursor to update. * @return Returns no value. */ EAPI void evas_textblock_cursor_paragraph_char_last(Evas_Textblock_Cursor *cur) EINA_ARG_NONNULL(1); /** * Go to the start of the current line * * @param cur the cursor to update. * @return Returns no value. */ EAPI void evas_textblock_cursor_line_char_first(Evas_Textblock_Cursor *cur) EINA_ARG_NONNULL(1); /** * Go to the end of the current line. * * @param cur the cursor to update. * @return Returns no value. */ EAPI void evas_textblock_cursor_line_char_last(Evas_Textblock_Cursor *cur) EINA_ARG_NONNULL(1); /** * Return the current cursor pos. * * @param cur the cursor to take the position from. * @return the position or -1 on error */ EAPI int evas_textblock_cursor_pos_get(const Evas_Textblock_Cursor *cur) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Set the cursor pos. * * @param cur the cursor to be set. * @param pos the pos to set. */ EAPI void evas_textblock_cursor_pos_set(Evas_Textblock_Cursor *cur, int pos) EINA_ARG_NONNULL(1); /** * Go to the start of the line passed * * @param cur cursor to update. * @param line numer to set. * @return @c EINA_TRUE on success, @c EINA_FALSE on error. */ EAPI Eina_Bool evas_textblock_cursor_line_set(Evas_Textblock_Cursor *cur, int line) EINA_ARG_NONNULL(1); /** * Compare two cursors. * * @param cur1 the first cursor. * @param cur2 the second cursor. * @return -1 if cur1 < cur2, 0 if cur1 == cur2 and 1 otherwise. */ EAPI int evas_textblock_cursor_compare(const Evas_Textblock_Cursor *cur1, const Evas_Textblock_Cursor *cur2) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2); /** * Make cur_dest point to the same place as cur. Does not work if they don't * point to the same object. * * @param cur the source cursor. * @param cur_dest destination cursor. * @return Returns no value. */ EAPI void evas_textblock_cursor_copy(const Evas_Textblock_Cursor *cur, Evas_Textblock_Cursor *cur_dest) EINA_ARG_NONNULL(1, 2); /** * Adds text to the current cursor position and set the cursor to *before* * the start of the text just added. * * @param cur the cursor to where to add text at. * @param text the text to add. * @return Returns the len of the text added. * @see evas_textblock_cursor_text_prepend() */ EAPI int evas_textblock_cursor_text_append(Evas_Textblock_Cursor *cur, const char *text) EINA_ARG_NONNULL(1, 2); /** * Adds text to the current cursor position and set the cursor to *after* * the start of the text just added. * * @param cur the cursor to where to add text at. * @param text the text to add. * @return Returns the len of the text added. * @see evas_textblock_cursor_text_append() */ EAPI int evas_textblock_cursor_text_prepend(Evas_Textblock_Cursor *cur, const char *text) EINA_ARG_NONNULL(1, 2); /** * Adds format to the current cursor position. If the format being added is a * visible format, add it *before* the cursor position, otherwise, add it after. * This behavior is because visible formats are like characters and invisible * should be stacked in a way that the last one is added last. * * This function works with native formats, that means that style defined * tags like
won't work here. For those kind of things use markup prepend. * * @param cur the cursor to where to add format at. * @param format the format to add. * @return Returns true if a visible format was added, false otherwise. * @see evas_textblock_cursor_format_prepend() */ /** * Check if the current cursor position points to the terminating null of the * last paragraph. (shouldn't be allowed to point to the terminating null of * any previous paragraph anyway. * * @param cur the cursor to look at. * @return @c EINA_TRUE if the cursor points to the terminating null, @c EINA_FALSE otherwise. */ EAPI Eina_Bool evas_textblock_cursor_format_append(Evas_Textblock_Cursor *cur, const char *format) EINA_ARG_NONNULL(1, 2); /** * Adds format to the current cursor position. If the format being added is a * visible format, add it *before* the cursor position, otherwise, add it after. * This behavior is because visible formats are like characters and invisible * should be stacked in a way that the last one is added last. * If the format is visible the cursor is advanced after it. * * This function works with native formats, that means that style defined * tags like
won't work here. For those kind of things use markup prepend. * * @param cur the cursor to where to add format at. * @param format the format to add. * @return Returns true if a visible format was added, false otherwise. * @see evas_textblock_cursor_format_prepend() */ EAPI Eina_Bool evas_textblock_cursor_format_prepend(Evas_Textblock_Cursor *cur, const char *format) EINA_ARG_NONNULL(1, 2); /** * Delete the character at the location of the cursor. If there's a format * pointing to this position, delete it as well. * * @param cur the cursor pointing to the current location. * @return Returns no value. */ EAPI void evas_textblock_cursor_char_delete(Evas_Textblock_Cursor *cur) EINA_ARG_NONNULL(1); /** * Delete the range between cur1 and cur2. * * @param cur1 one side of the range. * @param cur2 the second side of the range * @return Returns no value. */ EAPI void evas_textblock_cursor_range_delete(Evas_Textblock_Cursor *cur1, Evas_Textblock_Cursor *cur2) EINA_ARG_NONNULL(1, 2); /** * Return the text of the paragraph cur points to - returns the text in markup. * * @param cur the cursor pointing to the paragraph. * @return the text on success, @c NULL otherwise. */ EAPI const char *evas_textblock_cursor_paragraph_text_get(const Evas_Textblock_Cursor *cur) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Return the length of the paragraph, cheaper the eina_unicode_strlen() * * @param cur the position of the paragraph. * @return the length of the paragraph on success, -1 otehrwise. */ EAPI int evas_textblock_cursor_paragraph_text_length_get(const Evas_Textblock_Cursor *cur) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Return the currently visible range. * * @param start the start of the range. * @param end the end of the range. * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise. * @since 1.1 */ EAPI Eina_Bool evas_textblock_cursor_visible_range_get(Evas_Textblock_Cursor *start, Evas_Textblock_Cursor *end) EINA_ARG_NONNULL(1, 2); /** * Return the format nodes in the range between cur1 and cur2. * * @param cur1 one side of the range. * @param cur2 the other side of the range * @return the foramt nodes in the range. You have to free it. * @since 1.1 */ EAPI Eina_List *evas_textblock_cursor_range_formats_get(const Evas_Textblock_Cursor *cur1, const Evas_Textblock_Cursor *cur2) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2); /** * Return the text in the range between cur1 and cur2 * * @param cur1 one side of the range. * @param cur2 the other side of the range * @param format The form on which to return the text. Markup - in textblock markup. Plain - UTF8. * @return the text in the range * @see elm_entry_markup_to_utf8() */ EAPI char *evas_textblock_cursor_range_text_get(const Evas_Textblock_Cursor *cur1, const Evas_Textblock_Cursor *cur2, Evas_Textblock_Text_Type format) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2); /** * Return the content of the cursor. * * Free the returned string pointer when done (if it is not NULL). * * @param cur the cursor * @return the text in the range, terminated by a nul byte (may be utf8). */ EAPI char *evas_textblock_cursor_content_get(const Evas_Textblock_Cursor *cur) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC; /** * Returns the geometry of the cursor. Depends on the type of cursor requested. * This should be used instead of char_geometry_get because there are weird * special cases with BiDi text. * in '_' cursor mode (i.e a line below the char) it's the same as char_geometry * get, except for the case of the last char of a line which depends on the * paragraph direction. * * in '|' cursor mode (i.e a line between two chars) it is very variable. * For example consider the following visual string: * "abcCBA" (ABC are rtl chars), a cursor pointing on A should actually draw * a '|' between the c and the C. * * @param cur the cursor. * @param cx the x of the cursor * @param cy the y of the cursor * @param cw the width of the cursor * @param ch the height of the cursor * @param dir the direction of the cursor, can be NULL. * @param ctype the type of the cursor. * @return line number of the char on success, -1 on error. */ EAPI int evas_textblock_cursor_geometry_get(const Evas_Textblock_Cursor *cur, Evas_Coord *cx, Evas_Coord *cy, Evas_Coord *cw, Evas_Coord *ch, Evas_BiDi_Direction *dir, Evas_Textblock_Cursor_Type ctype) EINA_ARG_NONNULL(1); /** * Returns the geometry of the char at cur. * * @param cur the position of the char. * @param cx the x of the char. * @param cy the y of the char. * @param cw the w of the char. * @param ch the h of the char. * @return line number of the char on success, -1 on error. */ EAPI int evas_textblock_cursor_char_geometry_get(const Evas_Textblock_Cursor *cur, Evas_Coord *cx, Evas_Coord *cy, Evas_Coord *cw, Evas_Coord *ch) EINA_ARG_NONNULL(1); /** * Returns the geometry of the pen at cur. * * @param cur the position of the char. * @param cpen_x the pen_x of the char. * @param cy the y of the char. * @param cadv the adv of the char. * @param ch the h of the char. * @return line number of the char on success, -1 on error. */ EAPI int evas_textblock_cursor_pen_geometry_get(const Evas_Textblock_Cursor *cur, Evas_Coord *cpen_x, Evas_Coord *cy, Evas_Coord *cadv, Evas_Coord *ch) EINA_ARG_NONNULL(1); /** * Returns the geometry of the line at cur. * * @param cur the position of the line. * @param cx the x of the line. * @param cy the y of the line. * @param cw the width of the line. * @param ch the height of the line. * @return line number of the line on success, -1 on error. */ EAPI int evas_textblock_cursor_line_geometry_get(const Evas_Textblock_Cursor *cur, Evas_Coord *cx, Evas_Coord *cy, Evas_Coord *cw, Evas_Coord *ch) EINA_ARG_NONNULL(1); /** * Set the position of the cursor according to the X and Y coordinates. * * @param cur the cursor to set. * @param x coord to set by. * @param y coord to set by. * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise. */ EAPI Eina_Bool evas_textblock_cursor_char_coord_set(Evas_Textblock_Cursor *cur, Evas_Coord x, Evas_Coord y) EINA_ARG_NONNULL(1); /** * Set the cursor position according to the y coord. * * @param cur the cur to be set. * @param y the coord to set by. * @return the line number found, -1 on error. */ EAPI int evas_textblock_cursor_line_coord_set(Evas_Textblock_Cursor *cur, Evas_Coord y) EINA_ARG_NONNULL(1); /** * Get the geometry of a range. * * @param cur1 one side of the range. * @param cur2 other side of the range. * @return a list of Rectangles representing the geometry of the range. */ EAPI Eina_List *evas_textblock_cursor_range_geometry_get(const Evas_Textblock_Cursor *cur1, const Evas_Textblock_Cursor *cur2) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2); EAPI Eina_Bool evas_textblock_cursor_format_item_geometry_get(const Evas_Textblock_Cursor *cur, Evas_Coord *cx, Evas_Coord *cy, Evas_Coord *cw, Evas_Coord *ch) EINA_ARG_NONNULL(1); /** * Checks if the cursor points to the end of the line. * * @param cur the cursor to check. * @return @c EINA_TRUE if true, @c EINA_FALSE otherwise. */ EAPI Eina_Bool evas_textblock_cursor_eol_get(const Evas_Textblock_Cursor *cur) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Get the geometry of a line number. * * @param obj the object. * @param line the line number. * @param cx x coord of the line. * @param cy y coord of the line. * @param cw w coord of the line. * @param ch h coord of the line. * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise. */ EAPI Eina_Bool evas_object_textblock_line_number_geometry_get(const Evas_Object *obj, int line, Evas_Coord *cx, Evas_Coord *cy, Evas_Coord *cw, Evas_Coord *ch) EINA_ARG_NONNULL(1); /** * Clear the textblock object. * @note Does *NOT* free the Evas object itself. * * @param obj the object to clear. * @return nothing. */ EAPI void evas_object_textblock_clear(Evas_Object *obj) EINA_ARG_NONNULL(1); /** * Get the formatted width and height. This calculates the actual size after restricting * the textblock to the current size of the object. * The main difference between this and @ref evas_object_textblock_size_native_get * is that the "native" function does not wrapping into account * it just calculates the real width of the object if it was placed on an * infinite canvas, while this function gives the size after wrapping * according to the size restrictions of the object. * * For example for a textblock containing the text: "You shall not pass!" * with no margins or padding and assuming a monospace font and a size of * 7x10 char widths (for simplicity) has a native size of 19x1 * and a formatted size of 5x4. * * * @param obj the Evas object. * @param w the width of the object. * @param h the height of the object * @return Returns no value. * @see evas_object_textblock_size_native_get */ EAPI void evas_object_textblock_size_formatted_get(const Evas_Object *obj, Evas_Coord *w, Evas_Coord *h) EINA_ARG_NONNULL(1); /** * Get the native width and height. This calculates the actual size without taking account * the current size of the object. * The main difference between this and @ref evas_object_textblock_size_formatted_get * is that the "native" function does not take wrapping into account * it just calculates the real width of the object if it was placed on an * infinite canvas, while the "formatted" function gives the size after * wrapping text according to the size restrictions of the object. * * For example for a textblock containing the text: "You shall not pass!" * with no margins or padding and assuming a monospace font and a size of * 7x10 char widths (for simplicity) has a native size of 19x1 * and a formatted size of 5x4. * * @param obj the Evas object of the textblock * @param w the width returned * @param h the height returned * @return Returns no value. */ EAPI void evas_object_textblock_size_native_get(const Evas_Object *obj, Evas_Coord *w, Evas_Coord *h) EINA_ARG_NONNULL(1); EAPI void evas_object_textblock_style_insets_get(const Evas_Object *obj, Evas_Coord *l, Evas_Coord *r, Evas_Coord *t, Evas_Coord *b) EINA_ARG_NONNULL(1); /** * @} */ /** * @defgroup Evas_Object_Textgrid Textgrid Object Functions * * @todo put here some usage examples * * @since 1.7 * * @ingroup Evas_Object_Specific * * @{ */ /** * @typedef Evas_Textgrid_Palette * * The palette to use for the forgraound and background colors. * * @since 1.7 */ typedef enum { EVAS_TEXTGRID_PALETTE_NONE, /**< No palette is used */ EVAS_TEXTGRID_PALETTE_STANDARD, /**< standard palette (around 16 colors) */ EVAS_TEXTGRID_PALETTE_EXTENDED, /**< extended palette (at max 256 colors) */ EVAS_TEXTGRID_PALETTE_LAST /**< ignore it */ } Evas_Textgrid_Palette; /** * @typedef Evas_Textgrid_Font_Style * * The style to give to each character of the grid. * * @since 1.7 */ typedef enum { EVAS_TEXTGRID_FONT_STYLE_NORMAL = (1 << 0), /**< Normal style */ EVAS_TEXTGRID_FONT_STYLE_BOLD = (1 << 1), /**< Bold style */ EVAS_TEXTGRID_FONT_STYLE_ITALIC = (1 << 2) /**< Oblique style */ } Evas_Textgrid_Font_Style; /** * @typedef Evas_Textgrid_Cell * * The values that describes each cell. * * @since 1.7 */ typedef struct _Evas_Textgrid_Cell Evas_Textgrid_Cell; /** * @struct _Evas_Textgrid_Cell * * The values that describes each cell. * * @since 1.7 */ struct _Evas_Textgrid_Cell { Eina_Unicode codepoint; /**< the UNICODE value of the character */ unsigned char fg; /**< the index of the palette for the foreground color */ unsigned char bg; /**< the index of the palette for the background color */ unsigned short bold : 1; /**< whether the character is bold */ unsigned short italic : 1; /**< whether the character is oblique */ unsigned short underline : 1; /**< whether the character is underlined */ unsigned short strikethrough : 1; /**< whether the character is strikethrough'ed */ unsigned short fg_extended : 1; /**< whether the extended palette is used for the foreground color */ unsigned short bg_extended : 1; /**< whether the extended palette is used for the background color */ unsigned short double_width : 1; /**< if the codepoint is merged with the following cell to the right visually (cells must be in pairs with 2nd cell being a duplicate in all ways except codepoint is 0) */ }; /** * @brief Add a textgrid to the given Evas. * * @param e The given evas. * @return The new textgrid object. * * This function adds a new textgrid object to the Evas @p e and returns the object. * * @since 1.7 */ EAPI Evas_Object *evas_object_textgrid_add(Evas *e); /** * @brief Set the size of the textgrid object. * * @param obj The textgrid object. * @param w The number of columns (width in cells) of the grid. * @param h The number of rows (height in cells) of the grid. * * This function sets the number of lines @p h and the number * of columns @p w to the textgrid object @p obj. If * @p w or @p h are less or equal than 0, this * functiond does nothing. * * @since 1.7 */ EAPI void evas_object_textgrid_size_set(Evas_Object *obj, int w, int h); /** * @brief Get the size of the textgrid object. * * @param obj The textgrid object. * @param w The number of columns of the grid. * @param h The number of rows of the grid. * * This function retrieves the number of lines in the buffer @p * h and the number of columns in the buffer @p w of * the textgrid object @p obj. @p w or @p h can be * @c NULL. On error, their value is 0. * * @since 1.7 */ EAPI void evas_object_textgrid_size_get(const Evas_Object *obj, int *w, int *h); /** * @brief Set the font (source) file to be used on a given textgrid object. * * @param obj The textgrid object to set font for. * @param font_source The font file's path. * * This function allows the font file @p font_source to be explicitly * set for the textgrid object @p obj, overriding system lookup, which * will first occur in the given file's contents. If @font_source is * @c NULL or is an empty string, or the same font_source has already * been set, or on error, this function does nothing. * * @see evas_object_textgrid_font_get() * @see evas_object_textgrid_font_set() * @see evas_object_textgrid_font_source_get() * * @since 1.7 */ EAPI void evas_object_textgrid_font_source_set(Evas_Object *obj, const char *font_source); /** * @brief Get the font file's path which is being used on a given textgrid object. * * @param obj The textgrid object to set font for. * @return The font file's path. * * This function returns the font source path of the textgrid object * @p obj. If the font source path has not been set, or on error, * @c NULL is returned. * * @see evas_object_textgrid_font_get() * @see evas_object_textgrid_font_set() * @see evas_object_textgrid_font_source_set() * * @since 1.7 */ EAPI const char *evas_object_textgrid_font_source_get(const Evas_Object *obj); /** * @brief Set the font family and size on a given textgrid object. * * @param obj The textgrid object to set font for. * @param font_name The font (family) name. * @param font_size The font size, in points. * * This function allows the font name @p font_name and size * @p font_size of the textgrid object @p obj to be set. The @p font_name * string has to follow fontconfig's convention on naming fonts, as * it's the underlying library used to query system fonts by Evas (see * the @c fc-list command's output, on your system, to get an * idea). It also has to be a monospace font. If @p font_name is * @c NULL, or if it is an empty string, or if @p font_size is less or * equal than 0, or on error, this function does nothing. * * @see evas_object_textgrid_font_get() * @see evas_object_textgrid_font_source_set() * @see evas_object_textgrid_font_source_get() * * @since 1.7 */ EAPI void evas_object_textgrid_font_set(Evas_Object *obj, const char *font_name, Evas_Font_Size font_size); /** * @brief Retrieve the font family and size in use on a given textgrid object. * * @param obj The textgrid object to query for font information. * @param font_name A pointer to the location to store the font name in. * @param font_size A pointer to the location to store the font size in. * * This function allows the font name and size of a textgrid object * @p obj to be queried and stored respectively in the buffers * @p font_name and @p font_size. Be aware that the font name string is * still owned by Evas and should @b not have free() called on it by * the caller of the function. On error, the font name is the empty * string and the font size is 0. @p font_name and @p font_source can * be @c NULL. * * @see evas_object_textgrid_font_set() * @see evas_object_textgrid_font_source_set() * @see evas_object_textgrid_font_source_get() * * @since 1.7 */ EAPI void evas_object_textgrid_font_get(const Evas_Object *obj, const char **font_name, Evas_Font_Size *font_size); /** * @brief Retrieve the size of a cell of the given textgrid object in pixels. * * @param obj The textgrid object to query for font information. * @param width A pointer to the location to store the width in pixels of a cell. * @param height A pointer to the location to store the height in * pixels of a cell. * * This functions retrieves the width and height, in pixels, of a cell * of the textgrid object @p obj and store them respectively in the * buffers @p width and @p height. Their value depends on the * monospace font used for the textgrid object, as well as the * style. @p width and @p height can be @c NULL. On error, they are * set to 0. * * @see evas_object_textgrid_font_set() * @see evas_object_textgrid_supported_font_styles_set() * * @since 1.7 */ EAPI void evas_object_textgrid_cell_size_get(const Evas_Object *obj, Evas_Coord *w, Evas_Coord *h); /** * @brief The set color to the given palette at the given index of the given textgrid object. * * @param obj The textgrid object to query for font information. * @param pal The type of the palette to set the color. * @param idx The index of the paletter to wich the color is stored. * @param r The red component of the color. * @param g The green component of the color. * @param b The blue component of the color. * @param a The alpha component of the color. * * This function sets the color for the palette of type @p pal at the * index @p idx of the textgrid object @p obj. The ARGB components are * given by @p r, @p g, @p b and @p a. This color can be used when * setting the #Evas_Textgrid_Cell structure. The components must set * a pre-multiplied color. If pal is #EVAS_TEXTGRID_PALETTE_NONE or * #EVAS_TEXTGRID_PALETTE_LAST, or if @p idx is not between 0 and 255, * or on error, this function does nothing. The color components are * clamped between 0 and 255. If @p idx is greater than the latest set * color, the colors between this last index and @p idx - 1 are set to * black (0, 0, 0, 0). * * @see evas_object_textgrid_palette_get() * * @since 1.7 */ EAPI void evas_object_textgrid_palette_set(Evas_Object *obj, Evas_Textgrid_Palette pal, int idx, int r, int g, int b, int a); /** * @brief The retrieve color to the given palette at the given index of the given textgrid object. * * @param obj The textgrid object to query for font information. * @param pal The type of the palette to set the color. * @param idx The index of the paletter to wich the color is stored. * @param r A pointer to the red component of the color. * @param g A pointer to the green component of the color. * @param b A pointer to the blue component of the color. * @param a A pointer to the alpha component of the color. * * This function retrieves the color for the palette of type @p pal at the * index @p idx of the textgrid object @p obj. The ARGB components are * stored in the buffers @p r, @p g, @p b and @p a. If @p idx is not * between 0 and the index of the latest set color, or if @p pal is * #EVAS_TEXTGRID_PALETTE_NONE or #EVAS_TEXTGRID_PALETTE_LAST, the * values of the components are 0. @p r, @p g, @pb and @p a can be * @c NULL. * * @see evas_object_textgrid_palette_set() * * @since 1.7 */ EAPI void evas_object_textgrid_palette_get(const Evas_Object *obj, Evas_Textgrid_Palette pal, int idx, int *r, int *g, int *b, int *a); EAPI void evas_object_textgrid_supported_font_styles_set(Evas_Object *obj, Evas_Textgrid_Font_Style styles); EAPI Evas_Textgrid_Font_Style evas_object_textgrid_supported_font_styles_get(const Evas_Object *obj); /** * @brief Set the string at the given row of the given textgrid object. * * @param obj The textgrid object to query for font information. * @param y The row index of the grid. * @param The string as a sequence of #Evas_Textgrid_Cell. * * This function returns cells to the textgrid taken by * evas_object_textgrid_cellrow_get(). The row pointer @p row should be the * same row pointer returned by evas_object_textgrid_cellrow_get() for the * same row @p y. * * @see evas_object_textgrid_cellrow_get() * @see evas_object_textgrid_size_set() * @see evas_object_textgrid_update_add() * * @since 1.7 */ EAPI void evas_object_textgrid_cellrow_set(Evas_Object *obj, int y, const Evas_Textgrid_Cell *row); /** * @brief Get the string at the given row of the given textgrid object. * * @param obj The textgrid object to query for font information. * @param y The row index of the grid. * @return A pointer to the first cell of the given row. * * This function returns a pointer to the first cell of the line @p y * of the textgrid object @p obj. If @p y is not between 0 and the * number of lines of the grid - 1, or on error, this function return @c NULL. * * @see evas_object_textgrid_cellrow_set() * @see evas_object_textgrid_size_set() * @see evas_object_textgrid_update_add() * * @since 1.7 */ EAPI Evas_Textgrid_Cell *evas_object_textgrid_cellrow_get(const Evas_Object *obj, int y); /** * @brief Indicate for evas that part of a textgrid region (cells) has been updated. * * @param obj The textgrid object. * @param x The rect region of cells top-left x (column) * @param y The rect region of cells top-left y (row) * @param w The rect region size in number of cells (columns) * @param h The rect region size in number of cells (rows) * * This function declares to evas that a region of cells was updated by * code and needs refreshing. An application should modify cells like this * as an example: * * @code * Evas_Textgrid_Cell *cells; * int i; * * cells = evas_object_textgrid_cellrow_get(obj, row); * for (i = 0; i < width; i++) cells[i].codepoint = 'E'; * evas_object_textgrid_cellrow_set(obj, row, cells); * evas_object_textgrid_update_add(obj, 0, row, width, 1); * @endcode * * @see evas_object_textgrid_cellrow_set() * @see evas_object_textgrid_cellrow_get() * @see evas_object_textgrid_size_set() * * @since 1.7 */ EAPI void evas_object_textgrid_update_add(Evas_Object *obj, int x, int y, int w, int h); /** * @} */ /** * @defgroup Evas_Line_Group Line Object Functions * * Functions used to deal with evas line objects. * * @warning We don't guarantee any proper results if you create a Line object * without setting the evas engine. * * @ingroup Evas_Object_Specific * * @{ */ /** * Adds a new evas line object to the given evas. * @param e The given evas. * @return The new evas line object. */ EAPI Evas_Object *evas_object_line_add(Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC; /** * Sets the coordinates of the end points of the given evas line object. * @param obj The given evas line object. * @param x1 The X coordinate of the first point. * @param y1 The Y coordinate of the first point. * @param x2 The X coordinate of the second point. * @param y2 The Y coordinate of the second point. */ EAPI void evas_object_line_xy_set(Evas_Object *obj, Evas_Coord x1, Evas_Coord y1, Evas_Coord x2, Evas_Coord y2); /** * Retrieves the coordinates of the end points of the given evas line object. * @param obj The given line object. * @param x1 Pointer to an integer in which to store the X coordinate of the * first end point. * @param y1 Pointer to an integer in which to store the Y coordinate of the * first end point. * @param x2 Pointer to an integer in which to store the X coordinate of the * second end point. * @param y2 Pointer to an integer in which to store the Y coordinate of the * second end point. */ EAPI void evas_object_line_xy_get(const Evas_Object *obj, Evas_Coord *x1, Evas_Coord *y1, Evas_Coord *x2, Evas_Coord *y2); /** * @} */ /** * @defgroup Evas_Object_Polygon Polygon Object Functions * * Functions that operate on evas polygon objects. * * Hint: as evas does not provide ellipse, smooth paths or circle, one * can calculate points and convert these to a polygon. * * @warning We don't guarantee any proper results if you create a Polygon * object without setting the evas engine. * * @ingroup Evas_Object_Specific * * @{ */ /** * Adds a new evas polygon object to the given evas. * @param e The given evas. * @return A new evas polygon object. */ EAPI Evas_Object *evas_object_polygon_add(Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC; /** * Adds the given point to the given evas polygon object. * @param obj The given evas polygon object. * @param x The X coordinate of the given point. * @param y The Y coordinate of the given point. * @ingroup Evas_Polygon_Group */ EAPI void evas_object_polygon_point_add(Evas_Object *obj, Evas_Coord x, Evas_Coord y) EINA_ARG_NONNULL(1); /** * Removes all of the points from the given evas polygon object. * @param obj The given polygon object. */ EAPI void evas_object_polygon_points_clear(Evas_Object *obj) EINA_ARG_NONNULL(1); /** * @} */ /* @since 1.2 */ EAPI void evas_object_is_frame_object_set(Evas_Object *obj, Eina_Bool is_frame); /* @since 1.2 */ EAPI Eina_Bool evas_object_is_frame_object_get(Evas_Object *obj); /** * @defgroup Evas_Smart_Group Smart Functions * * Functions that deal with #Evas_Smart structs, creating definition * (classes) of objects that will have customized behavior for methods * like evas_object_move(), evas_object_resize(), * evas_object_clip_set() and others. * * These objects will accept the generic methods defined in @ref * Evas_Object_Group and the extensions defined in @ref * Evas_Smart_Object_Group. There are a couple of existent smart * objects in Evas itself (see @ref Evas_Object_Box, @ref * Evas_Object_Table and @ref Evas_Smart_Object_Clipped). * * See also some @ref Example_Evas_Smart_Objects "examples" of this * group of functions. */ /** * @addtogroup Evas_Smart_Group * @{ */ /** * @def EVAS_SMART_CLASS_VERSION * * The version you have to put into the version field in the * #Evas_Smart_Class struct. Used to safeguard from binaries with old * smart object intefaces running with newer ones. * * @ingroup Evas_Smart_Group */ #define EVAS_SMART_CLASS_VERSION 4 /** * @struct _Evas_Smart_Class * * A smart object's @b base class definition * * @ingroup Evas_Smart_Group */ struct _Evas_Smart_Class { const char *name; /**< the name string of the class */ int version; void (*add)(Evas_Object *o); /**< code to be run when adding object to a canvas */ void (*del)(Evas_Object *o); /**< code to be run when removing object from a canvas */ void (*move)(Evas_Object *o, Evas_Coord x, Evas_Coord y); /**< code to be run when moving object on a canvas. @a x and @a y will be new coordinates one applied to the object. use evas_object_geometry_get() if you need the old values, during this call. after that, the old values will be lost. */ void (*resize)(Evas_Object *o, Evas_Coord w, Evas_Coord h); /**< code to be run when resizing object on a canvas. @a w and @a h will be new dimensions one applied to the object. use evas_object_geometry_get() if you need the old values, during this call. after that, the old values will be lost. */ void (*show)(Evas_Object *o); /**< code to be run when showing object on a canvas */ void (*hide)(Evas_Object *o); /**< code to be run when hiding object on a canvas */ void (*color_set)(Evas_Object *o, int r, int g, int b, int a); /**< code to be run when setting color of object on a canvas. @a r, @a g, @a b and @a y will be new color components one applied to the object. use evas_object_color_get() if you need the old values, during this call. after that, the old values will be lost. */ void (*clip_set)(Evas_Object *o, Evas_Object *clip); /**< code to be run when setting clipper of object on a canvas. @a clip will be new clipper one applied to the object. use evas_object_clip_get() if you need the old one, during this call. after that, the old (object pointer) value will be lost. */ void (*clip_unset)(Evas_Object *o); /**< code to be run when unsetting clipper of object on a canvas. if you need the pointer to a previous set clipper, during this call, use evas_object_clip_get(). after that, the old (object pointer) value will be lost. */ void (*calculate)(Evas_Object *o); /**< code to be run when object has rendering updates on a canvas */ void (*member_add)(Evas_Object *o, Evas_Object *child); /**< code to be run when a child member is added to object */ void (*member_del)(Evas_Object *o, Evas_Object *child); /**< code to be run when a child member is removed from object */ const Evas_Smart_Class *parent; /**< this class inherits from this parent */ const Evas_Smart_Cb_Description *callbacks; /**< callbacks at this level, @c NULL terminated */ const Evas_Smart_Interface **interfaces; /**< #Evas_Smart_Interface pointers array, @c NULL terminated. These will be the interfaces supported at this level for an object (parents may have others) @since 1.7 */ const void *data; }; /** * @struct _Evas_Smart_Interface * * A smart object's @b base interface definition * * Every Evas interface must have a name field, pointing to a global, * constant string variable. This string pointer will be the only way * of retrieving back a given interface from a smart object. Two * function pointers must be defined, too, which will be called at * object creation and deletion times. * * See also some @ref Example_Evas_Smart_Interfaces "examples" on * smart interfaces. * * @since 1.7 * * @ingroup Evas_Smart_Group */ struct _Evas_Smart_Interface { const char *name; /**< Name of the given interface */ unsigned private_size; /**< Size, in bytes, of the interface's private dada blob. This will be allocated and freed automatically for you. Get it with evas_object_smart_interface_data_get(). */ Eina_Bool (*add)(Evas_Object *obj); /**< Function to be called at object creation time. This will take place @b before the object's smart @c add() function. */ void (*del)(Evas_Object *obj); /**< Function to be called at object deletion time. This will take place @b after the object's smart @c del() function. */ }; /** * @struct _Evas_Smart_Cb_Description * * Describes a callback issued by a smart object * (evas_object_smart_callback_call()), as defined in its smart object * class. This is particularly useful to explain to end users and * their code (i.e., introspection) what the parameter @c event_info * will point to. * * @ingroup Evas_Smart_Group */ struct _Evas_Smart_Cb_Description { const char *name; /**< callback name ("changed", for example) */ /** * @brief Hint on the type of @c event_info parameter's contents on * a #Evas_Smart_Cb callback. * * The type string uses the pattern similar to * http://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-signatures, * but extended to optionally include variable names within * brackets preceding types. Example: * * @li Structure with two integers: * @c "(ii)" * * @li Structure called 'x' with two integers named 'a' and 'b': * @c "[x]([a]i[b]i)" * * @li Array of integers: * @c "ai" * * @li Array called 'x' of struct with two integers: * @c "[x]a(ii)" * * @note This type string is used as a hint and is @b not validated * or enforced in any way. Implementors should make the best * use of it to help bindings, documentation and other users * of introspection features. */ const char *type; }; /** * @def EVAS_SMART_CLASS_INIT_NULL * Initializer to zero a whole Evas_Smart_Class structure. * * @see EVAS_SMART_CLASS_INIT_VERSION * @see EVAS_SMART_CLASS_INIT_NAME_VERSION * @see EVAS_SMART_CLASS_INIT_NAME_VERSION_PARENT * @see EVAS_SMART_CLASS_INIT_NAME_VERSION_PARENT_CALLBACKS * @ingroup Evas_Smart_Group */ #define EVAS_SMART_CLASS_INIT_NULL {NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL} /** * @def EVAS_SMART_CLASS_INIT_VERSION * Initializer to zero a whole Evas_Smart_Class structure and set version. * * Similar to EVAS_SMART_CLASS_INIT_NULL, but will set version field to * latest EVAS_SMART_CLASS_VERSION. * * @see EVAS_SMART_CLASS_INIT_NULL * @see EVAS_SMART_CLASS_INIT_NAME_VERSION * @see EVAS_SMART_CLASS_INIT_NAME_VERSION_PARENT * @see EVAS_SMART_CLASS_INIT_NAME_VERSION_PARENT_CALLBACKS * @ingroup Evas_Smart_Group */ #define EVAS_SMART_CLASS_INIT_VERSION {NULL, EVAS_SMART_CLASS_VERSION, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL} /** * @def EVAS_SMART_CLASS_INIT_NAME_VERSION * Initializer to zero a whole Evas_Smart_Class structure and set name * and version. * * Similar to EVAS_SMART_CLASS_INIT_NULL, but will set version field to * latest EVAS_SMART_CLASS_VERSION and name to the specified value. * * It will keep a reference to name field as a "const char *", that is, * name must be available while the structure is used (hint: static or global!) * and will not be modified. * * @see EVAS_SMART_CLASS_INIT_NULL * @see EVAS_SMART_CLASS_INIT_VERSION * @see EVAS_SMART_CLASS_INIT_NAME_VERSION_PARENT * @see EVAS_SMART_CLASS_INIT_NAME_VERSION_PARENT_CALLBACKS * @ingroup Evas_Smart_Group */ #define EVAS_SMART_CLASS_INIT_NAME_VERSION(name) {name, EVAS_SMART_CLASS_VERSION, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL} /** * @def EVAS_SMART_CLASS_INIT_NAME_VERSION_PARENT * Initializer to zero a whole Evas_Smart_Class structure and set name, * version and parent class. * * Similar to EVAS_SMART_CLASS_INIT_NULL, but will set version field to * latest EVAS_SMART_CLASS_VERSION, name to the specified value and * parent class. * * It will keep a reference to name field as a "const char *", that is, * name must be available while the structure is used (hint: static or global!) * and will not be modified. Similarly, parent reference will be kept. * * @see EVAS_SMART_CLASS_INIT_NULL * @see EVAS_SMART_CLASS_INIT_VERSION * @see EVAS_SMART_CLASS_INIT_NAME_VERSION * @see EVAS_SMART_CLASS_INIT_NAME_VERSION_PARENT_CALLBACKS * @ingroup Evas_Smart_Group */ #define EVAS_SMART_CLASS_INIT_NAME_VERSION_PARENT(name, parent) {name, EVAS_SMART_CLASS_VERSION, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, parent, NULL, NULL} /** * @def EVAS_SMART_CLASS_INIT_NAME_VERSION_PARENT_CALLBACKS * Initializer to zero a whole Evas_Smart_Class structure and set name, * version, parent class and callbacks definition. * * Similar to EVAS_SMART_CLASS_INIT_NULL, but will set version field to * latest EVAS_SMART_CLASS_VERSION, name to the specified value, parent * class and callbacks at this level. * * It will keep a reference to name field as a "const char *", that is, * name must be available while the structure is used (hint: static or global!) * and will not be modified. Similarly, parent and callbacks reference * will be kept. * * @see EVAS_SMART_CLASS_INIT_NULL * @see EVAS_SMART_CLASS_INIT_VERSION * @see EVAS_SMART_CLASS_INIT_NAME_VERSION * @see EVAS_SMART_CLASS_INIT_NAME_VERSION_PARENT * @ingroup Evas_Smart_Group */ #define EVAS_SMART_CLASS_INIT_NAME_VERSION_PARENT_CALLBACKS(name, parent, callbacks) {name, EVAS_SMART_CLASS_VERSION, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, parent, callbacks, NULL} /** * @def EVAS_SMART_SUBCLASS_NEW * * Convenience macro to subclass a given Evas smart class. * * @param smart_name The name used for the smart class. e.g: * @c "Evas_Object_Box". * @param prefix Prefix used for all variables and functions defined * and referenced by this macro. * @param api_type Type of the structure used as API for the smart * class. Either #Evas_Smart_Class or something derived from it. * @param parent_type Type of the parent class API. * @param parent_func Function that gets the parent class. e.g: * evas_object_box_smart_class_get(). * @param cb_desc Array of callback descriptions for this smart class. * * This macro saves some typing when writing a smart class derived * from another one. In order to work, the user @b must provide some * functions adhering to the following guidelines: * - @_smart_set_user(): the @b internal @c _smart_set * function (defined by this macro) will call this one, provided by * the user, after inheriting everything from the parent, which * should take care of setting the right member functions for * the class, both overrides and extensions, if any. * - If this new class should be subclassable as well, a @b public * @c _smart_set() function is desirable to fill in the class used as * parent by the children. It's up to the user to provide this * interface, which will most likely call @_smart_set() to * get the job done. * * After the macro's usage, the following will be defined for use: * - @_parent_sc: A pointer to the @b parent smart * class. When calling parent functions from overloaded ones, use * this global variable. * - @_smart_class_new(): this function returns the * #Evas_Smart needed to create smart objects with this class, * which should be passed to evas_object_smart_add(). * * @warning @p smart_name has to be a pointer to a globally available * string! The smart class created here will just have a pointer set * to that, and all object instances will depend on it for smart class * name lookup. * * @ingroup Evas_Smart_Group */ #define EVAS_SMART_SUBCLASS_NEW(smart_name, prefix, api_type, parent_type, parent_func, cb_desc) \ static const parent_type * prefix##_parent_sc = NULL; \ static void prefix##_smart_set_user(api_type * api); \ static void prefix##_smart_set(api_type * api) \ { \ Evas_Smart_Class *sc; \ if (!(sc = (Evas_Smart_Class *)api)) \ return; \ if (!prefix##_parent_sc) \ prefix##_parent_sc = parent_func(); \ evas_smart_class_inherit(sc, prefix##_parent_sc); \ prefix##_smart_set_user(api); \ } \ static Evas_Smart *prefix##_smart_class_new(void) \ { \ static Evas_Smart *smart = NULL; \ static api_type api; \ if (!smart) \ { \ Evas_Smart_Class *sc = (Evas_Smart_Class *)&api; \ memset(&api, 0, sizeof(api_type)); \ sc->version = EVAS_SMART_CLASS_VERSION; \ sc->name = smart_name; \ sc->callbacks = cb_desc; \ prefix##_smart_set(&api); \ smart = evas_smart_class_new(sc); \ } \ return smart; \ } /** * @def EVAS_SMART_SUBCLASS_IFACE_NEW * * @since 1.7 * * Convenience macro to subclass a given Evas smart class. This is the * same as #EVAS_SMART_SUBCLASS_NEW, but now declaring smart * interfaces besides the smart callbacks. * * @param smart_name The name used for the smart class. e.g: * @c "Evas_Object_Box". * @param prefix Prefix used for all variables and functions defined * and referenced by this macro. * @param api_type Type of the structure used as API for the smart * class. Either #Evas_Smart_Class or something * derived from it. * @param parent_type Type of the parent class API. * @param parent_func Function that gets the parent class. e.g: * evas_object_box_smart_class_get(). * @param cb_desc Array of smart callback descriptions for this smart * class. * @param ifaces Array of Evas smart interafaces for this smart * class. * * This macro saves some typing when writing a smart class derived * from another one. In order to work, the user @b must provide some * functions adhering to the following guidelines: * - @_smart_set_user(): the @b internal @c _smart_set * function (defined by this macro) will call this one, provided by * the user, after inheriting everything from the parent, which * should take care of setting the right member functions for * the class, both overrides and extensions, if any. * - If this new class should be subclassable as well, a @b public * @c _smart_set() function is desirable to fill in the class used as * parent by the children. It's up to the user to provide this * interface, which will most likely call @_smart_set() to * get the job done. * * After the macro's usage, the following will be defined for use: * - @_parent_sc: A pointer to the @b parent smart * class. When calling parent functions from overloaded ones, use * this global variable. * - @_smart_class_new(): this function returns the * #Evas_Smart needed to create smart objects with this class, * which should be passed to evas_object_smart_add(). * * @warning @p smart_name has to be a pointer to a globally available * string! The smart class created here will just have a pointer set * to that, and all object instances will depend on it for smart class * name lookup. * * @ingroup Evas_Smart_Group */ #define EVAS_SMART_SUBCLASS_IFACE_NEW(smart_name, \ prefix, \ api_type, \ parent_type, \ parent_func, \ cb_desc, \ ifaces) \ static const parent_type * prefix##_parent_sc = NULL; \ static void prefix##_smart_set_user(api_type * api); \ static void prefix##_smart_set(api_type * api) \ { \ Evas_Smart_Class *sc; \ if (!(sc = (Evas_Smart_Class *)api)) \ return; \ if (!prefix##_parent_sc) \ prefix##_parent_sc = parent_func(); \ evas_smart_class_inherit(sc, prefix##_parent_sc); \ prefix##_smart_set_user(api); \ } \ static Evas_Smart *prefix##_smart_class_new(void) \ { \ static Evas_Smart *smart = NULL; \ static api_type api; \ if (!smart) \ { \ Evas_Smart_Class *sc = (Evas_Smart_Class *)&api; \ memset(&api, 0, sizeof(api_type)); \ sc->version = EVAS_SMART_CLASS_VERSION; \ sc->name = smart_name; \ sc->callbacks = cb_desc; \ sc->interfaces = ifaces; \ prefix##_smart_set(&api); \ smart = evas_smart_class_new(sc); \ } \ return smart; \ } /** * @def EVAS_SMART_DATA_ALLOC * * Convenience macro to allocate smart data only if needed. * * When writing a subclassable smart object, the @c .add() function * will need to check if the smart private data was already allocated * by some child object or not. This macro makes it easier to do it. * * @note This is an idiom used when one calls the parent's @c .add() * after the specialized code. Naturally, the parent's base smart data * has to be contemplated as the specialized one's first member, for * things to work. * * @param o Evas object passed to the @c .add() function * @param priv_type The type of the data to allocate * * @ingroup Evas_Smart_Group */ #define EVAS_SMART_DATA_ALLOC(o, priv_type) \ priv_type * priv; \ priv = evas_object_smart_data_get(o); \ if (!priv) { \ priv = (priv_type *)calloc(1, sizeof(priv_type)); \ if (!priv) return; \ evas_object_smart_data_set(o, priv); \ } /** * Free an #Evas_Smart struct * * @param s the #Evas_Smart struct to free * * @warning If this smart handle was created using * evas_smart_class_new(), the associated #Evas_Smart_Class will not * be freed. * * @note If you're using the #EVAS_SMART_SUBCLASS_NEW schema to create your * smart object, note that an #Evas_Smart handle will be shared amongst all * instances of the given smart class, through a static variable. * Evas will internally count references on #Evas_Smart handles and free them * when they are not referenced anymore. Thus, this function is of no use * for Evas users, most probably. */ EAPI void evas_smart_free(Evas_Smart *s) EINA_ARG_NONNULL(1); /** * Creates a new #Evas_Smart from a given #Evas_Smart_Class struct * * @param sc the smart class definition * @return a new #Evas_Smart pointer * * #Evas_Smart handles are necessary to create new @b instances of * smart objects belonging to the class described by @p sc. That * handle will contain, besides the smart class interface definition, * all its smart callbacks infrastructure set, too. * * @note If you are willing to subclass a given smart class to * construct yours, consider using the #EVAS_SMART_SUBCLASS_NEW macro, * which will make use of this function automatically for you. */ EAPI Evas_Smart *evas_smart_class_new(const Evas_Smart_Class *sc) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC; /** * Get the #Evas_Smart_Class handle of an #Evas_Smart struct * * @param s a valid #Evas_Smart pointer * @return the #Evas_Smart_Class in it */ EAPI const Evas_Smart_Class *evas_smart_class_get(const Evas_Smart *s) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * @brief Get the data pointer set on an #Evas_Smart struct * * @param s a valid #Evas_Smart handle * * This data pointer is set as the data field in the #Evas_Smart_Class * passed in to evas_smart_class_new(). */ EAPI void *evas_smart_data_get(const Evas_Smart *s) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Get the smart callbacks known by this #Evas_Smart handle's smart * class hierarchy. * * @param s A valid #Evas_Smart handle. * @param[out] count Returns the number of elements in the returned * array. * @return The array with callback descriptions known by this smart * class, with its size returned in @a count parameter. It * should not be modified in any way. If no callbacks are * known, @c NULL is returned. The array is sorted by event * names and elements refer to the original values given to * evas_smart_class_new()'s Evas_Smart_Class::callbacks * (pointer to them). * * This is likely different from * evas_object_smart_callbacks_descriptions_get() as it will contain * the callbacks of @b all this class hierarchy sorted, while the * direct smart class member refers only to that specific class and * should not include parent's. * * If no callbacks are known, this function returns @c NULL. * * The array elements and thus their contents will be @b references to * original values given to evas_smart_class_new() as * Evas_Smart_Class::callbacks. * * The array is sorted by Evas_Smart_Cb_Description::name. The last * array element is a @c NULL pointer and is not accounted for in @a * count. Loop iterations can check any of these size indicators. * * @note objects may provide per-instance callbacks, use * evas_object_smart_callbacks_descriptions_get() to get those * as well. * @see evas_object_smart_callbacks_descriptions_get() */ EAPI const Evas_Smart_Cb_Description **evas_smart_callbacks_descriptions_get(const Evas_Smart *s, unsigned int *count) EINA_ARG_NONNULL(1, 1); /** * Find a callback description for the callback named @a name. * * @param s The #Evas_Smart where to search for class registered smart * event callbacks. * @param name Name of the desired callback, which must @b not be @c * NULL. The search has a special case for @a name being the * same pointer as registered with #Evas_Smart_Cb_Description. * One can use it to avoid excessive use of strcmp(). * @return A reference to the description if found, or @c NULL, otherwise * * @see evas_smart_callbacks_descriptions_get() */ EAPI const Evas_Smart_Cb_Description *evas_smart_callback_description_find(const Evas_Smart *s, const char *name) EINA_ARG_NONNULL(1, 2); /** * Sets one class to inherit from the other. * * Copy all function pointers, set @c parent to @a parent_sc and copy * everything after sizeof(Evas_Smart_Class) present in @a parent_sc, * using @a parent_sc_size as reference. * * This is recommended instead of a single memcpy() since it will take * care to not modify @a sc name, version, callbacks and possible * other members. * * @param sc child class. * @param parent_sc parent class, will provide attributes. * @param parent_sc_size size of parent_sc structure, child should be at least * this size. Everything after @c Evas_Smart_Class size is copied * using regular memcpy(). */ EAPI Eina_Bool evas_smart_class_inherit_full(Evas_Smart_Class *sc, const Evas_Smart_Class *parent_sc, unsigned int parent_sc_size) EINA_ARG_NONNULL(1, 2); /** * Get the number of users of the smart instance * * @param s The Evas_Smart to get the usage count of * @return The number of uses of the smart instance * * This function tells you how many more uses of the smart instance are in * existence. This should be used before freeing/clearing any of the * Evas_Smart_Class that was used to create the smart instance. The smart * instance will refer to data in the Evas_Smart_Class used to create it and * thus you cannot remove the original data until all users of it are gone. * When the usage count goes to 0, you can evas_smart_free() the smart * instance @p s and remove from memory any of the Evas_Smart_Class that * was used to create the smart instance, if you desire. Removing it from * memory without doing this will cause problems (crashes, undefined * behavior etc. etc.), so either never remove the original * Evas_Smart_Class data from memory (have it be a constant structure and * data), or use this API call and be very careful. */ EAPI int evas_smart_usage_get(const Evas_Smart *s); /** * @def evas_smart_class_inherit * Easy to use version of evas_smart_class_inherit_full(). * * This version will use sizeof(parent_sc), copying everything. * * @param sc child class, will have methods copied from @a parent_sc * @param parent_sc parent class, will provide contents to be copied. * @return 1 on success, 0 on failure. * @ingroup Evas_Smart_Group */ #define evas_smart_class_inherit(sc, parent_sc) evas_smart_class_inherit_full(sc, (Evas_Smart_Class *)parent_sc, sizeof(*parent_sc)) /** * @} */ /** * @defgroup Evas_Smart_Object_Group Smart Object Functions * * Functions dealing with Evas smart objects (instances). * * Smart objects are groupings of primitive Evas objects that behave * as a cohesive group. For instance, a file manager icon may be a * smart object composed of an image object, a text label and two * rectangles that appear behind the image and text when the icon is * selected. As a smart object, the normal Evas object API could be * used on the icon object. * * Besides that, generally smart objects implement a specific * API, so that users interact with its own custom features. The * API takes form of explicit exported functions one may call and * smart callbacks. * * @section Evas_Smart_Object_Group_Callbacks Smart events and callbacks * * Smart objects can elect events (smart events, from now on) occurring * inside of them to be reported back to their users via callback * functions (smart callbacks). This way, you can extend Evas' own * object events. They are defined by an event string, which * identifies them uniquely. There's also a function prototype * definition for the callback functions: #Evas_Smart_Cb. * * When defining an #Evas_Smart_Class, smart object implementors are * strongly encouraged to properly set the Evas_Smart_Class::callbacks * callbacks description array, so that the users of the smart object * can have introspection on its events API at run time. * * See some @ref Example_Evas_Smart_Objects "examples" of this group * of functions. * * @see @ref Evas_Smart_Group for class definitions. */ /** * @addtogroup Evas_Smart_Object_Group * @{ */ /** * Instantiates a new smart object described by @p s. * * @param e the canvas on which to add the object * @param s the #Evas_Smart describing the smart object * @return a new #Evas_Object handle * * This is the function one should use when defining the public * function @b adding an instance of the new smart object to a given * canvas. It will take care of setting all of its internals to work * as they should, if the user set things properly, as seem on the * #EVAS_SMART_SUBCLASS_NEW, for example. * * @ingroup Evas_Smart_Object_Group */ EAPI Evas_Object *evas_object_smart_add(Evas *e, Evas_Smart *s) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2) EINA_MALLOC; /** * Set an Evas object as a member of a given smart object. * * @param obj The member object * @param smart_obj The smart object * * Members will automatically be stacked and layered together with the * smart object. The various stacking functions will operate on * members relative to the other members instead of the entire canvas, * since they now live on an exclusive layer (see * evas_object_stack_above(), for more details). * * Any @p smart_obj object's specific implementation of the @c * member_add() smart function will take place too, naturally. * * @see evas_object_smart_member_del() * @see evas_object_smart_members_get() * * @ingroup Evas_Smart_Object_Group */ EAPI void evas_object_smart_member_add(Evas_Object *obj, Evas_Object *smart_obj) EINA_ARG_NONNULL(1, 2); /** * Removes a member object from a given smart object. * * @param obj the member object * @ingroup Evas_Smart_Object_Group * * This removes a member object from a smart object, if it was added * to any. The object will still be on the canvas, but no longer * associated with whichever smart object it was associated with. * * @see evas_object_smart_member_add() for more details * @see evas_object_smart_members_get() */ EAPI void evas_object_smart_member_del(Evas_Object *obj) EINA_ARG_NONNULL(1); /** * Retrieves the list of the member objects of a given Evas smart * object * * @param obj the smart object to get members from * @return Returns the list of the member objects of @p obj. * * The returned list should be freed with @c eina_list_free() when you * no longer need it. * * @since 1.7 This function will return @c NULL when a non-smart object is passed. * * @see evas_object_smart_member_add() * @see evas_object_smart_member_del() */ EAPI Eina_List *evas_object_smart_members_get(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Gets the parent smart object of a given Evas object, if it has one. * * @param obj the Evas object you want to get the parent smart object * from * @return Returns the parent smart object of @a obj or @c NULL, if @a * obj is not a smart member of any * * @ingroup Evas_Smart_Object_Group */ EAPI Evas_Object *evas_object_smart_parent_get(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Checks whether a given smart object or any of its smart object * parents is of a given smart class. * * @param obj An Evas smart object to check the type of * @param type The @b name (type) of the smart class to check for * @return @c EINA_TRUE, if @a obj or any of its parents is of type @a * type, @c EINA_FALSE otherwise * * If @p obj is not a smart object, this call will fail * immediately. Otherwise, make sure evas_smart_class_inherit() or its * sibling functions were used correctly when creating the smart * object's class, so it has a valid @b parent smart class pointer * set. * * The checks use smart classes names and string * comparison. There is a version of this same check using * pointer comparison, since a smart class' name is a single * string in Evas. * * @see evas_object_smart_type_check_ptr() * @see #EVAS_SMART_SUBCLASS_NEW * * @ingroup Evas_Smart_Object_Group */ EAPI Eina_Bool evas_object_smart_type_check(const Evas_Object *obj, const char *type) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2); /** * Checks whether a given smart object or any of its smart object * parents is of a given smart class, using pointer comparison. * * @param obj An Evas smart object to check the type of * @param type The type (name string) to check for. Must be the name * @return @c EINA_TRUE, if @a obj or any of its parents is of type @a * type, @c EINA_FALSE otherwise * * @see evas_object_smart_type_check() for more details * * @ingroup Evas_Smart_Object_Group */ EAPI Eina_Bool evas_object_smart_type_check_ptr(const Evas_Object *obj, const char *type) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2); /** * Get the #Evas_Smart from which @p obj smart object was created. * * @param obj a smart object * @return the #Evas_Smart handle or @c NULL, on errors * * @ingroup Evas_Smart_Object_Group */ EAPI Evas_Smart *evas_object_smart_smart_get(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Retrieve user data stored on a given smart object. * * @param obj The smart object's handle * @return A pointer to data stored using * evas_object_smart_data_set(), or @c NULL, if none has been * set. * * @see evas_object_smart_data_set() * * @ingroup Evas_Smart_Object_Group */ EAPI void *evas_object_smart_data_get(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Store a pointer to user data for a given smart object. * * @param obj The smart object's handle * @param data A pointer to user data * * This data is stored @b independently of the one set by * evas_object_data_set(), naturally. * * @see evas_object_smart_data_get() * * @ingroup Evas_Smart_Object_Group */ EAPI void evas_object_smart_data_set(Evas_Object *obj, void *data) EINA_ARG_NONNULL(1); /** * Add (register) a callback function to the smart event specified by * @p event on the smart object @p obj. * * @param obj a smart object * @param event the event's name string * @param func the callback function * @param data user data to be passed to the callback function * * Smart callbacks look very similar to Evas callbacks, but are * implemented as smart object's custom ones. * * This function adds a function callback to an smart object when the * event named @p event occurs in it. The function is @p func. * * In the event of a memory allocation error during addition of the * callback to the object, evas_alloc_error() should be used to * determine the nature of the error, if any, and the program should * sensibly try and recover. * * A smart callback function must have the ::Evas_Smart_Cb prototype * definition. The first parameter (@p data) in this definition will * have the same value passed to evas_object_smart_callback_add() as * the @p data parameter, at runtime. The second parameter @p obj is a * handle to the object on which the event occurred. The third * parameter, @p event_info, is a pointer to data which is totally * dependent on the smart object's implementation and semantic for the * given event. * * There is an infrastructure for introspection on smart objects' * events (see evas_smart_callbacks_descriptions_get()), but no * internal smart objects on Evas implement them yet. * * @see @ref Evas_Smart_Object_Group_Callbacks for more details. * * @see evas_object_smart_callback_del() * @ingroup Evas_Smart_Object_Group */ EAPI void evas_object_smart_callback_add(Evas_Object *obj, const char *event, Evas_Smart_Cb func, const void *data) EINA_ARG_NONNULL(1, 2, 3); /** * Add (register) a callback function to the smart event specified by * @p event on the smart object @p obj. Except for the priority field, * it's exactly the same as @ref evas_object_smart_callback_add * * @param obj a smart object * @param event the event's name string * @param priority The priority of the callback, lower values called first. * @param func the callback function * @param data user data to be passed to the callback function * * @see evas_object_smart_callback_add * @since 1.1 * @ingroup Evas_Smart_Object_Group */ EAPI void evas_object_smart_callback_priority_add(Evas_Object *obj, const char *event, Evas_Callback_Priority priority, Evas_Smart_Cb func, const void *data); /** * Delete (unregister) a callback function from the smart event * specified by @p event on the smart object @p obj. * * @param obj a smart object * @param event the event's name string * @param func the callback function * @return the data pointer * * This function removes the first added smart callback on the * object @p obj matching the event name @p event and the registered * function pointer @p func. If the removal is successful it will also * return the data pointer that was passed to * evas_object_smart_callback_add() (that will be the same as the * parameter) when the callback(s) was(were) added to the canvas. If * not successful @c NULL will be returned. * * @see evas_object_smart_callback_add() for more details. * * @ingroup Evas_Smart_Object_Group */ EAPI void *evas_object_smart_callback_del(Evas_Object *obj, const char *event, Evas_Smart_Cb func) EINA_ARG_NONNULL(1, 2, 3); /** * Delete (unregister) a callback function from the smart event * specified by @p event on the smart object @p obj. * * @param obj a smart object * @param event the event's name string * @param func the callback function * @param data the data pointer that was passed to the callback * @return the data pointer * * This function removes the first added smart callback on the * object @p obj matching the event name @p event, the registered * function pointer @p func and the callback data pointer @p data. If * the removal is successful it will also return the data pointer that * was passed to evas_object_smart_callback_add() (that will be the same * as the parameter) when the callback(s) was(were) added to the canvas. * If not successful @c NULL will be returned. A common use would be to * remove an exact match of a callback * * @see evas_object_smart_callback_add() for more details. * @since 1.2 * @ingroup Evas_Smart_Object_Group * * @note To delete all smart event callbacks which match @p type and @p func, * use evas_object_smart_callback_del(). */ EAPI void *evas_object_smart_callback_del_full(Evas_Object *obj, const char *event, Evas_Smart_Cb func, const void *data) EINA_ARG_NONNULL(1, 2, 3); /** * Call a given smart callback on the smart object @p obj. * * @param obj the smart object * @param event the event's name string * @param event_info pointer to an event specific struct or information to * pass to the callback functions registered on this smart event * * This should be called @b internally, from the smart object's own * code, when some specific event has occurred and the implementor * wants is to pertain to the object's events API (see @ref * Evas_Smart_Object_Group_Callbacks). The documentation for the smart * object should include a list of possible events and what type of @p * event_info to expect for each of them. Also, when defining an * #Evas_Smart_Class, smart object implementors are strongly * encouraged to properly set the Evas_Smart_Class::callbacks * callbacks description array, so that the users of the smart object * can have introspection on its events API at run time. * * @ingroup Evas_Smart_Object_Group */ EAPI void evas_object_smart_callback_call(Evas_Object *obj, const char *event, void *event_info) EINA_ARG_NONNULL(1, 2); /** * Set an smart object @b instance's smart callbacks descriptions. * * @param obj A smart object * @param descriptions @c NULL terminated array with * #Evas_Smart_Cb_Description descriptions. Array elements won't be * modified at run time, but references to them and their contents * will be made, so this array should be kept alive during the whole * object's lifetime. * @return @c EINA_TRUE on success, @c EINA_FALSE on failure. * * These descriptions are hints to be used by introspection and are * not enforced in any way. * * It will not be checked if instance callbacks descriptions have the * same name as respective possibly registered in the smart object * @b class. Both are kept in different arrays and users of * evas_object_smart_callbacks_descriptions_get() should handle this * case as they wish. * * @note Becase @p descriptions must be @c NULL terminated, and * because a @c NULL name makes little sense, too, * Evas_Smart_Cb_Description::name must @b not be @c NULL. * * @note While instance callbacks descriptions are possible, they are * @b not recommended. Use @b class callbacks descriptions * instead as they make you smart object user's life simpler and * will use less memory, as descriptions and arrays will be * shared among all instances. * * @ingroup Evas_Smart_Object_Group */ EAPI Eina_Bool evas_object_smart_callbacks_descriptions_set(Evas_Object *obj, const Evas_Smart_Cb_Description *descriptions) EINA_ARG_NONNULL(1); /** * Retrieve an smart object's know smart callback descriptions (both * instance and class ones). * * @param obj The smart object to get callback descriptions from. * @param class_descriptions Where to store class callbacks * descriptions array, if any is known. If no descriptions are * known, @c NULL is returned * @param class_count Returns how many class callbacks descriptions * are known. * @param instance_descriptions Where to store instance callbacks * descriptions array, if any is known. If no descriptions are * known, @c NULL is returned. * @param instance_count Returns how many instance callbacks * descriptions are known. * * This call searches for registered callback descriptions for both * instance and class of the given smart object. These arrays will be * sorted by Evas_Smart_Cb_Description::name and also @c NULL * terminated, so both @a class_count and @a instance_count can be * ignored, if the caller wishes so. The terminator @c NULL is not * counted in these values. * * @note If just class descriptions are of interest, try * evas_smart_callbacks_descriptions_get() instead. * * @note Use @c NULL pointers on the descriptions/counters you're not * interested in: they'll be ignored by the function. * * @see evas_smart_callbacks_descriptions_get() * * @ingroup Evas_Smart_Object_Group */ EAPI void evas_object_smart_callbacks_descriptions_get(const Evas_Object *obj, const Evas_Smart_Cb_Description ***class_descriptions, unsigned int *class_count, const Evas_Smart_Cb_Description ***instance_descriptions, unsigned int *instance_count) EINA_ARG_NONNULL(1); /** * Find callback description for callback called @a name. * * @param obj the smart object. * @param name name of desired callback, must @b not be @c NULL. The * search have a special case for @a name being the same * pointer as registered with Evas_Smart_Cb_Description, one * can use it to avoid excessive use of strcmp(). * @param class_description pointer to return class description or * @c NULL if not found. If parameter is @c NULL, no search will * be done on class descriptions. * @param instance_description pointer to return instance description * or @c NULL if not found. If parameter is @c NULL, no search * will be done on instance descriptions. * @return reference to description if found, @c NULL if not found. */ EAPI void evas_object_smart_callback_description_find(const Evas_Object *obj, const char *name, const Evas_Smart_Cb_Description **class_description, const Evas_Smart_Cb_Description **instance_description) EINA_ARG_NONNULL(1, 2); /** * Retrieve an Evas smart object's interface, by name string pointer. * * @param obj An Evas smart object. * @param name Name string of the desired interface, which must be the * same pointer used at the interface's declarion, when * creating the smart object @a obj. * * @since 1.7 * * @return The interface's handle pointer, if found, @c NULL * otherwise. */ const void *evas_object_smart_interface_get(const Evas_Object *obj, const char *name); /** * Retrieve an Evas smart object interface's private data. * * @param obj An Evas smart object. * @param iface The given object's interface handle. * * @since 1.7 * * @return The object interface's private data blob pointer, if found, * @c NULL otherwise. */ void *evas_object_smart_interface_data_get(const Evas_Object *obj, const Evas_Smart_Interface *iface); /** * Mark smart object as changed, dirty. * * @param obj The given Evas smart object * * This will flag the given object as needing recalculation, * forcefully. As an effect, on the next rendering cycle it's @b * calculate() (see #Evas_Smart_Class) smart function will be called. * * @see evas_object_smart_need_recalculate_set(). * @see evas_object_smart_calculate(). * * @ingroup Evas_Smart_Object_Group */ EAPI void evas_object_smart_changed(Evas_Object *obj) EINA_ARG_NONNULL(1); /** * Set or unset the flag signalling that a given smart object needs to * get recalculated. * * @param obj the smart object * @param value whether one wants to set (@c EINA_TRUE) or to unset * (@c EINA_FALSE) the flag. * * If this flag is set, then the @c calculate() smart function of @p * obj will be called, if one is provided, during rendering phase of * Evas (see evas_render()), after which this flag will be * automatically unset. * * If that smart function is not provided for the given object, this * flag will be left unchanged. * * @note just setting this flag will not make the canvas' whole scene * dirty, by itself, and evas_render() will have no effect. To * force that, use evas_object_smart_changed(), that will also * automatically call this function automatically, with * @c EINA_TRUE as parameter. * * @see evas_object_smart_need_recalculate_get() * @see evas_object_smart_calculate() * @see evas_smart_objects_calculate() * * @ingroup Evas_Smart_Object_Group */ EAPI void evas_object_smart_need_recalculate_set(Evas_Object *obj, Eina_Bool value) EINA_ARG_NONNULL(1); /** * Get the value of the flag signalling that a given smart object needs to * get recalculated. * * @param obj the smart object * @return if flag is set or not. * * @note this flag will be unset during the rendering phase, when the * @c calculate() smart function is called, if one is provided. * If it's not provided, then the flag will be left unchanged * after the rendering phase. * * @see evas_object_smart_need_recalculate_set(), for more details * * @ingroup Evas_Smart_Object_Group */ EAPI Eina_Bool evas_object_smart_need_recalculate_get(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Call the @b calculate() smart function immediately on a given smart * object. * * @param obj the smart object's handle * * This will force immediate calculations (see #Evas_Smart_Class) * needed for renderization of this object and, besides, unset the * flag on it telling it needs recalculation for the next rendering * phase. * * @see evas_object_smart_need_recalculate_set() * * @ingroup Evas_Smart_Object_Group */ EAPI void evas_object_smart_calculate(Evas_Object *obj) EINA_ARG_NONNULL(1); /** * Call user-provided @c calculate() smart functions and unset the * flag signalling that the object needs to get recalculated to @b all * smart objects in the canvas. * * @param e The canvas to calculate all smart objects in * * @see evas_object_smart_need_recalculate_set() * * @ingroup Evas_Smart_Object_Group */ EAPI void evas_smart_objects_calculate(Evas *e); /** * This gets the internal counter that counts the number of smart calculations * * @param e The canvas to get the calculate counter from * * Whenever evas performs smart object calculations on the whole canvas * it increments a counter by 1. This is the smart object calculate counter * that this function returns the value of. It starts at the value of 0 and * will increase (and eventually wrap around to negative values and so on) by * 1 every time objects are calculated. You can use this counter to ensure * you don't re-do calculations withint the same calculation generation/run * if the calculations maybe cause self-feeding effects. * * @ingroup Evas_Smart_Object_Group * @since 1.1 */ EAPI int evas_smart_objects_calculate_count_get(const Evas *e); /** * Moves all children objects of a given smart object relative to a * given offset. * * @param obj the smart object. * @param dx horizontal offset (delta). * @param dy vertical offset (delta). * * This will make each of @p obj object's children to move, from where * they before, with those delta values (offsets) on both directions. * * @note This is most useful on custom smart @c move() functions. * * @note Clipped smart objects already make use of this function on * their @c move() smart function definition. */ EAPI void evas_object_smart_move_children_relative(Evas_Object *obj, Evas_Coord dx, Evas_Coord dy) EINA_ARG_NONNULL(1); /** * @} */ /** * @defgroup Evas_Smart_Object_Clipped Clipped Smart Object * * Clipped smart object is a base to construct other smart objects * based on the concept of having an internal clipper that is applied * to all children objects. This clipper will control the visibility, * clipping and color of sibling objects (remember that the clipping * is recursive, and clipper color modulates the color of its * clippees). By default, this base will also move children relatively * to the parent, and delete them when parent is deleted. In other * words, it is the base for simple object grouping. * * See some @ref Example_Evas_Smart_Objects "examples" of this group * of functions. * * @see evas_object_smart_clipped_smart_set() * * @ingroup Evas_Smart_Object_Group */ /** * @addtogroup Evas_Smart_Object_Clipped * @{ */ /** * Every subclass should provide this at the beginning of their own * data set with evas_object_smart_data_set(). */ typedef struct _Evas_Object_Smart_Clipped_Data Evas_Object_Smart_Clipped_Data; struct _Evas_Object_Smart_Clipped_Data { Evas_Object *clipper; Evas *evas; }; /** * Get the clipper object for the given clipped smart object. * * @param obj the clipped smart object to retrieve associated clipper * from. * @return the clipper object. * * Use this function if you want to change any of this clipper's * properties, like colors. * * @see evas_object_smart_clipped_smart_add() */ EAPI Evas_Object *evas_object_smart_clipped_clipper_get(Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Set a given smart class' callbacks so it implements the clipped smart * object"'s interface. * * @param sc The smart class handle to operate on * * This call will assign all the required methods of the @p sc * #Evas_Smart_Class instance to the implementations set for clipped * smart objects. If one wants to "subclass" it, call this function * and then override desired values. If one wants to call any original * method, save it somewhere. Example: * * @code * static Evas_Smart_Class parent_sc = EVAS_SMART_CLASS_INIT_NULL; * * static void my_class_smart_add(Evas_Object *o) * { * parent_sc.add(o); * evas_object_color_set(evas_object_smart_clipped_clipper_get(o), * 255, 0, 0, 255); * } * * Evas_Smart_Class *my_class_new(void) * { * static Evas_Smart_Class sc = EVAS_SMART_CLASS_INIT_NAME_VERSION("MyClass"); * if (!parent_sc.name) * { * evas_object_smart_clipped_smart_set(&sc); * parent_sc = sc; * sc.add = my_class_smart_add; * } * return ≻ * } * @endcode * * Default behavior for each of #Evas_Smart_Class functions on a * clipped smart object are: * - @c add: creates a hidden clipper with "infinite" size, to clip * any incoming members; * - @c del: delete all children objects; * - @c move: move all objects relative relatively; * - @c resize: not defined; * - @c show: if there are children objects, show clipper; * - @c hide: hides clipper; * - @c color_set: set the color of clipper; * - @c clip_set: set clipper of clipper; * - @c clip_unset: unset the clipper of clipper; * * @note There are other means of assigning parent smart classes to * child ones, like the #EVAS_SMART_SUBCLASS_NEW macro or the * evas_smart_class_inherit_full() function. */ EAPI void evas_object_smart_clipped_smart_set(Evas_Smart_Class *sc) EINA_ARG_NONNULL(1); /** * Get a pointer to the clipped smart object's class, to use * for proper inheritance * * @see #Evas_Smart_Object_Clipped for more information on this smart * class */ EAPI const Evas_Smart_Class *evas_object_smart_clipped_class_get(void) EINA_CONST; /** * @} */ /** * @defgroup Evas_Object_Box Box Smart Object * * A box is a convenience smart object that packs children inside it * in @b sequence, using a layouting function specified by the * user. There are a couple of pre-made layouting functions built-in * in Evas, all of them using children size hints to define their * size and alignment inside their cell space. * * Examples on this smart object's usage: * - @ref Example_Evas_Box * - @ref Example_Evas_Size_Hints * * @see @ref Evas_Object_Group_Size_Hints * * @ingroup Evas_Smart_Object_Group */ /** * @addtogroup Evas_Object_Box * @{ */ /** * @typedef Evas_Object_Box_Api * * Smart class extension, providing extra box object requirements. * * @ingroup Evas_Object_Box */ typedef struct _Evas_Object_Box_Api Evas_Object_Box_Api; /** * @typedef Evas_Object_Box_Data * * Smart object instance data, providing box object requirements. * * @ingroup Evas_Object_Box */ typedef struct _Evas_Object_Box_Data Evas_Object_Box_Data; /** * @typedef Evas_Object_Box_Option * * The base structure for a box option. Box options are a way of * extending box items properties, which will be taken into account * for layouting decisions. The box layouting functions provided by * Evas will only rely on objects' canonical size hints to layout * them, so the basic box option has @b no (custom) property set. * * Users creating their own layouts, but not depending on extra child * items' properties, would be fine just using * evas_object_box_layout_set(). But if one desires a layout depending * on extra child properties, he/she has to @b subclass the box smart * object. Thus, by using evas_object_box_smart_class_get() and * evas_object_box_smart_set(), the @c option_new() and @c * option_free() smart class functions should be properly * redefined/extended. * * Object properties are bound to an integer identifier and must have * a name string. Their values are open to any data. See the API on * option properties for more details. * * @ingroup Evas_Object_Box */ typedef struct _Evas_Object_Box_Option Evas_Object_Box_Option; /** * @typedef Evas_Object_Box_Layout * * Function signature for an Evas box object layouting routine. By * @a o it will be passed the box object in question, by @a priv it will * be passed the box's internal data and, by @a user_data, it will be * passed any custom data one could have set to a given box layouting * function, with evas_object_box_layout_set(). * * @ingroup Evas_Object_Box */ typedef void (*Evas_Object_Box_Layout)(Evas_Object *o, Evas_Object_Box_Data *priv, void *user_data); /** * @def EVAS_OBJECT_BOX_API_VERSION * * Current version for Evas box object smart class, a value which goes * to _Evas_Object_Box_Api::version. * * @ingroup Evas_Object_Box */ #define EVAS_OBJECT_BOX_API_VERSION 1 /** * @struct _Evas_Object_Box_Api * * This structure should be used by any smart class inheriting from * the box's one, to provide custom box behavior which could not be * achieved only by providing a layout function, with * evas_object_box_layout_set(). * * @extends Evas_Smart_Class * @ingroup Evas_Object_Box */ struct _Evas_Object_Box_Api { Evas_Smart_Class base; /**< Base smart class struct, need for all smart objects */ int version; /**< Version of this smart class definition */ Evas_Object_Box_Option *(*append)(Evas_Object * o, Evas_Object_Box_Data * priv, Evas_Object * child); /**< Smart function to append child elements in boxes */ Evas_Object_Box_Option *(*prepend)(Evas_Object * o, Evas_Object_Box_Data * priv, Evas_Object * child); /**< Smart function to prepend child elements in boxes */ Evas_Object_Box_Option *(*insert_before)(Evas_Object * o, Evas_Object_Box_Data * priv, Evas_Object * child, const Evas_Object * reference); /**< Smart function to insert a child element before another in boxes */ Evas_Object_Box_Option *(*insert_after)(Evas_Object * o, Evas_Object_Box_Data * priv, Evas_Object * child, const Evas_Object * reference); /**< Smart function to insert a child element after another in boxes */ Evas_Object_Box_Option *(*insert_at)(Evas_Object * o, Evas_Object_Box_Data * priv, Evas_Object * child, unsigned int pos); /**< Smart function to insert a child element at a given position on boxes */ Evas_Object *(*remove)(Evas_Object * o, Evas_Object_Box_Data * priv, Evas_Object * child); /**< Smart function to remove a child element from boxes */ Evas_Object *(*remove_at)(Evas_Object * o, Evas_Object_Box_Data * priv, unsigned int pos); /**< Smart function to remove a child element from boxes, by its position */ Eina_Bool (*property_set)(Evas_Object *o, Evas_Object_Box_Option *opt, int property, va_list args); /**< Smart function to set a custom property on a box child */ Eina_Bool (*property_get)(const Evas_Object *o, Evas_Object_Box_Option *opt, int property, va_list args); /**< Smart function to retrieve a custom property from a box child */ const char *(*property_name_get)(const Evas_Object * o, int property); /**< Smart function to get the name of a custom property of box children */ int (*property_id_get)(const Evas_Object *o, const char *name); /**< Smart function to get the numerical ID of a custom property of box children */ Evas_Object_Box_Option *(*option_new)(Evas_Object * o, Evas_Object_Box_Data * priv, Evas_Object * child); /**< Smart function to create a new box option struct */ void (*option_free)(Evas_Object *o, Evas_Object_Box_Data *priv, Evas_Object_Box_Option *opt); /**< Smart function to delete a box option struct */ }; /** * @def EVAS_OBJECT_BOX_API_INIT * * Initializer for a whole #Evas_Object_Box_Api structure, with * @c NULL values on its specific fields. * * @param smart_class_init initializer to use for the "base" field * (#Evas_Smart_Class). * * @see EVAS_SMART_CLASS_INIT_NULL * @see EVAS_SMART_CLASS_INIT_VERSION * @see EVAS_SMART_CLASS_INIT_NAME_VERSION * @see EVAS_OBJECT_BOX_API_INIT_NULL * @see EVAS_OBJECT_BOX_API_INIT_VERSION * @see EVAS_OBJECT_BOX_API_INIT_NAME_VERSION * @ingroup Evas_Object_Box */ #define EVAS_OBJECT_BOX_API_INIT(smart_class_init) {smart_class_init, EVAS_OBJECT_BOX_API_VERSION, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL} /** * @def EVAS_OBJECT_BOX_API_INIT_NULL * * Initializer to zero out a whole #Evas_Object_Box_Api structure. * * @see EVAS_OBJECT_BOX_API_INIT_VERSION * @see EVAS_OBJECT_BOX_API_INIT_NAME_VERSION * @see EVAS_OBJECT_BOX_API_INIT * @ingroup Evas_Object_Box */ #define EVAS_OBJECT_BOX_API_INIT_NULL EVAS_OBJECT_BOX_API_INIT(EVAS_SMART_CLASS_INIT_NULL) /** * @def EVAS_OBJECT_BOX_API_INIT_VERSION * * Initializer to zero out a whole #Evas_Object_Box_Api structure and * set a specific version on it. * * This is similar to #EVAS_OBJECT_BOX_API_INIT_NULL, but it will set * the version field of #Evas_Smart_Class (base field) to the latest * #EVAS_SMART_CLASS_VERSION. * * @see EVAS_OBJECT_BOX_API_INIT_NULL * @see EVAS_OBJECT_BOX_API_INIT_NAME_VERSION * @see EVAS_OBJECT_BOX_API_INIT * @ingroup Evas_Object_Box */ #define EVAS_OBJECT_BOX_API_INIT_VERSION EVAS_OBJECT_BOX_API_INIT(EVAS_SMART_CLASS_INIT_VERSION) /** * @def EVAS_OBJECT_BOX_API_INIT_NAME_VERSION * * Initializer to zero out a whole #Evas_Object_Box_Api structure and * set its name and version. * * This is similar to #EVAS_OBJECT_BOX_API_INIT_NULL, but it will also * set the version field of #Evas_Smart_Class (base field) to the * latest #EVAS_SMART_CLASS_VERSION and name it to the specific value. * * It will keep a reference to the name field as a "const char *", * i.e., the name must be available while the structure is * used (hint: static or global variable!) and must not be modified. * * @see EVAS_OBJECT_BOX_API_INIT_NULL * @see EVAS_OBJECT_BOX_API_INIT_VERSION * @see EVAS_OBJECT_BOX_API_INIT * @ingroup Evas_Object_Box */ #define EVAS_OBJECT_BOX_API_INIT_NAME_VERSION(name) EVAS_OBJECT_BOX_API_INIT(EVAS_SMART_CLASS_INIT_NAME_VERSION(name)) /** * @struct _Evas_Object_Box_Data * * This structure augments clipped smart object's instance data, * providing extra members required by generic box implementation. If * a subclass inherits from #Evas_Object_Box_Api, then it may augment * #Evas_Object_Box_Data to fit its own needs. * * @extends Evas_Object_Smart_Clipped_Data * @ingroup Evas_Object_Box */ struct _Evas_Object_Box_Data { Evas_Object_Smart_Clipped_Data base; const Evas_Object_Box_Api *api; struct { double h, v; } align; struct { Evas_Coord h, v; } pad; Eina_List *children; struct { Evas_Object_Box_Layout cb; void *data; void (*free_data)(void *data); } layout; Eina_Bool layouting : 1; Eina_Bool children_changed : 1; }; struct _Evas_Object_Box_Option { Evas_Object *obj; /**< Pointer to the box child object, itself */ Eina_Bool max_reached : 1; Eina_Bool min_reached : 1; Evas_Coord alloc_size; }; /**< #Evas_Object_Box_Option struct fields */ /** * Set the default box @a api struct (Evas_Object_Box_Api) * with the default values. May be used to extend that API. * * @param api The box API struct to set back, most probably with * overridden fields (on class extensions scenarios) */ EAPI void evas_object_box_smart_set(Evas_Object_Box_Api *api) EINA_ARG_NONNULL(1); /** * Get the Evas box smart class, for inheritance purposes. * * @return the (canonical) Evas box smart class. * * The returned value is @b not to be modified, just use it as your * parent class. */ EAPI const Evas_Object_Box_Api *evas_object_box_smart_class_get(void) EINA_CONST; /** * Set a new layouting function to a given box object * * @param o The box object to operate on. * @param cb The new layout function to set on @p o. * @param data Data pointer to be passed to @p cb. * @param free_data Function to free @p data, if need be. * * A box layout function affects how a box object displays child * elements within its area. The list of pre-defined box layouts * available in Evas is: * - evas_object_box_layout_horizontal() * - evas_object_box_layout_vertical() * - evas_object_box_layout_homogeneous_horizontal() * - evas_object_box_layout_homogeneous_vertical() * - evas_object_box_layout_homogeneous_max_size_horizontal() * - evas_object_box_layout_homogeneous_max_size_vertical() * - evas_object_box_layout_flow_horizontal() * - evas_object_box_layout_flow_vertical() * - evas_object_box_layout_stack() * * Refer to each of their documentation texts for details on them. * * @note A box layouting function will be triggered by the @c * 'calculate' smart callback of the box's smart class. */ EAPI void evas_object_box_layout_set(Evas_Object *o, Evas_Object_Box_Layout cb, const void *data, void (*free_data)(void *data)) EINA_ARG_NONNULL(1, 2); /** * Add a new box object on the provided canvas. * * @param evas The canvas to create the box object on. * @return @c NULL on error, a pointer to a new box object on * success. * * After instantiation, if a box object hasn't its layout function * set, via evas_object_box_layout_set(), it will have it by default * set to evas_object_box_layout_horizontal(). The remaining * properties of the box must be set/retrieved via * evas_object_box_{h,v}_{align,padding}_{get,set)(). */ EAPI Evas_Object *evas_object_box_add(Evas *evas) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC; /** * Add a new box as a @b child of a given smart object. * * @param parent The parent smart object to put the new box in. * @return @c NULL on error, a pointer to a new box object on * success. * * This is a helper function that has the same effect of putting a new * box object into @p parent by use of evas_object_smart_member_add(). * * @see evas_object_box_add() */ EAPI Evas_Object *evas_object_box_add_to(Evas_Object *parent) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC; /** * Layout function which sets the box @a o to a (basic) horizontal box * * @param o The box object in question * @param priv The smart data of the @p o * @param data The data pointer passed on * evas_object_box_layout_set(), if any * * In this layout, the box object's overall behavior is controlled by * its padding/alignment properties, which are set by the * evas_object_box_{h,v}_{align,padding}_set() family of * functions. The size hints of the elements in the box -- set by the * evas_object_size_hint_{align,padding,weight}_set() functions * -- also control the way this function works. * * \par Box's properties: * @c align_h controls the horizontal alignment of the child objects * relative to the containing box. When set to @c 0.0, children are * aligned to the left. A value of @c 1.0 makes them aligned to the * right border. Values in between align them proportionally. Note * that if the size required by the children, which is given by their * widths and the @c padding_h property of the box, is bigger than the * their container's width, the children will be displayed out of the * box's bounds. A negative value of @c align_h makes the box to * @b justify its children. The padding between them, in this case, is * corrected so that the leftmost one touches the left border and the * rightmost one touches the right border (even if they must * overlap). The @c align_v and @c padding_v properties of the box * @b don't contribute to its behaviour when this layout is chosen. * * \par Child element's properties: * @c align_x does @b not influence the box's behavior. @c padding_l * and @c padding_r sum up to the container's horizontal padding * between elements. The child's @c padding_t, @c padding_b and * @c align_y properties apply for padding/alignment relative to the * overall height of the box. Finally, there is the @c weight_x * property, which, if set to a non-zero value, tells the container * that the child width is @b not pre-defined. If the container can't * accommodate all its children, it sets the widths of the ones * with weights to sizes as small as they can all fit into * it. If the size required by the children is less than the * available, the box increases its childrens' (which have weights) * widths as to fit the remaining space. The @c weight_x property, * besides telling the element is resizable, gives a @b weight for the * resizing process. The parent box will try to distribute (or take * off) widths accordingly to the @b normalized list of weigths: most * weighted children remain/get larger in this process than the least * ones. @c weight_y does not influence the layout. * * If one desires that, besides having weights, child elements must be * resized bounded to a minimum or maximum size, those size hints must * be set, by the evas_object_size_hint_{min,max}_set() * functions. */ EAPI void evas_object_box_layout_horizontal(Evas_Object *o, Evas_Object_Box_Data *priv, void *data) EINA_ARG_NONNULL(1, 2); /** * Layout function which sets the box @a o to a (basic) vertical box * * This function behaves analogously to * evas_object_box_layout_horizontal(). The description of its * behaviour can be derived from that function's documentation. */ EAPI void evas_object_box_layout_vertical(Evas_Object *o, Evas_Object_Box_Data *priv, void *data) EINA_ARG_NONNULL(1, 2); /** * Layout function which sets the box @a o to a @b homogeneous * vertical box * * This function behaves analogously to * evas_object_box_layout_homogeneous_horizontal(). The description * of its behaviour can be derived from that function's documentation. */ EAPI void evas_object_box_layout_homogeneous_vertical(Evas_Object *o, Evas_Object_Box_Data *priv, void *data) EINA_ARG_NONNULL(1, 2); /** * Layout function which sets the box @a o to a @b homogeneous * horizontal box * * @param o The box object in question * @param priv The smart data of the @p o * @param data The data pointer passed on * evas_object_box_layout_set(), if any * * In a homogeneous horizontal box, its width is divided @b equally * between the contained objects. The box's overall behavior is * controlled by its padding/alignment properties, which are set by * the evas_object_box_{h,v}_{align,padding}_set() family of * functions. The size hints the elements in the box -- set by the * evas_object_size_hint_{align,padding,weight}_set() functions * -- also control the way this function works. * * \par Box's properties: * @c align_h has no influence on the box for this layout. * @c padding_h tells the box to draw empty spaces of that size, in * pixels, between the (equal) child objects's cells. The @c align_v * and @c padding_v properties of the box don't contribute to its * behaviour when this layout is chosen. * * \par Child element's properties: * @c padding_l and @c padding_r sum up to the required width of the * child element. The @c align_x property tells the relative position * of this overall child width in its allocated cell (@c 0.0 to * extreme left, @c 1.0 to extreme right). A value of @c -1.0 to * @c align_x makes the box try to resize this child element to the exact * width of its cell (respecting the minimum and maximum size hints on * the child's width and accounting for its horizontal padding * hints). The child's @c padding_t, @c padding_b and @c align_y * properties apply for padding/alignment relative to the overall * height of the box. A value of @c -1.0 to @c align_y makes the box * try to resize this child element to the exact height of its parent * (respecting the maximum size hint on the child's height). */ EAPI void evas_object_box_layout_homogeneous_horizontal(Evas_Object *o, Evas_Object_Box_Data *priv, void *data) EINA_ARG_NONNULL(1, 2); /** * Layout function which sets the box @a o to a maximum size, * homogeneous horizontal box * * @param o The box object in question * @param priv The smart data of the @p o * @param data The data pointer passed on * evas_object_box_layout_set(), if any * * In a maximum size, homogeneous horizontal box, besides having cells * of equal size reserved for the child objects, this size will * be defined by the size of the @b largest child in the box (in * width). The box's overall behavior is controlled by its properties, * which are set by the * evas_object_box_{h,v}_{align,padding}_set() family of * functions. The size hints of the elements in the box -- set by the * evas_object_size_hint_{align,padding,weight}_set() functions * -- also control the way this function works. * * \par Box's properties: * @c padding_h tells the box to draw empty spaces of that size, in * pixels, between the child objects's cells. @c align_h controls the * horizontal alignment of the child objects, relative to the * containing box. When set to @c 0.0, children are aligned to the * left. A value of @c 1.0 lets them aligned to the right * border. Values in between align them proportionally. A negative * value of @c align_h makes the box to @b justify its children * cells. The padding between them, in this case, is corrected so that * the leftmost one touches the left border and the rightmost one * touches the right border (even if they must overlap). The * @c align_v and @c padding_v properties of the box don't contribute to * its behaviour when this layout is chosen. * * \par Child element's properties: * @c padding_l and @c padding_r sum up to the required width of the * child element. The @c align_x property tells the relative position * of this overall child width in its allocated cell (@c 0.0 to * extreme left, @c 1.0 to extreme right). A value of @c -1.0 to * @c align_x makes the box try to resize this child element to the exact * width of its cell (respecting the minimum and maximum size hints on * the child's width and accounting for its horizontal padding * hints). The child's @c padding_t, @c padding_b and @c align_y * properties apply for padding/alignment relative to the overall * height of the box. A value of @c -1.0 to @c align_y makes the box * try to resize this child element to the exact height of its parent * (respecting the max hint on the child's height). */ EAPI void evas_object_box_layout_homogeneous_max_size_horizontal(Evas_Object *o, Evas_Object_Box_Data *priv, void *data) EINA_ARG_NONNULL(1, 2); /** * Layout function which sets the box @a o to a maximum size, * homogeneous vertical box * * This function behaves analogously to * evas_object_box_layout_homogeneous_max_size_horizontal(). The * description of its behaviour can be derived from that function's * documentation. */ EAPI void evas_object_box_layout_homogeneous_max_size_vertical(Evas_Object *o, Evas_Object_Box_Data *priv, void *data) EINA_ARG_NONNULL(1, 2); /** * Layout function which sets the box @a o to a @b flow horizontal * box. * * @param o The box object in question * @param priv The smart data of the @p o * @param data The data pointer passed on * evas_object_box_layout_set(), if any * * In a flow horizontal box, the box's child elements are placed in * @b rows (think of text as an analogy). A row has as much elements as * can fit into the box's width. The box's overall behavior is * controlled by its properties, which are set by the * evas_object_box_{h,v}_{align,padding}_set() family of * functions. The size hints of the elements in the box -- set by the * evas_object_size_hint_{align,padding,weight}_set() functions * -- also control the way this function works. * * \par Box's properties: * @c padding_h tells the box to draw empty spaces of that size, in * pixels, between the child objects's cells. @c align_h dictates the * horizontal alignment of the rows (@c 0.0 to left align them, @c 1.0 * to right align). A value of @c -1.0 to @c align_h lets the rows * @b justified horizontally. @c align_v controls the vertical alignment * of the entire set of rows (@c 0.0 to top, @c 1.0 to bottom). A * value of @c -1.0 to @c align_v makes the box to @b justify the rows * vertically. The padding between them, in this case, is corrected so * that the first row touches the top border and the last one touches * the bottom border (even if they must overlap). @c padding_v has no * influence on the layout. * * \par Child element's properties: * @c padding_l and @c padding_r sum up to the required width of the * child element. The @c align_x property has no influence on the * layout. The child's @c padding_t and @c padding_b sum up to the * required height of the child element and is the only means (besides * row justifying) of setting space between rows. Note, however, that * @c align_y dictates positioning relative to the largest * height required by a child object in the actual row. */ EAPI void evas_object_box_layout_flow_horizontal(Evas_Object *o, Evas_Object_Box_Data *priv, void *data) EINA_ARG_NONNULL(1, 2); /** * Layout function which sets the box @a o to a @b flow vertical box. * * This function behaves analogously to * evas_object_box_layout_flow_horizontal(). The description of its * behaviour can be derived from that function's documentation. */ EAPI void evas_object_box_layout_flow_vertical(Evas_Object *o, Evas_Object_Box_Data *priv, void *data) EINA_ARG_NONNULL(1, 2); /** * Layout function which sets the box @a o to a @b stacking box * * @param o The box object in question * @param priv The smart data of the @p o * @param data The data pointer passed on * evas_object_box_layout_set(), if any * * In a stacking box, all children will be given the same size -- the * box's own size -- and they will be stacked one above the other, so * that the first object in @p o's internal list of child elements * will be the bottommost in the stack. * * \par Box's properties: * No box properties are used. * * \par Child element's properties: * @c padding_l and @c padding_r sum up to the required width of the * child element. The @c align_x property tells the relative position * of this overall child width in its allocated cell (@c 0.0 to * extreme left, @c 1.0 to extreme right). A value of @c -1.0 to @c * align_x makes the box try to resize this child element to the exact * width of its cell (respecting the min and max hints on the child's * width and accounting for its horizontal padding properties). The * same applies to the vertical axis. */ EAPI void evas_object_box_layout_stack(Evas_Object *o, Evas_Object_Box_Data *priv, void *data) EINA_ARG_NONNULL(1, 2); /** * Set the alignment of the whole bounding box of contents, for a * given box object. * * @param o The given box object to set alignment from * @param horizontal The horizontal alignment, in pixels * @param vertical the vertical alignment, in pixels * * This will influence how a box object is to align its bounding box * of contents within its own area. The values @b must be in the range * @c 0.0 - @c 1.0, or undefined behavior is expected. For horizontal * alignment, @c 0.0 means to the left, with @c 1.0 meaning to the * right. For vertical alignment, @c 0.0 means to the top, with @c 1.0 * meaning to the bottom. * * @note The default values for both alignments is @c 0.5. * * @see evas_object_box_align_get() */ EAPI void evas_object_box_align_set(Evas_Object *o, double horizontal, double vertical) EINA_ARG_NONNULL(1); /** * Get the alignment of the whole bounding box of contents, for a * given box object. * * @param o The given box object to get alignment from * @param horizontal Pointer to a variable where to store the * horizontal alignment * @param vertical Pointer to a variable where to store the vertical * alignment * * @see evas_object_box_align_set() for more information */ EAPI void evas_object_box_align_get(const Evas_Object *o, double *horizontal, double *vertical) EINA_ARG_NONNULL(1); /** * Set the (space) padding between cells set for a given box object. * * @param o The given box object to set padding from * @param horizontal The horizontal padding, in pixels * @param vertical the vertical padding, in pixels * * @note The default values for both padding components is @c 0. * * @see evas_object_box_padding_get() */ EAPI void evas_object_box_padding_set(Evas_Object *o, Evas_Coord horizontal, Evas_Coord vertical) EINA_ARG_NONNULL(1); /** * Get the (space) padding between cells set for a given box object. * * @param o The given box object to get padding from * @param horizontal Pointer to a variable where to store the * horizontal padding * @param vertical Pointer to a variable where to store the vertical * padding * * @see evas_object_box_padding_set() */ EAPI void evas_object_box_padding_get(const Evas_Object *o, Evas_Coord *horizontal, Evas_Coord *vertical) EINA_ARG_NONNULL(1); /** * Append a new @a child object to the given box object @a o. * * @param o The given box object * @param child A child Evas object to be made a member of @p o * @return A box option bound to the recently added box item or @c * NULL, on errors * * On success, the @c "child,added" smart event will take place. * * @note The actual placing of the item relative to @p o's area will * depend on the layout set to it. For example, on horizontal layouts * an item in the end of the box's list of children will appear on its * right. * * @note This call will trigger the box's _Evas_Object_Box_Api::append * smart function. */ EAPI Evas_Object_Box_Option *evas_object_box_append(Evas_Object *o, Evas_Object *child) EINA_ARG_NONNULL(1, 2); /** * Prepend a new @a child object to the given box object @a o. * * @param o The given box object * @param child A child Evas object to be made a member of @p o * @return A box option bound to the recently added box item or @c * NULL, on errors * * On success, the @c "child,added" smart event will take place. * * @note The actual placing of the item relative to @p o's area will * depend on the layout set to it. For example, on horizontal layouts * an item in the beginning of the box's list of children will appear * on its left. * * @note This call will trigger the box's * _Evas_Object_Box_Api::prepend smart function. */ EAPI Evas_Object_Box_Option *evas_object_box_prepend(Evas_Object *o, Evas_Object *child) EINA_ARG_NONNULL(1, 2); /** * Insert a new @a child object before another existing one, in * a given box object @a o. * * @param o The given box object * @param child A child Evas object to be made a member of @p o * @param reference The child object to place this new one before * @return A box option bound to the recently added box item or @c * NULL, on errors * * On success, the @c "child,added" smart event will take place. * * @note This function will fail if @p reference is not a member of @p * o. * * @note The actual placing of the item relative to @p o's area will * depend on the layout set to it. * * @note This call will trigger the box's * _Evas_Object_Box_Api::insert_before smart function. */ EAPI Evas_Object_Box_Option *evas_object_box_insert_before(Evas_Object *o, Evas_Object *child, const Evas_Object *reference) EINA_ARG_NONNULL(1, 2, 3); /** * Insert a new @a child object after another existing one, in * a given box object @a o. * * @param o The given box object * @param child A child Evas object to be made a member of @p o * @param reference The child object to place this new one after * @return A box option bound to the recently added box item or @c * NULL, on errors * * On success, the @c "child,added" smart event will take place. * * @note This function will fail if @p reference is not a member of @p * o. * * @note The actual placing of the item relative to @p o's area will * depend on the layout set to it. * * @note This call will trigger the box's * _Evas_Object_Box_Api::insert_after smart function. */ EAPI Evas_Object_Box_Option *evas_object_box_insert_after(Evas_Object *o, Evas_Object *child, const Evas_Object *reference) EINA_ARG_NONNULL(1, 2, 3); /** * Insert a new @a child object at a given position, in a given * box object @a o. * * @param o The given box object * @param child A child Evas object to be made a member of @p o * @param pos The numeric position (starting from @c 0) to place the * new child object at * @return A box option bound to the recently added box item or @c * NULL, on errors * * On success, the @c "child,added" smart event will take place. * * @note This function will fail if the given position is invalid, * given @p o's internal list of elements. * * @note The actual placing of the item relative to @p o's area will * depend on the layout set to it. * * @note This call will trigger the box's * _Evas_Object_Box_Api::insert_at smart function. */ EAPI Evas_Object_Box_Option *evas_object_box_insert_at(Evas_Object *o, Evas_Object *child, unsigned int pos) EINA_ARG_NONNULL(1, 2); /** * Remove a given object from a box object, unparenting it again. * * @param o The box object to remove a child object from * @param child The handle to the child object to be removed * @return @c EINA_TRUE, on success, @c EINA_FALSE otherwise * * On removal, you'll get an unparented object again, just as it was * before you inserted it in the box. The * _Evas_Object_Box_Api::option_free box smart callback will be called * automatically for you and, also, the @c "child,removed" smart event * will take place. * * @note This call will trigger the box's _Evas_Object_Box_Api::remove * smart function. */ EAPI Eina_Bool evas_object_box_remove(Evas_Object *o, Evas_Object *child) EINA_ARG_NONNULL(1, 2); /** * Remove an object, bound to a given position in a box object, * unparenting it again. * * @param o The box object to remove a child object from * @param pos The numeric position (starting from @c 0) of the child * object to be removed * @return @c EINA_TRUE, on success, @c EINA_FALSE otherwise * * On removal, you'll get an unparented object again, just as it was * before you inserted it in the box. The @c option_free() box smart * callback will be called automatically for you and, also, the * @c "child,removed" smart event will take place. * * @note This function will fail if the given position is invalid, * given @p o's internal list of elements. * * @note This call will trigger the box's * _Evas_Object_Box_Api::remove_at smart function. */ EAPI Eina_Bool evas_object_box_remove_at(Evas_Object *o, unsigned int pos) EINA_ARG_NONNULL(1); /** * Remove @b all child objects from a box object, unparenting them * again. * * @param o The box object to remove a child object from * @param clear if true, it will delete just removed children. * @return @c EINA_TRUE, on success, @c EINA_FALSE otherwise * * This has the same effect of calling evas_object_box_remove() on * each of @p o's child objects, in sequence. If, and only if, all * those calls succeed, so does this one. */ EAPI Eina_Bool evas_object_box_remove_all(Evas_Object *o, Eina_Bool clear) EINA_ARG_NONNULL(1); /** * Get an iterator to walk the list of children of a given box object. * * @param o The box to retrieve an items iterator from * @return An iterator on @p o's child objects, on success, or @c NULL, * on errors * * @note Do @b not remove or delete objects while walking the list. */ EAPI Eina_Iterator *evas_object_box_iterator_new(const Evas_Object *o) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC; /** * Get an accessor (a structure providing random items access) to the * list of children of a given box object. * * @param o The box to retrieve an items iterator from * @return An accessor on @p o's child objects, on success, or @c NULL, * on errors * * @note Do not remove or delete objects while walking the list. */ EAPI Eina_Accessor *evas_object_box_accessor_new(const Evas_Object *o) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC; /** * Get the list of children objects in a given box object. * * @param o The box to retrieve an items list from * @return A list of @p o's child objects, on success, or @c NULL, * on errors (or if it has no child objects) * * The returned list should be freed with @c eina_list_free() when you * no longer need it. * * @note This is a duplicate of the list kept by the box internally. * It's up to the user to destroy it when it no longer needs it. * It's possible to remove objects from the box when walking * this list, but these removals won't be reflected on it. */ EAPI Eina_List *evas_object_box_children_get(const Evas_Object *o) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC; /** * Get the name of the property of the child elements of the box @a o * which have @a id as identifier * * @param o The box to search child options from * @param property The numerical identifier of the option being searched, * for its name * @return The name of the given property or @c NULL, on errors. * * @note This call won't do anything for a canonical Evas box. Only * users which have @b subclassed it, setting custom box items options * (see #Evas_Object_Box_Option) on it, would benefit from this * function. They'd have to implement it and set it to be the * _Evas_Object_Box_Api::property_name_get smart class function of the * box, which is originally set to @c NULL. */ EAPI const char *evas_object_box_option_property_name_get(const Evas_Object *o, int property) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Get the numerical identifier of the property of the child elements * of the box @a o which have @a name as name string * * @param o The box to search child options from * @param name The name string of the option being searched, for * its ID * @return The numerical ID of the given property or @c -1, on * errors. * * @note This call won't do anything for a canonical Evas box. Only * users which have @b subclassed it, setting custom box items options * (see #Evas_Object_Box_Option) on it, would benefit from this * function. They'd have to implement it and set it to be the * _Evas_Object_Box_Api::property_id_get smart class function of the * box, which is originally set to @c NULL. */ EAPI int evas_object_box_option_property_id_get(const Evas_Object *o, const char *name) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2); /** * Set a property value (by its given numerical identifier), on a * given box child element * * @param o The box parenting the child element * @param opt The box option structure bound to the child box element * to set a property on * @param property The numerical ID of the given property * @param ... (List of) actual value(s) to be set for this * property. It (they) @b must be of the same type the user has * defined for it (them). * @return @c EINA_TRUE on success, @c EINA_FALSE on failure. * * @note This call won't do anything for a canonical Evas box. Only * users which have @b subclassed it, setting custom box items options * (see #Evas_Object_Box_Option) on it, would benefit from this * function. They'd have to implement it and set it to be the * _Evas_Object_Box_Api::property_set smart class function of the box, * which is originally set to @c NULL. * * @note This function will internally create a variable argument * list, with the values passed after @p property, and call * evas_object_box_option_property_vset() with this list and the same * previous arguments. */ EAPI Eina_Bool evas_object_box_option_property_set(Evas_Object *o, Evas_Object_Box_Option *opt, int property, ...) EINA_ARG_NONNULL(1, 2); /** * Set a property value (by its given numerical identifier), on a * given box child element -- by a variable argument list * * @param o The box parenting the child element * @param opt The box option structure bound to the child box element * to set a property on * @param property The numerical ID of the given property * @param args The variable argument list implementing the value to * be set for this property. It @b must be of the same type the user has * defined for it. * @return @c EINA_TRUE on success, @c EINA_FALSE on failure. * * This is a variable argument list variant of the * evas_object_box_option_property_set(). See its documentation for * more details. */ EAPI Eina_Bool evas_object_box_option_property_vset(Evas_Object *o, Evas_Object_Box_Option *opt, int property, va_list args) EINA_ARG_NONNULL(1, 2); /** * Get a property's value (by its given numerical identifier), on a * given box child element * * @param o The box parenting the child element * @param opt The box option structure bound to the child box element * to get a property from * @param property The numerical ID of the given property * @param ... (List of) pointer(s) where to store the value(s) set for * this property. It (they) @b must point to variable(s) of the same * type the user has defined for it (them). * @return @c EINA_TRUE on success, @c EINA_FALSE on failure. * * @note This call won't do anything for a canonical Evas box. Only * users which have @b subclassed it, getting custom box items options * (see #Evas_Object_Box_Option) on it, would benefit from this * function. They'd have to implement it and get it to be the * _Evas_Object_Box_Api::property_get smart class function of the * box, which is originally get to @c NULL. * * @note This function will internally create a variable argument * list, with the values passed after @p property, and call * evas_object_box_option_property_vget() with this list and the same * previous arguments. */ EAPI Eina_Bool evas_object_box_option_property_get(const Evas_Object *o, Evas_Object_Box_Option *opt, int property, ...) EINA_ARG_NONNULL(1, 2); /** * Get a property's value (by its given numerical identifier), on a * given box child element -- by a variable argument list * * @param o The box parenting the child element * @param opt The box option structure bound to the child box element * to get a property from * @param property The numerical ID of the given property * @param args The variable argument list with pointers to where to * store the values of this property. They @b must point to variables * of the same type the user has defined for them. * @return @c EINA_TRUE on success, @c EINA_FALSE on failure. * * This is a variable argument list variant of the * evas_object_box_option_property_get(). See its documentation for * more details. */ EAPI Eina_Bool evas_object_box_option_property_vget(const Evas_Object *o, Evas_Object_Box_Option *opt, int property, va_list args) EINA_ARG_NONNULL(1, 2); /** * @} */ /** * @defgroup Evas_Object_Table Table Smart Object. * * Convenience smart object that packs children using a tabular * layout using children size hints to define their size and * alignment inside their cell space. * * @ref tutorial_table shows how to use this Evas_Object. * * @see @ref Evas_Object_Group_Size_Hints * * @ingroup Evas_Smart_Object_Group * * @{ */ /** * @brief Create a new table. * * @param evas Canvas in which table will be added. */ EAPI Evas_Object *evas_object_table_add(Evas *evas) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC; /** * @brief Create a table that is child of a given element @a parent. * * @see evas_object_table_add() */ EAPI Evas_Object *evas_object_table_add_to(Evas_Object *parent) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC; /** * @brief Set how this table should layout children. * * @todo consider aspect hint and respect it. * * @par EVAS_OBJECT_TABLE_HOMOGENEOUS_NONE * If table does not use homogeneous mode then columns and rows will * be calculated based on hints of individual cells. This operation * mode is more flexible, but more complex and heavy to calculate as * well. @b Weight properties are handled as a boolean expand. Negative * alignment will be considered as 0.5. This is the default. * * @todo @c EVAS_OBJECT_TABLE_HOMOGENEOUS_NONE should balance weight. * * @par EVAS_OBJECT_TABLE_HOMOGENEOUS_TABLE * When homogeneous is relative to table the own table size is divided * equally among children, filling the whole table area. That is, if * table has @c WIDTH and @c COLUMNS, each cell will get WIDTH / * COLUMNS pixels. If children have minimum size that is larger * than this amount (including padding), then it will overflow and be * aligned respecting the alignment hint, possible overlapping sibling * cells. @b Weight hint is used as a boolean, if greater than zero it * will make the child expand in that axis, taking as much space as * possible (bounded to maximum size hint). Negative alignment will be * considered as 0.5. * * @par EVAS_OBJECT_TABLE_HOMOGENEOUS_ITEM * When homogeneous is relative to item it means the greatest minimum * cell size will be used. That is, if no element is set to expand, * the table will have its contents to a minimum size, the bounding * box of all these children will be aligned relatively to the table * object using evas_object_table_align_get(). If the table area is * too small to hold this minimum bounding box, then the objects will * keep their size and the bounding box will overflow the box area, * still respecting the alignment. @b Weight hint is used as a * boolean, if greater than zero it will make that cell expand in that * axis, toggling the expand mode, which makes the table behave * much like @b EVAS_OBJECT_TABLE_HOMOGENEOUS_TABLE, except that the * bounding box will overflow and items will not overlap siblings. If * no minimum size is provided at all then the table will fallback to * expand mode as well. */ EAPI void evas_object_table_homogeneous_set(Evas_Object *o, Evas_Object_Table_Homogeneous_Mode homogeneous) EINA_ARG_NONNULL(1); /** * Get the current layout homogeneous mode. * * @see evas_object_table_homogeneous_set() */ EAPI Evas_Object_Table_Homogeneous_Mode evas_object_table_homogeneous_get(const Evas_Object *o) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Set padding between cells. */ EAPI void evas_object_table_padding_set(Evas_Object *o, Evas_Coord horizontal, Evas_Coord vertical) EINA_ARG_NONNULL(1); /** * Get padding between cells. */ EAPI void evas_object_table_padding_get(const Evas_Object *o, Evas_Coord *horizontal, Evas_Coord *vertical) EINA_ARG_NONNULL(1); /** * Set the alignment of the whole bounding box of contents. */ EAPI void evas_object_table_align_set(Evas_Object *o, double horizontal, double vertical) EINA_ARG_NONNULL(1); /** * Get alignment of the whole bounding box of contents. */ EAPI void evas_object_table_align_get(const Evas_Object *o, double *horizontal, double *vertical) EINA_ARG_NONNULL(1); /** * Sets the mirrored mode of the table. In mirrored mode the table items go * from right to left instead of left to right. That is, 1,1 is top right, not * top left. * * @param o The table object. * @param mirrored the mirrored mode to set * @since 1.1 */ EAPI void evas_object_table_mirrored_set(Evas_Object *o, Eina_Bool mirrored) EINA_ARG_NONNULL(1); /** * Gets the mirrored mode of the table. * * @param o The table object. * @return @c EINA_TRUE if it's a mirrored table, @c EINA_FALSE otherwise. * @since 1.1 * @see evas_object_table_mirrored_set() */ EAPI Eina_Bool evas_object_table_mirrored_get(const Evas_Object *o) EINA_ARG_NONNULL(1); /** * Get packing location of a child of table * * @param o The given table object. * @param child The child object to add. * @param col pointer to store relative-horizontal position to place child. * @param row pointer to store relative-vertical position to place child. * @param colspan pointer to store how many relative-horizontal position to use for this child. * @param rowspan pointer to store how many relative-vertical position to use for this child. * * @return 1 on success, 0 on failure. * @since 1.1 */ EAPI Eina_Bool evas_object_table_pack_get(const Evas_Object *o, Evas_Object *child, unsigned short *col, unsigned short *row, unsigned short *colspan, unsigned short *rowspan); /** * Add a new child to a table object or set its current packing. * * @param o The given table object. * @param child The child object to add. * @param col relative-horizontal position to place child. * @param row relative-vertical position to place child. * @param colspan how many relative-horizontal position to use for this child. * @param rowspan how many relative-vertical position to use for this child. * * @return 1 on success, 0 on failure. */ EAPI Eina_Bool evas_object_table_pack(Evas_Object *o, Evas_Object *child, unsigned short col, unsigned short row, unsigned short colspan, unsigned short rowspan) EINA_ARG_NONNULL(1, 2); /** * Remove child from table. * * @note removing a child will immediately call a walk over children in order * to recalculate numbers of columns and rows. If you plan to remove * all children, use evas_object_table_clear() instead. * * @return 1 on success, 0 on failure. */ EAPI Eina_Bool evas_object_table_unpack(Evas_Object *o, Evas_Object *child) EINA_ARG_NONNULL(1, 2); /** * Faster way to remove all child objects from a table object. * * @param o The given table object. * @param clear if true, it will delete just removed children. */ EAPI void evas_object_table_clear(Evas_Object *o, Eina_Bool clear) EINA_ARG_NONNULL(1); /** * Get the number of columns and rows this table takes. * * @note columns and rows are virtual entities, one can specify a table * with a single object that takes 4 columns and 5 rows. The only * difference for a single cell table is that paddings will be * accounted proportionally. */ EAPI void evas_object_table_col_row_size_get(const Evas_Object *o, int *cols, int *rows) EINA_ARG_NONNULL(1); /** * Get an iterator to walk the list of children for the table. * * @note Do not remove or delete objects while walking the list. */ EAPI Eina_Iterator *evas_object_table_iterator_new(const Evas_Object *o) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC; /** * Get an accessor to get random access to the list of children for the table. * * @note Do not remove or delete objects while walking the list. */ EAPI Eina_Accessor *evas_object_table_accessor_new(const Evas_Object *o) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC; /** * Get the list of children for the table. * * @note This is a duplicate of the list kept by the table internally. * It's up to the user to destroy it when it no longer needs it. * It's possible to remove objects from the table when walking this * list, but these removals won't be reflected on it. */ EAPI Eina_List *evas_object_table_children_get(const Evas_Object *o) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC; /** * Get the child of the table at the given coordinates * * @note This does not take into account col/row spanning */ EAPI Evas_Object *evas_object_table_child_get(const Evas_Object *o, unsigned short col, unsigned short row) EINA_ARG_NONNULL(1); /** * @} */ /** * @defgroup Evas_Object_Grid Grid Smart Object. * * Convenience smart object that packs children under a regular grid * layout, using their virtual grid location and size to determine * children's positions inside the grid object's area. * * @ingroup Evas_Smart_Object_Group * @since 1.1 */ /** * @addtogroup Evas_Object_Grid * @{ */ /** * Create a new grid. * * It's set to a virtual size of 1x1 by default and add children with * evas_object_grid_pack(). * @since 1.1 */ EAPI Evas_Object *evas_object_grid_add(Evas *evas) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC; /** * Create a grid that is child of a given element @a parent. * * @see evas_object_grid_add() * @since 1.1 */ EAPI Evas_Object *evas_object_grid_add_to(Evas_Object *parent) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC; /** * Set the virtual resolution for the grid * * @param o The grid object to modify * @param w The virtual horizontal size (resolution) in integer units * @param h The virtual vertical size (resolution) in integer units * @since 1.1 */ EAPI void evas_object_grid_size_set(Evas_Object *o, int w, int h) EINA_ARG_NONNULL(1); /** * Get the current virtual resolution * * @param o The grid object to query * @param w A pointer to an integer to store the virtual width * @param h A pointer to an integer to store the virtual height * @see evas_object_grid_size_set() * @since 1.1 */ EAPI void evas_object_grid_size_get(const Evas_Object *o, int *w, int *h) EINA_ARG_NONNULL(1); /** * Sets the mirrored mode of the grid. In mirrored mode the grid items go * from right to left instead of left to right. That is, 0,0 is top right, not * to left. * * @param o The grid object. * @param mirrored the mirrored mode to set * @since 1.1 */ EAPI void evas_object_grid_mirrored_set(Evas_Object *o, Eina_Bool mirrored) EINA_ARG_NONNULL(1); /** * Gets the mirrored mode of the grid. * * @param o The grid object. * @return @c EINA_TRUE if it's a mirrored grid, @c EINA_FALSE otherwise. * @see evas_object_grid_mirrored_set() * @since 1.1 */ EAPI Eina_Bool evas_object_grid_mirrored_get(const Evas_Object *o) EINA_ARG_NONNULL(1); /** * Add a new child to a grid object. * * @param o The given grid object. * @param child The child object to add. * @param x The virtual x coordinate of the child * @param y The virtual y coordinate of the child * @param w The virtual width of the child * @param h The virtual height of the child * @return 1 on success, 0 on failure. * @since 1.1 */ EAPI Eina_Bool evas_object_grid_pack(Evas_Object *o, Evas_Object *child, int x, int y, int w, int h) EINA_ARG_NONNULL(1, 2); /** * Remove child from grid. * * @note removing a child will immediately call a walk over children in order * to recalculate numbers of columns and rows. If you plan to remove * all children, use evas_object_grid_clear() instead. * * @return 1 on success, 0 on failure. * @since 1.1 */ EAPI Eina_Bool evas_object_grid_unpack(Evas_Object *o, Evas_Object *child) EINA_ARG_NONNULL(1, 2); /** * Faster way to remove all child objects from a grid object. * * @param o The given grid object. * @param clear if true, it will delete just removed children. * @since 1.1 */ EAPI void evas_object_grid_clear(Evas_Object *o, Eina_Bool clear) EINA_ARG_NONNULL(1); /** * Get the pack options for a grid child * * Get the pack x, y, width and height in virtual coordinates set by * evas_object_grid_pack() * @param o The grid object * @param child The grid child to query for coordinates * @param x The pointer to where the x coordinate will be returned * @param y The pointer to where the y coordinate will be returned * @param w The pointer to where the width will be returned * @param h The pointer to where the height will be returned * @return 1 on success, 0 on failure. * @since 1.1 */ EAPI Eina_Bool evas_object_grid_pack_get(const Evas_Object *o, Evas_Object *child, int *x, int *y, int *w, int *h); /** * Get an iterator to walk the list of children for the grid. * * @note Do not remove or delete objects while walking the list. * @since 1.1 */ EAPI Eina_Iterator *evas_object_grid_iterator_new(const Evas_Object *o) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC; /** * Get an accessor to get random access to the list of children for the grid. * * @note Do not remove or delete objects while walking the list. * @since 1.1 */ EAPI Eina_Accessor *evas_object_grid_accessor_new(const Evas_Object *o) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC; /** * Get the list of children for the grid. * * @note This is a duplicate of the list kept by the grid internally. * It's up to the user to destroy it when it no longer needs it. * It's possible to remove objects from the grid when walking this * list, but these removals won't be reflected on it. * @since 1.1 */ EAPI Eina_List *evas_object_grid_children_get(const Evas_Object *o) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC; /** * @} */ /** * @defgroup Evas_Cserve Shared Image Cache Server * * Evas has an (optional) module which provides client-server * infrastructure to share bitmaps across multiple processes, * saving data and processing power. * * Be warned that it @b doesn't work when threaded image * preloading is enabled for Evas, though. */ typedef struct _Evas_Cserve_Stats Evas_Cserve_Stats; typedef struct _Evas_Cserve_Image_Cache Evas_Cserve_Image_Cache; typedef struct _Evas_Cserve_Image Evas_Cserve_Image; typedef struct _Evas_Cserve_Config Evas_Cserve_Config; /** * Statistics about the server that shares cached bitmaps. * @ingroup Evas_Cserve */ struct _Evas_Cserve_Stats { int saved_memory; /**< current amount of saved memory, in bytes */ int wasted_memory; /**< current amount of wasted memory, in bytes */ int saved_memory_peak; /**< peak amount of saved memory, in bytes */ int wasted_memory_peak; /**< peak amount of wasted memory, in bytes */ double saved_time_image_header_load; /**< time, in seconds, saved in header loads by sharing cached loads instead */ double saved_time_image_data_load; /**< time, in seconds, saved in data loads by sharing cached loads instead */ }; /** * A handle of a cache of images shared by a server. * @ingroup Evas_Cserve */ struct _Evas_Cserve_Image_Cache { struct { int mem_total; int count; } active, cached; Eina_List *images; }; /** * A handle to an image shared by a server. * @ingroup Evas_Cserve */ struct _Evas_Cserve_Image { const char *file, *key; int w, h; time_t file_mod_time; time_t file_checked_time; time_t cached_time; int refcount; int data_refcount; int memory_footprint; double head_load_time; double data_load_time; Eina_Bool alpha : 1; Eina_Bool data_loaded : 1; Eina_Bool active : 1; Eina_Bool dead : 1; Eina_Bool useless : 1; }; /** * Configuration that controls the server that shares cached bitmaps. * @ingroup Evas_Cserve */ struct _Evas_Cserve_Config { int cache_max_usage; int cache_item_timeout; int cache_item_timeout_check; }; /** * Retrieves if the system wants to share bitmaps using the server. * @return @c EINA_TRUE if it wants, @c EINA_FALSE otherwise. * @ingroup Evas_Cserve */ EAPI Eina_Bool evas_cserve_want_get(void) EINA_WARN_UNUSED_RESULT; /** * Retrieves if the system is connected to the server used to share * bitmaps. * * @return @c EINA_TRUE if it's connected, @c EINA_FALSE otherwise. * @ingroup Evas_Cserve */ EAPI Eina_Bool evas_cserve_connected_get(void) EINA_WARN_UNUSED_RESULT; /** * Retrieves statistics from a running bitmap sharing server. * @param stats pointer to structure to fill with statistics about the * bitmap cache server. * * @return @c EINA_TRUE if @p stats were filled with data, * @c EINA_FALSE otherwise (when @p stats is untouched) * @ingroup Evas_Cserve */ EAPI Eina_Bool evas_cserve_stats_get(Evas_Cserve_Stats *stats) EINA_WARN_UNUSED_RESULT; /** * Completely discard/clean a given images cache, thus re-setting it. * * @param cache A handle to the given images cache. */ EAPI void evas_cserve_image_cache_contents_clean(Evas_Cserve_Image_Cache *cache); /** * Retrieves the current configuration of the Evas image caching * server. * * @param config where to store current image caching server's * configuration. * * @return @c EINA_TRUE if @p config was filled with data, * @c EINA_FALSE otherwise (when @p config is untouched) * * The fields of @p config will be altered to reflect the current * configuration's values. * * @see evas_cserve_config_set() * * @ingroup Evas_Cserve */ EAPI Eina_Bool evas_cserve_config_get(Evas_Cserve_Config *config) EINA_WARN_UNUSED_RESULT; /** * Changes the configurations of the Evas image caching server. * * @param config A bitmap cache configuration handle with fields set * to desired configuration values. * @return @c EINA_TRUE if @p config was successfully applied, * @c EINA_FALSE otherwise. * * @see evas_cserve_config_get() * * @ingroup Evas_Cserve */ EAPI Eina_Bool evas_cserve_config_set(const Evas_Cserve_Config *config) EINA_WARN_UNUSED_RESULT; /** * Force the system to disconnect from the bitmap caching server. * * @ingroup Evas_Cserve */ EAPI void evas_cserve_disconnect(void); /** * @defgroup Evas_Utils General Utilities * * Some functions that are handy but are not specific of canvas or * objects. */ /** * Converts the given Evas image load error code into a string * describing it in english. * * @param error the error code, a value in ::Evas_Load_Error. * @return Always returns a valid string. If the given @p error is not * supported, "Unknown error" is returned. * * Mostly evas_object_image_file_set() would be the function setting * that error value afterwards, but also evas_object_image_load(), * evas_object_image_save(), evas_object_image_data_get(), * evas_object_image_data_convert(), evas_object_image_pixels_import() * and evas_object_image_is_inside(). This function is meant to be * used in conjunction with evas_object_image_load_error_get(), as in: * * Example code: * @dontinclude evas-images.c * @skip img1 = * @until ecore_main_loop_begin( * * Here, being @c valid_path the path to a valid image and @c * bogus_path a path to a file which does not exist, the two outputs * of evas_load_error_str() would be (if no other errors occur): * "No error on load" and "File (or file path) does * not exist", respectively. See the full @ref * Example_Evas_Images "example". * * @ingroup Evas_Utils */ EAPI const char *evas_load_error_str(Evas_Load_Error error); /* Evas utility routines for color space conversions */ /* hsv color space has h in the range 0.0 to 360.0, and s,v in the range 0.0 to 1.0 */ /* rgb color space has r,g,b in the range 0 to 255 */ /** * Convert a given color from HSV to RGB format. * * @param h The Hue component of the color. * @param s The Saturation component of the color. * @param v The Value component of the color. * @param r The Red component of the color. * @param g The Green component of the color. * @param b The Blue component of the color. * * This function converts a given color in HSV color format to RGB * color format. * * @ingroup Evas_Utils **/ EAPI void evas_color_hsv_to_rgb(float h, float s, float v, int *r, int *g, int *b); /** * Convert a given color from RGB to HSV format. * * @param r The Red component of the color. * @param g The Green component of the color. * @param b The Blue component of the color. * @param h The Hue component of the color. * @param s The Saturation component of the color. * @param v The Value component of the color. * * This function converts a given color in RGB color format to HSV * color format. * * @ingroup Evas_Utils **/ EAPI void evas_color_rgb_to_hsv(int r, int g, int b, float *h, float *s, float *v); /* argb color space has a,r,g,b in the range 0 to 255 */ /** * Pre-multiplies a rgb triplet by an alpha factor. * * @param a The alpha factor. * @param r The Red component of the color. * @param g The Green component of the color. * @param b The Blue component of the color. * * This function pre-multiplies a given rgb triplet by an alpha * factor. Alpha factor is used to define transparency. * * @ingroup Evas_Utils **/ EAPI void evas_color_argb_premul(int a, int *r, int *g, int *b); /** * Undo pre-multiplication of a rgb triplet by an alpha factor. * * @param a The alpha factor. * @param r The Red component of the color. * @param g The Green component of the color. * @param b The Blue component of the color. * * This function undoes pre-multiplication a given rbg triplet by an * alpha factor. Alpha factor is used to define transparency. * * @see evas_color_argb_premul(). * * @ingroup Evas_Utils **/ EAPI void evas_color_argb_unpremul(int a, int *r, int *g, int *b); /** * Pre-multiplies data by an alpha factor. * * @param data The data value. * @param len The length value. * * This function pre-multiplies a given data by an alpha * factor. Alpha factor is used to define transparency. * * @ingroup Evas_Utils **/ EAPI void evas_data_argb_premul(unsigned int *data, unsigned int len); /** * Undo pre-multiplication data by an alpha factor. * * @param data The data value. * @param len The length value. * * This function undoes pre-multiplication of a given data by an alpha * factor. Alpha factor is used to define transparency. * * @ingroup Evas_Utils **/ EAPI void evas_data_argb_unpremul(unsigned int *data, unsigned int len); /* string and font handling */ /** * Gets the next character in the string * * Given the UTF-8 string in @p str, and starting byte position in @p pos, * this function will place in @p decoded the decoded code point at @p pos * and return the byte index for the next character in the string. * * The only boundary check done is that @p pos must be >= 0. Other than that, * no checks are performed, so passing an index value that's not within the * length of the string will result in undefined behavior. * * @param str The UTF-8 string * @param pos The byte index where to start * @param decoded Address where to store the decoded code point. Optional. * * @return The byte index of the next character * * @ingroup Evas_Utils */ EAPI int evas_string_char_next_get(const char *str, int pos, int *decoded) EINA_ARG_NONNULL(1); /** * Gets the previous character in the string * * Given the UTF-8 string in @p str, and starting byte position in @p pos, * this function will place in @p decoded the decoded code point at @p pos * and return the byte index for the previous character in the string. * * The only boundary check done is that @p pos must be >= 1. Other than that, * no checks are performed, so passing an index value that's not within the * length of the string will result in undefined behavior. * * @param str The UTF-8 string * @param pos The byte index where to start * @param decoded Address where to store the decoded code point. Optional. * * @return The byte index of the previous character * * @ingroup Evas_Utils */ EAPI int evas_string_char_prev_get(const char *str, int pos, int *decoded) EINA_ARG_NONNULL(1); /** * Get the length in characters of the string. * @param str The string to get the length of. * @return The length in characters (not bytes) * @ingroup Evas_Utils */ EAPI int evas_string_char_len_get(const char *str) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * @defgroup Evas_Keys Key Input Functions * * Functions which feed key events to the canvas. * * As explained in @ref intro_not_evas, Evas is @b not aware of input * systems at all. Then, the user, if using it crudely (evas_new()), * will have to feed it with input events, so that it can react * somehow. If, however, the user creates a canvas by means of the * Ecore_Evas wrapper, it will automatically bind the chosen display * engine's input events to the canvas, for you. * * This group presents the functions dealing with the feeding of key * events to the canvas. On most of them, one has to reference a given * key by a name (keyname argument). Those are * platform dependent symbolic names for the keys. Sometimes * you'll get the right keyname by simply using an ASCII * value of the key name, but it won't be like that always. * * Typical platforms are Linux frame buffer (Ecore_FB) and X server * (Ecore_X) when using Evas with Ecore and Ecore_Evas. Please refer * to your display engine's documentation when using evas through an * Ecore helper wrapper when you need the keynames. * * Example: * @dontinclude evas-events.c * @skip mods = evas_key_modifier_get(evas); * @until { * * All the other @c evas_key functions behave on the same manner. See * the full @ref Example_Evas_Events "example". * * @ingroup Evas_Canvas */ /** * @addtogroup Evas_Keys * @{ */ /** * Returns a handle to the list of modifier keys registered in the * canvas @p e. This is required to check for which modifiers are set * at a given time with the evas_key_modifier_is_set() function. * * @param e The pointer to the Evas canvas * * @see evas_key_modifier_add * @see evas_key_modifier_del * @see evas_key_modifier_on * @see evas_key_modifier_off * @see evas_key_modifier_is_set * * @return An ::Evas_Modifier handle to query Evas' keys subsystem * with evas_key_modifier_is_set(), or @c NULL on error. */ EAPI const Evas_Modifier *evas_key_modifier_get(const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Returns a handle to the list of lock keys registered in the canvas * @p e. This is required to check for which locks are set at a given * time with the evas_key_lock_is_set() function. * * @param e The pointer to the Evas canvas * * @see evas_key_lock_add * @see evas_key_lock_del * @see evas_key_lock_on * @see evas_key_lock_off * @see evas_key_lock_is_set * * @return An ::Evas_Lock handle to query Evas' keys subsystem with * evas_key_lock_is_set(), or @c NULL on error. */ EAPI const Evas_Lock *evas_key_lock_get(const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Checks the state of a given modifier key, at the time of the * call. If the modifier is set, such as shift being pressed, this * function returns @c Eina_True. * * @param m The current modifiers set, as returned by * evas_key_modifier_get(). * @param keyname The name of the modifier key to check status for. * * @return @c Eina_True if the modifier key named @p keyname is on, @c * Eina_False otherwise. * * @see evas_key_modifier_add * @see evas_key_modifier_del * @see evas_key_modifier_get * @see evas_key_modifier_on * @see evas_key_modifier_off */ EAPI Eina_Bool evas_key_modifier_is_set(const Evas_Modifier *m, const char *keyname) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2); /** * Checks the state of a given lock key, at the time of the call. If * the lock is set, such as caps lock, this function returns @c * Eina_True. * * @param l The current locks set, as returned by evas_key_lock_get(). * @param keyname The name of the lock key to check status for. * * @return @c Eina_True if the @p keyname lock key is set, @c * Eina_False otherwise. * * @see evas_key_lock_get * @see evas_key_lock_add * @see evas_key_lock_del * @see evas_key_lock_on * @see evas_key_lock_off */ EAPI Eina_Bool evas_key_lock_is_set(const Evas_Lock *l, const char *keyname) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2); /** * Adds the @p keyname key to the current list of modifier keys. * * @param e The pointer to the Evas canvas * @param keyname The name of the modifier key to add to the list of * Evas modifiers. * * Modifiers are keys like shift, alt and ctrl, i.e., keys which are * meant to be pressed together with others, altering the behavior of * the secondly pressed keys somehow. Evas is so that these keys can * be user defined. * * This call allows custom modifiers to be added to the Evas system at * run time. It is then possible to set and unset modifier keys * programmatically for other parts of the program to check and act * on. Programmers using Evas would check for modifier keys on key * event callbacks using evas_key_modifier_is_set(). * * @see evas_key_modifier_del * @see evas_key_modifier_get * @see evas_key_modifier_on * @see evas_key_modifier_off * @see evas_key_modifier_is_set * * @note If the programmer instantiates the canvas by means of the * ecore_evas_new() family of helper functions, Ecore will take * care of registering on it all standard modifiers: "Shift", * "Control", "Alt", "Meta", "Hyper", "Super". */ EAPI void evas_key_modifier_add(Evas *e, const char *keyname) EINA_ARG_NONNULL(1, 2); /** * Removes the @p keyname key from the current list of modifier keys * on canvas @p e. * * @param e The pointer to the Evas canvas * @param keyname The name of the key to remove from the modifiers list. * * @see evas_key_modifier_add * @see evas_key_modifier_get * @see evas_key_modifier_on * @see evas_key_modifier_off * @see evas_key_modifier_is_set */ EAPI void evas_key_modifier_del(Evas *e, const char *keyname) EINA_ARG_NONNULL(1, 2); /** * Adds the @p keyname key to the current list of lock keys. * * @param e The pointer to the Evas canvas * @param keyname The name of the key to add to the locks list. * * Locks are keys like caps lock, num lock or scroll lock, i.e., keys * which are meant to be pressed once -- toggling a binary state which * is bound to it -- and thus altering the behavior of all * subsequently pressed keys somehow, depending on its state. Evas is * so that these keys can be defined by the user. * * This allows custom locks to be added to the evas system at run * time. It is then possible to set and unset lock keys * programmatically for other parts of the program to check and act * on. Programmers using Evas would check for lock keys on key event * callbacks using evas_key_lock_is_set(). * * @see evas_key_lock_get * @see evas_key_lock_del * @see evas_key_lock_on * @see evas_key_lock_off * @see evas_key_lock_is_set * * @note If the programmer instantiates the canvas by means of the * ecore_evas_new() family of helper functions, Ecore will take * care of registering on it all standard lock keys: "Caps_Lock", * "Num_Lock", "Scroll_Lock". */ EAPI void evas_key_lock_add(Evas *e, const char *keyname) EINA_ARG_NONNULL(1, 2); /** * Removes the @p keyname key from the current list of lock keys on * canvas @p e. * * @param e The pointer to the Evas canvas * @param keyname The name of the key to remove from the locks list. * * @see evas_key_lock_get * @see evas_key_lock_add * @see evas_key_lock_on * @see evas_key_lock_off */ EAPI void evas_key_lock_del(Evas *e, const char *keyname) EINA_ARG_NONNULL(1, 2); /** * Enables or turns on programmatically the modifier key with name @p * keyname. * * @param e The pointer to the Evas canvas * @param keyname The name of the modifier to enable. * * The effect will be as if the key was pressed for the whole time * between this call and a matching evas_key_modifier_off(). * * @see evas_key_modifier_add * @see evas_key_modifier_get * @see evas_key_modifier_off * @see evas_key_modifier_is_set */ EAPI void evas_key_modifier_on(Evas *e, const char *keyname) EINA_ARG_NONNULL(1, 2); /** * Disables or turns off programmatically the modifier key with name * @p keyname. * * @param e The pointer to the Evas canvas * @param keyname The name of the modifier to disable. * * @see evas_key_modifier_add * @see evas_key_modifier_get * @see evas_key_modifier_on * @see evas_key_modifier_is_set */ EAPI void evas_key_modifier_off(Evas *e, const char *keyname) EINA_ARG_NONNULL(1, 2); /** * Enables or turns on programmatically the lock key with name @p * keyname. * * @param e The pointer to the Evas canvas * @param keyname The name of the lock to enable. * * The effect will be as if the key was put on its active state after * this call. * * @see evas_key_lock_get * @see evas_key_lock_add * @see evas_key_lock_del * @see evas_key_lock_off */ EAPI void evas_key_lock_on(Evas *e, const char *keyname) EINA_ARG_NONNULL(1, 2); /** * Disables or turns off programmatically the lock key with name @p * keyname. * * @param e The pointer to the Evas canvas * @param keyname The name of the lock to disable. * * The effect will be as if the key was put on its inactive state * after this call. * * @see evas_key_lock_get * @see evas_key_lock_add * @see evas_key_lock_del * @see evas_key_lock_on */ EAPI void evas_key_lock_off(Evas *e, const char *keyname) EINA_ARG_NONNULL(1, 2); /** * Creates a bit mask from the @p keyname @b modifier key. Values * returned from different calls to it may be ORed together, * naturally. * * @param e The canvas whom to query the bit mask from. * @param keyname The name of the modifier key to create the mask for. * * @returns the bit mask or 0 if the @p keyname key wasn't registered as a * modifier for canvas @p e. * * This function is meant to be using in conjunction with * evas_object_key_grab()/evas_object_key_ungrab(). Go check their * documentation for more information. * * @see evas_key_modifier_add * @see evas_key_modifier_get * @see evas_key_modifier_on * @see evas_key_modifier_off * @see evas_key_modifier_is_set * @see evas_object_key_grab * @see evas_object_key_ungrab */ EAPI Evas_Modifier_Mask evas_key_modifier_mask_get(const Evas *e, const char *keyname) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2); /** * Requests @p keyname key events be directed to @p obj. * * @param obj the object to direct @p keyname events to. * @param keyname the key to request events for. * @param modifiers a mask of modifiers that must be present to * trigger the event. * @param not_modifiers a mask of modifiers that must @b not be present * to trigger the event. * @param exclusive request that the @p obj is the only object * receiving the @p keyname events. * @return @c EINA_TRUE, if the call succeeded, @c EINA_FALSE otherwise. * * Key grabs allow one or more objects to receive key events for * specific key strokes even if other objects have focus. Whenever a * key is grabbed, only the objects grabbing it will get the events * for the given keys. * * @p keyname is a platform dependent symbolic name for the key * pressed (see @ref Evas_Keys for more information). * * @p modifiers and @p not_modifiers are bit masks of all the * modifiers that must and mustn't, respectively, be pressed along * with @p keyname key in order to trigger this new key * grab. Modifiers can be things such as Shift and Ctrl as well as * user defined types via evas_key_modifier_add(). Retrieve them with * evas_key_modifier_mask_get() or use @c 0 for empty masks. * * @p exclusive will make the given object the only one permitted to * grab the given key. If given @c EINA_TRUE, subsequent calls on this * function with different @p obj arguments will fail, unless the key * is ungrabbed again. * * Example code follows. * @dontinclude evas-events.c * @skip if (d.focus) * @until else * * See the full example @ref Example_Evas_Events "here". * * @warning Providing impossible modifier sets creates undefined behavior * * @see evas_object_key_ungrab * @see evas_object_focus_set * @see evas_object_focus_get * @see evas_focus_get * @see evas_key_modifier_add */ EAPI Eina_Bool evas_object_key_grab(Evas_Object *obj, const char *keyname, Evas_Modifier_Mask modifiers, Evas_Modifier_Mask not_modifiers, Eina_Bool exclusive) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2); /** * Removes the grab on @p keyname key events by @p obj. * * @param obj the object that has an existing key grab. * @param keyname the key the grab is set for. * @param modifiers a mask of modifiers that must be present to * trigger the event. * @param not_modifiers a mask of modifiers that must not not be * present to trigger the event. * * Removes a key grab on @p obj if @p keyname, @p modifiers, and @p * not_modifiers match. * * Example code follows. * @dontinclude evas-events.c * @skip got here by key grabs * @until } * * See the full example @ref Example_Evas_Events "here". * * @see evas_object_key_grab * @see evas_object_focus_set * @see evas_object_focus_get * @see evas_focus_get */ EAPI void evas_object_key_ungrab(Evas_Object *obj, const char *keyname, Evas_Modifier_Mask modifiers, Evas_Modifier_Mask not_modifiers) EINA_ARG_NONNULL(1, 2); /** * @} */ /** * @defgroup Evas_Touch_Point_List Touch Point List Functions * * Functions to get information of touched points in the Evas. * * Evas maintains list of touched points on the canvas. Each point has * its co-ordinates, id and state. You can get the number of touched * points and information of each point using evas_touch_point_list * functions. * * @ingroup Evas_Canvas */ /** * @addtogroup Evas_Touch_Point_List * @{ */ /** * Get the number of touched point in the evas. * * @param e The pointer to the Evas canvas. * @return The number of touched point on the evas. * * New touched point is added to the list whenever touching the evas * and point is removed whenever removing touched point from the evas. * * Example: * @code * extern Evas *evas; * int count; * * count = evas_touch_point_list_count(evas); * printf("The count of touch points: %i\n", count); * @endcode * * @see evas_touch_point_list_nth_xy_get() * @see evas_touch_point_list_nth_id_get() * @see evas_touch_point_list_nth_state_get() */ EAPI unsigned int evas_touch_point_list_count(Evas *e) EINA_ARG_NONNULL(1); /** * This function returns the nth touch point's co-ordinates. * * @param e The pointer to the Evas canvas. * @param n The number of the touched point (0 being the first). * @param x The pointer to a Evas_Coord to be filled in. * @param y The pointer to a Evas_Coord to be filled in. * * Touch point's co-ordinates is updated whenever moving that point * on the canvas. * * Example: * @code * extern Evas *evas; * Evas_Coord x, y; * * if (evas_touch_point_list_count(evas)) * { * evas_touch_point_nth_xy_get(evas, 0, &x, &y); * printf("The first touch point's co-ordinate: (%i, %i)\n", x, y); * } * @endcode * * @see evas_touch_point_list_count() * @see evas_touch_point_list_nth_id_get() * @see evas_touch_point_list_nth_state_get() */ EAPI void evas_touch_point_list_nth_xy_get(Evas *e, unsigned int n, Evas_Coord *x, Evas_Coord *y) EINA_ARG_NONNULL(1); /** * This function returns the @p id of nth touch point. * * @param e The pointer to the Evas canvas. * @param n The number of the touched point (0 being the first). * @return id of nth touch point, if the call succeeded, -1 otherwise. * * The point which comes from Mouse Event has @p id 0 and The point * which comes from Multi Event has @p id that is same as Multi * Event's device id. * * Example: * @code * extern Evas *evas; * int id; * * if (evas_touch_point_list_count(evas)) * { * id = evas_touch_point_nth_id_get(evas, 0); * printf("The first touch point's id: %i\n", id); * } * @endcode * * @see evas_touch_point_list_count() * @see evas_touch_point_list_nth_xy_get() * @see evas_touch_point_list_nth_state_get() */ EAPI int evas_touch_point_list_nth_id_get(Evas *e, unsigned int n) EINA_ARG_NONNULL(1); /** * This function returns the @p state of nth touch point. * * @param e The pointer to the Evas canvas. * @param n The number of the touched point (0 being the first). * @return @p state of nth touch point, if the call succeeded, * EVAS_TOUCH_POINT_CANCEL otherwise. * * The point's @p state is EVAS_TOUCH_POINT_DOWN when pressed, * EVAS_TOUCH_POINT_STILL when the point is not moved after pressed, * EVAS_TOUCH_POINT_MOVE when moved at least once after pressed and * EVAS_TOUCH_POINT_UP when released. * * Example: * @code * extern Evas *evas; * Evas_Touch_Point_State state; * * if (evas_touch_point_list_count(evas)) * { * state = evas_touch_point_nth_state_get(evas, 0); * printf("The first touch point's state: %i\n", state); * } * @endcode * * @see evas_touch_point_list_count() * @see evas_touch_point_list_nth_xy_get() * @see evas_touch_point_list_nth_id_get() */ EAPI Evas_Touch_Point_State evas_touch_point_list_nth_state_get(Evas *e, unsigned int n) EINA_ARG_NONNULL(1); /** * @} */ #ifdef __cplusplus } #endif #endif evas-1.7.9/src/lib/Evas_GL.h0000664000175000017500000017663112175475547012436 00000000000000#ifndef _EVAS_GL_H #define _EVAS_GL_H #include //#include #ifdef __cplusplus extern "C" { #endif /** * @defgroup Evas_GL Rendering GL on Evas * * Functions that are used to do OpenGL rendering on Evas. Evas allows you * to use OpenGL to render to specially set up image objects (which act as * render target surfaces). * * Below is an illlustrative example of how to use OpenGL to render to an * object in Evas. * * @code // Simple Evas_GL example #include #include #include #include // GL related data here.. typedef struct _GLData { Evas_GL_Context *ctx; Evas_GL_Surface *sfc; Evas_GL_Config *cfg; Evas_GL *evasgl; Evas_GL_API *glapi; GLuint program; GLuint vtx_shader; GLuint fgmt_shader; Eina_Bool initialized : 1; } GLData; // callbacks we want to handle deletion on the object and updates/draws static void on_del (void *data, Evas *e, Evas_Object *obj, void *event_info); static void on_pixels (void *data, Evas_Object *obj); // demo - animator just to keep ticking over saying to draw the image static Eina_Bool on_animate (void *data); // gl stuff static int init_shaders (GLData *gld); static GLuint load_shader (GLData *gld, GLenum type, const char *shader_src); int main(int argc, char **argv) { // a size by default int w = 256, h = 256; // some variables we will use Ecore_Evas *ee; Evas *canvas; Evas_Object *r1; Evas_Native_Surface ns; GLData *gld = NULL; // regular low-leve EFL (ecore+ecore-evas) init. elm is simpler ecore_init(); ecore_evas_init(); ee = ecore_evas_gl_x11_new(NULL, 0, 0, 0, 512, 512); ecore_evas_title_set(ee, "Ecore_Evas Template"); canvas = ecore_evas_get(ee); // alloc a data struct to hold our relevant gl info in if (!(gld = calloc(1, sizeof(GLData)))) return 0; //-//-//-// THIS IS WHERE GL INIT STUFF HAPPENS (ALA EGL) //-// // get the evas gl handle for doing gl things gld->evasgl = evas_gl_new(canvas); gld->glapi = evas_gl_api_get(gld->evasgl); // Set a surface config gld->cfg = evas_gl_config_new(); gld->cfg->color_format = EVAS_GL_RGBA_8888; //gld->cfg->depth_bits = EVAS_GL_DEPTH_NONE; // Othe config options //gld->cfg->stencil_bits = EVAS_GL_STENCIL_NONE; //gld->cfg->options_bits = EVAS_GL_OPTIONS_NONE; // create a surface and context gld->sfc = evas_gl_surface_create(gld->evasgl, gld->cfg, w, h); gld->ctx = evas_gl_context_create(gld->evasgl, NULL); //-// //-//-//-// END GL INIT BLOB // set up the image object. a filled one by default r1 = evas_object_image_filled_add(canvas); // attach important data we need to the object using key names. this just // avoids some global variables and means we can do nice cleanup. you can // avoid this if you are lazy evas_object_data_set(r1, "..gld", gld); // when the object is deleted - call the on_del callback. like the above, // this is just being clean evas_object_event_callback_add(r1, EVAS_CALLBACK_DEL, on_del, NULL); // set up an actual pixel size fot the buffer data. it may be different // to the output size. any windowing system has something like this, just // evas has 2 sizes, a pixel size and the output object size evas_object_image_size_set(r1, w, h); // set up the native surface info to use the context and surface created // above //-//-//-// THIS IS WHERE GL INIT STUFF HAPPENS (ALA EGL) //-// evas_gl_native_surface_get(gld->evasgl, gld->sfc, &ns); evas_object_image_native_surface_set(r1, &ns); evas_object_image_pixels_get_callback_set(r1, on_pixels, r1); //-// //-//-//-// END GL INIT BLOB // move the image object somewhere, resize it and show it. any windowing // system would need this kind of thing - place a child "window" evas_object_move(r1, 128, 128); evas_object_resize(r1, w, h); evas_object_show(r1); // animating - just a demo. as long as you trigger an update on the image // object via evas_object_image_pixels_dirty_set(). any display system, // mainloop siztem etc. will have something of this kind unless it's making // you spin infinitely yourself and invent your own animation mechanism // // NOTE: if you delete r1, this animator will keep running trying to access // r1 so you'd better delete this animator with ecore_animator_del() or // structure how you do animation differently. you can also attach it like // evasgl, sfc, etc. etc. if this animator is specific to this object // only and delete it in the del handler for the obj. ecore_animator_add(on_animate, r1); // finally show the window for the world to see. windowing system generic ecore_evas_show(ee); // begin the mainloop and tick over the animator, handle events etc. // also windowing system generic ecore_main_loop_begin(); // standard EFL shutdown stuff - generic for most systems, EFL or not ecore_evas_shutdown(); ecore_shutdown(); return 0; } static void on_del(void *data, Evas *e, Evas_Object *obj, void *event_info) { // on delete of our object clean up some things that don't get auto // celeted for us as they are not intrinsically bound to the image // object as such (you could use the same context and surface across // multiple image objects and re-use the evasgl handle too multiple times. // here we bind them to 1 object only though by doing this. GLData *gld = evas_object_data_get(obj, "..gld"); if (!gld) return; Evas_GL_API *gl = gld->glapi; evas_object_data_del(obj, "..gld"); // Do a make_current before deleting all the GL stuff. evas_gl_make_current(gld->evasgl, gld->sfc, gld->ctx); gl->glDeleteShader(gld->vtx_shader); gl->glDeleteShader(gld->fgmt_shader); gl->glDeleteProgram(gld->program); evas_gl_surface_destroy(gld->evasgl, gld->sfc); evas_gl_context_destroy(gld->evasgl, gld->ctx); evas_gl_config_free(gld->cfg); evas_gl_free(gld->evasgl); free(gld); } static void on_pixels(void *data, Evas_Object *obj) { // get some variable we need from the object data keys GLData *gld = evas_object_data_get(obj, "..gld"); if (!gld) return; Evas_GL_API *gl = gld->glapi; GLfloat vVertices[] = { 0.0f, 0.5f, 0.0f, -0.5f, -0.5f, 0.0f, 0.5f, -0.5f, 0.0f }; int w, h; // get the image size in case it changed with evas_object_image_size_set() evas_object_image_size_get(obj, &w, &h); // set up the context and surface as the current one evas_gl_make_current(gld->evasgl, gld->sfc, gld->ctx); if (!gld->initialized) { if (!init_shaders(gld)) printf("Error Initializing Shaders\n"); gld->initialized = EINA_TRUE; } // GL Viewport stuff. you can avoid doing this if viewport is all the // same as last frame if you want gl->glViewport(0, 0, w, h); // Clear the buffer gl->glClearColor(1.0, 0.0, 0.0, 1); gl->glClear(GL_COLOR_BUFFER_BIT); // Draw a Triangle gl->glEnable(GL_BLEND); gl->glUseProgram(gld->program); gl->glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, 0, vVertices); gl->glEnableVertexAttribArray(0); gl->glDrawArrays(GL_TRIANGLES, 0, 3); // Optional - Flush the GL pipeline gl->glFlush(); } static Eina_Bool on_animate(void *data) { // just a demo - animate here whenever an animation tick happens and then // mark the image as "dirty" meaning it needs an update next time evas // renders. it will call the pixel get callback then. evas_object_image_pixels_dirty_set(data, EINA_TRUE); return EINA_TRUE; // keep looping } static GLuint load_shader(GLData *gld, GLenum type, const char *shader_src) { Evas_GL_API *gl = gld->glapi; GLuint shader; GLint compiled = 0; // Create the shader object if (!(shader = gl->glCreateShader(type))) return 0; gl->glShaderSource(shader, 1, &shader_src, NULL); // Compile the shader gl->glCompileShader(shader); gl->glGetShaderiv(shader, GL_COMPILE_STATUS, &compiled); if (!compiled) { GLint len = 0; gl->glGetShaderiv(shader, GL_INFO_LOG_LENGTH, &len); if (len > 1) { char *info = malloc(sizeof(char) * len); if (info) { gl->glGetShaderInfoLog(shader, len, NULL, info); printf("Error compiling shader:\n" "%s\n", info); free(info); } } gl->glDeleteShader(shader); return 0; } return shader; } // Initialize the shader and program object static int init_shaders(GLData *gld) { Evas_GL_API *gl = gld->glapi; const char vShaderStr[] = "attribute vec4 vPosition; \n" "void main() \n" "{ \n" " gl_Position = vPosition; \n" "} \n"; const char fShaderStr[] = "precision mediump float; \n" "void main() \n" "{ \n" " gl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );\n" "} \n"; GLint linked = 0; // Load the vertex/fragment shaders gld->vtx_shader = load_shader(gld, GL_VERTEX_SHADER, vShaderStr); gld->fgmt_shader = load_shader(gld, GL_FRAGMENT_SHADER, fShaderStr); // Create the program object if (!(gld->program = gl->glCreateProgram())) return 0; gl->glAttachShader(gld->program, gld->vtx_shader); gl->glAttachShader(gld->program, gld->fgmt_shader); // Bind vPosition to attribute 0 gl->glBindAttribLocation(gld->program, 0, "vPosition"); // Link the program gl->glLinkProgram(gld->program); gl->glGetProgramiv(gld->program, GL_LINK_STATUS, &linked); if (!linked) { GLint len = 0; gl->glGetProgramiv(gld->program, GL_INFO_LOG_LENGTH, &len); if (len > 1) { char *info = malloc(sizeof(char) * len); if (info) { gl->glGetProgramInfoLog(gld->program, len, NULL, info); printf("Error linking program:\n" "%s\n", info); free(info); } } gl->glDeleteProgram(gld->program); return 0; } return 1; } * @endcode * * @ingroup Evas_Canvas */ /** * @addtogroup Evas_GL * @{ */ /** * @typedef Evas_GL * * Evas GL Object for rendering gl in Evas. */ typedef struct _Evas_GL Evas_GL; /** * @typedef Evas_GL_Surface * * Evas GL Surface object, a GL rendering target in Evas GL. */ typedef struct _Evas_GL_Surface Evas_GL_Surface; /** * @typedef Evas_GL_Context * * Evas GL Context object, a GL rendering context in Evas GL. */ typedef struct _Evas_GL_Context Evas_GL_Context; /** * @typedef Evas_GL_Config * * Evas GL Surface configuration object for surface creation. */ typedef struct _Evas_GL_Config Evas_GL_Config; /** * @typedef Evas_GL_API * * Evas GL API object that contains the GL APIs to be used in Evas GL. */ typedef struct _Evas_GL_API Evas_GL_API; /** * @typedef Evas_GL_Func * * Evas GL Function Object used as a function pointer. */ typedef void *Evas_GL_Func; /** * @typedef EvasGLImage * * Evas GL Image Object used in Evas GL Image extension. */ typedef void *EvasGLImage; /** * Surface Color Format */ typedef enum _Evas_GL_Color_Format { EVAS_GL_RGB_888 = 0, EVAS_GL_RGBA_8888 = 1 } Evas_GL_Color_Format; /** * Surface Depth Format */ typedef enum _Evas_GL_Depth_Bits { EVAS_GL_DEPTH_NONE = 0, EVAS_GL_DEPTH_BIT_8 = 1, EVAS_GL_DEPTH_BIT_16 = 2, EVAS_GL_DEPTH_BIT_24 = 3, EVAS_GL_DEPTH_BIT_32 = 4 } Evas_GL_Depth_Bits; /** * Surface Stencil Format */ typedef enum _Evas_GL_Stencil_Bits { EVAS_GL_STENCIL_NONE = 0, EVAS_GL_STENCIL_BIT_1 = 1, EVAS_GL_STENCIL_BIT_2 = 2, EVAS_GL_STENCIL_BIT_4 = 3, EVAS_GL_STENCIL_BIT_8 = 4, EVAS_GL_STENCIL_BIT_16 = 5 } Evas_GL_Stencil_Bits; /** * Configuration Options. * * @since 1.1 */ typedef enum _Evas_GL_Options_Bits { EVAS_GL_OPTIONS_NONE = 0, /**< No extra options */ EVAS_GL_OPTIONS_DIRECT = (1<<0) /**< Optional hint to allow rendering directly to evas' window when possible */ } Evas_GL_Options_Bits; /** * Configuration Option for Multisample Anti-aliased (MSAA) rendering surface. * Only works in supported device. * * @since 1.2 */ typedef enum _Evas_GL_Multisample_Bits { EVAS_GL_MULTISAMPLE_NONE = 0, /**< No multisample rendering */ EVAS_GL_MULTISAMPLE_LOW = 1, /**< MSAA with mininum number of samples */ EVAS_GL_MULTISAMPLE_MED = 2, /**< MSAA with half the number of max samples */ EVAS_GL_MULTISAMPLE_HIGH = 3 /**< MSAA with maximum allowed samples */ } Evas_GL_Multisample_Bits; /** * @struct _Evas_GL_Config * * Evas GL Surface configuration */ struct _Evas_GL_Config { Evas_GL_Color_Format color_format; /**< Surface Color Format */ Evas_GL_Depth_Bits depth_bits; /**< Surface Depth Bits */ Evas_GL_Stencil_Bits stencil_bits; /**< Surface Stencil Bits */ Evas_GL_Options_Bits options_bits; /**< Extra Surface Options */ Evas_GL_Multisample_Bits multisample_bits; /**< Optional Surface MSAA Bits */ }; #define EVAS_GL_EXTENSIONS 1 /** * Creates a new Evas_GL object and returns a handle for gl rendering on efl. * * @param e The given evas canvas OpenGL is to be used on. * @return The created evas_gl object, or NULl on fasilure. */ EAPI Evas_GL *evas_gl_new (Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Frees the created Evas_GL object. * * @param evas_gl The given Evas_GL object. */ EAPI void evas_gl_free (Evas_GL *evas_gl) EINA_ARG_NONNULL(1); /** * Allocates a new config object for the user to fill out. * * As long as the Evas creates a config object for the user, it takes care * of the backward compatibility issue. */ EAPI Evas_GL_Config *evas_gl_config_new (void); /** * Frees a config object created from evas_gl_config_new. * * As long as the Evas creates a config object for the user, it takes care * of the backward compatibility issue. */ EAPI void evas_gl_config_free (Evas_GL_Config *cfg) EINA_ARG_NONNULL(1); /** * Creates and returns new Evas_GL_Surface object for GL Rendering. * * @param evas_gl The given Evas_GL object. * @param cfg The pixel format and configuration of the rendering surface. * @param w The width of the surface. * @param h The height of the surface. * @return The created GL surface object, or NULL on failure. */ EAPI Evas_GL_Surface *evas_gl_surface_create (Evas_GL *evas_gl, Evas_GL_Config *cfg, int w, int h) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1,2); /** * Destroys the created Evas GL Surface. * * @param evas_gl The given Evas_GL object. * @param surf The given GL surface object. */ EAPI void evas_gl_surface_destroy (Evas_GL *evas_gl, Evas_GL_Surface *surf) EINA_ARG_NONNULL(1,2); /** * Creates and returns a new Evas GL context object * * @param evas_gl The given Evas_GL object. * @return The created context, or NULL on failure. */ EAPI Evas_GL_Context *evas_gl_context_create (Evas_GL *evas_gl, Evas_GL_Context *share_ctx) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1); /** * Destroys the given Evas GL context object * * @param evas_gl The given Evas_GL object. * @param ctx The given Evas GL context. */ EAPI void evas_gl_context_destroy (Evas_GL *evas_gl, Evas_GL_Context *ctx) EINA_ARG_NONNULL(1,2); /** * Sets the given context as a current context for the given surface * * @param evas_gl The given Evas_GL object. * @param surf The given Evas GL surface. * @param ctx The given Evas GL context. * @return @c EINA_TRUE if successful, @c EINA_FALSE if not. */ EAPI Eina_Bool evas_gl_make_current (Evas_GL *evas_gl, Evas_GL_Surface *surf, Evas_GL_Context *ctx) EINA_ARG_NONNULL(1,2); /** * Returns a pointer to a static, zero-terminated string describing some aspect of evas_gl. * * @param evas_gl The given Evas_GL object. * @param name Specifies a symbolic constant, one of EVAS_GL_EXTENSIONS... */ EAPI const char *evas_gl_string_query (Evas_GL *evas_gl, int name) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE; /** * Returns a GL or the Glue Layer's extension function. * * @param evas_gl The given Evas_GL object. * @param name The name of the function to return. */ EAPI Evas_GL_Func evas_gl_proc_address_get (Evas_GL *evas_gl, const char *name) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1,2) EINA_PURE; /** * Fills in the Native Surface information from the given Evas GL surface. * * @param evas_gl The given Evas_GL object. * @param surf The given Evas GL surface to retrieve the Native Surface info from. * @param ns The native surface structure that the function fills in. * @return @c EINA_TRUE if successful, @c EINA_FALSE if not. */ EAPI Eina_Bool evas_gl_native_surface_get (Evas_GL *evas_gl, Evas_GL_Surface *surf, Evas_Native_Surface *ns) EINA_ARG_NONNULL(1,2,3); /** * Get the API for rendering using OpenGL * * @param evas_gl The given Eva_GL object. * @return The API to use. * * This returns a structure that contains all the OpenGL functions you can * use to render in Evas. These functions consist of all the standard * OpenGL-ES2.0 functions and any extra ones Evas has decided to provide in * addition. This means that if you have your code ported to OpenGL-ES2.0, * it will be easy to render to Evas. * */ EAPI Evas_GL_API *evas_gl_api_get (Evas_GL *evas_gl) EINA_ARG_NONNULL(1); #if !defined(__gl_h_) && !defined(__gl2_h_) # define __gl_h_ # define __gl2_h_ /* * This document is licensed under the SGI Free Software B License Version * 2.0. For details, see http://oss.sgi.com/projects/FreeB/ . */ /*------------------------------------------------------------------------- * Data type definitions *-----------------------------------------------------------------------*/ typedef void GLvoid; typedef unsigned int GLenum; typedef unsigned char GLboolean; typedef unsigned int GLbitfield; typedef signed char GLbyte; // Changed khronos_int8_t typedef short GLshort; typedef int GLint; typedef int GLsizei; typedef unsigned char GLubyte; // Changed khronos_uint8_t typedef unsigned short GLushort; typedef unsigned int GLuint; typedef float GLfloat; // Changed khronos_float_t typedef float GLclampf; // Changed khronos_float_t typedef signed int GLfixed; // Changed khronos_int32_t /* GL types for handling large vertex buffer objects */ typedef signed long int GLintptr; // Changed khronos_intptr_t typedef signed long int GLsizeiptr; // Changed khronos_ssize_t //#if (!defined(__gl2_h_) && !defined(__gl_h_)) /* OpenGL ES core versions */ //#define GL_ES_VERSION_2_0 1 /* ClearBufferMask */ #define GL_DEPTH_BUFFER_BIT 0x00000100 #define GL_STENCIL_BUFFER_BIT 0x00000400 #define GL_COLOR_BUFFER_BIT 0x00004000 /* Boolean */ #define GL_FALSE 0 #define GL_TRUE 1 /* BeginMode */ #define GL_POINTS 0x0000 #define GL_LINES 0x0001 #define GL_LINE_LOOP 0x0002 #define GL_LINE_STRIP 0x0003 #define GL_TRIANGLES 0x0004 #define GL_TRIANGLE_STRIP 0x0005 #define GL_TRIANGLE_FAN 0x0006 /* AlphaFunction (not supported in ES20) */ /* GL_NEVER */ /* GL_LESS */ /* GL_EQUAL */ /* GL_LEQUAL */ /* GL_GREATER */ /* GL_NOTEQUAL */ /* GL_GEQUAL */ /* GL_ALWAYS */ /* BlendingFactorDest */ #define GL_ZERO 0 #define GL_ONE 1 #define GL_SRC_COLOR 0x0300 #define GL_ONE_MINUS_SRC_COLOR 0x0301 #define GL_SRC_ALPHA 0x0302 #define GL_ONE_MINUS_SRC_ALPHA 0x0303 #define GL_DST_ALPHA 0x0304 #define GL_ONE_MINUS_DST_ALPHA 0x0305 /* BlendingFactorSrc */ /* GL_ZERO */ /* GL_ONE */ #define GL_DST_COLOR 0x0306 #define GL_ONE_MINUS_DST_COLOR 0x0307 #define GL_SRC_ALPHA_SATURATE 0x0308 /* GL_SRC_ALPHA */ /* GL_ONE_MINUS_SRC_ALPHA */ /* GL_DST_ALPHA */ /* GL_ONE_MINUS_DST_ALPHA */ /* BlendEquationSeparate */ #define GL_FUNC_ADD 0x8006 #define GL_BLEND_EQUATION 0x8009 #define GL_BLEND_EQUATION_RGB 0x8009 /* same as BLEND_EQUATION */ #define GL_BLEND_EQUATION_ALPHA 0x883D /* BlendSubtract */ #define GL_FUNC_SUBTRACT 0x800A #define GL_FUNC_REVERSE_SUBTRACT 0x800B /* Separate Blend Functions */ #define GL_BLEND_DST_RGB 0x80C8 #define GL_BLEND_SRC_RGB 0x80C9 #define GL_BLEND_DST_ALPHA 0x80CA #define GL_BLEND_SRC_ALPHA 0x80CB #define GL_CONSTANT_COLOR 0x8001 #define GL_ONE_MINUS_CONSTANT_COLOR 0x8002 #define GL_CONSTANT_ALPHA 0x8003 #define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004 #define GL_BLEND_COLOR 0x8005 /* Buffer Objects */ #define GL_ARRAY_BUFFER 0x8892 #define GL_ELEMENT_ARRAY_BUFFER 0x8893 #define GL_ARRAY_BUFFER_BINDING 0x8894 #define GL_ELEMENT_ARRAY_BUFFER_BINDING 0x8895 #define GL_STREAM_DRAW 0x88E0 #define GL_STATIC_DRAW 0x88E4 #define GL_DYNAMIC_DRAW 0x88E8 #define GL_BUFFER_SIZE 0x8764 #define GL_BUFFER_USAGE 0x8765 #define GL_CURRENT_VERTEX_ATTRIB 0x8626 /* CullFaceMode */ #define GL_FRONT 0x0404 #define GL_BACK 0x0405 #define GL_FRONT_AND_BACK 0x0408 /* DepthFunction */ /* GL_NEVER */ /* GL_LESS */ /* GL_EQUAL */ /* GL_LEQUAL */ /* GL_GREATER */ /* GL_NOTEQUAL */ /* GL_GEQUAL */ /* GL_ALWAYS */ /* EnableCap */ #define GL_TEXTURE_2D 0x0DE1 #define GL_CULL_FACE 0x0B44 #define GL_BLEND 0x0BE2 #define GL_DITHER 0x0BD0 #define GL_STENCIL_TEST 0x0B90 #define GL_DEPTH_TEST 0x0B71 #define GL_SCISSOR_TEST 0x0C11 #define GL_POLYGON_OFFSET_FILL 0x8037 #define GL_SAMPLE_ALPHA_TO_COVERAGE 0x809E #define GL_SAMPLE_COVERAGE 0x80A0 /* ErrorCode */ #define GL_NO_ERROR 0 #define GL_INVALID_ENUM 0x0500 #define GL_INVALID_VALUE 0x0501 #define GL_INVALID_OPERATION 0x0502 #define GL_OUT_OF_MEMORY 0x0505 /* FrontFaceDirection */ #define GL_CW 0x0900 #define GL_CCW 0x0901 /* GetPName */ #define GL_LINE_WIDTH 0x0B21 #define GL_ALIASED_POINT_SIZE_RANGE 0x846D #define GL_ALIASED_LINE_WIDTH_RANGE 0x846E #define GL_CULL_FACE_MODE 0x0B45 #define GL_FRONT_FACE 0x0B46 #define GL_DEPTH_RANGE 0x0B70 #define GL_DEPTH_WRITEMASK 0x0B72 #define GL_DEPTH_CLEAR_VALUE 0x0B73 #define GL_DEPTH_FUNC 0x0B74 #define GL_STENCIL_CLEAR_VALUE 0x0B91 #define GL_STENCIL_FUNC 0x0B92 #define GL_STENCIL_FAIL 0x0B94 #define GL_STENCIL_PASS_DEPTH_FAIL 0x0B95 #define GL_STENCIL_PASS_DEPTH_PASS 0x0B96 #define GL_STENCIL_REF 0x0B97 #define GL_STENCIL_VALUE_MASK 0x0B93 #define GL_STENCIL_WRITEMASK 0x0B98 #define GL_STENCIL_BACK_FUNC 0x8800 #define GL_STENCIL_BACK_FAIL 0x8801 #define GL_STENCIL_BACK_PASS_DEPTH_FAIL 0x8802 #define GL_STENCIL_BACK_PASS_DEPTH_PASS 0x8803 #define GL_STENCIL_BACK_REF 0x8CA3 #define GL_STENCIL_BACK_VALUE_MASK 0x8CA4 #define GL_STENCIL_BACK_WRITEMASK 0x8CA5 #define GL_VIEWPORT 0x0BA2 #define GL_SCISSOR_BOX 0x0C10 /* GL_SCISSOR_TEST */ #define GL_COLOR_CLEAR_VALUE 0x0C22 #define GL_COLOR_WRITEMASK 0x0C23 #define GL_UNPACK_ALIGNMENT 0x0CF5 #define GL_PACK_ALIGNMENT 0x0D05 #define GL_MAX_TEXTURE_SIZE 0x0D33 #define GL_MAX_VIEWPORT_DIMS 0x0D3A #define GL_SUBPIXEL_BITS 0x0D50 #define GL_RED_BITS 0x0D52 #define GL_GREEN_BITS 0x0D53 #define GL_BLUE_BITS 0x0D54 #define GL_ALPHA_BITS 0x0D55 #define GL_DEPTH_BITS 0x0D56 #define GL_STENCIL_BITS 0x0D57 #define GL_POLYGON_OFFSET_UNITS 0x2A00 /* GL_POLYGON_OFFSET_FILL */ #define GL_POLYGON_OFFSET_FACTOR 0x8038 #define GL_TEXTURE_BINDING_2D 0x8069 #define GL_SAMPLE_BUFFERS 0x80A8 #define GL_SAMPLES 0x80A9 #define GL_SAMPLE_COVERAGE_VALUE 0x80AA #define GL_SAMPLE_COVERAGE_INVERT 0x80AB /* GetTextureParameter */ /* GL_TEXTURE_MAG_FILTER */ /* GL_TEXTURE_MIN_FILTER */ /* GL_TEXTURE_WRAP_S */ /* GL_TEXTURE_WRAP_T */ #define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2 #define GL_COMPRESSED_TEXTURE_FORMATS 0x86A3 /* HintMode */ #define GL_DONT_CARE 0x1100 #define GL_FASTEST 0x1101 #define GL_NICEST 0x1102 /* HintTarget */ #define GL_GENERATE_MIPMAP_HINT 0x8192 /* DataType */ #define GL_BYTE 0x1400 #define GL_UNSIGNED_BYTE 0x1401 #define GL_SHORT 0x1402 #define GL_UNSIGNED_SHORT 0x1403 #define GL_INT 0x1404 #define GL_UNSIGNED_INT 0x1405 #define GL_FLOAT 0x1406 #define GL_FIXED 0x140C /* PixelFormat */ #define GL_DEPTH_COMPONENT 0x1902 #define GL_ALPHA 0x1906 #define GL_RGB 0x1907 #define GL_RGBA 0x1908 #define GL_LUMINANCE 0x1909 #define GL_LUMINANCE_ALPHA 0x190A /* PixelType */ /* GL_UNSIGNED_BYTE */ #define GL_UNSIGNED_SHORT_4_4_4_4 0x8033 #define GL_UNSIGNED_SHORT_5_5_5_1 0x8034 #define GL_UNSIGNED_SHORT_5_6_5 0x8363 /* Shaders */ #define GL_FRAGMENT_SHADER 0x8B30 #define GL_VERTEX_SHADER 0x8B31 #define GL_MAX_VERTEX_ATTRIBS 0x8869 #define GL_MAX_VERTEX_UNIFORM_VECTORS 0x8DFB #define GL_MAX_VARYING_VECTORS 0x8DFC #define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS 0x8B4D #define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS 0x8B4C #define GL_MAX_TEXTURE_IMAGE_UNITS 0x8872 #define GL_MAX_FRAGMENT_UNIFORM_VECTORS 0x8DFD #define GL_SHADER_TYPE 0x8B4F #define GL_DELETE_STATUS 0x8B80 #define GL_LINK_STATUS 0x8B82 #define GL_VALIDATE_STATUS 0x8B83 #define GL_ATTACHED_SHADERS 0x8B85 #define GL_ACTIVE_UNIFORMS 0x8B86 #define GL_ACTIVE_UNIFORM_MAX_LENGTH 0x8B87 #define GL_ACTIVE_ATTRIBUTES 0x8B89 #define GL_ACTIVE_ATTRIBUTE_MAX_LENGTH 0x8B8A #define GL_SHADING_LANGUAGE_VERSION 0x8B8C #define GL_CURRENT_PROGRAM 0x8B8D /* StencilFunction */ #define GL_NEVER 0x0200 #define GL_LESS 0x0201 #define GL_EQUAL 0x0202 #define GL_LEQUAL 0x0203 #define GL_GREATER 0x0204 #define GL_NOTEQUAL 0x0205 #define GL_GEQUAL 0x0206 #define GL_ALWAYS 0x0207 /* StencilOp */ /* GL_ZERO */ #define GL_KEEP 0x1E00 #define GL_REPLACE 0x1E01 #define GL_INCR 0x1E02 #define GL_DECR 0x1E03 #define GL_INVERT 0x150A #define GL_INCR_WRAP 0x8507 #define GL_DECR_WRAP 0x8508 /* StringName */ #define GL_VENDOR 0x1F00 #define GL_RENDERER 0x1F01 #define GL_VERSION 0x1F02 #define GL_EXTENSIONS 0x1F03 /* TextureMagFilter */ #define GL_NEAREST 0x2600 #define GL_LINEAR 0x2601 /* TextureMinFilter */ /* GL_NEAREST */ /* GL_LINEAR */ #define GL_NEAREST_MIPMAP_NEAREST 0x2700 #define GL_LINEAR_MIPMAP_NEAREST 0x2701 #define GL_NEAREST_MIPMAP_LINEAR 0x2702 #define GL_LINEAR_MIPMAP_LINEAR 0x2703 /* TextureParameterName */ #define GL_TEXTURE_MAG_FILTER 0x2800 #define GL_TEXTURE_MIN_FILTER 0x2801 #define GL_TEXTURE_WRAP_S 0x2802 #define GL_TEXTURE_WRAP_T 0x2803 /* TextureTarget */ /* GL_TEXTURE_2D */ #define GL_TEXTURE 0x1702 #define GL_TEXTURE_CUBE_MAP 0x8513 #define GL_TEXTURE_BINDING_CUBE_MAP 0x8514 #define GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x8515 #define GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x8516 #define GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x8517 #define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x8518 #define GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x8519 #define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x851A #define GL_MAX_CUBE_MAP_TEXTURE_SIZE 0x851C /* TextureUnit */ #define GL_TEXTURE0 0x84C0 #define GL_TEXTURE1 0x84C1 #define GL_TEXTURE2 0x84C2 #define GL_TEXTURE3 0x84C3 #define GL_TEXTURE4 0x84C4 #define GL_TEXTURE5 0x84C5 #define GL_TEXTURE6 0x84C6 #define GL_TEXTURE7 0x84C7 #define GL_TEXTURE8 0x84C8 #define GL_TEXTURE9 0x84C9 #define GL_TEXTURE10 0x84CA #define GL_TEXTURE11 0x84CB #define GL_TEXTURE12 0x84CC #define GL_TEXTURE13 0x84CD #define GL_TEXTURE14 0x84CE #define GL_TEXTURE15 0x84CF #define GL_TEXTURE16 0x84D0 #define GL_TEXTURE17 0x84D1 #define GL_TEXTURE18 0x84D2 #define GL_TEXTURE19 0x84D3 #define GL_TEXTURE20 0x84D4 #define GL_TEXTURE21 0x84D5 #define GL_TEXTURE22 0x84D6 #define GL_TEXTURE23 0x84D7 #define GL_TEXTURE24 0x84D8 #define GL_TEXTURE25 0x84D9 #define GL_TEXTURE26 0x84DA #define GL_TEXTURE27 0x84DB #define GL_TEXTURE28 0x84DC #define GL_TEXTURE29 0x84DD #define GL_TEXTURE30 0x84DE #define GL_TEXTURE31 0x84DF #define GL_ACTIVE_TEXTURE 0x84E0 /* TextureWrapMode */ #define GL_REPEAT 0x2901 #define GL_CLAMP_TO_EDGE 0x812F #define GL_MIRRORED_REPEAT 0x8370 /* Uniform Types */ #define GL_FLOAT_VEC2 0x8B50 #define GL_FLOAT_VEC3 0x8B51 #define GL_FLOAT_VEC4 0x8B52 #define GL_INT_VEC2 0x8B53 #define GL_INT_VEC3 0x8B54 #define GL_INT_VEC4 0x8B55 #define GL_BOOL 0x8B56 #define GL_BOOL_VEC2 0x8B57 #define GL_BOOL_VEC3 0x8B58 #define GL_BOOL_VEC4 0x8B59 #define GL_FLOAT_MAT2 0x8B5A #define GL_FLOAT_MAT3 0x8B5B #define GL_FLOAT_MAT4 0x8B5C #define GL_SAMPLER_2D 0x8B5E #define GL_SAMPLER_CUBE 0x8B60 /* Vertex Arrays */ #define GL_VERTEX_ATTRIB_ARRAY_ENABLED 0x8622 #define GL_VERTEX_ATTRIB_ARRAY_SIZE 0x8623 #define GL_VERTEX_ATTRIB_ARRAY_STRIDE 0x8624 #define GL_VERTEX_ATTRIB_ARRAY_TYPE 0x8625 #define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED 0x886A #define GL_VERTEX_ATTRIB_ARRAY_POINTER 0x8645 #define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING 0x889F /* Read Format */ #define GL_IMPLEMENTATION_COLOR_READ_TYPE 0x8B9A #define GL_IMPLEMENTATION_COLOR_READ_FORMAT 0x8B9B /* Shader Source */ #define GL_COMPILE_STATUS 0x8B81 #define GL_INFO_LOG_LENGTH 0x8B84 #define GL_SHADER_SOURCE_LENGTH 0x8B88 #define GL_SHADER_COMPILER 0x8DFA /* Shader Binary */ #define GL_SHADER_BINARY_FORMATS 0x8DF8 #define GL_NUM_SHADER_BINARY_FORMATS 0x8DF9 /* Shader Precision-Specified Types */ #define GL_LOW_FLOAT 0x8DF0 #define GL_MEDIUM_FLOAT 0x8DF1 #define GL_HIGH_FLOAT 0x8DF2 #define GL_LOW_INT 0x8DF3 #define GL_MEDIUM_INT 0x8DF4 #define GL_HIGH_INT 0x8DF5 /* Framebuffer Object. */ #define GL_FRAMEBUFFER 0x8D40 #define GL_RENDERBUFFER 0x8D41 #define GL_RGBA4 0x8056 #define GL_RGB5_A1 0x8057 #define GL_RGB565 0x8D62 #define GL_DEPTH_COMPONENT16 0x81A5 #define GL_STENCIL_INDEX 0x1901 #define GL_STENCIL_INDEX8 0x8D48 #define GL_RENDERBUFFER_WIDTH 0x8D42 #define GL_RENDERBUFFER_HEIGHT 0x8D43 #define GL_RENDERBUFFER_INTERNAL_FORMAT 0x8D44 #define GL_RENDERBUFFER_RED_SIZE 0x8D50 #define GL_RENDERBUFFER_GREEN_SIZE 0x8D51 #define GL_RENDERBUFFER_BLUE_SIZE 0x8D52 #define GL_RENDERBUFFER_ALPHA_SIZE 0x8D53 #define GL_RENDERBUFFER_DEPTH_SIZE 0x8D54 #define GL_RENDERBUFFER_STENCIL_SIZE 0x8D55 #define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE 0x8CD0 #define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME 0x8CD1 #define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL 0x8CD2 #define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE 0x8CD3 #define GL_COLOR_ATTACHMENT0 0x8CE0 #define GL_DEPTH_ATTACHMENT 0x8D00 #define GL_STENCIL_ATTACHMENT 0x8D20 #define GL_NONE 0 #define GL_FRAMEBUFFER_COMPLETE 0x8CD5 #define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT 0x8CD6 #define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT 0x8CD7 #define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS 0x8CD9 #define GL_FRAMEBUFFER_UNSUPPORTED 0x8CDD #define GL_FRAMEBUFFER_BINDING 0x8CA6 #define GL_RENDERBUFFER_BINDING 0x8CA7 #define GL_MAX_RENDERBUFFER_SIZE 0x84E8 #define GL_INVALID_FRAMEBUFFER_OPERATION 0x0506 #else # ifndef EVAS_GL_NO_GL_H_CHECK # error "You may only include either Evas_GL.h OR use your native OpenGL's headers. If you use Evas to do GL, then you cannot use the native gl headers." # endif #endif #if !defined(__glext_h_) && !defined(__gl2ext_h_) # define __glext_h_ # define __gl2ext_h_ //---------------------------// // GLES extension defines /* GL_OES_compressed_ETC1_RGB8_texture */ #define GL_ETC1_RGB8_OES 0x8D64 /* GL_OES_compressed_paletted_texture */ #define GL_PALETTE4_RGB8_OES 0x8B90 #define GL_PALETTE4_RGBA8_OES 0x8B91 #define GL_PALETTE4_R5_G6_B5_OES 0x8B92 #define GL_PALETTE4_RGBA4_OES 0x8B93 #define GL_PALETTE4_RGB5_A1_OES 0x8B94 #define GL_PALETTE8_RGB8_OES 0x8B95 #define GL_PALETTE8_RGBA8_OES 0x8B96 #define GL_PALETTE8_R5_G6_B5_OES 0x8B97 #define GL_PALETTE8_RGBA4_OES 0x8B98 #define GL_PALETTE8_RGB5_A1_OES 0x8B99 /* GL_OES_depth24 */ #define GL_DEPTH_COMPONENT24_OES 0x81A6 /* GL_OES_depth32 */ #define GL_DEPTH_COMPONENT32_OES 0x81A7 /* GL_OES_get_program_binary */ #define GL_PROGRAM_BINARY_LENGTH_OES 0x8741 #define GL_NUM_PROGRAM_BINARY_FORMATS_OES 0x87FE #define GL_PROGRAM_BINARY_FORMATS_OES 0x87FF /* GL_OES_mapbuffer */ #define GL_WRITE_ONLY_OES 0x88B9 #define GL_BUFFER_ACCESS_OES 0x88BB #define GL_BUFFER_MAPPED_OES 0x88BC #define GL_BUFFER_MAP_POINTER_OES 0x88BD /* GL_OES_packed_depth_stencil */ #define GL_DEPTH_STENCIL_OES 0x84F9 #define GL_UNSIGNED_INT_24_8_OES 0x84FA #define GL_DEPTH24_STENCIL8_OES 0x88F0 /* GL_OES_rgb8_rgba8 */ #define GL_RGB8_OES 0x8051 #define GL_RGBA8_OES 0x8058 /* GL_OES_standard_derivatives */ #define GL_FRAGMENT_SHADER_DERIVATIVE_HINT_OES 0x8B8B /* GL_OES_stencil1 */ #define GL_STENCIL_INDEX1_OES 0x8D46 /* GL_OES_stencil4 */ #define GL_STENCIL_INDEX4_OES 0x8D47 /* GL_OES_texture_3D */ #define GL_TEXTURE_WRAP_R_OES 0x8072 #define GL_TEXTURE_3D_OES 0x806F #define GL_TEXTURE_BINDING_3D_OES 0x806A #define GL_MAX_3D_TEXTURE_SIZE_OES 0x8073 #define GL_SAMPLER_3D_OES 0x8B5F #define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_OES 0x8CD4 /* GL_OES_texture_float */ /* No new tokens introduced by this extension. */ /* GL_OES_texture_float_linear */ /* No new tokens introduced by this extension. */ /* GL_OES_texture_half_float */ #define GL_HALF_FLOAT_OES 0x8D61 /* GL_OES_texture_half_float_linear */ /* No new tokens introduced by this extension. */ /* GL_OES_texture_npot */ /* No new tokens introduced by this extension. */ /* GL_OES_vertex_half_float */ /* GL_HALF_FLOAT_OES defined in GL_OES_texture_half_float already. */ /* GL_OES_vertex_type_10_10_10_2 */ #define GL_UNSIGNED_INT_10_10_10_2_OES 0x8DF6 #define GL_INT_10_10_10_2_OES 0x8DF7 /*------------------------------------------------------------------------* * AMD extension tokens *------------------------------------------------------------------------*/ /* GL_AMD_compressed_3DC_texture */ #define GL_3DC_X_AMD 0x87F9 #define GL_3DC_XY_AMD 0x87FA /* GL_AMD_compressed_ATC_texture */ #define GL_ATC_RGB_AMD 0x8C92 #define GL_ATC_RGBA_EXPLICIT_ALPHA_AMD 0x8C93 #define GL_ATC_RGBA_INTERPOLATED_ALPHA_AMD 0x87EE /* GL_AMD_performance_monitor */ #define GL_COUNTER_TYPE_AMD 0x8BC0 #define GL_COUNTER_RANGE_AMD 0x8BC1 #define GL_UNSIGNED_INT64_AMD 0x8BC2 #define GL_PERCENTAGE_AMD 0x8BC3 #define GL_PERFMON_RESULT_AVAILABLE_AMD 0x8BC4 #define GL_PERFMON_RESULT_SIZE_AMD 0x8BC5 #define GL_PERFMON_RESULT_AMD 0x8BC6 /* GL_AMD_program_binary_Z400 */ #define GL_Z400_BINARY_AMD 0x8740 /*------------------------------------------------------------------------* * EXT extension tokens *------------------------------------------------------------------------*/ /* GL_EXT_blend_minmax */ #define GL_MIN_EXT 0x8007 #define GL_MAX_EXT 0x8008 /* GL_EXT_discard_framebuffer */ #define GL_COLOR_EXT 0x1800 #define GL_DEPTH_EXT 0x1801 #define GL_STENCIL_EXT 0x1802 /* GL_EXT_multi_draw_arrays */ /* No new tokens introduced by this extension. */ /* GL_EXT_read_format_bgra */ #define GL_BGRA_EXT 0x80E1 #define GL_UNSIGNED_SHORT_4_4_4_4_REV_EXT 0x8365 #define GL_UNSIGNED_SHORT_1_5_5_5_REV_EXT 0x8366 /* GL_EXT_texture_filter_anisotropic */ #define GL_TEXTURE_MAX_ANISOTROPY_EXT 0x84FE #define GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT 0x84FF /* GL_EXT_texture_format_BGRA8888 */ #define GL_BGRA_EXT 0x80E1 /* GL_EXT_texture_type_2_10_10_10_REV */ #define GL_UNSIGNED_INT_2_10_10_10_REV_EXT 0x8368 /*------------------------------------------------------------------------* * IMG extension tokens *------------------------------------------------------------------------*/ /* GL_IMG_program_binary */ #define GL_SGX_PROGRAM_BINARY_IMG 0x9130 /* GL_IMG_read_format */ #define GL_BGRA_IMG 0x80E1 #define GL_UNSIGNED_SHORT_4_4_4_4_REV_IMG 0x8365 /* GL_IMG_shader_binary */ #define GL_SGX_BINARY_IMG 0x8C0A /* GL_IMG_texture_compression_pvrtc */ #define GL_COMPRESSED_RGB_PVRTC_4BPPV1_IMG 0x8C00 #define GL_COMPRESSED_RGB_PVRTC_2BPPV1_IMG 0x8C01 #define GL_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG 0x8C02 #define GL_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG 0x8C03 /* GL_IMG_multisampled_render_to_texture */ #define GL_RENDERBUFFER_SAMPLES_IMG 0x9133 #define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_IMG 0x9134 #define GL_MAX_SAMPLES_IMG 0x9135 #define GL_TEXTURE_SAMPLES_IMG 0x9136 /*------------------------------------------------------------------------* * NV extension tokens *------------------------------------------------------------------------*/ /* GL_NV_fence */ #define GL_ALL_COMPLETED_NV 0x84F2 #define GL_FENCE_STATUS_NV 0x84F3 #define GL_FENCE_CONDITION_NV 0x84F4 /*------------------------------------------------------------------------* * QCOM extension tokens *------------------------------------------------------------------------*/ /* GL_QCOM_driver_control */ /* No new tokens introduced by this extension. */ /* GL_QCOM_extended_get */ #define GL_TEXTURE_WIDTH_QCOM 0x8BD2 #define GL_TEXTURE_HEIGHT_QCOM 0x8BD3 #define GL_TEXTURE_DEPTH_QCOM 0x8BD4 #define GL_TEXTURE_INTERNAL_FORMAT_QCOM 0x8BD5 #define GL_TEXTURE_FORMAT_QCOM 0x8BD6 #define GL_TEXTURE_TYPE_QCOM 0x8BD7 #define GL_TEXTURE_IMAGE_VALID_QCOM 0x8BD8 #define GL_TEXTURE_NUM_LEVELS_QCOM 0x8BD9 #define GL_TEXTURE_TARGET_QCOM 0x8BDA #define GL_TEXTURE_OBJECT_VALID_QCOM 0x8BDB #define GL_STATE_RESTORE 0x8BDC /* GL_QCOM_extended_get2 */ /* No new tokens introduced by this extension. */ /* GL_QCOM_perfmon_global_mode */ #define GL_PERFMON_GLOBAL_MODE_QCOM 0x8FA0 /* GL_QCOM_writeonly_rendering */ #define GL_WRITEONLY_RENDERING_QCOM 0x8823 /*------------------------------------------------------------------------* * End of extension tokens, start of corresponding extension functions *------------------------------------------------------------------------*/ /* EvasGL_KHR_image */ #define EVAS_GL_NATIVE_PIXMAP 0x30B0 /* evasglCreateImage target */ /* EvasGL_KHR_vg_parent_image */ #define EVAS_VG_PARENT_IMAGE 0x30BA /* evasglCreateImage target */ /* EvasGL_KHR_gl_texture_2D_image */ #define EVAS_GL_TEXTURE_2D 0x30B1 /* evasglCreateImage target */ #define EVAS_GL_TEXTURE_LEVEL 0x30BC /* evasglCreateImage attribute */ /* EvasGL_KHR_gl_texture_cubemap_image */ #define EVAS_GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x30B3 /* evasglCreateImage target */ #define EVAS_GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x30B4 /* evasglCreateImage target */ #define EVAS_GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x30B5 /* evasglCreateImage target */ #define EVAS_GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x30B6 /* evasglCreateImage target */ #define EVAS_GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x30B7 /* evasglCreateImage target */ #define EVAS_GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x30B8 /* evasglCreateImage target */ /* EvasGL_KHR_gl_texture_3D_image */ #define EVAS_GL_TEXTURE_3D 0x30B2 /* evasglCreateImage target */ #define EVAS_GL_TEXTURE_ZOFFSET 0x30BD /* evasglCreateImage attribute */ /* EvasGL_KHR_gl_renderbuffer_image */ #define EVAS_GL_RENDERBUFFER 0x30B9 /* evasglCreateImage target */ #else # ifndef EVAS_GL_NO_GL_H_CHECK # error "You may only include either Evas_GL.h OR use your native OpenGL's headers. If you use Evas to do GL, then you cannot use the native gl headers." # endif #endif #define EVAS_GL_API_VERSION 1 struct _Evas_GL_API { int version; /* version 1: */ /*------- GLES 2.0 -------*/ void (*glActiveTexture) (GLenum texture); void (*glAttachShader) (GLuint program, GLuint shader); void (*glBindAttribLocation) (GLuint program, GLuint index, const char* name); void (*glBindBuffer) (GLenum target, GLuint buffer); void (*glBindFramebuffer) (GLenum target, GLuint framebuffer); void (*glBindRenderbuffer) (GLenum target, GLuint renderbuffer); void (*glBindTexture) (GLenum target, GLuint texture); void (*glBlendColor) (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); void (*glBlendEquation) ( GLenum mode ); void (*glBlendEquationSeparate) (GLenum modeRGB, GLenum modeAlpha); void (*glBlendFunc) (GLenum sfactor, GLenum dfactor); void (*glBlendFuncSeparate) (GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); void (*glBufferData) (GLenum target, GLsizeiptr size, const void* data, GLenum usage); void (*glBufferSubData) (GLenum target, GLintptr offset, GLsizeiptr size, const void* data); GLenum (*glCheckFramebufferStatus) (GLenum target); void (*glClear) (GLbitfield mask); void (*glClearColor) (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); void (*glClearDepthf) (GLclampf depth); void (*glClearStencil) (GLint s); void (*glColorMask) (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha); void (*glCompileShader) (GLuint shader); void (*glCompressedTexImage2D) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void* data); void (*glCompressedTexSubImage2D) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void* data); void (*glCopyTexImage2D) (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); void (*glCopyTexSubImage2D) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); GLuint (*glCreateProgram) (void); GLuint (*glCreateShader) (GLenum type); void (*glCullFace) (GLenum mode); void (*glDeleteBuffers) (GLsizei n, const GLuint* buffers); void (*glDeleteFramebuffers) (GLsizei n, const GLuint* framebuffers); void (*glDeleteProgram) (GLuint program); void (*glDeleteRenderbuffers) (GLsizei n, const GLuint* renderbuffers); void (*glDeleteShader) (GLuint shader); void (*glDeleteTextures) (GLsizei n, const GLuint* textures); void (*glDepthFunc) (GLenum func); void (*glDepthMask) (GLboolean flag); void (*glDepthRangef) (GLclampf zNear, GLclampf zFar); void (*glDetachShader) (GLuint program, GLuint shader); void (*glDisable) (GLenum cap); void (*glDisableVertexAttribArray) (GLuint index); void (*glDrawArrays) (GLenum mode, GLint first, GLsizei count); void (*glDrawElements) (GLenum mode, GLsizei count, GLenum type, const void* indices); void (*glEnable) (GLenum cap); void (*glEnableVertexAttribArray) (GLuint index); void (*glFinish) (void); void (*glFlush) (void); void (*glFramebufferRenderbuffer) (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); void (*glFramebufferTexture2D) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); void (*glFrontFace) (GLenum mode); void (*glGenBuffers) (GLsizei n, GLuint* buffers); void (*glGenerateMipmap) (GLenum target); void (*glGenFramebuffers) (GLsizei n, GLuint* framebuffers); void (*glGenRenderbuffers) (GLsizei n, GLuint* renderbuffers); void (*glGenTextures) (GLsizei n, GLuint* textures); void (*glGetActiveAttrib) (GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, char* name); void (*glGetActiveUniform) (GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, char* name); void (*glGetAttachedShaders) (GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders); int (*glGetAttribLocation) (GLuint program, const char* name); void (*glGetBooleanv) (GLenum pname, GLboolean* params); void (*glGetBufferParameteriv) (GLenum target, GLenum pname, GLint* params); GLenum (*glGetError) (void); void (*glGetFloatv) (GLenum pname, GLfloat* params); void (*glGetFramebufferAttachmentParameteriv) (GLenum target, GLenum attachment, GLenum pname, GLint* params); void (*glGetIntegerv) (GLenum pname, GLint* params); void (*glGetProgramiv) (GLuint program, GLenum pname, GLint* params); void (*glGetProgramInfoLog) (GLuint program, GLsizei bufsize, GLsizei* length, char* infolog); void (*glGetRenderbufferParameteriv) (GLenum target, GLenum pname, GLint* params); void (*glGetShaderiv) (GLuint shader, GLenum pname, GLint* params); void (*glGetShaderInfoLog) (GLuint shader, GLsizei bufsize, GLsizei* length, char* infolog); void (*glGetShaderPrecisionFormat) (GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision); void (*glGetShaderSource) (GLuint shader, GLsizei bufsize, GLsizei* length, char* source); const GLubyte* (*glGetString) (GLenum name); void (*glGetTexParameterfv) (GLenum target, GLenum pname, GLfloat* params); void (*glGetTexParameteriv) (GLenum target, GLenum pname, GLint* params); void (*glGetUniformfv) (GLuint program, GLint location, GLfloat* params); void (*glGetUniformiv) (GLuint program, GLint location, GLint* params); int (*glGetUniformLocation) (GLuint program, const char* name); void (*glGetVertexAttribfv) (GLuint index, GLenum pname, GLfloat* params); void (*glGetVertexAttribiv) (GLuint index, GLenum pname, GLint* params); void (*glGetVertexAttribPointerv) (GLuint index, GLenum pname, void** pointer); void (*glHint) (GLenum target, GLenum mode); GLboolean (*glIsBuffer) (GLuint buffer); GLboolean (*glIsEnabled) (GLenum cap); GLboolean (*glIsFramebuffer) (GLuint framebuffer); GLboolean (*glIsProgram) (GLuint program); GLboolean (*glIsRenderbuffer) (GLuint renderbuffer); GLboolean (*glIsShader) (GLuint shader); GLboolean (*glIsTexture) (GLuint texture); void (*glLineWidth) (GLfloat width); void (*glLinkProgram) (GLuint program); void (*glPixelStorei) (GLenum pname, GLint param); void (*glPolygonOffset) (GLfloat factor, GLfloat units); void (*glReadPixels) (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void* pixels); void (*glReleaseShaderCompiler) (void); void (*glRenderbufferStorage) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height); void (*glSampleCoverage) (GLclampf value, GLboolean invert); void (*glScissor) (GLint x, GLint y, GLsizei width, GLsizei height); void (*glShaderBinary) (GLsizei n, const GLuint* shaders, GLenum binaryformat, const void* binary, GLsizei length); void (*glShaderSource) (GLuint shader, GLsizei count, const char** string, const GLint* length); void (*glStencilFunc) (GLenum func, GLint ref, GLuint mask); void (*glStencilFuncSeparate) (GLenum face, GLenum func, GLint ref, GLuint mask); void (*glStencilMask) (GLuint mask); void (*glStencilMaskSeparate) (GLenum face, GLuint mask); void (*glStencilOp) (GLenum fail, GLenum zfail, GLenum zpass); void (*glStencilOpSeparate) (GLenum face, GLenum fail, GLenum zfail, GLenum zpass); void (*glTexImage2D) (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void* pixels); void (*glTexParameterf) (GLenum target, GLenum pname, GLfloat param); void (*glTexParameterfv) (GLenum target, GLenum pname, const GLfloat* params); void (*glTexParameteri) (GLenum target, GLenum pname, GLint param); void (*glTexParameteriv) (GLenum target, GLenum pname, const GLint* params); void (*glTexSubImage2D) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void* pixels); void (*glUniform1f) (GLint location, GLfloat x); void (*glUniform1fv) (GLint location, GLsizei count, const GLfloat* v); void (*glUniform1i) (GLint location, GLint x); void (*glUniform1iv) (GLint location, GLsizei count, const GLint* v); void (*glUniform2f) (GLint location, GLfloat x, GLfloat y); void (*glUniform2fv) (GLint location, GLsizei count, const GLfloat* v); void (*glUniform2i) (GLint location, GLint x, GLint y); void (*glUniform2iv) (GLint location, GLsizei count, const GLint* v); void (*glUniform3f) (GLint location, GLfloat x, GLfloat y, GLfloat z); void (*glUniform3fv) (GLint location, GLsizei count, const GLfloat* v); void (*glUniform3i) (GLint location, GLint x, GLint y, GLint z); void (*glUniform3iv) (GLint location, GLsizei count, const GLint* v); void (*glUniform4f) (GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w); void (*glUniform4fv) (GLint location, GLsizei count, const GLfloat* v); void (*glUniform4i) (GLint location, GLint x, GLint y, GLint z, GLint w); void (*glUniform4iv) (GLint location, GLsizei count, const GLint* v); void (*glUniformMatrix2fv) (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value); void (*glUniformMatrix3fv) (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value); void (*glUniformMatrix4fv) (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value); void (*glUseProgram) (GLuint program); void (*glValidateProgram) (GLuint program); void (*glVertexAttrib1f) (GLuint indx, GLfloat x); void (*glVertexAttrib1fv) (GLuint indx, const GLfloat* values); void (*glVertexAttrib2f) (GLuint indx, GLfloat x, GLfloat y); void (*glVertexAttrib2fv) (GLuint indx, const GLfloat* values); void (*glVertexAttrib3f) (GLuint indx, GLfloat x, GLfloat y, GLfloat z); void (*glVertexAttrib3fv) (GLuint indx, const GLfloat* values); void (*glVertexAttrib4f) (GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w); void (*glVertexAttrib4fv) (GLuint indx, const GLfloat* values); void (*glVertexAttribPointer) (GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void* ptr); void (*glViewport) (GLint x, GLint y, GLsizei width, GLsizei height); /*------- GLES 2.0 Extensions -------*/ // Notice these two names have been changed to fit Evas GL and not EGL! /* GL_OES_EvasGL_image */ void (*glEvasGLImageTargetTexture2DOES) (GLenum target, EvasGLImage image); void (*glEvasGLImageTargetRenderbufferStorageOES) (GLenum target, EvasGLImage image); /* GL_OES_get_program_binary */ void (*glGetProgramBinaryOES) (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, void *binary); void (*glProgramBinaryOES) (GLuint program, GLenum binaryFormat, const void *binary, GLint length); /* GL_OES_mapbuffer */ void* (*glMapBufferOES) (GLenum target, GLenum access); GLboolean (*glUnmapBufferOES) (GLenum target); void (*glGetBufferPointervOES) (GLenum target, GLenum pname, void** params); /* GL_OES_texture_3D */ void (*glTexImage3DOES) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void* pixels); void (*glTexSubImage3DOES) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void* pixels); void (*glCopyTexSubImage3DOES) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); void (*glCompressedTexImage3DOES) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void* data); void (*glCompressedTexSubImage3DOES) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void* data); void (*glFramebufferTexture3DOES) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset); /* AMD_performance_monitor */ void (*glGetPerfMonitorGroupsAMD) (GLint* numGroups, GLsizei groupsSize, GLuint* groups); void (*glGetPerfMonitorCountersAMD) (GLuint group, GLint* numCounters, GLint* maxActiveCounters, GLsizei counterSize, GLuint* counters); void (*glGetPerfMonitorGroupStringAMD) (GLuint group, GLsizei bufSize, GLsizei* length, char* groupString); void (*glGetPerfMonitorCounterStringAMD) (GLuint group, GLuint counter, GLsizei bufSize, GLsizei* length, char* counterString); void (*glGetPerfMonitorCounterInfoAMD) (GLuint group, GLuint counter, GLenum pname, void* data); void (*glGenPerfMonitorsAMD) (GLsizei n, GLuint* monitors); void (*glDeletePerfMonitorsAMD) (GLsizei n, GLuint* monitors); void (*glSelectPerfMonitorCountersAMD) (GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint* countersList); void (*glBeginPerfMonitorAMD) (GLuint monitor); void (*glEndPerfMonitorAMD) (GLuint monitor); void (*glGetPerfMonitorCounterDataAMD) (GLuint monitor, GLenum pname, GLsizei dataSize, GLuint* data, GLint* bytesWritten); /* GL_EXT_discard_framebuffer */ void (*glDiscardFramebufferEXT) (GLenum target, GLsizei numAttachments, const GLenum* attachments); /* GL_EXT_multi_draw_arrays */ void (*glMultiDrawArraysEXT) (GLenum mode, GLint* first, GLsizei* count, GLsizei primcount); void (*glMultiDrawElementsEXT) (GLenum mode, const GLsizei* count, GLenum type, const GLvoid** indices, GLsizei primcount); /* GL_NV_fence */ void (*glDeleteFencesNV) (GLsizei n, const GLuint* fences); void (*glGenFencesNV) (GLsizei n, GLuint* fences); GLboolean (*glIsFenceNV) (GLuint fence); GLboolean (*glTestFenceNV) (GLuint fence); void (*glGetFenceivNV) (GLuint fence, GLenum pname, GLint* params); void (*glFinishFenceNV) (GLuint fence); void (*glSetFenceNV) (GLuint, GLenum); /* GL_QCOM_driver_control */ void (*glGetDriverControlsQCOM) (GLint* num, GLsizei size, GLuint* driverControls); void (*glGetDriverControlStringQCOM) (GLuint driverControl, GLsizei bufSize, GLsizei* length, char* driverControlString); void (*glEnableDriverControlQCOM) (GLuint driverControl); void (*glDisableDriverControlQCOM) (GLuint driverControl); /* GL_QCOM_extended_get */ void (*glExtGetTexturesQCOM) (GLuint* textures, GLint maxTextures, GLint* numTextures); void (*glExtGetBuffersQCOM) (GLuint* buffers, GLint maxBuffers, GLint* numBuffers); void (*glExtGetRenderbuffersQCOM) (GLuint* renderbuffers, GLint maxRenderbuffers, GLint* numRenderbuffers); void (*glExtGetFramebuffersQCOM) (GLuint* framebuffers, GLint maxFramebuffers, GLint* numFramebuffers); void (*glExtGetTexLevelParameterivQCOM) (GLuint texture, GLenum face, GLint level, GLenum pname, GLint* params); void (*glExtTexObjectStateOverrideiQCOM) (GLenum target, GLenum pname, GLint param); void (*glExtGetTexSubImageQCOM) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, void* texels); void (*glExtGetBufferPointervQCOM) (GLenum target, void** params); /* GL_QCOM_extended_get2 */ void (*glExtGetShadersQCOM) (GLuint* shaders, GLint maxShaders, GLint* numShaders); void (*glExtGetProgramsQCOM) (GLuint* programs, GLint maxPrograms, GLint* numPrograms); GLboolean (*glExtIsProgramBinaryQCOM) (GLuint program); void (*glExtGetProgramBinarySourceQCOM) (GLuint program, GLenum shadertype, char* source, GLint* length); //------- EGL Related Extensions -------// /* EvasGL_KHR_image */ EvasGLImage (*evasglCreateImage) (int target, void* buffer, int* attrib_list); void (*evasglDestroyImage) (EvasGLImage image); /* future calls will be added down here for expansion */ /* version 2: */ }; #ifdef __cplusplus } #endif #endif /** * @} */ evas-1.7.9/src/lib/canvas/0000775000175000017500000000000012234557316012311 500000000000000evas-1.7.9/src/lib/canvas/evas_object_main.c0000664000175000017500000013762012175475547015707 00000000000000#include "evas_common.h" #include "evas_private.h" EVAS_MEMPOOL(_mp_obj); EVAS_MEMPOOL(_mp_sh); static Eina_Inlist * get_layer_objects(Evas_Layer *l) { if ((!l) || (!l->objects)) return NULL; return (EINA_INLIST_GET(l->objects)); } /* evas internal stuff */ Evas_Object * evas_object_new(Evas *e __UNUSED__) { Evas_Object *obj; EVAS_MEMPOOL_INIT(_mp_obj, "evas_object", Evas_Object, 32, NULL); obj = EVAS_MEMPOOL_ALLOC(_mp_obj, Evas_Object); if (!obj) return NULL; EVAS_MEMPOOL_PREP(_mp_obj, obj, Evas_Object); obj->magic = MAGIC_OBJ; obj->cur.scale = 1.0; obj->prev.scale = 1.0; obj->is_frame = EINA_FALSE; return obj; } void evas_object_change_reset(Evas_Object *obj) { obj->changed = EINA_FALSE; obj->changed_move = EINA_FALSE; obj->changed_color = EINA_FALSE; obj->changed_map = EINA_FALSE; obj->changed_pchange = EINA_FALSE; } void evas_object_cur_prev(Evas_Object *obj) { if (!obj->prev.valid_map && (obj->prev.map == obj->cur.map)) obj->prev.map = NULL; if (obj->cur.map != obj->prev.map) { if (obj->cache_map) evas_map_free(obj->cache_map); obj->cache_map = obj->prev.map; } obj->prev = obj->cur; } void evas_object_free(Evas_Object *obj, int clean_layer) { int was_smart_child = 0; #if 0 // filtering disabled evas_filter_free(obj); #endif if (!strcmp(obj->type, "image")) evas_object_image_video_surface_set(obj, NULL); evas_object_map_set(obj, NULL); if (obj->prev.map) evas_map_free(obj->prev.map); if (obj->cache_map) evas_map_free(obj->cache_map); if (obj->map.surface) { obj->layer->evas->engine.func->image_map_surface_free (obj->layer->evas->engine.data.output, obj->map.surface); obj->map.surface = NULL; } evas_object_grabs_cleanup(obj); evas_object_intercept_cleanup(obj); if (obj->smart.parent) was_smart_child = 1; evas_object_smart_cleanup(obj); obj->func->free(obj); if (!was_smart_child) evas_object_release(obj, clean_layer); if (obj->clip.clipees) eina_list_free(obj->clip.clipees); evas_object_clip_changes_clean(obj); evas_object_event_callback_all_del(obj); evas_object_event_callback_cleanup(obj); if (obj->spans) { free(obj->spans); obj->spans = NULL; } while (obj->data.elements) { Evas_Data_Node *node; node = obj->data.elements->data; obj->data.elements = eina_list_remove(obj->data.elements, node); free(node); } obj->magic = 0; if (obj->size_hints) { EVAS_MEMPOOL_FREE(_mp_sh, obj->size_hints); } EVAS_MEMPOOL_FREE(_mp_obj, obj); } void evas_object_change(Evas_Object *obj) { Eina_List *l; Evas_Object *obj2; Eina_Bool movch = EINA_FALSE; if (obj->layer->evas->nochange) return; obj->layer->evas->changed = EINA_TRUE; if (obj->changed_move) { movch = EINA_TRUE; obj->changed_move = EINA_FALSE; } if (obj->changed) return; evas_render_object_recalc(obj); /* set changed flag on all objects this one clips too */ if (!((movch) && (obj->is_static_clip))) { EINA_LIST_FOREACH(obj->clip.clipees, l, obj2) evas_object_change(obj2); } EINA_LIST_FOREACH(obj->proxy.proxies, l, obj2) { evas_object_change(obj2); } if (obj->smart.parent) evas_object_change(obj->smart.parent); } void evas_object_render_pre_visible_change(Eina_Array *rects, Evas_Object *obj, int is_v, int was_v) { if (obj->smart.smart) return; if (is_v == was_v) return; if (is_v) { evas_add_rect(rects, obj->cur.cache.clip.x, obj->cur.cache.clip.y, obj->cur.cache.clip.w, obj->cur.cache.clip.h); } else { evas_add_rect(rects, obj->prev.cache.clip.x, obj->prev.cache.clip.y, obj->prev.cache.clip.w, obj->prev.cache.clip.h); } } void evas_object_render_pre_clipper_change(Eina_Array *rects, Evas_Object *obj) { if (obj->smart.smart) return; if (obj->cur.clipper == obj->prev.clipper) return; if ((obj->cur.clipper) && (obj->prev.clipper)) { /* get difference rects between clippers */ evas_rects_return_difference_rects(rects, obj->cur.clipper->cur.cache.clip.x, obj->cur.clipper->cur.cache.clip.y, obj->cur.clipper->cur.cache.clip.w, obj->cur.clipper->cur.cache.clip.h, obj->prev.clipper->prev.cache.clip.x, obj->prev.clipper->prev.cache.clip.y, obj->prev.clipper->prev.cache.clip.w, obj->prev.clipper->prev.cache.clip.h); } else if (obj->cur.clipper) { evas_rects_return_difference_rects(rects, obj->cur.geometry.x, obj->cur.geometry.y, obj->cur.geometry.w, obj->cur.geometry.h, //// rl = evas_rects_return_difference_rects(obj->cur.cache.geometry.x, //// obj->cur.cache.geometry.y, //// obj->cur.cache.geometry.w, //// obj->cur.cache.geometry.h, obj->cur.clipper->cur.cache.clip.x, obj->cur.clipper->cur.cache.clip.y, obj->cur.clipper->cur.cache.clip.w, obj->cur.clipper->cur.cache.clip.h); } else if (obj->prev.clipper) { evas_rects_return_difference_rects(rects, obj->prev.geometry.x, obj->prev.geometry.y, obj->prev.geometry.w, obj->prev.geometry.h, //// rl = evas_rects_return_difference_rects(obj->prev.cache.geometry.x, //// obj->prev.cache.geometry.y, //// obj->prev.cache.geometry.w, //// obj->prev.cache.geometry.h, obj->prev.clipper->prev.cache.clip.x, obj->prev.clipper->prev.cache.clip.y, obj->prev.clipper->prev.cache.clip.w, obj->prev.clipper->prev.cache.clip.h); } } void evas_object_render_pre_prev_cur_add(Eina_Array *rects, Evas_Object *obj) { evas_add_rect(rects, obj->cur.cache.clip.x, obj->cur.cache.clip.y, obj->cur.cache.clip.w, obj->cur.cache.clip.h); evas_add_rect(rects, obj->prev.cache.clip.x, obj->prev.cache.clip.y, obj->prev.cache.clip.w, obj->prev.cache.clip.h); /* evas_add_rect(rects, obj->cur.geometry.x, obj->cur.geometry.y, obj->cur.geometry.w, obj->cur.geometry.h); //// obj->cur.cache.geometry.x, //// obj->cur.cache.geometry.y, //// obj->cur.cache.geometry.w, //// obj->cur.cache.geometry.h); evas_add_rect(rects, obj->prev.geometry.x, obj->prev.geometry.y, obj->prev.geometry.w, obj->prev.geometry.h); //// obj->prev.cache.geometry.x, //// obj->prev.cache.geometry.y, //// obj->prev.cache.geometry.w, //// obj->prev.cache.geometry.h); */ } void evas_object_clip_changes_clean(Evas_Object *obj) { Eina_Rectangle *r; EINA_LIST_FREE(obj->clip.changes, r) eina_rectangle_free(r); } void evas_object_render_pre_effect_updates(Eina_Array *rects, Evas_Object *obj, int is_v, int was_v __UNUSED__) { Eina_Rectangle *r; Evas_Object *clipper; Eina_List *l; unsigned int i; Eina_Array_Iterator it; int x, y, w, h; if (obj->smart.smart) goto end; /* FIXME: was_v isn't used... why? */ if (!obj->clip.clipees) { EINA_ARRAY_ITER_NEXT(rects, i, r, it) { /* get updates and clip to current clip */ x = r->x; y = r->y; w = r->w; h = r->h; RECTS_CLIP_TO_RECT(x, y, w, h, obj->cur.cache.clip.x, obj->cur.cache.clip.y, obj->cur.cache.clip.w, obj->cur.cache.clip.h); if ((w > 0) && (h > 0)) obj->layer->evas->engine.func->output_redraws_rect_add(obj->layer->evas->engine.data.output, x, y, w, h); /* get updates and clip to previous clip */ x = r->x; y = r->y; w = r->w; h = r->h; RECTS_CLIP_TO_RECT(x, y, w, h, obj->prev.cache.clip.x, obj->prev.cache.clip.y, obj->prev.cache.clip.w, obj->prev.cache.clip.h); if ((w > 0) && (h > 0)) obj->layer->evas->engine.func->output_redraws_rect_add(obj->layer->evas->engine.data.output, x, y, w, h); } /* if the object is actually visible, take any parent clip changes */ if (is_v) { clipper = obj->cur.clipper; while (clipper) { EINA_LIST_FOREACH(clipper->clip.changes, l, r) { /* get updates and clip to current clip */ x = r->x; y = r->y; w = r->w; h = r->h; RECTS_CLIP_TO_RECT(x, y, w, h, obj->cur.cache.clip.x, obj->cur.cache.clip.y, obj->cur.cache.clip.w, obj->cur.cache.clip.h); if ((w > 0) && (h > 0)) obj->layer->evas->engine.func->output_redraws_rect_add(obj->layer->evas->engine.data.output, x, y, w, h); /* get updates and clip to previous clip */ x = r->x; y = r->y; w = r->w; h = r->h; RECTS_CLIP_TO_RECT(x, y, w, h, obj->prev.cache.clip.x, obj->prev.cache.clip.y, obj->prev.cache.clip.w, obj->prev.cache.clip.h); if ((w > 0) && (h > 0)) obj->layer->evas->engine.func->output_redraws_rect_add(obj->layer->evas->engine.data.output, x, y, w, h); } clipper = clipper->cur.clipper; } } } else { evas_object_clip_changes_clean(obj); EINA_ARRAY_ITER_NEXT(rects, i, r, it) obj->clip.changes = eina_list_append(obj->clip.changes, r); eina_array_clean(rects); } end: EINA_ARRAY_ITER_NEXT(rects, i, r, it) eina_rectangle_free(r); eina_array_clean(rects); } int evas_object_was_in_output_rect(Evas_Object *obj, int x, int y, int w, int h) { if (obj->smart.smart && !obj->prev.map && !obj->prev.usemap) return 0; /* assumes coords have been recalced */ if ((RECTS_INTERSECT(x, y, w, h, obj->prev.cache.clip.x, obj->prev.cache.clip.y, obj->prev.cache.clip.w, obj->prev.cache.clip.h))) return 1; return 0; } int evas_object_was_opaque(Evas_Object *obj) { if (obj->smart.smart) return 0; if (obj->prev.cache.clip.a == 255) { if (obj->func->was_opaque) return obj->func->was_opaque(obj); return 1; } return 0; } int evas_object_is_inside(Evas_Object *obj, Evas_Coord x, Evas_Coord y) { if (obj->smart.smart) return 0; if (obj->func->is_inside) return obj->func->is_inside(obj, x, y); return 0; } int evas_object_was_inside(Evas_Object *obj, Evas_Coord x, Evas_Coord y) { if (obj->smart.smart) return 0; if (obj->func->was_inside) return obj->func->was_inside(obj, x, y); return 0; } /* routines apps will call */ EAPI void evas_object_ref(Evas_Object *obj) { MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); obj->ref++; } EAPI void evas_object_unref(Evas_Object *obj) { MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); if (obj->ref == 0) return; obj->ref--; if ((obj->del_ref) && (obj->ref == 0)) evas_object_del(obj); } EAPI int evas_object_ref_get(const Evas_Object *obj) { MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return 0; MAGIC_CHECK_END(); return obj->ref; } EAPI void evas_object_del(Evas_Object *obj) { MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); if (obj->delete_me) return; if (obj->ref > 0) { obj->del_ref = EINA_TRUE; return; } evas_object_hide(obj); if (obj->focused) { obj->focused = EINA_FALSE; obj->layer->evas->focused = NULL; _evas_object_event_new(); evas_object_event_callback_call(obj, EVAS_CALLBACK_FOCUS_OUT, NULL, _evas_event_counter); _evas_post_event_callback_call(obj->layer->evas); } _evas_object_event_new(); evas_object_event_callback_call(obj, EVAS_CALLBACK_DEL, NULL, _evas_event_counter); _evas_post_event_callback_call(obj->layer->evas); if (obj->mouse_grabbed > 0) obj->layer->evas->pointer.mouse_grabbed -= obj->mouse_grabbed; if ((obj->mouse_in) || (obj->mouse_grabbed > 0)) obj->layer->evas->pointer.object.in = eina_list_remove(obj->layer->evas->pointer.object.in, obj); obj->mouse_grabbed = 0; obj->mouse_in = 0; if (obj->name) evas_object_name_set(obj, NULL); if (!obj->layer) { evas_object_free(obj, 1); return; } evas_object_grabs_cleanup(obj); while (obj->clip.clipees) evas_object_clip_unset(obj->clip.clipees->data); while (obj->proxy.proxies) evas_object_image_source_unset(obj->proxy.proxies->data); if (obj->cur.clipper) evas_object_clip_unset(obj); evas_object_map_set(obj, NULL); if (obj->smart.smart) evas_object_smart_del(obj); _evas_object_event_new(); evas_object_event_callback_call(obj, EVAS_CALLBACK_FREE, NULL, _evas_event_counter); _evas_post_event_callback_call(obj->layer->evas); evas_object_smart_cleanup(obj); obj->delete_me = 1; evas_object_change(obj); } void evas_object_update_bounding_box(Evas_Object *obj) { Eina_Bool propagate = EINA_FALSE; Eina_Bool computeminmax = EINA_FALSE; Evas_Coord x, y, w, h; Evas_Coord px, py, pw, ph; Eina_Bool noclip; if (!obj->smart.parent) return ; if (obj->child_has_map) return ; /* Disable bounding box computation for this object and its parent */ /* We could also remove object that are not visible from the bounding box, use the clipping information to reduce the bounding of the object they are clipping, but for the moment this will do it's jobs */ noclip = !(obj->clip.clipees || obj->is_static_clip); if (obj->smart.smart) { x = obj->cur.bounding_box.x; y = obj->cur.bounding_box.y; w = obj->cur.bounding_box.w; h = obj->cur.bounding_box.h; px = obj->prev.bounding_box.x; py = obj->prev.bounding_box.y; pw = obj->prev.bounding_box.w; ph = obj->prev.bounding_box.h; } else { x = obj->cur.geometry.x; y = obj->cur.geometry.y; w = obj->cur.geometry.w; h = obj->cur.geometry.h; px = obj->prev.geometry.x; py = obj->prev.geometry.y; pw = obj->prev.geometry.w; ph = obj->prev.geometry.h; } /* We are not yet trying to find the smallest bounding box, but we want to find a good approximation quickly. * That's why we initialiaze min and max search to geometry of the parent object. */ if (obj->smart.parent->cur.valid_bounding_box) { /* Update left limit */ if (noclip && x < obj->smart.parent->cur.bounding_box.x) { obj->smart.parent->cur.bounding_box.w += obj->smart.parent->cur.bounding_box.x - x; obj->smart.parent->cur.bounding_box.x = x; propagate = EINA_TRUE; } else if ((px == obj->smart.parent->prev.bounding_box.x && x > obj->smart.parent->cur.bounding_box.x) || (!noclip && x == obj->smart.parent->cur.bounding_box.x)) { computeminmax = EINA_TRUE; } /* Update top limit */ if (noclip && y < obj->smart.parent->cur.bounding_box.y) { obj->smart.parent->cur.bounding_box.h += obj->smart.parent->cur.bounding_box.x - x; obj->smart.parent->cur.bounding_box.y = y; propagate = EINA_TRUE; } else if ((py == obj->smart.parent->prev.bounding_box.y && y > obj->smart.parent->cur.bounding_box.y) || (!noclip && y == obj->smart.parent->cur.bounding_box.y)) { computeminmax = EINA_TRUE; } /* Update right limit */ if (noclip && x + w > obj->smart.parent->cur.bounding_box.x + obj->smart.parent->cur.bounding_box.w) { obj->smart.parent->cur.bounding_box.w = x + w - obj->smart.parent->cur.bounding_box.x; propagate = EINA_TRUE; } else if ((px + pw == obj->smart.parent->prev.bounding_box.x + obj->smart.parent->prev.bounding_box.w && x + w < obj->smart.parent->cur.bounding_box.x + obj->smart.parent->cur.bounding_box.w) || (!noclip && x + w == obj->smart.parent->cur.bounding_box.x + obj->smart.parent->cur.bounding_box.w)) { computeminmax = EINA_TRUE; } /* Update bottom limit */ if (noclip && y + h > obj->smart.parent->cur.bounding_box.y + obj->smart.parent->cur.bounding_box.h) { obj->smart.parent->cur.bounding_box.h = y + h - obj->smart.parent->cur.bounding_box.y; propagate = EINA_TRUE; } else if ((py + ph == obj->smart.parent->prev.bounding_box.y + obj->smart.parent->prev.bounding_box.h && y + h < obj->smart.parent->cur.bounding_box.y + obj->smart.parent->cur.bounding_box.h) || (!noclip && y + h == obj->smart.parent->cur.bounding_box.y + obj->smart.parent->cur.bounding_box.h)) { computeminmax = EINA_TRUE; } if (computeminmax) { evas_object_smart_need_bounding_box_update(obj->smart.parent); } } else { if (noclip) { obj->smart.parent->cur.bounding_box.x = x; obj->smart.parent->cur.bounding_box.y = y; obj->smart.parent->cur.bounding_box.w = w; obj->smart.parent->cur.bounding_box.h = h; obj->smart.parent->cur.valid_bounding_box = EINA_TRUE; propagate = EINA_TRUE; } } if (propagate) evas_object_update_bounding_box(obj->smart.parent); } EAPI void evas_object_move(Evas_Object *obj, Evas_Coord x, Evas_Coord y) { int is, was = 0, pass = 0, freeze = 0; int nx = 0, ny = 0; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); if (obj->delete_me) return; nx = x; ny = y; if (!obj->is_frame) { if ((!obj->smart.parent) && (obj->smart.smart)) { int fx, fy; evas_output_framespace_get(obj->layer->evas, &fx, &fy, NULL, NULL); nx += fx; ny += fy; } } if (evas_object_intercept_call_move(obj, nx, ny)) return; if (obj->doing.in_move > 0) { WRN("evas_object_move() called on object %p when in the middle of moving the same object", obj); return; } if ((obj->cur.geometry.x == nx) && (obj->cur.geometry.y == ny)) return; if (obj->layer->evas->events_frozen <= 0) { pass = evas_event_passes_through(obj); freeze = evas_event_freezes_through(obj); if ((!pass) && (!freeze)) was = evas_object_is_in_output_rect(obj, obj->layer->evas->pointer.x, obj->layer->evas->pointer.y, 1, 1); } obj->doing.in_move++; if (obj->smart.smart) { if (obj->smart.smart->smart_class->move) obj->smart.smart->smart_class->move(obj, nx, ny); } obj->cur.geometry.x = nx; obj->cur.geometry.y = ny; evas_object_update_bounding_box(obj); //// obj->cur.cache.geometry.validity = 0; obj->changed_move = EINA_TRUE; evas_object_change(obj); evas_object_clip_dirty(obj); obj->doing.in_move--; if (obj->layer->evas->events_frozen <= 0) { evas_object_recalc_clippees(obj); if (!pass) { if (!obj->smart.smart) { is = evas_object_is_in_output_rect(obj, obj->layer->evas->pointer.x, obj->layer->evas->pointer.y, 1, 1); if ((is ^ was) && obj->cur.visible) evas_event_feed_mouse_move(obj->layer->evas, obj->layer->evas->pointer.x, obj->layer->evas->pointer.y, obj->layer->evas->last_timestamp, NULL); } } } evas_object_inform_call_move(obj); } EAPI void evas_object_resize(Evas_Object *obj, Evas_Coord w, Evas_Coord h) { int is, was = 0, pass = 0, freeze =0; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); if (obj->delete_me) return; if (w < 0) w = 0; if (h < 0) h = 0; if (evas_object_intercept_call_resize(obj, w, h)) return; if (obj->doing.in_resize > 0) { WRN("evas_object_resize() called on object %p when in the middle of resizing the same object", obj); return; } if ((obj->cur.geometry.w == w) && (obj->cur.geometry.h == h)) return; if (obj->layer->evas->events_frozen <= 0) { pass = evas_event_passes_through(obj); freeze = evas_event_freezes_through(obj); if ((!pass) && (!freeze)) was = evas_object_is_in_output_rect(obj, obj->layer->evas->pointer.x, obj->layer->evas->pointer.y, 1, 1); } obj->doing.in_resize++; if (obj->smart.smart) { if (obj->smart.smart->smart_class->resize) obj->smart.smart->smart_class->resize(obj, w, h); } obj->cur.geometry.w = w; obj->cur.geometry.h = h; evas_object_update_bounding_box(obj); //// obj->cur.cache.geometry.validity = 0; evas_object_change(obj); evas_object_clip_dirty(obj); obj->doing.in_resize--; /* NB: evas_object_recalc_clippees was here previously ( < 08/07/2009) */ if (obj->layer->evas->events_frozen <= 0) { /* NB: If this creates glitches on screen then move to above position */ evas_object_recalc_clippees(obj); // if (obj->func->coords_recalc) obj->func->coords_recalc(obj); if (!pass) { if (!obj->smart.smart) { is = evas_object_is_in_output_rect(obj, obj->layer->evas->pointer.x, obj->layer->evas->pointer.y, 1, 1); if ((is ^ was) && (obj->cur.visible)) evas_event_feed_mouse_move(obj->layer->evas, obj->layer->evas->pointer.x, obj->layer->evas->pointer.y, obj->layer->evas->last_timestamp, NULL); } } } evas_object_inform_call_resize(obj); } EAPI void evas_object_geometry_get(const Evas_Object *obj, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h) { int nx = 0, ny = 0; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); if (x) *x = 0; if (y) *y = 0; if (w) *w = 0; if (h) *h = 0; return; MAGIC_CHECK_END(); if (obj->delete_me) { if (x) *x = 0; if (y) *y = 0; if (w) *w = 0; if (h) *h = 0; return; } nx = obj->cur.geometry.x; ny = obj->cur.geometry.y; if (!obj->is_frame) { if ((!obj->smart.parent) && (obj->smart.smart)) { int fx, fy; evas_output_framespace_get(obj->layer->evas, &fx, &fy, NULL, NULL); if (nx > 0) nx -= fx; if (ny > 0) ny -= fy; } } if (x) *x = nx; if (y) *y = ny; if (w) *w = obj->cur.geometry.w; if (h) *h = obj->cur.geometry.h; } static void _evas_object_size_hint_alloc(Evas_Object *obj) { if (obj->size_hints) return; EVAS_MEMPOOL_INIT(_mp_sh, "evas_size_hints", Evas_Size_Hints, 32, ); obj->size_hints = EVAS_MEMPOOL_ALLOC(_mp_sh, Evas_Size_Hints); if (!obj->size_hints) return; EVAS_MEMPOOL_PREP(_mp_sh, obj->size_hints, Evas_Size_Hints); obj->size_hints->max.w = -1; obj->size_hints->max.h = -1; obj->size_hints->align.x = 0.5; obj->size_hints->align.y = 0.5; } EAPI void evas_object_size_hint_min_get(const Evas_Object *obj, Evas_Coord *w, Evas_Coord *h) { MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); if (w) *w = 0; if (h) *h = 0; return; MAGIC_CHECK_END(); if ((!obj->size_hints) || obj->delete_me) { if (w) *w = 0; if (h) *h = 0; return; } if (w) *w = obj->size_hints->min.w; if (h) *h = obj->size_hints->min.h; } EAPI void evas_object_size_hint_min_set(Evas_Object *obj, Evas_Coord w, Evas_Coord h) { MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); if (obj->delete_me) return; _evas_object_size_hint_alloc(obj); if ((obj->size_hints->min.w == w) && (obj->size_hints->min.h == h)) return; obj->size_hints->min.w = w; obj->size_hints->min.h = h; evas_object_inform_call_changed_size_hints(obj); } EAPI void evas_object_size_hint_max_get(const Evas_Object *obj, Evas_Coord *w, Evas_Coord *h) { MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); if (w) *w = -1; if (h) *h = -1; return; MAGIC_CHECK_END(); if ((!obj->size_hints) || obj->delete_me) { if (w) *w = -1; if (h) *h = -1; return; } if (w) *w = obj->size_hints->max.w; if (h) *h = obj->size_hints->max.h; } EAPI void evas_object_size_hint_max_set(Evas_Object *obj, Evas_Coord w, Evas_Coord h) { MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); if (obj->delete_me) return; _evas_object_size_hint_alloc(obj); if ((obj->size_hints->max.w == w) && (obj->size_hints->max.h == h)) return; obj->size_hints->max.w = w; obj->size_hints->max.h = h; evas_object_inform_call_changed_size_hints(obj); } EAPI void evas_object_size_hint_request_get(const Evas_Object *obj, Evas_Coord *w, Evas_Coord *h) { MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); if (w) *w = 0; if (h) *h = 0; return; MAGIC_CHECK_END(); if ((!obj->size_hints) || obj->delete_me) { if (w) *w = 0; if (h) *h = 0; return; } if (w) *w = obj->size_hints->request.w; if (h) *h = obj->size_hints->request.h; } EAPI void evas_object_size_hint_request_set(Evas_Object *obj, Evas_Coord w, Evas_Coord h) { MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); if (obj->delete_me) return; _evas_object_size_hint_alloc(obj); if ((obj->size_hints->request.w == w) && (obj->size_hints->request.h == h)) return; obj->size_hints->request.w = w; obj->size_hints->request.h = h; evas_object_inform_call_changed_size_hints(obj); } EAPI void evas_object_size_hint_aspect_get(const Evas_Object *obj, Evas_Aspect_Control *aspect, Evas_Coord *w, Evas_Coord *h) { MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); if (aspect) *aspect = EVAS_ASPECT_CONTROL_NONE; if (w) *w = 0; if (h) *h = 0; return; MAGIC_CHECK_END(); if ((!obj->size_hints) || obj->delete_me) { if (aspect) *aspect = EVAS_ASPECT_CONTROL_NONE; if (w) *w = 0; if (h) *h = 0; return; } if (aspect) *aspect = obj->size_hints->aspect.mode; if (w) *w = obj->size_hints->aspect.size.w; if (h) *h = obj->size_hints->aspect.size.h; } EAPI void evas_object_size_hint_aspect_set(Evas_Object *obj, Evas_Aspect_Control aspect, Evas_Coord w, Evas_Coord h) { MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); if (obj->delete_me) return; _evas_object_size_hint_alloc(obj); if ((obj->size_hints->aspect.mode == aspect) && (obj->size_hints->aspect.size.w == w) && (obj->size_hints->aspect.size.h == h)) return; obj->size_hints->aspect.mode = aspect; obj->size_hints->aspect.size.w = w; obj->size_hints->aspect.size.h = h; evas_object_inform_call_changed_size_hints(obj); } EAPI void evas_object_size_hint_align_get(const Evas_Object *obj, double *x, double *y) { MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); if (x) *x = 0.5; if (y) *y = 0.5; return; MAGIC_CHECK_END(); if ((!obj->size_hints) || obj->delete_me) { if (x) *x = 0.5; if (y) *y = 0.5; return; } if (x) *x = obj->size_hints->align.x; if (y) *y = obj->size_hints->align.y; } EAPI void evas_object_size_hint_align_set(Evas_Object *obj, double x, double y) { MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); if (obj->delete_me) return; _evas_object_size_hint_alloc(obj); if ((obj->size_hints->align.x == x) && (obj->size_hints->align.y == y)) return; obj->size_hints->align.x = x; obj->size_hints->align.y = y; evas_object_inform_call_changed_size_hints(obj); } EAPI void evas_object_size_hint_weight_get(const Evas_Object *obj, double *x, double *y) { MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); if (x) *x = 0.0; if (y) *y = 0.0; return; MAGIC_CHECK_END(); if ((!obj->size_hints) || obj->delete_me) { if (x) *x = 0.0; if (y) *y = 0.0; return; } if (x) *x = obj->size_hints->weight.x; if (y) *y = obj->size_hints->weight.y; } EAPI void evas_object_size_hint_weight_set(Evas_Object *obj, double x, double y) { MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); if (obj->delete_me) return; _evas_object_size_hint_alloc(obj); if ((obj->size_hints->weight.x == x) && (obj->size_hints->weight.y == y)) return; obj->size_hints->weight.x = x; obj->size_hints->weight.y = y; evas_object_inform_call_changed_size_hints(obj); } EAPI void evas_object_size_hint_padding_get(const Evas_Object *obj, Evas_Coord *l, Evas_Coord *r, Evas_Coord *t, Evas_Coord *b) { MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); if (l) *l = 0; if (r) *r = 0; if (t) *t = 0; if (b) *b = 0; return; MAGIC_CHECK_END(); if ((!obj->size_hints) || obj->delete_me) { if (l) *l = 0; if (r) *r = 0; if (t) *t = 0; if (b) *b = 0; return; } if (l) *l = obj->size_hints->padding.l; if (r) *r = obj->size_hints->padding.r; if (t) *t = obj->size_hints->padding.t; if (b) *b = obj->size_hints->padding.b; } EAPI void evas_object_size_hint_padding_set(Evas_Object *obj, Evas_Coord l, Evas_Coord r, Evas_Coord t, Evas_Coord b) { MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); if (obj->delete_me) return; _evas_object_size_hint_alloc(obj); if ((obj->size_hints->padding.l == l) && (obj->size_hints->padding.r == r) && (obj->size_hints->padding.t == t) && (obj->size_hints->padding.b == b)) return; obj->size_hints->padding.l = l; obj->size_hints->padding.r = r; obj->size_hints->padding.t = t; obj->size_hints->padding.b = b; evas_object_inform_call_changed_size_hints(obj); } EAPI void evas_object_show(Evas_Object *obj) { MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); if (obj->delete_me) return; if (evas_object_intercept_call_show(obj)) return; if (obj->smart.smart) { if (obj->smart.smart->smart_class->show) obj->smart.smart->smart_class->show(obj); } if (obj->cur.visible) { return; } obj->cur.visible = 1; evas_object_change(obj); evas_object_clip_dirty(obj); if (obj->layer->evas->events_frozen <= 0) { evas_object_clip_across_clippees_check(obj); evas_object_recalc_clippees(obj); if ((!evas_event_passes_through(obj)) && (!evas_event_freezes_through(obj))) { if (!obj->smart.smart) { if (evas_object_is_in_output_rect(obj, obj->layer->evas->pointer.x, obj->layer->evas->pointer.y, 1, 1)) evas_event_feed_mouse_move(obj->layer->evas, obj->layer->evas->pointer.x, obj->layer->evas->pointer.y, obj->layer->evas->last_timestamp, NULL); } } } evas_object_inform_call_show(obj); } EAPI void evas_object_hide(Evas_Object *obj) { MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); if (obj->delete_me) return; if (evas_object_intercept_call_hide(obj)) return; if (obj->smart.smart) { if (obj->smart.smart->smart_class->hide) obj->smart.smart->smart_class->hide(obj); } if (!obj->cur.visible) { return; } obj->cur.visible = 0; evas_object_change(obj); evas_object_clip_dirty(obj); if (obj->layer->evas->events_frozen <= 0) { evas_object_clip_across_clippees_check(obj); evas_object_recalc_clippees(obj); if ((!evas_event_passes_through(obj)) && (!evas_event_freezes_through(obj))) { if ((!obj->smart.smart) || ((obj->cur.map) && (obj->cur.map->count == 4) && (obj->cur.usemap))) { if (!obj->mouse_grabbed) { if (evas_object_is_in_output_rect(obj, obj->layer->evas->pointer.x, obj->layer->evas->pointer.y, 1, 1)) evas_event_feed_mouse_move(obj->layer->evas, obj->layer->evas->pointer.x, obj->layer->evas->pointer.y, obj->layer->evas->last_timestamp, NULL); } /* this is at odds to handling events when an obj is moved out of the mouse * ore resized out or clipped out. if mouse is grabbed - regardless of * visibility, mouse move events should keep happening and mouse up. * for better or worse it's at least consistent. if (obj->delete_me) return; if (obj->mouse_grabbed > 0) obj->layer->evas->pointer.mouse_grabbed -= obj->mouse_grabbed; if ((obj->mouse_in) || (obj->mouse_grabbed > 0)) obj->layer->evas->pointer.object.in = eina_list_remove(obj->layer->evas->pointer.object.in, obj); obj->mouse_grabbed = 0; if (obj->layer->evas->events_frozen > 0) { obj->mouse_in = 0; return; } if (obj->mouse_in) { Evas_Event_Mouse_Out ev; _evas_object_event_new(); obj->mouse_in = 0; ev.buttons = obj->layer->evas->pointer.button; ev.output.x = obj->layer->evas->pointer.x; ev.output.y = obj->layer->evas->pointer.y; ev.canvas.x = obj->layer->evas->pointer.x; ev.canvas.y = obj->layer->evas->pointer.y; ev.data = NULL; ev.modifiers = &(obj->layer->evas->modifiers); ev.locks = &(obj->layer->evas->locks); ev.timestamp = obj->layer->evas->last_timestamp; ev.event_flags = EVAS_EVENT_FLAG_NONE; evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_OUT, &ev); _evas_post_event_callback_call(obj->layer->evas); } */ } } } else { /* if (obj->mouse_grabbed > 0) obj->layer->evas->pointer.mouse_grabbed -= obj->mouse_grabbed; if ((obj->mouse_in) || (obj->mouse_grabbed > 0)) obj->layer->evas->pointer.object.in = eina_list_remove(obj->layer->evas->pointer.object.in, obj); obj->mouse_grabbed = 0; obj->mouse_in = 0; */ } evas_object_inform_call_hide(obj); } EAPI Eina_Bool evas_object_visible_get(const Evas_Object *obj) { MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return 0; MAGIC_CHECK_END(); if (obj->delete_me) return 0; return obj->cur.visible; } EAPI void evas_object_color_set(Evas_Object *obj, int r, int g, int b, int a) { MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); if (obj->delete_me) return; if (r > 255) r = 255; if (r < 0) r = 0; if (g > 255) g = 255; if (g < 0) g = 0; if (b > 255) b = 255; if (b < 0) b = 0; if (a > 255) a = 255; if (a < 0) a = 0; if (r > a) { r = a; ERR("Evas only handles pre multiplied colors!"); } if (g > a) { g = a; ERR("Evas only handles pre multiplied colors!"); } if (b > a) { b = a; ERR("Evas only handles pre multiplied colors!"); } if (evas_object_intercept_call_color_set(obj, r, g, b, a)) return; if (obj->smart.smart) { if (obj->smart.smart->smart_class->color_set) obj->smart.smart->smart_class->color_set(obj, r, g, b, a); } if ((obj->cur.color.r == r) && (obj->cur.color.g == g) && (obj->cur.color.b == b) && (obj->cur.color.a == a)) return; obj->cur.color.r = r; obj->cur.color.g = g; obj->cur.color.b = b; evas_object_clip_dirty(obj); if ((obj->cur.color.a == 0) && (a == 0) && (obj->cur.render_op == EVAS_RENDER_BLEND)) return; obj->cur.color.a = a; obj->changed_color = EINA_TRUE; evas_object_change(obj); } EAPI void evas_object_color_get(const Evas_Object *obj, int *r, int *g, int *b, int *a) { MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); if (r) *r = 0; if (g) *g = 0; if (b) *b = 0; if (a) *a = 0; return; MAGIC_CHECK_END(); if (obj->delete_me) { if (r) *r = 0; if (g) *g = 0; if (b) *b = 0; if (a) *a = 0; return; } if (r) *r = obj->cur.color.r; if (g) *g = obj->cur.color.g; if (b) *b = obj->cur.color.b; if (a) *a = obj->cur.color.a; } EAPI void evas_object_anti_alias_set(Evas_Object *obj, Eina_Bool anti_alias) { MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); if (obj->delete_me) return; anti_alias = !!anti_alias; if (obj->cur.anti_alias == anti_alias)return; obj->cur.anti_alias = anti_alias; evas_object_change(obj); } EAPI Eina_Bool evas_object_anti_alias_get(const Evas_Object *obj) { MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return 0; MAGIC_CHECK_END(); if (obj->delete_me) return 0; return obj->cur.anti_alias; } EAPI void evas_object_scale_set(Evas_Object *obj, double scale) { MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); if (obj->delete_me) return; if (obj->cur.scale == scale) return; obj->cur.scale = scale; evas_object_change(obj); if (obj->func->scale_update) obj->func->scale_update(obj); } EAPI double evas_object_scale_get(const Evas_Object *obj) { MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return 0; MAGIC_CHECK_END(); if (obj->delete_me) return 1.0; return obj->cur.scale; } EAPI void evas_object_render_op_set(Evas_Object *obj, Evas_Render_Op render_op) { MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); if (obj->delete_me) return; if (obj->cur.render_op == render_op) return; obj->cur.render_op = render_op; evas_object_change(obj); } EAPI Evas_Render_Op evas_object_render_op_get(const Evas_Object *obj) { MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return 0; MAGIC_CHECK_END(); if (obj->delete_me) return EVAS_RENDER_BLEND; return obj->cur.render_op; } EAPI Evas * evas_object_evas_get(const Evas_Object *obj) { MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return NULL; MAGIC_CHECK_END(); if (obj->delete_me) return NULL; return obj->layer->evas; } EAPI Evas_Object * evas_object_top_at_xy_get(const Evas *e, Evas_Coord x, Evas_Coord y, Eina_Bool include_pass_events_objects, Eina_Bool include_hidden_objects) { Evas_Layer *lay; int xx, yy; MAGIC_CHECK(e, Evas, MAGIC_EVAS); return NULL; MAGIC_CHECK_END(); xx = x; yy = y; //// xx = evas_coord_world_x_to_screen(e, x); //// yy = evas_coord_world_y_to_screen(e, y); EINA_INLIST_REVERSE_FOREACH((EINA_INLIST_GET(e->layers)), lay) { Evas_Object *obj; EINA_INLIST_REVERSE_FOREACH(get_layer_objects(lay), obj) { if (obj->delete_me) continue; if ((!include_pass_events_objects) && (evas_event_passes_through(obj))) continue; if ((!include_hidden_objects) && (!obj->cur.visible)) continue; evas_object_clip_recalc(obj); if ((evas_object_is_in_output_rect(obj, xx, yy, 1, 1)) && (!obj->clip.clipees)) return obj; } } return NULL; } EAPI Evas_Object * evas_object_top_at_pointer_get(const Evas *e) { return evas_object_top_at_xy_get(e, e->pointer.x, e->pointer.y, EINA_TRUE, EINA_TRUE); } EAPI Evas_Object * evas_object_top_in_rectangle_get(const Evas *e, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h, Eina_Bool include_pass_events_objects, Eina_Bool include_hidden_objects) { Evas_Layer *lay; int xx, yy, ww, hh; MAGIC_CHECK(e, Evas, MAGIC_EVAS); return NULL; MAGIC_CHECK_END(); xx = x; yy = y; ww = w; hh = h; //// xx = evas_coord_world_x_to_screen(e, x); //// yy = evas_coord_world_y_to_screen(e, y); //// ww = evas_coord_world_x_to_screen(e, w); //// hh = evas_coord_world_y_to_screen(e, h); if (ww < 1) ww = 1; if (hh < 1) hh = 1; EINA_INLIST_REVERSE_FOREACH((EINA_INLIST_GET(e->layers)), lay) { Evas_Object *obj; EINA_INLIST_REVERSE_FOREACH(get_layer_objects(lay), obj) { if (obj->delete_me) continue; if ((!include_pass_events_objects) && (evas_event_passes_through(obj))) continue; if ((!include_hidden_objects) && (!obj->cur.visible)) continue; evas_object_clip_recalc(obj); if ((evas_object_is_in_output_rect(obj, xx, yy, ww, hh)) && (!obj->clip.clipees)) return obj; } } return NULL; } EAPI Eina_List * evas_objects_at_xy_get(const Evas *e, Evas_Coord x, Evas_Coord y, Eina_Bool include_pass_events_objects, Eina_Bool include_hidden_objects) { Eina_List *in = NULL; Evas_Layer *lay; int xx, yy; MAGIC_CHECK(e, Evas, MAGIC_EVAS); return NULL; MAGIC_CHECK_END(); xx = x; yy = y; //// xx = evas_coord_world_x_to_screen(e, x); //// yy = evas_coord_world_y_to_screen(e, y); EINA_INLIST_REVERSE_FOREACH((EINA_INLIST_GET(e->layers)), lay) { Evas_Object *obj; EINA_INLIST_REVERSE_FOREACH(get_layer_objects(lay), obj) { if (obj->delete_me) continue; if ((!include_pass_events_objects) && (evas_event_passes_through(obj))) continue; if ((!include_hidden_objects) && (!obj->cur.visible)) continue; evas_object_clip_recalc(obj); if ((evas_object_is_in_output_rect(obj, xx, yy, 1, 1)) && (!obj->clip.clipees)) in = eina_list_prepend(in, obj); } } return in; } /** * Retrieves the objects in the given rectangle region * @param e The given evas object. * @param x The horizontal coordinate. * @param y The vertical coordinate. * @param w The width size. * @param h The height size. * @param include_pass_events_objects Boolean Flag to include or not pass events objects * @param include_hidden_objects Boolean Flag to include or not hidden objects * @return The list of evas object in the rectangle region. * */ EAPI Eina_List * evas_objects_in_rectangle_get(const Evas *e, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h, Eina_Bool include_pass_events_objects, Eina_Bool include_hidden_objects) { Eina_List *in = NULL; Evas_Layer *lay; int xx, yy, ww, hh; MAGIC_CHECK(e, Evas, MAGIC_EVAS); return NULL; MAGIC_CHECK_END(); xx = x; yy = y; ww = w; hh = h; //// xx = evas_coord_world_x_to_screen(e, x); //// yy = evas_coord_world_y_to_screen(e, y); //// ww = evas_coord_world_x_to_screen(e, w); //// hh = evas_coord_world_y_to_screen(e, h); if (ww < 1) ww = 1; if (hh < 1) hh = 1; EINA_INLIST_REVERSE_FOREACH((EINA_INLIST_GET(e->layers)), lay) { Evas_Object *obj; EINA_INLIST_REVERSE_FOREACH(get_layer_objects(lay), obj) { if (obj->delete_me) continue; if ((!include_pass_events_objects) && (evas_event_passes_through(obj))) continue; if ((!include_hidden_objects) && (!obj->cur.visible)) continue; evas_object_clip_recalc(obj); if ((evas_object_is_in_output_rect(obj, xx, yy, ww, hh)) && (!obj->clip.clipees)) in = eina_list_prepend(in, obj); } } return in; } EAPI const char * evas_object_type_get(const Evas_Object *obj) { MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return NULL; MAGIC_CHECK_END(); if (obj->delete_me) return ""; return obj->type; } EAPI void evas_object_precise_is_inside_set(Evas_Object *obj, Eina_Bool precise) { MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); obj->precise_is_inside = precise; } EAPI Eina_Bool evas_object_precise_is_inside_get(const Evas_Object *obj) { MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return 0; MAGIC_CHECK_END(); return obj->precise_is_inside; } EAPI void evas_object_static_clip_set(Evas_Object *obj, Eina_Bool is_static_clip) { MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); obj->is_static_clip = is_static_clip; } EAPI Eina_Bool evas_object_static_clip_get(const Evas_Object *obj) { MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return 0; MAGIC_CHECK_END(); return obj->is_static_clip; } EAPI void evas_object_is_frame_object_set(Evas_Object *obj, Eina_Bool is_frame) { MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); obj->is_frame = is_frame; } EAPI Eina_Bool evas_object_is_frame_object_get(Evas_Object *obj) { MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return EINA_FALSE; MAGIC_CHECK_END(); return obj->is_frame; } evas-1.7.9/src/lib/canvas/Makefile.in0000664000175000017500000007224612234557302014304 00000000000000# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ @EVAS_USE_LINEBREAK_TRUE@am__append_1 = @LINEBREAK_CFLAGS@ @EVAS_USE_LINEBREAK_TRUE@am__append_2 = @LINEBREAK_LIBS@ subdir = src/lib/canvas DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/efl_attribute.m4 \ $(top_srcdir)/m4/efl_coverage.m4 \ $(top_srcdir)/m4/efl_doxygen.m4 \ $(top_srcdir)/m4/efl_fnmatch.m4 \ $(top_srcdir)/m4/efl_path_max.m4 \ $(top_srcdir)/m4/efl_shm_open.m4 $(top_srcdir)/m4/efl_tests.m4 \ $(top_srcdir)/m4/evas_check_engine.m4 \ $(top_srcdir)/m4/evas_check_loader.m4 \ $(top_srcdir)/m4/evas_converter.m4 \ $(top_srcdir)/m4/evas_dither.m4 \ $(top_srcdir)/m4/evas_scaler.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) am__DEPENDENCIES_1 = libevas_canvas_la_DEPENDENCIES = $(am__DEPENDENCIES_1) am_libevas_canvas_la_OBJECTS = evas_callbacks.lo evas_clip.lo \ evas_data.lo evas_events.lo evas_filter.lo evas_focus.lo \ evas_key.lo evas_key_grab.lo evas_layer.lo evas_main.lo \ evas_name.lo evas_object_image.lo evas_object_main.lo \ evas_object_inform.lo evas_object_intercept.lo \ evas_object_line.lo evas_object_polygon.lo \ evas_object_rectangle.lo evas_object_smart.lo \ evas_object_smart_clipped.lo evas_object_box.lo \ evas_object_table.lo evas_object_text.lo \ evas_object_textblock.lo evas_object_textgrid.lo \ evas_object_grid.lo evas_font_dir.lo evas_rectangle.lo \ evas_render.lo evas_smart.lo evas_stack.lo \ evas_async_events.lo evas_stats.lo evas_touch_point.lo \ evas_map.lo evas_gl.lo libevas_canvas_la_OBJECTS = $(am_libevas_canvas_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libevas_canvas_la_SOURCES) DIST_SOURCES = $(libevas_canvas_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHECK_CFLAGS = @CHECK_CFLAGS@ CHECK_LIBS = @CHECK_LIBS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@ DIRECTFB_LIBS = @DIRECTFB_LIBS@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ ECORE_EVAS_CFLAGS = @ECORE_EVAS_CFLAGS@ ECORE_EVAS_LIBS = @ECORE_EVAS_LIBS@ EDB_CFLAGS = @EDB_CFLAGS@ EDB_LIBS = @EDB_LIBS@ EDJE_CFLAGS = @EDJE_CFLAGS@ EDJE_LIBS = @EDJE_LIBS@ EET_CFLAGS = @EET_CFLAGS@ EET_LIBS = @EET_LIBS@ EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@ EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@ EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@ EFL_SHM_OPEN_LIBS = @EFL_SHM_OPEN_LIBS@ EGREP = @EGREP@ EINA_CFLAGS = @EINA_CFLAGS@ EINA_LIBS = @EINA_LIBS@ EVAS_CFLAGS = @EVAS_CFLAGS@ EVAS_GENERAL_CFLAGS = @EVAS_GENERAL_CFLAGS@ EVAS_GENERAL_LIBS = @EVAS_GENERAL_LIBS@ EVAS_LIBS = @EVAS_LIBS@ EVAS_SSE3_CFLAGS = @EVAS_SSE3_CFLAGS@ EVIL_CFLAGS = @EVIL_CFLAGS@ EVIL_LIBS = @EVIL_LIBS@ EXEEXT = @EXEEXT@ EXOTIC_CFLAGS = @EXOTIC_CFLAGS@ EXOTIC_LIBS = @EXOTIC_LIBS@ FGREP = @FGREP@ FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@ FONTCONFIG_LIBS = @FONTCONFIG_LIBS@ FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ FREETYPE_LIBS = @FREETYPE_LIBS@ FRIBIDI_CFLAGS = @FRIBIDI_CFLAGS@ FRIBIDI_LIBS = @FRIBIDI_LIBS@ GL_EET_CFLAGS = @GL_EET_CFLAGS@ GL_EET_LIBS = @GL_EET_LIBS@ GREP = @GREP@ HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@ HARFBUZZ_LIBS = @HARFBUZZ_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LINEBREAK_CFLAGS = @LINEBREAK_CFLAGS@ LINEBREAK_LIBS = @LINEBREAK_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MODULE_ARCH = @MODULE_ARCH@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PNG_CFLAGS = @PNG_CFLAGS@ PNG_LIBS = @PNG_LIBS@ RANLIB = @RANLIB@ SDL_CFLAGS = @SDL_CFLAGS@ SDL_LIBS = @SDL_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ SVG_CFLAGS = @SVG_CFLAGS@ SVG_LIBS = @SVG_LIBS@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VERSION = @VERSION@ VMAJ = @VMAJ@ WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ XCB_CFLAGS = @XCB_CFLAGS@ XCB_GL_CFLAGS = @XCB_GL_CFLAGS@ XCB_GL_LIBS = @XCB_GL_LIBS@ XCB_LIBS = @XCB_LIBS@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_ct_OBJC = @ac_ct_OBJC@ altivec_cflags = @altivec_cflags@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ dlopen_libs = @dlopen_libs@ docdir = @docdir@ dvidir = @dvidir@ edje_cc = @edje_cc@ efl_doxygen = @efl_doxygen@ efl_have_doxygen = @efl_have_doxygen@ evas_engine_buffer_cflags = @evas_engine_buffer_cflags@ evas_engine_buffer_libs = @evas_engine_buffer_libs@ evas_engine_direct3d_cflags = @evas_engine_direct3d_cflags@ evas_engine_direct3d_libs = @evas_engine_direct3d_libs@ evas_engine_directfb_cflags = @evas_engine_directfb_cflags@ evas_engine_directfb_libs = @evas_engine_directfb_libs@ evas_engine_fb_cflags = @evas_engine_fb_cflags@ evas_engine_fb_libs = @evas_engine_fb_libs@ evas_engine_gl_cocoa_cflags = @evas_engine_gl_cocoa_cflags@ evas_engine_gl_cocoa_libs = @evas_engine_gl_cocoa_libs@ evas_engine_gl_common_libs = @evas_engine_gl_common_libs@ evas_engine_gl_sdl_cflags = @evas_engine_gl_sdl_cflags@ evas_engine_gl_sdl_libs = @evas_engine_gl_sdl_libs@ evas_engine_gl_xcb_cflags = @evas_engine_gl_xcb_cflags@ evas_engine_gl_xcb_libs = @evas_engine_gl_xcb_libs@ evas_engine_gl_xlib_cflags = @evas_engine_gl_xlib_cflags@ evas_engine_gl_xlib_libs = @evas_engine_gl_xlib_libs@ evas_engine_psl1ght_cflags = @evas_engine_psl1ght_cflags@ evas_engine_psl1ght_libs = @evas_engine_psl1ght_libs@ evas_engine_software_16_sdl_cflags = @evas_engine_software_16_sdl_cflags@ evas_engine_software_16_sdl_libs = @evas_engine_software_16_sdl_libs@ evas_engine_software_16_wince_cflags = @evas_engine_software_16_wince_cflags@ evas_engine_software_16_wince_libs = @evas_engine_software_16_wince_libs@ evas_engine_software_16_x11_cflags = @evas_engine_software_16_x11_cflags@ evas_engine_software_16_x11_libs = @evas_engine_software_16_x11_libs@ evas_engine_software_8_x11_cflags = @evas_engine_software_8_x11_cflags@ evas_engine_software_8_x11_libs = @evas_engine_software_8_x11_libs@ evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@ evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@ evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@ evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@ evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ evas_image_loader_edb_libs = @evas_image_loader_edb_libs@ evas_image_loader_eet_cflags = @evas_image_loader_eet_cflags@ evas_image_loader_eet_libs = @evas_image_loader_eet_libs@ evas_image_loader_generic_cflags = @evas_image_loader_generic_cflags@ evas_image_loader_generic_libs = @evas_image_loader_generic_libs@ evas_image_loader_gif_cflags = @evas_image_loader_gif_cflags@ evas_image_loader_gif_libs = @evas_image_loader_gif_libs@ evas_image_loader_ico_cflags = @evas_image_loader_ico_cflags@ evas_image_loader_ico_libs = @evas_image_loader_ico_libs@ evas_image_loader_jpeg_cflags = @evas_image_loader_jpeg_cflags@ evas_image_loader_jpeg_libs = @evas_image_loader_jpeg_libs@ evas_image_loader_pmaps_cflags = @evas_image_loader_pmaps_cflags@ evas_image_loader_pmaps_libs = @evas_image_loader_pmaps_libs@ evas_image_loader_png_cflags = @evas_image_loader_png_cflags@ evas_image_loader_png_libs = @evas_image_loader_png_libs@ evas_image_loader_psd_cflags = @evas_image_loader_psd_cflags@ evas_image_loader_psd_libs = @evas_image_loader_psd_libs@ evas_image_loader_svg_cflags = @evas_image_loader_svg_cflags@ evas_image_loader_svg_libs = @evas_image_loader_svg_libs@ evas_image_loader_tga_cflags = @evas_image_loader_tga_cflags@ evas_image_loader_tga_libs = @evas_image_loader_tga_libs@ evas_image_loader_tiff_cflags = @evas_image_loader_tiff_cflags@ evas_image_loader_tiff_libs = @evas_image_loader_tiff_libs@ evas_image_loader_wbmp_cflags = @evas_image_loader_wbmp_cflags@ evas_image_loader_wbmp_libs = @evas_image_loader_wbmp_libs@ evas_image_loader_xpm_cflags = @evas_image_loader_xpm_cflags@ evas_image_loader_xpm_libs = @evas_image_loader_xpm_libs@ exec_prefix = @exec_prefix@ have_evas_engine_gl_x11 = @have_evas_engine_gl_x11@ have_evas_engine_gl_xcb = @have_evas_engine_gl_xcb@ have_evas_engine_gl_xlib = @have_evas_engine_gl_xlib@ have_evas_engine_software_x11 = @have_evas_engine_software_x11@ have_evas_engine_software_xcb = @have_evas_engine_software_xcb@ have_evas_engine_software_xlib = @have_evas_engine_software_xlib@ have_lcov = @have_lcov@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_enable_auto_import = @lt_enable_auto_import@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgconfig_requires_private = @pkgconfig_requires_private@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pthread_cflags = @pthread_cflags@ pthread_libs = @pthread_libs@ release_info = @release_info@ requirement_evas = @requirement_evas@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ shm_open_libs = @shm_open_libs@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ version_info = @version_info@ MAINTAINERCLEANFILES = Makefile.in AM_CPPFLAGS = -I. -I$(top_srcdir)/src/lib \ -I$(top_srcdir)/src/lib/include -I$(top_srcdir)/src/lib/cserve \ -I$(top_srcdir)/src/lib/cserve2 \ -DPACKAGE_BIN_DIR=\"$(bindir)\" \ -DPACKAGE_LIB_DIR=\"$(libdir)\" \ -DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" @FREETYPE_CFLAGS@ \ @EET_CFLAGS@ @FONTCONFIG_CFLAGS@ @EVAS_CFLAGS@ \ @EVAS_GENERAL_CFLAGS@ @EVIL_CFLAGS@ @PIXMAN_CFLAGS@ \ @FRIBIDI_CFLAGS@ $(am__append_1) noinst_LTLIBRARIES = libevas_canvas.la libevas_canvas_la_SOURCES = \ evas_callbacks.c \ evas_clip.c \ evas_data.c \ evas_events.c \ evas_filter.c \ evas_focus.c \ evas_key.c \ evas_key_grab.c \ evas_layer.c \ evas_main.c \ evas_name.c \ evas_object_image.c \ evas_object_main.c \ evas_object_inform.c \ evas_object_intercept.c \ evas_object_line.c \ evas_object_polygon.c \ evas_object_rectangle.c \ evas_object_smart.c \ evas_object_smart_clipped.c \ evas_object_box.c \ evas_object_table.c \ evas_object_text.c \ evas_object_textblock.c \ evas_object_textgrid.c \ evas_object_grid.c \ evas_font_dir.c \ evas_rectangle.c \ evas_render.c \ evas_smart.c \ evas_stack.c \ evas_async_events.c \ evas_stats.c \ evas_touch_point.c \ evas_map.c \ evas_gl.c #evas_object_textgrid.c libevas_canvas_la_LIBADD = @EVAS_LIBS@ @EVIL_LIBS@ $(am__append_2) all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/lib/canvas/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/lib/canvas/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libevas_canvas.la: $(libevas_canvas_la_OBJECTS) $(libevas_canvas_la_DEPENDENCIES) $(EXTRA_libevas_canvas_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libevas_canvas_la_OBJECTS) $(libevas_canvas_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_async_events.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_callbacks.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_clip.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_data.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_events.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_filter.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_focus.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_font_dir.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_gl.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_key.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_key_grab.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_layer.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_main.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_map.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_name.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_object_box.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_object_grid.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_object_image.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_object_inform.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_object_intercept.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_object_line.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_object_main.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_object_polygon.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_object_rectangle.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_object_smart.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_object_smart_clipped.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_object_table.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_object_text.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_object_textblock.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_object_textgrid.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_rectangle.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_render.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_smart.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_stack.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_stats.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_touch_point.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool clean-local \ clean-noinstLTLIBRARIES mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-libtool clean-local clean-noinstLTLIBRARIES \ cscopelist-am ctags ctags-am distclean distclean-compile \ distclean-generic distclean-libtool distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am clean-local: rm -rf *.gcno # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: evas-1.7.9/src/lib/canvas/evas_object_intercept.c0000664000175000017500000003741712175475547016763 00000000000000#include "evas_common.h" #include "evas_private.h" /* local calls */ static void evas_object_intercept_init(Evas_Object *obj); static void evas_object_intercept_deinit(Evas_Object *obj); static void evas_object_intercept_init(Evas_Object *obj) { if (!obj->interceptors) obj->interceptors = evas_mem_calloc(sizeof(Evas_Intercept_Func)); } static void evas_object_intercept_deinit(Evas_Object *obj) { if (!obj->interceptors) return; if ((obj->interceptors->show.func) || (obj->interceptors->hide.func) || (obj->interceptors->move.func) || (obj->interceptors->resize.func) || (obj->interceptors->raise.func) || (obj->interceptors->lower.func) || (obj->interceptors->stack_above.func) || (obj->interceptors->stack_below.func) || (obj->interceptors->layer_set.func) || (obj->interceptors->color_set.func) || (obj->interceptors->clip_set.func) || (obj->interceptors->clip_unset.func)) return; free(obj->interceptors); obj->interceptors = NULL; } /* private calls */ void evas_object_intercept_cleanup(Evas_Object *obj) { if (obj->interceptors) free(obj->interceptors); } int evas_object_intercept_call_show(Evas_Object *obj) { int ret; if (!obj->interceptors) return 0; if (obj->intercepted) return 0; obj->intercepted = EINA_TRUE; ret = !!(obj->interceptors->show.func); if (ret) obj->interceptors->show.func(obj->interceptors->show.data, obj); obj->intercepted = EINA_FALSE; return ret; } int evas_object_intercept_call_hide(Evas_Object *obj) { int ret; if (!obj->interceptors) return 0; if (obj->intercepted) return 0; obj->intercepted = EINA_TRUE; ret = !!(obj->interceptors->hide.func); if (ret) obj->interceptors->hide.func(obj->interceptors->hide.data, obj); obj->intercepted = EINA_FALSE; return ret; } int evas_object_intercept_call_move(Evas_Object *obj, Evas_Coord x, Evas_Coord y) { int ret; if (!obj->interceptors) return 0; if (obj->intercepted) return 0; obj->intercepted = EINA_TRUE; ret = !!(obj->interceptors->move.func); if (ret) obj->interceptors->move.func(obj->interceptors->move.data, obj, x, y); obj->intercepted = EINA_FALSE; return ret; } int evas_object_intercept_call_resize(Evas_Object *obj, Evas_Coord w, Evas_Coord h) { int ret; if (!obj->interceptors) return 0; if (obj->intercepted) return 0; obj->intercepted = EINA_TRUE; ret = !!(obj->interceptors->resize.func); if (ret) obj->interceptors->resize.func(obj->interceptors->resize.data, obj, w, h); obj->intercepted = EINA_FALSE; return ret; } int evas_object_intercept_call_raise(Evas_Object *obj) { int ret; if (!obj->interceptors) return 0; if (obj->intercepted) return 0; obj->intercepted = EINA_TRUE; ret = !!(obj->interceptors->raise.func); if (ret) obj->interceptors->raise.func(obj->interceptors->raise.data, obj); obj->intercepted = EINA_FALSE; return ret; } int evas_object_intercept_call_lower(Evas_Object *obj) { int ret; if (!obj->interceptors) return 0; if (obj->intercepted) return 0; obj->intercepted = EINA_TRUE; ret = !!(obj->interceptors->lower.func); if (ret) obj->interceptors->lower.func(obj->interceptors->lower.data, obj); obj->intercepted = EINA_FALSE; return ret; } int evas_object_intercept_call_stack_above(Evas_Object *obj, Evas_Object *above) { int ret; if (!obj->interceptors) return 0; if (obj->intercepted) return 0; obj->intercepted = EINA_TRUE; ret = !!(obj->interceptors->stack_above.func); if (ret) obj->interceptors->stack_above.func(obj->interceptors->stack_above.data, obj, above); obj->intercepted = EINA_FALSE; return ret; } int evas_object_intercept_call_stack_below(Evas_Object *obj, Evas_Object *below) { int ret; if (!obj->interceptors) return 0; if (obj->intercepted) return 0; obj->intercepted = EINA_TRUE; ret = !!(obj->interceptors->stack_below.func); if (ret) obj->interceptors->stack_below.func(obj->interceptors->stack_below.data, obj, below); obj->intercepted = EINA_FALSE; return ret; } int evas_object_intercept_call_layer_set(Evas_Object *obj, int l) { int ret; if (!obj->interceptors) return 0; if (obj->intercepted) return 0; obj->intercepted = EINA_TRUE; ret = !!(obj->interceptors->layer_set.func); if (ret) obj->interceptors->layer_set.func(obj->interceptors->layer_set.data, obj, l); obj->intercepted = EINA_FALSE; return ret; } int evas_object_intercept_call_color_set(Evas_Object *obj, int r, int g, int b, int a) { int ret; if (!obj->interceptors) return 0; if (obj->intercepted) return 0; obj->intercepted = EINA_TRUE; ret = !!(obj->interceptors->color_set.func); if (ret) obj->interceptors->color_set.func(obj->interceptors->color_set.data, obj, r, g, b, a); obj->intercepted = EINA_FALSE; return ret; } int evas_object_intercept_call_clip_set(Evas_Object *obj, Evas_Object *clip) { int ret; if (!obj->interceptors) return 0; if (obj->intercepted) return 0; obj->intercepted = EINA_TRUE; ret = !!(obj->interceptors->clip_set.func); if (ret) obj->interceptors->clip_set.func(obj->interceptors->clip_set.data, obj, clip); obj->intercepted = EINA_FALSE; return ret; } int evas_object_intercept_call_clip_unset(Evas_Object *obj) { int ret; if (!obj->interceptors) return 0; if (obj->intercepted) return 0; obj->intercepted = EINA_TRUE; ret = !!(obj->interceptors->clip_unset.func); if (ret) obj->interceptors->clip_unset.func(obj->interceptors->clip_unset.data, obj); obj->intercepted = EINA_FALSE; return ret; } /* public calls */ EAPI void evas_object_intercept_show_callback_add(Evas_Object *obj, Evas_Object_Intercept_Show_Cb func, const void *data) { MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); if (!func) return; evas_object_intercept_init(obj); if (!obj->interceptors) return; obj->interceptors->show.func = func; obj->interceptors->show.data = (void *)data; } EAPI void * evas_object_intercept_show_callback_del(Evas_Object *obj, Evas_Object_Intercept_Show_Cb func) { void *data; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return NULL; MAGIC_CHECK_END(); if (!func) return NULL; if (!obj->interceptors) return NULL; obj->interceptors->show.func = NULL; data = obj->interceptors->show.data; obj->interceptors->show.data = NULL; evas_object_intercept_deinit(obj); return data; } EAPI void evas_object_intercept_hide_callback_add(Evas_Object *obj, Evas_Object_Intercept_Hide_Cb func, const void *data) { MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); if (!func) return; evas_object_intercept_init(obj); if (!obj->interceptors) return; obj->interceptors->hide.func = func; obj->interceptors->hide.data = (void *)data; } EAPI void * evas_object_intercept_hide_callback_del(Evas_Object *obj, Evas_Object_Intercept_Hide_Cb func) { void *data; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return NULL; MAGIC_CHECK_END(); if (!func) return NULL; if (!obj->interceptors) return NULL; obj->interceptors->hide.func = NULL; data = obj->interceptors->hide.data; obj->interceptors->hide.data = NULL; evas_object_intercept_deinit(obj); return data; } EAPI void evas_object_intercept_move_callback_add(Evas_Object *obj, Evas_Object_Intercept_Move_Cb func, const void *data) { MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); if (!func) return; evas_object_intercept_init(obj); if (!obj->interceptors) return; obj->interceptors->move.func = func; obj->interceptors->move.data = (void *)data; } EAPI void * evas_object_intercept_move_callback_del(Evas_Object *obj, Evas_Object_Intercept_Move_Cb func) { void *data; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return NULL; MAGIC_CHECK_END(); if (!func) return NULL; if (!obj->interceptors) return NULL; obj->interceptors->move.func = NULL; data = obj->interceptors->move.data; obj->interceptors->move.data = NULL; evas_object_intercept_deinit(obj); return data; } EAPI void evas_object_intercept_resize_callback_add(Evas_Object *obj, Evas_Object_Intercept_Resize_Cb func, const void *data) { MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); if (!func) return; evas_object_intercept_init(obj); if (!obj->interceptors) return; obj->interceptors->resize.func = func; obj->interceptors->resize.data = (void *)data; } EAPI void * evas_object_intercept_resize_callback_del(Evas_Object *obj, Evas_Object_Intercept_Resize_Cb func) { void *data; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return NULL; MAGIC_CHECK_END(); if (!func) return NULL; if (!obj->interceptors) return NULL; obj->interceptors->resize.func = NULL; data = obj->interceptors->resize.data; obj->interceptors->resize.data = NULL; evas_object_intercept_deinit(obj); return data; } EAPI void evas_object_intercept_raise_callback_add(Evas_Object *obj, Evas_Object_Intercept_Raise_Cb func, const void *data) { MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); if (!func) return; evas_object_intercept_init(obj); if (!obj->interceptors) return; obj->interceptors->raise.func = func; obj->interceptors->raise.data = (void *)data; } EAPI void * evas_object_intercept_raise_callback_del(Evas_Object *obj, Evas_Object_Intercept_Raise_Cb func) { void *data; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return NULL; MAGIC_CHECK_END(); if (!func) return NULL; if (!obj->interceptors) return NULL; obj->interceptors->raise.func = NULL; data = obj->interceptors->raise.data; obj->interceptors->raise.data = NULL; evas_object_intercept_deinit(obj); return data; } EAPI void evas_object_intercept_lower_callback_add(Evas_Object *obj, Evas_Object_Intercept_Lower_Cb func, const void *data) { MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); if (!func) return; evas_object_intercept_init(obj); if (!obj->interceptors) return; obj->interceptors->lower.func = func; obj->interceptors->lower.data = (void *)data; } EAPI void * evas_object_intercept_lower_callback_del(Evas_Object *obj, Evas_Object_Intercept_Lower_Cb func) { void *data; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return NULL; MAGIC_CHECK_END(); if (!func) return NULL; if (!obj->interceptors) return NULL; obj->interceptors->lower.func = NULL; data = obj->interceptors->lower.data; obj->interceptors->lower.data = NULL; evas_object_intercept_deinit(obj); return data; } EAPI void evas_object_intercept_stack_above_callback_add(Evas_Object *obj, Evas_Object_Intercept_Stack_Above_Cb func, const void *data) { MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); if (!func) return; evas_object_intercept_init(obj); if (!obj->interceptors) return; obj->interceptors->stack_above.func = func; obj->interceptors->stack_above.data = (void *)data; } EAPI void * evas_object_intercept_stack_above_callback_del(Evas_Object *obj, Evas_Object_Intercept_Stack_Above_Cb func) { void *data; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return NULL; MAGIC_CHECK_END(); if (!func) return NULL; if (!obj->interceptors) return NULL; obj->interceptors->stack_above.func = NULL; data = obj->interceptors->stack_above.data; obj->interceptors->stack_above.data = NULL; evas_object_intercept_deinit(obj); return data; } EAPI void evas_object_intercept_stack_below_callback_add(Evas_Object *obj, Evas_Object_Intercept_Stack_Below_Cb func, const void *data) { MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); if (!func) return; evas_object_intercept_init(obj); if (!obj->interceptors) return; obj->interceptors->stack_below.func = func; obj->interceptors->stack_below.data = (void *)data; } EAPI void * evas_object_intercept_stack_below_callback_del(Evas_Object *obj, Evas_Object_Intercept_Stack_Below_Cb func) { void *data; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return NULL; MAGIC_CHECK_END(); if (!func) return NULL; if (!obj->interceptors) return NULL; obj->interceptors->stack_below.func = NULL; data = obj->interceptors->stack_below.data; obj->interceptors->stack_below.data = NULL; evas_object_intercept_deinit(obj); return data; } EAPI void evas_object_intercept_layer_set_callback_add(Evas_Object *obj, Evas_Object_Intercept_Layer_Set_Cb func, const void *data) { MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); if (!func) return; evas_object_intercept_init(obj); if (!obj->interceptors) return; obj->interceptors->layer_set.func = func; obj->interceptors->layer_set.data = (void *)data; } EAPI void * evas_object_intercept_layer_set_callback_del(Evas_Object *obj, Evas_Object_Intercept_Layer_Set_Cb func) { void *data; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return NULL; MAGIC_CHECK_END(); if (!func) return NULL; if (!obj->interceptors) return NULL; obj->interceptors->layer_set.func = NULL; data = obj->interceptors->layer_set.data; obj->interceptors->layer_set.data = NULL; evas_object_intercept_deinit(obj); return data; } EAPI void evas_object_intercept_color_set_callback_add(Evas_Object *obj, Evas_Object_Intercept_Color_Set_Cb func, const void *data) { MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); if (!func) return; evas_object_intercept_init(obj); if (!obj->interceptors) return; obj->interceptors->color_set.func = func; obj->interceptors->color_set.data = (void *)data; } EAPI void * evas_object_intercept_color_set_callback_del(Evas_Object *obj, Evas_Object_Intercept_Color_Set_Cb func) { void *data; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return NULL; MAGIC_CHECK_END(); if (!func) return NULL; if (!obj->interceptors) return NULL; obj->interceptors->color_set.func = NULL; data = obj->interceptors->color_set.data; obj->interceptors->color_set.data = NULL; evas_object_intercept_deinit(obj); return data; } EAPI void evas_object_intercept_clip_set_callback_add(Evas_Object *obj, Evas_Object_Intercept_Clip_Set_Cb func, const void *data) { MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); if (!func) return; evas_object_intercept_init(obj); if (!obj->interceptors) return; obj->interceptors->clip_set.func = func; obj->interceptors->clip_set.data = (void *)data; } EAPI void * evas_object_intercept_clip_set_callback_del(Evas_Object *obj, Evas_Object_Intercept_Clip_Set_Cb func) { void *data; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return NULL; MAGIC_CHECK_END(); if (!func) return NULL; if (!obj->interceptors) return NULL; obj->interceptors->clip_set.func = NULL; data = obj->interceptors->clip_set.data; obj->interceptors->clip_set.data = NULL; evas_object_intercept_deinit(obj); return data; } EAPI void evas_object_intercept_clip_unset_callback_add(Evas_Object *obj, Evas_Object_Intercept_Clip_Unset_Cb func, const void *data) { MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); if (!func) return; evas_object_intercept_init(obj); if (!obj->interceptors) return; obj->interceptors->clip_unset.func = func; obj->interceptors->clip_unset.data = (void *)data; } EAPI void * evas_object_intercept_clip_unset_callback_del(Evas_Object *obj, Evas_Object_Intercept_Clip_Unset_Cb func) { void *data; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return NULL; MAGIC_CHECK_END(); if (!func) return NULL; if (!obj->interceptors) return NULL; obj->interceptors->clip_unset.func = NULL; data = obj->interceptors->clip_unset.data; obj->interceptors->clip_unset.data = NULL; evas_object_intercept_deinit(obj); return data; } evas-1.7.9/src/lib/canvas/evas_object_line.c0000664000175000017500000003472112175475547015710 00000000000000#include "evas_common.h" #include "evas_private.h" /* private magic number for line objects */ static const char o_type[] = "line"; /* private struct for line object internal data */ typedef struct _Evas_Object_Line Evas_Object_Line; struct _Evas_Object_Line { DATA32 magic; struct { struct { Evas_Coord x1, y1, x2, y2; struct { Evas_Coord w, h; } object; } cache; Evas_Coord x1, y1, x2, y2; } cur, prev; void *engine_data; Eina_Bool changed : 1; }; /* private methods for line objects */ static void evas_object_line_init(Evas_Object *obj); static void *evas_object_line_new(void); static void evas_object_line_render(Evas_Object *obj, void *output, void *context, void *surface, int x, int y); static void evas_object_line_free(Evas_Object *obj); static void evas_object_line_render_pre(Evas_Object *obj); static void evas_object_line_render_post(Evas_Object *obj); static unsigned int evas_object_line_id_get(Evas_Object *obj); static unsigned int evas_object_line_visual_id_get(Evas_Object *obj); static void *evas_object_line_engine_data_get(Evas_Object *obj); static int evas_object_line_is_opaque(Evas_Object *obj); static int evas_object_line_was_opaque(Evas_Object *obj); static int evas_object_line_is_inside(Evas_Object *obj, Evas_Coord x, Evas_Coord y); static int evas_object_line_was_inside(Evas_Object *obj, Evas_Coord x, Evas_Coord y); static void evas_object_line_coords_recalc(Evas_Object *obj); static const Evas_Object_Func object_func = { /* methods (compulsory) */ evas_object_line_free, evas_object_line_render, evas_object_line_render_pre, evas_object_line_render_post, evas_object_line_id_get, evas_object_line_visual_id_get, evas_object_line_engine_data_get, /* these are optional. NULL = nothing */ NULL, NULL, NULL, NULL, evas_object_line_is_opaque, evas_object_line_was_opaque, evas_object_line_is_inside, evas_object_line_was_inside, evas_object_line_coords_recalc, NULL, NULL, NULL, NULL }; /* the actual api call to add a rect */ /* it has no other api calls as all properties are standard */ EVAS_MEMPOOL(_mp_obj); EAPI Evas_Object * evas_object_line_add(Evas *e) { Evas_Object *obj; MAGIC_CHECK(e, Evas, MAGIC_EVAS); return NULL; MAGIC_CHECK_END(); obj = evas_object_new(e); evas_object_line_init(obj); evas_object_inject(obj, e); return obj; } EAPI void evas_object_line_xy_set(Evas_Object *obj, Evas_Coord x1, Evas_Coord y1, Evas_Coord x2, Evas_Coord y2) { Evas_Object_Line *o; Evas_Coord min_x, max_x, min_y, max_y; int is, was = 0; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); o = (Evas_Object_Line *)(obj->object_data); MAGIC_CHECK(o, Evas_Object_Line, MAGIC_OBJ_LINE); return; MAGIC_CHECK_END(); if ((x1 == o->cur.x1) && (y1 == o->cur.y1) && (x2 == o->cur.x2) && (y2 == o->cur.y2)) return; if (obj->layer->evas->events_frozen <= 0) { if (!evas_event_passes_through(obj) && !evas_event_freezes_through(obj)) was = evas_object_is_in_output_rect(obj, obj->layer->evas->pointer.x, obj->layer->evas->pointer.y, 1, 1); } if (x1 < x2) { min_x = x1; max_x = x2; } else { min_x = x2; max_x = x1; } if (y1 < y2) { min_y = y1; max_y = y2; } else { min_y = y2; max_y = y1; } obj->cur.geometry.x = min_x; obj->cur.geometry.y = min_y; obj->cur.geometry.w = max_x - min_x + 2; obj->cur.geometry.h = max_y - min_y + 2; //// obj->cur.cache.geometry.validity = 0; o->cur.x1 = x1 - min_x; o->cur.y1 = y1 - min_y; o->cur.x2 = x2 - min_x; o->cur.y2 = y2 - min_y; o->changed = EINA_TRUE; evas_object_change(obj); evas_object_coords_recalc(obj); evas_object_clip_dirty(obj); if (obj->layer->evas->events_frozen <= 0) { is = evas_object_is_in_output_rect(obj, obj->layer->evas->pointer.x, obj->layer->evas->pointer.y, 1, 1); if (!evas_event_passes_through(obj) && !evas_event_freezes_through(obj)) { if ((is ^ was) && obj->cur.visible) evas_event_feed_mouse_move(obj->layer->evas, obj->layer->evas->pointer.x, obj->layer->evas->pointer.y, obj->layer->evas->last_timestamp, NULL); } } evas_object_inform_call_move(obj); evas_object_inform_call_resize(obj); } EAPI void evas_object_line_xy_get(const Evas_Object *obj, Evas_Coord *x1, Evas_Coord *y1, Evas_Coord *x2, Evas_Coord *y2) { Evas_Object_Line *o; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); if (x1) *x1 = 0; if (y1) *y1 = 0; if (x2) *x2 = 0; if (y2) *y2 = 0; return; MAGIC_CHECK_END(); o = (Evas_Object_Line *)(obj->object_data); MAGIC_CHECK(o, Evas_Object_Line, MAGIC_OBJ_LINE); if (x1) *x1 = 0; if (y1) *y1 = 0; if (x2) *x2 = 0; if (y2) *y2 = 0; return; MAGIC_CHECK_END(); if (x1) *x1 = obj->cur.geometry.x + o->cur.x1; if (y1) *y1 = obj->cur.geometry.y + o->cur.y1; if (x2) *x2 = obj->cur.geometry.x + o->cur.x2; if (y2) *y2 = obj->cur.geometry.y + o->cur.y2; } /* all nice and private */ static void evas_object_line_init(Evas_Object *obj) { /* alloc image ob, setup methods and default values */ obj->object_data = evas_object_line_new(); /* set up default settings for this kind of object */ obj->cur.color.r = 255; obj->cur.color.g = 255; obj->cur.color.b = 255; obj->cur.color.a = 255; obj->cur.geometry.x = 0; obj->cur.geometry.y = 0; obj->cur.geometry.w = 0; obj->cur.geometry.h = 0; obj->cur.layer = 0; obj->cur.anti_alias = EINA_TRUE; obj->cur.render_op = EVAS_RENDER_BLEND; /* set up object-specific settings */ obj->prev = obj->cur; /* set up methods (compulsory) */ obj->func = &object_func; obj->type = o_type; } static void * evas_object_line_new(void) { Evas_Object_Line *o; /* alloc obj private data */ EVAS_MEMPOOL_INIT(_mp_obj, "evas_object_line", Evas_Object_Line, 4, NULL); o = EVAS_MEMPOOL_ALLOC(_mp_obj, Evas_Object_Line); if (!o) return NULL; EVAS_MEMPOOL_PREP(_mp_obj, o, Evas_Object_Line); o->magic = MAGIC_OBJ_LINE; o->cur.x1 = 0; o->cur.y1 = 0; o->cur.x2 = 31; o->cur.y2 = 31; o->prev = o->cur; return o; } static void evas_object_line_free(Evas_Object *obj) { Evas_Object_Line *o; /* frees private object data. very simple here */ o = (Evas_Object_Line *)(obj->object_data); MAGIC_CHECK(o, Evas_Object_Line, MAGIC_OBJ_LINE); return; MAGIC_CHECK_END(); /* free obj */ o->magic = 0; EVAS_MEMPOOL_FREE(_mp_obj, o); } static void evas_object_line_render(Evas_Object *obj, void *output, void *context, void *surface, int x, int y) { Evas_Object_Line *o; /* render object to surface with context, and offxet by x,y */ o = (Evas_Object_Line *)(obj->object_data); obj->layer->evas->engine.func->context_color_set(output, context, obj->cur.cache.clip.r, obj->cur.cache.clip.g, obj->cur.cache.clip.b, obj->cur.cache.clip.a); obj->layer->evas->engine.func->context_multiplier_unset(output, context); obj->layer->evas->engine.func->context_anti_alias_set(output, context, obj->cur.anti_alias); obj->layer->evas->engine.func->context_render_op_set(output, context, obj->cur.render_op); obj->layer->evas->engine.func->line_draw(output, context, surface, o->cur.cache.x1 + x, o->cur.cache.y1 + y, o->cur.cache.x2 + x, o->cur.cache.y2 + y); } static void evas_object_line_render_pre(Evas_Object *obj) { Evas_Object_Line *o; int is_v, was_v; Eina_Bool changed_color = EINA_FALSE; /* dont pre-render the obj twice! */ if (obj->pre_render_done) return; obj->pre_render_done = EINA_TRUE; /* pre-render phase. this does anything an object needs to do just before */ /* rendering. this could mean loading the image data, retrieving it from */ /* elsewhere, decoding video etc. */ /* then when this is done the object needs to figure if it changed and */ /* if so what and where and add the appropriate redraw lines */ o = (Evas_Object_Line *)(obj->object_data); /* if someone is clipping this obj - go calculate the clipper */ if (obj->cur.clipper) { if (obj->cur.cache.clip.dirty) evas_object_clip_recalc(obj->cur.clipper); obj->cur.clipper->func->render_pre(obj->cur.clipper); } /* now figure what changed and add draw rects */ /* if it just became visible or invisible */ is_v = evas_object_is_visible(obj); was_v = evas_object_was_visible(obj); if (is_v != was_v) { evas_object_render_pre_visible_change(&obj->layer->evas->clip_changes, obj, is_v, was_v); goto done; } if (obj->changed_map) { evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, obj); goto done; } /* it's not visible - we accounted for it appearing or not so just abort */ if (!is_v) goto done; /* clipper changed this is in addition to anything else for obj */ evas_object_render_pre_clipper_change(&obj->layer->evas->clip_changes, obj); if ((obj->cur.color.r != obj->prev.color.r) || (obj->cur.color.g != obj->prev.color.g) || (obj->cur.color.b != obj->prev.color.b) || (obj->cur.color.a != obj->prev.color.a)) changed_color = EINA_TRUE; /* if we restacked (layer or just within a layer) */ /* or if it changed anti_alias */ /* or if ii changed render op */ /* or if it changed color */ if ((obj->restack) || (obj->cur.anti_alias != obj->prev.anti_alias) || (obj->cur.render_op != obj->prev.render_op) || (changed_color) ) { evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, obj); goto done; } /* if it changed geometry - and obviously not visibility or color */ /* calculate differences since we have a constant color fill */ /* we really only need to update the differences */ if ((obj->cur.geometry.x != obj->prev.geometry.x) || (obj->cur.geometry.y != obj->prev.geometry.y) || (obj->cur.geometry.w != obj->prev.geometry.w) || (obj->cur.geometry.h != obj->prev.geometry.h) || ((o->changed) && ((o->cur.x1 != o->prev.x1) || (o->cur.y1 != o->prev.y1) || (o->cur.x2 != o->prev.x2) || (o->cur.y2 != o->prev.y2))) ) { evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, obj); goto done; } done: evas_object_render_pre_effect_updates(&obj->layer->evas->clip_changes, obj, is_v, was_v); } static void evas_object_line_render_post(Evas_Object *obj) { Evas_Object_Line *o; /* this moves the current data to the previous state parts of the object */ /* in whatever way is safest for the object. also if we don't need object */ /* data anymore we can free it if the object deems this is a good idea */ o = (Evas_Object_Line *)(obj->object_data); /* remove those pesky changes */ evas_object_clip_changes_clean(obj); /* move cur to prev safely for object data */ evas_object_cur_prev(obj); o->prev = o->cur; o->changed = EINA_FALSE; } static unsigned int evas_object_line_id_get(Evas_Object *obj) { Evas_Object_Line *o; o = (Evas_Object_Line *)(obj->object_data); if (!o) return 0; return MAGIC_OBJ_LINE; } static unsigned int evas_object_line_visual_id_get(Evas_Object *obj) { Evas_Object_Line *o; o = (Evas_Object_Line *)(obj->object_data); if (!o) return 0; return MAGIC_OBJ_SHAPE; } static void *evas_object_line_engine_data_get(Evas_Object *obj) { Evas_Object_Line *o; o = (Evas_Object_Line *)(obj->object_data); if (!o) return NULL; return o->engine_data; } static int evas_object_line_is_opaque(Evas_Object *obj __UNUSED__) { /* this returns 1 if the internal object data implies that the object is */ /* currently fully opaque over the entire line it occupies */ return 0; } static int evas_object_line_was_opaque(Evas_Object *obj __UNUSED__) { /* this returns 1 if the internal object data implies that the object was */ /* previously fully opaque over the entire line it occupies */ return 0; } static int evas_object_line_is_inside(Evas_Object *obj __UNUSED__, Evas_Coord x __UNUSED__, Evas_Coord y __UNUSED__) { /* this returns 1 if the canvas co-ordinates are inside the object based */ /* on object private data. not much use for rects, but for polys, images */ /* and other complex objects it might be */ return 1; } static int evas_object_line_was_inside(Evas_Object *obj __UNUSED__, Evas_Coord x __UNUSED__, Evas_Coord y __UNUSED__) { /* this returns 1 if the canvas co-ordinates were inside the object based */ /* on object private data. not much use for rects, but for polys, images */ /* and other complex objects it might be */ return 1; } static void evas_object_line_coords_recalc(Evas_Object *obj) { Evas_Object_Line *o; o = (Evas_Object_Line *)(obj->object_data); o->cur.cache.x1 = obj->cur.geometry.x + o->cur.x1; o->cur.cache.y1 = obj->cur.geometry.y + o->cur.y1; o->cur.cache.x2 = obj->cur.geometry.x + o->cur.x2; o->cur.cache.y2 = obj->cur.geometry.y + o->cur.y2; o->cur.cache.object.w = obj->cur.geometry.w; o->cur.cache.object.h = obj->cur.geometry.h; } evas-1.7.9/src/lib/canvas/evas_clip.c0000664000175000017500000002474112175475547014363 00000000000000#include "evas_common.h" #include "evas_private.h" void evas_object_clip_dirty(Evas_Object *obj) { Eina_List *l; Evas_Object *data; if (obj->cur.cache.clip.dirty) return ; obj->cur.cache.clip.dirty = 1; EINA_LIST_FOREACH(obj->clip.clipees, l, data) evas_object_clip_dirty(data); } void evas_object_recalc_clippees(Evas_Object *obj) { Eina_List *l; Evas_Object *data; if (obj->cur.cache.clip.dirty) { evas_object_clip_recalc(obj); EINA_LIST_FOREACH(obj->clip.clipees, l, data) evas_object_recalc_clippees(data); } } int evas_object_clippers_was_visible(Evas_Object *obj) { if (obj->prev.visible) { if (obj->prev.clipper) return evas_object_clippers_is_visible(obj->prev.clipper); return 1; } return 0; } /* aaaaargh (pirate voice) ... notes! * * we have a big problem until now that's gone undetected... until yesterday. * that problem involves clips and maps and smart objects. hooray! 3 of the * more complex bits of evas - and maps and smart objects being one of the * nastiest ones. * * what is the problem? when a clip crosses a map boundary. that is to say * that when the clipper and clippee are not within the child tree of the * mapped object. in this case "bad stuff" happens. basically as clips are * then used to render objects, but they no longer apply as you'd expect as * the map transfomr the objects to-be-clipped separately from the objects * that clip them and this whole relationship is broken by maps. it somehow * managed to not break with the advent of smart objects. lucky me... but * maps killed it. now... what do we do? that is a good question. detect * such a broken link and "turn off clipping" in that event - sure. but this * isn't going to be cheap as ANY addition or deletion of a map to an object * or any change in clipper of an object or any change in smart object * membership needs to walk the obj tree both up and down from the changed * object and probably walk entire object trees to find these and mark them. * thats silly-expensive and i was about to fix it that way but it has since * dawned on me that that is just going to kill performance in some critical * areas like during object setup and manipulation, as well as teardown. * * aaaaagh! best for now is to document this as a "don't do it damnit!" thing * and have the apps avoid it. but even then - how to do this? this is not * easy. everywhere i turn so far i come up to either expensive operations, * breaks in logic, or nasty re-work of apps or4 the whole concept of clipping, * smart objects and maps... and that will have to wait for evas 2.0 * * the below does clip fixups etc. in the even a clip spans a map boundary. * not pretty, but necessary. */ #define MAP_ACROSS 1 static void evas_object_child_map_across_mark(Evas_Object *obj, Evas_Object *map_obj, Eina_Bool force) { #ifdef MAP_ACROSS if ((obj->cur.map_parent != map_obj) || force) { obj->cur.map_parent = map_obj; obj->cur.cache.clip.dirty = 1; evas_object_clip_recalc(obj); if (obj->smart.smart) { Evas_Object *obj2; EINA_INLIST_FOREACH(evas_object_smart_members_get_direct(obj), obj2) { // if obj has its own map - skip it. already done if ((obj2->cur.map) && (obj2->cur.usemap)) continue; evas_object_child_map_across_mark(obj2, map_obj, force); } } else if (obj->clip.clipees) { Eina_List *l; Evas_Object *obj2; EINA_LIST_FOREACH(obj->clip.clipees, l, obj2) evas_object_child_map_across_mark(obj2, map_obj, force); } } #endif } void evas_object_clip_across_check(Evas_Object *obj) { #ifdef MAP_ACROSS if (!obj->cur.clipper) return; if (obj->cur.clipper->cur.map_parent != obj->cur.map_parent) evas_object_child_map_across_mark(obj, obj->cur.map_parent, 1); #endif } void evas_object_clip_across_clippees_check(Evas_Object *obj) { #ifdef MAP_ACROSS Eina_List *l; Evas_Object *obj2; if (!obj->clip.clipees) return; // schloooooooooooow: // evas_object_child_map_across_mark(obj, obj->cur.map_parent, 1); // buggy: evas_object_child_map_across_mark(obj, obj->cur.map_parent, 0); if (obj->cur.cache.clip.dirty) { EINA_LIST_FOREACH(obj->clip.clipees, l, obj2) evas_object_clip_across_clippees_check(obj2); } #endif } // this function is called on an object when map is enabled or disabled on it // thus creating a "map boundary" at that point. // // FIXME: flip2 test broken in elm - might be show/hide of clips void evas_object_mapped_clip_across_mark(Evas_Object *obj) { #ifdef MAP_ACROSS if ((obj->cur.map) && (obj->cur.usemap)) evas_object_child_map_across_mark(obj, obj, 0); else { if (obj->smart.parent) evas_object_child_map_across_mark (obj, obj->smart.parent->cur.map_parent, 0); else evas_object_child_map_across_mark(obj, NULL, 0); } #endif } /* public functions */ extern const char *o_rect_type; EAPI void evas_object_clip_set(Evas_Object *obj, Evas_Object *clip) { MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); if (!clip) { evas_object_clip_unset(obj); return; } MAGIC_CHECK(clip, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); if (obj->cur.clipper == clip) return; if (obj == clip) { CRIT("Setting clip %p on itself", obj); return; } if (clip->delete_me) { CRIT("Setting deleted object %p as clip obj %p", clip, obj); abort(); return; } if (obj->delete_me) { CRIT("Setting object %p as clip to deleted obj %p", clip, obj); abort(); return; } if (!obj->layer) { CRIT("No evas surface associated with object (%p)", obj); abort(); return; } if ((obj->layer && clip->layer) && (obj->layer->evas != clip->layer->evas)) { CRIT("Setting object %p from Evas (%p) to another Evas (%p)", obj, obj->layer->evas, clip->layer->evas); abort(); return; } if (evas_object_intercept_call_clip_set(obj, clip)) return; // illegal to set anything but a rect as a clip if (clip->type != o_rect_type) { ERR("For now a clip on other object than a rectangle is disabled"); return; } if (obj->smart.smart) { if (obj->smart.smart->smart_class->clip_set) obj->smart.smart->smart_class->clip_set(obj, clip); } if (obj->cur.clipper) { /* unclip */ obj->cur.clipper->clip.clipees = eina_list_remove(obj->cur.clipper->clip.clipees, obj); if (!obj->cur.clipper->clip.clipees) { obj->cur.clipper->cur.have_clipees = 0; if (obj->cur.clipper->cur.visible) evas_damage_rectangle_add(obj->cur.clipper->layer->evas, obj->cur.clipper->cur.geometry.x, obj->cur.clipper->cur.geometry.y, obj->cur.clipper->cur.geometry.w, obj->cur.clipper->cur.geometry.h); } evas_object_change(obj->cur.clipper); evas_object_change(obj); obj->cur.clipper = NULL; } /* clip me */ if ((!clip->clip.clipees) && (clip->cur.visible)) { /* Basically it just went invisible */ clip->changed = 1; clip->layer->evas->changed = 1; evas_damage_rectangle_add(clip->layer->evas, clip->cur.geometry.x, clip->cur.geometry.y, clip->cur.geometry.w, clip->cur.geometry.h); } obj->cur.clipper = clip; clip->clip.clipees = eina_list_append(clip->clip.clipees, obj); if (clip->clip.clipees) { clip->cur.have_clipees = 1; if (clip->changed) evas_object_update_bounding_box(clip); } /* If it's NOT a rectangle set the mask bits too */ /* FIXME: Optmz ths chck */ if (clip->type == o_rect_type) obj->cur.mask = NULL; else { void *engdata; obj->cur.mask = clip; engdata = clip->func->engine_data_get(clip); /* FIXME: Images only */ clip->layer->evas->engine.func->image_mask_create( clip->layer->evas->engine.data.output, engdata); } evas_object_change(clip); evas_object_change(obj); evas_object_clip_dirty(obj); evas_object_recalc_clippees(obj); if ((!obj->smart.smart) && (!((obj->cur.map) && (obj->cur.usemap)))) { if (evas_object_is_in_output_rect(obj, obj->layer->evas->pointer.x, obj->layer->evas->pointer.y, 1, 1)) evas_event_feed_mouse_move(obj->layer->evas, obj->layer->evas->pointer.x, obj->layer->evas->pointer.y, obj->layer->evas->last_timestamp, NULL); } evas_object_clip_across_check(obj); } EAPI Evas_Object * evas_object_clip_get(const Evas_Object *obj) { MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return NULL; MAGIC_CHECK_END(); return obj->cur.clipper; } EAPI void evas_object_clip_unset(Evas_Object *obj) { MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); if (!obj->cur.clipper) return; /* unclip */ if (evas_object_intercept_call_clip_unset(obj)) return; if (obj->smart.smart) { if (obj->smart.smart->smart_class->clip_unset) obj->smart.smart->smart_class->clip_unset(obj); } if (obj->cur.clipper) { obj->cur.clipper->clip.clipees = eina_list_remove(obj->cur.clipper->clip.clipees, obj); if (!obj->cur.clipper->clip.clipees) { obj->cur.clipper->cur.have_clipees = 0; if (obj->cur.clipper->cur.visible) evas_damage_rectangle_add(obj->cur.clipper->layer->evas, obj->cur.clipper->cur.geometry.x, obj->cur.clipper->cur.geometry.y, obj->cur.clipper->cur.geometry.w, obj->cur.clipper->cur.geometry.h); } evas_object_change(obj->cur.clipper); } obj->cur.clipper = NULL; evas_object_change(obj); evas_object_clip_dirty(obj); evas_object_recalc_clippees(obj); if ((!obj->smart.smart) && (!((obj->cur.map) && (obj->cur.usemap)))) { if (evas_object_is_in_output_rect(obj, obj->layer->evas->pointer.x, obj->layer->evas->pointer.y, 1, 1)) evas_event_feed_mouse_move(obj->layer->evas, obj->layer->evas->pointer.x, obj->layer->evas->pointer.y, obj->layer->evas->last_timestamp, NULL); } evas_object_clip_across_check(obj); } EAPI const Eina_List * evas_object_clipees_get(const Evas_Object *obj) { MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return NULL; MAGIC_CHECK_END(); return obj->clip.clipees; } evas-1.7.9/src/lib/canvas/evas_object_textgrid.c0000664000175000017500000013145712175475547016617 00000000000000#include "evas_common.h" /* Includes evas_bidi_utils stuff. */ #include "evas_private.h" /* save typing */ #define ENFN obj->layer->evas->engine.func #define ENDT obj->layer->evas->engine.data.output /* private magic number for text objects */ static const char o_type[] = "textgrid"; /* private struct for line object internal data */ typedef struct _Evas_Object_Textgrid Evas_Object_Textgrid; typedef struct _Evas_Object_Textgrid_Cell Evas_Object_Textgrid_Cell; typedef struct _Evas_Object_Textgrid_Color Evas_Object_Textgrid_Color; typedef struct _Evas_Object_Textgrid_Row Evas_Object_Textgrid_Row; typedef struct _Evas_Object_Textgrid_Rect Evas_Object_Textgrid_Rect; typedef struct _Evas_Object_Textgrid_Text Evas_Object_Textgrid_Text; typedef struct _Evas_Object_Textgrid_Line Evas_Object_Textgrid_Line; typedef struct _Evas_Textgrid_Hash_Master Evas_Textgrid_Hash_Master; typedef struct _Evas_Textgrid_Hash_Glyphs Evas_Textgrid_Hash_Glyphs; struct _Evas_Textgrid_Hash_Master { int next[16]; }; struct _Evas_Textgrid_Hash_Glyphs { Evas_Text_Props props[256]; }; struct _Evas_Object_Textgrid { DATA32 magic; struct { int w, h; int char_width; int char_height; Evas_Object_Textgrid_Row *rows; Evas_Textgrid_Cell *cells; const char *font_source; const char *font_name; Evas_Font_Size font_size; Evas_Font_Description *font_description; Eina_Array palette_standard; Eina_Array palette_extended; } cur, prev; int max_ascent; Evas_Font_Set *font; Evas_Textgrid_Hash_Master *master; Evas_Textgrid_Hash_Glyphs *glyphs; unsigned char *master_used; unsigned char *glyphs_used; unsigned int master_length; unsigned int glyphs_length; unsigned int last_mask; Evas_Textgrid_Hash_Glyphs *last_glyphs; Eina_Array glyphs_cleanup; unsigned int changed : 1; unsigned int core_change : 1; unsigned int row_change : 1; unsigned int pal_change : 1; }; struct _Evas_Object_Textgrid_Color { unsigned char r, g, b, a; }; struct _Evas_Object_Textgrid_Row { int ch1, ch2; // change region, -1 == none int rects_num, texts_num, lines_num; int rects_alloc, texts_alloc, lines_alloc; Evas_Object_Textgrid_Rect *rects; // rects + colors Evas_Object_Textgrid_Text *texts; // text Evas_Object_Textgrid_Line *lines; // underlines, strikethroughs }; struct _Evas_Object_Textgrid_Rect { unsigned char r, g, b, a; int x, w; }; struct _Evas_Object_Textgrid_Text { unsigned char r, g, b, a; int x; unsigned int text_props; }; struct _Evas_Object_Textgrid_Line { unsigned char r, g, b, a; int x, w, y; }; /* private methods for textgrid objects */ static void evas_object_textgrid_init(Evas_Object *obj); static void *evas_object_textgrid_new(void); static void evas_object_textgrid_render(Evas_Object *obj, void *output, void *context, void *surface, int x, int y); static void evas_object_textgrid_free(Evas_Object *obj); static void evas_object_textgrid_render_pre(Evas_Object *obj); static void evas_object_textgrid_render_post(Evas_Object *obj); static unsigned int evas_object_textgrid_id_get(Evas_Object *obj); static unsigned int evas_object_textgrid_visual_id_get(Evas_Object *obj); static void *evas_object_textgrid_engine_data_get(Evas_Object *obj); static int evas_object_textgrid_is_opaque(Evas_Object *obj); static int evas_object_textgrid_was_opaque(Evas_Object *obj); static void evas_object_textgrid_scale_update(Evas_Object *obj); static const Evas_Object_Func object_func = { /* methods (compulsory) */ evas_object_textgrid_free, evas_object_textgrid_render, evas_object_textgrid_render_pre, evas_object_textgrid_render_post, evas_object_textgrid_id_get, evas_object_textgrid_visual_id_get, evas_object_textgrid_engine_data_get, /* these are optional. NULL = nothing */ NULL, NULL, NULL, NULL, evas_object_textgrid_is_opaque, evas_object_textgrid_was_opaque, NULL, NULL, NULL, evas_object_textgrid_scale_update, NULL, NULL, NULL }; EVAS_MEMPOOL(_mp_obj); /* almost generic private array data type */ static int evas_object_textgrid_textprop_get(Evas_Object *obj, Evas_Object_Textgrid *o, Eina_Unicode codepoint, unsigned int glyphs_index, unsigned char *used) { Evas_Textgrid_Hash_Glyphs *glyph; unsigned char idx = codepoint & 0xFF; glyph = &(o->glyphs[glyphs_index]); if (!glyph->props[idx].info) { Evas_Font_Instance *script_fi = NULL; Evas_Font_Instance *cur_fi = NULL; Evas_Script_Type script; script = evas_common_language_script_type_get(&codepoint, 1); ENFN->font_run_end_get(ENDT, o->font, &script_fi, &cur_fi, script, &codepoint, 1); memset(&(glyph->props[idx]), 0, sizeof(Evas_Text_Props)); evas_common_text_props_script_set(&(glyph->props[idx]), script); ENFN->font_text_props_info_create(ENDT, script_fi, &codepoint, &(glyph->props[idx]), NULL, 0, 1, EVAS_TEXT_PROPS_MODE_NONE); (*used)++; } else { evas_common_text_props_content_ref(&(glyph->props[idx])); } return glyphs_index << 8 | (unsigned int) idx; } static int evas_object_textgrid_textprop_ref(Evas_Object *obj, Evas_Object_Textgrid *o, Eina_Unicode codepoint) { unsigned int mask = 0xF0000000; unsigned int shift = 28; unsigned int offset = 0; unsigned int glyphs_index; if (o->last_glyphs) { if ((o->last_mask) && ((o->last_mask & codepoint) == o->last_mask)) goto end; } if (!o->master) { o->master = calloc(6, sizeof (Evas_Textgrid_Hash_Master)); o->master_used = calloc(6, sizeof (unsigned char)); o->glyphs = calloc(1, sizeof (Evas_Textgrid_Hash_Glyphs)); o->glyphs_used = calloc(1, sizeof (unsigned char)); if (!o->master_used) { free(o->master); o->master = NULL; free(o->master_used); o->master_used = NULL; free(o->glyphs); o->glyphs = NULL; free(o->glyphs_used); o->glyphs_used = NULL; return 0xFFFFFFFF; } while (shift > 8) { o->master[offset].next[(mask & codepoint) >> shift] = offset + 1; o->master_used[offset] = 1; offset++; shift -= 4; mask >>= 4; } o->glyphs_length = 1; o->master_length = 6; o->master[5].next[(codepoint & 0xF00) >> 8] = 0xFF000000; o->last_glyphs = o->glyphs; o->last_mask = codepoint & 0xFFFFFF00; goto end; } while ((shift > 8) && (o->master[offset].next[(codepoint & mask) >> shift] != 0)) { offset = o->master[offset].next[(codepoint & mask) >> shift]; mask >>= 4; shift -= 4; } if (shift > 8) { Evas_Textgrid_Hash_Master *tmp; unsigned char *tmp_used; int master_count; int count; int end; count = (shift - 8) / 4; master_count = o->master_length + count; /* FIXME: find empty entry */ tmp = realloc(o->master, master_count * sizeof (Evas_Textgrid_Hash_Master)); if (!tmp) return 0xFFFFFFFF; o->master = tmp; tmp_used = realloc(o->master_used, master_count); if (!tmp_used) return 0xFFFFFFFF; o->master_used = tmp_used; memset(o->master + o->master_length, 0, count * sizeof (Evas_Textgrid_Hash_Master)); memset(o->master_used + o->master_length, 1, count); end = o->master_length; o->master_length = master_count; while (shift > 8) { o->master[offset].next[(mask & codepoint) >> shift] = end; o->master_used[offset] = 1; end++; offset = end; shift -= 4; mask >>= 4; } offset--; } if (o->master[offset].next[(codepoint & mask) >> shift] == 0) { Evas_Textgrid_Hash_Glyphs *tmp; unsigned char *tmp_used; int count; /* FIXME: find empty entry */ count = o->glyphs_length + 1; tmp = realloc(o->glyphs, count * sizeof (Evas_Textgrid_Hash_Glyphs)); if (!tmp) return 0xFFFFFFFF; o->glyphs = tmp; tmp_used = realloc(o->glyphs_used, count * sizeof (unsigned char)); if (!tmp_used) return 0xFFFFFFFF; o->glyphs_used = tmp_used; o->master[offset].next[(codepoint & mask) >> shift] = o->glyphs_length + 0xFF000000; memset(o->glyphs + o->glyphs_length, 0, sizeof (Evas_Textgrid_Hash_Glyphs)); o->glyphs_used[o->glyphs_length] = 0; o->glyphs_length = count; } o->last_glyphs = o->glyphs + (o->master[offset].next[(codepoint & mask) >> shift] & 0xFFFFFF); o->last_mask = codepoint & 0xFFFFFF00; end: glyphs_index = o->last_glyphs - o->glyphs; return evas_object_textgrid_textprop_get(obj, o, codepoint, glyphs_index, &(o->glyphs_used[glyphs_index])); } static void evas_object_textgrid_textprop_unref(Evas_Object_Textgrid *o, unsigned int props_index) { Evas_Text_Props *props; props = &(o->glyphs[props_index >> 8].props[props_index & 0xFF]); if (props->info) { if (props->info->refcount == 1) eina_array_push(&o->glyphs_cleanup, (void *)((uintptr_t)props_index)); else { Evas_Glyph *glyphs = props->glyphs; int glyphs_length = props->glyphs_length; evas_common_text_props_content_nofree_unref(props); } } } static Evas_Text_Props * evas_object_textgrid_textprop_int_to(Evas_Object_Textgrid *o, int props) { return &(o->glyphs[props >> 8].props[props & 0xFF]); } /* all nice and private */ static void evas_object_textgrid_init(Evas_Object *obj) { /* alloc textgrid ob, setup methods and default values */ obj->object_data = evas_object_textgrid_new(); /* set up default settings for this kind of object */ obj->cur.color.r = 255; obj->cur.color.g = 255; obj->cur.color.b = 255; obj->cur.color.a = 255; obj->cur.geometry.x = 0; obj->cur.geometry.y = 0; obj->cur.geometry.w = 0; obj->cur.geometry.h = 0; obj->cur.layer = 0; /* set up object-specific settings */ obj->prev = obj->cur; /* set up methods (compulsory) */ obj->func = &object_func; obj->type = o_type; } static void * evas_object_textgrid_new(void) { Evas_Object_Textgrid *o; /* FIXME: using evas mempool like text ? */ EVAS_MEMPOOL_INIT(_mp_obj, "evas_object_textgrid", Evas_Object_Textgrid, 4, NULL); o = EVAS_MEMPOOL_ALLOC(_mp_obj, Evas_Object_Textgrid); EVAS_MEMPOOL_PREP(_mp_obj, o, Evas_Object_Textgrid); o->magic = MAGIC_OBJ_TEXTGRID; o->prev = o->cur; eina_array_step_set(&o->cur.palette_standard, sizeof (Eina_Array), 16); eina_array_step_set(&o->cur.palette_extended, sizeof (Eina_Array), 16); eina_array_step_set(&o->glyphs_cleanup, sizeof (Eina_Array), 16); return o; } static void evas_object_textgrid_row_clear(Evas_Object_Textgrid *o, Evas_Object_Textgrid_Row *r) { int i; if (r->rects) { free(r->rects); r->rects = NULL; r->rects_num = 0; r->rects_alloc = 0; } if (r->texts) { for (i = 0; i < r->texts_num; i++) if (r->texts[i].text_props != 0xFFFFFFFF) { evas_object_textgrid_textprop_unref(o, r->texts[i].text_props); r->texts[i].text_props = 0xFFFFFFFF; } free(r->texts); r->texts = NULL; r->texts_num = 0; r->texts_alloc = 0; } if (r->lines) { free(r->lines); r->lines = NULL; r->lines_num = 0; r->lines_alloc = 0; } } static void evas_object_textgrid_rows_clear(Evas_Object *obj) { Evas_Object_Textgrid *o; int i; o = (Evas_Object_Textgrid *)(obj->object_data); if (!o->cur.rows) return; for (i = 0; i < o->cur.h; i++) { evas_object_textgrid_row_clear(o, &(o->cur.rows[i])); o->cur.rows[i].ch1 = 0; o->cur.rows[i].ch2 = o->cur.w - 1; } } static void evas_object_textgrid_free(Evas_Object *obj) { Evas_Object_Textgrid_Color *c; Evas_Object_Textgrid *o; /* frees private object data. very simple here */ o = (Evas_Object_Textgrid *)(obj->object_data); MAGIC_CHECK(o, Evas_Object_Textgrid, MAGIC_OBJ_TEXTGRID); return; MAGIC_CHECK_END(); /* free obj */ evas_object_textgrid_rows_clear(obj); if (o->cur.rows) free(o->cur.rows); if (o->cur.font_name) eina_stringshare_del(o->cur.font_name); if (o->cur.font_source) eina_stringshare_del(o->cur.font_source); if (o->cur.font_description) evas_font_desc_unref(o->cur.font_description); if (o->font) evas_font_free(obj->layer->evas, o->font); if (o->cur.cells) free(o->cur.cells); while ((c = eina_array_pop(&o->cur.palette_standard))) free(c); eina_array_flush(&o->cur.palette_standard); while ((c = eina_array_pop(&o->cur.palette_extended))) free(c); eina_array_flush(&o->cur.palette_extended); while (eina_array_count(&o->glyphs_cleanup) > 0) { Evas_Text_Props *prop; unsigned int props_index; props_index = (unsigned int) (intptr_t) eina_array_pop(&o->glyphs_cleanup); prop = &(o->glyphs[props_index >> 8].props[props_index & 0xFF]); evas_common_text_props_content_nofree_unref(prop); if (!prop->info) { o->glyphs_used[props_index >> 8]--; if (!o->glyphs_used[props_index >> 8]) { /* FIXME: cleanup the master tree */ } } } eina_array_flush(&o->glyphs_cleanup); free(o->master); free(o->glyphs); free(o->master_used); free(o->glyphs_used); o->magic = 0; /* FIXME: using evas mempool like text ? */ EVAS_MEMPOOL_FREE(_mp_obj, o); } static void evas_object_textgrid_row_rect_append(Evas_Object_Textgrid_Row *row, int x, int w, int r, int g, int b, int a) { row->rects_num++; if (row->rects_num > row->rects_alloc) { Evas_Object_Textgrid_Rect *t; row->rects_alloc += 8; // dont expect many rects per line t = realloc(row->rects, sizeof(Evas_Object_Textgrid_Rect) * row->rects_alloc); if (!t) { row->rects_num--; return; } row->rects = t; } row->rects[row->rects_num - 1].x = x; row->rects[row->rects_num - 1].w = w; row->rects[row->rects_num - 1].r = r; row->rects[row->rects_num - 1].g = g; row->rects[row->rects_num - 1].b = b; row->rects[row->rects_num - 1].a = a; } static void evas_object_textgrid_row_text_append(Evas_Object_Textgrid_Row *row, Evas_Object *obj, Evas_Object_Textgrid *o, int x, Eina_Unicode codepoint, int r, int g, int b, int a) { row->texts_num++; if (row->texts_num > row->texts_alloc) { Evas_Object_Textgrid_Text *t; row->texts_alloc += 32; // expect more text per line t = realloc(row->texts, sizeof(Evas_Object_Textgrid_Text) * row->texts_alloc); if (!t) { row->texts_num--; return; } row->texts = t; } row->texts[row->texts_num - 1].text_props = evas_object_textgrid_textprop_ref(obj, o, codepoint); row->texts[row->texts_num - 1].x = x; row->texts[row->texts_num - 1].r = r; row->texts[row->texts_num - 1].g = g; row->texts[row->texts_num - 1].b = b; row->texts[row->texts_num - 1].a = a; } static void evas_object_textgrid_row_line_append(Evas_Object_Textgrid_Row *row, int x, int w, int y, int r, int g, int b, int a) { row->lines_num++; if (row->lines_num > row->lines_alloc) { Evas_Object_Textgrid_Line *t; row->lines_alloc += 8; // dont expect many lines per line t = realloc(row->lines, sizeof(Evas_Object_Textgrid_Line) * row->lines_alloc); if (!t) { row->lines_num--; return; } row->lines = t; } row->lines[row->lines_num - 1].x = x; row->lines[row->lines_num - 1].w = w; row->lines[row->lines_num - 1].y = y; row->lines[row->lines_num - 1].r = r; row->lines[row->lines_num - 1].g = g; row->lines[row->lines_num - 1].b = b; row->lines[row->lines_num - 1].a = a; } static void evas_object_textgrid_render(Evas_Object *obj, void *output, void *context, void *surface, int x, int y) { Evas_Object_Textgrid *o; Evas_Textgrid_Cell *cells; Evas_Object_Textgrid_Color *c; Eina_Array *palette; int xx, yy, xp, yp, w, h, ww, hh; int rr = 0, rg = 0, rb = 0, ra = 0, rx = 0, rw = 0, run; /* render object to surface with context, and offxet by x,y */ o = (Evas_Object_Textgrid *)(obj->object_data); ENFN->context_multiplier_unset(output, context); ENFN->context_render_op_set(output, context, obj->cur.render_op); if (!(o->font) || (!o->cur.cells)) return; w = o->cur.char_width; h = o->cur.char_height; ww = obj->cur.geometry.w; hh = obj->cur.geometry.h; // generate row data from cells (and only deal with rows that updated) for (yy = 0, cells = o->cur.cells; yy < o->cur.h; yy++) { Evas_Object_Textgrid_Row *row = &(o->cur.rows[yy]); if (row->ch1 < 0) { cells += o->cur.w; continue; } row->ch1 = -1; row->ch2 = 0; run = 0; xp = 0; for (xx = 0; xx < o->cur.w; xx++, cells++) { if (cells->bg_extended) palette = &(o->cur.palette_extended); else palette = &(o->cur.palette_standard); if (cells->bg >= eina_array_count(palette)) c = NULL; else c = eina_array_data_get(palette, cells->bg); if ((c) && (c->a > 0)) { if (!run) { run = 1; rr = c->r; rg = c->g; rb = c->b; ra = c->a; rx = xp; rw = w; } else if ((c->r != rr) || (c->g != rg) || (c->b != rb) || (c->a != ra)) { evas_object_textgrid_row_rect_append(row, rx, rw, rr, rg, rb, ra); rr = c->r; rg = c->g; rb = c->b; ra = c->a; rx = xp; rw = w; } else rw += w; } else if (run) { run = 0; evas_object_textgrid_row_rect_append(row, rx, rw, rr, rg, rb, ra); } if (cells->codepoint > 0) { if (cells->fg_extended) palette = &(o->cur.palette_extended); else palette = &(o->cur.palette_standard); if (cells->fg >= eina_array_count(palette)) c = NULL; else c = eina_array_data_get(palette, cells->fg); if ((c) && (c->a > 0)) { evas_object_textgrid_row_text_append(row, obj, o, xp, cells->codepoint, c->r, c->g, c->b, c->a); // XXX: underlines and strikethroughs dont get // merghed into horizontal runs like bg rects above if (cells->underline) evas_object_textgrid_row_line_append(row, xp, w, o->max_ascent + 1, c->r, c->g, c->b, c->a); if (cells->strikethrough) evas_object_textgrid_row_line_append(row, xp, w, ((3 * o->max_ascent) / 4), c->r, c->g, c->b, c->a); } } xp += w; } if (run) { run = 0; evas_object_textgrid_row_rect_append(row, rx, rw, rr, rg, rb, ra); } } yp = obj->cur.geometry.y + y; // draw the row data that is generated from the cell array for (yy = 0, cells = o->cur.cells; yy < o->cur.h; yy++) { Evas_Object_Textgrid_Row *row = &(o->cur.rows[yy]); xp = obj->cur.geometry.x + x; for (xx = 0; xx < row->rects_num; xx++) { ENFN->context_color_set(output, context, row->rects[xx].r, row->rects[xx].g, row->rects[xx].b, row->rects[xx].a); ENFN->rectangle_draw(output, context, surface, xp + row->rects[xx].x, yp, row->rects[xx].w, h); } for (xx = 0; xx < row->texts_num; xx++) { ENFN->context_color_set(output, context, row->texts[xx].r, row->texts[xx].g, row->texts[xx].b, row->texts[xx].a); ENFN->font_draw(output, context, surface, o->font, xp + row->texts[xx].x, yp + o->max_ascent, ww, hh, ww, hh, evas_object_textgrid_textprop_int_to(o, row->texts[xx].text_props)); } for (xx = 0; xx < row->lines_num; xx++) { ENFN->context_color_set(output, context, row->lines[xx].r, row->lines[xx].g, row->lines[xx].b, row->lines[xx].a); ENFN->rectangle_draw(output, context, surface, xp + row->lines[xx].x, yp + row->lines[xx].y, row->lines[xx].w, 1); } yp += h; } } static void evas_object_textgrid_render_pre(Evas_Object *obj) { Evas_Object_Textgrid *o; int is_v, was_v; /* dont pre-render the obj twice! */ if (obj->pre_render_done) return; obj->pre_render_done = 1; /* pre-render phase. this does anything an object needs to do just before */ /* rendering. this could mean loading the image data, retrieving it from */ /* elsewhere, decoding video etc. */ /* then when this is done the object needs to figure if it changed and */ /* if so what and where and add thr appropriate redraw rectangles */ o = (Evas_Object_Textgrid *)(obj->object_data); /* if someone is clipping this obj - go calculate the clipper */ if (obj->cur.clipper) { if (obj->cur.cache.clip.dirty) evas_object_clip_recalc(obj->cur.clipper); obj->cur.clipper->func->render_pre(obj->cur.clipper); } /* now figure what changed and add draw rects */ /* if it just became visible or invisible */ is_v = evas_object_is_visible(obj); was_v = evas_object_was_visible(obj); if (is_v != was_v) { evas_object_render_pre_visible_change(&obj->layer->evas->clip_changes, obj, is_v, was_v); goto done; } if (obj->changed_map) { evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, obj); goto done; } /* its not visible - we accounted for it appearing or not so just abort */ if (!is_v) goto done; /* clipper changed this is in addition to anything else for obj */ evas_object_render_pre_clipper_change(&obj->layer->evas->clip_changes, obj); /* if we restacked (layer or just within a layer) and dont clip anyone */ if (obj->restack) { evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, obj); goto done; } /* if it changed color */ if ((obj->cur.color.r != obj->prev.color.r) || (obj->cur.color.g != obj->prev.color.g) || (obj->cur.color.b != obj->prev.color.b) || (obj->cur.color.a != obj->prev.color.a)) { evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, obj); goto done; } /* if it changed geometry - and obviously not visibility or color */ /* calculate differences since we have a constant color fill */ /* we really only need to update the differences */ if ((obj->cur.geometry.x != obj->prev.geometry.x) || (obj->cur.geometry.y != obj->prev.geometry.y) || (obj->cur.geometry.w != obj->prev.geometry.w) || (obj->cur.geometry.h != obj->prev.geometry.h)) { evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, obj); goto done; } if (obj->cur.render_op != obj->prev.render_op) { evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, obj); goto done; } if (obj->cur.scale != obj->prev.scale) { evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, obj); goto done; } if (o->changed) { if (o->core_change) { if ((o->cur.h != o->prev.h) || (o->cur.w != o->prev.w) || (o->cur.font_size != o->prev.font_size) || ((o->cur.font_name) && (o->prev.font_name) && (strcmp(o->cur.font_name, o->prev.font_name))) || ((o->cur.font_name) && (!o->prev.font_name)) || ((!o->cur.font_name) && (o->prev.font_name))) { evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, obj); goto done; } } if (o->pal_change) { evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, obj); goto done; } if (o->row_change) { int i; for (i = 0; i < o->cur.h; i++) { Evas_Object_Textgrid_Row *r = &(o->cur.rows[i]); if (r->ch1 >= 0) evas_add_rect(&obj->layer->evas->clip_changes, obj->cur.geometry.x + (r->ch1 * o->cur.char_width), obj->cur.geometry.y + (i * o->cur.char_height), (r->ch2 - r->ch1 + 1) * o->cur.char_width, o->cur.char_height); } } } done: o->core_change = 0; o->row_change = 0; o->pal_change = 0; evas_object_render_pre_effect_updates(&obj->layer->evas->clip_changes, obj, is_v, was_v); } static void evas_object_textgrid_render_post(Evas_Object *obj) { Evas_Object_Textgrid *o; /* this moves the current data to the previous state parts of the object */ /* in whatever way is safest for the object. also if we don't need object */ /* data anymore we can free it if the object deems this is a good idea */ o = (Evas_Object_Textgrid *)(obj->object_data); /* remove those pesky changes */ evas_object_clip_changes_clean(obj); /* move cur to prev safely for object data */ evas_object_cur_prev(obj); o->prev = o->cur; o->changed = 0; while (eina_array_count(&o->glyphs_cleanup) > 0) { Evas_Text_Props *prop; unsigned int props_index; props_index = (unsigned int) (intptr_t) eina_array_pop(&o->glyphs_cleanup); prop = &(o->glyphs[props_index >> 8].props[props_index & 0xFF]); evas_common_text_props_content_nofree_unref(prop); if (!prop->info) { o->glyphs_used[props_index >> 8]--; if (!o->glyphs_used[props_index >> 8]) { /* FIXME: cleanup the master tree */ } } } } static unsigned int evas_object_textgrid_id_get(Evas_Object *obj) { Evas_Object_Textgrid *o; o = (Evas_Object_Textgrid *)(obj->object_data); if (!o) return 0; return MAGIC_OBJ_TEXTGRID; } static unsigned int evas_object_textgrid_visual_id_get(Evas_Object *obj) { Evas_Object_Textgrid *o; o = (Evas_Object_Textgrid *)(obj->object_data); if (!o) return 0; return MAGIC_OBJ_SHAPE; } static void * evas_object_textgrid_engine_data_get(Evas_Object *obj) { Evas_Object_Textgrid *o; o = (Evas_Object_Textgrid *)(obj->object_data); if (!o) return NULL; return o->font; } static int evas_object_textgrid_is_opaque(Evas_Object *obj __UNUSED__) { /* this returns 1 if the internal object data implies that the object is currently fully opaque over the entire gradient it occupies */ return 0; } static int evas_object_textgrid_was_opaque(Evas_Object *obj __UNUSED__) { /* this returns 1 if the internal object data implies that the object was currently fully opaque over the entire gradient it occupies */ return 0; } static void evas_object_textgrid_scale_update(Evas_Object *obj) { Evas_Object_Textgrid *o; int font_size; const char *font_name; o = (Evas_Object_Textgrid *)(obj->object_data); font_name = eina_stringshare_add(o->cur.font_name); font_size = o->cur.font_size; if (o->cur.font_name) eina_stringshare_del(o->cur.font_name); o->cur.font_name = NULL; o->prev.font_name = NULL; o->cur.font_size = 0; o->prev.font_size = 0; evas_object_textgrid_font_set(obj, font_name, font_size); } /********************* LOCAL *********************/ /********************* API *********************/ EAPI Evas_Object * evas_object_textgrid_add(Evas *e) { Evas_Object *obj; MAGIC_CHECK(e, Evas, MAGIC_EVAS); return NULL; MAGIC_CHECK_END(); obj = evas_object_new(e); evas_object_textgrid_init(obj); evas_object_inject(obj, e); return obj; } EAPI void evas_object_textgrid_size_set(Evas_Object *obj, int w, int h) { Evas_Object_Textgrid *o; int i; if ((h <= 0) || (w <= 0)) return; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); o = (Evas_Object_Textgrid *)(obj->object_data); MAGIC_CHECK(o, Evas_Object_Textgrid, MAGIC_OBJ_TEXTGRID); return; MAGIC_CHECK_END(); if ((o->cur.w == w) && (o->cur.h == h)) return; evas_object_textgrid_rows_clear(obj); if (o->cur.rows) { free(o->cur.rows); o->cur.rows = NULL; } if (o->cur.cells) { free(o->cur.cells); o->cur.cells = NULL; } o->cur.cells = calloc(w * h, sizeof(Evas_Textgrid_Cell)); if (!o->cur.cells) return; o->cur.rows = calloc(h, sizeof(Evas_Object_Textgrid_Row)); if (!o->cur.rows) { free(o->cur.cells); o->cur.cells = NULL; return; } for (i = 0; i < h; i++) { o->cur.rows[i].ch1 = 0; o->cur.rows[i].ch2 = w - 1; } o->cur.w = w; o->cur.h = h; o->changed = 1; o->core_change = 1; evas_object_change(obj); } EAPI void evas_object_textgrid_size_get(const Evas_Object *obj, int *w, int *h) { Evas_Object_Textgrid *o; if (h) *h = 0; if (w) *w = 0; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); o = (Evas_Object_Textgrid *)(obj->object_data); MAGIC_CHECK(o, Evas_Object_Textgrid, MAGIC_OBJ_TEXTGRID); return; MAGIC_CHECK_END(); if (w) *w = o->cur.w; if (h) *h = o->cur.h; } EAPI void evas_object_textgrid_font_source_set(Evas_Object *obj, const char *font_source) { Evas_Object_Textgrid *o; if ((!font_source) || (!*font_source)) return; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); o = (Evas_Object_Textgrid *)(obj->object_data); MAGIC_CHECK(o, Evas_Object_Textgrid, MAGIC_OBJ_TEXTGRID); return; MAGIC_CHECK_END(); if ((o->cur.font_source) && (font_source) && (!strcmp(o->cur.font_source, font_source))) return; eina_stringshare_replace(&o->cur.font_source, font_source); o->changed = 1; o->core_change = 1; evas_object_change(obj); } EAPI const char * evas_object_textgrid_font_source_get(const Evas_Object *obj) { Evas_Object_Textgrid *o; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return NULL; MAGIC_CHECK_END(); o = (Evas_Object_Textgrid *)(obj->object_data); MAGIC_CHECK(o, Evas_Object_Textgrid, MAGIC_OBJ_TEXTGRID); return NULL; MAGIC_CHECK_END(); return o->cur.font_source; } EAPI void evas_object_textgrid_font_set(Evas_Object *obj, const char *font_name, Evas_Font_Size font_size) { Evas_Object_Textgrid *o; int is, was = 0, pass = 0, freeze = 0; Evas_Font_Description *font_description; if ((!font_name) || (!*font_name) || (font_size <= 0)) return; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); o = (Evas_Object_Textgrid *)(obj->object_data); MAGIC_CHECK(o, Evas_Object_Textgrid, MAGIC_OBJ_TEXTGRID); return; MAGIC_CHECK_END(); font_description = evas_font_desc_new(); evas_font_name_parse(font_description, font_name); if (o->cur.font_description && !evas_font_desc_cmp(font_description, o->cur.font_description) && (font_size == o->cur.font_size)) { evas_font_desc_unref(font_description); return; } if (o->cur.font_description) evas_font_desc_unref(o->cur.font_description); o->cur.font_description = font_description; o->cur.font_size = font_size; eina_stringshare_replace(&o->cur.font_name, font_name); o->prev.font_name = NULL; if (obj->layer->evas->events_frozen <= 0) { pass = evas_event_passes_through(obj); freeze = evas_event_freezes_through(obj); if ((!pass) && (!freeze)) was = evas_object_is_in_output_rect(obj, obj->layer->evas->pointer.x, obj->layer->evas->pointer.y, 1, 1); } /* DO IT */ if (o->font) { evas_font_free(obj->layer->evas, o->font); o->font = NULL; } o->font = evas_font_load(obj->layer->evas, o->cur.font_description, o->cur.font_source, (int)(((double) o->cur.font_size) * obj->cur.scale)); if (o->font) { Eina_Unicode W[2] = { 'W', 0 }; Evas_Font_Instance *script_fi = NULL; Evas_Font_Instance *cur_fi = NULL; Evas_Text_Props text_props; Evas_Script_Type script; int advance, vadvance; script = evas_common_language_script_type_get(W, 1); ENFN->font_run_end_get(ENDT, o->font, &script_fi, &cur_fi, script, W, 1); memset(&text_props, 0, sizeof(Evas_Text_Props)); evas_common_text_props_script_set(&text_props, script); ENFN->font_text_props_info_create(ENDT, script_fi, W, &text_props, NULL, 0, 1, EVAS_TEXT_PROPS_MODE_NONE); ENFN->font_string_size_get(ENDT, o->font, &text_props, &o->cur.char_width, &o->cur.char_height); o->max_ascent = ENFN->font_max_ascent_get(ENDT, o->font); // inset = ENFN->font_inset_get(ENDT, o->font, &text_props); advance = ENFN->font_h_advance_get(ENDT, o->font, &text_props); vadvance = ENFN->font_v_advance_get(ENDT, o->font, &text_props); if (advance > o->cur.char_width) o->cur.char_width = advance; if (vadvance > o->cur.char_height) o->cur.char_height = vadvance; evas_common_text_props_content_unref(&text_props); } else { obj->cur.geometry.w = 0; obj->cur.geometry.h = 0; o->max_ascent = 0; } o->changed = 1; evas_object_change(obj); evas_object_clip_dirty(obj); evas_object_coords_recalc(obj); if (obj->layer->evas->events_frozen <= 0) { if ((!pass) && (!freeze)) { is = evas_object_is_in_output_rect(obj, obj->layer->evas->pointer.x, obj->layer->evas->pointer.y, 1, 1); if ((is ^ was) && obj->cur.visible) evas_event_feed_mouse_move(obj->layer->evas, obj->layer->evas->pointer.x, obj->layer->evas->pointer.y, obj->layer->evas->last_timestamp, NULL); } } evas_object_inform_call_resize(obj); o->changed = 1; o->core_change = 1; evas_object_textgrid_rows_clear(obj); evas_object_change(obj); /* Force destroy of all cached Evas_Text_Props */ while (eina_array_count(&o->glyphs_cleanup) > 0) { Evas_Text_Props *prop; unsigned int props_index; props_index = (unsigned int) (intptr_t) eina_array_pop(&o->glyphs_cleanup); prop = &(o->glyphs[props_index >> 8].props[props_index & 0xFF]); evas_common_text_props_content_nofree_unref(prop); if (!prop->info) { o->glyphs_used[props_index >> 8]--; if (!o->glyphs_used[props_index >> 8]) { /* FIXME: cleanup the master tree */ } } } } EAPI void evas_object_textgrid_font_get(const Evas_Object *obj, const char **font_name, Evas_Font_Size *font_size) { Evas_Object_Textgrid *o; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); if (font_name) *font_name = ""; if (font_size) *font_size = 0; return; MAGIC_CHECK_END(); o = (Evas_Object_Textgrid *)(obj->object_data); MAGIC_CHECK(o, Evas_Object_Textgrid, MAGIC_OBJ_TEXTGRID); if (font_name) *font_name = ""; if (font_size) *font_size = 0; return; MAGIC_CHECK_END(); if (font_name) *font_name = o->cur.font_name; if (font_size) *font_size = o->cur.font_size; } EAPI void evas_object_textgrid_cell_size_get(const Evas_Object *obj, Evas_Coord *w, Evas_Coord *h) { Evas_Object_Textgrid *o; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); if (w) *w = 0; if (h) *h = 0; return; MAGIC_CHECK_END(); o = (Evas_Object_Textgrid *)(obj->object_data); MAGIC_CHECK(o, Evas_Object_Textgrid, MAGIC_OBJ_TEXTGRID); if (w) *w = 0; if (h) *h = 0; return; MAGIC_CHECK_END(); if (w) *w = o->cur.char_width; if (h) *h = o->cur.char_height; } EAPI void evas_object_textgrid_palette_set(Evas_Object *obj, Evas_Textgrid_Palette pal, int idx, int r, int g, int b, int a) { Evas_Object_Textgrid *o; Eina_Array *palette; Evas_Object_Textgrid_Color *color, *c; int count, i; if ((idx < 0) || (idx > 255)) return; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); o = (Evas_Object_Textgrid *)(obj->object_data); MAGIC_CHECK(o, Evas_Object_Textgrid, MAGIC_OBJ_TEXTGRID); return; MAGIC_CHECK_END(); if (a > 255) a = 255; if (a < 0) a = 0; if (r > 255) r = 255; if (r < 0) r = 0; if (g > 255) g = 255; if (g < 0) g = 0; if (b > 255) b = 255; if (b < 0) b = 0; if (r > a) { r = a; ERR("Evas only handles pre multiplied colors!"); } if (g > a) { g = a; ERR("Evas only handles pre multiplied colors!"); } if (b > a) { b = a; ERR("Evas only handles pre multiplied colors!"); } switch (pal) { case EVAS_TEXTGRID_PALETTE_STANDARD: palette = &(o->cur.palette_standard); break; case EVAS_TEXTGRID_PALETTE_EXTENDED: palette = &(o->cur.palette_extended); break; default: return; } count = eina_array_count(palette); if (idx < count) { color = eina_array_data_get(palette, idx); if (color->a == a && color->r == r && color->g == g && color->b == b) return ; } else { color = malloc(sizeof(Evas_Object_Textgrid_Color)); if (!color) return; } color->a = a; color->r = r; color->g = g; color->b = b; if (idx < count) eina_array_data_set(palette, idx, color); else if (idx == count) eina_array_push(palette, color); else { for (i = count; i < idx; i++) { c = calloc(1, sizeof(Evas_Object_Textgrid_Color)); if (!c) { ERR("Evas can not allocate memory"); free(color); return; } eina_array_push(palette, c); } eina_array_push(palette, color); } o->changed = 1; o->pal_change = 1; evas_object_textgrid_rows_clear(obj); evas_object_change(obj); } EAPI void evas_object_textgrid_palette_get(const Evas_Object *obj, Evas_Textgrid_Palette pal, int idx, int *r, int *g, int *b, int *a) { Evas_Object_Textgrid *o; Eina_Array *palette; Evas_Object_Textgrid_Color *color; if (idx < 0) return; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); if (a) *a = 0; if (r) *r = 0; if (g) *g = 0; if (b) *b = 0; return; MAGIC_CHECK_END(); o = (Evas_Object_Textgrid *)(obj->object_data); MAGIC_CHECK(o, Evas_Object_Textgrid, MAGIC_OBJ_TEXTGRID); if (a) *a = 0; if (r) *r = 0; if (g) *g = 0; if (b) *b = 0; return; MAGIC_CHECK_END(); switch (pal) { case EVAS_TEXTGRID_PALETTE_STANDARD: palette = &(o->cur.palette_standard); break; case EVAS_TEXTGRID_PALETTE_EXTENDED: palette = &(o->cur.palette_extended); break; default: return; } if (idx >= (int)eina_array_count(palette)) return; color = eina_array_data_get(palette, idx); if (!color) return; if (a) *a = color->a; if (r) *r = color->r; if (g) *g = color->g; if (b) *b = color->b; } EAPI void evas_object_textgrid_supported_font_styles_set(Evas_Object *obj, Evas_Textgrid_Font_Style styles) { Evas_Object_Textgrid *o; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); o = (Evas_Object_Textgrid *)(obj->object_data); MAGIC_CHECK(o, Evas_Object_Textgrid, MAGIC_OBJ_TEXTGRID); return; MAGIC_CHECK_END(); /* FIXME: to do */ if (styles) { o->changed = 1; evas_object_change(obj); } } EAPI Evas_Textgrid_Font_Style evas_object_textgrid_supported_font_styles_get(const Evas_Object *obj) { Evas_Object_Textgrid *o; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return EVAS_TEXTGRID_FONT_STYLE_NORMAL; MAGIC_CHECK_END(); o = (Evas_Object_Textgrid *)(obj->object_data); MAGIC_CHECK(o, Evas_Object_Textgrid, MAGIC_OBJ_TEXTGRID); return EVAS_TEXTGRID_FONT_STYLE_NORMAL; MAGIC_CHECK_END(); /* FIXME: to do */ return 0; } EAPI void evas_object_textgrid_cellrow_set(Evas_Object *obj, int y, const Evas_Textgrid_Cell *row) { Evas_Object_Textgrid *o; if (!row) return; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); o = (Evas_Object_Textgrid *)(obj->object_data); MAGIC_CHECK(o, Evas_Object_Textgrid, MAGIC_OBJ_TEXTGRID); return; MAGIC_CHECK_END(); if ((y < 0) || (y >= o->cur.h)) return; } EAPI Evas_Textgrid_Cell * evas_object_textgrid_cellrow_get(const Evas_Object *obj, int y) { Evas_Object_Textgrid *o; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return NULL; MAGIC_CHECK_END(); o = (Evas_Object_Textgrid *)(obj->object_data); MAGIC_CHECK(o, Evas_Object_Textgrid, MAGIC_OBJ_TEXTGRID); return NULL; MAGIC_CHECK_END(); if ((y < 0) || (y >= o->cur.h)) return NULL; return o->cur.cells + (y * o->cur.w); } EAPI void evas_object_textgrid_update_add(Evas_Object *obj, int x, int y, int w, int h) { Evas_Object_Textgrid *o; int i, x2; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); o = (Evas_Object_Textgrid *)(obj->object_data); MAGIC_CHECK(o, Evas_Object_Textgrid, MAGIC_OBJ_TEXTGRID); return; MAGIC_CHECK_END(); RECTS_CLIP_TO_RECT(x, y, w, h, 0, 0, o->cur.w, o->cur.h); if ((w <= 0) || (h <= 0)) return; x2 = x + w - 1; for (i = 0; i < h; i++) { Evas_Object_Textgrid_Row *r = &(o->cur.rows[y + i]); if (r->ch1 < 0) { evas_object_textgrid_row_clear(o, r); r->ch1 = x; r->ch2 = x2; } else { if (x < r->ch1) r->ch1 = x; if (x2 > r->ch2) r->ch2 = x2; } } o->row_change = 1; o->changed = 1; evas_object_change(obj); } evas-1.7.9/src/lib/canvas/evas_key_grab.c0000664000175000017500000001212112175475547015204 00000000000000#include "evas_common.h" #include "evas_private.h" /* private calls */ /* FIXME: this is not optimal, but works. i should have a hash of keys per */ /* Evas and then a linked lists of grabs for that key and what */ /* modifiers/not_modifers they use */ static Evas_Key_Grab *evas_key_grab_new (Evas_Object *obj, const char *keyname, Evas_Modifier_Mask modifiers, Evas_Modifier_Mask not_modifiers, Eina_Bool exclusive); static Evas_Key_Grab *evas_key_grab_find (Evas_Object *obj, const char *keyname, Evas_Modifier_Mask modifiers, Evas_Modifier_Mask not_modifiers, Eina_Bool exclusive); static Evas_Key_Grab * evas_key_grab_new(Evas_Object *obj, const char *keyname, Evas_Modifier_Mask modifiers, Evas_Modifier_Mask not_modifiers, Eina_Bool exclusive) { /* MEM OK */ Evas_Key_Grab *g; g = evas_mem_calloc(sizeof(Evas_Key_Grab)); if (!g) return NULL; g->object = obj; g->modifiers = modifiers; g->not_modifiers = not_modifiers; g->exclusive = exclusive; g->keyname = strdup(keyname); if (obj->layer->evas->walking_grabs) g->just_added = EINA_TRUE; if (!g->keyname) { if (!evas_mem_free(strlen(keyname) + 1)) { free(g); return NULL; } g->keyname = strdup(keyname); if (!g->keyname) { free(g); return NULL; } } g->object->grabs = eina_list_append(g->object->grabs, g); if (eina_error_get()) { MERR_BAD(); evas_mem_free(sizeof(Eina_List)); g->object->grabs = eina_list_append(g->object->grabs, g); if (eina_error_get()) { MERR_FATAL(); free(g->keyname); free(g); return NULL; } } obj->layer->evas->grabs = eina_list_append(obj->layer->evas->grabs, g); if (eina_error_get()) { MERR_BAD(); evas_mem_free(sizeof(Eina_List)); obj->layer->evas->grabs = eina_list_append(obj->layer->evas->grabs, g); if (eina_error_get()) { MERR_FATAL(); g->object->grabs = eina_list_remove(g->object->grabs, g); free(g->keyname); free(g); return NULL; } } return g; } static Evas_Key_Grab * evas_key_grab_find(Evas_Object *obj, const char *keyname, Evas_Modifier_Mask modifiers, Evas_Modifier_Mask not_modifiers, Eina_Bool exclusive) { /* MEM OK */ Eina_List *l; Evas_Key_Grab *g; EINA_LIST_FOREACH(obj->layer->evas->grabs, l, g) { if ((g->modifiers == modifiers) && (g->not_modifiers == not_modifiers) && (!strcmp(g->keyname, keyname))) { if ((exclusive) || (obj == g->object)) return g; } } return NULL; } /* local calls */ void evas_object_grabs_cleanup(Evas_Object *obj) { if (obj->layer->evas->walking_grabs) { Eina_List *l; Evas_Key_Grab *g; EINA_LIST_FOREACH(obj->grabs, l, g) g->delete_me = EINA_TRUE; } else { while (obj->grabs) { Evas_Key_Grab *g = obj->grabs->data; if (g->keyname) free(g->keyname); free(g); obj->layer->evas->grabs = eina_list_remove(obj->layer->evas->grabs, g); obj->grabs = eina_list_remove(obj->grabs, g); } } } void evas_key_grab_free(Evas_Object *obj, const char *keyname, Evas_Modifier_Mask modifiers, Evas_Modifier_Mask not_modifiers) { /* MEM OK */ Evas_Key_Grab *g; g = evas_key_grab_find(obj, keyname, modifiers, not_modifiers, 0); if (!g) return; g->object->grabs = eina_list_remove(g->object->grabs, g); obj->layer->evas->grabs = eina_list_remove(obj->layer->evas->grabs, g); if (g->keyname) free(g->keyname); free(g); } /* public calls */ EAPI Eina_Bool evas_object_key_grab(Evas_Object *obj, const char *keyname, Evas_Modifier_Mask modifiers, Evas_Modifier_Mask not_modifiers, Eina_Bool exclusive) { /* MEM OK */ Evas_Key_Grab *g; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return EINA_FALSE; MAGIC_CHECK_END(); if (!keyname) return EINA_FALSE; if (exclusive) { g = evas_key_grab_find(obj, keyname, modifiers, not_modifiers, exclusive); if (g) return EINA_FALSE; } g = evas_key_grab_new(obj, keyname, modifiers, not_modifiers, exclusive); if (!g) return EINA_FALSE; return EINA_TRUE; } EAPI void evas_object_key_ungrab(Evas_Object *obj, const char *keyname, Evas_Modifier_Mask modifiers, Evas_Modifier_Mask not_modifiers) { /* MEM OK */ Evas_Key_Grab *g; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); if (!keyname) return; g = evas_key_grab_find(obj, keyname, modifiers, not_modifiers, 0); if (!g) return; if (g->object->layer->evas->walking_grabs) { if (!g->delete_me) { g->object->layer->evas->delete_grabs++; g->delete_me = EINA_TRUE; } } else evas_key_grab_free(g->object, keyname, modifiers, not_modifiers); } evas-1.7.9/src/lib/canvas/evas_object_table.c0000664000175000017500000011131312175475547016041 00000000000000#include "evas_common.h" #include typedef struct _Evas_Object_Table_Data Evas_Object_Table_Data; typedef struct _Evas_Object_Table_Option Evas_Object_Table_Option; typedef struct _Evas_Object_Table_Cache Evas_Object_Table_Cache; typedef struct _Evas_Object_Table_Iterator Evas_Object_Table_Iterator; typedef struct _Evas_Object_Table_Accessor Evas_Object_Table_Accessor; struct _Evas_Object_Table_Option { Evas_Object *obj; unsigned short col, row, colspan, rowspan, end_col, end_row; struct { Evas_Coord w, h; } min, max; struct { double h, v; } align; struct { Evas_Coord l, r, t, b; } pad; Eina_Bool expand_h : 1; /* XXX required? */ Eina_Bool expand_v : 1; /* XXX required? */ Eina_Bool fill_h : 1; Eina_Bool fill_v : 1; }; struct _Evas_Object_Table_Cache { struct { struct { double h, v; } weights; struct { int h, v; } expands; struct { Evas_Coord w, h; } min; } total; struct { double *h, *v; } weights; struct { Evas_Coord *h, *v; } sizes; struct { Eina_Bool *h, *v; } expands; double ___pad; // padding to make sure doubles at end can be aligned }; struct _Evas_Object_Table_Data { Evas_Object_Smart_Clipped_Data base; Eina_List *children; struct { Evas_Coord h, v; } pad; struct { double h, v; } align; struct { int cols, rows; } size; Evas_Object_Table_Cache *cache; Evas_Object_Table_Homogeneous_Mode homogeneous; Eina_Bool hints_changed : 1; Eina_Bool expand_h : 1; Eina_Bool expand_v : 1; Eina_Bool is_mirrored : 1; }; struct _Evas_Object_Table_Iterator { Eina_Iterator iterator; Eina_Iterator *real_iterator; const Evas_Object *table; }; struct _Evas_Object_Table_Accessor { Eina_Accessor accessor; Eina_Accessor *real_accessor; const Evas_Object *table; }; #define EVAS_OBJECT_TABLE_DATA_GET(o, ptr) \ Evas_Object_Table_Data *ptr = evas_object_smart_data_get(o) #define EVAS_OBJECT_TABLE_DATA_GET_OR_RETURN(o, ptr) \ EVAS_OBJECT_TABLE_DATA_GET(o, ptr); \ if (!ptr) \ { \ CRIT("no widget data for object %p (%s)", \ o, evas_object_type_get(o)); \ return; \ } #define EVAS_OBJECT_TABLE_DATA_GET_OR_RETURN_VAL(o, ptr, val) \ EVAS_OBJECT_TABLE_DATA_GET(o, ptr); \ if (!ptr) \ { \ CRIT("No widget data for object %p (%s)", \ o, evas_object_type_get(o)); \ return val; \ } static const char EVAS_OBJECT_TABLE_OPTION_KEY[] = "|EvTb"; static Eina_Bool _evas_object_table_iterator_next(Evas_Object_Table_Iterator *it, void **data) { Evas_Object_Table_Option *opt; if (!eina_iterator_next(it->real_iterator, (void **)&opt)) return EINA_FALSE; if (data) *data = opt->obj; return EINA_TRUE; } static Evas_Object * _evas_object_table_iterator_get_container(Evas_Object_Table_Iterator *it) { return (Evas_Object *)it->table; } static void _evas_object_table_iterator_free(Evas_Object_Table_Iterator *it) { eina_iterator_free(it->real_iterator); free(it); } static Eina_Bool _evas_object_table_accessor_get_at(Evas_Object_Table_Accessor *it, unsigned int idx, void **data) { Evas_Object_Table_Option *opt = NULL; if (!eina_accessor_data_get(it->real_accessor, idx, (void **)&opt)) return EINA_FALSE; if (data) *data = opt->obj; return EINA_TRUE; } static Evas_Object * _evas_object_table_accessor_get_container(Evas_Object_Table_Accessor *it) { return (Evas_Object *)it->table; } static void _evas_object_table_accessor_free(Evas_Object_Table_Accessor *it) { eina_accessor_free(it->real_accessor); free(it); } static Evas_Object_Table_Cache * _evas_object_table_cache_alloc(int cols, int rows) { Evas_Object_Table_Cache *cache; int size; size = sizeof(Evas_Object_Table_Cache) + ((cols + rows) * (sizeof(double) + sizeof(Evas_Coord) + sizeof(Eina_Bool))); cache = malloc(size); if (!cache) { ERR("Could not allocate table cache %dx%d (%d bytes): %s", cols, rows, size, strerror(errno)); return NULL; } cache->weights.h = (double *)(cache + 1); cache->weights.v = (double *)(cache->weights.h + cols); cache->sizes.h = (Evas_Coord *)(cache->weights.v + rows); cache->sizes.v = (Evas_Coord *)(cache->sizes.h + cols); cache->expands.h = (Eina_Bool *)(cache->sizes.v + rows); cache->expands.v = (Eina_Bool *)(cache->expands.h + cols); return cache; } static void _evas_object_table_cache_free(Evas_Object_Table_Cache *cache) { free(cache); } static void _evas_object_table_cache_reset(Evas_Object_Table_Data *priv) { Evas_Object_Table_Cache *c = priv->cache; int size; c->total.expands.v = 0; c->total.expands.h = 0; c->total.min.w = 0; c->total.min.h = 0; size = ((priv->size.rows + priv->size.cols) * (sizeof(double) + sizeof(Evas_Coord) + sizeof(Eina_Bool))); memset(c + 1, 0, size); } static void _evas_object_table_cache_invalidate(Evas_Object_Table_Data *priv) { priv->hints_changed = 1; if (priv->cache) { _evas_object_table_cache_free(priv->cache); priv->cache = NULL; } } static Evas_Object_Table_Option * _evas_object_table_option_get(Evas_Object *o) { return evas_object_data_get(o, EVAS_OBJECT_TABLE_OPTION_KEY); } static void _evas_object_table_option_set(Evas_Object *o, const Evas_Object_Table_Option *opt) { evas_object_data_set(o, EVAS_OBJECT_TABLE_OPTION_KEY, opt); } static Evas_Object_Table_Option * _evas_object_table_option_del(Evas_Object *o) { return evas_object_data_del(o, EVAS_OBJECT_TABLE_OPTION_KEY); } static void _on_child_del(void *data, Evas *evas __UNUSED__, Evas_Object *child, void *einfo __UNUSED__) { Evas_Object *table = data; evas_object_table_unpack(table, child); } static void _on_child_hints_changed(void *data, Evas *evas __UNUSED__, Evas_Object *child __UNUSED__, void *einfo __UNUSED__) { Evas_Object *table = data; EVAS_OBJECT_TABLE_DATA_GET_OR_RETURN(table, priv); _evas_object_table_cache_invalidate(priv); evas_object_smart_changed(table); } static void _evas_object_table_child_connect(Evas_Object *o, Evas_Object *child) { evas_object_event_callback_add (child, EVAS_CALLBACK_DEL, _on_child_del, o); evas_object_event_callback_add (child, EVAS_CALLBACK_CHANGED_SIZE_HINTS, _on_child_hints_changed, o); } static void _evas_object_table_child_disconnect(Evas_Object *o, Evas_Object *child) { evas_object_event_callback_del_full (child, EVAS_CALLBACK_DEL, _on_child_del, o); evas_object_event_callback_del_full (child, EVAS_CALLBACK_CHANGED_SIZE_HINTS, _on_child_hints_changed, o); } static void _evas_object_table_calculate_cell(const Evas_Object_Table_Option *opt, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h) { Evas_Coord cw, ch; *w -= opt->pad.l + opt->pad.r; if (*w < opt->min.w) cw = opt->min.w; else if ((opt->max.w > -1) && (*w > opt->max.w)) cw = opt->max.w; else if (opt->fill_h) cw = *w; else cw = opt->min.w; *h -= opt->pad.t + opt->pad.b; if (*h < opt->min.h) ch = opt->min.h; else if ((opt->max.h > -1) && (*h > opt->max.h)) ch = opt->max.h; else if (opt->fill_v) ch = *h; else ch = opt->min.h; *x += opt->pad.l; if (cw != *w) { *x += (*w - cw) * opt->align.h; *w = cw; } *y += opt->pad.t; if (ch != *h) { *y += (*h - ch) * opt->align.v; *h = ch; } } static void _evas_object_table_calculate_hints_homogeneous(Evas_Object *o, Evas_Object_Table_Data *priv) { Eina_List *l; Evas_Object_Table_Option *opt; Evas_Coord minw, minh, o_minw, o_minh; Eina_Bool expand_h, expand_v; o_minw = 0; o_minh = 0; minw = 0; minh = 0; expand_h = 0; expand_v = 0; EINA_LIST_FOREACH(priv->children, l, opt) { Evas_Object *child = opt->obj; Evas_Coord child_minw, child_minh, cell_minw, cell_minh; double weightw, weighth; evas_object_size_hint_min_get(child, &opt->min.w, &opt->min.h); evas_object_size_hint_max_get(child, &opt->max.w, &opt->max.h); evas_object_size_hint_padding_get (child, &opt->pad.l, &opt->pad.r, &opt->pad.t, &opt->pad.b); evas_object_size_hint_align_get(child, &opt->align.h, &opt->align.v); evas_object_size_hint_weight_get(child, &weightw, &weighth); child_minw = opt->min.w + opt->pad.l + opt->pad.r; child_minh = opt->min.h + opt->pad.t + opt->pad.b; cell_minw = (child_minw + opt->colspan - 1) / opt->colspan; cell_minh = (child_minh + opt->rowspan - 1) / opt->rowspan; opt->expand_h = 0; if ((weightw > 0.0) && ((opt->max.w < 0) || ((opt->max.w > -1) && (opt->min.w < opt->max.w)))) { opt->expand_h = 1; expand_h = 1; } opt->expand_v = 0; if ((weighth > 0.0) && ((opt->max.h < 0) || ((opt->max.h > -1) && (opt->min.h < opt->max.h)))) { opt->expand_v = 1; expand_v = 1; } opt->fill_h = 0; if (opt->align.h < 0.0) { opt->align.h = 0.5; opt->fill_h = 1; } opt->fill_v = 0; if (opt->align.v < 0.0) { opt->align.v = 0.5; opt->fill_v = 1; } /* greatest mininum values, with paddings */ if (minw < cell_minw) minw = cell_minw; if (minh < cell_minh) minh = cell_minh; /* greatest mininum values, without paddings */ if (o_minw < opt->min.w) o_minw = opt->min.w; if (o_minh < opt->min.h) o_minh = opt->min.h; } if (priv->homogeneous == EVAS_OBJECT_TABLE_HOMOGENEOUS_ITEM) { if (o_minw < 1) { ERR("homogeneous table based on item size but no " "horizontal mininum size specified! Using expand."); expand_h = 1; } if (o_minh < 1) { ERR("homogeneous table based on item size but no " "vertical mininum size specified! Using expand."); expand_v = 1; } } minw = priv->size.cols * (minw + priv->pad.h) - priv->pad.h; minh = priv->size.rows * (minh + priv->pad.v) - priv->pad.v; priv->hints_changed = 0; priv->expand_h = expand_h; priv->expand_v = expand_v; if ((minw > 0 ) || (minh > 0)) evas_object_size_hint_min_set(o, minw, minh); // XXX hint max? } static void _evas_object_table_calculate_layout_homogeneous_sizes_item(const Evas_Object *o, const Evas_Object_Table_Data *priv, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h) { Evas_Coord minw, minh; Eina_Bool expand_h, expand_v; evas_object_size_hint_min_get(o, &minw, &minh); expand_h = priv->expand_h; expand_v = priv->expand_v; if (*w < minw) expand_h = 0; if (!expand_h) { *x += (*w - minw) * priv->align.h; *w = minw; } if (*h < minh) expand_v = 0; if (!expand_v) { *y += (*h - minh) * priv->align.v; *h = minh; } } static void _evas_object_table_calculate_layout_homogeneous_sizes(const Evas_Object *o, const Evas_Object_Table_Data *priv, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h, Evas_Coord *cellw, Evas_Coord *cellh) { evas_object_geometry_get(o, x, y, w, h); if (priv->homogeneous == EVAS_OBJECT_TABLE_HOMOGENEOUS_ITEM) _evas_object_table_calculate_layout_homogeneous_sizes_item (o, priv, x, y, w, h); *cellw = (*w + priv->size.cols - 1) / priv->size.cols; *cellh = (*h + priv->size.rows - 1) / priv->size.rows; } static void _evas_object_table_calculate_layout_homogeneous(Evas_Object *o, Evas_Object_Table_Data *priv) { Evas_Coord x = 0, y = 0, w = 0, h = 0, ww, hh, cellw = 0, cellh = 0; Eina_List *l; Evas_Object_Table_Option *opt; _evas_object_table_calculate_layout_homogeneous_sizes (o, priv, &x, &y, &w, &h, &cellw, &cellh); ww = w - ((priv->size.cols - 1) * priv->pad.h); hh = h - ((priv->size.rows - 1) * priv->pad.v); if (ww < 0) ww = 0; if (ww < 0) ww = 0; EINA_LIST_FOREACH(priv->children, l, opt) { Evas_Object *child = opt->obj; Evas_Coord cx, cy, cw, ch, cox, coy, cow, coh; cx = x + ((opt->col * ww) / priv->size.cols); cw = x + (((opt->col + opt->colspan) * ww) / priv->size.cols) - cx; cy = y + ((opt->row * hh) / priv->size.rows); ch = y + (((opt->row + opt->rowspan) * hh) / priv->size.rows) - cy; cx += (opt->col) * priv->pad.h; cy += (opt->row) * priv->pad.v; cox = cx; coy = cy; cow = cw; coh = ch; _evas_object_table_calculate_cell(opt, &cx, &cy, &cw, &ch); if (cw > cow) { cx = cox; cw = cow; } if (ch > coh) { cy = coy; ch = coh; } if (priv->is_mirrored) { evas_object_move(opt->obj, x + w - (cx - x + cw), cy); } else { evas_object_move(child, cx, cy); } evas_object_resize(child, cw, ch); } } static void _evas_object_table_smart_calculate_homogeneous(Evas_Object *o, Evas_Object_Table_Data *priv) { if (priv->hints_changed) _evas_object_table_calculate_hints_homogeneous(o, priv); _evas_object_table_calculate_layout_homogeneous(o, priv); } static int _evas_object_table_count_expands(const Eina_Bool *expands, int start, int end) { const Eina_Bool *itr = expands + start, *itr_end = expands + end; int count = 0; for (; itr < itr_end; itr++) { if (*itr) count++; } return count; } static Evas_Coord _evas_object_table_sum_sizes(const Evas_Coord *sizes, int start, int end) { const Evas_Coord *itr = sizes + start, *itr_end = sizes + end; Evas_Coord sum = 0; for (; itr < itr_end; itr++) sum += *itr; return sum; } static void _evas_object_table_sizes_calc_noexpand(Evas_Coord *sizes, int start, int end, Evas_Coord space) { Evas_Coord *itr = sizes + start, *itr_end = sizes + end - 1; Evas_Coord step; int units; /* XXX move to fixed point math and spread errors among cells */ units = end - start; step = space / units; for (; itr < itr_end; itr++) *itr += step; *itr += space - step * (units - 1); } static void _evas_object_table_sizes_calc_expand(Evas_Coord *sizes, int start, int end, Evas_Coord space, const Eina_Bool *expands, int expand_count, double *weights, double weighttot) { Evas_Coord *itr = sizes + start, *itr_end = sizes + end; const Eina_Bool *itr_expand = expands + start; Evas_Coord step = 0, last_space = 0; int total = 0, i = start; /* XXX move to fixed point math and spread errors among cells */ if (weighttot > 0.0) { step = space / expand_count; last_space = space - step * (expand_count - 1); } for (; itr < itr_end; itr++, itr_expand++, i++) { if (weighttot <= 0.0) { if (*itr_expand) { expand_count--; if (expand_count > 0) *itr += step; else { *itr += last_space; break; } } } else { if (*itr_expand) { expand_count--; if (expand_count > 0) { step = (weights[i] / weighttot) * space; *itr += step; total += step; } else { *itr += space - total; break; } } } } } static void _evas_object_table_calculate_hints_regular(Evas_Object *o, Evas_Object_Table_Data *priv) { Evas_Object_Table_Option *opt; Evas_Object_Table_Cache *c; Eina_List *l; double totweightw = 0.0, totweighth = 0.0; int i; if (!priv->cache) { priv->cache = _evas_object_table_cache_alloc (priv->size.cols, priv->size.rows); if (!priv->cache) return; } c = priv->cache; _evas_object_table_cache_reset(priv); /* cache interesting data */ memset(c->expands.h, 1, priv->size.cols); memset(c->expands.v, 1, priv->size.rows); memset(c->weights.h, 0, priv->size.cols); memset(c->weights.v, 0, priv->size.rows); EINA_LIST_FOREACH(priv->children, l, opt) { Evas_Object *child = opt->obj; double weightw, weighth; evas_object_size_hint_min_get(child, &opt->min.w, &opt->min.h); evas_object_size_hint_max_get(child, &opt->max.w, &opt->max.h); evas_object_size_hint_padding_get (child, &opt->pad.l, &opt->pad.r, &opt->pad.t, &opt->pad.b); evas_object_size_hint_align_get(child, &opt->align.h, &opt->align.v); evas_object_size_hint_weight_get(child, &weightw, &weighth); opt->expand_h = 0; if ((weightw > 0.0) && ((opt->max.w < 0) || ((opt->max.w > -1) && (opt->min.w < opt->max.w)))) opt->expand_h = 1; opt->expand_v = 0; if ((weighth > 0.0) && ((opt->max.h < 0) || ((opt->max.h > -1) && (opt->min.h < opt->max.h)))) opt->expand_v = 1; opt->fill_h = 0; if (opt->align.h < 0.0) { opt->align.h = 0.5; opt->fill_h = 1; } opt->fill_v = 0; if (opt->align.v < 0.0) { opt->align.v = 0.5; opt->fill_v = 1; } if (!opt->expand_h) memset(c->expands.h + opt->col, 0, opt->colspan); else { for (i = opt->col; i < opt->col + opt->colspan; i++) c->weights.h[i] += (weightw / (double)opt->colspan); } if (!opt->expand_v) memset(c->expands.v + opt->row, 0, opt->rowspan); else { for (i = opt->row; i < opt->row + opt->rowspan; i++) c->weights.v[i] += (weighth / (double)opt->rowspan); } } for (i = 0; i < priv->size.cols; i++) totweightw += c->weights.h[i]; for (i = 0; i < priv->size.rows; i++) totweighth += c->weights.v[i]; /* calculate sizes for each row and column */ EINA_LIST_FOREACH(priv->children, l, opt) { Evas_Coord tot, need; /* handle horizontal */ tot = _evas_object_table_sum_sizes(c->sizes.h, opt->col, opt->end_col); need = opt->min.w + opt->pad.l + opt->pad.r; if (tot < need) { Evas_Coord space = need - tot; int count; count = _evas_object_table_count_expands (c->expands.h, opt->col, opt->end_col); if (count > 0) _evas_object_table_sizes_calc_expand (c->sizes.h, opt->col, opt->end_col, space, c->expands.h, count, c->weights.h, totweightw); else _evas_object_table_sizes_calc_noexpand (c->sizes.h, opt->col, opt->end_col, space); } /* handle vertical */ tot = _evas_object_table_sum_sizes(c->sizes.v, opt->row, opt->end_row); need = opt->min.h + opt->pad.t + opt->pad.b; if (tot < opt->min.h) { Evas_Coord space = need - tot; int count; count = _evas_object_table_count_expands (c->expands.v, opt->row, opt->end_row); if (count > 0) _evas_object_table_sizes_calc_expand (c->sizes.v, opt->row, opt->end_row, space, c->expands.v, count, c->weights.v, totweighth); else _evas_object_table_sizes_calc_noexpand (c->sizes.v, opt->row, opt->end_row, space); } } c->total.weights.h = totweightw; c->total.weights.v = totweighth; c->total.expands.h = _evas_object_table_count_expands (c->expands.h, 0, priv->size.cols); c->total.expands.v = _evas_object_table_count_expands (c->expands.v, 0, priv->size.rows); c->total.min.w = _evas_object_table_sum_sizes (c->sizes.h, 0, priv->size.cols); c->total.min.h = _evas_object_table_sum_sizes (c->sizes.v, 0, priv->size.rows); c->total.min.w += priv->pad.h * (priv->size.cols - 1); c->total.min.h += priv->pad.v * (priv->size.rows - 1); if ((c->total.min.w > 0) || (c->total.min.h > 0)) evas_object_size_hint_min_set(o, c->total.min.w, c->total.min.h); // XXX hint max? } static void _evas_object_table_calculate_layout_regular(Evas_Object *o, Evas_Object_Table_Data *priv) { Evas_Object_Table_Option *opt; Evas_Object_Table_Cache *c; Eina_List *l; Evas_Coord *cols = NULL, *rows = NULL; Evas_Coord x, y, w, h; evas_object_geometry_get(o, &x, &y, &w, &h); c = priv->cache; /* handle horizontal */ if ((c->total.expands.h <= 0) || (c->total.min.w >= w)) { x += (w - c->total.min.w) * priv->align.h; w = c->total.min.w; cols = c->sizes.h; } else { int size = priv->size.cols * sizeof(Evas_Coord); cols = malloc(size); if (!cols) { ERR("Could not allocate temp columns (%d bytes): %s", size, strerror(errno)); goto end; } memcpy(cols, c->sizes.h, size); _evas_object_table_sizes_calc_expand (cols, 0, priv->size.cols, w - c->total.min.w, c->expands.h, c->total.expands.h, c->weights.h, c->total.weights.h); } /* handle vertical */ if ((c->total.expands.v <= 0) || (c->total.min.h >= h)) { y += (h - c->total.min.h) * priv->align.v; h = c->total.min.h; rows = c->sizes.v; } else { int size = priv->size.rows * sizeof(Evas_Coord); rows = malloc(size); if (!rows) { ERR("could not allocate temp rows (%d bytes): %s", size, strerror(errno)); goto end; } memcpy(rows, c->sizes.v, size); _evas_object_table_sizes_calc_expand (rows, 0, priv->size.rows, h - c->total.min.h, c->expands.v, c->total.expands.v, c->weights.v, c->total.weights.v); } EINA_LIST_FOREACH(priv->children, l, opt) { Evas_Object *child = opt->obj; Evas_Coord cx, cy, cw, ch; cx = x + opt->col * (priv->pad.h); cx += _evas_object_table_sum_sizes(cols, 0, opt->col); cw = _evas_object_table_sum_sizes(cols, opt->col, opt->end_col); cy = y + opt->row * (priv->pad.v); cy += _evas_object_table_sum_sizes(rows, 0, opt->row); ch = _evas_object_table_sum_sizes(rows, opt->row, opt->end_row); _evas_object_table_calculate_cell(opt, &cx, &cy, &cw, &ch); if (priv->is_mirrored) { evas_object_move(opt->obj, x + w - (cx - x + cw), cy); } else { evas_object_move(child, cx, cy); } evas_object_resize(child, cw, ch); } end: if (cols != c->sizes.h) { if (cols) free(cols); } if (rows != c->sizes.v) { if (rows) free(rows); } } static void _evas_object_table_smart_calculate_regular(Evas_Object *o, Evas_Object_Table_Data *priv) { if (priv->hints_changed) _evas_object_table_calculate_hints_regular(o, priv); _evas_object_table_calculate_layout_regular(o, priv); } EVAS_SMART_SUBCLASS_NEW("Evas_Object_Table", _evas_object_table, Evas_Smart_Class, Evas_Smart_Class, evas_object_smart_clipped_class_get, NULL) static void _evas_object_table_smart_add(Evas_Object *o) { EVAS_SMART_DATA_ALLOC(o, Evas_Object_Table_Data) priv->pad.h = 0; priv->pad.v = 0; priv->align.h = 0.5; priv->align.v = 0.5; priv->size.cols = 0; priv->size.rows = 0; priv->cache = NULL; priv->homogeneous = EVAS_OBJECT_TABLE_HOMOGENEOUS_NONE; priv->hints_changed = 1; priv->expand_h = 0; priv->expand_v = 0; _evas_object_table_parent_sc->add(o); } static void _evas_object_table_smart_del(Evas_Object *o) { EVAS_OBJECT_TABLE_DATA_GET(o, priv); Eina_List *l; l = priv->children; while (l) { Evas_Object_Table_Option *opt = l->data; _evas_object_table_child_disconnect(o, opt->obj); _evas_object_table_option_del(opt->obj); free(opt); l = eina_list_remove_list(l, l); } if (priv->cache) { _evas_object_table_cache_free(priv->cache); priv->cache = NULL; } _evas_object_table_parent_sc->del(o); } static void _evas_object_table_smart_resize(Evas_Object *o, Evas_Coord w, Evas_Coord h) { Evas_Coord ow, oh; evas_object_geometry_get(o, NULL, NULL, &ow, &oh); if ((ow == w) && (oh == h)) return; evas_object_smart_changed(o); } static void _evas_object_table_smart_calculate(Evas_Object *o) { EVAS_OBJECT_TABLE_DATA_GET_OR_RETURN(o, priv); if ((priv->size.cols < 1) || (priv->size.rows < 1)) { DBG("Nothing to do: cols=%d, rows=%d", priv->size.cols, priv->size.rows); return; } if (priv->homogeneous) _evas_object_table_smart_calculate_homogeneous(o, priv); else _evas_object_table_smart_calculate_regular(o, priv); } static void _evas_object_table_smart_set_user(Evas_Smart_Class *sc) { sc->add = _evas_object_table_smart_add; sc->del = _evas_object_table_smart_del; sc->resize = _evas_object_table_smart_resize; sc->calculate = _evas_object_table_smart_calculate; } EAPI Evas_Object * evas_object_table_add(Evas *evas) { return evas_object_smart_add(evas, _evas_object_table_smart_class_new()); } EAPI Evas_Object * evas_object_table_add_to(Evas_Object *parent) { Evas *evas; Evas_Object *o; evas = evas_object_evas_get(parent); o = evas_object_table_add(evas); evas_object_smart_member_add(o, parent); return o; } EAPI void evas_object_table_homogeneous_set(Evas_Object *o, Evas_Object_Table_Homogeneous_Mode homogeneous) { EVAS_OBJECT_TABLE_DATA_GET_OR_RETURN(o, priv); if (priv->homogeneous == homogeneous) return; priv->homogeneous = homogeneous; _evas_object_table_cache_invalidate(priv); evas_object_smart_changed(o); } EAPI Evas_Object_Table_Homogeneous_Mode evas_object_table_homogeneous_get(const Evas_Object *o) { EVAS_OBJECT_TABLE_DATA_GET_OR_RETURN_VAL(o, priv, 0); return priv->homogeneous; } EAPI void evas_object_table_align_set(Evas_Object *o, double horizontal, double vertical) { EVAS_OBJECT_TABLE_DATA_GET_OR_RETURN(o, priv); if (priv->align.h == horizontal && priv->align.v == vertical) return; priv->align.h = horizontal; priv->align.v = vertical; evas_object_smart_changed(o); } EAPI void evas_object_table_align_get(const Evas_Object *o, double *horizontal, double *vertical) { EVAS_OBJECT_TABLE_DATA_GET(o, priv); if (priv) { if (horizontal) *horizontal = priv->align.h; if (vertical) *vertical = priv->align.v; } else { if (horizontal) *horizontal = 0.5; if (vertical) *vertical = 0.5; } } EAPI void evas_object_table_padding_set(Evas_Object *o, Evas_Coord horizontal, Evas_Coord vertical) { EVAS_OBJECT_TABLE_DATA_GET_OR_RETURN(o, priv); if (priv->pad.h == horizontal && priv->pad.v == vertical) return; priv->pad.h = horizontal; priv->pad.v = vertical; _evas_object_table_cache_invalidate(priv); evas_object_smart_changed(o); } EAPI void evas_object_table_padding_get(const Evas_Object *o, Evas_Coord *horizontal, Evas_Coord *vertical) { EVAS_OBJECT_TABLE_DATA_GET(o, priv); if (priv) { if (horizontal) *horizontal = priv->pad.h; if (vertical) *vertical = priv->pad.v; } else { if (horizontal) *horizontal = 0; if (vertical) *vertical = 0; } } EAPI Eina_Bool evas_object_table_pack_get(const Evas_Object *o, Evas_Object *child, unsigned short *col, unsigned short *row, unsigned short *colspan, unsigned short *rowspan) { Evas_Object_Table_Option *opt; EVAS_OBJECT_TABLE_DATA_GET_OR_RETURN_VAL(o, priv, 0); opt = _evas_object_table_option_get(child); if (!opt) { if (col) *col = 0; if (row) *row = 0; if (colspan) *colspan = 0; if (rowspan) *rowspan = 0; return EINA_FALSE; } if (col) *col = opt->col; if (row) *row = opt->row; if (colspan) *colspan = opt->colspan; if (rowspan) *rowspan = opt->rowspan; return EINA_TRUE; } EAPI Eina_Bool evas_object_table_pack(Evas_Object *o, Evas_Object *child, unsigned short col, unsigned short row, unsigned short colspan, unsigned short rowspan) { Evas_Object_Table_Option *opt; EVAS_OBJECT_TABLE_DATA_GET_OR_RETURN_VAL(o, priv, 0); if (rowspan < 1) { ERR("rowspan < 1"); return EINA_FALSE; } if (colspan < 1) { ERR("colspan < 1"); return EINA_FALSE; } opt = _evas_object_table_option_get(child); if (!opt) { opt = malloc(sizeof(*opt)); if (!opt) { ERR("could not allocate table option data."); return EINA_FALSE; } } opt->obj = child; opt->col = col; opt->row = row; opt->colspan = colspan; opt->rowspan = rowspan; opt->end_col = col + colspan; opt->end_row = row + rowspan; if (evas_object_smart_parent_get(child) == o) { Eina_Bool need_shrink = EINA_FALSE; if (priv->size.cols < opt->end_col) priv->size.cols = opt->end_col; else need_shrink = EINA_TRUE; if (priv->size.rows < opt->end_row) priv->size.rows = opt->end_row; else need_shrink = EINA_TRUE; if (need_shrink) { Eina_List *l; Evas_Object_Table_Option *opt2; int max_row = 0, max_col = 0; EINA_LIST_FOREACH(priv->children, l, opt2) { if (max_col < opt2->end_col) max_col = opt2->end_col; if (max_row < opt2->end_row) max_row = opt2->end_row; } priv->size.cols = max_col; priv->size.rows = max_row; } } else { opt->min.w = 0; opt->min.h = 0; opt->max.w = 0; opt->max.h = 0; opt->align.h = 0.5; opt->align.v = 0.5; opt->pad.l = 0; opt->pad.r = 0; opt->pad.t = 0; opt->pad.b = 0; opt->expand_h = 0; opt->expand_v = 0; priv->children = eina_list_append(priv->children, opt); if (priv->size.cols < opt->end_col) priv->size.cols = opt->end_col; if (priv->size.rows < opt->end_row) priv->size.rows = opt->end_row; _evas_object_table_option_set(child, opt); evas_object_smart_member_add(child, o); _evas_object_table_child_connect(o, child); } _evas_object_table_cache_invalidate(priv); evas_object_smart_changed(o); return EINA_TRUE; } static void _evas_object_table_remove_opt(Evas_Object_Table_Data *priv, Evas_Object_Table_Option *opt) { Eina_List *l; int max_row, max_col, was_greatest; max_row = 0; max_col = 0; was_greatest = 0; l = priv->children; while (l) { Evas_Object_Table_Option *cur_opt = l->data; if (cur_opt != opt) { if (max_col < cur_opt->end_col) max_col = cur_opt->end_col; if (max_row < cur_opt->end_row) max_row = cur_opt->end_row; l = l->next; } else { Eina_List *tmp = l->next; priv->children = eina_list_remove_list(priv->children, l); if ((priv->size.cols > opt->end_col) && (priv->size.rows > opt->end_row)) break; else { was_greatest = 1; l = tmp; } } } if (was_greatest) { priv->size.cols = max_col; priv->size.rows = max_row; } } EAPI Eina_Bool evas_object_table_unpack(Evas_Object *o, Evas_Object *child) { Evas_Object_Table_Option *opt; EVAS_OBJECT_TABLE_DATA_GET_OR_RETURN_VAL(o, priv, 0); if (o != evas_object_smart_parent_get(child)) { ERR("cannot unpack child from incorrect table!"); return EINA_FALSE; } opt = _evas_object_table_option_del(child); if (!opt) { ERR("cannot unpack child with no packing option!"); return EINA_FALSE; } _evas_object_table_child_disconnect(o, child); _evas_object_table_remove_opt(priv, opt); evas_object_smart_member_del(child); free(opt); _evas_object_table_cache_invalidate(priv); evas_object_smart_changed(o); return EINA_TRUE; } EAPI void evas_object_table_clear(Evas_Object *o, Eina_Bool clear) { Evas_Object_Table_Option *opt; EVAS_OBJECT_TABLE_DATA_GET_OR_RETURN(o, priv); EINA_LIST_FREE(priv->children, opt) { _evas_object_table_child_disconnect(o, opt->obj); _evas_object_table_option_del(opt->obj); evas_object_smart_member_del(opt->obj); if (clear) evas_object_del(opt->obj); free(opt); } priv->size.cols = 0; priv->size.rows = 0; _evas_object_table_cache_invalidate(priv); evas_object_smart_changed(o); } EAPI void evas_object_table_col_row_size_get(const Evas_Object *o, int *cols, int *rows) { EVAS_OBJECT_TABLE_DATA_GET(o, priv); if (priv) { if (cols) *cols = priv->size.cols; if (rows) *rows = priv->size.rows; } else { if (cols) *cols = -1; if (rows) *rows = -1; } } EAPI Eina_Iterator * evas_object_table_iterator_new(const Evas_Object *o) { Evas_Object_Table_Iterator *it; EVAS_OBJECT_TABLE_DATA_GET_OR_RETURN_VAL(o, priv, NULL); if (!priv->children) return NULL; it = calloc(1, sizeof(Evas_Object_Table_Iterator)); if (!it) return NULL; EINA_MAGIC_SET(&it->iterator, EINA_MAGIC_ITERATOR); it->real_iterator = eina_list_iterator_new(priv->children); it->table = o; it->iterator.next = FUNC_ITERATOR_NEXT(_evas_object_table_iterator_next); it->iterator.get_container = FUNC_ITERATOR_GET_CONTAINER(_evas_object_table_iterator_get_container); it->iterator.free = FUNC_ITERATOR_FREE(_evas_object_table_iterator_free); return &it->iterator; } EAPI Eina_Accessor * evas_object_table_accessor_new(const Evas_Object *o) { Evas_Object_Table_Accessor *it; EVAS_OBJECT_TABLE_DATA_GET_OR_RETURN_VAL(o, priv, NULL); if (!priv->children) return NULL; it = calloc(1, sizeof(Evas_Object_Table_Accessor)); if (!it) return NULL; EINA_MAGIC_SET(&it->accessor, EINA_MAGIC_ACCESSOR); it->real_accessor = eina_list_accessor_new(priv->children); it->table = o; it->accessor.get_at = FUNC_ACCESSOR_GET_AT(_evas_object_table_accessor_get_at); it->accessor.get_container = FUNC_ACCESSOR_GET_CONTAINER(_evas_object_table_accessor_get_container); it->accessor.free = FUNC_ACCESSOR_FREE(_evas_object_table_accessor_free); return &it->accessor; } EAPI Eina_List * evas_object_table_children_get(const Evas_Object *o) { Eina_List *new_list = NULL, *l; Evas_Object_Table_Option *opt; EVAS_OBJECT_TABLE_DATA_GET_OR_RETURN_VAL(o, priv, NULL); EINA_LIST_FOREACH(priv->children, l, opt) new_list = eina_list_append(new_list, opt->obj); return new_list; } Evas_Object * evas_object_table_child_get(const Evas_Object *o, unsigned short col, unsigned short row) { Eina_List *l; Evas_Object_Table_Option *opt; EVAS_OBJECT_TABLE_DATA_GET_OR_RETURN_VAL(o, priv, NULL); EINA_LIST_FOREACH(priv->children, l, opt) if (opt->col == col && opt->row == row) return opt->obj; return NULL; } EAPI Eina_Bool evas_object_table_mirrored_get(const Evas_Object *obj) { EVAS_OBJECT_TABLE_DATA_GET_OR_RETURN_VAL(obj, priv, EINA_FALSE); return priv->is_mirrored; } EAPI void evas_object_table_mirrored_set(Evas_Object *obj, Eina_Bool mirrored) { EVAS_OBJECT_TABLE_DATA_GET_OR_RETURN(obj, priv); if (priv->is_mirrored != mirrored) { priv->is_mirrored = mirrored; _evas_object_table_smart_calculate(obj); } } evas-1.7.9/src/lib/canvas/evas_data.c0000664000175000017500000000306312175475547014337 00000000000000#include "evas_common.h" #include "evas_private.h" EAPI void evas_object_data_set(Evas_Object *obj, const char *key, const void *data) { Evas_Data_Node *node; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); if (!key) return; evas_object_data_del(obj, key); if (!data) return; node = malloc(sizeof(Evas_Data_Node) + strlen(key) + 1); node->key = (char *)node + sizeof(Evas_Data_Node); strcpy(node->key, key); node->data = (void *)data; obj->data.elements = eina_list_prepend(obj->data.elements, node); } EAPI void * evas_object_data_get(const Evas_Object *obj, const char *key) { Eina_List *l; Evas_Data_Node *node; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return NULL; MAGIC_CHECK_END(); if (!key) return NULL; EINA_LIST_FOREACH(obj->data.elements, l, node) { if (!strcmp(node->key, key)) { Eina_List *lst; lst = obj->data.elements; lst = eina_list_promote_list(lst, l); ((Evas_Object *)obj)->data.elements = lst; return node->data; } } return NULL; } EAPI void * evas_object_data_del(Evas_Object *obj, const char *key) { Eina_List *l; Evas_Data_Node *node; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return NULL; MAGIC_CHECK_END(); if (!key) return NULL; EINA_LIST_FOREACH(obj->data.elements, l, node) { if (!strcmp(node->key, key)) { void *data; data = node->data; obj->data.elements = eina_list_remove_list(obj->data.elements, l); free(node); return data; } } return NULL; } evas-1.7.9/src/lib/canvas/evas_stats.c0000664000175000017500000001061212175475547014562 00000000000000#include "evas_common.h" #include "evas_private.h" #include "evas_cs.h" EAPI Eina_Bool evas_cserve_want_get(void) { #ifdef EVAS_CSERVE return evas_cserve_use_get(); #endif return 0; } EAPI Eina_Bool evas_cserve_connected_get(void) { #ifdef EVAS_CSERVE return evas_cserve_have_get(); #endif return 0; } EAPI Eina_Bool evas_cserve_stats_get(Evas_Cserve_Stats *stats) { #ifdef EVAS_CSERVE Op_Getstats_Reply st; if (!evas_cserve_raw_stats_get(&st)) return 0; if (!stats) return 1; stats->saved_memory = st.saved_memory; stats->wasted_memory = st.wasted_memory; stats->saved_memory_peak = st.saved_memory_peak; stats->wasted_memory_peak = st.wasted_memory_peak; stats->saved_time_image_header_load = st.saved_time_image_header_load; stats->saved_time_image_data_load = st.saved_time_image_data_load; // may expand this in future return 1; #else (void) stats; return 0; #endif } EAPI Eina_Bool evas_cserve_image_cache_contents_get(Evas_Cserve_Image_Cache *cache) { #ifdef EVAS_CSERVE Op_Getinfo_Reply *info; unsigned char *p; int i, j; if (!(info = evas_cserve_raw_info_get())) return 0; if (!cache) { free(info); return 1; } cache->active.mem_total = info->active.mem_total; cache->active.count = info->active.count; cache->cached.mem_total = info->cached.mem_total; cache->cached.count = info->cached.count; cache->images = NULL; j = info->active.count + info->cached.count; p = (unsigned char *)info; p += sizeof(Op_Getinfo_Reply); for (i = 0; i < j; i++) { Evas_Cserve_Image *im; Op_Getinfo_Item it; char *file, *key; memcpy(&it, p, sizeof(Op_Getinfo_Item)); file = (char*) (p + sizeof(Op_Getinfo_Item)); key = file + strlen(file) + 1; im = calloc(1, sizeof(Evas_Cserve_Image)); if (!im) continue; if (file[0] != 0) { file = (char *)eina_stringshare_add(file); if (!file) { free(im); continue; } } else file = NULL; if (key[0] != 0) { key = (char *)eina_stringshare_add(key); if (!key) { if (file) eina_stringshare_del(file); free(im); continue; } } else key = NULL; cache->images = eina_list_append(cache->images, im); im->file = file; im->key = key; im->w = it.w; im->h = it.h; im->cached_time = it.cached_time; im->file_mod_time = it.file_mod_time; im->file_checked_time = it.file_checked_time; im->refcount = it.refcount; im->data_refcount = it.data_refcount; im->memory_footprint = it.memory_footprint; im->head_load_time = it.head_load_time; im->data_load_time = it.data_load_time; im->active = it.active; im->alpha = it.alpha; im->data_loaded = it.data_loaded; im->dead = it.dead; im->useless = it.useless; } free(info); return 1; #else (void) cache; return 0; #endif } EAPI void evas_cserve_image_cache_contents_clean(Evas_Cserve_Image_Cache *cache) { #ifdef EVAS_CSERVE Evas_Cserve_Image *im; EINA_LIST_FREE(cache->images, im) { if (im->file) eina_stringshare_del(im->file); if (im->key) eina_stringshare_del(im->key); free(im); } #else (void) cache; #endif } EAPI Eina_Bool evas_cserve_config_get(Evas_Cserve_Config *config) { #ifdef EVAS_CSERVE Op_Getconfig_Reply conf; if (!evas_cserve_raw_config_get(&conf)) return 0; if (!config) return 1; config->cache_max_usage = conf.cache_max_usage; config->cache_item_timeout = conf.cache_item_timeout; config->cache_item_timeout_check = conf.cache_item_timeout_check; return 1; #else (void) config; return 0; #endif } EAPI Eina_Bool evas_cserve_config_set(const Evas_Cserve_Config *config) { #ifdef EVAS_CSERVE Op_Setconfig conf; if (!config) return 1; conf.cache_max_usage = config->cache_max_usage; conf.cache_item_timeout = config->cache_item_timeout; conf.cache_item_timeout_check = config->cache_item_timeout_check; return evas_cserve_raw_config_set(&conf); #else (void) config; return 0; #endif } EAPI void evas_cserve_disconnect(void) { #ifdef EVAS_CSERVE evas_cserve_discon(); #endif } evas-1.7.9/src/lib/canvas/evas_events.c0000664000175000017500000017617112175475547014745 00000000000000#include "evas_common.h" #include "evas_private.h" static Eina_List * _evas_event_object_list_in_get(Evas *e, Eina_List *in, const Eina_Inlist *list, Evas_Object *stop, int x, int y, int *no_rep); static void _evas_event_havemap_adjust(Evas_Object *obj, Evas_Coord *x, Evas_Coord *y, Eina_Bool mouse_grabbed) { if (obj->smart.parent) _evas_event_havemap_adjust(obj->smart.parent, x, y, mouse_grabbed); if ((!obj->cur.usemap) || (!obj->cur.map) || (!obj->cur.map->count == 4)) return; evas_map_coords_get(obj->cur.map, *x, *y, x, y, mouse_grabbed); *x += obj->cur.geometry.x; *y += obj->cur.geometry.y; } static void _evas_event_framespace_adjust(Evas_Object *obj, Evas_Coord *x, Evas_Coord *y) { if (obj->is_frame) return; if ((!obj->smart.parent) && (obj->smart.smart)) { Evas *evas; evas = obj->layer->evas; if (x) *x -= evas->framespace.x; if (y) *y -= evas->framespace.y; } } static Eina_List * _evas_event_object_list_raw_in_get(Evas *e, Eina_List *in, const Eina_Inlist *list, Evas_Object *stop, int x, int y, int *no_rep) { Evas_Object *obj; int inside; if (!list) return in; for (obj = _EINA_INLIST_CONTAINER(obj, list); obj; obj = _EINA_INLIST_CONTAINER(obj, EINA_INLIST_GET(obj)->prev)) { if (obj == stop) { *no_rep = 1; return in; } if (evas_event_passes_through(obj)) continue; if ((obj->cur.visible) && (obj->delete_me == 0) && (!obj->clip.clipees) && (evas_object_clippers_is_visible(obj))) { if (obj->smart.smart) { int norep = 0; if ((obj->cur.usemap) && (obj->cur.map) && (obj->cur.map->count == 4)) { inside = evas_object_is_in_output_rect(obj, x, y, 1, 1); if (inside) { if (!evas_map_coords_get(obj->cur.map, x, y, &(obj->cur.map->mx), &(obj->cur.map->my), 0)) { inside = 0; } else { in = _evas_event_object_list_in_get (e, in, evas_object_smart_members_get_direct(obj), stop, obj->cur.geometry.x + obj->cur.map->mx, obj->cur.geometry.y + obj->cur.map->my, &norep); } } } else { if (!obj->child_has_map) evas_object_smart_bouding_box_update(obj); if (obj->child_has_map || (obj->cur.bounding_box.x <= x && obj->cur.bounding_box.x + obj->cur.bounding_box.w >= x && obj->cur.bounding_box.y <= y && obj->cur.bounding_box.y + obj->cur.bounding_box.h >= y) || (obj->cur.geometry.x <= x && obj->cur.geometry.y + obj->cur.geometry.w >= x && obj->cur.geometry.y <= y && obj->cur.geometry.y + obj->cur.geometry.h >= y)) in = _evas_event_object_list_in_get (e, in, evas_object_smart_members_get_direct(obj), stop, x, y, &norep); } if (norep) { if (!obj->repeat_events) { *no_rep = 1; return in; } } } else { inside = evas_object_is_in_output_rect(obj, x, y, 1, 1); if (inside) { if ((obj->cur.usemap) && (obj->cur.map) && (obj->cur.map->count == 4)) { if (!evas_map_coords_get(obj->cur.map, x, y, &(obj->cur.map->mx), &(obj->cur.map->my), 0)) { inside = 0; } } } if (inside && ((!obj->precise_is_inside) || (evas_object_is_inside(obj, x, y)))) { if (!evas_event_freezes_through(obj)) in = eina_list_append(in, obj); if (!obj->repeat_events) { *no_rep = 1; return in; } } } } } *no_rep = 0; return in; } static Eina_List * _evas_event_object_list_in_get(Evas *e, Eina_List *in, const Eina_Inlist *list, Evas_Object *stop, int x, int y, int *no_rep) { if (!list) return NULL; return _evas_event_object_list_raw_in_get(e, in, list->last, stop, x, y, no_rep); } Eina_List * evas_event_objects_event_list(Evas *e, Evas_Object *stop, int x, int y) { Evas_Layer *lay; Eina_List *in = NULL; if ((!e->layers) || (e->events_frozen > 0)) return NULL; EINA_INLIST_REVERSE_FOREACH((EINA_INLIST_GET(e->layers)), lay) { int no_rep = 0; in = _evas_event_object_list_in_get(e, in, EINA_INLIST_GET(lay->objects), stop, x, y, &no_rep); if (no_rep) return in; } return in; } static Eina_List * evas_event_list_copy(Eina_List *list) { Eina_List *l, *new_l = NULL; const void *data; EINA_LIST_FOREACH(list, l, data) new_l = eina_list_append(new_l, data); return new_l; } /* public functions */ EAPI void evas_event_default_flags_set(Evas *e, Evas_Event_Flags flags) { MAGIC_CHECK(e, Evas, MAGIC_EVAS); return; MAGIC_CHECK_END(); e->default_event_flags = flags; } EAPI Evas_Event_Flags evas_event_default_flags_get(const Evas *e) { MAGIC_CHECK(e, Evas, MAGIC_EVAS); return EVAS_EVENT_FLAG_ON_HOLD; MAGIC_CHECK_END(); return e->default_event_flags; } EAPI void evas_event_freeze(Evas *e) { MAGIC_CHECK(e, Evas, MAGIC_EVAS); return; MAGIC_CHECK_END(); e->events_frozen++; } EAPI void evas_event_thaw(Evas *e) { MAGIC_CHECK(e, Evas, MAGIC_EVAS); return; MAGIC_CHECK_END(); e->events_frozen--; if (e->events_frozen == 0) { Evas_Layer *lay; EINA_INLIST_FOREACH((EINA_INLIST_GET(e->layers)), lay) { Evas_Object *obj; EINA_INLIST_FOREACH(lay->objects, obj) { evas_object_clip_recalc(obj); evas_object_recalc_clippees(obj); } } } if (e->events_frozen < 0) evas_debug_generic(" Thaw of events when already thawed!!!\n"); } EAPI int evas_event_freeze_get(const Evas *e) { MAGIC_CHECK(e, Evas, MAGIC_EVAS); return 0; MAGIC_CHECK_END(); return e->events_frozen; } EAPI void evas_event_thaw_eval(Evas *e) { MAGIC_CHECK(e, Evas, MAGIC_EVAS); return; MAGIC_CHECK_END(); if (e->events_frozen != 0) return; evas_event_feed_mouse_move(e, e->pointer.x, e->pointer.y, e->last_timestamp, NULL); } EAPI void evas_event_feed_mouse_down(Evas *e, int b, Evas_Button_Flags flags, unsigned int timestamp, const void *data) { Eina_List *l, *copy; Evas_Event_Mouse_Down ev; Evas_Object *obj; int addgrab = 0; int event_id = 0; MAGIC_CHECK(e, Evas, MAGIC_EVAS); return; MAGIC_CHECK_END(); if ((b < 1) || (b > 32)) return; e->pointer.button |= (1 << (b - 1)); e->pointer.downs++; if (e->events_frozen > 0) return; e->last_timestamp = timestamp; _evas_object_event_new(); event_id = _evas_event_counter; ev.button = b; ev.output.x = e->pointer.x; ev.output.y = e->pointer.y; ev.canvas.x = e->pointer.x; ev.canvas.y = e->pointer.y; ev.data = (void *)data; ev.modifiers = &(e->modifiers); ev.locks = &(e->locks); ev.flags = flags; ev.timestamp = timestamp; ev.event_flags = e->default_event_flags; _evas_walk(e); /* append new touch point to the touch point list */ _evas_touch_point_append(e, 0, e->pointer.x, e->pointer.y); /* If this is the first finger down, i.e no other fingers pressed, * get a new event list, otherwise, keep the current grabbed list. */ if (e->pointer.mouse_grabbed == 0) { Eina_List *ins = evas_event_objects_event_list(e, NULL, e->pointer.x, e->pointer.y); /* free our old list of ins */ e->pointer.object.in = eina_list_free(e->pointer.object.in); /* and set up the new one */ e->pointer.object.in = ins; /* adjust grabbed count by the nuymber of currently held down * fingers/buttons */ if (e->pointer.downs > 1) addgrab = e->pointer.downs - 1; } copy = evas_event_list_copy(e->pointer.object.in); EINA_LIST_FOREACH(copy, l, obj) { if ((obj->pointer_mode == EVAS_OBJECT_POINTER_MODE_AUTOGRAB) || (obj->pointer_mode == EVAS_OBJECT_POINTER_MODE_NOGRAB_NO_REPEAT_UPDOWN)) { obj->mouse_grabbed += addgrab + 1; e->pointer.mouse_grabbed += addgrab + 1; if (obj->pointer_mode == EVAS_OBJECT_POINTER_MODE_NOGRAB_NO_REPEAT_UPDOWN) { e->pointer.nogrep++; break; } } } EINA_LIST_FOREACH(copy, l, obj) { if (obj->delete_me) continue; ev.canvas.x = e->pointer.x; ev.canvas.y = e->pointer.y; _evas_event_framespace_adjust(obj, &ev.canvas.x, &ev.canvas.y); _evas_event_havemap_adjust(obj, &ev.canvas.x, &ev.canvas.y, obj->mouse_grabbed); if (e->events_frozen <= 0) evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_DOWN, &ev, event_id); if (e->delete_me) break; if (obj->pointer_mode == EVAS_OBJECT_POINTER_MODE_NOGRAB_NO_REPEAT_UPDOWN) break; } if (copy) eina_list_free(copy); e->last_mouse_down_counter++; _evas_post_event_callback_call(e); /* update touch point's state to EVAS_TOUCH_POINT_STILL */ _evas_touch_point_update(e, 0, e->pointer.x, e->pointer.y, EVAS_TOUCH_POINT_STILL); _evas_unwalk(e); } static int _post_up_handle(Evas *e, unsigned int timestamp, const void *data) { Eina_List *l, *copy, *ins, *ll; Evas_Event_Mouse_Out ev; Evas_Object *obj; int post_called = 0; int event_id = 0; _evas_object_event_new(); event_id = _evas_event_counter; ev.buttons = e->pointer.button; ev.output.x = e->pointer.x; ev.output.y = e->pointer.y; ev.canvas.x = e->pointer.x; ev.canvas.y = e->pointer.y; ev.data = (void *)data; ev.modifiers = &(e->modifiers); ev.locks = &(e->locks); ev.timestamp = timestamp; ev.event_flags = e->default_event_flags; /* get new list of ins */ ins = evas_event_objects_event_list(e, NULL, e->pointer.x, e->pointer.y); /* go thru old list of in objects */ copy = evas_event_list_copy(e->pointer.object.in); EINA_LIST_FOREACH(copy, ll, obj) { ev.canvas.x = e->pointer.x; ev.canvas.y = e->pointer.y; _evas_event_framespace_adjust(obj, &ev.canvas.x, &ev.canvas.y); _evas_event_havemap_adjust(obj, &ev.canvas.x, &ev.canvas.y, obj->mouse_grabbed); if ((!eina_list_data_find(ins, obj)) || (!e->pointer.inside)) { if (obj->mouse_in) { obj->mouse_in = 0; if (e->events_frozen <= 0) evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_OUT, &ev, event_id); } } if (e->delete_me) break; } _evas_post_event_callback_call(e); if (copy) copy = eina_list_free(copy); if (e->pointer.inside) { Evas_Event_Mouse_In ev_in; Evas_Object *obj_itr; _evas_object_event_new(); event_id = _evas_event_counter; ev_in.buttons = e->pointer.button; ev_in.output.x = e->pointer.x; ev_in.output.y = e->pointer.y; ev_in.canvas.x = e->pointer.x; ev_in.canvas.y = e->pointer.y; ev_in.data = (void *)data; ev_in.modifiers = &(e->modifiers); ev_in.locks = &(e->locks); ev_in.timestamp = timestamp; ev_in.event_flags = e->default_event_flags; EINA_LIST_FOREACH(ins, l, obj_itr) { ev_in.canvas.x = e->pointer.x; ev_in.canvas.y = e->pointer.y; _evas_event_framespace_adjust(obj_itr, &ev_in.canvas.x, &ev_in.canvas.y); _evas_event_havemap_adjust(obj_itr, &ev_in.canvas.x, &ev_in.canvas.y, obj_itr->mouse_grabbed); if (!eina_list_data_find(e->pointer.object.in, obj_itr)) { if (!obj_itr->mouse_in) { obj_itr->mouse_in = 1; if (e->events_frozen <= 0) evas_object_event_callback_call(obj_itr, EVAS_CALLBACK_MOUSE_IN, &ev_in, event_id); } } if (e->delete_me) break; } post_called = 1; _evas_post_event_callback_call(e); } else { ins = eina_list_free(ins); } if (e->pointer.mouse_grabbed == 0) { /* free our old list of ins */ eina_list_free(e->pointer.object.in); /* and set up the new one */ e->pointer.object.in = ins; } else { /* free our cur ins */ eina_list_free(ins); } if (e->pointer.inside) evas_event_feed_mouse_move(e, e->pointer.x, e->pointer.y, timestamp, data); return post_called; } EAPI void evas_event_feed_mouse_up(Evas *e, int b, Evas_Button_Flags flags, unsigned int timestamp, const void *data) { Eina_List *l, *copy; MAGIC_CHECK(e, Evas, MAGIC_EVAS); return; MAGIC_CHECK_END(); if ((b < 1) || (b > 32)) return; if (e->pointer.downs <= 0) return; e->pointer.button &= ~(1 << (b - 1)); e->pointer.downs--; if (e->events_frozen > 0) return; e->last_timestamp = timestamp; { Evas_Event_Mouse_Up ev; Evas_Object *obj; int event_id = 0; _evas_object_event_new(); event_id = _evas_event_counter; ev.button = b; ev.output.x = e->pointer.x; ev.output.y = e->pointer.y; ev.canvas.x = e->pointer.x; ev.canvas.y = e->pointer.y; ev.data = (void *)data; ev.modifiers = &(e->modifiers); ev.locks = &(e->locks); ev.flags = flags; ev.timestamp = timestamp; ev.event_flags = e->default_event_flags; _evas_walk(e); /* update released touch point */ _evas_touch_point_update(e, 0, e->pointer.x, e->pointer.y, EVAS_TOUCH_POINT_UP); copy = evas_event_list_copy(e->pointer.object.in); EINA_LIST_FOREACH(copy, l, obj) { ev.canvas.x = e->pointer.x; ev.canvas.y = e->pointer.y; _evas_event_framespace_adjust(obj, &ev.canvas.x, &ev.canvas.y); _evas_event_havemap_adjust(obj, &ev.canvas.x, &ev.canvas.y, obj->mouse_grabbed); if ((obj->pointer_mode == EVAS_OBJECT_POINTER_MODE_AUTOGRAB) && (obj->mouse_grabbed > 0)) { obj->mouse_grabbed--; e->pointer.mouse_grabbed--; } if (!obj->delete_me) { if ((e->events_frozen <= 0) && (!evas_event_freezes_through(obj))) evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_UP, &ev, event_id); } if (e->delete_me) break; if (obj->pointer_mode == EVAS_OBJECT_POINTER_MODE_NOGRAB_NO_REPEAT_UPDOWN) { if (e->pointer.nogrep > 0) e->pointer.nogrep--; break; } } if (copy) copy = eina_list_free(copy); e->last_mouse_up_counter++; _evas_post_event_callback_call(e); } if (e->pointer.mouse_grabbed == 0) { _post_up_handle(e, timestamp, data); } if (e->pointer.mouse_grabbed < 0) { ERR("BUG? e->pointer.mouse_grabbed (=%d) < 0!", e->pointer.mouse_grabbed); } /* remove released touch point from the touch point list */ _evas_touch_point_remove(e, 0); _evas_unwalk(e); } EAPI void evas_event_feed_mouse_cancel(Evas *e, unsigned int timestamp, const void *data) { int i; MAGIC_CHECK(e, Evas, MAGIC_EVAS); return; MAGIC_CHECK_END(); if (e->events_frozen > 0) return; _evas_walk(e); for (i = 0; i < 32; i++) { if ((e->pointer.button & (1 << i))) evas_event_feed_mouse_up(e, i + 1, 0, timestamp, data); } // FIXME: multi cancel too? _evas_unwalk(e); } EAPI void evas_event_feed_mouse_wheel(Evas *e, int direction, int z, unsigned int timestamp, const void *data) { Eina_List *l, *copy; Evas_Event_Mouse_Wheel ev; Evas_Object *obj; int event_id = 0; MAGIC_CHECK(e, Evas, MAGIC_EVAS); return; MAGIC_CHECK_END(); if (e->events_frozen > 0) return; e->last_timestamp = timestamp; _evas_object_event_new(); event_id = _evas_event_counter; ev.direction = direction; ev.z = z; ev.output.x = e->pointer.x; ev.output.y = e->pointer.y; ev.canvas.x = e->pointer.x; ev.canvas.y = e->pointer.y; ev.data = (void *) data; ev.modifiers = &(e->modifiers); ev.locks = &(e->locks); ev.timestamp = timestamp; ev.event_flags = e->default_event_flags; _evas_walk(e); copy = evas_event_list_copy(e->pointer.object.in); EINA_LIST_FOREACH(copy, l, obj) { ev.canvas.x = e->pointer.x; ev.canvas.y = e->pointer.y; _evas_event_framespace_adjust(obj, &ev.canvas.x, &ev.canvas.y); _evas_event_havemap_adjust(obj, &ev.canvas.x, &ev.canvas.y, obj->mouse_grabbed); if ((e->events_frozen <= 0) && !evas_event_freezes_through(obj)) evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_WHEEL, &ev, event_id); if (e->delete_me) break; } if (copy) copy = eina_list_free(copy); _evas_post_event_callback_call(e); _evas_unwalk(e); } EAPI void evas_event_feed_mouse_move(Evas *e, int x, int y, unsigned int timestamp, const void *data) { Evas_Object *nogrep_obj = NULL; int px, py; //// Evas_Coord pcx, pcy; MAGIC_CHECK(e, Evas, MAGIC_EVAS); return; MAGIC_CHECK_END(); px = e->pointer.x; py = e->pointer.y; //// pcx = e->pointer.canvas_x; //// pcy = e->pointer.canvas_y; if (e->events_frozen > 0) return; e->last_timestamp = timestamp; e->pointer.x = x; e->pointer.y = y; //// e->pointer.canvas_x = x; //// e->pointer.canvas_y = y; //// e->pointer.canvas_x = evas_coord_screen_x_to_world(e, x); //// e->pointer.canvas_y = evas_coord_screen_y_to_world(e, y); if ((!e->pointer.inside) && (e->pointer.mouse_grabbed == 0)) return; _evas_walk(e); /* update moved touch point */ if ((px != x) || (py != y)) _evas_touch_point_update(e, 0, e->pointer.x, e->pointer.y, EVAS_TOUCH_POINT_MOVE); /* if our mouse button is grabbed to any objects */ if (e->pointer.mouse_grabbed > 0) { /* go thru old list of in objects */ Eina_List *outs = NULL; Eina_List *l, *copy; { Evas_Event_Mouse_Move ev; Evas_Object *obj; int event_id = 0; _evas_object_event_new(); event_id = _evas_event_counter; ev.buttons = e->pointer.button; ev.cur.output.x = e->pointer.x; ev.cur.output.y = e->pointer.y; ev.cur.canvas.x = e->pointer.x; ev.cur.canvas.y = e->pointer.y; ev.prev.output.x = px; ev.prev.output.y = py; ev.prev.canvas.x = px; ev.prev.canvas.y = py; ev.data = (void *)data; ev.modifiers = &(e->modifiers); ev.locks = &(e->locks); ev.timestamp = timestamp; ev.event_flags = e->default_event_flags; copy = evas_event_list_copy(e->pointer.object.in); EINA_LIST_FOREACH(copy, l, obj) { ev.cur.canvas.x = e->pointer.x; ev.cur.canvas.y = e->pointer.y; _evas_event_framespace_adjust(obj, &ev.cur.canvas.x, &ev.cur.canvas.y); _evas_event_havemap_adjust(obj, &ev.cur.canvas.x, &ev.cur.canvas.y, obj->mouse_grabbed); if ((e->events_frozen <= 0) && (evas_object_clippers_is_visible(obj) || obj->mouse_grabbed) && (!evas_event_passes_through(obj)) && (!evas_event_freezes_through(obj)) && (!obj->clip.clipees)) { if ((px != x) || (py != y)) evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_MOVE, &ev, event_id); } else outs = eina_list_append(outs, obj); if ((obj->pointer_mode == EVAS_OBJECT_POINTER_MODE_NOGRAB_NO_REPEAT_UPDOWN) && (e->pointer.nogrep > 0)) { eina_list_free(copy); nogrep_obj = obj; goto nogrep; } if (e->delete_me) break; } _evas_post_event_callback_call(e); } { Evas_Event_Mouse_Out ev; int event_id = 0; _evas_object_event_new(); event_id = _evas_event_counter; ev.buttons = e->pointer.button; ev.output.x = e->pointer.x; ev.output.y = e->pointer.y; ev.canvas.x = e->pointer.x; ev.canvas.y = e->pointer.y; ev.data = (void *)data; ev.modifiers = &(e->modifiers); ev.locks = &(e->locks); ev.timestamp = timestamp; ev.event_flags = e->default_event_flags; if (copy) eina_list_free(copy); while (outs) { Evas_Object *obj; obj = outs->data; outs = eina_list_remove(outs, obj); if ((obj->mouse_grabbed == 0) && (!e->delete_me)) { ev.canvas.x = e->pointer.x; ev.canvas.y = e->pointer.y; _evas_event_framespace_adjust(obj, &ev.canvas.x, &ev.canvas.y); _evas_event_havemap_adjust(obj, &ev.canvas.x, &ev.canvas.y, obj->mouse_grabbed); e->pointer.object.in = eina_list_remove(e->pointer.object.in, obj); if (obj->mouse_in) { obj->mouse_in = 0; if (!obj->delete_me) { if (e->events_frozen <= 0) evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_OUT, &ev, event_id); } } } } _evas_post_event_callback_call(e); } } else { Eina_List *ins; Eina_List *l, *copy; Evas_Event_Mouse_Move ev; Evas_Event_Mouse_Out ev2; Evas_Event_Mouse_In ev3; Evas_Object *obj; int event_id = 0, event_id2 = 0; _evas_object_event_new(); event_id = _evas_event_counter; ev.buttons = e->pointer.button; ev.cur.output.x = e->pointer.x; ev.cur.output.y = e->pointer.y; ev.cur.canvas.x = e->pointer.x; ev.cur.canvas.y = e->pointer.y; ev.prev.output.x = px; ev.prev.output.y = py; ev.prev.canvas.x = px; ev.prev.canvas.y = py; ev.data = (void *)data; ev.modifiers = &(e->modifiers); ev.locks = &(e->locks); ev.timestamp = timestamp; ev.event_flags = e->default_event_flags; ev2.buttons = e->pointer.button; ev2.output.x = e->pointer.x; ev2.output.y = e->pointer.y; ev2.canvas.x = e->pointer.x; ev2.canvas.y = e->pointer.y; ev2.data = (void *)data; ev2.modifiers = &(e->modifiers); ev2.locks = &(e->locks); ev2.timestamp = timestamp; ev2.event_flags = e->default_event_flags; ev3.buttons = e->pointer.button; ev3.output.x = e->pointer.x; ev3.output.y = e->pointer.y; ev3.canvas.x = e->pointer.x; ev3.canvas.y = e->pointer.y; ev3.data = (void *)data; ev3.modifiers = &(e->modifiers); ev3.locks = &(e->locks); ev3.timestamp = timestamp; ev3.event_flags = e->default_event_flags; /* get all new in objects */ ins = evas_event_objects_event_list(e, NULL, x, y); /* go thru old list of in objects */ copy = evas_event_list_copy(e->pointer.object.in); EINA_LIST_FOREACH(copy, l, obj) { /* if its under the pointer and its visible and its in the new */ /* in list */ // FIXME: i don't think we need this // evas_object_clip_recalc(obj); if ((e->events_frozen <= 0) && evas_object_is_in_output_rect(obj, x, y, 1, 1) && (evas_object_clippers_is_visible(obj) || obj->mouse_grabbed) && eina_list_data_find(ins, obj) && (!evas_event_passes_through(obj)) && (!evas_event_freezes_through(obj)) && (!obj->clip.clipees) && ((!obj->precise_is_inside) || evas_object_is_inside(obj, x, y)) ) { if ((px != x) || (py != y)) { ev.cur.canvas.x = e->pointer.x; ev.cur.canvas.y = e->pointer.y; _evas_event_havemap_adjust(obj, &ev.cur.canvas.x, &ev.cur.canvas.y, obj->mouse_grabbed); evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_MOVE, &ev, event_id); } } /* otherwise it has left the object */ else { if (obj->mouse_in) { obj->mouse_in = 0; ev2.canvas.x = e->pointer.x; ev2.canvas.y = e->pointer.y; _evas_event_framespace_adjust(obj, &ev2.canvas.x, &ev2.canvas.y); _evas_event_havemap_adjust(obj, &ev2.canvas.x, &ev2.canvas.y, obj->mouse_grabbed); if (e->events_frozen <= 0) evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_OUT, &ev2, event_id); } } if (e->delete_me) break; } _evas_post_event_callback_call(e); _evas_object_event_new(); event_id2 = _evas_event_counter; if (copy) copy = eina_list_free(copy); /* go thru our current list of ins */ EINA_LIST_FOREACH(ins, l, obj) { ev3.canvas.x = e->pointer.x; ev3.canvas.y = e->pointer.y; _evas_event_framespace_adjust(obj, &ev3.canvas.x, &ev3.canvas.y); _evas_event_havemap_adjust(obj, &ev3.canvas.x, &ev3.canvas.y, obj->mouse_grabbed); /* if its not in the old list of ins send an enter event */ if (!eina_list_data_find(e->pointer.object.in, obj)) { if (!obj->mouse_in) { obj->mouse_in = 1; if (e->events_frozen <= 0) evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_IN, &ev3, event_id2); } } if (e->delete_me) break; } if (e->pointer.mouse_grabbed == 0) { /* free our old list of ins */ eina_list_free(e->pointer.object.in); /* and set up the new one */ e->pointer.object.in = ins; } else { /* free our cur ins */ eina_list_free(ins); } _evas_post_event_callback_call(e); } _evas_unwalk(e); return; nogrep: { Eina_List *ins = NULL; Eina_List *newin = NULL; Eina_List *l, *copy, *lst = NULL; Evas_Event_Mouse_Move ev; Evas_Event_Mouse_Out ev2; Evas_Event_Mouse_In ev3; Evas_Object *obj, *below_obj; int event_id = 0, event_id2 = 0; int norep = 0, breaknext = 0; _evas_object_event_new(); event_id = _evas_event_counter; ev.buttons = e->pointer.button; ev.cur.output.x = e->pointer.x; ev.cur.output.y = e->pointer.y; ev.cur.canvas.x = e->pointer.x; ev.cur.canvas.y = e->pointer.y; ev.prev.output.x = px; ev.prev.output.y = py; ev.prev.canvas.x = px; ev.prev.canvas.y = py; ev.data = (void *)data; ev.modifiers = &(e->modifiers); ev.locks = &(e->locks); ev.timestamp = timestamp; ev.event_flags = e->default_event_flags; ev2.buttons = e->pointer.button; ev2.output.x = e->pointer.x; ev2.output.y = e->pointer.y; ev2.canvas.x = e->pointer.x; ev2.canvas.y = e->pointer.y; ev2.data = (void *)data; ev2.modifiers = &(e->modifiers); ev2.locks = &(e->locks); ev2.timestamp = timestamp; ev2.event_flags = e->default_event_flags; ev3.buttons = e->pointer.button; ev3.output.x = e->pointer.x; ev3.output.y = e->pointer.y; ev3.canvas.x = e->pointer.x; ev3.canvas.y = e->pointer.y; ev3.data = (void *)data; ev3.modifiers = &(e->modifiers); ev3.locks = &(e->locks); ev3.timestamp = timestamp; ev3.event_flags = e->default_event_flags; /* go thru old list of in objects */ copy = evas_event_list_copy(e->pointer.object.in); EINA_LIST_FOREACH(copy, l, obj) { if (breaknext) { lst = l; break; } if (obj == nogrep_obj) breaknext = 1; } /* get all new in objects */ below_obj = evas_object_below_get(nogrep_obj); if (below_obj) ins = _evas_event_object_list_raw_in_get(e, NULL, EINA_INLIST_GET(below_obj), NULL, e->pointer.x, e->pointer.y, &norep); EINA_LIST_FOREACH(copy, l, obj) { newin = eina_list_append(newin, obj); if (obj == nogrep_obj) break; } EINA_LIST_FOREACH(ins, l, obj) { newin = eina_list_append(newin, obj); } EINA_LIST_FOREACH(lst, l, obj) { /* if its under the pointer and its visible and its in the new */ /* in list */ // FIXME: i don't think we need this // evas_object_clip_recalc(obj); if ((e->events_frozen <= 0) && evas_object_is_in_output_rect(obj, x, y, 1, 1) && (evas_object_clippers_is_visible(obj) || obj->mouse_grabbed) && eina_list_data_find(newin, obj) && (!evas_event_passes_through(obj)) && (!evas_event_freezes_through(obj)) && (!obj->clip.clipees) && ((!obj->precise_is_inside) || evas_object_is_inside(obj, x, y)) ) { if ((px != x) || (py != y)) { ev.cur.canvas.x = e->pointer.x; ev.cur.canvas.y = e->pointer.y; _evas_event_framespace_adjust(obj, &ev.cur.canvas.x, &ev.cur.canvas.y); _evas_event_havemap_adjust(obj, &ev.cur.canvas.x, &ev.cur.canvas.y, obj->mouse_grabbed); evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_MOVE, &ev, event_id); } } /* otherwise it has left the object */ else { if (obj->mouse_in) { obj->mouse_in = 0; ev2.canvas.x = e->pointer.x; ev2.canvas.y = e->pointer.y; _evas_event_framespace_adjust(obj, &ev2.canvas.x, &ev2.canvas.y); _evas_event_havemap_adjust(obj, &ev2.canvas.x, &ev2.canvas.y, obj->mouse_grabbed); if (e->events_frozen <= 0) evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_OUT, &ev2, event_id); } } if (e->delete_me) break; } _evas_post_event_callback_call(e); _evas_object_event_new(); event_id2 = _evas_event_counter; if (copy) copy = eina_list_free(copy); /* go thru our current list of ins */ EINA_LIST_FOREACH(newin, l, obj) { ev3.canvas.x = e->pointer.x; ev3.canvas.y = e->pointer.y; _evas_event_framespace_adjust(obj, &ev3.canvas.x, &ev3.canvas.y); _evas_event_havemap_adjust(obj, &ev3.canvas.x, &ev3.canvas.y, obj->mouse_grabbed); /* if its not in the old list of ins send an enter event */ if (!eina_list_data_find(e->pointer.object.in, obj)) { if (!obj->mouse_in) { obj->mouse_in = 1; if (e->events_frozen <= 0) evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_IN, &ev3, event_id2); } } if (e->delete_me) break; } /* free our old list of ins */ eina_list_free(e->pointer.object.in); /* and set up the new one */ e->pointer.object.in = newin; _evas_post_event_callback_call(e); } _evas_unwalk(e); } EAPI void evas_event_feed_mouse_in(Evas *e, unsigned int timestamp, const void *data) { Eina_List *ins; Eina_List *l; Evas_Event_Mouse_In ev; Evas_Object *obj; int event_id = 0; MAGIC_CHECK(e, Evas, MAGIC_EVAS); return; MAGIC_CHECK_END(); e->pointer.inside = 1; if (e->events_frozen > 0) return; e->last_timestamp = timestamp; if (e->pointer.mouse_grabbed != 0) return; _evas_object_event_new(); event_id = _evas_event_counter; ev.buttons = e->pointer.button; ev.output.x = e->pointer.x; ev.output.y = e->pointer.y; ev.canvas.x = e->pointer.x; ev.canvas.y = e->pointer.y; ev.data = (void *)data; ev.modifiers = &(e->modifiers); ev.locks = &(e->locks); ev.timestamp = timestamp; ev.event_flags = e->default_event_flags; _evas_walk(e); /* get new list of ins */ ins = evas_event_objects_event_list(e, NULL, e->pointer.x, e->pointer.y); EINA_LIST_FOREACH(ins, l, obj) { ev.canvas.x = e->pointer.x; ev.canvas.y = e->pointer.y; _evas_event_framespace_adjust(obj, &ev.canvas.x, &ev.canvas.y); _evas_event_havemap_adjust(obj, &ev.canvas.x, &ev.canvas.y, obj->mouse_grabbed); if (!eina_list_data_find(e->pointer.object.in, obj)) { if (!obj->mouse_in) { obj->mouse_in = 1; if (e->events_frozen <= 0) evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_IN, &ev, event_id); } } if (e->delete_me) break; } /* free our old list of ins */ e->pointer.object.in = eina_list_free(e->pointer.object.in); /* and set up the new one */ e->pointer.object.in = ins; _evas_post_event_callback_call(e); evas_event_feed_mouse_move(e, e->pointer.x, e->pointer.y, timestamp, data); _evas_unwalk(e); } EAPI void evas_event_feed_mouse_out(Evas *e, unsigned int timestamp, const void *data) { Evas_Event_Mouse_Out ev; int event_id = 0; MAGIC_CHECK(e, Evas, MAGIC_EVAS); return; MAGIC_CHECK_END(); e->pointer.inside = 0; if (e->events_frozen > 0) return; e->last_timestamp = timestamp; _evas_object_event_new(); event_id = _evas_event_counter; ev.buttons = e->pointer.button; ev.output.x = e->pointer.x; ev.output.y = e->pointer.y; ev.canvas.x = e->pointer.x; ev.canvas.y = e->pointer.y; ev.data = (void *)data; ev.modifiers = &(e->modifiers); ev.locks = &(e->locks); ev.timestamp = timestamp; ev.event_flags = e->default_event_flags; _evas_walk(e); /* if our mouse button is inside any objects */ { /* go thru old list of in objects */ Eina_List *l, *copy; Evas_Object *obj; copy = evas_event_list_copy(e->pointer.object.in); EINA_LIST_FOREACH(copy, l, obj) { ev.canvas.x = e->pointer.x; ev.canvas.y = e->pointer.y; _evas_event_framespace_adjust(obj, &ev.canvas.x, &ev.canvas.y); _evas_event_havemap_adjust(obj, &ev.canvas.x, &ev.canvas.y, obj->mouse_grabbed); if (obj->mouse_in) { obj->mouse_in = 0; if (!obj->delete_me) { if (e->events_frozen <= 0) evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_OUT, &ev, event_id); } obj->mouse_grabbed = 0; } if (e->delete_me) break; } if (copy) copy = eina_list_free(copy); /* free our old list of ins */ e->pointer.object.in = eina_list_free(e->pointer.object.in); e->pointer.mouse_grabbed = 0; _evas_post_event_callback_call(e); } _evas_unwalk(e); } EAPI void evas_event_feed_multi_down(Evas *e, int d, int x, int y, double rad, double radx, double rady, double pres, double ang, double fx, double fy, Evas_Button_Flags flags, unsigned int timestamp, const void *data) { Eina_List *l, *copy; Evas_Event_Multi_Down ev; Evas_Object *obj; int addgrab = 0; int event_id = 0; MAGIC_CHECK(e, Evas, MAGIC_EVAS); return; MAGIC_CHECK_END(); e->pointer.downs++; if (e->events_frozen > 0) return; e->last_timestamp = timestamp; _evas_object_event_new(); event_id = _evas_event_counter; ev.device = d; ev.output.x = x; ev.output.y = y; ev.canvas.x = x; ev.canvas.y = y; ev.radius = rad; ev.radius_x = radx; ev.radius_y = rady; ev.pressure = pres; ev.angle = ang; ev.canvas.xsub = fx; ev.canvas.ysub = fy; ev.data = (void *)data; ev.modifiers = &(e->modifiers); ev.locks = &(e->locks); ev.flags = flags; ev.timestamp = timestamp; ev.event_flags = e->default_event_flags; _evas_walk(e); /* append new touch point to the touch point list */ _evas_touch_point_append(e, d, x, y); if (e->pointer.mouse_grabbed == 0) { if (e->pointer.downs > 1) addgrab = e->pointer.downs - 1; } copy = evas_event_list_copy(e->pointer.object.in); EINA_LIST_FOREACH(copy, l, obj) { if (obj->pointer_mode != EVAS_OBJECT_POINTER_MODE_NOGRAB) { obj->mouse_grabbed += addgrab + 1; e->pointer.mouse_grabbed += addgrab + 1; } } EINA_LIST_FOREACH(copy, l, obj) { ev.canvas.x = x; ev.canvas.y = y; ev.canvas.xsub = fx; ev.canvas.ysub = fy; _evas_event_framespace_adjust(obj, &ev.canvas.x, &ev.canvas.y); _evas_event_havemap_adjust(obj, &ev.canvas.x, &ev.canvas.y, obj->mouse_grabbed); if (x != ev.canvas.x) ev.canvas.xsub = ev.canvas.x; // fixme - lost precision if (y != ev.canvas.y) ev.canvas.ysub = ev.canvas.y; // fixme - lost precision if (e->events_frozen <= 0) evas_object_event_callback_call(obj, EVAS_CALLBACK_MULTI_DOWN, &ev, event_id); if (e->delete_me) break; } if (copy) eina_list_free(copy); _evas_post_event_callback_call(e); /* update touch point's state to EVAS_TOUCH_POINT_STILL */ _evas_touch_point_update(e, d, x, y, EVAS_TOUCH_POINT_STILL); _evas_unwalk(e); } EAPI void evas_event_feed_multi_up(Evas *e, int d, int x, int y, double rad, double radx, double rady, double pres, double ang, double fx, double fy, Evas_Button_Flags flags, unsigned int timestamp, const void *data) { Eina_List *l, *copy; Evas_Event_Multi_Up ev; Evas_Object *obj; int event_id = 0; MAGIC_CHECK(e, Evas, MAGIC_EVAS); return; MAGIC_CHECK_END(); if (e->pointer.downs <= 0) return; e->pointer.downs--; if (e->events_frozen > 0) return; e->last_timestamp = timestamp; _evas_object_event_new(); event_id = _evas_event_counter; ev.device = d; ev.output.x = x; ev.output.y = y; ev.canvas.x = x; ev.canvas.y = y; ev.radius = rad; ev.radius_x = radx; ev.radius_y = rady; ev.pressure = pres; ev.angle = ang; ev.canvas.xsub = fx; ev.canvas.ysub = fy; ev.data = (void *)data; ev.modifiers = &(e->modifiers); ev.locks = &(e->locks); ev.flags = flags; ev.timestamp = timestamp; ev.event_flags = e->default_event_flags; _evas_walk(e); /* update released touch point */ _evas_touch_point_update(e, d, x, y, EVAS_TOUCH_POINT_UP); copy = evas_event_list_copy(e->pointer.object.in); EINA_LIST_FOREACH(copy, l, obj) { ev.canvas.x = x; ev.canvas.y = y; ev.canvas.xsub = fx; ev.canvas.ysub = fy; _evas_event_framespace_adjust(obj, &ev.canvas.x, &ev.canvas.y); _evas_event_havemap_adjust(obj, &ev.canvas.x, &ev.canvas.y, obj->mouse_grabbed); if (x != ev.canvas.x) ev.canvas.xsub = ev.canvas.x; // fixme - lost precision if (y != ev.canvas.y) ev.canvas.ysub = ev.canvas.y; // fixme - lost precision if ((obj->pointer_mode != EVAS_OBJECT_POINTER_MODE_NOGRAB) && (obj->mouse_grabbed > 0)) { obj->mouse_grabbed--; e->pointer.mouse_grabbed--; } if (e->events_frozen <= 0) evas_object_event_callback_call(obj, EVAS_CALLBACK_MULTI_UP, &ev, event_id); if (e->delete_me) break; } if (copy) copy = eina_list_free(copy); if ((e->pointer.mouse_grabbed == 0) && !_post_up_handle(e, timestamp, data)) _evas_post_event_callback_call(e); /* remove released touch point from the touch point list */ _evas_touch_point_remove(e, d); _evas_unwalk(e); } EAPI void evas_event_feed_multi_move(Evas *e, int d, int x, int y, double rad, double radx, double rady, double pres, double ang, double fx, double fy, unsigned int timestamp, const void *data) { MAGIC_CHECK(e, Evas, MAGIC_EVAS); return; MAGIC_CHECK_END(); if (e->events_frozen > 0) return; e->last_timestamp = timestamp; if ((!e->pointer.inside) && (e->pointer.mouse_grabbed == 0)) return; _evas_walk(e); /* update moved touch point */ _evas_touch_point_update(e, d, x, y, EVAS_TOUCH_POINT_MOVE); /* if our mouse button is grabbed to any objects */ if (e->pointer.mouse_grabbed > 0) { /* go thru old list of in objects */ Eina_List *l, *copy; Evas_Event_Multi_Move ev; Evas_Object *obj; int event_id = 0; _evas_object_event_new(); event_id = _evas_event_counter; ev.device = d; ev.cur.output.x = x; ev.cur.output.y = y; ev.cur.canvas.x = x; ev.cur.canvas.y = y; ev.radius = rad; ev.radius_x = radx; ev.radius_y = rady; ev.pressure = pres; ev.angle = ang; ev.cur.canvas.xsub = fx; ev.cur.canvas.ysub = fy; ev.data = (void *)data; ev.modifiers = &(e->modifiers); ev.locks = &(e->locks); ev.timestamp = timestamp; ev.event_flags = e->default_event_flags; copy = evas_event_list_copy(e->pointer.object.in); EINA_LIST_FOREACH(copy, l, obj) { if ((e->events_frozen <= 0) && (evas_object_clippers_is_visible(obj) || obj->mouse_grabbed) && (!evas_event_passes_through(obj)) && (!evas_event_freezes_through(obj)) && (!obj->clip.clipees)) { ev.cur.canvas.x = x; ev.cur.canvas.y = y; ev.cur.canvas.xsub = fx; ev.cur.canvas.ysub = fy; _evas_event_framespace_adjust(obj, &ev.cur.canvas.x, &ev.cur.canvas.y); _evas_event_havemap_adjust(obj, &ev.cur.canvas.x, &ev.cur.canvas.y, obj->mouse_grabbed); if (x != ev.cur.canvas.x) ev.cur.canvas.xsub = ev.cur.canvas.x; // fixme - lost precision if (y != ev.cur.canvas.y) ev.cur.canvas.ysub = ev.cur.canvas.y; // fixme - lost precision evas_object_event_callback_call(obj, EVAS_CALLBACK_MULTI_MOVE, &ev, event_id); } if (e->delete_me) break; } _evas_post_event_callback_call(e); } else { Eina_List *ins; Eina_List *l, *copy; Evas_Event_Multi_Move ev; Evas_Object *obj; int event_id = 0; _evas_object_event_new(); event_id = _evas_event_counter; ev.device = d; ev.cur.output.x = x; ev.cur.output.y = y; ev.cur.canvas.x = x; ev.cur.canvas.y = y; ev.radius = rad; ev.radius_x = radx; ev.radius_y = rady; ev.pressure = pres; ev.angle = ang; ev.cur.canvas.xsub = fx; ev.cur.canvas.ysub = fy; ev.data = (void *)data; ev.modifiers = &(e->modifiers); ev.locks = &(e->locks); ev.timestamp = timestamp; ev.event_flags = e->default_event_flags; /* get all new in objects */ ins = evas_event_objects_event_list(e, NULL, x, y); /* go thru old list of in objects */ copy = evas_event_list_copy(e->pointer.object.in); EINA_LIST_FOREACH(copy, l, obj) { /* if its under the pointer and its visible and its in the new */ /* in list */ // FIXME: i don't think we need this // evas_object_clip_recalc(obj); if ((e->events_frozen <= 0) && evas_object_is_in_output_rect(obj, x, y, 1, 1) && (evas_object_clippers_is_visible(obj) || obj->mouse_grabbed) && eina_list_data_find(ins, obj) && (!evas_event_passes_through(obj)) && (!evas_event_freezes_through(obj)) && (!obj->clip.clipees) && ((!obj->precise_is_inside) || evas_object_is_inside(obj, x, y)) ) { ev.cur.canvas.x = x; ev.cur.canvas.y = y; ev.cur.canvas.xsub = fx; ev.cur.canvas.ysub = fy; _evas_event_framespace_adjust(obj, &ev.cur.canvas.x, &ev.cur.canvas.y); _evas_event_havemap_adjust(obj, &ev.cur.canvas.x, &ev.cur.canvas.y, obj->mouse_grabbed); if (x != ev.cur.canvas.x) ev.cur.canvas.xsub = ev.cur.canvas.x; // fixme - lost precision if (y != ev.cur.canvas.y) ev.cur.canvas.ysub = ev.cur.canvas.y; // fixme - lost precision evas_object_event_callback_call(obj, EVAS_CALLBACK_MULTI_MOVE, &ev, event_id); } if (e->delete_me) break; } if (copy) copy = eina_list_free(copy); if (e->pointer.mouse_grabbed == 0) { /* free our old list of ins */ eina_list_free(e->pointer.object.in); /* and set up the new one */ e->pointer.object.in = ins; } else { /* free our cur ins */ eina_list_free(ins); } _evas_post_event_callback_call(e); } _evas_unwalk(e); } EAPI void evas_event_feed_key_down(Evas *e, const char *keyname, const char *key, const char *string, const char *compose, unsigned int timestamp, const void *data) { int event_id = 0; MAGIC_CHECK(e, Evas, MAGIC_EVAS); return; MAGIC_CHECK_END(); if (!keyname) return; if (e->events_frozen > 0) return; e->last_timestamp = timestamp; _evas_walk(e); Evas_Event_Key_Down ev; Eina_Bool exclusive; _evas_object_event_new(); event_id = _evas_event_counter; exclusive = EINA_FALSE; ev.keyname = (char *)keyname; ev.data = (void *)data; ev.modifiers = &(e->modifiers); ev.locks = &(e->locks); ev.key = key; ev.string = string; ev.compose = compose; ev.timestamp = timestamp; ev.event_flags = e->default_event_flags; if (e->grabs) { Eina_List *l; Evas_Key_Grab *g; e->walking_grabs++; EINA_LIST_FOREACH(e->grabs, l, g) { if (g->just_added) { g->just_added = EINA_FALSE; continue; } if (g->delete_me) continue; if (((e->modifiers.mask & g->modifiers) || (g->modifiers == e->modifiers.mask)) && (!strcmp(keyname, g->keyname))) { if (!(e->modifiers.mask & g->not_modifiers)) { if (e->events_frozen <= 0 && !evas_event_freezes_through(g->object)) evas_object_event_callback_call(g->object, EVAS_CALLBACK_KEY_DOWN, &ev, event_id); if (g->exclusive) exclusive = EINA_TRUE; } } if (e->delete_me) break; } e->walking_grabs--; if (e->walking_grabs <= 0) { while (e->delete_grabs > 0) { e->delete_grabs--; for (l = e->grabs; l;) { g = eina_list_data_get(l); l = eina_list_next(l); if (g->delete_me) evas_key_grab_free(g->object, g->keyname, g->modifiers, g->not_modifiers); } } } } if ((e->focused) && (!exclusive)) { if (e->events_frozen <= 0 && !evas_event_freezes_through(e->focused)) evas_object_event_callback_call(e->focused, EVAS_CALLBACK_KEY_DOWN, &ev, event_id); } _evas_post_event_callback_call(e); _evas_unwalk(e); } EAPI void evas_event_feed_key_up(Evas *e, const char *keyname, const char *key, const char *string, const char *compose, unsigned int timestamp, const void *data) { int event_id = 0; MAGIC_CHECK(e, Evas, MAGIC_EVAS); return; MAGIC_CHECK_END(); if (!keyname) return; if (e->events_frozen > 0) return; e->last_timestamp = timestamp; _evas_walk(e); Evas_Event_Key_Up ev; Eina_Bool exclusive; _evas_object_event_new(); event_id = _evas_event_counter; exclusive = EINA_FALSE; ev.keyname = (char *)keyname; ev.data = (void *)data; ev.modifiers = &(e->modifiers); ev.locks = &(e->locks); ev.key = key; ev.string = string; ev.compose = compose; ev.timestamp = timestamp; ev.event_flags = e->default_event_flags; if (e->grabs) { Eina_List *l; Evas_Key_Grab *g; e->walking_grabs++; EINA_LIST_FOREACH(e->grabs, l, g) { if (g->just_added) { g->just_added = EINA_FALSE; continue; } if (g->delete_me) continue; if (((e->modifiers.mask & g->modifiers) || (g->modifiers == e->modifiers.mask)) && (!((e->modifiers.mask & g->not_modifiers) || (g->not_modifiers == ~e->modifiers.mask))) && (!strcmp(keyname, g->keyname))) { if (e->events_frozen <= 0 && !evas_event_freezes_through(g->object)) evas_object_event_callback_call(g->object, EVAS_CALLBACK_KEY_UP, &ev, event_id); if (g->exclusive) exclusive = EINA_TRUE; } if (e->delete_me) break; } e->walking_grabs--; if (e->walking_grabs <= 0) { while (e->delete_grabs > 0) { Eina_List *ll, *l_next; Evas_Key_Grab *gr; e->delete_grabs--; EINA_LIST_FOREACH_SAFE(e->grabs, ll, l_next, gr) { if (gr->delete_me) evas_key_grab_free(gr->object, gr->keyname, gr->modifiers, gr->not_modifiers); } } } } if ((e->focused) && (!exclusive)) { if (e->events_frozen <= 0 && !evas_event_freezes_through(e->focused)) evas_object_event_callback_call(e->focused, EVAS_CALLBACK_KEY_UP, &ev, event_id); } _evas_post_event_callback_call(e); _evas_unwalk(e); } EAPI void evas_event_feed_hold(Evas *e, int hold, unsigned int timestamp, const void *data) { Eina_List *l, *copy; Evas_Event_Hold ev; Evas_Object *obj; int event_id = 0; MAGIC_CHECK(e, Evas, MAGIC_EVAS); return; MAGIC_CHECK_END(); if (e->events_frozen > 0) return; e->last_timestamp = timestamp; _evas_object_event_new(); event_id = _evas_event_counter; ev.hold = hold; ev.data = (void *)data; ev.timestamp = timestamp; ev.event_flags = e->default_event_flags; _evas_walk(e); copy = evas_event_list_copy(e->pointer.object.in); EINA_LIST_FOREACH(copy, l, obj) { if ((e->events_frozen <= 0) && !evas_event_freezes_through(obj)) evas_object_event_callback_call(obj, EVAS_CALLBACK_HOLD, &ev, event_id); if (e->delete_me) break; } if (copy) copy = eina_list_free(copy); _evas_post_event_callback_call(e); _evas_unwalk(e); _evas_object_event_new(); } EAPI void evas_object_freeze_events_set(Evas_Object *obj, Eina_Bool freeze) { MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); freeze = !!freeze; if (obj->freeze_events == freeze) return; obj->freeze_events = freeze; evas_object_smart_member_cache_invalidate(obj, EINA_FALSE, EINA_TRUE); if (obj->freeze_events) return; if (evas_object_is_in_output_rect(obj, obj->layer->evas->pointer.x, obj->layer->evas->pointer.y, 1, 1) && ((!obj->precise_is_inside) || (evas_object_is_inside(obj, obj->layer->evas->pointer.x, obj->layer->evas->pointer.y)))) evas_event_feed_mouse_move(obj->layer->evas, obj->layer->evas->pointer.x, obj->layer->evas->pointer.y, obj->layer->evas->last_timestamp, NULL); } EAPI Eina_Bool evas_object_freeze_events_get(const Evas_Object *obj) { MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return EINA_FALSE; MAGIC_CHECK_END(); return obj->freeze_events; } EAPI void evas_object_pass_events_set(Evas_Object *obj, Eina_Bool pass) { MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); pass = !!pass; if (obj->pass_events == pass) return; obj->pass_events = pass; evas_object_smart_member_cache_invalidate(obj, EINA_TRUE, EINA_FALSE); if (evas_object_is_in_output_rect(obj, obj->layer->evas->pointer.x, obj->layer->evas->pointer.y, 1, 1) && ((!obj->precise_is_inside) || (evas_object_is_inside(obj, obj->layer->evas->pointer.x, obj->layer->evas->pointer.y)))) evas_event_feed_mouse_move(obj->layer->evas, obj->layer->evas->pointer.x, obj->layer->evas->pointer.y, obj->layer->evas->last_timestamp, NULL); } EAPI Eina_Bool evas_object_pass_events_get(const Evas_Object *obj) { MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return EINA_FALSE; MAGIC_CHECK_END(); return obj->pass_events; } EAPI void evas_object_repeat_events_set(Evas_Object *obj, Eina_Bool repeat) { MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); repeat = !!repeat; if (obj->repeat_events == repeat) return; obj->repeat_events = repeat; if (evas_object_is_in_output_rect(obj, obj->layer->evas->pointer.x, obj->layer->evas->pointer.y, 1, 1) && ((!obj->precise_is_inside) || (evas_object_is_inside(obj, obj->layer->evas->pointer.x, obj->layer->evas->pointer.y)))) evas_event_feed_mouse_move(obj->layer->evas, obj->layer->evas->pointer.x, obj->layer->evas->pointer.y, obj->layer->evas->last_timestamp, NULL); } EAPI Eina_Bool evas_object_repeat_events_get(const Evas_Object *obj) { MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return EINA_FALSE; MAGIC_CHECK_END(); return obj->repeat_events; } EAPI void evas_object_propagate_events_set(Evas_Object *obj, Eina_Bool prop) { MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); obj->no_propagate = !prop; } EAPI Eina_Bool evas_object_propagate_events_get(const Evas_Object *obj) { MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return EINA_FALSE; MAGIC_CHECK_END(); return !(obj->no_propagate); } EAPI void evas_object_pointer_mode_set(Evas_Object *obj, Evas_Object_Pointer_Mode setting) { MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); obj->pointer_mode = setting; } EAPI Evas_Object_Pointer_Mode evas_object_pointer_mode_get(const Evas_Object *obj) { MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return EVAS_OBJECT_POINTER_MODE_AUTOGRAB; MAGIC_CHECK_END(); return obj->pointer_mode; } EAPI void evas_event_refeed_event(Evas *e, void *event_copy, Evas_Callback_Type event_type) { if (!event_copy) return; switch (event_type) { case EVAS_CALLBACK_MOUSE_IN: { Evas_Event_Mouse_In *ev = event_copy; evas_event_feed_mouse_in(e, ev->timestamp, ev->data); break; } case EVAS_CALLBACK_MOUSE_OUT: { Evas_Event_Mouse_Out *ev = event_copy; evas_event_feed_mouse_out(e, ev->timestamp, ev->data); break; } case EVAS_CALLBACK_MOUSE_DOWN: { Evas_Event_Mouse_Down *ev = event_copy; evas_event_feed_mouse_down(e, ev->button, ev->flags, ev-> timestamp, ev->data); break; } case EVAS_CALLBACK_MOUSE_UP: { Evas_Event_Mouse_Up *ev = event_copy; evas_event_feed_mouse_up(e, ev->button, ev->flags, ev-> timestamp, ev->data); break; } case EVAS_CALLBACK_MOUSE_MOVE: { Evas_Event_Mouse_Move *ev = event_copy; evas_event_feed_mouse_move(e, ev->cur.canvas.x, ev->cur.canvas.y, ev->timestamp, ev->data); break; } case EVAS_CALLBACK_MOUSE_WHEEL: { Evas_Event_Mouse_Wheel *ev = event_copy; evas_event_feed_mouse_wheel(e, ev->direction, ev-> z, ev->timestamp, ev->data); break; } case EVAS_CALLBACK_MULTI_DOWN: { Evas_Event_Multi_Down *ev = event_copy; evas_event_feed_multi_down(e, ev->device, ev->canvas.x, ev->canvas.y, ev->radius, ev->radius_x, ev->radius_y, ev->pressure, ev->angle, ev->canvas.xsub, ev->canvas.ysub, ev->flags, ev->timestamp, ev->data); break; } case EVAS_CALLBACK_MULTI_UP: { Evas_Event_Multi_Up *ev = event_copy; evas_event_feed_multi_up(e, ev->device, ev->canvas.x, ev->canvas.y, ev->radius, ev->radius_x, ev->radius_y, ev->pressure, ev->angle, ev->canvas.xsub, ev->canvas.ysub, ev->flags, ev->timestamp, ev->data); break; } case EVAS_CALLBACK_MULTI_MOVE: { Evas_Event_Multi_Move *ev = event_copy; evas_event_feed_multi_move(e, ev->device, ev->cur.canvas.x, ev->cur.canvas.y, ev->radius, ev->radius_x, ev->radius_y, ev->pressure, ev->angle, ev->cur.canvas.xsub, ev->cur.canvas.ysub, ev->timestamp, ev->data); break; } case EVAS_CALLBACK_KEY_DOWN: { Evas_Event_Key_Down *ev = event_copy; evas_event_feed_key_down(e, ev->keyname, ev->key, ev->string, ev->compose, ev->timestamp, ev->data); break; } case EVAS_CALLBACK_KEY_UP: { Evas_Event_Key_Up *ev = event_copy; evas_event_feed_key_up(e, ev->keyname, ev->key, ev->string, ev->compose, ev->timestamp, ev->data); break; } default: /* All non-input events are not handeled */ break; } } EAPI int evas_event_down_count_get(const Evas *e) { MAGIC_CHECK(e, Evas, MAGIC_EVAS); return 0; MAGIC_CHECK_END(); return e->pointer.downs; } evas-1.7.9/src/lib/canvas/evas_async_events.c0000664000175000017500000000732512175475547016134 00000000000000#ifdef HAVE_CONFIG_H # include #endif #ifdef BUILD_ASYNC_EVENTS # ifndef _MSC_VER # include # endif # include # include #endif #include "evas_common.h" #include "evas_private.h" #ifdef BUILD_ASYNC_EVENTS static int _fd_write = -1; static int _fd_read = -1; static pid_t _fd_pid = 0; static int _init_evas_event = 0; typedef struct _Evas_Event_Async Evas_Event_Async; struct _Evas_Event_Async { const void *target; void *event_info; Evas_Async_Events_Put_Cb func; Evas_Callback_Type type; }; Eina_Bool _evas_fd_close_on_exec(int fd) { #ifdef HAVE_FCNTL int flags; flags = fcntl(fd, F_GETFD); if (flags == -1) return EINA_FALSE; flags |= FD_CLOEXEC; if (fcntl(fd, F_SETFD, flags) == -1) return EINA_FALSE; return EINA_TRUE; #else (void) fd; return EINA_FALSE; #endif } int evas_async_events_init(void) { int filedes[2]; _init_evas_event++; if (_init_evas_event > 1) return _init_evas_event; _fd_pid = getpid(); if (pipe(filedes) == -1) { _init_evas_event = 0; return 0; } _evas_fd_close_on_exec(filedes[0]); _evas_fd_close_on_exec(filedes[1]); _fd_read = filedes[0]; _fd_write = filedes[1]; fcntl(_fd_read, F_SETFL, O_NONBLOCK); return _init_evas_event; } int evas_async_events_shutdown(void) { _init_evas_event--; if (_init_evas_event > 0) return _init_evas_event; close(_fd_read); close(_fd_write); _fd_read = -1; _fd_write = -1; return _init_evas_event; } static void _evas_async_events_fork_handle(void) { int i, count = _init_evas_event; if (getpid() == _fd_pid) return; for (i = 0; i < count; i++) evas_async_events_shutdown(); for (i = 0; i < count; i++) evas_async_events_init(); } #endif EAPI int evas_async_events_fd_get(void) { #ifdef BUILD_ASYNC_EVENTS _evas_async_events_fork_handle(); return _fd_read; #else return -1; #endif } EAPI int evas_async_events_process(void) { #ifdef BUILD_ASYNC_EVENTS Evas_Event_Async *ev; int check; int count = 0; if (_fd_read == -1) return 0; _evas_async_events_fork_handle(); do { check = read(_fd_read, &ev, sizeof (Evas_Event_Async *)); if (check == sizeof (Evas_Event_Async *)) { if (ev->func) ev->func((void *)ev->target, ev->type, ev->event_info); free(ev); count++; } } while (check > 0); evas_cache_image_wakeup(); if (check < 0) { switch (errno) { case EBADF: case EINVAL: case EIO: case EISDIR: _fd_read = -1; } } return count; #else return 0; #endif } EAPI Eina_Bool evas_async_events_put(const void *target, Evas_Callback_Type type, void *event_info, Evas_Async_Events_Put_Cb func) { #ifdef BUILD_ASYNC_EVENTS Evas_Event_Async *ev; ssize_t check; Eina_Bool result = EINA_FALSE; if (!func) return 0; if (_fd_write == -1) return 0; _evas_async_events_fork_handle(); ev = calloc(1, sizeof (Evas_Event_Async)); if (!ev) return 0; ev->func = func; ev->target = target; ev->type = type; ev->event_info = event_info; do { check = write(_fd_write, &ev, sizeof (Evas_Event_Async*)); } while ((check != sizeof (Evas_Event_Async*)) && ((errno == EINTR) || (errno == EAGAIN))); evas_cache_image_wakeup(); if (check == sizeof (Evas_Event_Async*)) result = EINA_TRUE; else { switch (errno) { case EBADF: case EINVAL: case EIO: case EPIPE: _fd_write = -1; } } return result; #else func((void*) target, type, event_info); return EINA_TRUE; #endif } evas-1.7.9/src/lib/canvas/evas_filter.c0000664000175000017500000010762612175475547014725 00000000000000/* * Filter implementation for evas */ #if 0 // filtering disabled typedef enum { /** Apply any filter effects to this object (Default) */ EVAS_FILTER_MODE_OBJECT, /** Filter all objects beneath this object on the canvas */ EVAS_FILTER_MODE_BELOW, } Evas_Filter_Mode; typedef enum { /** No filter: Default */ EVAS_FILTER_NONE, /** A blur filter. Params are quality (float), and radius (int). */ EVAS_FILTER_BLUR, /** Negates the colors of an image. Also called solarize */ EVAS_FILTER_INVERT, EVAS_FILTER_SOLARIZE = EVAS_FILTER_INVERT, /** Makes a sepia version of the image. */ EVAS_FILTER_SEPIA, /** Makes a greyscale version of the image. Params are 'red', * 'green', 'blue' (all floats) which must add to 1. The defaults are * 0.3, 0.59 and 0.11 which approximates human vision. Setting 'all' * sets rgb to the same value. */ EVAS_FILTER_GREYSCALE, EVAS_FILTER_GRAYSCALE = EVAS_FILTER_GREYSCALE, /** Brighten (or darken) image. Param 'adjust' float (-1.0 to 1.0) * amount to adjust. */ EVAS_FILTER_BRIGHTNESS, /** Enhance contrast on image. Param 'adjust' float (-1.0 to 1.0) * amount to adjust. */ EVAS_FILTER_CONTRAST, EVAS_FILTER_LAST = EVAS_FILTER_CONTRAST } Evas_Filter; /** * Set the filter mode for an object. * * There are two valid filtering modes currently: * - EVAS_FILTER_MODE_OBJECT: which applies the filter to the object itself * - EVAS_FILTER_MODE_BELOW: which makes the object invisible and filters * what is below the object. * * The default filter mode is EVAS_FILTER_MODE_OBJECT. * * @param o Object to set filter mode on. * @param mode Mode to set. * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise. */ EAPI Eina_Bool evas_object_filter_mode_set (Evas_Object *o, Evas_Filter_Mode mode); /** * Get the current filtering mode for an object. * * By default all objects are in object filtering mode, even if no filter is * set. * * @param o Object to get filter mode of. * @return Filter mode (default EVAS_FILTER_MODE_OBJECT) */ EAPI Evas_Filter_Mode evas_object_filter_mode_get (Evas_Object *o); /** * Set the current filter type. * * This sets the filter type, whether a blur, color filter or some other type * of filter. This is normally the only filter call necessary, although some * filters require additional parameters. * * If the object has a filter already, and existing parameters will be * cleared. * * Setting the blur to EVAS_FILTER_NONE removes any filter. * * @param o Object to set the filter on. * @param filter Filter to set. * @return @c EINA_TRUE on success. */ EAPI Eina_Bool evas_object_filter_set (Evas_Object *o, Evas_Filter filter); /** * Get the current filter. * * @param o Object to get filter of. * @return The filter if set, or EVAS_FILTER_NONE. */ EAPI Evas_Filter evas_object_filter_get (Evas_Object *o); /** * Set an integer parameter of a filter. * * This sets an integer parameter of a filter, if such parameter is known to * the filter. Note that some parameters may actually set multiple fields. * The individual filters define the specific parameters available. * * It should be noted that filter parameters are lost after the filter type * changes, so set the filter type, then the parameters. * * @param o Object to set parameter on. * @param param Name of parameter to set. * @param val Value to set. * @return @c EINA_TRUE if at least one parameter was set, @c EINA_FALSE * otherwise. */ EAPI Eina_Bool evas_object_filter_param_int_set (Evas_Object *o, const char *param, int val); /** * Get an integer value parameter from a filter. * * Gets the first matching parameter for a filter. Note there is no way to * later fields if they do not have their own accessor name. * * Also note that there is no way to tell the difference between a -1 as a * value, and the error code. Ask your filter writer to use a different * range. * * @param o The object. * @Param param Name of the parameter to get. * @return The value, or -1 on error. */ EAPI int evas_object_filter_param_int_get (Evas_Object *o, const char *param); /** * Set a string parameter on a filter * * Currently unimplemented as no filters use this yet */ EAPI Eina_Bool evas_object_filter_param_str_set (Evas_Object *o, const char *param, const char *val); /** * Get a string parameter from a filter * * Currently unimplemented as no filters use this yet */ EAPI const char *evas_object_filter_param_str_get (Evas_Object *o, const char *param); /** * Set an object parameter on a filter * * Currently unimplemented as no filters use this yet */ EAPI Eina_Bool evas_object_filter_param_obj_set (Evas_Object *o, const char *param, Evas_Object *val); /** * get an object parameter from a filter * * Currently unimplemented as no filters use this yet */ EAPI Evas_Object *evas_object_filter_param_obj_get (Evas_Object *o, const char *param); /** * Set a float parameter of a filter. * * This is the same as evas_object_filter_param_int_set(), but for floating * point values. * * @param o Object to set value on. * @param param Name of the parameter to set. * @param @c EINA_TRUE if at least one parameter was set, @c EINA_FALSE * otherwise. */ EAPI Eina_Bool evas_object_filter_param_float_set(Evas_Object *o, const char *param, double val); /** * Get a float parameter of a filter. * * This is the same as evas_object_filter_param_int_get(), but for floating * point values. * * @param o Object to set value on. * @param param Name of the parameter to set. * @return The value, or -1 on error. */ EAPI double evas_object_filter_param_float_get(Evas_Object *o, const char *param); #include // offsetof #include "evas_common.h" #include "evas_private.h" #include /* disable neon - even after fixes: * Error: ARM register expected -- vdup.u32 q14,$0xff000000' * not going to fix now #ifdef BUILD_NEON # define BUILD_NEON0 1 #else # define BUILD_NEON0 0 #endif */ #define BUILD_NEON0 0 typedef struct Evas_Filter_Info_Blur { double quality; int radius; } Evas_Filter_Info_Blur; typedef struct Evas_Filter_Info_GreyScale { double r,g,b; } Evas_Filter_Info_GreyScale; typedef struct Evas_Filter_Info_Brightness { double adjust; } Evas_Filter_Info_Brightness; typedef struct Evas_Filter_Info_Contrast { double adjust; } Evas_Filter_Info_Contrast; typedef int (*Filter_Size_FN)(Evas_Filter_Info *,int,int,int*,int*,Eina_Bool); typedef uint8_t *(*Key_FN)(const Evas_Filter_Info *, uint32_t *); struct fieldinfo { const char *field; int type; size_t offset; }; struct filterinfo { Evas_Software_Filter_Fn filter; const size_t datasize; Filter_Size_FN sizefn; Key_FN keyfn; Eina_Bool alwaysalpha; }; enum { TYPE_INT, TYPE_FLOAT }; static int blur_size_get(Evas_Filter_Info*, int, int, int *, int *, Eina_Bool); static uint8_t *gaussian_key_get(const Evas_Filter_Info *, uint32_t *); static Eina_Bool gaussian_filter(Evas_Filter_Info *, RGBA_Image*, RGBA_Image*); static Eina_Bool negation_filter(Evas_Filter_Info *, RGBA_Image*, RGBA_Image*); static Eina_Bool sepia_filter(Evas_Filter_Info *, RGBA_Image*, RGBA_Image*); static Eina_Bool greyscale_filter(Evas_Filter_Info*, RGBA_Image*, RGBA_Image*); static Eina_Bool brightness_filter(Evas_Filter_Info*, RGBA_Image*, RGBA_Image*); static Eina_Bool contrast_filter(Evas_Filter_Info *, RGBA_Image*, RGBA_Image*); struct filterinfo filterinfo[] = { /* None */ { NULL, 0, NULL, NULL, EINA_FALSE}, /* Blur */ { gaussian_filter, sizeof(Evas_Filter_Info_Blur), blur_size_get, gaussian_key_get, EINA_TRUE }, /* Negation */ { negation_filter, 0, NULL, NULL, EINA_FALSE }, /* Sepia */ { sepia_filter, 0, NULL, NULL, EINA_FALSE }, /* Greyscale */ { greyscale_filter, sizeof(Evas_Filter_Info_GreyScale), NULL, NULL, EINA_FALSE }, /* Brightness */ { brightness_filter, sizeof(Evas_Filter_Info_Brightness), NULL, NULL, EINA_FALSE }, /* Contrast */ { contrast_filter, sizeof(Evas_Filter_Info_Contrast), NULL, NULL, EINA_FALSE}, }; static struct fieldinfo blurfields[] = { { "quality", TYPE_FLOAT, offsetof(Evas_Filter_Info_Blur, quality) }, { "radius", TYPE_INT, offsetof(Evas_Filter_Info_Blur, radius) }, { NULL, 0, 0 }, }; static struct fieldinfo greyfields[] = { { "red", TYPE_FLOAT, offsetof(Evas_Filter_Info_GreyScale, r) }, { "green", TYPE_FLOAT, offsetof(Evas_Filter_Info_GreyScale, g) }, { "blue", TYPE_FLOAT, offsetof(Evas_Filter_Info_GreyScale, b) }, { "all", TYPE_FLOAT, offsetof(Evas_Filter_Info_GreyScale, r) }, { "all", TYPE_FLOAT, offsetof(Evas_Filter_Info_GreyScale, g) }, { "all", TYPE_FLOAT, offsetof(Evas_Filter_Info_GreyScale, b) }, { NULL, 0, 0 }, }; static struct fieldinfo brightnessfields[] = { { "adjust", TYPE_FLOAT, offsetof(Evas_Filter_Info_Brightness, adjust) }, { NULL, 0, 0 }, }; static struct fieldinfo contrastfields[] = { { "adjust", TYPE_FLOAT, offsetof(Evas_Filter_Info_Contrast, adjust) }, { NULL, 0, 0 }, }; static struct fieldinfo *filterfields[] = { NULL, blurfields, NULL, NULL, greyfields, brightnessfields, contrastfields, }; static Evas_Filter_Info *filter_alloc(Evas_Object *o); EAPI Eina_Bool evas_object_filter_mode_set(Evas_Object *o, Evas_Filter_Mode mode) { Evas_Filter_Info *info; MAGIC_CHECK(o, Evas_Object, MAGIC_OBJ); return EINA_FALSE; MAGIC_CHECK_END(); if ((mode != EVAS_FILTER_MODE_OBJECT) && (mode != EVAS_FILTER_MODE_BELOW)) return EINA_FALSE; if (!o->filter) { filter_alloc(o); } if (!o->filter) return EINA_FALSE; info = o->filter; if (info->mode == mode) return EINA_TRUE; /* easy case */ info->mode = mode; info->dirty = 1; return EINA_TRUE; } EAPI Evas_Filter_Mode evas_object_filter_mode_get(Evas_Object *o) { MAGIC_CHECK(o, Evas_Object, MAGIC_OBJ); return EVAS_FILTER_MODE_OBJECT; MAGIC_CHECK_END(); if (!o->filter) return EVAS_FILTER_MODE_OBJECT; return o->filter->mode; } EAPI Eina_Bool evas_object_filter_set(Evas_Object *o, Evas_Filter filter) { Evas_Filter_Info *info; struct filterinfo *finfo; MAGIC_CHECK(o, Evas_Object, MAGIC_OBJ); return EINA_FALSE; MAGIC_CHECK_END(); /* force filter to be signed: else gcc complains, but enums may always be * signed */ if (((int)filter < (int)EVAS_FILTER_NONE) || (filter > EVAS_FILTER_LAST)) return EINA_FALSE; /* Don't alloc on no-op */ if (!o-filter && filter == EVAS_FILTER_NONE) return EINA_TRUE; if (!o->filter) filter_alloc(o); if (!o->filter) return EINA_FALSE; info = o->filter; if (info->filter == filter) return EINA_TRUE; finfo = filterinfo + filter; info->filter = filter; info->dirty = 1; if (info->data) { if (info->data_free) info->data_free(info->data); else free(info->data); } info->datalen = finfo->datasize; if (finfo->datasize) { info->data = calloc(1, finfo->datasize); if (!info->data) { o->filter = EVAS_FILTER_NONE; return EINA_FALSE; } } else info->data = NULL; info->data_free = NULL; return EINA_TRUE; } EAPI Evas_Filter evas_object_filter_get(Evas_Object *o) { MAGIC_CHECK(o, Evas_Object, MAGIC_OBJ); return EVAS_FILTER_NONE; MAGIC_CHECK_END(); if (!o->filter) return EVAS_FILTER_NONE; return o->filter->filter; } EAPI Eina_Bool evas_object_filter_param_int_set(Evas_Object *o, const char *param, int val) { char *data; const struct fieldinfo *fields; Eina_Bool found; int i; MAGIC_CHECK(o, Evas_Object, MAGIC_OBJ); return EINA_FALSE; MAGIC_CHECK_END(); if ((!o->filter) || (!o->filter->data)) return EINA_FALSE; fields = filterfields[o->filter->filter]; data = o->filter->data; found = EINA_FALSE; for (i = 0; fields[i].field; i++) { if (!strcmp(fields[i].field, param)) { if (fields[i].type != TYPE_INT) continue; *(int *)(data + fields[i].offset) = val; o->filter->dirty = 1; evas_object_change(o); found = EINA_TRUE; } } return found; } EAPI int evas_object_filter_param_int_get(Evas_Object *o, const char *param) { char *data; const struct fieldinfo *fields; int val; int i; MAGIC_CHECK(o, Evas_Object, MAGIC_OBJ); return -1; MAGIC_CHECK_END(); if ((!o->filter) || (!o->filter->data)) return -1; fields = filterfields[o->filter->filter]; if (!fields) return -1; data = o->filter->data; for (i = 0; fields[i].field; i++) { if (!strcmp(fields[i].field, param)) { if (fields[i].type != TYPE_INT) continue; val = *(int *)(data + fields[i].offset); return val; } } return -1; } EAPI Eina_Bool evas_object_filter_param_str_set(Evas_Object *o __UNUSED__, const char *param __UNUSED__, const char *val __UNUSED__) { return EINA_FALSE; } EAPI const char * evas_object_filter_param_str_get(Evas_Object *o __UNUSED__, const char *param __UNUSED__) { return NULL; } EAPI Eina_Bool evas_object_filter_param_obj_set(Evas_Object *o __UNUSED__, const char *param __UNUSED__, Evas_Object *val __UNUSED__) { return EINA_FALSE; } EAPI Evas_Object * evas_object_filter_param_obj_get(Evas_Object *o __UNUSED__, const char *param __UNUSED__) { return NULL; } EAPI Eina_Bool evas_object_filter_param_float_set(Evas_Object *o, const char *param, double val) { char *data; const struct fieldinfo *fields; int i; Eina_Bool rv; MAGIC_CHECK(o, Evas_Object, MAGIC_OBJ); return EINA_FALSE; MAGIC_CHECK_END(); if ((!o->filter) || (!o->filter->data)) return EINA_FALSE; rv = EINA_FALSE; fields = filterfields[o->filter->filter]; if (!fields) return EINA_FALSE; data = o->filter->data; for (i = 0; fields[i].field; i++) { if (!strcmp(fields[i].field, param)) { if (fields[i].type != TYPE_FLOAT) continue; *(double *)(data + fields[i].offset) = val; o->filter->dirty = 1; o->changed = 1; evas_object_change(o); rv = EINA_TRUE; } } return rv; } EAPI double evas_object_filter_param_float_get(Evas_Object *o, const char *param) { char *data; const struct fieldinfo *fields; double val; int i; MAGIC_CHECK(o, Evas_Object, MAGIC_OBJ); return -1; MAGIC_CHECK_END(); if ((!o->filter) || (!o->filter->data)) return -1; fields = filterfields[o->filter->filter]; if (!fields) return -1; data = o->filter->data; for (i = 0; fields[i].field; i++) { if (!strcmp(fields[i].field, param)) { if (fields[i].type != TYPE_FLOAT) continue; val = *(double *)(data + fields[i].offset); return val; } } return -1; } /* * Internal call */ int evas_filter_get_size(Evas_Filter_Info *info, int inw, int inh, int *outw, int *outh, Eina_Bool inv) { if (!info) return -1; if ((!outw) && (!outh)) return 0; if (filterinfo[info->filter].sizefn) return filterinfo[info->filter].sizefn(info, inw, inh, outw, outh, inv); if (outw) *outw = inw; if (outh) *outh = inh; return 0; } Eina_Bool evas_filter_always_alpha(Evas_Filter_Info *info) { if (!info) return EINA_FALSE; return filterinfo[info->filter].alwaysalpha; } /* * Another internal call: * Given a filterinfo, generate a unique key for it * * For simple filters, it's just the filter type. * for more complex filters, it's the type, with it's params. * * Note management of the key data is up to the caller, that is it should * probably be freed after use. * * Note the automatic fallback generation places the single byte at the end so * the memcpy will be aligned. Micro-optimisations FTW! * * @param info Filter info to generate from * @param len Length of the buffer returned. * @return key Key buffer */ uint8_t * evas_filter_key_get(const Evas_Filter_Info *info, uint32_t *lenp) { struct filterinfo *finfo; uint8_t *key; int len; if (!info) return NULL; finfo = filterinfo + info->filter; if (finfo->keyfn) return finfo->keyfn(info, lenp); len = 1 + finfo->datasize; key = malloc(len); if (!key) return NULL; if (finfo->datasize) memcpy(key, info->data, finfo->datasize); key[finfo->datasize] = info->filter; if (lenp) *lenp = len; return key; } Evas_Software_Filter_Fn evas_filter_software_get(Evas_Filter_Info *info) { return filterinfo[info->filter].filter; } void evas_filter_free(Evas_Object *o) { if (!o->filter) return; if (o->filter->key) free(o->filter->key); free(o->filter); o->filter = NULL; } /* * Private calls */ static Evas_Filter_Info * filter_alloc(Evas_Object *o) { Evas_Filter_Info *info; if (!o) return NULL; info = calloc(1,sizeof(struct Evas_Filter_Info)); if (!info) return NULL; info->dirty = 1; info->filter = EVAS_FILTER_NONE; info->mode = EVAS_FILTER_MODE_OBJECT; info->datalen = 0; o->filter = info; return info; } static int blur_size_get(Evas_Filter_Info *info, int inw, int inh, int *outw, int *outh, Eina_Bool inv) { Evas_Filter_Info_Blur *blur = info->data; if (inv) { if (outw) *outw = MAX(inw - (blur->radius * 2), 0); if (outh) *outh = MAX(inh - (blur->radius * 2), 0); } else { if (outw) *outw = inw + (blur->radius * 2); if (outh) *outh = inh + (blur->radius * 2); } return 0; } /* * Generate a key for the Gaussian generator. * * The size is: * - 1 byte for the type (blur) * - 1 byte for the quality (0-1 -> 0-255) * - 2 bytes for radius (max is 508 anyway) * * @param info Filter info * @param len Length of the returned buffer * @return new buffer */ static uint8_t * gaussian_key_get(const Evas_Filter_Info *info, uint32_t *lenp) { struct Evas_Filter_Info_Blur *blur; uint8_t *key; if ((!info) || (!info->data)) return NULL; blur = info->data; if (lenp) *lenp = 4; key = malloc(4); if (!key) return NULL; key[0] = EVAS_FILTER_BLUR; key[1] = blur->quality * 255; key[2] = blur->radius >> 8; key[3] = blur->radius; return key; } /** * Software implementations */ #define all(OP, A, R, G, B, W, I) \ do { \ A OP A_VAL(I) * W; \ R OP R_VAL(I) * W; \ G OP G_VAL(I) * W; \ B OP B_VAL(I) * W; \ } while (0) #define wavg(x,n) (((x) / (n)) & 0xff) #define wavgd(x,n) ((uint32_t)((x) / (n)) & 0xff) typedef int (*FilterH)(int, uint32_t *, int, uint32_t *); typedef int (*FilterV)(int, uint32_t *, int, int, uint32_t *); static int gaussian_filter_h(int rad, uint32_t *in, int w, uint32_t *out); static int gaussian_filter_h64(int rad, uint32_t *in, int w, uint32_t *out); static int gaussian_filter_hd(int rad, uint32_t *in, int w, uint32_t *out); static int gaussian_filter_v(int rad, uint32_t *in, int h, int skip, uint32_t *out); static int gaussian_filter_v64(int rad, uint32_t *in, int h, int skip, uint32_t *out); static int gaussian_filter_vd(int rad, uint32_t *in, int h, int skip, uint32_t *out); static const uint32_t *gaussian_row_get(int row, int *npoints, uint32_t *weight); static const uint64_t *gaussian_row_get64(int row, int *npoints, uint64_t *weight); static const double *gaussian_row_getd(int row, int *npoints, double *weight); static Eina_Bool gaussian_filter(Evas_Filter_Info *filter, RGBA_Image *src, RGBA_Image *dst) { int i; uint32_t nw, nh; uint32_t *in, *tmp, *out; FilterV filter_v = gaussian_filter_v; FilterH filter_h = gaussian_filter_h; Evas_Filter_Info_Blur *blur; int w, h; blur = filter->data; /* Use 64 bit version if we are going to overflow */ if (blur->radius > 508) /** too big for doubles: Bail out */ return EINA_FALSE; else if (blur->radius > 28) { filter_v = gaussian_filter_vd; filter_h = gaussian_filter_hd; } else if (blur->radius > 12) { filter_v = gaussian_filter_v64; filter_h = gaussian_filter_h64; } w = src->cache_entry.w; h = src->cache_entry.h; in = src->image.data; if (!in) return EINA_FALSE; nw = w + (2 * blur->radius); nh = h + (2 * blur->radius); out = dst->image.data; if (!out) return EINA_FALSE; tmp = malloc(nw * h * sizeof(uint32_t)); for (i = 0; i < h; i++) filter_h(blur->radius,in + (i * w), w, tmp + (i * nw)); for (i = 0; i < (int)nw; i++) filter_v(blur->radius,tmp + i, h, nw, out + i); free(tmp); return EINA_TRUE; } /* Blur only horizontally */ static int gaussian_filter_h(int rad, uint32_t *in, int w, uint32_t *out) { const uint32_t *points; int npoints = 0; uint32_t weight = 0; int i = 0, k = 0; uint32_t r, g, b, a; /* Get twice the radius: even rows have 1 element */ points = gaussian_row_get(rad * 2, &npoints, &weight); for (i = -rad; i < (w + rad); i++) { r = g = b = a = 0; for (k = -rad; k <= rad; k++) { if ((k + i) < 0) continue; if ((k + i) >= w) continue; all(+=, a, r, g, b, points[k + rad], in + k + i); } *(out) = ARGB_JOIN(wavg(a, weight), wavg(r, weight), wavg(g, weight), wavg(b, weight)); out++; } return 0; } /* Blur only horizontally */ static int gaussian_filter_hd(int rad, uint32_t *in, int w, uint32_t *out) { const double *points; int npoints = 0; double weight = 0.0; int i = 0, k = 0; double r, g, b, a; /* Get twice the radius: even rows have 1 element */ points = gaussian_row_getd(rad * 2, &npoints, &weight); for (i = -rad; i < (w + rad); i++) { r = g = b = a = 0; for (k = -rad; k <= rad; k++) { if ((k + i) < 0) continue; if ((k + i) >= w) continue; all(+=, a, r, g, b, points[k + rad], in + k + i); } *(out) = ARGB_JOIN(wavgd(a, weight), wavgd(r, weight), wavgd(g, weight), wavgd(b, weight)); out++; } return 0; } /* Blur only horizontally */ static int gaussian_filter_h64(int rad, uint32_t *in, int w, uint32_t *out) { const uint64_t *points; int npoints = 0; uint64_t weight = 0; int i = 0, k = 0; uint64_t r, g, b, a; /* Get twice the radius: even rows have 1 element */ points = gaussian_row_get64(rad * 2, &npoints, &weight); for (i = -rad ; i < w + rad; i ++){ r = g = b = a = 0; for (k = -rad ; k <= rad ; k ++){ if ((k + i) < 0) continue; if ((k + i) >= w) continue; all(+=, a, r, g, b, points[k + rad], in + k + i); } *(out) = ARGB_JOIN(wavg(a, weight), wavg(r, weight), wavg(g, weight), wavg(b, weight)); out++; } return 0; } static int gaussian_filter_v(int rad, uint32_t *in, int h, int skip, uint32_t *out) { const uint32_t *points; int npoints = 0; uint32_t weight = 0; int i = 0, k = 0; uint32_t r, g, b, a; /* Get twice the radius: even rows have 1 element */ points = gaussian_row_get(rad * 2, &npoints, &weight); weight = 0; for (i = 0; i < npoints; i++) weight += points[i]; for (i = -rad; i < (h + rad); i++) { r = g = b = a = 0; for (k = -rad; k <= rad; k++) { if ((k + i) < 0) continue; if ((k + i) >= h) continue; all(+=, a, r, g, b, points[k + rad], in + (skip * (k + i))); } *(out) = ARGB_JOIN(wavg(a, weight), wavg(r, weight), wavg(g, weight), wavg(b, weight)); out += skip; } return 0; } static int gaussian_filter_v64(int rad, uint32_t *in, int h, int skip, uint32_t *out) { const uint64_t *points; int npoints = 0; uint64_t weight; int i = 0, k = 0; uint64_t r, g, b, a; /* Get twice the radius: even rows have 1 element */ points = gaussian_row_get64(rad * 2, &npoints, &weight); weight = 0; for (i = 0; i < npoints; i++) weight += points[i]; for (i = -rad; i < (h + rad); i++) { r = g = b = a = 0; for (k = -rad ; k <= rad ; k++) { if ((k + i) < 0) continue; if ((k + i) >= h) continue; all(+=, a, r, g, b, points[k + rad], in + (skip * (k + i))); } *(out) = ARGB_JOIN(wavg(a, weight), wavg(r, weight), wavg(g, weight), wavg(b, weight)); out += skip; } return 0; } static int gaussian_filter_vd(int rad, uint32_t *in, int h, int skip, uint32_t *out) { const double *points; int npoints = 0; double weight = 0.0; int i = 0, k = 0; double r, g, b, a; /* Get twice the radius: even rows have 1 element */ points = gaussian_row_getd(rad * 2, &npoints, &weight); weight = 0; for (i = 0 ; i < npoints ; i ++) weight += points[i]; for (i = -rad ; i < h + rad; i ++) { r = g = b = a = 0; for (k = -rad ; k <= rad ; k ++) { if ((k + i) < 0) continue; if ((k + i) >= h) continue; all(+=, a, r, g, b, points[k + rad], in + (skip * (k + i))); } *(out) = ARGB_JOIN(wavgd(a, weight), wavgd(r, weight), wavgd(g, weight), wavgd(b, weight)); out += skip; } return 0; } static const uint32_t * gaussian_row_get(int row, int *npoints, uint32_t *weight) { static uint32_t *points = NULL; static int last = -1; static uint32_t lastweight = -1; int c, k; if (row < 0) return NULL; if (npoints) *npoints = row + 1; if (last == row) { if (weight) *weight = lastweight; return points; } if (points) free(points); points = malloc((row + 1) * sizeof(uint32_t)); if (!points) { last = -1; return NULL; } last = row; c = 1; for (k = 0; k <= row; k++) { points[k] = c; c = c * (row - k) / (k + 1); } for (k = 0, lastweight = 0; k <= row; k++) lastweight += points[k]; if (weight) *weight = lastweight; return points; } static const uint64_t * gaussian_row_get64(int row, int *npoints, uint64_t *weight) { static uint64_t *points = NULL; static int last = -1; static uint64_t lastweight = -1; uint64_t c; int k; if (row < 0) return NULL; if (npoints) *npoints = row + 1; if (last == row) { if (weight) *weight = lastweight; return points; } if (points) free(points); points = malloc((row + 1) * sizeof(uint64_t)); if (!points) { last = -1; return NULL; } last = row; c = 1; for (k = 0; k <= row; k++) { points[k] = c; c = c * (row - k) / (k + 1); } for (k = 0, lastweight = 0; k <= row; k ++) lastweight += points[k]; if (weight) *weight = lastweight; return points; } static const double * gaussian_row_getd(int row, int *npoints, double *weight) { static double *points = NULL; static int last = -1; static double lastweight = -1; double c; int k; if (row < 0) return NULL; if (last == row) { if (weight) *weight = lastweight; return points; } if (points) free(points); points = malloc((row + 1) * sizeof(double)); if (!points) { last = -1; return NULL; } last = row; if (npoints) *npoints = row + 1; c = 1; for (k = 0; k <= row; k++) { points[k] = c; c = c * (row - k) / (k + 1); } for (k = 0, lastweight = 0; k <= row; k++) lastweight += points[k]; if (weight) *weight = lastweight; return points; } #if BUILD_NEON0 static Eina_Bool negation_filter_neon(Evas_Filter_Info *info, RGBA_Image *src, RGBA_Image *dst) { uint32_t tmp; if (src->cache_entry.flags.alpha) { // FIXME: not implemented } else { /* No alpha */ #define AP "NEG_FILTER_NA" asm volatile ( ".fpu neon \n\t" "vdup.u32 q14, $0xff000000 \n\t" "vmvn.u32 q15, q1 \n\t" // fixme: do check for small loops AP"loopinit: \n\t" "sub %[tmp], %[e], #31 \n\t" AP"loop: \n\t" "vldm %[s]!, {d0,d1,d2,d3} \n\t" "vand q2, q0, q15 \n\t" "vand q3, q1, q15 \n\t" "vand q4, q0, q14 \n\t" "vand q5, q1, q14 \n\t" // fixme: can i do this with xor "cmp %[tmp], %[s] \n\t" "vmvn q6, q2 \n\t" "vmvn q7, q3 \n\t" "vorr q0, q6,q4 \n\t" "vorr q1, q7,q5 \n\t" "vstm %[d]!, {d0,d1,d2,d3} \n\t" "bhi "AP"loop \n\t" : // no out : // input [e] "r" (src->image.data+ src->cache_entry.w*src->cache_entry.h), [s] "r" (src->image.data), [tmp] "r" (tmp), [d] "r" (dst->image.data) : "q0", "q1", "q2", "q3", "q4", "q5", "q6", "q7", "q14", "q15", "memory" ); #undef AP } return EINA_TRUE; } #endif static Eina_Bool negation_filter(Evas_Filter_Info *info, RGBA_Image *src, RGBA_Image *dst) { uint32_t *in, *out; int i,j; int w,h; uint32_t a; uint8_t r,g,b; #if BUILD_NEON0 if (evas_common_cpu_has_feature(CPU_FEATURE_NEON) && (!src->cache_entry.flags.alpha)) return negation_filter_neon(info, src, dst); #endif in = src->image.data; out = dst->image.data; w = src->cache_entry.w; h = src->cache_entry.h; if (src->cache_entry.flags.alpha) { for (i = 0; i < h; i++) { for (j = 0; j < w; j++) { a = A_VAL(in); r = R_VAL(in); g = G_VAL(in); b = B_VAL(in); *out = ARGB_JOIN(a, a - r, a - g, a - b); out++; in++; } } } else { for (i = 0; i < h; i++) { for (j = 0; j < w; j++) { a = A_VAL(in); r = R_VAL(in); g = G_VAL(in); b = B_VAL(in); *out = ARGB_JOIN(a, ~r, ~g, ~b); out++; in++; } } } return EINA_TRUE; info = NULL; } static Eina_Bool sepia_filter(Evas_Filter_Info *info __UNUSED__, RGBA_Image *src, RGBA_Image *dst) { uint32_t *in, *out; int i, j; int w, h; uint32_t a, r, g, b, nr, ng, nb; in = src->image.data; out = dst->image.data; w = src->cache_entry.w; h = src->cache_entry.h; for (i = 0; i < h; i++) { for (j = 0; j < w; j++) { a = A_VAL(in); r = R_VAL(in); g = G_VAL(in); b = B_VAL(in); nr = ((uint32_t)((r * 0.393) + (g * 0.769) + (b * 0.189))); ng = ((uint32_t)((r * 0.349) + (g * 0.686) + (b * 0.168))); nb = ((uint32_t)((r * 0.272) + (g * 0.534) + (b * 0.131))); if (nr > 255) nr = 255; if (ng > 255) ng = 255; if (nb > 255) nb = 255; *out = ARGB_JOIN(a, nr, ng, nb); out++; in++; } } return EINA_TRUE; } static Eina_Bool greyscale_filter(Evas_Filter_Info *info __UNUSED__, RGBA_Image *src, RGBA_Image *dst) { uint32_t *in, *out; int i, j; int w, h; uint32_t cur; uint32_t a, r, g, b; in = src->image.data; out = dst->image.data; w = src->cache_entry.w; h = src->cache_entry.h; if (src->cache_entry.flags.alpha) { for (i = 0; i < h; i++) { for (j = 0; j < w; j++) { a = A_VAL(in); r = R_VAL(in); g = G_VAL(in); b = B_VAL(in); cur = (r * 0.3) + (g * 0.59) + (b * 0.11); *out = ARGB_JOIN(a, r, g, b); out++; in++; } } } else { for (i = 0 ; i < h ; i ++) { for (j = 0; j < w ; j ++) { r = R_VAL(in); g = G_VAL(in); b = B_VAL(in); cur = r * 0.3 + g * 0.59 + b * 0.11; *out = ARGB_JOIN(255, r, g, b); out++; in++; } } } return EINA_TRUE; } static Eina_Bool brightness_filter(Evas_Filter_Info *info, RGBA_Image *src, RGBA_Image *dst) { uint32_t *in, *out; int i, j; int w, h; int a,r,g,b; int delta; int adjdelta; Evas_Filter_Info_Brightness *bness; in = src->image.data; out = dst->image.data; w = src->cache_entry.w; h = src->cache_entry.h; bness = info->data; delta = bness->adjust * 255; if (delta > 255) delta = 255; else if (delta < -255) delta = -255; /* Note we could optimise the -255, 0 and 255 cases, but why would people * be doing that */ if (delta >= 0) { for (i = 0; i < h; i++) { for (j = 0; j < w; j++) { a = A_VAL(in); r = R_VAL(in); g = G_VAL(in); b = B_VAL(in); adjdelta = (a * delta) >> 8; r = MIN(r + adjdelta, a); g = MIN(g + adjdelta, a); b = MIN(b + adjdelta, a); *out = ARGB_JOIN(a, r ,g, b); out++; in++; } } } else { /* Delta negative */ for (i = 0; i < h; i++) { for (j = 0; j < w; j++) { a = A_VAL(in); r = R_VAL(in); g = G_VAL(in); b = B_VAL(in); adjdelta = (a * delta) >> 8; r = MAX(r + adjdelta, 0); g = MAX(g + adjdelta, 0); b = MAX(b + adjdelta, 0); *out = ARGB_JOIN(a, r ,g, b); out++; in++; } } } return EINA_TRUE; } static Eina_Bool contrast_filter(Evas_Filter_Info *info __UNUSED__, RGBA_Image *src, RGBA_Image *dst) { uint32_t *in, *out; int i, j; int w, h; in = src->image.data; out = dst->image.data; w = src->cache_entry.w; h = src->cache_entry.h; for (i = 0; i < h; i++) { for (j = 0; j < w; j++) { // FIXME: not even implemented out++; in++; } } return EINA_TRUE; } #endif /* vim:set ts=8 sw=3 sts=3 expandtab cino=>5n-2f0^-2{2(0W1st0 :*/ evas-1.7.9/src/lib/canvas/evas_object_grid.c0000664000175000017500000002642112175475547015704 00000000000000#include "evas_common.h" #include typedef struct _Evas_Object_Grid_Data Evas_Object_Grid_Data; typedef struct _Evas_Object_Grid_Option Evas_Object_Grid_Option; typedef struct _Evas_Object_Grid_Iterator Evas_Object_Grid_Iterator; typedef struct _Evas_Object_Grid_Accessor Evas_Object_Grid_Accessor; struct _Evas_Object_Grid_Option { Evas_Object *obj; Eina_List *l; int x, y, w, h; }; struct _Evas_Object_Grid_Data { Evas_Object_Smart_Clipped_Data base; Eina_List *children; struct { int w, h; } size; Eina_Bool is_mirrored : 1; }; struct _Evas_Object_Grid_Iterator { Eina_Iterator iterator; Eina_Iterator *real_iterator; const Evas_Object *grid; }; struct _Evas_Object_Grid_Accessor { Eina_Accessor accessor; Eina_Accessor *real_accessor; const Evas_Object *grid; }; #define EVAS_OBJECT_GRID_DATA_GET(o, ptr) \ Evas_Object_Grid_Data *ptr = evas_object_smart_data_get(o) #define EVAS_OBJECT_GRID_DATA_GET_OR_RETURN(o, ptr) \ EVAS_OBJECT_GRID_DATA_GET(o, ptr); \ if (!ptr) \ { \ CRIT("no widget data for object %p (%s)", \ o, evas_object_type_get(o)); \ abort(); \ return; \ } #define EVAS_OBJECT_GRID_DATA_GET_OR_RETURN_VAL(o, ptr, val) \ EVAS_OBJECT_GRID_DATA_GET(o, ptr); \ if (!ptr) \ { \ CRIT("No widget data for object %p (%s)", \ o, evas_object_type_get(o)); \ abort(); \ return val; \ } static const char EVAS_OBJECT_GRID_OPTION_KEY[] = "|EvGd"; static Eina_Bool _evas_object_grid_iterator_next(Evas_Object_Grid_Iterator *it, void **data) { Evas_Object_Grid_Option *opt; if (!eina_iterator_next(it->real_iterator, (void **)&opt)) return EINA_FALSE; if (data) *data = opt->obj; return EINA_TRUE; } static Evas_Object * _evas_object_grid_iterator_get_container(Evas_Object_Grid_Iterator *it) { return (Evas_Object *)it->grid; } static void _evas_object_grid_iterator_free(Evas_Object_Grid_Iterator *it) { eina_iterator_free(it->real_iterator); free(it); } static Eina_Bool _evas_object_grid_accessor_get_at(Evas_Object_Grid_Accessor *it, unsigned int idx, void **data) { Evas_Object_Grid_Option *opt = NULL; if (!eina_accessor_data_get(it->real_accessor, idx, (void **)&opt)) return EINA_FALSE; if (data) *data = opt->obj; return EINA_TRUE; } static Evas_Object * _evas_object_grid_accessor_get_container(Evas_Object_Grid_Accessor *it) { return (Evas_Object *)it->grid; } static void _evas_object_grid_accessor_free(Evas_Object_Grid_Accessor *it) { eina_accessor_free(it->real_accessor); free(it); } static Evas_Object_Grid_Option * _evas_object_grid_option_get(Evas_Object *o) { return evas_object_data_get(o, EVAS_OBJECT_GRID_OPTION_KEY); } static void _evas_object_grid_option_set(Evas_Object *o, const Evas_Object_Grid_Option *opt) { evas_object_data_set(o, EVAS_OBJECT_GRID_OPTION_KEY, opt); } static Evas_Object_Grid_Option * _evas_object_grid_option_del(Evas_Object *o) { return evas_object_data_del(o, EVAS_OBJECT_GRID_OPTION_KEY); } static void _on_child_del(void *data, Evas *evas __UNUSED__, Evas_Object *child, void *einfo __UNUSED__) { Evas_Object *grid = data; evas_object_grid_unpack(grid, child); } static void _evas_object_grid_child_connect(Evas_Object *o, Evas_Object *child) { evas_object_event_callback_add (child, EVAS_CALLBACK_DEL, _on_child_del, o); } static void _evas_object_grid_child_disconnect(Evas_Object *o, Evas_Object *child) { evas_object_event_callback_del_full (child, EVAS_CALLBACK_DEL, _on_child_del, o); } EVAS_SMART_SUBCLASS_NEW("Evas_Object_Grid", _evas_object_grid, Evas_Smart_Class, Evas_Smart_Class, evas_object_smart_clipped_class_get, NULL) static void _evas_object_grid_smart_add(Evas_Object *o) { EVAS_SMART_DATA_ALLOC(o, Evas_Object_Grid_Data) priv->size.w = 100; priv->size.h = 100; _evas_object_grid_parent_sc->add(o); } static void _evas_object_grid_smart_del(Evas_Object *o) { EVAS_OBJECT_GRID_DATA_GET(o, priv); Eina_List *l; l = priv->children; while (l) { Evas_Object_Grid_Option *opt = l->data; _evas_object_grid_child_disconnect(o, opt->obj); _evas_object_grid_option_del(opt->obj); free(opt); l = eina_list_remove_list(l, l); } _evas_object_grid_parent_sc->del(o); } static void _evas_object_grid_smart_resize(Evas_Object *o, Evas_Coord w, Evas_Coord h) { Evas_Coord ow, oh; evas_object_geometry_get(o, NULL, NULL, &ow, &oh); if ((ow == w) && (oh == h)) return; evas_object_smart_changed(o); } static void _evas_object_grid_smart_calculate(Evas_Object *o) { Eina_List *l; Evas_Object_Grid_Option *opt; Evas_Coord x, y, w, h, vw, vh, t; Eina_Bool mirror; EVAS_OBJECT_GRID_DATA_GET_OR_RETURN(o, priv); if (!priv) return; if (!priv->children) return; evas_object_geometry_get(o, &x, &y, &w, &h); mirror = priv->is_mirrored; vw = priv->size.w; vh = priv->size.h; EINA_LIST_FOREACH(priv->children, l, opt) { Evas_Coord x1, y1, x2, y2; x1 = x + ((w * opt->x) / vw); y1 = y + ((h * opt->y) / vh); x2 = x + ((w * (opt->x + opt->w)) / vw); y2 = y + ((h * (opt->y + opt->h)) / vh); if (mirror) { t = x1; x1 = x2; x2 = t; t = y1; y1 = y2; y2 = t; } evas_object_move(opt->obj, x1, y1); evas_object_resize(opt->obj, x2 - x1, y2 - y1); } } static void _evas_object_grid_smart_set_user(Evas_Smart_Class *sc) { sc->add = _evas_object_grid_smart_add; sc->del = _evas_object_grid_smart_del; sc->resize = _evas_object_grid_smart_resize; sc->calculate = _evas_object_grid_smart_calculate; } EAPI Evas_Object * evas_object_grid_add(Evas *evas) { return evas_object_smart_add(evas, _evas_object_grid_smart_class_new()); } EAPI Evas_Object * evas_object_grid_add_to(Evas_Object *parent) { Evas *evas; Evas_Object *o; evas = evas_object_evas_get(parent); o = evas_object_grid_add(evas); evas_object_smart_member_add(o, parent); return o; } EAPI void evas_object_grid_size_set(Evas_Object *o, int w, int h) { EVAS_OBJECT_GRID_DATA_GET_OR_RETURN(o, priv); if ((priv->size.w == w) && (priv->size.h == h)) return; priv->size.w = w; priv->size.h = h; evas_object_smart_changed(o); } EAPI void evas_object_grid_size_get(const Evas_Object *o, int *w, int *h) { if (w) *w = 0; if (h) *h = 0; EVAS_OBJECT_GRID_DATA_GET_OR_RETURN(o, priv); if (w) *w = priv->size.w; if (h) *h = priv->size.h; } EAPI Eina_Bool evas_object_grid_pack(Evas_Object *o, Evas_Object *child, int x, int y, int w, int h) { Evas_Object_Grid_Option *opt; Eina_Bool newobj = EINA_FALSE; EVAS_OBJECT_GRID_DATA_GET_OR_RETURN_VAL(o, priv, 0); opt = _evas_object_grid_option_get(child); if (!opt) { opt = malloc(sizeof(*opt)); if (!opt) { ERR("could not allocate grid option data."); return EINA_FALSE; } newobj = EINA_TRUE; } opt->x = x; opt->y = y; opt->w = w; opt->h = h; if (newobj) { opt->obj = child; priv->children = eina_list_append(priv->children, opt); opt->l = eina_list_last(priv->children); _evas_object_grid_option_set(child, opt); evas_object_smart_member_add(child, o); _evas_object_grid_child_connect(o, child); } // FIXME: we could keep a changed list evas_object_smart_changed(o); return EINA_TRUE; } static void _evas_object_grid_remove_opt(Evas_Object_Grid_Data *priv, Evas_Object_Grid_Option *opt) { priv->children = eina_list_remove_list(priv->children, opt->l); opt->l = NULL; } EAPI Eina_Bool evas_object_grid_unpack(Evas_Object *o, Evas_Object *child) { Evas_Object_Grid_Option *opt; EVAS_OBJECT_GRID_DATA_GET_OR_RETURN_VAL(o, priv, 0); if (o != evas_object_smart_parent_get(child)) { ERR("cannot unpack child from incorrect grid!"); return EINA_FALSE; } opt = _evas_object_grid_option_del(child); if (!opt) { ERR("cannot unpack child with no packing option!"); return EINA_FALSE; } _evas_object_grid_child_disconnect(o, child); _evas_object_grid_remove_opt(priv, opt); evas_object_smart_member_del(child); free(opt); return EINA_TRUE; } EAPI void evas_object_grid_clear(Evas_Object *o, Eina_Bool clear) { Evas_Object_Grid_Option *opt; EVAS_OBJECT_GRID_DATA_GET_OR_RETURN(o, priv); EINA_LIST_FREE(priv->children, opt) { _evas_object_grid_child_disconnect(o, opt->obj); _evas_object_grid_option_del(opt->obj); evas_object_smart_member_del(opt->obj); if (clear) evas_object_del(opt->obj); free(opt); } } EAPI Eina_Bool evas_object_grid_pack_get(const Evas_Object *o, Evas_Object *child, int *x, int *y, int *w, int *h) { Evas_Object_Grid_Option *opt; if (x) *x = 0; if (y) *y = 0; if (w) *w = 0; if (h) *h = 0; EVAS_OBJECT_GRID_DATA_GET_OR_RETURN_VAL(o, priv, 0); opt = _evas_object_grid_option_get(child); if (!opt) return 0; if (x) *x = opt->x; if (y) *y = opt->y; if (w) *w = opt->w; if (h) *h = opt->h; return 1; } EAPI Eina_Iterator * evas_object_grid_iterator_new(const Evas_Object *o) { Evas_Object_Grid_Iterator *it; EVAS_OBJECT_GRID_DATA_GET_OR_RETURN_VAL(o, priv, NULL); if (!priv->children) return NULL; it = calloc(1, sizeof(Evas_Object_Grid_Iterator)); if (!it) return NULL; EINA_MAGIC_SET(&it->iterator, EINA_MAGIC_ITERATOR); it->real_iterator = eina_list_iterator_new(priv->children); it->grid = o; it->iterator.next = FUNC_ITERATOR_NEXT(_evas_object_grid_iterator_next); it->iterator.get_container = FUNC_ITERATOR_GET_CONTAINER(_evas_object_grid_iterator_get_container); it->iterator.free = FUNC_ITERATOR_FREE(_evas_object_grid_iterator_free); return &it->iterator; } EAPI Eina_Accessor * evas_object_grid_accessor_new(const Evas_Object *o) { Evas_Object_Grid_Accessor *it; EVAS_OBJECT_GRID_DATA_GET_OR_RETURN_VAL(o, priv, NULL); if (!priv->children) return NULL; it = calloc(1, sizeof(Evas_Object_Grid_Accessor)); if (!it) return NULL; EINA_MAGIC_SET(&it->accessor, EINA_MAGIC_ACCESSOR); it->real_accessor = eina_list_accessor_new(priv->children); it->grid = o; it->accessor.get_at = FUNC_ACCESSOR_GET_AT(_evas_object_grid_accessor_get_at); it->accessor.get_container = FUNC_ACCESSOR_GET_CONTAINER(_evas_object_grid_accessor_get_container); it->accessor.free = FUNC_ACCESSOR_FREE(_evas_object_grid_accessor_free); return &it->accessor; } EAPI Eina_List * evas_object_grid_children_get(const Evas_Object *o) { Eina_List *new_list = NULL, *l; Evas_Object_Grid_Option *opt; EVAS_OBJECT_GRID_DATA_GET_OR_RETURN_VAL(o, priv, NULL); EINA_LIST_FOREACH(priv->children, l, opt) new_list = eina_list_append(new_list, opt->obj); return new_list; } EAPI Eina_Bool evas_object_grid_mirrored_get(const Evas_Object *obj) { EVAS_OBJECT_GRID_DATA_GET_OR_RETURN_VAL(obj, priv, EINA_FALSE); return priv->is_mirrored; } EAPI void evas_object_grid_mirrored_set(Evas_Object *obj, Eina_Bool mirrored) { EVAS_OBJECT_GRID_DATA_GET_OR_RETURN(obj, priv); mirrored = !!mirrored; if (priv->is_mirrored != mirrored) { priv->is_mirrored = mirrored; _evas_object_grid_smart_calculate(obj); } } evas-1.7.9/src/lib/canvas/evas_object_box.c0000664000175000017500000016437012175475547015555 00000000000000#include "evas_common.h" #ifdef _WIN32_WCE # undef remove #endif typedef struct _Evas_Object_Box_Iterator Evas_Object_Box_Iterator; typedef struct _Evas_Object_Box_Accessor Evas_Object_Box_Accessor; struct _Evas_Object_Box_Iterator { Eina_Iterator iterator; Eina_Iterator *real_iterator; const Evas_Object *box; }; struct _Evas_Object_Box_Accessor { Eina_Accessor accessor; Eina_Accessor *real_accessor; const Evas_Object *box; }; #define _evas_object_box_type "Evas_Object_Box" #define SIG_CHILD_ADDED "child,added" #define SIG_CHILD_REMOVED "child,removed" static const Evas_Smart_Cb_Description _signals[] = { {SIG_CHILD_ADDED, ""}, {SIG_CHILD_REMOVED, ""}, {NULL, NULL} }; static void _sizing_eval(Evas_Object *obj); #define EVAS_OBJECT_BOX_DATA_GET(o, ptr) \ Evas_Object_Box_Data *ptr = evas_object_smart_data_get(o) #define EVAS_OBJECT_BOX_DATA_GET_OR_RETURN(o, ptr) \ EVAS_OBJECT_BOX_DATA_GET(o, ptr); \ if (!ptr) \ { \ CRIT("no widget data for object %p (%s)", \ o, evas_object_type_get(o)); \ fflush(stderr); \ return; \ } #define EVAS_OBJECT_BOX_DATA_GET_OR_RETURN_VAL(o, ptr, val) \ EVAS_OBJECT_BOX_DATA_GET(o, ptr); \ if (!ptr) \ { \ CRIT("no widget data for object %p (%s)", \ o, evas_object_type_get(o)); \ fflush(stderr); \ return val; \ } EVAS_SMART_SUBCLASS_NEW(_evas_object_box_type, _evas_object_box, Evas_Object_Box_Api, Evas_Smart_Class, evas_object_smart_clipped_class_get, NULL) static Eina_Bool _evas_object_box_iterator_next(Evas_Object_Box_Iterator *it, void **data) { Evas_Object_Box_Option *opt; if (!eina_iterator_next(it->real_iterator, (void **)&opt)) return EINA_FALSE; if (data) *data = opt->obj; return EINA_TRUE; } static Evas_Object * _evas_object_box_iterator_get_container(Evas_Object_Box_Iterator *it) { return (Evas_Object *)it->box; } static void _evas_object_box_iterator_free(Evas_Object_Box_Iterator *it) { eina_iterator_free(it->real_iterator); free(it); } static Eina_Bool _evas_object_box_accessor_get_at(Evas_Object_Box_Accessor *it, unsigned int idx, void **data) { Evas_Object_Box_Option *opt = NULL; if (!eina_accessor_data_get(it->real_accessor, idx, (void *)&opt)) return EINA_FALSE; if (data) *data = opt->obj; return EINA_TRUE; } static Evas_Object * _evas_object_box_accessor_get_container(Evas_Object_Box_Accessor *it) { return (Evas_Object *)it->box; } static void _evas_object_box_accessor_free(Evas_Object_Box_Accessor *it) { eina_accessor_free(it->real_accessor); free(it); } static void _on_child_resize(void *data, Evas *evas __UNUSED__, Evas_Object *o __UNUSED__, void *einfo __UNUSED__) { Evas_Object *box = data; EVAS_OBJECT_BOX_DATA_GET_OR_RETURN(box, priv); if (!priv->layouting) evas_object_smart_changed(box); } static void _on_child_del(void *data, Evas *evas __UNUSED__, Evas_Object *o, void *einfo __UNUSED__) { const Evas_Object_Box_Api *api; Evas_Object *box = data; EVAS_OBJECT_BOX_DATA_GET(box, priv); api = priv->api; if ((!api) || (!api->remove)) { ERR("no api->remove"); return; } if (!api->remove(box, priv, o)) ERR("child removal failed"); evas_object_smart_changed(box); } static void _on_child_hints_changed(void *data, Evas *evas __UNUSED__, Evas_Object *o __UNUSED__, void *einfo __UNUSED__) { Evas_Object *box = data; EVAS_OBJECT_BOX_DATA_GET_OR_RETURN(box, priv); // XXX: this breaks box repacking in elementary. widgets DEPEND on being able // to change their hints evenr WHILE being laid out. so comment this out. // if (!priv->layouting) evas_object_smart_changed(box); } static void _on_hints_changed(void *data __UNUSED__, Evas *evas __UNUSED__, Evas_Object *o , void *einfo __UNUSED__) { _sizing_eval(o); } static Evas_Object_Box_Option * _evas_object_box_option_new(Evas_Object *o, Evas_Object_Box_Data *priv, Evas_Object *child) { Evas_Object_Box_Option *opt; const Evas_Object_Box_Api *api; api = priv->api; if ((!api) || (!api->option_new)) { ERR("no api->option_new"); return NULL; } opt = api->option_new(o, priv, child); if (!opt) { ERR("option_new failed"); return NULL; } return opt; } static void _evas_object_box_child_callbacks_unregister(Evas_Object *obj) { evas_object_event_callback_del (obj, EVAS_CALLBACK_RESIZE, _on_child_resize); evas_object_event_callback_del (obj, EVAS_CALLBACK_FREE, _on_child_del); evas_object_event_callback_del (obj, EVAS_CALLBACK_CHANGED_SIZE_HINTS, _on_child_hints_changed); } static Evas_Object_Box_Option * _evas_object_box_option_callbacks_register(Evas_Object *o, Evas_Object_Box_Data *priv, Evas_Object_Box_Option *opt) { const Evas_Object_Box_Api *api; Evas_Object *obj = opt->obj; api = priv->api; if ((!api) || (!api->option_free)) { WRN("api->option_free not set (may cause memory leaks, segfaults)"); return NULL; } evas_object_event_callback_add (obj, EVAS_CALLBACK_RESIZE, _on_child_resize, o); evas_object_event_callback_add (obj, EVAS_CALLBACK_FREE, _on_child_del, o); evas_object_event_callback_add (obj, EVAS_CALLBACK_CHANGED_SIZE_HINTS, _on_child_hints_changed, o); return opt; } static Evas_Object_Box_Option * _evas_object_box_option_new_default(Evas_Object *o __UNUSED__, Evas_Object_Box_Data *priv __UNUSED__, Evas_Object *child) { Evas_Object_Box_Option *opt; opt = (Evas_Object_Box_Option *)malloc(sizeof(*opt)); if (!opt) return NULL; opt->obj = child; return opt; } static void _evas_object_box_option_free_default(Evas_Object *o __UNUSED__, Evas_Object_Box_Data *priv __UNUSED__, Evas_Object_Box_Option *opt) { free(opt); } static Evas_Object_Box_Option * _evas_object_box_append_default(Evas_Object *o, Evas_Object_Box_Data *priv, Evas_Object *child) { Evas_Object_Box_Option *opt; opt = _evas_object_box_option_new(o, priv, child); if (!opt) return NULL; priv->children = eina_list_append(priv->children, opt); priv->children_changed = EINA_TRUE; evas_object_smart_callback_call(o, SIG_CHILD_ADDED, opt); return opt; } static Evas_Object_Box_Option * _evas_object_box_prepend_default(Evas_Object *o, Evas_Object_Box_Data *priv, Evas_Object *child) { Evas_Object_Box_Option *opt; opt = _evas_object_box_option_new(o, priv, child); if (!opt) return NULL; priv->children = eina_list_prepend(priv->children, opt); priv->children_changed = EINA_TRUE; evas_object_smart_callback_call(o, SIG_CHILD_ADDED, opt); return opt; } static Evas_Object_Box_Option * _evas_object_box_insert_before_default(Evas_Object *o, Evas_Object_Box_Data *priv, Evas_Object *child, const Evas_Object *reference) { Eina_List *l; Evas_Object_Box_Option *opt; EINA_LIST_FOREACH(priv->children, l, opt) { if (opt->obj == reference) { Evas_Object_Box_Option *new_opt; new_opt = _evas_object_box_option_new(o, priv, child); if (!new_opt) return NULL; priv->children = eina_list_prepend_relative (priv->children, new_opt, opt); priv->children_changed = EINA_TRUE; evas_object_smart_callback_call(o, SIG_CHILD_ADDED, new_opt); return new_opt; } } return NULL; } static Evas_Object_Box_Option * _evas_object_box_insert_after_default(Evas_Object *o, Evas_Object_Box_Data *priv, Evas_Object *child, const Evas_Object *reference) { Eina_List *l; Evas_Object_Box_Option *opt; EINA_LIST_FOREACH(priv->children, l, opt) { if (opt->obj == reference) { Evas_Object_Box_Option *new_opt; new_opt = _evas_object_box_option_new(o, priv, child); if (!new_opt) return NULL; priv->children = eina_list_append_relative (priv->children, new_opt, opt); priv->children_changed = EINA_TRUE; evas_object_smart_callback_call(o, SIG_CHILD_ADDED, new_opt); return new_opt; } } return NULL; } static Evas_Object_Box_Option * _evas_object_box_insert_at_default(Evas_Object *o, Evas_Object_Box_Data *priv, Evas_Object *child, unsigned int pos) { Eina_List *l; unsigned int i; if ((pos == 0) && (eina_list_count(priv->children) == 0)) { Evas_Object_Box_Option *new_opt; new_opt = _evas_object_box_option_new(o, priv, child); if (!new_opt) return NULL; priv->children = eina_list_prepend(priv->children, new_opt); priv->children_changed = EINA_TRUE; evas_object_smart_callback_call(o, SIG_CHILD_ADDED, new_opt); return new_opt; } for (l = priv->children, i = 0; l; l = l->next, i++) { Evas_Object_Box_Option *opt = l->data; if (i == pos) { Evas_Object_Box_Option *new_opt; new_opt = _evas_object_box_option_new(o, priv, child); if (!new_opt) return NULL; priv->children = eina_list_prepend_relative (priv->children, new_opt, opt); priv->children_changed = EINA_TRUE; evas_object_smart_callback_call(o, SIG_CHILD_ADDED, new_opt); return new_opt; } } return NULL; } static Evas_Object * _evas_object_box_remove_default(Evas_Object *o, Evas_Object_Box_Data *priv, Evas_Object *child) { const Evas_Object_Box_Api *api; Evas_Object_Box_Option *opt; Eina_List *l; api = priv->api; if ((!api) || (!api->option_free)) { ERR("api->option_free not set (may cause memory leaks, segfaults)"); return NULL; } EINA_LIST_FOREACH(priv->children, l, opt) { Evas_Object *obj = opt->obj; if (obj == child) { priv->children = eina_list_remove(priv->children, opt); api->option_free(o, priv, opt); priv->children_changed = EINA_TRUE; evas_object_smart_callback_call(o, SIG_CHILD_REMOVED, obj); return obj; } } return NULL; } static Evas_Object * _evas_object_box_remove_at_default(Evas_Object *o, Evas_Object_Box_Data *priv, unsigned int pos) { const Evas_Object_Box_Api *api; Eina_List *node; Evas_Object_Box_Option *opt; Evas_Object *obj; api = priv->api; if ((!api) || (!api->option_free)) { WRN("api->option_free not set (may cause memory leaks, segfaults)"); return NULL; } node = eina_list_nth_list(priv->children, pos); if (!node) { ERR("No item to be removed at position %d", pos); return NULL; } opt = node->data; obj = opt->obj; priv->children = eina_list_remove_list(priv->children, node); api->option_free(o, priv, opt); priv->children_changed = EINA_TRUE; evas_object_smart_callback_call(o, SIG_CHILD_REMOVED, obj); return obj; } static void _evas_object_box_smart_add(Evas_Object *o) { Evas_Object_Box_Data *priv; priv = evas_object_smart_data_get(o); if (!priv) { const Evas_Smart *smart; const Evas_Smart_Class *sc; priv = (Evas_Object_Box_Data *)calloc(1, sizeof(*priv)); if (!priv) { ERR("Could not allocate object private data."); return; } smart = evas_object_smart_smart_get(o); sc = evas_smart_class_get(smart); priv->api = (const Evas_Object_Box_Api *)sc; evas_object_smart_data_set(o, priv); } _evas_object_box_parent_sc->add(o); evas_object_event_callback_add (o, EVAS_CALLBACK_CHANGED_SIZE_HINTS, _on_hints_changed, o); priv->children = NULL; priv->align.h = 0.5; priv->align.v = 0.5; priv->pad.h = 0; priv->pad.v = 0; priv->layout.cb = evas_object_box_layout_horizontal; priv->layout.data = NULL; priv->layout.free_data = NULL; } static void _evas_object_box_smart_del(Evas_Object *o) { const Evas_Object_Box_Api *api; Eina_List *l; EVAS_OBJECT_BOX_DATA_GET(o, priv); api = priv->api; if ((!api) || (!api->option_free)) { WRN("api->option_free not set (may cause memory leaks, segfaults)"); return; } l = priv->children; while (l) { Evas_Object_Box_Option *opt = l->data; _evas_object_box_child_callbacks_unregister(opt->obj); api->option_free(o, priv, opt); l = eina_list_remove_list(l, l); } if (priv->layout.data && priv->layout.free_data) priv->layout.free_data(priv->layout.data); _evas_object_box_parent_sc->del(o); } static void _evas_object_box_smart_resize(Evas_Object *o, Evas_Coord w, Evas_Coord h) { Evas_Coord ow, oh; evas_object_geometry_get(o, NULL, NULL, &ow, &oh); if ((ow == w) && (oh == h)) return; evas_object_smart_changed(o); } static void _evas_object_box_smart_calculate(Evas_Object *o) { EVAS_OBJECT_BOX_DATA_GET_OR_RETURN(o, priv); if (priv->layout.cb) { priv->layouting = 1; priv->layout.cb(o, priv, priv->layout.data); priv->layouting = 0; priv->children_changed = EINA_FALSE; } else ERR("No layout function set for %p box.", o); } static void _evas_object_box_smart_set_user(Evas_Object_Box_Api *api) { api->base.add = _evas_object_box_smart_add; api->base.del = _evas_object_box_smart_del; api->base.resize = _evas_object_box_smart_resize; api->base.calculate = _evas_object_box_smart_calculate; api->base.callbacks = _signals; api->append = _evas_object_box_append_default; api->prepend = _evas_object_box_prepend_default; api->insert_before = _evas_object_box_insert_before_default; api->insert_after = _evas_object_box_insert_after_default; api->insert_at = _evas_object_box_insert_at_default; api->remove = _evas_object_box_remove_default; api->remove_at = _evas_object_box_remove_at_default; api->option_new = _evas_object_box_option_new_default; api->option_free = _evas_object_box_option_free_default; } EAPI Evas_Object * evas_object_box_add(Evas *evas) { return evas_object_smart_add(evas, _evas_object_box_smart_class_new()); } EAPI Evas_Object * evas_object_box_add_to(Evas_Object *parent) { Evas *evas; Evas_Object *o; evas = evas_object_evas_get(parent); o = evas_object_box_add(evas); evas_object_smart_member_add(o, parent); return o; } EAPI void evas_object_box_smart_set(Evas_Object_Box_Api *api) { if (!api) return; _evas_object_box_smart_set(api); } EAPI const Evas_Object_Box_Api * evas_object_box_smart_class_get(void) { static Evas_Object_Box_Api _sc = EVAS_OBJECT_BOX_API_INIT_NAME_VERSION(_evas_object_box_type); static const Evas_Object_Box_Api *class = NULL; if (class) return class; evas_object_box_smart_set(&_sc); class = &_sc; return class; } EAPI void evas_object_box_layout_set(Evas_Object *o, Evas_Object_Box_Layout cb, const void *data, void (*free_data)(void *data)) { EVAS_OBJECT_BOX_DATA_GET_OR_RETURN(o, priv); if ((priv->layout.cb == cb) && (priv->layout.data == data) && (priv->layout.free_data == free_data)) return; if (priv->layout.data && priv->layout.free_data) priv->layout.free_data(priv->layout.data); priv->layout.cb = cb; priv->layout.data = (void *)data; priv->layout.free_data = free_data; evas_object_smart_changed(o); } static void _fixed_point_divide_and_decompose_integer(int dividend, int divisor, int *int_part, int *frac_part) { int quotient = (long long)(dividend << 16) / divisor; *frac_part = quotient & 0xffff; *int_part = quotient >> 16; } static void _layout_dimension_change_min_max_cell_bound(int dim, int *new_dim, int min_d, int max_d, int cell_sz) { if (dim > cell_sz) { if ((min_d != 0) && (cell_sz < min_d)) *new_dim = min_d; else *new_dim = cell_sz; } else { if ((max_d != -1) && (cell_sz > max_d)) *new_dim = max_d; else *new_dim = cell_sz; } } static void _layout_set_offset_and_expand_dimension_space_max_bounded(int dim, int *new_dim, int space_sz, int max_dim, int *offset, double align, int pad_before, int pad_after) { if (align >= 0.0) { *new_dim = dim; *offset = (space_sz - (dim + pad_before + pad_after)) * align + pad_before; } else { if ((max_dim != -1) && (space_sz > max_dim)) { *new_dim = max_dim; *offset = (space_sz - (max_dim + pad_before + pad_after)) * 0.5 + pad_before; } else { *new_dim = space_sz; *offset = 0; } } } static void _layout_set_offset_and_change_dimension_min_max_cell_bounded(int dim, int *new_dim, int min_dim, int max_dim, int cell_sz, int *offset, double align, int pad_before, int pad_after) { if (align >= 0.0) { *new_dim = dim; *offset = (cell_sz - (dim + pad_before + pad_after)) * align + pad_before; } else { *offset = pad_before; _layout_dimension_change_min_max_cell_bound (dim, new_dim, min_dim, max_dim, cell_sz - pad_before - pad_after); } } static void _sizing_eval(Evas_Object *obj) { Evas_Coord minw, minh, maxw, maxh; Evas_Coord w, h; evas_object_size_hint_min_get(obj, &minw, &minh); evas_object_size_hint_max_get(obj, &maxw, &maxh); evas_object_geometry_get(obj, NULL, NULL, &w, &h); if (w < minw) w = minw; if (h < minh) h = minh; if ((maxw >= 0) && (w > maxw)) w = maxw; if ((maxh >= 0) && (h > maxh)) h = maxh; evas_object_resize(obj, w, h); } static int _evas_object_box_layout_horizontal_weight_apply(Evas_Object_Box_Data *priv, Evas_Object_Box_Option **objects, int n_objects, int remaining, double weight_total) { int rem_diff = 0; int i; for (i = 0; i < n_objects; i++) { Evas_Object_Box_Option *opt = objects[i]; Evas_Object *o = opt->obj; int h; evas_object_geometry_get(o, NULL, NULL, NULL, &h); if (remaining <= 0) { int min_w; evas_object_size_hint_min_get(o, &min_w, NULL); evas_object_resize(o, min_w, h); } else { double normal_weight, weight_x; int target_size; int max_w; evas_object_size_hint_weight_get(o, &weight_x, NULL); normal_weight = weight_x / weight_total; target_size = (int)((double)remaining * normal_weight); evas_object_size_hint_max_get(o, &max_w, NULL); if ((max_w != -1) && (target_size > max_w)) { evas_object_resize(o, max_w, h); rem_diff += max_w; objects[i] = objects[n_objects - 1]; weight_total -= weight_x; n_objects--; return _evas_object_box_layout_horizontal_weight_apply (priv, objects, n_objects, remaining - rem_diff, weight_total); } else { evas_object_resize(o, target_size, h); rem_diff += target_size; } } } return remaining - rem_diff; } EAPI void evas_object_box_layout_horizontal(Evas_Object *o, Evas_Object_Box_Data *priv, void *data __UNUSED__) { int pad_inc = 0, sub_pixel = 0; int req_w, global_pad, remaining, top_h = 0; double weight_total = 0.0; int weight_use = 0; int x, y, w, h; int n_children; Evas_Object_Box_Option *opt; Evas_Object_Box_Option **objects; Eina_List *l; n_children = eina_list_count(priv->children); if (!n_children) { evas_object_size_hint_min_set(o, 0, 0); return; } objects = (Evas_Object_Box_Option **)alloca(sizeof(Evas_Object_Box_Option *) * n_children); if (!objects) { evas_object_size_hint_min_set(o, 0, 0); return; } evas_object_geometry_get(o, &x, &y, &w, &h); global_pad = priv->pad.h; req_w = global_pad * (n_children - 1); EINA_LIST_FOREACH(priv->children, l, opt) { int padding_l, padding_r; double weight_x; _sizing_eval(opt->obj); evas_object_size_hint_weight_get(opt->obj, &weight_x, NULL); evas_object_size_hint_padding_get (opt->obj, &padding_l, &padding_r, NULL, NULL); req_w += padding_l + padding_r; if (!weight_x) { int child_w; evas_object_geometry_get(opt->obj, NULL, NULL, &child_w, NULL); req_w += child_w; } else { objects[weight_use] = opt; weight_use++; weight_total += weight_x; } } remaining = w - req_w; if (weight_use) remaining = _evas_object_box_layout_horizontal_weight_apply (priv, objects, weight_use, remaining, weight_total); if (priv->align.h >= 0.0) x += remaining * priv->align.h; else if (n_children == 1) x += remaining / 2; else { /* justified */ _fixed_point_divide_and_decompose_integer (remaining, n_children - 1, &global_pad, &pad_inc); global_pad += priv->pad.h; } EINA_LIST_FOREACH(priv->children, l, opt) { int child_w, child_h, max_h, new_h, off_x, off_y; int padding_l, padding_r, padding_t, padding_b; double align_y; evas_object_size_hint_align_get(opt->obj, NULL, &align_y); evas_object_size_hint_padding_get (opt->obj, &padding_l, &padding_r, &padding_t, &padding_b); evas_object_size_hint_max_get(opt->obj, NULL, &max_h); evas_object_geometry_get(opt->obj, NULL, NULL, &child_w, &child_h); off_x = padding_l; new_h = child_h; if (new_h > top_h) top_h = new_h; _layout_set_offset_and_expand_dimension_space_max_bounded (child_h, &new_h, h, max_h, &off_y, align_y, padding_t, padding_b); if (new_h != child_h) evas_object_resize(opt->obj, child_w, new_h); evas_object_move(opt->obj, x + off_x, y + off_y); x += child_w + padding_l + padding_r + global_pad; sub_pixel += pad_inc; if (sub_pixel >= 1 << 16) { x++; sub_pixel -= 1 << 16; } } evas_object_size_hint_min_set(o, req_w, top_h); } static int _evas_object_box_layout_vertical_weight_apply(Evas_Object_Box_Data *priv, Evas_Object_Box_Option **objects, int n_objects, int remaining, double weight_total) { int rem_diff = 0; int i; for (i = 0; i < n_objects; i++) { Evas_Object_Box_Option *opt = objects[i]; Evas_Object *o = opt->obj; int w; evas_object_geometry_get(o, NULL, NULL, &w, NULL); if (remaining <= 0) { int min_h; evas_object_size_hint_min_get(o, NULL, &min_h); evas_object_resize(o, w, min_h); } else { double normal_weight, weight_y; int target_size; int max_h; evas_object_size_hint_weight_get(o, NULL, &weight_y); normal_weight = weight_y / weight_total; target_size = (int)((double)remaining * normal_weight); evas_object_size_hint_max_get(o, NULL, &max_h); if ((max_h != -1) && (target_size > max_h)) { evas_object_resize(o, w, max_h); rem_diff += max_h; objects[i] = objects[n_objects - 1]; weight_total -= weight_y; n_objects--; return _evas_object_box_layout_vertical_weight_apply (priv, objects, n_objects, remaining - rem_diff, weight_total); } else { evas_object_resize(o, w, target_size); rem_diff += target_size; } } } return remaining - rem_diff; } EAPI void evas_object_box_layout_vertical(Evas_Object *o, Evas_Object_Box_Data *priv, void *data __UNUSED__) { int pad_inc = 0, sub_pixel = 0; int req_h, global_pad, remaining, top_w = 0; double weight_total = 0.0; int weight_use = 0; int x, y, w, h; int n_children; Evas_Object_Box_Option *opt; Evas_Object_Box_Option **objects; Eina_List *l; n_children = eina_list_count(priv->children); if (!n_children) { evas_object_size_hint_min_set(o, 0, 0); return; } objects = (Evas_Object_Box_Option **)alloca(sizeof(Evas_Object_Box_Option *) * n_children); if (!objects) { evas_object_size_hint_min_set(o, 0, 0); return; } evas_object_geometry_get(o, &x, &y, &w, &h); global_pad = priv->pad.v; req_h = global_pad * (n_children - 1); EINA_LIST_FOREACH(priv->children, l, opt) { int padding_t, padding_b; double weight_y; _sizing_eval(opt->obj); evas_object_size_hint_weight_get(opt->obj, NULL, &weight_y); evas_object_size_hint_padding_get (opt->obj, NULL, NULL, &padding_t, &padding_b); req_h += padding_t + padding_b; if (!weight_y) { int child_h; evas_object_geometry_get(opt->obj, NULL, NULL, NULL, &child_h); req_h += child_h; } else { objects[weight_use] = opt; weight_use++; weight_total += weight_y; } } remaining = h - req_h; if (weight_use) remaining = _evas_object_box_layout_vertical_weight_apply (priv, objects, weight_use, remaining, weight_total); if (priv->align.v >= 0.0) y += remaining * priv->align.v; else if (n_children == 1) y += remaining / 2; else { /* justified */ _fixed_point_divide_and_decompose_integer (remaining, n_children - 1, &global_pad, &pad_inc); global_pad += priv->pad.v; } EINA_LIST_FOREACH(priv->children, l, opt) { int child_w, child_h, max_w, new_w, off_x, off_y; int padding_l, padding_r, padding_t, padding_b; double align_x; evas_object_size_hint_align_get(opt->obj, &align_x, NULL); evas_object_size_hint_padding_get (opt->obj, &padding_l, &padding_r, &padding_t, &padding_b); evas_object_size_hint_max_get(opt->obj, &max_w, NULL); evas_object_geometry_get(opt->obj, NULL, NULL, &child_w, &child_h); off_y = padding_t; new_w = child_w; _layout_set_offset_and_expand_dimension_space_max_bounded (child_w, &new_w, w, max_w, &off_x, align_x, padding_l, padding_r); if (new_w > top_w) top_w = new_w; if (new_w != child_w) evas_object_resize(opt->obj, new_w, child_h); evas_object_move(opt->obj, x + off_x, y + off_y); y += child_h + padding_t + padding_b + global_pad; sub_pixel += pad_inc; if (sub_pixel >= 1 << 16) { y++; sub_pixel -= 1 << 16; } } evas_object_size_hint_min_set(o, top_w, req_h); } EAPI void evas_object_box_layout_homogeneous_horizontal(Evas_Object *o, Evas_Object_Box_Data *priv, void *data __UNUSED__) { int cell_sz, share, inc; int sub_pixel = 0; int x, y, w, h; int n_children; Evas_Object_Box_Option *opt; Eina_List *l; n_children = eina_list_count(priv->children); if (!n_children) { evas_object_size_hint_min_set(o, 0, 0); return; } evas_object_geometry_get(o, &x, &y, &w, &h); share = w - priv->pad.h * (n_children - 1); _fixed_point_divide_and_decompose_integer (share, n_children, &cell_sz, &inc); EINA_LIST_FOREACH(priv->children, l, opt) { int child_w, child_h, max_h, min_w, max_w, new_w, new_h, off_x, off_y; int padding_l, padding_r, padding_t, padding_b; double align_x, align_y; evas_object_size_hint_align_get(opt->obj, &align_x, &align_y); evas_object_size_hint_padding_get (opt->obj, &padding_l, &padding_r, &padding_t, &padding_b); evas_object_size_hint_max_get(opt->obj, &max_w, &max_h); evas_object_size_hint_min_get(opt->obj, &min_w, NULL); _sizing_eval(opt->obj); evas_object_geometry_get(opt->obj, NULL, NULL, &child_w, &child_h); new_w = child_w; new_h = child_h; _layout_set_offset_and_expand_dimension_space_max_bounded (child_h, &new_h, h, max_h, &off_y, align_y, padding_t, padding_b); _layout_set_offset_and_change_dimension_min_max_cell_bounded (child_w, &new_w, min_w, max_w, cell_sz, &off_x, align_x, padding_l, padding_r); if ((new_w != child_w) || (new_h != child_h)) evas_object_resize(opt->obj, new_w, new_h); evas_object_move(opt->obj, x + off_x, y + off_y); x += cell_sz + priv->pad.h; sub_pixel += inc; if (sub_pixel >= 1 << 16) { x++; sub_pixel -= 1 << 16; } } evas_object_size_hint_min_set(o, w, h); } EAPI void evas_object_box_layout_homogeneous_vertical(Evas_Object *o, Evas_Object_Box_Data *priv, void *data __UNUSED__) { int cell_sz, share, inc; int sub_pixel = 0; int x, y, w, h; int n_children; Evas_Object_Box_Option *opt; Eina_List *l; n_children = eina_list_count(priv->children); if (!n_children) { evas_object_size_hint_min_set(o, 0, 0); return; } evas_object_geometry_get(o, &x, &y, &w, &h); share = h - priv->pad.v * (n_children - 1); _fixed_point_divide_and_decompose_integer (share, n_children, &cell_sz, &inc); EINA_LIST_FOREACH(priv->children, l, opt) { int child_w, child_h, max_w, min_h, max_h, new_w, new_h, off_x, off_y; int padding_l, padding_r, padding_t, padding_b; double align_x, align_y; evas_object_size_hint_align_get(opt->obj, &align_x, &align_y); evas_object_size_hint_padding_get (opt->obj, &padding_l, &padding_r, &padding_t, &padding_b); evas_object_size_hint_max_get(opt->obj, &max_w, &max_h); evas_object_size_hint_min_get(opt->obj, NULL, &min_h); _sizing_eval(opt->obj); evas_object_geometry_get(opt->obj, NULL, NULL, &child_w, &child_h); new_w = child_w; new_h = child_h; _layout_set_offset_and_expand_dimension_space_max_bounded (child_w, &new_w, w, max_w, &off_x, align_x, padding_l, padding_r); _layout_set_offset_and_change_dimension_min_max_cell_bounded (child_h, &new_h, min_h, max_h, cell_sz, &off_y, align_y, padding_t, padding_b); if ((new_w != child_w) || (new_h != child_h)) evas_object_resize(opt->obj, new_w, new_h); evas_object_move(opt->obj, x + off_x, y + off_y); y += cell_sz + priv->pad.v; sub_pixel += inc; if (sub_pixel >= 1 << 16) { y++; sub_pixel -= 1 << 16; } } evas_object_size_hint_min_set(o, w, h); } EAPI void evas_object_box_layout_homogeneous_max_size_horizontal(Evas_Object *o, Evas_Object_Box_Data *priv, void *data __UNUSED__) { int remaining, global_pad, pad_inc = 0, sub_pixel = 0; int cell_sz = 0; int x, y, w, h; int top_h = 0; int n_children; Evas_Object_Box_Option *opt; Eina_List *l; n_children = eina_list_count(priv->children); if (!n_children) { evas_object_size_hint_min_set(o, 0, 0); return; } evas_object_geometry_get(o, &x, &y, &w, &h); EINA_LIST_FOREACH(priv->children, l, opt) { int child_w, padding_l, padding_r; _sizing_eval(opt->obj); evas_object_size_hint_padding_get (opt->obj, &padding_l, &padding_r, NULL, NULL); evas_object_geometry_get(opt->obj, NULL, NULL, &child_w, NULL); if (child_w + padding_l + padding_r > cell_sz) cell_sz = child_w + padding_l + padding_r; } global_pad = priv->pad.h; remaining = w - n_children * cell_sz - global_pad * (n_children - 1); if (priv->align.h >= 0.0) x += remaining * priv->align.h; else if (n_children == 1) x += remaining / 2; else { /* justified */ _fixed_point_divide_and_decompose_integer (remaining, n_children - 1, &global_pad, &pad_inc); global_pad += priv->pad.h; } EINA_LIST_FOREACH(priv->children, l, opt) { int child_w, child_h, min_w, max_w, max_h, new_w, new_h, off_x, off_y; int padding_l, padding_r, padding_t, padding_b; double align_x, align_y; evas_object_size_hint_align_get(opt->obj, &align_x, &align_y); evas_object_size_hint_padding_get (opt->obj, &padding_l, &padding_r, &padding_t, &padding_b); evas_object_size_hint_max_get(opt->obj, &max_w, &max_h); evas_object_size_hint_min_get(opt->obj, &min_w, NULL); evas_object_geometry_get(opt->obj, NULL, NULL, &child_w, &child_h); new_w = child_w; new_h = child_h; if (new_h > top_h) top_h = new_h; _layout_set_offset_and_expand_dimension_space_max_bounded (child_h, &new_h, h, max_h, &off_y, align_y, padding_t, padding_b); _layout_set_offset_and_change_dimension_min_max_cell_bounded (child_w, &new_w, min_w, max_w, cell_sz, &off_x, align_x, padding_l, padding_r); if ((new_w != child_w) || (new_h != child_h)) evas_object_resize(opt->obj, new_w, new_h); evas_object_move(opt->obj, x + off_x, y + off_y); x += cell_sz + global_pad; sub_pixel += pad_inc; if (sub_pixel >= 1 << 16) { x++; sub_pixel -= 1 << 16; } } evas_object_size_hint_min_set(o, x, top_h); } EAPI void evas_object_box_layout_homogeneous_max_size_vertical(Evas_Object *o, Evas_Object_Box_Data *priv, void *data __UNUSED__) { int remaining, global_pad, pad_inc = 0, sub_pixel = 0; int cell_sz = 0; int x, y, w, h; int top_w = 0; int n_children; Evas_Object_Box_Option *opt; Eina_List *l; n_children = eina_list_count(priv->children); if (!n_children) { evas_object_size_hint_min_set(o, 0, 0); return; } evas_object_geometry_get(o, &x, &y, &w, &h); EINA_LIST_FOREACH(priv->children, l, opt) { int child_h, padding_t, padding_b; _sizing_eval(opt->obj); evas_object_size_hint_padding_get (opt->obj, NULL, NULL, &padding_t, &padding_b); evas_object_geometry_get(opt->obj, NULL, NULL, NULL, &child_h); if (child_h + padding_t + padding_b > cell_sz) cell_sz = child_h + padding_t + padding_b; } global_pad = priv->pad.v; remaining = h - n_children * cell_sz - global_pad * (n_children - 1); if (priv->align.v >= 0.0) y += remaining * priv->align.v; else if (n_children == 1) y += remaining / 2; else { /* justified */ _fixed_point_divide_and_decompose_integer (remaining, n_children - 1, &global_pad, &pad_inc); global_pad += priv->pad.v; } EINA_LIST_FOREACH(priv->children, l, opt) { int child_w, child_h, max_h, min_h, max_w, new_w, new_h, off_x, off_y; int padding_l, padding_r, padding_t, padding_b; double align_x, align_y; evas_object_size_hint_align_get(opt->obj, &align_x, &align_y); evas_object_size_hint_padding_get (opt->obj, &padding_l, &padding_r, &padding_t, &padding_b); evas_object_size_hint_max_get(opt->obj, &max_w, &max_h); evas_object_size_hint_min_get(opt->obj, NULL, &min_h); evas_object_geometry_get(opt->obj, NULL, NULL, &child_w, &child_h); new_w = child_w; new_h = child_h; if (new_w > top_w) top_w = new_w; _layout_set_offset_and_expand_dimension_space_max_bounded (child_w, &new_w, w, max_w, &off_x, align_x, padding_l, padding_r); _layout_set_offset_and_change_dimension_min_max_cell_bounded (child_h, &new_h, min_h, max_h, cell_sz, &off_y, align_y, padding_t, padding_b); if ((new_w != child_w) || (new_h != child_h)) evas_object_resize(opt->obj, new_w, new_h); evas_object_move(opt->obj, x + off_x, y + off_y); y += cell_sz + global_pad; sub_pixel += pad_inc; if (sub_pixel >= 1 << 16) { y++; sub_pixel -= 1 << 16; } } evas_object_size_hint_min_set(o, top_w, y); } static void _evas_object_box_layout_flow_horizontal_row_info_collect(Evas_Object_Box_Data *priv, int box_w, int *row_count, int *row_max_h, int *row_break, int *row_width, int *off_y_ret, int *max_h_ret) { int i, remain_w = box_w, start_i = 0; int off_y = 0, max_h = 0, n_rows = 0; Eina_List *l; for (i = 0, l = priv->children; l; i++, l = l->next) { Evas_Object_Box_Option *opt = l->data; int padding_l, padding_r, padding_t, padding_b; int child_w, child_h, off_x = 0; evas_object_size_hint_padding_get (opt->obj, &padding_l, &padding_r, &padding_t, &padding_b); _sizing_eval(opt->obj); evas_object_geometry_get(opt->obj, NULL, NULL, &child_w, &child_h); child_w += padding_l + padding_r + priv->pad.h; child_h += padding_t + padding_b; remain_w -= child_w; if (remain_w + priv->pad.h >= 0) { /* continue "line" */ if (child_h > max_h) max_h = child_h; off_x += child_w; row_width[n_rows] += child_w; } else { /* break line */ if (i == start_i) { /* obj goes to actual line */ max_h = child_h; row_width[n_rows] = child_w; } else { /* obj goes to next line */ row_max_h[n_rows] = max_h; row_break[n_rows] = i - 1; n_rows++; off_x = child_w; off_y += max_h; max_h = child_h; row_width[n_rows] = child_w; start_i = i; remain_w = box_w - off_x; } } } row_break[n_rows] = i - 1; row_max_h[n_rows] = max_h; *row_count = n_rows; *off_y_ret = off_y; *max_h_ret = max_h; } EAPI void evas_object_box_layout_flow_horizontal(Evas_Object *o, Evas_Object_Box_Data *priv, void *data __UNUSED__) { int n_children; int r, row_count = 0; int min_w = 0, min_h = 0; int max_h, inc_y; int remain_y, i; int x, y, w, h; Eina_List *l; int *row_max_h; int *row_break; int *row_width; int offset_y; n_children = eina_list_count(priv->children); if (!n_children) { evas_object_size_hint_min_set(o, 0, 0); return; } /* *per row* arrays */ row_max_h = (int *)alloca(sizeof(int) * n_children); row_break = (int *)alloca(sizeof(int) * n_children); row_width = (int *)alloca(sizeof(int) * n_children); memset(row_width, 0, sizeof(int) * n_children); evas_object_geometry_get(o, &x, &y, &w, &h); _evas_object_box_layout_flow_horizontal_row_info_collect (priv, w, &row_count, row_max_h, row_break, row_width, &offset_y, &max_h); inc_y = 0; remain_y = h - (offset_y + max_h); if (remain_y > 0) { if (priv->align.v >= 0.0) inc_y = priv->align.v * remain_y; else if (row_count == 0) y += remain_y / 2; else /* y-justified */ inc_y = remain_y / row_count; } inc_y += priv->pad.v; for (i = 0, r = 0, l = priv->children; r <= row_count; r++) { int row_justify = 0, just_inc = 0, sub_pixel = 0; int row_size, remain_x; row_size = row_break[r] - i; remain_x = (w - row_width[r]); if (priv->align.h < 0.0) { if (row_size == 0) x += remain_x / 2; else _fixed_point_divide_and_decompose_integer (remain_x, row_size, &row_justify, &just_inc); } row_justify += priv->pad.h; for (; i <= row_break[r]; i++, l = l->next) { Evas_Object_Box_Option *opt = l->data; int off_x, off_y, y_remain; int padding_l, padding_r; int child_w, child_h; double align_y; evas_object_size_hint_align_get(opt->obj, NULL, &align_y); evas_object_size_hint_padding_get (opt->obj, &padding_l, &padding_r, NULL, NULL); evas_object_geometry_get (opt->obj, NULL, NULL, &child_w, &child_h); y_remain = row_max_h[r] - child_h; off_x = padding_l; if (priv->align.h >= 0.0) off_x += remain_x * priv->align.h; off_y = y_remain * align_y; evas_object_move(opt->obj, x + off_x, y + off_y); x += child_w + padding_l + padding_r + row_justify; sub_pixel += just_inc; if (sub_pixel >= 1 << 16) { x++; sub_pixel -= 1 << 16; } } evas_object_geometry_get(o, &x, NULL, NULL, NULL); if (min_w < row_width[r]) min_w = row_width[r]; min_h += row_max_h[r]; y += row_max_h[r] + inc_y; } evas_object_size_hint_min_set(o, min_w, min_h); } static void _evas_object_box_layout_flow_vertical_col_info_collect(Evas_Object_Box_Data *priv, int box_h, int *col_count, int *col_max_w, int *col_break, int *col_height, int *off_x_ret, int *max_w_ret) { int i, remain_h = box_h, start_i = 0; int off_x = 0, max_w = 0, n_cols = 0; Eina_List *l; for (i = 0, l = priv->children; l; i++, l = l->next) { Evas_Object_Box_Option *opt = l->data; int padding_l, padding_r, padding_t, padding_b; int child_w, child_h, off_y = 0; evas_object_size_hint_padding_get (opt->obj, &padding_l, &padding_r, &padding_t, &padding_b); _sizing_eval(opt->obj); evas_object_geometry_get(opt->obj, NULL, NULL, &child_w, &child_h); child_w += padding_l + padding_r; child_h += padding_t + padding_b + priv->pad.v; remain_h -= child_h; if (remain_h + priv->pad.v >= 0) { /* continue "col" */ if (child_w > max_w) max_w = child_w; off_y += child_h; col_height[n_cols] += child_h; } else { /* break col */ if (i == start_i) { /* obj goes to actual col */ max_w = child_w; col_height[n_cols] = child_h; } else { /* obj goes to next col */ col_max_w[n_cols] = max_w; col_break[n_cols] = i - 1; n_cols++; off_x += max_w; off_y = child_h; max_w = child_w; col_height[n_cols] = child_h; start_i = i; remain_h = box_h - off_y; } } } col_break[n_cols] = i - 1; col_max_w[n_cols] = max_w; *col_count = n_cols; *off_x_ret = off_x; *max_w_ret = max_w; } EAPI void evas_object_box_layout_flow_vertical(Evas_Object *o, Evas_Object_Box_Data *priv, void *data __UNUSED__) { int n_children; int c, col_count; int min_w = 0, min_h = 0; int max_w, inc_x; int remain_x, i; int x, y, w, h; Eina_List *l; int *col_max_w; int *col_break; int *col_height; int offset_x; n_children = eina_list_count(priv->children); if (!n_children) { evas_object_size_hint_min_set(o, 0, 0); return; } /* *per col* arrays */ col_max_w = (int *)alloca(sizeof(int) * n_children); col_break = (int *)alloca(sizeof(int) * n_children); col_height = (int *)alloca(sizeof(int) * n_children); memset(col_height, 0, sizeof(int) * n_children); evas_object_geometry_get(o, &x, &y, &w, &h); _evas_object_box_layout_flow_vertical_col_info_collect (priv, h, &col_count, col_max_w, col_break, col_height, &offset_x, &max_w); inc_x = 0; remain_x = w - (offset_x + max_w); if (remain_x > 0) { if (priv->align.h >= 0) inc_x = priv->align.h * remain_x; else if (col_count == 0) x += remain_x / 2; else /* x-justified */ inc_x = remain_x / col_count; } inc_x += priv->pad.h; for (i = 0, c = 0, l = priv->children; c <= col_count; c++) { int col_justify = 0, just_inc = 0, sub_pixel = 0; int col_size, remain_y; col_size = col_break[c] - i; remain_y = (h - col_height[c]); if (priv->align.v < 0.0) { if (col_size == 0) y += remain_y / 2; else _fixed_point_divide_and_decompose_integer (remain_y, col_size, &col_justify, &just_inc); } col_justify += priv->pad.v; for (; i <= col_break[c]; i++, l = l->next) { Evas_Object_Box_Option *opt = l->data; int off_x, off_y, x_remain; int padding_t, padding_b; int child_w, child_h; double align_x; evas_object_size_hint_align_get(opt->obj, &align_x, NULL); evas_object_size_hint_padding_get (opt->obj, NULL, NULL, &padding_t, &padding_b); evas_object_geometry_get (opt->obj, NULL, NULL, &child_w, &child_h); x_remain = col_max_w[c] - child_w; off_x = x_remain * align_x; off_y = padding_t; if (priv->align.v >= 0.0) off_y += remain_y * priv->align.v; evas_object_move(opt->obj, x + off_x, y + off_y); y += child_h + padding_t + padding_b + col_justify; sub_pixel += just_inc; if (sub_pixel >= 1 << 16) { y++; sub_pixel -= 1 << 16; } } evas_object_geometry_get(o, NULL, &y, NULL, NULL); min_w += col_max_w[c]; if (min_h < col_height[c]) min_h = col_height[c]; x += col_max_w[c] + inc_x; } evas_object_size_hint_min_set(o, min_w, min_h); } EAPI void evas_object_box_layout_stack(Evas_Object *o, Evas_Object_Box_Data *priv, void *data __UNUSED__) { Eina_List *l; Evas_Coord ox, oy, ow, oh; Evas_Coord top_w = 0, top_h = 0; Evas_Object_Box_Option *opt; Evas_Object *old_child = NULL; evas_object_geometry_get(o, &ox, &oy, &ow, &oh); EINA_LIST_FOREACH(priv->children, l, opt) { Evas_Object *child = opt->obj; Evas_Coord max_w, max_h, min_w, min_h, pad_l, pad_r, pad_t, pad_b, child_w, child_h, new_w, new_h, off_x, off_y; double align_x, align_y; evas_object_size_hint_align_get(child, &align_x, &align_y); evas_object_size_hint_padding_get (child, &pad_l, &pad_r, &pad_t, &pad_b); evas_object_size_hint_max_get(child, &max_w, &max_h); evas_object_size_hint_min_get(child, &min_w, &min_h); _sizing_eval(opt->obj); evas_object_geometry_get(child, NULL, NULL, &child_w, &child_h); new_w = child_w; new_h = child_h; if (new_w > top_w) top_w = new_w; if (new_h > top_h) top_h = new_h; _layout_set_offset_and_change_dimension_min_max_cell_bounded (child_w, &new_w, min_w, max_w, ow, &off_x, align_x, pad_l, pad_r); _layout_set_offset_and_change_dimension_min_max_cell_bounded (child_h, &new_h, min_h, max_h, oh, &off_y, align_y, pad_t, pad_b); if ((new_w != child_w) || (new_h != child_h)) evas_object_resize(child, new_w, new_h); evas_object_move(child, ox + off_x, oy + off_y); if (old_child) evas_object_stack_above(child, old_child); old_child = child; } evas_object_size_hint_min_set(o, top_w, top_h); } EAPI void evas_object_box_align_set(Evas_Object *o, double horizontal, double vertical) { EVAS_OBJECT_BOX_DATA_GET_OR_RETURN(o, priv); if (priv->align.h == horizontal && priv->align.v == vertical) return; priv->align.h = horizontal; priv->align.v = vertical; evas_object_smart_changed(o); } EAPI void evas_object_box_align_get(const Evas_Object *o, double *horizontal, double *vertical) { EVAS_OBJECT_BOX_DATA_GET(o, priv); if (priv) { if (horizontal) *horizontal = priv->align.h; if (vertical) *vertical = priv->align.v; } else { if (horizontal) *horizontal = 0.5; if (vertical) *vertical = 0.5; } } EAPI void evas_object_box_padding_set(Evas_Object *o, Evas_Coord horizontal, Evas_Coord vertical) { EVAS_OBJECT_BOX_DATA_GET_OR_RETURN(o, priv); if (priv->pad.h == horizontal && priv->pad.v == vertical) return; priv->pad.h = horizontal; priv->pad.v = vertical; evas_object_smart_changed(o); } EAPI void evas_object_box_padding_get(const Evas_Object *o, Evas_Coord *horizontal, Evas_Coord *vertical) { EVAS_OBJECT_BOX_DATA_GET(o, priv); if (priv) { if (horizontal) *horizontal = priv->pad.h; if (vertical) *vertical = priv->pad.v; } else { if (horizontal) *horizontal = 0; if (vertical) *vertical = 0; } } EAPI Evas_Object_Box_Option * evas_object_box_append(Evas_Object *o, Evas_Object *child) { Evas_Object_Box_Option *opt; const Evas_Object_Box_Api *api; EVAS_OBJECT_BOX_DATA_GET_OR_RETURN_VAL(o, priv, 0); if (!child) return NULL; api = priv->api; if ((!api) || (!api->append)) return NULL; opt = api->append(o, priv, child); if (opt) { evas_object_smart_member_add(child, o); evas_object_smart_changed(o); return _evas_object_box_option_callbacks_register(o, priv, opt); } return NULL; } EAPI Evas_Object_Box_Option * evas_object_box_prepend(Evas_Object *o, Evas_Object *child) { Evas_Object_Box_Option *opt; const Evas_Object_Box_Api *api; EVAS_OBJECT_BOX_DATA_GET_OR_RETURN_VAL(o, priv, 0); if (!child) return NULL; api = priv->api; if ((!api) || (!api->prepend)) return NULL; opt = api->prepend(o, priv, child); if (opt) { evas_object_smart_member_add(child, o); evas_object_smart_changed(o); return _evas_object_box_option_callbacks_register(o, priv, opt); } return NULL; } EAPI Evas_Object_Box_Option * evas_object_box_insert_before(Evas_Object *o, Evas_Object *child, const Evas_Object *reference) { Evas_Object_Box_Option *opt; const Evas_Object_Box_Api *api; EVAS_OBJECT_BOX_DATA_GET_OR_RETURN_VAL(o, priv, 0); if (!child) return NULL; api = priv->api; if ((!api) || (!api->insert_before)) return NULL; opt = api->insert_before(o, priv, child, reference); if (opt) { evas_object_smart_member_add(child, o); evas_object_smart_changed(o); return _evas_object_box_option_callbacks_register(o, priv, opt); } return NULL; } EAPI Evas_Object_Box_Option * evas_object_box_insert_after(Evas_Object *o, Evas_Object *child, const Evas_Object *reference) { Evas_Object_Box_Option *opt; const Evas_Object_Box_Api *api; EVAS_OBJECT_BOX_DATA_GET_OR_RETURN_VAL(o, priv, NULL); if (!child) return NULL; api = priv->api; if ((!api) || (!api->insert_after)) return NULL; opt = api->insert_after(o, priv, child, reference); if (opt) { evas_object_smart_member_add(child, o); evas_object_smart_changed(o); return _evas_object_box_option_callbacks_register(o, priv, opt); } return NULL; } EAPI Evas_Object_Box_Option * evas_object_box_insert_at(Evas_Object *o, Evas_Object *child, unsigned int pos) { Evas_Object_Box_Option *opt; const Evas_Object_Box_Api *api; EVAS_OBJECT_BOX_DATA_GET_OR_RETURN_VAL(o, priv, 0); if (!child) return NULL; api = priv->api; if ((!api) || (!api->insert_at)) return NULL; opt = api->insert_at(o, priv, child, pos); if (opt) { evas_object_smart_member_add(child, o); evas_object_smart_changed(o); return _evas_object_box_option_callbacks_register(o, priv, opt); } return NULL; } EAPI Eina_Bool evas_object_box_remove(Evas_Object *o, Evas_Object *child) { const Evas_Object_Box_Api *api; Evas_Object *obj; EVAS_OBJECT_BOX_DATA_GET_OR_RETURN_VAL(o, priv, 0); if (!child) return EINA_FALSE; api = priv->api; if ((!api) || (!api->remove)) return 0; obj = api->remove(o, priv, child); if (obj) { _evas_object_box_child_callbacks_unregister(obj); evas_object_smart_member_del(obj); evas_object_smart_changed(o); return EINA_TRUE; } return EINA_FALSE; } EAPI Eina_Bool evas_object_box_remove_at(Evas_Object *o, unsigned int pos) { const Evas_Object_Box_Api *api; Evas_Object *obj; EVAS_OBJECT_BOX_DATA_GET_OR_RETURN_VAL(o, priv, 0); api = priv->api; if ((!api) || (!api->remove_at)) return EINA_FALSE; obj = api->remove_at(o, priv, pos); if (obj) { _evas_object_box_child_callbacks_unregister(obj); evas_object_smart_member_del(obj); evas_object_smart_changed(o); return EINA_TRUE; } return EINA_FALSE; } EAPI Eina_Bool evas_object_box_remove_all(Evas_Object *o, Eina_Bool clear) { const Evas_Object_Box_Api *api; EVAS_OBJECT_BOX_DATA_GET_OR_RETURN_VAL(o, priv, 0); api = priv->api; if ((!api) || (!api->remove)) return EINA_FALSE; evas_object_smart_changed(o); while (priv->children) { Evas_Object_Box_Option *opt = priv->children->data; Evas_Object *obj; obj = api->remove(o, priv, opt->obj); if (obj) { _evas_object_box_child_callbacks_unregister(obj); evas_object_smart_member_del(obj); if (clear) evas_object_del(obj); } else return EINA_FALSE; } return EINA_TRUE; } EAPI Eina_Iterator * evas_object_box_iterator_new(const Evas_Object *o) { Evas_Object_Box_Iterator *it; EVAS_OBJECT_BOX_DATA_GET_OR_RETURN_VAL(o, priv, NULL); if (!priv->children) return NULL; it = calloc(1, sizeof(Evas_Object_Box_Iterator)); if (!it) return NULL; EINA_MAGIC_SET(&it->iterator, EINA_MAGIC_ITERATOR); it->real_iterator = eina_list_iterator_new(priv->children); it->box = o; it->iterator.next = FUNC_ITERATOR_NEXT(_evas_object_box_iterator_next); it->iterator.get_container = FUNC_ITERATOR_GET_CONTAINER(_evas_object_box_iterator_get_container); it->iterator.free = FUNC_ITERATOR_FREE(_evas_object_box_iterator_free); return &it->iterator; } EAPI Eina_Accessor * evas_object_box_accessor_new(const Evas_Object *o) { Evas_Object_Box_Accessor *it; EVAS_OBJECT_BOX_DATA_GET_OR_RETURN_VAL(o, priv, NULL); if (!priv->children) return NULL; it = calloc(1, sizeof(Evas_Object_Box_Accessor)); if (!it) return NULL; EINA_MAGIC_SET(&it->accessor, EINA_MAGIC_ACCESSOR); it->real_accessor = eina_list_accessor_new(priv->children); it->box = o; it->accessor.get_at = FUNC_ACCESSOR_GET_AT(_evas_object_box_accessor_get_at); it->accessor.get_container = FUNC_ACCESSOR_GET_CONTAINER(_evas_object_box_accessor_get_container); it->accessor.free = FUNC_ACCESSOR_FREE(_evas_object_box_accessor_free); return &it->accessor; } EAPI Eina_List * evas_object_box_children_get(const Evas_Object *o) { Eina_List *new_list = NULL, *l; Evas_Object_Box_Option *opt; EVAS_OBJECT_BOX_DATA_GET_OR_RETURN_VAL(o, priv, NULL); EINA_LIST_FOREACH(priv->children, l, opt) new_list = eina_list_append(new_list, opt->obj); return new_list; } EAPI const char * evas_object_box_option_property_name_get(const Evas_Object *o, int property) { const Evas_Object_Box_Api *api; EVAS_OBJECT_BOX_DATA_GET_OR_RETURN_VAL(o, priv, NULL); if (property < 0) return NULL; api = priv->api; if ((!api) || (!api->property_name_get)) return NULL; return api->property_name_get(o, property); } EAPI int evas_object_box_option_property_id_get(const Evas_Object *o, const char *name) { const Evas_Object_Box_Api *api; EVAS_OBJECT_BOX_DATA_GET_OR_RETURN_VAL(o, priv, -1); if (!name) return -1; api = priv->api; if ((!api) || (!api->property_id_get)) return -1; return api->property_id_get(o, name); } EAPI Eina_Bool evas_object_box_option_property_set(Evas_Object *o, Evas_Object_Box_Option *opt, int property, ...) { Eina_Bool ret; va_list args; va_start(args, property); ret = evas_object_box_option_property_vset(o, opt, property, args); va_end(args); return ret; } EAPI Eina_Bool evas_object_box_option_property_vset(Evas_Object *o, Evas_Object_Box_Option *opt, int property, va_list args) { const Evas_Object_Box_Api *api; EVAS_OBJECT_BOX_DATA_GET_OR_RETURN_VAL(o, priv, 0); if (!opt) return EINA_FALSE; api = priv->api; if ((!api) || (!api->property_set)) return EINA_FALSE; if (!api->property_set(o, opt, property, args)) return EINA_FALSE; evas_object_smart_changed(o); return EINA_TRUE; } EAPI Eina_Bool evas_object_box_option_property_get(const Evas_Object *o, Evas_Object_Box_Option *opt, int property, ...) { Eina_Bool ret; va_list args; va_start(args, property); ret = evas_object_box_option_property_vget(o, opt, property, args); va_end(args); return ret; } EAPI Eina_Bool evas_object_box_option_property_vget(const Evas_Object *o, Evas_Object_Box_Option *opt, int property, va_list args) { const Evas_Object_Box_Api *api; EVAS_OBJECT_BOX_DATA_GET_OR_RETURN_VAL(o, priv, 0); if (!opt) return EINA_FALSE; api = priv->api; if ((!api) || (!api->property_get)) return EINA_FALSE; return api->property_get(o, opt, property, args); } evas-1.7.9/src/lib/canvas/evas_stack.c0000664000175000017500000003003012175475547014525 00000000000000#include "evas_common.h" #include "evas_private.h" static Evas_Object * evas_object_above_get_internal(const Evas_Object *obj) { if ((EINA_INLIST_GET(obj))->next) return (Evas_Object *)((EINA_INLIST_GET(obj))->next); else { if ((EINA_INLIST_GET(((Evas_Object*)(obj))->layer))->next) { Evas_Layer *l; l = (Evas_Layer *)((EINA_INLIST_GET((((Evas_Object *)obj)->layer)))->next); return l->objects; } } return NULL; } static Evas_Object * evas_object_below_get_internal(const Evas_Object *obj) { if ((EINA_INLIST_GET(obj))->prev) return (Evas_Object *)((EINA_INLIST_GET(obj))->prev); else { if ((EINA_INLIST_GET((((Evas_Object *)obj)->layer)))->prev) { Evas_Layer *l; l = (Evas_Layer *)((EINA_INLIST_GET((((Evas_Object *)obj)->layer)))->prev); return (Evas_Object *)((EINA_INLIST_GET((l->objects)))->last); } } return NULL; } EAPI void evas_object_raise(Evas_Object *obj) { MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); if (evas_object_intercept_call_raise(obj)) return; if (!((EINA_INLIST_GET(obj))->next)) { evas_object_inform_call_restack(obj); return; } if (obj->smart.parent) evas_object_smart_member_raise(obj); else { if (obj->in_layer) obj->layer->objects = (Evas_Object *)eina_inlist_demote(EINA_INLIST_GET(obj->layer->objects), EINA_INLIST_GET(obj)); } if (obj->clip.clipees) { evas_object_inform_call_restack(obj); return; } if (obj->layer) evas_render_invalidate(obj->layer->evas); obj->restack = EINA_TRUE; evas_object_change(obj); evas_object_inform_call_restack(obj); if (obj->layer->evas->events_frozen > 0) return; if ((!evas_event_passes_through(obj)) && (!evas_event_freezes_through(obj))) { if (!obj->smart.smart) { if (evas_object_is_in_output_rect(obj, obj->layer->evas->pointer.x, obj->layer->evas->pointer.y, 1, 1) && obj->cur.visible) evas_event_feed_mouse_move(obj->layer->evas, obj->layer->evas->pointer.x, obj->layer->evas->pointer.y, obj->layer->evas->last_timestamp, NULL); } } } EAPI void evas_object_lower(Evas_Object *obj) { MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); if (evas_object_intercept_call_lower(obj)) return; if (!((EINA_INLIST_GET(obj))->prev)) { evas_object_inform_call_restack(obj); return; } if (obj->smart.parent) evas_object_smart_member_lower(obj); else { if (obj->in_layer) obj->layer->objects = (Evas_Object *)eina_inlist_promote(EINA_INLIST_GET(obj->layer->objects), EINA_INLIST_GET(obj)); } if (obj->clip.clipees) { evas_object_inform_call_restack(obj); return; } if (obj->layer) evas_render_invalidate(obj->layer->evas); obj->restack = EINA_TRUE; evas_object_change(obj); evas_object_inform_call_restack(obj); if (obj->layer->evas->events_frozen > 0) return; if ((!evas_event_passes_through(obj)) && (!evas_event_freezes_through(obj))) { if (!obj->smart.smart) { if (evas_object_is_in_output_rect(obj, obj->layer->evas->pointer.x, obj->layer->evas->pointer.y, 1, 1) && obj->cur.visible) evas_event_feed_mouse_move(obj->layer->evas, obj->layer->evas->pointer.x, obj->layer->evas->pointer.y, obj->layer->evas->last_timestamp, NULL); } } } EAPI void evas_object_stack_above(Evas_Object *obj, Evas_Object *above) { MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); MAGIC_CHECK(above, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); if (obj == above) return; if (evas_object_intercept_call_stack_above(obj, above)) return; if (!above) { evas_object_raise(obj); return; } if ((EINA_INLIST_GET(obj))->prev == EINA_INLIST_GET(above)) { evas_object_inform_call_restack(obj); return; } if (obj->smart.parent) { if (obj->smart.parent != above->smart.parent) { ERR("BITCH! evas_object_stack_above(), %p not inside same smart as %p!", obj, above); return; } evas_object_smart_member_stack_above(obj, above); } else { if (above->smart.parent) { ERR("BITCH! evas_object_stack_above(), %p stack above %p, but above has smart parent, obj does not", obj, above); return; } if (obj->layer != above->layer) { ERR("BITCH! evas_object_stack_above(), %p stack above %p, not matching layers", obj, above); return; } if (obj->in_layer) { obj->layer->objects = (Evas_Object *)eina_inlist_remove(EINA_INLIST_GET(obj->layer->objects), EINA_INLIST_GET(obj)); obj->layer->objects = (Evas_Object *)eina_inlist_append_relative(EINA_INLIST_GET(obj->layer->objects), EINA_INLIST_GET(obj), EINA_INLIST_GET(above)); } } if (obj->clip.clipees) { evas_object_inform_call_restack(obj); return; } if (obj->layer) evas_render_invalidate(obj->layer->evas); obj->restack = EINA_TRUE; evas_object_change(obj); evas_object_inform_call_restack(obj); if (obj->layer->evas->events_frozen > 0) return; if ((!evas_event_passes_through(obj)) && (!evas_event_freezes_through(obj))) { if (!obj->smart.smart) { if (evas_object_is_in_output_rect(obj, obj->layer->evas->pointer.x, obj->layer->evas->pointer.y, 1, 1) && obj->cur.visible) evas_event_feed_mouse_move(obj->layer->evas, obj->layer->evas->pointer.x, obj->layer->evas->pointer.y, obj->layer->evas->last_timestamp, NULL); } } } EAPI void evas_object_stack_below(Evas_Object *obj, Evas_Object *below) { MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); MAGIC_CHECK(below, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); if (obj == below) return; if (evas_object_intercept_call_stack_below(obj, below)) return; if (!below) { evas_object_lower(obj); return; } if ((EINA_INLIST_GET(obj))->next == EINA_INLIST_GET(below)) { evas_object_inform_call_restack(obj); return; } if (obj->smart.parent) { if (obj->smart.parent != below->smart.parent) { ERR("BITCH! evas_object_stack_below(), %p not inside same smart as %p!", obj, below); return; } evas_object_smart_member_stack_below(obj, below); } else { if (below->smart.parent) { ERR("BITCH! evas_object_stack_below(), %p stack below %p, but below has smart parent, obj does not", obj, below); return; } if (obj->layer != below->layer) { ERR("BITCH! evas_object_stack_below(), %p stack below %p, not matching layers", obj, below); return; } if (obj->in_layer) { obj->layer->objects = (Evas_Object *)eina_inlist_remove(EINA_INLIST_GET(obj->layer->objects), EINA_INLIST_GET(obj)); obj->layer->objects = (Evas_Object *)eina_inlist_prepend_relative(EINA_INLIST_GET(obj->layer->objects), EINA_INLIST_GET(obj), EINA_INLIST_GET(below)); } } if (obj->clip.clipees) { evas_object_inform_call_restack(obj); return; } if (obj->layer) evas_render_invalidate(obj->layer->evas); obj->restack = EINA_TRUE; evas_object_change(obj); evas_object_inform_call_restack(obj); if (obj->layer->evas->events_frozen > 0) return; if ((!evas_event_passes_through(obj)) && (!evas_event_freezes_through(obj))) { if (!obj->smart.smart) { if (evas_object_is_in_output_rect(obj, obj->layer->evas->pointer.x, obj->layer->evas->pointer.y, 1, 1) && obj->cur.visible) evas_event_feed_mouse_move(obj->layer->evas, obj->layer->evas->pointer.x, obj->layer->evas->pointer.y, obj->layer->evas->last_timestamp, NULL); } } } EAPI Evas_Object * evas_object_above_get(const Evas_Object *obj) { MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return NULL; MAGIC_CHECK_END(); if (obj->smart.parent) { do { obj = (Evas_Object *)((EINA_INLIST_GET(obj))->next); if ((obj) && (!obj->delete_me)) return (Evas_Object *)obj; } while (obj); return NULL; } obj = evas_object_above_get_internal(obj); while (obj) { if (!obj->delete_me) return (Evas_Object *)obj; obj = evas_object_above_get_internal(obj); } return NULL; } EAPI Evas_Object * evas_object_below_get(const Evas_Object *obj) { MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return NULL; MAGIC_CHECK_END(); if (obj->smart.parent) { do { obj = (Evas_Object *)((EINA_INLIST_GET(obj))->prev); if ((obj) && (!obj->delete_me)) return (Evas_Object *)obj; } while (obj); return NULL; } obj = evas_object_below_get_internal(obj); while (obj) { if (!obj->delete_me) return (Evas_Object *)obj; obj = evas_object_below_get_internal(obj); } return NULL; } EAPI Evas_Object * evas_object_bottom_get(const Evas *e) { MAGIC_CHECK(e, Evas, MAGIC_EVAS); return NULL; MAGIC_CHECK_END(); if (e->layers) { Evas_Object *obj; obj = e->layers->objects; while (obj) { if (!obj->delete_me) return obj; obj = evas_object_above_get_internal(obj); } } return NULL; } EAPI Evas_Object * evas_object_top_get(const Evas *e) { Evas_Object *obj = NULL; Eina_Inlist *list; Evas_Layer *layer; MAGIC_CHECK(e, Evas, MAGIC_EVAS); return NULL; MAGIC_CHECK_END(); list = EINA_INLIST_GET(e->layers); if (!list) return NULL; layer = (Evas_Layer *) list->last; if (!layer) return NULL; list = EINA_INLIST_GET(layer->objects); if (!list) return NULL; obj = (Evas_Object *) list->last; if (!obj) return NULL; while (obj) { if (!obj->delete_me) return obj; obj = evas_object_below_get_internal(obj); } return obj; } evas-1.7.9/src/lib/canvas/evas_focus.c0000664000175000017500000000276012175475547014550 00000000000000#include "evas_common.h" #include "evas_private.h" /* private calls */ /* local calls */ /* public calls */ EAPI void evas_object_focus_set(Evas_Object *obj, Eina_Bool focus) { int event_id = 0; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); _evas_object_event_new(); event_id = _evas_event_counter; if (focus) { if (obj->focused) goto end; if (obj->layer->evas->focused) evas_object_focus_set(obj->layer->evas->focused, 0); obj->focused = 1; obj->layer->evas->focused = obj; evas_object_event_callback_call(obj, EVAS_CALLBACK_FOCUS_IN, NULL, event_id); evas_event_callback_call(obj->layer->evas, EVAS_CALLBACK_CANVAS_OBJECT_FOCUS_IN, obj); } else { if (!obj->focused) goto end; obj->focused = 0; obj->layer->evas->focused = NULL; evas_object_event_callback_call(obj, EVAS_CALLBACK_FOCUS_OUT, NULL, event_id); evas_event_callback_call(obj->layer->evas, EVAS_CALLBACK_CANVAS_OBJECT_FOCUS_OUT, obj); } end: _evas_post_event_callback_call(obj->layer->evas); } EAPI Eina_Bool evas_object_focus_get(const Evas_Object *obj) { MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return 0; MAGIC_CHECK_END(); return obj->focused; } EAPI Evas_Object * evas_focus_get(const Evas *e) { MAGIC_CHECK(e, Evas, MAGIC_EVAS); return NULL; MAGIC_CHECK_END(); return e->focused; } evas-1.7.9/src/lib/canvas/evas_object_rectangle.c0000664000175000017500000003043212175475547016720 00000000000000#include "evas_common.h" #include "evas_private.h" /* private magic number for rectangle objects */ static const char o_type[] = "rectangle"; const char *o_rect_type = o_type; /* private struct for rectangle object internal data */ typedef struct _Evas_Object_Rectangle Evas_Object_Rectangle; struct _Evas_Object_Rectangle { DATA32 magic; void *engine_data; }; /* private methods for rectangle objects */ static void evas_object_rectangle_init(Evas_Object *obj); static void *evas_object_rectangle_new(void); static void evas_object_rectangle_render(Evas_Object *obj, void *output, void *context, void *surface, int x, int y); static void evas_object_rectangle_free(Evas_Object *obj); static void evas_object_rectangle_render_pre(Evas_Object *obj); static void evas_object_rectangle_render_post(Evas_Object *obj); static unsigned int evas_object_rectangle_id_get(Evas_Object *obj); static unsigned int evas_object_rectangle_visual_id_get(Evas_Object *obj); static void *evas_object_rectangle_engine_data_get(Evas_Object *obj); static int evas_object_rectangle_is_opaque(Evas_Object *obj); static int evas_object_rectangle_was_opaque(Evas_Object *obj); #if 0 /* usless calls for a rect object. much more useful for images etc. */ static void evas_object_rectangle_store(Evas_Object *obj); static void evas_object_rectangle_unstore(Evas_Object *obj); static int evas_object_rectangle_is_visible(Evas_Object *obj); static int evas_object_rectangle_was_visible(Evas_Object *obj); static int evas_object_rectangle_is_inside(Evas_Object *obj, double x, double y); static int evas_object_rectangle_was_inside(Evas_Object *obj, double x, double y); #endif static const Evas_Object_Func object_func = { /* methods (compulsory) */ evas_object_rectangle_free, evas_object_rectangle_render, evas_object_rectangle_render_pre, evas_object_rectangle_render_post, evas_object_rectangle_id_get, evas_object_rectangle_visual_id_get, evas_object_rectangle_engine_data_get, /* these are optional. NULL = nothing */ NULL, NULL, NULL, NULL, evas_object_rectangle_is_opaque, evas_object_rectangle_was_opaque, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; /* the actual api call to add a rect */ /* it has no other api calls as all properties are standard */ EVAS_MEMPOOL(_mp_obj); EAPI Evas_Object * evas_object_rectangle_add(Evas *e) { Evas_Object *obj; MAGIC_CHECK(e, Evas, MAGIC_EVAS); return NULL; MAGIC_CHECK_END(); obj = evas_object_new(e); evas_object_rectangle_init(obj); evas_object_inject(obj, e); return obj; } /* all nice and private */ static void evas_object_rectangle_init(Evas_Object *obj) { /* alloc image ob, setup methods and default values */ obj->object_data = evas_object_rectangle_new(); /* set up default settings for this kind of object */ obj->cur.color.r = 255; obj->cur.color.g = 255; obj->cur.color.b = 255; obj->cur.color.a = 255; obj->cur.geometry.x = 0; obj->cur.geometry.y = 0; obj->cur.geometry.w = 0; obj->cur.geometry.h = 0; obj->cur.layer = 0; obj->cur.render_op = EVAS_RENDER_BLEND; /* set up object-specific settings */ obj->prev = obj->cur; /* set up methods (compulsory) */ obj->func = &object_func; obj->type = o_type; } static void * evas_object_rectangle_new(void) { Evas_Object_Rectangle *o; /* alloc obj private data */ EVAS_MEMPOOL_INIT(_mp_obj, "evas_object_rectangle", Evas_Object_Rectangle, 16, NULL); o = EVAS_MEMPOOL_ALLOC(_mp_obj, Evas_Object_Rectangle); if (!o) return NULL; EVAS_MEMPOOL_PREP(_mp_obj, o, Evas_Object_Rectangle); o->magic = MAGIC_OBJ_RECTANGLE; return o; } static void evas_object_rectangle_free(Evas_Object *obj) { Evas_Object_Rectangle *o; /* frees private object data. very simple here */ o = (Evas_Object_Rectangle *)(obj->object_data); MAGIC_CHECK(o, Evas_Object_Rectangle, MAGIC_OBJ_RECTANGLE); return; MAGIC_CHECK_END(); /* free obj */ o->magic = 0; EVAS_MEMPOOL_FREE(_mp_obj, o); } static void evas_object_rectangle_render(Evas_Object *obj, void *output, void *context, void *surface, int x, int y) { /* render object to surface with context, and offxet by x,y */ obj->layer->evas->engine.func->context_color_set(output, context, obj->cur.cache.clip.r, obj->cur.cache.clip.g, obj->cur.cache.clip.b, obj->cur.cache.clip.a); obj->layer->evas->engine.func->context_multiplier_unset(output, context); obj->layer->evas->engine.func->context_render_op_set(output, context, obj->cur.render_op); obj->layer->evas->engine.func->rectangle_draw(output, context, surface, obj->cur.geometry.x + x, obj->cur.geometry.y + y, obj->cur.geometry.w, obj->cur.geometry.h); //// obj->cur.cache.geometry.x + x, //// obj->cur.cache.geometry.y + y, //// obj->cur.cache.geometry.w, //// obj->cur.cache.geometry.h); } static void evas_object_rectangle_render_pre(Evas_Object *obj) { int is_v, was_v; /* dont pre-render the obj twice! */ if (obj->pre_render_done) return; obj->pre_render_done = 1; /* pre-render phase. this does anything an object needs to do just before */ /* rendering. this could mean loading the image data, retrieving it from */ /* elsewhere, decoding video etc. */ /* then when this is done the object needs to figure if it changed and */ /* if so what and where and add the appropriate redraw rectangles */ /* if someone is clipping this obj - go calculate the clipper */ if (obj->cur.clipper) { if (obj->cur.cache.clip.dirty) evas_object_clip_recalc(obj->cur.clipper); obj->cur.clipper->func->render_pre(obj->cur.clipper); } /* now figure what changed and add draw rects */ /* if it just became visible or invisible */ is_v = evas_object_is_visible(obj); was_v = evas_object_was_visible(obj); if (!(is_v | was_v)) goto done; if (is_v != was_v) { evas_object_render_pre_visible_change(&obj->layer->evas->clip_changes, obj, is_v, was_v); goto done; } if (obj->changed_map) { evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, obj); goto done; } /* it's not visible - we accounted for it appearing or not so just abort */ if (!is_v) goto done; /* clipper changed this is in addition to anything else for obj */ evas_object_render_pre_clipper_change(&obj->layer->evas->clip_changes, obj); /* if we restacked (layer or just within a layer) and don't clip anyone */ if ((obj->restack) && (!obj->clip.clipees)) { evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, obj); goto done; } /* if it changed render op */ if (obj->cur.render_op != obj->prev.render_op) { evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, obj); goto done; } /* if it changed color */ if ((obj->cur.color.r != obj->prev.color.r) || (obj->cur.color.g != obj->prev.color.g) || (obj->cur.color.b != obj->prev.color.b) || (obj->cur.color.a != obj->prev.color.a)) { evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, obj); goto done; } /* if it changed geometry - and obviously not visibility or color */ /* calculate differences since we have a constant color fill */ /* we really only need to update the differences */ if ((obj->cur.geometry.x != obj->prev.geometry.x) || (obj->cur.geometry.y != obj->prev.geometry.y) || (obj->cur.geometry.w != obj->prev.geometry.w) || (obj->cur.geometry.h != obj->prev.geometry.h)) { evas_rects_return_difference_rects(&obj->layer->evas->clip_changes, obj->cur.geometry.x, obj->cur.geometry.y, obj->cur.geometry.w, obj->cur.geometry.h, obj->prev.geometry.x, obj->prev.geometry.y, obj->prev.geometry.w, obj->prev.geometry.h); //// rl = evas_rects_return_difference_rects(obj->cur.cache.geometry.x, //// obj->cur.cache.geometry.y, //// obj->cur.cache.geometry.w, //// obj->cur.cache.geometry.h, //// obj->prev.cache.geometry.x, //// obj->prev.cache.geometry.y, //// obj->prev.cache.geometry.w, //// obj->prev.cache.geometry.h); goto done; } /* it obviously didn't change - add a NO obscure - this "unupdates" this */ /* area so if there were updates for it they get wiped. don't do it if we */ /* arent fully opaque and we are visible */ /* if (evas_object_is_visible(obj) && evas_object_is_opaque(obj) && (!obj->clip.clipees)) obj->layer->evas->engine.func->output_redraws_rect_del(obj->layer->evas->engine.data.output, obj->cur.cache.clip.x, obj->cur.cache.clip.y, obj->cur.cache.clip.w, obj->cur.cache.clip.h); */ done: evas_object_render_pre_effect_updates(&obj->layer->evas->clip_changes, obj, is_v, was_v); } static void evas_object_rectangle_render_post(Evas_Object *obj) { /* this moves the current data to the previous state parts of the object */ /* in whatever way is safest for the object. also if we don't need object */ /* data anymore we can free it if the object deems this is a good idea */ /* remove those pesky changes */ evas_object_clip_changes_clean(obj); /* move cur to prev safely for object data */ evas_object_cur_prev(obj); } static int evas_object_rectangle_is_opaque(Evas_Object *obj) { /* this returns 1 if the internal object data implies that the object is */ /* currently fully opaque over the entire rectangle it occupies */ if ((obj->cur.map) && (obj->cur.usemap)) return 0; if (obj->cur.render_op == EVAS_RENDER_COPY) return 1; if (obj->cur.render_op != EVAS_RENDER_BLEND) return 0; return 1; } static int evas_object_rectangle_was_opaque(Evas_Object *obj) { /* this returns 1 if the internal object data implies that the object was */ /* previously fully opaque over the entire rectangle it occupies */ if (obj->prev.render_op == EVAS_RENDER_COPY) return 1; if (obj->prev.render_op != EVAS_RENDER_BLEND) return 0; return 1; } static unsigned int evas_object_rectangle_id_get(Evas_Object *obj) { Evas_Object_Rectangle *o; o = (Evas_Object_Rectangle *)(obj->object_data); if (!o) return 0; return MAGIC_OBJ_RECTANGLE; } static unsigned int evas_object_rectangle_visual_id_get(Evas_Object *obj) { Evas_Object_Rectangle *o; o = (Evas_Object_Rectangle *)(obj->object_data); if (!o) return 0; return MAGIC_OBJ_SHAPE; } static void *evas_object_rectangle_engine_data_get(Evas_Object *obj) { Evas_Object_Rectangle *o; o = (Evas_Object_Rectangle *)(obj->object_data); if (!o) return NULL; return o->engine_data; } #if 0 /* usless calls for a rect object. much more useful for images etc. */ static void evas_object_rectangle_store(Evas_Object *obj) { /* store... nothing for rectangle objects... it's a bit silly */ /* but for others that may have expensive caluclations to do to */ /* generate the object data, hint that they might want to be pre-calced */ /* once and stored */ } static void evas_object_rectangle_unstore(Evas_Object *obj) { /* store... nothing for rectangle objects... it's a bit silly */ } static int evas_object_rectangle_is_visible(Evas_Object *obj) { /* this returns 1 if the internal object data would imply that it is */ /* visible (ie drawing it draws something. this is not to do with events */ return 1; } static int evas_object_rectangle_was_visible(Evas_Object *obj) { /* this returns 1 if the internal object data would imply that it was */ /* visible (ie drawing it draws something. this is not to do with events */ return 1; } static int evas_object_rectangle_is_inside(Evas_Object *obj, double x, double y) { /* this returns 1 if the canvas co-ordinates are inside the object based */ /* on object private data. not much use for rects, but for polys, images */ /* and other complex objects it might be */ return 1; } static int evas_object_rectangle_was_inside(Evas_Object *obj, double x, double y) { /* this returns 1 if the canvas co-ordinates were inside the object based */ /* on object private data. not much use for rects, but for polys, images */ /* and other complex objects it might be */ return 1; } #endif evas-1.7.9/src/lib/canvas/evas_smart.c0000664000175000017500000001746312175475547014565 00000000000000#include "evas_common.h" #include "evas_private.h" static void _evas_smart_class_callbacks_create(Evas_Smart *s); static void _evas_smart_class_interfaces_create(Evas_Smart *s); /* all public */ EAPI void evas_smart_free(Evas_Smart *s) { MAGIC_CHECK(s, Evas_Smart, MAGIC_SMART); return; MAGIC_CHECK_END(); s->delete_me = 1; if (s->usage > 0) return; if (s->class_allocated) free((void *)s->smart_class); free(s->callbacks.array); free(s->interfaces.array); free(s); } EAPI Evas_Smart * evas_smart_class_new(const Evas_Smart_Class *sc) { Evas_Smart *s; if (!sc) return NULL; /* api does not match abi! for now refuse as we only have 1 version */ if (sc->version != EVAS_SMART_CLASS_VERSION) return NULL; s = evas_mem_calloc(sizeof(Evas_Smart)); if (!s) return NULL; s->magic = MAGIC_SMART; s->smart_class = sc; _evas_smart_class_callbacks_create(s); _evas_smart_class_interfaces_create(s); return s; } EAPI const Evas_Smart_Class * evas_smart_class_get(const Evas_Smart *s) { MAGIC_CHECK(s, Evas_Smart, MAGIC_SMART); return NULL; MAGIC_CHECK_END(); return s->smart_class; } EAPI void * evas_smart_data_get(const Evas_Smart *s) { MAGIC_CHECK(s, Evas_Smart, MAGIC_SMART); return NULL; MAGIC_CHECK_END(); return (void *)s->smart_class->data; } EAPI const Evas_Smart_Cb_Description ** evas_smart_callbacks_descriptions_get(const Evas_Smart *s, unsigned int *count) { MAGIC_CHECK(s, Evas_Smart, MAGIC_SMART); if (count) *count = 0; return NULL; MAGIC_CHECK_END(); if (count) *count = s->callbacks.size; return s->callbacks.array; } EAPI const Evas_Smart_Cb_Description * evas_smart_callback_description_find(const Evas_Smart *s, const char *name) { if (!name) return NULL; MAGIC_CHECK(s, Evas_Smart, MAGIC_SMART); return NULL; MAGIC_CHECK_END(); return evas_smart_cb_description_find(&s->callbacks, name); } EAPI Eina_Bool evas_smart_class_inherit_full(Evas_Smart_Class *sc, const Evas_Smart_Class *parent_sc, unsigned int parent_sc_size) { unsigned int off; /* api does not match abi! for now refuse as we only have 1 version */ if (parent_sc->version != EVAS_SMART_CLASS_VERSION) return EINA_FALSE; #define _CP(m) sc->m = parent_sc->m _CP(add); _CP(del); _CP(move); _CP(resize); _CP(show); _CP(hide); _CP(color_set); _CP(clip_set); _CP(clip_unset); _CP(calculate); _CP(member_add); _CP(member_del); #undef _CP sc->parent = parent_sc; off = sizeof(Evas_Smart_Class); if (parent_sc_size == off) return EINA_TRUE; memcpy(((char *)sc) + off, ((char *)parent_sc) + off, parent_sc_size - off); return EINA_TRUE; } EAPI int evas_smart_usage_get(const Evas_Smart *s) { MAGIC_CHECK(s, Evas_Smart, MAGIC_SMART); return 0; MAGIC_CHECK_END(); return s->usage; } /* internal funcs */ void evas_object_smart_use(Evas_Smart *s) { s->usage++; } void evas_object_smart_unuse(Evas_Smart *s) { s->usage--; if ((s->usage <= 0) && (s->delete_me)) evas_smart_free(s); } Eina_Bool evas_smart_cb_descriptions_resize(Evas_Smart_Cb_Description_Array *a, unsigned int size) { void *tmp; if (size == a->size) return EINA_TRUE; if (size == EINA_FALSE) { free(a->array); a->array = NULL; a->size = 0; return EINA_TRUE; } tmp = realloc(a->array, (size + 1) * sizeof(Evas_Smart_Cb_Description *)); if (tmp) { a->array = tmp; a->size = size; a->array[size] = NULL; return EINA_TRUE; } else { ERR("realloc failed!"); return EINA_FALSE; } } static int _evas_smart_cb_description_cmp_sort(const void *p1, const void *p2) { const Evas_Smart_Cb_Description **a = (const Evas_Smart_Cb_Description **)p1; const Evas_Smart_Cb_Description **b = (const Evas_Smart_Cb_Description **)p2; return strcmp((*a)->name, (*b)->name); } void evas_smart_cb_descriptions_fix(Evas_Smart_Cb_Description_Array *a) { unsigned int i, j; if (!a) { ERR("no array to fix!"); return; } qsort(a->array, a->size, sizeof(Evas_Smart_Cb_Description *), _evas_smart_cb_description_cmp_sort); DBG("%u callbacks", a->size); if (a->size) DBG("%s [type=%s]", a->array[0]->name, a->array[0]->type); for (i = 0, j = 1; j < a->size; j++) { const Evas_Smart_Cb_Description *cur, *prev; cur = a->array[j]; prev = a->array[i]; DBG("%s [type=%s]", cur->name, cur->type); if (strcmp(cur->name, prev->name) != 0) { i++; if (i != j) a->array[i] = a->array[j]; } else { if (strcmp(cur->type, prev->type) == 0) WRN("duplicated smart callback description" " with name '%s' and type '%s'", cur->name, cur->type); else ERR("callback descriptions named '%s' differ" " in type, keeping '%s', ignoring '%s'", cur->name, prev->type, cur->type); } } evas_smart_cb_descriptions_resize(a, i + 1); } static void _evas_smart_class_callbacks_create(Evas_Smart *s) { const Evas_Smart_Class *sc; unsigned int n = 0; for (sc = s->smart_class; sc; sc = sc->parent) { const Evas_Smart_Cb_Description *d; for (d = sc->callbacks; d && d->name; d++) n++; } if (n == 0) return; if (!evas_smart_cb_descriptions_resize(&s->callbacks, n)) return; s->callbacks.size = n; for (n = 0, sc = s->smart_class; sc; sc = sc->parent) { const Evas_Smart_Cb_Description *d; for (d = sc->callbacks; d && d->name; d++) s->callbacks.array[n++] = d; } evas_smart_cb_descriptions_fix(&s->callbacks); } static void _evas_smart_class_interfaces_create(Evas_Smart *s) { unsigned int i; unsigned int total_priv_sz = 0; const Evas_Smart_Class *sc; /* get number of interfaces on the smart */ for (i = 0, sc = s->smart_class; sc; sc = sc->parent) { const Evas_Smart_Interface **ifaces_array = sc->interfaces; if (!ifaces_array) continue; while (*ifaces_array) { const Evas_Smart_Interface *iface = *ifaces_array; if (!iface->name) break; i++; if (iface->private_size > 0) { unsigned int size = iface->private_size; if (size % sizeof(void *) != 0) size += sizeof(void *) - (size % sizeof(void *)); total_priv_sz += size; } ifaces_array++; } } if (!i) return; s->interfaces.array = malloc(i * sizeof(Evas_Smart_Interface *)); if (!s->interfaces.array) { ERR("malloc failed!"); return; } s->interfaces.size = i; for (i = 0, sc = s->smart_class; sc; sc = sc->parent) { const Evas_Smart_Interface **ifaces_array = sc->interfaces; if (!ifaces_array) continue; while (*ifaces_array) { const Evas_Smart_Interface *iface = *ifaces_array; if (!iface->name) break; s->interfaces.array[i++] = iface; ifaces_array++; } } } static int _evas_smart_cb_description_cmp_search(const void *p1, const void *p2) { const char *name = p1; const Evas_Smart_Cb_Description **v = (const Evas_Smart_Cb_Description **)p2; /* speed up string shares searches (same pointers) */ if (name == (*v)->name) return 0; return strcmp(name, (*v)->name); } const Evas_Smart_Cb_Description * evas_smart_cb_description_find(const Evas_Smart_Cb_Description_Array *a, const char *name) { if (!a->array) return NULL; return bsearch(name, a->array, a->size, sizeof(Evas_Smart_Cb_Description *), _evas_smart_cb_description_cmp_search); } evas-1.7.9/src/lib/canvas/evas_object_image.c0000664000175000017500000041417712175475547016052 00000000000000#ifdef HAVE_CONFIG_H # include "config.h" /* so that EAPI in Evas.h is correctly defined */ #endif #include #include #include #ifdef HAVE_SYS_MMAN_H # include #endif #include #include "evas_common.h" #include "evas_private.h" #include "../engines/common/evas_convert_color.h" #include "../engines/common/evas_convert_colorspace.h" #include "../engines/common/evas_convert_yuv.h" #define VERBOSE_PROXY_ERROR 1 /* private magic number for image objects */ static const char o_type[] = "image"; /* private struct for rectangle object internal data */ typedef struct _Evas_Object_Image Evas_Object_Image; struct _Evas_Object_Image { DATA32 magic; struct { int spread; Evas_Coord_Rectangle fill; struct { short w, h, stride; } image; struct { short l, r, t, b; unsigned char fill; double scale; } border; Evas_Object *source; Evas_Map *defmap; const char *file; const char *key; int frame; Evas_Colorspace cspace; unsigned char smooth_scale : 1; unsigned char has_alpha :1; unsigned char opaque :1; unsigned char opaque_valid :1; } cur, prev; int pixels_checked_out; int load_error; Eina_List *pixel_updates; struct { unsigned char scale_down_by; double dpi; short w, h; struct { short x, y, w, h; } region; Eina_Bool orientation : 1; } load_opts; struct { Evas_Object_Image_Pixels_Get_Cb get_pixels; void *get_pixels_data; } func; Evas_Video_Surface video; const char *tmpf; int tmpf_fd; Evas_Image_Scale_Hint scale_hint; Evas_Image_Content_Hint content_hint; void *engine_data; unsigned char changed : 1; unsigned char dirty_pixels : 1; unsigned char filled : 1; unsigned char proxyrendering : 1; unsigned char preloading : 1; unsigned char video_rendering : 1; unsigned char video_surface : 1; unsigned char video_visible : 1; unsigned char created : 1; unsigned char proxyerror : 1; }; /* private methods for image objects */ static void evas_object_image_unload(Evas_Object *obj, Eina_Bool dirty); static void evas_object_image_load(Evas_Object *obj); static Evas_Coord evas_object_image_figure_x_fill(Evas_Object *obj, Evas_Coord start, Evas_Coord size, Evas_Coord *size_ret); static Evas_Coord evas_object_image_figure_y_fill(Evas_Object *obj, Evas_Coord start, Evas_Coord size, Evas_Coord *size_ret); static void evas_object_image_init(Evas_Object *obj); static void *evas_object_image_new(void); static void evas_object_image_render(Evas_Object *obj, void *output, void *context, void *surface, int x, int y); static void evas_object_image_free(Evas_Object *obj); static void evas_object_image_render_pre(Evas_Object *obj); static void evas_object_image_render_post(Evas_Object *obj); static unsigned int evas_object_image_id_get(Evas_Object *obj); static unsigned int evas_object_image_visual_id_get(Evas_Object *obj); static void *evas_object_image_engine_data_get(Evas_Object *obj); static int evas_object_image_is_opaque(Evas_Object *obj); static int evas_object_image_was_opaque(Evas_Object *obj); static int evas_object_image_is_inside(Evas_Object *obj, Evas_Coord x, Evas_Coord y); static int evas_object_image_has_opaque_rect(Evas_Object *obj); static int evas_object_image_get_opaque_rect(Evas_Object *obj, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h); static int evas_object_image_can_map(Evas_Object *obj); static void *evas_object_image_data_convert_internal(Evas_Object_Image *o, void *data, Evas_Colorspace to_cspace); static void evas_object_image_filled_resize_listener(void *data, Evas *e, Evas_Object *obj, void *einfo); static void _proxy_unset(Evas_Object *proxy); static void _proxy_set(Evas_Object *proxy, Evas_Object *src); static void _proxy_error(Evas_Object *proxy, void *context, void *output, void *surface, int x, int y); static void _cleanup_tmpf(Evas_Object *obj); static const Evas_Object_Func object_func = { /* methods (compulsory) */ evas_object_image_free, evas_object_image_render, evas_object_image_render_pre, evas_object_image_render_post, evas_object_image_id_get, evas_object_image_visual_id_get, evas_object_image_engine_data_get, /* these are optional. NULL = nothing */ NULL, NULL, NULL, NULL, evas_object_image_is_opaque, evas_object_image_was_opaque, evas_object_image_is_inside, NULL, NULL, NULL, evas_object_image_has_opaque_rect, evas_object_image_get_opaque_rect, evas_object_image_can_map }; EVAS_MEMPOOL(_mp_obj); static void _evas_object_image_cleanup(Evas_Object *obj, Evas_Object_Image *o) { if ((o->preloading) && (o->engine_data)) { o->preloading = 0; obj->layer->evas->engine.func->image_data_preload_cancel(obj->layer->evas->engine.data.output, o->engine_data, obj); } if (o->tmpf) _cleanup_tmpf(obj); if (o->cur.source) _proxy_unset(obj); } EAPI Evas_Object * evas_object_image_add(Evas *e) { Evas_Object *obj; Evas_Object_Image *o; MAGIC_CHECK(e, Evas, MAGIC_EVAS); return NULL; MAGIC_CHECK_END(); EINA_SAFETY_ON_NULL_RETURN_VAL(e->engine.func, NULL); obj = evas_object_new(e); evas_object_image_init(obj); evas_object_inject(obj, e); o = (Evas_Object_Image *)(obj->object_data); o->cur.cspace = obj->layer->evas->engine.func->image_colorspace_get(obj->layer->evas->engine.data.output, o->engine_data); return obj; } EAPI Evas_Object * evas_object_image_filled_add(Evas *e) { Evas_Object *obj; obj = evas_object_image_add(e); evas_object_image_filled_set(obj, 1); return obj; } static void _cleanup_tmpf(Evas_Object *obj) { #ifdef HAVE_SYS_MMAN_H Evas_Object_Image *o; o = (Evas_Object_Image *)(obj->object_data); if (!o->tmpf) return; #ifdef __linux__ #else unlink(o->tmpf); #endif if (o->tmpf_fd >= 0) close(o->tmpf_fd); eina_stringshare_del(o->tmpf); o->tmpf_fd = -1; o->tmpf = NULL; #else (void) obj; #endif } static void _create_tmpf(Evas_Object *obj, void *data, int size, char *format __UNUSED__) { #ifdef HAVE_SYS_MMAN_H Evas_Object_Image *o; char buf[PATH_MAX]; void *dst; int fd = -1; o = (Evas_Object_Image *)(obj->object_data); #ifdef __linux__ snprintf(buf, sizeof(buf), "/dev/shm/.evas-tmpf-%i-%p-%i-XXXXXX", (int)getpid(), data, (int)size); fd = mkstemp(buf); #endif if (fd < 0) { const char *tmpdir = getenv("TMPDIR"); if (!tmpdir) { tmpdir = getenv("TMP"); if (!tmpdir) { tmpdir = getenv("TEMP"); if (!tmpdir) tmpdir = "/tmp"; } } snprintf(buf, sizeof(buf), "%s/.evas-tmpf-%i-%p-%i-XXXXXX", tmpdir, (int)getpid(), data, (int)size); fd = mkstemp(buf); if (fd < 0) return; } if (ftruncate(fd, size) < 0) { unlink(buf); close(fd); return; } #ifdef __linux__ unlink(buf); #endif eina_mmap_safety_enabled_set(EINA_TRUE); dst = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); if (dst == MAP_FAILED) { close(fd); return; } o->tmpf_fd = fd; #ifdef __linux__ snprintf(buf, sizeof(buf), "/proc/%li/fd/%i", (long)getpid(), fd); #endif o->tmpf = eina_stringshare_add(buf); memcpy(dst, data, size); munmap(dst, size); #else (void) obj; (void) data; (void) size; (void) format; #endif } EAPI void evas_object_image_memfile_set(Evas_Object *obj, void *data, int size, char *format, char *key) { Evas_Object_Image *o; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); o = (Evas_Object_Image *)(obj->object_data); MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); return; MAGIC_CHECK_END(); _cleanup_tmpf(obj); evas_object_image_file_set(obj, NULL, NULL); // invalidate the cache effectively evas_object_image_alpha_set(obj, !o->cur.has_alpha); evas_object_image_alpha_set(obj, o->cur.has_alpha); if ((size < 1) || (!data)) return; _create_tmpf(obj, data, size, format); evas_object_image_file_set(obj, o->tmpf, key); if (!o->engine_data) { ERR("unable to load '%s' from memory", o->tmpf); _cleanup_tmpf(obj); return; } } EAPI void evas_object_image_file_set(Evas_Object *obj, const char *file, const char *key) { Evas_Object_Image *o; Evas_Image_Load_Opts lo; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); o = (Evas_Object_Image *)(obj->object_data); MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); return; MAGIC_CHECK_END(); if ((o->tmpf) && (file != o->tmpf)) _cleanup_tmpf(obj); if ((o->cur.file) && (file) && (!strcmp(o->cur.file, file))) { if ((!o->cur.key) && (!key)) return; if ((o->cur.key) && (key) && (!strcmp(o->cur.key, key))) return; } /* * WTF? why cancel a null image preload? this is just silly (tm) if (!o->engine_data) obj->layer->evas->engine.func->image_data_preload_cancel(obj->layer->evas->engine.data.output, o->engine_data, obj); */ if (o->cur.source) _proxy_unset(obj); if (o->cur.file) eina_stringshare_del(o->cur.file); if (o->cur.key) eina_stringshare_del(o->cur.key); if (file) o->cur.file = eina_stringshare_add(file); else o->cur.file = NULL; if (key) o->cur.key = eina_stringshare_add(key); else o->cur.key = NULL; o->prev.file = NULL; o->prev.key = NULL; if (o->engine_data) { if (o->preloading) { o->preloading = 0; obj->layer->evas->engine.func->image_data_preload_cancel(obj->layer->evas->engine.data.output, o->engine_data, obj); } obj->layer->evas->engine.func->image_free(obj->layer->evas->engine.data.output, o->engine_data); } o->load_error = EVAS_LOAD_ERROR_NONE; lo.scale_down_by = o->load_opts.scale_down_by; lo.dpi = o->load_opts.dpi; lo.w = o->load_opts.w; lo.h = o->load_opts.h; lo.region.x = o->load_opts.region.x; lo.region.y = o->load_opts.region.y; lo.region.w = o->load_opts.region.w; lo.region.h = o->load_opts.region.h; lo.orientation = o->load_opts.orientation; o->engine_data = obj->layer->evas->engine.func->image_load(obj->layer->evas->engine.data.output, o->cur.file, o->cur.key, &o->load_error, &lo); if (o->engine_data) { int w, h; int stride; obj->layer->evas->engine.func->image_size_get(obj->layer->evas->engine.data.output, o->engine_data, &w, &h); if (obj->layer->evas->engine.func->image_stride_get) obj->layer->evas->engine.func->image_stride_get(obj->layer->evas->engine.data.output, o->engine_data, &stride); else stride = w * 4; o->cur.has_alpha = obj->layer->evas->engine.func->image_alpha_get(obj->layer->evas->engine.data.output, o->engine_data); o->cur.cspace = obj->layer->evas->engine.func->image_colorspace_get(obj->layer->evas->engine.data.output, o->engine_data); o->cur.image.w = w; o->cur.image.h = h; o->cur.image.stride = stride; } else { if (o->load_error == EVAS_LOAD_ERROR_NONE) o->load_error = EVAS_LOAD_ERROR_GENERIC; o->cur.has_alpha = 1; o->cur.cspace = EVAS_COLORSPACE_ARGB8888; o->cur.image.w = 0; o->cur.image.h = 0; o->cur.image.stride = 0; } o->changed = 1; evas_object_change(obj); } EAPI void evas_object_image_file_get(const Evas_Object *obj, const char **file, const char **key) { Evas_Object_Image *o; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); if (file) *file = NULL; if (key) *key = NULL; return; MAGIC_CHECK_END(); o = (Evas_Object_Image *)(obj->object_data); MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); if (file) *file = NULL; if (key) *key = NULL; return; MAGIC_CHECK_END(); if (file) *file = o->cur.file; if (key) *key = o->cur.key; } EAPI Eina_Bool evas_object_image_source_set(Evas_Object *obj, Evas_Object *src) { Evas_Object_Image *o; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return EINA_FALSE; MAGIC_CHECK_END(); o = obj->object_data; MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); return EINA_FALSE; MAGIC_CHECK_END(); if (obj->delete_me && src) { WRN("Setting deleted object %p as image source %p", src, obj); return EINA_FALSE; } if (src) { if (src->delete_me) { WRN("Setting object %p to deleted image source %p", src, obj); return EINA_FALSE; } if (!src->layer) { CRIT("No evas surface associated with source object (%p)", obj); return EINA_FALSE; } if ((obj->layer && src->layer) && (obj->layer->evas != src->layer->evas)) { CRIT("Setting object %p from Evas (%p) from another Evas (%p)", src, src->layer->evas, obj->layer->evas); return EINA_FALSE; } if (src == obj) { CRIT("Setting object %p as a source for itself", obj); return EINA_FALSE; } } if (o->cur.source == src) return EINA_TRUE; _evas_object_image_cleanup(obj, o); /* Kill the image if any */ if (o->cur.file || o->cur.key) evas_object_image_file_set(obj, NULL, NULL); if (src) _proxy_set(obj, src); else _proxy_unset(obj); return EINA_TRUE; } EAPI Evas_Object * evas_object_image_source_get(const Evas_Object *obj) { Evas_Object_Image *o; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return NULL; MAGIC_CHECK_END(); o = obj->object_data; MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); return NULL; MAGIC_CHECK_END(); return o->cur.source; } EAPI Eina_Bool evas_object_image_source_unset(Evas_Object *obj) { return evas_object_image_source_set(obj, NULL); } EAPI void evas_object_image_border_set(Evas_Object *obj, int l, int r, int t, int b) { Evas_Object_Image *o; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); o = (Evas_Object_Image *)(obj->object_data); MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); return; MAGIC_CHECK_END(); if (l < 0) l = 0; if (r < 0) r = 0; if (t < 0) t = 0; if (b < 0) b = 0; if ((o->cur.border.l == l) && (o->cur.border.r == r) && (o->cur.border.t == t) && (o->cur.border.b == b)) return; o->cur.border.l = l; o->cur.border.r = r; o->cur.border.t = t; o->cur.border.b = b; o->cur.opaque_valid = 0; o->changed = 1; evas_object_change(obj); } EAPI void evas_object_image_border_get(const Evas_Object *obj, int *l, int *r, int *t, int *b) { Evas_Object_Image *o; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); if (l) *l = 0; if (r) *r = 0; if (t) *t = 0; if (b) *b = 0; return; MAGIC_CHECK_END(); o = (Evas_Object_Image *)(obj->object_data); MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); if (l) *l = 0; if (r) *r = 0; if (t) *t = 0; if (b) *b = 0; return; MAGIC_CHECK_END(); if (l) *l = o->cur.border.l; if (r) *r = o->cur.border.r; if (t) *t = o->cur.border.t; if (b) *b = o->cur.border.b; } EAPI void evas_object_image_border_center_fill_set(Evas_Object *obj, Evas_Border_Fill_Mode fill) { Evas_Object_Image *o; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); o = (Evas_Object_Image *)(obj->object_data); MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); return; MAGIC_CHECK_END(); if (fill == o->cur.border.fill) return; o->cur.border.fill = fill; o->changed = 1; evas_object_change(obj); } EAPI Evas_Border_Fill_Mode evas_object_image_border_center_fill_get(const Evas_Object *obj) { Evas_Object_Image *o; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return 0; MAGIC_CHECK_END(); o = (Evas_Object_Image *)(obj->object_data); MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); return 0; MAGIC_CHECK_END(); return o->cur.border.fill; } EAPI void evas_object_image_filled_set(Evas_Object *obj, Eina_Bool setting) { Evas_Object_Image *o; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); o = (Evas_Object_Image *)(obj->object_data); MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); return; MAGIC_CHECK_END(); setting = !!setting; if (o->filled == setting) return; o->filled = setting; if (!o->filled) evas_object_event_callback_del(obj, EVAS_CALLBACK_RESIZE, evas_object_image_filled_resize_listener); else { Evas_Coord w, h; evas_object_geometry_get(obj, NULL, NULL, &w, &h); evas_object_image_fill_set(obj, 0, 0, w, h); evas_object_event_callback_add(obj, EVAS_CALLBACK_RESIZE, evas_object_image_filled_resize_listener, NULL); } } EAPI Eina_Bool evas_object_image_filled_get(const Evas_Object *obj) { Evas_Object_Image *o; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return 0; MAGIC_CHECK_END(); o = (Evas_Object_Image *)(obj->object_data); MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); return 0; MAGIC_CHECK_END(); return o->filled; } EAPI void evas_object_image_border_scale_set(Evas_Object *obj, double scale) { Evas_Object_Image *o; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); o = (Evas_Object_Image *)(obj->object_data); MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); return; MAGIC_CHECK_END(); if (scale == o->cur.border.scale) return; o->cur.border.scale = scale; o->changed = 1; evas_object_change(obj); } EAPI double evas_object_image_border_scale_get(const Evas_Object *obj) { Evas_Object_Image *o; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return 1.0; MAGIC_CHECK_END(); o = (Evas_Object_Image *)(obj->object_data); MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); return 1.0; MAGIC_CHECK_END(); return o->cur.border.scale; } EAPI void evas_object_image_fill_set(Evas_Object *obj, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h) { Evas_Object_Image *o; if (w == 0) return; if (h == 0) return; if (w < 0) w = -w; if (h < 0) h = -h; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); o = (Evas_Object_Image *)(obj->object_data); MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); return; MAGIC_CHECK_END(); if ((o->cur.fill.x == x) && (o->cur.fill.y == y) && (o->cur.fill.w == w) && (o->cur.fill.h == h)) return; o->cur.fill.x = x; o->cur.fill.y = y; o->cur.fill.w = w; o->cur.fill.h = h; o->cur.opaque_valid = 0; o->changed = 1; evas_object_change(obj); } EAPI void evas_object_image_fill_get(const Evas_Object *obj, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h) { Evas_Object_Image *o; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); if (x) *x = 0; if (y) *y = 0; if (w) *w = 0; if (h) *h = 0; return; MAGIC_CHECK_END(); o = (Evas_Object_Image *)(obj->object_data); MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); if (x) *x = 0; if (y) *y = 0; if (w) *w = 0; if (h) *h = 0; return; MAGIC_CHECK_END(); if (x) *x = o->cur.fill.x; if (y) *y = o->cur.fill.y; if (w) *w = o->cur.fill.w; if (h) *h = o->cur.fill.h; } EAPI void evas_object_image_fill_spread_set(Evas_Object *obj, Evas_Fill_Spread spread) { Evas_Object_Image *o; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); o = (Evas_Object_Image *)(obj->object_data); MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); return; MAGIC_CHECK_END(); if (spread == (Evas_Fill_Spread)o->cur.spread) return; o->cur.spread = spread; o->changed = 1; evas_object_change(obj); } EAPI Evas_Fill_Spread evas_object_image_fill_spread_get(const Evas_Object *obj) { Evas_Object_Image *o; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return EVAS_TEXTURE_REPEAT; MAGIC_CHECK_END(); o = (Evas_Object_Image *)(obj->object_data); MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); return EVAS_TEXTURE_REPEAT; MAGIC_CHECK_END(); return (Evas_Fill_Spread)o->cur.spread; } EAPI void evas_object_image_size_set(Evas_Object *obj, int w, int h) { Evas_Object_Image *o; int stride = 0; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); o = (Evas_Object_Image *)(obj->object_data); MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); return; MAGIC_CHECK_END(); _evas_object_image_cleanup(obj, o); if (w < 1) w = 1; if (h < 1) h = 1; if (w > 32768) return; if (h > 32768) return; if ((w == o->cur.image.w) && (h == o->cur.image.h)) return; o->cur.image.w = w; o->cur.image.h = h; if (o->engine_data) o->engine_data = obj->layer->evas->engine.func->image_size_set(obj->layer->evas->engine.data.output, o->engine_data, w, h); else o->engine_data = obj->layer->evas->engine.func->image_new_from_copied_data (obj->layer->evas->engine.data.output, w, h, NULL, o->cur.has_alpha, o->cur.cspace); if (o->engine_data) { if (obj->layer->evas->engine.func->image_scale_hint_set) obj->layer->evas->engine.func->image_scale_hint_set (obj->layer->evas->engine.data.output, o->engine_data, o->scale_hint); if (obj->layer->evas->engine.func->image_content_hint_set) obj->layer->evas->engine.func->image_content_hint_set (obj->layer->evas->engine.data.output, o->engine_data, o->content_hint); if (obj->layer->evas->engine.func->image_stride_get) obj->layer->evas->engine.func->image_stride_get (obj->layer->evas->engine.data.output, o->engine_data, &stride); else stride = w * 4; } else stride = w * 4; o->cur.image.stride = stride; /* FIXME - in engine call above if (o->engine_data) o->engine_data = obj->layer->evas->engine.func->image_alpha_set(obj->layer->evas->engine.data.output, o->engine_data, o->cur.has_alpha); */ EVAS_OBJECT_IMAGE_FREE_FILE_AND_KEY(o); o->changed = 1; evas_object_change(obj); } EAPI void evas_object_image_size_get(const Evas_Object *obj, int *w, int *h) { Evas_Object_Image *o; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); if (w) *w = 0; if (h) *h = 0; return; MAGIC_CHECK_END(); o = (Evas_Object_Image *)(obj->object_data); MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); if (w) *w = 0; if (h) *h = 0; return; MAGIC_CHECK_END(); if (w) *w = o->cur.image.w; if (h) *h = o->cur.image.h; } EAPI int evas_object_image_stride_get(const Evas_Object *obj) { Evas_Object_Image *o; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return 0; MAGIC_CHECK_END(); o = (Evas_Object_Image *)(obj->object_data); MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); return 0; MAGIC_CHECK_END(); return o->cur.image.stride; } EAPI Evas_Load_Error evas_object_image_load_error_get(const Evas_Object *obj) { Evas_Object_Image *o; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return 0; MAGIC_CHECK_END(); o = (Evas_Object_Image *)(obj->object_data); MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); return 0; MAGIC_CHECK_END(); return o->load_error; } EAPI void * evas_object_image_data_convert(Evas_Object *obj, Evas_Colorspace to_cspace) { Evas_Object_Image *o; DATA32 *data; void* result = NULL; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return NULL; MAGIC_CHECK_END(); o = (Evas_Object_Image *)(obj->object_data); MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); return NULL; MAGIC_CHECK_END(); if ((o->preloading) && (o->engine_data)) { o->preloading = 0; obj->layer->evas->engine.func->image_data_preload_cancel(obj->layer->evas->engine.data.output, o->engine_data, obj); } if (!o->engine_data) return NULL; if (o->video_surface) o->video.update_pixels(o->video.data, obj, &o->video); if (o->cur.cspace == to_cspace) return NULL; data = NULL; o->engine_data = obj->layer->evas->engine.func->image_data_get(obj->layer->evas->engine.data.output, o->engine_data, 0, &data, &o->load_error); result = evas_object_image_data_convert_internal(o, data, to_cspace); if (o->engine_data) { o->engine_data = obj->layer->evas->engine.func->image_data_put(obj->layer->evas->engine.data.output, o->engine_data, data); } return result; } EAPI void evas_object_image_data_set(Evas_Object *obj, void *data) { Evas_Object_Image *o; void *p_data; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); o = (Evas_Object_Image *)(obj->object_data); MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); return; MAGIC_CHECK_END(); _evas_object_image_cleanup(obj, o); p_data = o->engine_data; if (data) { if (o->engine_data) { o->engine_data = obj->layer->evas->engine.func->image_data_put(obj->layer->evas->engine.data.output, o->engine_data, data); } else { o->engine_data = obj->layer->evas->engine.func->image_new_from_data(obj->layer->evas->engine.data.output, o->cur.image.w, o->cur.image.h, data, o->cur.has_alpha, o->cur.cspace); } if (o->engine_data) { int stride = 0; if (obj->layer->evas->engine.func->image_scale_hint_set) obj->layer->evas->engine.func->image_scale_hint_set (obj->layer->evas->engine.data.output, o->engine_data, o->scale_hint); if (obj->layer->evas->engine.func->image_content_hint_set) obj->layer->evas->engine.func->image_content_hint_set (obj->layer->evas->engine.data.output, o->engine_data, o->content_hint); if (obj->layer->evas->engine.func->image_stride_get) obj->layer->evas->engine.func->image_stride_get (obj->layer->evas->engine.data.output, o->engine_data, &stride); else stride = o->cur.image.w * 4; o->cur.image.stride = stride; } } else { if (o->engine_data) obj->layer->evas->engine.func->image_free(obj->layer->evas->engine.data.output, o->engine_data); o->load_error = EVAS_LOAD_ERROR_NONE; o->cur.image.w = 0; o->cur.image.h = 0; o->cur.image.stride = 0; o->engine_data = NULL; } /* FIXME - in engine call above if (o->engine_data) o->engine_data = obj->layer->evas->engine.func->image_alpha_set(obj->layer->evas->engine.data.output, o->engine_data, o->cur.has_alpha); */ if (o->pixels_checked_out > 0) o->pixels_checked_out--; if (p_data != o->engine_data) { EVAS_OBJECT_IMAGE_FREE_FILE_AND_KEY(o); o->pixels_checked_out = 0; } o->changed = 1; evas_object_change(obj); } EAPI void * evas_object_image_data_get(const Evas_Object *obj, Eina_Bool for_writing) { Evas_Object_Image *o; DATA32 *data; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return NULL; MAGIC_CHECK_END(); o = (Evas_Object_Image *)(obj->object_data); MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); return NULL; MAGIC_CHECK_END(); if (!o->engine_data) return NULL; data = NULL; if (obj->layer->evas->engine.func->image_scale_hint_set) obj->layer->evas->engine.func->image_scale_hint_set (obj->layer->evas->engine.data.output, o->engine_data, o->scale_hint); if (obj->layer->evas->engine.func->image_content_hint_set) obj->layer->evas->engine.func->image_content_hint_set (obj->layer->evas->engine.data.output, o->engine_data, o->content_hint); o->engine_data = obj->layer->evas->engine.func->image_data_get(obj->layer->evas->engine.data.output, o->engine_data, for_writing, &data, &o->load_error); /* if we fail to get engine_data, we have to return NULL */ if (!o->engine_data) return NULL; if (o->engine_data) { int stride = 0; if (obj->layer->evas->engine.func->image_stride_get) obj->layer->evas->engine.func->image_stride_get (obj->layer->evas->engine.data.output, o->engine_data, &stride); else stride = o->cur.image.w * 4; o->cur.image.stride = stride; } o->pixels_checked_out++; if (for_writing) { EVAS_OBJECT_IMAGE_FREE_FILE_AND_KEY(o); } return data; } EAPI void evas_object_image_preload(Evas_Object *obj, Eina_Bool cancel) { Evas_Object_Image *o; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return ; MAGIC_CHECK_END(); o = (Evas_Object_Image *)(obj->object_data); MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); return ; MAGIC_CHECK_END(); if (!o->engine_data) { o->preloading = 1; evas_object_inform_call_image_preloaded(obj); return; } // FIXME: if already busy preloading, then dont request again until // preload done if (cancel) { if (o->preloading) { o->preloading = 0; obj->layer->evas->engine.func->image_data_preload_cancel(obj->layer->evas->engine.data.output, o->engine_data, obj); } } else { if (!o->preloading) { o->preloading = 1; obj->layer->evas->engine.func->image_data_preload_request(obj->layer->evas->engine.data.output, o->engine_data, obj); } } } EAPI void evas_object_image_data_copy_set(Evas_Object *obj, void *data) { Evas_Object_Image *o; if (!data) return; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); o = (Evas_Object_Image *)(obj->object_data); MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); return; MAGIC_CHECK_END(); _evas_object_image_cleanup(obj, o); if ((o->cur.image.w <= 0) || (o->cur.image.h <= 0)) return; if (o->engine_data) obj->layer->evas->engine.func->image_free(obj->layer->evas->engine.data.output, o->engine_data); o->engine_data = obj->layer->evas->engine.func->image_new_from_copied_data(obj->layer->evas->engine.data.output, o->cur.image.w, o->cur.image.h, data, o->cur.has_alpha, o->cur.cspace); if (o->engine_data) { int stride = 0; o->engine_data = obj->layer->evas->engine.func->image_alpha_set(obj->layer->evas->engine.data.output, o->engine_data, o->cur.has_alpha); if (obj->layer->evas->engine.func->image_scale_hint_set) obj->layer->evas->engine.func->image_scale_hint_set (obj->layer->evas->engine.data.output, o->engine_data, o->scale_hint); if (obj->layer->evas->engine.func->image_content_hint_set) obj->layer->evas->engine.func->image_content_hint_set (obj->layer->evas->engine.data.output, o->engine_data, o->content_hint); if (obj->layer->evas->engine.func->image_stride_get) obj->layer->evas->engine.func->image_stride_get (obj->layer->evas->engine.data.output, o->engine_data, &stride); else stride = o->cur.image.w * 4; o->cur.image.stride = stride; } o->pixels_checked_out = 0; EVAS_OBJECT_IMAGE_FREE_FILE_AND_KEY(o); } EAPI void evas_object_image_data_update_add(Evas_Object *obj, int x, int y, int w, int h) { Evas_Object_Image *o; Eina_Rectangle *r; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); o = (Evas_Object_Image *)(obj->object_data); MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); return; MAGIC_CHECK_END(); RECTS_CLIP_TO_RECT(x, y, w, h, 0, 0, o->cur.image.w, o->cur.image.h); if ((w <= 0) || (h <= 0)) return; NEW_RECT(r, x, y, w, h); if (r) o->pixel_updates = eina_list_append(o->pixel_updates, r); o->changed = 1; evas_object_change(obj); } EAPI void evas_object_image_alpha_set(Evas_Object *obj, Eina_Bool has_alpha) { Evas_Object_Image *o; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); o = (Evas_Object_Image *)(obj->object_data); MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); return; MAGIC_CHECK_END(); if ((o->preloading) && (o->engine_data)) { o->preloading = 0; obj->layer->evas->engine.func->image_data_preload_cancel(obj->layer->evas->engine.data.output, o->engine_data, obj); } if (((has_alpha) && (o->cur.has_alpha)) || ((!has_alpha) && (!o->cur.has_alpha))) return; o->cur.has_alpha = has_alpha; if (o->engine_data) { int stride = 0; o->engine_data = obj->layer->evas->engine.func->image_alpha_set(obj->layer->evas->engine.data.output, o->engine_data, o->cur.has_alpha); if (obj->layer->evas->engine.func->image_scale_hint_set) obj->layer->evas->engine.func->image_scale_hint_set (obj->layer->evas->engine.data.output, o->engine_data, o->scale_hint); if (obj->layer->evas->engine.func->image_content_hint_set) obj->layer->evas->engine.func->image_content_hint_set (obj->layer->evas->engine.data.output, o->engine_data, o->content_hint); if (obj->layer->evas->engine.func->image_stride_get) obj->layer->evas->engine.func->image_stride_get (obj->layer->evas->engine.data.output, o->engine_data, &stride); else stride = o->cur.image.w * 4; o->cur.image.stride = stride; } evas_object_image_data_update_add(obj, 0, 0, o->cur.image.w, o->cur.image.h); EVAS_OBJECT_IMAGE_FREE_FILE_AND_KEY(o); } EAPI Eina_Bool evas_object_image_alpha_get(const Evas_Object *obj) { Evas_Object_Image *o; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return 0; MAGIC_CHECK_END(); o = (Evas_Object_Image *)(obj->object_data); MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); return 0; MAGIC_CHECK_END(); return o->cur.has_alpha; } EAPI void evas_object_image_smooth_scale_set(Evas_Object *obj, Eina_Bool smooth_scale) { Evas_Object_Image *o; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); o = (Evas_Object_Image *)(obj->object_data); MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); return; MAGIC_CHECK_END(); if (((smooth_scale) && (o->cur.smooth_scale)) || ((!smooth_scale) && (!o->cur.smooth_scale))) return; o->cur.smooth_scale = smooth_scale; o->changed = 1; evas_object_change(obj); } EAPI Eina_Bool evas_object_image_smooth_scale_get(const Evas_Object *obj) { Evas_Object_Image *o; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return 0; MAGIC_CHECK_END(); o = (Evas_Object_Image *)(obj->object_data); MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); return 0; MAGIC_CHECK_END(); return o->cur.smooth_scale; } EAPI void evas_object_image_reload(Evas_Object *obj) { Evas_Object_Image *o; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); o = (Evas_Object_Image *)(obj->object_data); MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); return; MAGIC_CHECK_END(); if ((o->preloading) && (o->engine_data)) { o->preloading = 0; obj->layer->evas->engine.func->image_data_preload_cancel(obj->layer->evas->engine.data.output, o->engine_data, obj); } if ((!o->cur.file) || (o->pixels_checked_out > 0)) return; if (o->engine_data) o->engine_data = obj->layer->evas->engine.func->image_dirty_region(obj->layer->evas->engine.data.output, o->engine_data, 0, 0, o->cur.image.w, o->cur.image.h); evas_object_image_unload(obj, 1); evas_object_inform_call_image_unloaded(obj); evas_object_image_load(obj); o->prev.file = NULL; o->prev.key = NULL; o->changed = 1; evas_object_change(obj); } EAPI Eina_Bool evas_object_image_save(const Evas_Object *obj, const char *file, const char *key, const char *flags) { Evas_Object_Image *o; DATA32 *data = NULL; int quality = 80, compress = 9, ok = 0; RGBA_Image *im; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return 0; MAGIC_CHECK_END(); o = (Evas_Object_Image *)(obj->object_data); MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); return 0; MAGIC_CHECK_END(); if (!o->engine_data) return 0; o->engine_data = obj->layer->evas->engine.func->image_data_get(obj->layer->evas->engine.data.output, o->engine_data, 0, &data, &o->load_error); if (flags) { char *p, *pp; char *tflags; tflags = alloca(strlen(flags) + 1); strcpy(tflags, flags); p = tflags; while (p) { pp = strchr(p, ' '); if (pp) *pp = 0; sscanf(p, "quality=%i", &quality); sscanf(p, "compress=%i", &compress); if (pp) p = pp + 1; else break; } } im = (RGBA_Image*) evas_cache_image_data(evas_common_image_cache_get(), o->cur.image.w, o->cur.image.h, data, o->cur.has_alpha, EVAS_COLORSPACE_ARGB8888); if (im) { if (o->cur.cspace == EVAS_COLORSPACE_ARGB8888) im->image.data = data; else im->image.data = evas_object_image_data_convert_internal(o, data, EVAS_COLORSPACE_ARGB8888); if (im->image.data) { ok = evas_common_save_image_to_file(im, file, key, quality, compress); if (o->cur.cspace != EVAS_COLORSPACE_ARGB8888) free(im->image.data); } evas_cache_image_drop(&im->cache_entry); } o->engine_data = obj->layer->evas->engine.func->image_data_put(obj->layer->evas->engine.data.output, o->engine_data, data); return ok; } EAPI Eina_Bool evas_object_image_pixels_import(Evas_Object *obj, Evas_Pixel_Import_Source *pixels) { Evas_Object_Image *o; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return 0; MAGIC_CHECK_END(); o = (Evas_Object_Image *)(obj->object_data); MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); return 0; MAGIC_CHECK_END(); _evas_object_image_cleanup(obj, o); if ((pixels->w != o->cur.image.w) || (pixels->h != o->cur.image.h)) return 0; switch (pixels->format) { #if 0 case EVAS_PIXEL_FORMAT_ARGB32: { if (o->engine_data) { DATA32 *image_pixels = NULL; o->engine_data = obj->layer->evas->engine.func->image_data_get(obj->layer->evas->engine.data.output, o->engine_data, 1, &image_pixels, &o->load_error); /* FIXME: need to actualyl support this */ /* memcpy(image_pixels, pixels->rows, o->cur.image.w * o->cur.image.h * 4);*/ if (o->engine_data) o->engine_data = obj->layer->evas->engine.func->image_data_put(obj->layer->evas->engine.data.output, o->engine_data, image_pixels); if (o->engine_data) o->engine_data = obj->layer->evas->engine.func->image_alpha_set(obj->layer->evas->engine.data.output, o->engine_data, o->cur.has_alpha); o->changed = 1; evas_object_change(obj); } } break; #endif #ifdef BUILD_CONVERT_YUV case EVAS_PIXEL_FORMAT_YUV420P_601: { if (o->engine_data) { DATA32 *image_pixels = NULL; o->engine_data = obj->layer->evas->engine.func->image_data_get(obj->layer->evas->engine.data.output, o->engine_data, 1, &image_pixels, &o->load_error); if (image_pixels) evas_common_convert_yuv_420p_601_rgba((DATA8 **) pixels->rows, (DATA8 *) image_pixels, o->cur.image.w, o->cur.image.h); if (o->engine_data) o->engine_data = obj->layer->evas->engine.func->image_data_put(obj->layer->evas->engine.data.output, o->engine_data, image_pixels); if (o->engine_data) o->engine_data = obj->layer->evas->engine.func->image_alpha_set(obj->layer->evas->engine.data.output, o->engine_data, o->cur.has_alpha); o->changed = 1; evas_object_change(obj); } } break; #endif default: return 0; break; } return 1; } EAPI void evas_object_image_pixels_get_callback_set(Evas_Object *obj, Evas_Object_Image_Pixels_Get_Cb func, void *data) { Evas_Object_Image *o; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); o = (Evas_Object_Image *)(obj->object_data); MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); return; MAGIC_CHECK_END(); o->func.get_pixels = func; o->func.get_pixels_data = data; } EAPI void evas_object_image_pixels_dirty_set(Evas_Object *obj, Eina_Bool dirty) { Evas_Object_Image *o; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); o = (Evas_Object_Image *)(obj->object_data); MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); return; MAGIC_CHECK_END(); if (dirty) o->dirty_pixels = 1; else o->dirty_pixels = 0; o->changed = 1; evas_object_change(obj); } EAPI Eina_Bool evas_object_image_pixels_dirty_get(const Evas_Object *obj) { Evas_Object_Image *o; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return 0; MAGIC_CHECK_END(); o = (Evas_Object_Image *)(obj->object_data); MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); return 0; MAGIC_CHECK_END(); if (o->dirty_pixels) return 1; return 0; } EAPI void evas_object_image_load_dpi_set(Evas_Object *obj, double dpi) { Evas_Object_Image *o; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); o = (Evas_Object_Image *)(obj->object_data); MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); return; MAGIC_CHECK_END(); if (dpi == o->load_opts.dpi) return; o->load_opts.dpi = dpi; if (o->cur.file) { evas_object_image_unload(obj, 0); evas_object_inform_call_image_unloaded(obj); evas_object_image_load(obj); o->changed = 1; evas_object_change(obj); } } EAPI double evas_object_image_load_dpi_get(const Evas_Object *obj) { Evas_Object_Image *o; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return 0.0; MAGIC_CHECK_END(); o = (Evas_Object_Image *)(obj->object_data); MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); return 0.0; MAGIC_CHECK_END(); return o->load_opts.dpi; } EAPI void evas_object_image_load_size_set(Evas_Object *obj, int w, int h) { Evas_Object_Image *o; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); o = (Evas_Object_Image *)(obj->object_data); MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); return; MAGIC_CHECK_END(); if ((o->load_opts.w == w) && (o->load_opts.h == h)) return; o->load_opts.w = w; o->load_opts.h = h; if (o->cur.file) { evas_object_image_unload(obj, 0); evas_object_inform_call_image_unloaded(obj); evas_object_image_load(obj); o->changed = 1; evas_object_change(obj); } } EAPI void evas_object_image_load_size_get(const Evas_Object *obj, int *w, int *h) { Evas_Object_Image *o; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); o = (Evas_Object_Image *)(obj->object_data); MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); return; MAGIC_CHECK_END(); if (w) *w = o->load_opts.w; if (h) *h = o->load_opts.h; } EAPI void evas_object_image_load_scale_down_set(Evas_Object *obj, int scale_down) { Evas_Object_Image *o; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); o = (Evas_Object_Image *)(obj->object_data); MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); return; MAGIC_CHECK_END(); if (o->load_opts.scale_down_by == scale_down) return; o->load_opts.scale_down_by = scale_down; if (o->cur.file) { evas_object_image_unload(obj, 0); evas_object_inform_call_image_unloaded(obj); evas_object_image_load(obj); o->changed = 1; evas_object_change(obj); } } EAPI int evas_object_image_load_scale_down_get(const Evas_Object *obj) { Evas_Object_Image *o; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return 0; MAGIC_CHECK_END(); o = (Evas_Object_Image *)(obj->object_data); MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); return 0; MAGIC_CHECK_END(); return o->load_opts.scale_down_by; } EAPI void evas_object_image_load_region_set(Evas_Object *obj, int x, int y, int w, int h) { Evas_Object_Image *o; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); o = (Evas_Object_Image *)(obj->object_data); MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); return; MAGIC_CHECK_END(); if ((o->load_opts.region.x == x) && (o->load_opts.region.y == y) && (o->load_opts.region.w == w) && (o->load_opts.region.h == h)) return; o->load_opts.region.x = x; o->load_opts.region.y = y; o->load_opts.region.w = w; o->load_opts.region.h = h; if (o->cur.file) { evas_object_image_unload(obj, 0); evas_object_inform_call_image_unloaded(obj); evas_object_image_load(obj); o->changed = 1; evas_object_change(obj); } } EAPI void evas_object_image_load_region_get(const Evas_Object *obj, int *x, int *y, int *w, int *h) { Evas_Object_Image *o; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); o = (Evas_Object_Image *)(obj->object_data); MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); return; MAGIC_CHECK_END(); if (x) *x = o->load_opts.region.x; if (y) *y = o->load_opts.region.y; if (w) *w = o->load_opts.region.w; if (h) *h = o->load_opts.region.h; } EAPI void evas_object_image_load_orientation_set(Evas_Object *obj, Eina_Bool enable) { Evas_Object_Image *o; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); o = (Evas_Object_Image *)(obj->object_data); MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); return; MAGIC_CHECK_END(); o->load_opts.orientation = !!enable; } EAPI Eina_Bool evas_object_image_load_orientation_get(const Evas_Object *obj) { Evas_Object_Image *o; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return EINA_FALSE; MAGIC_CHECK_END(); o = (Evas_Object_Image *)(obj->object_data); MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); return EINA_FALSE; MAGIC_CHECK_END(); return o->load_opts.orientation; } EAPI void evas_object_image_colorspace_set(Evas_Object *obj, Evas_Colorspace cspace) { Evas_Object_Image *o; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); o = (Evas_Object_Image *)(obj->object_data); MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); return; MAGIC_CHECK_END(); _evas_object_image_cleanup(obj, o); o->cur.cspace = cspace; if (o->engine_data) obj->layer->evas->engine.func->image_colorspace_set(obj->layer->evas->engine.data.output, o->engine_data, cspace); } EAPI Evas_Colorspace evas_object_image_colorspace_get(const Evas_Object *obj) { Evas_Object_Image *o; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return EVAS_COLORSPACE_ARGB8888; MAGIC_CHECK_END(); o = (Evas_Object_Image *)(obj->object_data); MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); return EVAS_COLORSPACE_ARGB8888; MAGIC_CHECK_END(); return o->cur.cspace; } EAPI void evas_object_image_video_surface_set(Evas_Object *obj, Evas_Video_Surface *surf) { Evas_Object_Image *o; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); o = (Evas_Object_Image *)(obj->object_data); MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); return; MAGIC_CHECK_END(); _evas_object_image_cleanup(obj, o); if (o->video_surface) { o->video_surface = 0; obj->layer->evas->video_objects = eina_list_remove(obj->layer->evas->video_objects, obj); } if (surf) { if (surf->version != EVAS_VIDEO_SURFACE_VERSION) return ; if (!surf->update_pixels || !surf->move || !surf->resize || !surf->hide || !surf->show) return ; o->created = EINA_TRUE; o->video_surface = 1; o->video = *surf; obj->layer->evas->video_objects = eina_list_append(obj->layer->evas->video_objects, obj); } else { o->video_surface = 0; o->video.update_pixels = NULL; o->video.move = NULL; o->video.resize = NULL; o->video.hide = NULL; o->video.show = NULL; o->video.data = NULL; } } EAPI const Evas_Video_Surface * evas_object_image_video_surface_get(const Evas_Object *obj) { Evas_Object_Image *o; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return NULL; MAGIC_CHECK_END(); o = (Evas_Object_Image *)(obj->object_data); MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); return NULL; MAGIC_CHECK_END(); if (!o->video_surface) return NULL; return &o->video; } EAPI void evas_object_image_native_surface_set(Evas_Object *obj, Evas_Native_Surface *surf) { Evas_Object_Image *o; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); o = (Evas_Object_Image *)(obj->object_data); MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); return; MAGIC_CHECK_END(); _evas_object_image_cleanup(obj, o); if (!obj->layer->evas->engine.func->image_native_set) return; if ((surf) && ((surf->version < 2) || (surf->version > EVAS_NATIVE_SURFACE_VERSION))) return; o->engine_data = obj->layer->evas->engine.func->image_native_set(obj->layer->evas->engine.data.output, o->engine_data, surf); } EAPI Evas_Native_Surface * evas_object_image_native_surface_get(const Evas_Object *obj) { Evas_Object_Image *o; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return NULL; MAGIC_CHECK_END(); o = (Evas_Object_Image *)(obj->object_data); MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); return NULL; MAGIC_CHECK_END(); if (!obj->layer->evas->engine.func->image_native_get) return NULL; return obj->layer->evas->engine.func->image_native_get(obj->layer->evas->engine.data.output, o->engine_data); } EAPI void evas_object_image_scale_hint_set(Evas_Object *obj, Evas_Image_Scale_Hint hint) { Evas_Object_Image *o; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); o = (Evas_Object_Image *)(obj->object_data); MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); return; MAGIC_CHECK_END(); if (o->scale_hint == hint) return; o->scale_hint = hint; if (o->engine_data) { int stride = 0; if (obj->layer->evas->engine.func->image_scale_hint_set) obj->layer->evas->engine.func->image_scale_hint_set (obj->layer->evas->engine.data.output, o->engine_data, o->scale_hint); if (obj->layer->evas->engine.func->image_stride_get) obj->layer->evas->engine.func->image_stride_get (obj->layer->evas->engine.data.output, o->engine_data, &stride); else stride = o->cur.image.w * 4; o->cur.image.stride = stride; } } EAPI Evas_Image_Scale_Hint evas_object_image_scale_hint_get(const Evas_Object *obj) { Evas_Object_Image *o; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return EVAS_IMAGE_SCALE_HINT_NONE; MAGIC_CHECK_END(); o = (Evas_Object_Image *)(obj->object_data); MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); return EVAS_IMAGE_SCALE_HINT_NONE; MAGIC_CHECK_END(); return o->scale_hint; } EAPI void evas_object_image_content_hint_set(Evas_Object *obj, Evas_Image_Content_Hint hint) { Evas_Object_Image *o; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); o = (Evas_Object_Image *)(obj->object_data); MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); return; MAGIC_CHECK_END(); if (o->content_hint == hint) return; o->content_hint = hint; if (o->engine_data) { int stride = 0; if (obj->layer->evas->engine.func->image_content_hint_set) obj->layer->evas->engine.func->image_content_hint_set (obj->layer->evas->engine.data.output, o->engine_data, o->content_hint); if (obj->layer->evas->engine.func->image_stride_get) obj->layer->evas->engine.func->image_stride_get (obj->layer->evas->engine.data.output, o->engine_data, &stride); else stride = o->cur.image.w * 4; o->cur.image.stride = stride; } } EAPI void evas_object_image_alpha_mask_set(Evas_Object *obj, Eina_Bool ismask) { Evas_Object_Image *o; if (!ismask) return; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); o = (Evas_Object_Image *)(obj->object_data); MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); return; MAGIC_CHECK_END(); /* Convert to A8 if not already */ /* done */ } #define FRAME_MAX 1024 EAPI Evas_Image_Content_Hint evas_object_image_content_hint_get(const Evas_Object *obj) { Evas_Object_Image *o; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return EVAS_IMAGE_CONTENT_HINT_NONE; MAGIC_CHECK_END(); o = (Evas_Object_Image *)(obj->object_data); MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); return EVAS_IMAGE_CONTENT_HINT_NONE; MAGIC_CHECK_END(); return o->content_hint; } EAPI Eina_Bool evas_object_image_region_support_get(const Evas_Object *obj) { Evas_Object_Image *o; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return EINA_FALSE; MAGIC_CHECK_END(); o = (Evas_Object_Image *) (obj->object_data); MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); return EINA_FALSE; MAGIC_CHECK_END(); return obj->layer->evas->engine.func->image_can_region_get( obj->layer->evas->engine.data.output, o->engine_data); } /* animated feature */ EAPI Eina_Bool evas_object_image_animated_get(const Evas_Object *obj) { Evas_Object_Image *o; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return EINA_FALSE; MAGIC_CHECK_END(); o = (Evas_Object_Image *)(obj->object_data); MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); return EINA_FALSE; MAGIC_CHECK_END(); if (obj->layer->evas->engine.func->image_animated_get) return obj->layer->evas->engine.func->image_animated_get(obj->layer->evas->engine.data.output, o->engine_data); return EINA_FALSE; } EAPI int evas_object_image_animated_frame_count_get(const Evas_Object *obj) { Evas_Object_Image *o; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return -1; MAGIC_CHECK_END(); o = (Evas_Object_Image *)(obj->object_data); MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); return -1; MAGIC_CHECK_END(); if (!evas_object_image_animated_get(obj)) return -1; if (obj->layer->evas->engine.func->image_animated_frame_count_get) return obj->layer->evas->engine.func->image_animated_frame_count_get(obj->layer->evas->engine.data.output, o->engine_data); return -1; } EAPI Evas_Image_Animated_Loop_Hint evas_object_image_animated_loop_type_get(const Evas_Object *obj) { Evas_Object_Image *o; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return EVAS_IMAGE_ANIMATED_HINT_NONE; MAGIC_CHECK_END(); o = (Evas_Object_Image *)(obj->object_data); MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); return EVAS_IMAGE_ANIMATED_HINT_NONE; MAGIC_CHECK_END(); if (!evas_object_image_animated_get(obj)) return EVAS_IMAGE_ANIMATED_HINT_NONE; if (obj->layer->evas->engine.func->image_animated_loop_type_get) return obj->layer->evas->engine.func->image_animated_loop_type_get(obj->layer->evas->engine.data.output, o->engine_data); return EVAS_IMAGE_ANIMATED_HINT_NONE; } EAPI int evas_object_image_animated_loop_count_get(const Evas_Object *obj) { Evas_Object_Image *o; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return -1; MAGIC_CHECK_END(); o = (Evas_Object_Image *)(obj->object_data); MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); return -1; MAGIC_CHECK_END(); if (!evas_object_image_animated_get(obj)) return -1; if (obj->layer->evas->engine.func->image_animated_loop_count_get) return obj->layer->evas->engine.func->image_animated_loop_count_get(obj->layer->evas->engine.data.output, o->engine_data); return -1; } EAPI double evas_object_image_animated_frame_duration_get(const Evas_Object *obj, int start_frame, int frame_num) { Evas_Object_Image *o; int frame_count = 0; if (start_frame < 1) return -1; if (frame_num < 0) return -1; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return -1; MAGIC_CHECK_END(); o = (Evas_Object_Image *)(obj->object_data); MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); return -1; MAGIC_CHECK_END(); if (!evas_object_image_animated_get(obj)) return -1; if (!obj->layer->evas->engine.func->image_animated_frame_count_get) return -1; frame_count = obj->layer->evas->engine.func->image_animated_frame_count_get(obj->layer->evas->engine.data.output, o->engine_data); if ((start_frame + frame_num) > frame_count) return -1; if (obj->layer->evas->engine.func->image_animated_frame_duration_get) return obj->layer->evas->engine.func->image_animated_frame_duration_get(obj->layer->evas->engine.data.output, o->engine_data, start_frame, frame_num); return -1; } EAPI void evas_object_image_animated_frame_set(Evas_Object *obj, int frame_index) { Evas_Object_Image *o; int frame_count = 0; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); o = (Evas_Object_Image *)(obj->object_data); MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); return; MAGIC_CHECK_END(); if (!o->cur.file) return; if (o->cur.frame == frame_index) return; if (!evas_object_image_animated_get(obj)) return; frame_count = evas_object_image_animated_frame_count_get(obj); /* limit the size of frame to FRAME_MAX */ if ((frame_count > FRAME_MAX) || (frame_count < 0) || (frame_index > frame_count)) return; if (!obj->layer->evas->engine.func->image_animated_frame_set) return; if (!obj->layer->evas->engine.func->image_animated_frame_set(obj->layer->evas->engine.data.output, o->engine_data, frame_index)) return; o->prev.frame = o->cur.frame; o->cur.frame = frame_index; o->changed = 1; evas_object_change(obj); } EAPI void evas_image_cache_flush(Evas *e) { MAGIC_CHECK(e, Evas, MAGIC_EVAS); return; MAGIC_CHECK_END(); e->engine.func->image_cache_flush(e->engine.data.output); } EAPI void evas_image_cache_reload(Evas *e) { Evas_Layer *layer; MAGIC_CHECK(e, Evas, MAGIC_EVAS); return; MAGIC_CHECK_END(); evas_image_cache_flush(e); EINA_INLIST_FOREACH(e->layers, layer) { Evas_Object *obj; EINA_INLIST_FOREACH(layer->objects, obj) { Evas_Object_Image *o; o = (Evas_Object_Image *)(obj->object_data); if (o->magic == MAGIC_OBJ_IMAGE) { evas_object_image_unload(obj, 1); evas_object_inform_call_image_unloaded(obj); } } } evas_image_cache_flush(e); EINA_INLIST_FOREACH(e->layers, layer) { Evas_Object *obj; EINA_INLIST_FOREACH(layer->objects, obj) { Evas_Object_Image *o; o = (Evas_Object_Image *)(obj->object_data); if (o->magic == MAGIC_OBJ_IMAGE) { evas_object_image_load(obj); o->changed = 1; evas_object_change(obj); } } } evas_image_cache_flush(e); } EAPI void evas_image_cache_set(Evas *e, int size) { MAGIC_CHECK(e, Evas, MAGIC_EVAS); return; MAGIC_CHECK_END(); if (size < 0) size = 0; e->engine.func->image_cache_set(e->engine.data.output, size); } EAPI int evas_image_cache_get(const Evas *e) { MAGIC_CHECK(e, Evas, MAGIC_EVAS); return 0; MAGIC_CHECK_END(); return e->engine.func->image_cache_get(e->engine.data.output); } EAPI Eina_Bool evas_image_max_size_get(const Evas *e, int *maxw, int *maxh) { int w = 0, h = 0; MAGIC_CHECK(e, Evas, MAGIC_EVAS); return EINA_FALSE; MAGIC_CHECK_END(); if (maxw) *maxw = 0xffff; if (maxh) *maxh = 0xffff; if (!e->engine.func->image_max_size_get) return EINA_FALSE; e->engine.func->image_max_size_get(e->engine.data.output, &w, &h); if (maxw) *maxw = w; if (maxh) *maxh = h; return EINA_TRUE; } /* all nice and private */ static void _proxy_unset(Evas_Object *proxy) { Evas_Object_Image *o; o = proxy->object_data; if (!o->cur.source) return; o->cur.source->proxy.proxies = eina_list_remove(o->cur.source->proxy.proxies, proxy); o->cur.source = NULL; if (o->cur.defmap) { evas_map_free(o->cur.defmap); o->cur.defmap = NULL; } o->proxyerror = 0; } static void _proxy_set(Evas_Object *proxy, Evas_Object *src) { Evas_Object_Image *o; o = proxy->object_data; evas_object_image_file_set(proxy, NULL, NULL); o->cur.source = src; o->load_error = EVAS_LOAD_ERROR_NONE; src->proxy.proxies = eina_list_append(src->proxy.proxies, proxy); src->proxy.redraw = EINA_TRUE; o->proxyerror = 0; } /* Some moron just set a proxy on a proxy. * Give them some pixels. A random color */ static void _proxy_error(Evas_Object *proxy, void *context, void *output, void *surface, int x, int y) { Evas_Func *func; Evas_Object_Image *o; o = proxy->object_data; if (!o->proxyerror) printf("Err: Argh! Recursive proxies.\n"); o->proxyerror = 1; func = proxy->layer->evas->engine.func; func->context_color_set(output, context, 0, 0, 0, 255); func->context_multiplier_unset(output, context); func->context_render_op_set(output, context, proxy->cur.render_op); func->rectangle_draw(output, context, surface, proxy->cur.geometry.x + x, proxy->cur.geometry.y + y, proxy->cur.geometry.w, proxy->cur.geometry.h); return; } /* static void _proxy_subrender_recurse(Evas_Object *obj, Evas_Object *clip, void *output, void *surface, void *ctx, int x, int y) { Evas_Object *obj2; Evas *e = obj->layer->evas; if (obj->clip.clipees) return; if (!obj->cur.visible) return; if ((!clip) || (clip != obj->cur.clipper)) { if (!obj->cur.cache.clip.visible) return; if ((obj->cur.cache.clip.a == 0) && (obj->cur.render_op == EVAS_RENDER_BLEND)) return; } if ((obj->func->is_visible) && (!obj->func->is_visible(obj))) return; if (!obj->pre_render_done) obj->func->render_pre(obj); ctx = e->engine.func->context_new(output); if (obj->smart.smart) { EINA_INLIST_FOREACH(evas_object_smart_members_get_direct(obj), obj2) { _proxy_subrender_recurse(obj2, clip, output, surface, ctx, x, y); } } else { obj->func->render(obj, output, ctx, surface, x, y); } e->engine.func->context_free(output, ctx); } */ /** * Render the source object when a proxy is set. * * Used to force a draw if necessary, else just makes sures it's available. */ static void _proxy_subrender(Evas *e, Evas_Object *source) { void *ctx; /* Evas_Object *obj2, *clip;*/ int w, h; if (!source) return; w = source->cur.geometry.w; h = source->cur.geometry.h; source->proxy.redraw = EINA_FALSE; /* We need to redraw surface then */ if ((source->proxy.surface) && ((source->proxy.w != w) || (source->proxy.h != h))) { e->engine.func->image_map_surface_free(e->engine.data.output, source->proxy.surface); source->proxy.surface = NULL; } /* FIXME: Hardcoded alpha 'on' */ /* FIXME (cont): Should see if the object has alpha */ if (!source->proxy.surface) { source->proxy.surface = e->engine.func->image_map_surface_new (e->engine.data.output, w, h, 1); source->proxy.w = w; source->proxy.h = h; } if (!source->proxy.surface) return; ctx = e->engine.func->context_new(e->engine.data.output); e->engine.func->context_color_set(e->engine.data.output, ctx, 0, 0, 0, 0); e->engine.func->context_render_op_set(e->engine.data.output, ctx, EVAS_RENDER_COPY); e->engine.func->rectangle_draw(e->engine.data.output, ctx, source->proxy.surface, 0, 0, w, h); e->engine.func->context_free(e->engine.data.output, ctx); ctx = e->engine.func->context_new(e->engine.data.output); evas_render_mapped(e, source, ctx, source->proxy.surface, -source->cur.geometry.x, -source->cur.geometry.y, 1, 0, 0, e->output.w, e->output.h); e->engine.func->context_free(e->engine.data.output, ctx); source->proxy.surface = e->engine.func->image_dirty_region (e->engine.data.output, source->proxy.surface, 0, 0, w, h); /* ctx = e->engine.func->context_new(e->engine.data.output); if (source->smart.smart) { clip = evas_object_smart_clipped_clipper_get(source); EINA_INLIST_FOREACH(evas_object_smart_members_get_direct(source), obj2) { _proxy_subrender_recurse(obj2, clip, e->engine.data.output, source->proxy.surface, ctx, -source->cur.geometry.x, -source->cur.geometry.y); } } else { if (!source->pre_render_done) source->func->render_pre(source); source->func->render(source, e->engine.data.output, ctx, source->proxy.surface, -source->cur.geometry.x, -source->cur.geometry.y); } e->engine.func->context_free(e->engine.data.output, ctx); source->proxy.surface = e->engine.func->image_dirty_region (e->engine.data.output, source->proxy.surface, 0, 0, w, h); */ } #if 0 // filtering disabled /* * * Note that this is similar to proxy_subrender_recurse. It should be * possible to merge I guess */ static void image_filter_draw_under_recurse(Evas *e, Evas_Object *obj, Evas_Object *stop, void *output, void *ctx, void *surface, int x, int y) { Evas_Object *obj2; if (obj->clip.clipees) return; /* FIXME: Doing bounding box test */ if (!evas_object_is_in_output_rect(obj, stop->cur.geometry.x, stop->cur.geometry.y, stop->cur.geometry.w, stop->cur.geometry.h)) return; if (!evas_object_is_visible(obj)) return; obj->pre_render_done = 1; ctx = e->engine.func->context_new(output); if (obj->smart.smart) { EINA_INLIST_FOREACH(evas_object_smart_members_get_direct(obj), obj2) { if (obj2 == stop) return; image_filter_draw_under_recurse(e, obj2, stop, output, surface, ctx, x, y); } } else obj->func->render(obj, output, ctx, surface, x ,y); e->engine.func->context_free(output, ctx); } /* * Draw all visible objects intersecting an object which are _beneath_ it. */ static void image_filter_draw_under(Evas *e, Evas_Object *stop, void *output, void *ctx, void *surface, int dx, int dy) { Evas_Layer *lay; int x, y; x = stop->cur.geometry.x - dx; y = stop->cur.geometry.y - dy; EINA_INLIST_FOREACH(e->layers, lay) { Evas_Object *obj; EINA_INLIST_FOREACH(lay->objects, obj) { if (obj->delete_me) continue; if (obj == stop) return; /* FIXME: Do bounding box check */ image_filter_draw_under_recurse(e, obj, stop, output, ctx, surface, -x, -y); } } e->engine.func->image_dirty_region(output, surface, 0, 0, 300, 300); e->engine.func->output_flush(output); } /* * Update the filtered object. * * Creates a new context, and renders stuff (filtered) onto that. */ Filtered_Image * image_filter_update(Evas *e, Evas_Object *obj, void *src, int imagew, int imageh, int *outw, int *outh) { int w, h; void *ctx; Evas_Filter_Info *info; void *surface; Eina_Bool alpha; info = obj->filter; if (info->mode == EVAS_FILTER_MODE_BELOW) { w = obj->cur.geometry.w; h = obj->cur.geometry.h; evas_filter_get_size(info, w, h, &imagew, &imageh, EINA_TRUE); alpha = EINA_FALSE; } else { evas_filter_get_size(info, imagew, imageh, &w, &h, EINA_FALSE); alpha = e->engine.func->image_alpha_get(e->engine.data.output, src); } /* Certain filters may make alpha images anyway */ if (alpha == EINA_FALSE) alpha = evas_filter_always_alpha(info); surface = e->engine.func->image_map_surface_new(e->engine.data.output, w, h, alpha); if (info->mode == EVAS_FILTER_MODE_BELOW) { void *subsurface; int disw, dish; int dx, dy; disw = obj->cur.geometry.w; dish = obj->cur.geometry.h; dx = (imagew - w) >> 1; dy = (imageh - h) >> 1; subsurface = e->engine.func->image_map_surface_new (e->engine.data.output, imagew, imageh, 1); ctx = e->engine.func->context_new(e->engine.data.output); e->engine.func->context_color_set(e->engine.data.output, ctx, 0, 255, 0, 255); e->engine.func->context_render_op_set(e->engine.data.output, ctx, EVAS_RENDER_COPY); e->engine.func->rectangle_draw(e->engine.data.output, ctx, subsurface, 0, 0, imagew, imageh); image_filter_draw_under(e, obj, e->engine.data.output, ctx, subsurface, dx, dy); e->engine.func->context_free(e->engine.data.output, ctx); ctx = e->engine.func->context_new(e->engine.data.output); e->engine.func->image_draw_filtered(e->engine.data.output, ctx, surface, subsurface, info); e->engine.func->context_free(e->engine.data.output, ctx); e->engine.func->image_map_surface_free(e->engine.data.output, subsurface); } else { ctx = e->engine.func->context_new(e->engine.data.output); e->engine.func->image_draw_filtered(e->engine.data.output, ctx, surface, src, info); e->engine.func->context_free(e->engine.data.output, ctx); } e->engine.func->image_dirty_region(e->engine.data.output, surface, 0, 0, w, h); if (outw) *outw = w; if (outh) *outh = h; return e->engine.func->image_filtered_save(src, surface, obj->filter->key, obj->filter->len); } #endif static void evas_object_image_unload(Evas_Object *obj, Eina_Bool dirty) { Evas_Object_Image *o; o = (Evas_Object_Image *)(obj->object_data); if ((!o->cur.file) || (o->pixels_checked_out > 0)) return; if (dirty) { if (o->engine_data) o->engine_data = obj->layer->evas->engine.func->image_dirty_region (obj->layer->evas->engine.data.output, o->engine_data, 0, 0, o->cur.image.w, o->cur.image.h); } if (o->engine_data) { if (o->preloading) { o->preloading = 0; obj->layer->evas->engine.func->image_data_preload_cancel(obj->layer->evas->engine.data.output, o->engine_data, obj); } obj->layer->evas->engine.func->image_free(obj->layer->evas->engine.data.output, o->engine_data); } o->engine_data = NULL; o->load_error = EVAS_LOAD_ERROR_NONE; o->cur.has_alpha = 1; o->cur.cspace = EVAS_COLORSPACE_ARGB8888; o->cur.image.w = 0; o->cur.image.h = 0; o->cur.image.stride = 0; } static void evas_object_image_load(Evas_Object *obj) { Evas_Object_Image *o; Evas_Image_Load_Opts lo; o = (Evas_Object_Image *)(obj->object_data); if (o->engine_data) return; lo.scale_down_by = o->load_opts.scale_down_by; lo.dpi = o->load_opts.dpi; lo.w = o->load_opts.w; lo.h = o->load_opts.h; lo.region.x = o->load_opts.region.x; lo.region.y = o->load_opts.region.y; lo.region.w = o->load_opts.region.w; lo.region.h = o->load_opts.region.h; lo.orientation = o->load_opts.orientation; o->engine_data = obj->layer->evas->engine.func->image_load (obj->layer->evas->engine.data.output, o->cur.file, o->cur.key, &o->load_error, &lo); if (o->engine_data) { int w, h; int stride = 0; obj->layer->evas->engine.func->image_size_get (obj->layer->evas->engine.data.output, o->engine_data, &w, &h); if (obj->layer->evas->engine.func->image_stride_get) obj->layer->evas->engine.func->image_stride_get (obj->layer->evas->engine.data.output, o->engine_data, &stride); else stride = w * 4; o->cur.has_alpha = obj->layer->evas->engine.func->image_alpha_get (obj->layer->evas->engine.data.output, o->engine_data); o->cur.cspace = obj->layer->evas->engine.func->image_colorspace_get (obj->layer->evas->engine.data.output, o->engine_data); o->cur.image.w = w; o->cur.image.h = h; o->cur.image.stride = stride; } else { o->load_error = EVAS_LOAD_ERROR_GENERIC; } } static Evas_Coord evas_object_image_figure_x_fill(Evas_Object *obj, Evas_Coord start, Evas_Coord size, Evas_Coord *size_ret) { Evas_Coord w; w = ((size * obj->layer->evas->output.w) / (Evas_Coord)obj->layer->evas->viewport.w); if (size <= 0) size = 1; if (start > 0) { while (start - size > 0) start -= size; } else if (start < 0) { while (start < 0) start += size; } start = ((start * obj->layer->evas->output.w) / (Evas_Coord)obj->layer->evas->viewport.w); *size_ret = w; return start; } static Evas_Coord evas_object_image_figure_y_fill(Evas_Object *obj, Evas_Coord start, Evas_Coord size, Evas_Coord *size_ret) { Evas_Coord h; h = ((size * obj->layer->evas->output.h) / (Evas_Coord)obj->layer->evas->viewport.h); if (size <= 0) size = 1; if (start > 0) { while (start - size > 0) start -= size; } else if (start < 0) { while (start < 0) start += size; } start = ((start * obj->layer->evas->output.h) / (Evas_Coord)obj->layer->evas->viewport.h); *size_ret = h; return start; } static void evas_object_image_init(Evas_Object *obj) { /* alloc image ob, setup methods and default values */ obj->object_data = evas_object_image_new(); /* set up default settings for this kind of object */ obj->cur.color.r = 255; obj->cur.color.g = 255; obj->cur.color.b = 255; obj->cur.color.a = 255; obj->cur.geometry.x = 0; obj->cur.geometry.y = 0; obj->cur.geometry.w = 0; obj->cur.geometry.h = 0; obj->cur.layer = 0; obj->cur.anti_alias = 0; obj->cur.render_op = EVAS_RENDER_BLEND; /* set up object-specific settings */ obj->prev = obj->cur; /* set up methods (compulsory) */ obj->func = &object_func; obj->type = o_type; } static void * evas_object_image_new(void) { Evas_Object_Image *o; /* alloc obj private data */ EVAS_MEMPOOL_INIT(_mp_obj, "evas_object_image", Evas_Object_Image, 16, NULL); o = EVAS_MEMPOOL_ALLOC(_mp_obj, Evas_Object_Image); if (!o) return NULL; EVAS_MEMPOOL_PREP(_mp_obj, o, Evas_Object_Image); o->magic = MAGIC_OBJ_IMAGE; o->cur.fill.w = 0; o->cur.fill.h = 0; o->cur.smooth_scale = 1; o->cur.border.fill = 1; o->cur.border.scale = 1.0; o->cur.cspace = EVAS_COLORSPACE_ARGB8888; o->cur.spread = EVAS_TEXTURE_REPEAT; o->cur.opaque_valid = 0; o->cur.source = NULL; o->prev = o->cur; o->tmpf_fd = -1; return o; } static void evas_object_image_free(Evas_Object *obj) { Evas_Object_Image *o; Eina_Rectangle *r; /* frees private object data. very simple here */ o = (Evas_Object_Image *)(obj->object_data); MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); return; MAGIC_CHECK_END(); /* free obj */ _cleanup_tmpf(obj); if (o->cur.file) eina_stringshare_del(o->cur.file); if (o->cur.key) eina_stringshare_del(o->cur.key); if (o->cur.source) _proxy_unset(obj); if (o->engine_data) { if (o->preloading) { o->preloading = 0; obj->layer->evas->engine.func->image_data_preload_cancel(obj->layer->evas->engine.data.output, o->engine_data, obj); } obj->layer->evas->engine.func->image_free(obj->layer->evas->engine.data.output, o->engine_data); } if (o->video_surface) { o->video_surface = 0; obj->layer->evas->video_objects = eina_list_remove(obj->layer->evas->video_objects, obj); } o->engine_data = NULL; o->magic = 0; EINA_LIST_FREE(o->pixel_updates, r) eina_rectangle_free(r); EVAS_MEMPOOL_FREE(_mp_obj, o); } static void evas_object_image_render(Evas_Object *obj, void *output, void *context, void *surface, int x, int y) { Evas_Object_Image *o; int imagew, imageh, uvw, uvh; void *pixels; /* render object to surface with context, and offset by x,y */ o = (Evas_Object_Image *)(obj->object_data); if ((o->cur.fill.w < 1) || (o->cur.fill.h < 1)) return; /* no error message, already printed in pre_render */ /* Proxy sanity */ if (o->proxyrendering) { _proxy_error(obj, context, output, surface, x, y); return; } /* We are displaying the overlay */ if (o->video_visible) { /* Create a transparent rectangle */ obj->layer->evas->engine.func->context_color_set(output, context, 0, 0, 0, 0); obj->layer->evas->engine.func->context_multiplier_unset(output, context); obj->layer->evas->engine.func->context_render_op_set(output, context, EVAS_RENDER_COPY); obj->layer->evas->engine.func->rectangle_draw(output, context, surface, obj->cur.geometry.x + x, obj->cur.geometry.y + y, obj->cur.geometry.w, obj->cur.geometry.h); return ; } obj->layer->evas->engine.func->context_color_set(output, context, 255, 255, 255, 255); if ((obj->cur.cache.clip.r == 255) && (obj->cur.cache.clip.g == 255) && (obj->cur.cache.clip.b == 255) && (obj->cur.cache.clip.a == 255)) { obj->layer->evas->engine.func->context_multiplier_unset(output, context); } else obj->layer->evas->engine.func->context_multiplier_set(output, context, obj->cur.cache.clip.r, obj->cur.cache.clip.g, obj->cur.cache.clip.b, obj->cur.cache.clip.a); obj->layer->evas->engine.func->context_render_op_set(output, context, obj->cur.render_op); if (!o->cur.source) { pixels = o->engine_data; imagew = o->cur.image.w; imageh = o->cur.image.h; uvw = imagew; uvh = imageh; } else if (o->cur.source->proxy.surface && !o->cur.source->proxy.redraw) { pixels = o->cur.source->proxy.surface; imagew = o->cur.source->proxy.w; imageh = o->cur.source->proxy.h; uvw = imagew; uvh = imageh; } else if (o->cur.source->type == o_type && ((Evas_Object_Image *)o->cur.source->object_data)->engine_data) { Evas_Object_Image *oi; oi = o->cur.source->object_data; pixels = oi->engine_data; imagew = oi->cur.image.w; imageh = oi->cur.image.h; uvw = o->cur.source->cur.geometry.w; uvh = o->cur.source->cur.geometry.h; } else { o->proxyrendering = 1; _proxy_subrender(obj->layer->evas, o->cur.source); pixels = o->cur.source->proxy.surface; imagew = o->cur.source->proxy.w; imageh = o->cur.source->proxy.h; uvw = imagew; uvh = imageh; o->proxyrendering = 0; } #if 0 // filtering disabled /* Now check/update filter */ if (obj->filter && obj->filter->filter) { Filtered_Image *fi = NULL; //printf("%p has filter: %s\n", obj,obj->filter->dirty?"dirty":"clean"); if (obj->filter->dirty) { if (obj->filter->mode != EVAS_FILTER_MODE_BELOW) { uint32_t len; uint8_t *key; if (obj->filter->key) free(obj->filter->key); obj->filter->key = NULL; obj->filter->len = 0; key = evas_filter_key_get(obj->filter, &len); if (key) { obj->filter->key = key; obj->filter->len = len; fi = obj->layer->evas->engine.func->image_filtered_get (o->engine_data, key, len); if (obj->filter->cached && fi != obj->filter->cached) { obj->layer->evas->engine.func->image_filtered_free (o->engine_data, obj->filter->cached); obj->filter->cached = NULL; } } } else if (obj->filter->cached) { obj->layer->evas->engine.func->image_filtered_free (o->engine_data, obj->filter->cached); } if (!fi) fi = image_filter_update(obj->layer->evas, obj, pixels, imagew, imageh, &imagew, &imageh); pixels = fi->image; obj->filter->dirty = 0; obj->filter->cached = fi; } else { fi = obj->filter->cached; pixels = fi->image; } } #endif if (pixels) { Evas_Coord idw, idh, idx, idy; int ix, iy, iw, ih; int img_set = 0; if (o->dirty_pixels) { if (o->func.get_pixels) { // Set img object for direct rendering optimization // Check for image w/h against image geometry w/h // Check for image color r,g,b,a = {255,255,255,255} // Check and make sure that there are no maps. if ( (obj->cur.geometry.w == o->cur.image.w) && (obj->cur.geometry.h == o->cur.image.h) && (obj->cur.color.r == 255) && (obj->cur.color.g == 255) && (obj->cur.color.b == 255) && (obj->cur.color.a == 255) && (!obj->cur.map) ) { if (obj->layer->evas->engine.func->gl_img_obj_set) { obj->layer->evas->engine.func->gl_img_obj_set(output, obj, o->cur.has_alpha); img_set = 1; } } o->func.get_pixels(o->func.get_pixels_data, obj); if (o->engine_data != pixels) pixels = o->engine_data; o->engine_data = obj->layer->evas->engine.func->image_dirty_region (obj->layer->evas->engine.data.output, o->engine_data, 0, 0, o->cur.image.w, o->cur.image.h); } o->dirty_pixels = 0; } if ((obj->cur.map) && (obj->cur.map->count > 3) && (obj->cur.usemap)) { evas_object_map_update(obj, x, y, imagew, imageh, uvw, uvh); obj->layer->evas->engine.func->image_map_draw (output, context, surface, pixels, obj->spans, o->cur.smooth_scale | obj->cur.map->smooth, 0); } else { obj->layer->evas->engine.func->image_scale_hint_set(output, pixels, o->scale_hint); /* This is technically a bug here: If the value is recreated * (which is returned)it may be a new object, however exactly 0 * of all the evas engines do this. */ obj->layer->evas->engine.func->image_border_set(output, pixels, o->cur.border.l, o->cur.border.r, o->cur.border.t, o->cur.border.b); idx = evas_object_image_figure_x_fill(obj, o->cur.fill.x, o->cur.fill.w, &idw); idy = evas_object_image_figure_y_fill(obj, o->cur.fill.y, o->cur.fill.h, &idh); if (idw < 1) idw = 1; if (idh < 1) idh = 1; if (idx > 0) idx -= idw; if (idy > 0) idy -= idh; while ((int)idx < obj->cur.geometry.w) { Evas_Coord ydy; int dobreak_w = 0; ydy = idy; ix = idx; if ((o->cur.fill.w == obj->cur.geometry.w) && (o->cur.fill.x == 0)) { dobreak_w = 1; iw = obj->cur.geometry.w; } else iw = ((int)(idx + idw)) - ix; while ((int)idy < obj->cur.geometry.h) { int dobreak_h = 0; iy = idy; if ((o->cur.fill.h == obj->cur.geometry.h) && (o->cur.fill.y == 0)) { ih = obj->cur.geometry.h; dobreak_h = 1; } else ih = ((int)(idy + idh)) - iy; if ((o->cur.border.l == 0) && (o->cur.border.r == 0) && (o->cur.border.t == 0) && (o->cur.border.b == 0) && (o->cur.border.fill != 0)) obj->layer->evas->engine.func->image_draw(output, context, surface, pixels, 0, 0, imagew, imageh, obj->cur.geometry.x + ix + x, obj->cur.geometry.y + iy + y, iw, ih, o->cur.smooth_scale); else { int inx, iny, inw, inh, outx, outy, outw, outh; int bl, br, bt, bb, bsl, bsr, bst, bsb; int imw, imh, ox, oy; ox = obj->cur.geometry.x + ix + x; oy = obj->cur.geometry.y + iy + y; imw = imagew; imh = imageh; bl = o->cur.border.l; br = o->cur.border.r; bt = o->cur.border.t; bb = o->cur.border.b; if ((bl + br) > iw) { bl = iw / 2; br = iw - bl; } if ((bl + br) > imw) { bl = imw / 2; br = imw - bl; } if ((bt + bb) > ih) { bt = ih / 2; bb = ih - bt; } if ((bt + bb) > imh) { bt = imh / 2; bb = imh - bt; } if (o->cur.border.scale != 1.0) { bsl = ((double)bl * o->cur.border.scale); bsr = ((double)br * o->cur.border.scale); bst = ((double)bt * o->cur.border.scale); bsb = ((double)bb * o->cur.border.scale); } else { bsl = bl; bsr = br; bst = bt; bsb = bb; } // #-- // | inx = 0; iny = 0; inw = bl; inh = bt; outx = ox; outy = oy; outw = bsl; outh = bst; obj->layer->evas->engine.func->image_draw(output, context, surface, pixels, inx, iny, inw, inh, outx, outy, outw, outh, o->cur.smooth_scale); // .## // | inx = bl; iny = 0; inw = imw - bl - br; inh = bt; outx = ox + bsl; outy = oy; outw = iw - bsl - bsr; outh = bst; obj->layer->evas->engine.func->image_draw(output, context, surface, pixels, inx, iny, inw, inh, outx, outy, outw, outh, o->cur.smooth_scale); // --# // | inx = imw - br; iny = 0; inw = br; inh = bt; outx = ox + iw - bsr; outy = oy; outw = bsr; outh = bst; obj->layer->evas->engine.func->image_draw(output, context, surface, pixels, inx, iny, inw, inh, outx, outy, outw, outh, o->cur.smooth_scale); // .-- // # inx = 0; iny = bt; inw = bl; inh = imh - bt - bb; outx = ox; outy = oy + bst; outw = bsl; outh = ih - bst - bsb; obj->layer->evas->engine.func->image_draw(output, context, surface, pixels, inx, iny, inw, inh, outx, outy, outw, outh, o->cur.smooth_scale); // .--. // |##| if (o->cur.border.fill > EVAS_BORDER_FILL_NONE) { inx = bl; iny = bt; inw = imw - bl - br; inh = imh - bt - bb; outx = ox + bsl; outy = oy + bst; outw = iw - bsl - bsr; outh = ih - bst - bsb; if ((o->cur.border.fill == EVAS_BORDER_FILL_SOLID) && (obj->cur.cache.clip.a == 255) && (obj->cur.render_op == EVAS_RENDER_BLEND)) { obj->layer->evas->engine.func->context_render_op_set(output, context, EVAS_RENDER_COPY); obj->layer->evas->engine.func->image_draw(output, context, surface, pixels, inx, iny, inw, inh, outx, outy, outw, outh, o->cur.smooth_scale); obj->layer->evas->engine.func->context_render_op_set(output, context, obj->cur.render_op); } else obj->layer->evas->engine.func->image_draw(output, context, surface, pixels, inx, iny, inw, inh, outx, outy, outw, outh, o->cur.smooth_scale); } // --. // # inx = imw - br; iny = bt; inw = br; inh = imh - bt - bb; outx = ox + iw - bsr; outy = oy + bst; outw = bsr; outh = ih - bst - bsb; obj->layer->evas->engine.func->image_draw(output, context, surface, pixels, inx, iny, inw, inh, outx, outy, outw, outh, o->cur.smooth_scale); // | // #-- inx = 0; iny = imh - bb; inw = bl; inh = bb; outx = ox; outy = oy + ih - bsb; outw = bsl; outh = bsb; obj->layer->evas->engine.func->image_draw(output, context, surface, pixels, inx, iny, inw, inh, outx, outy, outw, outh, o->cur.smooth_scale); // | // .## inx = bl; iny = imh - bb; inw = imw - bl - br; inh = bb; outx = ox + bsl; outy = oy + ih - bsb; outw = iw - bsl - bsr; outh = bsb; obj->layer->evas->engine.func->image_draw(output, context, surface, pixels, inx, iny, inw, inh, outx, outy, outw, outh, o->cur.smooth_scale); // | // --# inx = imw - br; iny = imh - bb; inw = br; inh = bb; outx = ox + iw - bsr; outy = oy + ih - bsb; outw = bsr; outh = bsb; obj->layer->evas->engine.func->image_draw(output, context, surface, pixels, inx, iny, inw, inh, outx, outy, outw, outh, o->cur.smooth_scale); } idy += idh; if (dobreak_h) break; } idx += idw; idy = ydy; if (dobreak_w) break; } } // Unset img object if (img_set) { if (obj->layer->evas->engine.func->gl_img_obj_set) { obj->layer->evas->engine.func->gl_img_obj_set(output, NULL, 0); img_set = 0; } } } } static void evas_object_image_render_pre(Evas_Object *obj) { Evas_Object_Image *o; int is_v = 0, was_v = 0; Evas *e; /* dont pre-render the obj twice! */ if (obj->pre_render_done) return; obj->pre_render_done = 1; /* pre-render phase. this does anything an object needs to do just before */ /* rendering. this could mean loading the image data, retrieving it from */ /* elsewhere, decoding video etc. */ /* then when this is done the object needs to figure if it changed and */ /* if so what and where and add the appropriate redraw rectangles */ o = (Evas_Object_Image *)(obj->object_data); e = obj->layer->evas; if ((o->cur.fill.w < 1) || (o->cur.fill.h < 1)) { ERR("%p has invalid fill size: %dx%d. Ignored", obj, o->cur.fill.w, o->cur.fill.h); return; } /* if someone is clipping this obj - go calculate the clipper */ if (obj->cur.clipper) { if (obj->cur.cache.clip.dirty) evas_object_clip_recalc(obj->cur.clipper); obj->cur.clipper->func->render_pre(obj->cur.clipper); } /* Proxy: Do it early */ if (o->cur.source && (o->cur.source->proxy.redraw || o->cur.source->changed)) { /* XXX: Do I need to sort out the map here? */ evas_object_render_pre_prev_cur_add(&e->clip_changes, obj); goto done; } /* now figure what changed and add draw rects */ /* if it just became visible or invisible */ is_v = evas_object_is_visible(obj); was_v = evas_object_was_visible(obj); if (is_v != was_v) { evas_object_render_pre_visible_change(&e->clip_changes, obj, is_v, was_v); if (!o->pixel_updates) goto done; } if (obj->changed_map) { evas_object_render_pre_prev_cur_add(&e->clip_changes, obj); goto done; } /* it's not visible - we accounted for it appearing or not so just abort */ if (!is_v) goto done; /* clipper changed this is in addition to anything else for obj */ if (is_v && was_v) evas_object_render_pre_clipper_change(&e->clip_changes, obj); /* if we restacked (layer or just within a layer) and don't clip anyone */ if (obj->restack) { evas_object_render_pre_prev_cur_add(&e->clip_changes, obj); if (!o->pixel_updates) goto done; } /* if it changed color */ if ((obj->cur.color.r != obj->prev.color.r) || (obj->cur.color.g != obj->prev.color.g) || (obj->cur.color.b != obj->prev.color.b) || (obj->cur.color.a != obj->prev.color.a)) { evas_object_render_pre_prev_cur_add(&e->clip_changes, obj); if (!o->pixel_updates) goto done; } /* if it changed render op */ if (obj->cur.render_op != obj->prev.render_op) { evas_object_render_pre_prev_cur_add(&e->clip_changes, obj); if (!o->pixel_updates) goto done; } /* if it changed anti_alias */ if (obj->cur.anti_alias != obj->prev.anti_alias) { evas_object_render_pre_prev_cur_add(&e->clip_changes, obj); if (!o->pixel_updates) goto done; } if (o->changed) { if (((o->cur.file) && (!o->prev.file)) || ((!o->cur.file) && (o->prev.file)) || ((o->cur.key) && (!o->prev.key)) || ((!o->cur.key) && (o->prev.key)) ) { evas_object_render_pre_prev_cur_add(&e->clip_changes, obj); if (!o->pixel_updates) goto done; } if ((o->cur.image.w != o->prev.image.w) || (o->cur.image.h != o->prev.image.h) || (o->cur.has_alpha != o->prev.has_alpha) || (o->cur.cspace != o->prev.cspace) || (o->cur.smooth_scale != o->prev.smooth_scale)) { evas_object_render_pre_prev_cur_add(&e->clip_changes, obj); if (!o->pixel_updates) goto done; } if ((o->cur.border.l != o->prev.border.l) || (o->cur.border.r != o->prev.border.r) || (o->cur.border.t != o->prev.border.t) || (o->cur.border.b != o->prev.border.b) || (o->cur.border.fill != o->prev.border.fill) || (o->cur.border.scale != o->prev.border.scale)) { evas_object_render_pre_prev_cur_add(&e->clip_changes, obj); if (!o->pixel_updates) goto done; } if (o->dirty_pixels) { evas_object_render_pre_prev_cur_add(&e->clip_changes, obj); if (!o->pixel_updates) goto done; } if (o->cur.frame != o->prev.frame) { evas_object_render_pre_prev_cur_add(&e->clip_changes, obj); if (!o->pixel_updates) goto done; } } /* if it changed geometry - and obviously not visibility or color */ /* calculate differences since we have a constant color fill */ /* we really only need to update the differences */ #if 0 // XXX: maybe buggy? if (((obj->cur.geometry.x != obj->prev.geometry.x) || (obj->cur.geometry.y != obj->prev.geometry.y) || (obj->cur.geometry.w != obj->prev.geometry.w) || (obj->cur.geometry.h != obj->prev.geometry.h)) && (o->cur.fill.w == o->prev.fill.w) && (o->cur.fill.h == o->prev.fill.h) && ((o->cur.fill.x + obj->cur.geometry.x) == (o->prev.fill.x + obj->prev.geometry.x)) && ((o->cur.fill.y + obj->cur.geometry.y) == (o->prev.fill.y + obj->prev.geometry.y)) && (!o->pixel_updates) ) { evas_rects_return_difference_rects(&e->clip_changes, obj->cur.geometry.x, obj->cur.geometry.y, obj->cur.geometry.w, obj->cur.geometry.h, obj->prev.geometry.x, obj->prev.geometry.y, obj->prev.geometry.w, obj->prev.geometry.h); if (!o->pixel_updates) goto done; } #endif if (((obj->cur.geometry.x != obj->prev.geometry.x) || (obj->cur.geometry.y != obj->prev.geometry.y) || (obj->cur.geometry.w != obj->prev.geometry.w) || (obj->cur.geometry.h != obj->prev.geometry.h)) ) { evas_object_render_pre_prev_cur_add(&e->clip_changes, obj); if (!o->pixel_updates) goto done; } if (o->changed) { if ((o->cur.fill.x != o->prev.fill.x) || (o->cur.fill.y != o->prev.fill.y) || (o->cur.fill.w != o->prev.fill.w) || (o->cur.fill.h != o->prev.fill.h)) { evas_object_render_pre_prev_cur_add(&e->clip_changes, obj); if (!o->pixel_updates) goto done; } if (o->pixel_updates) { if ((o->cur.border.l == 0) && (o->cur.border.r == 0) && (o->cur.border.t == 0) && (o->cur.border.b == 0) && (o->cur.image.w > 0) && (o->cur.image.h > 0) && (!((obj->cur.map) && (obj->cur.usemap)))) { Eina_Rectangle *rr; EINA_LIST_FREE(o->pixel_updates, rr) { Evas_Coord idw, idh, idx, idy; int x, y, w, h; e->engine.func->image_dirty_region(e->engine.data.output, o->engine_data, rr->x, rr->y, rr->w, rr->h); idx = evas_object_image_figure_x_fill(obj, o->cur.fill.x, o->cur.fill.w, &idw); idy = evas_object_image_figure_y_fill(obj, o->cur.fill.y, o->cur.fill.h, &idh); if (idw < 1) idw = 1; if (idh < 1) idh = 1; if (idx > 0) idx -= idw; if (idy > 0) idy -= idh; while (idx < obj->cur.geometry.w) { Evas_Coord ydy; ydy = idy; x = idx; w = ((int)(idx + idw)) - x; while (idy < obj->cur.geometry.h) { Eina_Rectangle r; y = idy; h = ((int)(idy + idh)) - y; r.x = (rr->x * w) / o->cur.image.w; r.y = (rr->y * h) / o->cur.image.h; r.w = ((rr->w * w) + (o->cur.image.w * 2) - 1) / o->cur.image.w; r.h = ((rr->h * h) + (o->cur.image.h * 2) - 1) / o->cur.image.h; r.x += obj->cur.geometry.x + x; r.y += obj->cur.geometry.y + y; RECTS_CLIP_TO_RECT(r.x, r.y, r.w, r.h, obj->cur.cache.clip.x, obj->cur.cache.clip.y, obj->cur.cache.clip.w, obj->cur.cache.clip.h); evas_add_rect(&e->clip_changes, r.x, r.y, r.w, r.h); idy += h; } idx += idw; idy = ydy; } eina_rectangle_free(rr); } goto done; } else { Eina_Rectangle *r; EINA_LIST_FREE(o->pixel_updates, r) eina_rectangle_free(r); e->engine.func->image_dirty_region(e->engine.data.output, o->engine_data, 0, 0, o->cur.image.w, o->cur.image.h); evas_object_render_pre_prev_cur_add(&e->clip_changes, obj); goto done; } } } #if 0 // filtering disabled if (obj->filter && obj->filter->dirty) { evas_object_render_pre_prev_cur_add(&e->clip_changes, obj); } #endif /* it obviously didn't change - add a NO obscure - this "unupdates" this */ /* area so if there were updates for it they get wiped. don't do it if we */ /* aren't fully opaque and we are visible */ if (evas_object_is_visible(obj) && evas_object_is_opaque(obj)) { Evas_Coord x, y, w, h; x = obj->cur.cache.clip.x; y = obj->cur.cache.clip.y; w = obj->cur.cache.clip.w; h = obj->cur.cache.clip.h; if (obj->cur.clipper) { RECTS_CLIP_TO_RECT(x, y, w, h, obj->cur.clipper->cur.cache.clip.x, obj->cur.clipper->cur.cache.clip.y, obj->cur.clipper->cur.cache.clip.w, obj->cur.clipper->cur.cache.clip.h); } e->engine.func->output_redraws_rect_del(e->engine.data.output, x, y, w, h); } done: evas_object_render_pre_effect_updates(&e->clip_changes, obj, is_v, was_v); } static void evas_object_image_render_post(Evas_Object *obj) { Evas_Object_Image *o; Eina_Rectangle *r; /* this moves the current data to the previous state parts of the object */ /* in whatever way is safest for the object. also if we don't need object */ /* data anymore we can free it if the object deems this is a good idea */ o = (Evas_Object_Image *)(obj->object_data); /* remove those pesky changes */ evas_object_clip_changes_clean(obj); EINA_LIST_FREE(o->pixel_updates, r) eina_rectangle_free(r); /* move cur to prev safely for object data */ evas_object_cur_prev(obj); o->prev = o->cur; o->changed = 0; /* FIXME: copy strings across */ } static unsigned int evas_object_image_id_get(Evas_Object *obj) { Evas_Object_Image *o; o = (Evas_Object_Image *)(obj->object_data); if (!o) return 0; return MAGIC_OBJ_IMAGE; } static unsigned int evas_object_image_visual_id_get(Evas_Object *obj) { Evas_Object_Image *o; o = (Evas_Object_Image *)(obj->object_data); if (!o) return 0; return MAGIC_OBJ_IMAGE; } static void *evas_object_image_engine_data_get(Evas_Object *obj) { Evas_Object_Image *o; o = (Evas_Object_Image *)(obj->object_data); if (!o) return NULL; return o->engine_data; } static int evas_object_image_is_opaque(Evas_Object *obj) { Evas_Object_Image *o; /* this returns 1 if the internal object data implies that the object is */ /* currently fully opaque over the entire rectangle it occupies */ o = (Evas_Object_Image *)(obj->object_data); /* disable caching due tyo maps screwing with this o->cur.opaque_valid = 0; if (o->cur.opaque_valid) { if (!o->cur.opaque) return 0; } else */ { o->cur.opaque = 0; /* disable caching */ /* o->cur.opaque_valid = 1; */ if ((o->cur.fill.w < 1) || (o->cur.fill.h < 1)) return o->cur.opaque; if (((o->cur.border.l != 0) || (o->cur.border.r != 0) || (o->cur.border.t != 0) || (o->cur.border.b != 0)) && (!o->cur.border.fill)) return o->cur.opaque; if (!o->engine_data) return o->cur.opaque; o->cur.opaque = 1; } // FIXME: use proxy if (o->cur.source) { o->cur.opaque = evas_object_is_opaque(o->cur.source); return o->cur.opaque; /* FIXME: Should go poke at the object */ } if (o->cur.has_alpha) { o->cur.opaque = 0; return o->cur.opaque; } if ((obj->cur.map) && (obj->cur.usemap)) { Evas_Map *m = obj->cur.map; if ((m->points[0].a == 255) && (m->points[1].a == 255) && (m->points[2].a == 255) && (m->points[3].a == 255)) { if ( ((m->points[0].x == m->points[3].x) && (m->points[1].x == m->points[2].x) && (m->points[0].y == m->points[1].y) && (m->points[2].y == m->points[3].y)) || ((m->points[0].x == m->points[1].x) && (m->points[2].x == m->points[3].x) && (m->points[0].y == m->points[3].y) && (m->points[1].y == m->points[2].y)) ) { if ((m->points[0].x == obj->cur.geometry.x) && (m->points[0].y == obj->cur.geometry.y) && (m->points[2].x == (obj->cur.geometry.x + obj->cur.geometry.w)) && (m->points[2].y == (obj->cur.geometry.y + obj->cur.geometry.h))) return o->cur.opaque; } } o->cur.opaque = 0; return o->cur.opaque; } if (obj->cur.render_op == EVAS_RENDER_COPY) return o->cur.opaque; return o->cur.opaque; } static int evas_object_image_was_opaque(Evas_Object *obj) { Evas_Object_Image *o; /* this returns 1 if the internal object data implies that the object was */ /* previously fully opaque over the entire rectangle it occupies */ o = (Evas_Object_Image *)(obj->object_data); if (o->prev.opaque_valid) { if (!o->prev.opaque) return 0; } else { o->prev.opaque = 0; o->prev.opaque_valid = 1; if ((o->prev.fill.w < 1) || (o->prev.fill.h < 1)) return 0; if (((o->prev.border.l != 0) || (o->prev.border.r != 0) || (o->prev.border.t != 0) || (o->prev.border.b != 0)) && (!o->prev.border.fill)) return 0; if (!o->engine_data) return 0; o->prev.opaque = 1; } // FIXME: use proxy if (o->prev.source) return 0; /* FIXME: Should go poke at the object */ if (obj->prev.usemap) return 0; if (obj->prev.render_op == EVAS_RENDER_COPY) return 1; if (o->prev.has_alpha) return 0; if (obj->prev.render_op != EVAS_RENDER_BLEND) return 0; return 1; } static int evas_object_image_is_inside(Evas_Object *obj, Evas_Coord px, Evas_Coord py) { Evas_Object_Image *o; int imagew, imageh, uvw, uvh; void *pixels; Evas_Func *eng = obj->layer->evas->engine.func; int is_inside = 0; /* the following code is similar to evas_object_image_render(), but doesn't * draw, just get the pixels so we can check the transparency. */ o = (Evas_Object_Image *)(obj->object_data); if (!o->cur.source) { pixels = o->engine_data; imagew = o->cur.image.w; imageh = o->cur.image.h; uvw = imagew; uvh = imageh; } else if (o->cur.source->proxy.surface && !o->cur.source->proxy.redraw) { pixels = o->cur.source->proxy.surface; imagew = o->cur.source->proxy.w; imageh = o->cur.source->proxy.h; uvw = imagew; uvh = imageh; } else if (o->cur.source->type == o_type && ((Evas_Object_Image *)o->cur.source->object_data)->engine_data) { Evas_Object_Image *oi; oi = o->cur.source->object_data; pixels = oi->engine_data; imagew = oi->cur.image.w; imageh = oi->cur.image.h; uvw = o->cur.source->cur.geometry.w; uvh = o->cur.source->cur.geometry.h; } else { o->proxyrendering = EINA_TRUE; _proxy_subrender(obj->layer->evas, o->cur.source); pixels = o->cur.source->proxy.surface; imagew = o->cur.source->proxy.w; imageh = o->cur.source->proxy.h; uvw = imagew; uvh = imageh; o->proxyrendering = EINA_FALSE; } if (pixels) { Evas_Coord idw, idh, idx, idy; int ix, iy, iw, ih; /* TODO: not handling o->dirty_pixels && o->func.get_pixels, * should we handle it now or believe they were done in the last render? */ if (o->dirty_pixels) { if (o->func.get_pixels) { ERR("dirty_pixels && get_pixels not supported"); } } /* TODO: not handling map, need to apply map to point */ if ((obj->cur.map) && (obj->cur.map->count > 3) && (obj->cur.usemap)) { evas_object_map_update(obj, 0, 0, imagew, imageh, uvw, uvh); ERR("map not supported"); } else { void *im; DATA32 *data = NULL; int err = 0; im = obj->layer->evas->engine.func->image_data_get (obj->layer->evas->engine.data.output, pixels, 0, &data, &err); if ((!im) || (!data) || (err)) { ERR("Couldn't get image pixels %p: im=%p, data=%p, err=%d", pixels, im, data, err); goto end; } idx = evas_object_image_figure_x_fill(obj, o->cur.fill.x, o->cur.fill.w, &idw); idy = evas_object_image_figure_y_fill(obj, o->cur.fill.y, o->cur.fill.h, &idh); if (idw < 1) idw = 1; if (idh < 1) idh = 1; if (idx > 0) idx -= idw; if (idy > 0) idy -= idh; while ((int)idx < obj->cur.geometry.w) { Evas_Coord ydy; int dobreak_w = 0; ydy = idy; ix = idx; if ((o->cur.fill.w == obj->cur.geometry.w) && (o->cur.fill.x == 0)) { dobreak_w = 1; iw = obj->cur.geometry.w; } else iw = ((int)(idx + idw)) - ix; while ((int)idy < obj->cur.geometry.h) { int dobreak_h = 0; iy = idy; if ((o->cur.fill.h == obj->cur.geometry.h) && (o->cur.fill.y == 0)) { ih = obj->cur.geometry.h; dobreak_h = 1; } else ih = ((int)(idy + idh)) - iy; if ((o->cur.border.l == 0) && (o->cur.border.r == 0) && (o->cur.border.t == 0) && (o->cur.border.b == 0) && (o->cur.border.fill != 0)) { /* NOTE: render handles cserve2 here, * we don't need to */ { DATA8 alpha = 0; if (eng->pixel_alpha_get(pixels, px, py, &alpha, 0, 0, imagew, imageh, obj->cur.geometry.x + ix, obj->cur.geometry.y + iy, iw, ih)) { is_inside = alpha > 0; dobreak_h = 1; dobreak_w = 1; break; } } } else { int inx, iny, inw, inh, outx, outy, outw, outh; int bl, br, bt, bb, bsl, bsr, bst, bsb; int imw, imh, ox, oy; DATA8 alpha = 0; ox = obj->cur.geometry.x + ix; oy = obj->cur.geometry.y + iy; imw = imagew; imh = imageh; bl = o->cur.border.l; br = o->cur.border.r; bt = o->cur.border.t; bb = o->cur.border.b; if ((bl + br) > iw) { bl = iw / 2; br = iw - bl; } if ((bl + br) > imw) { bl = imw / 2; br = imw - bl; } if ((bt + bb) > ih) { bt = ih / 2; bb = ih - bt; } if ((bt + bb) > imh) { bt = imh / 2; bb = imh - bt; } if (o->cur.border.scale != 1.0) { bsl = ((double)bl * o->cur.border.scale); bsr = ((double)br * o->cur.border.scale); bst = ((double)bt * o->cur.border.scale); bsb = ((double)bb * o->cur.border.scale); } else { bsl = bl; bsr = br; bst = bt; bsb = bb; } // #-- // | inx = 0; iny = 0; inw = bl; inh = bt; outx = ox; outy = oy; outw = bsl; outh = bst; if (eng->pixel_alpha_get(pixels, px, py, &alpha, inx, iny, inw, inh, outx, outy, outw, outh)) { is_inside = alpha > 0; dobreak_h = 1; dobreak_w = 1; break; } // .## // | inx = bl; iny = 0; inw = imw - bl - br; inh = bt; outx = ox + bsl; outy = oy; outw = iw - bsl - bsr; outh = bst; if (eng->pixel_alpha_get(pixels, px, py, &alpha, inx, iny, inw, inh, outx, outy, outw, outh)) { is_inside = alpha > 0; dobreak_h = 1; dobreak_w = 1; break; } // --# // | inx = imw - br; iny = 0; inw = br; inh = bt; outx = ox + iw - bsr; outy = oy; outw = bsr; outh = bst; if (eng->pixel_alpha_get(pixels, px, py, &alpha, inx, iny, inw, inh, outx, outy, outw, outh)) { is_inside = alpha > 0; dobreak_h = 1; dobreak_w = 1; break; } // .-- // # inx = 0; iny = bt; inw = bl; inh = imh - bt - bb; outx = ox; outy = oy + bst; outw = bsl; outh = ih - bst - bsb; if (eng->pixel_alpha_get(pixels, px, py, &alpha, inx, iny, inw, inh, outx, outy, outw, outh)) { is_inside = alpha > 0; dobreak_h = 1; dobreak_w = 1; break; } // .--. // |##| if (o->cur.border.fill > EVAS_BORDER_FILL_NONE) { inx = bl; iny = bt; inw = imw - bl - br; inh = imh - bt - bb; outx = ox + bsl; outy = oy + bst; outw = iw - bsl - bsr; outh = ih - bst - bsb; if (eng->pixel_alpha_get(pixels, px, py, &alpha, inx, iny, inw, inh, outx, outy, outw, outh)) { is_inside = alpha > 0; dobreak_h = 1; dobreak_w = 1; break; } } // --. // # inx = imw - br; iny = bt; inw = br; inh = imh - bt - bb; outx = ox + iw - bsr; outy = oy + bst; outw = bsr; outh = ih - bst - bsb; if (eng->pixel_alpha_get(pixels, px, py, &alpha, inx, iny, inw, inh, outx, outy, outw, outh)) { is_inside = alpha > 0; dobreak_h = 1; dobreak_w = 1; break; } // | // #-- inx = 0; iny = imh - bb; inw = bl; inh = bb; outx = ox; outy = oy + ih - bsb; outw = bsl; outh = bsb; if (eng->pixel_alpha_get(pixels, px, py, &alpha, inx, iny, inw, inh, outx, outy, outw, outh)) { is_inside = alpha > 0; dobreak_h = 1; dobreak_w = 1; break; } // | // .## inx = bl; iny = imh - bb; inw = imw - bl - br; inh = bb; outx = ox + bsl; outy = oy + ih - bsb; outw = iw - bsl - bsr; outh = bsb; if (eng->pixel_alpha_get(pixels, px, py, &alpha, inx, iny, inw, inh, outx, outy, outw, outh)) { is_inside = alpha > 0; dobreak_h = 1; dobreak_w = 1; break; } // | // --# inx = imw - br; iny = imh - bb; inw = br; inh = bb; outx = ox + iw - bsr; outy = oy + ih - bsb; outw = bsr; outh = bsb; if (eng->pixel_alpha_get(pixels, px, py, &alpha, inx, iny, inw, inh, outx, outy, outw, outh)) { is_inside = alpha > 0; dobreak_h = 1; dobreak_w = 1; break; } } idy += idh; if (dobreak_h) break; } idx += idw; idy = ydy; if (dobreak_w) break; } } } end: return is_inside; } static int evas_object_image_has_opaque_rect(Evas_Object *obj) { Evas_Object_Image *o; o = (Evas_Object_Image *)(obj->object_data); if ((obj->cur.map) && (obj->cur.usemap)) return 0; if (((o->cur.border.l | o->cur.border.r | o->cur.border.t | o->cur.border.b) != 0) && (o->cur.border.fill == EVAS_BORDER_FILL_SOLID) && (obj->cur.render_op == EVAS_RENDER_BLEND) && (obj->cur.cache.clip.a == 255) && (o->cur.fill.x == 0) && (o->cur.fill.y == 0) && (o->cur.fill.w == obj->cur.geometry.w) && (o->cur.fill.h == obj->cur.geometry.h) ) return 1; return 0; } static int evas_object_image_get_opaque_rect(Evas_Object *obj, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h) { Evas_Object_Image *o; o = (Evas_Object_Image *)(obj->object_data); if (o->cur.border.scale == 1.0) { *x = obj->cur.geometry.x + o->cur.border.l; *y = obj->cur.geometry.y + o->cur.border.t; *w = obj->cur.geometry.w - (o->cur.border.l + o->cur.border.r); if (*w < 0) *w = 0; *h = obj->cur.geometry.h - (o->cur.border.t + o->cur.border.b); if (*h < 0) *h = 0; } else { *x = obj->cur.geometry.x + (o->cur.border.l * o->cur.border.scale); *y = obj->cur.geometry.y + (o->cur.border.t * o->cur.border.scale); *w = obj->cur.geometry.w - ((o->cur.border.l * o->cur.border.scale) + (o->cur.border.r * o->cur.border.scale)); if (*w < 0) *w = 0; *h = obj->cur.geometry.h - ((o->cur.border.t * o->cur.border.scale) + (o->cur.border.b * o->cur.border.scale)); if (*h < 0) *h = 0; } return 1; } static int evas_object_image_can_map(Evas_Object *obj __UNUSED__) { return 1; } static void * evas_object_image_data_convert_internal(Evas_Object_Image *o, void *data, Evas_Colorspace to_cspace) { void *out = NULL; if (!data) return NULL; switch (o->cur.cspace) { case EVAS_COLORSPACE_ARGB8888: out = evas_common_convert_argb8888_to(data, o->cur.image.w, o->cur.image.h, o->cur.image.stride >> 2, o->cur.has_alpha, to_cspace); break; case EVAS_COLORSPACE_RGB565_A5P: out = evas_common_convert_rgb565_a5p_to(data, o->cur.image.w, o->cur.image.h, o->cur.image.stride >> 1, o->cur.has_alpha, to_cspace); break; case EVAS_COLORSPACE_YCBCR422601_PL: out = evas_common_convert_yuv_422_601_to(data, o->cur.image.w, o->cur.image.h, to_cspace); break; case EVAS_COLORSPACE_YCBCR422P601_PL: out = evas_common_convert_yuv_422P_601_to(data, o->cur.image.w, o->cur.image.h, to_cspace); break; case EVAS_COLORSPACE_YCBCR420NV12601_PL: out = evas_common_convert_yuv_420_601_to(data, o->cur.image.w, o->cur.image.h, to_cspace); break; case EVAS_COLORSPACE_YCBCR420TM12601_PL: out = evas_common_convert_yuv_420T_601_to(data, o->cur.image.w, o->cur.image.h, to_cspace); break; default: WRN("unknow colorspace: %i\n", o->cur.cspace); break; } return out; } static void evas_object_image_filled_resize_listener(void *data __UNUSED__, Evas *e __UNUSED__, Evas_Object *obj, void *einfo __UNUSED__) { Evas_Coord w, h; evas_object_geometry_get(obj, NULL, NULL, &w, &h); evas_object_image_fill_set(obj, 0, 0, w, h); } Eina_Bool _evas_object_image_preloading_get(const Evas_Object *obj) { Evas_Object_Image *o = (Evas_Object_Image *)(obj->object_data); if (!o) return EINA_FALSE; MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE); return EINA_FALSE; MAGIC_CHECK_END(); return o->preloading; } void _evas_object_image_preloading_set(Evas_Object *obj, Eina_Bool preloading) { Evas_Object_Image *o = (Evas_Object_Image *)(obj->object_data); o->preloading = preloading; } void _evas_object_image_preloading_check(Evas_Object *obj) { Evas_Object_Image *o = (Evas_Object_Image *)(obj->object_data); if (obj->layer->evas->engine.func->image_load_error_get) o->load_error = obj->layer->evas->engine.func->image_load_error_get (obj->layer->evas->engine.data.output, o->engine_data); } Evas_Object * _evas_object_image_video_parent_get(Evas_Object *obj) { Evas_Object_Image *o = (Evas_Object_Image *)(obj->object_data); return o->video_surface ? o->video.parent : NULL; } void _evas_object_image_video_overlay_show(Evas_Object *obj) { Evas_Object_Image *o = (Evas_Object_Image *)(obj->object_data); if (obj->cur.cache.clip.x != obj->prev.cache.clip.x || obj->cur.cache.clip.y != obj->prev.cache.clip.y || o->created || !o->video_visible) o->video.move(o->video.data, obj, &o->video, obj->cur.cache.clip.x, obj->cur.cache.clip.y); if (obj->cur.cache.clip.w != obj->prev.cache.clip.w || obj->cur.cache.clip.h != obj->prev.cache.clip.h || o->created || !o->video_visible) o->video.resize(o->video.data, obj, &o->video, obj->cur.cache.clip.w, obj->cur.cache.clip.h); if (!o->video_visible || o->created) { o->video.show(o->video.data, obj, &o->video); } else { /* Cancel dirty on the image */ Eina_Rectangle *r; o->dirty_pixels = 0; EINA_LIST_FREE(o->pixel_updates, r) eina_rectangle_free(r); } o->video_visible = EINA_TRUE; o->created = EINA_FALSE; } void _evas_object_image_video_overlay_hide(Evas_Object *obj) { Evas_Object_Image *o = (Evas_Object_Image *)(obj->object_data); if (o->video_visible || o->created) o->video.hide(o->video.data, obj, &o->video); if (evas_object_is_visible(obj)) o->video.update_pixels(o->video.data, obj, &o->video); o->video_visible = EINA_FALSE; o->created = EINA_FALSE; } /* vim:set ts=8 sw=3 sts=3 expandtab cino=>5n-2f0^-2{2(0W1st0 :*/ evas-1.7.9/src/lib/canvas/evas_render.c0000664000175000017500000020327412175475547014713 00000000000000#include "evas_common.h" #include "evas_private.h" #include #ifdef EVAS_CSERVE2 #include "evas_cs2_private.h" #endif // debug rendering /* #define REND_DGB 1 */ /* #define STDOUT_DBG 1 */ #ifdef REND_DGB static FILE *dbf = NULL; static void rend_dbg(const char *txt) { if (!dbf) { #ifdef STDOUT_DBG dbf = stdout; #else dbf = fopen("EVAS-RENDER-DEBUG.log", "w"); #endif if (!dbf) return; } fputs(txt, dbf); fflush(dbf); } #define RD(args...) \ { \ char __tmpbuf[4096]; \ \ snprintf(__tmpbuf, sizeof(__tmpbuf), ##args); \ rend_dbg(__tmpbuf); \ } #define RDI(xxxx) \ { \ char __tmpbuf[4096]; int __tmpi; \ for (__tmpi = 0; __tmpi < xxxx; __tmpi++) \ __tmpbuf[__tmpi] = ' '; \ __tmpbuf[__tmpi] = 0; \ rend_dbg(__tmpbuf); \ } #else #define RD(args...) #define RDI(x) #endif static Eina_List * evas_render_updates_internal(Evas *e, unsigned char make_updates, unsigned char do_draw); EAPI void evas_damage_rectangle_add(Evas *e, int x, int y, int w, int h) { Eina_Rectangle *r; MAGIC_CHECK(e, Evas, MAGIC_EVAS); return; MAGIC_CHECK_END(); NEW_RECT(r, x, y, w, h); if (!r) return; e->damages = eina_list_append(e->damages, r); e->changed = EINA_TRUE; } EAPI void evas_obscured_rectangle_add(Evas *e, int x, int y, int w, int h) { Eina_Rectangle *r; MAGIC_CHECK(e, Evas, MAGIC_EVAS); return; MAGIC_CHECK_END(); NEW_RECT(r, x, y, w, h); if (!r) return; e->obscures = eina_list_append(e->obscures, r); } EAPI void evas_obscured_clear(Evas *e) { Eina_Rectangle *r; MAGIC_CHECK(e, Evas, MAGIC_EVAS); return; MAGIC_CHECK_END(); EINA_LIST_FREE(e->obscures, r) { eina_rectangle_free(r); } } static Eina_Bool _evas_clip_changes_free(const void *container EINA_UNUSED, void *data, void *fdata EINA_UNUSED) { eina_rectangle_free(data); return EINA_TRUE; } static Eina_Bool _evas_render_had_map(Evas_Object *obj) { return ((obj->prev.map) && (obj->prev.usemap)); // return ((!obj->cur.map) && (obj->prev.usemap)); } static Eina_Bool _evas_render_is_relevant(Evas_Object *obj) { return ((evas_object_is_visible(obj) && (!obj->cur.have_clipees)) || (evas_object_was_visible(obj) && (!obj->prev.have_clipees))); } static Eina_Bool _evas_render_can_render(Evas_Object *obj) { return (evas_object_is_visible(obj) && (!obj->cur.have_clipees)); } static void _evas_render_prev_cur_clip_cache_add(Evas *e, Evas_Object *obj) { e->engine.func->output_redraws_rect_add(e->engine.data.output, obj->prev.cache.clip.x, obj->prev.cache.clip.y, obj->prev.cache.clip.w, obj->prev.cache.clip.h); e->engine.func->output_redraws_rect_add(e->engine.data.output, obj->cur.cache.clip.x, obj->cur.cache.clip.y, obj->cur.cache.clip.w, obj->cur.cache.clip.h); } static void _evas_render_cur_clip_cache_del(Evas *e, Evas_Object *obj) { Evas_Coord x, y, w, h; x = obj->cur.cache.clip.x; y = obj->cur.cache.clip.y; w = obj->cur.cache.clip.w; h = obj->cur.cache.clip.h; if (obj->cur.clipper) { RECTS_CLIP_TO_RECT(x, y, w, h, obj->cur.clipper->cur.cache.clip.x, obj->cur.clipper->cur.cache.clip.y, obj->cur.clipper->cur.cache.clip.w, obj->cur.clipper->cur.cache.clip.h); } e->engine.func->output_redraws_rect_del(e->engine.data.output, x, y, w, h); } static void _evas_render_phase1_direct(Evas *e, Eina_Array *active_objects, Eina_Array *restack_objects __UNUSED__, Eina_Array *delete_objects __UNUSED__, Eina_Array *render_objects) { unsigned int i; Eina_List *l; Evas_Object *proxy; RD(" [--- PHASE 1 DIRECT\n"); for (i = 0; i < active_objects->count; i++) { Evas_Object *obj; obj = eina_array_data_get(active_objects, i); if (obj->changed) { /* Flag need redraw on proxy too */ evas_object_clip_recalc(obj); EINA_LIST_FOREACH(obj->proxy.proxies, l, proxy) proxy->proxy.redraw = EINA_TRUE; } } for (i = 0; i < render_objects->count; i++) { Evas_Object *obj; obj = eina_array_data_get(render_objects, i); RD(" OBJ [%p] changed %i\n", obj, obj->changed); if (obj->changed) { /* Flag need redraw on proxy too */ evas_object_clip_recalc(obj); obj->func->render_pre(obj); if (obj->proxy.redraw) _evas_render_prev_cur_clip_cache_add(e, obj); if (obj->proxy.proxies) { obj->proxy.redraw = EINA_TRUE; EINA_LIST_FOREACH(obj->proxy.proxies, l, proxy) { proxy->func->render_pre(proxy); _evas_render_prev_cur_clip_cache_add(e, proxy); } } RD(" pre-render-done smart:%p|%p [%p, %i] | [%p, %i] has_map:%i had_map:%i\n", obj->smart.smart, evas_object_smart_members_get_direct(obj), obj->cur.map, obj->cur.usemap, obj->prev.map, obj->prev.usemap, _evas_render_has_map(obj), _evas_render_had_map(obj)); if ((obj->smart.smart) && (_evas_render_has_map(obj))) { RD(" has map + smart\n"); _evas_render_prev_cur_clip_cache_add(e, obj); } } else { if (obj->smart.smart) { // obj->func->render_pre(obj); } else if ((obj->rect_del) || (evas_object_is_opaque(obj) && evas_object_is_visible(obj))) { RD(" rect del\n"); _evas_render_cur_clip_cache_del(e, obj); } } } RD(" ---]\n"); } static Eina_Bool _evas_render_phase1_object_process(Evas *e, Evas_Object *obj, Eina_Array *active_objects, Eina_Array *restack_objects, Eina_Array *delete_objects, Eina_Array *render_objects, int restack, int *redraw_all, Eina_Bool mapped_parent #ifdef REND_DGB , int level #endif ) { Eina_Bool clean_them = EINA_FALSE; Evas_Object *obj2; int is_active; Eina_Bool map, hmap; //Need pre render for the children of mapped object. //But only when they have changed. if (mapped_parent && (!obj->changed)) return EINA_FALSE; obj->rect_del = EINA_FALSE; obj->render_pre = EINA_FALSE; if (obj->delete_me == 2) eina_array_push(delete_objects, obj); else if (obj->delete_me != 0) obj->delete_me++; /* If the object will be removed, we should not cache anything during this run. */ if (obj->delete_me != 0) clean_them = EINA_TRUE; /* build active object list */ evas_object_clip_recalc(obj); is_active = evas_object_is_active(obj); obj->is_active = is_active; RDI(level); RD(" [--- PROCESS [%p] '%s' active = %i, del = %i | %i %i %ix%i\n", obj, obj->type, is_active, obj->delete_me, obj->cur.geometry.x, obj->cur.geometry.y, obj->cur.geometry.w, obj->cur.geometry.h); if ((!mapped_parent) && ((is_active) || (obj->delete_me != 0))) eina_array_push(active_objects, obj); #ifdef REND_DGB if (!is_active) { RDI(level); RD(" [%p] vis: %i, cache.clip.vis: %i cache.clip.a: %i [%p]\n", obj, obj->cur.visible, obj->cur.cache.clip.visible, obj->cur.cache.clip.a, obj->func->is_visible); } #endif map = _evas_render_has_map(obj); hmap = _evas_render_had_map(obj); if ((restack) && (!map)) { if (!obj->changed) { eina_array_push(&e->pending_objects, obj); obj->changed = EINA_TRUE; } obj->restack = EINA_TRUE; clean_them = EINA_TRUE; } if (map) { RDI(level); RD(" obj mapped\n"); if (obj->changed) { if (map != hmap) *redraw_all = 1; if ((is_active) && (!obj->clip.clipees) && ((evas_object_is_visible(obj) && (!obj->cur.have_clipees)) || (evas_object_was_visible(obj) && (!obj->prev.have_clipees)))) { eina_array_push(render_objects, obj); _evas_render_prev_cur_clip_cache_add(e, obj); obj->render_pre = EINA_TRUE; if (obj->smart.smart) { EINA_INLIST_FOREACH(evas_object_smart_members_get_direct(obj), obj2) { _evas_render_phase1_object_process(e, obj2, active_objects, restack_objects, delete_objects, render_objects, obj->restack, redraw_all, EINA_TRUE #ifdef REND_DGB , level + 1 #endif ); } } } } return clean_them; } else if (hmap) { RDI(level); RD(" had map - restack objs\n"); // eina_array_push(restack_objects, obj); _evas_render_prev_cur_clip_cache_add(e, obj); if (obj->changed) { if (!map) { if ((obj->cur.map) && (obj->cur.usemap)) map = EINA_TRUE; } if (map != hmap) { *redraw_all = 1; } } } /* handle normal rendering. this object knows how to handle maps */ if (obj->changed) { if (obj->smart.smart) { RDI(level); RD(" changed + smart - render ok\n"); eina_array_push(render_objects, obj); obj->render_pre = EINA_TRUE; EINA_INLIST_FOREACH(evas_object_smart_members_get_direct(obj), obj2) { _evas_render_phase1_object_process(e, obj2, active_objects, restack_objects, delete_objects, render_objects, obj->restack, redraw_all, mapped_parent #ifdef REND_DGB , level + 1 #endif ); } } else { if ((!obj->clip.clipees) && _evas_render_is_relevant(obj)) { if (is_active) { RDI(level); RD(" relevant + active\n"); if (obj->restack) eina_array_push(restack_objects, obj); else { eina_array_push(render_objects, obj); obj->render_pre = EINA_TRUE; } } else { /* It goes to be hidden. Prev caching should be replaced by the current (hidden) state. */ if (evas_object_is_visible(obj) != evas_object_was_visible(obj)) evas_object_cur_prev(obj); RDI(level); RD(" skip - not smart, not active or clippees or not relevant\n"); } } else { RDI(level); RD(" skip - not smart, not active or clippees or not relevant\n"); } } } else { RD(" not changed... [%i] -> (%i %i %p %i) [%i]\n", evas_object_is_visible(obj), obj->cur.visible, obj->cur.cache.clip.visible, obj->smart.smart, obj->cur.cache.clip.a, evas_object_was_visible(obj)); if ((!obj->clip.clipees) && (obj->delete_me == 0) && (_evas_render_can_render(obj) || (evas_object_was_visible(obj) && (!obj->prev.have_clipees)))) { if (obj->smart.smart) { RDI(level); RD(" smart + visible/was visible + not clip\n"); eina_array_push(render_objects, obj); obj->render_pre = EINA_TRUE; EINA_INLIST_FOREACH (evas_object_smart_members_get_direct(obj), obj2) { _evas_render_phase1_object_process(e, obj2, active_objects, restack_objects, delete_objects, render_objects, restack, redraw_all, mapped_parent #ifdef REND_DGB , level + 1 #endif ); } } else { if (evas_object_is_opaque(obj) && evas_object_is_visible(obj)) { RDI(level); RD(" opaque + visible\n"); eina_array_push(render_objects, obj); obj->rect_del = EINA_TRUE; } else if (evas_object_is_visible(obj)) { RDI(level); RD(" visible\n"); eina_array_push(render_objects, obj); obj->render_pre = EINA_TRUE; } else { RDI(level); RD(" skip\n"); } } } /* else if (obj->smart.smart) { RDI(level); RD(" smart + mot visible/was visible\n"); eina_array_push(render_objects, obj); obj->render_pre = 1; EINA_INLIST_FOREACH (evas_object_smart_members_get_direct(obj), obj2) { _evas_render_phase1_object_process(e, obj2, active_objects, restack_objects, delete_objects, render_objects, restack, redraw_all #ifdef REND_DGB , level + 1 #endif ); } } */ } if (!is_active) obj->restack = EINA_FALSE; RDI(level); RD(" ---]\n"); return clean_them; } static Eina_Bool _evas_render_phase1_process(Evas *e, Eina_Array *active_objects, Eina_Array *restack_objects, Eina_Array *delete_objects, Eina_Array *render_objects, int *redraw_all) { Evas_Layer *lay; Eina_Bool clean_them = EINA_FALSE; RD(" [--- PHASE 1\n"); EINA_INLIST_FOREACH(e->layers, lay) { Evas_Object *obj; EINA_INLIST_FOREACH(lay->objects, obj) { clean_them |= _evas_render_phase1_object_process (e, obj, active_objects, restack_objects, delete_objects, render_objects, 0, redraw_all, EINA_FALSE #ifdef REND_DGB , 1 #endif ); } } RD(" ---]\n"); return clean_them; } static void _evas_render_check_pending_objects(Eina_Array *pending_objects, Evas *e) { unsigned int i; for (i = 0; i < pending_objects->count; ++i) { Evas_Object *obj; int is_active; Eina_Bool ok = EINA_FALSE; obj = eina_array_data_get(pending_objects, i); if (!obj->layer) goto clean_stuff; //If the children are in active objects, They should be cleaned up. if (obj->changed_map && _evas_render_has_map(obj)) goto clean_stuff; evas_object_clip_recalc(obj); is_active = evas_object_is_active(obj); if ((!is_active) && (!obj->is_active) && (!obj->render_pre) && (!obj->rect_del)) { ok = EINA_TRUE; goto clean_stuff; } if (obj->is_active == is_active) { if (obj->changed) { if (obj->smart.smart) { if (obj->render_pre || obj->rect_del) ok = EINA_TRUE; } else if ((is_active) && (obj->restack) && (!obj->clip.clipees) && (_evas_render_can_render(obj) || (evas_object_was_visible(obj) && (!obj->prev.have_clipees)))) { if (!(obj->render_pre || obj->rect_del)) ok = EINA_TRUE; } else if (is_active && (!obj->clip.clipees) && (_evas_render_can_render(obj) || (evas_object_was_visible(obj) && (!obj->prev.have_clipees)))) { if (obj->render_pre || obj->rect_del) ok = EINA_TRUE; } } else { if ((!obj->clip.clipees) && (obj->delete_me == 0) && (!obj->cur.have_clipees || (evas_object_was_visible(obj) && (!obj->prev.have_clipees))) && evas_object_is_opaque(obj) && evas_object_is_visible(obj)) { if (obj->rect_del || obj->smart.smart) ok = EINA_TRUE; } } } clean_stuff: if (!ok) { eina_array_clean(&e->active_objects); eina_array_clean(&e->render_objects); eina_array_clean(&e->restack_objects); eina_array_clean(&e->delete_objects); e->invalidate = EINA_TRUE; return ; } } } Eina_Bool pending_change(void *data, void *gdata __UNUSED__) { Evas_Object *obj; obj = data; if (obj->delete_me) return EINA_FALSE; if (obj->pre_render_done) { RD(" OBJ [%p] pending change %i -> 0, pre %i\n", obj, obj->changed, obj->pre_render_done); obj->pre_render_done = EINA_FALSE; evas_object_change_reset(obj); } return obj->changed ? EINA_TRUE : EINA_FALSE; } static Eina_Bool _evas_render_can_use_overlay(Evas *e, Evas_Object *obj) { Eina_Rectangle *r; Evas_Object *tmp; Eina_List *alphas = NULL; Eina_List *opaques = NULL; Evas_Object *video_parent = NULL; Eina_Rectangle zone; Evas_Coord xc1, yc1, xc2, yc2; unsigned int i; Eina_Bool nooverlay; video_parent = _evas_object_image_video_parent_get(obj); /* Check if any one is the stack make this object mapped */ tmp = obj; while (tmp && !_evas_render_has_map(tmp)) tmp = tmp->smart.parent; if (tmp && _evas_render_has_map(tmp)) return EINA_FALSE; /* we are mapped, we can't be an overlay */ if (!evas_object_is_visible(obj)) return EINA_FALSE; /* no need to update the overlay if it's not visible */ /* If any recoloring of the surface is needed, n overlay to */ if ((obj->cur.cache.clip.r != 255) || (obj->cur.cache.clip.g != 255) || (obj->cur.cache.clip.b != 255) || (obj->cur.cache.clip.a != 255)) return EINA_FALSE; /* Check presence of transparent object on top of the video object */ EINA_RECTANGLE_SET(&zone, obj->cur.cache.clip.x, obj->cur.cache.clip.y, obj->cur.cache.clip.w, obj->cur.cache.clip.h); for (i = e->active_objects.count - 1; i > 0; i--) { Eina_Rectangle self; Eina_Rectangle *match; Evas_Object *current; Eina_List *l; int xm1, ym1, xm2, ym2; current = eina_array_data_get(&e->active_objects, i); /* Did we find the video object in the stack ? */ if (current == video_parent || current == obj) break; EINA_RECTANGLE_SET(&self, current->cur.cache.clip.x, current->cur.cache.clip.y, current->cur.cache.clip.w, current->cur.cache.clip.h); /* This doesn't cover the area of the video object, so don't bother with that object */ if (!eina_rectangles_intersect(&zone, &self)) continue; xc1 = current->cur.cache.clip.x; yc1 = current->cur.cache.clip.y; xc2 = current->cur.cache.clip.x + current->cur.cache.clip.w; yc2 = current->cur.cache.clip.y + current->cur.cache.clip.h; if (evas_object_is_visible(current) && (!current->clip.clipees) && (current->cur.visible) && (!current->delete_me) && (current->cur.cache.clip.visible) && (!current->smart.smart)) { Eina_Bool included = EINA_FALSE; if (evas_object_is_opaque(current) || ((current->func->has_opaque_rect) && (current->func->has_opaque_rect(current)))) { /* The object is opaque */ /* Check if the opaque object is inside another opaque object */ EINA_LIST_FOREACH(opaques, l, match) { xm1 = match->x; ym1 = match->y; xm2 = match->x + match->w; ym2 = match->y + match->h; /* Both object are included */ if (xc1 >= xm1 && yc1 >= ym1 && xc2 <= xm2 && yc2 <= ym2) { included = EINA_TRUE; break; } } /* Not included yet */ if (!included) { Eina_List *ln; Evas_Coord xn2, yn2; r = eina_rectangle_new(current->cur.cache.clip.x, current->cur.cache.clip.y, current->cur.cache.clip.w, current->cur.cache.clip.h); opaques = eina_list_append(opaques, r); xn2 = r->x + r->w; yn2 = r->y + r->h; /* Remove all the transparent object that are covered by the new opaque object */ EINA_LIST_FOREACH_SAFE(alphas, l, ln, match) { xm1 = match->x; ym1 = match->y; xm2 = match->x + match->w; ym2 = match->y + match->h; if (xm1 >= r->x && ym1 >= r->y && xm2 <= xn2 && ym2 <= yn2) { /* The new rectangle is over some transparent object, so remove the transparent object */ alphas = eina_list_remove_list(alphas, l); } } } } else { /* The object has some transparency */ /* Check if the transparent object is inside any other transparent object */ EINA_LIST_FOREACH(alphas, l, match) { xm1 = match->x; ym1 = match->y; xm2 = match->x + match->w; ym2 = match->y + match->h; /* Both object are included */ if (xc1 >= xm1 && yc1 >= ym1 && xc2 <= xm2 && yc2 <= ym2) { included = EINA_TRUE; break; } } /* If not check if it is inside any opaque one */ if (!included) { EINA_LIST_FOREACH(opaques, l, match) { xm1 = match->x; ym1 = match->y; xm2 = match->x + match->w; ym2 = match->y + match->h; /* Both object are included */ if (xc1 >= xm1 && yc1 >= ym1 && xc2 <= xm2 && yc2 <= ym2) { included = EINA_TRUE; break; } } } /* No inclusion at all, so add it */ if (!included) { r = eina_rectangle_new(current->cur.cache.clip.x, current->cur.cache.clip.y, current->cur.cache.clip.w, current->cur.cache.clip.h); alphas = eina_list_append(alphas, r); } } } } /* If there is any pending transparent object, then no overlay */ nooverlay = !!eina_list_count(alphas); EINA_LIST_FREE(alphas, r) eina_rectangle_free(r); EINA_LIST_FREE(opaques, r) eina_rectangle_free(r); if (nooverlay) return EINA_FALSE; return EINA_TRUE; } Eina_Bool evas_render_mapped(Evas *e, Evas_Object *obj, void *context, void *surface, int off_x, int off_y, int mapped, int ecx, int ecy, int ecw, int ech #ifdef REND_DGB , int level #endif ) { void *ctx; Evas_Object *obj2; Eina_Bool clean_them = EINA_FALSE; evas_object_clip_recalc(obj); RDI(level); RD(" { evas_render_mapped(%p, %p, %p, %p, %i, %i, %i, %i)\n", e, obj, context, surface, off_x, off_y, mapped, level); if (mapped) { if ((!evas_object_is_visible(obj)) || (obj->clip.clipees) || (obj->cur.have_clipees)) { RDI(level); RD(" }\n"); return clean_them; } } else if (!(((evas_object_is_active(obj) && (!obj->clip.clipees) && (_evas_render_can_render(obj)))) )) { RDI(level); RD(" }\n"); return clean_them; } // set render_pre - for child objs that may not have gotten it. obj->pre_render_done = EINA_TRUE; RD(" Hasmap: %p (%d) %p %d -> %d\n",obj->func->can_map, obj->func->can_map ? obj->func->can_map(obj): -1, obj->cur.map, obj->cur.usemap, _evas_render_has_map(obj)); if (_evas_render_has_map(obj)) { int sw, sh; Eina_Bool changed = EINA_FALSE, rendered = EINA_FALSE; clean_them = EINA_TRUE; sw = obj->cur.geometry.w; sh = obj->cur.geometry.h; RDI(level); RD(" mapped obj: %ix%i\n", sw, sh); if ((sw <= 0) || (sh <= 0)) { RDI(level); RD(" }\n"); return clean_them; } evas_object_map_update(obj, off_x, off_y, sw, sh, sw, sh); if (obj->map.surface) { if ((obj->map.surface_w != sw) || (obj->map.surface_h != sh)) { RDI(level); RD(" new surf: %ix%i\n", sw, sh); obj->layer->evas->engine.func->image_map_surface_free (e->engine.data.output, obj->map.surface); obj->map.surface = NULL; } } if (!obj->map.surface) { obj->map.surface_w = sw; obj->map.surface_h = sh; obj->map.surface = obj->layer->evas->engine.func->image_map_surface_new (e->engine.data.output, obj->map.surface_w, obj->map.surface_h, obj->cur.map->alpha); RDI(level); RD(" fisrt surf: %ix%i\n", sw, sh); changed = EINA_TRUE; } if (obj->smart.smart) { Evas_Object *o2; EINA_INLIST_FOREACH(evas_object_smart_members_get_direct(obj), o2) { if (!evas_object_is_visible(o2) && !evas_object_was_visible(o2)) { evas_object_change_reset(o2); continue; } if (o2->changed) { changed = EINA_TRUE; evas_object_change_reset(o2); break; } } if (obj->changed_color) changed = EINA_TRUE; evas_object_change_reset(obj); } else if (obj->changed) { if (((obj->changed_pchange) && (obj->changed_map)) || (obj->changed_color)) changed = EINA_TRUE; evas_object_change_reset(obj); } /* mark the old map as invalid, so later we don't reuse it as a * cache. */ if (changed && obj->prev.map) obj->prev.valid_map = EINA_FALSE; // clear surface before re-render if ((changed) && (obj->map.surface)) { int off_x2, off_y2; RDI(level); RD(" children redraw\n"); // FIXME: calculate "changes" within map surface and only clear // and re-render those if (obj->cur.map->alpha) { ctx = e->engine.func->context_new(e->engine.data.output); e->engine.func->context_color_set (e->engine.data.output, ctx, 0, 0, 0, 0); e->engine.func->context_render_op_set (e->engine.data.output, ctx, EVAS_RENDER_COPY); e->engine.func->rectangle_draw(e->engine.data.output, ctx, obj->map.surface, 0, 0, obj->map.surface_w, obj->map.surface_h); e->engine.func->context_free(e->engine.data.output, ctx); } ctx = e->engine.func->context_new(e->engine.data.output); off_x2 = -obj->cur.geometry.x; off_y2 = -obj->cur.geometry.y; if (obj->smart.smart) { EINA_INLIST_FOREACH (evas_object_smart_members_get_direct(obj), obj2) { clean_them |= evas_render_mapped(e, obj2, ctx, obj->map.surface, off_x2, off_y2, 1, ecx, ecy, ecw, ech #ifdef REND_DGB , level + 1 #endif ); evas_object_change_reset(obj2); } } else { int x = 0, y = 0, w = 0, h = 0; w = obj->map.surface_w; h = obj->map.surface_h; RECTS_CLIP_TO_RECT(x, y, w, h, obj->cur.geometry.x + off_x2, obj->cur.geometry.y + off_y2, obj->cur.geometry.w, obj->cur.geometry.h); e->engine.func->context_clip_set(e->engine.data.output, ctx, x, y, w, h); obj->func->render(obj, e->engine.data.output, ctx, obj->map.surface, off_x2, off_y2); } e->engine.func->context_free(e->engine.data.output, ctx); rendered = EINA_TRUE; } RDI(level); RD(" draw map\n"); if (rendered) { obj->map.surface = e->engine.func->image_dirty_region (e->engine.data.output, obj->map.surface, 0, 0, obj->map.surface_w, obj->map.surface_h); obj->cur.valid_map = EINA_TRUE; } e->engine.func->context_clip_unset(e->engine.data.output, context); if (obj->map.surface) { if (obj->cur.clipper) { int x, y, w, h; evas_object_clip_recalc(obj); x = obj->cur.cache.clip.x; y = obj->cur.cache.clip.y; w = obj->cur.cache.clip.w; h = obj->cur.cache.clip.h; if (obj->smart.smart) { Evas_Object *tobj; obj->cur.cache.clip.dirty = EINA_TRUE; tobj = obj->cur.map_parent; obj->cur.map_parent = obj->cur.clipper->cur.map_parent; obj->cur.map_parent = tobj; } RECTS_CLIP_TO_RECT(x, y, w, h, obj->cur.clipper->cur.cache.clip.x, obj->cur.clipper->cur.cache.clip.y, obj->cur.clipper->cur.cache.clip.w, obj->cur.clipper->cur.cache.clip.h); e->engine.func->context_clip_set(e->engine.data.output, context, x + off_x, y + off_y, w, h); } } // if (surface == e->engine.data.output) e->engine.func->context_clip_clip(e->engine.data.output, context, ecx, ecy, ecw, ech); if (obj->cur.cache.clip.visible) { obj->layer->evas->engine.func->context_multiplier_unset (e->engine.data.output, context); obj->layer->evas->engine.func->image_map_draw (e->engine.data.output, context, surface, obj->map.surface, obj->spans, obj->cur.map->smooth, 0); } // FIXME: needs to cache these maps and // keep them only rendering updates // obj->layer->evas->engine.func->image_map_surface_free // (e->engine.data.output, obj->map.surface); // obj->map.surface = NULL; } else { if (0 && obj->cur.cached_surface) fprintf(stderr, "We should cache '%s' [%i, %i, %i, %i]\n", evas_object_type_get(obj), obj->cur.bounding_box.x, obj->cur.bounding_box.x, obj->cur.bounding_box.w, obj->cur.bounding_box.h); if (mapped) { RDI(level); RD(" draw child of mapped obj\n"); ctx = e->engine.func->context_new(e->engine.data.output); if (obj->smart.smart) { EINA_INLIST_FOREACH (evas_object_smart_members_get_direct(obj), obj2) { clean_them |= evas_render_mapped(e, obj2, ctx, surface, off_x, off_y, 1, ecx, ecy, ecw, ech #ifdef REND_DGB , level + 1 #endif ); } } else { RDI(level); if (obj->cur.clipper) { RD(" clip: %i %i %ix%i [%i %i %ix%i]\n", obj->cur.cache.clip.x + off_x, obj->cur.cache.clip.y + off_y, obj->cur.cache.clip.w, obj->cur.cache.clip.h, obj->cur.geometry.x + off_x, obj->cur.geometry.y + off_y, obj->cur.geometry.w, obj->cur.geometry.h); RD(" clipper: %i %i %ix%i\n", obj->cur.clipper->cur.cache.clip.x + off_x, obj->cur.clipper->cur.cache.clip.y + off_y, obj->cur.clipper->cur.cache.clip.w, obj->cur.clipper->cur.cache.clip.h); int x, y, w, h; if (_evas_render_has_map(obj)) evas_object_clip_recalc(obj); x = obj->cur.cache.clip.x + off_x; y = obj->cur.cache.clip.y + off_y; w = obj->cur.cache.clip.w; h = obj->cur.cache.clip.h; RECTS_CLIP_TO_RECT(x, y, w, h, obj->cur.clipper->cur.cache.clip.x + off_x, obj->cur.clipper->cur.cache.clip.y + off_y, obj->cur.clipper->cur.cache.clip.w, obj->cur.clipper->cur.cache.clip.h); e->engine.func->context_clip_set(e->engine.data.output, ctx, x, y, w, h); } obj->func->render(obj, e->engine.data.output, ctx, surface, off_x, off_y); } e->engine.func->context_free(e->engine.data.output, ctx); } else { if (obj->cur.clipper) { int x, y, w, h; if (_evas_render_has_map(obj)) evas_object_clip_recalc(obj); x = obj->cur.cache.clip.x; y = obj->cur.cache.clip.y; w = obj->cur.cache.clip.w; h = obj->cur.cache.clip.h; RECTS_CLIP_TO_RECT(x, y, w, h, obj->cur.clipper->cur.cache.clip.x, obj->cur.clipper->cur.cache.clip.y, obj->cur.clipper->cur.cache.clip.w, obj->cur.clipper->cur.cache.clip.h); e->engine.func->context_clip_set(e->engine.data.output, context, x + off_x, y + off_y, w, h); e->engine.func->context_clip_clip(e->engine.data.output, context, ecx, ecy, ecw, ech); } RDI(level); RD(" draw normal obj\n"); obj->func->render(obj, e->engine.data.output, context, surface, off_x, off_y); } if (obj->changed_map) clean_them = EINA_TRUE; } RDI(level); RD(" }\n"); return clean_them; } static void _evas_render_cutout_add(Evas *e, Evas_Object *obj, int off_x, int off_y) { if (evas_object_is_opaque(obj)) { Evas_Coord cox, coy, cow, coh; cox = obj->cur.cache.clip.x; coy = obj->cur.cache.clip.y; cow = obj->cur.cache.clip.w; coh = obj->cur.cache.clip.h; if ((obj->cur.map) && (obj->cur.usemap)) { Evas_Object *oo; oo = obj; while (oo->cur.clipper) { if ((oo->cur.clipper->cur.map_parent != oo->cur.map_parent) && (!((oo->cur.map) && (oo->cur.usemap)))) break; RECTS_CLIP_TO_RECT(cox, coy, cow, coh, oo->cur.geometry.x, oo->cur.geometry.y, oo->cur.geometry.w, oo->cur.geometry.h); oo = oo->cur.clipper; } } e->engine.func->context_cutout_add (e->engine.data.output, e->engine.data.context, cox + off_x, coy + off_y, cow, coh); } else { if (obj->func->get_opaque_rect) { Evas_Coord obx, oby, obw, obh; obj->func->get_opaque_rect(obj, &obx, &oby, &obw, &obh); if ((obw > 0) && (obh > 0)) { obx += off_x; oby += off_y; RECTS_CLIP_TO_RECT(obx, oby, obw, obh, obj->cur.cache.clip.x + off_x, obj->cur.cache.clip.y + off_y, obj->cur.cache.clip.w, obj->cur.cache.clip.h); e->engine.func->context_cutout_add (e->engine.data.output, e->engine.data.context, obx, oby, obw, obh); } } } } static Eina_List * evas_render_updates_internal(Evas *e, unsigned char make_updates, unsigned char do_draw) { Evas_Object *obj; Eina_List *updates = NULL; Eina_List *ll; void *surface; Eina_Bool clean_them = EINA_FALSE; Eina_Bool alpha; Eina_Rectangle *r; int ux, uy, uw, uh; int cx, cy, cw, ch; unsigned int i, j; int redraw_all = 0; Eina_Bool haveup = 0; MAGIC_CHECK(e, Evas, MAGIC_EVAS); return NULL; MAGIC_CHECK_END(); if (!e->changed) return NULL; #ifdef EVAS_CSERVE2 if (evas_cserve2_use_get()) evas_cserve2_dispatch(); #endif evas_call_smarts_calculate(e); RD("[--- RENDER EVAS (size: %ix%i)\n", e->viewport.w, e->viewport.h); evas_event_callback_call(e, EVAS_CALLBACK_RENDER_PRE, NULL); /* Check if the modified object mean recalculating every thing */ if (!e->invalidate) _evas_render_check_pending_objects(&e->pending_objects, e); /* phase 1. add extra updates for changed objects */ if (e->invalidate || e->render_objects.count <= 0) clean_them = _evas_render_phase1_process(e, &e->active_objects, &e->restack_objects, &e->delete_objects, &e->render_objects, &redraw_all); /* phase 1.5. check if the video should be inlined or stay in their overlay */ alpha = e->engine.func->canvas_alpha_get(e->engine.data.output, e->engine.data.context); EINA_LIST_FOREACH(e->video_objects, ll, obj) { /* we need the surface to be transparent to display the underlying overlay */ if (alpha && _evas_render_can_use_overlay(e, obj)) _evas_object_image_video_overlay_show(obj); else _evas_object_image_video_overlay_hide(obj); } /* phase 1.8. pre render for proxy */ _evas_render_phase1_direct(e, &e->active_objects, &e->restack_objects, &e->delete_objects, &e->render_objects); /* phase 2. force updates for restacks */ for (i = 0; i < e->restack_objects.count; ++i) { obj = eina_array_data_get(&e->restack_objects, i); obj->func->render_pre(obj); _evas_render_prev_cur_clip_cache_add(e, obj); } eina_array_clean(&e->restack_objects); /* phase 3. add exposes */ EINA_LIST_FREE(e->damages, r) { e->engine.func->output_redraws_rect_add(e->engine.data.output, r->x, r->y, r->w, r->h); eina_rectangle_free(r); } /* phase 4. framespace, output & viewport changes */ if (e->viewport.changed) { e->engine.func->output_redraws_rect_add(e->engine.data.output, 0, 0, e->output.w, e->output.h); } if (e->output.changed) { e->engine.func->output_resize(e->engine.data.output, e->output.w, e->output.h); e->engine.func->output_redraws_rect_add(e->engine.data.output, 0, 0, e->output.w, e->output.h); } if ((e->output.w != e->viewport.w) || (e->output.h != e->viewport.h)) { ERR("viewport size != output size!"); } if (e->framespace.changed) { int fx, fy, fw, fh; fx = e->viewport.x - e->framespace.x; fy = e->viewport.y - e->framespace.y; fw = e->viewport.w + e->framespace.w; fh = e->viewport.h + e->framespace.h; if (fx < 0) fx = 0; if (fy < 0) fy = 0; e->engine.func->output_redraws_rect_add(e->engine.data.output, fx, fy, fw, fh); } /* phase 4.5: check if object is not in framespace. if not, we need to clip * it to the 'master' clip. * * NB: This is for the wayland engine(s). If we do not do this, then * objects will draw outside the viewport and potentially onto the frame * itself */ if (!strncmp(e->engine.module->definition->name, "wayland", 7)) { Eina_Rectangle clip_rect; /* see if the master clip has been added yet, if not, then create */ if (!e->framespace.clip) { e->framespace.clip = evas_object_rectangle_add(e); evas_object_color_set(e->framespace.clip, 255, 255, 255, 255); evas_object_move(e->framespace.clip, e->framespace.x, e->framespace.y); evas_object_resize(e->framespace.clip, e->viewport.w - e->framespace.w, e->viewport.h - e->framespace.h); evas_object_show(e->framespace.clip); } else { /* master clip is already present. check for size changes in the * viewport, and update master clip size if needed */ if ((e->viewport.changed) || (e->output.changed) || (e->framespace.changed)) { evas_object_move(e->framespace.clip, e->framespace.x, e->framespace.y); evas_object_resize(e->framespace.clip, e->viewport.w - e->framespace.w, e->viewport.h - e->framespace.h); } } EINA_RECTANGLE_SET(&clip_rect, e->framespace.clip->cur.geometry.x, e->framespace.clip->cur.geometry.y, e->framespace.clip->cur.geometry.w, e->framespace.clip->cur.geometry.h) /* With the master clip all setup, we need to loop the objects on this * canvas and determine if the object is in the viewport space. If it * is in the viewport space (and not in framespace), then we need to * clip the object to the master clip so that it does not draw on top * of the frame (eg: elm 3d test) */ for (i = 0; i < e->render_objects.count; ++i) { Eina_Rectangle obj_rect; Evas_Object *pclip; obj = eina_array_data_get(&e->render_objects, i); if (evas_object_is_frame_object_get(obj)) continue; if (obj->delete_me) continue; EINA_RECTANGLE_SET(&obj_rect, obj->cur.geometry.x, obj->cur.geometry.y, obj->cur.geometry.w, obj->cur.geometry.h); /* if the object does not intersect our clip rect, ignore it */ if (!eina_rectangles_intersect(&clip_rect, &obj_rect)) continue; if (!(pclip = evas_object_clip_get(obj))) { /* skip clipping if the object is itself the * framespace clip */ if (obj == e->framespace.clip) continue; /* clip this object so it does not draw on the window frame */ evas_object_clip_set(obj, e->framespace.clip); } } } if (redraw_all) { e->engine.func->output_redraws_rect_add(e->engine.data.output, 0, 0, e->output.w, e->output.h); } /* phase 5. add obscures */ EINA_LIST_FOREACH(e->obscures, ll, r) { e->engine.func->output_redraws_rect_del(e->engine.data.output, r->x, r->y, r->w, r->h); } /* build obscure objects list of active objects that obscure */ for (i = 0; i < e->active_objects.count; ++i) { obj = eina_array_data_get(&e->active_objects, i); if (UNLIKELY((evas_object_is_opaque(obj) || ((obj->func->has_opaque_rect) && (obj->func->has_opaque_rect(obj)))) && evas_object_is_visible(obj) && (!obj->clip.clipees) && (obj->cur.visible) && (!obj->delete_me) && (obj->cur.cache.clip.visible) && (!obj->smart.smart))) /* obscuring_objects = eina_list_append(obscuring_objects, obj); */ eina_array_push(&e->obscuring_objects, obj); } /* save this list */ /* obscuring_objects_orig = obscuring_objects; */ /* obscuring_objects = NULL; */ /* phase 6. go thru each update rect and render objects in it*/ if (do_draw) { unsigned int offset = 0; while ((surface = e->engine.func->output_redraws_next_update_get (e->engine.data.output, &ux, &uy, &uw, &uh, &cx, &cy, &cw, &ch))) { int off_x, off_y; RD(" [--- UPDATE %i %i %ix%i\n", ux, uy, uw, uh); if (make_updates) { Eina_Rectangle *rect; NEW_RECT(rect, ux, uy, uw, uh); if (rect) updates = eina_list_append(updates, rect); } haveup = EINA_TRUE; off_x = cx - ux; off_y = cy - uy; /* build obscuring objects list (in order from bottom to top) */ if (alpha) { e->engine.func->context_clip_set(e->engine.data.output, e->engine.data.context, ux + off_x, uy + off_y, uw, uh); } for (i = 0; i < e->obscuring_objects.count; ++i) { obj = (Evas_Object *)eina_array_data_get (&e->obscuring_objects, i); if (evas_object_is_in_output_rect(obj, ux, uy, uw, uh)) { eina_array_push(&e->temporary_objects, obj); /* reset the background of the area if needed (using cutout and engine alpha flag to help) */ if (alpha) _evas_render_cutout_add(e, obj, off_x, off_y); } } if (alpha) { e->engine.func->context_color_set(e->engine.data.output, e->engine.data.context, 0, 0, 0, 0); e->engine.func->context_multiplier_unset (e->engine.data.output, e->engine.data.context); e->engine.func->context_render_op_set(e->engine.data.output, e->engine.data.context, EVAS_RENDER_COPY); e->engine.func->rectangle_draw(e->engine.data.output, e->engine.data.context, surface, cx, cy, cw, ch); e->engine.func->context_cutout_clear(e->engine.data.output, e->engine.data.context); e->engine.func->context_clip_unset(e->engine.data.output, e->engine.data.context); } /* render all object that intersect with rect */ for (i = 0; i < e->active_objects.count; ++i) { obj = eina_array_data_get(&e->active_objects, i); /* if it's in our outpout rect and it doesn't clip anything */ RD(" OBJ: [%p] '%s' %i %i %ix%i\n", obj, obj->type, obj->cur.geometry.x, obj->cur.geometry.y, obj->cur.geometry.w, obj->cur.geometry.h); if ((evas_object_is_in_output_rect(obj, ux, uy, uw, uh) || (obj->smart.smart)) && (!obj->clip.clipees) && (obj->cur.visible) && (!obj->delete_me) && (obj->cur.cache.clip.visible) && // (!obj->smart.smart) && ((obj->cur.color.a > 0 || obj->cur.render_op != EVAS_RENDER_BLEND))) { int x, y, w, h; RD(" DRAW (vis: %i, a: %i, clipees: %p\n", obj->cur.visible, obj->cur.color.a, obj->clip.clipees); if ((e->temporary_objects.count > offset) && (eina_array_data_get(&e->temporary_objects, offset) == obj)) offset++; x = cx; y = cy; w = cw; h = ch; if (((w > 0) && (h > 0)) || (obj->smart.smart)) { if (!obj->smart.smart) { RECTS_CLIP_TO_RECT(x, y, w, h, obj->cur.cache.clip.x + off_x, obj->cur.cache.clip.y + off_y, obj->cur.cache.clip.w, obj->cur.cache.clip.h); } if (obj->cur.mask) e->engine.func->context_mask_set(e->engine.data.output, e->engine.data.context, obj->cur.mask->func->engine_data_get(obj->cur.mask), obj->cur.mask->cur.geometry.x + off_x, obj->cur.mask->cur.geometry.y + off_y, obj->cur.mask->cur.geometry.w, obj->cur.mask->cur.geometry.h); else e->engine.func->context_mask_unset(e->engine.data.output, e->engine.data.context); e->engine.func->context_clip_set(e->engine.data.output, e->engine.data.context, x, y, w, h); #if 1 /* FIXME: this can slow things down... figure out optimum... coverage */ for (j = offset; j < e->temporary_objects.count; ++j) { Evas_Object *obj2; obj2 = (Evas_Object *)eina_array_data_get (&e->temporary_objects, j); _evas_render_cutout_add(e, obj2, off_x, off_y); } #endif clean_them |= evas_render_mapped(e, obj, e->engine.data.context, surface, off_x, off_y, 0, cx, cy, cw, ch #ifdef REND_DGB , 1 #endif ); e->engine.func->context_cutout_clear(e->engine.data.output, e->engine.data.context); } } } /* punch rect out */ e->engine.func->output_redraws_next_update_push(e->engine.data.output, surface, ux, uy, uw, uh); /* free obscuring objects list */ eina_array_clean(&e->temporary_objects); RD(" ---]\n"); } /* flush redraws */ if (haveup) { evas_event_callback_call(e, EVAS_CALLBACK_RENDER_FLUSH_PRE, NULL); e->engine.func->output_flush(e->engine.data.output); evas_event_callback_call(e, EVAS_CALLBACK_RENDER_FLUSH_POST, NULL); } } /* clear redraws */ e->engine.func->output_redraws_clear(e->engine.data.output); /* and do a post render pass */ for (i = 0; i < e->active_objects.count; ++i) { obj = eina_array_data_get(&e->active_objects, i); obj->pre_render_done = EINA_FALSE; RD(" OBJ [%p] post... %i %i\n", obj, obj->changed, do_draw); if ((obj->changed) && (do_draw)) { RD(" OBJ [%p] post... func1\n", obj); obj->func->render_post(obj); obj->restack = EINA_FALSE; evas_object_change_reset(obj); } else if (clean_them) { RD(" OBJ [%p] post... func2\n", obj); obj->func->render_post(obj); obj->restack = EINA_FALSE; evas_object_change_reset(obj); } /* moved to other pre-process phase 1 if (obj->delete_me == 2) { delete_objects = eina_list_append(delete_objects, obj); } else if (obj->delete_me != 0) obj->delete_me++; */ } /* free our obscuring object list */ eina_array_clean(&e->obscuring_objects); /* If some object are still marked as changed, do not remove them from the pending list. */ eina_array_remove(&e->pending_objects, pending_change, NULL); for (i = 0; i < e->render_objects.count; ++i) { obj = eina_array_data_get(&e->render_objects, i); obj->pre_render_done = EINA_FALSE; } /* delete all objects flagged for deletion now */ for (i = 0; i < e->delete_objects.count; ++i) { obj = eina_array_data_get(&e->delete_objects, i); evas_object_free(obj, 1); } eina_array_clean(&e->delete_objects); e->changed = EINA_FALSE; e->viewport.changed = EINA_FALSE; e->output.changed = EINA_FALSE; e->framespace.changed = EINA_FALSE; e->invalidate = EINA_FALSE; // always clean... lots of mem waste! /* If their are some object to restack or some object to delete, * it's useless to keep the render object list around. */ if (clean_them) { eina_array_clean(&e->active_objects); eina_array_clean(&e->render_objects); eina_array_clean(&e->restack_objects); eina_array_clean(&e->temporary_objects); eina_array_foreach(&e->clip_changes, _evas_clip_changes_free, NULL); eina_array_clean(&e->clip_changes); /* we should flush here and have a mempool system for this eina_array_flush(&e->active_objects); eina_array_flush(&e->render_objects); eina_array_flush(&e->restack_objects); eina_array_flush(&e->delete_objects); eina_array_flush(&e->obscuring_objects); eina_array_flush(&e->temporary_objects); eina_array_flush(&e->clip_changes); */ e->invalidate = EINA_TRUE; } evas_module_clean(); evas_event_callback_call(e, EVAS_CALLBACK_RENDER_POST, NULL); RD("---]\n"); return updates; } EAPI void evas_render_updates_free(Eina_List *updates) { Eina_Rectangle *r; EINA_LIST_FREE(updates, r) eina_rectangle_free(r); } EAPI Eina_List * evas_render_updates(Evas *e) { MAGIC_CHECK(e, Evas, MAGIC_EVAS); return NULL; MAGIC_CHECK_END(); if (!e->changed) return NULL; return evas_render_updates_internal(e, 1, 1); } EAPI void evas_render(Evas *e) { MAGIC_CHECK(e, Evas, MAGIC_EVAS); return; MAGIC_CHECK_END(); if (!e->changed) return; evas_render_updates_internal(e, 0, 1); } EAPI void evas_norender(Evas *e) { MAGIC_CHECK(e, Evas, MAGIC_EVAS); return; MAGIC_CHECK_END(); // if (!e->changed) return; evas_render_updates_internal(e, 0, 0); } EAPI void evas_render_idle_flush(Evas *e) { MAGIC_CHECK(e, Evas, MAGIC_EVAS); return; MAGIC_CHECK_END(); evas_fonts_zero_presure(e); if ((e->engine.func) && (e->engine.func->output_idle_flush) && (e->engine.data.output)) e->engine.func->output_idle_flush(e->engine.data.output); eina_array_flush(&e->active_objects); eina_array_flush(&e->render_objects); eina_array_flush(&e->restack_objects); eina_array_flush(&e->delete_objects); eina_array_flush(&e->obscuring_objects); eina_array_flush(&e->temporary_objects); eina_array_foreach(&e->clip_changes, _evas_clip_changes_free, NULL); eina_array_flush(&e->clip_changes); e->invalidate = EINA_TRUE; } EAPI void evas_sync(Evas *e) { (void) e; } static void _evas_render_dump_map_surfaces(Evas_Object *obj) { if ((obj->cur.map) && obj->map.surface) { obj->layer->evas->engine.func->image_map_surface_free (obj->layer->evas->engine.data.output, obj->map.surface); obj->map.surface = NULL; } if (obj->smart.smart) { Evas_Object *obj2; EINA_INLIST_FOREACH(evas_object_smart_members_get_direct(obj), obj2) _evas_render_dump_map_surfaces(obj2); } } EAPI void evas_render_dump(Evas *e) { Evas_Layer *lay; MAGIC_CHECK(e, Evas, MAGIC_EVAS); return; MAGIC_CHECK_END(); EINA_INLIST_FOREACH(e->layers, lay) { Evas_Object *obj; EINA_INLIST_FOREACH(lay->objects, obj) { if ((obj->type) && (!strcmp(obj->type, "image"))) evas_object_inform_call_image_unloaded(obj); _evas_render_dump_map_surfaces(obj); } } if ((e->engine.func) && (e->engine.func->output_dump) && (e->engine.data.output)) e->engine.func->output_dump(e->engine.data.output); } void evas_render_invalidate(Evas *e) { MAGIC_CHECK(e, Evas, MAGIC_EVAS); return; MAGIC_CHECK_END(); eina_array_clean(&e->active_objects); eina_array_clean(&e->render_objects); eina_array_flush(&e->restack_objects); eina_array_flush(&e->delete_objects); e->invalidate = EINA_TRUE; } void evas_render_object_recalc(Evas_Object *obj) { MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); if ((!obj->changed) && (obj->delete_me < 2)) { Evas *e; e = obj->layer->evas; if ((!e) || (e->cleanup)) return; eina_array_push(&e->pending_objects, obj); obj->changed = EINA_TRUE; } } /* vim:set ts=8 sw=3 sts=3 expandtab cino=>5n-2f0^-2{2(0W1st0 :*/ evas-1.7.9/src/lib/canvas/evas_map.c0000664000175000017500000006735712175475547014223 00000000000000#include "evas_common.h" #include "evas_private.h" #include static void _evas_map_calc_geom_change(Evas_Object *obj) { int is, was = 0; evas_object_change(obj); evas_object_clip_dirty(obj); if (obj->layer->evas->events_frozen <= 0) { evas_object_recalc_clippees(obj); if (!obj->smart.smart) { is = evas_object_is_in_output_rect(obj, obj->layer->evas->pointer.x, obj->layer->evas->pointer.y, 1, 1); if ((is ^ was) && obj->cur.visible) evas_event_feed_mouse_move(obj->layer->evas, obj->layer->evas->pointer.x, obj->layer->evas->pointer.y, obj->layer->evas->last_timestamp, NULL); } } evas_object_inform_call_move(obj); evas_object_inform_call_resize(obj); } static void _evas_map_calc_map_geometry(Evas_Object *obj) { Evas_Coord x1, x2, yy1, yy2; const Evas_Map_Point *p, *p_end; Eina_Bool ch = EINA_FALSE; if (!obj->cur.map) return; // WARN: Do not merge below code to SLP until it is fixed. // It has an infinite loop bug. if (obj->prev.map) { if (obj->prev.map != obj->cur.map) { // FIXME: this causes an infinite loop somewhere... hard to debug if (obj->prev.map->count == obj->cur.map->count) { const Evas_Map_Point *p2; p = obj->cur.map->points; p2 = obj->prev.map->points; if (memcmp(p, p2, sizeof(Evas_Map_Point) * obj->prev.map->count) != 0) ch = EINA_TRUE; if (!ch) { if (obj->cache_map) evas_map_free(obj->cache_map); obj->cache_map = obj->cur.map; obj->cur.map = obj->prev.map; } } else ch = EINA_TRUE; } } else ch = EINA_TRUE; p = obj->cur.map->points; p_end = p + obj->cur.map->count; x1 = x2 = lround(p->x); yy1 = yy2 = lround(p->y); p++; for (; p < p_end; p++) { Evas_Coord x, y; x = lround(p->x); y = lround(p->y); if (x < x1) x1 = x; if (x > x2) x2 = x; if (y < yy1) yy1 = y; if (y > yy2) yy2 = y; } // this causes clip-out bugs now mapped objs canbe opaque!!! // // add 1 pixel of fuzz around the map region to ensure updates are correct // x1 -= 1; yy1 -= 1; // x2 += 1; yy2 += 1; if (obj->cur.map->normal_geometry.x != x1) ch = 1; if (obj->cur.map->normal_geometry.y != yy1) ch = 1; if (obj->cur.map->normal_geometry.w != (x2 - x1)) ch = 1; if (obj->cur.map->normal_geometry.h != (yy2 - yy1)) ch = 1; obj->cur.map->normal_geometry.x = x1; obj->cur.map->normal_geometry.y = yy1; obj->cur.map->normal_geometry.w = (x2 - x1); obj->cur.map->normal_geometry.h = (yy2 - yy1); obj->changed_map = ch; // This shouldn't really be needed, but without it we do have case // where the clip is wrong when a map doesn't change, so always forcing // it, as long as someone doesn't find a better fix. evas_object_clip_dirty(obj); if (ch) _evas_map_calc_geom_change(obj); } static inline Evas_Map * _evas_map_new(int count) { int i; int alloc; Evas_Map *m; /* Adjust allocation such that: at least 4 points, and always an even * number: this allows the software engine to work efficiently */ alloc = (count < 4) ? 4 : count; if (alloc & 0x1) alloc ++; m = calloc(1, sizeof(Evas_Map) + (alloc * sizeof(Evas_Map_Point))); if (!m) return NULL; m->count = count; m->persp.foc = 0; m->alpha = 1; m->smooth = 1; m->magic = MAGIC_MAP; for (i = 0; i < count; i++) { m->points[i].r = 255; m->points[i].g = 255; m->points[i].b = 255; m->points[i].a = 255; } return m; } static inline Eina_Bool _evas_map_copy(Evas_Map *dst, const Evas_Map *src) { if (dst->count != src->count) { ERR("cannot copy map of different sizes: dst=%i, src=%i", dst->count, src->count); return EINA_FALSE; } if (dst == src) return EINA_TRUE; if (dst->points != src->points) memcpy(dst->points, src->points, src->count * sizeof(Evas_Map_Point)); dst->smooth = src->smooth; dst->alpha = src->alpha; dst->persp = src->persp; return EINA_TRUE; } static inline Evas_Map * _evas_map_dup(const Evas_Map *orig) { Evas_Map *copy = _evas_map_new(orig->count); if (!copy) return NULL; memcpy(copy->points, orig->points, orig->count * sizeof(Evas_Map_Point)); copy->smooth = orig->smooth; copy->alpha = orig->alpha; copy->persp = orig->persp; return copy; } static inline void _evas_map_free(Evas_Object *obj, Evas_Map *m) { if (obj) { if (obj->spans) { obj->layer->evas->engine.func->image_map_clean(obj->layer->evas->engine.data.output, obj->spans); free(obj->spans); obj->spans = NULL; } } m->magic = 0; free(m); } /****************************************************************************/ /* util functions for manipulating maps, so you don't need to know the math */ /****************************************************************************/ static inline void _evas_map_util_points_populate(Evas_Map *m, const Evas_Coord x, const Evas_Coord y, const Evas_Coord w, const Evas_Coord h, const Evas_Coord z) { Evas_Map_Point *p = m->points; int i; p[0].x = x; p[0].y = y; p[0].z = z; p[0].u = 0.0; p[0].v = 0.0; p[1].x = x + w; p[1].y = y; p[1].z = z; p[1].u = w; p[1].v = 0.0; p[2].x = x + w; p[2].y = y + h; p[2].z = z; p[2].u = w; p[2].v = h; p[3].x = x; p[3].y = y + h; p[3].z = z; p[3].u = 0.0; p[3].v = h; for (i = 0; i < 4; i++) { p[i].px = p[i].x; p[i].py = p[i].y; } } Eina_Bool evas_map_coords_get(const Evas_Map *m, Evas_Coord x, Evas_Coord y, Evas_Coord *mx, Evas_Coord *my, int grab) { MAGIC_CHECK(m, Evas_Map, MAGIC_MAP); return EINA_FALSE; MAGIC_CHECK_END(); int i, j, edges, edge[m->count][2], douv; Evas_Coord xe[2]; double u[2] = { 0.0, 0.0 }; double v[2] = { 0.0, 0.0 }; if (m->count < 4) return 0; // FIXME need to handle grab mode and extrapolte coords outside // map if (grab) { Evas_Coord ymin, ymax; ymin = m->points[0].y; ymax = m->points[0].y; for (i = 1; i < m->count; i++) { if (m->points[i].y < ymin) ymin = m->points[i].y; else if (m->points[i].y > ymax) ymax = m->points[i].y; } if (y <= ymin) y = ymin + 1; if (y >= ymax) y = ymax - 1; } edges = 0; for (i = 0; i < m->count; i++) { j = (i + 1) % m->count; if ((m->points[i].y <= y) && (m->points[j].y > y)) { edge[edges][0] = i; edge[edges][1] = j; edges++; } else if ((m->points[j].y <= y) && (m->points[i].y > y)) { edge[edges][0] = j; edge[edges][1] = i; edges++; } } douv = 0; if ((mx) || (my)) douv = 1; for (i = 0; i < (edges - 1); i+= 2) { Evas_Coord yp, yd; j = i + 1; yd = m->points[edge[i][1]].y - m->points[edge[i][0]].y; if (yd > 0) { yp = y - m->points[edge[i][0]].y; xe[0] = m->points[edge[i][1]].x - m->points[edge[i][0]].x; xe[0] = m->points[edge[i][0]].x + ((xe[0] * yp) / yd); if (douv) { u[0] = m->points[edge[i][1]].u - m->points[edge[i][0]].u; u[0] = m->points[edge[i][0]].u + ((u[0] * yp) / yd); v[0] = m->points[edge[i][1]].v - m->points[edge[i][0]].v; v[0] = m->points[edge[i][0]].v + ((v[0] * yp) / yd); } } else { xe[0] = m->points[edge[i][0]].x; if (douv) { u[0] = m->points[edge[i][0]].u; v[0] = m->points[edge[i][0]].v; } } yd = m->points[edge[j][1]].y - m->points[edge[j][0]].y; if (yd > 0) { yp = y - m->points[edge[j][0]].y; xe[1] = m->points[edge[j][1]].x - m->points[edge[j][0]].x; xe[1] = m->points[edge[j][0]].x + ((xe[1] * yp) / yd); if (douv) { u[1] = m->points[edge[j][1]].u - m->points[edge[j][0]].u; u[1] = m->points[edge[j][0]].u + ((u[1] * yp) / yd); v[1] = m->points[edge[j][1]].v - m->points[edge[j][0]].v; v[1] = m->points[edge[j][0]].v + ((v[1] * yp) / yd); } } else { xe[1] = m->points[edge[j][0]].x; if (douv) { u[1] = m->points[edge[j][0]].u; v[1] = m->points[edge[j][0]].v; } } if (xe[0] > xe[1]) { int ti; ti = xe[0]; xe[0] = xe[1]; xe[1] = ti; if (douv) { double td; td = u[0]; u[0] = u[1]; u[1] = td; td = v[0]; v[0] = v[1]; v[1] = td; } } if ((x >= xe[0]) && (x < xe[1])) { if (douv) { if (mx) *mx = u[0] + (((x - xe[0]) * (u[1] - u[0])) / (xe[1] - xe[0])); if (my) *my = v[0] + (((x - xe[0]) * (v[1] - v[0])) / (xe[1] - xe[0])); } return EINA_TRUE; } if (grab) { if (douv) { if (mx) *mx = u[0] + (((x - xe[0]) * (u[1] - u[0])) / (xe[1] - xe[0])); if (my) *my = v[0] + (((x - xe[0]) * (v[1] - v[0])) / (xe[1] - xe[0])); } return EINA_TRUE; } } return EINA_FALSE; } Eina_Bool evas_map_inside_get(const Evas_Map *m, Evas_Coord x, Evas_Coord y) { return evas_map_coords_get(m, x, y, NULL, NULL, 0); } static Eina_Bool _evas_object_map_parent_check(Evas_Object *parent) { const Eina_Inlist *list; const Evas_Object *o; if (!parent) return EINA_FALSE; list = evas_object_smart_members_get_direct(parent->smart.parent); EINA_INLIST_FOREACH(list, o) if (o->cur.usemap) break ; if (o) return EINA_FALSE; /* Still some child have a map enable */ parent->child_has_map = EINA_FALSE; _evas_object_map_parent_check(parent->smart.parent); return EINA_TRUE; } EAPI void evas_object_map_enable_set(Evas_Object *obj, Eina_Bool enabled) { Evas_Object *parents; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); Eina_Bool pchange = EINA_FALSE; enabled = !!enabled; if (obj->cur.usemap == enabled) return; pchange = obj->changed; obj->cur.usemap = enabled; if (enabled) { if (!obj->cur.map) obj->cur.map = _evas_map_new(4); evas_object_mapped_clip_across_mark(obj); // obj->cur.map->normal_geometry = obj->cur.geometry; } else { if (obj->map.surface) { obj->layer->evas->engine.func->image_map_surface_free (obj->layer->evas->engine.data.output, obj->map.surface); obj->map.surface = NULL; } if (obj->cur.map) { _evas_map_calc_geom_change(obj); evas_object_mapped_clip_across_mark(obj); } } _evas_map_calc_map_geometry(obj); /* This is a bit heavy handed, but it fixes the case of same geometry, but * changed colour or UV settings. */ evas_object_change(obj); if (!obj->changed_pchange) obj->changed_pchange = pchange; obj->changed_map = EINA_TRUE; if (enabled) { for (parents = obj->smart.parent; parents; parents = parents->smart.parent) parents->child_has_map = EINA_TRUE; } else { if (_evas_object_map_parent_check(obj->smart.parent)) evas_object_update_bounding_box(obj); } } EAPI Eina_Bool evas_object_map_enable_get(const Evas_Object *obj) { MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return EINA_FALSE; MAGIC_CHECK_END(); return obj->cur.usemap; } EAPI void evas_object_map_set(Evas_Object *obj, const Evas_Map *map) { MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); if ((!map) || (map->count < 4)) { if (obj->map.surface) { obj->layer->evas->engine.func->image_map_surface_free (obj->layer->evas->engine.data.output, obj->map.surface); obj->map.surface = NULL; } if (obj->cur.map) { obj->changed_map = EINA_TRUE; obj->prev.geometry = obj->cur.map->normal_geometry; if (obj->prev.map == obj->cur.map) obj->cur.map = NULL; else if (!obj->cache_map) { obj->cache_map = obj->cur.map; obj->cur.map = NULL; } else { _evas_map_free(obj, obj->cur.map); obj->cur.map = NULL; } if (!obj->prev.map) { evas_object_mapped_clip_across_mark(obj); return; } if (!obj->cur.usemap) _evas_map_calc_geom_change(obj); else _evas_map_calc_map_geometry(obj); if (obj->cur.usemap) evas_object_mapped_clip_across_mark(obj); } return; } if (obj->prev.map == obj->cur.map) obj->cur.map = NULL; if (!obj->cur.map) { obj->cur.map = obj->cache_map; obj->cache_map = NULL; } // We do have the same exact count of point in this map, so just copy it if ((obj->cur.map) && (obj->cur.map->count == map->count)) _evas_map_copy(obj->cur.map, map); else { if (obj->cur.map) _evas_map_free(obj, obj->cur.map); obj->cur.map = _evas_map_dup(map); if (obj->cur.usemap) evas_object_mapped_clip_across_mark(obj); } _evas_map_calc_map_geometry(obj); } EAPI const Evas_Map * evas_object_map_get(const Evas_Object *obj) { MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return NULL; MAGIC_CHECK_END(); return obj->cur.map; } EAPI Evas_Map * evas_map_new(int count) { if (count != 4) { ERR("map point count (%i) != 4 is unsupported!", count); return NULL; } return _evas_map_new(count); } EAPI void evas_map_smooth_set(Evas_Map *m, Eina_Bool enabled) { MAGIC_CHECK(m, Evas_Map, MAGIC_MAP); return; MAGIC_CHECK_END(); m->smooth = enabled; } EAPI Eina_Bool evas_map_smooth_get(const Evas_Map *m) { MAGIC_CHECK(m, Evas_Map, MAGIC_MAP); return EINA_FALSE; MAGIC_CHECK_END(); return m->smooth; } EAPI void evas_map_alpha_set(Evas_Map *m, Eina_Bool enabled) { MAGIC_CHECK(m, Evas_Map, MAGIC_MAP); return; MAGIC_CHECK_END(); m->alpha = enabled; } EAPI Eina_Bool evas_map_alpha_get(const Evas_Map *m) { MAGIC_CHECK(m, Evas_Map, MAGIC_MAP); return EINA_FALSE; MAGIC_CHECK_END(); return m->alpha; } EAPI Evas_Map * evas_map_dup(const Evas_Map *m) { MAGIC_CHECK(m, Evas_Map, MAGIC_MAP); return NULL; MAGIC_CHECK_END(); return _evas_map_dup(m); } EAPI void evas_map_free(Evas_Map *m) { MAGIC_CHECK(m, Evas_Map, MAGIC_MAP); return; MAGIC_CHECK_END(); _evas_map_free(NULL, m); } EAPI int evas_map_count_get(const Evas_Map *m) { MAGIC_CHECK(m, Evas_Map, MAGIC_MAP); return -1; MAGIC_CHECK_END(); return m->count; } EAPI void evas_map_point_coord_set(Evas_Map *m, int idx, Evas_Coord x, Evas_Coord y, Evas_Coord z) { MAGIC_CHECK(m, Evas_Map, MAGIC_MAP); return; MAGIC_CHECK_END(); Evas_Map_Point *p; if (idx >= m->count) return; p = m->points + idx; p->x = p->px = x; p->y = p->py = y; p->z = z; } EAPI void evas_map_point_coord_get(const Evas_Map *m, int idx, Evas_Coord *x, Evas_Coord *y, Evas_Coord *z) { MAGIC_CHECK(m, Evas_Map, MAGIC_MAP); goto error; MAGIC_CHECK_END(); const Evas_Map_Point *p; if (idx >= m->count) goto error; p = m->points + idx; if (x) *x = p->x; if (y) *y = p->y; if (z) *z = p->z; return; error: if (x) *x = 0; if (y) *y = 0; if (z) *z = 0; } EAPI void evas_map_point_image_uv_set(Evas_Map *m, int idx, double u, double v) { MAGIC_CHECK(m, Evas_Map, MAGIC_MAP); return; MAGIC_CHECK_END(); Evas_Map_Point *p; if (idx >= m->count) return; p = m->points + idx; p->u = u; p->v = v; } EAPI void evas_map_point_image_uv_get(const Evas_Map *m, int idx, double *u, double *v) { MAGIC_CHECK(m, Evas_Map, MAGIC_MAP); goto error; MAGIC_CHECK_END(); const Evas_Map_Point *p; if (idx >= m->count) goto error; p = m->points + idx; if (u) *u = p->u; if (v) *v = p->v; return; error: if (u) *u = 0.0; if (v) *v = 0.0; } EAPI void evas_map_point_color_set(Evas_Map *m, int idx, int r, int g, int b, int a) { MAGIC_CHECK(m, Evas_Map, MAGIC_MAP); return; MAGIC_CHECK_END(); Evas_Map_Point *p; if (idx >= m->count) return; p = m->points + idx; p->r = r; p->g = g; p->b = b; p->a = a; } EAPI void evas_map_point_color_get(const Evas_Map *m, int idx, int *r, int *g, int *b, int *a) { MAGIC_CHECK(m, Evas_Map, MAGIC_MAP); return; MAGIC_CHECK_END(); const Evas_Map_Point *p; if (idx >= m->count) return; p = m->points + idx; if (r) *r = p->r; if (g) *g = p->g; if (b) *b = p->b; if (a) *a = p->a; } EAPI void evas_map_util_points_populate_from_object_full(Evas_Map *m, const Evas_Object *obj, Evas_Coord z) { MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); if (m->count != 4) { ERR("map has count=%d where 4 was expected.", m->count); return; } _evas_map_util_points_populate(m, obj->cur.geometry.x, obj->cur.geometry.y, obj->cur.geometry.w, obj->cur.geometry.h, z); } EAPI void evas_map_util_points_populate_from_object(Evas_Map *m, const Evas_Object *obj) { MAGIC_CHECK(m, Evas_Map, MAGIC_MAP); return; MAGIC_CHECK_END(); MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); if (m->count != 4) { ERR("map has count=%d where 4 was expected.", m->count); return; } _evas_map_util_points_populate(m, obj->cur.geometry.x, obj->cur.geometry.y, obj->cur.geometry.w, obj->cur.geometry.h, 0); } EAPI void evas_map_util_points_populate_from_geometry(Evas_Map *m, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h, Evas_Coord z) { MAGIC_CHECK(m, Evas_Map, MAGIC_MAP); return; MAGIC_CHECK_END(); if (m->count != 4) { ERR("map has count=%d where 4 was expected.", m->count); return; } _evas_map_util_points_populate(m, x, y, w, h, z); } EAPI void evas_map_util_points_color_set(Evas_Map *m, int r, int g, int b, int a) { MAGIC_CHECK(m, Evas_Map, MAGIC_MAP); return; MAGIC_CHECK_END(); Evas_Map_Point *p, *p_end; p = m->points; p_end = p + m->count; for (; p < p_end; p++) { p->r = r; p->g = g; p->b = b; p->a = a; } } EAPI void evas_map_util_rotate(Evas_Map *m, double degrees, Evas_Coord cx, Evas_Coord cy) { MAGIC_CHECK(m, Evas_Map, MAGIC_MAP); return; MAGIC_CHECK_END(); double r = (degrees * M_PI) / 180.0; Evas_Map_Point *p, *p_end; p = m->points; p_end = p + m->count; for (; p < p_end; p++) { double x, y, xx, yy; x = p->x - cx; y = p->y - cy; xx = x * cos(r); yy = x * sin(r); x = xx - (y * sin(r)); y = yy + (y * cos(r)); p->px = p->x = x + cx; p->py = p->y = y + cy; } } EAPI void evas_map_util_zoom(Evas_Map *m, double zoomx, double zoomy, Evas_Coord cx, Evas_Coord cy) { MAGIC_CHECK(m, Evas_Map, MAGIC_MAP); return; MAGIC_CHECK_END(); Evas_Map_Point *p, *p_end; p = m->points; p_end = p + m->count; for (; p < p_end; p++) { double x, y; x = p->x - cx; y = p->y - cy; x = (((double)x) * zoomx); y = (((double)y) * zoomy); p->px = p->x = x + cx; p->py = p->y = y + cy; } } EAPI void evas_map_util_3d_rotate(Evas_Map *m, double dx, double dy, double dz, Evas_Coord cx, Evas_Coord cy, Evas_Coord cz) { MAGIC_CHECK(m, Evas_Map, MAGIC_MAP); return; MAGIC_CHECK_END(); double rz = (dz * M_PI) / 180.0; double rx = (dx * M_PI) / 180.0; double ry = (dy * M_PI) / 180.0; Evas_Map_Point *p, *p_end; p = m->points; p_end = p + m->count; for (; p < p_end; p++) { double x, y, z, xx, yy, zz; x = p->x - cx; y = p->y - cy; z = p->z - cz; if (rz != 0.0) { xx = x * cos(rz); yy = x * sin(rz); x = xx - (y * sin(rz)); y = yy + (y * cos(rz)); } if (ry != 0.0) { xx = x * cos(ry); zz = x * sin(ry); x = xx - (z * sin(ry)); z = zz + (z * cos(ry)); } if (rx != 0.0) { zz = z * cos(rx); yy = z * sin(rx); z = zz - (y * sin(rx)); y = yy + (y * cos(rx)); } p->px = p->x = x + cx; p->py = p->y = y + cy; p->z = z + cz; } } EAPI void evas_map_util_3d_lighting(Evas_Map *m, Evas_Coord lx, Evas_Coord ly, Evas_Coord lz, int lr, int lg, int lb, int ar, int ag, int ab) { MAGIC_CHECK(m, Evas_Map, MAGIC_MAP); return; MAGIC_CHECK_END(); int i; for (i = 0; i < m->count; i++) { double x, y, z; double nx, ny, nz, x1, yy1, z1, x2, yy2, z2, ln, br; int h, j, mr, mg, mb; x = m->points[i].x; y = m->points[i].y; z = m->points[i].z; // calc normal h = (i - 1 + 4) % 4 + (i & ~0x3); // prev point j = (i + 1) % 4 + (i & ~0x3); // next point x1 = m->points[h].x - x; yy1 = m->points[h].y - y; z1 = m->points[h].z - z; x2 = m->points[j].x - x; yy2 = m->points[j].y - y; z2 = m->points[j].z - z; nx = (yy1 * z2) - (z1 * yy2); ny = (z1 * x2) - (x1 * z2); nz = (x1 * yy2) - (yy1 * x2); ln = (nx * nx) + (ny * ny) + (nz * nz); ln = sqrt(ln); if (ln != 0.0) { nx /= ln; ny /= ln; nz /= ln; } // calc point -> light vector x = lx - x; y = ly - y; z = lz - z; ln = (x * x) + (y * y) + (z * z); ln = sqrt(ln); if (ln != 0.0) { x /= ln; y /= ln; z /= ln; } // brightness - tan (0.0 -> 1.0 brightness really) br = (nx * x) + (ny * y) + (nz * z); if (br < 0.0) br = 0.0; mr = ar + ((lr - ar) * br); mg = ag + ((lg - ag) * br); mb = ab + ((lb - ab) * br); if (m->points[i].a != 255) { mr = (mr * m->points[i].a) / 255; mg = (mg * m->points[i].a) / 255; mb = (mb * m->points[i].a) / 255; } m->points[i].r = (m->points[i].r * mr) / 255; m->points[i].g = (m->points[i].g * mg) / 255; m->points[i].b = (m->points[i].b * mb) / 255; } } EAPI void evas_map_util_3d_perspective(Evas_Map *m, Evas_Coord px, Evas_Coord py, Evas_Coord z0, Evas_Coord foc) { MAGIC_CHECK(m, Evas_Map, MAGIC_MAP); return; MAGIC_CHECK_END(); Evas_Map_Point *p, *p_end; p = m->points; p_end = p + m->count; m->persp.px = px; m->persp.py = py; m->persp.z0 = z0; m->persp.foc = foc; if (foc <= 0) return; for (; p < p_end; p++) { double x, y, zz; x = p->x - px; y = p->y - py; zz = ((p->z - z0) + foc); if (zz > 0) { x = (x * foc) / zz; y = (y * foc) / zz; } p->x = px + x; p->y = py + y; } } EAPI Eina_Bool evas_map_util_clockwise_get(Evas_Map *m) { MAGIC_CHECK(m, Evas_Map, MAGIC_MAP); return EINA_FALSE; MAGIC_CHECK_END(); int i, j, k, count; long long c; if (m->count < 3) return EINA_FALSE; count = 0; for (i = 0; i < m->count; i++) { j = (i + 1) % m->count; k = (i + 2) % m->count; c = ((m->points[j].x - m->points[i].x) * (m->points[k].y - m->points[j].y)) - ((m->points[j].y - m->points[i].y) * (m->points[k].x - m->points[j].x)); if (c < 0) count--; else if (c > 0) count++; } if (count > 0) return EINA_TRUE; return EINA_FALSE; } void evas_object_map_update(Evas_Object *obj, int x, int y, int imagew, int imageh, int uvw, int uvh) { const Evas_Map_Point *p, *p_end; RGBA_Map_Point *pts, *pt; if (obj->spans) { if (obj->spans->x != x || obj->spans->y != y || obj->spans->image.w != imagew || obj->spans->image.h != imageh || obj->spans->uv.w != uvw || obj->spans->uv.h != uvh) obj->changed_map = EINA_TRUE; } else { obj->changed_map = EINA_TRUE; } if (!obj->changed_map) return ; if (obj->cur.map && obj->spans && obj->cur.map->count != obj->spans->count) { if (obj->spans) { // Destroy engine side spans free(obj->spans); } obj->spans = NULL; } if (!obj->spans) obj->spans = calloc(1, sizeof (RGBA_Map) + sizeof (RGBA_Map_Point) * (obj->cur.map->count - 1)); if (!obj->spans) return ; obj->spans->count = obj->cur.map->count; obj->spans->x = x; obj->spans->y = y; obj->spans->uv.w = uvw; obj->spans->uv.h = uvh; obj->spans->image.w = imagew; obj->spans->image.h = imageh; pts = obj->spans->pts; p = obj->cur.map->points; p_end = p + obj->cur.map->count; pt = pts; pts[0].px = obj->cur.map->persp.px << FP; pts[0].py = obj->cur.map->persp.py << FP; pts[0].foc = obj->cur.map->persp.foc << FP; pts[0].z0 = obj->cur.map->persp.z0 << FP; // draw geom +x +y for (; p < p_end; p++, pt++) { pt->x = (lround(p->x) + x) * FP1; pt->y = (lround(p->y) + y) * FP1; pt->z = (lround(p->z) ) * FP1; pt->fx = p->px; pt->fy = p->py; pt->fz = p->z; if ((uvw == 0) || (imagew == 0)) pt->u = 0; else pt->u = ((lround(p->u) * imagew) / uvw) * FP1; if ((uvh == 0) || (imageh == 0)) pt->v = 0; else pt->v = ((lround(p->v) * imageh) / uvh) * FP1; if (pt->u < 0) pt->u = 0; else if (pt->u > (imagew * FP1)) pt->u = (imagew * FP1); if (pt->v < 0) pt->v = 0; else if (pt->v > (imageh * FP1)) pt->v = (imageh * FP1); pt->col = ARGB_JOIN(p->a, p->r, p->g, p->b); } if (obj->cur.map->count & 0x1) { pts[obj->cur.map->count] = pts[obj->cur.map->count -1]; } // Request engine to update it's point } evas-1.7.9/src/lib/canvas/evas_name.c0000664000175000017500000000340412175475547014345 00000000000000#include "evas_common.h" #include "evas_private.h" EAPI void evas_object_name_set(Evas_Object *obj, const char *name) { MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); if (obj->name) { eina_hash_del(obj->layer->evas->name_hash, obj->name, obj); free(obj->name); } if (!name) obj->name = NULL; else { obj->name = strdup(name); eina_hash_add(obj->layer->evas->name_hash, obj->name, obj); } } EAPI const char * evas_object_name_get(const Evas_Object *obj) { MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return NULL; MAGIC_CHECK_END(); return obj->name; } EAPI Evas_Object * evas_object_name_find(const Evas *e, const char *name) { MAGIC_CHECK(e, Evas, MAGIC_EVAS); return NULL; MAGIC_CHECK_END(); if (!name) return NULL; return (Evas_Object *)eina_hash_find(e->name_hash, name); } static Evas_Object * _evas_object_name_child_find(const Evas_Object *obj, const char *name, int recurse) { const Eina_Inlist *lst; Evas_Object *child; if (!obj->smart.smart) return NULL; lst = evas_object_smart_members_get_direct(obj); EINA_INLIST_FOREACH(lst, child) { if (child->delete_me) continue; if (!child->name) continue; if (!strcmp(name, child->name)) return child; if (recurse != 0) { if ((obj = _evas_object_name_child_find(child, name, recurse - 1))) return (Evas_Object *)obj; } } return NULL; } EAPI Evas_Object * evas_object_name_child_find(const Evas_Object *obj, const char *name, int recurse) { MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return NULL; MAGIC_CHECK_END(); if (!name) return NULL; return _evas_object_name_child_find(obj, name, recurse); } evas-1.7.9/src/lib/canvas/evas_key.c0000664000175000017500000001224312175475547014216 00000000000000#include "evas_common.h" #include "evas_private.h" /* private calls */ static int evas_key_modifier_number(const Evas_Modifier *m, const char *keyname) { int i; for (i = 0; i < m->mod.count; i++) { if (!strcmp(m->mod.list[i], keyname)) return i; } return -1; } static int evas_key_lock_number(const Evas_Lock *l, const char *keyname) { int i; for (i = 0; i < l->lock.count; i++) { if (!strcmp(l->lock.list[i], keyname)) return i; } return -1; } /* local calls */ /* public calls */ EAPI const Evas_Modifier * evas_key_modifier_get(const Evas *e) { MAGIC_CHECK(e, Evas, MAGIC_EVAS); return NULL; MAGIC_CHECK_END(); return &(e->modifiers); } EAPI const Evas_Lock * evas_key_lock_get(const Evas *e) { MAGIC_CHECK(e, Evas, MAGIC_EVAS); return NULL; MAGIC_CHECK_END(); return &(e->locks); } EAPI Eina_Bool evas_key_modifier_is_set(const Evas_Modifier *m, const char *keyname) { Evas_Modifier_Mask num; int n; if (!m) return 0; if (!keyname) return 0; n = evas_key_modifier_number(m, keyname); if (n < 0) return 0; num = (Evas_Modifier_Mask)n; num = 1 << num; if (m->mask & num) return 1; return 0; } EAPI Eina_Bool evas_key_lock_is_set(const Evas_Lock *l, const char *keyname) { Evas_Modifier_Mask num; int n; if (!l) return 0; if (!keyname) return 0; n = evas_key_lock_number(l, keyname); if (n < 0) return 0; num = (Evas_Modifier_Mask)n; num = 1 << num; if (l->mask & num) return 1; return 0; } EAPI void evas_key_modifier_add(Evas *e, const char *keyname) { MAGIC_CHECK(e, Evas, MAGIC_EVAS); return; MAGIC_CHECK_END(); if (!keyname) return; if (e->modifiers.mod.count >= 64) return; evas_key_modifier_del(e, keyname); e->modifiers.mod.count++; e->modifiers.mod.list = realloc(e->modifiers.mod.list, e->modifiers.mod.count * sizeof(char *)); e->modifiers.mod.list[e->modifiers.mod.count - 1] = strdup(keyname); e->modifiers.mask = 0; } EAPI void evas_key_modifier_del(Evas *e, const char *keyname) { int i; MAGIC_CHECK(e, Evas, MAGIC_EVAS); return; MAGIC_CHECK_END(); if (!keyname) return; for (i = 0; i < e->modifiers.mod.count; i++) { if (!strcmp(e->modifiers.mod.list[i], keyname)) { int j; free(e->modifiers.mod.list[i]); e->modifiers.mod.count--; for (j = i; j < e->modifiers.mod.count; j++) e->modifiers.mod.list[j] = e->modifiers.mod.list[j + 1]; e->modifiers.mask = 0; return; } } } EAPI void evas_key_lock_add(Evas *e, const char *keyname) { MAGIC_CHECK(e, Evas, MAGIC_EVAS); return; MAGIC_CHECK_END(); if (!keyname) return; if (e->locks.lock.count >= 64) return; evas_key_lock_del(e, keyname); e->locks.lock.count++; e->locks.lock.list = realloc(e->locks.lock.list, e->locks.lock.count * sizeof(char *)); e->locks.lock.list[e->locks.lock.count - 1] = strdup(keyname); e->locks.mask = 0; } EAPI void evas_key_lock_del(Evas *e, const char *keyname) { int i; MAGIC_CHECK(e, Evas, MAGIC_EVAS); return; MAGIC_CHECK_END(); if (!keyname) return; e->locks.mask = 0; for (i = 0; i < e->locks.lock.count; i++) { if (!strcmp(e->locks.lock.list[i], keyname)) { int j; free(e->locks.lock.list[i]); e->locks.lock.count--; for (j = i; j < e->locks.lock.count; j++) e->locks.lock.list[j] = e->locks.lock.list[j + 1]; e->locks.mask = 0; return; } } } EAPI void evas_key_modifier_on(Evas *e, const char *keyname) { Evas_Modifier_Mask num; int n; MAGIC_CHECK(e, Evas, MAGIC_EVAS); return; MAGIC_CHECK_END(); n = (Evas_Modifier_Mask)evas_key_modifier_number(&(e->modifiers), keyname); if (n < 0) return; num = (Evas_Modifier_Mask)n; num = 1 << num; e->modifiers.mask |= num; } EAPI void evas_key_modifier_off(Evas *e, const char *keyname) { Evas_Modifier_Mask num; int n; MAGIC_CHECK(e, Evas, MAGIC_EVAS); return; MAGIC_CHECK_END(); n = evas_key_modifier_number(&(e->modifiers), keyname); if (n < 0) return; num = (Evas_Modifier_Mask)n; num = 1 << num; e->modifiers.mask &= ~num; } EAPI void evas_key_lock_on(Evas *e, const char *keyname) { Evas_Modifier_Mask num; int n; MAGIC_CHECK(e, Evas, MAGIC_EVAS); return; MAGIC_CHECK_END(); n = evas_key_lock_number(&(e->locks), keyname); if (n < 0) return; num = (Evas_Modifier_Mask)n; num = 1 << num; e->locks.mask |= num; } EAPI void evas_key_lock_off(Evas *e, const char *keyname) { Evas_Modifier_Mask num; int n; MAGIC_CHECK(e, Evas, MAGIC_EVAS); return; MAGIC_CHECK_END(); n = evas_key_lock_number(&(e->locks), keyname); if (n < 0) return; num = (Evas_Modifier_Mask)n; num = 1 << num; e->locks.mask &= ~num; } /* errr need to add key grabbing/ungrabbing calls - missing modifier stuff. */ EAPI Evas_Modifier_Mask evas_key_modifier_mask_get(const Evas *e, const char *keyname) { Evas_Modifier_Mask num; int n; MAGIC_CHECK(e, Evas, MAGIC_EVAS); return 0; MAGIC_CHECK_END(); if (!keyname) return 0; n = evas_key_modifier_number(&(e->modifiers), keyname); if (n < 0) return 0; num = (Evas_Modifier_Mask)n; return 1 << num; } evas-1.7.9/src/lib/canvas/evas_callbacks.c0000664000175000017500000003376412175475547015360 00000000000000#include "evas_common.h" #include "evas_private.h" static void evas_object_event_callback_clear(Evas_Object *obj); static void evas_event_callback_clear(Evas *e); int _evas_event_counter = 0; EVAS_MEMPOOL(_mp_fn); EVAS_MEMPOOL(_mp_cb); EVAS_MEMPOOL(_mp_pc); void _evas_post_event_callback_call(Evas *e) { Evas_Post_Callback *pc; int skip = 0; if (e->delete_me) return; _evas_walk(e); EINA_LIST_FREE(e->post_events, pc) { if ((!skip) && (!e->delete_me) && (!pc->delete_me)) { if (!pc->func((void*)pc->data, e)) skip = 1; } EVAS_MEMPOOL_FREE(_mp_pc, pc); } _evas_unwalk(e); } void _evas_post_event_callback_free(Evas *e) { Evas_Post_Callback *pc; EINA_LIST_FREE(e->post_events, pc) { EVAS_MEMPOOL_FREE(_mp_pc, pc); } } void evas_event_callback_list_post_free(Eina_Inlist **list) { Eina_Inlist *l; /* MEM OK */ for (l = *list; l;) { Evas_Func_Node *fn; fn = (Evas_Func_Node *)l; l = l->next; if (fn->delete_me) { *list = eina_inlist_remove(*list, EINA_INLIST_GET(fn)); EVAS_MEMPOOL_FREE(_mp_fn, fn); } } } static void evas_object_event_callback_clear(Evas_Object *obj) { if (!obj->callbacks) return; if (!obj->callbacks->deletions_waiting) return; obj->callbacks->deletions_waiting = 0; evas_event_callback_list_post_free(&obj->callbacks->callbacks); if (!obj->callbacks->callbacks) { EVAS_MEMPOOL_FREE(_mp_cb, obj->callbacks); obj->callbacks = NULL; } } static void evas_event_callback_clear(Evas *e) { if (!e->callbacks) return; if (!e->callbacks->deletions_waiting) return; e->callbacks->deletions_waiting = 0; evas_event_callback_list_post_free(&e->callbacks->callbacks); if (!e->callbacks->callbacks) { EVAS_MEMPOOL_FREE(_mp_cb, e->callbacks); e->callbacks = NULL; } } void evas_object_event_callback_all_del(Evas_Object *obj) { Evas_Func_Node *fn; if (!obj->callbacks) return; EINA_INLIST_FOREACH(obj->callbacks->callbacks, fn) fn->delete_me = 1; } void evas_object_event_callback_cleanup(Evas_Object *obj) { /* MEM OK */ if (!obj->callbacks) return; evas_event_callback_list_post_free(&obj->callbacks->callbacks); EVAS_MEMPOOL_FREE(_mp_cb, obj->callbacks); obj->callbacks = NULL; } void evas_event_callback_all_del(Evas *e) { Evas_Func_Node *fn; if (!e->callbacks) return; EINA_INLIST_FOREACH(e->callbacks->callbacks, fn) fn->delete_me = 1; } void evas_event_callback_cleanup(Evas *e) { /* MEM OK */ if (!e->callbacks) return; evas_event_callback_list_post_free(&e->callbacks->callbacks); EVAS_MEMPOOL_FREE(_mp_cb, e->callbacks); e->callbacks = NULL; } void evas_event_callback_call(Evas *e, Evas_Callback_Type type, void *event_info) { Eina_Inlist **l_mod = NULL, *l; _evas_walk(e); if (e->callbacks) { l_mod = &e->callbacks->callbacks; e->callbacks->walking_list++; for (l = *l_mod; l; l = l->next) { Evas_Func_Node *fn; fn = (Evas_Func_Node *)l; if ((fn->type == type) && (!fn->delete_me)) { Evas_Event_Cb func = fn->func; if (func) func(fn->data, e, event_info); } if (e->delete_me) break; } e->callbacks->walking_list--; if (!e->callbacks->walking_list) { evas_event_callback_clear(e); l_mod = NULL; } } _evas_unwalk(e); } void evas_object_event_callback_call(Evas_Object *obj, Evas_Callback_Type type, void *event_info, int event_id) { /* MEM OK */ Eina_Inlist **l_mod = NULL, *l; Evas_Button_Flags flags = EVAS_BUTTON_NONE; Evas *e; if ((obj->delete_me) || (!obj->layer)) return; if ((obj->last_event == event_id) && (obj->last_event_type == type)) return; if (obj->last_event > event_id) { if ((obj->last_event_type == EVAS_CALLBACK_MOUSE_OUT) && ((type >= EVAS_CALLBACK_MOUSE_DOWN) && (type <= EVAS_CALLBACK_MULTI_MOVE))) { return; } } obj->last_event = event_id; obj->last_event_type = type; if (!(e = obj->layer->evas)) return; _evas_walk(e); if (obj->callbacks) { l_mod = &obj->callbacks->callbacks; switch (type) { case EVAS_CALLBACK_MOUSE_DOWN: { Evas_Event_Mouse_Down *ev = event_info; flags = ev->flags; if (ev->flags & (EVAS_BUTTON_DOUBLE_CLICK | EVAS_BUTTON_TRIPLE_CLICK)) { if (obj->last_mouse_down_counter < (e->last_mouse_down_counter - 1)) ev->flags &= ~(EVAS_BUTTON_DOUBLE_CLICK | EVAS_BUTTON_TRIPLE_CLICK); } obj->last_mouse_down_counter = e->last_mouse_down_counter; break; } case EVAS_CALLBACK_MOUSE_UP: { Evas_Event_Mouse_Up *ev = event_info; flags = ev->flags; if (ev->flags & (EVAS_BUTTON_DOUBLE_CLICK | EVAS_BUTTON_TRIPLE_CLICK)) { if (obj->last_mouse_up_counter < (e->last_mouse_up_counter - 1)) ev->flags &= ~(EVAS_BUTTON_DOUBLE_CLICK | EVAS_BUTTON_TRIPLE_CLICK); } obj->last_mouse_up_counter = e->last_mouse_up_counter; break; } default: break; } obj->callbacks->walking_list++; for (l = *l_mod; l; l = l->next) { Evas_Func_Node *fn; fn = (Evas_Func_Node *)l; if ((fn->type == type) && (!fn->delete_me)) { Evas_Object_Event_Cb func = fn->func; if (func) func(fn->data, obj->layer->evas, obj, event_info); } if (obj->delete_me) break; } obj->callbacks->walking_list--; if (!obj->callbacks->walking_list) { evas_object_event_callback_clear(obj); l_mod = NULL; } if (type == EVAS_CALLBACK_MOUSE_DOWN) { Evas_Event_Mouse_Down *ev = event_info; ev->flags = flags; } else if (type == EVAS_CALLBACK_MOUSE_UP) { Evas_Event_Mouse_Up *ev = event_info; ev->flags = flags; } } if (!((obj->no_propagate) && (l_mod) && (*l_mod))) { if (!obj->no_propagate) { if ((obj->smart.parent) && (type != EVAS_CALLBACK_FREE) && (type <= EVAS_CALLBACK_KEY_UP)) evas_object_event_callback_call(obj->smart.parent, type, event_info, event_id); } } _evas_unwalk(e); } static int _callback_priority_cmp(const void *_a, const void *_b) { const Evas_Func_Node *a, *b; a = EINA_INLIST_CONTAINER_GET(_a, Evas_Func_Node); b = EINA_INLIST_CONTAINER_GET(_b, Evas_Func_Node); if (a->priority < b->priority) return -1; else return 1; } EAPI void evas_object_event_callback_add(Evas_Object *obj, Evas_Callback_Type type, Evas_Object_Event_Cb func, const void *data) { evas_object_event_callback_priority_add(obj, type, EVAS_CALLBACK_PRIORITY_DEFAULT, func, data); } EAPI void evas_object_event_callback_priority_add(Evas_Object *obj, Evas_Callback_Type type, Evas_Callback_Priority priority, Evas_Object_Event_Cb func, const void *data) { /* MEM OK */ Evas_Func_Node *fn; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); if (!func) return; if (!obj->callbacks) { EVAS_MEMPOOL_INIT(_mp_cb, "evas_callbacks", Evas_Callbacks, 64, ); obj->callbacks = EVAS_MEMPOOL_ALLOC(_mp_cb, Evas_Callbacks); if (!obj->callbacks) return; EVAS_MEMPOOL_PREP(_mp_cb, obj->callbacks, Evas_Callbacks); } EVAS_MEMPOOL_INIT(_mp_fn, "evas_func_node", Evas_Func_Node, 128, ); fn = EVAS_MEMPOOL_ALLOC(_mp_fn, Evas_Func_Node); if (!fn) return; EVAS_MEMPOOL_PREP(_mp_fn, fn, Evas_Func_Node); fn->func = func; fn->data = (void *)data; fn->type = type; fn->priority = priority; obj->callbacks->callbacks = eina_inlist_sorted_insert(obj->callbacks->callbacks, EINA_INLIST_GET(fn), _callback_priority_cmp); } EAPI void * evas_object_event_callback_del(Evas_Object *obj, Evas_Callback_Type type, Evas_Object_Event_Cb func) { /* MEM OK */ Evas_Func_Node *fn; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return NULL; MAGIC_CHECK_END(); if (!func) return NULL; if (!obj->callbacks) return NULL; EINA_INLIST_FOREACH(obj->callbacks->callbacks, fn) { if ((fn->func == func) && (fn->type == type) && (!fn->delete_me)) { void *tmp; tmp = fn->data; fn->delete_me = 1; obj->callbacks->deletions_waiting = 1; if (!obj->callbacks->walking_list) evas_object_event_callback_clear(obj); return tmp; } } return NULL; } EAPI void * evas_object_event_callback_del_full(Evas_Object *obj, Evas_Callback_Type type, Evas_Object_Event_Cb func, const void *data) { /* MEM OK */ Evas_Func_Node *fn; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return NULL; MAGIC_CHECK_END(); if (!func) return NULL; if (!obj->callbacks) return NULL; EINA_INLIST_FOREACH(obj->callbacks->callbacks, fn) { if ((fn->func == func) && (fn->type == type) && (fn->data == data) && (!fn->delete_me)) { void *tmp; tmp = fn->data; fn->delete_me = 1; obj->callbacks->deletions_waiting = 1; if (!obj->callbacks->walking_list) evas_object_event_callback_clear(obj); return tmp; } } return NULL; } EAPI void evas_event_callback_add(Evas *e, Evas_Callback_Type type, Evas_Event_Cb func, const void *data) { evas_event_callback_priority_add(e, type, EVAS_CALLBACK_PRIORITY_DEFAULT, func, data); } EAPI void evas_event_callback_priority_add(Evas *e, Evas_Callback_Type type, Evas_Callback_Priority priority, Evas_Event_Cb func, const void *data) { /* MEM OK */ Evas_Func_Node *fn; MAGIC_CHECK(e, Evas, MAGIC_EVAS); return; MAGIC_CHECK_END(); if (!func) return; if (!e->callbacks) { EVAS_MEMPOOL_INIT(_mp_cb, "evas_callbacks", Evas_Callbacks, 64, ); e->callbacks = EVAS_MEMPOOL_ALLOC(_mp_cb, Evas_Callbacks); if (!e->callbacks) return; EVAS_MEMPOOL_PREP(_mp_cb, e->callbacks, Evas_Callbacks); } EVAS_MEMPOOL_INIT(_mp_fn, "evas_func_node", Evas_Func_Node, 128, ); fn = EVAS_MEMPOOL_ALLOC(_mp_fn, Evas_Func_Node); if (!fn) return; EVAS_MEMPOOL_PREP(_mp_fn, fn, Evas_Func_Node); fn->func = func; fn->data = (void *)data; fn->type = type; fn->priority = priority; e->callbacks->callbacks = eina_inlist_sorted_insert(e->callbacks->callbacks, EINA_INLIST_GET(fn), _callback_priority_cmp); } EAPI void * evas_event_callback_del(Evas *e, Evas_Callback_Type type, Evas_Event_Cb func) { /* MEM OK */ Evas_Func_Node *fn; MAGIC_CHECK(e, Evas, MAGIC_EVAS); return NULL; MAGIC_CHECK_END(); if (!func) return NULL; if (!e->callbacks) return NULL; EINA_INLIST_FOREACH(e->callbacks->callbacks, fn) { if ((fn->func == func) && (fn->type == type) && (!fn->delete_me)) { void *data; data = fn->data; fn->delete_me = 1; e->callbacks->deletions_waiting = 1; if (!e->callbacks->walking_list) evas_event_callback_clear(e); return data; } } return NULL; } EAPI void * evas_event_callback_del_full(Evas *e, Evas_Callback_Type type, Evas_Event_Cb func, const void *data) { /* MEM OK */ Evas_Func_Node *fn; MAGIC_CHECK(e, Evas, MAGIC_EVAS); return NULL; MAGIC_CHECK_END(); if (!func) return NULL; if (!e->callbacks) return NULL; EINA_INLIST_FOREACH(e->callbacks->callbacks, fn) { if ((fn->func == func) && (fn->type == type) && (fn->data == data) && (!fn->delete_me)) { void *tmp; tmp = fn->data; fn->delete_me = 1; e->callbacks->deletions_waiting = 1; if (!e->callbacks->walking_list) evas_event_callback_clear(e); return tmp; } } return NULL; } EAPI void evas_post_event_callback_push(Evas *e, Evas_Object_Event_Post_Cb func, const void *data) { Evas_Post_Callback *pc; MAGIC_CHECK(e, Evas, MAGIC_EVAS); return; MAGIC_CHECK_END(); EVAS_MEMPOOL_INIT(_mp_pc, "evas_post_callback", Evas_Post_Callback, 64, ); pc = EVAS_MEMPOOL_ALLOC(_mp_pc, Evas_Post_Callback); if (!pc) return; EVAS_MEMPOOL_PREP(_mp_pc, pc, Evas_Post_Callback); if (e->delete_me) return; pc->func = func; pc->data = data; e->post_events = eina_list_prepend(e->post_events, pc); } EAPI void evas_post_event_callback_remove(Evas *e, Evas_Object_Event_Post_Cb func) { Evas_Post_Callback *pc; Eina_List *l; MAGIC_CHECK(e, Evas, MAGIC_EVAS); return; MAGIC_CHECK_END(); EINA_LIST_FOREACH(e->post_events, l, pc) { if (pc->func == func) { pc->delete_me = 1; return; } } } EAPI void evas_post_event_callback_remove_full(Evas *e, Evas_Object_Event_Post_Cb func, const void *data) { Evas_Post_Callback *pc; Eina_List *l; MAGIC_CHECK(e, Evas, MAGIC_EVAS); return; MAGIC_CHECK_END(); EINA_LIST_FOREACH(e->post_events, l, pc) { if ((pc->func == func) && (pc->data == data)) { pc->delete_me = 1; return; } } } evas-1.7.9/src/lib/canvas/evas_object_smart_clipped.c0000664000175000017500000001200112175475547017572 00000000000000#include "evas_common.h" #include "evas_private.h" #define CSO_DATA_GET_OR_RETURN(obj, ptr) \ Evas_Object_Smart_Clipped_Data *ptr = evas_object_smart_data_get(obj); \ if (!ptr) return; EAPI void evas_object_smart_move_children_relative(Evas_Object *obj, Evas_Coord dx, Evas_Coord dy) { const Eina_Inlist *lst; Evas_Object *child; if ((dx == 0) && (dy == 0)) return; lst = evas_object_smart_members_get_direct(obj); EINA_INLIST_FOREACH(lst, child) { Evas_Coord orig_x, orig_y; // shortcut as we are in evas // evas_object_geometry_get(child, &orig_x, &orig_y, NULL, NULL); if (child->delete_me) continue; if (child->is_static_clip) continue; orig_x = child->cur.geometry.x; orig_y = child->cur.geometry.y; evas_object_move(child, orig_x + dx, orig_y + dy); } } EAPI Evas_Object * evas_object_smart_clipped_clipper_get(Evas_Object *obj) { Evas_Object_Smart_Clipped_Data *cso = evas_object_smart_data_get(obj); if (!cso) return NULL; return cso->clipper; } static void evas_object_smart_clipped_smart_add(Evas_Object *obj) { Evas_Object_Smart_Clipped_Data *cso; Evas_Object *clipper; cso = evas_object_smart_data_get(obj); if (!cso) cso = calloc(1, sizeof(*cso)); /* users can provide it or realloc() later */ cso->evas = evas_object_evas_get(obj); clipper = evas_object_rectangle_add(cso->evas); evas_object_static_clip_set(clipper, 1); cso->clipper = NULL; evas_object_smart_member_add(clipper, obj); cso->clipper = clipper; evas_object_color_set(cso->clipper, 255, 255, 255, 255); evas_object_move(cso->clipper, -100000, -100000); evas_object_resize(cso->clipper, 200000, 200000); evas_object_pass_events_set(cso->clipper, 1); evas_object_hide(cso->clipper); /* show when have something clipped to it */ evas_object_smart_data_set(obj, cso); } static void evas_object_smart_clipped_smart_del(Evas_Object *obj) { CSO_DATA_GET_OR_RETURN(obj, cso); if (cso->clipper) { Evas_Object *clipper = cso->clipper; cso->clipper = NULL; evas_object_del(clipper); } _evas_object_smart_members_all_del(obj); free(cso); evas_object_smart_data_set(obj, NULL); } static void evas_object_smart_clipped_smart_move(Evas_Object *obj, Evas_Coord x, Evas_Coord y) { Evas_Coord orig_x, orig_y; evas_object_geometry_get(obj, &orig_x, &orig_y, NULL, NULL); evas_object_smart_move_children_relative(obj, x - orig_x, y - orig_y); } static void evas_object_smart_clipped_smart_show(Evas_Object *obj) { CSO_DATA_GET_OR_RETURN(obj, cso); if (evas_object_clipees_get(cso->clipper)) evas_object_show(cso->clipper); /* just show if clipper being used */ } static void evas_object_smart_clipped_smart_hide(Evas_Object *obj) { CSO_DATA_GET_OR_RETURN(obj, cso); evas_object_hide(cso->clipper); } static void evas_object_smart_clipped_smart_color_set(Evas_Object *obj, int r, int g, int b, int a) { CSO_DATA_GET_OR_RETURN(obj, cso); evas_object_color_set(cso->clipper, r, g, b, a); } static void evas_object_smart_clipped_smart_clip_set(Evas_Object *obj, Evas_Object *clip) { CSO_DATA_GET_OR_RETURN(obj, cso); evas_object_clip_set(cso->clipper, clip); } static void evas_object_smart_clipped_smart_clip_unset(Evas_Object *obj) { CSO_DATA_GET_OR_RETURN(obj, cso); evas_object_clip_unset(cso->clipper); } static void evas_object_smart_clipped_smart_member_add(Evas_Object *obj, Evas_Object *member) { CSO_DATA_GET_OR_RETURN(obj, cso); if (!cso->clipper || member == cso->clipper) return; evas_object_clip_set(member, cso->clipper); if (evas_object_visible_get(obj)) evas_object_show(cso->clipper); } static void evas_object_smart_clipped_smart_member_del(Evas_Object *obj, Evas_Object *member) { CSO_DATA_GET_OR_RETURN(obj, cso); if (!cso->clipper) return; evas_object_clip_unset(member); if (!evas_object_clipees_get(cso->clipper)) evas_object_hide(cso->clipper); } EAPI void evas_object_smart_clipped_smart_set(Evas_Smart_Class *sc) { if (!sc) return; sc->add = evas_object_smart_clipped_smart_add; sc->del = evas_object_smart_clipped_smart_del; sc->move = evas_object_smart_clipped_smart_move; sc->show = evas_object_smart_clipped_smart_show; sc->hide = evas_object_smart_clipped_smart_hide; sc->color_set = evas_object_smart_clipped_smart_color_set; sc->clip_set = evas_object_smart_clipped_smart_clip_set; sc->clip_unset = evas_object_smart_clipped_smart_clip_unset; sc->calculate = NULL; sc->member_add = evas_object_smart_clipped_smart_member_add; sc->member_del = evas_object_smart_clipped_smart_member_del; } EAPI const Evas_Smart_Class * evas_object_smart_clipped_class_get(void) { static Evas_Smart_Class _sc = EVAS_SMART_CLASS_INIT_NAME_VERSION("EvasObjectSmartClipped"); static const Evas_Smart_Class *class = NULL; if (class) return class; evas_object_smart_clipped_smart_set(&_sc); class = &_sc; return class; } evas-1.7.9/src/lib/canvas/evas_font_dir.c0000664000175000017500000007362612175475547015246 00000000000000#ifdef HAVE_CONFIG_H # include #endif #ifdef HAVE_EVIL # include #endif #ifdef BUILD_FONT_LOADER_EET #include #endif #ifdef HAVE_FONTCONFIG #include #endif #include "evas_common.h" #include "evas_private.h" /* font dir cache */ static Eina_Hash *font_dirs = NULL; static Eina_List *fonts_cache = NULL; static Eina_List *fonts_zero = NULL; typedef struct _Fndat Fndat; struct _Fndat { Evas_Font_Description *fdesc; const char *source; Evas_Font_Size size; Evas_Font_Set *font; int ref; Font_Rend_Flags wanted_rend; #ifdef HAVE_FONTCONFIG FcFontSet *set; FcPattern *p_nm; #endif }; /* private methods for font dir cache */ static Eina_Bool font_cache_dir_free(const Eina_Hash *hash, const void *key, void *data, void *fdata); static Evas_Font_Dir *object_text_font_cache_dir_update(char *dir, Evas_Font_Dir *fd); static Evas_Font *object_text_font_cache_font_find_x(Evas_Font_Dir *fd, char *font); static Evas_Font *object_text_font_cache_font_find_file(Evas_Font_Dir *fd, char *font); static Evas_Font *object_text_font_cache_font_find_alias(Evas_Font_Dir *fd, char *font); static Evas_Font *object_text_font_cache_font_find(Evas_Font_Dir *fd, char *font); static Evas_Font_Dir *object_text_font_cache_dir_add(char *dir); static void object_text_font_cache_dir_del(char *dir, Evas_Font_Dir *fd); static int evas_object_text_font_string_parse(char *buffer, char dest[14][256]); void evas_font_dir_cache_free(void) { if (font_dirs) { eina_hash_foreach(font_dirs, font_cache_dir_free, NULL); eina_hash_free(font_dirs); font_dirs = NULL; } } const char * evas_font_dir_cache_find(char *dir, char *font) { Evas_Font_Dir *fd = NULL; if (!font_dirs) font_dirs = eina_hash_string_superfast_new(NULL); else fd = eina_hash_find(font_dirs, dir); fd = object_text_font_cache_dir_update(dir, fd); if (fd) { Evas_Font *fn; fn = object_text_font_cache_font_find(fd, font); if (fn) { return fn->path; } } return NULL; } static Eina_List * evas_font_set_get(const char *name) { Eina_List *fonts = NULL; char *p; p = strchr(name, ','); if (!p) { fonts = eina_list_append(fonts, eina_stringshare_add(name)); } else { const char *pp; char *nm; pp = name; while (p) { nm = alloca(p - pp + 1); strncpy(nm, pp, p - pp); nm[p - pp] = 0; fonts = eina_list_append(fonts, eina_stringshare_add(nm)); pp = p + 1; p = strchr(pp, ','); if (!p) fonts = eina_list_append(fonts, eina_stringshare_add(pp)); } } return fonts; } void evas_fonts_zero_free(Evas *evas) { Fndat *fd; EINA_LIST_FREE(fonts_zero, fd) { if (fd->fdesc) evas_font_desc_unref(fd->fdesc); if (fd->source) eina_stringshare_del(fd->source); evas->engine.func->font_free(evas->engine.data.output, fd->font); #ifdef HAVE_FONTCONFIG if (fd->set) FcFontSetDestroy(fd->set); if (fd->p_nm) FcPatternDestroy(fd->p_nm); #endif free(fd); } } void evas_fonts_zero_presure(Evas *evas) { Fndat *fd; while (fonts_zero && eina_list_count(fonts_zero) > 4) /* 4 is arbitrary */ { fd = eina_list_data_get(fonts_zero); if (fd->ref != 0) break; fonts_zero = eina_list_remove_list(fonts_zero, fonts_zero); if (fd->fdesc) evas_font_desc_unref(fd->fdesc); if (fd->source) eina_stringshare_del(fd->source); evas->engine.func->font_free(evas->engine.data.output, fd->font); #ifdef HAVE_FONTCONFIG if (fd->set) FcFontSetDestroy(fd->set); if (fd->p_nm) FcPatternDestroy(fd->p_nm); #endif free(fd); if (eina_list_count(fonts_zero) < 5) break; } } void evas_font_free(Evas *evas, void *font) { Eina_List *l; Fndat *fd; EINA_LIST_FOREACH(fonts_cache, l, fd) { if (fd->font == font) { fd->ref--; if (fd->ref == 0) { fonts_cache = eina_list_remove_list(fonts_cache, l); fonts_zero = eina_list_append(fonts_zero, fd); } break; } } while (fonts_zero && eina_list_count(fonts_zero) > 42) /* 42 is arbitrary */ { fd = eina_list_data_get(fonts_zero); if (fd->ref != 0) break; fonts_zero = eina_list_remove_list(fonts_zero, fonts_zero); if (fd->fdesc) evas_font_desc_unref(fd->fdesc); if (fd->source) eina_stringshare_del(fd->source); evas->engine.func->font_free(evas->engine.data.output, fd->font); #ifdef HAVE_FONTCONFIG if (fd->set) FcFontSetDestroy(fd->set); if (fd->p_nm) FcPatternDestroy(fd->p_nm); #endif free(fd); if (eina_list_count(fonts_zero) < 43) break; } } #ifdef HAVE_FONTCONFIG static Evas_Font_Set * evas_load_fontconfig(Evas *evas, FcFontSet *set, int size, Font_Rend_Flags wanted_rend) { Evas_Font_Set *font = NULL; int i; /* Do loading for all in family */ for (i = 0; i < set->nfont; i++) { FcValue filename; FcPatternGet(set->fonts[i], FC_FILE, 0, &filename); if (font) evas->engine.func->font_add(evas->engine.data.output, font, (char *)filename.u.s, size, wanted_rend); else font = evas->engine.func->font_load(evas->engine.data.output, (char *)filename.u.s, size, wanted_rend); } return font; } #endif #ifdef HAVE_FONTCONFIG /* In sync with Evas_Font_Style, Evas_Font_Weight and Evas_Font_Width */ static int _fc_slant_map[] = { FC_SLANT_ROMAN, FC_SLANT_OBLIQUE, FC_SLANT_ITALIC }; static int _fc_weight_map[] = { FC_WEIGHT_NORMAL, FC_WEIGHT_THIN, FC_WEIGHT_ULTRALIGHT, FC_WEIGHT_LIGHT, FC_WEIGHT_BOOK, FC_WEIGHT_MEDIUM, FC_WEIGHT_SEMIBOLD, FC_WEIGHT_BOLD, FC_WEIGHT_ULTRABOLD, FC_WEIGHT_BLACK, FC_WEIGHT_EXTRABLACK }; # ifdef FC_WIDTH static int _fc_width_map[] = { FC_WIDTH_NORMAL, FC_WIDTH_ULTRACONDENSED, FC_WIDTH_EXTRACONDENSED, FC_WIDTH_CONDENSED, FC_WIDTH_SEMICONDENSED, FC_WIDTH_SEMIEXPANDED, FC_WIDTH_EXPANDED, FC_WIDTH_EXTRAEXPANDED, FC_WIDTH_ULTRAEXPANDED }; # endif #endif struct _Style_Map { const char *name; int type; }; typedef struct _Style_Map Style_Map; static Style_Map _style_width_map[] = { {"normal", EVAS_FONT_WIDTH_NORMAL}, {"ultracondensed", EVAS_FONT_WIDTH_ULTRACONDENSED}, {"extracondensed", EVAS_FONT_WIDTH_EXTRACONDENSED}, {"condensed", EVAS_FONT_WIDTH_CONDENSED}, {"semicondensed", EVAS_FONT_WIDTH_SEMICONDENSED}, {"semiexpanded", EVAS_FONT_WIDTH_SEMIEXPANDED}, {"expanded", EVAS_FONT_WIDTH_EXPANDED}, {"extraexpanded", EVAS_FONT_WIDTH_EXTRAEXPANDED}, {"ultraexpanded", EVAS_FONT_WIDTH_ULTRAEXPANDED}, }; static Style_Map _style_weight_map[] = { {"normal", EVAS_FONT_WEIGHT_NORMAL}, {"thin", EVAS_FONT_WEIGHT_THIN}, {"ultralight", EVAS_FONT_WEIGHT_ULTRALIGHT}, {"light", EVAS_FONT_WEIGHT_LIGHT}, {"book", EVAS_FONT_WEIGHT_BOOK}, {"medium", EVAS_FONT_WEIGHT_MEDIUM}, {"semibold", EVAS_FONT_WEIGHT_SEMIBOLD}, {"bold", EVAS_FONT_WEIGHT_BOLD}, {"ultrabold", EVAS_FONT_WEIGHT_ULTRABOLD}, {"black", EVAS_FONT_WEIGHT_BLACK}, {"extrablack", EVAS_FONT_WEIGHT_EXTRABLACK} }; static Style_Map _style_slant_map[] = { {"normal", EVAS_FONT_SLANT_NORMAL}, {"oblique", EVAS_FONT_SLANT_OBLIQUE}, {"italic", EVAS_FONT_SLANT_ITALIC} }; #define _STYLE_MAP_LEN(x) (sizeof(x) / sizeof(*(x))) /** * @internal * Find a certain attribute from the map in the style. * @return the index of the found one. */ static int _evas_font_style_find_internal(const char *style, const char *style_end, Style_Map _map[], size_t map_len) { size_t i; while (style < style_end) { for (i = 0 ; i < map_len ; i++) { size_t len; const char *cur = _map[i].name; len = strlen(cur); if (!strncasecmp(style, cur, len) && (!cur[len] || (cur[len] == ' '))) { return _map[i].type; } } style = strchr(style, ' '); if (!style) break; while (*style && (*style == ' ')) style++; } return 0; } int evas_font_style_find(const char *start, const char *end, Evas_Font_Style style) { #define _RET_STYLE(x) \ return _evas_font_style_find_internal(start, end, \ _style_##x##_map, _STYLE_MAP_LEN(_style_##x##_map)); switch (style) { case EVAS_FONT_STYLE_SLANT: _RET_STYLE(slant); case EVAS_FONT_STYLE_WEIGHT: _RET_STYLE(weight); case EVAS_FONT_STYLE_WIDTH: _RET_STYLE(width); default: return 0; } #undef _RET_STYLE } void evas_font_desc_unref(Evas_Font_Description *fdesc) { if (--(fdesc->ref) == 0) { eina_stringshare_del(fdesc->name); eina_stringshare_del(fdesc->fallbacks); eina_stringshare_del(fdesc->lang); free(fdesc); } } Evas_Font_Description * evas_font_desc_ref(Evas_Font_Description *fdesc) { fdesc->ref++; return fdesc; } Evas_Font_Description * evas_font_desc_new(void) { Evas_Font_Description *fdesc; fdesc = calloc(1, sizeof(*fdesc)); fdesc->ref = 1; fdesc->is_new = EINA_TRUE; return fdesc; } Evas_Font_Description * evas_font_desc_dup(const Evas_Font_Description *fdesc) { Evas_Font_Description *new; new = evas_font_desc_new(); memcpy(new, fdesc, sizeof(*new)); new->ref = 1; new->is_new = EINA_TRUE; new->name = eina_stringshare_ref(new->name); return new; } int evas_font_desc_cmp(const Evas_Font_Description *a, const Evas_Font_Description *b) { /* FIXME: Do actual comparison, i.e less than and bigger than. */ return !((a->name == b->name) && (a->weight == b->weight) && (a->slant == b->slant) && (a->width == b->width) && (a->lang == b->lang)); } void evas_font_name_parse(Evas_Font_Description *fdesc, const char *name) { const char *end; end = strchr(name, ':'); if (!end) eina_stringshare_replace(&(fdesc->name), name); else eina_stringshare_replace_length(&(fdesc->name), name, end - name); while (end) { const char *tend; name = end; end = strchr(end + 1, ':'); if (!end) tend = name + strlen(name); else tend = end; if (!strncmp(name, ":style=", 7)) { #define _SET_STYLE(x) \ fdesc->x = _evas_font_style_find_internal(name + 7, tend, \ _style_##x##_map, _STYLE_MAP_LEN(_style_##x##_map)); _SET_STYLE(slant); _SET_STYLE(weight); _SET_STYLE(width); #undef _SET_STYLE } else if (!strncmp(name, ":lang=", 6)) { const char *tmp = name + 6; eina_stringshare_replace_length(&(fdesc->lang), tmp, tend - tmp); } } } void * evas_font_load(Evas *evas, Evas_Font_Description *fdesc, const char *source, Evas_Font_Size size) { #ifdef HAVE_FONTCONFIG FcPattern *p_nm = NULL; FcFontSet *set = NULL; #endif Evas_Font_Set *font = NULL; Eina_List *fonts, *l; Fndat *fd; Fndat *found_fd = NULL; char *nm; Font_Rend_Flags wanted_rend = 0; if (!fdesc) return NULL; fdesc->is_new = EINA_FALSE; if (fdesc->slant != EVAS_FONT_SLANT_NORMAL) wanted_rend |= FONT_REND_SLANT; if (fdesc->weight == EVAS_FONT_WEIGHT_BOLD) wanted_rend |= FONT_REND_WEIGHT; EINA_LIST_FOREACH(fonts_cache, l, fd) { if (!evas_font_desc_cmp(fdesc, fd->fdesc)) { if (((!source) && (!fd->source)) || ((source) && (fd->source) && (!strcmp(source, fd->source)))) { if ((size == fd->size) && (wanted_rend == fd->wanted_rend)) { fonts_cache = eina_list_promote_list(fonts_cache, l); fd->ref++; return fd->font; } #ifdef HAVE_FONTCONFIG else if (fd->set && fd->p_nm) { found_fd = fd; } #endif } } } #ifdef HAVE_FONTCONFIG if (found_fd) { font = evas_load_fontconfig(evas, found_fd->set, size, wanted_rend); goto on_find; } #endif EINA_LIST_FOREACH(fonts_zero, l, fd) { if (!evas_font_desc_cmp(fdesc, fd->fdesc)) { if (((!source) && (!fd->source)) || ((source) && (fd->source) && (!strcmp(source, fd->source)))) { if ((size == fd->size) && (wanted_rend == fd->wanted_rend)) { fonts_zero = eina_list_remove_list(fonts_zero, l); fonts_cache = eina_list_prepend(fonts_cache, fd); fd->ref++; return fd->font; } #ifdef HAVE_FONTCONFIG else if (fd->set && fd->p_nm) { found_fd = fd; } #endif } } } #ifdef HAVE_FONTCONFIG if (found_fd) { font = evas_load_fontconfig(evas, found_fd->set, size, wanted_rend); goto on_find; } #endif fonts = evas_font_set_get(fdesc->name); EINA_LIST_FOREACH(fonts, l, nm) /* Load each font in append */ { if (l == fonts || !font) /* First iteration OR no font */ { #ifdef BUILD_FONT_LOADER_EET if (source) /* Load Font from "eet" source */ { Eet_File *ef; char *fake_name; fake_name = evas_file_path_join(source, nm); if (fake_name) { font = evas->engine.func->font_load(evas->engine.data.output, fake_name, size, wanted_rend); if (!font) /* Load from fake name failed, probably not cached */ { /* read original!!! */ ef = eet_open(source, EET_FILE_MODE_READ); if (ef) { void *fdata; int fsize = 0; fdata = eet_read(ef, nm, &fsize); if ((fdata) && (fsize > 0)) { font = evas->engine.func->font_memory_load(evas->engine.data.output, source, nm, size, fdata, fsize, wanted_rend); free(fdata); } eet_close(ef); } } free(fake_name); } } if (!font) /* Source load failed */ { #endif if (evas_file_path_is_full_path((char *)nm)) /* Try filename */ font = evas->engine.func->font_load(evas->engine.data.output, (char *)nm, size, wanted_rend); else /* search font path */ { Eina_List *ll; char *dir; EINA_LIST_FOREACH(evas->font_path, ll, dir) { const char *f_file; f_file = evas_font_dir_cache_find(dir, (char *)nm); if (f_file) { font = evas->engine.func->font_load(evas->engine.data.output, f_file, size, wanted_rend); if (font) break; } } } #ifdef BUILD_FONT_LOADER_EET } #endif } else /* Base font loaded, append others */ { #ifdef BUILD_FONT_LOADER_EET void *ok = NULL; if (source) { Eet_File *ef; char *fake_name; fake_name = evas_file_path_join(source, nm); if (fake_name) { /* FIXME: make an engine func */ if (!evas->engine.func->font_add(evas->engine.data.output, font, fake_name, size, wanted_rend)) { /* read original!!! */ ef = eet_open(source, EET_FILE_MODE_READ); if (ef) { void *fdata; int fsize = 0; fdata = eet_read(ef, nm, &fsize); if ((fdata) && (fsize > 0)) { ok = evas->engine.func->font_memory_add(evas->engine.data.output, font, source, nm, size, fdata, fsize, wanted_rend); free(fdata); } eet_close(ef); } } else ok = (void *)1; free(fake_name); } } if (!ok) { #endif if (evas_file_path_is_full_path((char *)nm)) evas->engine.func->font_add(evas->engine.data.output, font, (char *)nm, size, wanted_rend); else { Eina_List *ll; char *dir; EINA_LIST_FOREACH(evas->font_path, ll, dir) { const char *f_file; f_file = evas_font_dir_cache_find(dir, (char *)nm); if (f_file) { if (evas->engine.func->font_add(evas->engine.data.output, font, f_file, size, wanted_rend)) break; } } } #ifdef BUILD_FONT_LOADER_EET } #endif } eina_stringshare_del(nm); } fonts = eina_list_free(fonts); #ifdef HAVE_FONTCONFIG if (!font) /* Search using fontconfig */ { FcResult res; p_nm = FcPatternBuild (NULL, FC_WEIGHT, FcTypeInteger, _fc_weight_map[fdesc->weight], FC_SLANT, FcTypeInteger, _fc_slant_map[fdesc->slant], #ifdef FC_WIDTH FC_WIDTH, FcTypeInteger, _fc_width_map[fdesc->width], #endif NULL); FcPatternAddString (p_nm, FC_FAMILY, (FcChar8*) fdesc->name); /* Handle font fallbacks */ if (fdesc->fallbacks) { while (1) { const char *start, *end; start = fdesc->fallbacks; end = strchr(start, ','); if (end) { char *tmp = alloca((end - start) + 1); strncpy(tmp, start, end - start); tmp[end - start] = 0; FcPatternAddString (p_nm, FC_FAMILY, (FcChar8*) tmp); } else { FcPatternAddString (p_nm, FC_FAMILY, (FcChar8*) start); break; } } } if (fdesc->lang) FcPatternAddString (p_nm, FC_LANG, (FcChar8 *) fdesc->lang); FcConfigSubstitute(NULL, p_nm, FcMatchPattern); FcDefaultSubstitute(p_nm); /* do matching */ set = FcFontSort(NULL, p_nm, FcTrue, NULL, &res); if (!set) { ERR("No fontconfig font matches '%s'. It was the last resource, no font found!", fdesc->name); FcPatternDestroy(p_nm); p_nm = NULL; } else { font = evas_load_fontconfig(evas, set, size, wanted_rend); } } #endif #ifdef HAVE_FONTCONFIG on_find: #endif fd = calloc(1, sizeof(Fndat)); if (fd) { fd->fdesc = evas_font_desc_ref(fdesc); if (source) fd->source = eina_stringshare_add(source); fd->font = font; fd->wanted_rend = wanted_rend; fd->size = size; fd->ref = 1; fonts_cache = eina_list_prepend(fonts_cache, fd); #ifdef HAVE_FONTCONFIG fd->set = set; fd->p_nm = p_nm; #endif } if (font) evas->engine.func->font_hinting_set(evas->engine.data.output, font, evas->hinting); return font; } void evas_font_load_hinting_set(Evas *evas, void *font, int hinting) { evas->engine.func->font_hinting_set(evas->engine.data.output, font, hinting); } Eina_List * evas_font_dir_available_list(const Evas *evas) { Eina_List *l; Eina_List *ll; Eina_List *available = NULL; char *dir; #ifdef HAVE_FONTCONFIG /* Add font config fonts */ FcPattern *p; FcFontSet *set = NULL; FcObjectSet *os; int i; p = FcPatternCreate(); os = FcObjectSetBuild(FC_FAMILY, FC_STYLE, NULL); if (p && os) set = FcFontList(NULL, p, os); if (p) FcPatternDestroy(p); if (os) FcObjectSetDestroy(os); if (set) { for (i = 0; i < set->nfont; i++) { char *font; font = (char *)FcNameUnparse(set->fonts[i]); available = eina_list_append(available, eina_stringshare_add(font)); free(font); } FcFontSetDestroy(set); } #endif /* Add fonts in evas font_path*/ if (!evas->font_path) return available; if (!font_dirs) font_dirs = eina_hash_string_superfast_new(NULL); EINA_LIST_FOREACH(evas->font_path, l, dir) { Evas_Font_Dir *fd; fd = eina_hash_find(font_dirs, dir); fd = object_text_font_cache_dir_update(dir, fd); if (fd && fd->aliases) { Evas_Font_Alias *fa; EINA_LIST_FOREACH(fd->aliases, ll, fa) available = eina_list_append(available, eina_stringshare_add((char *)fa->alias)); } } return available; } void evas_font_dir_available_list_free(Eina_List *available) { while (available) { eina_stringshare_del(available->data); available = eina_list_remove(available, available->data); } } /* private stuff */ static Eina_Bool font_cache_dir_free(const Eina_Hash *hash __UNUSED__, const void *key, void *data, void *fdata __UNUSED__) { object_text_font_cache_dir_del((char *) key, data); return 1; } static Evas_Font_Dir * object_text_font_cache_dir_update(char *dir, Evas_Font_Dir *fd) { DATA64 mt; char *tmp; if (fd) { mt = evas_file_modified_time(dir); if (mt != fd->dir_mod_time) { object_text_font_cache_dir_del(dir, fd); eina_hash_del(font_dirs, dir, fd); } else { tmp = evas_file_path_join(dir, "fonts.dir"); if (tmp) { mt = evas_file_modified_time(tmp); free(tmp); if (mt != fd->fonts_dir_mod_time) { object_text_font_cache_dir_del(dir, fd); eina_hash_del(font_dirs, dir, fd); } else { tmp = evas_file_path_join(dir, "fonts.alias"); if (tmp) { mt = evas_file_modified_time(tmp); free(tmp); } if (mt != fd->fonts_alias_mod_time) { object_text_font_cache_dir_del(dir, fd); eina_hash_del(font_dirs, dir, fd); } else return fd; } } } } return object_text_font_cache_dir_add(dir); } static Evas_Font * object_text_font_cache_font_find_x(Evas_Font_Dir *fd, char *font) { Eina_List *l; char font_prop[14][256]; int num; Evas_Font *fn; num = evas_object_text_font_string_parse(font, font_prop); if (num != 14) return NULL; EINA_LIST_FOREACH(fd->fonts, l, fn) { if (fn->type == 1) { int i; int match = 0; for (i = 0; i < 14; i++) { if ((font_prop[i][0] == '*') && (font_prop[i][1] == 0)) match++; else { if (!strcasecmp(font_prop[i], fn->x.prop[i])) match++; else break; } } if (match == 14) return fn; } } return NULL; } static Evas_Font * object_text_font_cache_font_find_file(Evas_Font_Dir *fd, char *font) { Eina_List *l; Evas_Font *fn; EINA_LIST_FOREACH(fd->fonts, l, fn) { if (fn->type == 0) { if (!strcasecmp(font, fn->simple.name)) return fn; } } return NULL; } static Evas_Font * object_text_font_cache_font_find_alias(Evas_Font_Dir *fd, char *font) { Eina_List *l; Evas_Font_Alias *fa; EINA_LIST_FOREACH(fd->aliases, l, fa) if (!strcasecmp(fa->alias, font)) return fa->fn; return NULL; } static Evas_Font * object_text_font_cache_font_find(Evas_Font_Dir *fd, char *font) { Evas_Font *fn; fn = eina_hash_find(fd->lookup, font); if (fn) return fn; fn = object_text_font_cache_font_find_alias(fd, font); if (!fn) fn = object_text_font_cache_font_find_x(fd, font); if (!fn) fn = object_text_font_cache_font_find_file(fd, font); if (!fn) return NULL; eina_hash_add(fd->lookup, font, fn); return fn; } static Evas_Font_Dir * object_text_font_cache_dir_add(char *dir) { Evas_Font_Dir *fd; char *tmp, *tmp2; Eina_List *fdir; Evas_Font *fn; fd = calloc(1, sizeof(Evas_Font_Dir)); if (!fd) return NULL; fd->lookup = eina_hash_string_superfast_new(NULL); eina_hash_add(font_dirs, dir, fd); /* READ fonts.alias, fonts.dir and directory listing */ /* fonts.dir */ tmp = evas_file_path_join(dir, "fonts.dir"); if (tmp) { FILE *f; f = fopen(tmp, "rb"); if (f) { int num; char fname[4096], fdef[4096]; if (fscanf(f, "%i\n", &num) != 1) goto cant_read; /* read font lines */ while (fscanf(f, "%4090s %[^\n]\n", fname, fdef) == 2) { char font_prop[14][256]; int i; /* skip comments */ if ((fdef[0] == '!') || (fdef[0] == '#')) continue; /* parse font def */ num = evas_object_text_font_string_parse((char *)fdef, font_prop); if (num == 14) { fn = calloc(1, sizeof(Evas_Font)); if (fn) { fn->type = 1; for (i = 0; i < 14; i++) fn->x.prop[i] = eina_stringshare_add(font_prop[i]); tmp2 = evas_file_path_join(dir, fname); if (tmp2) { fn->path = eina_stringshare_add(tmp2); free(tmp2); } fd->fonts = eina_list_append(fd->fonts, fn); } } } cant_read: ; fclose(f); } free(tmp); } /* directoy listing */ fdir = evas_file_path_list(dir, "*.ttf", 0); while (fdir) { tmp = evas_file_path_join(dir, fdir->data); if (tmp) { fn = calloc(1, sizeof(Evas_Font)); if (fn) { char *p; fn->type = 0; tmp2 = alloca(strlen(fdir->data) + 1); strcpy(tmp2, fdir->data); p = strrchr(tmp2, '.'); if (p) *p = 0; fn->simple.name = eina_stringshare_add(tmp2); tmp2 = evas_file_path_join(dir, fdir->data); if (tmp2) { fn->path = eina_stringshare_add(tmp2); free(tmp2); } fd->fonts = eina_list_append(fd->fonts, fn); } free(tmp); } free(fdir->data); fdir = eina_list_remove(fdir, fdir->data); } /* fonts.alias */ tmp = evas_file_path_join(dir, "fonts.alias"); if (tmp) { FILE *f; f = fopen(tmp, "rb"); if (f) { char fname[4096], fdef[4096]; /* read font alias lines */ while (fscanf(f, "%4090s %[^\n]\n", fname, fdef) == 2) { Evas_Font_Alias *fa; /* skip comments */ if ((fname[0] == '!') || (fname[0] == '#')) continue; fa = calloc(1, sizeof(Evas_Font_Alias)); if (fa) { fa->alias = eina_stringshare_add(fname); fa->fn = object_text_font_cache_font_find_x(fd, fdef); if ((!fa->alias) || (!fa->fn)) { if (fa->alias) eina_stringshare_del(fa->alias); free(fa); } else fd->aliases = eina_list_append(fd->aliases, fa); } } fclose(f); } free(tmp); } fd->dir_mod_time = evas_file_modified_time(dir); tmp = evas_file_path_join(dir, "fonts.dir"); if (tmp) { fd->fonts_dir_mod_time = evas_file_modified_time(tmp); free(tmp); } tmp = evas_file_path_join(dir, "fonts.alias"); if (tmp) { fd->fonts_alias_mod_time = evas_file_modified_time(tmp); free(tmp); } return fd; } static void object_text_font_cache_dir_del(char *dir __UNUSED__, Evas_Font_Dir *fd) { if (fd->lookup) eina_hash_free(fd->lookup); while (fd->fonts) { Evas_Font *fn; int i; fn = fd->fonts->data; fd->fonts = eina_list_remove(fd->fonts, fn); for (i = 0; i < 14; i++) { if (fn->x.prop[i]) eina_stringshare_del(fn->x.prop[i]); } if (fn->simple.name) eina_stringshare_del(fn->simple.name); if (fn->path) eina_stringshare_del(fn->path); free(fn); } while (fd->aliases) { Evas_Font_Alias *fa; fa = fd->aliases->data; fd->aliases = eina_list_remove(fd->aliases, fa); if (fa->alias) eina_stringshare_del(fa->alias); free(fa); } free(fd); } static int evas_object_text_font_string_parse(char *buffer, char dest[14][256]) { char *p; int n, m, i; n = 0; m = 0; p = buffer; if (p[0] != '-') return 0; i = 1; while (p[i]) { dest[n][m] = p[i]; if ((p[i] == '-') || (m == 255)) { dest[n][m] = 0; n++; m = -1; } i++; m++; if (n == 14) return n; } dest[n][m] = 0; n++; return n; } EAPI void evas_font_path_clear(Evas *e) { MAGIC_CHECK(e, Evas, MAGIC_EVAS); return; MAGIC_CHECK_END(); while (e->font_path) { eina_stringshare_del(e->font_path->data); e->font_path = eina_list_remove(e->font_path, e->font_path->data); } } EAPI void evas_font_path_append(Evas *e, const char *path) { MAGIC_CHECK(e, Evas, MAGIC_EVAS); return; MAGIC_CHECK_END(); if (!path) return; e->font_path = eina_list_append(e->font_path, eina_stringshare_add(path)); } EAPI void evas_font_path_prepend(Evas *e, const char *path) { MAGIC_CHECK(e, Evas, MAGIC_EVAS); return; MAGIC_CHECK_END(); if (!path) return; e->font_path = eina_list_prepend(e->font_path, eina_stringshare_add(path)); } EAPI const Eina_List * evas_font_path_list(const Evas *e) { MAGIC_CHECK(e, Evas, MAGIC_EVAS); return NULL; MAGIC_CHECK_END(); return e->font_path; } static void evas_font_object_rehint(Evas_Object *obj) { if (obj->smart.smart) { EINA_INLIST_FOREACH(evas_object_smart_members_get_direct(obj), obj) evas_font_object_rehint(obj); } else { if (!strcmp(obj->type, "text")) _evas_object_text_rehint(obj); if (!strcmp(obj->type, "textblock")) _evas_object_textblock_rehint(obj); } } EAPI void evas_font_hinting_set(Evas *e, Evas_Font_Hinting_Flags hinting) { Evas_Layer *lay; MAGIC_CHECK(e, Evas, MAGIC_EVAS); return; MAGIC_CHECK_END(); if (e->hinting == hinting) return; e->hinting = hinting; EINA_INLIST_FOREACH(e->layers, lay) { Evas_Object *obj; EINA_INLIST_FOREACH(lay->objects, obj) evas_font_object_rehint(obj); } } EAPI Evas_Font_Hinting_Flags evas_font_hinting_get(const Evas *e) { MAGIC_CHECK(e, Evas, MAGIC_EVAS); return EVAS_FONT_HINTING_BYTECODE; MAGIC_CHECK_END(); return e->hinting; } EAPI Eina_Bool evas_font_hinting_can_hint(const Evas *e, Evas_Font_Hinting_Flags hinting) { MAGIC_CHECK(e, Evas, MAGIC_EVAS); return 0; MAGIC_CHECK_END(); if (e->engine.func->font_hinting_can_hint) return e->engine.func->font_hinting_can_hint(e->engine.data.output, hinting); return EINA_FALSE; } EAPI void evas_font_cache_flush(Evas *e) { MAGIC_CHECK(e, Evas, MAGIC_EVAS); return; MAGIC_CHECK_END(); e->engine.func->font_cache_flush(e->engine.data.output); } EAPI void evas_font_cache_set(Evas *e, int size) { MAGIC_CHECK(e, Evas, MAGIC_EVAS); return; MAGIC_CHECK_END(); if (size < 0) size = 0; e->engine.func->font_cache_set(e->engine.data.output, size); } EAPI int evas_font_cache_get(const Evas *e) { MAGIC_CHECK(e, Evas, MAGIC_EVAS); return 0; MAGIC_CHECK_END(); return e->engine.func->font_cache_get(e->engine.data.output); } EAPI Eina_List * evas_font_available_list(const Evas *e) { MAGIC_CHECK(e, Evas, MAGIC_EVAS); return NULL; MAGIC_CHECK_END(); return evas_font_dir_available_list(e); } EAPI void evas_font_available_list_free(Evas *e, Eina_List *available) { MAGIC_CHECK(e, Evas, MAGIC_EVAS); return; MAGIC_CHECK_END(); evas_font_dir_available_list_free(available); } evas-1.7.9/src/lib/canvas/evas_layer.c0000664000175000017500000001233412175475547014543 00000000000000#include "evas_common.h" #include "evas_private.h" static void _evas_layer_free(Evas_Layer *lay); void evas_object_inject(Evas_Object *obj, Evas *e) { Evas_Layer *lay; if (obj->in_layer) return; lay = evas_layer_find(e, obj->cur.layer); if (!lay) { lay = evas_layer_new(e); lay->layer = obj->cur.layer; evas_layer_add(lay); } lay->objects = (Evas_Object *)eina_inlist_append(EINA_INLIST_GET(lay->objects), EINA_INLIST_GET(obj)); lay->usage++; obj->layer = lay; obj->in_layer = 1; } void evas_object_release(Evas_Object *obj, int clean_layer) { if (!obj->in_layer) return; obj->layer->objects = (Evas_Object *)eina_inlist_remove(EINA_INLIST_GET(obj->layer->objects), EINA_INLIST_GET(obj)); obj->layer->usage--; if (clean_layer) { if (obj->layer->usage <= 0) { evas_layer_del(obj->layer); _evas_layer_free(obj->layer); } } obj->layer = NULL; obj->in_layer = 0; } Evas_Layer * evas_layer_new(Evas *e) { Evas_Layer *lay; lay = calloc(1, sizeof(Evas_Layer)); if (!lay) return NULL; lay->evas = e; return lay; } static void _evas_layer_free(Evas_Layer *lay) { free(lay); } void evas_layer_pre_free(Evas_Layer *lay) { Evas_Object *obj; EINA_INLIST_FOREACH(lay->objects, obj) { if ((!obj->smart.parent) && (!obj->delete_me)) evas_object_del(obj); } } void evas_layer_free_objects(Evas_Layer *lay) { while (lay->objects) { Evas_Object *obj; obj = (Evas_Object *)lay->objects; evas_object_free(obj, 0); } } void evas_layer_clean(Evas *e) { Evas_Layer *tmp; while (e->layers) { tmp = e->layers; evas_layer_del(tmp); _evas_layer_free(tmp); } } Evas_Layer * evas_layer_find(Evas *e, short layer_num) { Evas_Layer *layer; EINA_INLIST_FOREACH(e->layers, layer) { if (layer->layer == layer_num) return layer; } return NULL; } void evas_layer_add(Evas_Layer *lay) { Evas_Layer *layer; EINA_INLIST_FOREACH(lay->evas->layers, layer) { if (layer->layer > lay->layer) { lay->evas->layers = (Evas_Layer *)eina_inlist_prepend_relative(EINA_INLIST_GET(lay->evas->layers), EINA_INLIST_GET(lay), EINA_INLIST_GET(layer)); return; } } lay->evas->layers = (Evas_Layer *)eina_inlist_append(EINA_INLIST_GET(lay->evas->layers), EINA_INLIST_GET(lay)); } void evas_layer_del(Evas_Layer *lay) { Evas *e; e = lay->evas; e->layers = (Evas_Layer *)eina_inlist_remove(EINA_INLIST_GET(e->layers), EINA_INLIST_GET(lay)); } static void _evas_object_layer_set_child(Evas_Object *obj, Evas_Object *par, short l) { if (obj->delete_me) return; if (obj->cur.layer == l) return; evas_object_release(obj, 1); obj->cur.layer = l; obj->layer = par->layer; obj->layer->usage++; if (obj->smart.smart) { Eina_Inlist *contained; Evas_Object *member; contained = (Eina_Inlist *)evas_object_smart_members_get_direct(obj); EINA_INLIST_FOREACH(contained, member) { _evas_object_layer_set_child(member, obj, l); } } } /* public functions */ EAPI void evas_object_layer_set(Evas_Object *obj, short l) { Evas *e; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); if (obj->delete_me) return; if (evas_object_intercept_call_layer_set(obj, l)) return; if (obj->smart.parent) return; if (obj->cur.layer == l) { evas_object_raise(obj); return; } e = obj->layer->evas; evas_object_release(obj, 1); obj->cur.layer = l; evas_object_inject(obj, e); obj->restack = 1; evas_object_change(obj); if (obj->clip.clipees) { evas_object_inform_call_restack(obj); return; } evas_object_change(obj); if (!obj->smart.smart) { if (evas_object_is_in_output_rect(obj, obj->layer->evas->pointer.x, obj->layer->evas->pointer.y, 1, 1) && obj->cur.visible) if (eina_list_data_find(obj->layer->evas->pointer.object.in, obj)) evas_event_feed_mouse_move(obj->layer->evas, obj->layer->evas->pointer.x, obj->layer->evas->pointer.y, obj->layer->evas->last_timestamp, NULL); } else { Eina_Inlist *contained; Evas_Object *member; contained = (Eina_Inlist *)evas_object_smart_members_get_direct(obj); EINA_INLIST_FOREACH(contained, member) { _evas_object_layer_set_child(member, obj, l); } } evas_object_inform_call_restack(obj); } EAPI short evas_object_layer_get(const Evas_Object *obj) { MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return 0; MAGIC_CHECK_END(); if (obj->smart.parent) { return obj->smart.parent->cur.layer; } return obj->cur.layer; } evas-1.7.9/src/lib/canvas/evas_object_text.c0000664000175000017500000015474212175475547015753 00000000000000#include "evas_common.h" /* Includes evas_bidi_utils stuff. */ #include "evas_private.h" /* save typing */ #define ENFN obj->layer->evas->engine.func #define ENDT obj->layer->evas->engine.data.output /* private magic number for text objects */ static const char o_type[] = "text"; /* private struct for text object internal data */ typedef struct _Evas_Object_Text Evas_Object_Text; typedef struct _Evas_Object_Text_Item Evas_Object_Text_Item; struct _Evas_Object_Text { DATA32 magic; struct { const char *utf8_text; /* The text exposed to the API */ const char *font; Evas_Font_Description *fdesc; const char *source; Evas_Font_Size size; struct { unsigned char r, g, b, a; } outline, shadow, glow, glow2; unsigned char style; } cur, prev; float ascent, descent; float max_ascent, max_descent; Evas_BiDi_Paragraph_Props *bidi_par_props; const char *bidi_delimiters; Evas_Object_Text_Item *items; Evas_Font_Set *font; Evas_BiDi_Direction bidi_dir : 2; char changed : 1; }; struct _Evas_Object_Text_Item { EINA_INLIST; size_t text_pos; size_t visual_pos; Evas_Text_Props text_props; Evas_Coord x, w, h, adv; }; /* private methods for text objects */ static void evas_object_text_init(Evas_Object *obj); static void *evas_object_text_new(void); static void evas_object_text_render(Evas_Object *obj, void *output, void *context, void *surface, int x, int y); static void evas_object_text_free(Evas_Object *obj); static void evas_object_text_render_pre(Evas_Object *obj); static void evas_object_text_render_post(Evas_Object *obj); static unsigned int evas_object_text_id_get(Evas_Object *obj); static unsigned int evas_object_text_visual_id_get(Evas_Object *obj); static void *evas_object_text_engine_data_get(Evas_Object *obj); static int evas_object_text_is_opaque(Evas_Object *obj); static int evas_object_text_was_opaque(Evas_Object *obj); static void evas_object_text_scale_update(Evas_Object *obj); static void _evas_object_text_recalc(Evas_Object *obj); static const Evas_Object_Func object_func = { /* methods (compulsory) */ evas_object_text_free, evas_object_text_render, evas_object_text_render_pre, evas_object_text_render_post, evas_object_text_id_get, evas_object_text_visual_id_get, evas_object_text_engine_data_get, /* these are optional. NULL = nothing */ NULL, NULL, NULL, NULL, evas_object_text_is_opaque, evas_object_text_was_opaque, NULL, NULL, NULL, evas_object_text_scale_update, NULL, NULL, NULL }; /* the actual api call to add a rect */ /* it has no other api calls as all properties are standard */ EVAS_MEMPOOL(_mp_obj); static int _evas_object_text_char_coords_get(const Evas_Object *obj, const Evas_Object_Text *o, size_t pos, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h) { Evas_Object_Text_Item *it; EINA_INLIST_FOREACH(EINA_INLIST_GET(o->items), it) { if ((it->text_pos <= pos) && (pos < (it->text_pos + it->text_props.text_len))) { int ret; ret = ENFN->font_char_coords_get(ENDT, o->font, &it->text_props, pos - it->text_pos, x, y, w, h); if (x) *x += it->x; return ret; } } return 0; } static void _evas_object_text_item_clean(Evas_Object_Text_Item *it) { evas_common_text_props_content_unref(&it->text_props); } static void _evas_object_text_items_clear(Evas_Object_Text *o) { Evas_Object_Text_Item *it; while (o->items) { it = o->items; o->items = (Evas_Object_Text_Item *) eina_inlist_remove( EINA_INLIST_GET(o->items), EINA_INLIST_GET(it)); _evas_object_text_item_clean(it); free(it); } } #ifdef BIDI_SUPPORT static int _evas_object_text_it_compare_logical(const void *_it1, const void *_it2) { const Evas_Object_Text_Item *it1 = _it1, *it2 = _it2; if (it1->text_pos < it2->text_pos) return -1; else if (it1->text_pos == it2->text_pos) return 0; else return 1; } #endif static int _evas_object_text_last_up_to_pos(const Evas_Object *obj, const Evas_Object_Text *o, Evas_Coord cx, Evas_Coord cy) { Evas_Object_Text_Item *it; #ifdef BIDI_SUPPORT /*FIXME: not very efficient, sort the items arrays. */ /* Reorder if it's a bidi text */ if (o->bidi_par_props) { Eina_List *logical_it = NULL; Evas_Object_Text_Item *i; Eina_List *itr; Evas_Coord x = 0; /* Insert all to the logical list */ EINA_INLIST_FOREACH(o->items, i) { logical_it = eina_list_sorted_insert(logical_it, _evas_object_text_it_compare_logical, i); } EINA_LIST_FOREACH(logical_it, itr, it) { if ((x <= cx) && (cx < x + it->adv)) { return it->text_pos + ENFN->font_last_up_to_pos(ENDT, o->font, &it->text_props, cx - x, cy); } x += it->adv; } eina_list_free(logical_it); } else #endif { EINA_INLIST_FOREACH(EINA_INLIST_GET(o->items), it) { if ((it->x <= cx) && (cx < it->x + it->adv)) { return it->text_pos + ENFN->font_last_up_to_pos(ENDT, o->font, &it->text_props, cx - it->x, cy); } } } return -1; } static int _evas_object_text_char_at_coords(const Evas_Object *obj, const Evas_Object_Text *o, Evas_Coord cx, Evas_Coord cy, Evas_Coord *rx, Evas_Coord *ry, Evas_Coord *rw, Evas_Coord *rh) { Evas_Object_Text_Item *it; EINA_INLIST_FOREACH(EINA_INLIST_GET(o->items), it) { if ((it->x <= cx) && (cx < it->x + it->adv)) { return it->text_pos + ENFN->font_char_at_coords_get(ENDT, o->font, &it->text_props, cx - it->x, cy, rx, ry, rw, rh); } } return -1; } static Evas_Coord _evas_object_text_horiz_advance_get(const Evas_Object *obj, const Evas_Object_Text *o) { Evas_Object_Text_Item *it; Evas_Coord adv; (void) obj; adv = 0; EINA_INLIST_FOREACH(EINA_INLIST_GET(o->items), it) { adv += it->adv; } return adv; } static Evas_Coord _evas_object_text_vert_advance_get(const Evas_Object *obj __UNUSED__, const Evas_Object_Text *o) { return o->max_ascent + o->max_descent; } EAPI Evas_Object * evas_object_text_add(Evas *e) { Evas_Object *obj; MAGIC_CHECK(e, Evas, MAGIC_EVAS); return NULL; MAGIC_CHECK_END(); obj = evas_object_new(e); evas_object_text_init(obj); evas_object_inject(obj, e); return obj; } EAPI void evas_object_text_font_source_set(Evas_Object *obj, const char *font_source) { Evas_Object_Text *o; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); o = (Evas_Object_Text *)(obj->object_data); MAGIC_CHECK(o, Evas_Object_Text, MAGIC_OBJ_TEXT); return; MAGIC_CHECK_END(); if ((o->cur.source) && (font_source) && (!strcmp(o->cur.source, font_source))) return; /* if (o->cur.source) eina_stringshare_del(o->cur.source); if (font_source) o->cur.source = eina_stringshare_add(font_source); else o->cur.source = NULL; */ eina_stringshare_replace(&o->cur.source, font_source); } EAPI const char * evas_object_text_font_source_get(const Evas_Object *obj) { Evas_Object_Text *o; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return NULL; MAGIC_CHECK_END(); o = (Evas_Object_Text *)(obj->object_data); MAGIC_CHECK(o, Evas_Object_Text, MAGIC_OBJ_TEXT); return NULL; MAGIC_CHECK_END(); return o->cur.source; } EAPI void evas_object_text_font_set(Evas_Object *obj, const char *font, Evas_Font_Size size) { Evas_Object_Text *o; int is, was = 0, pass = 0, freeze = 0; Evas_Font_Description *fdesc; if ((!font) || (size <= 0)) return; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); o = (Evas_Object_Text *)(obj->object_data); MAGIC_CHECK(o, Evas_Object_Text, MAGIC_OBJ_TEXT); return; MAGIC_CHECK_END(); fdesc = evas_font_desc_new(); evas_font_name_parse(fdesc, font); if (o->cur.fdesc && !evas_font_desc_cmp(fdesc, o->cur.fdesc) && (size == o->cur.size)) { evas_font_desc_unref(fdesc); return; } if (o->cur.fdesc) evas_font_desc_unref(o->cur.fdesc); o->cur.fdesc = fdesc; o->cur.size = size; eina_stringshare_replace(&o->cur.font, font); o->prev.font = NULL; if (obj->layer->evas->events_frozen <= 0) { pass = evas_event_passes_through(obj); freeze = evas_event_freezes_through(obj); if ((!pass) && (!freeze)) was = evas_object_is_in_output_rect(obj, obj->layer->evas->pointer.x, obj->layer->evas->pointer.y, 1, 1); } /* DO IT */ if (o->font) { evas_font_free(obj->layer->evas, o->font); o->font = NULL; } o->font = evas_font_load(obj->layer->evas, o->cur.fdesc, o->cur.source, (int)(((double) o->cur.size) * obj->cur.scale)); { o->ascent = 0; o->descent = 0; o->max_ascent = 0; o->max_descent = 0; } _evas_object_text_recalc(obj); o->changed = 1; evas_object_change(obj); evas_object_clip_dirty(obj); evas_object_coords_recalc(obj); if (obj->layer->evas->events_frozen <= 0) { if ((!pass) && (!freeze)) { is = evas_object_is_in_output_rect(obj, obj->layer->evas->pointer.x, obj->layer->evas->pointer.y, 1, 1); if ((is ^ was) && obj->cur.visible) evas_event_feed_mouse_move(obj->layer->evas, obj->layer->evas->pointer.x, obj->layer->evas->pointer.y, obj->layer->evas->last_timestamp, NULL); } } evas_object_inform_call_resize(obj); } EAPI void evas_object_text_font_get(const Evas_Object *obj, const char **font, Evas_Font_Size *size) { Evas_Object_Text *o; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); if (font) *font = ""; if (size) *size = 0; return; MAGIC_CHECK_END(); o = (Evas_Object_Text *)(obj->object_data); MAGIC_CHECK(o, Evas_Object_Text, MAGIC_OBJ_TEXT); if (font) *font = ""; if (size) *size = 0; return; MAGIC_CHECK_END(); if (font) *font = o->cur.font; if (size) *size = o->cur.size; } /** * @internal * Create a new text layout item from the string and the format. * * @param c the context to work on - Not NULL. * @param fmt the format to use. * @param str the string to use. */ static Evas_Object_Text_Item * _evas_object_text_item_new(Evas_Object *obj, Evas_Object_Text *o, Evas_Font_Instance *fi, const Eina_Unicode *str, Evas_Script_Type script, size_t pos, size_t visual_pos, size_t len) { Evas_Object_Text_Item *it; it = calloc(1, sizeof(Evas_Object_Text_Item)); it->text_pos = pos; it->visual_pos = visual_pos; evas_common_text_props_bidi_set(&it->text_props, o->bidi_par_props, it->text_pos); evas_common_text_props_script_set(&it->text_props, script); if (fi) { ENFN->font_text_props_info_create(ENDT, fi, str + pos, &it->text_props, o->bidi_par_props, it->text_pos, len, EVAS_TEXT_PROPS_MODE_SHAPE); ENFN->font_string_size_get(ENDT, o->font, &it->text_props, &it->w, &it->h); it->adv = ENFN->font_h_advance_get(ENDT, o->font, &it->text_props); } o->items = (Evas_Object_Text_Item *) eina_inlist_append(EINA_INLIST_GET(o->items), EINA_INLIST_GET(it)); return it; } /** * @internal * Orders o->items according to the visual position. * * @param obj the evas object * @param o the text object */ static void _evas_object_text_item_order(Evas_Object *obj, Evas_Object_Text *o) { (void) obj; #ifdef BIDI_SUPPORT /*FIXME: not very efficient, sort the items arrays. */ /* Reorder if it's a bidi text */ if (o->bidi_par_props) { Evas_Object_Text_Item *i, *j, *min; i = o->items; while (i) { min = i; EINA_INLIST_FOREACH(i, j) { if (j->visual_pos < min->visual_pos) { min = j; } } if (min != i) { o->items = (Evas_Object_Text_Item *) eina_inlist_remove(EINA_INLIST_GET(o->items), EINA_INLIST_GET(min)); o->items = (Evas_Object_Text_Item *) eina_inlist_prepend_relative(EINA_INLIST_GET(o->items), EINA_INLIST_GET(min), EINA_INLIST_GET(i)); } i = (Evas_Object_Text_Item *) EINA_INLIST_GET(min)->next; } } #endif /* calculate the positions according to the order. */ { Evas_Object_Text_Item *it = o->items; Evas_Coord x = 0; while (it) { it->x = x; x += it->adv; it = (Evas_Object_Text_Item *) EINA_INLIST_GET(it)->next; } } } /** * @internal * Populates o->items with the items of the text according to text * * @param obj the evas object * @param o the text object * @param text the text to layout */ static void _evas_object_text_layout(Evas_Object *obj, Evas_Object_Text *o, const Eina_Unicode *text) { EvasBiDiStrIndex *v_to_l = NULL; size_t pos, visual_pos; int len = eina_unicode_strlen(text); if (text && *text) o->bidi_dir = EVAS_BIDI_DIRECTION_LTR; else o->bidi_dir = EVAS_BIDI_DIRECTION_NEUTRAL; #ifdef BIDI_SUPPORT int par_len = len; int *segment_idxs = NULL; if (o->bidi_delimiters) segment_idxs = evas_bidi_segment_idxs_get(text, o->bidi_delimiters); evas_bidi_paragraph_props_unref(o->bidi_par_props); o->bidi_par_props = evas_bidi_paragraph_props_get(text, len, segment_idxs); if (o->bidi_par_props) o->bidi_dir = EVAS_BIDI_PAR_TYPE_TO_DIRECTION(o->bidi_par_props->direction); evas_bidi_props_reorder_line(NULL, 0, len, o->bidi_par_props, &v_to_l); if (segment_idxs) free(segment_idxs); #endif visual_pos = pos = 0; while (len > 0) { Evas_Font_Instance *script_fi = NULL; int script_len = len, tmp_cut; Evas_Script_Type script; tmp_cut = evas_common_language_script_end_of_run_get( text + pos, o->bidi_par_props, pos, len); if (tmp_cut > 0) script_len = tmp_cut; script = evas_common_language_script_type_get(text, script_len); while (script_len > 0) { Evas_Font_Instance *cur_fi = NULL; int run_len = script_len; if (o->font) { run_len = ENFN->font_run_end_get(ENDT, o->font, &script_fi, &cur_fi, script, text + pos, script_len); } #ifdef BIDI_SUPPORT visual_pos = evas_bidi_position_logical_to_visual( v_to_l, par_len, pos); #else visual_pos = pos; #endif _evas_object_text_item_new(obj, o, cur_fi, text, script, pos, visual_pos, run_len); pos += run_len; script_len -= run_len; len -= run_len; } } _evas_object_text_item_order(obj, o); if (v_to_l) free(v_to_l); } EAPI void evas_object_text_text_set(Evas_Object *obj, const char *_text) { Evas_Object_Text *o; int is, was, len; Eina_Unicode *text; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); o = (Evas_Object_Text *)(obj->object_data); MAGIC_CHECK(o, Evas_Object_Text, MAGIC_OBJ_TEXT); return; MAGIC_CHECK_END(); if ((o->cur.utf8_text) && (_text) && (!strcmp(o->cur.utf8_text, _text))) return; text = eina_unicode_utf8_to_unicode(_text, &len); if (!text) text = eina_unicode_strdup(EINA_UNICODE_EMPTY_STRING); was = evas_object_is_in_output_rect(obj, obj->layer->evas->pointer.x, obj->layer->evas->pointer.y, 1, 1); /* DO II */ /*Update bidi_props*/ if (o->items) _evas_object_text_items_clear(o); if ((text) && (*text)) { _evas_object_text_layout(obj, o, text); eina_stringshare_replace(&o->cur.utf8_text, _text); o->prev.utf8_text = NULL; } else { eina_stringshare_replace(&o->cur.utf8_text, NULL); } if (text) { free(text); text = NULL; } _evas_object_text_recalc(obj); o->changed = 1; evas_object_change(obj); evas_object_clip_dirty(obj); evas_object_coords_recalc(obj); is = evas_object_is_in_output_rect(obj, obj->layer->evas->pointer.x, obj->layer->evas->pointer.y, 1, 1); if ((is || was) && obj->cur.visible) evas_event_feed_mouse_move(obj->layer->evas, obj->layer->evas->pointer.x, obj->layer->evas->pointer.y, obj->layer->evas->last_timestamp, NULL); evas_object_inform_call_resize(obj); if (text) free(text); } EAPI void evas_object_text_bidi_delimiters_set(Evas_Object *obj, const char *delim) { Evas_Object_Text *o; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); o = (Evas_Object_Text *)(obj->object_data); MAGIC_CHECK(o, Evas_Object_Text, MAGIC_OBJ_TEXT); return; MAGIC_CHECK_END(); eina_stringshare_replace(&o->bidi_delimiters, delim); } EAPI const char * evas_object_text_bidi_delimiters_get(const Evas_Object *obj) { Evas_Object_Text *o; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return NULL; MAGIC_CHECK_END(); o = (Evas_Object_Text *)(obj->object_data); MAGIC_CHECK(o, Evas_Object_Text, MAGIC_OBJ_TEXT); return NULL; MAGIC_CHECK_END(); return o->bidi_delimiters; } EAPI const char * evas_object_text_text_get(const Evas_Object *obj) { Evas_Object_Text *o; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return NULL; MAGIC_CHECK_END(); o = (Evas_Object_Text *)(obj->object_data); MAGIC_CHECK(o, Evas_Object_Text, MAGIC_OBJ_TEXT); return NULL; MAGIC_CHECK_END(); return o->cur.utf8_text; } EAPI Evas_BiDi_Direction evas_object_text_direction_get(const Evas_Object *obj) { Evas_Object_Text *o; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return EVAS_BIDI_DIRECTION_NEUTRAL; MAGIC_CHECK_END(); o = (Evas_Object_Text *)(obj->object_data); MAGIC_CHECK(o, Evas_Object_Text, MAGIC_OBJ_TEXT); return EVAS_BIDI_DIRECTION_NEUTRAL; MAGIC_CHECK_END(); return o->bidi_dir; } EAPI Evas_Coord evas_object_text_ascent_get(const Evas_Object *obj) { Evas_Object_Text *o; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return 0; MAGIC_CHECK_END(); o = (Evas_Object_Text *)(obj->object_data); MAGIC_CHECK(o, Evas_Object_Text, MAGIC_OBJ_TEXT); return 0; MAGIC_CHECK_END(); return o->ascent; } EAPI Evas_Coord evas_object_text_descent_get(const Evas_Object *obj) { Evas_Object_Text *o; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return 0; MAGIC_CHECK_END(); o = (Evas_Object_Text *)(obj->object_data); MAGIC_CHECK(o, Evas_Object_Text, MAGIC_OBJ_TEXT); return 0; MAGIC_CHECK_END(); return o->descent; } EAPI Evas_Coord evas_object_text_max_ascent_get(const Evas_Object *obj) { Evas_Object_Text *o; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return 0; MAGIC_CHECK_END(); o = (Evas_Object_Text *)(obj->object_data); MAGIC_CHECK(o, Evas_Object_Text, MAGIC_OBJ_TEXT); return 0; MAGIC_CHECK_END(); return o->max_ascent; } EAPI Evas_Coord evas_object_text_max_descent_get(const Evas_Object *obj) { Evas_Object_Text *o; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return 0; MAGIC_CHECK_END(); o = (Evas_Object_Text *)(obj->object_data); MAGIC_CHECK(o, Evas_Object_Text, MAGIC_OBJ_TEXT); return 0; MAGIC_CHECK_END(); return o->max_descent; } EAPI Evas_Coord evas_object_text_inset_get(const Evas_Object *obj) { Evas_Object_Text *o; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return 0; MAGIC_CHECK_END(); o = (Evas_Object_Text *)(obj->object_data); MAGIC_CHECK(o, Evas_Object_Text, MAGIC_OBJ_TEXT); return 0; MAGIC_CHECK_END(); if (!o->font) return 0; if (!o->items) return 0; return ENFN->font_inset_get(ENDT, o->font, &o->items->text_props); } EAPI Evas_Coord evas_object_text_horiz_advance_get(const Evas_Object *obj) { Evas_Object_Text *o; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return 0; MAGIC_CHECK_END(); o = (Evas_Object_Text *)(obj->object_data); MAGIC_CHECK(o, Evas_Object_Text, MAGIC_OBJ_TEXT); return 0; MAGIC_CHECK_END(); if (!o->font) return 0; if (!o->items) return 0; return _evas_object_text_horiz_advance_get(obj, o); } EAPI Evas_Coord evas_object_text_vert_advance_get(const Evas_Object *obj) { Evas_Object_Text *o; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return 0; MAGIC_CHECK_END(); o = (Evas_Object_Text *)(obj->object_data); MAGIC_CHECK(o, Evas_Object_Text, MAGIC_OBJ_TEXT); return 0; MAGIC_CHECK_END(); if (!o->font) return 0; if (!o->items) return o->ascent + o->descent; return _evas_object_text_vert_advance_get(obj, o); } EAPI Eina_Bool evas_object_text_char_pos_get(const Evas_Object *obj, int pos, Evas_Coord *cx, Evas_Coord *cy, Evas_Coord *cw, Evas_Coord *ch) { Evas_Object_Text *o; int l = 0, r = 0, t = 0, b = 0; int ret, x = 0, y = 0, w = 0, h = 0; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return EINA_FALSE; MAGIC_CHECK_END(); o = (Evas_Object_Text *)(obj->object_data); MAGIC_CHECK(o, Evas_Object_Text, MAGIC_OBJ_TEXT); return EINA_FALSE; MAGIC_CHECK_END(); if (!o->font) return EINA_FALSE; if (!o->items || (pos < 0)) return EINA_FALSE; ret = _evas_object_text_char_coords_get(obj, o, (size_t) pos, &x, &y, &w, &h); evas_text_style_pad_get(o->cur.style, &l, &r, &t, &b); y += o->max_ascent - t; x -= l; if (x < 0) { w += x; x = 0; } if ((x + w) > obj->cur.geometry.w) w = obj->cur.geometry.w - x; if (w < 0) w = 0; if (y < 0) { h += y; y = 0; } if ((y + h) > obj->cur.geometry.h) h = obj->cur.geometry.h - y; if (h < 0) h = 0; if (cx) *cx = x; if (cy) *cy = y; if (cw) *cw = w + l + r; if (ch) *ch = h + t + b; return ret; } EAPI int evas_object_text_last_up_to_pos(const Evas_Object *obj, Evas_Coord x, Evas_Coord y) { Evas_Object_Text *o; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return -1; MAGIC_CHECK_END(); o = (Evas_Object_Text *)(obj->object_data); MAGIC_CHECK(o, Evas_Object_Text, MAGIC_OBJ_TEXT); return -1; MAGIC_CHECK_END(); if (!o->font) return -1; if (!o->items) return -1; return _evas_object_text_last_up_to_pos(obj, o, x, y - o->max_ascent); } EAPI int evas_object_text_char_coords_get(const Evas_Object *obj, Evas_Coord x, Evas_Coord y, Evas_Coord *cx, Evas_Coord *cy, Evas_Coord *cw, Evas_Coord *ch) { Evas_Object_Text *o; int l = 0, r = 0, t = 0, b = 0; int ret, rx = 0, ry = 0, rw = 0, rh = 0; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return -1; MAGIC_CHECK_END(); o = (Evas_Object_Text *)(obj->object_data); MAGIC_CHECK(o, Evas_Object_Text, MAGIC_OBJ_TEXT); return -1; MAGIC_CHECK_END(); if (!o->font) return -1; if (!o->items) return -1; ret = _evas_object_text_char_at_coords(obj, o, x, y - o->max_ascent, &rx, &ry, &rw, &rh); evas_text_style_pad_get(o->cur.style, &l, &r, &t, &b); ry += o->max_ascent - t; rx -= l; if (rx < 0) { rw += rx; rx = 0; } if ((rx + rw) > obj->cur.geometry.w) rw = obj->cur.geometry.w - rx; if (rw < 0) rw = 0; if (ry < 0) { rh += ry; ry = 0; } if ((ry + rh) > obj->cur.geometry.h) rh = obj->cur.geometry.h - ry; if (rh < 0) rh = 0; if (cx) *cx = rx; if (cy) *cy = ry; if (cw) *cw = rw + l + r; if (ch) *ch = rh + t + b; return ret; } EAPI void evas_object_text_style_set(Evas_Object *obj, Evas_Text_Style_Type style) { Evas_Object_Text *o; int pl = 0, pr = 0, pt = 0, pb = 0, l = 0, r = 0, t = 0, b = 0; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); o = (Evas_Object_Text *)(obj->object_data); MAGIC_CHECK(o, Evas_Object_Text, MAGIC_OBJ_TEXT); return; MAGIC_CHECK_END(); if (o->cur.style == style) return; evas_text_style_pad_get(o->cur.style, &pl, &pr, &pt, &pb); o->cur.style = style; evas_text_style_pad_get(o->cur.style, &l, &r, &t, &b); if (o->items) obj->cur.geometry.w += (l - pl) + (r - pr); else obj->cur.geometry.w = 0; obj->cur.geometry.h += (t - pt) + (b - pb); evas_object_change(obj); evas_object_clip_dirty(obj); } EAPI Evas_Text_Style_Type evas_object_text_style_get(const Evas_Object *obj) { Evas_Object_Text *o; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return EVAS_TEXT_STYLE_PLAIN; MAGIC_CHECK_END(); o = (Evas_Object_Text *)(obj->object_data); MAGIC_CHECK(o, Evas_Object_Text, MAGIC_OBJ_TEXT); return EVAS_TEXT_STYLE_PLAIN; MAGIC_CHECK_END(); return o->cur.style; } EAPI void evas_object_text_shadow_color_set(Evas_Object *obj, int r, int g, int b, int a) { Evas_Object_Text *o; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); o = (Evas_Object_Text *)(obj->object_data); MAGIC_CHECK(o, Evas_Object_Text, MAGIC_OBJ_TEXT); return; MAGIC_CHECK_END(); if ((o->cur.shadow.r == r) && (o->cur.shadow.g == g) && (o->cur.shadow.b == b) && (o->cur.shadow.a == a)) return; o->cur.shadow.r = r; o->cur.shadow.g = g; o->cur.shadow.b = b; o->cur.shadow.a = a; o->changed = 1; evas_object_change(obj); } EAPI void evas_object_text_shadow_color_get(const Evas_Object *obj, int *r, int *g, int *b, int *a) { Evas_Object_Text *o; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); if (r) *r = 0; if (g) *g = 0; if (b) *b = 0; if (a) *a = 0; return; MAGIC_CHECK_END(); o = (Evas_Object_Text *)(obj->object_data); MAGIC_CHECK(o, Evas_Object_Text, MAGIC_OBJ_TEXT); if (r) *r = 0; if (g) *g = 0; if (b) *b = 0; if (a) *a = 0; return; MAGIC_CHECK_END(); if (r) *r = o->cur.shadow.r; if (g) *g = o->cur.shadow.g; if (b) *b = o->cur.shadow.b; if (a) *a = o->cur.shadow.a; } EAPI void evas_object_text_glow_color_set(Evas_Object *obj, int r, int g, int b, int a) { Evas_Object_Text *o; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); o = (Evas_Object_Text *)(obj->object_data); MAGIC_CHECK(o, Evas_Object_Text, MAGIC_OBJ_TEXT); return; MAGIC_CHECK_END(); if ((o->cur.glow.r == r) && (o->cur.glow.g == g) && (o->cur.glow.b == b) && (o->cur.glow.a == a)) return; o->cur.glow.r = r; o->cur.glow.g = g; o->cur.glow.b = b; o->cur.glow.a = a; o->changed = 1; evas_object_change(obj); } EAPI void evas_object_text_glow_color_get(const Evas_Object *obj, int *r, int *g, int *b, int *a) { Evas_Object_Text *o; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); if (r) *r = 0; if (g) *g = 0; if (b) *b = 0; if (a) *a = 0; return; MAGIC_CHECK_END(); o = (Evas_Object_Text *)(obj->object_data); MAGIC_CHECK(o, Evas_Object_Text, MAGIC_OBJ_TEXT); if (r) *r = 0; if (g) *g = 0; if (b) *b = 0; if (a) *a = 0; return; MAGIC_CHECK_END(); if (r) *r = o->cur.glow.r; if (g) *g = o->cur.glow.g; if (b) *b = o->cur.glow.b; if (a) *a = o->cur.glow.a; } EAPI void evas_object_text_glow2_color_set(Evas_Object *obj, int r, int g, int b, int a) { Evas_Object_Text *o; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); o = (Evas_Object_Text *)(obj->object_data); MAGIC_CHECK(o, Evas_Object_Text, MAGIC_OBJ_TEXT); return; MAGIC_CHECK_END(); if ((o->cur.glow2.r == r) && (o->cur.glow2.g == g) && (o->cur.glow2.b == b) && (o->cur.glow2.a == a)) return; o->cur.glow2.r = r; o->cur.glow2.g = g; o->cur.glow2.b = b; o->cur.glow2.a = a; o->changed = 1; evas_object_change(obj); } EAPI void evas_object_text_glow2_color_get(const Evas_Object *obj, int *r, int *g, int *b, int *a) { Evas_Object_Text *o; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); if (r) *r = 0; if (g) *g = 0; if (b) *b = 0; if (a) *a = 0; return; MAGIC_CHECK_END(); o = (Evas_Object_Text *)(obj->object_data); MAGIC_CHECK(o, Evas_Object_Text, MAGIC_OBJ_TEXT); if (r) *r = 0; if (g) *g = 0; if (b) *b = 0; if (a) *a = 0; return; MAGIC_CHECK_END(); if (r) *r = o->cur.glow2.r; if (g) *g = o->cur.glow2.g; if (b) *b = o->cur.glow2.b; if (a) *a = o->cur.glow2.a; } EAPI void evas_object_text_outline_color_set(Evas_Object *obj, int r, int g, int b, int a) { Evas_Object_Text *o; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); o = (Evas_Object_Text *)(obj->object_data); MAGIC_CHECK(o, Evas_Object_Text, MAGIC_OBJ_TEXT); return; MAGIC_CHECK_END(); if ((o->cur.outline.r == r) && (o->cur.outline.g == g) && (o->cur.outline.b == b) && (o->cur.outline.a == a)) return; o->cur.outline.r = r; o->cur.outline.g = g; o->cur.outline.b = b; o->cur.outline.a = a; o->changed = 1; evas_object_change(obj); } EAPI void evas_object_text_outline_color_get(const Evas_Object *obj, int *r, int *g, int *b, int *a) { Evas_Object_Text *o; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); if (r) *r = 0; if (g) *g = 0; if (b) *b = 0; if (a) *a = 0; return; MAGIC_CHECK_END(); o = (Evas_Object_Text *)(obj->object_data); MAGIC_CHECK(o, Evas_Object_Text, MAGIC_OBJ_TEXT); if (r) *r = 0; if (g) *g = 0; if (b) *b = 0; if (a) *a = 0; return; MAGIC_CHECK_END(); if (r) *r = o->cur.outline.r; if (g) *g = o->cur.outline.g; if (b) *b = o->cur.outline.b; if (a) *a = o->cur.outline.a; } EAPI void evas_object_text_style_pad_get(const Evas_Object *obj, int *l, int *r, int *t, int *b) { int sl = 0, sr = 0, st = 0, sb = 0; Evas_Object_Text *o; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); if (l) *l = 0; if (r) *r = 0; if (t) *t = 0; if (b) *b = 0; return; MAGIC_CHECK_END(); o = (Evas_Object_Text *)(obj->object_data); MAGIC_CHECK(o, Evas_Object_Text, MAGIC_OBJ_TEXT); if (l) *l = 0; if (r) *r = 0; if (t) *t = 0; if (b) *b = 0; return; MAGIC_CHECK_END(); /* use temps to be certain we have initialized values */ evas_text_style_pad_get(o->cur.style, &sl, &sr, &st, &sb); if (l) *l = sl; if (r) *r = sr; if (t) *t = st; if (b) *b = sb; } EAPI int evas_string_char_next_get(const char *str, int pos, int *decoded) { int p, d; if (decoded) *decoded = 0; if ((!str) || (pos < 0)) return 0; p = pos; d = eina_unicode_utf8_get_next(str, &p); if (decoded) *decoded = d; return p; } EAPI int evas_string_char_prev_get(const char *str, int pos, int *decoded) { int p, d; if (decoded) *decoded = 0; if ((!str) || (pos < 1)) return 0; p = pos; d = eina_unicode_utf8_get_prev(str, &p); if (decoded) *decoded = d; return p; } EAPI int evas_string_char_len_get(const char *str) { if (!str) return 0; return eina_unicode_utf8_get_len(str); } void evas_text_style_pad_get(Evas_Text_Style_Type style, int *l, int *r, int *t, int *b) { int sl = 0, sr = 0, st = 0, sb = 0; /* Don't calc anything if there's no style. */ if (style != EVAS_TEXT_STYLE_PLAIN) { int shad_sz = 0, shad_dst = 0, out_sz = 0; int dx = 0, minx = 0, maxx = 0; int dy = 0, miny = 0, maxy = 0; Eina_Bool have_shadow = EINA_FALSE; switch (style & EVAS_TEXT_STYLE_MASK_BASIC) { case EVAS_TEXT_STYLE_SHADOW: shad_dst = 1; have_shadow = EINA_TRUE; break; case EVAS_TEXT_STYLE_OUTLINE_SHADOW: case EVAS_TEXT_STYLE_FAR_SHADOW: shad_dst = 2; out_sz = 1; have_shadow = EINA_TRUE; break; case EVAS_TEXT_STYLE_OUTLINE_SOFT_SHADOW: shad_dst = 1; shad_sz = 2; out_sz = 1; have_shadow = EINA_TRUE; break; case EVAS_TEXT_STYLE_FAR_SOFT_SHADOW: shad_dst = 2; shad_sz = 2; have_shadow = EINA_TRUE; break; case EVAS_TEXT_STYLE_SOFT_SHADOW: shad_dst = 1; shad_sz = 2; have_shadow = EINA_TRUE; break; case EVAS_TEXT_STYLE_GLOW: case EVAS_TEXT_STYLE_SOFT_OUTLINE: out_sz = 2; break; case EVAS_TEXT_STYLE_OUTLINE: out_sz = 1; break; default: break; } minx = -out_sz; maxx = out_sz; miny = -out_sz; maxy = out_sz; if (have_shadow) { int shx1, shx2, shy1, shy2; switch (style & EVAS_TEXT_STYLE_MASK_SHADOW_DIRECTION) { case EVAS_TEXT_STYLE_SHADOW_DIRECTION_BOTTOM_RIGHT: dx = 1; dy = 1; break; case EVAS_TEXT_STYLE_SHADOW_DIRECTION_BOTTOM: dx = 0; dy = 1; break; case EVAS_TEXT_STYLE_SHADOW_DIRECTION_BOTTOM_LEFT: dx = -1; dy = 1; break; case EVAS_TEXT_STYLE_SHADOW_DIRECTION_LEFT: dx = -1; dy = 0; break; case EVAS_TEXT_STYLE_SHADOW_DIRECTION_TOP_LEFT: dx = -1; dy = -1; break; case EVAS_TEXT_STYLE_SHADOW_DIRECTION_TOP: dx = 0; dy = -1; break; case EVAS_TEXT_STYLE_SHADOW_DIRECTION_TOP_RIGHT: dx = 1; dy = -1; break; case EVAS_TEXT_STYLE_SHADOW_DIRECTION_RIGHT: dx = 1; dy = 0; default: break; } shx1 = dx * shad_dst; shx1 -= shad_sz; shx2 = dx * shad_dst; shx2 += shad_sz; if (shx1 < minx) minx = shx1; if (shx2 > maxx) maxx = shx2; shy1 = dy * shad_dst; shy1 -= shad_sz; shy2 = dy * shad_dst; shy2 += shad_sz; if (shy1 < miny) miny = shy1; if (shy2 > maxy) maxy = shy2; } if (l) sl = *l; if (r) sr = *r; if (t) st = *t; if (b) sb = *b; if (sr < maxx) sr = maxx; if (sl < -minx) sl = -minx; if (sb < maxy) sb = maxy; if (st < -miny) st = -miny; } if (l) *l = sl; if (r) *r = sr; if (t) *t = st; if (b) *b = sb; } /* all nice and private */ static void evas_object_text_init(Evas_Object *obj) { /* alloc text ob, setup methods and default values */ obj->object_data = evas_object_text_new(); /* set up default settings for this kind of object */ obj->cur.color.r = 255; obj->cur.color.g = 255; obj->cur.color.b = 255; obj->cur.color.a = 255; obj->cur.geometry.x = 0; obj->cur.geometry.y = 0; obj->cur.geometry.w = 0; obj->cur.geometry.h = 0; obj->cur.layer = 0; /* set up object-specific settings */ obj->prev = obj->cur; /* set up methods (compulsory) */ obj->func = &object_func; obj->type = o_type; } static void * evas_object_text_new(void) { Evas_Object_Text *o; /* alloc obj private data */ EVAS_MEMPOOL_INIT(_mp_obj, "evas_object_text", Evas_Object_Text, 8, NULL); o = EVAS_MEMPOOL_ALLOC(_mp_obj, Evas_Object_Text); if (!o) return NULL; EVAS_MEMPOOL_PREP(_mp_obj, o, Evas_Object_Text); o->magic = MAGIC_OBJ_TEXT; o->prev = o->cur; #ifdef BIDI_SUPPORT o->bidi_par_props = evas_bidi_paragraph_props_new(); #endif return o; } static void evas_object_text_free(Evas_Object *obj) { Evas_Object_Text *o; /* frees private object data. very simple here */ o = (Evas_Object_Text *)(obj->object_data); MAGIC_CHECK(o, Evas_Object_Text, MAGIC_OBJ_TEXT); return; MAGIC_CHECK_END(); /* free obj */ if (o->items) _evas_object_text_items_clear(o); if (o->cur.utf8_text) eina_stringshare_del(o->cur.utf8_text); if (o->cur.font) eina_stringshare_del(o->cur.font); if (o->cur.fdesc) evas_font_desc_unref(o->cur.fdesc); if (o->cur.source) eina_stringshare_del(o->cur.source); if (o->font) evas_font_free(obj->layer->evas, o->font); #ifdef BIDI_SUPPORT evas_bidi_paragraph_props_unref(o->bidi_par_props); #endif o->magic = 0; EVAS_MEMPOOL_FREE(_mp_obj, o); } static void evas_object_text_render(Evas_Object *obj, void *output, void *context, void *surface, int x, int y) { int i, j; Evas_Object_Text *o; Evas_Object_Text_Item *it; const char vals[5][5] = { {0, 1, 2, 1, 0}, {1, 3, 4, 3, 1}, {2, 4, 5, 4, 2}, {1, 3, 4, 3, 1}, {0, 1, 2, 1, 0} }; int sl = 0, st = 0; int shad_dst, shad_sz, dx, dy, haveshad; /* render object to surface with context, and offxet by x,y */ o = (Evas_Object_Text *)(obj->object_data); evas_text_style_pad_get(o->cur.style, &sl, NULL, &st, NULL); ENFN->context_multiplier_unset(output, context); ENFN->context_render_op_set(output, context, obj->cur.render_op); /* FIXME: This clipping is just until we fix inset handling correctly. */ ENFN->context_clip_clip(output, context, obj->cur.geometry.x + x, obj->cur.geometry.y + y, obj->cur.geometry.w, obj->cur.geometry.h); /* ENFN->context_color_set(output, context, 230, 160, 30, 100); ENFN->rectangle_draw(output, context, surface, obj->cur.geometry.x + x, obj->cur.geometry.y + y, obj->cur.geometry.w, obj->cur.geometry.h); */ #define COLOR_ONLY_SET(object, sub, col) \ ENFN->context_color_set(output, context, \ object->sub.col.r, \ object->sub.col.g, \ object->sub.col.b, \ object->sub.col.a); #define COLOR_SET(object, sub, col) \ if (obj->cur.clipper)\ ENFN->context_color_set(output, context, \ ((int)object->sub.col.r * ((int)obj->cur.clipper->cur.cache.clip.r + 1)) >> 8, \ ((int)object->sub.col.g * ((int)obj->cur.clipper->cur.cache.clip.g + 1)) >> 8, \ ((int)object->sub.col.b * ((int)obj->cur.clipper->cur.cache.clip.b + 1)) >> 8, \ ((int)object->sub.col.a * ((int)obj->cur.clipper->cur.cache.clip.a + 1)) >> 8); \ else\ ENFN->context_color_set(output, context, \ object->sub.col.r, \ object->sub.col.g, \ object->sub.col.b, \ object->sub.col.a); #define COLOR_SET_AMUL(object, sub, col, amul) \ if (obj->cur.clipper) \ ENFN->context_color_set(output, context, \ (((int)object->sub.col.r) * ((int)obj->cur.clipper->cur.cache.clip.r) * (amul)) / 65025, \ (((int)object->sub.col.g) * ((int)obj->cur.clipper->cur.cache.clip.g) * (amul)) / 65025, \ (((int)object->sub.col.b) * ((int)obj->cur.clipper->cur.cache.clip.b) * (amul)) / 65025, \ (((int)object->sub.col.a) * ((int)obj->cur.clipper->cur.cache.clip.a) * (amul)) / 65025); \ else \ ENFN->context_color_set(output, context, \ (((int)object->sub.col.r) * (amul)) / 255, \ (((int)object->sub.col.g) * (amul)) / 255, \ (((int)object->sub.col.b) * (amul)) / 255, \ (((int)object->sub.col.a) * (amul)) / 255); #define DRAW_TEXT(ox, oy) \ if ((o->font) && (it->text_props.len > 0)) \ ENFN->font_draw(output, \ context, \ surface, \ o->font, \ obj->cur.geometry.x + x + sl + ox + it->x, \ obj->cur.geometry.y + y + st + oy + \ (int) \ (((o->max_ascent * obj->cur.geometry.h) / obj->cur.geometry.h)), \ obj->cur.geometry.w, \ obj->cur.geometry.h, \ obj->cur.geometry.w, \ obj->cur.geometry.h, \ &it->text_props); /* shadows */ shad_dst = shad_sz = dx = dy = haveshad = 0; switch (o->cur.style & EVAS_TEXT_STYLE_MASK_BASIC) { case EVAS_TEXT_STYLE_SHADOW: case EVAS_TEXT_STYLE_OUTLINE_SOFT_SHADOW: shad_dst = 1; haveshad = 1; break; case EVAS_TEXT_STYLE_OUTLINE_SHADOW: case EVAS_TEXT_STYLE_FAR_SHADOW: shad_dst = 2; haveshad = 1; break; case EVAS_TEXT_STYLE_FAR_SOFT_SHADOW: shad_dst = 2; shad_sz = 2; haveshad = 1; break; case EVAS_TEXT_STYLE_SOFT_SHADOW: shad_dst = 1; shad_sz = 2; haveshad = 1; break; default: break; } if (haveshad) { if (shad_dst > 0) { switch (o->cur.style & EVAS_TEXT_STYLE_MASK_SHADOW_DIRECTION) { case EVAS_TEXT_STYLE_SHADOW_DIRECTION_BOTTOM_RIGHT: dx = 1; dy = 1; break; case EVAS_TEXT_STYLE_SHADOW_DIRECTION_BOTTOM: dx = 0; dy = 1; break; case EVAS_TEXT_STYLE_SHADOW_DIRECTION_BOTTOM_LEFT: dx = -1; dy = 1; break; case EVAS_TEXT_STYLE_SHADOW_DIRECTION_LEFT: dx = -1; dy = 0; break; case EVAS_TEXT_STYLE_SHADOW_DIRECTION_TOP_LEFT: dx = -1; dy = -1; break; case EVAS_TEXT_STYLE_SHADOW_DIRECTION_TOP: dx = 0; dy = -1; break; case EVAS_TEXT_STYLE_SHADOW_DIRECTION_TOP_RIGHT: dx = 1; dy = -1; break; case EVAS_TEXT_STYLE_SHADOW_DIRECTION_RIGHT: dx = 1; dy = 0; default: break; } dx *= shad_dst; dy *= shad_dst; } } EINA_INLIST_FOREACH(EINA_INLIST_GET(o->items), it) { /* Shadows */ if (haveshad) { switch (shad_sz) { case 0: COLOR_SET(o, cur, shadow); DRAW_TEXT(dx, dy); break; case 2: for (j = 0; j < 5; j++) { for (i = 0; i < 5; i++) { if (vals[i][j] != 0) { COLOR_SET_AMUL(o, cur, shadow, vals[i][j] * 50); DRAW_TEXT(i - 2 + dx, j - 2 + dy); } } } break; default: break; } } /* glows */ if (o->cur.style == EVAS_TEXT_STYLE_GLOW) { for (j = 0; j < 5; j++) { for (i = 0; i < 5; i++) { if (vals[i][j] != 0) { COLOR_SET_AMUL(o, cur, glow, vals[i][j] * 50); DRAW_TEXT(i - 2, j - 2); } } } COLOR_SET(o, cur, glow2); DRAW_TEXT(-1, 0); DRAW_TEXT(1, 0); DRAW_TEXT(0, -1); DRAW_TEXT(0, 1); } /* outlines */ if ((o->cur.style == EVAS_TEXT_STYLE_OUTLINE) || (o->cur.style == EVAS_TEXT_STYLE_OUTLINE_SHADOW) || (o->cur.style == EVAS_TEXT_STYLE_OUTLINE_SOFT_SHADOW)) { COLOR_SET(o, cur, outline); DRAW_TEXT(-1, 0); DRAW_TEXT(1, 0); DRAW_TEXT(0, -1); DRAW_TEXT(0, 1); } else if (o->cur.style == EVAS_TEXT_STYLE_SOFT_OUTLINE) { for (j = 0; j < 5; j++) { for (i = 0; i < 5; i++) { if (((i != 2) || (j != 2)) && (vals[i][j] != 0)) { COLOR_SET_AMUL(o, cur, outline, vals[i][j] * 50); DRAW_TEXT(i - 2, j - 2); } } } } /* normal text */ COLOR_ONLY_SET(obj, cur.cache, clip); DRAW_TEXT(0, 0); } } static void evas_object_text_render_pre(Evas_Object *obj) { Evas_Object_Text *o; int is_v, was_v; /* dont pre-render the obj twice! */ if (obj->pre_render_done) return; obj->pre_render_done = 1; /* pre-render phase. this does anything an object needs to do just before rendering. This could mean loading the image data, retrieving it from elsewhere, decoding video etc. Then when this is done the object needs to figure if it changed and if so what and where and add the appropriate redraw rectangles */ o = (Evas_Object_Text *)(obj->object_data); /* if someone is clipping this obj - go calculate the clipper */ if (obj->cur.clipper) { if (obj->cur.cache.clip.dirty) evas_object_clip_recalc(obj->cur.clipper); obj->cur.clipper->func->render_pre(obj->cur.clipper); } /* now figure what changed and add draw rects if it just became visible or invisible */ is_v = evas_object_is_visible(obj); was_v = evas_object_was_visible(obj); if (is_v != was_v) { evas_object_render_pre_visible_change(&obj->layer->evas->clip_changes, obj, is_v, was_v); goto done; } if (obj->changed_map) { evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, obj); goto done; } /* its not visible - we accounted for it appearing or not so just abort */ if (!is_v) goto done; /* clipper changed this is in addition to anything else for obj */ evas_object_render_pre_clipper_change(&obj->layer->evas->clip_changes, obj); /* if we restacked (layer or just within a layer) and dont clip anyone */ if (obj->restack) { evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, obj); goto done; } /* if it changed color */ if ((obj->cur.color.r != obj->prev.color.r) || (obj->cur.color.g != obj->prev.color.g) || (obj->cur.color.b != obj->prev.color.b) || (obj->cur.color.a != obj->prev.color.a)) { evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, obj); goto done; } /* if it changed geometry - and obviously not visibility or color calculate differences since we have a constant color fill we really only need to update the differences */ if ((obj->cur.geometry.x != obj->prev.geometry.x) || (obj->cur.geometry.y != obj->prev.geometry.y) || (obj->cur.geometry.w != obj->prev.geometry.w) || (obj->cur.geometry.h != obj->prev.geometry.h)) { evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, obj); goto done; } if (obj->cur.render_op != obj->prev.render_op) { evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, obj); goto done; } if (obj->cur.scale != obj->prev.scale) { evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, obj); goto done; } if (o->changed) { if ((o->cur.size != o->prev.size) || ((o->cur.font != o->prev.font)) || ((o->cur.utf8_text != o->prev.utf8_text)) || ((o->cur.style != o->prev.style)) || ((o->cur.shadow.r != o->prev.shadow.r)) || ((o->cur.shadow.g != o->prev.shadow.g)) || ((o->cur.shadow.b != o->prev.shadow.b)) || ((o->cur.shadow.a != o->prev.shadow.a)) || ((o->cur.outline.r != o->prev.outline.r)) || ((o->cur.outline.g != o->prev.outline.g)) || ((o->cur.outline.b != o->prev.outline.b)) || ((o->cur.outline.a != o->prev.outline.a)) || ((o->cur.glow.r != o->prev.glow.r)) || ((o->cur.glow.g != o->prev.glow.g)) || ((o->cur.glow.b != o->prev.glow.b)) || ((o->cur.glow.a != o->prev.glow.a)) || ((o->cur.glow2.r != o->prev.glow2.r)) || ((o->cur.glow2.g != o->prev.glow2.g)) || ((o->cur.glow2.b != o->prev.glow2.b)) || ((o->cur.glow2.a != o->prev.glow2.a))) { evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, obj); goto done; } } done: evas_object_render_pre_effect_updates(&obj->layer->evas->clip_changes, obj, is_v, was_v); } static void evas_object_text_render_post(Evas_Object *obj) { Evas_Object_Text *o; /* this moves the current data to the previous state parts of the object in whatever way is safest for the object. also if we don't need object data anymore we can free it if the object deems this is a good idea */ o = (Evas_Object_Text *)(obj->object_data); /* remove those pesky changes */ evas_object_clip_changes_clean(obj); /* move cur to prev safely for object data */ evas_object_cur_prev(obj); o->prev = o->cur; o->changed = 0; } static unsigned int evas_object_text_id_get(Evas_Object *obj) { Evas_Object_Text *o; o = (Evas_Object_Text *)(obj->object_data); if (!o) return 0; return MAGIC_OBJ_TEXT; } static unsigned int evas_object_text_visual_id_get(Evas_Object *obj) { Evas_Object_Text *o; o = (Evas_Object_Text *)(obj->object_data); if (!o) return 0; return MAGIC_OBJ_SHAPE; } static void * evas_object_text_engine_data_get(Evas_Object *obj) { Evas_Object_Text *o; o = (Evas_Object_Text *)(obj->object_data); if (!o) return NULL; return o->font; } static int evas_object_text_is_opaque(Evas_Object *obj __UNUSED__) { /* this returns 1 if the internal object data implies that the object is currently fully opaque over the entire gradient it occupies */ return 0; } static int evas_object_text_was_opaque(Evas_Object *obj __UNUSED__) { /* this returns 1 if the internal object data implies that the object was currently fully opaque over the entire gradient it occupies */ return 0; } static void evas_object_text_scale_update(Evas_Object *obj) { Evas_Object_Text *o; int size; const char *font; o = (Evas_Object_Text *)(obj->object_data); font = eina_stringshare_add(o->cur.font); size = o->cur.size; if (o->cur.font) eina_stringshare_del(o->cur.font); o->cur.font = NULL; o->prev.font = NULL; o->cur.size = 0; o->prev.size = 0; evas_object_text_font_set(obj, font, size); } void _evas_object_text_rehint(Evas_Object *obj) { Evas_Object_Text *o; int is, was; o = (Evas_Object_Text *)(obj->object_data); if (!o->font) return; evas_font_load_hinting_set(obj->layer->evas, o->font, obj->layer->evas->hinting); was = evas_object_is_in_output_rect(obj, obj->layer->evas->pointer.x, obj->layer->evas->pointer.y, 1, 1); /* DO II */ _evas_object_text_recalc(obj); o->changed = 1; evas_object_change(obj); evas_object_clip_dirty(obj); evas_object_coords_recalc(obj); is = evas_object_is_in_output_rect(obj, obj->layer->evas->pointer.x, obj->layer->evas->pointer.y, 1, 1); if ((is || was) && obj->cur.visible) evas_event_feed_mouse_move(obj->layer->evas, obj->layer->evas->pointer.x, obj->layer->evas->pointer.y, obj->layer->evas->last_timestamp, NULL); evas_object_inform_call_resize(obj); } static void _evas_object_text_recalc(Evas_Object *obj) { Evas_Object_Text *o; Eina_Unicode *text = NULL; o = (Evas_Object_Text *)(obj->object_data); if (o->items) _evas_object_text_items_clear(o); if (o->cur.utf8_text) text = eina_unicode_utf8_to_unicode(o->cur.utf8_text, NULL); if (!text) text = eina_unicode_strdup(EINA_UNICODE_EMPTY_STRING); _evas_object_text_layout(obj, o, text); if (text) free(text); /* Calc ascent/descent. */ if (o->items) { Evas_Object_Text_Item *item; for (item = o->items ; item ; item = EINA_INLIST_CONTAINER_GET( EINA_INLIST_GET(item)->next, Evas_Object_Text_Item)) { int asc = 0, desc = 0; /* Skip items without meaning full information. */ if (!item->text_props.font_instance) continue; asc = evas_common_font_instance_ascent_get(item->text_props.font_instance); desc = evas_common_font_instance_descent_get(item->text_props.font_instance); if (asc > o->ascent) o->ascent = asc; if (desc > o->descent) o->descent = desc; asc = evas_common_font_instance_max_ascent_get(item->text_props.font_instance); desc = evas_common_font_instance_max_descent_get(item->text_props.font_instance); if (asc > o->max_ascent) o->max_ascent = asc; if (desc > o->max_descent) o->max_descent = desc; } } else if (o->font) { o->ascent = ENFN->font_ascent_get(ENDT, o->font); o->descent = ENFN->font_descent_get(ENDT, o->font); o->max_ascent = ENFN->font_max_ascent_get(ENDT, o->font); o->max_descent = ENFN->font_max_descent_get(ENDT, o->font); } if ((o->font) && (o->items)) { int w, h; int l = 0, r = 0, t = 0, b = 0; w = _evas_object_text_horiz_advance_get(obj, o); h = _evas_object_text_vert_advance_get(obj, o); evas_text_style_pad_get(o->cur.style, &l, &r, &t, &b); obj->cur.geometry.w = w + l + r; obj->cur.geometry.h = h + t + b; //// obj->cur.cache.geometry.validity = 0; } else { int t = 0, b = 0; evas_text_style_pad_get(o->cur.style, NULL, NULL, &t, &b); obj->cur.geometry.w = 0; obj->cur.geometry.h = o->max_ascent + o->max_descent + t + b; //// obj->cur.cache.geometry.validity = 0; } evas_object_clip_dirty(obj); } evas-1.7.9/src/lib/canvas/evas_touch_point.c0000664000175000017500000000471212175475547015763 00000000000000#include "evas_common.h" #include "evas_private.h" void _evas_touch_point_append(Evas *e, int id, Evas_Coord x, Evas_Coord y) { Evas_Coord_Touch_Point *point; /* create new Evas_Coord_Touch_Point */ point = (Evas_Coord_Touch_Point *)calloc(1, sizeof(Evas_Coord_Touch_Point)); point->x = x; point->y = y; point->id = id; point->state = EVAS_TOUCH_POINT_DOWN; e->touch_points = eina_list_append(e->touch_points, point); } void _evas_touch_point_update(Evas *e, int id, Evas_Coord x, Evas_Coord y, Evas_Touch_Point_State state) { Eina_List *l; Evas_Coord_Touch_Point *point = NULL; EINA_LIST_FOREACH(e->touch_points, l, point) { if (point->id == id) { point->x = x; point->y = y; point->state = state; break; } } } void _evas_touch_point_remove(Evas *e, int id) { Eina_List *l; Evas_Coord_Touch_Point *point = NULL; EINA_LIST_FOREACH(e->touch_points, l, point) { if (point->id == id) { e->touch_points = eina_list_remove(e->touch_points, point); free(point); break; } } } EAPI unsigned int evas_touch_point_list_count(Evas *e) { MAGIC_CHECK(e, Evas, MAGIC_EVAS); return 0; MAGIC_CHECK_END(); return eina_list_count(e->touch_points); } EAPI void evas_touch_point_list_nth_xy_get(Evas *e, unsigned int n, Evas_Coord *x, Evas_Coord *y) { Evas_Coord_Touch_Point *point = NULL; MAGIC_CHECK(e, Evas, MAGIC_EVAS); if (x) *x = 0; if (y) *y = 0; return; MAGIC_CHECK_END(); point = (Evas_Coord_Touch_Point *)eina_list_nth(e->touch_points, n); if (!point) { if (x) *x = 0; if (y) *y = 0; return; } if (x) *x = point->x; if (y) *y = point->y; } EAPI int evas_touch_point_list_nth_id_get(Evas *e, unsigned int n) { Evas_Coord_Touch_Point *point = NULL; MAGIC_CHECK(e, Evas, MAGIC_EVAS); return -1; MAGIC_CHECK_END(); point = (Evas_Coord_Touch_Point *)eina_list_nth(e->touch_points, n); if (!point) return -1; return point->id; } EAPI Evas_Touch_Point_State evas_touch_point_list_nth_state_get(Evas *e, unsigned int n) { Evas_Coord_Touch_Point *point = NULL; MAGIC_CHECK(e, Evas, MAGIC_EVAS); return EVAS_TOUCH_POINT_CANCEL; MAGIC_CHECK_END(); point = (Evas_Coord_Touch_Point *)eina_list_nth(e->touch_points, n); if (!point) return EVAS_TOUCH_POINT_CANCEL; return point->state; } evas-1.7.9/src/lib/canvas/evas_main.c0000664000175000017500000003632312175475547014357 00000000000000#include "evas_common.h" #include "evas_private.h" #include "evas_cs.h" #ifdef EVAS_CSERVE2 #include "evas_cs2_private.h" #endif #ifdef LKDEBUG EAPI Eina_Bool lockdebug = EINA_FALSE; EAPI int lockmax = 0; #endif static int _evas_init_count = 0; int _evas_log_dom_global = -1; EAPI int evas_init(void) { if (++_evas_init_count != 1) return _evas_init_count; #ifdef LKDEBUG if (getenv("EVAS_LOCK_DEBUG")) { lockdebug = EINA_TRUE; lockmax = atoi(getenv("EVAS_LOCK_DEBUG")); } #endif #ifdef HAVE_EVIL if (!evil_init()) return --_evas_init_count; #endif if (!eina_init()) goto shutdown_evil; _evas_log_dom_global = eina_log_domain_register ("evas_main", EVAS_DEFAULT_LOG_COLOR); if (_evas_log_dom_global < 0) { EINA_LOG_ERR("Can not create a module log domain."); goto shutdown_eina; } evas_module_init(); #ifdef BUILD_ASYNC_EVENTS if (!evas_async_events_init()) goto shutdown_module; #endif #ifdef EVAS_CSERVE if (getenv("EVAS_CSERVE")) evas_cserve_init(); #endif #ifdef EVAS_CSERVE2 if (getenv("EVAS_CSERVE2")) evas_cserve2_init(); #endif #ifdef BUILD_ASYNC_PRELOAD _evas_preload_thread_init(); #endif return _evas_init_count; #ifdef BUILD_ASYNC_EVENTS shutdown_module: evas_module_shutdown(); eina_log_domain_unregister(_evas_log_dom_global); #endif shutdown_eina: eina_shutdown(); shutdown_evil: #ifdef HAVE_EVIL evil_shutdown(); #endif return --_evas_init_count; } EAPI int evas_shutdown(void) { if (_evas_init_count <= 0) { EINA_LOG_ERR("Init count not greater than 0 in shutdown."); return 0; } if (--_evas_init_count != 0) return _evas_init_count; #ifdef BUILD_ASYNC_EVENTS _evas_preload_thread_shutdown(); #endif #ifdef EVAS_CSERVE if (getenv("EVAS_CSERVE")) evas_cserve_shutdown(); #endif #ifdef BUILD_ASYNC_EVENTS evas_async_events_shutdown(); #endif evas_font_dir_cache_free(); evas_common_shutdown(); evas_module_shutdown(); eina_log_domain_unregister(_evas_log_dom_global); eina_shutdown(); #ifdef HAVE_EVIL evil_shutdown(); #endif return _evas_init_count; } EAPI Evas * evas_new(void) { Evas *e; e = calloc(1, sizeof(Evas)); if (!e) return NULL; e->magic = MAGIC_EVAS; e->output.render_method = RENDER_METHOD_INVALID; e->viewport.w = 1; e->viewport.h = 1; e->framespace.x = 0; e->framespace.y = 0; e->framespace.w = 0; e->framespace.h = 0; e->hinting = EVAS_FONT_HINTING_BYTECODE; e->name_hash = eina_hash_string_superfast_new(NULL); eina_clist_init(&e->calc_list); eina_clist_init(&e->calc_done); #define EVAS_ARRAY_SET(E, Array) \ eina_array_step_set(&E->Array, sizeof (E->Array), 4096); EVAS_ARRAY_SET(e, delete_objects); EVAS_ARRAY_SET(e, active_objects); EVAS_ARRAY_SET(e, restack_objects); EVAS_ARRAY_SET(e, render_objects); EVAS_ARRAY_SET(e, pending_objects); EVAS_ARRAY_SET(e, obscuring_objects); EVAS_ARRAY_SET(e, temporary_objects); EVAS_ARRAY_SET(e, calculate_objects); EVAS_ARRAY_SET(e, clip_changes); #undef EVAS_ARRAY_SET return e; } EAPI void evas_free(Evas *e) { Eina_Rectangle *r; Evas_Coord_Touch_Point *touch_point; Evas_Layer *lay; int i; int del; MAGIC_CHECK(e, Evas, MAGIC_EVAS); return; MAGIC_CHECK_END(); if (e->walking_list > 0) return; evas_render_idle_flush(e); _evas_post_event_callback_free(e); del = 1; e->walking_list++; e->cleanup = 1; while (del) { del = 0; EINA_INLIST_FOREACH(e->layers, lay) { Evas_Object *o; evas_layer_pre_free(lay); EINA_INLIST_FOREACH(lay->objects, o) { if ((o->callbacks) && (o->callbacks->walking_list)) { /* Defer free */ e->delete_me = 1; e->walking_list--; return; } if (!o->delete_me) del = 1; } } } EINA_INLIST_FOREACH(e->layers, lay) evas_layer_free_objects(lay); evas_layer_clean(e); e->walking_list--; evas_font_path_clear(e); e->pointer.object.in = eina_list_free(e->pointer.object.in); if (e->name_hash) eina_hash_free(e->name_hash); e->name_hash = NULL; EINA_LIST_FREE(e->damages, r) eina_rectangle_free(r); EINA_LIST_FREE(e->obscures, r) eina_rectangle_free(r); evas_fonts_zero_free(e); evas_event_callback_all_del(e); evas_event_callback_cleanup(e); if (e->engine.func) { e->engine.func->context_free(e->engine.data.output, e->engine.data.context); e->engine.func->output_free(e->engine.data.output); e->engine.func->info_free(e, e->engine.info); } for (i = 0; i < e->modifiers.mod.count; i++) free(e->modifiers.mod.list[i]); if (e->modifiers.mod.list) free(e->modifiers.mod.list); for (i = 0; i < e->locks.lock.count; i++) free(e->locks.lock.list[i]); if (e->locks.lock.list) free(e->locks.lock.list); if (e->engine.module) evas_module_unref(e->engine.module); eina_array_flush(&e->delete_objects); eina_array_flush(&e->active_objects); eina_array_flush(&e->restack_objects); eina_array_flush(&e->render_objects); eina_array_flush(&e->pending_objects); eina_array_flush(&e->obscuring_objects); eina_array_flush(&e->temporary_objects); eina_array_flush(&e->calculate_objects); eina_array_flush(&e->clip_changes); EINA_LIST_FREE(e->touch_points, touch_point) free(touch_point); e->magic = 0; free(e); } EAPI void evas_output_method_set(Evas *e, int render_method) { Evas_Module *em; MAGIC_CHECK(e, Evas, MAGIC_EVAS); return; MAGIC_CHECK_END(); /* if our engine to set it to is invalid - abort */ if (render_method == RENDER_METHOD_INVALID) return; /* if the engine is already set up - abort */ if (e->output.render_method != RENDER_METHOD_INVALID) return; /* Request the right engine. */ em = evas_module_engine_get(render_method); if (!em) return ; if (em->id_engine != render_method) return; if (!evas_module_load(em)) return; /* set the correct render */ e->output.render_method = render_method; e->engine.func = (em->functions); evas_module_use(em); if (e->engine.module) evas_module_unref(e->engine.module); e->engine.module = em; evas_module_ref(em); /* get the engine info struct */ if (e->engine.func->info) e->engine.info = e->engine.func->info(e); return; } EAPI int evas_output_method_get(const Evas *e) { MAGIC_CHECK(e, Evas, MAGIC_EVAS); return RENDER_METHOD_INVALID; MAGIC_CHECK_END(); return e->output.render_method; } EAPI Evas_Engine_Info * evas_engine_info_get(const Evas *e) { Evas_Engine_Info *info; MAGIC_CHECK(e, Evas, MAGIC_EVAS); return NULL; MAGIC_CHECK_END(); if (!e->engine.info) return NULL; info = e->engine.info; ((Evas *)e)->engine.info_magic = info->magic; return info; } EAPI Eina_Bool evas_engine_info_set(Evas *e, Evas_Engine_Info *info) { MAGIC_CHECK(e, Evas, MAGIC_EVAS); return EINA_FALSE; MAGIC_CHECK_END(); if (!info) return EINA_FALSE; if (info != e->engine.info) return EINA_FALSE; if (info->magic != e->engine.info_magic) return EINA_FALSE; return (Eina_Bool)e->engine.func->setup(e, info); } EAPI void evas_output_size_set(Evas *e, int w, int h) { MAGIC_CHECK(e, Evas, MAGIC_EVAS); return; MAGIC_CHECK_END(); if ((w == e->output.w) && (h == e->output.h)) return; if (w < 1) w = 1; if (h < 1) h = 1; e->output.w = w; e->output.h = h; e->output.changed = 1; e->output_validity++; e->changed = 1; evas_render_invalidate(e); } EAPI void evas_output_size_get(const Evas *e, int *w, int *h) { MAGIC_CHECK(e, Evas, MAGIC_EVAS); if (w) *w = 0; if (h) *h = 0; return; MAGIC_CHECK_END(); if (w) *w = e->output.w; if (h) *h = e->output.h; } EAPI void evas_output_viewport_set(Evas *e, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h) { MAGIC_CHECK(e, Evas, MAGIC_EVAS); return; MAGIC_CHECK_END(); if ((x == e->viewport.x) && (y == e->viewport.y) && (w == e->viewport.w) && (h == e->viewport.h)) return; if (w <= 0) return; if (h <= 0) return; if ((x != 0) || (y != 0)) { ERR("Compat error. viewport x,y != 0,0 not supported"); x = 0; y = 0; } e->viewport.x = x; e->viewport.y = y; e->viewport.w = w; e->viewport.h = h; e->viewport.changed = 1; e->output_validity++; e->changed = 1; } EAPI void evas_output_viewport_get(const Evas *e, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h) { MAGIC_CHECK(e, Evas, MAGIC_EVAS); if (x) *x = 0; if (y) *y = 0; if (w) *w = 0; if (h) *h = 0; return; MAGIC_CHECK_END(); if (x) *x = e->viewport.x; if (y) *y = e->viewport.y; if (w) *w = e->viewport.w; if (h) *h = e->viewport.h; } EAPI void evas_output_framespace_set(Evas *e, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h) { MAGIC_CHECK(e, Evas, MAGIC_EVAS); return; MAGIC_CHECK_END(); if ((x == e->framespace.x) && (y == e->framespace.y) && (w == e->framespace.w) && (h == e->framespace.h)) return; e->framespace.x = x; e->framespace.y = y; e->framespace.w = w; e->framespace.h = h; e->framespace.changed = 1; e->output_validity++; e->changed = 1; } EAPI void evas_output_framespace_get(const Evas *e, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h) { MAGIC_CHECK(e, Evas, MAGIC_EVAS); if (x) *x = 0; if (y) *y = 0; if (w) *w = 0; if (h) *h = 0; return; MAGIC_CHECK_END(); if (x) *x = e->framespace.x; if (y) *y = e->framespace.y; if (w) *w = e->framespace.w; if (h) *h = e->framespace.h; } EAPI Evas_Coord evas_coord_screen_x_to_world(const Evas *e, int x) { MAGIC_CHECK(e, Evas, MAGIC_EVAS); return 0; MAGIC_CHECK_END(); if (e->output.w == e->viewport.w) return e->viewport.x + x; return (long long)e->viewport.x + (((long long)x * (long long)e->viewport.w) / (long long)e->output.w); } EAPI Evas_Coord evas_coord_screen_y_to_world(const Evas *e, int y) { MAGIC_CHECK(e, Evas, MAGIC_EVAS); return 0; MAGIC_CHECK_END(); if (e->output.h == e->viewport.h) return e->viewport.y + y; return (long long)e->viewport.y + (((long long)y * (long long)e->viewport.h) / (long long)e->output.h); } EAPI int evas_coord_world_x_to_screen(const Evas *e, Evas_Coord x) { MAGIC_CHECK(e, Evas, MAGIC_EVAS); return 0; MAGIC_CHECK_END(); if (e->output.w == e->viewport.w) return x - e->viewport.x; return (int)((((long long)x - (long long)e->viewport.x) * (long long)e->output.w) / (long long)e->viewport.w); } EAPI int evas_coord_world_y_to_screen(const Evas *e, Evas_Coord y) { MAGIC_CHECK(e, Evas, MAGIC_EVAS); return 0; MAGIC_CHECK_END(); if (e->output.h == e->viewport.h) return y - e->viewport.y; return (int)((((long long)y - (long long)e->viewport.y) * (long long)e->output.h) / (long long)e->viewport.h); } EAPI int evas_render_method_lookup(const char *name) { Evas_Module *em; if (!name) return RENDER_METHOD_INVALID; /* search on the engines list for the name */ em = evas_module_find_type(EVAS_MODULE_TYPE_ENGINE, name); if (!em) return RENDER_METHOD_INVALID; return em->id_engine; } EAPI Eina_List * evas_render_method_list(void) { return evas_module_engine_list(); } EAPI void evas_render_method_list_free(Eina_List *list) { const char *s; EINA_LIST_FREE(list, s) eina_stringshare_del(s); } EAPI Eina_Bool evas_object_image_extension_can_load_get(const char *file) { const char *tmp; Eina_Bool result; tmp = eina_stringshare_add(file); result = evas_common_extension_can_load_get(tmp); eina_stringshare_del(tmp); return result; } EAPI Eina_Bool evas_object_image_extension_can_load_fast_get(const char *file) { return evas_common_extension_can_load_get(file); } EAPI void evas_pointer_output_xy_get(const Evas *e, int *x, int *y) { MAGIC_CHECK(e, Evas, MAGIC_EVAS); if (x) *x = 0; if (y) *y = 0; return; MAGIC_CHECK_END(); if (x) *x = e->pointer.x; if (y) *y = e->pointer.y; } EAPI void evas_pointer_canvas_xy_get(const Evas *e, Evas_Coord *x, Evas_Coord *y) { MAGIC_CHECK(e, Evas, MAGIC_EVAS); if (x) *x = 0; if (y) *y = 0; return; MAGIC_CHECK_END(); if (x) *x = e->pointer.x; if (y) *y = e->pointer.y; } EAPI int evas_pointer_button_down_mask_get(const Evas *e) { MAGIC_CHECK(e, Evas, MAGIC_EVAS); return 0; MAGIC_CHECK_END(); return (int)e->pointer.button; } EAPI Eina_Bool evas_pointer_inside_get(const Evas *e) { MAGIC_CHECK(e, Evas, MAGIC_EVAS); return 0; MAGIC_CHECK_END(); return (int)e->pointer.inside; } EAPI void evas_data_attach_set(Evas *e, void *data) { MAGIC_CHECK(e, Evas, MAGIC_EVAS); return; MAGIC_CHECK_END(); e->attach_data = data; } EAPI void * evas_data_attach_get(const Evas *e) { MAGIC_CHECK(e, Evas, MAGIC_EVAS); return NULL; MAGIC_CHECK_END(); return e->attach_data; } EAPI void evas_focus_in(Evas *e) { MAGIC_CHECK(e, Evas, MAGIC_EVAS); return; MAGIC_CHECK_END(); if (e->focus) return; e->focus = 1; evas_event_callback_call(e, EVAS_CALLBACK_CANVAS_FOCUS_IN, NULL); } EAPI void evas_focus_out(Evas *e) { MAGIC_CHECK(e, Evas, MAGIC_EVAS); return; MAGIC_CHECK_END(); if (!e->focus) return; e->focus = 0; evas_event_callback_call(e, EVAS_CALLBACK_CANVAS_FOCUS_OUT, NULL); } EAPI Eina_Bool evas_focus_state_get(const Evas *e) { MAGIC_CHECK(e, Evas, MAGIC_EVAS); return 0; MAGIC_CHECK_END(); return e->focus; } EAPI void evas_nochange_push(Evas *e) { e->nochange++; } EAPI void evas_nochange_pop(Evas *e) { e->nochange--; } void _evas_walk(Evas *e) { e->walking_list++; } void _evas_unwalk(Evas *e) { e->walking_list--; if ((e->walking_list == 0) && (e->delete_me)) evas_free(e); } EAPI const char * evas_load_error_str(Evas_Load_Error error) { switch (error) { case EVAS_LOAD_ERROR_NONE: return "No error on load"; case EVAS_LOAD_ERROR_GENERIC: return "A non-specific error occurred"; case EVAS_LOAD_ERROR_DOES_NOT_EXIST: return "File (or file path) does not exist"; case EVAS_LOAD_ERROR_PERMISSION_DENIED: return "Permission deinied to an existing file (or path)"; case EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED: return "Allocation of resources failure prevented load"; case EVAS_LOAD_ERROR_CORRUPT_FILE: return "File corrupt (but was detected as a known format)"; case EVAS_LOAD_ERROR_UNKNOWN_FORMAT: return "File is not a known format"; default: return "Unknown error"; } } EAPI void evas_color_hsv_to_rgb(float h, float s, float v, int *r, int *g, int *b) { evas_common_convert_color_hsv_to_rgb(h, s, v, r, g, b); } EAPI void evas_color_rgb_to_hsv(int r, int g, int b, float *h, float *s, float *v) { evas_common_convert_color_rgb_to_hsv(r, g, b, h, s, v); } EAPI void evas_color_argb_premul(int a, int *r, int *g, int *b) { evas_common_convert_color_argb_premul(a, r, g, b); } EAPI void evas_color_argb_unpremul(int a, int *r, int *g, int *b) { evas_common_convert_color_argb_unpremul(a, r, g, b); } EAPI void evas_data_argb_premul(unsigned int *data, unsigned int len) { if (!data || (len < 1)) return; evas_common_convert_argb_premul(data, len); } EAPI void evas_data_argb_unpremul(unsigned int *data, unsigned int len) { if (!data || (len < 1)) return; evas_common_convert_argb_unpremul(data, len); } evas-1.7.9/src/lib/canvas/evas_object_inform.c0000664000175000017500000000411112175475547016241 00000000000000#include "evas_common.h" #include "evas_private.h" /* local calls */ void evas_object_inform_call_show(Evas_Object *obj) { _evas_object_event_new(); evas_object_event_callback_call(obj, EVAS_CALLBACK_SHOW, NULL, _evas_event_counter); _evas_post_event_callback_call(obj->layer->evas); } void evas_object_inform_call_hide(Evas_Object *obj) { _evas_object_event_new(); evas_object_event_callback_call(obj, EVAS_CALLBACK_HIDE, NULL, _evas_event_counter); _evas_post_event_callback_call(obj->layer->evas); } void evas_object_inform_call_move(Evas_Object *obj) { _evas_object_event_new(); evas_object_event_callback_call(obj, EVAS_CALLBACK_MOVE, NULL, _evas_event_counter); _evas_post_event_callback_call(obj->layer->evas); } void evas_object_inform_call_resize(Evas_Object *obj) { _evas_object_event_new(); evas_object_event_callback_call(obj, EVAS_CALLBACK_RESIZE, NULL, _evas_event_counter); _evas_post_event_callback_call(obj->layer->evas); } void evas_object_inform_call_restack(Evas_Object *obj) { _evas_object_event_new(); evas_object_event_callback_call(obj, EVAS_CALLBACK_RESTACK, NULL, _evas_event_counter); _evas_post_event_callback_call(obj->layer->evas); } void evas_object_inform_call_changed_size_hints(Evas_Object *obj) { _evas_object_event_new(); evas_object_event_callback_call(obj, EVAS_CALLBACK_CHANGED_SIZE_HINTS, NULL, _evas_event_counter); _evas_post_event_callback_call(obj->layer->evas); } void evas_object_inform_call_image_preloaded(Evas_Object *obj) { if (!_evas_object_image_preloading_get(obj)) return; _evas_object_image_preloading_check(obj); _evas_object_image_preloading_set(obj, 0); _evas_object_event_new(); evas_object_event_callback_call(obj, EVAS_CALLBACK_IMAGE_PRELOADED, NULL, _evas_event_counter); _evas_post_event_callback_call(obj->layer->evas); } void evas_object_inform_call_image_unloaded(Evas_Object *obj) { _evas_object_event_new(); evas_object_event_callback_call(obj, EVAS_CALLBACK_IMAGE_UNLOADED, NULL, _evas_event_counter); _evas_post_event_callback_call(obj->layer->evas); } evas-1.7.9/src/lib/canvas/evas_rectangle.c0000664000175000017500000000377712175475547015406 00000000000000#include "evas_common.h" #include "evas_private.h" void evas_rects_return_difference_rects(Eina_Array *rects, int x, int y, int w, int h, int xx, int yy, int ww, int hh) { if (!RECTS_INTERSECT(x, y, w, h, xx, yy, ww, hh)) { evas_add_rect(rects, x, y, w, h); evas_add_rect(rects, xx, yy, ww, hh); } else { int pt_x[4], pt_y[4], i, j; if (x < xx) { pt_x[0] = x; pt_x[1] = xx; } else { pt_x[0] = xx; pt_x[1] = x; } if ((x + w) < (xx + ww)) { pt_x[2] = x + w; pt_x[3] = xx + ww; } else { pt_x[2] = xx + ww; pt_x[3] = x + w; } if (y < yy) { pt_y[0] = y; pt_y[1] = yy; } else { pt_y[0] = yy; pt_y[1] = y; } if ((y + h) < (yy + hh)) { pt_y[2] = y + h; pt_y[3] = yy + hh; } else { pt_y[2] = yy + hh; pt_y[3] = y + h; } for (j = 0; j < 3; j++) { for (i = 0; i < 3; i++) { int intsec1, intsec2; int tx, ty, tw, th; tx = pt_x[i]; ty = pt_y[j]; tw = pt_x[i + 1] - pt_x[i]; th = pt_y[j + 1] - pt_y[j]; intsec1 = (RECTS_INTERSECT(tx, ty, tw, th, x, y, w, h)); intsec2 = (RECTS_INTERSECT(tx, ty, tw, th, xx, yy, ww, hh)); if (intsec1 ^ intsec2) { evas_add_rect(rects, tx, ty, tw, th); } } } /* if (tmp.count > 0) */ /* { */ /* unsigned int i; */ /* for (i = 0; i < tmp.count; ++i) */ /* { */ /* if ((tmp.array[i].w > 0) && (tmp.array[i].h > 0)) */ /* { */ /* int intsec1, intsec2; */ /* intsec1 = (RECTS_INTERSECT(tmp.array[i].x, tmp.array[i].y, tmp.array[i].w, tmp.array[i].h, x, y, w, h)); */ /* intsec2 = (RECTS_INTERSECT(tmp.array[i].x, tmp.array[i].y, tmp.array[i].w, tmp.array[i].h, xx, yy, ww, hh)); */ /* if (intsec1 ^ intsec2) */ /* { */ /* evas_add_rect(rects, tmp.array[i].x, tmp.array[i].y, tmp.array[i].w, tmp.array[i].h); */ /* } */ /* } */ /* } */ /* free(tmp.array); */ /* } */ } } evas-1.7.9/src/lib/canvas/evas_object_textblock.c0000664000175000017500000120602712230264272016740 00000000000000/** * @internal * @subsection Evas_Object_Textblock_Internal Internal Textblock Object Tutorial * * This explains the internal design of the Evas Textblock Object, it's assumed * that the reader of this section has already read @ref Evas_Object_Textblock_Tutorial "Textblock's usage docs.". * * @subsection textblock_internal_intro Introduction * There are two main parts to the textblock object, the first being the node * system, and the second being the layout system. The former is just an * internal representation of the markup text, while the latter is the internal * visual representation of the text (i.e positioning, sizing, fonts and etc). * * @subsection textblock_nodes The Nodes system * The nodes mechanism consists of two main data types: * ::Evas_Object_Textblock_Node_Text and ::Evas_Object_Textblock_Node_Format * the former is for Text nodes and the latter is for format nodes. * There's always at least one text node, even if there are only formats. * * @subsection textblock_nodes_text Text nodes * Each text node is essentially a paragraph, it includes an @ref Eina_UStrbuf * that stores the actual paragraph text, a utf8 string to store the paragraph * text in utf8 (which is not used internally at all), A pointer to it's * main @ref textblock_nodes_format_internal "Format Node" and the paragraph's * @ref evas_bidi_props "BiDi properties". The pointer to the format node may be * NULL if there's no format node anywhere before the end of the text node, * not even in previous text nodes. If not NULL, it points to the first format * node pointing to text inside of the text node, or if there is none, it points * to the previous's text nodes format node. Each paragraph has a format node * representing a paragraph separator pointing to it's last position except * for the last paragraph, which has no such constraint. This constraint * happens because text nodes are paragraphs and paragraphs are delimited by * paragraph separators. * * @subsection textblock_nodes_format_internal Format Nodes - Internal * Each format node stores a group of format information, for example the * markup: \ will all be inserted * inside the same format node, altohugh it consists of different formatting * commands. * Each node has a pointer to it's text node, this pointer is NEVER NULL, even * if there's only one format, and no text, a text node is created. Each format * node includes an offset from the last format node of the same text node. For * example, the markup "012" will create two format nodes, the first * having an offset of 1 and the second an offset of 2. Each format node also * includes a @ref Eina_Strbuf that includes the textual representation of the * format, and a boolean stating if the format is a visible format or not, see * @ref textblock_nodes_format_visible * * @subsection textblock_nodes_format_visible Visible Format Nodes * There are two types of format nodes, visible and invisible. They are the same * in every way, except for the representation in the text node. While invisible * format nodes have no representation in the text node, the visible ones do. * The Uniceode object replacement character (0xFFFC) is inserted to every place * a visible format node points to. This makes it very easy to treat visible * formats as items in the text, both for BiDi purposes and cursor handling * purposes. * Here are a few example visible an invisible formats: * Visible: newline char, tab, paragraph separator and an embedded item. * Invisible: setting the color, font or alignment of the text. * * @subsection textblock_layout The layout system * @todo write @ref textblock_layout */ #include "evas_common.h" #include "evas_private.h" #include #ifdef HAVE_LINEBREAK #include "linebreak.h" #include "wordbreak.h" #endif /* save typing */ #define ENFN obj->layer->evas->engine.func #define ENDT obj->layer->evas->engine.data.output /* private magic number for textblock objects */ static const char o_type[] = "textblock"; /* The char to be inserted instead of visible formats */ #define _REPLACEMENT_CHAR 0xFFFC #define _PARAGRAPH_SEPARATOR 0x2029 #define _NEWLINE '\n' #define _TAB '\t' #define _REPLACEMENT_CHAR_UTF8 "\xEF\xBF\xBC" #define _PARAGRAPH_SEPARATOR_UTF8 "\xE2\x80\xA9" #define _NEWLINE_UTF8 "\n" #define _TAB_UTF8 "\t" #define EVAS_TEXTBLOCK_IS_VISIBLE_FORMAT_CHAR(ch) \ (((ch) == _REPLACEMENT_CHAR) || \ ((ch) == _NEWLINE) || \ ((ch) == _TAB) || \ ((ch) == _PARAGRAPH_SEPARATOR)) #ifdef CRITICAL #undef CRITICAL #endif #define CRITICAL(...) EINA_LOG_DOM_CRIT(EINA_LOG_DOMAIN_DEFAULT, __VA_ARGS__) #ifdef ERR #undef ERR #endif #define ERR(...) EINA_LOG_DOM_ERR(EINA_LOG_DOMAIN_DEFAULT, __VA_ARGS__) #ifdef WRN #undef WRN #endif #define WRN(...) EINA_LOG_DOM_WARN(EINA_LOG_DOMAIN_DEFAULT, __VA_ARGS__) #ifdef INF #undef INF #endif #define INF(...) EINA_LOG_DOM_INFO(EINA_LOG_DOMAIN_DEFAULT, __VA_ARGS__) #ifdef DBG #undef DBG #endif #define DBG(...) EINA_LOG_DOM_DBG(EINA_LOG_DOMAIN_DEFAULT, __VA_ARGS__) #define TB_NULL_CHECK(null_check, ...) \ do \ { \ if (!null_check) \ { \ ERR("%s is NULL while it shouldn't be, please notify developers.", #null_check); \ return __VA_ARGS__; \ } \ } \ while(0) /* private struct for textblock object internal data */ /** * @internal * @typedef Evas_Object_Textblock * The actual textblock object. */ typedef struct _Evas_Object_Textblock Evas_Object_Textblock; /** * @internal * @typedef Evas_Object_Style_Tag * The structure used for finding style tags. */ typedef struct _Evas_Object_Style_Tag Evas_Object_Style_Tag; /** * @internal * @typedef Evas_Object_Style_Tag * The structure used for finding style tags. */ typedef struct _Evas_Object_Style_Tag_Base Evas_Object_Style_Tag_Base; /** * @internal * @typedef Evas_Object_Textblock_Node_Text * A text node. */ typedef struct _Evas_Object_Textblock_Node_Text Evas_Object_Textblock_Node_Text; /* * Defined in Evas.h typedef struct _Evas_Object_Textblock_Node_Format Evas_Object_Textblock_Node_Format; */ /** * @internal * @typedef Evas_Object_Textblock_Paragraph * A layouting paragraph. */ typedef struct _Evas_Object_Textblock_Paragraph Evas_Object_Textblock_Paragraph; /** * @internal * @typedef Evas_Object_Textblock_Line * A layouting line. */ typedef struct _Evas_Object_Textblock_Line Evas_Object_Textblock_Line; /** * @internal * @typedef Evas_Object_Textblock_Item * A layouting item. */ typedef struct _Evas_Object_Textblock_Item Evas_Object_Textblock_Item; /** * @internal * @typedef Evas_Object_Textblock_Item * A layouting text item. */ typedef struct _Evas_Object_Textblock_Text_Item Evas_Object_Textblock_Text_Item; /** * @internal * @typedef Evas_Object_Textblock_Format_Item * A layouting format item. */ typedef struct _Evas_Object_Textblock_Format_Item Evas_Object_Textblock_Format_Item; /** * @internal * @typedef Evas_Object_Textblock_Format * A textblock format. */ typedef struct _Evas_Object_Textblock_Format Evas_Object_Textblock_Format; /** * @internal * @def IS_AT_END(ti, ind) * Return true if ind is at the end of the text item, false otherwise. */ #define IS_AT_END(ti, ind) (ind == ti->text_props.text_len) /** * @internal * @def MOVE_PREV_UNTIL(limit, ind) * This decrements ind as long as ind > limit. */ #define MOVE_PREV_UNTIL(limit, ind) \ do \ { \ if ((limit) < (ind)) \ (ind)--; \ } \ while (0) /** * @internal * @def MOVE_NEXT_UNTIL(limit, ind) * This increments ind as long as ind < limit */ #define MOVE_NEXT_UNTIL(limit, ind) \ do \ { \ if ((ind) < (limit)) \ (ind)++; \ } \ while (0) /** * @internal * @def GET_ITEM_TEXT(ti) * Returns a const reference to the text of the ti (not null terminated). */ #define GET_ITEM_TEXT(ti) \ (((ti)->parent.text_node) ? \ (eina_ustrbuf_string_get((ti)->parent.text_node->unicode) + \ (ti)->parent.text_pos) : EINA_UNICODE_EMPTY_STRING) /** * @internal * @def _FORMAT_IS_CLOSER_OF(base, closer, closer_len) * Returns true if closer is the closer of base. */ #define _FORMAT_IS_CLOSER_OF(base, closer, closer_len) \ (!strncmp(base, closer, closer_len) && \ (!base[closer_len] || \ (base[closer_len] == '=') || \ _is_white(base[closer_len]))) /*FIXME: document the structs and struct items. */ struct _Evas_Object_Style_Tag_Base { char *tag; char *replace; size_t tag_len; size_t replace_len; }; struct _Evas_Object_Style_Tag { EINA_INLIST; Evas_Object_Style_Tag_Base tag; }; struct _Evas_Object_Textblock_Node_Text { EINA_INLIST; Eina_UStrbuf *unicode; char *utf8; Evas_Object_Textblock_Node_Format *format_node; Evas_Object_Textblock_Paragraph *par; Eina_Bool dirty : 1; Eina_Bool is_new : 1; }; struct _Evas_Object_Textblock_Node_Format { EINA_INLIST; const char *format; const char *orig_format; Evas_Object_Textblock_Node_Text *text_node; size_t offset; unsigned char anchor : 2; Eina_Bool opener : 1; Eina_Bool own_closer : 1; Eina_Bool visible : 1; Eina_Bool format_change : 1; Eina_Bool is_new : 1; }; /* The default tags to use */ static const Evas_Object_Style_Tag_Base default_tags[] = { { "b", "+ font_weight=Bold", 1, 18 }, { "i", "+ font_style=Italic", 1, 19 }}; #define ANCHOR_NONE 0 #define ANCHOR_A 1 #define ANCHOR_ITEM 2 /** * @internal * @def _NODE_TEXT(x) * A convinience macro for casting to a text node. */ #define _NODE_TEXT(x) ((Evas_Object_Textblock_Node_Text *) (x)) /** * @internal * @def _NODE_FORMAT(x) * A convinience macro for casting to a format node. */ #define _NODE_FORMAT(x) ((Evas_Object_Textblock_Node_Format *) (x)) /** * @internal * @def _ITEM(x) * A convinience macro for casting to a generic item. */ #define _ITEM(x) ((Evas_Object_Textblock_Item *) (x)) /** * @internal * @def _ITEM_TEXT(x) * A convinience macro for casting to a text item. */ #define _ITEM_TEXT(x) ((Evas_Object_Textblock_Text_Item *) (x)) /** * @internal * @def _ITEM_FORMAT(x) * A convinience macro for casting to a format item. */ #define _ITEM_FORMAT(x) ((Evas_Object_Textblock_Format_Item *) (x)) struct _Evas_Object_Textblock_Paragraph { EINA_INLIST; Evas_Object_Textblock_Line *lines; Evas_Object_Textblock_Node_Text *text_node; Eina_List *logical_items; Evas_BiDi_Paragraph_Props *bidi_props; /* Only valid during layout */ Evas_BiDi_Direction direction; Evas_Coord y, w, h; int line_no; Eina_Bool is_bidi : 1; Eina_Bool visible : 1; Eina_Bool rendered : 1; }; struct _Evas_Object_Textblock_Line { EINA_INLIST; Evas_Object_Textblock_Item *items; Evas_Object_Textblock_Paragraph *par; Evas_Coord x, y, w, h; int baseline; int line_no; }; typedef enum _Evas_Textblock_Item_Type { EVAS_TEXTBLOCK_ITEM_TEXT, EVAS_TEXTBLOCK_ITEM_FORMAT, } Evas_Textblock_Item_Type; struct _Evas_Object_Textblock_Item { EINA_INLIST; Evas_Textblock_Item_Type type; Evas_Object_Textblock_Node_Text *text_node; Evas_Object_Textblock_Format *format; size_t text_pos; #ifdef BIDI_SUPPORT size_t visual_pos; #endif Evas_Coord adv, x, w, h; Eina_Bool merge : 1; /* Indicates whether this item should merge to the previous item or not */ Eina_Bool visually_deleted : 1; /* Indicates whether this item is used in the visual layout or not. */ }; struct _Evas_Object_Textblock_Text_Item { Evas_Object_Textblock_Item parent; Evas_Text_Props text_props; Evas_Coord inset; Evas_Coord x_adjustment; /* Used to indicate by how much we adjusted sizes */ }; struct _Evas_Object_Textblock_Format_Item { Evas_Object_Textblock_Item parent; Evas_BiDi_Direction bidi_dir; const char *item; int y; unsigned char vsize : 2; unsigned char size : 2; Eina_Bool formatme : 1; }; struct _Evas_Object_Textblock_Format { Evas_Object_Textblock_Node_Format *fnode; double halign; double valign; struct { Evas_Font_Description *fdesc; const char *source; Evas_Font_Set *font; Evas_Font_Size size; } font; struct { struct { unsigned char r, g, b, a; } normal, underline, underline2, underline_dash, outline, shadow, glow, glow2, backing, strikethrough; } color; struct { int l, r; } margin; int ref; int tabstops; int linesize; int linegap; int underline_dash_width; int underline_dash_gap; double linerelsize; double linerelgap; double linefill; double ellipsis; unsigned char style; Eina_Bool wrap_word : 1; Eina_Bool wrap_char : 1; Eina_Bool wrap_mixed : 1; Eina_Bool underline : 1; Eina_Bool underline2 : 1; Eina_Bool underline_dash : 1; Eina_Bool strikethrough : 1; Eina_Bool backing : 1; Eina_Bool password : 1; Eina_Bool halign_auto : 1; }; struct _Evas_Textblock_Style { const char *style_text; char *default_tag; Evas_Object_Style_Tag *tags; Eina_List *objects; Eina_Bool delete_me : 1; }; struct _Evas_Textblock_Cursor { Evas_Object *obj; size_t pos; Evas_Object_Textblock_Node_Text *node; }; /* Size of the index array */ #define TEXTBLOCK_PAR_INDEX_SIZE 10 struct _Evas_Object_Textblock { DATA32 magic; Evas_Textblock_Style *style; Evas_Textblock_Style *style_user; Evas_Textblock_Cursor *cursor; Eina_List *cursors; Evas_Object_Textblock_Node_Text *text_nodes; Evas_Object_Textblock_Node_Format *format_nodes; int num_paragraphs; Evas_Object_Textblock_Paragraph *paragraphs; Evas_Object_Textblock_Paragraph *par_index[TEXTBLOCK_PAR_INDEX_SIZE]; Evas_Object_Textblock_Text_Item *ellip_ti; Eina_List *anchors_a; Eina_List *anchors_item; int last_w, last_h; struct { int l, r, t, b; } style_pad; double valign; char *markup_text; void *engine_data; const char *repch; const char *bidi_delimiters; struct { int w, h; Eina_Bool valid : 1; } formatted, native; Eina_Bool redraw : 1; Eina_Bool changed : 1; Eina_Bool content_changed : 1; Eina_Bool format_changed : 1; Eina_Bool have_ellipsis : 1; Eina_Bool legacy_newline : 1; }; /* private methods for textblock objects */ static void evas_object_textblock_init(Evas_Object *obj); static void *evas_object_textblock_new(void); static void evas_object_textblock_render(Evas_Object *obj, void *output, void *context, void *surface, int x, int y); static void evas_object_textblock_free(Evas_Object *obj); static void evas_object_textblock_render_pre(Evas_Object *obj); static void evas_object_textblock_render_post(Evas_Object *obj); static Evas_Object_Textblock_Node_Text *_evas_textblock_node_text_new(void); static unsigned int evas_object_textblock_id_get(Evas_Object *obj); static unsigned int evas_object_textblock_visual_id_get(Evas_Object *obj); static void *evas_object_textblock_engine_data_get(Evas_Object *obj); static int evas_object_textblock_is_opaque(Evas_Object *obj); static int evas_object_textblock_was_opaque(Evas_Object *obj); static void evas_object_textblock_coords_recalc(Evas_Object *obj); static void evas_object_textblock_scale_update(Evas_Object *obj); static const Evas_Object_Func object_func = { /* methods (compulsory) */ evas_object_textblock_free, evas_object_textblock_render, evas_object_textblock_render_pre, evas_object_textblock_render_post, evas_object_textblock_id_get, evas_object_textblock_visual_id_get, evas_object_textblock_engine_data_get, /* these are optional. NULL = nothing */ NULL, NULL, NULL, NULL, evas_object_textblock_is_opaque, evas_object_textblock_was_opaque, NULL, NULL, evas_object_textblock_coords_recalc, evas_object_textblock_scale_update, NULL, NULL, NULL }; /* the actual api call to add a textblock */ #define TB_HEAD() \ Evas_Object_Textblock *o; \ MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); \ return; \ MAGIC_CHECK_END(); \ o = (Evas_Object_Textblock *)(obj->object_data); \ MAGIC_CHECK(o, Evas_Object_Textblock, MAGIC_OBJ_TEXTBLOCK); \ return; \ MAGIC_CHECK_END(); #define TB_HEAD_RETURN(x) \ Evas_Object_Textblock *o; \ MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); \ return (x); \ MAGIC_CHECK_END(); \ o = (Evas_Object_Textblock *)(obj->object_data); \ MAGIC_CHECK(o, Evas_Object_Textblock, MAGIC_OBJ_TEXTBLOCK); \ return (x); \ MAGIC_CHECK_END(); static Eina_Bool _evas_textblock_cursor_is_at_the_end(const Evas_Textblock_Cursor *cur); static void _evas_textblock_node_text_remove(Evas_Object_Textblock *o, Evas_Object_Textblock_Node_Text *n); static Evas_Object_Textblock_Node_Format *_evas_textblock_cursor_node_format_before_or_at_pos_get(const Evas_Textblock_Cursor *cur); static size_t _evas_textblock_node_format_pos_get(const Evas_Object_Textblock_Node_Format *fmt); static void _evas_textblock_node_format_remove(Evas_Object_Textblock *o, Evas_Object_Textblock_Node_Format *n, int visual_adjustment); static void _evas_textblock_node_format_free(Evas_Object_Textblock *o, Evas_Object_Textblock_Node_Format *n); static void _evas_textblock_node_text_free(Evas_Object_Textblock_Node_Text *n); static void _evas_textblock_changed(Evas_Object_Textblock *o, Evas_Object *obj); static void _evas_textblock_invalidate_all(Evas_Object_Textblock *o); static void _evas_textblock_cursors_update_offset(const Evas_Textblock_Cursor *cur, const Evas_Object_Textblock_Node_Text *n, size_t start, int offset); static void _evas_textblock_cursors_set_node(Evas_Object_Textblock *o, const Evas_Object_Textblock_Node_Text *n, Evas_Object_Textblock_Node_Text *new_node); /* styles */ /** * @internal * Clears the textblock style passed except for the style_text which is replaced. * @param ts The ts to be cleared. Must not be NULL. * @param style_text the style's text. */ static void _style_replace(Evas_Textblock_Style *ts, const char *style_text) { eina_stringshare_replace(&ts->style_text, style_text); if (ts->default_tag) free(ts->default_tag); while (ts->tags) { Evas_Object_Style_Tag *tag; tag = (Evas_Object_Style_Tag *)ts->tags; ts->tags = (Evas_Object_Style_Tag *)eina_inlist_remove(EINA_INLIST_GET(ts->tags), EINA_INLIST_GET(tag)); free(tag->tag.tag); free(tag->tag.replace); free(tag); } ts->default_tag = NULL; ts->tags = NULL; } /** * @internal * Clears the textblock style passed. * @param ts The ts to be cleared. Must not be NULL. */ static void _style_clear(Evas_Textblock_Style *ts) { _style_replace(ts, NULL); } /** * @internal * Searches inside the tags stored in the style for the tag matching s. * @param ts The ts to be cleared. Must not be NULL. * @param s The tag to be matched. * @param tag_len the length of the tag string. * @param[out] replace_len The length of the replcaement found. - Must not be NULL. * @return The replacement string found. */ static inline const char * _style_match_tag(const Evas_Textblock_Style *ts, const char *s, size_t tag_len, size_t *replace_len) { Evas_Object_Style_Tag *tag; /* Try the style tags */ EINA_INLIST_FOREACH(ts->tags, tag) { if (tag->tag.tag_len != tag_len) continue; if (!strncmp(tag->tag.tag, s, tag_len)) { *replace_len = tag->tag.replace_len; return tag->tag.replace; } } /* Try the default tags */ { size_t i; const Evas_Object_Style_Tag_Base *btag; for (btag = default_tags, i = 0 ; i < (sizeof(default_tags) / sizeof(default_tags[0])) ; btag++, i++) { if (btag->tag_len != tag_len) continue; if (!strncmp(btag->tag, s, tag_len)) { *replace_len = btag->replace_len; return btag->replace; } } } *replace_len = 0; return NULL; } /** * @internal * Clears all the nodes (text and format) of the textblock object. * @param obj The evas object, must not be NULL. */ static void _nodes_clear(const Evas_Object *obj) { Evas_Object_Textblock *o; o = (Evas_Object_Textblock *)(obj->object_data); while (o->text_nodes) { Evas_Object_Textblock_Node_Text *n; n = o->text_nodes; o->text_nodes = _NODE_TEXT(eina_inlist_remove( EINA_INLIST_GET(o->text_nodes), EINA_INLIST_GET(n))); _evas_textblock_node_text_free(n); } while (o->format_nodes) { Evas_Object_Textblock_Node_Format *n; n = o->format_nodes; o->format_nodes = _NODE_FORMAT(eina_inlist_remove(EINA_INLIST_GET(o->format_nodes), EINA_INLIST_GET(n))); _evas_textblock_node_format_free(o, n); } } /** * @internal * Unrefs and frees (if needed) a textblock format. * @param obj The Evas_Object, Must not be NULL. * @param fmt the format to be cleaned, must not be NULL. */ static void _format_unref_free(const Evas_Object *obj, Evas_Object_Textblock_Format *fmt) { fmt->ref--; if (fmt->ref > 0) return; if (fmt->font.fdesc) evas_font_desc_unref(fmt->font.fdesc); if (fmt->font.source) eina_stringshare_del(fmt->font.source); evas_font_free(obj->layer->evas, fmt->font.font); free(fmt); } /** * @internal * Free a layout item * @param obj The evas object, must not be NULL. * @param ln the layout line on which the item is in, must not be NULL. * @param it the layout item to be freed */ static void _item_free(const Evas_Object *obj, Evas_Object_Textblock_Line *ln, Evas_Object_Textblock_Item *it) { if (it->type == EVAS_TEXTBLOCK_ITEM_TEXT) { Evas_Object_Textblock_Text_Item *ti = _ITEM_TEXT(it); evas_common_text_props_content_unref(&ti->text_props); } else { Evas_Object_Textblock_Format_Item *fi = _ITEM_FORMAT(it); if (fi->item) eina_stringshare_del(fi->item); } _format_unref_free(obj, it->format); if (ln) { ln->items = (Evas_Object_Textblock_Item *) eina_inlist_remove( EINA_INLIST_GET(ln->items), EINA_INLIST_GET(ln->items)); } free(it); } /** * @internal * Free a layout line. * @param obj The evas object, must not be NULL. * @param ln the layout line to be freed, must not be NULL. */ static void _line_free(Evas_Object_Textblock_Line *ln) { /* Items are freed from the logical list, except for the ellip item */ if (ln) free(ln); } /* table of html escapes (that i can find) this should be ordered with the * most common first as it's a linear search to match - no hash for this. * * these are stored as one large string and one additional array that * contains the offsets to the tokens for space efficiency. */ /** * @internal * @var escape_strings[] * This string consists of NULL terminated pairs of strings, the first of * every pair is an escape and the second is the value of the escape. */ static const char escape_strings[] = /* most common escaped stuff */ ""\0" "\x22\0" "&\0" "\x26\0" "<\0" "\x3c\0" ">\0" "\x3e\0" /* all the rest */ " \0" "\xc2\xa0\0" "¡\0" "\xc2\xa1\0" "¢\0" "\xc2\xa2\0" "£\0" "\xc2\xa3\0" "¤\0" "\xc2\xa4\0" "¥\0" "\xc2\xa5\0" "¦\0" "\xc2\xa6\0" "§\0" "\xc2\xa7\0" "¨\0" "\xc2\xa8\0" "©\0" "\xc2\xa9\0" "ª\0" "\xc2\xaa\0" "«\0" "\xc2\xab\0" "¬\0" "\xc2\xac\0" "®\0" "\xc2\xae\0" "¯\0" "\xc2\xaf\0" "°\0" "\xc2\xb0\0" "±\0" "\xc2\xb1\0" "²\0" "\xc2\xb2\0" "³\0" "\xc2\xb3\0" "´\0" "\xc2\xb4\0" "µ\0" "\xc2\xb5\0" "¶\0" "\xc2\xb6\0" "·\0" "\xc2\xb7\0" "¸\0" "\xc2\xb8\0" "¹\0" "\xc2\xb9\0" "º\0" "\xc2\xba\0" "»\0" "\xc2\xbb\0" "¼\0" "\xc2\xbc\0" "½\0" "\xc2\xbd\0" "¾\0" "\xc2\xbe\0" "¿\0" "\xc2\xbf\0" "À\0" "\xc3\x80\0" "Á\0" "\xc3\x81\0" "Â\0" "\xc3\x82\0" "Ã\0" "\xc3\x83\0" "Ä\0" "\xc3\x84\0" "Å\0" "\xc3\x85\0" "&Aelig;\0" "\xc3\x86\0" "Ç\0" "\xc3\x87\0" "È\0" "\xc3\x88\0" "É\0" "\xc3\x89\0" "Ê\0" "\xc3\x8a\0" "Ë\0" "\xc3\x8b\0" "Ì\0" "\xc3\x8c\0" "Í\0" "\xc3\x8d\0" "Î\0" "\xc3\x8e\0" "Ï\0" "\xc3\x8f\0" "&Eth;\0" "\xc3\x90\0" "Ñ\0" "\xc3\x91\0" "Ò\0" "\xc3\x92\0" "Ó\0" "\xc3\x93\0" "Ô\0" "\xc3\x94\0" "Õ\0" "\xc3\x95\0" "Ö\0" "\xc3\x96\0" "×\0" "\xc3\x97\0" "Ø\0" "\xc3\x98\0" "Ù\0" "\xc3\x99\0" "Ú\0" "\xc3\x9a\0" "Û\0" "\xc3\x9b\0" "Ý\0" "\xc3\x9d\0" "&Thorn;\0" "\xc3\x9e\0" "ß\0" "\xc3\x9f\0" "à\0" "\xc3\xa0\0" "á\0" "\xc3\xa1\0" "â\0" "\xc3\xa2\0" "ã\0" "\xc3\xa3\0" "ä\0" "\xc3\xa4\0" "å\0" "\xc3\xa5\0" "æ\0" "\xc3\xa6\0" "ç\0" "\xc3\xa7\0" "è\0" "\xc3\xa8\0" "é\0" "\xc3\xa9\0" "ê\0" "\xc3\xaa\0" "ë\0" "\xc3\xab\0" "ì\0" "\xc3\xac\0" "í\0" "\xc3\xad\0" "î\0" "\xc3\xae\0" "ï\0" "\xc3\xaf\0" "ð\0" "\xc3\xb0\0" "ñ\0" "\xc3\xb1\0" "ò\0" "\xc3\xb2\0" "ó\0" "\xc3\xb3\0" "ô\0" "\xc3\xb4\0" "õ\0" "\xc3\xb5\0" "ö\0" "\xc3\xb6\0" "÷\0" "\xc3\xb7\0" "ø\0" "\xc3\xb8\0" "ù\0" "\xc3\xb9\0" "ú\0" "\xc3\xba\0" "û\0" "\xc3\xbb\0" "ü\0" "\xc3\xbc\0" "ý\0" "\xc3\xbd\0" "þ\0" "\xc3\xbe\0" "ÿ\0" "\xc3\xbf\0" "α\0" "\xce\x91\0" "β\0" "\xce\x92\0" "γ\0" "\xce\x93\0" "δ\0" "\xce\x94\0" "ε\0" "\xce\x95\0" "ζ\0" "\xce\x96\0" "η\0" "\xce\x97\0" "θ\0" "\xce\x98\0" "ι\0" "\xce\x99\0" "κ\0" "\xce\x9a\0" "λ\0" "\xce\x9b\0" "μ\0" "\xce\x9c\0" "ν\0" "\xce\x9d\0" "ξ\0" "\xce\x9e\0" "ο\0" "\xce\x9f\0" "π\0" "\xce\xa0\0" "ρ\0" "\xce\xa1\0" "σ\0" "\xce\xa3\0" "τ\0" "\xce\xa4\0" "υ\0" "\xce\xa5\0" "φ\0" "\xce\xa6\0" "χ\0" "\xce\xa7\0" "ψ\0" "\xce\xa8\0" "ω\0" "\xce\xa9\0" "…\0" "\xe2\x80\xa6\0" "€\0" "\xe2\x82\xac\0" "←\0" "\xe2\x86\x90\0" "↑\0" "\xe2\x86\x91\0" "→\0" "\xe2\x86\x92\0" "↓\0" "\xe2\x86\x93\0" "↔\0" "\xe2\x86\x94\0" "←\0" "\xe2\x87\x90\0" "→\0" "\xe2\x87\x92\0" "∀\0" "\xe2\x88\x80\0" "∃\0" "\xe2\x88\x83\0" "∇\0" "\xe2\x88\x87\0" "∏\0" "\xe2\x88\x8f\0" "∑\0" "\xe2\x88\x91\0" "∧\0" "\xe2\x88\xa7\0" "∨\0" "\xe2\x88\xa8\0" "∫\0" "\xe2\x88\xab\0" "≠\0" "\xe2\x89\xa0\0" "≡\0" "\xe2\x89\xa1\0" "⊕\0" "\xe2\x8a\x95\0" "⊥\0" "\xe2\x8a\xa5\0" "†\0" "\xe2\x80\xa0\0" "‡\0" "\xe2\x80\xa1\0" "•\0" "\xe2\x80\xa2\0" ; EVAS_MEMPOOL(_mp_obj); /** * @internal * Checks if a char is a whitespace. * @param c the unicode codepoint. * @return @c EINA_TRUE if the unicode codepoint is a whitespace, @c EINA_FALSE * otherwise. */ static Eina_Bool _is_white(Eina_Unicode c) { /* * unicode list of whitespace chars * * 0009..000D .. * 0020 SPACE * 0085 * 00A0 NO-BREAK SPACE * 1680 OGHAM SPACE MARK * 180E MONGOLIAN VOWEL SEPARATOR * 2000..200A EN QUAD..HAIR SPACE * 2028 LINE SEPARATOR * 2029 PARAGRAPH SEPARATOR * 202F NARROW NO-BREAK SPACE * 205F MEDIUM MATHEMATICAL SPACE * 3000 IDEOGRAPHIC SPACE */ if ( (c == 0x20) || ((c >= 0x9) && (c <= 0xd)) || (c == 0x85) || (c == 0xa0) || (c == 0x1680) || (c == 0x180e) || ((c >= 0x2000) && (c <= 0x200a)) || (c == 0x2028) || (c == 0x2029) || (c == 0x202f) || (c == 0x205f) || (c == 0x3000) ) return EINA_TRUE; return EINA_FALSE; } /** * @internal * Prepends the text between s and p to the main cursor of the object. * * @param cur the cursor to prepend to. * @param[in] s start of the string * @param[in] p end of the string */ static void _prepend_text_run(Evas_Textblock_Cursor *cur, const char *s, const char *p) { if ((s) && (p > s)) { char *ts; ts = alloca(p - s + 1); strncpy(ts, s, p - s); ts[p - s] = 0; evas_textblock_cursor_text_prepend(cur, ts); } } /** * @internal * Returns the numeric value of HEX chars for example for ch = 'A' * the function will return 10. * * @param ch The HEX char. * @return numeric value of HEX. */ static int _hex_string_get(char ch) { if ((ch >= '0') && (ch <= '9')) return (ch - '0'); else if ((ch >= 'A') && (ch <= 'F')) return (ch - 'A' + 10); else if ((ch >= 'a') && (ch <= 'f')) return (ch - 'a' + 10); return 0; } /** * @internal * Parses a string of one of the formas: * 1. "#RRGGBB" * 2. "#RRGGBBAA" * 3. "#RGB" * 4. "#RGBA" * To the rgba values. * * @param[in] str The string to parse - NOT NULL. * @param[out] r The Red value - NOT NULL. * @param[out] g The Green value - NOT NULL. * @param[out] b The Blue value - NOT NULL. * @param[out] a The Alpha value - NOT NULL. */ static void _format_color_parse(const char *str, unsigned char *r, unsigned char *g, unsigned char *b, unsigned char *a) { int slen; slen = strlen(str); *r = *g = *b = *a = 0; if (slen == 7) /* #RRGGBB */ { *r = (_hex_string_get(str[1]) << 4) | (_hex_string_get(str[2])); *g = (_hex_string_get(str[3]) << 4) | (_hex_string_get(str[4])); *b = (_hex_string_get(str[5]) << 4) | (_hex_string_get(str[6])); *a = 0xff; } else if (slen == 9) /* #RRGGBBAA */ { *r = (_hex_string_get(str[1]) << 4) | (_hex_string_get(str[2])); *g = (_hex_string_get(str[3]) << 4) | (_hex_string_get(str[4])); *b = (_hex_string_get(str[5]) << 4) | (_hex_string_get(str[6])); *a = (_hex_string_get(str[7]) << 4) | (_hex_string_get(str[8])); } else if (slen == 4) /* #RGB */ { *r = _hex_string_get(str[1]); *r = (*r << 4) | *r; *g = _hex_string_get(str[2]); *g = (*g << 4) | *g; *b = _hex_string_get(str[3]); *b = (*b << 4) | *b; *a = 0xff; } else if (slen == 5) /* #RGBA */ { *r = _hex_string_get(str[1]); *r = (*r << 4) | *r; *g = _hex_string_get(str[2]); *g = (*g << 4) | *g; *b = _hex_string_get(str[3]); *b = (*b << 4) | *b; *a = _hex_string_get(str[4]); *a = (*a << 4) | *a; } *r = (*r * *a) / 255; *g = (*g * *a) / 255; *b = (*b * *a) / 255; } /* The refcount for the formats. */ static int format_refcount = 0; /* Holders for the stringshares */ static const char *fontstr = NULL; static const char *font_fallbacksstr = NULL; static const char *font_sizestr = NULL; static const char *font_sourcestr = NULL; static const char *font_weightstr = NULL; static const char *font_stylestr = NULL; static const char *font_widthstr = NULL; static const char *langstr = NULL; static const char *colorstr = NULL; static const char *underline_colorstr = NULL; static const char *underline2_colorstr = NULL; static const char *underline_dash_colorstr = NULL; static const char *outline_colorstr = NULL; static const char *shadow_colorstr = NULL; static const char *glow_colorstr = NULL; static const char *glow2_colorstr = NULL; static const char *backing_colorstr = NULL; static const char *strikethrough_colorstr = NULL; static const char *alignstr = NULL; static const char *valignstr = NULL; static const char *wrapstr = NULL; static const char *left_marginstr = NULL; static const char *right_marginstr = NULL; static const char *underlinestr = NULL; static const char *strikethroughstr = NULL; static const char *backingstr = NULL; static const char *stylestr = NULL; static const char *tabstopsstr = NULL; static const char *linesizestr = NULL; static const char *linerelsizestr = NULL; static const char *linegapstr = NULL; static const char *linerelgapstr = NULL; static const char *itemstr = NULL; static const char *linefillstr = NULL; static const char *ellipsisstr = NULL; static const char *passwordstr = NULL; static const char *underline_dash_widthstr = NULL; static const char *underline_dash_gapstr = NULL; /** * @page evas_textblock_style_page Evas Textblock Style Options * * @brief This page describes how to style text in an Evas Text Block. */ /** * @internal * Init the format strings. */ static void _format_command_init(void) { if (format_refcount == 0) { /** * @page evas_textblock_style_page Evas Textblock Style Options * * @section evas_textblock_style_index Index * * The following styling commands are accepted: * @li @ref evas_textblock_style_font * @li @ref evas_textblock_style_font_fallback * @li @ref evas_textblock_style_font_size * @li @ref evas_textblock_style_font_source * @li @ref evas_textblock_style_font_weight * @li @ref evas_textblock_style_font_style * @li @ref evas_textblock_style_font_width * @li @ref evas_textblock_style_lang * @li @ref evas_textblock_style_color * @li @ref evas_textblock_style_underline_color * @li @ref evas_textblock_style_underline2_color * @li @ref evas_textblock_style_underline_dash_color * @li @ref evas_textblock_style_outline_color * @li @ref evas_textblock_style_shadow_color * @li @ref evas_textblock_style_glow_color * @li @ref evas_textblock_style_glow2_color * @li @ref evas_textblock_style_backing_color * @li @ref evas_textblock_style_strikethrough_color * @li @ref evas_textblock_style_align * @li @ref evas_textblock_style_valign * @li @ref evas_textblock_style_wrap * @li @ref evas_textblock_style_left_margin * @li @ref evas_textblock_style_right_margin * @li @ref evas_textblock_style_underline * @li @ref evas_textblock_style_strikethrough * @li @ref evas_textblock_style_backing * @li @ref evas_textblock_style_style * @li @ref evas_textblock_style_tabstops * @li @ref evas_textblock_style_linesize * @li @ref evas_textblock_style_linerelsize * @li @ref evas_textblock_style_linegap * @li @ref evas_textblock_style_linerelgap * @li @ref evas_textblock_style_item * @li @ref evas_textblock_style_linefill * @li @ref evas_textblock_style_ellipsis * @li @ref evas_textblock_style_password * @li @ref evas_textblock_style_underline_dash_width * @li @ref evas_textblock_style_underline_dash_gap * * @section evas_textblock_style_contents Contents */ fontstr = eina_stringshare_add("font"); font_fallbacksstr = eina_stringshare_add("font_fallbacks"); font_sizestr = eina_stringshare_add("font_size"); font_sourcestr = eina_stringshare_add("font_source"); font_weightstr = eina_stringshare_add("font_weight"); font_stylestr = eina_stringshare_add("font_style"); font_widthstr = eina_stringshare_add("font_width"); langstr = eina_stringshare_add("lang"); colorstr = eina_stringshare_add("color"); underline_colorstr = eina_stringshare_add("underline_color"); underline2_colorstr = eina_stringshare_add("underline2_color"); underline_dash_colorstr = eina_stringshare_add("underline_dash_color"); outline_colorstr = eina_stringshare_add("outline_color"); shadow_colorstr = eina_stringshare_add("shadow_color"); glow_colorstr = eina_stringshare_add("glow_color"); glow2_colorstr = eina_stringshare_add("glow2_color"); backing_colorstr = eina_stringshare_add("backing_color"); strikethrough_colorstr = eina_stringshare_add("strikethrough_color"); alignstr = eina_stringshare_add("align"); valignstr = eina_stringshare_add("valign"); wrapstr = eina_stringshare_add("wrap"); left_marginstr = eina_stringshare_add("left_margin"); right_marginstr = eina_stringshare_add("right_margin"); underlinestr = eina_stringshare_add("underline"); strikethroughstr = eina_stringshare_add("strikethrough"); backingstr = eina_stringshare_add("backing"); stylestr = eina_stringshare_add("style"); tabstopsstr = eina_stringshare_add("tabstops"); linesizestr = eina_stringshare_add("linesize"); linerelsizestr = eina_stringshare_add("linerelsize"); linegapstr = eina_stringshare_add("linegap"); linerelgapstr = eina_stringshare_add("linerelgap"); itemstr = eina_stringshare_add("item"); linefillstr = eina_stringshare_add("linefill"); ellipsisstr = eina_stringshare_add("ellipsis"); passwordstr = eina_stringshare_add("password"); underline_dash_widthstr = eina_stringshare_add("underline_dash_width"); underline_dash_gapstr = eina_stringshare_add("underline_dash_gap"); } format_refcount++; } /** * @internal * Shutdown the format strings. */ static void _format_command_shutdown(void) { if (--format_refcount > 0) return; eina_stringshare_del(fontstr); eina_stringshare_del(font_fallbacksstr); eina_stringshare_del(font_sizestr); eina_stringshare_del(font_sourcestr); eina_stringshare_del(font_weightstr); eina_stringshare_del(font_stylestr); eina_stringshare_del(font_widthstr); eina_stringshare_del(langstr); eina_stringshare_del(colorstr); eina_stringshare_del(underline_colorstr); eina_stringshare_del(underline2_colorstr); eina_stringshare_del(underline_dash_colorstr); eina_stringshare_del(outline_colorstr); eina_stringshare_del(shadow_colorstr); eina_stringshare_del(glow_colorstr); eina_stringshare_del(glow2_colorstr); eina_stringshare_del(backing_colorstr); eina_stringshare_del(strikethrough_colorstr); eina_stringshare_del(alignstr); eina_stringshare_del(valignstr); eina_stringshare_del(wrapstr); eina_stringshare_del(left_marginstr); eina_stringshare_del(right_marginstr); eina_stringshare_del(underlinestr); eina_stringshare_del(strikethroughstr); eina_stringshare_del(backingstr); eina_stringshare_del(stylestr); eina_stringshare_del(tabstopsstr); eina_stringshare_del(linesizestr); eina_stringshare_del(linerelsizestr); eina_stringshare_del(linegapstr); eina_stringshare_del(linerelgapstr); eina_stringshare_del(itemstr); eina_stringshare_del(linefillstr); eina_stringshare_del(ellipsisstr); eina_stringshare_del(passwordstr); eina_stringshare_del(underline_dash_widthstr); eina_stringshare_del(underline_dash_gapstr); } /** * @internal * Copies str to dst while removing the \\ char, i.e unescape the escape sequences. * * @param[out] dst the destination string - Should not be NULL. * @param[in] src the source string - Should not be NULL. */ static void _format_clean_param(char *dst, const char *src) { const char *ss; char *ds; ds = dst; for (ss = src; *ss; ss++, ds++) { if ((*ss == '\\') && *(ss + 1)) ss++; *ds = *ss; } *ds = 0; } /** * @internal * Parses the cmd and parameter and adds the parsed format to fmt. * * @param obj the evas object - should not be NULL. * @param fmt The format to populate - should not be NULL. * @param[in] cmd the command to process, should be stringshared. * @param[in] param the parameter of the command. */ static void _format_command(Evas_Object *obj, Evas_Object_Textblock_Format *fmt, const char *cmd, const char *param) { int len; char *tmp_param; len = strlen(param); tmp_param = alloca(len + 1); _format_clean_param(tmp_param, param); /* If we are changing the font, create the fdesc. */ if ((cmd == font_weightstr) || (cmd == font_widthstr) || (cmd == font_stylestr) || (cmd == langstr) || (cmd == fontstr) || (cmd == font_fallbacksstr)) { if (!fmt->font.fdesc) { fmt->font.fdesc = evas_font_desc_new(); } else if (!fmt->font.fdesc->is_new) { Evas_Font_Description *old = fmt->font.fdesc; fmt->font.fdesc = evas_font_desc_dup(fmt->font.fdesc); if (old) evas_font_desc_unref(old); } } if (cmd == fontstr) { /** * @page evas_textblock_style_page Evas Textblock Style Options * * @subsection evas_textblock_style_font Font * * This sets the name of the font to be used. * @code * font= * @endcode */ evas_font_name_parse(fmt->font.fdesc, tmp_param); } else if (cmd == font_fallbacksstr) { /** * @page evas_textblock_style_page Evas Textblock Style Options * * @subsection evas_textblock_style_font_fallback Font fallback * * This sets the name of the fallback font to be used. This font will * be used if the primary font is not available. * @code * font_fallbacks= * @endcode */ eina_stringshare_replace(&(fmt->font.fdesc->fallbacks), tmp_param); } else if (cmd == font_sizestr) { /** * @page evas_textblock_style_page Evas Textblock Style Options * * @subsection evas_textblock_style_font_size Font size * * This sets the the size of font in points to be used. * @code * font_size= * @endcode */ int v; v = atoi(tmp_param); if (v != fmt->font.size) { fmt->font.size = v; } } else if (cmd == font_sourcestr) { /** * @page evas_textblock_style_page Evas Textblock Style Options * * @subsection evas_textblock_style_font_source Font source * * Specify an object from which to search for the font. * @code * font_source= * @endcode */ if ((!fmt->font.source) || ((fmt->font.source) && (strcmp(fmt->font.source, tmp_param)))) { if (fmt->font.source) eina_stringshare_del(fmt->font.source); fmt->font.source = eina_stringshare_add(tmp_param); } } else if (cmd == font_weightstr) { /** * @page evas_textblock_style_page Evas Textblock Style Options * * @subsection evas_textblock_style_font_weight Font weight * * Sets the weight of the font. The value must be one of: * @li "normal" * @li "thin" * @li "ultralight" * @li "light" * @li "book" * @li "medium" * @li "semibold" * @li "bold" * @li "ultrabold" * @li "black" * @li "extrablack" * @code * font_weight= * @endcode */ fmt->font.fdesc->weight = evas_font_style_find(tmp_param, tmp_param + strlen(tmp_param), EVAS_FONT_STYLE_WEIGHT); } else if (cmd == font_stylestr) { /** * @page evas_textblock_style_page Evas Textblock Style Options * * @subsection evas_textblock_style_font_style Font style * * Sets the style of the font. The value must be one of: * @li "normal" * @li "oblique" * @li "italic" * @code * font_style=