elm multibuttonentry: Revised codes.
authorDaniel Juyung Seo <seojuyung@gmail.com>
Sat, 3 Mar 2012 06:11:50 +0000 (06:11 +0000)
committerDaniel Juyung Seo <seojuyung2@gmail.com>
Sat, 3 Mar 2012 06:11:50 +0000 (06:11 +0000)
1. fixed formatting.
2. renamed smart callback "shrank" -> "contracted"
I just renamed this smart callback without backport because multibuttonentry committed recently and backport will be removed in a couple of days (elm 1.0 api freeze)
Signed-off-by: Daniel Juyung Seo <seojuyung@gmail.com>
SVN revision: 68639

src/bin/test_multibuttonentry.c
src/lib/elc_multibuttonentry.c
src/lib/elc_multibuttonentry.h

index c4c3ea2..52c4e09 100644 (file)
@@ -94,11 +94,11 @@ _expanded_cb(void *data __UNUSED__,
 
 // "contracted" smart callback
 static void
-_shrank_cb(void *data __UNUSED__,
+_contracted_cb(void *data __UNUSED__,
            Evas_Object *obj __UNUSED__,
            void *event_info __UNUSED__)
 {
-   printf("shrank!\n");
+   printf("contracted!\n");
 }
 
 // "contracted,state,changed" smart callback
@@ -164,7 +164,7 @@ _add_multibuttonentry(Evas_Object *parent)
    evas_object_smart_callback_add(mbe, "unfocused", _mbe_unfocused_cb, NULL);
 
    evas_object_smart_callback_add(mbe, "expanded", _expanded_cb, NULL);
-   evas_object_smart_callback_add(mbe, "shrank", _shrank_cb, NULL);
+   evas_object_smart_callback_add(mbe, "contracted", _contracted_cb, NULL);
    evas_object_smart_callback_add(mbe, "shrink,state,changed", _shrink_state_changed_cb, NULL);
 
    evas_object_resize(mbe, 220, 300);
index 920a388..d932b98 100644 (file)
@@ -113,10 +113,10 @@ static void _calculate_box_min_size(Evas_Object *box, Evas_Object_Box_Data *priv
 static Evas_Coord _calculate_item_max_height(Evas_Object *box, Evas_Object_Box_Data *priv, int obj_index);
 static void _box_layout_cb(Evas_Object *o, Evas_Object_Box_Data *priv, void *data);
 static void _item_text_set_hook(Elm_Object_Item *it,
-                               const char *part,
-                               const char *label);
-static const char * _item_text_get_hook(const Elm_Object_Item *it,
-                                        const char *part);
+                                const char *part,
+                                const char *label);
+static const char *_item_text_get_hook(const Elm_Object_Item *it,
+                                       const char *part);
 
 // XXX: use evas_object_smart_callback_descriptions_set for smart callbacks.
 
@@ -254,7 +254,7 @@ _resize_cb(void *data, Evas *evas __UNUSED__, Evas_Object *obj __UNUSED__, void
    evas_object_geometry_get(wd->box, NULL, NULL, &w, &h);
 
    if (wd->h_box < h) evas_object_smart_callback_call (data, "expanded", NULL);
-   else if (wd->h_box > h) evas_object_smart_callback_call (data, "shrank", NULL);
+   else if (wd->h_box > h) evas_object_smart_callback_call (data, "contracted", NULL);
 
    wd->w_box = w;
    wd->h_box = h;
@@ -534,7 +534,7 @@ _view_update(Evas_Object *obj)
 }
 
 static void
-_set_label(Evas_Object *obj, const charstr)
+_set_label(Evas_Object *obj, const char *str)
 {
    Widget_Data *wd = elm_widget_data_get(obj);
 
@@ -573,7 +573,7 @@ _set_label(Evas_Object *obj, const char* str)
 }
 
 static void
-_set_guidetext(Evas_Object *obj, const charstr)
+_set_guidetext(Evas_Object *obj, const char *str)
 {
    Widget_Data *wd = elm_widget_data_get(obj);
 
index 438bea2..89eeb03 100644 (file)
@@ -16,9 +16,8 @@
  * - @c "focused" - when multibuttonentry is focused.
  * - @c "unfocused" - when multibuttonentry is unfocused.
  * - @c "expanded" - when multibuttonentry is expanded.
- * XXX: shrank -> contracted
- * - @c "shrank" - when multibuttonentry is shrank.
- * - @c "shrank,state,changed" - when shrink mode state of multibuttonentry is
+ * - @c "contracted" - when multibuttonentry is contracted.
+ * - @c "shrink,state,changed" - when shrink mode state of multibuttonentry is
  *                               changed.
  * 
  * Default text parts of the multibuttonentry widget that you can use for are: