E CVS: libs/evas barbieri

2008-06-28 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : barbieri
Project : e17
Module  : libs/evas

Dir : e17/libs/evas/src/lib/engines/common


Modified Files:
evas_pipe.c 


Log Message:
Destroy pthread_attr when we do not need it anymore.

pthread manual says it is safe to destroy them after they are used
with pthread_create: "If the attributes specified by attr are modified
later, the thread’s attributes shall not be affected."



===
RCS file: /cvs/e/e17/libs/evas/src/lib/engines/common/evas_pipe.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -3 -r1.12 -r1.13
--- evas_pipe.c 31 May 2008 04:16:39 -  1.12
+++ evas_pipe.c 28 Jun 2008 15:29:57 -  1.13
@@ -141,6 +141,7 @@
 /* setup initial locks */
 pthread_create(&(thinfo[i].thread_id), &attr, 
evas_common_pipe_thread, &(thinfo[i]));
+pthread_attr_destroy(&attr);
  }
  }
y = 0;



-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php___
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs


E CVS: libs/evas barbieri

2008-06-03 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : barbieri
Project : e17
Module  : libs/evas

Dir : e17/libs/evas/src/lib


Modified Files:
Evas.h 


Log Message:
Add evas_object_event_callback_del_full()

This will check both function and data before removing the callback,
this is useful when you have lots of children monitoring parent, when
one child want to remove its monitoring function, others will remain.

Name is quite difficult to choose, I opted for "_full", but could be
"_with_data" or similar.

===
RCS file: /cvs/e/e17/libs/evas/src/lib/Evas.h,v
retrieving revision 1.125
retrieving revision 1.126
diff -u -3 -r1.125 -r1.126
--- Evas.h  26 May 2008 13:17:12 -  1.125
+++ Evas.h  3 Jun 2008 20:33:40 -   1.126
@@ -865,6 +865,7 @@
 
EAPI void  evas_object_event_callback_add(Evas_Object *obj, 
Evas_Callback_Type type, void (*func) (void *data, Evas *e, Evas_Object *obj, 
void *event_info), const void *data);
EAPI void *evas_object_event_callback_del(Evas_Object *obj, 
Evas_Callback_Type type, void (*func) (void *data, Evas *e, Evas_Object *obj, 
void *event_info));
+   EAPI void *evas_object_event_callback_del_full(Evas_Object 
*obj, Evas_Callback_Type type, void (*func) (void *data, Evas *e, Evas_Object 
*obj, void *event_info), const void *data);
 
EAPI int  evas_async_events_fd_get  (void);
EAPI int  evas_async_events_process (void);



-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs


E CVS: libs/evas barbieri

2008-06-03 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : barbieri
Project : e17
Module  : libs/evas

Dir : e17/libs/evas/src/lib/canvas


Modified Files:
evas_callbacks.c 


Log Message:
Add evas_object_event_callback_del_full()

This will check both function and data before removing the callback,
this is useful when you have lots of children monitoring parent, when
one child want to remove its monitoring function, others will remain.

Name is quite difficult to choose, I opted for "_full", but could be
"_with_data" or similar.

===
RCS file: /cvs/e/e17/libs/evas/src/lib/canvas/evas_callbacks.c,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -3 -r1.33 -r1.34
--- evas_callbacks.c26 Feb 2008 09:16:17 -  1.33
+++ evas_callbacks.c3 Jun 2008 20:33:40 -   1.34
@@ -406,3 +406,63 @@
  }
return NULL;
 }
+
+/**
+ * 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
+ * @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. If not successful 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_full(object, 
EVAS_CALLBACK_MOUSE_UP, up_callback, data);
+ * @endcode
+ * @ingroup Evas_Object_Callback_Group
+ */
+EAPI void *
+evas_object_event_callback_del_full(Evas_Object *obj, Evas_Callback_Type type, 
void (*func) (void *data, Evas *e, Evas_Object *obj, void *event_info), const 
void *data)
+{
+   /* MEM OK */
+   Evas_Object_List *l;
+
+   MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
+   return NULL;
+   MAGIC_CHECK_END();
+
+   if (!func) return NULL;
+
+   if (!obj->callbacks) return NULL;
+
+   for (l = obj->callbacks->callbacks; l; l = l->next)
+ {
+   Evas_Func_Node *fn;
+
+   fn = (Evas_Func_Node *)l;
+   if ((fn->func == func) && (fn->type == type) && (fn->data == data) && 
(!fn->delete_me))
+ {
+void *data;
+
+data = fn->data;
+fn->delete_me = 1;
+obj->callbacks->deletions_waiting = 1;
+if (!obj->callbacks->walking_list)
+  evas_object_event_callback_clear(obj);
+return data;
+ }
+ }
+   return NULL;
+}



-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs


E CVS: libs/evas barbieri

2008-05-28 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : barbieri
Project : e17
Module  : libs/evas

Dir : e17/libs/evas/src/modules/engines/software_16_sdl


Modified Files:
evas_engine.c 


Log Message:
Mark as dirty, fixes emotion usage.

===
RCS file: 
/cvs/e/e17/libs/evas/src/modules/engines/software_16_sdl/evas_engine.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- evas_engine.c   12 Apr 2008 02:11:07 -  1.1
+++ evas_engine.c   28 May 2008 19:27:41 -  1.2
@@ -1120,10 +1120,14 @@
 _sdl16_image_dirty_region(Engine_Image_Entry *eim, int x, int y, int w, int h)
 {
SDL_Engine_Image_Entry   *dst;
+   RGBA_Image *im;
 
dst = (SDL_Engine_Image_Entry *) eim;
 
SDL_UpdateRect(dst->surface, x, y, w, h);
+
+   im = (RGBA_Image *)eim->src;
+   im->flags |= RGBA_IMAGE_IS_DIRTY;
 }
 
 static int



-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs


E CVS: libs/evas barbieri

2008-05-28 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : barbieri
Project : e17
Module  : libs/evas

Dir : e17/libs/evas/src/modules/engines/software_sdl


Modified Files:
evas_engine.c 


Log Message:
Mark as dirty, fixes emotion usage.

===
RCS file: /cvs/e/e17/libs/evas/src/modules/engines/software_sdl/evas_engine.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -3 -r1.9 -r1.10
--- evas_engine.c   12 Apr 2008 00:32:28 -  1.9
+++ evas_engine.c   28 May 2008 19:27:41 -  1.10
@@ -284,10 +284,14 @@
 _sdl_image_dirty_region(Engine_Image_Entry *eim, int x, int y, int w, int h)
 {
SDL_Engine_Image_Entry   *dst;
+   RGBA_Image *im;
 
dst = (SDL_Engine_Image_Entry *) eim;
 
SDL_UpdateRect(dst->surface, x, y, w, h);
+
+   im = (RGBA_Image *)eim->src;
+   im->flags |= RGBA_IMAGE_IS_DIRTY;
 }
 
 static void



-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs


E CVS: libs/evas barbieri

2008-05-28 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : barbieri
Project : e17
Module  : libs/evas

Dir : e17/libs/evas/src/lib/canvas


Modified Files:
evas_object_main.c 


Log Message:
Fix typo!

===
RCS file: /cvs/e/e17/libs/evas/src/lib/canvas/evas_object_main.c,v
retrieving revision 1.68
retrieving revision 1.69
diff -u -3 -r1.68 -r1.69
--- evas_object_main.c  26 May 2008 13:24:24 -  1.68
+++ evas_object_main.c  28 May 2008 18:00:04 -  1.69
@@ -654,7 +654,7 @@
MAGIC_CHECK_END();
if (obj->delete_me)
  return;
-   if (obj->size_hints)
+   if (!obj->size_hints)
  obj->size_hints = calloc(1, sizeof(*obj->size_hints));
 
obj->size_hints->min.w = w;
@@ -712,7 +712,7 @@
MAGIC_CHECK_END();
if (obj->delete_me)
  return;
-   if (obj->size_hints)
+   if (!obj->size_hints)
  obj->size_hints = calloc(1, sizeof(*obj->size_hints));
 
obj->size_hints->max.w = w;
@@ -770,7 +770,8 @@
MAGIC_CHECK_END();
if (obj->delete_me)
  return;
-   if (obj->size_hints) obj->size_hints = calloc(1, sizeof(*obj->size_hints));
+   if (!obj->size_hints)
+ obj->size_hints = calloc(1, sizeof(*obj->size_hints));
 
obj->size_hints->request.w = w;
obj->size_hints->request.h = h;
@@ -832,7 +833,7 @@
MAGIC_CHECK_END();
if (obj->delete_me)
  return;
-   if (obj->size_hints)
+   if (!obj->size_hints)
  obj->size_hints = calloc(1, sizeof(*obj->size_hints));
 
obj->size_hints->aspect.mode = aspect;



-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs


E CVS: libs/evas barbieri

2008-05-20 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : barbieri
Project : e17
Module  : libs/evas

Dir : e17/libs/evas/src/lib/include


Modified Files:
evas_common.h 


Log Message:
Remove bugs with bitfield usage, make boolean usage clear.

This patch fixes the problem with bitfield of signed types (ie: char),
where the bit would be used for the signal, so 1 is considered -0 and
thus 0.

Move all the single bit fields to Evas_Bool, making it clear and also
avoiding these problems since Evas_Bool is unsigned char.


===
RCS file: /cvs/e/e17/libs/evas/src/lib/include/evas_common.h,v
retrieving revision 1.97
retrieving revision 1.98
diff -u -3 -r1.97 -r1.98
--- evas_common.h   19 May 2008 03:13:16 -  1.97
+++ evas_common.h   20 May 2008 20:56:39 -  1.98
@@ -283,12 +283,12 @@
 
   struct
   {
-unsigned int loaded : 1;
-unsigned int dirty  : 1;
-unsigned int activ  : 1;
-unsigned int need_data  : 1;
-unsigned int lru_nodata : 1;
-unsigned int cached : 1;
+Evas_Boolloaded : 1;
+Evas_Booldirty  : 1;
+Evas_Boolactiv  : 1;
+Evas_Boolneed_data  : 1;
+Evas_Boollru_nodata : 1;
+Evas_Boolcached : 1;
   } flags;
 
   intreferences;
@@ -320,11 +320,11 @@
 
struct
{
- unsigned intcached : 1;
- unsigned intactiv : 1;
- unsigned intdirty : 1;
- unsigned intloaded : 1;
- unsigned intneed_parent : 1;
+ Evas_Bool   cached : 1;
+ Evas_Bool   activ : 1;
+ Evas_Bool   dirty : 1;
+ Evas_Bool   loaded : 1;
+ Evas_Bool   need_parent : 1;
} flags;
 
int   references;
@@ -347,7 +347,7 @@
 struct _RGBA_Draw_Context
 {
struct {
-  char   use : 1;
+  Evas_Bool use : 1;
   DATA32 col;
} mul;
struct {
@@ -355,7 +355,7 @@
} col;
struct RGBA_Draw_Context_clip {
   intx, y, w, h;
-  char   use : 1;
+  Evas_Bool use : 1;
} clip;
Cutout_Rects cutout;
struct {
@@ -373,7 +373,7 @@
   int y, h;
} sli;
intrender_op;
-   unsigned char  anti_alias : 1;
+   Evas_Bool anti_alias : 1;
 };
 
 struct _RGBA_Pipe_Op
@@ -448,15 +448,15 @@
/* Colorspace stuff. */
struct {
   void  *data;
-  unsigned int   no_free : 1;
-  unsigned int   dirty : 1;
+  Evas_Bool  no_free : 1;
+  Evas_Bool  dirty : 1;
} cs;
 
/* RGBA stuff */
struct
{
   DATA32*data;
-  unsigned int   no_free : 1;
+  Evas_Bool  no_free : 1;
} image;
 };
 
@@ -483,7 +483,7 @@
float  angle;
intdirection;
float  offset;
-   unsigned char  has_alpha : 1;
+   Evas_Bool  has_alpha : 1;
  } map;
 
struct {
@@ -515,8 +515,8 @@
 
int references;
 
-   unsigned char imported_data : 1;
-   unsigned char has_alpha : 1;
+   Evas_Bool imported_data : 1;
+   Evas_Bool has_alpha : 1;
 };
 
 struct _RGBA_Gradient_Type
@@ -698,12 +698,12 @@
 
 struct _Tilebuf_Tile
 {
-   unsigned char redraw : 1;
+   Evas_Bool redraw : 1;
 /* FIXME: need these flags later - but not now */
 /*
-   int done   : 1;
-   int edge   : 1;
-   int from   : 1;
+   Evas_Bool done   : 1;
+   Evas_Bool edge   : 1;
+   Evas_Bool from   : 1;
 
struct {
   int dx, dy;



-
This SF.net email is sponsored by: Microsoft 
Defy all challenges. Microsoft(R) Visual Studio 2008. 
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs


E CVS: libs/evas barbieri

2008-05-13 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : barbieri
Project : e17
Module  : libs/evas

Dir : e17/libs/evas/src/modules/engines/directfb


Removed Files:
.cvsignore Evas_Engine_DirectFB.h Makefile.am 
evas_engine_dfb.c evas_engine_dfb.h 
evas_engine_dfb_image_objects.c 
evas_engine_dfb_image_objects.h 


Log Message:
Remove DirectFB, will add a new one based on SDL code.

Remove DirectFB, will create a new one based on SDL.




-
This SF.net email is sponsored by: Microsoft 
Defy all challenges. Microsoft(R) Visual Studio 2008. 
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs


E CVS: libs/evas barbieri

2008-04-30 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : barbieri
Project : e17
Module  : libs/evas

Dir : e17/libs/evas/src/lib


Modified Files:
Evas.h 


Log Message:
Fix users of evas_object_layer_set() outside the "short" range.

This also introduces EVAS_LAYER_MIN and EVAS_LAYER_MAX for ease of use.

===
RCS file: /cvs/e/e17/libs/evas/src/lib/Evas.h,v
retrieving revision 1.121
retrieving revision 1.122
diff -u -3 -r1.121 -r1.122
--- Evas.h  1 May 2008 06:18:21 -   1.121
+++ Evas.h  1 May 2008 06:39:26 -   1.122
@@ -202,6 +202,9 @@
} data;
 };
 
+#define EVAS_LAYER_MIN -32768 /**< bottom-most layer number */
+#define EVAS_LAYER_MAX 32767  /**< top-most layer number */
+
 #define EVAS_PIXEL_FORMAT_NONE 0 /**< No pixel format */
 #define EVAS_PIXEL_FORMAT_ARGB32   1 /**< ARGB 32bit pixel 
format with A in the high byte per 32bit pixel word */
 #define EVAS_PIXEL_FORMAT_YUV420P_601  2 /**< YUV 420 Planar 
format with CCIR 601 color encoding wuth contiguous planes in the order Y, U 
and V */



-
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
___
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs


E CVS: libs/evas barbieri

2008-04-30 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : barbieri
Project : e17
Module  : libs/evas

Dir : e17/libs/evas/src/lib


Modified Files:
Evas.h 


Log Message:
Make layer number a short and Save 8 bytes.

By having a layer as a short (16 bits) we can pack it together with
the bitfields, saving 4 bytes per sub-struct, 8 bytes in total, also
bringing the struct down from 4 to 3 cachelines on my laptop.

Rationale: layers are mostly used to differentiate groups of objects
and they stacking, usually we have few layers and we use very large or
very small numbers to make a layer be at the top or at the bottom, but
usually we don't need so many layers.

Caution: code that use values like 99 will break, so fix your
code! I'll provide another patch to fix all the CVS using these large
values.


===
RCS file: /cvs/e/e17/libs/evas/src/lib/Evas.h,v
retrieving revision 1.120
retrieving revision 1.121
diff -u -3 -r1.120 -r1.121
--- Evas.h  30 Apr 2008 23:58:42 -  1.120
+++ Evas.h  1 May 2008 06:18:21 -   1.121
@@ -704,8 +704,8 @@
 
EAPI const char   *evas_object_type_get  (const Evas_Object 
*obj);
 
-   EAPI void  evas_object_layer_set (Evas_Object *obj, 
int l);
-   EAPI int   evas_object_layer_get (const Evas_Object 
*obj);
+   EAPI void  evas_object_layer_set (Evas_Object *obj, 
short l);
+   EAPI short evas_object_layer_get (const Evas_Object 
*obj);
 
EAPI void  evas_object_raise (Evas_Object *obj);
EAPI void  evas_object_lower (Evas_Object *obj);



-
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
___
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs


E CVS: libs/evas barbieri

2008-04-30 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : barbieri
Project : e17
Module  : libs/evas

Dir : e17/libs/evas/src/lib/canvas


Modified Files:
evas_layer.c 


Log Message:
Make layer number a short and Save 8 bytes.

By having a layer as a short (16 bits) we can pack it together with
the bitfields, saving 4 bytes per sub-struct, 8 bytes in total, also
bringing the struct down from 4 to 3 cachelines on my laptop.

Rationale: layers are mostly used to differentiate groups of objects
and they stacking, usually we have few layers and we use very large or
very small numbers to make a layer be at the top or at the bottom, but
usually we don't need so many layers.

Caution: code that use values like 99 will break, so fix your
code! I'll provide another patch to fix all the CVS using these large
values.


===
RCS file: /cvs/e/e17/libs/evas/src/lib/canvas/evas_layer.c,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -3 -r1.20 -r1.21
--- evas_layer.c8 Feb 2008 22:35:19 -   1.20
+++ evas_layer.c1 May 2008 06:18:21 -   1.21
@@ -78,7 +78,7 @@
 }
 
 Evas_Layer *
-evas_layer_find(Evas *e, int layer_num)
+evas_layer_find(Evas *e, short layer_num)
 {
Evas_Object_List *list;
 
@@ -139,7 +139,7 @@
  * @ingroup Evas_Object_Layer_Group
  */
 EAPI void
-evas_object_layer_set(Evas_Object *obj, int l)
+evas_object_layer_set(Evas_Object *obj, short l)
 {
Evas *e;
 
@@ -187,7 +187,7 @@
  * @return  Number of the layer.
  * @ingroup Evas_Object_Layer_Group
  */
-EAPI int
+EAPI short
 evas_object_layer_get(const Evas_Object *obj)
 {
MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);



-
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
___
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs


E CVS: libs/evas barbieri

2008-04-30 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : barbieri
Project : e17
Module  : libs/evas

Dir : e17/libs/evas/src/lib/include


Modified Files:
evas_private.h 


Log Message:
Make layer number a short and Save 8 bytes.

By having a layer as a short (16 bits) we can pack it together with
the bitfields, saving 4 bytes per sub-struct, 8 bytes in total, also
bringing the struct down from 4 to 3 cachelines on my laptop.

Rationale: layers are mostly used to differentiate groups of objects
and they stacking, usually we have few layers and we use very large or
very small numbers to make a layer be at the top or at the bottom, but
usually we don't need so many layers.

Caution: code that use values like 99 will break, so fix your
code! I'll provide another patch to fix all the CVS using these large
values.


===
RCS file: /cvs/e/e17/libs/evas/src/lib/include/evas_private.h,v
retrieving revision 1.101
retrieving revision 1.102
diff -u -3 -r1.101 -r1.102
--- evas_private.h  1 May 2008 05:48:03 -   1.101
+++ evas_private.h  1 May 2008 06:18:21 -   1.102
@@ -361,7 +361,7 @@
 {
Evas_Object_List  _list_data;
 
-   int   layer;
+   short layer;
Evas_Object  *objects;
 
Evas *evas;
@@ -416,8 +416,8 @@
   struct {
 unsigned char  r, g, b, a;
   } color;
-  int   layer;
   Evas_Object  *clipper;
+  short layer;
   Evas_Bool visible : 1;
   Evas_Bool have_clipees : 1;
   Evas_Bool anti_alias : 1;
@@ -694,7 +694,7 @@
 Evas_Layer *evas_layer_new(Evas *e);
 void evas_layer_pre_free(Evas_Layer *lay);
 void evas_layer_free(Evas_Layer *lay);
-Evas_Layer *evas_layer_find(Evas *e, int layer_num);
+Evas_Layer *evas_layer_find(Evas *e, short layer_num);
 void evas_layer_add(Evas_Layer *lay);
 void evas_layer_del(Evas_Layer *lay);
 void evas_object_coords_recalc(Evas_Object *obj);



-
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
___
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs


E CVS: libs/evas barbieri

2008-04-30 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : barbieri
Project : e17
Module  : libs/evas

Dir : e17/libs/evas/src/lib/canvas


Modified Files:
evas_events.c evas_object_smart.c evas_object_text.c 
evas_render.c evas_stack.c 


Log Message:
Save 20 bytes moving smart data to its specific object struct.

This saves 20 bytes, bringing Evas_Object to 200 bytes, by moving data
specific to smart objects to their own struct (Evas_Object_Smart).

There is still one remaining member that could be removed:
smart.smart, this is used mainly to identify if one object is a smart
object or not. One possibility would be to add a bitfield to state
that, but another possibility is to check Evas_Object::object_data
and see if it's a smart or not.


===
RCS file: /cvs/e/e17/libs/evas/src/lib/canvas/evas_events.c,v
retrieving revision 1.58
retrieving revision 1.59
diff -u -3 -r1.58 -r1.59
--- evas_events.c   31 Mar 2008 21:38:38 -  1.58
+++ evas_events.c   1 May 2008 05:48:03 -   1.59
@@ -20,9 +20,9 @@
 }
 
 static Evas_List *
-_evas_event_object_list_in_get(Evas *e, Evas_List *in, Evas_Object_List *list, 
Evas_Object *stop, int x, int y, int *no_rep)
+_evas_event_object_list_in_get(Evas *e, Evas_List *in, const Evas_Object_List 
*list, Evas_Object *stop, int x, int y, int *no_rep)
 {
-   Evas_Object_List *l;
+   const Evas_Object_List *l;
 
if (!list) return in;
for (l = list->last; l; l = l->prev)
@@ -47,7 +47,7 @@
   
   norep = 0;
   in = _evas_event_object_list_in_get(e, in,
-  obj->smart.contained,
+  
evas_object_smart_members_get_direct(obj),
   stop, x, y, &norep);
   if (norep)
 {
===
RCS file: /cvs/e/e17/libs/evas/src/lib/canvas/evas_object_smart.c,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -3 -r1.30 -r1.31
--- evas_object_smart.c 8 Feb 2008 22:35:19 -   1.30
+++ evas_object_smart.c 1 May 2008 05:48:03 -   1.31
@@ -8,6 +8,11 @@
 {
DATA32magic;
void *engine_data;
+   void *data;
+   Evas_List*callbacks;
+   Evas_Object_List *contained;
+   int   walking_list;
+   Evas_Bool deletions_waiting : 1;
 };
 
 struct _Evas_Smart_Callback
@@ -78,7 +83,7 @@
MAGIC_CHECK(o, Evas_Object_Smart, MAGIC_OBJ_SMART);
return;
MAGIC_CHECK_END();
-   obj->smart.data = data;
+   o->data = data;
 }
 
 /**
@@ -101,7 +106,7 @@
MAGIC_CHECK(o, Evas_Object_Smart, MAGIC_OBJ_SMART);
return NULL;
MAGIC_CHECK_END();
-   return obj->smart.data;
+   return o->data;
 }
 
 /**
@@ -177,7 +182,7 @@
obj->cur.layer = obj->layer->layer;
obj->layer->usage++;
obj->smart.parent = smart_obj;
-   smart_obj->smart.contained = 
evas_object_list_append(smart_obj->smart.contained, obj);
+   o->contained = evas_object_list_append(o->contained, obj);
evas_object_smart_member_cache_invalidate(obj);
obj->restack = 1;
evas_object_change(obj);
@@ -197,12 +202,16 @@
 EAPI void
 evas_object_smart_member_del(Evas_Object *obj)
 {
+   Evas_Object_Smart *o;
+
MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
return;
MAGIC_CHECK_END();
 
if (!obj->smart.parent) return;
-   obj->smart.parent->smart.contained = 
evas_object_list_remove(obj->smart.parent->smart.contained, obj);
+
+   o = (Evas_Object_Smart *)(obj->smart.parent->object_data);
+   o->contained = evas_object_list_remove(o->contained, obj);
obj->smart.parent = NULL;
evas_object_smart_member_cache_invalidate(obj);
obj->layer->usage--;
@@ -237,20 +246,34 @@
 EAPI Evas_List *
 evas_object_smart_members_get(const Evas_Object *obj)
 {
+   Evas_Object_Smart *o;
Evas_List *members;
Evas_Object_List *member;

MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
return NULL;
MAGIC_CHECK_END();
-   
+   o = (Evas_Object_Smart *)(obj->object_data);
+   MAGIC_CHECK(o, Evas_Object_Smart, MAGIC_OBJ_SMART);
+   return NULL;
+   MAGIC_CHECK_END();
+
members = NULL;
-   for (member = obj->smart.contained; member; member = member->next)
+   for (member = o->contained; member; member = member->next)
   members = evas_list_append(members, member);

return members;
 }
 
+const Evas_Object_List *
+evas_object_smart_members_get_direct(const Evas_Object *obj)
+{
+   Evas_Object_Smart *o;
+
+   o = (Evas_Object_Smart *)(obj->object_data);
+   return o->contained;
+}
+
 /**
  * Instantiates a new smart object described by @p s.
  *
@@ -313,7 +336,7 @@
cb->event = evas_stringshare_add(event);
cb->func = func;
cb->func_data = (void *)data;
-   obj->smart.callbacks = evas_list_prepend(obj->smart.callba

E CVS: libs/evas barbieri

2008-04-30 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : barbieri
Project : e17
Module  : libs/evas

Dir : e17/libs/evas/src/lib/include


Modified Files:
evas_private.h 


Log Message:
Save 20 bytes moving smart data to its specific object struct.

This saves 20 bytes, bringing Evas_Object to 200 bytes, by moving data
specific to smart objects to their own struct (Evas_Object_Smart).

There is still one remaining member that could be removed:
smart.smart, this is used mainly to identify if one object is a smart
object or not. One possibility would be to add a bitfield to state
that, but another possibility is to check Evas_Object::object_data
and see if it's a smart or not.


===
RCS file: /cvs/e/e17/libs/evas/src/lib/include/evas_private.h,v
retrieving revision 1.100
retrieving revision 1.101
diff -u -3 -r1.100 -r1.101
--- evas_private.h  1 May 2008 04:14:08 -   1.100
+++ evas_private.h  1 May 2008 05:48:03 -   1.101
@@ -447,13 +447,8 @@
void *object_data;
 
struct {
-  int   walking_list;
   Evas_Smart   *smart;
-  void *data;
   Evas_Object  *parent;
-  Evas_Object_List *contained;
-  Evas_List*callbacks;
-  unsigned char deletions_waiting : 1;
} smart;
 
Evas_Size_Hints*size_hints;
@@ -738,6 +733,11 @@
 void evas_object_smart_unuse(Evas_Smart *s);
 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 Evas_Object_List *evas_object_smart_members_get_direct(const Evas_Object 
*obj);
 void *evas_mem_calloc(int size);
 void evas_object_event_callback_all_del(Evas_Object *obj);
 void evas_object_event_callback_cleanup(Evas_Object *obj);



-
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
___
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs


E CVS: libs/evas barbieri

2008-04-30 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : barbieri
Project : e17
Module  : libs/evas

Dir : e17/libs/evas/src/lib/include


Modified Files:
evas_private.h 


Log Message:
Use more specific types in Evas_Object.

===
RCS file: /cvs/e/e17/libs/evas/src/lib/include/evas_private.h,v
retrieving revision 1.97
retrieving revision 1.98
diff -u -3 -r1.97 -r1.98
--- evas_private.h  30 Apr 2008 23:58:43 -  1.97
+++ evas_private.h  1 May 2008 03:42:21 -   1.98
@@ -408,23 +408,23 @@
 struct {
intx, y, w, h;
unsigned char  r, g, b, a;
-   unsigned char  visible : 1;
-   unsigned char  dirty : 1;
+   Evas_Bool  visible : 1;
+   Evas_Bool  dirty : 1;
 } clip;
   } cache;
   Evas_Coord_Rectangle geometry;
   struct {
 unsigned char  r, g, b, a;
   } color;
-  unsigned char visible : 1;
-  unsigned char have_clipees : 1;
+  Evas_Bool visible : 1;
+  Evas_Bool have_clipees : 1;
   int   layer;
   Evas_Object  *clipper;
-  unsigned char anti_alias;
+  Evas_Bool anti_alias;
   struct {
  int color_space;
   } interpolation;
-  int   render_op;
+  Evas_Render_Oprender_op;
} cur, prev;
 
char   *name;
@@ -465,20 +465,20 @@
int mouse_grabbed;
Evas_Object_Pointer_Modepointer_mode;
 
-   unsigned short  store : 1;
-   unsigned short  pass_events : 1;
-   unsigned short  parent_pass_events : 1;
-   unsigned short  parent_cache_valid : 1;
-   unsigned short  repeat_events : 1;
-   unsigned short  restack : 1;
-   unsigned short  changed : 1;
-   unsigned short  mouse_in : 1;
-   unsigned short  pre_render_done : 1;
-   unsigned short  intercepted : 1;
-   unsigned short  focused : 1;
-   unsigned short  in_layer : 1;
-   unsigned short  no_propagate : 1;
-   unsigned short  precise_is_inside : 1;
+   Evas_Bool   store : 1;
+   Evas_Bool   pass_events : 1;
+   Evas_Bool   parent_pass_events : 1;
+   Evas_Bool   parent_cache_valid : 1;
+   Evas_Bool   repeat_events : 1;
+   Evas_Bool   restack : 1;
+   Evas_Bool   changed : 1;
+   Evas_Bool   mouse_in : 1;
+   Evas_Bool   pre_render_done : 1;
+   Evas_Bool   intercepted : 1;
+   Evas_Bool   focused : 1;
+   Evas_Bool   in_layer : 1;
+   Evas_Bool   no_propagate : 1;
+   Evas_Bool   precise_is_inside : 1;
 
unsigned char   delete_me;
 };



-
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
___
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs


E CVS: libs/evas barbieri

2008-04-30 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : barbieri
Project : e17
Module  : libs/evas

Dir : e17/libs/evas/src/lib/include


Modified Files:
evas_private.h 


Log Message:
Save 8 bytes from Evas_Object by packing interpolation.color_space.

Interpolation color_space (now ASHV or ARGB) was being used inside a
struct with 4 byte alignment. Remove it from the struct and make it a
bitfield so can be packed with the other fields. This saves 2
integers, so 8 bytes.


===
RCS file: /cvs/e/e17/libs/evas/src/lib/include/evas_private.h,v
retrieving revision 1.99
retrieving revision 1.100
diff -u -3 -r1.99 -r1.100
--- evas_private.h  1 May 2008 03:52:20 -   1.99
+++ evas_private.h  1 May 2008 04:14:08 -   1.100
@@ -418,12 +418,10 @@
   } color;
   int   layer;
   Evas_Object  *clipper;
-  struct {
- int color_space;
-  } interpolation;
   Evas_Bool visible : 1;
   Evas_Bool have_clipees : 1;
   Evas_Bool anti_alias : 1;
+  unsigned char interpolation_color_space : 1;
   Evas_Render_Oprender_op : 4;
} cur, prev;
 



-
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
___
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs


E CVS: libs/evas barbieri

2008-04-30 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : barbieri
Project : e17
Module  : libs/evas

Dir : e17/libs/evas/src/lib/canvas


Modified Files:
evas_object_gradient.c evas_object_main.c 


Log Message:
Save 8 bytes from Evas_Object by packing interpolation.color_space.

Interpolation color_space (now ASHV or ARGB) was being used inside a
struct with 4 byte alignment. Remove it from the struct and make it a
bitfield so can be packed with the other fields. This saves 2
integers, so 8 bytes.


===
RCS file: /cvs/e/e17/libs/evas/src/lib/canvas/evas_object_gradient.c,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -3 -r1.20 -r1.21
--- evas_object_gradient.c  8 Feb 2008 22:35:19 -   1.20
+++ evas_object_gradient.c  1 May 2008 04:14:08 -   1.21
@@ -785,7 +785,7 @@
obj->cur.geometry.h = 0;
obj->cur.layer = 0;
obj->cur.anti_alias = 1;
-   obj->cur.interpolation.color_space = EVAS_COLOR_SPACE_ARGB;
+   obj->cur.interpolation_color_space = EVAS_COLOR_SPACE_ARGB;
obj->cur.render_op = EVAS_RENDER_BLEND;
/* set up object-specific settings */
obj->prev = obj->cur;
@@ -933,7 +933,7 @@
(obj->cur.cache.clip.b != obj->prev.cache.clip.b) ||
(obj->cur.cache.clip.a != obj->prev.cache.clip.a)))
  { o->gradient_changed = 1;  o->changed = 1; }
-   if (!o->gradient_changed && (obj->cur.interpolation.color_space != 
obj->prev.interpolation.color_space))
+   if (!o->gradient_changed && (obj->cur.interpolation_color_space != 
obj->prev.interpolation_color_space))
  { o->gradient_changed = 1;  o->changed = 1; }
if (!o->changed && (obj->cur.render_op != obj->prev.render_op))
o->changed = 1;
@@ -973,7 +973,7 @@

obj->cur.cache.clip.b, obj->cur.cache.clip.a);

