Enlightenment CVS committal

Author  : dj2
Project : e17
Module  : libs/ewl

Dir     : e17/libs/ewl/src/lib


Modified Files:
        ewl_text.c ewl_text.h ewl_theme.c 


Log Message:
- type checking

===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/lib/ewl_text.c,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -3 -r1.32 -r1.33
--- ewl_text.c  23 Oct 2005 16:05:37 -0000      1.32
+++ ewl_text.c  26 Oct 2005 01:25:31 -0000      1.33
@@ -64,7 +64,7 @@
  * @return Returns a new Ewl_Text widget on success, NULL on failure.
  */
 Ewl_Widget *
-ewl_text_new()
+ewl_text_new(void)
 {
        Ewl_Widget *w;
        DENTER_FUNCTION(DLEVEL_STABLE);
@@ -123,7 +123,7 @@
                                        ewl_text_cb_show, NULL);
        ewl_callback_append(EWL_WIDGET(t), EWL_CALLBACK_HIDE,
                                        ewl_text_cb_hide, NULL);
-       ewl_callback_append(EWL_WIDGET(t), EWL_CALLBACK_DESTROY,
+       ewl_callback_prepend(EWL_WIDGET(t), EWL_CALLBACK_DESTROY,
                                        ewl_text_cb_destroy, NULL);
        ewl_callback_append(EWL_WIDGET(t), EWL_CALLBACK_MOUSE_DOWN,
                                        ewl_text_cb_mouse_down, NULL);
@@ -159,6 +159,7 @@
 {
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR_RET("t", t, 0);
+       DCHECK_TYPE_RET("t", t, "text", 0);
 
        DRETURN_INT(t->length, DLEVEL_STABLE);
 }
@@ -180,6 +181,7 @@
 
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR("t", t);
+       DCHECK_TYPE("t", t, "text");
 
        /* can't do this if we don't have an evas object */
        if ((!REALIZED(t)) || (!t->textblock) || (!t->text))
@@ -226,6 +228,7 @@
 
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR_RET("t", t, 0);
+       DCHECK_TYPE_RET("t", t, "text", 0);
 
        if ((!REALIZED(t)) || (!t->textblock) || (!t->text))
        {
@@ -284,6 +287,7 @@
 {
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR_RET("t", t, NULL);
+       DCHECK_TYPE_RET("t", t, "text", NULL);
 
        DRETURN_PTR(((t->text) ? strdup(t->text) : NULL), DLEVEL_STABLE);
 }
@@ -298,6 +302,7 @@
 {
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR("t", t);
+       DCHECK_TYPE("t", t, "text");
 
        t->cursor_position = 0;
        ewl_text_text_insert(t, NULL, t->cursor_position);
@@ -332,6 +337,7 @@
 {
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR("t", t);
+       DCHECK_TYPE("t", t, "text");
 
        ewl_text_text_insert(t, text, t->length);
 
@@ -351,6 +357,7 @@
 
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR("t", t);
+       DCHECK_TYPE("t", t, "text");
 
        if (!text)
        {
@@ -433,6 +440,7 @@
 {
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR("t", t);
+       DCHECK_TYPE("t", t, "text");
 
        if ((length == 0) || (t->cursor_position >= t->length))
        {
@@ -491,6 +499,8 @@
        char *ret = NULL;
 
        DENTER_FUNCTION(DLEVEL_STABLE);
+       DCHECK_PARAM_PTR_RET("t", t, NULL);
+       DCHECK_TYPE_RET("t", t, "text", NULL);
 
        if (t->selection->len == 0)
        {
@@ -518,6 +528,8 @@
 ewl_text_selection_get(Ewl_Text *t)
 {
        DENTER_FUNCTION(DLEVEL_STABLE);
+       DCHECK_PARAM_PTR_RET("t", t, NULL);
+       DCHECK_TYPE_RET("t", t, "text", NULL);
 
        if (ewl_text_trigger_length_get(t->selection) > 0)
        {
@@ -536,6 +548,7 @@
 {
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR_RET("t", t, FALSE);
+       DCHECK_TYPE_RET("t", t, "text", FALSE);
 
        if (ewl_text_selection_get(t))
        {
@@ -545,7 +558,6 @@
        DRETURN_INT(FALSE, DLEVEL_STABLE);
 }
 
-
 /**
  * @param t: The Ewl_Text widget to set the position into
  * @param pos: The position to set
@@ -558,6 +570,7 @@
 
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR("t", t);
+       DCHECK_TYPE("t", t, "text");
 
        /* make sure we aren't more then the next char past the end of the
         * text */
@@ -588,6 +601,7 @@
 {
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR_RET("t", t, 0);
+       DCHECK_TYPE_RET("t", t, "text", 0);
 
        DRETURN_INT(t->cursor_position, DLEVEL_STABLE);
 }
@@ -607,6 +621,7 @@
 
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR_RET("t", t, t->cursor_position);
+       DCHECK_TYPE_RET("t", t, "text", t->cursor_position);
 
        cur_idx = ewl_text_cursor_position_get(t);
        cursor = ewl_text_textblock2_cursor_position(t, cur_idx);
@@ -649,6 +664,7 @@
 
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR_RET("t", t, t->cursor_position);
+       DCHECK_TYPE_RET("t", t, "text", t->cursor_position);
 
        cur_idx = ewl_text_cursor_position_get(t);
        cursor = ewl_text_textblock2_cursor_position(t, cur_idx);
@@ -683,6 +699,7 @@
 
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR("t", t);
+       DCHECK_TYPE("t", t, "text");
 
        /* do we have a current context? */
        if (t->current_context)
@@ -709,6 +726,7 @@
 
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR("t", t);
+       DCHECK_TYPE("t", t, "text");
 
        change = ewl_text_context_new();
 
@@ -737,6 +755,7 @@
 
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR("t", t);
+       DCHECK_TYPE("t", t, "text");
 
        /* if length is 0 we have nothing to do */
        if (length == 0) 
@@ -770,6 +789,7 @@
 
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR_RET("t", t, NULL);
+       DCHECK_TYPE("t", t, "text");
 
        tx = ewl_text_btree_context_get(t->formatting, idx);
        if (tx && tx->font)
@@ -789,6 +809,7 @@
 
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR("t", t);
+       DCHECK_TYPE("t", t, "text");
 
        change = ewl_text_context_new();
        change->size = size;
@@ -814,6 +835,7 @@
 
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR("t", t);
+       DCHECK_TYPE("t", t, "text");
 
        if (length == 0)
        {
@@ -843,6 +865,7 @@
 
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR_RET("t", t, 0);
+       DCHECK_TYPE_RET("t", t, "text", 0);
 
        tx = ewl_text_btree_context_get(t->formatting, idx);
 
@@ -864,6 +887,7 @@
 
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR("t", t);
+       DCHECK_TYPE("t", t, "text");
 
        change = ewl_text_context_new();
        change->color.r = r;
@@ -897,6 +921,7 @@
 
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR("t", t);
+       DCHECK_TYPE("t", t, "text");
 
        /* set this into the b-tree if we have length */
        if (length == 0)
@@ -937,6 +962,7 @@
 
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR("t", t);
+       DCHECK_TYPE("t", t, "text");
 
        tx = ewl_text_btree_context_get(t->formatting, idx);
        if (tx)
@@ -961,6 +987,7 @@
 
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR("t", t);
+       DCHECK_TYPE("t", t, "text");
 
        change = ewl_text_context_new();
        change->align = align;
@@ -986,6 +1013,7 @@
 
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR("t", t);
+       DCHECK_TYPE("t", t, "text");
 
        if (length == 0)
        {
@@ -1015,6 +1043,7 @@
 
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR_RET("t", t, 0);
+       DCHECK_TYPE_RET("t", t, "text", 0);
 
        tx = ewl_text_btree_context_get(t->formatting, idx);
 
@@ -1032,6 +1061,7 @@
 
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR("t", t);
+       DCHECK_TYPE("t", t, "text");
 
        change = ewl_text_context_new();
        change->styles = styles;
@@ -1057,6 +1087,7 @@
 
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR("t", t);
+       DCHECK_TYPE("t", t, "text");
 
        if (length == 0)
        {
@@ -1086,6 +1117,7 @@
 
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR_RET("t", t, 0);
+       DCHECK_TYPE_RET("t", t, "text", 0);
 
        tx = ewl_text_btree_context_get(t->formatting, idx);
 
@@ -1103,6 +1135,7 @@
 
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR("t", t);
+       DCHECK_TYPE("t", t, "text");
 
        change = ewl_text_context_new();
        change->wrap = wrap;
@@ -1128,6 +1161,7 @@
 
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR("t", t);
+       DCHECK_TYPE("t", t, "text");
 
        if (length == 0)
        {
@@ -1157,6 +1191,7 @@
 
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR_RET("t", t, 0);
+       DCHECK_TYPE_RET("t", t, "text", 0);
 
        tx = ewl_text_btree_context_get(t->formatting, idx);
 
@@ -1178,6 +1213,7 @@
 
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR("t", t);
+       DCHECK_TYPE("t", t, "text");
 
        change = ewl_text_context_new();
        change->style_colors.bg.r = r;
@@ -1211,6 +1247,7 @@
 
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR("t", t);
+       DCHECK_TYPE("t", t, "text");
 
        /* set this into the b-tree if we have length */
        if (length == 0)
@@ -1251,6 +1288,7 @@
 
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR("t", t);
+       DCHECK_TYPE("t", t, "text");
 
        tx = ewl_text_btree_context_get(t->formatting, idx);
        if (tx)
@@ -1279,6 +1317,7 @@
 
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR("t", t);
+       DCHECK_TYPE("t", t, "text");
 
        change = ewl_text_context_new();
        change->style_colors.glow.r = r;
@@ -1312,6 +1351,7 @@
 
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR("t", t);
+       DCHECK_TYPE("t", t, "text");
 
        /* set this into the b-tree if we have length */
        if (length == 0)
@@ -1352,6 +1392,7 @@
 
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR("t", t);
+       DCHECK_TYPE("t", t, "text");
 
        tx = ewl_text_btree_context_get(t->formatting, idx);
        if (tx)
@@ -1380,6 +1421,7 @@
 
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR("t", t);
+       DCHECK_TYPE("t", t, "text");
 
        change = ewl_text_context_new();
        change->style_colors.outline.r = r;
@@ -1413,6 +1455,7 @@
 
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR("t", t);
+       DCHECK_TYPE("t", t, "text");
 
        /* set this into the b-tree if we have length */
        if (length == 0)
@@ -1453,6 +1496,7 @@
 
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR("t", t);
+       DCHECK_TYPE("t", t, "text");
 
        tx = ewl_text_btree_context_get(t->formatting, idx);
        if (tx)
@@ -1481,6 +1525,7 @@
 
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR("t", t);
+       DCHECK_TYPE("t", t, "text");
 
        change = ewl_text_context_new();
        change->style_colors.shadow.r = r;
@@ -1514,6 +1559,7 @@
 
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR("t", t);
+       DCHECK_TYPE("t", t, "text");
 
        /* set this into the b-tree if we have length */
        if (length == 0)
@@ -1554,6 +1600,7 @@
 
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR("t", t);
+       DCHECK_TYPE("t", t, "text");
 
        tx = ewl_text_btree_context_get(t->formatting, idx);
        if (tx)
@@ -1582,6 +1629,7 @@
 
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR("t", t);
+       DCHECK_TYPE("t", t, "text");
 
        change = ewl_text_context_new();
        change->style_colors.strikethrough.r = r;
@@ -1615,6 +1663,7 @@
 
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR("t", t);
+       DCHECK_TYPE("t", t, "text");
 
        /* set this into the b-tree if we have length */
        if (length == 0)
@@ -1655,6 +1704,7 @@
 
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR("t", t);
+       DCHECK_TYPE("t", t, "text");
 
        tx = ewl_text_btree_context_get(t->formatting, idx);
        if (tx)
@@ -1683,6 +1733,7 @@
 
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR("t", t);
+       DCHECK_TYPE("t", t, "text");
 
        change = ewl_text_context_new();
        change->style_colors.underline.r = r;
@@ -1716,6 +1767,7 @@
 
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR("t", t);
+       DCHECK_TYPE("t", t, "text");
 
        /* set this into the b-tree if we have length */
        if (length == 0)
@@ -1756,6 +1808,7 @@
 
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR("t", t);
+       DCHECK_TYPE("t", t, "text");
 
        tx = ewl_text_btree_context_get(t->formatting, idx);
        if (tx)
@@ -1784,6 +1837,7 @@
 
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR("t", t);
+       DCHECK_TYPE("t", t, "text");
 
        change = ewl_text_context_new();
        change->style_colors.double_underline.r = r;
@@ -1817,6 +1871,7 @@
 
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR("t", t);
+       DCHECK_TYPE("t", t, "text");
 
        /* set this into the b-tree if we have length */
        if (length == 0)
@@ -1857,6 +1912,7 @@
 
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR("t", t);
+       DCHECK_TYPE("t", t, "text");
 
        tx = ewl_text_btree_context_get(t->formatting, idx);
        if (tx)
@@ -1875,9 +1931,10 @@
 {
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR("t", t);
+       DCHECK_TYPE("t", t, "text");
 
        if (!t->triggers) 
-               return;
+               DRETURN(DLEVEL_STABLE);
 
        ecore_list_for_each(t->triggers, ewl_text_trigger_cb_free, NULL);
 
@@ -1894,6 +1951,7 @@
 
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR("t", t);
+       DCHECK_TYPE("t", t, "text");
 
        ecore_list_goto_first(t->triggers);
        while ((cur = ecore_list_next(t->triggers)))
@@ -1963,7 +2021,7 @@
                DRETURN_INT(FALSE, DLEVEL_STABLE);
        }
        ewl_widget_appearance_set(EWL_WIDGET(trigger), type_str);
-       ewl_widget_inherit(EWL_WIDGET(trigger), type_str);
+       ewl_widget_inherit(EWL_WIDGET(trigger), "trigger");
 
        trigger->areas = ecore_list_new();
        trigger->type = type;
@@ -1978,6 +2036,7 @@
 {
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR("t", t);
+       DCHECK_TYPE("t", t, "trigger");
 
        if (t->areas)
                ecore_list_destroy(t->areas);
@@ -1993,7 +2052,7 @@
 ewl_text_trigger_cb_free(void *value, void *data __UNUSED__)
 {
        DENTER_FUNCTION(DLEVEL_STABLE);
-       DCHECK_PARAM_PTR("data", data);
+       DCHECK_PARAM_PTR("value", value);
 
        ewl_text_trigger_free(value);
 
@@ -2005,6 +2064,7 @@
 {
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR_RET("t", t, EWL_TEXT_TRIGGER_TYPE_NONE);
+       DCHECK_TYPE_RET("t", t, "trigger", EWL_TEXT_TRIGGER_TYPE_NONE);
 
        DRETURN_INT(t->type, DLEVEL_STABLE);
 }
@@ -2014,6 +2074,7 @@
 {
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR("t", t);
+       DCHECK_TYPE("t", t, "trigger");
 
        t->pos = pos;
 
@@ -2025,6 +2086,7 @@
 {
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR_RET("t", t, 0);
+       DCHECK_TYPE_RET("t", t, "trigger", 0);
 
        DRETURN_INT(t->pos, DLEVEL_STABLE);
 }
@@ -2034,6 +2096,7 @@
 {
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR("t", t);
+       DCHECK_TYPE("t", t, "trigger");
 
        t->len = len;
 
@@ -2060,6 +2123,7 @@
 {
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR_RET("t", t, 0);
+       DCHECK_TYPE_RET("t", t, "trigger", 0);
 
        DRETURN_INT(t->len, DLEVEL_STABLE);
 }
@@ -2069,6 +2133,7 @@
 {
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR("t", t);
+       DCHECK_TYPE("t", t, "trigger");
 
        t->base = pos;
 
@@ -2080,6 +2145,7 @@
 {
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR_RET("t", t, 0);
+       DCHECK_TYPE_RET("t", t, "trigger", 0);
 
        DRETURN_INT(t->base, DLEVEL_STABLE);
 }
@@ -2095,6 +2161,7 @@
 
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR("t", t);
+       DCHECK_TYPE("t", t, "text");
 
        if (t->triggers)
        {
@@ -2129,6 +2196,8 @@
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR("t", t);
        DCHECK_PARAM_PTR("cur", cur);
+       DCHECK_TYPE("t", t, "text");
+       DCHECK_TYPE("cur", cur, "trigger");
 
        area = ewl_text_trigger_area_new(cur->type);
        ewl_container_child_append(EWL_CONTAINER(t), area);
@@ -2159,6 +2228,8 @@
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR("t", t);
        DCHECK_PARAM_PTR("trig", trig);
+       DCHECK_TYPE("t", t, "text");
+       DCHECK_TYPE("trig", trig, "trigger");
 
         /* clean out the old areas */
         /* XXX this needs to be smartened such that it will re-use the 
@@ -2223,6 +2294,7 @@
 {
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR("t", t);
+       DCHECK_TYPE("t", t, "text");
 
        if (t->triggers)
        {
@@ -2243,6 +2315,7 @@
 
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR("t", t);
+       DCHECK_TYPE("t", t, "text");
 
        if (t->triggers)
        {
@@ -2265,6 +2338,7 @@
 
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR("t", t);
+       DCHECK_TYPE("t", t, "text");
 
        if (t->triggers)
        {
@@ -2297,6 +2371,7 @@
 
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR("t", t);
+       DCHECK_TYPE("t", t, "text");
 
        /* hide the triggers */
        if (t->triggers)
@@ -2331,6 +2406,8 @@
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR("c", c);
        DCHECK_PARAM_PTR("w", w);
+       DCHECK_TYPE("c", c, "container");
+       DCHECK_TYPE("w", w, "widget");
 
        if (!(appearance = ewl_widget_appearance_get(w))) 
        {
@@ -2355,6 +2432,8 @@
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR("c", c);
        DCHECK_PARAM_PTR("w", w);
+       DCHECK_TYPE("c", c, "container");
+       DCHECK_TYPE("w", w, "widget");
 
        if (!(appearance = ewl_widget_appearance_get(w)))
        {
@@ -2379,6 +2458,8 @@
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR("t", t);
        DCHECK_PARAM_PTR("trigger", trigger);
+       DCHECK_TYPE("t", t, "text");
+       DCHECK_TYPE("trigger", trigger, "trigger");
 
        /* if we have no length, we start past the end of the text, or we
         * extend past the end of the text then return an error */
@@ -2439,6 +2520,8 @@
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR("t", t);
        DCHECK_PARAM_PTR("trigger", trigger);
+       DCHECK_TYPE("t", t, "text");
+       DCHECK_TYPE("trigger", trigger, "trigger");
 
        ecore_list_goto(t->triggers, trigger);
        ecore_list_remove(t->triggers);
@@ -2456,6 +2539,8 @@
        int xx, yy, ww, hh;
 
        DENTER_FUNCTION(DLEVEL_STABLE);
+       DCHECK_PARAM_PTR("w", w);
+       DCHECK_TYPE("w", w, "widget");
 
        t = EWL_TEXT(w);
 
@@ -2495,6 +2580,8 @@
        int len;
 
        DENTER_FUNCTION(DLEVEL_STABLE);
+       DCHECK_PARAM_PTR("w", w);
+       DCHECK_TYPE("w", w, "widget");
 
        t = EWL_TEXT(w);
 
@@ -2542,6 +2629,8 @@
        Ewl_Text *t;
 
        DENTER_FUNCTION(DLEVEL_STABLE);
+       DCHECK_PARAM_PTR("w", w);
+       DCHECK_TYPE("w", w, "widget");
 
        t = EWL_TEXT(w);
 
@@ -2562,6 +2651,8 @@
        Ewl_Text *t;
 
        DENTER_FUNCTION(DLEVEL_STABLE);
+       DCHECK_PARAM_PTR("w", w);
+       DCHECK_TYPE("w", w, "widget");
 
        t = EWL_TEXT(w);
        evas_object_show(t->textblock);
@@ -2576,6 +2667,8 @@
        Ewl_Text *t;
 
        DENTER_FUNCTION(DLEVEL_STABLE);
+       DCHECK_PARAM_PTR("w", w);
+       DCHECK_TYPE("w", w, "widget");
 
        t = EWL_TEXT(w);
        evas_object_hide(t->textblock);
@@ -2590,6 +2683,8 @@
        Ewl_Text *t;
 
        DENTER_FUNCTION(DLEVEL_STABLE);
+       DCHECK_PARAM_PTR("w", w);
+       DCHECK_TYPE("w", w, "widget");
 
        t = EWL_TEXT(w);
 
@@ -2622,7 +2717,8 @@
         unsigned int modifiers;
 
         DENTER_FUNCTION(DLEVEL_STABLE);
-        DCHECK_PARAM_PTR("w", w);
+       DCHECK_PARAM_PTR("w", w);
+       DCHECK_TYPE("w", w, "widget");
 
         event = ev;
         t = EWL_TEXT(w);
@@ -2657,6 +2753,7 @@
 
         DENTER_FUNCTION(DLEVEL_STABLE);
         DCHECK_PARAM_PTR("w", w);
+       DCHECK_TYPE("w", w, "widget");
 
         event = ev;
         t = EWL_TEXT(w);
@@ -2685,6 +2782,7 @@
 
         DENTER_FUNCTION(DLEVEL_STABLE);
         DCHECK_PARAM_PTR("w", w);
+       DCHECK_TYPE("w", w, "widget");
 
         event = ev;
         t = EWL_TEXT(w);
@@ -2707,6 +2805,7 @@
        Ewl_Text_Trigger *trigger;
 
        DENTER_FUNCTION(DLEVEL_STABLE);
+       DCHECK_PARAM_PTR("data", data);
 
        trigger = data;
        ewl_callback_call_with_event_data(EWL_WIDGET(trigger), 
@@ -2721,6 +2820,7 @@
        Ewl_Text_Trigger *trigger;
 
        DENTER_FUNCTION(DLEVEL_STABLE);
+       DCHECK_PARAM_PTR("data", data);
 
        trigger = data;
        ewl_callback_call_with_event_data(EWL_WIDGET(trigger), 
@@ -2735,6 +2835,7 @@
        Ewl_Text_Trigger *trigger;
 
        DENTER_FUNCTION(DLEVEL_STABLE);
+       DCHECK_PARAM_PTR("data", data);
 
        trigger = data;
        ewl_callback_call_with_event_data(EWL_WIDGET(trigger),
@@ -2749,6 +2850,7 @@
        Ewl_Text_Trigger *trigger;
 
        DENTER_FUNCTION(DLEVEL_STABLE);
+       DCHECK_PARAM_PTR("data", data);
 
        trigger = data;
        ewl_callback_call_with_event_data(EWL_WIDGET(trigger), 
@@ -2765,6 +2867,7 @@
 
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR_RET("t", t, NULL);
+       DCHECK_TYPE_RET("t", t, "text", NULL);
 
        tmp = ewl_text_context_new();
 
@@ -3588,7 +3691,7 @@
 {
        DENTER_FUNCTION(DLEVEL_STABLE);
 
-       if (!tree) return;
+       if (!tree) DRETURN(DLEVEL_STABLE);
 
        tree->parent = NULL;
        if (tree->children) 
@@ -4052,6 +4155,10 @@
 {
        Evas_Coord w = 0, h = 0;
 
+       DENTER_FUNCTION(DLEVEL_STABLE);
+       DCHECK_PARAM_PTR("t", t);
+       DCHECK_TYPE("t", t, "text");
+
        evas_object_textblock2_clear(t->textblock);
        ewl_text_btree_walk(t);
        evas_object_textblock2_size_native_get(t->textblock, &w, &h);
@@ -4068,6 +4175,8 @@
 
        ewl_object_preferred_inner_size_set(EWL_OBJECT(t), (int)w, (int)h);
        ewl_widget_configure(EWL_WIDGET(t));
+
+       DLEAVE_FUNCTION(DLEVEL_STABLE);
 }
 
 static void
@@ -4077,6 +4186,7 @@
        char *tmp;
 
        DENTER_FUNCTION(DLEVEL_STABLE);
+       DCHECK_PARAM_PTR("tb", tb);
 
        if (!txt) 
        {
@@ -4121,6 +4231,8 @@
 ewl_text_btree_walk(Ewl_Text *t)
 {
        DENTER_FUNCTION(DLEVEL_STABLE);
+       DCHECK_PARAM_PTR("t", t);
+       DCHECK_TYPE("t", t, "text");
 
        if (!t->text) 
        {
@@ -4136,6 +4248,9 @@
 ewl_text_btree_node_walk(Ewl_Text_BTree *tree, Ewl_Text *t, unsigned int 
text_pos)
 {
        DENTER_FUNCTION(DLEVEL_STABLE);
+       DCHECK_PARAM_PTR("tree", tree);
+       DCHECK_PARAM_PTR("t", t);
+       DCHECK_TYPE("t", t, "text");
 
        /* if we have a context we are a leaf node */
        if (tree->tx)
@@ -4219,6 +4334,7 @@
        ewl_widget_appearance_set(EWL_WIDGET(area),
                        ((type == EWL_TEXT_TRIGGER_TYPE_SELECTION) ?
                         "selection_area" : "trigger_area"));
+       ewl_widget_inherit(EWL_WIDGET(area), "trigger_area");
 
        if (type == EWL_TEXT_TRIGGER_TYPE_TRIGGER)
                ewl_widget_color_set(EWL_WIDGET(area), 0, 0, 0, 0);
@@ -4237,6 +4353,7 @@
 
         DENTER_FUNCTION(DLEVEL_STABLE);
         DCHECK_PARAM_PTR("s", s);
+       DCHECK_TYPE("s", s, "trigger");
 
         base = ewl_text_trigger_base_get(s);
         start_pos = ewl_text_trigger_start_pos_get(s);
@@ -4271,6 +4388,7 @@
        
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR("w", w);
+       DCHECK_TYPE("w", w, "widget");
 
        trig = EWL_TEXT_TRIGGER(w);
        ewl_text_trigger_position(trig->text_parent, trig);
@@ -4439,6 +4557,7 @@
 
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR_RET("t", t, NULL);
+       DCHECK_TYPE_RET("t", t, "text", NULL);
 
        cursor = evas_object_textblock2_cursor_new(t->textblock);
        evas_textblock2_cursor_node_first(cursor);
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/lib/ewl_text.h,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -3 -r1.14 -r1.15
--- ewl_text.h  18 Oct 2005 05:11:07 -0000      1.14
+++ ewl_text.h  26 Oct 2005 01:25:31 -0000      1.15
@@ -61,7 +61,7 @@
        unsigned int             in_select;       /**< Are we in select mode? */
 };
 
-Ewl_Widget     *ewl_text_new();
+Ewl_Widget     *ewl_text_new(void);
 int             ewl_text_init(Ewl_Text *t);
 
 int             ewl_text_length_get(Ewl_Text *t);
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/lib/ewl_theme.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -3 -r1.16 -r1.17
--- ewl_theme.c 25 Oct 2005 05:42:24 -0000      1.16
+++ ewl_theme.c 26 Oct 2005 01:25:31 -0000      1.17
@@ -85,7 +85,7 @@
        char *home;
 
        DENTER_FUNCTION(DLEVEL_STABLE);
-       DCHECK_PARAM_PTR("name", name);
+       DCHECK_PARAM_PTR_RET("name", name, NULL);
 
        /*
         * Get the users home directory. This environment variable should




-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to