Enlightenment CVS committal Author : codewarrior Project : e17 Module : apps/e
Dir : e17/apps/e/src/bin Modified Files: e_entry.c e_entry.h e_scrollbar.c e_scrollbar.h Log Message: * Add function to get text from e_entry * Fix typo in e_scrollbar =================================================================== RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_entry.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -3 -r1.6 -r1.7 --- e_entry.c 4 Oct 2005 12:15:54 -0000 1.6 +++ e_entry.c 4 Oct 2005 21:32:19 -0000 1.7 @@ -5,13 +5,9 @@ /* * TODO: - * - get text - * - review everything, was sleepy when i wrote this - * - look at theme / how its being set * - implement missing _e_entry_smart_*, very easy * - free / delete properly * - implement focus and interact with theme - * - e style */ typedef struct _E_Editable_Text_Smart_Data E_Editable_Text_Smart_Data; @@ -96,6 +92,19 @@ return evas_object_smart_add(evas, e_editable_text_smart); } +const char* +e_editable_text_text_get(Evas_Object *object) +{ + E_Editable_Text_Smart_Data *editable_text_sd; + Evas_Textblock_Cursor *cursor; + + 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); +} + /** * @brief Sets the text of the object * @param object an editable text object @@ -109,7 +118,6 @@ if ((!object) || (!text) || !(editable_text_sd = evas_object_smart_data_get(object))) return; - printf("Text set: %s\n", text); evas_object_textblock2_text_markup_set(editable_text_sd->text_object, text); editable_text_sd->cursor_at_the_end = 1; _e_editable_text_size_update(object); @@ -353,6 +361,17 @@ e_editable_text_text_set(e_entry_sd->entry_object, text); } +const char* +e_entry_text_get(Evas_Object *entry) +{ + E_Entry_Smart_Data *e_entry_sd; + + if ((!entry) || !(e_entry_sd = evas_object_smart_data_get(entry))) + return; + + return e_editable_text_text_get(e_entry_sd->entry_object); +} + void e_entry_text_insert(Evas_Object *entry, const char *text) { =================================================================== RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_entry.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -3 -r1.3 -r1.4 --- e_entry.h 4 Oct 2005 12:15:54 -0000 1.3 +++ e_entry.h 4 Oct 2005 21:32:19 -0000 1.4 @@ -9,6 +9,7 @@ EAPI Evas_Object *e_editable_text_add(Evas *evas); EAPI void e_editable_text_text_set(Evas_Object *object, const char *text); +EAPI const char *e_entry_text_get(Evas_Object *object); EAPI void e_editable_text_insert(Evas_Object *object, const char *text); EAPI void e_editable_text_delete_char_before(Evas_Object *object); @@ -24,6 +25,7 @@ EAPI Evas_Object *e_entry_add(Evas *evas); EAPI void e_entry_text_set (Evas_Object *entry, const char *text); +EAPI const char* e_editable_text_text_get(Evas_Object *object); EAPI void e_entry_text_insert (Evas_Object *entry, const char *text); EAPI void e_entry_delete_char_before(Evas_Object *object); EAPI void e_entry_delete_char_after(Evas_Object *object); =================================================================== RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_scrollbar.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -3 -r1.2 -r1.3 --- e_scrollbar.c 4 Oct 2005 12:15:54 -0000 1.2 +++ e_scrollbar.c 4 Oct 2005 21:32:19 -0000 1.3 @@ -74,7 +74,7 @@ switch (dir) { - case E_SCROLLBAR_HORISONTAL: + case E_SCROLLBAR_HORIZONTAL: e_theme_edje_object_set(scrollbar_sd->edje_object, "base/theme/widgets/hscrollbar", "widgets/hscrollbar"); @@ -94,7 +94,7 @@ E_Scrollbar_Smart_Data *scrollbar_sd; if ((!object) || !(scrollbar_sd = evas_object_smart_data_get(object))) - return E_SCROLLBAR_HORISONTAL; + return E_SCROLLBAR_HORIZONTAL; return scrollbar_sd->direction; } @@ -122,7 +122,7 @@ "base/theme/widgets/hscrollbar", "widgets/hscrollbar"); - scrollbar_sd->direction = E_SCROLLBAR_HORISONTAL; + scrollbar_sd->direction = E_SCROLLBAR_HORIZONTAL; evas_object_smart_member_add(scrollbar_sd->edje_object, object); =================================================================== RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_scrollbar.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -3 -r1.2 -r1.3 --- e_scrollbar.h 4 Oct 2005 12:15:54 -0000 1.2 +++ e_scrollbar.h 4 Oct 2005 21:32:19 -0000 1.3 @@ -5,7 +5,7 @@ typedef enum _E_Scrollbar_Direction { - E_SCROLLBAR_HORISONTAL, + E_SCROLLBAR_HORIZONTAL, E_SCROLLBAR_VERTICAL } E_Scrollbar_Direction; ------------------------------------------------------- This SF.Net email is sponsored by: Power Architecture Resource Center: Free content, downloads, discussions, and more. http://solutions.newsforge.com/ibmarch.tmpl _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs