PKG_PROG_PKG_CONFIG
+WIN32_CPPFLAGS=""
WIN32_CFLAGS=""
lt_no_undefined=""
lt_enable_auto_import=""
dnl needed for correct definition of EAPI
AC_DEFINE(EFL_EVAS_BUILD, 1, [Define to mention that evas is built])
if test "$host_os" = "cegcc" ; then
+ WIN32_CPPFLAGS="-D_WIN32_WCE=0x0420"
WIN32_CFLAGS="-mwin32"
lt_enable_auto_import="-Wl,--enable-auto-import"
fi
+ if test "$host_os" = "mingw32ce" ; then
+ WIN32_CPPFLAGS="-D_WIN32_WCE=0x0420"
+ fi
lt_no_undefined="-no-undefined"
;;
esac
+AC_SUBST(WIN32_CPPFLAGS)
AC_SUBST(WIN32_CFLAGS)
AC_SUBST(lt_no_undefined)
AC_SUBST(lt_enable_auto_import)
#ifndef _EVAS_DATA_H
#define _EVAS_DATA_H
+#include <Eina.h>
+
#ifdef EAPI
# undef EAPI
#endif
# endif
#endif /* ! _WIN32 */
-#include <Eina.h>
-
/**
* @file
* @brief These routines are used for Evas data types.
-DPACKAGE_BIN_DIR=\"$(bindir)\" \
-DPACKAGE_LIB_DIR=\"$(libdir)\" \
-DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \
+ @WIN32_CPPFLAGS@ \
+ @EVIL_CFLAGS@ \
@FREETYPE_CFLAGS@ \
@EINA_CFLAGS@
evas_cache_image.c \
evas_cache_engine_image.c
+libevas_cache_la_LIBAD = @EVIL_LIBS@
+
libevas_cache_la_DEPENDENCIES = $(top_builddir)/config.h
EXTRA_DIST = evas_cache.h
* vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
*/
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
#include <stdlib.h>
#include <assert.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+
+#ifdef HAVE_EVIL
+# include <Evil.h>
+#endif
#include "evas_common.h"
#include "evas_private.h"
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@ @EET_CFLAGS@ \
- @FONTCONFIG_CFLAGS@ @EINA_CFLAGS@
+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)\" \
+@WIN32_CPPFLAGS@ \
+@FREETYPE_CFLAGS@ \
+@EET_CFLAGS@ \
+@FONTCONFIG_CFLAGS@ \
+@EINA_CFLAGS@ \
+@EVIL_CFLAGS@
noinst_LTLIBRARIES = libevas_canvas.la
libevas_canvas_la_SOURCES = \
evas_async_events.c \
evas_transform.c
+libevas_canvas_la_LIBADD = @EVIL_LIBS@
+
EXTRA_DIST = \
evas_object_gradient2_linear.c \
evas_object_gradient2_radial.c
-
-libevas_canvas_la_DEPENDENCIES = $(top_builddir)/config.h
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#ifdef HAVE_EVIL
+# include <Evil.h>
+#endif
+
#include "evas_common.h"
#include "evas_private.h"
+
#ifdef BUILD_FONT_LOADER_EET
#include <Eet.h>
#endif
+
#ifdef HAVE_FONTCONFIG
#include <fontconfig/fontconfig.h>
#endif
{
FILE *f;
- f = fopen(tmp, "r");
+ f = fopen(tmp, "rb");
if (f)
{
int num;
{
FILE *f;
- f = fopen(tmp, "r");
+ f = fopen(tmp, "rb");
if (f)
{
char fname[4096], fdef[4096];
-DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \
@FREETYPE_CFLAGS@ \
@EINA_CFLAGS@ \
-@EVIL_CFLAGS@
+@EVIL_CFLAGS@ \
+@WIN32_CPPFLAGS@
AM_CFLAGS = @WIN32_CFLAGS@
libevas_file_la_SOURCES = \
evas_path.c \
evas_module.c
-libevas_file_la_LIBADD = @EVIL_LIBS@
-libevas_file_la_DEPENDENCIES = $(top_builddir)/config.h
+libevas_file_la_LIBADD = @EINA_LIBS@ @EVIL_LIBS@
EXTRA_DIST = evas_module.h evas_path.h
struct dirent *de;
if (!(dir = opendir(mp->path))) break;
-/* printf("[evas module] searching modules on %s\n", mp->path); */
+/* printf("[evas module] searching modules on %s\n", mp->path); */
while ((de = readdir(dir)))
{
char *buf;
else if (em->type == EVAS_MODULE_TYPE_IMAGE_SAVER)
{
}
-/* printf("[evas module] including module path %s/%s of type %d\n",em->path, em->name, em->type); */
+/* printf("[evas module] including module path %s/%s of type %d\n",em->path, em->name, em->type); */
evas_modules = eina_list_append(evas_modules, em);
}
free(buf);
/* the file path separator isn't "/" then you may need to help out by */
/* adding in a new set of functions here */
-#ifndef _WIN32_WCE
-/* UNIX compatability functions */
-
-#include "evas_common.h"
-#include "evas_private.h"
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
#include <limits.h>
#include <unistd.h>
#include <fnmatch.h>
#include <dirent.h>
+#ifdef HAVE_EVIL
+# include <Evil.h>
+#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 ((path[0] == '\0') || (path[1] == '\0'))
+ return 0;
+ if (path[1] == ':') return 1;
+#else
if (path[0] == '/') return 1;
+#endif
return 0;
}
if (!end) return strdup(path);
len = strlen(path);
len += strlen(end);
- len += strlen("/");
+ len += strlen(EVAS_PATH_SEPARATOR);
res = malloc(len + 1);
if (!res) return NULL;
strcpy(res, path);
- strcat(res, "/");
+ strcat(res, EVAS_PATH_SEPARATOR);
strcat(res, end);
return res;
}
return buf2;
#endif
}
-
-#else
-/* WIN32 WINCE compatability functions */
-
-/* Forward declarations */
-
-static DWORD winstat(char *path);
-static wchar_t *convert_utf_unicode(const char* putf);
-static char *convert_unicode_utf(const wchar_t* punicode);
-
-
-/* Unicode to utf and utf to unicode conversion functions */
-static wchar_t *
-convert_utf_unicode(const char *putf)
-{
- int len;
- wchar_t *punicode;
-
- len = strlen(putf)+ 1; //add one for safety
-
- punicode = (wchar_t *)malloc(len * sizeof(wchar_t));
-
- if (punicode == NULL) return NULL;
-
-#ifdef UNICODE
- strcpy(punicode,putf);
-#else
- if (mbstowcs(punicode,putf,len) < 0)
- {
- free(punicode);
- return NULL;
- }
-#endif
- return punicode;
-}
-
-static char *
-convert_unicode_utf(const wchar_t *punicode)
-{
- int len;
- char *putf;
-
- /* add one for safety */
- len = wcslen(punicode) + 1;
-
- /* this will alloc too many bytes */
- putf = (char *)malloc(len * sizeof(wchar_t));
-
- if (putf == NULL) return NULL;
-
-#ifdef UNICODE
- strcpy(putf,punicode);
-#else
- if (wcstombs(putf,punicode,len) < 0)
- {
- free(putf);
- return NULL;
- }
-#endif
- return putf;
-}
-
-/*
- * win"stat"
- * This is like the stat function except that it reurns a bitmask (DWORD)
- * Since this library is complied using MBCS then the path is multibyte
- */
-static DWORD
-winstat(char *path)
-{
- DWORD fa;
- wchar_t *pwpath; /* A wide character type */
-
- pwpath = convert_utf_unicode(path);
- /* 0xFFFFFFFF is the error return val for the GetFile Attributes Function */
- /* so I am usin this as an error return up here */
- if (pwpath == NULL) return 0xFFFFFFFF;
- /* this function needed the wide string"*/
- /* I dont think that WinCe has mbcs equiv functions and only provides UNICODE*/
- fa = GetFileAttributesW(pwpath);
- free(pwpath);
- return fa;
-}
-
-int
-evas_file_path_is_full_path(char *path)
-{
- if (!path) return 0;
- if (path[0] == '\\') return 1;
- return 0;
-}
-
-char *
-evas_file_path_join(char *path, char *end)
-{
- char *res = NULL;
- int len;
-
- if ((!path) && (!end)) return NULL;
- if (!path) return strdup(end);
- if (!end) return strdup(path);
- len = strlen(path);
- len += strlen(end);
- len += strlen("\\");
- res = malloc(len + 1);
- if (!res) return NULL;
- strcpy(res, path);
- strcat(res, "\\");
- strcat(res, end);
- return res;
-}
-
-int
-evas_file_path_exists(char *path)
-{
- DWORD fa;
-
- fa = winstat(path);
- if (fa == 0xFFFFFFFF) return 0;
- return 1;
-}
-
-int
-evas_file_path_is_file(char *path)
-{
- DWORD fa;
-
- fa = winstat(path);
- if (fa == 0xFFFFFFFF) return 0;
- if (fa & FILE_ATTRIBUTE_DIRECTORY) return 0;
- return 1;
-}
-
-int
-evas_file_path_is_dir(char *path)
-{
- DWORD fa;
-
- fa = winstat(path);
- if (fa == 0xFFFFFFFF) return 0;
- if (fa & FILE_ATTRIBUTE_DIRECTORY) return 1;
- return 0;
-}
-
-Eina_List *
-evas_file_path_list(char *path, char *match, int match_case)
-{
- Eina_List *files = NULL;
- WIN32_FIND_DATAW find;
- HANDLE fh;
- int fullpathlen;
- char *pfp; /* full path pointer */
- wchar_t *pfup; /* full unicode path pointer */
-
- /*
- * work out the full path length of the combined patch and match
- * if we are looking for a specific match eg *.txt then we will will add
- * the length of *.txt and \\ to the string
- * if we are not looking for a match then we want to list the whole
- * directory and we find the length of \\*.*
- */
- fullpathlen = strlen(path);
- if (match)
- {
- fullpathlen += strlen("\\");
- fullpathlen += strlen(match);
- }
- else
- fullpathlen += strlen("\\*.*");
-
- /* Create the full search path */
-
- pfp = (char *)malloc(fullpathlen + 1); /* add one for safety*/
- if (pfp == NULL) return NULL;
-
- /* construct the full path */
- strcpy(pfp, path);
- if (match)
- {
- strcat(pfp,"\\");
- strcat(pfp,match);
- }
- else
- strcat(pfp,"\\*.*");
-
- /* pfp now contains the fully constructed path*/
-
- pfup = convert_utf_unicode(pfp);
- free(pfp); /* chuck it away now as we don't need it, we have a unicode version */
- if (pfup == NULL) return NULL;
-
- fh = FindFirstFileW(pfup,&find);
- free(pfup); /* chuck it away now as we don't need it, we have a handle */
- if (fh == INVALID_HANDLE_VALUE) return NULL;
-
- /* OK now go through the directory picking up filenames */
- do
- {
- if (!(find.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY))
- files = eina_list_append(files,convert_unicode_utf(find.cFileName));
-
- }
- while (FindNextFileW(fh,&find));
- FindClose(fh);
-
- return files;
-}
-
-DATA64
-evas_file_modified_time(const char *file)
-{
- WIN32_FIND_DATAW find;
- HANDLE fh;
- ULARGE_INTEGER modtime;
- wchar_t *pufile;
-
- pufile = convert_utf_unicode(file);
- if (pufile == NULL) return 0;
-
- fh = FindFirstFileW(pufile,&find);
- if (fh == INVALID_HANDLE_VALUE)
- {
- free(pufile);
- return 0;
- }
- FindClose(fh);
- free(pufile);
-
- modtime.u.HighPart = find.ftCreationTime.dwHighDateTime;
- modtime.u.LowPart = find.ftCreationTime.dwLowDateTime;
-
- return modtime.QuadPart;
-}
-
-char *
-evas_file_path_resolve(const char *file)
-{
- return strdup(file);
-}
-#endif
-I$(top_srcdir)/src/lib/include \
@FREETYPE_CFLAGS@ \
@EINA_CFLAGS@ \
-@jpeg_cflags@
+@jpeg_cflags@ \
+@EVIL_CFLAGS@ \
+@WIN32_CPPFLAGS@
AM_CFLAGS = @WIN32_CFLAGS@
module_la_SOURCES = evas_image_load_jpeg.c
-module_la_LIBADD = @EINA_LIBS@ @jpeg_libs@ $(top_builddir)/src/lib/libevas.la
+module_la_LIBADD = @EINA_LIBS@ @EVIL_LIBS@ @jpeg_libs@ $(top_builddir)/src/lib/libevas.la
module_la_LDFLAGS = @lt_no_undefined@ @lt_enable_auto_import@ -module -avoid-version
module_la_LIBTOOLFLAGS = --tag=disable-static
-#include "evas_common.h"
-#include "evas_private.h"
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
#include <stdio.h>
#include <jpeglib.h>
#include <setjmp.h>
+#ifdef HAVE_EVIL
+# include <Evil.h>
+#endif
+
+#include "evas_common.h"
+#include "evas_private.h"
+
typedef struct _JPEG_error_mgr *emptr;
struct _JPEG_error_mgr
-I$(top_srcdir)/src/lib/include \
@FREETYPE_CFLAGS@ \
@EINA_CFLAGS@ \
-@pmaps_cflags@
+@pmaps_cflags@ \
+@EVIL_CFLAGS@ \
+@WIN32_CPPFLAGS@
AM_CFLAGS = @WIN32_CFLAGS@
module_la_SOURCES = evas_image_load_pmaps.c
-module_la_LIBADD = @EINA_LIBS@ $(top_builddir)/src/lib/libevas.la
+module_la_LIBADD = @EINA_LIBS@ @EVIL_LIBS@ $(top_builddir)/src/lib/libevas.la
module_la_LDFLAGS = @lt_no_undefined@ @lt_enable_auto_import@ -module -avoid-version
module_la_LIBTOOLFLAGS = --tag=disable-static
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
#ifndef _GNU_SOURCE
#define _GNU_SOURCE
#endif
+#ifdef HAVE_EVIL
+# include <Evil.h>
+#endif
+
#include "evas_common.h"
#include "evas_private.h"
{
size_t len;
- b->file = fopen(filename, "r");
+ b->file = fopen(filename, "rb");
if (!b->file)
return 0;
-I$(top_srcdir)/src/lib/include \
@FREETYPE_CFLAGS@ \
@EINA_CFLAGS@ \
-@PNG_CFLAGS@
+@PNG_CFLAGS@ \
+@EVIL_CFLAGS@ \
+@WIN32_CPPFLAGS@
pkgdir = $(libdir)/evas/modules/loaders/png/$(MODULE_ARCH)
module_la_SOURCES = evas_image_load_png.c
-module_la_LIBADD = @EINA_LIBS@ @PNG_LIBS@ $(top_builddir)/src/lib/libevas.la
+module_la_LIBADD = @EINA_LIBS@ @PNG_LIBS@ @EVIL_LIBS@ $(top_builddir)/src/lib/libevas.la
module_la_LDFLAGS = @lt_no_undefined@ @lt_enable_auto_import@ -module -avoid-version
module_la_LIBTOOLFLAGS = --tag=disable-static
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
#ifndef _GNU_SOURCE
#define _GNU_SOURCE
#endif
-#include <png.h>
+#include <stdio.h>
#include <setjmp.h>
+#include <png.h>
+
+#ifdef HAVE_EVIL
+# include <Evil.h>
+#endif
#include "evas_common.h"
#include "evas_private.h"
-I$(top_srcdir)/src/lib/include \
@FREETYPE_CFLAGS@ \
@EINA_CFLAGS@ \
-@tiff_cflags@
+@tiff_cflags@ \
+@EVIL_CFLAGS@ \
+@WIN32_CPPFLAGS@
AM_CFLAGS = @WIN32_CFLAGS@
module_la_SOURCES = evas_image_load_tiff.c
-module_la_LIBADD = @EINA_LIBS@ @tiff_libs@ $(top_builddir)/src/lib/libevas.la
+module_la_LIBADD = @EINA_LIBS@ @EVIL_LIBS@ @tiff_libs@ $(top_builddir)/src/lib/libevas.la
module_la_LDFLAGS = @lt_no_undefined@ @lt_enable_auto_import@ -module -avoid-version
module_la_LIBTOOLFLAGS = --tag=disable-static
-#include "evas_common.h"
-#include "evas_private.h"
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
#include <stdio.h>
#include <tiffio.h>
+#ifdef HAVE_EVIL
+# include <Evil.h>
+#endif
+
+#include "evas_common.h"
+#include "evas_private.h"
+
int evas_image_load_file_head_tiff(Image_Entry *ie, const char *file, const char *key);
int evas_image_load_file_data_tiff(Image_Entry *ie, const char *file, const char *key);
-I$(top_srcdir)/src/lib/include \
@FREETYPE_CFLAGS@ \
@EINA_CFLAGS@ \
-@xpm_cflags@
+@xpm_cflags@ \
+@EVIL_CFLAGS@ \
+@WIN32_CPPFLAGS@
AM_CFLAGS = @WIN32_CFLAGS@
module_la_SOURCES = evas_image_load_xpm.c
-module_la_LIBADD = @EINA_LIBS@ $(top_builddir)/src/lib/libevas.la
+module_la_LIBADD = @EINA_LIBS@ @EVIL_LIBS@ $(top_builddir)/src/lib/libevas.la
module_la_LDFLAGS = @lt_no_undefined@ @lt_enable_auto_import@ -module -avoid-version
module_la_LIBTOOLFLAGS = --tag=disable-static
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#ifdef HAVE_EVIL
+# include <Evil.h>
+#endif
+
#include "evas_common.h"
#include "evas_private.h"
{
int len;
char val[32];
-
+
len = strlen(color) - 1;
if (len < 96)
{
int i;
-
+
len /= 3;
for (i = 0; i < len; i++)
val[i] = color[1 + i + (0 * len)];
{
int rr, gg, bb;
char name[4096];
-
+
if (sscanf(buf, "%i %i %i %[^\n]", &rr, &gg, &bb, name) == 4)
{
if (!strcasecmp(name, color))
xpm_parse_done();
return 0;
}
-
+
i = 0;
j = 0;
cmap = NULL;
}
if (transp) ie->flags.alpha = 1;
-
+
if (load_data)
{
evas_cache_image_surface_alloc(ie, w, h);
EAPI void
module_close(void)
{
-
+
}
EAPI Evas_Module_Api evas_modapi =
-I$(top_srcdir)/src/lib/include \
@FREETYPE_CFLAGS@ \
@EINA_CFLAGS@ \
-@PNG_CFLAGS@
+@PNG_CFLAGS@ \
+@EVIL_CFLAGS@ \
+@WIN32_CPPFLAGS@
AM_CFLAGS = @WIN32_CFLAGS@
module_la_SOURCES = evas_image_save_png.c
-module_la_LIBADD = @EINA_LIBS@ @PNG_LIBS@ $(top_builddir)/src/lib/libevas.la
+module_la_LIBADD = @EINA_LIBS@ @PNG_LIBS@ @EVIL_LIBS@ $(top_builddir)/src/lib/libevas.la
module_la_LDFLAGS = @lt_no_undefined@ @lt_enable_auto_import@ -module -avoid-version
module_la_LIBTOOLFLAGS = --tag=disable-static
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
#ifndef _GNU_SOURCE
#define _GNU_SOURCE
#endif
#include <png.h>
#include <setjmp.h>
+#ifdef HAVE_EVIL
+# include <Evil.h>
+#endif
+
#include "evas_common.h"
#include "evas_private.h"