E CVS: libs/evas moom

2007-12-25 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : moom
Project : e17
Module  : libs/evas

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


Modified Files:
evas_gl_common.h evas_gl_context.c evas_gl_image.c 


Log Message:
* [GL-engine] Do software YUV-conversion if GLSL is not supported. I 
can't test it on a GLSL card, so I hope it didn't break anything. If 
something is broken, feel free to revert! (but it would probably just be
related to the way it detects GLSL support at l.78 of evas_gl_context.c)


===
RCS file: /cvs/e/e17/libs/evas/src/modules/engines/gl_common/evas_gl_common.h,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -3 -r1.15 -r1.16
--- evas_gl_common.h7 Aug 2007 09:03:22 -   1.15
+++ evas_gl_common.h25 Dec 2007 11:12:39 -  1.16
@@ -67,6 +67,7 @@
   int sgis_generate_mipmap : 1;
   int nv_texture_rectangle : 1;
   int arb_texture_non_power_of_two : 1;
+  int arb_program : 1;
} ext;
 
GLenum  read_buf;
===
RCS file: /cvs/e/e17/libs/evas/src/modules/engines/gl_common/evas_gl_context.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -3 -r1.9 -r1.10
--- evas_gl_context.c   2 Jun 2007 15:30:58 -   1.9
+++ evas_gl_context.c   25 Dec 2007 11:12:39 -  1.10
@@ -40,40 +40,6 @@
gc-change.buf = 1;
gc-change.other   = 1;

-   gc-yuv422p.prog = glCreateProgramObjectARB();
-// on an nv 6600gt this is fast - but on a 5500fx its DEAD SLOW!   
-// if (!gc-ext.arb_texture_non_power_of_two) return NULL;
-   /* BEGIN LEAK */
-   gc-yuv422p.fshad = glCreateShaderObjectARB(GL_FRAGMENT_SHADER_ARB);
- {
-   const char *code =
- uniform sampler2D ytex, utex, vtex;\n
- void main(void) {\n
-   float r, g, b, y, u, v;\n
-   y = texture2D(ytex, gl_TexCoord[0].st).r;\n
-   u = texture2D(utex, gl_TexCoord[0].st).r;\n
-   v = texture2D(vtex, gl_TexCoord[0].st).r;\n
-   y = (y - 0.0625) * 1.164;\n
-   u = u - 0.5;\n
-   v = v - 0.5;\n
-   r = y + (1.402   * v);\n
-   g = y - (0.34414 * u) - (0.71414 * v);\n
-   b = y + (1.772   * u);\n
-   gl_FragColor = vec4(r * gl_Color.r * gl_Color.a, g * gl_Color.g * 
gl_Color.a, b * gl_Color.b * gl_Color.a, gl_Color.a);\n
- }\n;
-   glShaderSourceARB(gc-yuv422p.fshad, 1, code, NULL);
- }
-   glCompileShaderARB(gc-yuv422p.fshad);
-   glAttachObjectARB(gc-yuv422p.prog, gc-yuv422p.fshad);
-   /* END LEAK - something in the above leaks... beats me what. */
-   glLinkProgramARB(gc-yuv422p.prog);
-   
-   glUseProgramObjectARB(gc-yuv422p.prog);
-   glUniform1iARB(glGetUniformLocationARB(gc-yuv422p.prog, ytex), 0);
-   glUniform1iARB(glGetUniformLocationARB(gc-yuv422p.prog, utex), 1);
-   glUniform1iARB(glGetUniformLocationARB(gc-yuv422p.prog, vtex), 2);
-   glUseProgramObjectARB(0);
-   
return gc;
 }
 
@@ -110,6 +76,9 @@
 //  if (strstr(ext, GL_NV_texture_rectangle)) 
gc-ext.nv_texture_rectangle = 1;
 //  if (strstr(ext, GL_EXT_texture_rectangle)) 
gc-ext.nv_texture_rectangle = 1;
 if (strstr(ext, GL_ARB_texture_non_power_of_two)) 
gc-ext.arb_texture_non_power_of_two = 1;
+if (strstr(ext, GL_ARB_shader_objects)  strstr(ext, 
GL_ARB_vertex_shader)
+strstr(ext, GL_ARB_fragment_shader)  strstr(ext, 
GL_ARB_shading_language))
+  gc-ext.arb_program = 1;
 //  printf(GL EXT supported: GL_SGIS_generate_mipmap = %x\n, 
gc-ext.sgis_generate_mipmap);
 //  printf(GL EXT supported: GL_NV_texture_rectangle = %x\n, 
