Enlightenment CVS committal
Author : raster
Project : e17
Module : libs/evas
Dir : e17/libs/evas/src/lib/include
Modified Files:
evas_common.h evas_private.h
Log Message:
move co-ordinates to be their own type. this is a good thing, because ti
allows me to be able to virtualize he canvas co-ordinate system. right now
it's doubles. i can now move to floats, int's etc. with a recompile (and well
recompile all depending apps too). it's still ACTUALLY doubles, just all
typedef'ed now. i've also changed booleans to actual boolean types (not an
int), all code will keep working - but i'd highly suggest moving your code to
use these types if interacting with evas.
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/evas/src/lib/include/evas_common.h,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -3 -r1.12 -r1.13
--- evas_common.h 10 Sep 2003 08:52:18 -0000 1.12
+++ evas_common.h 18 Oct 2003 03:34:00 -0000 1.13
@@ -40,7 +40,7 @@
#define POLY_EDGE_ADD(_i, _y) \
{ \
int _j; \
- double _dx; \
+ float _dx; \
RGBA_Vertex *_p, *_q; \
if (_i < (n - 1)) _j = _i + 1; \
else _j = 0; \
@@ -55,7 +55,7 @@
_q = &(point[_i]); \
} \
edges[num_active_edges].dx = _dx = (_q->x - _p->x) / (_q->y - _p->y); \
- edges[num_active_edges].x = (_dx * ((double)_y + 0.5 - _p->y)) + _p->x; \
+ edges[num_active_edges].x = (_dx * ((float)_y + 0.5 - _p->y)) + _p->x; \
edges[num_active_edges].i = _i; \
num_active_edges++; \
}
@@ -143,6 +143,13 @@
typedef struct _Evas_List Evas_List;
typedef struct _Evas_Hash Evas_Hash;
typedef struct _Evas_Hash_El Evas_Hash_El;
+#ifndef EVAS_PRIVATE_H
+#if 1 /* able to change co-ordinate systems to remove all fp ops */
+typedef int Evas_Bool;
+#else
+typedef char Evas_Bool;
+#endif
+#endif
typedef struct _RGBA_Image RGBA_Image;
typedef struct _RGBA_Surface RGBA_Surface;
@@ -575,7 +582,7 @@
void *evas_hash_find (Evas_Hash *hash, const char *key);
int evas_hash_size (Evas_Hash *hash);
void evas_hash_free (Evas_Hash *hash);
-void evas_hash_foreach (Evas_Hash *hash, int (*func) (Evas_Hash
*hash, const char *key, void *data, void *fdata), const void *fdata);
+void evas_hash_foreach (Evas_Hash *hash, Evas_Bool (*func)
(Evas_Hash *hash, const char *key, void *data, void *fdata), const void *fdata);
int evas_hash_alloc_error (void);
void *evas_object_list_append (void *in_list, void *in_item);
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/evas/src/lib/include/evas_private.h,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -3 -r1.20 -r1.21
--- evas_private.h 9 Oct 2003 03:05:17 -0000 1.20
+++ evas_private.h 18 Oct 2003 03:34:00 -0000 1.21
@@ -37,29 +37,44 @@
EVAS_CALLBACK_RESTACK
} Evas_Callback_Type;
-typedef struct _Evas_Rectangle Evas_Rectangle;
+typedef struct _Evas_Rectangle Evas_Rectangle;
-typedef struct _Evas Evas;
-typedef struct _Evas_Layer Evas_Layer;
-typedef struct _Evas_Object Evas_Object;
-typedef struct _Evas_Data_Node Evas_Data_Node;
-typedef struct _Evas_Func_Node Evas_Func_Node;
-typedef struct _Evas_Func Evas_Func;
-typedef struct _Evas_Object_Func Evas_Object_Func;
-typedef struct _Evas_Modifier Evas_Modifier;
-typedef struct _Evas_Lock Evas_Lock;
-typedef unsigned long long Evas_Modifier_Mask;
-typedef struct _Evas_Smart Evas_Smart;
-typedef void Evas_Performance;
+typedef struct _Evas Evas;
+typedef struct _Evas_Layer Evas_Layer;
+typedef struct _Evas_Object Evas_Object;
+typedef struct _Evas_Data_Node Evas_Data_Node;
+typedef struct _Evas_Func_Node Evas_Func_Node;
+typedef struct _Evas_Func Evas_Func;
+typedef struct _Evas_Object_Func Evas_Object_Func;
+typedef struct _Evas_Modifier Evas_Modifier;
+typedef struct _Evas_Lock Evas_Lock;
+typedef unsigned long long Evas_Modifier_Mask;
+typedef struct _Evas_Smart Evas_Smart;
+typedef void Evas_Performance;
typedef struct _Evas_Intercept_Func Evas_Intercept_Func;
typedef struct _Evas_Intercept_Func_Basic Evas_Intercept_Func_Basic;
typedef struct _Evas_Intercept_Func_SizePos Evas_Intercept_Func_SizePos;
typedef struct _Evas_Intercept_Func_Obj Evas_Intercept_Func_Obj;
typedef struct _Evas_Intercept_Func_Int Evas_Intercept_Func_Int;
typedef struct _Evas_Key_Grab Evas_Key_Grab;
-typedef struct _Evas_Callbacks Evas_Callbacks;
-typedef struct _Evas_Smart_Class Evas_Smart_Class;
-
+typedef struct _Evas_Callbacks Evas_Callbacks;
+typedef struct _Evas_Smart_Class Evas_Smart_Class;
+#if 1 /* able to change co-ordinate systems to remove all fp ops */
+typedef double Evas_Coord;
+typedef double Evas_Font_Size;
+typedef double Evas_Angle;
+#ifndef EVAS_COMMON_H
+typedef int Evas_Bool;
+#endif
+#else
+typedef int Evas_Coord;
+typedef int Evas_Font_Size;
+typedef int Evas_Angle;
+#ifndef EVAS_COMMON_H
+typedef char Evas_Bool;
+#endif
+#endif
+
#define MAGIC_EVAS 0x70777770
#define MAGIC_OBJ 0x71777770
#define MAGIC_OBJ_RECTANGLE 0x71777771
@@ -138,7 +153,7 @@
struct _Evas_Intercept_Func_SizePos
{
- void (*func) (void *data, Evas_Object *obj, double x, double y);
+ void (*func) (void *data, Evas_Object *obj, Evas_Coord x, Evas_Coord y);
void *data;
};
@@ -201,8 +216,8 @@
void (*lower) (Evas_Object *o);
void (*stack_above) (Evas_Object *o, Evas_Object *above);
void (*stack_below) (Evas_Object *o, Evas_Object *below);
- void (*move) (Evas_Object *o, double x, double y);
- void (*resize) (Evas_Object *o, double w, double h);
+ void (*move) (Evas_Object *o, Evas_Coord x, Evas_Coord y);
+ void (*resize) (Evas_Object *o, Evas_Coord w, Evas_Coord h);
void (*show) (Evas_Object *o);
void (*hide) (Evas_Object *o);
void (*color_set) (Evas_Object *o, int r, int g, int b, int a);
@@ -264,7 +279,7 @@
DATA32 button;
int x, y;
- double canvas_x, canvas_y;
+ Evas_Coord canvas_x, canvas_y;
struct {
Evas_List *in;
@@ -273,7 +288,7 @@
} pointer;
struct {
- double x, y, w, h;
+ Evas_Coord x, y, w, h;
char changed : 1;
} viewport;
@@ -355,7 +370,7 @@
} clip;
} cache;
struct {
- double x, y, w, h;
+ Evas_Coord x, y, w, h;
} geometry;
struct {
unsigned char r, g, b, a;
@@ -440,8 +455,8 @@
int (*is_opaque) (Evas_Object *obj);
int (*was_opaque) (Evas_Object *obj);
- int (*is_inside) (Evas_Object *obj, double x, double y);
- int (*was_inside) (Evas_Object *obj, double x, double y);
+ int (*is_inside) (Evas_Object *obj, Evas_Coord x, Evas_Coord y);
+ int (*was_inside) (Evas_Object *obj, Evas_Coord x, Evas_Coord y);
void (*coords_recalc) (Evas_Object *obj);
};
@@ -486,6 +501,7 @@
void *(*gradient_color_add) (void *data, void *context, void
*gradient, int r, int g, int b, int a, int distance);
void *(*gradient_colors_clear) (void *data, void *context, void
*gradient);
+
void (*gradient_draw) (void *data, void *context, void *surface,
void *gradient, int x, int y, int w, int h, double angle);
void *(*image_load) (void *data, char *file, char *key, int
*error);
@@ -591,8 +607,8 @@
void evas_object_intercept_cleanup(Evas_Object *obj);
int evas_object_intercept_call_show(Evas_Object *obj);
int evas_object_intercept_call_hide(Evas_Object *obj);
-int evas_object_intercept_call_move(Evas_Object *obj, double x, double y);
-int evas_object_intercept_call_resize(Evas_Object *obj, double w, double h);
+int evas_object_intercept_call_move(Evas_Object *obj, Evas_Coord x, Evas_Coord y);
+int evas_object_intercept_call_resize(Evas_Object *obj, Evas_Coord w, Evas_Coord h);
int evas_object_intercept_call_raise(Evas_Object *obj);
int evas_object_intercept_call_lower(Evas_Object *obj);
int evas_object_intercept_call_stack_above(Evas_Object *obj, Evas_Object *above);
-------------------------------------------------------
This SF.net email sponsored by: Enterprise Linux Forum Conference & Expo
The Event For Linux Datacenter Solutions & Strategies in The Enterprise
Linux in the Boardroom; in the Front Office; & in the Server Room
http://www.enterpriselinuxforum.com
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs