Hey,

I plan to reorganise a bit what is in evas_common.h and evas_private.h, and put the declaration of functions of these files in their own file and in the corresponding directory (cache functions in cache/evas_cache.h, e.g.). I won't touch Evas.h.

I have attached the diff for cache, file and imaging functions (but not the .h files that i have added, they are obvious). make distcheck passed.

If it is good enough, i'll commit it and do the other parts of evas later.

Vincent
? src/lib/cache/evas_cache.h
? src/lib/file/evas_module.h
? src/lib/file/evas_path.h
Index: src/lib/cache/Makefile.am
===================================================================
RCS file: /cvs/e/e17/libs/evas/src/lib/cache/Makefile.am,v
retrieving revision 1.2
diff -u -r1.2 Makefile.am
--- src/lib/cache/Makefile.am   4 Nov 2007 09:21:44 -0000       1.2
+++ src/lib/cache/Makefile.am   16 May 2008 06:07:59 -0000
@@ -1,17 +1,21 @@
 
 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@
+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)\" \
[EMAIL PROTECTED]@
 
-noinst_LTLIBRARIES      = libevas_cache.la
-libevas_cache_la_SOURCES  = \
+noinst_LTLIBRARIES = libevas_cache.la
+
+libevas_cache_la_SOURCES = \
 evas_cache_image.c \
 evas_cache_engine_image.c
 
 libevas_cache_la_DEPENDENCIES = $(top_builddir)/config.h
+
+EXTRA_DIST = evas_cache.h
\ No newline at end of file
Index: src/lib/cache/evas_cache_engine_image.c
===================================================================
RCS file: /cvs/e/e17/libs/evas/src/lib/cache/evas_cache_engine_image.c,v
retrieving revision 1.6
diff -u -r1.6 evas_cache_engine_image.c
--- src/lib/cache/evas_cache_engine_image.c     12 Apr 2008 00:32:25 -0000      
1.6
+++ src/lib/cache/evas_cache_engine_image.c     16 May 2008 06:07:59 -0000
@@ -3,6 +3,7 @@
 #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)
Index: src/lib/cache/evas_cache_image.c
===================================================================
RCS file: /cvs/e/e17/libs/evas/src/lib/cache/evas_cache_image.c,v
retrieving revision 1.18
diff -u -r1.18 evas_cache_image.c
--- src/lib/cache/evas_cache_image.c    9 May 2008 19:04:49 -0000       1.18
+++ src/lib/cache/evas_cache_image.c    16 May 2008 06:07:59 -0000
@@ -4,6 +4,7 @@
 #include "evas_common.h"
 #include "evas_private.h"
 
+
 #define FREESTRC(Var)              \
   if (Var)                         \
     {                              \
Index: src/lib/file/Makefile.am
===================================================================
RCS file: /cvs/e/e17/libs/evas/src/lib/file/Makefile.am,v
retrieving revision 1.13
diff -u -r1.13 Makefile.am
--- src/lib/file/Makefile.am    23 Apr 2008 06:55:07 -0000      1.13
+++ src/lib/file/Makefile.am    16 May 2008 06:07:59 -0000
@@ -14,8 +14,11 @@
 AM_CFLAGS = @WIN32_CFLAGS@
 
 noinst_LTLIBRARIES      = libevas_file.la
+
 libevas_file_la_SOURCES  = \
 evas_path.c \
 evas_module.c
 libevas_file_la_LIBADD = @EVIL_LIBS@
 libevas_file_la_DEPENDENCIES = $(top_builddir)/config.h
+
+EXTRA_DIST = evas_path.h evas_module.h
Index: src/lib/file/evas_module.c
===================================================================
RCS file: /cvs/e/e17/libs/evas/src/lib/file/evas_module.c,v
retrieving revision 1.30
diff -u -r1.30 evas_module.c
--- src/lib/file/evas_module.c  14 Mar 2008 16:49:47 -0000      1.30
+++ src/lib/file/evas_module.c  16 May 2008 06:07:59 -0000
@@ -4,11 +4,27 @@
 # define _GNU_SOURCE
 #endif
 
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
 #include <dirent.h>    /* DIR, dirent */
 #include <dlfcn.h>     /* dlopen,dlclose,etc */
 
 #include <evas_common.h>
 #include <evas_private.h>
+
+
+/* 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.
+ * */
+typedef struct _Evas_Module_Path Evas_Module_Path;
+
+struct _Evas_Module_Path
+{
+   Evas_Module_Type    type;
+   char                       *path;
+};
+
 
 Evas_List *evas_modules = NULL;
 static Evas_List *evas_module_paths = NULL;
Index: src/lib/file/evas_path.c
===================================================================
RCS file: /cvs/e/e17/libs/evas/src/lib/file/evas_path.c,v
retrieving revision 1.14
diff -u -r1.14 evas_path.c
--- src/lib/file/evas_path.c    6 May 2007 11:29:37 -0000       1.14
+++ src/lib/file/evas_path.c    16 May 2008 06:07:59 -0000
@@ -6,18 +6,14 @@
 #ifndef _WIN32_WCE
 /* UNIX compatability functions */
 
-#include "evas_common.h"
-#include "evas_private.h"
-
-#include <limits.h>
-#include <unistd.h>
 #include <stdlib.h>
-#include <sys/param.h>
-#include <sys/types.h>
+#include <string.h>
+#include <dirent.h>
 #include <sys/stat.h>
-/* get the casefold feature! */
 #include <fnmatch.h>
-#include <dirent.h>
+
+#include "evas_common.h"
+#include "evas_private.h"
 
 int
 evas_file_path_is_full_path(const char *path)
Index: src/lib/imaging/evas_imaging.c
===================================================================
RCS file: /cvs/e/e17/libs/evas/src/lib/imaging/evas_imaging.c,v
retrieving revision 1.14
diff -u -r1.14 evas_imaging.c
--- src/lib/imaging/evas_imaging.c      12 Apr 2008 00:32:25 -0000      1.14
+++ src/lib/imaging/evas_imaging.c      16 May 2008 06:07:59 -0000
@@ -3,11 +3,23 @@
 #endif
 
 #ifdef BUILD_FONT_LOADER_EET
-#include <Eet.h>
+# include <Eet.h>
 #endif
 
 #include "evas_common.h"
-#include "evas_private.h"
+#include "../file/evas_path.h"
+
+
+struct _Evas_Imaging_Image
+{
+   RGBA_Image *image;
+};
+
+struct _Evas_Imaging_Font
+{
+   RGBA_Font *font;
+};
+
 
 EAPI Evas_Imaging_Image *
 evas_imaging_image_load(const char *file, const char *key)
Index: src/lib/include/evas_common.h
===================================================================
RCS file: /cvs/e/e17/libs/evas/src/lib/include/evas_common.h,v
retrieving revision 1.96
diff -u -r1.96 evas_common.h
--- src/lib/include/evas_common.h       6 May 2008 11:20:29 -0000       1.96
+++ src/lib/include/evas_common.h       16 May 2008 06:08:00 -0000
@@ -740,96 +740,6 @@
 };
 
 /****/
-struct _Evas_Cache_Image_Func
-{
-   Image_Entry *(*alloc)(void);
-   void         (*delete)(Image_Entry *im);
-
-   int          (*surface_alloc)(Image_Entry *im, int w, int h);
-   void         (*surface_delete)(Image_Entry *im);
-
-   /* The cache is doing the allocation and deallocation, you must just do the 
rest. */
-   int          (*constructor)(Image_Entry *im);
-   void         (*destructor)(Image_Entry *im);
-
-   void         (*dirty_region)(Image_Entry *im, int x, int y, int w, 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, int w, 
int h);
-
-   /* The destination surface does not have any surface. */
-   int          (*copied_data)(Image_Entry *dst, int w, int h, DATA32 
*image_data, int alpha, int cspace);
-   /* The destination surface does not have any surface. */
-   int          (*data)(Image_Entry *dst, int w, 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);
-   int          (*mem_size_get)(Image_Entry *im);
-   void         (*debug)(const char *context, Image_Entry *im);
-};
-
-struct _Evas_Cache_Image
-{
-   Evas_Cache_Image_Func         func;
-
-   Evas_Object_List             *dirty;
-
-   Evas_Object_List             *lru;
-   Evas_Object_List             *lru_nodata;
-   Evas_Hash                    *inactiv;
-   Evas_Hash                    *activ;
-
-   int                           usage;
-   int                           limit;
-   int                           references;
-};
-
-struct _Evas_Cache_Engine_Image_Func
-{
-   /* Must return a char* allocated with evas_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                 (*delete)(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, int x, int y, 
int w, 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;
-
-   Evas_Object_List*            dirty;
-
-   Evas_Hash*                   activ;
-   Evas_Hash*                   inactiv;
-   Evas_Object_List*            lru;
-
-   Evas_Cache_Image*            parent;
-   Evas_Cache_Engine_Image*     brother;
-
-   int                          usage;
-   int                          limit;
-
-   int                          references;
-};
 
 /*****************************************************************************/
 #include "evas_macros.h"
@@ -1277,48 +1187,8 @@
 void evas_stringshare_shutdown(void);
 
 /****/
-Evas_Cache_Image*               evas_cache_image_init(const 
Evas_Cache_Image_Func *cb);
-void                            evas_cache_image_shutdown(Evas_Cache_Image 
*cache);
-Image_Entry*                    evas_cache_image_request(Evas_Cache_Image 
*cache, const char *file, const char *key, RGBA_Image_Loadopts *lo, int *error);
-void                            evas_cache_image_drop(Image_Entry *im);
-void                            evas_cache_image_data_not_needed(Image_Entry 
*im);
-int                             evas_cache_image_flush(Evas_Cache_Image 
*cache);
-
-int                             evas_cache_image_usage_get(Evas_Cache_Image 
*cache);
-int                             evas_cache_image_get(Evas_Cache_Image *cache);
-void                            evas_cache_image_set(Evas_Cache_Image *cache, 
int size);
-
-Image_Entry*                    evas_cache_image_alone(Image_Entry *im);
-Image_Entry*                    evas_cache_image_dirty(Image_Entry *im, int x, 
int y, int w, int h);
-void                            evas_cache_image_load_data(Image_Entry *im);
-void                            evas_cache_image_surface_alloc(Image_Entry 
*im, int w, int h);
-Image_Entry*                    evas_cache_image_copied_data(Evas_Cache_Image 
*cache, int w, int h, DATA32 *image_data, int alpha, int cspace);
-Image_Entry*                    evas_cache_image_data(Evas_Cache_Image *cache, 
int w, int h, DATA32 *image_data, int alpha, int cspace);
-void                            evas_cache_image_colorspace(Image_Entry *im, 
int cspace);
-Image_Entry*                    evas_cache_image_empty(Evas_Cache_Image 
*cache);
-Image_Entry*                    evas_cache_image_size_set(Image_Entry *im, int 
w, int h);
-
-Evas_Cache_Engine_Image*        evas_cache_engine_image_init(const 
Evas_Cache_Engine_Image_Func *cb, Evas_Cache_Image *parent);
-void                            
evas_cache_engine_image_shutdown(Evas_Cache_Engine_Image *cache);
-
-void                            
evas_cache_engine_image_shutdown(Evas_Cache_Engine_Image *cache);
-int                             
evas_cache_engine_image_usage_get(Evas_Cache_Engine_Image *cache);
-int                             
evas_cache_engine_image_get(Evas_Cache_Engine_Image *cache);
-void                            
evas_cache_engine_image_set(Evas_Cache_Engine_Image *cache, int limit);
-
-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);
-void                            
evas_cache_engine_parent_not_needed(Engine_Image_Entry *eim);
-Engine_Image_Entry*             
evas_cache_engine_image_engine(Evas_Cache_Engine_Image *cache, void 
*engine_data);
-void                            
evas_cache_engine_image_drop(Engine_Image_Entry *eim);
-Engine_Image_Entry*             
evas_cache_engine_image_alone(Engine_Image_Entry *eim, void *data);
-Engine_Image_Entry*             
evas_cache_engine_image_dirty(Engine_Image_Entry *eim, int x, int y, int w, int 
h);
-Engine_Image_Entry*             
evas_cache_engine_image_copied_data(Evas_Cache_Engine_Image *cache, int w, int 
h, DATA32 *image_data, int alpha, int cspace, void *engine_data);
-Engine_Image_Entry*             
evas_cache_engine_image_data(Evas_Cache_Engine_Image *cache, int w, int h, 
DATA32 *image_data, int alpha, int cspace, void *engine_data);
-void                            
evas_cache_engine_image_colorspace(Engine_Image_Entry *eim, int cspace, void 
*engine_data);
-Engine_Image_Entry*             
evas_cache_engine_image_size_set(Engine_Image_Entry *eim, int w, int h);
 
-void                            
evas_cache_engine_image_load_data(Engine_Image_Entry *eim);
+#include "../cache/evas_cache.h"
 
 /*****************************************************************************/
 
Index: src/lib/include/evas_private.h
===================================================================
RCS file: /cvs/e/e17/libs/evas/src/lib/include/evas_private.h,v
retrieving revision 1.103
diff -u -r1.103 evas_private.h
--- src/lib/include/evas_private.h      16 May 2008 04:55:31 -0000      1.103
+++ src/lib/include/evas_private.h      16 May 2008 06:08:00 -0000
@@ -2,78 +2,11 @@
 #define EVAS_PRIVATE_H
 
 #ifndef _GNU_SOURCE