obj->layer->evas->engine.func->context_color_interpolation_set(obj->layer->evas->engine.data.output,

obj->layer->evas->engine.data.context,
-   
obj->cur.interpolation.color_space);
+   
obj->cur.interpolation_color_space);
if (o->gradient_changed)

obj->layer->evas->engine.func->gradient_render_pre(obj->layer->evas->engine.data.output,

obj->layer->evas->engine.data.context,
===
RCS file: /cvs/e/e17/libs/evas/src/lib/canvas/evas_object_main.c,v
retrieving revision 1.65
retrieving revision 1.66
diff -u -3 -r1.65 -r1.66
--- evas_object_main.c  30 Apr 2008 22:51:08 -  1.65
+++ evas_object_main.c  1 May 2008 04:14:08 -   1.66
@@ -1193,9 +1193,9 @@
return;
MAGIC_CHECK_END();
if (obj->delete_me) return;
-   if (obj->cur.interpolation.color_space == color_space)
+   if (obj->cur.interpolation_color_space == color_space)
return;
-   obj->cur.interpolation.color_space = color_space;
+   obj->cur.interpolation_color_space = color_space;
evas_object_change(obj);
 }
 
@@ -1213,7 +1213,7 @@
return 0;
MAGIC_CHECK_END();
if (obj->delete_me) return 0;
-   return obj->cur.interpolation.color_space;
+   return obj->cur.interpolation_color_space;
 }
 
 /**



-
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
___
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs


E CVS: libs/evas barbieri

2008-04-30 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : barbieri
Project : e17
Module  : libs/evas

Dir : e17/libs/evas/src/lib/include


Modified Files:
evas_private.h 


Log Message:
Reorganize Evas_Object to save 20 bytes.

This is a repack of bitfield members, was tested on GNU/Linux + GCC 4.1.2
and works fine. Needs further testing on other compilers.


===
RCS file: /cvs/e/e17/libs/evas/src/lib/include/evas_private.h,v
retrieving revision 1.98
retrieving revision 1.99
diff -u -3 -r1.98 -r1.99
--- evas_private.h  1 May 2008 03:42:21 -   1.98
+++ evas_private.h  1 May 2008 03:52:20 -   1.99
@@ -416,15 +416,15 @@
   struct {
 unsigned char  r, g, b, a;
   } color;
-  Evas_Bool visible : 1;
-  Evas_Bool have_clipees : 1;
   int   layer;
   Evas_Object  *clipper;
-  Evas_Bool anti_alias;
   struct {
  int color_space;
   } interpolation;
-  Evas_Render_Oprender_op;
+  Evas_Bool visible : 1;
+  Evas_Bool have_clipees : 1;
+  Evas_Bool anti_alias : 1;
+  Evas_Render_Oprender_op : 4;
} cur, prev;
 
char   *name;
@@ -463,7 +463,8 @@
int last_mouse_down_counter;
int last_mouse_up_counter;
int mouse_grabbed;
-   Evas_Object_Pointer_Modepointer_mode;
+
+   Evas_Object_Pointer_Modepointer_mode : 1;
 
Evas_Bool   store : 1;
Evas_Bool   pass_events : 1;



-
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
___
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs


E CVS: libs/evas barbieri

2008-04-30 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : barbieri
Project : e17
Module  : libs/evas

Dir : e17/libs/evas/src/lib/canvas


Modified Files:
evas_object_image.c 


Log Message:
Use Evas_Coord_Rectangle in evas_object_image.c

===
RCS file: /cvs/e/e17/libs/evas/src/lib/canvas/evas_object_image.c,v
retrieving revision 1.62
retrieving revision 1.63
diff -u -3 -r1.62 -r1.63
--- evas_object_image.c 12 Apr 2008 00:32:25 -  1.62
+++ evas_object_image.c 1 May 2008 00:09:39 -   1.63
@@ -12,9 +12,7 @@
DATA32magic;
 
struct {
-  struct {
-Evas_Coord  x, y, w, h;
-  } fill;
+  Evas_Coord_Rectangle fill;
   struct {
 short   w, h, stride;
   } image;



-
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
___
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs


E CVS: libs/evas barbieri

2008-04-30 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : barbieri
Project : e17
Module  : libs/evas

Dir : e17/libs/evas/src/lib


Modified Files:
Evas.h 


Log Message:
Cosmetic: add name to structs: Evas_Coord_Rectangle.

Non-intrusive change to name structs of Evas_Coord x, y, w, h.

TODO: intrusive changes to use this struct, will need to fix ".c"


===
RCS file: /cvs/e/e17/libs/evas/src/lib/Evas.h,v
retrieving revision 1.119
retrieving revision 1.120
diff -u -3 -r1.119 -r1.120
--- Evas.h  30 Apr 2008 22:13:50 -  1.119
+++ Evas.h  30 Apr 2008 23:58:42 -  1.120
@@ -86,6 +86,7 @@
 
 typedef struct _Evas_List Evas_List; /**< A generic linked list 
node handle */
 typedef struct _Evas_RectangleEvas_Rectangle; /**< A generic rectangle 
handle */
+typedef struct _Evas_Coord_Rectangle  Evas_Coord_Rectangle; /**< A generic 
rectangle handle */
 typedef struct _Evas_Smart_Class  Evas_Smart_Class; /**< A smart object 
base class */
 
 typedef struct _Evas_Hash Evas_Hash; /**< A Hash table handle */
@@ -117,6 +118,14 @@
int y; /**< top-left y co-ordinate of rectangle */
int w; /**< width of rectangle */
int h; /**< height of rectangle */
+};
+
+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 */
 };
 
 typedef enum _Evas_Aspect_Control



-
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
___
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs


E CVS: libs/evas barbieri

2008-04-30 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : barbieri
Project : e17
Module  : libs/evas

Dir : e17/libs/evas/src/lib/include


Modified Files:
evas_private.h 


Log Message:
Cosmetic: add name to structs: Evas_Coord_Rectangle.

Non-intrusive change to name structs of Evas_Coord x, y, w, h.

TODO: intrusive changes to use this struct, will need to fix ".c"


===
RCS file: /cvs/e/e17/libs/evas/src/lib/include/evas_private.h,v
retrieving revision 1.96
retrieving revision 1.97
diff -u -3 -r1.96 -r1.97
--- evas_private.h  30 Apr 2008 23:44:03 -  1.96
+++ evas_private.h  30 Apr 2008 23:58:43 -  1.97
@@ -412,9 +412,7 @@
unsigned char  dirty : 1;
 } clip;
   } cache;
-  struct {
-Evas_Coord x, y, w, h;
-  } geometry;
+  Evas_Coord_Rectangle geometry;
   struct {
 unsigned char  r, g, b, a;
   } color;



-
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
___
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs


E CVS: libs/evas barbieri

2008-04-30 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : barbieri
Project : e17
Module  : libs/evas

Dir : e17/libs/evas/src/lib/include


Modified Files:
evas_private.h 


Log Message:
Cosmetic: Visual alignment of member name.

===
RCS file: /cvs/e/e17/libs/evas/src/lib/include/evas_private.h,v
retrieving revision 1.95
retrieving revision 1.96
diff -u -3 -r1.95 -r1.96
--- evas_private.h  30 Apr 2008 22:51:08 -  1.95
+++ evas_private.h  30 Apr 2008 23:44:03 -  1.96
@@ -460,7 +460,7 @@
   unsigned char deletions_waiting : 1;
} smart;
 
-   Evas_Size_Hints *size_hints;
+   Evas_Size_Hints*size_hints;
 
int last_mouse_down_counter;
int last_mouse_up_counter;



-
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
___
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs


E CVS: libs/evas barbieri

2008-04-30 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : barbieri
Project : e17
Module  : libs/evas

Dir : e17/libs/evas/src/lib/canvas


Modified Files:
evas_object_main.c 


Log Message:
Save memory related to size hints.

Size hints are useful, but wasting 36 bytes for it on every object is a bit
too much: clippers and lots of other objects will have no need for it.

Now it's a pointer to a struct that will be allocated just when some value
is set, wasting 4/8 bytes more for the pointer when it is used, but saving
32/28 bytes when it is not.

This will also help to have alignment properties in future, that can come
as hints, without too much impact on memory consumption.


===
RCS file: /cvs/e/e17/libs/evas/src/lib/canvas/evas_object_main.c,v
retrieving revision 1.64
retrieving revision 1.65
diff -u -3 -r1.64 -r1.65
--- evas_object_main.c  11 Apr 2008 23:12:19 -  1.64
+++ evas_object_main.c  30 Apr 2008 22:51:08 -  1.65
@@ -67,6 +67,7 @@
free(node);
  }
obj->magic = 0;
+   if (obj->size_hints) free(obj->size_hints);
free(obj);
 }
 
@@ -697,13 +698,13 @@
if (w) *w = 0; if (h) *h = 0;
return;
MAGIC_CHECK_END();
-   if (obj->delete_me)
+   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;
+   if (w) *w = obj->size_hints->min.w;
+   if (h) *h = obj->size_hints->min.h;
 }
 
 /**
@@ -725,9 +726,11 @@
MAGIC_CHECK_END();
if (obj->delete_me)
  return;
+   if (obj->size_hints)
+ obj->size_hints = calloc(1, sizeof(*obj->size_hints));
 
-   obj->size_hints.min.w = w;
-   obj->size_hints.min.h = h;
+   obj->size_hints->min.w = w;
+   obj->size_hints->min.h = h;
 
evas_object_inform_call_changed_size_hints(obj);
 }
@@ -753,13 +756,13 @@
if (w) *w = 0; if (h) *h = 0;
return;
MAGIC_CHECK_END();
-   if (obj->delete_me)
+   if ((!obj->size_hints) || obj->delete_me)
  {
if (w) *w = 0; if (h) *h = 0;
return;
  }
-   if (w) *w = obj->size_hints.max.w;
-   if (h) *h = obj->size_hints.max.h;
+   if (w) *w = obj->size_hints->max.w;
+   if (h) *h = obj->size_hints->max.h;
 }
 
 /**
@@ -781,9 +784,11 @@
MAGIC_CHECK_END();
if (obj->delete_me)
  return;
+   if (obj->size_hints)
+ obj->size_hints = calloc(1, sizeof(*obj->size_hints));
 
-   obj->size_hints.max.w = w;
-   obj->size_hints.max.h = h;
+   obj->size_hints->max.w = w;
+   obj->size_hints->max.h = h;
 
evas_object_inform_call_changed_size_hints(obj);
 }
@@ -809,13 +814,13 @@
if (w) *w = 0; if (h) *h = 0;
return;
MAGIC_CHECK_END();
-   if (obj->delete_me)
+   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;
+   if (w) *w = obj->size_hints->request.w;
+   if (h) *h = obj->size_hints->request.h;
 }
 
 /**
@@ -837,9 +842,10 @@
MAGIC_CHECK_END();
if (obj->delete_me)
  return;
+   if (obj->size_hints) obj->size_hints = calloc(1, sizeof(*obj->size_hints));
 
-   obj->size_hints.request.w = w;
-   obj->size_hints.request.h = h;
+   obj->size_hints->request.w = w;
+   obj->size_hints->request.h = h;
 
evas_object_inform_call_changed_size_hints(obj);
 }
@@ -867,15 +873,15 @@
if (w) *w = 0; if (h) *h = 0;
return;
MAGIC_CHECK_END();
-   if (obj->delete_me)
+   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;
+   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;
 }
 
 /**
@@ -898,10 +904,12 @@
MAGIC_CHECK_END();
if (obj->delete_me)
  return;
+   if (obj->size_hints)
+ obj->size_hints = calloc(1, sizeof(*obj->size_hints));
 
-   obj->size_hints.aspect.mode = aspect;
-   obj->size_hints.aspect.size.w = w;
-   obj->size_hints.aspect.size.h = h;
+   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);
 }



-
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
___
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenme

E CVS: libs/evas barbieri

2008-04-30 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : barbieri
Project : e17
Module  : libs/evas

Dir : e17/libs/evas/src/lib/include


Modified Files:
evas_private.h 


Log Message:
Save memory related to size hints.

Size hints are useful, but wasting 36 bytes for it on every object is a bit
too much: clippers and lots of other objects will have no need for it.

Now it's a pointer to a struct that will be allocated just when some value
is set, wasting 4/8 bytes more for the pointer when it is used, but saving
32/28 bytes when it is not.

This will also help to have alignment properties in future, that can come
as hints, without too much impact on memory consumption.


===
RCS file: /cvs/e/e17/libs/evas/src/lib/include/evas_private.h,v
retrieving revision 1.94
retrieving revision 1.95
diff -u -3 -r1.94 -r1.95
--- evas_private.h  30 Apr 2008 22:13:50 -  1.94
+++ evas_private.h  30 Apr 2008 22:51:08 -  1.95
@@ -460,7 +460,7 @@
   unsigned char deletions_waiting : 1;
} smart;
 
-   Evas_Size_Hints  size_hints;
+   Evas_Size_Hints *size_hints;
 
int last_mouse_down_counter;
int last_mouse_up_counter;



-
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
___
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs


E CVS: libs/evas barbieri

2008-04-30 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : barbieri
Project : e17
Module  : libs/evas

Dir : e17/libs/evas/src/lib


Modified Files:
Evas.h 


Log Message:
Export missing size_hints methods.

===
RCS file: /cvs/e/e17/libs/evas/src/lib/Evas.h,v
retrieving revision 1.118
retrieving revision 1.119
diff -u -3 -r1.118 -r1.119
--- Evas.h  30 Apr 2008 12:21:31 -  1.118
+++ Evas.h  30 Apr 2008 22:13:50 -  1.119
@@ -119,6 +119,16 @@
int h; /**< height of rectangle */
 };
 
+typedef enum _Evas_Aspect_Control
+{
+   EVAS_ASPECT_CONTROL_NONE = 0,
+   EVAS_ASPECT_CONTROL_NEITHER = 1,
+   EVAS_ASPECT_CONTROL_HORIZONTAL = 2,
+   EVAS_ASPECT_CONTROL_VERTICAL = 3,
+   EVAS_ASPECT_CONTROL_BOTH = 4
+} Evas_Aspect_Control;
+
+
 #define EVAS_SMART_CLASS_VERSION 1 /** the version you have to put into the 
version field in the smart class struct */
 struct _Evas_Smart_Class /** a smart object class */
 {
@@ -707,6 +717,8 @@
EAPI void  evas_object_size_hint_max_set (Evas_Object *obj, 
Evas_Coord w, Evas_Coord h);
EAPI void  evas_object_size_hint_request_get (const Evas_Object 
*obj, Evas_Coord *w, Evas_Coord *h);
EAPI void  evas_object_size_hint_request_set (Evas_Object *obj, 
Evas_Coord w, Evas_Coord h);
+   EAPI void  evas_object_size_hint_aspect_get  (const Evas_Object 
*obj, Evas_Aspect_Control *aspect, Evas_Coord *w, Evas_Coord *h);
+   EAPI void  evas_object_size_hint_aspect_set  (Evas_Object *obj, 
Evas_Aspect_Control aspect, Evas_Coord w, Evas_Coord h);
 
EAPI void  evas_object_show  (Evas_Object *obj);
EAPI void  evas_object_hide  (Evas_Object *obj);



-
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
___
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs


E CVS: libs/evas barbieri

2008-04-30 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : barbieri
Project : e17
Module  : libs/evas

Dir : e17/libs/evas/src/lib/include


Modified Files:
evas_private.h 


Log Message:
Export missing size_hints methods.

===
RCS file: /cvs/e/e17/libs/evas/src/lib/include/evas_private.h,v
retrieving revision 1.93
retrieving revision 1.94
diff -u -3 -r1.93 -r1.94
--- evas_private.h  30 Apr 2008 12:21:31 -  1.93
+++ evas_private.h  30 Apr 2008 22:13:50 -  1.94
@@ -82,7 +82,6 @@
 
 typedef struct _Evas_Layer  Evas_Layer;
 typedef struct _Evas_Size   Evas_Size;
-typedef enum _Evas_Aspect_Control   Evas_Aspect_Control;
 typedef struct _Evas_Aspect Evas_Aspect;
 typedef struct _Evas_Size_Hints Evas_Size_Hints;
 typedef struct _Evas_Font_Dir   Evas_Font_Dir;
@@ -375,15 +374,6 @@
 struct _Evas_Size
 {
Evas_Coord w, h;
-};
-
-enum _Evas_Aspect_Control
-{
-   EVAS_ASPECT_CONTROL_NONE = 0,
-   EVAS_ASPECT_CONTROL_NEITHER = 1,
-   EVAS_ASPECT_CONTROL_HORIZONTAL = 2,
-   EVAS_ASPECT_CONTROL_VERTICAL = 3,
-   EVAS_ASPECT_CONTROL_BOTH = 4
 };
 
 struct _Evas_Aspect



-
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
___
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs


E CVS: libs/evas barbieri

2008-04-24 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : barbieri
Project : e17
Module  : libs/evas

Dir : e17/libs/evas/src/lib


Modified Files:
Evas.h 


Log Message:
Evas_Bool should be unsigned.

This will help the use of Evas_Bool to define bitfield structs like in:

struct s {
Evas_Bool a:1;
Evas_Bool b:1;
Evas_Bool c:1;
Evas_Bool d:1;
Evas_Bool e:1;
Evas_Bool f:1;
Evas_Bool g:1;
Evas_Bool h:1;
Evas_Bool i:1;
};

It must be unsigned or it would use the signal bit, having "a == 0" to
be true anyway, as it would be just +0 and -0.


===
RCS file: /cvs/e/e17/libs/evas/src/lib/Evas.h,v
retrieving revision 1.116
retrieving revision 1.117
diff -u -3 -r1.116 -r1.117
--- Evas.h  11 Apr 2008 23:12:19 -  1.116
+++ Evas.h  24 Apr 2008 15:31:57 -  1.117
@@ -98,10 +98,10 @@
 typedef struct _Evas_Native_Surface Evas_Native_Surface; /**< A generic 
datatype for engine specific native surface information */
 typedef unsigned long long Evas_Modifier_Mask; /**< An Evas modifier mask type 
*/
 
-typedef intEvas_Coord;
-typedef intEvas_Font_Size;
-typedef intEvas_Angle;
-typedef char   Evas_Bool;
+typedef int   Evas_Coord;
+typedef int   Evas_Font_Size;
+typedef int   Evas_Angle;
+typedef unsigned char Evas_Bool;
 
 struct _Evas_List /** A linked list node */
 {



-
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
___
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs


E CVS: libs/evas barbieri

2008-03-21 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : barbieri
Project : e17
Module  : libs/evas

Dir : e17/libs/evas/src/lib/include


Modified Files:
evas_private.h 


Log Message:
Minor reorganization of Evas_Object fields.

Move pointer_mode (size 4) before bitfields, leave 'delete_me' as it's
a byte, this still have 2 bits left from unsigned short and another
byte around delete_me to make it grom from 244 bytes.


===
RCS file: /cvs/e/e17/libs/evas/src/lib/include/evas_private.h,v
retrieving revision 1.90
retrieving revision 1.91
diff -u -3 -r1.90 -r1.91
--- evas_private.h  8 Feb 2008 20:57:30 -   1.90
+++ evas_private.h  21 Mar 2008 07:13:46 -  1.91
@@ -443,6 +443,7 @@
int last_mouse_down_counter;
int last_mouse_up_counter;
int mouse_grabbed;
+   Evas_Object_Pointer_Modepointer_mode;
 
unsigned short  store : 1;
unsigned short  pass_events : 1;
@@ -457,10 +458,7 @@
unsigned short  focused : 1;
unsigned short  in_layer : 1;
unsigned short  no_propagate : 1;
-
unsigned short  precise_is_inside : 1;
-
-   Evas_Object_Pointer_Modepointer_mode;
 
unsigned char   delete_me;
 };



-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs


E CVS: libs/evas barbieri

2008-03-05 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : barbieri
Project : e17
Module  : libs/evas

Dir : e17/libs/evas/src/lib/canvas


Modified Files:
evas_object_textblock.c 


Log Message:
Fix missing null terminator in textblock.

Although I used 3 lines comments to state it was not required, it is
required because none of the values accounted includes the '\0'.

===
RCS file: /cvs/e/e17/libs/evas/src/lib/canvas/evas_object_textblock.c,v
retrieving revision 1.148
retrieving revision 1.149
diff -u -3 -r1.148 -r1.149
--- evas_object_textblock.c 6 Mar 2008 00:41:47 -   1.148
+++ evas_object_textblock.c 6 Mar 2008 01:06:58 -   1.149
@@ -334,10 +334,7 @@
  pos = 0;
 
text_len = strlen(text);
-   /* ATTENTION: no + 1 is required for req_alloc as text will be
-* inserted before the end of the string.
-*/
-   req_alloc = *strbuf_len + text_len;
+   req_alloc = *strbuf_len + text_len + 1;
if (!_strbuf_grow_if_required(&strbuf, strbuf_alloc, req_alloc))
  return strbuf;
 



-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs


E CVS: libs/evas barbieri

2008-03-05 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : barbieri
Project : e17
Module  : libs/evas

Dir : e17/libs/evas/src/lib/canvas


Modified Files:
evas_object_textblock.c 


Log Message:
Cleanup textblock's strbuf implementation.

This should provide correct code in a simpler way by sharing some of
the common code among functions.

Tested with E17 basics, require some applications with extensive usage
of textblock manipulation to do validate results.

===
RCS file: /cvs/e/e17/libs/evas/src/lib/canvas/evas_object_textblock.c,v
retrieving revision 1.147
retrieving revision 1.148
diff -u -3 -r1.147 -r1.148
--- evas_object_textblock.c 5 Mar 2008 21:30:22 -   1.147
+++ evas_object_textblock.c 6 Mar 2008 00:41:47 -   1.148
@@ -245,132 +245,143 @@
return NULL;
 }
 
-static char *
-_strbuf_append(char *s, const char *s2, int *len, int *alloc)
+static inline int
+_strbuf_realloc(char **strbuf, int *strbuf_alloc, int req_alloc)
 {
-   int l2;
-   int tlen;
-   
-   if (!s2) return s;
-   if ((!s) && (s2[0] == 0))
- {
-   *len = 0;
-   *alloc = 1;
-   return strdup("");
- }
-   l2 = strlen(s2);
-   tlen = *len + l2 + 1;
-   if (tlen > *alloc)
+   char *newbuf;
+   int newbuf_alloc;
+
+   newbuf_alloc = ((req_alloc + 31) >> 5) << 5;
+   if (newbuf_alloc == *strbuf_alloc)
+ return 1;
+
+   newbuf = realloc(*strbuf, newbuf_alloc);
+   if (!newbuf)
  {
-   char *ts;
-   int talloc;
- 
-   talloc = ((tlen + 31) >> 5) << 5;
-   ts = realloc(s, talloc);
-   if (!ts) return s;
-   s = ts;
-   *alloc = talloc;
+   perror("realloc: could not allocate new strbuf");
+   return 0;
  }
-   strcpy(s + *len, s2);
-   *len += l2;
-   return s;
+
+   *strbuf = newbuf;
+   *strbuf_alloc = newbuf_alloc;
+   return 1;
+}
+
+static inline int
+_strbuf_grow_if_required(char **strbuf, int *strbuf_alloc, int req_alloc)
+{
+   if (req_alloc <= *strbuf_alloc)
+ return 1;
+
+   return _strbuf_realloc(strbuf, strbuf_alloc, req_alloc);
 }
 
 static char *
-_strbuf_append_n(char *s, char *s2, int n, int *len, int *alloc)
+_strbuf_append_int(char *strbuf, const char *text, int text_len, int 
*strbuf_len, int *strbuf_alloc)
 {
-   int l2;
-   int tlen;
-   
-   if (!s2) return s;
-   l2 = 0;
-   if (n < 1) return s;
-   else
- {
-   char *p;
-   for (p = s2; (l2 < n) && (*p != 0); p++, l2++);
- }
-   tlen = *len + l2 + 1;
-   if (tlen > *alloc)
- {
-   char *ts;
-   int talloc;
- 
-   talloc = ((tlen + 31) >> 5) << 5;
-   ts = realloc(s, talloc);
-   if (!ts) return s;
-   s = ts;
-   *alloc = talloc;
- }
-   strncpy(s + *len, s2, l2);
-   *len += l2;
-   s[*len] = 0;
-   return s;
+   int req_alloc;
+
+   req_alloc = *strbuf_len + text_len + 1;
+   if (!_strbuf_grow_if_required(&strbuf, strbuf_alloc, req_alloc))
+ return strbuf;
+
+   memcpy(strbuf + *strbuf_len, text, text_len);
+   *strbuf_len += text_len;
+   strbuf[*strbuf_len] = '\0';
+
+   return strbuf;
+}
+
+static inline char *
+_strbuf_append(char *strbuf, const char *text, int *strbuf_len, int 
*strbuf_alloc)
+{
+   int text_len;
+
+   if ((!text) || (text[0] == '\0'))
+ return strbuf;
+
+   text_len = strlen(text);
+   return _strbuf_append_int(strbuf, text, text_len, strbuf_len, strbuf_alloc);
+}
+
+static inline char *
+_strbuf_append_n(char *strbuf, const char *text, int max_text_len, int 
*strbuf_len, int *strbuf_alloc)
+{
+   const char *p;
+   int text_len;
+
+   if ((!text) || (max_text_len < 1) || (text[0] == '\0'))
+ return strbuf;
+
+   text_len = 0;
+   for (p = text; (text_len < max_text_len) && (*p != '\0'); p++)
+ text_len++;
+
+   return _strbuf_append_int(strbuf, text, text_len, strbuf_len, strbuf_alloc);
 }
 
 static char *
-_strbuf_insert(char *s, char *s2, int pos, int *len, int *alloc)
+_strbuf_insert(char *strbuf, const char *text, int pos, int *strbuf_len, int 
*strbuf_alloc)
 {
-   int l2;
-   int tlen;
-   char *tbuf;
-   
-   if (!s2) return s;
-   else if (pos < 0) pos = 0;
-   else if (pos > *len) pos = *len;
-   l2 = strlen(s2);
-   tlen = *len + l2 + 1;
-   if (tlen > *alloc)
- {
-   char *ts;
-   int talloc;
- 
-   talloc = ((tlen + 31) >> 5) << 5;
-   ts = realloc(s, talloc);
-   if (!ts) return s;
-   s = ts;
-   *alloc = talloc;
- }
-   tbuf = alloca(*len - pos);   
-   strncpy(tbuf, s + pos, *len - pos);
-   strncpy(s + pos, s2, l2);   
-   strncpy(s + pos + l2, tbuf, *len - pos);
-   *len += l2;
-   s[*len] = 0;
-   return s;
+   int req_alloc, text_len, tail_len;
+
+   if ((!text) || (text[0] == '\0'))
+ return strbuf;
+
+   if (pos >= *strbuf_len)
+ return _strbuf_append(strbuf, text, strbuf_len, strbuf_alloc);
+   else if (pos < 0)
+ pos = 0;
+
+   text_len = strlen(text);
+   /* ATTENTION: no + 1 is required for req_alloc as text will be
+* inse

E CVS: libs/evas barbieri

2008-03-05 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : barbieri
Project : e17
Module  : libs/evas

Dir : e17/libs/evas/src/lib/canvas


Modified Files:
evas_object_textblock.c 


Log Message:
Fix evas_object_textblock's strbuf implementation.

Code was not tracking the real size of the allocated memory and was
increasing the string size by one, so the '\0' was being accounted and
the string was being truncated visually.

Patch will remember the exact allocated size and just increment the
string size by the added string, not including it's null-byte
terminator.

This is based on Cedric's BAIL patch set 'evas_object_textblock more
character fix', but doing the minimum to fix the problem.

PS: this code will be rewritten to share some implementation in next commit.


===
RCS file: /cvs/e/e17/libs/evas/src/lib/canvas/evas_object_textblock.c,v
retrieving revision 1.146
retrieving revision 1.147
diff -u -3 -r1.146 -r1.147
--- evas_object_textblock.c 15 Feb 2008 14:45:31 -  1.146
+++ evas_object_textblock.c 5 Mar 2008 21:30:22 -   1.147
@@ -266,13 +266,13 @@
int talloc;
  
talloc = ((tlen + 31) >> 5) << 5;
-   ts = realloc(s, talloc + 1);
+   ts = realloc(s, talloc);
if (!ts) return s;
s = ts;
*alloc = talloc;
  }
strcpy(s + *len, s2);
-   *len = tlen;
+   *len += l2;
return s;
 }
 
@@ -290,21 +290,21 @@
char *p;
for (p = s2; (l2 < n) && (*p != 0); p++, l2++);
  }
-   tlen = *len + l2;
+   tlen = *len + l2 + 1;
if (tlen > *alloc)
  {
char *ts;
int talloc;
  
talloc = ((tlen + 31) >> 5) << 5;
-   ts = realloc(s, talloc + 1);
+   ts = realloc(s, talloc);
if (!ts) return s;
s = ts;
*alloc = talloc;
  }
strncpy(s + *len, s2, l2);
-   *len = tlen;
-   s[tlen] = 0;
+   *len += l2;
+   s[*len] = 0;
return s;
 }
 
@@ -319,14 +319,14 @@
else if (pos < 0) pos = 0;
else if (pos > *len) pos = *len;
l2 = strlen(s2);
-   tlen = *len + l2;
+   tlen = *len + l2 + 1;
if (tlen > *alloc)
  {
char *ts;
int talloc;
  
talloc = ((tlen + 31) >> 5) << 5;
-   ts = realloc(s, talloc + 1);
+   ts = realloc(s, talloc);
if (!ts) return s;
s = ts;
*alloc = talloc;
@@ -335,8 +335,8 @@
strncpy(tbuf, s + pos, *len - pos);
strncpy(s + pos, s2, l2);   
strncpy(s + pos + l2, tbuf, *len - pos);
-   *len = tlen;
-   s[tlen] = 0;
+   *len += l2;
+   s[*len] = 0;
return s;
 }
 
@@ -356,19 +356,20 @@
tbuf = alloca(*len - p2 + 1);
strcpy(tbuf, s + p2);
strcpy(s + p, tbuf);
-   tlen = *len - (p2 - p);
+   tlen = *len - (p2 - p) + 1;
if (tlen < ((*alloc >> 5) << 15))
  {
char *ts;
int talloc;
  
talloc = ((tlen + 31) >> 5) << 5;
-   ts = realloc(s, talloc + 1);
+   ts = realloc(s, talloc);
if (!ts) return s;
s = ts;
*alloc = talloc;
  }
-   *len = tlen;
+   *len += (p2 - p);
+   s[*len] = 0;
return s;
 }
 



-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs


E CVS: libs/evas barbieri

2008-02-24 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : barbieri
Project : e17
Module  : libs/evas

Dir : e17/libs/evas/src/modules/engines/directfb


Modified Files:
evas_engine_dfb.c evas_engine_dfb.h 


Log Message:
Try to get DirectFB working.

This is an initial cleanup, basically I removed all the DirectFB
accelerated calls and moved it to software common. I do plan to
gradually bring these back later, probably blit, rectangle and line
will come first.


===
RCS file: /cvs/e/e17/libs/evas/src/modules/engines/directfb/evas_engine_dfb.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -3 -r1.11 -r1.12
--- evas_engine_dfb.c   17 Jun 2007 02:56:57 -  1.11
+++ evas_engine_dfb.c   25 Feb 2008 06:13:53 -  1.12
@@ -2,123 +2,11 @@
 #include 
 #include 
 
-static Evas_Func evas_engine_directfb_func = {
-   evas_engine_directfb_info,
-   evas_engine_directfb_info_free,
-   evas_engine_directfb_setup,
-   evas_engine_directfb_output_free,
-   evas_engine_directfb_output_resize,
-   evas_engine_directfb_output_tile_size_set,
-   evas_engine_directfb_output_redraws_rect_add,
-   evas_engine_directfb_output_redraws_rect_del,
-   evas_engine_directfb_output_redraws_clear,
-   evas_engine_directfb_output_redraws_next_update_get,
-   evas_engine_directfb_output_redraws_next_update_push,
-   evas_engine_directfb_output_flush,
-   evas_engine_directfb_output_idle_flush,
-   /* draw context virtual methods */
-   evas_engine_directfb_context_new,
-   evas_engine_directfb_context_free,
-   evas_engine_directfb_context_clip_set,
-   evas_engine_directfb_context_clip_clip,
-   evas_engine_directfb_context_clip_unset,
-   evas_engine_directfb_context_clip_get,
-   evas_engine_directfb_context_color_set,
-   evas_engine_directfb_context_color_get,
-   evas_engine_directfb_context_multiplier_set,
-   evas_engine_directfb_context_multiplier_unset,
-   evas_engine_directfb_context_multiplier_get,
-   evas_engine_directfb_context_cutout_add,
-   evas_engine_directfb_context_cutout_clear,
-   evas_engine_directfb_context_anti_alias_set,
-   evas_engine_directfb_context_anti_alias_get,
-   evas_engine_directfb_context_color_interpolation_set,
-   evas_engine_directfb_context_color_interpolation_get,
-   evas_engine_directfb_context_render_op_set,
-   evas_engine_directfb_context_render_op_get,
-   /* rectangle draw funcs */
-   evas_engine_directfb_draw_rectangle,
-   /* line draw funcs */
-   evas_engine_directfb_line_draw,
-   /* poly draw funcs */
-   evas_engine_directfb_polygon_point_add,
-   evas_engine_directfb_polygon_points_clear,
-   evas_engine_directfb_polygon_draw,
-   /* gardient draw funcs */
-   evas_engine_directfb_gradient_new,
-   evas_engine_directfb_gradient_free,
-   evas_engine_directfb_gradient_color_stop_add,
-   evas_engine_directfb_gradient_alpha_stop_add,
-   evas_engine_directfb_gradient_color_data_set,
-   evas_engine_directfb_gradient_alpha_data_set,
-   evas_engine_directfb_gradient_clear,
-   evas_engine_directfb_gradient_fill_set,
-   evas_engine_directfb_gradient_fill_angle_set,
-   evas_engine_directfb_gradient_fill_spread_set,
-   evas_engine_directfb_gradient_angle_set,
-   evas_engine_directfb_gradient_offset_set,
-   evas_engine_directfb_gradient_direction_set,
-   evas_engine_directfb_gradient_type_set,
-   evas_engine_directfb_gradient_is_opaque,
-   evas_engine_directfb_gradient_is_visible,
-   evas_engine_directfb_gradient_render_pre,
-   evas_engine_directfb_gradient_render_post,
-   evas_engine_directfb_gradient_draw,
-   /* image draw funcs */
-   evas_engine_directfb_image_load,
-   evas_engine_directfb_image_new_from_data,
-   evas_engine_directfb_image_new_from_copied_data,
-   evas_engine_directfb_image_free,
-   evas_engine_directfb_image_size_get,
-   evas_engine_directfb_image_size_set,
-   evas_engine_directfb_image_dirty_region,
-   evas_engine_directfb_image_data_get,
-   evas_engine_directfb_image_data_put,
-   evas_engine_directfb_image_alpha_set,
-   evas_engine_directfb_image_alpha_get,
-   evas_engine_directfb_image_border_set,
-   evas_engine_directfb_image_border_get,
-   evas_engine_directfb_image_draw,
-   evas_engine_directfb_image_comment_get,
-   evas_engine_directfb_image_format_get,
-   evas_engine_directfb_image_colorspace_set,
-   evas_engine_directfb_image_colorspace_get,
-   evas_engine_directfb_image_native_set,
-   evas_engine_directfb_image_native_get,
-
-   evas_engine_directfb_image_cache_flush,
-   evas_engine_directfb_image_cache_set,
-   evas_engine_directfb_image_cache_get,
-   /* more to come */
-   evas_engine_directfb_font_load,
-   evas_engine_directfb_font_memory_load,
-   evas_engine_directfb_font_add,
-   evas_engine_directfb_font_memory_add,
-   evas_engine_directfb_font_free,
-   evas_engine_directfb_font_ascent_get,
-   evas_engine_directfb_font_descent_get,
-   evas_engine_directfb_font_max_ascent_get,
-   evas_engine_directfb_font_max_descent_get,
-   e

E CVS: libs/evas barbieri

2008-02-15 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : barbieri
Project : e17
Module  : libs/evas

Dir : e17/libs/evas/src/lib/canvas


Modified Files:
evas_object_textblock.c 


Log Message:
Add room for '\0' in textblock calculations.

In evas_object_textblock, the length forgot the '\0', this create a
buffer overrun.

Author: Cedric BAIL


===
RCS file: /cvs/e/e17/libs/evas/src/lib/canvas/evas_object_textblock.c,v
retrieving revision 1.145
retrieving revision 1.146
diff -u -3 -r1.145 -r1.146
--- evas_object_textblock.c 8 Feb 2008 22:35:19 -   1.145
+++ evas_object_textblock.c 15 Feb 2008 14:45:31 -  1.146
@@ -259,7 +259,7 @@
return strdup("");
  }
l2 = strlen(s2);
-   tlen = *len + l2;
+   tlen = *len + l2 + 1;
if (tlen > *alloc)
  {
char *ts;



-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs


E CVS: libs/evas barbieri

2008-02-15 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : barbieri
Project : e17
Module  : libs/evas

Dir : e17/libs/evas/src/lib/engines/common


Modified Files:
evas_font_main.c 


Log Message:
Patch by Cedric to really shutdown font system.

every thing is not really cleaned on shutdown (It make it crash, if
you shutdown completely the font system and then restart it again).

Author: Cedric BAIL


===
RCS file: /cvs/e/e17/libs/evas/src/lib/engines/common/evas_font_main.c,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -3 -r1.30 -r1.31
--- evas_font_main.c13 Sep 2007 14:24:15 -  1.30
+++ evas_font_main.c15 Feb 2008 14:43:51 -  1.31
@@ -25,7 +25,12 @@
 
initialised--;
if (initialised != 0) return;
+
+   evas_common_font_cache_set(0);
+   evas_common_font_flush();
+
error = FT_Done_FreeType(evas_ft_lib);
+   evas_ft_lib = 0;
 }
 
 EAPI int



-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs


E CVS: libs/evas barbieri

2008-02-08 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : barbieri
Project : e17
Module  : libs/evas

Dir : e17/libs/evas/src/lib/canvas


Modified Files:
evas_clip.c evas_data.c evas_events.c evas_focus.c evas_key.c 
evas_layer.c evas_name.c evas_object_gradient.c 
evas_object_image.c evas_object_line.c evas_object_main.c 
evas_object_smart.c evas_object_text.c evas_object_textblock.c 
evas_stack.c 


Log Message:
Add const to Evas api: objects and remaining bits.

===
RCS file: /cvs/e/e17/libs/evas/src/lib/canvas/evas_clip.c,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -3 -r1.29 -r1.30
--- evas_clip.c 22 Aug 2007 16:45:37 -  1.29
+++ evas_clip.c 8 Feb 2008 22:35:19 -   1.30
@@ -238,7 +238,7 @@
  * @ingroup Evas_Clip_Group
  */
 EAPI Evas_Object *
