Enlightenment CVS committal

Author  : rephorm
Project : e17
Module  : libs/estyle

Dir     : e17/libs/estyle/src


Modified Files:
        Estyle.h Estyle_private.h estyle.c 


Log Message:

Added a "type" field for estyle bits.
This is just an arbitrary integer that can be used as desired.

For example, etox uses this to determine whether a bit is normal text, a wrap marker, 
or an obstacle.

===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/estyle/src/Estyle.h,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -3 -r1.15 -r1.16
--- Estyle.h    5 Aug 2003 16:42:44 -0000       1.15
+++ Estyle.h    8 Sep 2003 02:20:35 -0000       1.16
@@ -70,6 +70,8 @@
                         void (*func) (void *_data, Evas_Object * _es,
                                       void *event_info));
 
+void estyle_set_type(Evas_Object *obj, int type);
+int  estyle_get_type(Evas_Object *obj);
 #ifdef __cplusplus
 }
 #endif
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/estyle/src/Estyle_private.h,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -3 -r1.13 -r1.14
--- Estyle_private.h    8 Aug 2003 05:01:03 -0000       1.13
+++ Estyle_private.h    8 Sep 2003 02:20:35 -0000       1.14
@@ -84,6 +84,12 @@
        int spaces;
 
        /*
+        * A field for setting types
+        * (What the values mean is up to the user)
+        */
+       int type;
+        
+       /*
         * Callbacks.
         */
        Evas_List *callbacks;
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/estyle/src/estyle.c,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -3 -r1.28 -r1.29
--- estyle.c    20 Aug 2003 18:44:18 -0000      1.28
+++ estyle.c    8 Sep 2003 02:20:35 -0000       1.29
@@ -78,6 +78,11 @@
        if (es->style)
                _estyle_style_draw(es, text);
 
+       /*
+        * default to type of 0
+        */
+       es->type = 0;
+
        estyle_set_text(obj, text);
 
        return obj;
@@ -1058,4 +1063,30 @@
                        FREE(cb);
                }
        }
+}
+
+
+void
+estyle_set_type(Evas_Object *obj, int type)
+{
+       Estyle * es;
+
+       CHECK_PARAM_POINTER("obj", obj);
+
+       es = evas_object_smart_data_get(obj);
+
+       es->type = type;
+
+}
+
+int 
+estyle_get_type(Evas_Object *obj)
+{
+       Estyle * es;
+
+       CHECK_PARAM_POINTER("obj", obj);
+
+       es = evas_object_smart_data_get(obj);
+       
+       return es->type;
 }




-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to