-#define _GNU_SOURCE
+# define _GNU_SOURCE
 #endif
 
 #include "Evas.h"
 
-/* the evas module api */
-/***********************/
-/* the module api version */
-#define EVAS_MODULE_API_VERSION 1
-
-/* the module types */
-typedef enum _Evas_Module_Type
-{
-   EVAS_MODULE_TYPE_ENGINE,
-   EVAS_MODULE_TYPE_IMAGE_LOADER,
-   EVAS_MODULE_TYPE_IMAGE_SAVER,
-     EVAS_MODULE_TYPE_OBJECT
-} Evas_Module_Type;
-
-/* the module api structure, all modules should define this struct */
-typedef struct _Evas_Module_Api Evas_Module_Api;
-struct _Evas_Module_Api
-{
-   int                 version;
-   Evas_Module_Type    type;
-   const char          *name;
-   const char          *author;
-};
-
-/* the module structure */
-typedef struct _Evas_Module Evas_Module;
-struct _Evas_Module
-{
-   Evas_Module_Api     *api;
-   void                        *handle;        /* the dlopen handle */
-   char                        *path;          /* the path where this modules 
is */
-   char                        *name;          /* the name of the dir where 
this module is */
-   struct
-     {
-       int (*open)(Evas_Module *);
-       void (*close)(Evas_Module *);
-     } func;
-   void                *functions;     /* this are the functions exported by 
the module */
-   void                *data;          /* some internal data for the module 
i.e the id for engines */
-
-   Evas_Module_Type    type;           /* the type detected by the path */
-
-   int           ref; /* how many refs */
-   int           last_used; /* the cycle count when it was last used */
-
-   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.
- * */
-typedef struct _Evas_Module_Path Evas_Module_Path;
-struct _Evas_Module_Path
-{
-   Evas_Module_Type    type;
-   char                       *path;
-};
-
-typedef struct _Evas_Module_Engine Evas_Module_Engine;
-struct _Evas_Module_Engine
-{
-   int                 id;
-};
-
-/* end of evas module api */
-/**************************/
 
 /* complain when peole pass in wrong object types etc. */
 #define MAGIC_DEBUG
@@ -104,6 +37,8 @@
 typedef struct _Evas_Callbacks              Evas_Callbacks;
 typedef struct _Evas_Format                 Evas_Format;
 
+#include "../file/evas_module.h"
+
 #define MAGIC_EVAS          0x70777770
 #define MAGIC_OBJ           0x71777770
 #define MAGIC_OBJ_RECTANGLE 0x71777771
@@ -713,14 +648,6 @@
 void evas_object_event_callback_call(Evas_Object *obj, Evas_Callback_Type 
type, void *event_info);
 int evas_event_passes_through(Evas_Object *obj);
 Evas_List *evas_event_objects_event_list(Evas *e, Evas_Object *stop, int x, 
int y);
-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);
-Evas_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);
 int evas_mem_free(int mem_required);
 int evas_mem_degrade(int mem_required);
 void evas_debug_error(void);
@@ -776,16 +703,6 @@
 
 extern int _evas_alloc_error;
 
-struct _Evas_Imaging_Image
-{
-   RGBA_Image *image;
-};
-
-struct _Evas_Imaging_Font
-{
-   RGBA_Font *font;
-};
-
 typedef struct _Evas_Mempool Evas_Mempool;
 
 struct _Evas_Mempool
@@ -800,24 +717,13 @@
 void  evas_mempool_free(Evas_Mempool *pool, void *ptr);
 void *evas_mempool_calloc(Evas_Mempool *pool, int size);
 
-void evas_module_paths_init(void);
-void evas_module_init(void);
-Evas_Module * evas_module_find_type(Evas_Module_Type type, const char *name);
-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);
-
 int evas_async_events_init(void);
 int evas_async_events_shutdown(void);
 
 void _evas_walk(Evas *e);
 void _evas_unwalk(Evas *e);
 
-EAPI int _evas_module_engine_inherit(Evas_Func *funcs, char *name);
+#include "../file/evas_path.h"
 
 #define EVAS_API_OVERRIDE(func, api, prefix) \
      (api)->func = prefix##func
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft 
Defy all challenges. Microsoft(R) Visual Studio 2008. 
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to