gc-ext.nv_texture_rectangle);
 //  printf(GL EXT supported: GL_ARB_texture_non_power_of_two = %x\n, 
gc-ext.arb_texture_non_power_of_two);
@@ -123,7 +92,45 @@
  {
 //  printf(GL EXT supported: No extensions!\n);
  }
-   gc-ext.checked = 1;
+
+if (gc-ext.arb_program)
+  {
+ gc-yuv422p.prog = glCreateProgramObjectARB();
+ // on an nv 6600gt this is fast - but on a 5500fx its DEAD 
SLOW!   
+ // if (!gc-ext.arb_texture_non_power_of_two) return NULL;
+ /* BEGIN LEAK */
+ gc-yuv422p.fshad = 
glCreateShaderObjectARB(GL_FRAGMENT_SHADER_ARB);
+ {
+const char *code =
+   uniform sampler2D ytex, utex, vtex;\n
+   void main(void) {\n
+ float r, g, b, y, u, v;\n
+ y = texture2D(ytex, gl_TexCoord[0].st).r;\n
+ u = texture2D(utex, gl_TexCoord[0].st).r;\n
+ v = texture2D(vtex, gl_TexCoord[0].st).r;\n
+ y = (y - 0.0625) * 1.164;\n
+ u = u - 0.5;\n
+ v = v - 0.5;\n
+ r = y + (1.402   * v);\n
+ g = y - 

E CVS: libs/evas moom

2007-08-22 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : moom
Project : e17
Module  : libs/evas

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


Modified Files:
evas_private.h 


Log Message:
* Add interceptors for color_set(), clip_set() and clip_unset()


===
RCS file: /cvs/e/e17/libs/evas/src/lib/include/evas_private.h,v
retrieving revision 1.87
retrieving revision 1.88
diff -u -3 -r1.87 -r1.88
--- evas_private.h  24 Jul 2007 14:20:07 -  1.87
+++ evas_private.h  22 Aug 2007 16:45:37 -  1.88
@@ -96,6 +96,7 @@
 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_Intercept_Func_Color   Evas_Intercept_Func_Color;
 typedef struct _Evas_Key_Grab   Evas_Key_Grab;
 typedef struct _Evas_Callbacks  Evas_Callbacks;
 typedef struct _Evas_Format Evas_Format;
@@ -190,6 +191,12 @@
void *data;
 };
 
+struct _Evas_Intercept_Func_Color
+{
+   void (*func) (void *data, Evas_Object *obj, int r, int g, int b, int a);
+   void *data;
+};
+
 struct _Evas_Key_Grab
 {
char   *keyname;
@@ -212,6 +219,9 @@
Evas_Intercept_Func_Obj stack_above;
Evas_Intercept_Func_Obj stack_below;
Evas_Intercept_Func_Int layer_set;
+   Evas_Intercept_Func_Color   color_set;
+   Evas_Intercept_Func_Obj clip_set;
+   Evas_Intercept_Func_Basic   clip_unset;
 };
 
 struct _Evas_Smart
@@ -729,6 +739,9 @@
 int evas_object_intercept_call_stack_above(Evas_Object *obj, Evas_Object 
*above);
 int evas_object_intercept_call_stack_below(Evas_Object *obj, Evas_Object 
*below);
 int evas_object_intercept_call_layer_set(Evas_Object *obj, int l);
+int evas_object_intercept_call_color_set(Evas_Object *obj, int r, int g, int 
b, int a);
+int evas_object_intercept_call_clip_set(Evas_Object *obj, Evas_Object *clip);
+int evas_object_intercept_call_clip_unset(Evas_Object *obj);
 void evas_object_grabs_cleanup(Evas_Object *obj);
 void evas_key_grab_free(Evas_Object *obj, const char *keyname, 
Evas_Modifier_Mask modifiers, Evas_Modifier_Mask not_modifiers);
 void evas_font_dir_cache_free(void);



-
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 moom

2007-08-22 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : moom
Project : e17
Module  : libs/evas

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


Modified Files:
evas_clip.c evas_object_intercept.c evas_object_main.c 


Log Message:
* Add interceptors for color_set(), clip_set() and clip_unset()


===
RCS file: /cvs/e/e17/libs/evas/src/lib/canvas/evas_clip.c,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -3 -r1.28 -r1.29
--- evas_clip.c 1 Aug 2007 14:35:30 -   1.28
+++ evas_clip.c 22 Aug 2007 16:45:37 -  1.29
@@ -171,6 +171,7 @@
MAGIC_CHECK_END();
if (obj-cur.clipper == clip) return;
if (obj == clip) return;
+   if (evas_object_intercept_call_clip_set(obj, clip)) return;
if (obj-smart.smart)
  {
if (obj-smart.smart-smart_class-clip_set)
@@ -280,6 +281,7 @@
MAGIC_CHECK_END();
if (!obj-cur.clipper) return;
/* unclip */
+   if (evas_object_intercept_call_clip_unset(obj)) return;
if (obj-smart.smart)
  {
if (obj-smart.smart-smart_class-clip_unset)
===
RCS file: /cvs/e/e17/libs/evas/src/lib/canvas/evas_object_intercept.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -3 -r1.9 -r1.10
--- evas_object_intercept.c 6 Jan 2006 23:05:17 -   1.9
+++ evas_object_intercept.c 22 Aug 2007 16:45:37 -  1.10
@@ -27,7 +27,10 @@
(obj-interceptors-lower.func) ||
(obj-interceptors-stack_above.func) ||
(obj-interceptors-stack_below.func) ||
-   (obj-interceptors-layer_set.func))
+   (obj-interceptors-layer_set.func) ||
+   (obj-interceptors-color_set.func) ||
+   (obj-interceptors-clip_set.func) ||
+   (obj-interceptors-clip_unset.func))
  return;
free(obj-interceptors);
obj-interceptors = NULL;
@@ -186,6 +189,54 @@
return ret;
 }
 
+int
+evas_object_intercept_call_color_set(Evas_Object *obj, int r, int g, int b, 
int a)
+{
+   /* MEM OK */
+   int ret;
+
+   if (!obj-interceptors) return 0;
+   if (obj-intercepted) return 0;
+   obj-intercepted = 1;
+   ret = (int)obj-interceptors-color_set.func;
+   if (obj-interceptors-color_set.func)
+ obj-interceptors-color_set.func(obj-interceptors-color_set.data, obj, 
r, g, b, a);
+   obj-intercepted = 0;
+   return ret;
+}
+
+int
+evas_object_intercept_call_clip_set(Evas_Object *obj, Evas_Object *clip)
+{
+   /* MEM OK */
+   int ret;
+
+   if (!obj-interceptors) return 0;
+   if (obj-intercepted) return 0;
+   obj-intercepted = 1;
+   ret = (int)obj-interceptors-clip_set.func;
+   if (obj-interceptors-clip_set.func)
+ obj-interceptors-clip_set.func(obj-interceptors-clip_set.data, obj, 
clip);
+   obj-intercepted = 0;
+   return ret;
+}
+
+int
+evas_object_intercept_call_clip_unset(Evas_Object *obj)
+{
+   /* MEM OK */
+   int ret;
+
+   if (!obj-interceptors) return 0;
+   if (obj-intercepted) return 0;
+   obj-intercepted = 1;
+   ret = (int)obj-interceptors-clip_unset.func;
+   if (obj-interceptors-clip_unset.func)
+ obj-interceptors-clip_unset.func(obj-interceptors-clip_unset.data, 
obj);
+   obj-intercepted = 0;
+   return ret;
+}
+
 /* public calls */
 
 /**
@@ -581,6 +632,138 @@
obj-interceptors-layer_set.func = NULL;
data = obj-interceptors-layer_set.data;
obj-interceptors-layer_set.data = NULL;
+   evas_object_intercept_deinit(obj);
+   return data;
+}
+
+/**
+ * To be documented.
+ *
+ * FIXME: To be fixed.
+ *
+ */
+EAPI void
+evas_object_intercept_color_set_callback_add(Evas_Object *obj, void (*func) 
(void *data, Evas_Object *obj, int r, int g, int b, int a), const void *data)
+{
+   /* MEM OK */
+   MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
+   return;
+   MAGIC_CHECK_END();
+   if (!func) return;
+   evas_object_intercept_init(obj);
+   if (!obj-interceptors) return;
+   obj-interceptors-color_set.func = func;
+   obj-interceptors-color_set.data = (void *)data;
+}
+
+/**
+ * To be documented.
+ *
+ * FIXME: To be fixed.
+ *
+ */
+EAPI void *
+evas_object_intercept_color_set_callback_del(Evas_Object *obj, void (*func) 
(void *data, Evas_Object *obj, int r, int g, int b, int a))
+{
+   /* MEM OK */
+   void *data;
+
+   MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
+   return NULL;
+   MAGIC_CHECK_END();
+   if (!func) return NULL;
+   if (!obj-interceptors) return NULL;
+   obj-interceptors-color_set.func = NULL;
+   data = obj-interceptors-color_set.data;
+   obj-interceptors-color_set.data = NULL;
+   evas_object_intercept_deinit(obj);
+   return data;
+}
+
+/**
+ * To be documented.
+ *
+ * FIXME: To be fixed.
+ *
+ */
+EAPI void
+evas_object_intercept_clip_set_callback_add(Evas_Object *obj, void (*func) 
(void *data, Evas_Object *obj, Evas_Object *clip), const void *data)
+{
+   /* MEM OK */
+   MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
+   return;
+   MAGIC_CHECK_END();
+   if (!func) return;
+   evas_object_intercept_init(obj);
+   if (!obj-interceptors) return;

E CVS: libs/evas moom

2007-08-22 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : moom
Project : e17
Module  : libs/evas

Dir : e17/libs/evas/src/lib


Modified Files:
Evas.h 


Log Message:
* Add interceptors for color_set(), clip_set() and clip_unset()


===
RCS file: /cvs/e/e17/libs/evas/src/lib/Evas.h,v
retrieving revision 1.103
retrieving revision 1.104
diff -u -3 -r1.103 -r1.104
--- Evas.h  4 Aug 2007 13:12:43 -   1.103
+++ Evas.h  22 Aug 2007 16:45:36 -  1.104
@@ -801,6 +801,12 @@
EAPI void *evas_object_intercept_stack_below_callback_del 
(Evas_Object *obj, void (*func) (void *data, Evas_Object *obj, Evas_Object 
*below));
EAPI void  evas_object_intercept_layer_set_callback_add   
(Evas_Object *obj, void (*func) (void *data, Evas_Object *obj, int l), const 
void *data);
EAPI void *evas_object_intercept_layer_set_callback_del   
(Evas_Object *obj, void (*func) (void *data, Evas_Object *obj, int l));
+   EAPI void  evas_object_intercept_color_set_callback_add   
(Evas_Object *obj, void (*func) (void *data, Evas_Object *obj, int r, int g, 
int b, int a), const void *data);
+   EAPI void *evas_object_intercept_color_set_callback_del   
(Evas_Object *obj, void (*func) (void *data, Evas_Object *obj, int r, int g, 
int b, int a));
+   EAPI void  evas_object_intercept_clip_set_callback_add
(Evas_Object *obj, void (*func) (void *data, Evas_Object *obj, Evas_Object 
*clip), const void *data);
+   EAPI void *evas_object_intercept_clip_set_callback_del
(Evas_Object *obj, void (*func) (void *data, Evas_Object *obj, Evas_Object 
*clip));
+   EAPI void  evas_object_intercept_clip_unset_callback_add  
(Evas_Object *obj, void (*func) (void *data, Evas_Object *obj), const void 
*data);
+   EAPI void *evas_object_intercept_clip_unset_callback_del  
(Evas_Object *obj, void (*func) (void *data, Evas_Object *obj));
 
 /* Evas utility routines for color space conversions */
 /* hsv color space has h in the range 0.0 to 360.0, and s,v in the range 0.0 
to 1.0 */



-
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 moom

2006-10-06 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : moom
Project : e17
Module  : libs/evas

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


Modified Files:
evas_callbacks.c 


Log Message:
* Fix a bug with double-click


===
RCS file: /cvs/e/e17/libs/evas/src/lib/canvas/evas_callbacks.c,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -3 -r1.25 -r1.26
--- evas_callbacks.c25 Aug 2006 20:47:32 -  1.25
+++ evas_callbacks.c6 Oct 2006 19:13:33 -   1.26
@@ -212,25 +212,24 @@
 obj-callbacks-walking_list--;
 if (!obj-callbacks-walking_list)
   evas_object_event_callback_clear(obj);
+
+if (type == EVAS_CALLBACK_MOUSE_DOWN)
+  {
+ Evas_Event_Mouse_Down *ev = event_info;
+ ev-flags = flags;
+  }
+else if (type == EVAS_CALLBACK_MOUSE_UP)
+  {
+ Evas_Event_Mouse_Up *ev = event_info;
+ ev-flags = flags;
+  }
  }

if ((obj-no_propagate)  (l_mod)  (*l_mod)) return;
if ((obj-smart.parent) 
(type != EVAS_CALLBACK_FREE) 
(type = EVAS_CALLBACK_KEY_UP))
-   {
-  if (type == EVAS_CALLBACK_MOUSE_DOWN)
-{
-   Evas_Event_Mouse_Down *ev = event_info;
-   ev-flags = flags;
-}
-  else if (type == EVAS_CALLBACK_MOUSE_UP)
-{
-   Evas_Event_Mouse_Up *ev = event_info;
-   ev-flags = flags;
-}
  evas_object_event_callback_call(obj-smart.parent, type, event_info);
-   }
 }
 
 /**



-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs


E CVS: libs/evas moom

2006-09-09 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : moom
Project : e17
Module  : libs/evas

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


Modified Files:
evas_clip.c 


Log Message:
* evas_object_clip_unset(): set cur.have_clipees to 0 *after* having 
removed the object from the list of clipees (as it used to work 
actually)


===
RCS file: /cvs/e/e17/libs/evas/src/lib/canvas/evas_clip.c,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -3 -r1.24 -r1.25
--- evas_clip.c 8 Sep 2006 17:59:19 -   1.24
+++ evas_clip.c 9 Sep 2006 12:25:26 -   1.25
@@ -283,10 +283,9 @@
  }
if (obj-cur.clipper) 
  {
+obj-cur.clipper-clip.clipees = 
evas_list_remove(obj-cur.clipper-clip.clipees, obj);
if (!obj-cur.clipper-clip.clipees) 
  obj-cur.clipper-cur.have_clipees = 0;
-   else
- obj-cur.clipper-clip.clipees = 
evas_list_remove(obj-cur.clipper-clip.clipees, obj);   
evas_object_change(obj-cur.clipper);
  }
obj-cur.clipper = NULL;



-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs


E CVS: libs/evas moom

2006-08-25 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : moom
Project : e17
Module  : libs/evas

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


Modified Files:
evas_private.h 


Log Message:
* The mouse flags are now correctly calculated when the mouse 
up/down event is propagated to smart parent


===
RCS file: /cvs/e/e17/libs/evas/src/lib/include/evas_private.h,v
retrieving revision 1.72
retrieving revision 1.73
diff -u -3 -r1.72 -r1.73
--- evas_private.h  18 Aug 2006 14:45:25 -  1.72
+++ evas_private.h  25 Aug 2006 20:47:32 -  1.73
@@ -330,7 +330,8 @@
Evas_Lock  locks;
unsigned int   last_timestamp;
void  *attach_data;
-   intlast_click_counter;
+   intlast_mouse_down_counter;
+   intlast_mouse_up_counter;
Evas_Font_Hinting_Flags hinting;
 };
 
@@ -418,7 +419,8 @@
   unsigned char deletions_waiting : 1;
} smart;
 
-   int last_click_counter;
+   int last_mouse_down_counter;
+   int last_mouse_up_counter;
int mouse_grabbed;
 
unsigned short  store : 1;



-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs


E CVS: libs/evas moom

2006-08-25 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : moom
Project : e17
Module  : libs/evas

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


Modified Files:
evas_callbacks.c evas_events.c 


Log Message:
* The mouse flags are now correctly calculated when the mouse 
up/down event is propagated to smart parent


===
RCS file: /cvs/e/e17/libs/evas/src/lib/canvas/evas_callbacks.c,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -3 -r1.24 -r1.25
--- evas_callbacks.c6 Jan 2006 23:05:17 -   1.24
+++ evas_callbacks.c25 Aug 2006 20:47:32 -  1.25
@@ -112,92 +112,125 @@
 evas_object_event_callback_call(Evas_Object *obj, Evas_Callback_Type type, 
void *event_info)
 {
/* MEM OK */
-   Evas_Object_List **l_mod, *l;
+   Evas_Object_List **l_mod = NULL, *l;
+   Evas_Button_Flags flags = EVAS_BUTTON_NONE;
+   Evas *e;
 
if (obj-delete_me) return;
-   if (!obj-callbacks)
+   e = evas_object_evas_get(obj);
+ 
+   if (obj-callbacks)
  {
-   if ((obj-smart.parent) 
-   (type != EVAS_CALLBACK_FREE) 
-   (type = EVAS_CALLBACK_KEY_UP))
- evas_object_event_callback_call(obj-smart.parent, type, event_info);
-   return;
- }
-   switch (type)
- {
-  case EVAS_CALLBACK_MOUSE_IN:
-   l_mod = (obj-callbacks-in);
-   break;
-  case EVAS_CALLBACK_MOUSE_OUT:
-   l_mod = (obj-callbacks-out);
-   break;
-  case EVAS_CALLBACK_MOUSE_DOWN:
-   l_mod = (obj-callbacks-down);
-   break;
-  case EVAS_CALLBACK_MOUSE_UP:
-   l_mod = (obj-callbacks-up);
-   break;
-  case EVAS_CALLBACK_MOUSE_MOVE:
-   l_mod = (obj-callbacks-move);
-   break;
- case EVAS_CALLBACK_MOUSE_WHEEL:
-   l_mod = (obj-callbacks-wheel);
-   break;
-  case EVAS_CALLBACK_FREE:
-   l_mod = (obj-callbacks-free);
-   break;
-  case EVAS_CALLBACK_KEY_DOWN:
-   l_mod = (obj-callbacks-key_down);
-   break;
-  case EVAS_CALLBACK_KEY_UP:
-   l_mod = (obj-callbacks-key_up);
-   break;
-  case EVAS_CALLBACK_FOCUS_IN:
-   l_mod = (obj-callbacks-obj_focus_in);
-   break;
-  case EVAS_CALLBACK_FOCUS_OUT:
-   l_mod = (obj-callbacks-obj_focus_out);
-   break;
-  case EVAS_CALLBACK_SHOW:
-   l_mod = (obj-callbacks-obj_show);
-   break;
-  case EVAS_CALLBACK_HIDE:
-   l_mod = (obj-callbacks-obj_hide);
-   break;
-  case EVAS_CALLBACK_MOVE:
-   l_mod = (obj-callbacks-obj_move);
-   break;
-  case EVAS_CALLBACK_RESIZE:
-   l_mod = (obj-callbacks-obj_resize);
-   break;
-  case EVAS_CALLBACK_RESTACK:
-   l_mod = (obj-callbacks-obj_restack);
-   break;
-  default:
-   return;
-   break;
- }
-   obj-callbacks-walking_list++;
-   for (l = *l_mod; l; l = l-next)
- {
-   Evas_Func_Node *fn;
+switch (type)
+  {
+ case EVAS_CALLBACK_MOUSE_IN:
+  l_mod = (obj-callbacks-in);
+  break;
+ case EVAS_CALLBACK_MOUSE_OUT:
+  l_mod = (obj-callbacks-out);
+  break;
+ case EVAS_CALLBACK_MOUSE_DOWN:
+   {
+  Evas_Event_Mouse_Down *ev = event_info;
+  
+  flags = ev-flags;
+ if (ev-flags  (EVAS_BUTTON_DOUBLE_CLICK | 
EVAS_BUTTON_TRIPLE_CLICK))
+   {
+  if (obj-last_mouse_down_counter  
(e-last_mouse_down_counter - 1))
+ev-flags = ~(EVAS_BUTTON_DOUBLE_CLICK | 
EVAS_BUTTON_TRIPLE_CLICK);
+   }
+ l_mod = (obj-callbacks-down);
+  obj-last_mouse_down_counter = e-last_mouse_down_counter;
+ break;
+   }
+ case EVAS_CALLBACK_MOUSE_UP:
+   {
+  Evas_Event_Mouse_Up *ev = event_info;
+  
+  flags = ev-flags;
+ if (ev-flags  (EVAS_BUTTON_DOUBLE_CLICK | 
EVAS_BUTTON_TRIPLE_CLICK))
+   {
+  if (obj-last_mouse_up_counter  
(e-last_mouse_up_counter - 1))
+ev-flags = ~(EVAS_BUTTON_DOUBLE_CLICK | 
EVAS_BUTTON_TRIPLE_CLICK);
+   }
+ l_mod = (obj-callbacks-up);
+  obj-last_mouse_up_counter = e-last_mouse_up_counter;
+ break;
+   }
+ case EVAS_CALLBACK_MOUSE_MOVE:
+  l_mod = (obj-callbacks-move);
+  break;
+case EVAS_CALLBACK_MOUSE_WHEEL:
+  l_mod = (obj-callbacks-wheel);
+  break;
+ case EVAS_CALLBACK_FREE:
+  l_mod = (obj-callbacks-free);
+  break;
+ case EVAS_CALLBACK_KEY_DOWN:
+   l_mod = (obj-callbacks-key_down);
+   break;
+ case EVAS_CALLBACK_KEY_UP:
+   l_mod = (obj-callbacks-key_up);

E CVS: libs/evas moom

2006-08-02 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : moom
Project : e17
Module  : libs/evas

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


Modified Files:
evas_object_smart.c 


Log Message:
* Add evas_object_smart_parent_get() to get the smart parent of an Evas_Object
* Add evas_object_smart_members_get() to get a list of the member objects of a 
smart object


===
RCS file: /cvs/e/e17/libs/evas/src/lib/canvas/evas_object_smart.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -3 -r1.23 -r1.24
--- evas_object_smart.c 30 Jul 2006 14:30:24 -  1.23
+++ evas_object_smart.c 3 Aug 2006 02:14:53 -   1.24
@@ -184,6 +184,44 @@
 }
 
 /**
+ * Gets the smart parent of an Evas_Object
+ * @param obj the Evas_Object you want to get the parent
+ * @return Returns the smart parent of @a obj, or NULL if @a obj is not a 
smart member of another Evas_Object
+ */
+EAPI Evas_Object *
+evas_object_smart_parent_get(Evas_Object *obj)
+{
+   MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
+   return NULL;
+   MAGIC_CHECK_END();
+   
+   return obj-smart.parent;
+}
+
+/**
+ * Gets the list of the member objects of an Evas_Object
+ * @param obj the Evas_Object you want to get the list of member objects
+ * @return Returns the list of the member objects of @a obj.
+ * The returned list should be freed with evas_list_free() when you no longer 
need it
+ */
+EAPI Evas_List *
+evas_object_smart_members_get(Evas_Object *obj)
+{
+   Evas_List *members;
+   Evas_Object_List *member;
+   
+   MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
+   return NULL;
+   MAGIC_CHECK_END();
+   
+   members = NULL;
+   for (member = obj-smart.contained; member; member = member-next)
+  members = evas_list_append(members, member);
+   
+   return members;
+}
+
+/**
  * To be documented.
  *
  * FIXME: To be fixed.



-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs


E CVS: libs/evas moom

2006-08-02 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : moom
Project : e17
Module  : libs/evas

Dir : e17/libs/evas/src/lib


Modified Files:
Evas.h 


Log Message:
* Add evas_object_smart_parent_get() to get the smart parent of an Evas_Object
* Add evas_object_smart_members_get() to get a list of the member objects of a 
smart object


===
RCS file: /cvs/e/e17/libs/evas/src/lib/Evas.h,v
retrieving revision 1.86
retrieving revision 1.87
diff -u -3 -r1.86 -r1.87
--- Evas.h  27 Jul 2006 19:27:34 -  1.86
+++ Evas.h  3 Aug 2006 02:14:53 -   1.87
@@ -660,6 +660,8 @@
EAPI Evas_Object  *evas_object_smart_add (Evas *e, 
Evas_Smart *s);
EAPI void  evas_object_smart_member_add  (Evas_Object *obj, 
Evas_Object *smart_obj);
EAPI void  evas_object_smart_member_del  (Evas_Object *obj);
+   EAPI Evas_Object  *evas_object_smart_parent_get  (Evas_Object *obj);
+   EAPI Evas_List*evas_object_smart_members_get (Evas_Object *obj);
EAPI Evas_Smart   *evas_object_smart_smart_get   (Evas_Object *obj);
EAPI void *evas_object_smart_data_get(Evas_Object *obj);
EAPI void  evas_object_smart_data_set(Evas_Object *obj, 
void *data);



-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs


E CVS: libs/evas moom

2006-05-21 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : moom
Project : e17
Module  : libs/evas

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


Modified Files:
evas_gradient_main.c 


Log Message:
* Move the optimizations of Jose for the hsv/rgb conversion functions to Evas


===
RCS file: /cvs/e/e17/libs/evas/src/lib/engines/common/evas_gradient_main.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -3 -r1.7 -r1.8
--- evas_gradient_main.c17 May 2006 22:11:46 -  1.7
+++ evas_gradient_main.c21 May 2006 09:43:58 -  1.8
@@ -752,94 +752,110 @@
evas_common_gradient_map_argb(dc, gr, spread);
 }
 
-/* from imlib2 code */
 void
 evas_common_convert_hsv_to_rgb(float h, float s, float v, int *r, int *g, int 
*b)
 {
-   int   i;
-   float f, p, q, t;
+   int i, rr, gg, bb;
+   float f;
 
-   v = 255 * v;
+   v *= 255;
if (s == 0)
  {
-   if (r) *r = v;
-   if (g) *g = v;
-   if (b) *b = v;
-   return;
+   if (r) *r = v;
+   if (g) *g = v;
+   if (b) *b = v;
+   return;
  }
+ 
+ 
h /= 60;
i = h;
f = h - i;
 
-   s = v * s;
-   f = s * f;
-   p = v - s;
-   q = v - f;
-   t = p + f;
+   s *= v;
+   f *= s;
+   s = v - s;
switch (i)
  {
-   case 0:
-case 6:
- if (r) *r = v;
- if (g) *g = t;
- if (b) *b = p;
- return;
-   case 1:
- if (r) *r = q;
- if (g) *g = v;
- if (b) *b = p;
- return;
-   case 2:
- if (r) *r = p;
- if (g) *g = v;
- if (b) *b = t;
- return;
-   case 3:
- if (r) *r = p;
- if (g) *g = q;
- if (b) *b = v;
- return;
-   case 4:
- if (r) *r = t;
- if (g) *g = p;
- if (b) *b = v;
- return;
-   default:
- if (r) *r = v;
- if (g) *g = p;
- if (b) *b = q;
+   case 1:
+ rr = v - f;  gg = v;  bb = s;
+ break;
+   case 2:
+ rr = s;  gg = v;  bb = s + f;
+ break;
+   case 3:
+ rr = s;  gg = v - f;  bb = v;
+ break;
+   case 4:
+ rr = s + f;  gg = s;  bb = v;
+ break;
+   case 5:
+ rr = v;  gg = s;  bb = v - f;
+ break;
+   default:
+ rr = v;  gg = s + f;  bb = s;
+ break;
  }
+ 
+   if (r) *r = rr;
+   if (g) *g = gg;
+   if (b) *b = bb;
 }
 
 void
 evas_common_convert_rgb_to_hsv(int r, int g, int b, float *h, float *s, float 
*v)
 {
-   float  min, max, del;
+   int max, min, d = r - g;
+   float hh, ss, vv;
 
-   min = MIN(r,g);  min = MIN(min,b);
-   max = MAX(r,g);  max = MAX(max,b);
-   del = max - min;
+   //set min to MIN(g,r)
+   d = ((d  (~(d  8)))  0xff);
+   min = r - d;
+   //set max to MAX(g,r)
+   max = g + d;
+
+   //set min to MIN(b,min)
+   d = min - b;
+   min -= ((d  (~(d  8)))  0xff);
+
+   //set max to MAX(max,b)
+   d = b - max;
+   max += ((d  (~(d  8)))  0xff);
 
-   if (v) *v = (max / 255);
-   if ((max == 0) || (del == 0))
+   d = max - min;
+
+   if (v) *v = (max / 255.0);
+   if (!(max  d))
  {
if (s) *s = 0;
-   if (h) *h = 0;
+if (h) *h = 0;
return; 
  }
 
-   if (s) *s = (del / max);
-
-   if (!h) return;
+   if (s) *s = (d / (float)max);
if (r == max)
-   *h = ((g - b) / del);
-   else if (g == max)
-   *h = 2 + ((b - r) / del);
-   else if (b == max)
-   *h = 4 + ((r - g) / del);
-
-   *h *= 60;
-   if (*h  0) *h += 360;
+ {
+   if (h)
+ {
+   *h = 60 * ((g - b) / (float)d);
+   if (*h  0) *h += 360;
+ }
+   return;
+ }
+   if (g == max)
+ {
+   if (h)
+ {
+   *h = 120 + (60 * ((b - r) / (float)d));
+   if (*h  0) *h += 360;
+ }
+   return;
+ }
+   if (h)
+ {
+   *h = 240 + (60 * ((r - g) / (float)d));
+   if (*h  0) *h += 360;
+ }
 }
 
 void




---
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs


E CVS: libs/evas moom

2006-05-17 Thread Enlightenment CVS
Enlightenment CVS committal

Author  : moom
Project : e17
Module  : libs/evas

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


Modified Files:
evas_gradient_main.c 


Log Message:
* Fix hsv--rgb conversion if h=360.0


===
RCS file: /cvs/e/e17/libs/evas/src/lib/engines/common/evas_gradient_main.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -3 -r1.6 -r1.7
--- evas_gradient_main.c2 May 2006 07:28:47 -   1.6
+++ evas_gradient_main.c17 May 2006 22:11:46 -  1.7
@@ -779,6 +779,7 @@
switch (i)
  {
case 0:
+case 6:
  if (r) *r = v;
  if (g) *g = t;
  if (b) *b = p;
@@ -862,6 +863,7 @@
switch (i)
  {
case 0:
+case 6:
  *r = v; *g = t; *b = p;
  return;
case 1:




---
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs