From 9bd0fbfc97a61e6fcd67ce0978677569515769ad Mon Sep 17 00:00:00 2001 From: Carsten Haitzler Date: Fri, 28 Oct 2005 02:56:27 +0000 Subject: [PATCH] no more old textblock - gone. completely. tb2 renamed (as threatened) to textblock. updated edje and e17. SVN revision: 18054 --- src/bin/e_entry.c | 70 +++++++++++++++++++++--------------------- src/modules/pager/e_mod_main.c | 20 ++++++------ 2 files changed, 45 insertions(+), 45 deletions(-) diff --git a/src/bin/e_entry.c b/src/bin/e_entry.c index 9e9de92..990096e 100644 --- a/src/bin/e_entry.c +++ b/src/bin/e_entry.c @@ -92,8 +92,8 @@ e_editable_text_text_get(Evas_Object *object) if ((!object) || !(editable_text_sd = evas_object_smart_data_get(object))) return ""; - cursor = (Evas_Textblock_Cursor *)evas_object_textblock2_cursor_get(editable_text_sd->text_object); - return evas_textblock2_cursor_node_text_get(cursor); + cursor = (Evas_Textblock_Cursor *)evas_object_textblock_cursor_get(editable_text_sd->text_object); + return evas_textblock_cursor_node_text_get(cursor); } /** @@ -109,7 +109,7 @@ e_editable_text_text_set(Evas_Object *object, const char *text) if ((!object) || (!text) || !(editable_text_sd = evas_object_smart_data_get(object))) return; - evas_object_textblock2_text_markup_set(editable_text_sd->text_object, text); + evas_object_textblock_text_markup_set(editable_text_sd->text_object, text); editable_text_sd->cursor_at_the_end = 1; _e_editable_text_size_update(object); _e_editable_text_cursor_position_update(object); @@ -132,12 +132,12 @@ e_editable_text_insert(Evas_Object *object, const char *text) return; printf("Insert: \"%s\", %c\n", text, *text); - cursor = (Evas_Textblock_Cursor *)evas_object_textblock2_cursor_get(editable_text_sd->text_object); + cursor = (Evas_Textblock_Cursor *)evas_object_textblock_cursor_get(editable_text_sd->text_object); if (editable_text_sd->cursor_at_the_end) - evas_textblock2_cursor_text_append(cursor, text); + evas_textblock_cursor_text_append(cursor, text); else - evas_textblock2_cursor_text_prepend(cursor, text); + evas_textblock_cursor_text_prepend(cursor, text); _e_editable_text_size_update(object); _e_editable_text_cursor_position_update(object); } @@ -157,10 +157,10 @@ e_editable_text_delete_char_before(Evas_Object *object) (_e_editable_text_is_empty(object))) return; - cursor = (Evas_Textblock_Cursor *)evas_object_textblock2_cursor_get(editable_text_sd->text_object); + cursor = (Evas_Textblock_Cursor *)evas_object_textblock_cursor_get(editable_text_sd->text_object); - if ((editable_text_sd->cursor_at_the_end) || (evas_textblock2_cursor_char_prev(cursor))) - evas_textblock2_cursor_char_delete(cursor); + if ((editable_text_sd->cursor_at_the_end) || (evas_textblock_cursor_char_prev(cursor))) + evas_textblock_cursor_char_delete(cursor); _e_editable_text_size_update(object); _e_editable_text_cursor_position_update(object); @@ -181,15 +181,15 @@ e_editable_text_delete_char_after(Evas_Object *object) (_e_editable_text_is_empty(object))) return; - cursor = (Evas_Textblock_Cursor *)evas_object_textblock2_cursor_get(editable_text_sd->text_object); + cursor = (Evas_Textblock_Cursor *)evas_object_textblock_cursor_get(editable_text_sd->text_object); if (!editable_text_sd->cursor_at_the_end) { - if (!evas_textblock2_cursor_char_next(cursor)) + if (!evas_textblock_cursor_char_next(cursor)) editable_text_sd->cursor_at_the_end = 1; else - evas_textblock2_cursor_char_prev(cursor); - evas_textblock2_cursor_char_delete(cursor); + evas_textblock_cursor_char_prev(cursor); + evas_textblock_cursor_char_delete(cursor); } _e_editable_text_size_update(object); @@ -211,9 +211,9 @@ e_editable_text_cursor_move_at_start(Evas_Object *object) (_e_editable_text_is_empty(object))) return; - cursor = (Evas_Textblock_Cursor *)evas_object_textblock2_cursor_get(editable_text_sd->text_object); + cursor = (Evas_Textblock_Cursor *)evas_object_textblock_cursor_get(editable_text_sd->text_object); editable_text_sd->cursor_at_the_end = 0; - evas_textblock2_cursor_char_first(cursor); + evas_textblock_cursor_char_first(cursor); _e_editable_text_cursor_position_update(object); } @@ -233,9 +233,9 @@ e_editable_text_cursor_move_at_end(Evas_Object *object) (_e_editable_text_is_empty(object))) return; - cursor = (Evas_Textblock_Cursor *)evas_object_textblock2_cursor_get(editable_text_sd->text_object); + cursor = (Evas_Textblock_Cursor *)evas_object_textblock_cursor_get(editable_text_sd->text_object); editable_text_sd->cursor_at_the_end = 1; - evas_textblock2_cursor_char_last(cursor); + evas_textblock_cursor_char_last(cursor); _e_editable_text_cursor_position_update(object); } @@ -253,11 +253,11 @@ e_editable_text_cursor_move_left(Evas_Object *object) if ((!object) || !(editable_text_sd = evas_object_smart_data_get(object))) return; - cursor = (Evas_Textblock_Cursor *)evas_object_textblock2_cursor_get(editable_text_sd->text_object); + cursor = (Evas_Textblock_Cursor *)evas_object_textblock_cursor_get(editable_text_sd->text_object); if (editable_text_sd->cursor_at_the_end) editable_text_sd->cursor_at_the_end = 0; else - evas_textblock2_cursor_char_prev(cursor); + evas_textblock_cursor_char_prev(cursor); _e_editable_text_size_update(object); _e_editable_text_cursor_position_update(object); @@ -276,8 +276,8 @@ e_editable_text_cursor_move_right(Evas_Object *object) if ((!object) || !(editable_text_sd = evas_object_smart_data_get(object))) return; - cursor = (Evas_Textblock_Cursor *)evas_object_textblock2_cursor_get(editable_text_sd->text_object); - if (!evas_textblock2_cursor_char_next(cursor)) + cursor = (Evas_Textblock_Cursor *)evas_object_textblock_cursor_get(editable_text_sd->text_object); + if (!evas_textblock_cursor_char_next(cursor)) editable_text_sd->cursor_at_the_end = 1; _e_editable_text_size_update(object); @@ -484,8 +484,8 @@ _e_editable_text_is_empty(Evas_Object *object) if ((!object) || !(editable_text_sd = evas_object_smart_data_get(object))) return 1; - cursor = (Evas_Textblock_Cursor *)evas_object_textblock2_cursor_get(editable_text_sd->text_object); - return (evas_textblock2_cursor_node_text_length_get(cursor) <= 0); + cursor = (Evas_Textblock_Cursor *)evas_object_textblock_cursor_get(editable_text_sd->text_object); + return (evas_textblock_cursor_node_text_length_get(cursor) <= 0); } /* Updates the size of the text object: to be called when the text of the object is changed */ @@ -498,7 +498,7 @@ _e_editable_text_size_update(Evas_Object *object) if ((!object) || !(editable_text_sd = evas_object_smart_data_get(object))) return; - evas_object_textblock2_size_native_get(editable_text_sd->text_object, &w, &h); + evas_object_textblock_size_native_get(editable_text_sd->text_object, &w, &h); evas_object_resize(editable_text_sd->text_object, w, h); } @@ -515,7 +515,7 @@ _e_editable_text_cursor_position_update(Evas_Object *object) evas_object_geometry_get(editable_text_sd->text_object, &tx, &ty, &tw, &th); evas_object_geometry_get(object, &ox, &oy, &ow, &oh); - cursor = (Evas_Textblock_Cursor *)evas_object_textblock2_cursor_get(editable_text_sd->text_object); + cursor = (Evas_Textblock_Cursor *)evas_object_textblock_cursor_get(editable_text_sd->text_object); if (_e_editable_text_is_empty(object)) { @@ -525,13 +525,13 @@ _e_editable_text_cursor_position_update(Evas_Object *object) } else if (editable_text_sd->cursor_at_the_end) { - evas_textblock2_cursor_char_last(cursor); - evas_textblock2_cursor_char_geometry_get(cursor, &cx, &cy, &cw, &ch); + evas_textblock_cursor_char_last(cursor); + evas_textblock_cursor_char_geometry_get(cursor, &cx, &cy, &cw, &ch); cx += tx + cw; } else { - evas_textblock2_cursor_char_geometry_get(cursor, &cx, &cy, &cw, &ch); + evas_textblock_cursor_char_geometry_get(cursor, &cx, &cy, &cw, &ch); cx += tx; } @@ -628,8 +628,8 @@ _e_editable_text_smart_add(Evas_Object *object) if (!e_editable_text_style) { - e_editable_text_style = evas_textblock2_style_new(); - evas_textblock2_style_set(e_editable_text_style, "DEFAULT='font=Vera font_size=10 align=left color=#000000 wrap=word'"); + e_editable_text_style = evas_textblock_style_new(); + evas_textblock_style_set(e_editable_text_style, "DEFAULT='font=Vera font_size=10 align=left color=#000000 wrap=word'"); e_editable_text_style_use_count = 0; } @@ -639,8 +639,8 @@ _e_editable_text_smart_add(Evas_Object *object) editable_text_sd->cursor_at_the_end = 1; editable_text_sd->cursor_timer = NULL; - editable_text_sd->text_object = evas_object_textblock2_add(evas); - evas_object_textblock2_style_set(editable_text_sd->text_object, e_editable_text_style); + editable_text_sd->text_object = evas_object_textblock_add(evas); + evas_object_textblock_style_set(editable_text_sd->text_object, e_editable_text_style); e_editable_text_style_use_count++; evas_object_smart_member_add(editable_text_sd->text_object, object); @@ -654,8 +654,8 @@ _e_editable_text_smart_add(Evas_Object *object) evas_object_smart_data_set(object, editable_text_sd); - cursor = (Evas_Textblock_Cursor *)evas_object_textblock2_cursor_get(editable_text_sd->text_object); - evas_textblock2_cursor_node_first(cursor); + cursor = (Evas_Textblock_Cursor *)evas_object_textblock_cursor_get(editable_text_sd->text_object); + evas_textblock_cursor_node_first(cursor); evas_font_path_append (evas, PACKAGE_DATA_DIR"/data/fonts"); } @@ -680,7 +680,7 @@ _e_editable_text_smart_del(Evas_Object *object) e_editable_text_style_use_count--; if ((e_editable_text_style_use_count <= 0) && (e_editable_text_style)) { - evas_textblock2_style_free(e_editable_text_style); + evas_textblock_style_free(e_editable_text_style); e_editable_text_style = NULL; } } diff --git a/src/modules/pager/e_mod_main.c b/src/modules/pager/e_mod_main.c index 6a5a6d7..51276a7 100644 --- a/src/modules/pager/e_mod_main.c +++ b/src/modules/pager/e_mod_main.c @@ -745,9 +745,18 @@ _pager_desk_new(Pager_Face *face, E_Desk *desk, int xpos, int ypos) e_table_pack_options_set(o, 1, 1, 1, 1, 0.5, 0.5, 0, 0, -1, -1); evas_object_show(o); + o = e_layout_add(face->evas); + pd->layout_object = o; + evas_object_intercept_move_callback_add(o, _pager_desk_cb_intercept_move, pd); + evas_object_intercept_resize_callback_add(o, _pager_desk_cb_intercept_resize, pd); + + e_layout_virtual_size_set(o, desk->zone->w, desk->zone->h); + edje_object_part_swallow(pd->desk_object, "items", pd->layout_object); + evas_object_show(o); + o = evas_object_rectangle_add(face->evas); pd->event_object = o; - evas_object_layer_set(o, 2); + evas_object_layer_set(o, 1); evas_object_repeat_events_set(o, 1); evas_object_color_set(o, 0, 0, 0, 0); evas_object_event_callback_add(o, EVAS_CALLBACK_MOUSE_IN, _pager_desk_cb_mouse_in, pd); @@ -758,15 +767,6 @@ _pager_desk_new(Pager_Face *face, E_Desk *desk, int xpos, int ypos) evas_object_event_callback_add(o, EVAS_CALLBACK_MOUSE_WHEEL, _pager_desk_cb_mouse_wheel, pd); evas_object_show(o); - o = e_layout_add(face->evas); - pd->layout_object = o; - evas_object_intercept_move_callback_add(o, _pager_desk_cb_intercept_move, pd); - evas_object_intercept_resize_callback_add(o, _pager_desk_cb_intercept_resize, pd); - - e_layout_virtual_size_set(o, desk->zone->w, desk->zone->h); - edje_object_part_swallow(pd->desk_object, "items", pd->layout_object); - evas_object_show(o); - bl = e_container_border_list_first(desk->zone->container); while ((bd = e_container_border_list_next(bl))) { -- 2.7.4