Enlightenment CVS committal

Author  : dj2
Project : e17
Module  : libs/ewl

Dir     : e17/libs/ewl/src/lib


Modified Files:
        ewl_box.c ewl_text.c ewl_window.c 


Log Message:
- all style information to be set into the theme

===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/lib/ewl_box.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -3 -r1.4 -r1.5
--- ewl_box.c   22 May 2005 06:27:33 -0000      1.4
+++ ewl_box.c   21 Aug 2005 06:08:53 -0000      1.5
@@ -24,7 +24,7 @@
        int             (*fill_ask) (Ewl_Object * ob);
        void            (*fill_set) (Ewl_Object * ob, int size);
 
-       int    (*align_ask) (Ewl_Object * ob);
+       int             (*align_ask) (Ewl_Object * ob);
        void            (*align_set) (Ewl_Object * ob, int size);
 
 } Box_Orientation;
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/lib/ewl_text.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -3 -r1.18 -r1.19
--- ewl_text.c  19 Aug 2005 18:14:21 -0000      1.18
+++ ewl_text.c  21 Aug 2005 06:08:53 -0000      1.19
@@ -104,9 +104,10 @@
        {
                DRETURN_INT(FALSE, DLEVEL_STABLE);
        }
-       t->current_context = ewl_text_context_default_create(t);
+       t->current_context = NULL;
 
-       ewl_text_text_set(t, text);
+       if (text)
+               ewl_text_text_set(t, text);
 
        ewl_callback_append(EWL_WIDGET(t), EWL_CALLBACK_CONFIGURE, 
                                        ewl_text_cb_configure, NULL);