-evas_object_clip_get(Evas_Object *obj)
+evas_object_clip_get(const Evas_Object *obj)
 {
MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
return NULL;
@@ -354,7 +354,7 @@
  * @ingroup Evas_Clip_Group
  */
 EAPI const Evas_List *
-evas_object_clipees_get(Evas_Object *obj)
+evas_object_clipees_get(const Evas_Object *obj)
 {
MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
return NULL;
===
RCS file: /cvs/e/e17/libs/evas/src/lib/canvas/evas_data.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -3 -r1.10 -r1.11
--- evas_data.c 25 Sep 2007 13:26:23 -  1.10
+++ evas_data.c 8 Feb 2008 22:35:19 -   1.11
@@ -87,7 +87,7 @@
  * @ingroup Evas_Object_Data_Group
  */
 EAPI void *
-evas_object_data_get(Evas_Object *obj, const char *key)
+evas_object_data_get(const Evas_Object *obj, const char *key)
 {
Evas_List *l;
 
@@ -103,8 +103,10 @@
node = l->data;
if (!strcmp(node->key, key))
  {
-obj->data.elements = evas_list_remove_list(obj->data.elements, l);
-obj->data.elements = evas_list_prepend(obj->data.elements, node);
+Evas_List *lst;
+lst = obj->data.elements;
+lst = evas_list_promote_list(lst, l);
+((Evas_Object *)obj)->data.elements = lst;
 return node->data;
  }
  }
===
RCS file: /cvs/e/e17/libs/evas/src/lib/canvas/evas_events.c,v
retrieving revision 1.56
retrieving revision 1.57
diff -u -3 -r1.56 -r1.57
--- evas_events.c   8 Feb 2008 21:42:01 -   1.56
+++ evas_events.c   8 Feb 2008 22:35:19 -   1.57
@@ -207,7 +207,7 @@
  * @ingroup Evas_Event_Freezing_Group
  */
 EAPI int
-evas_event_freeze_get(Evas *e)
+evas_event_freeze_get(const Evas *e)
 {
MAGIC_CHECK(e, Evas, MAGIC_EVAS);
return 0;
@@ -1031,7 +1031,7 @@
  * @ingroup Evas_Object_Event_Flags_Group
  */
 EAPI Evas_Bool
-evas_object_pass_events_get(Evas_Object *obj)
+evas_object_pass_events_get(const Evas_Object *obj)
 {
MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
return 0;
@@ -1082,7 +1082,7 @@
  * @ingroup Evas_Object_Event_Flags_Group
  */
 EAPI Evas_Bool
-evas_object_repeat_events_get(Evas_Object *obj)
+evas_object_repeat_events_get(const Evas_Object *obj)
 {
MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
return 0;
@@ -1125,7 +1125,7 @@
  * @ingroup Evas_Object_Event_Flags_Group
  */
 EAPI Evas_Bool
-evas_object_propagate_events_get(Evas_Object *obj)
+evas_object_propagate_events_get(const Evas_Object *obj)
 {
MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
return 0;
===
RCS file: /cvs/e/e17/libs/evas/src/lib/canvas/evas_focus.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -3 -r1.8 -r1.9
--- evas_focus.c8 Feb 2008 21:42:01 -   1.8
+++ evas_focus.c8 Feb 2008 22:35:19 -   1.9
@@ -66,7 +66,7 @@
  * @return 1 if the object has the focus, 0 otherwise.
  */
 EAPI Evas_Bool
-evas_object_focus_get(Evas_Object *obj)
+evas_object_focus_get(const Evas_Object *obj)
 {
MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
return 0;
===
RCS file: /cvs/e/e17/libs/evas/src/lib/canvas/evas_key.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -3 -r1.12 -r1.13
--- evas_key.c  8 Feb 2008 21:42:01 -   1.12
+++ evas_key.c  8 Feb 2008 22:35:19 -   1.13
@@ -96,7 +96,7 @@
  * @return 1 if the @p keyname is on, 0 otherwise.
  */
 EAPI Evas_Bool
-evas_key_modifier_is_set(Evas_Modifier *m, const char *keyname)
+evas_key_modifier_is_set(const Evas_Modifier *m, const char *keyname)
 {
Evas_Modifier_Mask num;
int n;
@@ -127,7 +127,7 @@
  * @param 1 if the @p keyname kock is set, 0 otherwise.
  */
 EAPI Evas_Bool
-evas_key_lock_is_set(Evas_Lock *l, const char *keyname)
+evas_key_lock_is_set(const Evas_Lock *l, const char *keyname)
 {
Evas_Modifier_Mask num;
int n;
==

E CVS: libs/evas barbieri

2008-02-08 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : barbieri
Project : e17
Module  : libs/evas

Dir : e17/libs/evas/src/lib


Modified Files:
Evas.h 


Log Message:
Add const to Evas api: objects and remaining bits.

===
RCS file: /cvs/e/e17/libs/evas/src/lib/Evas.h,v
retrieving revision 1.112
retrieving revision 1.113
diff -u -3 -r1.112 -r1.113
--- Evas.h  8 Feb 2008 21:42:01 -   1.112
+++ Evas.h  8 Feb 2008 22:35:19 -   1.113
@@ -449,7 +449,7 @@
 /* line objects */
EAPI Evas_Object  *evas_object_line_add  (Evas *e);
EAPI void  evas_object_line_xy_set   (Evas_Object *obj, 
Evas_Coord x1, Evas_Coord y1, Evas_Coord x2, Evas_Coord y2);
-   EAPI void  evas_object_line_xy_get   (Evas_Object *obj, 
Evas_Coord *x1, Evas_Coord *y1, Evas_Coord *x2, Evas_Coord *y2);
+   EAPI void  evas_object_line_xy_get   (const Evas_Object 
*obj, Evas_Coord *x1, Evas_Coord *y1, Evas_Coord *x2, Evas_Coord *y2);
 
 /* gradient objects */
EAPI Evas_Object  *evas_object_gradient_add(Evas *e);
@@ -459,19 +459,19 @@
EAPI void  evas_object_gradient_alpha_data_set (Evas_Object 
*obj, void *alpha_data, int len);
EAPI void  evas_object_gradient_clear  (Evas_Object 
*obj);
EAPI void  evas_object_gradient_type_set   (Evas_Object 
*obj, const char *type, const char *instance_params);
-   EAPI void  evas_object_gradient_type_get (Evas_Object *obj, 
char **type, char **instance_params);
+   EAPI void  evas_object_gradient_type_get (const Evas_Object 
*obj, char **type, char **instance_params);
EAPI void  evas_object_gradient_fill_set (Evas_Object *obj, 
Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h);
-   EAPI void  evas_object_gradient_fill_get (Evas_Object *obj, 
Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h);
+   EAPI void  evas_object_gradient_fill_get (const Evas_Object 
*obj, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h);
EAPI void  evas_object_gradient_fill_angle_set(Evas_Object 
*obj, Evas_Angle angle);
-   EAPI Evas_Angleevas_object_gradient_fill_angle_get(Evas_Object 
*obj);
+   EAPI Evas_Angleevas_object_gradient_fill_angle_get(const 
Evas_Object *obj);
EAPI void  evas_object_gradient_fill_spread_set   (Evas_Object 
*obj, int tile_mode);
-   EAPI int   evas_object_gradient_fill_spread_get   (Evas_Object 
*obj);
+   EAPI int   evas_object_gradient_fill_spread_get   (const 
Evas_Object *obj);
EAPI void  evas_object_gradient_angle_set (Evas_Object 
*obj, Evas_Angle angle);
-   EAPI Evas_Angleevas_object_gradient_angle_get (Evas_Object 
*obj);
+   EAPI Evas_Angleevas_object_gradient_angle_get (const 
Evas_Object *obj);
EAPI void  evas_object_gradient_direction_set (Evas_Object 
*obj, int direction);
-   EAPI int   evas_object_gradient_direction_get (Evas_Object 
*obj);
+   EAPI int   evas_object_gradient_direction_get (const 
Evas_Object *obj);
EAPI void  evas_object_gradient_offset_set(Evas_Object 
*obj, float offset);
-   EAPI float evas_object_gradient_offset_get(Evas_Object 
*obj);
+   EAPI float evas_object_gradient_offset_get(const 
Evas_Object *obj);
 
 /* polygon objects */
EAPI Evas_Object  *evas_object_polygon_add   (Evas *e);
@@ -481,41 +481,41 @@
 /* image objects */
EAPI Evas_Object  *evas_object_image_add (Evas *e);
EAPI void  evas_object_image_file_set(Evas_Object *obj, 
const char *file, const char *key);
-   EAPI void  evas_object_image_file_get(Evas_Object *obj, 
const char **file, const char **key);
+   EAPI void  evas_object_image_file_get(const Evas_Object 
*obj, const char **file, const char **key);
EAPI void  evas_object_image_border_set  (Evas_Object *obj, 
int l, int r, int t, int b);
-   EAPI void  evas_object_image_border_get  (Evas_Object *obj, 
int *l, int *r, int *t, int *b);
+   EAPI void  evas_object_image_border_get  (const Evas_Object 
*obj, int *l, int *r, int *t, int *b);
EAPI void  evas_object_image_border_center_fill_set(Evas_Object 
*obj, Evas_Bool fill);
-   EAPI Evas_Bool evas_object_image_border_center_fill_get(Evas_Object 
*obj);
+   EAPI Evas_Bool evas_object_image_border_center_fill_get(const 
Evas_Object *obj);
EAPI void  evas_object_image_fill_set(Evas_Object *obj, 
Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h);
-   EAPI void  evas_object_image_fill_get(Evas_Object *obj, 
Evas_Co

E CVS: libs/evas barbieri

2008-02-08 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : barbieri
Project : e17
Module  : libs/evas

Dir : e17/libs/evas/src/lib/imaging


Modified Files:
evas_imaging.c 


Log Message:
Add const to Evas api: objects and remaining bits.

===
RCS file: /cvs/e/e17/libs/evas/src/lib/imaging/evas_imaging.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -3 -r1.11 -r1.12
--- evas_imaging.c  16 Jul 2007 07:25:33 -  1.11
+++ evas_imaging.c  8 Feb 2008 22:35:19 -   1.12
@@ -36,7 +36,7 @@
 }
 
 EAPI void
-evas_imaging_image_size_get(Evas_Imaging_Image *im, int *w, int *h)
+evas_imaging_image_size_get(const Evas_Imaging_Image *im, int *w, int *h)
 {
if (!im) return;
if (w) *w = im->image->image->w;
@@ -44,7 +44,7 @@
 }
 
 EAPI Evas_Bool
-evas_imaging_image_alpha_get(Evas_Imaging_Image *im)
+evas_imaging_image_alpha_get(const Evas_Imaging_Image *im)
 {
if (!im) return 0;
if (im->image->flags & RGBA_IMAGE_HAS_ALPHA) return 1;
@@ -143,61 +143,61 @@
 }
 
 EAPI int
-evas_imaging_font_ascent_get(Evas_Imaging_Font *fn)
+evas_imaging_font_ascent_get(const Evas_Imaging_Font *fn)
 {
return evas_common_font_ascent_get(fn->font);
 }
 
 EAPI int
-evas_imaging_font_descent_get(Evas_Imaging_Font *fn)
+evas_imaging_font_descent_get(const Evas_Imaging_Font *fn)
 {
return evas_common_font_descent_get(fn->font);
 }
 
 EAPI int
-evas_imaging_font_max_ascent_get(Evas_Imaging_Font *fn)
+evas_imaging_font_max_ascent_get(const Evas_Imaging_Font *fn)
 {
return evas_common_font_max_ascent_get(fn->font);
 }
 
 EAPI int
-evas_imaging_font_max_descent_get(Evas_Imaging_Font *fn)
+evas_imaging_font_max_descent_get(const Evas_Imaging_Font *fn)
 {
return evas_common_font_max_descent_get(fn->font);
 }
 
 EAPI int
-evas_imaging_font_line_advance_get(Evas_Imaging_Font *fn)
+evas_imaging_font_line_advance_get(const Evas_Imaging_Font *fn)
 {
return evas_common_font_get_line_advance(fn->font);
 }
 
 EAPI void
-evas_imaging_font_string_advance_get(Evas_Imaging_Font *fn, char *str, int *x, 
int *y)
+evas_imaging_font_string_advance_get(const Evas_Imaging_Font *fn, char *str, 
int *x, int *y)
 {
evas_common_font_query_advance(fn->font, str, x, y);
 }
 
 EAPI void
-evas_imaging_font_string_size_query(Evas_Imaging_Font *fn, char *str, int *w, 
int *h)
+evas_imaging_font_string_size_query(const Evas_Imaging_Font *fn, char *str, 
int *w, int *h)
 {
evas_common_font_query_size(fn->font, str, w, h);
 }
 
 EAPI int
-evas_imaging_font_string_inset_get(Evas_Imaging_Font *fn, char *str)
+evas_imaging_font_string_inset_get(const Evas_Imaging_Font *fn, char *str)
 {
return evas_common_font_query_inset(fn->font, str);
 }
 
 EAPI int
-evas_imaging_font_string_char_coords_get(Evas_Imaging_Font *fn, char *str, int 
pos, int *cx, int *cy, int *cw, int *ch)
+evas_imaging_font_string_char_coords_get(const Evas_Imaging_Font *fn, char 
*str, int pos, int *cx, int *cy, int *cw, int *ch)
 {
return evas_common_font_query_char_coords(fn->font, str, pos, cx, cy, cw, 
ch);
 }
 
 EAPI int
-evas_imaging_font_string_char_at_coords_get(Evas_Imaging_Font *fn, char *str, 
int x, int y, int *cx, int *cy, int *cw, int *ch)
+evas_imaging_font_string_char_at_coords_get(const Evas_Imaging_Font *fn, char 
*str, int x, int y, int *cx, int *cy, int *cw, int *ch)
 {
return evas_common_font_query_text_at_pos(fn->font, str, x, y, cx, cy, cw, 
ch);
 }



-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs


E CVS: libs/evas barbieri

2008-02-08 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : barbieri
Project : e17
Module  : libs/evas

Dir : e17/libs/evas/src/lib


Modified Files:
Evas.h 


Log Message:
Add const to Evas aoi (part 3), still lacks objects.

===
RCS file: /cvs/e/e17/libs/evas/src/lib/Evas.h,v
retrieving revision 1.111
retrieving revision 1.112
diff -u -3 -r1.111 -r1.112
--- Evas.h  8 Feb 2008 20:57:30 -   1.111
+++ Evas.h  8 Feb 2008 21:42:01 -   1.112
@@ -677,8 +677,8 @@
EAPI void  evas_object_stack_below   (Evas_Object *obj, 
Evas_Object *below);
EAPI Evas_Object  *evas_object_above_get (Evas_Object *obj);
EAPI Evas_Object  *evas_object_below_get (Evas_Object *obj);
-   EAPI Evas_Object  *evas_object_bottom_get(Evas *e);
-   EAPI Evas_Object  *evas_object_top_get   (Evas *e);
+   EAPI Evas_Object  *evas_object_bottom_get(const Evas *e);
+   EAPI Evas_Object  *evas_object_top_get   (const Evas *e);
 
EAPI void  evas_object_move  (Evas_Object *obj, 
Evas_Coord x, Evas_Coord y);
EAPI void  evas_object_resize(Evas_Object *obj, 
Evas_Coord w, Evas_Coord h);
@@ -711,24 +711,24 @@
 
EAPI void  evas_object_name_set  (Evas_Object *obj, 
const char *name);
EAPI const char   *evas_object_name_get  (Evas_Object *obj);
-   EAPI Evas_Object  *evas_object_name_find (Evas *e, const 
char *name);
+   EAPI Evas_Object  *evas_object_name_find (const Evas *e, 
const char *name);
 
EAPI Evas *evas_object_evas_get  (Evas_Object *obj);
 
-   EAPI Evas_Object  *evas_object_top_at_xy_get (Evas *e, 
Evas_Coord x, Evas_Coord y, Evas_Bool include_pass_events_objects, Evas_Bool 
include_hidden_objects);
-   EAPI Evas_Object  *evas_object_top_at_pointer_get(Evas *e);
-   EAPI Evas_Object  *evas_object_top_in_rectangle_get  (Evas *e, 
Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h, Evas_Bool 
include_pass_events_objects, Evas_Bool include_hidden_objects);
+   EAPI Evas_Object  *evas_object_top_at_xy_get (const Evas *e, 
Evas_Coord x, Evas_Coord y, Evas_Bool include_pass_events_objects, Evas_Bool 
include_hidden_objects);
+   EAPI Evas_Object  *evas_object_top_at_pointer_get(const Evas *e);
+   EAPI Evas_Object  *evas_object_top_in_rectangle_get  (const Evas *e, 
Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h, Evas_Bool 
include_pass_events_objects, Evas_Bool include_hidden_objects);
 
-   EAPI Evas_List*evas_objects_at_xy_get(Evas *e, 
Evas_Coord x, Evas_Coord y, Evas_Bool include_pass_events_objects, Evas_Bool 
include_hidden_objects);
-   EAPI Evas_List*evas_objects_in_rectangle_get (Evas *e, 
Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h, Evas_Bool 
include_pass_events_objects, Evas_Bool include_hidden_objects);
+   EAPI Evas_List*evas_objects_at_xy_get(const Evas *e, 
Evas_Coord x, Evas_Coord y, Evas_Bool include_pass_events_objects, Evas_Bool 
include_hidden_objects);
+   EAPI Evas_List*evas_objects_in_rectangle_get (const Evas *e, 
Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h, Evas_Bool 
include_pass_events_objects, Evas_Bool include_hidden_objects);
 
 /* smart objects */
EAPI Evas_Smart   *evas_smart_new(const char *name, 
void (*func_add) (Evas_Object *obj), void (*func_del) (Evas_Object *obj), void 
(*func_layer_set) (Evas_Object *obj, int l), void (*func_raise) (Evas_Object 
*obj), void (*func_lower) (Evas_Object *obj), void (*func_stack_above) 
(Evas_Object *obj, Evas_Object *above), void (*func_stack_below) (Evas_Object 
*obj, Evas_Object *below), void (*func_move) (Evas_Object *obj, Evas_Coord x, 
Evas_Coord y), void (*func_resize) (Evas_Object *obj, Evas_Coord w, Evas_Coord 
h), void (*func_show) (Evas_Object *obj), void (*func_hide) (Evas_Object *obj), 
void (*func_color_set) (Evas_Object *obj, int r, int g, int b, int a), void 
(*func_clip_set) (Evas_Object *obj, Evas_Object *clip), void (*func_clip_unset) 
(Evas_Object *obj), const void *data);
EAPI void  evas_smart_free   (Evas_Smart *s);
EAPI Evas_Smart   *evas_smart_class_new  (const 
Evas_Smart_Class *sc);
-   EAPI const Evas_Smart_Class *evas_smart_class_get(Evas_Smart *s);
+   EAPI const Evas_Smart_Class *evas_smart_class_get(const Evas_Smart 
*s);
 
-   EAPI void *evas_smart_data_get   (Evas_Smart *s);
+   EAPI void *evas_smart_data_get   (const Evas_Smart 
*s);
 
EAPI Evas_Object  *evas_object_smart_add (Evas *e, 
Evas_Smart *s);
EAPI void  evas_object_smart_member_add  (Evas_O

E CVS: libs/evas barbieri

2008-02-08 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : barbieri
Project : e17
Module  : libs/evas

Dir : e17/libs/evas/src/lib/canvas


Modified Files:
evas_events.c evas_focus.c evas_key.c evas_name.c 
evas_object_main.c evas_smart.c evas_stack.c 


Log Message:
Add const to Evas aoi (part 3), still lacks objects.

===
RCS file: /cvs/e/e17/libs/evas/src/lib/canvas/evas_events.c,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -3 -r1.55 -r1.56
--- evas_events.c   23 Jan 2008 09:00:59 -  1.55
+++ evas_events.c   8 Feb 2008 21:42:01 -   1.56
@@ -1165,7 +1165,7 @@
  * @return pointer behavior.
  */
 EAPI Evas_Object_Pointer_Mode
-evas_object_pointer_mode_get(Evas_Object *obj)
+evas_object_pointer_mode_get(const Evas_Object *obj)
 {
MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
return 0;
===
RCS file: /cvs/e/e17/libs/evas/src/lib/canvas/evas_focus.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -3 -r1.7 -r1.8
--- evas_focus.c4 Jun 2007 09:48:27 -   1.7
+++ evas_focus.c8 Feb 2008 21:42:01 -   1.8
@@ -89,7 +89,7 @@
  * @return The object that has focus or NULL is there is not one.
  */
 EAPI Evas_Object *
-evas_focus_get(Evas *e)
+evas_focus_get(const Evas *e)
 {
MAGIC_CHECK(e, Evas, MAGIC_EVAS);
return NULL;
===
RCS file: /cvs/e/e17/libs/evas/src/lib/canvas/evas_key.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -3 -r1.11 -r1.12
--- evas_key.c  4 Jun 2007 09:48:27 -   1.11
+++ evas_key.c  8 Feb 2008 21:42:01 -   1.12
@@ -3,11 +3,8 @@
 
 /* private calls */
 
-static int evas_key_modifier_number(Evas_Modifier *m, const char *keyname);
-static int evas_key_lock_number(Evas_Lock *l, const char *keyname);
-
 static int
-evas_key_modifier_number(Evas_Modifier *m, const char *keyname)
+evas_key_modifier_number(const Evas_Modifier *m, const char *keyname)
 {
int i;
 
@@ -19,7 +16,7 @@
 }
 
 static int
-evas_key_lock_number(Evas_Lock *l, const char *keyname)
+evas_key_lock_number(const Evas_Lock *l, const char *keyname)
 {
int i;
 
@@ -50,8 +47,8 @@
  * @return An Evas_Modifier handle to query the modifier subsystem with
  * evas_key_modifier_is_set_get, or NULL on error.
  */
-EAPI Evas_Modifier *
-evas_key_modifier_get(Evas *e)
+EAPI const Evas_Modifier *
+evas_key_modifier_get(const Evas *e)
 {
MAGIC_CHECK(e, Evas, MAGIC_EVAS);
return NULL;
@@ -74,8 +71,8 @@
  * @return An Evas_Lock handle to query the lock subsystem with
  * evas_key_lock_is_set_get, or NULL on error.
  */
-EAPI Evas_Lock *
-evas_key_lock_get(Evas *e)
+EAPI const Evas_Lock *
+evas_key_lock_get(const Evas *e)
 {
MAGIC_CHECK(e, Evas, MAGIC_EVAS);
return NULL;
@@ -405,7 +402,7 @@
  * @returns the bit mask or 0 if the @p keyname wasn't registered as a 
modifier.
  */
 EAPI Evas_Modifier_Mask
-evas_key_modifier_mask_get(Evas *e, const char *keyname)
+evas_key_modifier_mask_get(const Evas *e, const char *keyname)
 {
Evas_Modifier_Mask num;
int n;
===
RCS file: /cvs/e/e17/libs/evas/src/lib/canvas/evas_name.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -3 -r1.9 -r1.10
--- evas_name.c 6 Jan 2006 23:05:17 -   1.9
+++ evas_name.c 8 Feb 2008 21:42:01 -   1.10
@@ -57,7 +57,7 @@
  * @ingroup Evas_Object_Name_Group
  */
 EAPI Evas_Object *
-evas_object_name_find(Evas *e, const char *name)
+evas_object_name_find(const Evas *e, const char *name)
 {
MAGIC_CHECK(e, Evas, MAGIC_EVAS);
return NULL;
===
RCS file: /cvs/e/e17/libs/evas/src/lib/canvas/evas_object_main.c,v
retrieving revision 1.61
retrieving revision 1.62
diff -u -3 -r1.61 -r1.62
--- evas_object_main.c  5 Oct 2007 04:52:10 -   1.61
+++ evas_object_main.c  8 Feb 2008 21:42:01 -   1.62
@@ -1037,7 +1037,7 @@
  * @ingroup Evas_Object_Finders
  */
 EAPI Evas_Object *
-evas_object_top_at_xy_get(Evas *e, Evas_Coord x, Evas_Coord y, Evas_Bool 
include_pass_events_objects, Evas_Bool include_hidden_objects)
+evas_object_top_at_xy_get(const Evas *e, Evas_Coord x, Evas_Coord y, Evas_Bool 
include_pass_events_objects, Evas_Bool include_hidden_objects)
 {
Evas_Object_List *l;
int xx, yy;
@@ -1079,7 +1079,7 @@
  * @ingroup Evas_Object_Finders
  */
 EAPI Evas_Object *
-evas_object_top_at_pointer_get(Evas *e)
+evas_object_top_at_pointer_get(const Evas *e)
 {
    return evas_object_top_at_xy_get(e, e->pointer.canvas_x, 
e->pointer.canvas_y, 0, 0);
return evas_object_top_at_xy_get(e, e->pointer.x, e->pointer.y, 1, 1);
@@ -1092,7 +1092,7 @@
  * @ingroup Evas_Object_Finders
  */
 EAPI Evas_Object *
-evas_object_top_in_rectangle_get(Evas *e, Evas_Coord x, Evas_Coord y, 
Evas_Coord w

E CVS: libs/evas barbieri

2008-02-08 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : barbieri
Project : e17
Module  : libs/evas

Dir : e17/libs/evas/src/lib


Modified Files:
Evas.h 


Log Message:
Add const to Evas api (part 2), still lacks objects.

===
RCS file: /cvs/e/e17/libs/evas/src/lib/Evas.h,v
retrieving revision 1.110
retrieving revision 1.111
diff -u -3 -r1.110 -r1.111
--- Evas.h  8 Feb 2008 20:44:09 -   1.110
+++ Evas.h  8 Feb 2008 20:57:30 -   1.111
@@ -573,17 +573,17 @@
EAPI void  evas_font_path_clear  (Evas *e);
EAPI void  evas_font_path_append (Evas *e, const 
char *path);
EAPI void  evas_font_path_prepend(Evas *e, const 
char *path);
-   EAPI const Evas_List  *evas_font_path_list   (Evas *e);
+   EAPI const Evas_List  *evas_font_path_list   (const Evas *e);

EAPI void  evas_font_hinting_set (Evas *e, 
Evas_Font_Hinting_Flags hinting);
-   EAPI Evas_Font_Hinting_Flags evas_font_hinting_get   (Evas *e);
-   EAPI Evas_Bool evas_font_hinting_can_hint(Evas *e, 
Evas_Font_Hinting_Flags hinting);
+   EAPI Evas_Font_Hinting_Flags evas_font_hinting_get   (const Evas *e);
+   EAPI Evas_Bool evas_font_hinting_can_hint(const Evas *e, 
Evas_Font_Hinting_Flags hinting);
 
EAPI void  evas_font_cache_flush (Evas *e);
EAPI void  evas_font_cache_set   (Evas *e, int 
size);
-   EAPI int   evas_font_cache_get   (Evas *e);
+   EAPI int   evas_font_cache_get   (const Evas *e);
 
-   EAPI Evas_List   *evas_font_available_list  (Evas *e);
+   EAPI Evas_List   *evas_font_available_list  (const Evas *e);
EAPI void evas_font_available_list_free (Evas *e, Evas_List 
*available);

 /* textblock objects */



-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs


E CVS: libs/evas barbieri

2008-02-08 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : barbieri
Project : e17
Module  : libs/evas

Dir : e17/libs/evas/src/lib/canvas


Modified Files:
evas_font_dir.c evas_object_text.c 


Log Message:
Add const to Evas api (part 2), still lacks objects.

===
RCS file: /cvs/e/e17/libs/evas/src/lib/canvas/evas_font_dir.c,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -3 -r1.28 -r1.29
--- evas_font_dir.c 8 Feb 2008 19:55:02 -   1.28
+++ evas_font_dir.c 8 Feb 2008 20:57:30 -   1.29
@@ -366,7 +366,7 @@
 }
 
 Evas_List *
-evas_font_dir_available_list(Evas *evas)
+evas_font_dir_available_list(const Evas *evas)
 {
Evas_List *l;
Evas_List *ll;
===
RCS file: /cvs/e/e17/libs/evas/src/lib/canvas/evas_object_text.c,v
retrieving revision 1.66
retrieving revision 1.67
diff -u -3 -r1.66 -r1.67
--- evas_object_text.c  26 Aug 2007 11:06:34 -  1.66
+++ evas_object_text.c  8 Feb 2008 20:57:30 -   1.67
@@ -997,7 +997,7 @@
  * @ingroup Evas_Font_Path_Group
  */
 EAPI const Evas_List *
-evas_font_path_list(Evas *e)
+evas_font_path_list(const Evas *e)
 {
MAGIC_CHECK(e, Evas, MAGIC_EVAS);
return NULL;
@@ -1054,7 +1054,7 @@
 }
 
 EAPI Evas_Font_Hinting_Flags
-evas_font_hinting_get(Evas *e)
+evas_font_hinting_get(const Evas *e)
 {
MAGIC_CHECK(e, Evas, MAGIC_EVAS);
return EVAS_FONT_HINTING_BYTECODE;
@@ -1063,7 +1063,7 @@
 }
 
 EAPI Evas_Bool
-evas_font_hinting_can_hint(Evas *e, Evas_Font_Hinting_Flags hinting)
+evas_font_hinting_can_hint(const Evas *e, Evas_Font_Hinting_Flags hinting)
 {
MAGIC_CHECK(e, Evas, MAGIC_EVAS);
return 0;
@@ -1118,7 +1118,7 @@
  *
  */
 EAPI int
-evas_font_cache_get(Evas *e)
+evas_font_cache_get(const Evas *e)
 {
MAGIC_CHECK(e, Evas, MAGIC_EVAS);
return 0;
@@ -1134,7 +1134,7 @@
  *
  */
 EAPI Evas_List *
-evas_font_available_list(Evas *e)
+evas_font_available_list(const Evas *e)
 {
MAGIC_CHECK(e, Evas, MAGIC_EVAS);
return NULL;



-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs


E CVS: libs/evas barbieri

2008-02-08 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : barbieri
Project : e17
Module  : libs/evas

Dir : e17/libs/evas/src/lib/include


Modified Files:
evas_private.h 


Log Message:
Add const to Evas api (part 2), still lacks objects.

===
RCS file: /cvs/e/e17/libs/evas/src/lib/include/evas_private.h,v
retrieving revision 1.89
retrieving revision 1.90
diff -u -3 -r1.89 -r1.90
--- evas_private.h  8 Feb 2008 20:03:48 -   1.89
+++ evas_private.h  8 Feb 2008 20:57:30 -   1.90
@@ -746,7 +746,7 @@
 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);
-Evas_List *evas_font_dir_available_list(Evas* evas);
+Evas_List *evas_font_dir_available_list(const Evas* evas);
 void evas_font_dir_available_list_free(Evas_List *available);
 void evas_font_free(Evas *evas, void *font);
 void *evas_font_load(Evas *evas, const char *name, const char *source, int 
size);



-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs


E CVS: libs/evas barbieri

2008-02-08 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : barbieri
Project : e17
Module  : libs/evas

Dir : e17/libs/evas/src/lib/cache


Modified Files:
evas_cache_engine_image.c 


Log Message:
Missing const to callback parameter.

===
RCS file: /cvs/e/e17/libs/evas/src/lib/cache/evas_cache_engine_image.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -3 -r1.3 -r1.4
--- evas_cache_engine_image.c   14 Dec 2007 05:57:16 -  1.3
+++ evas_cache_engine_image.c   8 Feb 2008 20:54:18 -   1.4
@@ -52,7 +52,7 @@
 }
 
 static Evas_Bool
-_evas_cache_engine_image_free_cb(Evas_Hash *hash, const char *key, void *data, 
void *fdata)
+_evas_cache_engine_image_free_cb(const Evas_Hash *hash, const char *key, void 
*data, void *fdata)
 {
Evas_Cache_Engine_Image *cache = fdata;
RGBA_Engine_Image   *eim = data;



-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs


E CVS: libs/evas barbieri

2008-02-08 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : barbieri
Project : e17
Module  : libs/evas

Dir : e17/libs/evas/src/lib


Modified Files:
Evas.h 


Log Message:
Add const to Evas api, still lacks objects.

===
RCS file: /cvs/e/e17/libs/evas/src/lib/Evas.h,v
retrieving revision 1.109
retrieving revision 1.110
diff -u -3 -r1.109 -r1.110
--- Evas.h  8 Feb 2008 19:55:02 -   1.109
+++ Evas.h  8 Feb 2008 20:44:09 -   1.110
@@ -411,27 +411,27 @@
EAPI void  evas_render_method_list_free  (Evas_List *list);
 
EAPI void  evas_output_method_set(Evas *e, int 
render_method);
-   EAPI int   evas_output_method_get(Evas *e);
+   EAPI int   evas_output_method_get(const Evas *e);
 
-   EAPI Evas_Engine_Info *evas_engine_info_get  (Evas *e);
+   EAPI Evas_Engine_Info *evas_engine_info_get  (const Evas *e);
EAPI void  evas_engine_info_set  (Evas *e, 
Evas_Engine_Info *info);
 
EAPI void  evas_output_size_set  (Evas *e, int w, 
int h);
-   EAPI void  evas_output_size_get  (Evas *e, int *w, 
int *h);
+   EAPI void  evas_output_size_get  (const Evas *e, 
int *w, int *h);
EAPI void  evas_output_viewport_set  (Evas *e, 
Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h);
-   EAPI void  evas_output_viewport_get  (Evas *e, 
Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h);
+   EAPI void  evas_output_viewport_get  (const Evas *e, 
Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h);
 
-   EAPI Evas_Coordevas_coord_screen_x_to_world  (Evas *e, int x);
-   EAPI Evas_Coordevas_coord_screen_y_to_world  (Evas *e, int y);
-   EAPI int   evas_coord_world_x_to_screen  (Evas *e, 
Evas_Coord x);
-   EAPI int   evas_coord_world_y_to_screen  (Evas *e, 
Evas_Coord y);
-
-   EAPI void  evas_pointer_output_xy_get(Evas *e, int *x, 
int *y);
-   EAPI void  evas_pointer_canvas_xy_get(Evas *e, 
Evas_Coord *x, Evas_Coord *y);
-   EAPI int   evas_pointer_button_down_mask_get (Evas *e);
-   EAPI Evas_Bool evas_pointer_inside_get   (Evas *e);
+   EAPI Evas_Coordevas_coord_screen_x_to_world  (const Evas *e, 
int x);
+   EAPI Evas_Coordevas_coord_screen_y_to_world  (const Evas *e, 
int y);
+   EAPI int   evas_coord_world_x_to_screen  (const Evas *e, 
Evas_Coord x);
+   EAPI int   evas_coord_world_y_to_screen  (const Evas *e, 
Evas_Coord y);
+
+   EAPI void  evas_pointer_output_xy_get(const Evas *e, 
int *x, int *y);
+   EAPI void  evas_pointer_canvas_xy_get(const Evas *e, 
Evas_Coord *x, Evas_Coord *y);
+   EAPI int   evas_pointer_button_down_mask_get (const Evas *e);
+   EAPI Evas_Bool evas_pointer_inside_get   (const Evas *e);
EAPI void  evas_data_attach_set  (Evas *e, void 
*data);
-   EAPI void *evas_data_attach_get  (Evas *e);
+   EAPI void *evas_data_attach_get  (const Evas *e);

 /* DOC UP TO HERE */
EAPI void  evas_damage_rectangle_add (Evas *e, int x, 
int y, int w, int h);
@@ -521,7 +521,7 @@
EAPI void  evas_image_cache_flush(Evas *e);
EAPI void  evas_image_cache_reload   (Evas *e);
EAPI void  evas_image_cache_set  (Evas *e, int 
size);
-   EAPI int   evas_image_cache_get  (Evas *e);
+   EAPI int   evas_image_cache_get  (const Evas *e);
 
 /* text objects */
typedef enum _Evas_Text_Style_Type



-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs


E CVS: libs/evas barbieri

2008-02-08 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : barbieri
Project : e17
Module  : libs/evas

Dir : e17/libs/evas/src/lib/canvas


Modified Files:
evas_main.c evas_object_image.c 


Log Message:
Add const to Evas api, still lacks objects.

===
RCS file: /cvs/e/e17/libs/evas/src/lib/canvas/evas_main.c,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -3 -r1.40 -r1.41
--- evas_main.c 8 Oct 2007 19:06:27 -   1.40
+++ evas_main.c 8 Feb 2008 20:44:09 -   1.41
@@ -246,7 +246,7 @@
  * @ingroup Evas_Output_Method
  */
 EAPI int
-evas_output_method_get(Evas *e)
+evas_output_method_get(const Evas *e)
 {
MAGIC_CHECK(e, Evas, MAGIC_EVAS);
return RENDER_METHOD_INVALID;
@@ -269,7 +269,7 @@
  * @ingroup Evas_Output_Method
  */
 EAPI Evas_Engine_Info *
-evas_engine_info_get(Evas *e)
+evas_engine_info_get(const Evas *e)
 {
Evas_Engine_Info *info;
 
@@ -280,7 +280,7 @@
if (!e->engine.info) return NULL;
 
info = e->engine.info;
-   e->engine.info_magic = info->magic;
+   ((Evas *)e)->engine.info_magic = info->magic;
 
return info;
 }
@@ -370,7 +370,7 @@
  * @ingroup Evas_Output_Size
  */
 EAPI void
-evas_output_size_get(Evas *e, int *w, int *h)
+evas_output_size_get(const Evas *e, int *w, int *h)
 {
MAGIC_CHECK(e, Evas, MAGIC_EVAS);
if (w) *w = 0;
@@ -450,7 +450,7 @@
  * @endcode
  */
 EAPI void
-evas_output_viewport_get(Evas *e, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, 
Evas_Coord *h)
+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;
@@ -496,7 +496,7 @@
  * @endcode
  */
 EAPI Evas_Coord
-evas_coord_screen_x_to_world(Evas *e, int x)
+evas_coord_screen_x_to_world(const Evas *e, int x)
 {
MAGIC_CHECK(e, Evas, MAGIC_EVAS);
return 0;
@@ -528,7 +528,7 @@
  * @endcode
  */
 EAPI Evas_Coord
-evas_coord_screen_y_to_world(Evas *e, int y)
+evas_coord_screen_y_to_world(const Evas *e, int y)
 {
MAGIC_CHECK(e, Evas, MAGIC_EVAS);
return 0;
@@ -560,7 +560,7 @@
  * @endcode
  */
 EAPI int
-evas_coord_world_x_to_screen(Evas *e, Evas_Coord x)
+evas_coord_world_x_to_screen(const Evas *e, Evas_Coord x)
 {
MAGIC_CHECK(e, Evas, MAGIC_EVAS);
return 0;
@@ -592,7 +592,7 @@
  * @endcode
  */
 EAPI int
-evas_coord_world_y_to_screen(Evas *e, Evas_Coord y)
+evas_coord_world_y_to_screen(const Evas *e, Evas_Coord y)
 {
MAGIC_CHECK(e, Evas, MAGIC_EVAS);
return 0;
@@ -828,7 +828,7 @@
  * @endcode
  */
 EAPI void
-evas_pointer_output_xy_get(Evas *e, int *x, int *y)
+evas_pointer_output_xy_get(const Evas *e, int *x, int *y)
 {
MAGIC_CHECK(e, Evas, MAGIC_EVAS);
if (x) *x = 0;
@@ -862,7 +862,7 @@
  * @endcode
  */
 EAPI void
-evas_pointer_canvas_xy_get(Evas *e, Evas_Coord *x, Evas_Coord *y)
+evas_pointer_canvas_xy_get(const Evas *e, Evas_Coord *x, Evas_Coord *y)
 {
MAGIC_CHECK(e, Evas, MAGIC_EVAS);
if (x) *x = 0;
@@ -910,7 +910,7 @@
  * @endcode
  */
 EAPI int
-evas_pointer_button_down_mask_get(Evas *e)
+evas_pointer_button_down_mask_get(const Evas *e)
 {
MAGIC_CHECK(e, Evas, MAGIC_EVAS);
return 0;
@@ -946,7 +946,7 @@
  * @endcode
  */
 EAPI Evas_Bool
-evas_pointer_inside_get(Evas *e)
+evas_pointer_inside_get(const Evas *e)
 {
MAGIC_CHECK(e, Evas, MAGIC_EVAS);
return 0;
@@ -976,7 +976,7 @@
  * @return The pointer attached
  */
 EAPI void *
-evas_data_attach_get(Evas *e)
+evas_data_attach_get(const Evas *e)
 {
MAGIC_CHECK(e, Evas, MAGIC_EVAS);
return NULL;
===
RCS file: /cvs/e/e17/libs/evas/src/lib/canvas/evas_object_image.c,v
retrieving revision 1.59
retrieving revision 1.60
diff -u -3 -r1.59 -r1.60
--- evas_object_image.c 5 Oct 2007 19:37:21 -   1.59
+++ evas_object_image.c 8 Feb 2008 20:44:09 -   1.60
@@ -1633,7 +1633,7 @@
  *
  */
 EAPI int
-evas_image_cache_get(Evas *e)
+evas_image_cache_get(const Evas *e)
 {
MAGIC_CHECK(e, Evas, MAGIC_EVAS);
return 0;



-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs


E CVS: libs/evas barbieri

2008-02-08 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : barbieri
Project : e17
Module  : libs/evas

Dir : e17/libs/evas/src/modules/engines/xrender_x11


Modified Files:
evas_engine_font.c 


Log Message:
Partial fix to evas_hash_foreach() const change.

This fixes the prototype, however it still issues a warning about a
real bug: calling evas_hash_modify() during evas_hash_foreach()


===
RCS file: 
/cvs/e/e17/libs/evas/src/modules/engines/xrender_x11/evas_engine_font.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -3 -r1.2 -r1.3
--- evas_engine_font.c  30 Sep 2006 10:18:36 -  1.2
+++ evas_engine_font.c  8 Feb 2008 20:42:10 -   1.3
@@ -122,7 +122,7 @@
 }
 
 static Evas_Bool
-_xre_font_pool_cb(Evas_Hash *hash, const char *key, void *data, void *fdata)
+_xre_font_pool_cb(const Evas_Hash *hash, const char *key, void *data, void 
*fdata)
 {
Evas_Hash *pool;
XR_Font_Surface *fs;



-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs


E CVS: libs/evas barbieri

2008-02-08 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : barbieri
Project : e17
Module  : libs/evas

Dir : e17/libs/evas/src/modules/engines/xrender_xcb


Modified Files:
evas_engine_font.c 


Log Message:
Partial fix to evas_hash_foreach() const change.

This fixes the prototype, however it still issues a warning about a
real bug: calling evas_hash_modify() during evas_hash_foreach()


===
RCS file: 
/cvs/e/e17/libs/evas/src/modules/engines/xrender_xcb/evas_engine_font.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -3 -r1.4 -r1.5
--- evas_engine_font.c  10 Oct 2006 19:15:48 -  1.4
+++ evas_engine_font.c  8 Feb 2008 20:42:10 -   1.5
@@ -129,7 +129,7 @@
 }
 
 static Evas_Bool
-_xre_font_pool_cb(Evas_Hash *hash, const char *key, void *data, void *fdata)
+_xre_font_pool_cb(const Evas_Hash *hash, const char *key, void *data, void 
*fdata)
 {
char buf[256];
Evas_Hash   *pool;



-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs


E CVS: libs/evas barbieri

2008-02-08 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : barbieri
Project : e17
Module  : libs/evas

Dir : e17/libs/evas/src/lib/canvas


Modified Files:
evas_smart.c 


Log Message:
Add const to Evas_Smart_Class pointer.

The previous commit just removed the warning, but it was not the ideal
solution. The class is really a constant, nobody should change it
after it's assigned.

===
RCS file: /cvs/e/e17/libs/evas/src/lib/canvas/evas_smart.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -3 -r1.17 -r1.18
--- evas_smart.c8 Feb 2008 19:51:02 -   1.17
+++ evas_smart.c8 Feb 2008 20:03:48 -   1.18
@@ -58,6 +58,7 @@
   const void *data)
 {
Evas_Smart *s;
+   Evas_Smart_Class *sc;
 
printf("- WARNING. evas_smart_new() will be deprecated and removed 
soon\n"
  "- Please use evas_smart_class_new() instead\n");
@@ -71,23 +72,24 @@
 
s->class_allocated = 1;
 
-   s->smart_class = evas_mem_calloc(sizeof(Evas_Smart_Class));
-   if (!s->smart_class)
+   sc = evas_mem_calloc(sizeof(Evas_Smart_Class));
+   if (!sc)
  {
free(s);
return NULL;
  }
-   s->smart_class->name = name;
-   s->smart_class->add = func_add;
-   s->smart_class->del = func_del;
-   s->smart_class->move = func_move;
-   s->smart_class->resize = func_resize;
-   s->smart_class->show = func_show;
-   s->smart_class->hide = func_hide;
-   s->smart_class->color_set = func_color_set;
-   s->smart_class->clip_set = func_clip_set;
-   s->smart_class->clip_unset = func_clip_unset;
-   s->smart_class->data = (void *)data;
+   sc->name = name;
+   sc->add = func_add;
+   sc->del = func_del;
+   sc->move = func_move;
+   sc->resize = func_resize;
+   sc->show = func_show;
+   sc->hide = func_hide;
+   sc->color_set = func_color_set;
+   sc->clip_set = func_clip_set;
+   sc->clip_unset = func_clip_unset;
+   sc->data = (void *)data;
+   s->smart_class = sc;
 
return s;
 }
@@ -109,7 +111,7 @@
MAGIC_CHECK_END();
s->delete_me = 1;
if (s->usage > 0) return;
-   if (s->class_allocated) free(s->smart_class);
+   if (s->class_allocated) free((void *)s->smart_class);
free(s);
 }
 
@@ -134,7 +136,7 @@
 
s->magic = MAGIC_SMART;
 
-   s->smart_class = (Evas_Smart_Class *)sc;
+   s->smart_class = sc;
 
return s;
 }



-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs


E CVS: libs/evas barbieri

2008-02-08 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : barbieri
Project : e17
Module  : libs/evas

Dir : e17/libs/evas/src/lib/include


Modified Files:
evas_private.h 


Log Message:
Add const to Evas_Smart_Class pointer.

The previous commit just removed the warning, but it was not the ideal
solution. The class is really a constant, nobody should change it
after it's assigned.

===
RCS file: /cvs/e/e17/libs/evas/src/lib/include/evas_private.h,v
retrieving revision 1.88
retrieving revision 1.89
diff -u -3 -r1.88 -r1.89
--- evas_private.h  22 Aug 2007 16:45:37 -  1.88
+++ evas_private.h  8 Feb 2008 20:03:48 -   1.89
@@ -230,7 +230,7 @@
 
int   usage;
 
-   Evas_Smart_Class *smart_class;
+   const Evas_Smart_Class *smart_class;
 
unsigned char delete_me : 1;
unsigned char class_allocated : 1;



-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs


E CVS: libs/evas barbieri

2008-02-08 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : barbieri
Project : e17
Module  : libs/evas

Dir : e17/libs/evas/src/lib/data


Modified Files:
evas_hash.c 


Log Message:
Add const: evas_hash.c

As agreed on IRC, evas_hash_foreach() now takes const, to make clear
that hash shouldn't be changed. If one wants to change he must do a
cast and return 0.  However this will require users to be updated in
applications.


===
RCS file: /cvs/e/e17/libs/evas/src/lib/data/evas_hash.c,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -3 -r1.22 -r1.23
--- evas_hash.c 30 Sep 2007 19:32:48 -  1.22
+++ evas_hash.c 8 Feb 2008 19:55:02 -   1.23
@@ -266,7 +266,7 @@
  * @ingroup Evas_Hash_Data
  */
 EAPI void *
-evas_hash_find(Evas_Hash *hash, const char *key)
+evas_hash_find(const Evas_Hash *hash, const char *key)
 {
int hash_num;
Evas_Hash_El *el;
@@ -282,8 +282,12 @@
  {
 if (l != hash->buckets[hash_num])
   {
- hash->buckets[hash_num] = 
evas_object_list_remove(hash->buckets[hash_num], el);
- hash->buckets[hash_num] = 
evas_object_list_prepend(hash->buckets[hash_num], el);
+ Evas_Object_List *bucket;
+
+ bucket = hash->buckets[hash_num];
+ bucket = evas_object_list_remove(bucket, el);
+ bucket = evas_object_list_prepend(bucket, el);
+ ((Evas_Hash *)hash)->buckets[hash_num] = bucket;
   }
 return el->data;
  }
@@ -344,7 +348,7 @@
  * @ingroup Evas_Hash_General_Group
  */
 EAPI int
-evas_hash_size(Evas_Hash *hash)
+evas_hash_size(const Evas_Hash *hash)
 {
if (!hash) return 0;
return 256;
@@ -429,7 +433,7 @@
  * @ingroup Evas_Hash_General_Group
  */
 EAPI void
-evas_hash_foreach(Evas_Hash *hash, Evas_Bool (*func) (Evas_Hash *hash, const 
char *key, void *data, void *fdata), const void *fdata)
+evas_hash_foreach(const Evas_Hash *hash, Evas_Bool (*func) (const Evas_Hash 
*hash, const char *key, void *data, void *fdata), const void *fdata)
 {
int i, size;
 



-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs


E CVS: libs/evas barbieri

2008-02-08 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : barbieri
Project : e17
Module  : libs/evas

Dir : e17/libs/evas/src/lib/cache


Modified Files:
evas_cache_image.c 


Log Message:
Add const: evas_hash.c

As agreed on IRC, evas_hash_foreach() now takes const, to make clear
that hash shouldn't be changed. If one wants to change he must do a
cast and return 0.  However this will require users to be updated in
applications.


===
RCS file: /cvs/e/e17/libs/evas/src/lib/cache/evas_cache_image.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -3 -r1.11 -r1.12
--- evas_cache_image.c  11 Jan 2008 07:33:57 -  1.11
+++ evas_cache_image.c  8 Feb 2008 19:55:02 -   1.12
@@ -55,7 +55,7 @@
 }
 
 static Evas_Bool
-_evas_cache_image_free_cb(Evas_Hash *hash, const char *key, void *data, void 
*fdata)
+_evas_cache_image_free_cb(const Evas_Hash *hash, const char *key, void *data, 
void *fdata)
 {
Evas_Cache_Image*cache = fdata;
RGBA_Image  *im = data;



-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs


E CVS: libs/evas barbieri

2008-02-08 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : barbieri
Project : e17
Module  : libs/evas

Dir : e17/libs/evas/src/lib


Modified Files:
Evas.h 


Log Message:
Add const: evas_hash.c

As agreed on IRC, evas_hash_foreach() now takes const, to make clear
that hash shouldn't be changed. If one wants to change he must do a
cast and return 0.  However this will require users to be updated in
applications.


===
RCS file: /cvs/e/e17/libs/evas/src/lib/Evas.h,v
retrieving revision 1.108
retrieving revision 1.109
diff -u -3 -r1.108 -r1.109
--- Evas.h  8 Feb 2008 19:16:13 -   1.108
+++ Evas.h  8 Feb 2008 19:55:02 -   1.109
@@ -387,11 +387,11 @@
EAPI Evas_Hash*evas_hash_add (Evas_Hash *hash, 
const char *key, const void *data);
EAPI Evas_Hash*evas_hash_direct_add  (Evas_Hash *hash, 
const char *key, const void *data);
EAPI Evas_Hash*evas_hash_del (Evas_Hash *hash, 
const char *key, const void *data);
-   EAPI void *evas_hash_find(Evas_Hash *hash, 
const char *key);
+   EAPI void *evas_hash_find(const Evas_Hash 
*hash, const char *key);
EAPI void *evas_hash_modify  (Evas_Hash *hash, 
const char *key, const void *data);
-   EAPI int   evas_hash_size(Evas_Hash *hash);
+   EAPI int   evas_hash_size(const Evas_Hash 
*hash);
EAPI void  evas_hash_free(Evas_Hash *hash);
-   EAPI void  evas_hash_foreach (Evas_Hash *hash, 
Evas_Bool (*func) (Evas_Hash *hash, const char *key, void *data, void *fdata), 
const void *fdata);
+   EAPI void  evas_hash_foreach (const Evas_Hash 
*hash, Evas_Bool (*func) (const Evas_Hash *hash, const char *key, void *data, 
void *fdata), const void *fdata);
EAPI int   evas_hash_alloc_error (void);

EAPI const char   *evas_stringshare_add  (const char *str);



-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs


E CVS: libs/evas barbieri

2008-02-08 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : barbieri
Project : e17
Module  : libs/evas

Dir : e17/libs/evas/src/lib/canvas


Modified Files:
evas_font_dir.c 


Log Message:
Add const: evas_hash.c

As agreed on IRC, evas_hash_foreach() now takes const, to make clear
that hash shouldn't be changed. If one wants to change he must do a
cast and return 0.  However this will require users to be updated in
applications.


===
RCS file: /cvs/e/e17/libs/evas/src/lib/canvas/evas_font_dir.c,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -3 -r1.27 -r1.28
--- evas_font_dir.c 5 May 2007 10:30:11 -   1.27
+++ evas_font_dir.c 8 Feb 2008 19:55:02 -   1.28
@@ -24,7 +24,7 @@
 };
 
 /* private methods for font dir cache */
-static Evas_Bool font_cache_dir_free(Evas_Hash *hash, const char *key, void 
*data, void *fdata);
+static Evas_Bool font_cache_dir_free(const Evas_Hash *hash, const char *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);
@@ -439,7 +439,7 @@
 
 /* private stuff */
 static Evas_Bool
-font_cache_dir_free(Evas_Hash *hash, const char *key, void *data, void *fdata)
+font_cache_dir_free(const Evas_Hash *hash, const char *key, void *data, void 
*fdata)
 {
object_text_font_cache_dir_del((char *) key, data);
return 1;



-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs


E CVS: libs/evas barbieri

2008-02-08 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : barbieri
Project : e17
Module  : libs/evas

Dir : e17/libs/evas/src/lib/engines/common


Modified Files:
evas_font_load.c 


Log Message:
Add const: evas_hash.c

As agreed on IRC, evas_hash_foreach() now takes const, to make clear
that hash shouldn't be changed. If one wants to change he must do a
cast and return 0.  However this will require users to be updated in
applications.


===
RCS file: /cvs/e/e17/libs/evas/src/lib/engines/common/evas_font_load.c,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -3 -r1.41 -r1.42
--- evas_font_load.c5 May 2007 10:30:11 -   1.41
+++ evas_font_load.c8 Feb 2008 19:55:03 -   1.42
@@ -11,8 +11,8 @@
 static Evas_Object_List * fonts_src = NULL;
 static Evas_Object_List * fonts = NULL;
 
-static Evas_Bool font_modify_cache_cb(Evas_Hash *hash, const char *key, void 
*data, void *fdata);
-static Evas_Bool font_flush_free_glyph_cb(Evas_Hash *hash, const char *key, 
void *data, void *fdata);
+static Evas_Bool font_modify_cache_cb(const Evas_Hash *hash, const char *key, 
void *data, void *fdata);
+static Evas_Bool font_flush_free_glyph_cb(const Evas_Hash *hash, const char 
*key, void *data, void *fdata);
 
 EAPI RGBA_Font_Source *
 evas_common_font_source_memory_load(const char *name, const void *data, int 
data_size)
@@ -476,7 +476,7 @@
 }
 
 static Evas_Bool
-font_modify_cache_cb(Evas_Hash *hash, const char *key, void *data, void *fdata)
+font_modify_cache_cb(const Evas_Hash *hash, const char *key, void *data, void 
*fdata)
 {
int *dir;
RGBA_Font_Glyph *fg;
@@ -527,7 +527,7 @@
 }
 
 static Evas_Bool
-font_flush_free_glyph_cb(Evas_Hash *hash, const char *key, void *data, void 
*fdata)
+font_flush_free_glyph_cb(const Evas_Hash *hash, const char *key, void *data, 
void *fdata)
 {
RGBA_Font_Glyph *fg;
 



-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs


E CVS: libs/evas barbieri

2008-02-08 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : barbieri
Project : e17
Module  : libs/evas

Dir : e17/libs/evas/src/lib/canvas


Modified Files:
evas_smart.c 


Log Message:
Add missing cast.

===
RCS file: /cvs/e/e17/libs/evas/src/lib/canvas/evas_smart.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -3 -r1.16 -r1.17
--- evas_smart.c13 Aug 2007 05:17:44 -  1.16
+++ evas_smart.c8 Feb 2008 19:51:02 -   1.17
@@ -134,7 +134,7 @@
 
s->magic = MAGIC_SMART;
 
-   s->smart_class = sc;
+   s->smart_class = (Evas_Smart_Class *)sc;
 
return s;
 }



-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs


E CVS: libs/evas barbieri

2008-02-08 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : barbieri
Project : e17
Module  : libs/evas

Dir : e17/libs/evas/src/lib


Modified Files:
Evas.h 


Log Message:
Add const: evas_list.c

===
RCS file: /cvs/e/e17/libs/evas/src/lib/Evas.h,v
retrieving revision 1.107
retrieving revision 1.108
diff -u -3 -r1.107 -r1.108
--- Evas.h  8 Feb 2008 18:42:42 -   1.107
+++ Evas.h  8 Feb 2008 19:16:13 -   1.108
@@ -364,16 +364,16 @@
EAPI Evas_List*evas_list_remove  (Evas_List *list, 
const void *data);
EAPI Evas_List*evas_list_remove_list (Evas_List *list, 
Evas_List *remove_list);
EAPI Evas_List*evas_list_promote_list(Evas_List *list, 
Evas_List *move_list);
-   EAPI void *evas_list_find(Evas_List *list, 
const void *data);
-   EAPI Evas_List*evas_list_find_list   (Evas_List *list, 
const void *data);
+   EAPI void *evas_list_find(const Evas_List 
*list, const void *data);
+   EAPI Evas_List*evas_list_find_list   (const Evas_List 
*list, const void *data);
EAPI Evas_List*evas_list_free(Evas_List *list);
-   EAPI Evas_List*evas_list_last(Evas_List *list);
-   EAPI Evas_List*evas_list_next(Evas_List *list);
-   EAPI Evas_List*evas_list_prev(Evas_List *list);
-   EAPI void *evas_list_data(Evas_List *list);
-   EAPI int   evas_list_count   (Evas_List *list);
-   EAPI void *evas_list_nth (Evas_List *list, 
int n);
-   EAPI Evas_List*evas_list_nth_list(Evas_List *list, 
int n);
+   EAPI Evas_List*evas_list_last(const Evas_List 
*list);
+   EAPI Evas_List*evas_list_next(const Evas_List 
*list);
+   EAPI Evas_List*evas_list_prev(const Evas_List 
*list);
+   EAPI void *evas_list_data(const Evas_List 
*list);
+   EAPI int   evas_list_count   (const Evas_List 
*list);
+   EAPI void *evas_list_nth (const Evas_List 
*list, int n);
+   EAPI Evas_List*evas_list_nth_list(const Evas_List 
*list, int n);
EAPI Evas_List*evas_list_reverse (Evas_List *list);
EAPI Evas_List*evas_list_sort(Evas_List *list, 
int size, int(*func)(void*,void*));
EAPI int   evas_list_alloc_error (void);



-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs


E CVS: libs/evas barbieri

2008-02-08 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : barbieri
Project : e17
Module  : libs/evas

Dir : e17/libs/evas/src/lib/data


Modified Files:
evas_list.c 


Log Message:
Add const: evas_list.c

===
RCS file: /cvs/e/e17/libs/evas/src/lib/data/evas_list.c,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -3 -r1.30 -r1.31
--- evas_list.c 8 Feb 2008 18:42:42 -   1.30
+++ evas_list.c 8 Feb 2008 19:16:13 -   1.31
@@ -488,9 +488,9 @@
  * @ingroup Evas_List_Find_Group
  */
 EAPI void *
-evas_list_find(Evas_List *list, const void *data)
+evas_list_find(const Evas_List *list, const void *data)
 {
-   Evas_List *l;
+   const Evas_List *l;
 
for (l = list; l; l = l->next)
  {
@@ -525,13 +525,13 @@
  * @ingroup Evas_List_Find_Group
  */
 EAPI Evas_List *
-evas_list_find_list(Evas_List *list, const void *data)
+evas_list_find_list(const Evas_List *list, const void *data)
 {
-   Evas_List *l;
+   const Evas_List *l;
 
for (l = list; l; l = l->next)
  {
-   if (l->data == data) return l;
+   if (l->data == data) return (Evas_List *)l;
  }
return NULL;
 }
@@ -599,7 +599,7 @@
  * @ingroup Evas_List_Traverse_Group
  */
 EAPI Evas_List *
-evas_list_last(Evas_List *list)
+evas_list_last(const Evas_List *list)
 {
if (!list) return NULL;
return list->accounting->last;
@@ -627,7 +627,7 @@
  * @ingroup Evas_List_Traverse_Group
  */
 EAPI Evas_List *
-evas_list_next(Evas_List *list)
+evas_list_next(const Evas_List *list)
 {
if (!list) return NULL;
return list->next;
@@ -656,7 +656,7 @@
  * @ingroup Evas_List_Traverse_Group
  */
 EAPI Evas_List *
-evas_list_prev(Evas_List *list)
+evas_list_prev(const Evas_List *list)
 {
if (!list) return NULL;
return list->prev;
@@ -690,7 +690,7 @@
  * @ingroup Evas_List_General_Group
  */
 EAPI void *
-evas_list_data(Evas_List *list)
+evas_list_data(const Evas_List *list)
 {
if (!list) return NULL;
return list->data;
@@ -716,7 +716,7 @@
  * @ingroup Evas_List_General_Group
  */
 EAPI int
-evas_list_count(Evas_List *list)
+evas_list_count(const Evas_List *list)
 {
if (!list) return 0;
return list->accounting->count;
@@ -745,7 +745,7 @@
  * @ingroup Evas_List_Find_Group
  */
 EAPI void *
-evas_list_nth(Evas_List *list, int n)
+evas_list_nth(const Evas_List *list, int n)
 {
Evas_List *l;

@@ -776,10 +776,10 @@
  * @ingroup Evas_List_Find_Group
  */
 EAPI Evas_List *
-evas_list_nth_list(Evas_List *list, int n)
+evas_list_nth_list(const Evas_List *list, int n)
 {
int i;
-   Evas_List *l;
+   const Evas_List *l;
 
/* check for non-existing nodes */
if ((!list) || (n < 0) || 
@@ -796,14 +796,14 @@
 l; 
 l = l->prev, i--)
  {
-if (i == n) return l;
+if (i == n) return (Evas_List *)l;
  }
  }
else
  {
for (i = 0, l = list; l; l = l->next, i++)
  {
-if (i == n) return l;
+if (i == n) return (Evas_List *)l;
  }
  }
return NULL;



-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs


E CVS: libs/evas barbieri

2008-02-08 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : barbieri
Project : e17
Module  : libs/evas

Dir : e17/libs/evas/src/lib


Modified Files:
Evas.h 


Log Message:
Avoid lots of casts.

===
RCS file: /cvs/e/e17/libs/evas/src/lib/Evas.h,v
retrieving revision 1.106
retrieving revision 1.107
diff -u -3 -r1.106 -r1.107
--- Evas.h  23 Jan 2008 04:19:26 -  1.106
+++ Evas.h  8 Feb 2008 18:42:42 -   1.107
@@ -101,7 +101,7 @@
void  *data; /**< Pointer to list element payload */
Evas_List *next; /**< Next member in the list */
Evas_List *prev; /**< Previous member in the list */
-   void  *accounting; /**< Private list accounting info - don't touch */
+   struct _Evas_List_Accounting *accounting; /**< Private list accounting info 
- don't touch */
 };
 
 struct _Evas_Rectangle /** A rectangle */



-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs


E CVS: libs/evas barbieri

2008-02-08 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : barbieri
Project : e17
Module  : libs/evas

Dir : e17/libs/evas/src/lib/data


Modified Files:
evas_list.c 


Log Message:
Avoid lots of casts.

===
RCS file: /cvs/e/e17/libs/evas/src/lib/data/evas_list.c,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -3 -r1.29 -r1.30
--- evas_list.c 5 Oct 2007 19:37:21 -   1.29
+++ evas_list.c 8 Feb 2008 18:42:42 -   1.30
@@ -83,16 +83,16 @@
 evas_mempool_free(&_evas_list_mempool, new_l);
 return list;
  }
-   ((Evas_List_Accounting *)(new_l->accounting))->last = new_l;
-   ((Evas_List_Accounting *)(new_l->accounting))->count = 1;
+   new_l->accounting->last = new_l;
+   new_l->accounting->count = 1;
return new_l;
  }
-   l = ((Evas_List_Accounting *)(list->accounting))->last;
+   l = list->accounting->last;
l->next = new_l;
new_l->prev = l;
new_l->accounting = list->accounting;
-   ((Evas_List_Accounting *)(list->accounting))->last = new_l;
-   ((Evas_List_Accounting *)(list->accounting))->count++;
+   list->accounting->last = new_l;
+   list->accounting->count++;
return list;
 }
 
@@ -146,14 +146,14 @@
 evas_mempool_free(&_evas_list_mempool, new_l);
 return list;
  }
-   ((Evas_List_Accounting *)(new_l->accounting))->last = new_l;
-   ((Evas_List_Accounting *)(new_l->accounting))->count = 1;
+   new_l->accounting->last = new_l;
+   new_l->accounting->count = 1;
return new_l;
  }
new_l->next = list;
list->prev = new_l;
new_l->accounting = list->accounting;
-   ((Evas_List_Accounting *)(list->accounting))->count++;
+   list->accounting->count++;
return new_l;
 }
 
@@ -232,9 +232,9 @@
relative->next = new_l;
new_l->prev = relative;
new_l->accounting = list->accounting;
-   ((Evas_List_Accounting *)(list->accounting))->count++;
+   list->accounting->count++;
if (!new_l->next)
- ((Evas_List_Accounting *)(new_l->accounting))->last = new_l;
+ new_l->accounting->last = new_l;
return list;
 }
 
@@ -315,7 +315,7 @@
if (relative->prev) relative->prev->next = new_l;
relative->prev = new_l;
new_l->accounting = list->accounting;
-   ((Evas_List_Accounting *)(list->accounting))->count++;
+   list->accounting->count++;
if (new_l->prev)
  return list;
return new_l;
@@ -394,10 +394,10 @@
  }
else
  return_l = remove_list->next;
-   if (remove_list == ((Evas_List_Accounting *)(list->accounting))->last)
- ((Evas_List_Accounting *)(list->accounting))->last = remove_list->prev;
-   ((Evas_List_Accounting *)(list->accounting))->count--;
-   if (((Evas_List_Accounting *)(list->accounting))->count == 0)
+   if (remove_list == list->accounting->last)
+ list->accounting->last = remove_list->prev;
+   list->accounting->count--;
+   if (list->accounting->count == 0)
  evas_mempool_free(&_evas_list_accounting_mempool, list->accounting);
evas_mempool_free(&_evas_list_mempool, remove_list);
return return_l;
@@ -447,8 +447,8 @@
  }
else
  return_l = move_list->next;
-   if (move_list == ((Evas_List_Accounting *)(list->accounting))->last)
- ((Evas_List_Accounting *)(list->accounting))->last = move_list->prev;
+   if (move_list == list->accounting->last)
+ list->accounting->last = move_list->prev;
move_list->prev = return_l->prev;
if (return_l->prev)
  return_l->prev->next = move_list;
@@ -602,7 +602,7 @@
 evas_list_last(Evas_List *list)
 {
if (!list) return NULL;
-   return ((Evas_List_Accounting *)(list->accounting))->last;
+   return list->accounting->last;
 }
 
 /**
@@ -719,7 +719,7 @@
 evas_list_count(Evas_List *list)
 {
if (!list) return 0;
-   return ((Evas_List_Accounting *)(list->accounting))->count;
+   return list->accounting->count;
 }
 
 /**
@@ -783,16 +783,16 @@
 
/* check for non-existing nodes */
if ((!list) || (n < 0) || 
-   (n > ((Evas_List_Accounting *)(list->accounting))->count - 1))
+   (n > (list->accounting->count - 1)))
  return NULL;
 
/* if the node is in the 2nd half of the list, search from the end
 * else, search from the beginning.
 */
-   if (n > (((Evas_List_Accounting *)(list->accounting))->count / 2))
+   if (n > (list->accounting->count / 2))
  {
-   for (i = ((Evas_List_Accounting *)(list->accounting))->count - 1,
-l = ((Evas_List_Accounting *)(list->accounting))->last; 
+   for (i = list->accounting->count - 1,
+l = list->accounting->last;
 l; 
 l = l->prev, i--)
  {
@@ -838,7 +838,7 @@
 
if (!list) return NULL;
l1 = list;
-   l2 = ((Evas_List_Accounting *)(list->accounting))->last;
+   l2 = list->accounting->last;
while (l1 != l2)
  {
void *data;
@@ -903,10 +903,10 @@
 
/* if the caller specified an invalid size, sort the whole 

E CVS: libs/evas barbieri

2008-01-02 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : barbieri
Project : e17
Module  : libs/evas

Dir : e17/libs/evas/src/modules/engines/software_16


Modified Files:
evas_soft16_main.c 


Log Message:
Fix bug with out-of-screen paiting in software_16

Things like expedite's "Image Qualit Scale" that blited with x,y
negative were giving incorrect clip rectangle.


===
RCS file: 
/cvs/e/e17/libs/evas/src/modules/engines/software_16/evas_soft16_main.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -3 -r1.19 -r1.20
--- evas_soft16_main.c  19 Nov 2007 22:27:02 -  1.19
+++ evas_soft16_main.c  2 Jan 2008 20:58:29 -   1.20
@@ -308,7 +308,7 @@
if (dst_clip->w <= 0) return 0;
if (dst_clip->x >= dst_max_x) return 0;
 
-   _shrink(&dst_clip->x, &dst_clip->w, dst->x, dst_max_x);
+   _shrink(&dst_clip->x, &dst_clip->w, 0, dst_max_x);
if (dst_clip->w <= 0) return 0;
 
/* sanitise y */
@@ -335,7 +335,7 @@
if (dst_clip->h <= 0) return 0;
if (dst_clip->y >= dst_max_y) return 0;
 
-   _shrink(&dst_clip->y, &dst_clip->h, dst->y, dst_max_y);
+   _shrink(&dst_clip->y, &dst_clip->h, 0, dst_max_y);
if (dst_clip->h <= 0) return 0;
 
return 1;



-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs


E CVS: libs/evas barbieri

2007-11-19 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : barbieri
Project : e17
Module  : libs/evas

Dir : e17/libs/evas/src/modules/engines/software_16


Modified Files:
evas_soft16_main.c 


Log Message:
Fix possible memory leak with software_16.

If image data is not loaded at all, engine must free associated 32 bit
structure.


===
RCS file: 
/cvs/e/e17/libs/evas/src/modules/engines/software_16/evas_soft16_main.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -3 -r1.18 -r1.19
--- evas_soft16_main.c  30 Oct 2007 13:48:44 -  1.18
+++ evas_soft16_main.c  19 Nov 2007 22:27:02 -  1.19
@@ -123,6 +123,7 @@
if (im->file) evas_stringshare_del(im->file);
if (im->key) evas_stringshare_del(im->key);
if (im->free_pixels) free(im->pixels);
+   if (im->source_im) evas_cache_image_drop(im->source_im);
free(im);
 }
 



-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs


E CVS: libs/evas barbieri

2007-10-30 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : barbieri
Project : e17
Module  : libs/evas

Dir : e17/libs/evas/src/modules/engines/software_16


Modified Files:
evas_soft16.h evas_soft16_dither_mask.c evas_soft16_font.c 
evas_soft16_line.c evas_soft16_scanline_blend.c 
evas_soft16_scanline_fill.c 


Log Message:
Be lighter on 'inline'

===
RCS file: /cvs/e/e17/libs/evas/src/modules/engines/software_16/evas_soft16.h,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -3 -r1.12 -r1.13
--- evas_soft16.h   26 Oct 2007 18:53:39 -  1.12
+++ evas_soft16.h   30 Oct 2007 21:06:08 -  1.13
@@ -58,6 +58,14 @@
 #define pld(addr, off)
 #endif /* __ARMEL__ */
 
+#ifndef always_inline
+#if defined(__GNUC__) && (__GNUC__ > 3 || __GNUC__ == 3 && __GNUC_MINOR__ > 0)
+#define always_inline __attribute__((always_inline)) inline
+#else
+#define always_inline inline
+#endif
+#endif
+
 #define IMG_BYTE_SIZE(stride, height, has_alpha)   \
((stride) * (height) * (!(has_alpha) ? 2 : 3))
 
===
RCS file: 
/cvs/e/e17/libs/evas/src/modules/engines/software_16/evas_soft16_dither_mask.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -3 -r1.6 -r1.7
--- evas_soft16_dither_mask.c   25 Oct 2007 20:18:02 -  1.6
+++ evas_soft16_dither_mask.c   30 Oct 2007 21:06:08 -  1.7
@@ -138,7 +138,7 @@
  { 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 }
 };
 
-static inline void
+static always_inline void
 _soft16_convert_from_rgba_pt(const DATA32 *src, DATA16 *dst, DATA8 *alpha,
 const int x, const int y)
 {
@@ -228,7 +228,7 @@
  _soft16_convert_from_rgba_scanline(sp, dp, ap, y, im->w);
 }
 
-static inline void
+static always_inline void
 _soft16_convert_from_rgb_pt(const DATA32 *src, DATA16 *dst,
const int x, const int y)
 {
===
RCS file: 
/cvs/e/e17/libs/evas/src/modules/engines/software_16/evas_soft16_font.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -3 -r1.4 -r1.5
--- evas_soft16_font.c  25 Oct 2007 22:09:49 -  1.4
+++ evas_soft16_font.c  30 Oct 2007 21:06:08 -  1.5
@@ -1,7 +1,7 @@
 #include "evas_soft16.h"
 #include "evas_soft16_scanline_blend.c"
 
-static inline void
+static always_inline void
 _glyph_pt_mask_solid_solid(DATA16 *dst,
   const DATA16 rgb565,
   const DATA32 rgb565_unpack,
@@ -20,7 +20,7 @@
  }
 }
 
-static inline void
+static void
 _glyph_scanline_mask_solid_solid(DATA16 *dst,
 int size,
 const DATA16 rgb565,
@@ -50,7 +50,7 @@
   _glyph_pt_mask_solid_solid(start, rgb565, rgb565_unpack, mask);
 }
 
-static inline void
+static always_inline void
 _glyph_pt_mask_transp_solid(DATA16 *dst,
DATA32 rgb565_unpack,
DATA8 alpha,
@@ -72,7 +72,7 @@
*dst = RGB_565_PACK(b);
 }
 
-static inline void
+static void
 _glyph_scanline_mask_transp_solid(DATA16 *dst,
  int size,
  const DATA32 rgb565_unpack,
@@ -183,7 +183,7 @@
  }
 }
 
-static inline void
+static void
 _soft16_font_glyph_draw_grayscale(Soft16_Image *dst,
  RGBA_Draw_Context *dc, RGBA_Font_Glyph *fg,
  int x, int y, DATA8 alpha, DATA16 rgb565,
@@ -222,7 +222,7 @@
  }
 }
 
-static inline void
+static void
 _soft16_font_glyph_draw_mono(Soft16_Image *dst,
 RGBA_Draw_Context *dc, RGBA_Font_Glyph *fg,
 int x, int y, DATA8 alpha, DATA16 rgb565,
===
RCS file: 
/cvs/e/e17/libs/evas/src/modules/engines/software_16/evas_soft16_line.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -3 -r1.2 -r1.3
--- evas_soft16_line.c  29 Oct 2007 21:03:08 -  1.2
+++ evas_soft16_line.c  30 Oct 2007 21:06:08 -  1.3
@@ -56,7 +56,7 @@
return clip.w < 1 || clip.h < 1;
 }
 
-static inline void
+static void
 _soft16_line_point(Soft16_Image *dst, RGBA_Draw_Context *dc, int x, int y)
 {
DATA16 rgb565, *dst_itr;
@@ -86,7 +86,7 @@
  }
 }
 
-static inline void
+static void
 _soft16_line_horiz(Soft16_Image *dst, RGBA_Draw_Context *dc,

E CVS: libs/evas barbieri

2007-10-30 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : barbieri
Project : e17
Module  : libs/evas

Dir : e17/libs/evas/src/modules/engines/software_16


Modified Files:
evas_soft16_main.c 


Log Message:
Missing rename.

===
RCS file: 
/cvs/e/e17/libs/evas/src/modules/engines/software_16/evas_soft16_main.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -3 -r1.17 -r1.18
--- evas_soft16_main.c  26 Oct 2007 18:53:39 -  1.17
+++ evas_soft16_main.c  30 Oct 2007 13:48:44 -  1.18
@@ -448,7 +448,7 @@
  }
 
if (im->cache_key)
- soft16_image_cache_remove(im);
+ soft16_image_cache_del(im);
return im;
  }
else



-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
___
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs


E CVS: libs/evas barbieri

2007-10-29 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : barbieri
Project : e17
Module  : libs/evas

Dir : e17/libs/evas/src/modules/engines/software_16


Modified Files:
evas_soft16_scanline_fill.c 


Log Message:
Fix access of unaligned memory.

===
RCS file: 
/cvs/e/e17/libs/evas/src/modules/engines/software_16/evas_soft16_scanline_fill.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -3 -r1.3 -r1.4
--- evas_soft16_scanline_fill.c 25 Oct 2007 16:17:19 -  1.3
+++ evas_soft16_scanline_fill.c 29 Oct 2007 22:16:41 -  1.4
@@ -23,6 +23,14 @@
DATA32 rgb565_double;
 
start = dst;
+
+   if ((long)start & 0x2)
+ {
+   *start = rgb565;
+   start++;
+   size--;
+ }
+
end = start + (size & ~7);
 
rgb565_double = (rgb565 << 16) | rgb565;



-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
___
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs


E CVS: libs/evas barbieri

2007-10-29 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : barbieri
Project : e17
Module  : libs/evas

Dir : e17/libs/evas/src/modules/engines/software_16


Modified Files:
evas_soft16_line.c 


Log Message:
Damn typo...

===
RCS file: 
/cvs/e/e17/libs/evas/src/modules/engines/software_16/evas_soft16_line.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- evas_soft16_line.c  25 Oct 2007 16:17:18 -  1.1
+++ evas_soft16_line.c  29 Oct 2007 21:03:08 -  1.2
@@ -425,7 +425,7 @@
 
t = y0;
y0 = y1;
-   y1 = y0;
+   y1 = t;
  }
 
if (dx == 0 && dy == 0)



-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
___
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs


E CVS: libs/evas barbieri

2007-10-27 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : barbieri
Project : e17
Module  : libs/evas

Dir : e17/libs/evas/src/modules/engines/software_16


Modified Files:
evas_soft16_rectangle.c 


Log Message:
Minor cleanup on software_16, evas_soft16_rectangle.c

===
RCS file: 
/cvs/e/e17/libs/evas/src/modules/engines/software_16/evas_soft16_rectangle.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -3 -r1.3 -r1.4
--- evas_soft16_rectangle.c 25 Oct 2007 16:17:19 -  1.3
+++ evas_soft16_rectangle.c 27 Oct 2007 21:06:58 -  1.4
@@ -83,7 +83,7 @@
Evas_Rectangle dr;
Cutout_Rects *rects;
Cutout_Rect  *r;
-   int c, cx, cy, cw, ch;
+   struct RGBA_Draw_Context_clip c_bkp;
int i;
 
/* handle cutouts here! */
@@ -103,14 +103,14 @@
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;
+   c_bkp = dc->clip;
+
evas_common_draw_context_clip_clip(dc, 0, 0, dst->w, dst->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.use = c; dc->clip.x = cx; dc->clip.y = cy; dc->clip.w = cw; 
dc->clip.h = ch;
+   dc->clip = c_bkp;
return;
  }
rects = evas_common_draw_context_apply_cutouts(dc);
@@ -121,7 +121,6 @@
 _soft16_rectangle_draw_int(dst, dc, dr);
  }
evas_common_draw_context_apply_clear_cutouts(rects);
-   /* restore clip info */
-   dc->clip.use = c; dc->clip.x = cx; dc->clip.y = cy; dc->clip.w = cw; 
dc->clip.h = ch;
+   dc->clip = c_bkp;
 }
 



-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
___
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs


E CVS: libs/evas barbieri

2007-10-26 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : barbieri
Project : e17
Module  : libs/evas

Dir : e17/libs/evas/src/modules/engines/software_16


Modified Files:
Makefile.am evas_engine.c evas_soft16.h evas_soft16_main.c 
Added Files:
evas_soft16_image_cache.c 


Log Message:
Add software_16 cache.

===
RCS file: /cvs/e/e17/libs/evas/src/modules/engines/software_16/Makefile.am,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -3 -r1.7 -r1.8
--- Makefile.am 25 Oct 2007 16:17:18 -  1.7
+++ Makefile.am 26 Oct 2007 18:53:39 -  1.8
@@ -14,6 +14,7 @@
 evas_soft16.h \
 evas_soft16_dither_mask.c \
 evas_soft16_main.c \
+evas_soft16_image_cache.c \
 evas_soft16_image_unscaled.c \
 evas_soft16_image_scaled_sampled.c \
 evas_soft16_font.c \
@@ -32,6 +33,7 @@
 evas_soft16.h \
 evas_soft16_dither_mask.c \
 evas_soft16_main.c \
+evas_soft16_image_cache.c \
 evas_soft16_image_unscaled.c \
 evas_soft16_image_scaled_sampled.c \
 evas_soft16_font.c \
===
RCS file: /cvs/e/e17/libs/evas/src/modules/engines/software_16/evas_engine.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -3 -r1.10 -r1.11
--- evas_engine.c   25 Oct 2007 22:09:49 -  1.10
+++ evas_engine.c   26 Oct 2007 18:53:39 -  1.11
@@ -491,16 +491,23 @@
  {
 Soft16_Image *im_new;
 
-im_new = soft16_image_new(im->w, im->h, im->stride, 
im->have_alpha, im->pixels, 1);
-if (!im_new) return im;
+im_new = soft16_image_new(im->w, im->h, im->stride, im->have_alpha,
+  im->pixels, 1);
+if (!im_new)
+  {
+ if (image_data) *image_data = NULL;
+ return im;
+  }
 soft16_image_free(im);
 im = im_new;
  }
+   if (im->cache_key)
+ soft16_image_cache_del(im);
  }
 
if (image_data) *image_data = (DATA32 *) im->pixels;
 
-   return image;
+   return im;
 }
 
 static void *
@@ -532,23 +539,19 @@
 static void
 eng_image_cache_flush(void *data)
 {
-   int tmp_size;
-
-   tmp_size = evas_common_image_get_cache();
-   evas_common_image_set_cache(0);
-   evas_common_image_set_cache(tmp_size);
+   soft16_image_cache_flush();
 }
 
 static void
 eng_image_cache_set(void *data, int bytes)
 {
-   evas_common_image_set_cache(bytes);
+   soft16_image_cache_size_set(bytes);
 }
 
 static int
 eng_image_cache_get(void *data)
 {
-   return evas_common_image_get_cache();
+   return soft16_image_cache_size_get();
 }
 
 static void *
===
RCS file: /cvs/e/e17/libs/evas/src/modules/engines/software_16/evas_soft16.h,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -3 -r1.11 -r1.12
--- evas_soft16.h   25 Oct 2007 22:09:49 -  1.11
+++ evas_soft16.h   26 Oct 2007 18:53:39 -  1.12
@@ -58,6 +58,9 @@
 #define pld(addr, off)
 #endif /* __ARMEL__ */
 
+#define IMG_BYTE_SIZE(stride, height, has_alpha)   \
+   ((stride) * (height) * (!(has_alpha) ? 2 : 3))
+
 typedef struct _Soft16_Image Soft16_Image;
 
 struct _Soft16_Image
@@ -75,9 +78,10 @@
 
Evas_Image_Load_Opts lo;   // load options
 
+   const char *cache_key;
+
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
 };
 
 /**
@@ -85,6 +89,7 @@
  */
 Soft16_Image *soft16_image_new(int w, int h, int stride, int have_alpha, 
DATA16 *pixels, int copy);
 void soft16_image_free(Soft16_Image *im);
+void soft16_image_destroy(Soft16_Image *im);
 Soft16_Image *soft16_image_load(const char *file, const char *key, int *error, 
Evas_Image_Load_Opts *lo);
 void soft16_image_load_data(Soft16_Image *im);
 void 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);
@@ -99,6 +104,17 @@
 void soft16_image_convert_from_rgb(Soft16_Image *im, const DATA32 *src);
 void soft16_image_convert_from_rgba(Soft16_Image *im, const DATA32 *src);
 
+/**
+ * Image cache (evas_soft16_image_cache.c)
+ */
+void soft16_image_cache_flush(void);
+int soft16_image_cache_size_get(void);
+void soft16_image_cache_size_set(int limit);
+
+Soft16_Image *soft16_image_cache_get(const char *cache_key);
+void soft16_image_cache_put(Soft16_Image *im);
+void soft16_image_cache_add(Soft16_Image *im, const char *cache_key);
+void soft16_image_cache_del(Soft16_Image *im);
 
 /**
  * Rectangle (evas_soft16_rectangle.c)
===
RCS file: 
/cvs/e/e17/libs/evas/src/modules/engines/software_16/evas_soft16_main.c,v
re

E CVS: libs/evas barbieri

2007-10-25 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : barbieri
Project : e17
Module  : libs/evas

Dir : e17/libs/evas/src/modules/engines/software_16


Modified Files:
evas_engine.c evas_soft16.h evas_soft16_font.c 
evas_soft16_main.c 


Log Message:
Fix image alpha_set() and fix compiler warning, minor fixes.

===
RCS file: /cvs/e/e17/libs/evas/src/modules/engines/software_16/evas_engine.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -3 -r1.9 -r1.10
--- evas_engine.c   25 Oct 2007 16:17:18 -  1.9
+++ evas_engine.c   25 Oct 2007 22:09:49 -  1.10
@@ -14,9 +14,6 @@
fprintf(stderr, "NOT_IMPLEMENTED: %s() at %s:%d\n",  \
__FUNCTION__, __FILE__, __LINE__)
 
-
-static int cpunum = 0;
-
 static void *
 eng_context_new(void *data)
 {
@@ -333,8 +330,7 @@
 
if (!image) return 0;
im = image;
-   if (im->have_alpha) return 1;
-   return 0;
+   return im->have_alpha;
 }
 
 static int
@@ -348,7 +344,7 @@
 {
if (!image) return NULL;
have_alpha = !!have_alpha;
-   soft16_image_alpha_set(image, have_alpha);
+   image = soft16_image_alpha_set(image, have_alpha);
return image;
 }
 
@@ -372,6 +368,7 @@
 static char *
 eng_image_format_get(void *data, void *image)
 {
+   NOT_IMPLEMENTED();
return NULL;
 }
 
@@ -384,11 +381,13 @@
 static void
 eng_image_native_set(void *data, void *image, void *native)
 {
+   NOT_IMPLEMENTED();
 }
 
 static void *
 eng_image_native_get(void *data, void *image)
 {
+   NOT_IMPLEMENTED();
return NULL;
 }
 
@@ -843,7 +842,6 @@
 {
if (!em) return 0;
em->functions = (void *)(&func);
-   cpunum = evas_common_cpu_count();
return 1;
 }
 
===
RCS file: /cvs/e/e17/libs/evas/src/modules/engines/software_16/evas_soft16.h,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -3 -r1.10 -r1.11
--- evas_soft16.h   25 Oct 2007 16:17:18 -  1.10
+++ evas_soft16.h   25 Oct 2007 22:09:49 -  1.11
@@ -88,7 +88,7 @@
 Soft16_Image *soft16_image_load(const char *file, const char *key, int *error, 
Evas_Image_Load_Opts *lo);
 void soft16_image_load_data(Soft16_Image *im);
 void 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);
-void soft16_image_alpha_set(Soft16_Image *im, int have_alpha);
+Soft16_Image *soft16_image_alpha_set(Soft16_Image *im, int have_alpha);
 Soft16_Image *soft16_image_size_set(Soft16_Image *im, int w, int h);
 
 
@@ -123,6 +123,6 @@
  */
 void *soft16_font_glyph_new(void *data, RGBA_Font_Glyph *fg);
 void  soft16_font_glyph_free(void *ext_dat);
-void  soft16_font_glyph_draw(Soft16_Image *dst, void *data, RGBA_Draw_Context 
*dc, RGBA_Font_Glyph *fg, int x, int y);
+void  soft16_font_glyph_draw(void *data, void *dest, void *context, 
RGBA_Font_Glyph *fg, int x, int y);
 
 #endif
===
RCS file: 
/cvs/e/e17/libs/evas/src/modules/engines/software_16/evas_soft16_font.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -3 -r1.3 -r1.4
--- evas_soft16_font.c  10 Oct 2007 19:22:26 -  1.3
+++ evas_soft16_font.c  25 Oct 2007 22:09:49 -  1.4
@@ -246,15 +246,19 @@
 }
 
 void
-soft16_font_glyph_draw(Soft16_Image *dst, void *data,
-  RGBA_Draw_Context *dc, RGBA_Font_Glyph *fg,
-  int x, int y)
+soft16_font_glyph_draw(void *data, void *dest, 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;
Evas_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 */
===
RCS file: 
/cvs/e/e17/libs/evas/src/modules/engines/software_16/evas_soft16_main.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -3 -r1.15 -r1.16
--- evas_soft16_main.c  25 Oct 2007 16:17:18 -  1.15
+++ evas_soft16_main.c  25 Oct 2007 22:09:49 -  1.16
@@ -447,10 +447,10 @@
dc->clip = clip_bkp;
 }
 
-void
+Soft16_Image *
 soft16_image_alpha_set(Soft16_Image *im, int have_alpha)
 {
-   if (im->have_alpha == have_alpha) return;
+   if (im->have_alpha == have_alpha) return im;
im->have_alpha = have_alpha;
 
if ((im->pixels) && (im->free_pixels))
@@ -469,6 +469,16 @@
 im->alpha = (DATA8*)(im->pixels + size);
 memset(im->alpha, 0x1f, size);
  }
+   return im;
+ }
+   else
+ {
+   Soft16_Image *im_new;
+
+   im_new = soft16_image_new(im->w, im->h, im->stride, have_alpha,

E CVS: libs/evas barbieri

2007-10-25 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : barbieri
Project : e17
Module  : libs/evas

Dir : e17/libs/evas/src/modules/engines/software_16


Modified Files:
evas_soft16_dither_mask.c evas_soft16_image_scaled_sampled.c 
evas_soft16_image_unscaled.c evas_soft16_scanline_blend.c 


Log Message:
Revert last patch (Simplify image alpha usage.), it was producing nasty 
artifacts.

===
RCS file: 
/cvs/e/e17/libs/evas/src/modules/engines/software_16/evas_soft16_dither_mask.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -3 -r1.5 -r1.6
--- evas_soft16_dither_mask.c   25 Oct 2007 18:56:23 -  1.5
+++ evas_soft16_dither_mask.c   25 Oct 2007 20:18:02 -  1.6
@@ -142,15 +142,14 @@
 _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, a;
+   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);
-   a = orig_a >> 3;
 
-   if (a == 31)
+   if (orig_a == 255)
  {
DATA8 dith5, dith6, dith, r, g, b;
 
@@ -167,22 +166,23 @@
if (((orig_b - (b << 3)) >= dith5) && (b < 0x1f)) b++;
 
*dst = (r << 11) | (g << 5) | b;
-   *alpha = 32;
+   *alpha = 31;
  }
-   else if (a == 0)
+   else if (orig_a == 0)
  {
*dst = 0;
*alpha = 0;
  }
else
  {
-   DATA8 r, g, b;
+   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 + 1;
+   *alpha = a;
  }
 }
 
===
RCS file: 
/cvs/e/e17/libs/evas/src/modules/engines/software_16/evas_soft16_image_scaled_sampled.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -3 -r1.4 -r1.5
--- evas_soft16_image_scaled_sampled.c  25 Oct 2007 18:56:23 -  1.4
+++ evas_soft16_image_scaled_sampled.c  25 Oct 2007 20:18:02 -  1.5
@@ -234,7 +234,7 @@
 
dst_itr = dst->pixels + dst_offset;
 
-   if (alpha == 32)
+   if (alpha == 31)
  for (y = 0; y < h; y++, dst_itr += dst->stride)
{
  DATA16 *d, *s;
@@ -310,7 +310,7 @@
 
dst_itr = dst->pixels + dst_offset;
 
-   if (alpha == 32)
+   if (alpha == 31)
  for (y = 0; y < h; y++, dst_itr += dst->stride)
{
  DATA16 *d, *s;
@@ -407,7 +407,7 @@
  int *offset_x, int *offset_y, DATA8 r, DATA8 g,
  DATA8 b, DATA8 a)
 {
-   if ((r == b) && (r == (g >> 1)) && (r == (a - 1)))
+   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
@@ -428,8 +428,7 @@
 
if (!dc->mul.use)
  {
-   a = 32;
-   r = b = 31;
+   r = b = a = 31;
g = 63;
mul_rgb565 = 0x;
  }
@@ -446,7 +445,6 @@
if (r > a) r = a;
if (g > (a << 1)) g = (a << 1);
if (b > a) b = a;
-   a++;
 
mul_rgb565 = (r << 11) || (g << 5) | b;
  }
@@ -462,6 +460,7 @@
* src->stride);
 
dst_offset = cr.x + (cr.y * dst->stride);
+
 
if (mul_rgb565 == 0x)
  _soft16_image_draw_scaled_no_mul
===
RCS file: 
/cvs/e/e17/libs/evas/src/modules/engines/software_16/evas_soft16_image_unscaled.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -3 -r1.3 -r1.4
--- evas_soft16_image_unscaled.c25 Oct 2007 18:56:23 -  1.3
+++ evas_soft16_image_unscaled.c25 Oct 2007 20:18:02 -  1.4
@@ -149,7 +149,7 @@
src_itr = src->pixels + src_offset;
dst_itr = dst->pixels + dst_offset;
 
-   if (a == 32)
+   if (a == 31)
   for (y = 0; y < h; y++)
  {
 _soft16_scanline_blend_solid_solid_mul_color_solid
@@ -185,7 +185,7 @@
alpha_itr = src->alpha + src_offset;
dst_itr = dst->pixels + dst_offset;
 
-   if (a == 32)
+   if (a == 31)
   for (y = 0; y < h; y++)
  {
 _soft16_scanline_blend_transp_solid_mul_color_solid
@@ -232,7 +232,7 @@
 int width, int height, DATA8 r, DATA8 g,
DATA8 b, DATA8 a)
 {
-   if ((r == b) && (r == (g >> 1)) && (r == (a - 1)))
+   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
@@ -254,8 +254,7 @@
 
if (!dc->mul.use)
  {
-   a = 32;
-   r = b = 31;
+   r = b = a = 31;
g = 63;
mul_rgb565 = 0x;
  }
@@ -272,7 +271,6 @@
if (r > a) r = a;
if (g > (a << 1)) g = (a << 1);
if (b > a

E CVS: libs/evas barbieri

2007-10-25 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : barbieri
Project : e17
Module  : libs/evas

Dir : e17/libs/evas/src/modules/engines/software_16


Modified Files:
evas_soft16_dither_mask.c evas_soft16_image_scaled_sampled.c 
evas_soft16_image_unscaled.c evas_soft16_scanline_blend.c 


Log Message:
Simplify image alpha usage.

Values are now in 0-32 (inclusive), so we must check for 32 as the
opaque value. Now it's more consistent.

===
RCS file: 
/cvs/e/e17/libs/evas/src/modules/engines/software_16/evas_soft16_dither_mask.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -3 -r1.4 -r1.5
--- evas_soft16_dither_mask.c   25 Oct 2007 16:17:18 -  1.4
+++ evas_soft16_dither_mask.c   25 Oct 2007 18:56:23 -  1.5
@@ -142,14 +142,15 @@
 _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;
+   DATA8 orig_r, orig_g, orig_b, orig_a, a;
 
orig_r = R_VAL(src);
orig_g = G_VAL(src);
orig_b = B_VAL(src);
orig_a = A_VAL(src);
+   a = orig_a >> 3;
 
-   if (orig_a == 255)
+   if (a == 31)
  {
DATA8 dith5, dith6, dith, r, g, b;
 
@@ -166,23 +167,22 @@
if (((orig_b - (b << 3)) >= dith5) && (b < 0x1f)) b++;
 
*dst = (r << 11) | (g << 5) | b;
-   *alpha = 31;
+   *alpha = 32;
  }
-   else if (orig_a == 0)
+   else if (a == 0)
  {
*dst = 0;
*alpha = 0;
  }
else
  {
-   DATA8 r, g, b, a;
+   DATA8 r, g, b;
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;
+   *alpha = a + 1;
  }
 }
 
===
RCS file: 
/cvs/e/e17/libs/evas/src/modules/engines/software_16/evas_soft16_image_scaled_sampled.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -3 -r1.3 -r1.4
--- evas_soft16_image_scaled_sampled.c  10 Oct 2007 19:22:26 -  1.3
+++ evas_soft16_image_scaled_sampled.c  25 Oct 2007 18:56:23 -  1.4
@@ -234,7 +234,7 @@
 
dst_itr = dst->pixels + dst_offset;
 
-   if (alpha == 31)
+   if (alpha == 32)
  for (y = 0; y < h; y++, dst_itr += dst->stride)
{
  DATA16 *d, *s;
@@ -310,7 +310,7 @@
 
dst_itr = dst->pixels + dst_offset;
 
-   if (alpha == 31)
+   if (alpha == 32)
  for (y = 0; y < h; y++, dst_itr += dst->stride)
{
  DATA16 *d, *s;
@@ -407,7 +407,7 @@
  int *offset_x, int *offset_y, DATA8 r, DATA8 g,
  DATA8 b, DATA8 a)
 {
-   if ((a == r) && (a == (g >> 1)) && (a == b))
+   if ((r == b) && (r == (g >> 1)) && (r == (a - 1)))
   _soft16_image_draw_scaled_mul_alpha
(src, dst, dc, dst_offset, w, h, offset_x, offset_y, a);
else
@@ -428,7 +428,8 @@
 
if (!dc->mul.use)
  {
-   r = b = a = 31;
+   a = 32;
+   r = b = 31;
g = 63;
mul_rgb565 = 0x;
  }
@@ -445,6 +446,7 @@
if (r > a) r = a;
if (g > (a << 1)) g = (a << 1);
if (b > a) b = a;
+   a++;
 
mul_rgb565 = (r << 11) || (g << 5) | b;
  }
@@ -460,7 +462,6 @@
* src->stride);
 
dst_offset = cr.x + (cr.y * dst->stride);
-
 
if (mul_rgb565 == 0x)
  _soft16_image_draw_scaled_no_mul
===
RCS file: 
/cvs/e/e17/libs/evas/src/modules/engines/software_16/evas_soft16_image_unscaled.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -3 -r1.2 -r1.3
--- evas_soft16_image_unscaled.c10 Oct 2007 19:22:26 -  1.2
+++ evas_soft16_image_unscaled.c25 Oct 2007 18:56:23 -  1.3
@@ -149,7 +149,7 @@
src_itr = src->pixels + src_offset;
dst_itr = dst->pixels + dst_offset;
 
-   if (a == 31)
+   if (a == 32)
   for (y = 0; y < h; y++)
  {
 _soft16_scanline_blend_solid_solid_mul_color_solid
@@ -185,7 +185,7 @@
alpha_itr = src->alpha + src_offset;
dst_itr = dst->pixels + dst_offset;
 
-   if (a == 31)
+   if (a == 32)
   for (y = 0; y < h; y++)
  {
 _soft16_scanline_blend_transp_solid_mul_color_solid
@@ -232,7 +232,7 @@
 int width, int height, DATA8 r, DATA8 g,
DATA8 b, DATA8 a)
 {
-   if ((a == r) && (a == (g >> 1)) && (a == b))
+   if ((r == b) && (r == (g >> 1)) && (r == (a - 1)))
   _soft16_image_draw_unscaled_mul_alpha(src, dst, dc, src_offset,
 dst_offset, width, height, a);
else
@@ -254,7 +254,8 @@
 
if (!dc->mul.use)
  {
-   r = b = a = 31;
+   a = 32;
+   r = b = 31;
g = 63;
mul_rgb565 = 0x;
  }
@@ -271,6 +272,7 @@
if (r > a) r = a;
 

E CVS: libs/evas barbieri

2007-10-25 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : barbieri
Project : e17
Module  : libs/evas

Dir : e17/libs/evas/src/modules/engines/software_16


Modified Files:
Makefile.am evas_engine.c evas_soft16.h 
evas_soft16_dither_mask.c evas_soft16_main.c 
evas_soft16_rectangle.c evas_soft16_scanline_blend.c 
evas_soft16_scanline_fill.c 
Added Files:
evas_soft16_line.c evas_soft16_polygon.c 


Log Message:
Line, Polygon and minor fixes for software_16.

Line is a complete rewrite based on my university works. It's much
cleaner than the engine/common and works better (the later is
producing weird results, I still have to debug why), but I don't
provide anti-aliased drawings.

Polygon is almost the same code, with minor changes to draw the spans
as soon as possible and then no malloc/free is required for each of
them.

Minor fixes to remove unused variables, gotos...

===
RCS file: /cvs/e/e17/libs/evas/src/modules/engines/software_16/Makefile.am,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -3 -r1.6 -r1.7
--- Makefile.am 8 Oct 2007 19:08:42 -   1.6
+++ Makefile.am 25 Oct 2007 16:17:18 -  1.7
@@ -17,7 +17,9 @@
 evas_soft16_image_unscaled.c \
 evas_soft16_image_scaled_sampled.c \
 evas_soft16_font.c \
-evas_soft16_rectangle.c
+evas_soft16_rectangle.c \
+evas_soft16_polygon.c \
+evas_soft16_line.c
 
 module_la_LIBADD = $(top_builddir)/src/lib/libevas.la
 module_la_LDFLAGS = @create_shared_lib@ -module -avoid-version 
-L$(top_builddir)/src/lib -L$(top_builddir)/src/lib/.libs
@@ -34,6 +36,8 @@
 evas_soft16_image_scaled_sampled.c \
 evas_soft16_font.c \
 evas_soft16_rectangle.c \
+evas_soft16_polygon.c \
+evas_soft16_line.c \
 evas_soft16_scanline_fill.c \
 evas_soft16_scanline_blend.c
 
===
RCS file: /cvs/e/e17/libs/evas/src/modules/engines/software_16/evas_engine.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -3 -r1.8 -r1.9
--- evas_engine.c   3 Aug 2007 23:11:56 -   1.8
+++ evas_engine.c   25 Oct 2007 16:17:18 -  1.9
@@ -148,39 +148,31 @@
 static void
 eng_rectangle_draw(void *data, void *context, void *surface, int x, int y, int 
w, int h)
 {
-soft16_rectangle_draw(surface, context, x, y, w, h);
+   soft16_rectangle_draw(surface, context, x, y, w, h);
 }
 
 static void
 eng_line_draw(void *data, void *context, void *surface, int x1, int y1, int 
x2, int y2)
 {
-   NOT_IMPLEMENTED();
-//   evas_common_line_draw(surface, context, x1, y1, x2, y2);
-//   evas_common_cpu_end_opt();
+   soft16_line_draw(surface, context, x1, y1, x2, y2);
 }
 
 static void *
 eng_polygon_point_add(void *data, void *context, void *polygon, int x, int y)
 {
-   NOT_IMPLEMENTED();
-   return NULL;
-//   return evas_common_polygon_point_add(polygon, x, y);
+   return evas_common_polygon_point_add(polygon, x, y);
 }
 
 static void *
 eng_polygon_points_clear(void *data, void *context, void *polygon)
 {
-   NOT_IMPLEMENTED();
-   return NULL;
-//   return evas_common_polygon_points_clear(polygon);
+   return evas_common_polygon_points_clear(polygon);
 }
 
 static void
 eng_polygon_draw(void *data, void *context, void *surface, void *polygon)
 {
-   NOT_IMPLEMENTED();
-//   evas_common_polygon_draw(surface, context, polygon);
-//   evas_common_cpu_end_opt();
+   soft16_polygon_draw(surface, context, polygon);
 }
 
 static void *
===
RCS file: /cvs/e/e17/libs/evas/src/modules/engines/software_16/evas_soft16.h,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -3 -r1.9 -r1.10
--- evas_soft16.h   10 Oct 2007 19:22:26 -  1.9
+++ evas_soft16.h   25 Oct 2007 16:17:18 -  1.10
@@ -105,6 +105,18 @@
  */
 void soft16_rectangle_draw(Soft16_Image *dst, RGBA_Draw_Context *dc, int x, 
int y, int w, int h);
 
+/**
+ * Polygon (evas_soft16_polygon.c)
+ */
+void
+soft16_polygon_draw(Soft16_Image *dst, RGBA_Draw_Context *dc, 
RGBA_Polygon_Point *points);
+
+/**
+ * Line (evas_soft16_line.c)
+ */
+void
+soft16_line_draw(Soft16_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, int 
x1, int y1);
+
 
 /**
  * Font (evas_soft16_font.c)
===
RCS file: 
/cvs/e/e17/libs/evas/src/modules/engines/software_16/evas_soft16_dither_mask.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -3 -r1.3 -r1.4
--- evas_soft16_dither_mask.c   10 Oct 2007 19:22:26 -  1.3
+++ evas_soft16_dither_mask.c   25 Oct 2007 16:17:18 -  1.4
@@ -283,7 +283,7 @@
 {
const DATA32 *sp;
DATA16 *dp;
-   int x, y, pad;
+   int y, pad;
 
sp = src;
dp = im->pixels;
===
RCS file: 
/cvs/e/e17/libs/evas/src/modules/engines/software_16/evas_soft16_main.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -3 -r1.14 -r1.1

E CVS: libs/evas barbieri

2007-10-11 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : barbieri
Project : e17
Module  : libs/evas

Dir : e17/libs/evas/src/modules/engines/software_16_x11


Modified Files:
evas_engine.c 


Log Message:
XSync to avoid flicker

===
RCS file: 
/cvs/e/e17/libs/evas/src/modules/engines/software_16_x11/evas_engine.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -3 -r1.5 -r1.6
--- evas_engine.c   7 Aug 2007 19:09:53 -   1.5
+++ evas_engine.c   11 Oct 2007 14:43:05 -  1.6
@@ -524,7 +524,7 @@
else return;
 
evas_software_x11_x_output_buffer_paste
- (re->shbuf, re->draw, re->gc, 0, 0, re->shbuf->im.w, re->shbuf->im.h, 0);
+ (re->shbuf, re->draw, re->gc, 0, 0, re->shbuf->im.w, re->shbuf->im.h, 1);
XSetClipMask(re->disp, re->gc, None);
 }
 



-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
___
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs


E CVS: libs/evas barbieri

2007-10-10 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : barbieri
Project : e17
Module  : libs/evas

Dir : e17/libs/evas/src/modules/engines/software_16


Modified Files:
evas_soft16.h evas_soft16_dither_mask.c evas_soft16_font.c 
evas_soft16_image_scaled_sampled.c 
evas_soft16_image_unscaled.c evas_soft16_rectangle.c 
evas_soft16_scanline_blend.c 


Log Message:
Major rework of blit operations to use pre-multiplied colors.

I wrote the first version thinking on regular, non-pre multiplied
colors, but raster pointed out that all color data is pre-multiplied
inside Evas. I was blaming 16bpp for low quality graphics, but it
turned out that was an error with my usage.

If you experienced grayish colors when using transparency, or white
turning into black while fading out, then these should be fixed now.

Now everything looks better, brighter! :-)  Expedite shows no
performance regressions, but I'd like to see more tests on
that. Please report any issue.

===
RCS file: /cvs/e/e17/libs/evas/src/modules/engines/software_16/evas_soft16.h,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -3 -r1.8 -r1.9
--- evas_soft16.h   3 Aug 2007 23:11:56 -   1.8
+++ evas_soft16.h   10 Oct 2007 19:22:26 -  1.9
@@ -12,6 +12,8 @@
   rgb) & RGB_565_UNPACKED_MASK) |   \
((rgb) & RGB_565_UNPACKED_MASK) >> 16) & 0x)
 #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)\
===
RCS file: 
/cvs/e/e17/libs/evas/src/modules/engines/software_16/evas_soft16_dither_mask.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -3 -r1.2 -r1.3
--- evas_soft16_dither_mask.c   20 Jul 2007 17:29:31 -  1.2
+++ evas_soft16_dither_mask.c   10 Oct 2007 19:22:26 -  1.3
@@ -142,29 +142,48 @@
 _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, r, g, b, a, dith5, dith6, dith;
+   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);
 
-   r = orig_r >> 3;
-   g = orig_g >> 2;
-   b = orig_b >> 3;
-   a = orig_a >> 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++;
-   if (((orig_a - (a << 3)) >= dith5) && (a < 0x1f)) a++;
+   if (orig_a == 255)
+ {
+   DATA8 dith5, dith6, dith, r, g, b;
 
-   *dst = (r << 11) | (g << 5) | b;
-   *alpha = a;
+   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
===
RCS file: 
/cvs/e/e17/libs/evas/src/modules/engines/software_16/evas_soft16_font.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -3 -r1.2 -r1.3
--- evas_soft16_font.c  20 Jun 2007 19:10:15 -  1.2
+++ evas_soft16_font.c  10 Oct 2007 19:22:26 -  1.3
@@ -1,4 +1,5 @@
 #include "evas_soft16.h"
+#include "evas_soft16_scanline_blend.c"
 
 static inline void
 _glyph_pt_mask_solid_solid(DATA16 *dst,
@@ -6,15 +7,15 @@
   const DATA32 rgb565_unpack,
   const DATA8 *mask)
 {
-   DATA8 alpha = *mask;
+   DATA8 alpha = *mask >> 3;
 
-   if (alpha == 255) *dst = rgb565;
-   else if (alpha > 8)
+   if (alpha == 31) *dst = rgb565;
+   else if (alpha > 0)
  {
DATA32 d;
 
d = RGB_565_UNPACK(*dst);
-   d = RGB_565_UNPACKED_BLEND(rgb565_unpack, d, alpha >> 3);
+   d = RGB_565_UNPACKED_BLEND_UNMUL(rgb565_unpack, d, alpha);
*dst = RGB_565_PACK(d);
  }
 }
@@ -51,29 +52,24 @@
 
 static inline vo

E CVS: libs/evas barbieri

2007-10-05 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : barbieri
Project : e17
Module  : libs/evas

Dir : e17/libs/evas/src/modules/engines/software_sdl


Modified Files:
evas_engine.c 


Log Message:
Revert SDL changes, I was already commited.

===
RCS file: /cvs/e/e17/libs/evas/src/modules/engines/software_sdl/evas_engine.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -3 -r1.7 -r1.8
--- evas_engine.c   5 Oct 2007 05:47:58 -   1.7
+++ evas_engine.c   5 Oct 2007 14:35:39 -   1.8
@@ -177,8 +177,6 @@
 
SDL_FillRect(re->surface, NULL, 0);
 
-   memset(re->surface->pixels, 0, w * h * 4);
-
/* Destroy the copy */
evas_cache_engine_image_drop(eim);
 }
@@ -257,13 +255,6 @@
 
SDL_FillRect(re->surface, &rect, 0);
 
-   rect.x = *x;
-   rect.y = *y;
-   rect.w = *w;
-   rect.h = *h;
-
-   SDL_FillRect(re->surface, &rect, 0);
-
/* Return the "fake" surface so it is passed to the drawing routines. */
return re->rgba_engine_image;
 }
@@ -323,7 +314,7 @@
 static void*
 evas_engine_sdl_image_load(void *data, const char *file, const char *key, int 
*error, Evas_Image_Load_Opts *lo)
 {
-   Render_Engine*  re = (Render_Engine*) data;;
+   Render_Engine*  re = (Render_Engine*) data;
 
*error = 0;
return evas_cache_engine_image_request(re->cache, file, key, lo, NULL, 
error);
@@ -849,8 +840,6 @@
  }
 
SDL_FillRect(re->surface, NULL, 0);
-
-   memset(re->surface->pixels, 0, w * h * 4);
 
re->alpha = alpha;
re->hwsurface = hwsurface;



-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
___
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs


E CVS: libs/evas barbieri

2007-09-28 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : barbieri
Project : e17
Module  : libs/evas

Dir : e17/libs/evas/src/modules/engines/software_sdl


Modified Files:
evas_engine.c 


Log Message:
Oops, re->surface, not re->surface->pixels.

===
RCS file: /cvs/e/e17/libs/evas/src/modules/engines/software_sdl/evas_engine.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -3 -r1.5 -r1.6
--- evas_engine.c   26 Sep 2007 14:00:14 -  1.5
+++ evas_engine.c   28 Sep 2007 12:50:52 -  1.6
@@ -839,7 +839,7 @@
 exit(-1);
  }
 
-   SDL_FillRect(re->surface->pixels, NULL, 0);
+   SDL_FillRect(re->surface, NULL, 0);
 
re->alpha = alpha;
re->hwsurface = hwsurface;



-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs


E CVS: libs/evas barbieri

2007-09-26 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : barbieri
Project : e17
Module  : libs/evas

Dir : e17/libs/evas/src/modules/engines/software_sdl


Modified Files:
evas_engine.c 


Log Message:
SDL improvements.

Patch by Cedric BAIL (with minor changes).

===
RCS file: /cvs/e/e17/libs/evas/src/modules/engines/software_sdl/evas_engine.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -3 -r1.4 -r1.5
--- evas_engine.c   14 Aug 2007 12:49:10 -  1.4
+++ evas_engine.c   26 Sep 2007 14:00:14 -  1.5
@@ -130,7 +130,6 @@
 
if (re->update_rects)
  free(re->update_rects);
-   memset(re, sizeof (Render_Engine), 0);
free(re);
 
evas_common_font_shutdown();
@@ -176,6 +175,8 @@
exit(-1);
  }
 
+   SDL_FillRect(re->surface, NULL, 0);
+
/* Destroy the copy */
evas_cache_engine_image_drop(eim);
 }
@@ -217,8 +218,9 @@
 int *x, int *y, int *w, int *h,
 int *cx, int *cy, int *cw, int 
*ch)
 {
-   Render_Engine*  re = (Render_Engine*) data;
-   Tilebuf_Rect*   tb_rect = NULL;
+   Render_Engine* re = (Render_Engine*) data;
+   Tilebuf_Rect*  tb_rect;
+   SDL_Rect rect;
 
if (re->end)
  {
@@ -246,6 +248,13 @@
re->end = 1;
  }
 
+   rect.x = *x;
+   rect.y = *y;
+   rect.w = *w;
+   rect.h = *h;
+
+   SDL_FillRect(re->surface, &rect, 0);
+
/* Return the "fake" surface so it is passed to the drawing routines. */
return re->rgba_engine_image;
 }
@@ -829,6 +838,8 @@
fprintf(stderr, "RGBA_Image allocation from SDL failed\n");
 exit(-1);
  }
+
+   SDL_FillRect(re->surface->pixels, NULL, 0);
 
re->alpha = alpha;
re->hwsurface = hwsurface;



-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs


E CVS: libs/evas barbieri

2007-09-25 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : barbieri
Project : e17
Module  : libs/evas

Dir : e17/libs/evas/src/lib/canvas


Modified Files:
evas_object_main.c 


Log Message:
Reorder emission of EVAS_CALLBACK_FREE event.

Now EVAS_CALLBACK_FREE is emitted after smart object's "del"
implementation, this way bindings/wrappers can observe this event in
order to release its wrappers and be sure that they'll not be used
anymore.

Please check your existing code to see if you don't rely on the old
behavior.

===
RCS file: /cvs/e/e17/libs/evas/src/lib/canvas/evas_object_main.c,v
retrieving revision 1.58
retrieving revision 1.59
diff -u -3 -r1.58 -r1.59
--- evas_object_main.c  22 Aug 2007 16:45:37 -  1.58
+++ evas_object_main.c  25 Sep 2007 13:33:12 -  1.59
@@ -478,11 +478,11 @@
obj->layer->evas->pointer.mouse_grabbed -= obj->mouse_grabbed;
obj->mouse_grabbed = 0;
evas_object_hide(obj);
-   evas_object_event_callback_call(obj, EVAS_CALLBACK_FREE, NULL);
evas_object_grabs_cleanup(obj);
while (obj->clip.clipees) evas_object_clip_unset(obj->clip.clipees->data);
if (obj->cur.clipper) evas_object_clip_unset(obj);
if (obj->smart.smart) evas_object_smart_del(obj);
+   evas_object_event_callback_call(obj, EVAS_CALLBACK_FREE, NULL);
evas_object_smart_cleanup(obj);
obj->delete_me = 1;
evas_object_change(obj);



-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs


E CVS: libs/evas barbieri

2007-09-17 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : barbieri
Project : e17
Module  : libs/evas

Dir : e17/libs/evas/src/modules/engines/software_16


Modified Files:
evas_soft16_image_scaled_sampled.c 


Log Message:
Damn, wrong copy&paste fix.

===
RCS file: 
/cvs/e/e17/libs/evas/src/modules/engines/software_16/evas_soft16_image_scaled_sampled.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- evas_soft16_image_scaled_sampled.c  21 Jun 2007 19:57:56 -  1.1
+++ evas_soft16_image_scaled_sampled.c  17 Sep 2007 21:11:43 -  1.2
@@ -370,6 +370,7 @@
  (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;



-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs


E CVS: libs/evas barbieri

2007-09-13 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : barbieri
Project : e17
Module  : libs/evas

Dir : e17/libs/evas/src/lib/engines/common


Modified Files:
evas_blit_main.c 


Log Message:
Use correct type size for conversion between integer and pointer.

By: Brett Nash (dereference-ints-all-bad.patch)

===
RCS file: /cvs/e/e17/libs/evas/src/lib/engines/common/evas_blit_main.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -3 -r1.7 -r1.8
--- evas_blit_main.c16 Jul 2007 07:29:34 -  1.7
+++ evas_blit_main.c13 Sep 2007 14:35:01 -  1.8
@@ -142,11 +142,11 @@
 {
DATA32 *dst_end, *dst_end_pre;
 #ifdef ALIGN_FIX
-   int src_align;
-   int dst_align;
+   intptr_t src_align;
+   intptr_t dst_align;
 
-   src_align = (int)src & 0x3f; /* 64 byte alignment */
-   dst_align = (int)dst & 0x3f; /* 64 byte alignment */
+   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))
@@ -185,11 +185,11 @@
 {
DATA32 *dst_end, *dst_end_pre;
 #ifdef ALIGN_FIX
-   int src_align;
-   int dst_align;
+   intptr_t src_align;
+   intptr_t dst_align;
 
-   src_align = (int)src & 0x3f; /* 64 byte alignment */
-   dst_align = (int)dst & 0x3f; /* 64 byte alignment */
+   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))



-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs


E CVS: libs/evas barbieri

2007-09-13 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : barbieri
Project : e17
Module  : libs/evas

Dir : e17/libs/evas/src/modules/engines/fb


Modified Files:
evas_fb_main.c 


Log Message:
Cosmetic: use correct size for comparison of pointers.

By: Brett Nash (mode-mem.patch)

===
RCS file: /cvs/e/e17/libs/evas/src/modules/engines/fb/evas_fb_main.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -3 -r1.6 -r1.7
--- evas_fb_main.c  13 Mar 2007 23:10:59 -  1.6
+++ evas_fb_main.c  13 Sep 2007 14:31:50 -  1.7
@@ -535,7 +535,7 @@
   mode->mem_offset = (unsigned)(fb_fix.smem_start) & (getpagesize()-1);
   mode->mem = (unsigned char *)mmap(NULL, fb_fix.smem_len + mode->mem_offset,
 PROT_WRITE | PROT_READ, MAP_SHARED, fb, 0);
-  if ((int)mode->mem == -1)
+  if ((intptr_t)mode->mem == -1)
 {
   perror("mmap");
   fb_cleanup();



-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs


E CVS: libs/evas barbieri

2007-09-13 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : barbieri
Project : e17
Module  : libs/evas

Dir : e17/libs/evas/src/lib/canvas


Modified Files:
evas_object_intercept.c 


Log Message:
Fix bug of type truncation on 64bits platform.

Returning a pointer (possible 64bits) where an integer (possible
32bits) is expected may truncate the type, returning just one part
that may be full "0", leading to incorrect behavior. This fix checks
against NULL and resulting value is either 0 or 1.

By: Brett Nash (kill-a-1-in-4-billion-crash.patch)

===
RCS file: /cvs/e/e17/libs/evas/src/lib/canvas/evas_object_intercept.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -3 -r1.10 -r1.11
--- evas_object_intercept.c 22 Aug 2007 16:45:37 -  1.10
+++ evas_object_intercept.c 13 Sep 2007 14:28:32 -  1.11
@@ -54,7 +54,7 @@
if (!obj->interceptors) return 0;
if (obj->intercepted) return 0;
obj->intercepted = 1;
-   ret = (int)obj->interceptors->show.func;
+   ret = ((obj->interceptors->show.func) != NULL);
if (obj->interceptors->show.func)
  obj->interceptors->show.func(obj->interceptors->show.data, obj);
obj->intercepted = 0;
@@ -70,7 +70,7 @@
if (!obj->interceptors) return 0;
if (obj->intercepted) return 0;
obj->intercepted = 1;
-   ret = (int)obj->interceptors->hide.func;
+   ret = ((obj->interceptors->hide.func) != NULL);
if (obj->interceptors->hide.func)
  obj->interceptors->hide.func(obj->interceptors->hide.data, obj);
obj->intercepted = 0;
@@ -86,7 +86,7 @@
if (!obj->interceptors) return 0;
if (obj->intercepted) return 0;
obj->intercepted = 1;
-   ret = (int)obj->interceptors->move.func;
+   ret = ((obj->interceptors->move.func) != NULL);
if (obj->interceptors->move.func)
  obj->interceptors->move.func(obj->interceptors->move.data, obj, x, y);
obj->intercepted = 0;
@@ -102,7 +102,7 @@
if (!obj->interceptors) return 0;
if (obj->intercepted) return 0;
obj->intercepted = 1;
-   ret = (int)obj->interceptors->resize.func;
+   ret = ((obj->interceptors->resize.func) != NULL);
if (obj->interceptors->resize.func)
  obj->interceptors->resize.func(obj->interceptors->resize.data, obj, w, h);
obj->intercepted = 0;
@@ -118,7 +118,7 @@
if (!obj->interceptors) return 0;
if (obj->intercepted) return 0;
obj->intercepted = 1;
-   ret = (int)obj->interceptors->raise.func;
+   ret = ((obj->interceptors->raise.func) != NULL);
if (obj->interceptors->raise.func)
  obj->interceptors->raise.func(obj->interceptors->raise.data, obj);
obj->intercepted = 0;
@@ -134,7 +134,7 @@
if (!obj->interceptors) return 0;
if (obj->intercepted) return 0;
obj->intercepted = 1;
-   ret = (int)obj->interceptors->lower.func;
+   ret = ((obj->interceptors->lower.func) != NULL);
if (obj->interceptors->lower.func)
  obj->interceptors->lower.func(obj->interceptors->lower.data, obj);
obj->intercepted = 0;
@@ -150,7 +150,7 @@
if (!obj->interceptors) return 0;
if (obj->intercepted) return 0;
obj->intercepted = 1;
-   ret = (int)obj->interceptors->stack_above.func;
+   ret = ((obj->interceptors->stack_above.func) != NULL);
if (obj->interceptors->stack_above.func)
  obj->interceptors->stack_above.func(obj->interceptors->stack_above.data, 
obj, above);
obj->intercepted = 0;
@@ -166,7 +166,7 @@
if (!obj->interceptors) return 0;
if (obj->intercepted) return 0;
obj->intercepted = 1;
-   ret = (int)obj->interceptors->stack_below.func;
+   ret = ((obj->interceptors->stack_below.func) != NULL);
if (obj->interceptors->stack_below.func)
  obj->interceptors->stack_below.func(obj->interceptors->stack_below.data, 
obj, below);
obj->intercepted = 0;
@@ -182,7 +182,7 @@
if (!obj->interceptors) return 0;
if (obj->intercepted) return 0;
obj->intercepted = 1;
-   ret = (int)obj->interceptors->layer_set.func;
+   ret = ((obj->interceptors->layer_set.func) != NULL);
if (obj->interceptors->layer_set.func)
  obj->interceptors->layer_set.func(obj->interceptors->layer_set.data, obj, 
l);
obj->intercepted = 0;
@@ -198,7 +198,7 @@
if (!obj->interceptors) return 0;
if (obj->intercepted) return 0;
obj->intercepted = 1;
-   ret = (int)obj->interceptors->color_set.func;
+   ret = ((obj->interceptors->color_set.func) != NULL);
if (obj->interceptors->color_set.func)
  obj->interceptors->color_set.func(obj->interceptors->color_set.data, obj, 
r, g, b, a);
obj->intercepted = 0;
@@ -214,7 +214,7 @@
if (!obj->interceptors) return 0;
if (obj->intercepted) return 0;
obj->intercepted = 1;
-   ret = (int)obj->interceptors->clip_set.func;
+   ret = ((obj->interceptors->clip_set.func) != NULL);
if (obj->interceptors->clip_set.func)
  obj->interceptors->clip_set.func(obj->interceptors->clip_set.data, obj, 
clip);
obj->intercepted = 0;
@@ -230,7 +230,7 @@
if 

E CVS: libs/evas barbieri

2007-09-13 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : barbieri
Project : e17
Module  : libs/evas

Dir : e17/libs/evas/src/lib/engines/common


Modified Files:
evas_font_main.c 


Log Message:
Fix typo that leads to incorrect behavior.

By: Brett Nash (iindex-to-many-is.patch)

===
RCS file: /cvs/e/e17/libs/evas/src/lib/engines/common/evas_font_main.c,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -3 -r1.29 -r1.30
--- evas_font_main.c27 Jun 2007 14:56:14 -  1.29
+++ evas_font_main.c13 Sep 2007 14:24:15 -  1.30
@@ -185,7 +185,7 @@
int index = *iindex, len, r;
unsigned char d, d2, d3, d4;
 
-   if (iindex <= 0)
+   if (index <= 0)
  return 0;
d = buf[index--];




-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs


E CVS: libs/evas barbieri

2007-09-13 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : barbieri
Project : e17
Module  : libs/evas

Dir : e17/libs/evas/src/lib/engines/common


Modified Files:
evas_convert_main.c 


Log Message:
Cosmetic: use correct size for comparison of pointers.

Due the comparions, the code worked fine, but use the correct type
size so it's cleaner.

By: Brett Nash (compare-whole-pointer.patch)

===
RCS file: /cvs/e/e17/libs/evas/src/lib/engines/common/evas_convert_main.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -3 -r1.8 -r1.9
--- evas_convert_main.c 2 Mar 2007 14:51:16 -   1.8
+++ evas_convert_main.c 13 Sep 2007 14:19:30 -  1.9
@@ -202,7 +202,7 @@
 #ifdef BUILD_CONVERT_16_RGB_ROT0
  if (rotation == 0)
{
-  if ((!(w & 0x1)) && (!((int)dest & 0x3)))
+  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;
@@ -211,7 +211,7 @@
 #ifdef BUILD_CONVERT_16_RGB_ROT180
  if (rotation == 180)
{
-  if ((!(w & 0x1)) && (!((int)dest & 0x3)))
+  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;
@@ -220,7 +220,7 @@
 #ifdef BUILD_CONVERT_16_RGB_ROT270
  if (rotation == 270)
{
-  if ((!(w & 0x1)) && (!((int)dest & 0x3)))
+  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;
@@ -229,7 +229,7 @@
 #ifdef BUILD_CONVERT_16_RGB_ROT90
  if (rotation == 90)
{
-  if ((!(w & 0x1)) && (!((int)dest & 0x3)))
+  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;
@@ -243,7 +243,7 @@
 #ifdef BUILD_CONVERT_16_RGB_ROT0
  if (rotation == 0)
{
-  if ((!(w & 0x1)) && (!((int)dest & 0x3)))
+  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;
@@ -252,7 +252,7 @@
 #ifdef BUILD_CONVERT_16_RGB_ROT180
  if (rotation == 180)
{
-  if ((!(w & 0x1)) && (!((int)dest & 0x3)))
+  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;
@@ -261,7 +261,7 @@
 #ifdef BUILD_CONVERT_16_RGB_ROT270
  if (rotation == 270)
{
-  if ((!(w & 0x1)) && (!((int)dest & 0x3)))
+  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;
@@ -270,7 +270,7 @@
 #ifdef BUILD_CONVERT_16_RGB_ROT90
  if (rotation == 90)
{
-  if ((!(w & 0x1)) && (!((int)dest & 0x3)))
+  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;
@@ -284,7 +284,7 @@
 #ifdef BUILD_CONVERT_16_RGB_ROT0
  if (rotation == 0)
{
-  if ((!(w & 0x1)) && (!((int)dest & 0x3)))
+  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;
@@ -293,7 +293,7 @@
 #ifdef BUILD_CONVERT_16_RGB_ROT180
  if (rotation == 180)
{
-  if ((!(w & 0x1)) && (!((int)dest & 0x3)))
+  if ((!(w & 0x1)) &

E CVS: libs/evas barbieri

2007-09-13 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : barbieri
Project : e17
Module  : libs/evas

Dir : e17/libs/evas/src/lib/engines/common


Modified Files:
evas_draw_main.c 


Log Message:
Use C89 prototype.

By: Brett Nash (c89-is-18-years-old-lets-use-it.patch)

===
RCS file: /cvs/e/e17/libs/evas/src/lib/engines/common/evas_draw_main.c,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -3 -r1.22 -r1.23
--- evas_draw_main.c30 Apr 2007 04:23:47 -  1.22
+++ evas_draw_main.c13 Sep 2007 14:14:37 -  1.23
@@ -1,7 +1,7 @@
 #include "evas_common.h"
 
 EAPI Cutout_Rects*
-evas_common_draw_context_cutouts_new()
+evas_common_draw_context_cutouts_new(void)
 {
Cutout_Rects *rects;
 



-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs


E CVS: libs/evas barbieri

2007-09-13 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : barbieri
Project : e17
Module  : libs/evas

Dir : e17/libs/evas/src/modules/engines/software_x11


Modified Files:
evas_outbuf.c 


Log Message:
Do not free NULL graphic context.

By: Brett Nash (freegc-crash.patch)

===
RCS file: /cvs/e/e17/libs/evas/src/modules/engines/software_x11/evas_outbuf.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -3 -r1.11 -r1.12
--- evas_outbuf.c   16 Jul 2007 07:25:34 -  1.11
+++ evas_outbuf.c   13 Sep 2007 13:43:38 -  1.12
@@ -13,7 +13,8 @@
 evas_software_x11_outbuf_free(Outbuf * buf)
 {
evas_software_x11_outbuf_flush(buf);
-   XFreeGC(buf->priv.x.disp, buf->priv.x.gc);
+   if (buf->priv.x.gc)
+  XFreeGC(buf->priv.x.disp, buf->priv.x.gc);
if (buf->priv.x.gcm)
   XFreeGC(buf->priv.x.disp, buf->priv.x.gcm);
if (buf->priv.pal)



-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs


E CVS: libs/evas barbieri

2007-08-20 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : barbieri
Project : e17
Module  : libs/evas

Dir : e17/libs/evas/src/modules/engines/direct3d


Modified Files:
Makefile.am 


Log Message:
Unix is case sensitive.

===
RCS file: /cvs/e/e17/libs/evas/src/modules/engines/direct3d/Makefile.am,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- Makefile.am 17 Aug 2007 09:12:22 -  1.1
+++ Makefile.am 20 Aug 2007 15:48:16 -  1.2
@@ -20,7 +20,7 @@
 module_la_LDFLAGS = @create_shared_lib@ -module -avoid-version 
-L$(top_builddir)/src/lib -L$(top_builddir)/src/lib/.libs
 module_la_DEPENDENCIES = $(top_builddir)/config.h
 
-include_HEADERS = Evas_Engine_Direct3d.h
+include_HEADERS = Evas_Engine_Direct3D.h
 
 endif
 
@@ -30,4 +30,4 @@
 evas_outbuf.c \
 evas_direct3d_buffer.c \
 evas_direct3d_main.cpp \
-Evas_Engine_Direct3d.h
+Evas_Engine_Direct3D.h



-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
___
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs


E CVS: libs/evas barbieri

2007-08-14 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : barbieri
Project : e17
Module  : libs/evas

Dir : e17/libs/evas


Modified Files:
Makefile.am configure.in 
Added Files:
evas-software-16-x11.pc.in 


Log Message:
software-16-x11 available with pkg-config

===
RCS file: /cvs/e/e17/libs/evas/Makefile.am,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -3 -r1.42 -r1.43
--- Makefile.am 16 Jul 2007 08:13:40 -  1.42
+++ Makefile.am 14 Aug 2007 20:21:05 -  1.43
@@ -16,6 +16,7 @@
   evas-software-buffer.pc \
   evas-software-qtopia.pc \
   evas-software-x11.pc \
+  evas-software-16-x11.pc \
   evas-software-xcb.pc \
   evas-xrender-x11.pc \
   evas-xrender-xcb.pc \
@@ -39,6 +40,7 @@
 evas-software-buffer.pc \
 evas-software-qtopia.pc \
 evas-software-x11.pc \
+evas-software-16-x11.pc \
 evas-software-xcb.pc \
 evas-xrender-x11.pc \
 evas-xrender-xcb.pc \
@@ -78,6 +80,10 @@
 psoftwarex11 = evas-software-x11.pc
 endif
 
+if BUILD_ENGINE_SOFTWARE_16_X11
+psoftware16x11 = evas-software-16-x11.pc
+endif
+
 if BUILD_ENGINE_SOFTWARE_XCB
 psoftwarexcb = evas-software-xcb.pc
 endif
@@ -130,4 +136,5 @@
 pkgconfig_DATA = \
evas.pc $(psoftwarex11) $(psoftwarexcb) $(pdirectfb) $(pframebuffer) \
$(psoftwarebuffer) $(psoftwareqtopia) $(popenglx11) $(pcairox11) \
-   $(pxrenderx11) $(pxrenderxcb) $(pglitzx11) $(psoftwareddraw) $(psdl)
+   $(pxrenderx11) $(pxrenderxcb) $(pglitzx11) $(psoftwareddraw) $(psdl) \
+   $(psoftware16x11)
===
RCS file: /cvs/e/e17/libs/evas/configure.in,v
retrieving revision 1.227
retrieving revision 1.228
diff -u -3 -r1.227 -r1.228
--- configure.in7 Aug 2007 10:18:51 -   1.227
+++ configure.in14 Aug 2007 20:21:05 -  1.228
@@ -2142,6 +2142,7 @@
 evas-software-buffer.pc
 evas-software-qtopia.pc
 evas-software-x11.pc
+evas-software-16-x11.pc
 evas-software-xcb.pc
 evas-xrender-x11.pc
 evas-xrender-xcb.pc



-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
___
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs


E CVS: libs/evas barbieri

2007-08-07 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : barbieri
Project : e17
Module  : libs/evas

Dir : e17/libs/evas/src/modules/engines/software_16_x11


Modified Files:
Evas_Engine_Software_16_X11.h evas_engine.c 


Log Message:
Software 16 X11 now does rotation.

===
RCS file: 
/cvs/e/e17/libs/evas/src/modules/engines/software_16_x11/Evas_Engine_Software_16_X11.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- Evas_Engine_Software_16_X11.h   29 Apr 2007 15:45:40 -  1.1
+++ Evas_Engine_Software_16_X11.h   7 Aug 2007 19:09:53 -   1.2
@@ -15,6 +15,7 @@
struct {
   Display  *display;
   Drawable  drawable;
+  int rotation;
} info;
 };
 #endif
===
RCS file: 
/cvs/e/e17/libs/evas/src/modules/engines/software_16_x11/evas_engine.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -3 -r1.4 -r1.5
--- evas_engine.c   18 Jun 2007 17:48:14 -  1.4
+++ evas_engine.c   7 Aug 2007 19:09:53 -   1.5
@@ -15,11 +15,12 @@
Display  *disp;
Drawable  draw;
GCgc;
-   int   w, h;
+   int   w, h, rot;
Tilebuf  *tb;
Tilebuf_Rect *rects;
Tilebuf_Rect *cur_rect;
X_Output_Buffer  *shbuf;
+   Soft16_Image *tmp_out; /* used by indirect render, like rotation */
Regionclip_rects;
unsigned char end : 1;
unsigned char shm : 1;
@@ -64,6 +65,52 @@
 }
 
 static void
+_tmp_out_free(Soft16_Image *tmp_out)
+{
+   free(tmp_out->pixels);
+   free(tmp_out);
+}
+
+static void
+_tmp_out_alloc(Render_Engine *re)
+{
+   Tilebuf_Rect *r;
+   int w = 0, h = 0;
+
+   for (r = re->rects; r; r = (Tilebuf_Rect *)(r->_list_data.next))
+ {
+   if (r->w > w) w = r->w;
+   if (r->h > h) h = r->h;
+ }
+
+   if (re->tmp_out)
+ {
+   if ((re->tmp_out->w < w) || (re->tmp_out->h < h))
+ {
+_tmp_out_free(re->tmp_out);
+re->tmp_out = NULL;
+ }
+ }
+
+   if (!re->tmp_out)
+ {
+   Soft16_Image *im;
+
+   im = calloc(1, sizeof(Soft16_Image));
+   im->w = w;
+   im->h = h;
+   im->stride = w + ((w % 4) ? (4 - (w % 4)) : 0);
+   im->have_alpha = 0;
+   im->references = 1;
+   im->free_pixels = 1;
+   im->pixels = malloc(h * im->stride * sizeof(DATA16));
+
+   re->tmp_out = im;
+ }
+}
+
+
+static void
 eng_setup(Evas *e, void *in)
 {
Render_Engine *re;
@@ -106,6 +153,7 @@
re->gc = XCreateGC(re->disp, re->draw, 0, &gcv);
re->w = e->output.w;
re->h = e->output.h;
+   re->rot = info->info.rotation;
re->tb = evas_common_tilebuf_new(e->output.w, e->output.h);
if (re->tb)
  evas_common_tilebuf_set_tile_size(re->tb, TILESIZE, TILESIZE);
@@ -125,9 +173,15 @@
re->gc = XCreateGC(re->disp, re->draw, 0, &gcv);
re->w = e->output.w;
re->h = e->output.h;
+   re->rot = info->info.rotation;
re->tb = evas_common_tilebuf_new(e->output.w, e->output.h);
if (re->tb)
  evas_common_tilebuf_set_tile_size(re->tb, TILESIZE, TILESIZE);
+   if (re->tmp_out)
+ {
+_tmp_out_free(re->tmp_out);
+re->tmp_out = NULL;
+ }
  }
if (!e->engine.data.output) return;
/* add a draw context if we dont have one */
@@ -149,6 +203,7 @@
if (re->gc) XFreeGC(re->disp, re->gc);
if (re->tb) evas_common_tilebuf_free(re->tb);
if (re->rects) evas_common_tilebuf_free_render_rects(re->rects);
+   if (re->tmp_out) _tmp_out_free(re->tmp_out);
free(re);
 
evas_common_font_shutdown();
@@ -180,6 +235,11 @@
XDestroyRegion(re->clip_rects);
re->clip_rects = NULL;
  }
+   if (re->tmp_out)
+ {
+   _tmp_out_free(re->tmp_out);
+   re->tmp_out = NULL;
+ }
 }
 
 static void
@@ -218,6 +278,29 @@
evas_common_tilebuf_clear(re->tb);
 }
 
+static inline void
+_output_buffer_alloc(Render_Engine *re)
+{
+   int w, h;
+   if (re->shbuf) return;
+
+   if ((re->rot == 0) || (re->rot == 180))
+ {
+   w = re->w;
+   h = re->h;
+ }
+   else
+ {
+   w = re->h;
+   h = re->w;
+ }
+
+   re->shbuf = evas_software_x11_x_output_buffer_new
+ (re->disp, DefaultVisual(re->disp, DefaultScreen(re->disp)),
+  DefaultDepth(re->disp, DefaultScreen(re->disp)),
+  w, h, 1, NULL);
+}
+
 static void *
 eng_output_redraws_next_update_get(void *data, int *x, int *y, int *w, int *h, 
int *cx, int *cy, int *cw, int *ch)
 {
@@ -237,11 +320,8 @@
if (!re->rects) return NULL;
 
re->cur_rect = re->rects;
-   if (!re->shbuf)
- re->shbuf = evas_software_x11_x_output_buffer_new
- (re->disp, DefaultVisual(re->disp, DefaultScreen(re->disp)),
-  DefaultDepth(re->disp, DefaultScreen(re->disp)),
-  re->w, 

E CVS: libs/evas barbieri

2007-08-03 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : barbieri
Project : e17
Module  : libs/evas

Dir : e17/libs/evas/src/modules/engines/software_16


Modified Files:
evas_engine.c evas_soft16.h evas_soft16_main.c 


Log Message:
Implement extra operations for image.

I tried to get those right, but I'd like someone else to review these.

===
RCS file: /cvs/e/e17/libs/evas/src/modules/engines/software_16/evas_engine.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -3 -r1.7 -r1.8
--- evas_engine.c   23 Jul 2007 14:22:57 -  1.7
+++ evas_engine.c   3 Aug 2007 23:11:56 -   1.8
@@ -10,6 +10,11 @@
  *
  */
 
+#define NOT_IMPLEMENTED()   \
+   fprintf(stderr, "NOT_IMPLEMENTED: %s() at %s:%d\n",  \
+   __FUNCTION__, __FILE__, __LINE__)
+
+
 static int cpunum = 0;
 
 static void *
@@ -149,6 +154,7 @@
 static void
 eng_line_draw(void *data, void *context, void *surface, int x1, int y1, int 
x2, int y2)
 {
+   NOT_IMPLEMENTED();
 //   evas_common_line_draw(surface, context, x1, y1, x2, y2);
 //   evas_common_cpu_end_opt();
 }
@@ -156,6 +162,7 @@
 static void *
 eng_polygon_point_add(void *data, void *context, void *polygon, int x, int y)
 {
+   NOT_IMPLEMENTED();
return NULL;
 //   return evas_common_polygon_point_add(polygon, x, y);
 }
@@ -163,6 +170,7 @@
 static void *
 eng_polygon_points_clear(void *data, void *context, void *polygon)
 {
+   NOT_IMPLEMENTED();
return NULL;
 //   return evas_common_polygon_points_clear(polygon);
 }
@@ -170,6 +178,7 @@
 static void
 eng_polygon_draw(void *data, void *context, void *surface, void *polygon)
 {
+   NOT_IMPLEMENTED();
 //   evas_common_polygon_draw(surface, context, polygon);
 //   evas_common_cpu_end_opt();
 }
@@ -177,6 +186,7 @@
 static void *
 eng_gradient_new(void *data)
 {
+   NOT_IMPLEMENTED();
return NULL;
 //   return evas_common_gradient_new();
 }
@@ -184,84 +194,98 @@
 static void
 eng_gradient_free(void *data, void *gradient)
 {
+   NOT_IMPLEMENTED();
 //   evas_common_gradient_free(gradient);
 }
 
 static void
 eng_gradient_color_stop_add(void *data, void *gradient, int r, int g, int b, 
int a, int delta)
 {
+   NOT_IMPLEMENTED();
 //   evas_common_gradient_color_stop_add(gradient, r, g, b, a, delta);
 }
 
 static void
 eng_gradient_alpha_stop_add(void *data, void *gradient, int a, int delta)
 {
+   NOT_IMPLEMENTED();
 //   evas_common_gradient_alpha_stop_add(gradient, a, delta);
 }
 
 static void
 eng_gradient_color_data_set(void *data, void *gradient, void *map, int len, 
int has_alpha)
 {
+   NOT_IMPLEMENTED();
 //   evas_common_gradient_color_data_set(gradient, map, len, has_alpha);
 }
 
 static void
 eng_gradient_alpha_data_set(void *data, void *gradient, void *alpha_map, int 
len)
 {
+   NOT_IMPLEMENTED();
 //   evas_common_gradient_alpha_data_set(gradient, alpha_map, len);
 }
 
 static void
 eng_gradient_clear(void *data, void *gradient)
 {
+   NOT_IMPLEMENTED();
 //   evas_common_gradient_clear(gradient);
 }
 
 static void
 eng_gradient_fill_set(void *data, void *gradient, int x, int y, int w, int h)
 {
+   NOT_IMPLEMENTED();
 //   evas_common_gradient_fill_set(gradient, x, y, w, h);
 }
 
 static void
 eng_gradient_fill_angle_set(void *data, void *gradient, double angle)
 {
+   NOT_IMPLEMENTED();
 //   evas_common_gradient_fill_angle_set(gradient, angle);
 }
 
 static void
 eng_gradient_fill_spread_set(void *data, void *gradient, int spread)
 {
+   NOT_IMPLEMENTED();
 //   evas_common_gradient_fill_spread_set(gradient, spread);
 }
 
 static void
 eng_gradient_angle_set(void *data, void *gradient, double angle)
 {
+   NOT_IMPLEMENTED();
 //   evas_common_gradient_map_angle_set(gradient, angle);
 }
 
 static void
 eng_gradient_offset_set(void *data, void *gradient, float offset)
 {
+   NOT_IMPLEMENTED();
 //   evas_common_gradient_map_offset_set(gradient, offset);
 }
 
 static void
 eng_gradient_direction_set(void *data, void *gradient, int direction)
 {
+   NOT_IMPLEMENTED();
 //   evas_common_gradient_map_direction_set(gradient, direction);
 }
 
 static void
 eng_gradient_type_set(void *data, void *gradient, char *name, char *params)
 {
+   NOT_IMPLEMENTED();
 //   evas_common_gradient_type_set(gradient, name, params);
 }
 
 static int
 eng_gradient_is_opaque(void *data, void *context, void *gradient, int x, int 
y, int w, int h)
 {
+   NOT_IMPLEMENTED();
return 0;
 //   RGBA_Draw_Context *dc = (RGBA_Draw_Context *)context;
 //   RGBA_Gradient *gr = (RGBA_Gradient *)gradient;
@@ -274,6 +298,7 @@
 static int
 eng_gradient_is_visible(void *data, void *context, void *gradient, int x, int 
y, int w, int h)
 {
+   NOT_IMPLEMENTED();
return 0;
 //   RGBA_Draw_Context *dc = (RGBA_Draw_Context *)context;
 //
@@ -292,11 +317,13 @@
 //   gr->type.geometer->geom_set(gr);
 //   len = gr->type.geometer->get_map_len(gr);
 //   evas_common_gradient_map(dc, gr, len);
+   NOT_IMPLE

E CVS: libs/evas barbieri

2007-07-24 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : barbieri
Project : e17
Module  : libs/evas

Dir : e17/libs/evas/src/lib/canvas


Modified Files:
evas_callbacks.c evas_events.c 


Log Message:
Support for selectable pointer_mode.

Evas now support objects that do not grab mouse down event (NOGRAB) aside
with the default (AUTOGRAB). API is meant to be extensible.


===
RCS file: /cvs/e/e17/libs/evas/src/lib/canvas/evas_callbacks.c,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -3 -r1.31 -r1.32
--- evas_callbacks.c30 Apr 2007 04:22:42 -  1.31
+++ evas_callbacks.c24 Jul 2007 14:20:07 -  1.32
@@ -218,12 +218,14 @@
  * EVAS_CALLBACK_MOUSE_DOWN: event_info = pointer to Evas_Event_Mouse_Down
  *
  * This event is triggered by a mouse button being depressed while over an
- * object. This causes this object to passively grab the mouse until all mouse
- * buttons have been released. That means if this mouse button is the first to
- * be pressed, all future mouse events will be reported to only this object
- * until no buttons are down. That includes mouse move events, in and out
- * events, and further button presses. When all buttons are released, event
- * propagation occurs as normal.
+ * object. If pointermode is EVAS_OBJECT_POINTER_MODE_AUTOGRAB (default)
+ * this causes this object to passively grab the mouse until all mouse
+ * buttons have been released.
+ * That means if this mouse button is the first to be pressed, all future
+ * mouse events will be reported to only this object until no buttons are
+ * down. That includes mouse move events, in and out events, and further
+ * button presses. When all buttons are released, event propagation occurs
+ * as normal.
  *
  * EVAS_CALLBACK_MOUSE_UP: event_info = pointer to Evas_Event_Mouse_Up
  *
===
RCS file: /cvs/e/e17/libs/evas/src/lib/canvas/evas_events.c,v
retrieving revision 1.52
retrieving revision 1.53
diff -u -3 -r1.52 -r1.53
--- evas_events.c   23 Jul 2007 14:22:56 -  1.52
+++ evas_events.c   24 Jul 2007 14:20:07 -  1.53
@@ -245,8 +245,11 @@
Evas_Event_Mouse_Down ev;
 
obj = l->data;
-   obj->mouse_grabbed++;
-   e->pointer.mouse_grabbed++;
+   if (obj->pointer_mode != EVAS_OBJECT_POINTER_MODE_NOGRAB)
+ {
+obj->mouse_grabbed++;
+e->pointer.mouse_grabbed++;
+ }
 
ev.button = b;
ev.output.x = e->pointer.x;
@@ -299,10 +302,12 @@
Evas_Event_Mouse_Up ev;
 
obj = l->data;
-// if (obj->mouse_grabbed > 0) 
- obj->mouse_grabbed--;
-// if (e->pointer.mouse_grabbed > 0) 
- e->pointer.mouse_grabbed--;
+   if ((obj->pointer_mode != EVAS_OBJECT_POINTER_MODE_NOGRAB) &&
+   (obj->mouse_in) && (obj->mouse_grabbed > 0))
+ {
+obj->mouse_grabbed--;
+e->pointer.mouse_grabbed--;
+ }
ev.button = b;
ev.output.x = e->pointer.x;
ev.output.y = e->pointer.y;
@@ -399,6 +404,11 @@
if (e->pointer.inside)
  evas_event_feed_mouse_move(e, e->pointer.x, e->pointer.y, timestamp, 
data);
  }
+
+   if (e->pointer.mouse_grabbed < 0)
+ fprintf(stderr, "BUG? e->pointer.mouse_grabbed (=%d) < 0!\n",
+e->pointer.mouse_grabbed);
+
if ((e->pointer.button == 0) && (e->pointer.mouse_grabbed))
  {
e->pointer.mouse_grabbed = 0;
@@ -1113,4 +1123,44 @@
return 0;
MAGIC_CHECK_END();
return !(obj->no_propagate);
+}
+
+/**
+ * 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.
+ */
+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;
+}
+
+/**
+ * Determine how pointer will behave.
+ * @param obj
+ * @return pointer behavior.
+ */
+EAPI Evas_Object_Pointer_Mode
+evas_object_pointer_mode_get(Evas_Object *obj)
+{
+   MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
+   return 0;
+   MAGIC_CHECK_END();
+   return obj->pointer_mode;
 }



-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy

E CVS: libs/evas barbieri

2007-07-24 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : barbieri
Project : e17
Module  : libs/evas

Dir : e17/libs/evas/src/lib/include


Modified Files:
evas_private.h 


Log Message:
Support for selectable pointer_mode.

Evas now support objects that do not grab mouse down event (NOGRAB) aside
with the default (AUTOGRAB). API is meant to be extensible.


===
RCS file: /cvs/e/e17/libs/evas/src/lib/include/evas_private.h,v
retrieving revision 1.86
retrieving revision 1.87
diff -u -3 -r1.86 -r1.87
--- evas_private.h  23 Jul 2007 14:22:56 -  1.86
+++ evas_private.h  24 Jul 2007 14:20:07 -  1.87
@@ -450,6 +450,8 @@
 
unsigned short  precise_is_inside : 1;
 
+   Evas_Object_Pointer_Modepointer_mode;
+
unsigned char   delete_me;
 };
 



-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
___
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs


E CVS: libs/evas barbieri

2007-07-24 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : barbieri
Project : e17
Module  : libs/evas

Dir : e17/libs/evas/src/lib


Modified Files:
Evas.h 


Log Message:
Support for selectable pointer_mode.

Evas now support objects that do not grab mouse down event (NOGRAB) aside
with the default (AUTOGRAB). API is meant to be extensible.


===
RCS file: /cvs/e/e17/libs/evas/src/lib/Evas.h,v
retrieving revision 1.101
retrieving revision 1.102
diff -u -3 -r1.101 -r1.102
--- Evas.h  23 Jul 2007 14:22:56 -  1.101
+++ Evas.h  24 Jul 2007 14:20:07 -  1.102
@@ -330,6 +330,12 @@
unsigned int   timestamp;
 };
 
+typedef enum _Evas_Object_Pointer_Mode
+{
+   EVAS_OBJECT_POINTER_MODE_AUTOGRAB, /**< default, X11-like */
+   EVAS_OBJECT_POINTER_MODE_NOGRAB
+} Evas_Object_Pointer_Mode;
+
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -767,6 +773,9 @@
EAPI Evas_Bool evas_object_repeat_events_get (Evas_Object *obj);
EAPI void  evas_object_propagate_events_set  (Evas_Object *obj, 
Evas_Bool prop);
EAPI Evas_Bool evas_object_propagate_events_get  (Evas_Object *obj);
+   EAPI void  evas_object_pointer_mode_set  (Evas_Object *obj, 
Evas_Object_Pointer_Mode setting);
+   EAPI Evas_Object_Pointer_Mode evas_object_pointer_mode_get(Evas_Object 
*obj);
+

EAPI void  evas_object_precise_is_inside_set (Evas_Object *obj, 
Evas_Bool precise);
EAPI Evas_Bool evas_object_precise_is_inside_get (Evas_Object *obj);



-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
___
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs


E CVS: libs/evas barbieri

2007-07-20 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : barbieri
Project : e17
Module  : libs/evas

Dir : e17/libs/evas/src/lib/canvas


Modified Files:
evas_object_textblock.c 


Log Message:
Fix bug introduced with r1.138, removed incorrect offset table.

I changed evas_object_textblock_text_markup_get() to just return
previously known contents, not try to recreate them set with other
means, this was not used (at least in our CVS) and was slow and
incorrect.


===
RCS file: /cvs/e/e17/libs/evas/src/lib/canvas/evas_object_textblock.c,v
retrieving revision 1.140
retrieving revision 1.141
diff -u -3 -r1.140 -r1.141
--- evas_object_textblock.c 28 Jun 2007 23:22:20 -  1.140
+++ evas_object_textblock.c 20 Jul 2007 22:30:12 -  1.141
@@ -627,48 +627,6 @@
"Ω\0\xce\xa9\0"
 ;
 
-static const unsigned short escape_offsets[] = {
-   0, 4, 5, 9, 10, 15, 16, 22, 23, 29, 30, 36,
-   38, 43, 45, 53, 56, 64, 66, 74, 76, 84, 86,
-   94, 96, 103, 105, 112, 114, 121, 123, 128, 130,
-   135, 137, 144, 146, 153, 155, 160, 162, 167,
-   169, 175, 177, 184, 186, 194, 196, 201, 203,
-   209, 212, 218, 220, 226, 228, 235, 237, 244,
-   246, 253, 255, 263, 265, 273, 275, 281, 283,
-   289, 291, 298, 300, 306, 308, 315, 318, 323,
-   326, 331, 334, 340, 343, 349, 352, 356, 359,
-   364, 367, 374, 377, 381, 384, 392, 395, 402,
-   405, 412, 415, 421, 424, 430, 433, 439, 442,
-   448, 451, 457, 460, 466, 469, 475, 478, 486,
-   488, 496, 498, 505, 507, 515, 517, 523, 525,
-   531, 533, 539, 541, 549, 551, 559, 561, 569,
-   571, 576, 578, 586, 588, 596, 598, 606, 608,
-   616, 618, 626, 628, 636, 638, 646, 648, 656,
-   658, 666, 668, 676, 678, 686, 688, 696, 698,
-   705, 707, 714, 716, 723, 725, 732, 734, 741,
-   743, 750, 752, 759, 761, 768, 770, 777, 779,
-   786, 788, 796, 798, 806, 808, 816, 818, 826,
-   828, 836, 838, 846, 848, 856, 858, 866, 868,
-   876, 878, 886, 888, 894, 896, 902, 904, 910,
-   912, 918, 920, 926, 928, 934, 936, 942, 944,
-   950, 952, 958, 960, 966, 968, 976, 978, 986,
-   988, 996, 998, 1006, 1008, 1015, 1017, 1024, 1026,
-   1034, 1036, 1044, 1046, 1053, 1055, 1062, 1064, 1072,
-   1074, 1082, 1084, 1092, 1094, 1102, 1104, , 1113,
-   1120, 1122, 1129, 1131, 1136, 1138, 1143, 1145, 1152,
-   1154, 1160, 1162, 1169, 1171, 1178, 1180, 1189, 1191,
-   1197, 1199, 1204, 1206, 1213, 1215, 1221, 1223, 1230,
-   1232, 1240, 1242, 1246, 1248, 1252, 1254, 1263, 1265,
-   1269, 1271, 1275, 1277, 1282, 1284, 1291, 1293, 1298,
-   1300, 1309, 1311, 1316, 1318, 1323, 1325, 1330, 1332,
-   1339, 1341, 1348, 1350, 1356, 1358, 1365, 1367, 1374,
-   1376, 1385, 1387, 1393, 1395, 1400, 1402, 1409, 1411,
-   1417, 1419, 1426, 1428, 1436, 1438, 1442, 1444, 1448,
-   1450, 1459, 1461, 1465, 1467, 1471, 1473, 1478, 1480,
-   1487, 1489, 1494, 1496, 1505, 1507, 1512, 1514, 1519,
-   1521, 1526, 1528, 1535
-};
-
 
 static int
 _is_white(int c)
@@ -2462,6 +2420,55 @@
return o->style;
 }
 
+static inline void
+_advance_after_end_of_string(const char **p_buf)
+{
+   while (**p_buf != '\0')
+ (*p_buf)++;
+
+   if (**p_buf == '\0')
+ (*p_buf)++;
+}
+
+static inline int
+_is_eq_and_advance(const char *s, const char *s_end,
+  const char **p_m, const char *m_end)
+{
+   for (;((s < s_end) && (*p_m < m_end)); s++, (*p_m)++)
+ if (*s != **p_m)
+   {
+ _advance_after_end_of_string(p_m);
+ return 0;
+   }
+
+   if (*p_m < m_end)
+ _advance_after_end_of_string(p_m);
+
+   return s == s_end;
+}
+
+static inline void
+_append_escaped_char(Evas_Textblock_Cursor *cur, const char *s,
+const char *s_end)
+{
+   const char *map_itr, *map_end;
+
+   map_itr = escape_strings;
+   map_end = map_itr + sizeof(escape_strings);
+
+   while (map_itr < map_end)
+ {
+   if (_is_eq_and_advance(s, s_end, &map_itr, map_end))
+ {
+evas_textblock_cursor_text_append(cur, map_itr);
+return;
+ }
+
+   if (map_itr < map_itr)
+ _advance_after_end_of_string(&map_itr);
+ }
+}
+
 EAPI void
 evas_object_textblock_text_markup_set(Evas_Object *obj, const char *text)
 {
@@ -2535,19 +2542,7 @@
}
  else if (esc_end)
{
-  int i;
-  
-  for (i = 0; i < (int)(sizeof(escape_offsets) / 
sizeof(escape_offsets[0])); i += 2)
-{
-   const char *in = escape_strings + escape_offsets[i];
-   const char *out = escape_strings + escape_offsets[i 
+ 1];
-
-   if (!strncmp(in, esc_start, esc_end - esc_start + 
1))
- {
-evas_textblock_

E CVS: libs/evas barbieri

2007-07-20 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : barbieri
Project : e17
Module  : libs/evas

Dir : e17/libs/evas/src/modules/engines/software_16


Modified Files:
evas_soft16_dither_mask.c 


Log Message:
Fix CPP warnings about DM_* macros, do loop unrolling for dither mask 
processing.

===
RCS file: 
/cvs/e/e17/libs/evas/src/modules/engines/software_16/evas_soft16_dither_mask.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- evas_soft16_dither_mask.c   20 Jul 2007 00:18:07 -  1.1
+++ evas_soft16_dither_mask.c   20 Jul 2007 17:29:31 -  1.2
@@ -1,12 +1,12 @@
 #include "evas_soft16.h"
 
-#define DM_SIZE  128
-#define DM_BITS  6
-#define DM_DIV   64
-#define DM_MSK   (DM_SIZE - 1)
-#define DM_SHF(_b)   (DM_BITS - (8 - _b))
+#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[DM_SIZE][DM_SIZE] =
+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 },
@@ -142,7 +142,7 @@
 _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, r, g, b, a, dith5, dith6;
+   DATA8 orig_r, orig_g, orig_b, orig_a, r, g, b, a, dith5, dith6, dith;
 
orig_r = R_VAL(src);
orig_g = G_VAL(src);
@@ -154,8 +154,9 @@
b = orig_b >> 3;
a = orig_a >> 3;
 
-   dith5 = dither_table[x & DM_MSK][y & DM_MSK] >> DM_SHF(5);
-   dith6 = dither_table[x & DM_MSK][y & DM_MSK] >> DM_SHF(6);
+   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++;
@@ -166,29 +167,53 @@
*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
 soft16_image_convert_from_rgba(Soft16_Image *im, const DATA32 *src)
 {
const DATA32 *sp;
DATA16 *dp;
DATA8 *ap;
-   int x, y, pad;
+   int y;
 
sp = src;
dp = im->pixels;
ap = im->alpha;
-   pad = im->stride - im->w;
 
-   for (y = 0; y < im->h; y++, dp += pad, ap += pad)
- for (x = 0; x < im->w; x++, sp++, dp++, ap++)
-   _soft16_convert_from_rgba_pt(sp, dp, ap, x, y);
+   for (y = 0; y < im->h; y++, sp += im->w, dp += im->stride, ap += im->stride)
+ _soft16_convert_from_rgba_scanline(sp, dp, ap, y, im->w);
 }
 
 static 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;
+   DATA8 orig_r, orig_g, orig_b, r, g, b, dith5, dith6, dith;
 
orig_r = R_VAL(src);
orig_g = G_VAL(src);
@@ -198,8 +223,9 @@
g = orig_g >> 2;
b = orig_b >> 3;
 
-   dith5 = dither_table[x & DM_MSK][y & DM_MSK] >> DM_SHF(5);
-   dith6 = dither_table[x & DM_MSK][y & DM_MSK] >> DM_SHF(6);
+   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++;
@@ -208,6 +234,31 @@
*dst = (r << 11) | (g << 5) | b;
 }
 
+static inline void
+_soft16_convert_from_rgb_scanline(c

E CVS: libs/evas barbieri

2007-07-19 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : barbieri
Project : e17
Module  : libs/evas

Dir : e17/libs/evas/src/modules/engines/software_16


Modified Files:
Makefile.am evas_soft16.h evas_soft16_main.c 
Added Files:
evas_soft16_dither_mask.c 


Log Message:
Use dither mask when importing images.

===
RCS file: /cvs/e/e17/libs/evas/src/modules/engines/software_16/Makefile.am,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -3 -r1.4 -r1.5
--- Makefile.am 21 Jun 2007 19:57:56 -  1.4
+++ Makefile.am 20 Jul 2007 00:18:07 -  1.5
@@ -12,6 +12,7 @@
 module_la_SOURCES  = \
 evas_engine.c \
 evas_soft16.h \
+evas_soft16_dither_mask.c \
 evas_soft16_main.c \
 evas_soft16_image_unscaled.c \
 evas_soft16_image_scaled_sampled.c \
@@ -27,6 +28,7 @@
 EXTRA_DIST = \
 evas_engine.c \
 evas_soft16.h \
+evas_soft16_dither_mask.c \
 evas_soft16_main.c \
 evas_soft16_image_unscaled.c \
 evas_soft16_image_scaled_sampled.c \
===
RCS file: /cvs/e/e17/libs/evas/src/modules/engines/software_16/evas_soft16.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -3 -r1.6 -r1.7
--- evas_soft16.h   13 Jul 2007 15:19:08 -  1.6
+++ evas_soft16.h   20 Jul 2007 00:18:07 -  1.7
@@ -90,6 +90,10 @@
 void soft16_image_draw_unscaled(Soft16_Image *src, Soft16_Image *dst, 
RGBA_Draw_Context *dc, const Evas_Rectangle sr, const Evas_Rectangle dr, const 
Evas_Rectangle cr);
 void soft16_image_draw_scaled_sampled(Soft16_Image *src, Soft16_Image *dst, 
RGBA_Draw_Context *dc, const Evas_Rectangle sr, const Evas_Rectangle dr, const 
Evas_Rectangle cr);
 
+/* convert/dither functions */
+void soft16_image_convert_from_rgb(Soft16_Image *im, const DATA32 *src);
+void soft16_image_convert_from_rgba(Soft16_Image *im, const DATA32 *src);
+
 
 /**
  * Rectangle (evas_soft16_rectangle.c)
===
RCS file: 
/cvs/e/e17/libs/evas/src/modules/engines/software_16/evas_soft16_main.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -3 -r1.12 -r1.13
--- evas_soft16_main.c  16 Jul 2007 07:25:34 -  1.12
+++ evas_soft16_main.c  20 Jul 2007 00:18:07 -  1.13
@@ -203,51 +203,12 @@
DATA32 *sp;
DATA16 *dpl;
 
-   /* FIXME: dither and optimize */
sp = src;
dpl = im->pixels;
if (im->alpha)
- {
-   DATA8 *dal;
-   dal = im->alpha;
-   int y;
-
-   for (y = 0; y < im->h; y++)
- {
-DATA16 *dp, *dp_end;
-DATA8 *da;
-
-dp = dpl;
-dp_end = dp + im->w;
-da = dal;
-
-for (; dp < dp_end; da++, dp++, sp++)
-  {
- *da = A_VAL(sp) >> 3;
- *dp = RGB_565_FROM_COMPONENTS(R_VAL(sp), G_VAL(sp), 
B_VAL(sp));
-  }
-
-dpl += im->stride;
-dal += im->stride;
- }
- }
+ soft16_image_convert_from_rgba(im, src);
else
- {
-   int y;
-
-   for (y = 0; y < im->h; y++)
- {
-DATA16 *dp, *dp_end;
-
-dp = dpl;
-dp_end = dp + im->w;
-
-for (; dp < dp_end; dp++, sp++)
-   *dp = RGB_565_FROM_COMPONENTS(R_VAL(sp), G_VAL(sp), B_VAL(sp));
-
-dpl += im->stride;
- }
- }
+ soft16_image_convert_from_rgb(im, src);
 }
 
 void



-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs


E CVS: libs/evas barbieri

2007-07-13 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : barbieri
Project : e17
Module  : libs/evas

Dir : e17/libs/evas/src/modules/engines/software_16


Modified Files:
evas_soft16.h 


Log Message:
Fix compile time CPU detection on ARM

===
RCS file: /cvs/e/e17/libs/evas/src/modules/engines/software_16/evas_soft16.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -3 -r1.5 -r1.6
--- evas_soft16.h   21 Jun 2007 19:57:56 -  1.5
+++ evas_soft16.h   13 Jul 2007 15:19:08 -  1.6
@@ -24,8 +24,30 @@
 #define UNROLL8(op...) UNROLL4(op) UNROLL4(op)
 #define UNROLL16(op...) UNROLL8(op) UNROLL8(op)
 
+#if defined(__ARM_ARCH_3M__) || defined(__ARM_ARCH_4__) || \
+defined(__ARM_ARCH_4T__)
+# define __ARM_ARCH__ 4
+#endif
 
-#if defined(__ARMEL__)
+#if defined(__ARM_ARCH_5__) || defined(__ARM_ARCH_5T__) || \
+defined(__ARM_ARCH_5E__) || defined(__ARM_ARCH_5TE__) || \
+defined(__ARM_ARCH_5TEJ__)
+# define __ARM_ARCH__ 5
+#endif
+
+#if defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_6J__) || \
+defined(__ARM_ARCH_6K__) || defined(__ARM_ARCH_6Z__) || \
+defined(__ARM_ARCH_6ZK__) || defined(__ARM_ARCH_6T2__)
+# define __ARM_ARCH__ 6
+#endif
+
+#if defined(__ARM_ARCH_7__) || defined(__ARM_ARCH_7A__) || \
+defined(__ARM_ARCH_7R__) || defined(__ARM_ARCH_7M__)
+# define __ARM_ARCH__ 7
+#endif
+
+
+#if defined(__ARM_ARCH__) && (__ARM_ARCH__ >= 5)
 /* tested on ARMv6 (arm1136j-s), Nokia N800 CPU */
 #define pld(addr, off)  \
__asm__("pld [%[address], %[offset]]"::  \



-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs


E CVS: libs/evas barbieri

2007-07-12 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : barbieri
Project : e17
Module  : libs/evas

Dir : e17/libs/evas/src/modules/engines/software_16


Modified Files:
evas_engine.c 


Log Message:
Ensure data is loaded when data_get() is called.

===
RCS file: /cvs/e/e17/libs/evas/src/modules/engines/software_16/evas_engine.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -3 -r1.5 -r1.6
--- evas_engine.c   10 Jul 2007 15:01:52 -  1.5
+++ evas_engine.c   12 Jul 2007 21:51:36 -  1.6
@@ -435,6 +435,7 @@
  }
 
im = image;
+   soft16_image_load_data(im);
 
if (to_write)
  {



-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs


E CVS: libs/evas barbieri

2007-07-10 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : barbieri
Project : e17
Module  : libs/evas

Dir : e17/libs/evas/src/modules/engines/software_16


Modified Files:
evas_engine.c 


Log Message:
fix evas software 16 engine build and to add the missing image_data_get method.

By Andre Magalhaes 


===
RCS file: /cvs/e/e17/libs/evas/src/modules/engines/software_16/evas_engine.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -3 -r1.4 -r1.5
--- evas_engine.c   19 Jun 2007 22:52:12 -  1.4
+++ evas_engine.c   10 Jul 2007 15:01:52 -  1.5
@@ -320,12 +320,7 @@
 static int
 eng_image_colorspace_get(void *data, void *image)
 {
-   Soft16_Image *im;
-   
-   if (!image) return EVAS_COLORSPACE_RGB565;
-   im = image;
-   if (im->have_alpha) return EVAS_COLORSPACE_RGB565_A5P;
-   return EVAS_COLORSPACE_RGB565;
+   return EVAS_COLORSPACE_RGB565_A5P;
 }
 
 static void *
@@ -431,8 +426,31 @@
 static void *
 eng_image_data_get(void *data, void *image, int to_write, DATA32 **image_data)
 {
-   // FIXME: implement
-   *image_data = NULL;
+   Soft16_Image *im;
+
+   if (!image)
+ {
+   *image_data = NULL;
+   return NULL;
+ }
+
+   im = image;
+
+   if (to_write)
+ {
+   if (im->references > 1)
+ {
+Soft16_Image *im_new;
+
+im_new = soft16_image_new(im->w, im->h, im->stride, 
im->have_alpha, im->pixels, 1);
+if (!im_new) return im;
+soft16_image_free(im);
+im = im_new;
+ }
+ }
+
+   if (image_data) *image_data = (DATA32 *) im->pixels;
+
return image;
 }
 



-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs


E CVS: libs/evas barbieri

2007-06-21 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : barbieri
Project : e17
Module  : libs/evas

Dir : e17/libs/evas/src/lib/include


Modified Files:
evas_common.h 


Log Message:
Name clip structure, make it simple to save and restore clip info.

===
RCS file: /cvs/e/e17/libs/evas/src/lib/include/evas_common.h,v
retrieving revision 1.84
retrieving revision 1.85
diff -u -3 -r1.84 -r1.85
--- evas_common.h   4 Jun 2007 18:32:57 -   1.84
+++ evas_common.h   21 Jun 2007 20:10:13 -  1.85
@@ -262,7 +262,7 @@
struct {
   DATA32 col;
} col;
-   struct {
+   struct RGBA_Draw_Context_clip {
   char   use : 1;
   intx, y, w, h;
} clip;



-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs


E CVS: libs/evas barbieri

2007-06-21 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : barbieri
Project : e17
Module  : libs/evas

Dir : e17/libs/evas/src/modules/engines/software_16


Modified Files:
evas_soft16_main.c 


Log Message:
Name clip structure, make it simple to save and restore clip info.

===
RCS file: 
/cvs/e/e17/libs/evas/src/modules/engines/software_16/evas_soft16_main.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -3 -r1.8 -r1.9
--- evas_soft16_main.c  21 Jun 2007 19:57:56 -  1.8
+++ evas_soft16_main.c  21 Jun 2007 20:10:13 -  1.9
@@ -429,7 +429,7 @@
Evas_Rectangle sr, dr;
Cutout_Rects *rects;
Cutout_Rect  *r;
-   int c, cx, cy, cw, ch;
+   struct RGBA_Draw_Context_clip clip_bkp;
int i;
 
/* handle cutouts here! */
@@ -459,13 +459,13 @@
  }
 
/* save out clip info */
-   c = dc->clip.use; cx = dc->clip.x; cy = dc->clip.y; cw = dc->clip.w; ch = 
dc->clip.h;
+   clip_bkp = dc->clip;
evas_common_draw_context_clip_clip(dc, 0, 0, dst->w, dst->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;
+   dc->clip = clip_bkp;
return;
  }
rects = evas_common_draw_context_apply_cutouts(dc);
@@ -476,7 +476,6 @@
_soft16_image_draw_sampled_int(src, dst, dc, sr, dr);
  }
evas_common_draw_context_apply_clear_cutouts(rects);
-   /* restore clip info */
-   dc->clip.use = c; dc->clip.x = cx; dc->clip.y = cy; dc->clip.w = cw; 
dc->clip.h = ch;
+   dc->clip = clip_bkp;
 }
 



-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs


  1   2   >