@@ -2770,6 +2771,7 @@
 ewl_text_context_default_create(Ewl_Text *t)
 {
        Ewl_Text_Context *tx = NULL, *tmp;
+    int i;
 
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR_RET("t", t, NULL);
@@ -2785,8 +2787,119 @@
        tmp->color.b = ewl_theme_data_int_get(EWL_WIDGET(t), "color/b");
        tmp->color.a = ewl_theme_data_int_get(EWL_WIDGET(t), "color/a");
 
-       /* XXX grap the style, alignment and wrap data from the theme here 
-        *     and all the bg values */
+       i = ewl_theme_data_int_get(EWL_WIDGET(t), "underline");
+       if (i)
+       {
+               tmp->styles |= EWL_TEXT_STYLE_UNDERLINE;
+               tmp->style_colors.underline.r = 
ewl_theme_data_int_get(EWL_WIDGET(t),
+                               "underline/color/r");
+               tmp->style_colors.underline.g = 
ewl_theme_data_int_get(EWL_WIDGET(t),
+                               "underline/color/g");
+               tmp->style_colors.underline.b = 
ewl_theme_data_int_get(EWL_WIDGET(t),
+                               "underline/color/b");
+               tmp->style_colors.underline.a = 
ewl_theme_data_int_get(EWL_WIDGET(t),
+                               "underline/color/a");
+       }
+
+       i = ewl_theme_data_int_get(EWL_WIDGET(t), "double_underline");
+       if (i)
+       {
+               tmp->styles |= EWL_TEXT_STYLE_DOUBLE_UNDERLINE;
+               tmp->style_colors.double_underline.r = 
ewl_theme_data_int_get(EWL_WIDGET(t),
+                               "double_underline/color/r");
+               tmp->style_colors.double_underline.g = 
ewl_theme_data_int_get(EWL_WIDGET(t),
+                               "double_underline/color/g");
+               tmp->style_colors.double_underline.b = 
ewl_theme_data_int_get(EWL_WIDGET(t),
+                               "double_underline/color/b");
+               tmp->style_colors.double_underline.a = 
ewl_theme_data_int_get(EWL_WIDGET(t),
+                               "double_underline/color/a");
+       }
+
+       i = ewl_theme_data_int_get(EWL_WIDGET(t), "strikethrough");
+       if (i)
+       {
+               tmp->styles |= EWL_TEXT_STYLE_STRIKETHROUGH;
+               tmp->style_colors.strikethrough.r = 
ewl_theme_data_int_get(EWL_WIDGET(t),
+                               "strikethrough/color/r");
+               tmp->style_colors.strikethrough.g = 
ewl_theme_data_int_get(EWL_WIDGET(t),
+                               "strikethrough/color/g");
+               tmp->style_colors.strikethrough.b = 
ewl_theme_data_int_get(EWL_WIDGET(t),
+                               "strikethrough/color/b");
+               tmp->style_colors.strikethrough.a = 
ewl_theme_data_int_get(EWL_WIDGET(t),
+                               "strikethrough/color/a");
+       }
+
+       i = ewl_theme_data_int_get(EWL_WIDGET(t), "shadow");
+       if (i)
+       {
+               tmp->styles |= EWL_TEXT_STYLE_SHADOW;
+               tmp->style_colors.shadow.r = 
ewl_theme_data_int_get(EWL_WIDGET(t),
+                               "shadow/color/r");
+               tmp->style_colors.shadow.g = 
ewl_theme_data_int_get(EWL_WIDGET(t),
+                               "shadow/color/g");
+               tmp->style_colors.shadow.b = 
ewl_theme_data_int_get(EWL_WIDGET(t),
+                               "shadow/color/b");
+               tmp->style_colors.shadow.a = 
ewl_theme_data_int_get(EWL_WIDGET(t),
+                               "shadow/color/a");
+       }
+
+       i = ewl_theme_data_int_get(EWL_WIDGET(t), "soft_shadow");
+       if (i)
+       {
+               tmp->styles |= EWL_TEXT_STYLE_SOFT_SHADOW;
+               tmp->style_colors.shadow.r = 
ewl_theme_data_int_get(EWL_WIDGET(t),
+                               "shadow/color/r");
+               tmp->style_colors.shadow.g = 
ewl_theme_data_int_get(EWL_WIDGET(t),
+                               "shadow/color/g");
+               tmp->style_colors.shadow.b = 
ewl_theme_data_int_get(EWL_WIDGET(t),
+                               "shadow/color/b");
+               tmp->style_colors.shadow.a = 
ewl_theme_data_int_get(EWL_WIDGET(t),
+                               "shadow/color/a");
+       }
+
+       i = ewl_theme_data_int_get(EWL_WIDGET(t), "far_shadow");
+       if (i)
+       {
+               tmp->styles |= EWL_TEXT_STYLE_FAR_SHADOW;
+               tmp->style_colors.shadow.r = 
ewl_theme_data_int_get(EWL_WIDGET(t),
+                               "shadow/color/r");
+               tmp->style_colors.shadow.g = 
ewl_theme_data_int_get(EWL_WIDGET(t),
+                               "shadow/color/g");
+               tmp->style_colors.shadow.b = 
ewl_theme_data_int_get(EWL_WIDGET(t),
+                               "shadow/color/b");
+               tmp->style_colors.shadow.a = 
ewl_theme_data_int_get(EWL_WIDGET(t),
+                               "shadow/color/a");
+       }
+
+       i = ewl_theme_data_int_get(EWL_WIDGET(t), "outline");
+       if (i)
+       {
+               tmp->styles |= EWL_TEXT_STYLE_OUTLINE;
+               tmp->style_colors.outline.r = 
ewl_theme_data_int_get(EWL_WIDGET(t),
+                               "outline/color/r");
+               tmp->style_colors.outline.g = 
ewl_theme_data_int_get(EWL_WIDGET(t),
+                               "outline/color/g");
+               tmp->style_colors.outline.b = 
ewl_theme_data_int_get(EWL_WIDGET(t),
+                               "outline/color/b");
+               tmp->style_colors.outline.a = 
ewl_theme_data_int_get(EWL_WIDGET(t),
+                               "outline/color/a");
+       }
+
+       i = ewl_theme_data_int_get(EWL_WIDGET(t), "glow");
+       if (i)
+       {
+               tmp->styles |= EWL_TEXT_STYLE_GLOW;
+               tmp->style_colors.glow.r = ewl_theme_data_int_get(EWL_WIDGET(t),
+                               "glow/color/r");
+               tmp->style_colors.glow.g = ewl_theme_data_int_get(EWL_WIDGET(t),
+                               "glow/color/g");
+               tmp->style_colors.glow.b = ewl_theme_data_int_get(EWL_WIDGET(t),
+                               "glow/color/b");
+               tmp->style_colors.glow.a = ewl_theme_data_int_get(EWL_WIDGET(t),
+                               "glow/color/a");
+       }
+
+       /* XXX grap the alignment and wrap data from the theme here */
 
        tx = ewl_text_context_find(tmp, EWL_TEXT_CONTEXT_MASK_NONE, NULL);
        ewl_text_context_free(tmp);
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/lib/ewl_window.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -3 -r1.12 -r1.13
--- ewl_window.c        20 Jul 2005 07:35:58 -0000      1.12
+++ ewl_window.c        21 Aug 2005 06:08:53 -0000      1.13
@@ -799,3 +799,4 @@
 
        DLEAVE_FUNCTION(DLEVEL_STABLE);
 }
+




-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to