elementary - entry, genlist, gengrid, image, icon, hover, frame, diskselector, index...
authorhermet <hermet@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Fri, 1 Apr 2011 11:32:33 +0000 (11:32 +0000)
committerhermet <hermet@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Fri, 1 Apr 2011 11:32:33 +0000 (11:32 +0000)
git-svn-id: https://svn.enlightenment.org/svn/e/trunk/elementary@58252 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

14 files changed:
src/lib/elm_conform.c
src/lib/elm_diskselector.c
src/lib/elm_entry.c
src/lib/elm_flip.c
src/lib/elm_flipselector.c
src/lib/elm_frame.c
src/lib/elm_gengrid.c
src/lib/elm_genlist.c
src/lib/elm_hover.c
src/lib/elm_icon.c
src/lib/elm_image.c
src/lib/elm_index.c
src/lib/elm_label.c
src/lib/elm_layout.c

index c10763a..24c00f7 100644 (file)
@@ -3,24 +3,24 @@
 
 /**
  * @defgroup Conformant Conformant
- * 
- * The aim is to provide a widget that can be used in elementary apps to 
- * account for space taken up by the indicator & softkey windows when running 
+ *
+ * The aim is to provide a widget that can be used in elementary apps to
+ * account for space taken up by the indicator & softkey windows when running
  * the illume2 module of E17.
  */
 
 typedef struct _Widget_Data Widget_Data;
-struct _Widget_Data 
+struct _Widget_Data
 {
    Evas_Object *base;
    Evas_Object *shelf, *panel;
    Evas_Object *content;
    Ecore_Event_Handler *prop_hdl;
    struct {
-      Ecore_Animator *animator; // animaton timer
-      double start; // time started
-      Evas_Coord auto_x, auto_y; // desired delta
-      Evas_Coord x, y; // current delta
+        Ecore_Animator *animator; // animaton timer
+        double start; // time started
+        Evas_Coord auto_x, auto_y; // desired delta
+        Evas_Coord x, y; // current delta
    } delta;
 };
 
@@ -33,8 +33,8 @@ static void _sizing_eval(Evas_Object *obj);
 static Eina_Bool _prop_change(void *data, int type, void *event);
 
 /* local functions */
-static void 
-_del_hook(Evas_Object *obj) 
+static void
+_del_hook(Evas_Object *obj)
 {
    Widget_Data *wd = elm_widget_data_get(obj);
    if (!wd) return;
@@ -42,7 +42,7 @@ _del_hook(Evas_Object *obj)
    free(wd);
 }
 
-static void 
+static void
 _mirrored_set(Evas_Object *obj, Eina_Bool rtl)
 {
    Widget_Data *wd = elm_widget_data_get(obj);
@@ -50,8 +50,8 @@ _mirrored_set(Evas_Object *obj, Eina_Bool rtl)
    edje_object_mirrored_set(wd->base, rtl);
 }
 
-static void 
-_theme_hook(Evas_Object *obj) 
+static void
+_theme_hook(Evas_Object *obj)
 {
    Widget_Data *wd = elm_widget_data_get(obj);
    if (!wd) return;
@@ -64,8 +64,8 @@ _theme_hook(Evas_Object *obj)
    _sizing_eval(obj);
 }
 
-static void 
-_sizing_eval(Evas_Object *obj) 
+static void
+_sizing_eval(Evas_Object *obj)
 {
    Widget_Data *wd = elm_widget_data_get(obj);
    Evas_Coord mw = -1, mh = -1;
@@ -102,63 +102,63 @@ _sub_del(void *data __UNUSED__, Evas_Object *obj, void *event_info)
  * visible when the vkbd comes and goes by moving the conformant obj (and thus
  * its children) to  show the focused widget (and if focus changes follow)
 
-static Evas_Object *
-_focus_object_get(const Evas_Object *obj)
-{
  Evas_Object *win, *foc;
-   
  win = elm_widget_top_get(obj);
  if (!win) return NULL;
  foc = elm_widget_top_get(win);
-}
-
-static void
-_focus_object_region_get(const Evas_Object *obj, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h)
-{
  evas_object_geometry_get(obj, x, y, w, h);
-}
-
-static void
-_focus_change_del(void *data, Evas_Object *obj, void *event_info)
-{
-   // called from toplevel when the focused window shanges
+ static Evas_Object *
+ _focus_object_get(const Evas_Object *obj)
+ {
+ Evas_Object *win, *foc;
+
+ win = elm_widget_top_get(obj);
+ if (!win) return NULL;
+ foc = elm_widget_top_get(win);
+ }
+
+ static void
+ _focus_object_region_get(const Evas_Object *obj, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h)
+ {
+ evas_object_geometry_get(obj, x, y, w, h);
+ }
+
+ static void
+ _focus_change_del(void *data, Evas_Object *obj, void *event_info)
+ {
+// called from toplevel when the focused window shanges
 }
 
 static void
 _autoscroll_move(Evas_Object *obj)
 {
-   // move conformant edje by delta to show focused widget
+// move conformant edje by delta to show focused widget
 }
 
 static void
 _autoscroll_mode_enable(Evas_Object *obj)
 {
-   // called when autoscroll mode should be on - content area smaller than
-   // its min size
-   // 1. get focused object
-   // 2. if not in visible conformant area calculate delta needed to
-   //    get it in
-   // 3. store delta and call _autoscroll_move() which either asanimates
-   //    or jumps right there
+// called when autoscroll mode should be on - content area smaller than
+// its min size
+// 1. get focused object
+// 2. if not in visible conformant area calculate delta needed to
+//    get it in
+// 3. store delta and call _autoscroll_move() which either asanimates
+//    or jumps right there
 }
 
 static void
 _autoscroll_mode_disable(Evas_Object *obj)
 {
-   // called when autoscroll mode should be off - set delta to 0 and
-   // call _autoscroll_move()
+// called when autoscroll mode should be off - set delta to 0 and
+// call _autoscroll_move()
 }
-*/
+ */
 
 static Eina_Bool
-_prop_change(void *data, int type __UNUSED__, void *event) 
+_prop_change(void *data, int type __UNUSED__, void *event)
 {
 #ifdef HAVE_ELEMENTARY_X
    Ecore_X_Event_Window_Property *ev;
    Widget_Data *wd = elm_widget_data_get(data);
    if (!wd) return ECORE_CALLBACK_PASS_ON;
    ev = event;
-   if (ev->atom == ECORE_X_ATOM_E_ILLUME_ZONE) 
+   if (ev->atom == ECORE_X_ATOM_E_ILLUME_ZONE)
      {
         Ecore_X_Window zone;
         int sh = -1;
@@ -174,7 +174,7 @@ _prop_change(void *data, int type __UNUSED__, void *event)
         evas_object_size_hint_min_set(wd->panel, -1, sh);
         evas_object_size_hint_max_set(wd->panel, -1, sh);
      }
-   else if (ev->atom == ECORE_X_ATOM_E_ILLUME_INDICATOR_GEOMETRY) 
+   else if (ev->atom == ECORE_X_ATOM_E_ILLUME_INDICATOR_GEOMETRY)
      {
         Ecore_X_Window zone;
         int sh = -1;
@@ -185,7 +185,7 @@ _prop_change(void *data, int type __UNUSED__, void *event)
         evas_object_size_hint_min_set(wd->shelf, -1, sh);
         evas_object_size_hint_max_set(wd->shelf, -1, sh);
      }
-   else if (ev->atom == ECORE_X_ATOM_E_ILLUME_SOFTKEY_GEOMETRY) 
+   else if (ev->atom == ECORE_X_ATOM_E_ILLUME_SOFTKEY_GEOMETRY)
      {
         Ecore_X_Window zone;
         int sh = -1;
@@ -196,7 +196,7 @@ _prop_change(void *data, int type __UNUSED__, void *event)
         evas_object_size_hint_min_set(wd->panel, -1, sh);
         evas_object_size_hint_max_set(wd->panel, -1, sh);
      }
-   else if (ev->atom == ECORE_X_ATOM_E_ILLUME_KEYBOARD_GEOMETRY) 
+   else if (ev->atom == ECORE_X_ATOM_E_ILLUME_KEYBOARD_GEOMETRY)
      {
         Ecore_X_Window zone;
         int ky = -1;
@@ -213,21 +213,21 @@ _prop_change(void *data, int type __UNUSED__, void *event)
 
 /**
  * Add a new Conformant object
- * 
+ *
  * @param parent The parent object
  * @return The new conformant object or NULL if it cannot be created
- * 
+ *
  * @ingroup Conformant
  */
 EAPI Evas_Object *
-elm_conformant_add(Evas_Object *parent) 
+elm_conformant_add(Evas_Object *parent)
 {
    Evas_Object *obj;
    Evas *e;
    Widget_Data *wd;
 
    ELM_WIDGET_STANDARD_SETUP(wd, Widget_Data, parent, e, obj, NULL);
-   
+
    ELM_SET_WIDTYPE(widtype, "conformant");
    elm_widget_type_set(obj, "conformant");
    elm_widget_sub_object_add(parent, obj);
@@ -264,7 +264,7 @@ elm_conformant_add(Evas_Object *parent)
    evas_object_size_hint_max_set(wd->panel, -1, sh);
    edje_object_part_swallow(wd->base, "elm.swallow.panel", wd->panel);
 
-   wd->prop_hdl = ecore_event_handler_add(ECORE_X_EVENT_WINDOW_PROPERTY, 
+   wd->prop_hdl = ecore_event_handler_add(ECORE_X_EVENT_WINDOW_PROPERTY,
                                           _prop_change, obj);
    // FIXME: get kbd region prop
 #endif
@@ -299,10 +299,10 @@ elm_conformant_content_set(Evas_Object *obj, Evas_Object *content)
    wd->content = content;
    if (content)
      {
-       elm_widget_sub_object_add(obj, content);
-       evas_object_event_callback_add(content, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
-                                      _changed_size_hints, obj);
-       edje_object_part_swallow(wd->base, "elm.swallow.content", content);
+        elm_widget_sub_object_add(obj, content);
+        evas_object_event_callback_add(content, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
+                                       _changed_size_hints, obj);
+        edje_object_part_swallow(wd->base, "elm.swallow.content", content);
      }
    _sizing_eval(obj);
 }
index 9de3a88..c808ccc 100644 (file)
@@ -53,7 +53,7 @@ struct _Elm_Diskselector_Item
 
 static const char *widtype = NULL;
 
-#define ELM_DISKSELECTOR_ITEM_CHECK_OR_RETURN(it, ...)                    \
+#define ELM_DISKSELECTOR_ITEM_CHECK_OR_RETURN(it, ...)                  \
    ELM_WIDGET_ITEM_CHECK_OR_RETURN((Elm_Widget_Item *)it, __VA_ARGS__); \
    ELM_CHECK_WIDTYPE(it->base.widget, widtype) __VA_ARGS__;
 
@@ -124,7 +124,7 @@ _item_new(Evas_Object *obj, Evas_Object *icon, const char *label, Evas_Smart_Cb
    evas_object_show(it->base.view);
 
    if (it->label)
-        edje_object_part_text_set(it->base.view, "elm.text", it->label);
+     edje_object_part_text_set(it->base.view, "elm.text", it->label);
    if (it->icon)
      {
         evas_object_size_hint_min_set(it->icon, 24, 24);
@@ -287,13 +287,13 @@ _on_focus_hook(void *data __UNUSED__, Evas_Object *obj)
 
    if (elm_widget_focus_get(obj))
      {
-       edje_object_signal_emit(wd->self, "elm,action,focus", "elm");
-       evas_object_focus_set(wd->self, EINA_TRUE);
+        edje_object_signal_emit(wd->self, "elm,action,focus", "elm");
+        evas_object_focus_set(wd->self, EINA_TRUE);
      }
    else
      {
-       edje_object_signal_emit(wd->self, "elm,action,unfocus", "elm");
-       evas_object_focus_set(wd->self, EINA_FALSE);
+        edje_object_signal_emit(wd->self, "elm,action,unfocus", "elm");
+        evas_object_focus_set(wd->self, EINA_FALSE);
      }
 }
 
@@ -398,11 +398,11 @@ _check_string(void *data)
         len = eina_stringshare_strlen(it->label);
 
         if (x <= ox + 5)
-             edje_object_signal_emit(it->base.view, "elm,state,left_side",
-                                     "elm");
+          edje_object_signal_emit(it->base.view, "elm,state,left_side",
+                                  "elm");
         else if (x + w >= ox + ow - 5)
-             edje_object_signal_emit(it->base.view, "elm,state,right_side",
-                                     "elm");
+          edje_object_signal_emit(it->base.view, "elm,state,right_side",
+                                  "elm");
         else
           {
              if ((wd->len_threshold) && (len > wd->len_threshold))
@@ -626,7 +626,7 @@ elm_diskselector_add(Evas_Object *parent)
    Widget_Data *wd;
 
    ELM_WIDGET_STANDARD_SETUP(wd, Widget_Data, parent, e, obj, NULL);
-   
+
    ELM_SET_WIDTYPE(widtype, "diskselector");
    elm_widget_type_set(obj, "diskselector");
    elm_widget_sub_object_add(parent, obj);
@@ -649,7 +649,7 @@ elm_diskselector_add(Evas_Object *parent)
    _theme_hook(obj);
    elm_widget_resize_object_set(obj, wd->scroller);
    elm_smart_scroller_policy_set(wd->scroller, ELM_SMART_SCROLLER_POLICY_OFF,
-                           ELM_SMART_SCROLLER_POLICY_OFF);
+                                 ELM_SMART_SCROLLER_POLICY_OFF);
    elm_smart_scroller_bounce_allow_set(wd->scroller, EINA_TRUE, EINA_FALSE);
    evas_object_smart_callback_add(wd->scroller, "scroll", _scroller_move_cb,
                                   wd);
index 1520339..ebb5029 100644 (file)
@@ -201,23 +201,23 @@ static const char SIG_SELECTION_CLEARED[] = "selection,cleared";
 static const char SIG_CURSOR_CHANGED[] = "cursor,changed";
 static const char SIG_ANCHOR_CLICKED[] = "anchor,clicked";
 static const Evas_Smart_Cb_Description _signals[] = {
-  {SIG_CHANGED, ""},
-  {SIG_ACTIVATED, ""},
-  {SIG_PRESS, ""},
-  {SIG_LONGPRESSED, ""},
-  {SIG_CLICKED, ""},
-  {SIG_CLICKED_DOUBLE, ""},
-  {SIG_FOCUSED, ""},
-  {SIG_UNFOCUSED, ""},
-  {SIG_SELECTION_PASTE, ""},
-  {SIG_SELECTION_COPY, ""},
-  {SIG_SELECTION_CUT, ""},
-  {SIG_SELECTION_START, ""},
-  {SIG_SELECTION_CHANGED, ""},
-  {SIG_SELECTION_CLEARED, ""},
-  {SIG_CURSOR_CHANGED, ""},
-  {SIG_ANCHOR_CLICKED, ""},
-  {NULL, NULL}
+       {SIG_CHANGED, ""},
+       {SIG_ACTIVATED, ""},
+       {SIG_PRESS, ""},
+       {SIG_LONGPRESSED, ""},
+       {SIG_CLICKED, ""},
+       {SIG_CLICKED_DOUBLE, ""},
+       {SIG_FOCUSED, ""},
+       {SIG_UNFOCUSED, ""},
+       {SIG_SELECTION_PASTE, ""},
+       {SIG_SELECTION_COPY, ""},
+       {SIG_SELECTION_CUT, ""},
+       {SIG_SELECTION_START, ""},
+       {SIG_SELECTION_CHANGED, ""},
+       {SIG_SELECTION_CLEARED, ""},
+       {SIG_CURSOR_CHANGED, ""},
+       {SIG_ANCHOR_CLICKED, ""},
+       {NULL, NULL}
 };
 
 static Eina_List *entries = NULL;
@@ -239,12 +239,12 @@ _module(Evas_Object *obj __UNUSED__)
    m->api = malloc(sizeof(Mod_Api));
    if (!m->api) return NULL;
    ((Mod_Api *)(m->api)      )->obj_hook = // called on creation
-     _elm_module_symbol_get(m, "obj_hook");
+      _elm_module_symbol_get(m, "obj_hook");
    ((Mod_Api *)(m->api)      )->obj_unhook = // called on deletion
-     _elm_module_symbol_get(m, "obj_unhook");
+      _elm_module_symbol_get(m, "obj_unhook");
    ((Mod_Api *)(m->api)      )->obj_longpress = // called on long press menu
-     _elm_module_symbol_get(m, "obj_longpress");
-   ok: // ok - return api
+      _elm_module_symbol_get(m, "obj_longpress");
+ok: // ok - return api
    return m->api;
 }
 
@@ -437,17 +437,17 @@ _filter_new(void (*func) (void *data, Evas_Object *entry, char **text), void *da
              return NULL;
           }
         if (as->accepted)
-           as2->accepted = eina_stringshare_add(as->accepted);
+          as2->accepted = eina_stringshare_add(as->accepted);
         else
-           as2->accepted = NULL;
+          as2->accepted = NULL;
         if (as->rejected)
-           as2->rejected = eina_stringshare_add(as->rejected);
+          as2->rejected = eina_stringshare_add(as->rejected);
         else
-           as2->rejected = NULL;
+          as2->rejected = NULL;
         tf->data = as2;
      }
    else
-      tf->data = data;
+     tf->data = data;
    return tf;
 }
 
@@ -545,7 +545,7 @@ _theme_hook(Evas_Object *obj)
    elm_entry_entry_set(obj, t);
    eina_stringshare_del(t);
    if (elm_widget_disabled_get(obj))
-      edje_object_signal_emit(wd->ent, "elm,state,disabled", "elm");
+     edje_object_signal_emit(wd->ent, "elm,state,disabled", "elm");
    elm_entry_cursor_pos_set(obj, wd->cursor_pos);
    if (elm_widget_focus_get(obj))
      edje_object_signal_emit(wd->ent, "elm,action,focus", "elm");
@@ -716,8 +716,8 @@ _resize(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *event
         _sizing_eval(data);
      }
    if (wd->hoversel) _hoversel_position(data);
-//   Evas_Coord ww, hh;
-//   evas_object_geometry_get(wd->ent, NULL, NULL, &ww, &hh);
+   //   Evas_Coord ww, hh;
+   //   evas_object_geometry_get(wd->ent, NULL, NULL, &ww, &hh);
 }
 
 static void
@@ -820,7 +820,7 @@ _copy(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
    edje_object_signal_emit(wd->ent, "elm,state,select,off", "elm");
    elm_widget_scroll_hold_pop(data);
    _store_selection(ELM_SEL_CLIPBOARD, data);
-//   edje_object_part_text_select_none(wd->ent, "elm.text");
+   //   edje_object_part_text_select_none(wd->ent, "elm.text");
 }
 
 static void
@@ -863,7 +863,7 @@ _long_press(void *data)
         else elm_widget_scroll_freeze_push(data);
         wd->hoversel = elm_hoversel_add(data);
         context_menu_orientation = edje_object_data_get
-          (wd->ent, "context_menu_orientation");
+           (wd->ent, "context_menu_orientation");
         if ((context_menu_orientation) &&
             (!strcmp(context_menu_orientation, "horizontal")))
           elm_hoversel_horizontal_set(wd->hoversel, EINA_TRUE);
@@ -1327,49 +1327,49 @@ _event_selection_notify(void *data, int type __UNUSED__, void *event)
    Ecore_X_Event_Selection_Notify *ev = event;
    if (!wd) return ECORE_CALLBACK_PASS_ON;
    if ((!wd->selection_asked) && (!wd->drag_selection_asked))
-      return ECORE_CALLBACK_PASS_ON;
+     return ECORE_CALLBACK_PASS_ON;
 
    if ((ev->selection == ECORE_X_SELECTION_CLIPBOARD) ||
        (ev->selection == ECORE_X_SELECTION_PRIMARY))
      {
-       Ecore_X_Selection_Data_Text *text_data;
-
-       text_data = ev->data;
-       if (text_data->data.content == ECORE_X_SELECTION_CONTENT_TEXT)
-         {
-            if (text_data->text)
-              {
-                 char *txt = _elm_util_text_to_mkup(text_data->text);
-
-                 if (txt)
-                   {
-                      elm_entry_entry_insert(data, txt);
-                      free(txt);
-                   }
-              }
-         }
-       wd->selection_asked = EINA_FALSE;
+        Ecore_X_Selection_Data_Text *text_data;
+
+        text_data = ev->data;
+        if (text_data->data.content == ECORE_X_SELECTION_CONTENT_TEXT)
+          {
+             if (text_data->text)
+               {
+                  char *txt = _elm_util_text_to_mkup(text_data->text);
+
+                  if (txt)
+                    {
+                       elm_entry_entry_insert(data, txt);
+                       free(txt);
+                    }
+               }
+          }
+        wd->selection_asked = EINA_FALSE;
      }
    else if (ev->selection == ECORE_X_SELECTION_XDND)
      {
-       Ecore_X_Selection_Data_Text *text_data;
-
-       text_data = ev->data;
-       if (text_data->data.content == ECORE_X_SELECTION_CONTENT_TEXT)
-         {
-            if (text_data->text)
-              {
-                 char *txt = _elm_util_text_to_mkup(text_data->text);
-
-                 if (txt)
-                   {
-                     /* Massive FIXME: this should be at the drag point */
-                      elm_entry_entry_insert(data, txt);
-                      free(txt);
-                   }
-              }
-         }
-       wd->drag_selection_asked = EINA_FALSE;
+        Ecore_X_Selection_Data_Text *text_data;
+
+        text_data = ev->data;
+        if (text_data->data.content == ECORE_X_SELECTION_CONTENT_TEXT)
+          {
+             if (text_data->text)
+               {
+                  char *txt = _elm_util_text_to_mkup(text_data->text);
+
+                  if (txt)
+                    {
+                       /* Massive FIXME: this should be at the drag point */
+                       elm_entry_entry_insert(data, txt);
+                       free(txt);
+                    }
+               }
+          }
+        wd->drag_selection_asked = EINA_FALSE;
 
         ecore_x_dnd_send_finished();
 
@@ -1380,17 +1380,17 @@ _event_selection_notify(void *data, int type __UNUSED__, void *event)
 static Eina_Bool
 _event_selection_clear(void *data __UNUSED__, int type __UNUSED__, void *event __UNUSED__)
 {
-/*
-   Widget_Data *wd = elm_widget_data_get(data);
-   Ecore_X_Event_Selection_Clear *ev = event;
-   if (!wd) return ECORE_CALLBACK_PASS_ON;
-   if (!wd->have_selection) return ECORE_CALLBACK_PASS_ON;
-   if ((ev->selection == ECORE_X_SELECTION_CLIPBOARD) ||
-       (ev->selection == ECORE_X_SELECTION_PRIMARY))
-     {
-       elm_entry_select_none(data);
-     }
-   return 1;*/
+   /*
+      Widget_Data *wd = elm_widget_data_get(data);
+      Ecore_X_Event_Selection_Clear *ev = event;
+      if (!wd) return ECORE_CALLBACK_PASS_ON;
+      if (!wd->have_selection) return ECORE_CALLBACK_PASS_ON;
+      if ((ev->selection == ECORE_X_SELECTION_CLIPBOARD) ||
+      (ev->selection == ECORE_X_SELECTION_PRIMARY))
+      {
+      elm_entry_select_none(data);
+      }
+      return 1;*/
    return ECORE_CALLBACK_PASS_ON;
 }
 
@@ -1409,7 +1409,7 @@ _drag_drop_cb(void *data __UNUSED__, Evas_Object *obj, Elm_Selection_Data *drop)
    edje_object_part_text_cursor_copy(wd->ent, "elm.text",
                                      EDJE_CURSOR_MAIN,/*->*/EDJE_CURSOR_USER);
    rv = edje_object_part_text_cursor_coord_set(wd->ent,"elm.text",
-                                          EDJE_CURSOR_MAIN,drop->x,drop->y);
+                                               EDJE_CURSOR_MAIN,drop->x,drop->y);
    if (!rv) printf("Warning: Failed to position cursor: paste anyway\n");
    elm_entry_entry_insert(obj, drop->data);
    edje_object_part_text_cursor_copy(wd->ent, "elm.text",
@@ -1435,7 +1435,7 @@ _get_item(void *data, Evas_Object *edje __UNUSED__, const char *part __UNUSED__,
    if (!strncmp(item, "file://", 7))
      {
         const char *fname = item + 7;
-       
+
         o = evas_object_image_filled_add(evas_object_evas_get(data));
         evas_object_image_file_set(o, fname, NULL);
         if (evas_object_image_load_error_get(o) == EVAS_LOAD_ERROR_NONE)
@@ -1470,7 +1470,7 @@ _text_filter(void *data, Evas_Object *edje __UNUSED__, const char *part __UNUSED
      {
         tf->func(tf->data, data, text);
         if (!*text)
-           break;
+          break;
      }
 }
 
@@ -1490,7 +1490,7 @@ elm_entry_add(Evas_Object *parent)
    Widget_Data *wd;
 
    ELM_WIDGET_STANDARD_SETUP(wd, Widget_Data, parent, e, obj, NULL);
-   
+
    ELM_SET_WIDTYPE(widtype, "entry");
    elm_widget_type_set(obj, "entry");
    elm_widget_sub_object_add(parent, obj);
@@ -1573,16 +1573,16 @@ elm_entry_add(Evas_Object *parent)
    top = elm_widget_top_get(obj);
    if ((top) && (elm_win_xwindow_get(top)))
      {
-       wd->sel_notify_handler =
-         ecore_event_handler_add(ECORE_X_EVENT_SELECTION_NOTIFY,
-                                 _event_selection_notify, obj);
-       wd->sel_clear_handler =
-         ecore_event_handler_add(ECORE_X_EVENT_SELECTION_CLEAR,
-                                 _event_selection_clear, obj);
+        wd->sel_notify_handler =
+           ecore_event_handler_add(ECORE_X_EVENT_SELECTION_NOTIFY,
+                                   _event_selection_notify, obj);
+        wd->sel_clear_handler =
+           ecore_event_handler_add(ECORE_X_EVENT_SELECTION_CLEAR,
+                                   _event_selection_clear, obj);
      }
 
    elm_drop_target_add(obj, ELM_SEL_FORMAT_MARKUP | ELM_SEL_FORMAT_IMAGE,
-                  _drag_drop_cb, NULL);
+                       _drag_drop_cb, NULL);
 #endif
 
    entries = eina_list_prepend(entries, obj);
@@ -1728,8 +1728,8 @@ elm_entry_entry_get(const Evas_Object *obj)
    text = edje_object_part_text_get(wd->ent, "elm.text");
    if (!text)
      {
-       ERR("text=NULL for edje %p, part 'elm.text'", wd->ent);
-       return NULL;
+        ERR("text=NULL for edje %p, part 'elm.text'", wd->ent);
+        return NULL;
      }
    eina_stringshare_replace(&wd->text, text);
    return wd->text;
@@ -1762,8 +1762,8 @@ elm_entry_is_empty(const Evas_Object *obj)
     * otherwise it is. */
    tb = edje_object_part_object_get(wd->ent, "elm.text");
    cur = evas_object_textblock_cursor_new((Evas_Object *) tb); /* This is
-      actually, ok for the time being, thsese hackish stuff will be removed
-      once evas 1.0 is out*/
+                                                                  actually, ok for the time being, thsese hackish stuff will be removed
+                                                                  once evas 1.0 is out*/
    evas_textblock_cursor_pos_set(cur, 0);
    ret = evas_textblock_cursor_char_next(cur);
    evas_textblock_cursor_free(cur);
@@ -1790,8 +1790,8 @@ elm_entry_selection_get(const Evas_Object *obj)
 
 /**
  * This inserts text in @p entry where the current cursor position.
- * 
- * This inserts text at the cursor position is as if it was typed 
+ *
+ * This inserts text at the cursor position is as if it was typed
  * by the user (note this also allows markup which a user
  * can't just "type" as it would be converted to escaped text, so this
  * call can be used to insert things like emoticon items or bold push/pop
@@ -1835,7 +1835,7 @@ elm_entry_line_wrap_set(Evas_Object *obj, Eina_Bool wrap)
    if (wd->linewrap == wrap) return;
    wd->linewrap = wrap;
    if(wd->linewrap)
-       wd->char_linewrap = EINA_FALSE;
+     wd->char_linewrap = EINA_FALSE;
    _theme_hook(obj);
 }
 
@@ -1860,7 +1860,7 @@ elm_entry_line_char_wrap_set(Evas_Object *obj, Eina_Bool wrap)
    if (wd->char_linewrap == wrap) return;
    wd->char_linewrap = wrap;
    if(wd->char_linewrap)
-       wd->linewrap = EINA_FALSE;
+     wd->linewrap = EINA_FALSE;
    _theme_hook(obj);
 }
 
@@ -1885,9 +1885,9 @@ elm_entry_editable_set(Evas_Object *obj, Eina_Bool editable)
 
 #ifdef HAVE_ELEMENTARY_X
    if (editable)
-      elm_drop_target_add(obj, ELM_SEL_FORMAT_MARKUP, _drag_drop_cb, NULL);
+     elm_drop_target_add(obj, ELM_SEL_FORMAT_MARKUP, _drag_drop_cb, NULL);
    else
-      elm_drop_target_del(obj);
+     elm_drop_target_del(obj);
 #endif
 }
 
@@ -1925,9 +1925,9 @@ elm_entry_select_none(Evas_Object *obj)
    if (!wd) return;
    if (wd->selmode)
      {
-       wd->selmode = EINA_FALSE;
-       edje_object_part_text_select_allow_set(wd->ent, "elm.text", EINA_FALSE);
-       edje_object_signal_emit(wd->ent, "elm,state,select,off", "elm");
+        wd->selmode = EINA_FALSE;
+        edje_object_part_text_select_allow_set(wd->ent, "elm.text", EINA_FALSE);
+        edje_object_signal_emit(wd->ent, "elm,state,select,off", "elm");
      }
    wd->have_selection = EINA_FALSE;
    edje_object_part_text_select_none(wd->ent, "elm.text");
@@ -1948,9 +1948,9 @@ elm_entry_select_all(Evas_Object *obj)
    if (!wd) return;
    if (wd->selmode)
      {
-       wd->selmode = EINA_FALSE;
-       edje_object_part_text_select_allow_set(wd->ent, "elm.text", EINA_FALSE);
-       edje_object_signal_emit(wd->ent, "elm,state,select,off", "elm");
+        wd->selmode = EINA_FALSE;
+        edje_object_part_text_select_allow_set(wd->ent, "elm.text", EINA_FALSE);
+        edje_object_signal_emit(wd->ent, "elm,state,select,off", "elm");
      }
    wd->have_selection = EINA_TRUE;
    edje_object_part_text_select_all(wd->ent, "elm.text");
@@ -2379,7 +2379,7 @@ elm_entry_context_menu_disabled_get(const Evas_Object *obj)
  * and object to do this), then this object is used to replace that item. If
  * not the next provider is called until one provides an item object, or the
  * default provider in entry does.
- * 
+ *
  * @param obj The entry object
  * @param func The function called to provide the item object
  * @param data The data passed to @p func
@@ -2405,7 +2405,7 @@ elm_entry_item_provider_append(Evas_Object *obj, Evas_Object *(*func) (void *dat
  *
  * This prepends the given callback. See elm_entry_item_provider_append() for
  * more information
- * 
+ *
  * @param obj The entry object
  * @param func The function called to provide the item object
  * @param data The data passed to @p func
@@ -2431,7 +2431,7 @@ elm_entry_item_provider_prepend(Evas_Object *obj, Evas_Object *(*func) (void *da
  *
  * This removes the given callback. See elm_entry_item_provider_append() for
  * more information
- * 
+ *
  * @param obj The entry object
  * @param func The function called to provide the item object
  * @param data The data passed to @p func
@@ -2485,10 +2485,10 @@ elm_entry_text_filter_append(Evas_Object *obj, void (*func) (void *data, Evas_Ob
    wd = elm_widget_data_get(obj);
 
    EINA_SAFETY_ON_NULL_RETURN(func);
-   
+
    tf = _filter_new(func, data);
    if (!tf) return;
-   
+
    wd->text_filters = eina_list_append(wd->text_filters, tf);
 }
 
@@ -2517,7 +2517,7 @@ elm_entry_text_filter_prepend(Evas_Object *obj, void (*func) (void *data, Evas_O
 
    tf = _filter_new(func, data);
    if (!tf) return;
-   
+
    wd->text_filters = eina_list_prepend(wd->text_filters, tf);
 }
 
@@ -2630,11 +2630,11 @@ elm_entry_filter_limit_size(void *data, Evas_Object *entry, char **text)
     * scrolled_entry */
    widget_type = elm_widget_type_get(entry);
    if (!strcmp(widget_type, "entry"))
-      text_get = elm_entry_entry_get;
+     text_get = elm_entry_entry_get;
    else if (!strcmp(widget_type, "scrolled_entry"))
-      text_get = elm_scrolled_entry_entry_get;
+     text_get = elm_scrolled_entry_entry_get;
    else /* huh? */
-      return;
+     return;
 
    current = elm_entry_markup_to_utf8(text_get(entry));
 
@@ -2676,7 +2676,7 @@ elm_entry_filter_limit_size(void *data, Evas_Object *entry, char **text)
              newlen -= (newlen - p);
           }
         if (newlen)
-           (*text)[newlen] = 0;
+          (*text)[newlen] = 0;
         else
           {
              free(*text);
@@ -2708,7 +2708,7 @@ elm_entry_filter_accept_set(void *data, Evas_Object *entry __UNUSED__, char **te
    EINA_SAFETY_ON_NULL_RETURN(text);
 
    if ((!as->accepted) && (!as->rejected))
-      return;
+     return;
 
    if (as->accepted)
      {
@@ -2743,7 +2743,7 @@ elm_entry_filter_accept_set(void *data, Evas_Object *entry __UNUSED__, char **te
              int size = read_idx - last_read_idx;
              const char *src = (*text) + last_read_idx;
              if (src != insert)
-                memcpy(insert, *text + last_read_idx, size);
+               memcpy(insert, *text + last_read_idx, size);
              insert += size;
           }
         last_read_idx = read_idx;
@@ -2771,8 +2771,8 @@ elm_entry_file_set(Evas_Object *obj, const char *file, Elm_Text_Format format)
    if (!wd) return;
    if (wd->delay_write)
      {
-       ecore_timer_del(wd->delay_write);
-       wd->delay_write = NULL;
+        ecore_timer_del(wd->delay_write);
+        wd->delay_write = NULL;
      }
    if (wd->autosave) _save(obj);
    eina_stringshare_replace(&wd->file, file);
@@ -2815,8 +2815,8 @@ elm_entry_file_save(Evas_Object *obj)
    if (!wd) return;
    if (wd->delay_write)
      {
-       ecore_timer_del(wd->delay_write);
-       wd->delay_write = NULL;
+        ecore_timer_del(wd->delay_write);
+        wd->delay_write = NULL;
      }
    _save(obj);
    wd->delay_write = ecore_timer_add(2.0, _delay_write, obj);
index 9c3f2b8..2278633 100644 (file)
@@ -27,7 +27,7 @@ struct _Widget_Data
    Elm_Flip_Mode mode;
    Evas_Object *clip;
    struct {
-      Evas_Object *content, *clip;
+        Evas_Object *content, *clip;
    } front, back;
    Eina_Bool state : 1;
 };
@@ -89,12 +89,12 @@ _sizing_eval(Evas_Object *obj)
      evas_object_size_hint_max_get(wd->front.content, &maxw, &maxh);
    if (wd->back.content)
      evas_object_size_hint_max_get(wd->back.content, &maxw2, &maxh2);
-   
+
    if (minw2 > minw) minw = minw2;
    if (minh2 > minh) minh = minh2;
    if ((maxw2 >= 0) && (maxw2 < maxw)) maxw = maxw2;
    if ((maxh2 >= 0) && (maxh2 < maxh)) maxh = maxh2;
-   
+
    evas_object_size_hint_min_set(obj, minw, minh);
    evas_object_size_hint_max_set(obj, maxw, maxh);
 }
@@ -115,19 +115,19 @@ _sub_del(void *data __UNUSED__, Evas_Object *obj, void *event_info)
    if (!wd) return;
    if (sub == wd->front.content)
      {
-       evas_object_event_callback_del_full(sub, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
+        evas_object_event_callback_del_full(sub, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
                                             _changed_size_hints, obj);
-       wd->front.content = NULL;
+        wd->front.content = NULL;
         evas_object_hide(wd->front.clip);
-       _sizing_eval(obj);
+        _sizing_eval(obj);
      }
    else if (sub == wd->back.content)
      {
-       evas_object_event_callback_del_full(sub, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
+        evas_object_event_callback_del_full(sub, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
                                             _changed_size_hints, obj);
-       wd->back.content = NULL;
+        wd->back.content = NULL;
         evas_object_hide(wd->back.clip);
-       _sizing_eval(obj);
+        _sizing_eval(obj);
      }
 }
 
@@ -138,24 +138,24 @@ flip_show_hide(Evas_Object *obj)
    if (elm_flip_front_get(obj))
      {
         if (wd->front.content)
-           evas_object_show(wd->front.clip);
+          evas_object_show(wd->front.clip);
         else
-           evas_object_hide(wd->front.clip);
+          evas_object_hide(wd->front.clip);
         if (wd->back.content)
-           evas_object_hide(wd->back.clip);
+          evas_object_hide(wd->back.clip);
         else
-           evas_object_hide(wd->back.clip);
+          evas_object_hide(wd->back.clip);
      }
    else
      {
         if (wd->front.content)
-           evas_object_hide(wd->front.clip);
+          evas_object_hide(wd->front.clip);
         else
-           evas_object_hide(wd->front.clip);
+          evas_object_hide(wd->front.clip);
         if (wd->back.content)
-           evas_object_show(wd->back.clip);
+          evas_object_show(wd->back.clip);
         else
-           evas_object_hide(wd->back.clip);
+          evas_object_hide(wd->back.clip);
      }
 }
 
@@ -190,16 +190,16 @@ _flip(Evas_Object *obj)
         evas_object_geometry_get(wd->back.content, &x, &y, &w, &h);
         evas_map_util_points_populate_from_geometry(mb, x, y, w, h, 0);
      }
-   
+
    evas_object_geometry_get(obj, &x, &y, &w, &h);
-   
+
    cx = x + (w / 2);
    cy = y + (h / 2);
 
    px = x + (w / 2);
    py = y + (h / 2);
    foc = 2048;
-   
+
    lx = cx;
    ly = cy;
    lz = -10000;
@@ -209,106 +209,106 @@ _flip(Evas_Object *obj)
    lar = 0;
    lag = 0;
    lab = 0;
-   
+
    switch (wd->mode)
      {
-     case ELM_FLIP_ROTATE_Y_CENTER_AXIS:
-        p = 1.0 - t;
-        p = 1.0 - (p * p);
-        if (wd->state) deg = 180.0 * p;
-        else deg = 180 + (180.0 * p);
-        evas_map_util_3d_rotate(mf, 0.0, deg, 0.0, cx, cy, 0);
-        evas_map_util_3d_rotate(mb, 0.0, deg + 180.0, 0.0, cx, cy, 0);
-        break;
-     case ELM_FLIP_ROTATE_X_CENTER_AXIS:
-        p = 1.0 - t;
-        p = 1.0 - (p * p);
-        if (wd->state) deg = 180.0 * p;
-        else deg = 180 + (180.0 * p);
-        evas_map_util_3d_rotate(mf, deg, 0.0, 0.0, cx, cy, 0);
-        evas_map_util_3d_rotate(mb, deg + 180.0, 0.0, 0.0, cx, cy, 0);
-        break;
-     case ELM_FLIP_ROTATE_XZ_CENTER_AXIS:
-        p = 1.0 - t;
-        p = 1.0 - (p * p);
-        if (wd->state) deg = 180.0 * p;
-        else deg = 180 + (180.0 * p);
-        evas_map_util_3d_rotate(mf, deg, 0.0, deg, cx, cy, 0);
-        evas_map_util_3d_rotate(mb, deg + 180.0, 0.0, deg + 180.0, cx, cy, 0);
-        break;
-     case ELM_FLIP_ROTATE_YZ_CENTER_AXIS:
-        p = 1.0 - t;
-        p = 1.0 - (p * p);
-        if (wd->state) deg = 180.0 * p;
-        else deg = 180 + (180.0 * p);
-        evas_map_util_3d_rotate(mf, 0.0, deg, deg, cx, cy, 0);
-        evas_map_util_3d_rotate(mb, 0.0, deg + 180.0, deg + 180.0, cx, cy, 0);
-        break;
-     case ELM_FLIP_CUBE_LEFT:
-        p = 1.0 - t;
-        p = 1.0 - (p * p);
-        deg = -90.0 * p;
-        if (wd->state)
-          {
-            evas_map_util_3d_rotate(mf, 0.0, deg, 0.0, cx, cy, w / 2);
-            evas_map_util_3d_rotate(mb, 0.0, deg + 90, 0.0, cx, cy, w / 2);
-          }
-        else
-          {
-            evas_map_util_3d_rotate(mf, 0.0, deg + 90, 0.0, cx, cy, w / 2);
-            evas_map_util_3d_rotate(mb, 0.0, deg, 0.0, cx, cy, w / 2);
-          }
-        break;
-     case ELM_FLIP_CUBE_RIGHT:
-        p = 1.0 - t;
-        p = 1.0 - (p * p);
-        deg = 90.0 * p;
-        if (wd->state)
-          {
-            evas_map_util_3d_rotate(mf, 0.0, deg, 0.0, cx, cy, w / 2);
-            evas_map_util_3d_rotate(mb, 0.0, deg - 90, 0.0, cx, cy, w / 2);
-          }
-        else
-          {
-            evas_map_util_3d_rotate(mf, 0.0, deg - 90, 0.0, cx, cy, w / 2);
-            evas_map_util_3d_rotate(mb, 0.0, deg, 0.0, cx, cy, w / 2);
-          }
-        break;
-     case ELM_FLIP_CUBE_UP:
-        p = 1.0 - t;
-        p = 1.0 - (p * p);
-        deg = -90.0 * p;
-        if (wd->state)
-          {
-            evas_map_util_3d_rotate(mf, deg, 0.0, 0.0, cx, cy, h / 2);
-            evas_map_util_3d_rotate(mb, deg + 90, 0.0, 0.0, cx, cy, h / 2);
-          }
-        else
-          {
-            evas_map_util_3d_rotate(mf, deg + 90, 0.0, 0.0, cx, cy, h / 2);
-            evas_map_util_3d_rotate(mb, deg, 0.0, 0.0, cx, cy, h / 2);
-          }
-        break;
-     case ELM_FLIP_CUBE_DOWN:
-        p = 1.0 - t;
-        p = 1.0 - (p * p);
-        deg = 90.0 * p;
-        if (wd->state)
-          {
-            evas_map_util_3d_rotate(mf, deg, 0.0, 0.0, cx, cy, h / 2);
-            evas_map_util_3d_rotate(mb, deg - 90, 0.0, 0.0, cx, cy, h / 2);
-          }
-        else
-          {
-            evas_map_util_3d_rotate(mf, deg - 90, 0.0, 0.0, cx, cy, h / 2);
-            evas_map_util_3d_rotate(mb, deg, 0.0, 0.0, cx, cy, h / 2);
-          }
-        break;
-     default:
-        break;
+      case ELM_FLIP_ROTATE_Y_CENTER_AXIS:
+         p = 1.0 - t;
+         p = 1.0 - (p * p);
+         if (wd->state) deg = 180.0 * p;
+         else deg = 180 + (180.0 * p);
+         evas_map_util_3d_rotate(mf, 0.0, deg, 0.0, cx, cy, 0);
+         evas_map_util_3d_rotate(mb, 0.0, deg + 180.0, 0.0, cx, cy, 0);
+         break;
+      case ELM_FLIP_ROTATE_X_CENTER_AXIS:
+         p = 1.0 - t;
+         p = 1.0 - (p * p);
+         if (wd->state) deg = 180.0 * p;
+         else deg = 180 + (180.0 * p);
+         evas_map_util_3d_rotate(mf, deg, 0.0, 0.0, cx, cy, 0);
+         evas_map_util_3d_rotate(mb, deg + 180.0, 0.0, 0.0, cx, cy, 0);
+         break;
+      case ELM_FLIP_ROTATE_XZ_CENTER_AXIS:
+         p = 1.0 - t;
+         p = 1.0 - (p * p);
+         if (wd->state) deg = 180.0 * p;
+         else deg = 180 + (180.0 * p);
+         evas_map_util_3d_rotate(mf, deg, 0.0, deg, cx, cy, 0);
+         evas_map_util_3d_rotate(mb, deg + 180.0, 0.0, deg + 180.0, cx, cy, 0);
+         break;
+      case ELM_FLIP_ROTATE_YZ_CENTER_AXIS:
+         p = 1.0 - t;
+         p = 1.0 - (p * p);
+         if (wd->state) deg = 180.0 * p;
+         else deg = 180 + (180.0 * p);
+         evas_map_util_3d_rotate(mf, 0.0, deg, deg, cx, cy, 0);
+         evas_map_util_3d_rotate(mb, 0.0, deg + 180.0, deg + 180.0, cx, cy, 0);
+         break;
+      case ELM_FLIP_CUBE_LEFT:
+         p = 1.0 - t;
+         p = 1.0 - (p * p);
+         deg = -90.0 * p;
+         if (wd->state)
+           {
+              evas_map_util_3d_rotate(mf, 0.0, deg, 0.0, cx, cy, w / 2);
+              evas_map_util_3d_rotate(mb, 0.0, deg + 90, 0.0, cx, cy, w / 2);
+           }
+         else
+           {
+              evas_map_util_3d_rotate(mf, 0.0, deg + 90, 0.0, cx, cy, w / 2);
+              evas_map_util_3d_rotate(mb, 0.0, deg, 0.0, cx, cy, w / 2);
+           }
+         break;
+      case ELM_FLIP_CUBE_RIGHT:
+         p = 1.0 - t;
+         p = 1.0 - (p * p);
+         deg = 90.0 * p;
+         if (wd->state)
+           {
+              evas_map_util_3d_rotate(mf, 0.0, deg, 0.0, cx, cy, w / 2);
+              evas_map_util_3d_rotate(mb, 0.0, deg - 90, 0.0, cx, cy, w / 2);
+           }
+         else
+           {
+              evas_map_util_3d_rotate(mf, 0.0, deg - 90, 0.0, cx, cy, w / 2);
+              evas_map_util_3d_rotate(mb, 0.0, deg, 0.0, cx, cy, w / 2);
+           }
+         break;
+      case ELM_FLIP_CUBE_UP:
+         p = 1.0 - t;
+         p = 1.0 - (p * p);
+         deg = -90.0 * p;
+         if (wd->state)
+           {
+              evas_map_util_3d_rotate(mf, deg, 0.0, 0.0, cx, cy, h / 2);
+              evas_map_util_3d_rotate(mb, deg + 90, 0.0, 0.0, cx, cy, h / 2);
+           }
+         else
+           {
+              evas_map_util_3d_rotate(mf, deg + 90, 0.0, 0.0, cx, cy, h / 2);
+              evas_map_util_3d_rotate(mb, deg, 0.0, 0.0, cx, cy, h / 2);
+           }
+         break;
+      case ELM_FLIP_CUBE_DOWN:
+         p = 1.0 - t;
+         p = 1.0 - (p * p);
+         deg = 90.0 * p;
+         if (wd->state)
+           {
+              evas_map_util_3d_rotate(mf, deg, 0.0, 0.0, cx, cy, h / 2);
+              evas_map_util_3d_rotate(mb, deg - 90, 0.0, 0.0, cx, cy, h / 2);
+           }
+         else
+           {
+              evas_map_util_3d_rotate(mf, deg - 90, 0.0, 0.0, cx, cy, h / 2);
+              evas_map_util_3d_rotate(mb, deg, 0.0, 0.0, cx, cy, h / 2);
+           }
+         break;
+      default:
+         break;
      }
 
-   
+
    if (wd->front.content)
      {
         evas_map_util_3d_lighting(mf, lx, ly, lz, lr, lg, lb, lar, lag, lab);
@@ -318,7 +318,7 @@ _flip(Evas_Object *obj)
         if (evas_map_util_clockwise_get(mf)) evas_object_show(wd->front.clip);
         else evas_object_hide(wd->front.clip);
      }
-      
+
    if (wd->back.content)
      {
         evas_map_util_3d_lighting(mb, lx, ly, lz, lr, lg, lb, lar, lag, lab);
@@ -328,10 +328,10 @@ _flip(Evas_Object *obj)
         if (evas_map_util_clockwise_get(mb)) evas_object_show(wd->back.clip);
         else evas_object_hide(wd->back.clip);
      }
-   
+
    evas_map_free(mf);
    evas_map_free(mb);
-   
+
    if (t >= 1.0)
      {
         evas_object_map_enable_set(wd->front.content, 0);
@@ -380,7 +380,7 @@ _move(void *data __UNUSED__, Evas *e __UNUSED__, Evas_Object *obj, void *event_i
 
 static void
 _resize(void *data __UNUSED__, Evas *e __UNUSED__, Evas_Object *obj, void *event_info __UNUSED__)
-{    
+{
    _configure(obj);
 }
 
@@ -406,7 +406,7 @@ elm_flip_add(Evas_Object *parent)
    Widget_Data *wd;
 
    ELM_WIDGET_STANDARD_SETUP(wd, Widget_Data, parent, e, obj, NULL);
-   
+
    ELM_SET_WIDTYPE(widtype, "flip");
    elm_widget_type_set(obj, "flip");
    elm_widget_sub_object_add(parent, obj);
@@ -424,7 +424,7 @@ elm_flip_add(Evas_Object *parent)
    elm_widget_sub_object_add(obj, wd->clip);
    evas_object_clip_set(wd->clip, evas_object_clip_get(obj));
    evas_object_smart_member_add(wd->clip, obj);
-   
+
    wd->front.clip = evas_object_rectangle_add(e);
    evas_object_static_clip_set(wd->front.clip, 1);
    evas_object_data_set(wd->front.clip, "_elm_leaveme", obj);
@@ -434,7 +434,7 @@ elm_flip_add(Evas_Object *parent)
    elm_widget_sub_object_add(obj, wd->front.clip);
    evas_object_smart_member_add(wd->front.clip, obj);
    evas_object_clip_set(wd->front.clip, wd->clip);
-   
+
    wd->back.clip = evas_object_rectangle_add(e);
    evas_object_static_clip_set(wd->back.clip, 1);
    evas_object_data_set(wd->back.clip, "_elm_leaveme", obj);
@@ -448,9 +448,9 @@ elm_flip_add(Evas_Object *parent)
    evas_object_smart_callback_add(obj, "sub-object-del", _sub_del, obj);
    evas_object_event_callback_add(obj, EVAS_CALLBACK_MOVE, _move, NULL);
    evas_object_event_callback_add(obj, EVAS_CALLBACK_RESIZE, _resize, NULL);
-   
+
    wd->state = 1;
-     
+
    _sizing_eval(obj);
    return obj;
 }
@@ -478,13 +478,13 @@ elm_flip_content_front_set(Evas_Object *obj, Evas_Object *content)
    wd->front.content = content;
    if (content)
      {
-       elm_widget_sub_object_add(obj, content);
+        elm_widget_sub_object_add(obj, content);
         evas_object_smart_member_add(content, obj);
         evas_object_clip_set(content, wd->front.clip);
-       evas_object_event_callback_add(content,
+        evas_object_event_callback_add(content,
                                        EVAS_CALLBACK_CHANGED_SIZE_HINTS,
-                                      _changed_size_hints, obj);
-       _sizing_eval(obj);
+                                       _changed_size_hints, obj);
+        _sizing_eval(obj);
      }
    // force calc to contents are the right size before transition
    evas_smart_objects_calculate(evas_object_evas_get(obj));
@@ -515,13 +515,13 @@ elm_flip_content_back_set(Evas_Object *obj, Evas_Object *content)
    wd->back.content = content;
    if (content)
      {
-       elm_widget_sub_object_add(obj, content);
+        elm_widget_sub_object_add(obj, content);
         evas_object_smart_member_add(content, obj);
         evas_object_clip_set(content, wd->back.clip);
-       evas_object_event_callback_add(content,
+        evas_object_event_callback_add(content,
                                        EVAS_CALLBACK_CHANGED_SIZE_HINTS,
-                                      _changed_size_hints, obj);
-       _sizing_eval(obj);
+                                       _changed_size_hints, obj);
+        _sizing_eval(obj);
      }
    // force calc to contents are the right size before transition
    evas_smart_objects_calculate(evas_object_evas_get(obj));
@@ -665,7 +665,7 @@ elm_flip_perspective_set(Evas_Object *obj, Evas_Coord foc __UNUSED__, Evas_Coord
  * ELM_FLIP_ROTATE_YZ_CENTER_AXIS
  * ELM_FLIP_CUBE_LEFT
  * ELM_FLIP_CUBE_RIGHT
- * 
+ *
  * FIXME: add - ELM_FLIP_CUBE_UP
  * FIXMEL add - ELM_FLIP_CUBE_DOWN
  *
index 8dd3142..5ab769f 100644 (file)
@@ -73,13 +73,13 @@ static const Evas_Smart_Cb_Description _signals[] = {
   {NULL, NULL}
 };
 
-#define ELM_FLIPSELECTOR_ITEM_CHECK_DELETED_RETURN(it, ...)               \
+#define ELM_FLIPSELECTOR_ITEM_CHECK_DELETED_RETURN(it, ...)             \
    ELM_WIDGET_ITEM_WIDTYPE_CHECK_OR_RETURN(it, __VA_ARGS__);            \
-  if (it->deleted)                                                     \
-    {                                                                  \
-       ERR(""#it" has been DELETED.\n");                               \
-       return __VA_ARGS__;                                             \
-    }                                                                  \
+  if (it->deleted)                                                      \
+    {                                                                   \
+       ERR(""#it" has been DELETED.\n");                                \
+       return __VA_ARGS__;                                              \
+    }                                                                   \
 
 static Elm_Flipselector_Item *
 _item_new(Evas_Object *obj, const char *label, Evas_Smart_Cb func, const void *data)
@@ -125,7 +125,7 @@ _del_hook(Evas_Object *obj)
      ERR("flipselector deleted while walking.\n");
 
    EINA_LIST_FREE(wd->items, item)
-     _item_free(item);
+      _item_free(item);
 
    if (wd->spin) ecore_timer_del(wd->spin);
    free(wd);
@@ -142,18 +142,18 @@ _theme_hook(Evas_Object *obj)
      return;
 
    _elm_theme_object_set(obj, wd->base, "flipselector", "base",
-                        elm_widget_style_get(obj));
+                         elm_widget_style_get(obj));
    edje_object_scale_set(wd->base,
-                        elm_widget_scale_get(obj) * _elm_config->scale);
+                         elm_widget_scale_get(obj) * _elm_config->scale);
 
    max_len = edje_object_data_get(wd->base, "max_len");
    if (!max_len)
      wd->max_len = MAX_LEN_DEFAULT;
    else
      {
-       wd->max_len = atoi(max_len);
-       if (!wd->max_len)
-         wd->max_len = MAX_LEN_DEFAULT;
+        wd->max_len = atoi(max_len);
+        if (!wd->max_len)
+          wd->max_len = MAX_LEN_DEFAULT;
      }
 
    _update_view(obj);
@@ -168,17 +168,17 @@ _sentinel_eval(Widget_Data *wd)
 
    if (!wd->items)
      {
-       wd->sentinel = NULL;
-       return;
+        wd->sentinel = NULL;
+        return;
      }
 
    wd->sentinel = wd->items;
 
    EINA_LIST_FOREACH(wd->items, l, it)
      {
-       if (strlen(elm_flipselector_item_label_get(it)) >
-           strlen(elm_flipselector_item_label_get(DATA_GET(wd->sentinel))))
-         wd->sentinel = l;
+        if (strlen(elm_flipselector_item_label_get(it)) >
+            strlen(elm_flipselector_item_label_get(DATA_GET(wd->sentinel))))
+          wd->sentinel = l;
      }
 }
 
@@ -195,28 +195,28 @@ _flipselector_process_deletions(Widget_Data *wd)
 
    EINA_LIST_FOREACH(wd->items, l, it)
      {
-       if (!it->deleted)
-         continue;
+        if (!it->deleted)
+          continue;
 
-       if (wd->current == l)
-         {
-            if (wd->current == wd->sentinel)
-              sentinel_eval = EINA_TRUE;
+        if (wd->current == l)
+          {
+             if (wd->current == wd->sentinel)
+               sentinel_eval = EINA_TRUE;
 
-            wd->current = eina_list_prev(wd->current);
-         }
-       wd->items = eina_list_remove(wd->items, it);
+             wd->current = eina_list_prev(wd->current);
+          }
+        wd->items = eina_list_remove(wd->items, it);
 
-       if (!wd->current)
-         wd->current = wd->items;
+        if (!wd->current)
+          wd->current = wd->items;
 
         _item_free(it);
-       skip = EINA_FALSE;
+        skip = EINA_FALSE;
 
-       if (eina_list_count(wd->items) <= 1)
-         edje_object_signal_emit(wd->base, "elm,state,button,hidden", "elm");
-       else
-         edje_object_signal_emit(wd->base, "elm,state,button,visible", "elm");
+        if (eina_list_count(wd->items) <= 1)
+          edje_object_signal_emit(wd->base, "elm,state,button,hidden", "elm");
+        else
+          edje_object_signal_emit(wd->base, "elm,state,button,visible", "elm");
      }
 
    if (!skip)
@@ -233,8 +233,8 @@ _flipselector_walk(Widget_Data *wd)
 {
    if (wd->walking < 0)
      {
-       ERR("walking was negative. fixed!\n");
-       wd->walking = 0;
+        ERR("walking was negative. fixed!\n");
+        wd->walking = 0;
      }
    wd->walking++;
 }
@@ -245,8 +245,8 @@ _flipselector_unwalk(Widget_Data *wd)
    wd->walking--;
    if (wd->walking < 0)
      {
-       ERR("walking became negative. fixed!\n");
-       wd->walking = 0;
+        ERR("walking became negative. fixed!\n");
+        wd->walking = 0;
      }
 
    if (wd->walking)
@@ -306,13 +306,13 @@ _on_focus_hook(void *data __UNUSED__, Evas_Object *obj)
    /* FIXME: no treatment of this signal so far */
    if (elm_widget_focus_get(obj))
      {
-       edje_object_signal_emit(wd->base, "elm,action,focus", "elm");
-       evas_object_focus_set(wd->base, EINA_TRUE);
+        edje_object_signal_emit(wd->base, "elm,action,focus", "elm");
+        evas_object_focus_set(wd->base, EINA_TRUE);
      }
    else
      {
-       edje_object_signal_emit(wd->base, "elm,action,unfocus", "elm");
-       evas_object_focus_set(wd->base, EINA_FALSE);
+        edje_object_signal_emit(wd->base, "elm,action,unfocus", "elm");
+        evas_object_focus_set(wd->base, EINA_FALSE);
      }
 }
 
@@ -331,11 +331,11 @@ _sizing_eval(Evas_Object *obj)
 
    if (wd->sentinel)
      {
-       const char *label = \
-         elm_flipselector_item_label_get(DATA_GET(wd->sentinel));
+        const char *label = \
+                            elm_flipselector_item_label_get(DATA_GET(wd->sentinel));
 
-       tmp = edje_object_part_text_get(wd->base, "top");
-       edje_object_part_text_set(wd->base, "top", label);
+        tmp = edje_object_part_text_get(wd->base, "top");
+        edje_object_part_text_set(wd->base, "top", label);
      }
 
    edje_object_size_min_restricted_calc(wd->base, &minw, &minh, minw, minh);
@@ -410,8 +410,8 @@ _flip_up(Widget_Data *wd)
 
    if (wd->current == wd->items)
      {
-       wd->current = eina_list_last(wd->items);
-       evas_object_smart_callback_call(wd->self, SIG_UNDERFLOWED, NULL);
+        wd->current = eina_list_last(wd->items);
+        evas_object_smart_callback_call(wd->self, SIG_UNDERFLOWED, NULL);
      }
    else
      wd->current = eina_list_prev(wd->current);
@@ -444,7 +444,7 @@ _signal_val_up(void *data)
 
    return ECORE_CALLBACK_RENEW;
 
- val_up_exit_on_error:
+val_up_exit_on_error:
    return ECORE_CALLBACK_CANCEL;
 }
 
@@ -475,8 +475,8 @@ _flip_down(Widget_Data *wd)
    wd->current = eina_list_next(wd->current);
    if (!wd->current)
      {
-       wd->current = wd->items;
-       evas_object_smart_callback_call(wd->self, SIG_OVERFLOWED, NULL);
+        wd->current = wd->items;
+        evas_object_smart_callback_call(wd->self, SIG_OVERFLOWED, NULL);
      }
 
    item = DATA_GET(wd->current);
@@ -506,7 +506,7 @@ _signal_val_down(void *data)
 
    return ECORE_CALLBACK_RENEW;
 
- val_down_exit_on_error:
+val_down_exit_on_error:
    return ECORE_CALLBACK_CANCEL;
 }
 
@@ -544,13 +544,13 @@ _callbacks_set(Evas_Object *obj)
    Widget_Data *wd = elm_widget_data_get(obj);
 
    edje_object_signal_callback_add(wd->base, "elm,action,up,start",
-                                  "", _signal_val_up_start, obj);
+                                   "", _signal_val_up_start, obj);
    edje_object_signal_callback_add(wd->base, "elm,action,up,stop",
-                                  "", _signal_val_change_stop, obj);
+                                   "", _signal_val_change_stop, obj);
    edje_object_signal_callback_add(wd->base, "elm,action,down,start",
-                                  "", _signal_val_down_start, obj);
+                                   "", _signal_val_down_start, obj);
    edje_object_signal_callback_add(wd->base, "elm,action,down,stop",
-                                  "", _signal_val_change_stop, obj);
+                                   "", _signal_val_change_stop, obj);
 }
 
 /**
@@ -569,7 +569,7 @@ elm_flipselector_add(Evas_Object *parent)
    Widget_Data *wd;
 
    ELM_WIDGET_STANDARD_SETUP(wd, Widget_Data, parent, e, obj, NULL);
-   
+
    ELM_SET_WIDTYPE(widtype, "flipselector");
    elm_widget_type_set(obj, "flipselector");
    elm_widget_sub_object_add(parent, obj);
@@ -675,16 +675,16 @@ elm_flipselector_item_append(Evas_Object *obj, const char *label, void (*func)(v
 
    wd->items = eina_list_append(wd->items, item);
    if (!wd->current) {
-      wd->current = wd->items;
-      _update_view(obj);
+        wd->current = wd->items;
+        _update_view(obj);
    }
 
    if (!wd->sentinel ||
        (strlen(elm_flipselector_item_label_get(item)) >
-       strlen(elm_flipselector_item_label_get(DATA_GET(wd->sentinel)))))
+        strlen(elm_flipselector_item_label_get(DATA_GET(wd->sentinel)))))
      {
-       wd->sentinel = eina_list_last(wd->items);
-       _sizing_eval(obj);
+        wd->sentinel = eina_list_last(wd->items);
+        _sizing_eval(obj);
      }
 
    if (eina_list_count(wd->items) >= 2)
@@ -726,16 +726,16 @@ elm_flipselector_item_prepend(Evas_Object *obj, const char *label, void (*func)(
 
    wd->items = eina_list_prepend(wd->items, item);
    if (!wd->current) {
-      wd->current = wd->items;
-      _update_view(obj);
+        wd->current = wd->items;
+        _update_view(obj);
    }
 
    if (!wd->sentinel ||
        (strlen(elm_flipselector_item_label_get(item)) >
-       strlen(elm_flipselector_item_label_get(DATA_GET(wd->sentinel)))))
+        strlen(elm_flipselector_item_label_get(DATA_GET(wd->sentinel)))))
      {
-       wd->sentinel = wd->items;
-       _sizing_eval(obj);
+        wd->sentinel = wd->items;
+        _sizing_eval(obj);
      }
 
    if (eina_list_count(wd->items) >= 2)
@@ -788,10 +788,10 @@ elm_flipselector_first_item_get(const Evas_Object *obj)
 
    EINA_LIST_FOREACH(wd->items, l, it)
      {
-       if (it->deleted)
-         continue;
+        if (it->deleted)
+          continue;
 
-       return it;
+        return it;
      }
 
    return NULL;
@@ -820,10 +820,10 @@ elm_flipselector_last_item_get(const Evas_Object *obj)
 
    EINA_LIST_REVERSE_FOREACH(wd->items, l, it)
      {
-       if (it->deleted)
-         continue;
+        if (it->deleted)
+          continue;
 
-       return it;
+        return it;
      }
 
    return NULL;
@@ -899,15 +899,15 @@ elm_flipselector_item_selected_set(Elm_Flipselector_Item *item, Eina_Bool select
 
    EINA_LIST_FOREACH(wd->items, l, _item)
      {
-       if (_item == cur)
+        if (_item == cur)
           flipside = MSG_FLIP_DOWN;
 
-       if (_item == item)
-         {
-            wd->current = l;
+        if (_item == item)
+          {
+             wd->current = l;
              _send_msg(wd, flipside, (char *)item->label);
-            break;
-         }
+             break;
+          }
      }
 
    _flipselector_unwalk(wd);
@@ -952,8 +952,8 @@ elm_flipselector_item_del(Elm_Flipselector_Item *item)
 
    if (wd->walking > 0)
      {
-       item->deleted = EINA_TRUE;
-       return;
+        item->deleted = EINA_TRUE;
+        return;
      }
 
    _flipselector_walk(wd);
@@ -987,8 +987,8 @@ elm_flipselector_item_label_get(const Elm_Flipselector_Item *item)
      return NULL;
 
    EINA_LIST_FOREACH(wd->items, l, _item)
-     if (_item == item)
-       return item->label;
+      if (_item == item)
+        return item->label;
 
    return NULL;
 }
@@ -1029,8 +1029,8 @@ elm_flipselector_item_label_set(Elm_Flipselector_Item *item, const char *label)
 
    if (wd->current == l)
      {
-       _update_view(item->base.widget);
-       _sizing_eval(wd->self);
+        _update_view(item->base.widget);
+        _sizing_eval(wd->self);
      }
 
    return;
@@ -1058,13 +1058,13 @@ elm_flipselector_item_prev_get(Elm_Flipselector_Item *item)
      return NULL;
 
    EINA_LIST_FOREACH(wd->items, l, _item)
-     if (_item == item)
-       {
-         l = eina_list_prev(l);
-         if (!l)
-           return NULL;
-         return DATA_GET(l);
-       }
+      if (_item == item)
+        {
+           l = eina_list_prev(l);
+           if (!l)
+             return NULL;
+           return DATA_GET(l);
+        }
 
    return NULL;
 }
@@ -1091,13 +1091,13 @@ elm_flipselector_item_next_get(Elm_Flipselector_Item *item)
      return NULL;
 
    EINA_LIST_FOREACH(wd->items, l, _item)
-     if (_item == item)
-       {
-         l = eina_list_next(l);
-         if (!l)
-           return NULL;
-         return DATA_GET(l);
-       }
+      if (_item == item)
+        {
+           l = eina_list_next(l);
+           if (!l)
+             return NULL;
+           return DATA_GET(l);
+        }
 
    return NULL;
 }
index 61cdb8c..7645178 100644 (file)
@@ -102,10 +102,10 @@ _sub_del(void *data __UNUSED__, Evas_Object *obj, void *event_info)
    if (!wd) return;
    if (sub == wd->content)
      {
-       evas_object_event_callback_del_full(sub, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
+        evas_object_event_callback_del_full(sub, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
                                             _changed_size_hints, obj);
-       wd->content = NULL;
-       _sizing_eval(obj);
+        wd->content = NULL;
+        _sizing_eval(obj);
      }
 }
 
@@ -125,7 +125,7 @@ elm_frame_add(Evas_Object *parent)
    Widget_Data *wd;
 
    ELM_WIDGET_STANDARD_SETUP(wd, Widget_Data, parent, e, obj, NULL);
-   
+
    ELM_SET_WIDTYPE(widtype, "frame");
    elm_widget_type_set(obj, "frame");
    elm_widget_sub_object_add(parent, obj);
@@ -206,10 +206,10 @@ elm_frame_content_set(Evas_Object *obj, Evas_Object *content)
    wd->content = content;
    if (content)
      {
-       elm_widget_sub_object_add(obj, content);
-       evas_object_event_callback_add(content, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
-                                      _changed_size_hints, obj);
-       edje_object_part_swallow(wd->frm, "elm.swallow.content", content);
+        elm_widget_sub_object_add(obj, content);
+        evas_object_event_callback_add(content, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
+                                       _changed_size_hints, obj);
+        edje_object_part_swallow(wd->frm, "elm.swallow.content", content);
      }
    _sizing_eval(obj);
 }
index 2a262be..d00beaa 100644 (file)
@@ -12,8 +12,8 @@
  *
  * Signals that you can add callbacks for are:
  *
- * clicked - The user has double-clicked or pressed enter on 
- * a item. The event_infoparameter is the Gengrid item 
+ * clicked - The user has double-clicked or pressed enter on
+ * a item. The event_infoparameter is the Gengrid item
  * that was double-clicked.
  *
  * selected - The user has made an item selected. The event_info
  *  * Handle non-homogeneous objects too.
  */
 
-typedef struct _Widget_Data Widget_Data;
-typedef struct _Pan         Pan;
+ typedef struct _Widget_Data Widget_Data;
+ typedef struct _Pan         Pan;
 
 #define PRELOAD 1
 
-struct _Elm_Gengrid_Item
+ struct _Elm_Gengrid_Item
 {
    Elm_Widget_Item               base;
    EINA_INLIST;
@@ -171,22 +171,22 @@ struct _Elm_Gengrid_Item
    Widget_Data                  *wd;
    Eina_List                    *labels, *icons, *states, *icon_objs;
    struct
-   {
-      Evas_Smart_Cb func;
-      const void   *data;
-   } func;
+     {
+        Evas_Smart_Cb func;
+        const void   *data;
+     } func;
 
    Evas_Coord x, y, dx, dy;
    int        relcount;
    int        walking;
 
    struct
-   {
-      const void                 *data;
-      Elm_Tooltip_Item_Content_Cb content_cb;
-      Evas_Smart_Cb               del_cb;
-      const char                 *style;
-   } tooltip;
+     {
+        const void                 *data;
+        Elm_Tooltip_Item_Content_Cb content_cb;
+        Evas_Smart_Cb               del_cb;
+        const char                 *style;
+     } tooltip;
 
    const char *mouse_cursor;
 
@@ -230,7 +230,7 @@ struct _Widget_Data
 };
 
 #define ELM_GENGRID_ITEM_FROM_INLIST(item) \
-  ((item) ? EINA_INLIST_CONTAINER_GET(item, Elm_Gengrid_Item) : NULL)
+   ((item) ? EINA_INLIST_CONTAINER_GET(item, Elm_Gengrid_Item) : NULL)
 
 struct _Pan
 {
@@ -796,7 +796,7 @@ _mouse_move(void        *data,
                {
                   if (dx < 0)
                     evas_object_smart_callback_call(item->wd->self,
-                          left_drag, item);
+                                                    left_drag, item);
                }
           }
         else
@@ -808,10 +808,10 @@ _mouse_move(void        *data,
                {
                   if (dx < 0)
                     evas_object_smart_callback_call(item->wd->self,
-                                                   left_drag, item);
+                                                    left_drag, item);
                   else
                     evas_object_smart_callback_call(item->wd->self,
-                          right_drag, item);
+                                                    right_drag, item);
                }
           }
      }
@@ -925,7 +925,7 @@ _mouse_up(void            *data,
              Elm_Gengrid_Item *item2;
 
              EINA_LIST_FOREACH_SAFE(item->wd->selected, l, l_next, item2)
-               if (item2 != item) _item_unselect(item2);
+                if (item2 != item) _item_unselect(item2);
           }
         _item_hilight(item);
         _item_select(item);
@@ -958,7 +958,7 @@ _item_realize(Elm_Gengrid_Item *item)
    _elm_theme_object_set(item->wd->self, item->base.view, "gengrid", style,
                          elm_widget_style_get(item->wd->self));
    item->spacer =
-       evas_object_rectangle_add(evas_object_evas_get(item->wd->self));
+      evas_object_rectangle_add(evas_object_evas_get(item->wd->self));
    evas_object_color_set(item->spacer, 0, 0, 0, 0);
    elm_widget_sub_object_add(item->wd->self, item->spacer);
    evas_object_size_hint_min_set(item->spacer, 2 * _elm_config->scale, 1);
@@ -970,12 +970,12 @@ _item_realize(Elm_Gengrid_Item *item)
         const char *key;
 
         item->labels =
-            elm_widget_stringlist_get(edje_object_data_get(item->base.view,
-                                                           "labels"));
+           elm_widget_stringlist_get(edje_object_data_get(item->base.view,
+                                                          "labels"));
         EINA_LIST_FOREACH(item->labels, l, key)
           {
              char *s = item->gic->func.label_get
-                 ((void *)item->base.data, item->wd->self, l->data);
+                ((void *)item->base.data, item->wd->self, l->data);
              if (s)
                {
                   edje_object_part_text_set(item->base.view, l->data, s);
@@ -990,12 +990,12 @@ _item_realize(Elm_Gengrid_Item *item)
         const char *key;
 
         item->icons =
-            elm_widget_stringlist_get(edje_object_data_get(item->base.view,
-                                                           "icons"));
+           elm_widget_stringlist_get(edje_object_data_get(item->base.view,
+                                                          "icons"));
         EINA_LIST_FOREACH(item->icons, l, key)
           {
              Evas_Object *ic = item->gic->func.icon_get
-                 ((void *)item->base.data, item->wd->self, l->data);
+                ((void *)item->base.data, item->wd->self, l->data);
              if (ic)
                {
                   item->icon_objs = eina_list_append(item->icon_objs, ic);
@@ -1012,12 +1012,12 @@ _item_realize(Elm_Gengrid_Item *item)
         const char *key;
 
         item->states =
-            elm_widget_stringlist_get(edje_object_data_get(item->base.view,
-                                                           "states"));
+           elm_widget_stringlist_get(edje_object_data_get(item->base.view,
+                                                          "states"));
         EINA_LIST_FOREACH(item->states, l, key)
           {
              Eina_Bool on = item->gic->func.state_get
-                 ((void *)item->base.data, item->wd->self, l->data);
+                ((void *)item->base.data, item->wd->self, l->data);
              if (on)
                {
                   snprintf(buf, sizeof(buf), "elm,state,%s,active", key);
@@ -1089,7 +1089,7 @@ _item_unrealize(Elm_Gengrid_Item *item)
    item->states = NULL;
 
    EINA_LIST_FREE(item->icon_objs, icon)
-     evas_object_del(icon);
+      evas_object_del(icon);
 
    item->realized = EINA_FALSE;
    item->want_unrealize = EINA_FALSE;
@@ -1431,19 +1431,19 @@ _pan_calculate(Evas_Object *obj)
    if (!sd->wd->nmax) return;
 
    EINA_INLIST_FOREACH(sd->wd->items, item)
-   {
-      _item_place(item, cx, cy);
-      if (sd->wd->horizontal)
-        {
-           cy = (cy + 1) % sd->wd->nmax;
-           if (!cy) cx++;
-        }
-      else
-        {
-           cx = (cx + 1) % sd->wd->nmax;
-           if (!cx) cy++;
-        }
-   }
+     {
+        _item_place(item, cx, cy);
+        if (sd->wd->horizontal)
+          {
+             cy = (cy + 1) % sd->wd->nmax;
+             if (!cy) cx++;
+          }
+        else
+          {
+             cx = (cx + 1) % sd->wd->nmax;
+             if (!cx) cy++;
+          }
+     }
    evas_object_smart_callback_call(sd->wd->self, "changed", NULL);
 }
 
@@ -1546,7 +1546,7 @@ elm_gengrid_add(Evas_Object *parent)
    Eina_Bool bounce = _elm_config->thumbscroll_bounce_enable;
 
    ELM_WIDGET_STANDARD_SETUP(wd, Widget_Data, parent, e, obj, NULL);
-   
+
    ELM_SET_WIDTYPE(widtype, "gengrid");
    elm_widget_type_set(obj, "gengrid");
    elm_widget_sub_object_add(parent, obj);
@@ -1831,7 +1831,7 @@ elm_gengrid_item_insert_before(Evas_Object                  *obj,
    item = _item_create(wd, gic, data, func, func_data);
    if (!item) return NULL;
    wd->items = eina_inlist_prepend_relative
-       (wd->items, EINA_INLIST_GET(item), EINA_INLIST_GET(relative));
+      (wd->items, EINA_INLIST_GET(item), EINA_INLIST_GET(relative));
 
    if (wd->calc_job) ecore_job_del(wd->calc_job);
    wd->calc_job = ecore_job_add(_calc_job, wd);
@@ -1876,7 +1876,7 @@ elm_gengrid_item_insert_after(Evas_Object                  *obj,
    item = _item_create(wd, gic, data, func, func_data);
    if (!item) return NULL;
    wd->items = eina_inlist_append_relative
-       (wd->items, EINA_INLIST_GET(item), EINA_INLIST_GET(relative));
+      (wd->items, EINA_INLIST_GET(item), EINA_INLIST_GET(relative));
 
    if (wd->calc_job) ecore_job_del(wd->calc_job);
    wd->calc_job = ecore_job_add(_calc_job, wd);
@@ -1965,7 +1965,7 @@ elm_gengrid_clear(Evas_Object *obj)
         Elm_Gengrid_Item *item;
         wd->clear_me = 1;
         EINA_INLIST_FOREACH(wd->items, item)
-        item->delete_me = 1;
+           item->delete_me = 1;
         return;
      }
    wd->clear_me = 0;
index 868aaf0..22638f1 100644 (file)
@@ -369,10 +369,10 @@ struct _Elm_Genlist_Item
    Elm_Genlist_Item             *group_item;
    Elm_Genlist_Item_Flags        flags;
    struct
-   {
-      Evas_Smart_Cb func;
-      const void   *data;
-   } func;
+     {
+        Evas_Smart_Cb func;
+        const void   *data;
+     } func;
 
    Evas_Object      *spacer;
    Eina_List        *labels, *icons, *states, *icon_objs;
@@ -384,12 +384,12 @@ struct _Elm_Genlist_Item
    Elm_Genlist_Item *rel;
 
    struct
-   {
-      const void                 *data;
-      Elm_Tooltip_Item_Content_Cb content_cb;
-      Evas_Smart_Cb               del_cb;
-      const char                 *style;
-   } tooltip;
+     {
+        const void                 *data;
+        Elm_Tooltip_Item_Content_Cb content_cb;
+        Evas_Smart_Cb               del_cb;
+        const char                 *style;
+     } tooltip;
 
    const char *mouse_cursor;
 
@@ -435,7 +435,7 @@ struct _Item_Cache
 };
 
 #define ELM_GENLIST_ITEM_FROM_INLIST(item) \
-  ((item) ? EINA_INLIST_CONTAINER_GET(item, Elm_Genlist_Item) : NULL)
+   ((item) ? EINA_INLIST_CONTAINER_GET(item, Elm_Genlist_Item) : NULL)
 
 struct _Pan
 {
@@ -749,7 +749,7 @@ _theme_hook(Evas_Object *obj)
    _mirrored_set(obj, elm_widget_mirrored_get(obj));
    elm_smart_scroller_object_theme_set(obj, wd->scr, "genlist", "base",
                                        elm_widget_style_get(obj));
-//   edje_object_scale_set(wd->scr, elm_widget_scale_get(obj) * _elm_config->scale);
+   //   edje_object_scale_set(wd->scr, elm_widget_scale_get(obj) * _elm_config->scale);
    wd->item_width = wd->item_height = 0;
    wd->group_item_width = wd->group_item_height = 0;
    wd->minw = wd->minh = wd->realminw = 0;
@@ -760,7 +760,7 @@ _theme_hook(Evas_Object *obj)
 
         if (itb->realized) _item_block_unrealize(itb);
         EINA_LIST_FOREACH(itb->items, l, it)
-          it->mincalcd = EINA_FALSE;
+           it->mincalcd = EINA_FALSE;
 
         itb->changed = EINA_TRUE;
      }
@@ -821,7 +821,7 @@ _sizing_eval(Evas_Object *obj)
         else if ((maxw > 0) && (vw > maxw))
           vw = maxw;
         edje_object_size_min_calc
-          (elm_smart_scroller_edje_object_get(wd->scr), &vmw, &vmh);
+           (elm_smart_scroller_edje_object_get(wd->scr), &vmw, &vmh);
         minw = vmw + minw;
      }
    else
@@ -829,7 +829,7 @@ _sizing_eval(Evas_Object *obj)
         Evas_Coord vmw, vmh;
 
         edje_object_size_min_calc
-          (elm_smart_scroller_edje_object_get(wd->scr), &vmw, &vmh);
+           (elm_smart_scroller_edje_object_get(wd->scr), &vmw, &vmh);
         minw = vmw;
         minh = vmh;
      }
@@ -911,7 +911,7 @@ _item_block_del(Elm_Genlist_Item *it)
                        itbn->changed = EINA_TRUE;
                     }
                   it->wd->blocks =
-                    eina_inlist_remove(it->wd->blocks, EINA_INLIST_GET(itb));
+                     eina_inlist_remove(it->wd->blocks, EINA_INLIST_GET(itb));
                   free(itb);
                }
           }
@@ -1449,7 +1449,7 @@ _mouse_up(void            *data,
              Elm_Genlist_Item *it2;
 
              EINA_LIST_FOREACH_SAFE(it->wd->selected, l, l_next, it2)
-               if (it2 != it) _item_unselect(it2);
+                if (it2 != it) _item_unselect(it2);
              //_item_highlight(it);
              //_item_select(it);
           }
@@ -1673,7 +1673,7 @@ _item_realize(Elm_Genlist_Item *it,
         edje_object_mirrored_set(it->base.view,
                                  elm_widget_mirrored_get(it->base.widget));
         it->spacer =
-          evas_object_rectangle_add(evas_object_evas_get(it->base.widget));
+           evas_object_rectangle_add(evas_object_evas_get(it->base.widget));
         evas_object_color_set(it->spacer, 0, 0, 0, 0);
         elm_widget_sub_object_add(it->base.widget, it->spacer);
      }
@@ -1776,12 +1776,12 @@ _item_realize(Elm_Genlist_Item *it,
              const char *key;
 
              it->labels =
-               elm_widget_stringlist_get(edje_object_data_get(it->base.view,
-                                                              "labels"));
+                elm_widget_stringlist_get(edje_object_data_get(it->base.view,
+                                                               "labels"));
              EINA_LIST_FOREACH(it->labels, l, key)
                {
                   char *s = it->itc->func.label_get
-                      ((void *)it->base.data, it->base.widget, l->data);
+                     ((void *)it->base.data, it->base.widget, l->data);
 
                   if (s)
                     {
@@ -1798,12 +1798,12 @@ _item_realize(Elm_Genlist_Item *it,
              const char *key;
 
              it->icons =
-               elm_widget_stringlist_get(edje_object_data_get(it->base.view,
-                                                              "icons"));
+                elm_widget_stringlist_get(edje_object_data_get(it->base.view,
+                                                               "icons"));
              EINA_LIST_FOREACH(it->icons, l, key)
                {
                   Evas_Object *ic = it->itc->func.icon_get
-                      ((void *)it->base.data, it->base.widget, l->data);
+                     ((void *)it->base.data, it->base.widget, l->data);
 
                   if (ic)
                     {
@@ -1820,12 +1820,12 @@ _item_realize(Elm_Genlist_Item *it,
              const char *key;
 
              it->states =
-               elm_widget_stringlist_get(edje_object_data_get(it->base.view,
-                                                              "states"));
+                elm_widget_stringlist_get(edje_object_data_get(it->base.view,
+                                                               "states"));
              EINA_LIST_FOREACH(it->states, l, key)
                {
                   Eina_Bool on = it->itc->func.state_get
-                      ((void *)it->base.data, it->base.widget, l->data);
+                     ((void *)it->base.data, it->base.widget, l->data);
 
                   if (on)
                     {
@@ -1857,10 +1857,10 @@ _item_realize(Elm_Genlist_Item *it,
              it->mincalcd = EINA_TRUE;
 
              if ((!it->wd->group_item_width) && (it->flags == ELM_GENLIST_ITEM_GROUP))
-               {
-                  it->wd->group_item_width = mw;
-                  it->wd->group_item_height = mh;
-               }
+               {
+                  it->wd->group_item_width = mw;
+                  it->wd->group_item_height = mh;
+               }
              else if ((!it->wd->item_width) && (it->flags == ELM_GENLIST_ITEM_NONE))
                {
                   it->wd->item_width = mw;
@@ -1919,7 +1919,7 @@ _item_unrealize(Elm_Genlist_Item *it)
    elm_widget_stringlist_free(it->states);
 
    EINA_LIST_FREE(it->icon_objs, icon)
-     evas_object_del(icon);
+      evas_object_del(icon);
 
    it->states = NULL;
    it->realized = EINA_FALSE;
@@ -2143,7 +2143,7 @@ _calc_job(void *data)
    if (wd->w != ow)
      {
         wd->w = ow;
-//        if (wd->height_for_width) changed = EINA_TRUE;
+        //        if (wd->height_for_width) changed = EINA_TRUE;
      }
 
    EINA_INLIST_FOREACH(wd->blocks, itb)
@@ -2165,7 +2165,7 @@ _calc_job(void *data)
                   Eina_List *l;
                   Elm_Genlist_Item *it;
                   EINA_LIST_FOREACH(itb->items, l, it)
-                    if (it->mincalcd) it->mincalcd = EINA_FALSE;
+                     if (it->mincalcd) it->mincalcd = EINA_FALSE;
                   itb->changed = EINA_TRUE;
                   if (itb->must_recalc) did_must_recalc = EINA_TRUE;
                   itb->must_recalc = EINA_FALSE;
@@ -2327,16 +2327,16 @@ _pan_set(Evas_Object *obj,
    Pan *sd = evas_object_smart_data_get(obj);
    Item_Block *itb;
 
-//   Evas_Coord ow, oh;
-//   evas_object_geometry_get(obj, NULL, NULL, &ow, &oh);
-//   ow = sd->wd->minw - ow;
-//   if (ow < 0) ow = 0;
-//   oh = sd->wd->minh - oh;
-//   if (oh < 0) oh = 0;
-//   if (x < 0) x = 0;
-//   if (y < 0) y = 0;
-//   if (x > ow) x = ow;
-//   if (y > oh) y = oh;
+   //   Evas_Coord ow, oh;
+   //   evas_object_geometry_get(obj, NULL, NULL, &ow, &oh);
+   //   ow = sd->wd->minw - ow;
+   //   if (ow < 0) ow = 0;
+   //   oh = sd->wd->minh - oh;
+   //   if (oh < 0) oh = 0;
+   //   if (x < 0) x = 0;
+   //   if (y < 0) y = 0;
+   //   if (x > ow) x = ow;
+   //   if (y > oh) y = oh;
    if ((x == sd->wd->pan_x) && (y == sd->wd->pan_y)) return;
    sd->wd->pan_x = x;
    sd->wd->pan_y = y;
@@ -2623,9 +2623,9 @@ elm_genlist_add(Evas_Object *parent)
         sc.calculate = _pan_calculate;
         if (!(smart = evas_smart_class_new(&sc))) return NULL;
      }
-   
+
    ELM_WIDGET_STANDARD_SETUP(wd, Widget_Data, parent, e, obj, NULL);
-   
+
    ELM_SET_WIDTYPE(widtype, "genlist");
    elm_widget_type_set(obj, "genlist");
    elm_widget_sub_object_add(parent, obj);
@@ -2723,7 +2723,7 @@ newblock:
              if (!it->rel->block)
                {
                   wd->blocks =
-                    eina_inlist_append(wd->blocks, EINA_INLIST_GET(itb));
+                     eina_inlist_append(wd->blocks, EINA_INLIST_GET(itb));
                   itb->items = eina_list_append(itb->items, it);
                }
              else
@@ -2731,18 +2731,18 @@ newblock:
                   if (it->before)
                     {
                        wd->blocks = eina_inlist_prepend_relative
-                           (wd->blocks, EINA_INLIST_GET(itb),
+                          (wd->blocks, EINA_INLIST_GET(itb),
                            EINA_INLIST_GET(it->rel->block));
                        itb->items =
-                         eina_list_prepend_relative(itb->items, it, it->rel);
+                          eina_list_prepend_relative(itb->items, it, it->rel);
                     }
                   else
                     {
                        wd->blocks = eina_inlist_append_relative
-                           (wd->blocks, EINA_INLIST_GET(itb),
+                          (wd->blocks, EINA_INLIST_GET(itb),
                            EINA_INLIST_GET(it->rel->block));
                        itb->items =
-                         eina_list_append_relative(itb->items, it, it->rel);
+                          eina_list_append_relative(itb->items, it, it->rel);
                     }
                }
           }
@@ -2759,8 +2759,8 @@ newblock:
                             if (!itb) return;
                             itb->wd = wd;
                             wd->blocks =
-                              eina_inlist_prepend(wd->blocks,
-                                                  EINA_INLIST_GET(itb));
+                               eina_inlist_prepend(wd->blocks,
+                                                   EINA_INLIST_GET(itb));
                          }
                     }
                   else
@@ -2769,7 +2769,7 @@ newblock:
                        if (!itb) return;
                        itb->wd = wd;
                        wd->blocks =
-                         eina_inlist_prepend(wd->blocks, EINA_INLIST_GET(itb));
+                          eina_inlist_prepend(wd->blocks, EINA_INLIST_GET(itb));
                     }
                   itb->items = eina_list_prepend(itb->items, it);
                }
@@ -2784,8 +2784,8 @@ newblock:
                             if (!itb) return;
                             itb->wd = wd;
                             wd->blocks =
-                              eina_inlist_append(wd->blocks,
-                                                 EINA_INLIST_GET(itb));
+                               eina_inlist_append(wd->blocks,
+                                                  EINA_INLIST_GET(itb));
                          }
                     }
                   else
@@ -2794,7 +2794,7 @@ newblock:
                        if (!itb) return;
                        itb->wd = wd;
                        wd->blocks =
-                         eina_inlist_append(wd->blocks, EINA_INLIST_GET(itb));
+                          eina_inlist_append(wd->blocks, EINA_INLIST_GET(itb));
                     }
                   itb->items = eina_list_append(itb->items, it);
                }
@@ -2832,8 +2832,8 @@ newblock:
         if (!itb2) return;
         itb2->wd = wd;
         wd->blocks =
-          eina_inlist_append_relative(wd->blocks, EINA_INLIST_GET(itb2),
-                                      EINA_INLIST_GET(itb));
+           eina_inlist_append_relative(wd->blocks, EINA_INLIST_GET(itb2),
+                                       EINA_INLIST_GET(itb));
         itb2->changed = EINA_TRUE;
         while ((itb->count > newc) && (itb->items))
           {
@@ -2976,8 +2976,8 @@ elm_genlist_item_append(Evas_Object                  *obj,
         it->parent->items = eina_list_append(it->parent->items, it);
         if (!it2) it2 = it->parent;
         wd->items =
-          eina_inlist_append_relative(wd->items, EINA_INLIST_GET(it),
-                                      EINA_INLIST_GET(it2));
+           eina_inlist_append_relative(wd->items, EINA_INLIST_GET(it),
+                                       EINA_INLIST_GET(it2));
         it->rel = it2;
         it->rel->relcount++;
 
@@ -3038,8 +3038,8 @@ elm_genlist_item_prepend(Evas_Object                  *obj,
         it->parent->items = eina_list_prepend(it->parent->items, it);
         if (!it2) it2 = it->parent;
         wd->items =
-          eina_inlist_prepend_relative(wd->items, EINA_INLIST_GET(it),
-                                       EINA_INLIST_GET(it2));
+           eina_inlist_prepend_relative(wd->items, EINA_INLIST_GET(it),
+                                        EINA_INLIST_GET(it2));
         it->rel = it2;
         it->rel->relcount++;
      }
@@ -3179,7 +3179,7 @@ elm_genlist_clear(Evas_Object *obj)
              wd->anchor_item = ELM_GENLIST_ITEM_FROM_INLIST(EINA_INLIST_GET(it)->next);
              if (!wd->anchor_item)
                wd->anchor_item =
-                 ELM_GENLIST_ITEM_FROM_INLIST(EINA_INLIST_GET(it)->prev);
+                  ELM_GENLIST_ITEM_FROM_INLIST(EINA_INLIST_GET(it)->prev);
           }
         wd->items = eina_inlist_remove(wd->items, wd->items);
         if (it->flags & ELM_GENLIST_ITEM_GROUP)
@@ -3583,9 +3583,9 @@ elm_genlist_item_subitems_clear(Elm_Genlist_Item *it)
    Elm_Genlist_Item *it2;
 
    EINA_LIST_FOREACH(it->items, l, it2)
-     tl = eina_list_append(tl, it2);
+      tl = eina_list_append(tl, it2);
    EINA_LIST_FREE(tl, it2)
-     elm_genlist_item_del(it2);
+      elm_genlist_item_del(it2);
 }
 
 /**
index ec51c4c..638a734 100644 (file)
@@ -80,9 +80,9 @@ static void _elm_hover_sub_obj_placement_eval(Evas_Object *obj);
 static const char SIG_CLICKED[] = "clicked";
 static const char SIG_SMART_LOCATION_CHANGED[] = "smart,changed";
 static const Evas_Smart_Cb_Description _signals[] = {
-  {SIG_CLICKED, ""},
-  {SIG_SMART_LOCATION_CHANGED, ""},
-  {NULL, NULL}
+       {SIG_CLICKED, ""},
+       {SIG_SMART_LOCATION_CHANGED, ""},
+       {NULL, NULL}
 };
 
 static void
@@ -117,13 +117,13 @@ _on_focus_hook(void *data __UNUSED__, Evas_Object *obj)
    if (!wd) return;
    if (elm_widget_focus_get(obj))
      {
-       edje_object_signal_emit(wd->cov, "elm,action,focus", "elm");
-       evas_object_focus_set(wd->cov, EINA_TRUE);
+        edje_object_signal_emit(wd->cov, "elm,action,focus", "elm");
+        evas_object_focus_set(wd->cov, EINA_TRUE);
      }
    else
      {
-       edje_object_signal_emit(wd->cov, "elm,action,unfocus", "elm");
-       evas_object_focus_set(wd->cov, EINA_FALSE);
+        edje_object_signal_emit(wd->cov, "elm,action,unfocus", "elm");
+        evas_object_focus_set(wd->cov, EINA_FALSE);
      }
 }
 
@@ -148,9 +148,9 @@ _theme_hook(Evas_Object *obj)
                          _elm_config->scale);
 
    if (wd->smt_sub)
-      _elm_hover_sub_obj_placement_eval(obj);
+     _elm_hover_sub_obj_placement_eval(obj);
    else
-      _reval_content(obj);
+     _reval_content(obj);
    _sizing_eval(obj);
    if (evas_object_visible_get(wd->cov)) _hov_show_do(obj);
 }
@@ -333,7 +333,7 @@ _sub_del(void *data __UNUSED__, Evas_Object *obj, void *event_info)
    if (wd->smt_sub)
      {
         if (wd->smt_sub == sub)
-           wd->smt_sub = NULL;
+          wd->smt_sub = NULL;
      }
    else
      {
@@ -357,20 +357,20 @@ _hov_show_do(Evas_Object *obj)
 
    if (wd->cov)
      {
-       evas_object_show(wd->cov);
-       edje_object_signal_emit(wd->cov, "elm,action,show", "elm");
+        evas_object_show(wd->cov);
+        edje_object_signal_emit(wd->cov, "elm,action,show", "elm");
      }
 
    ELM_HOVER_PARTS_FOREACH
      {
-       char buf[1024];
-
-       if (wd->subs[i].obj)
-         {
-            snprintf(buf, sizeof(buf), "elm,action,slot,%s,show",
-                     wd->subs[i].swallow);
-            edje_object_signal_emit(wd->cov, buf, "elm");
-         }
+        char buf[1024];
+
+        if (wd->subs[i].obj)
+          {
+             snprintf(buf, sizeof(buf), "elm,action,slot,%s,show",
+                      wd->subs[i].swallow);
+             edje_object_signal_emit(wd->cov, buf, "elm");
+          }
      }
 }
 
@@ -399,20 +399,20 @@ _hov_hide(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *eve
    if (!wd) return;
    if (wd->cov)
      {
-       edje_object_signal_emit(wd->cov, "elm,action,hide", "elm");
-       evas_object_hide(wd->cov);
+        edje_object_signal_emit(wd->cov, "elm,action,hide", "elm");
+        evas_object_hide(wd->cov);
      }
 
    ELM_HOVER_PARTS_FOREACH
      {
-       char buf[1024];
-
-       if (wd->subs[i].obj)
-         {
-            snprintf(buf, sizeof(buf), "elm,action,slot,%s,hide",
-                     wd->subs[i].swallow);
-            edje_object_signal_emit(wd->cov, buf, "elm");
-         }
+        char buf[1024];
+
+        if (wd->subs[i].obj)
+          {
+             snprintf(buf, sizeof(buf), "elm,action,slot,%s,hide",
+                      wd->subs[i].swallow);
+             edje_object_signal_emit(wd->cov, buf, "elm");
+          }
      }
 }
 
@@ -494,7 +494,7 @@ elm_hover_add(Evas_Object *parent)
    Widget_Data *wd;
 
    ELM_WIDGET_STANDARD_SETUP(wd, Widget_Data, parent, e, obj, NULL);
-   
+
    ELM_SET_WIDTYPE(widtype, "hover");
    elm_widget_type_set(obj, "hover");
    elm_widget_sub_object_add(parent, obj);
@@ -509,8 +509,8 @@ elm_hover_add(Evas_Object *parent)
    elm_widget_signal_callback_del_hook_set(obj, _signal_callback_del_hook);
 
    ELM_HOVER_PARTS_FOREACH
-     wd->subs[i].swallow = _directions[i];
-   
+      wd->subs[i].swallow = _directions[i];
+
    wd->hov = evas_object_rectangle_add(e);
    evas_object_pass_events_set(wd->hov, EINA_TRUE);
    evas_object_color_set(wd->hov, 0, 0, 0, 0);
@@ -574,12 +574,12 @@ elm_hover_target_set(Evas_Object *obj, Evas_Object *target)
    wd->target = target;
    if (wd->target)
      {
-       evas_object_event_callback_add(wd->target, EVAS_CALLBACK_DEL,
+        evas_object_event_callback_add(wd->target, EVAS_CALLBACK_DEL,
                                        _target_del, obj);
-       evas_object_event_callback_add(wd->target, EVAS_CALLBACK_MOVE,
+        evas_object_event_callback_add(wd->target, EVAS_CALLBACK_MOVE,
                                        _target_move, obj);
-       elm_widget_hover_object_set(target, obj);
-       _sizing_eval(obj);
+        elm_widget_hover_object_set(target, obj);
+        _sizing_eval(obj);
      }
 }
 
@@ -600,31 +600,31 @@ elm_hover_parent_set(Evas_Object *obj, Evas_Object *parent)
    if (!wd) return;
    if (wd->parent)
      {
-       evas_object_event_callback_del_full(wd->parent, EVAS_CALLBACK_MOVE,
-                                       _parent_move, obj);
-       evas_object_event_callback_del_full(wd->parent, EVAS_CALLBACK_RESIZE,
-                                       _parent_resize, obj);
-       evas_object_event_callback_del_full(wd->parent, EVAS_CALLBACK_SHOW,
-                                       _parent_show, obj);
-       evas_object_event_callback_del_full(wd->parent, EVAS_CALLBACK_HIDE,
-                                       _parent_hide, obj);
-       evas_object_event_callback_del_full(wd->parent, EVAS_CALLBACK_DEL,
-                                       _parent_del, obj);
+        evas_object_event_callback_del_full(wd->parent, EVAS_CALLBACK_MOVE,
+                                            _parent_move, obj);
+        evas_object_event_callback_del_full(wd->parent, EVAS_CALLBACK_RESIZE,
+                                            _parent_resize, obj);
+        evas_object_event_callback_del_full(wd->parent, EVAS_CALLBACK_SHOW,
+                                            _parent_show, obj);
+        evas_object_event_callback_del_full(wd->parent, EVAS_CALLBACK_HIDE,
+                                            _parent_hide, obj);
+        evas_object_event_callback_del_full(wd->parent, EVAS_CALLBACK_DEL,
+                                            _parent_del, obj);
      }
    wd->parent = parent;
    if (wd->parent)
      {
-       evas_object_event_callback_add(wd->parent, EVAS_CALLBACK_MOVE,
+        evas_object_event_callback_add(wd->parent, EVAS_CALLBACK_MOVE,
                                        _parent_move, obj);
-       evas_object_event_callback_add(wd->parent, EVAS_CALLBACK_RESIZE,
+        evas_object_event_callback_add(wd->parent, EVAS_CALLBACK_RESIZE,
                                        _parent_resize, obj);
-       evas_object_event_callback_add(wd->parent, EVAS_CALLBACK_SHOW,
+        evas_object_event_callback_add(wd->parent, EVAS_CALLBACK_SHOW,
                                        _parent_show, obj);
-       evas_object_event_callback_add(wd->parent, EVAS_CALLBACK_HIDE,
+        evas_object_event_callback_add(wd->parent, EVAS_CALLBACK_HIDE,
                                        _parent_hide, obj);
-       evas_object_event_callback_add(wd->parent, EVAS_CALLBACK_DEL,
+        evas_object_event_callback_add(wd->parent, EVAS_CALLBACK_DEL,
                                        _parent_del, obj);
-//     elm_widget_sub_object_add(parent, obj);
+        //     elm_widget_sub_object_add(parent, obj);
      }
    _sizing_eval(obj);
 }
@@ -670,11 +670,11 @@ _elm_hover_subs_del(Widget_Data *wd)
 {
    ELM_HOVER_PARTS_FOREACH
      {
-       if (wd->subs[i].obj)
-         {
+        if (wd->subs[i].obj)
+          {
              evas_object_del(wd->subs[i].obj);
              wd->subs[i].obj = NULL;
-         }
+          }
      }
 }
 
@@ -796,11 +796,11 @@ elm_hover_content_set(Evas_Object *obj, const char *swallow, Evas_Object *conten
 
    ELM_HOVER_PARTS_FOREACH
      {
-       if (!strcmp(swallow, wd->subs[i].swallow))
-         {
-            if (content == wd->subs[i].obj)
+        if (!strcmp(swallow, wd->subs[i].swallow))
+          {
+             if (content == wd->subs[i].obj)
                return;
-            evas_object_del(wd->subs[i].obj);
+             evas_object_del(wd->subs[i].obj);
              wd->subs[i].obj = NULL;
 
              if (content)
@@ -812,11 +812,11 @@ elm_hover_content_set(Evas_Object *obj, const char *swallow, Evas_Object *conten
                   edje_object_part_swallow(wd->cov, buf, content);
                   wd->subs[i].obj = content;
                }
-            break;
-         }
+             break;
+          }
      }
 
- end:
+end:
    _sizing_eval(obj);
 }
 
@@ -849,8 +849,8 @@ elm_hover_content_get(const Evas_Object *obj, const char *swallow)
      return wd->smt_sub;
 
    ELM_HOVER_PARTS_FOREACH
-     if (!strcmp(swallow, wd->subs[i].swallow))
-       return wd->subs[i].obj;
+      if (!strcmp(swallow, wd->subs[i].swallow))
+        return wd->subs[i].obj;
 
    return NULL;
 }
@@ -909,20 +909,20 @@ elm_hover_content_unset(Evas_Object *obj, const char *swallow)
 
    ELM_HOVER_PARTS_FOREACH
      {
-       if (!strcmp(swallow, wd->subs[i].swallow))
-         {
-            Evas_Object *content;
+        if (!strcmp(swallow, wd->subs[i].swallow))
+          {
+             Evas_Object *content;
 
-            if (!wd->subs[i].obj)
+             if (!wd->subs[i].obj)
                return NULL;
 
-            content = wd->subs[i].obj;
-            elm_widget_sub_object_del(obj, wd->subs[i].obj);
-            edje_object_part_unswallow(wd->cov, wd->subs[i].obj);
-            wd->subs[i].obj = NULL;
+             content = wd->subs[i].obj;
+             elm_widget_sub_object_del(obj, wd->subs[i].obj);
+             edje_object_part_unswallow(wd->cov, wd->subs[i].obj);
+             wd->subs[i].obj = NULL;
 
-            return content;
-         }
+             return content;
+          }
      }
 
    return NULL;
@@ -964,13 +964,13 @@ elm_hover_best_content_location_get(const Evas_Object *obj, Elm_Hover_Axis pref_
 
    if (pref_axis == ELM_HOVER_AXIS_HORIZONTAL)
      {
-       if (spc_l < spc_r) return _HOV_RIGHT;
-       else return _HOV_LEFT;
+        if (spc_l < spc_r) return _HOV_RIGHT;
+        else return _HOV_LEFT;
      }
    else if (pref_axis == ELM_HOVER_AXIS_VERTICAL)
      {
-       if (spc_t < spc_b) return _HOV_BOTTOM;
-       else return _HOV_TOP;
+        if (spc_t < spc_b) return _HOV_BOTTOM;
+        else return _HOV_TOP;
      }
 
    if (spc_l < spc_r)
index 2b1c0d3..3ef9e74 100644 (file)
@@ -28,8 +28,8 @@ struct _Widget_Data
    Elm_Icon_Lookup_Order lookup_order;
 #ifdef ELM_EFREET
    struct {
-      int requested_size;
-      Eina_Bool use : 1;
+        int requested_size;
+        Eina_Bool use : 1;
    } freedesktop;
 #endif
    Eina_Bool scale_up : 1;
@@ -133,8 +133,8 @@ _sizing_eval(Evas_Object *obj)
         /* This icon has been set to a freedesktop icon, and the requested
            appears to have a different size than the requested size, so try to
            request another, higher resolution, icon.
-           FIXME: Find a better heuristic to determine if there should be
-           an icon with a different resolution. */
+FIXME: Find a better heuristic to determine if there should be
+an icon with a different resolution. */
         _icon_freedesktop_set(wd, obj, wd->stdicon, w);
      }
 #endif
@@ -145,19 +145,19 @@ _sizing_eval(Evas_Object *obj)
    if (wd->no_scale) _els_smart_icon_scale_set(wd->img, 1.0);
    else
      {
-       _els_smart_icon_scale_set(wd->img, elm_widget_scale_get(obj) *
-                                 _elm_config->scale);
-       _els_smart_icon_size_get(wd->img, &w, &h);
+        _els_smart_icon_scale_set(wd->img, elm_widget_scale_get(obj) *
+                                  _elm_config->scale);
+        _els_smart_icon_size_get(wd->img, &w, &h);
      }
    if (!wd->scale_down)
      {
-       minw = w;
-       minh = h;
+        minw = w;
+        minh = h;
      }
    if (!wd->scale_up)
      {
-       maxw = w;
-       maxh = h;
+        maxw = w;
+        maxh = h;
      }
    evas_object_size_hint_min_set(obj, minw, minh);
    evas_object_size_hint_max_set(obj, maxw, maxh);
@@ -187,7 +187,7 @@ elm_icon_add(Evas_Object *parent)
    Widget_Data *wd;
 
    ELM_WIDGET_STANDARD_SETUP(wd, Widget_Data, parent, e, obj, NULL);
-   
+
    ELM_SET_WIDTYPE(widtype, "icon");
    elm_widget_type_set(obj, "icon");
    elm_widget_can_focus_set(obj, EINA_FALSE);
@@ -202,7 +202,7 @@ elm_icon_add(Evas_Object *parent)
    wd->lookup_order = ELM_ICON_LOOKUP_THEME_FDO;
    wd->img = _els_smart_icon_add(e);
    evas_object_event_callback_add(wd->img, EVAS_CALLBACK_MOUSE_UP,
-                                 _mouse_up, obj);
+                                  _mouse_up, obj);
    evas_object_repeat_events_set(wd->img, EINA_TRUE);
    elm_widget_resize_object_set(obj, wd->img);
 
@@ -369,23 +369,23 @@ elm_icon_standard_set(Evas_Object *obj, const char *name)
 
    /* try locating the icon using the specified lookup order */
    switch (wd->lookup_order)
-   {
-   case ELM_ICON_LOOKUP_FDO:
-      ret = _icon_freedesktop_set(wd, obj, name, _icon_size_min_get(wd->img));
-      break;
-   case ELM_ICON_LOOKUP_THEME:
-      ret = _icon_standard_set(wd, obj, name);
-      break;
-   case ELM_ICON_LOOKUP_THEME_FDO:
-      ret = _icon_standard_set(wd, obj, name) ||
+     {
+      case ELM_ICON_LOOKUP_FDO:
+         ret = _icon_freedesktop_set(wd, obj, name, _icon_size_min_get(wd->img));
+         break;
+      case ELM_ICON_LOOKUP_THEME:
+         ret = _icon_standard_set(wd, obj, name);
+         break;
+      case ELM_ICON_LOOKUP_THEME_FDO:
+         ret = _icon_standard_set(wd, obj, name) ||
             _icon_freedesktop_set(wd, obj, name, _icon_size_min_get(wd->img));
-      break;
-   case ELM_ICON_LOOKUP_FDO_THEME:
-   default:
-      ret = _icon_freedesktop_set(wd, obj, name, _icon_size_min_get(wd->img)) ||
+         break;
+      case ELM_ICON_LOOKUP_FDO_THEME:
+      default:
+         ret = _icon_freedesktop_set(wd, obj, name, _icon_size_min_get(wd->img)) ||
             _icon_standard_set(wd, obj, name);
-      break;
-   }
+         break;
+     }
 
    if (ret)
      {
@@ -395,7 +395,7 @@ elm_icon_standard_set(Evas_Object *obj, const char *name)
      }
 
    if (_path_is_absolute(name))
-      return _icon_file_set(wd, obj, name);
+     return _icon_file_set(wd, obj, name);
 
    /* if that fails, see if icon name is in the format size/name. if so,
       try locating a fallback without the size specification */
index d3a05a8..24274b0 100644 (file)
@@ -8,7 +8,7 @@
  * arrows etc.) or a custom file (PNG, JPG, EDJE etc.) used for an
  * icon. The Icon may scale or not and of course... support alpha
  * channels.
- * 
+ *
  * Signals that you can add callbacks for are:
  *
  *  - clicked: This is called when a user has clicked the image
@@ -76,18 +76,18 @@ _sizing_eval(Evas_Object *obj)
    if (wd->no_scale) _els_smart_icon_scale_set(wd->img, 1.0);
    else
      {
-       _els_smart_icon_scale_set(wd->img, elm_widget_scale_get(obj) * _elm_config->scale);
-       _els_smart_icon_size_get(wd->img, &w, &h);
+        _els_smart_icon_scale_set(wd->img, elm_widget_scale_get(obj) * _elm_config->scale);
+        _els_smart_icon_size_get(wd->img, &w, &h);
      }
    if (!wd->scale_down)
      {
-       minw = w;
-       minh = h;
+        minw = w;
+        minh = h;
      }
    if (!wd->scale_up)
      {
-       maxw = w;
-       maxh = h;
+        maxw = w;
+        maxh = h;
      }
    evas_object_size_hint_min_set(obj, minw, minh);
    evas_object_size_hint_max_set(obj, maxw, maxh);
@@ -115,7 +115,7 @@ elm_image_add(Evas_Object *parent)
    Widget_Data *wd;
 
    ELM_WIDGET_STANDARD_SETUP(wd, Widget_Data, parent, e, obj, NULL);
-   
+
    ELM_SET_WIDTYPE(widtype, "image");
    elm_widget_type_set(obj, "image");
    elm_widget_sub_object_add(parent, obj);
@@ -127,7 +127,7 @@ elm_image_add(Evas_Object *parent)
 
    wd->img = _els_smart_icon_add(e);
    evas_object_event_callback_add(wd->img, EVAS_CALLBACK_MOUSE_UP,
-                                 _mouse_up, obj);
+                                  _mouse_up, obj);
    evas_object_repeat_events_set(wd->img, EINA_TRUE);
    elm_widget_resize_object_set(obj, wd->img);
 
index 90fec40..6967a3f 100644 (file)
@@ -125,8 +125,8 @@ _theme_hook(Evas_Object *obj)
      {
         if (!wd->bx[1])
           {
-            wd->bx[1] = evas_object_box_add(evas_object_evas_get(wd->base));
-            evas_object_box_layout_set(wd->bx[1], _layout, wd, NULL);
+             wd->bx[1] = evas_object_box_add(evas_object_evas_get(wd->base));
+             evas_object_box_layout_set(wd->bx[1], _layout, wd, NULL);
              elm_widget_sub_object_add(obj, wd->bx[1]);
           }
         edje_object_part_swallow(wd->base, "elm.swallow.index.1", wd->bx[1]);
@@ -195,7 +195,7 @@ _item_find(Evas_Object *obj, const void *item)
    Elm_Index_Item *it;
    if (!wd) return NULL;
    EINA_LIST_FOREACH(wd->items, l, it)
-     if (it->base.data == item) return it;
+      if (it->base.data == item) return it;
    return NULL;
 }
 
@@ -341,7 +341,7 @@ _sel_eval(Evas_Object *obj, Evas_Coord evx, Evas_Coord evy)
              if ((x < dist) || (!it_closest))
                {
                   if (wd->horizontal)
-                    cdv = (double)(xx - bx) / (double)bw; 
+                    cdv = (double)(xx - bx) / (double)bw;
                   else
                     cdv = (double)(yy - by) / (double)bh;
                   it_closest = it;
@@ -349,7 +349,7 @@ _sel_eval(Evas_Object *obj, Evas_Coord evx, Evas_Coord evy)
                }
           }
         if ((!i) && (!wd->level))
-          edje_object_part_drag_value_set(wd->base, "elm.dragable.index.1", 
+          edje_object_part_drag_value_set(wd->base, "elm.dragable.index.1",
                                           cdv, cdv);
         if (it_closest) it_closest->selected = 1;
         if (it_closest != it_last)
@@ -409,16 +409,16 @@ _sel_eval(Evas_Object *obj, Evas_Coord evx, Evas_Coord evy)
    free(last);
 }
 
-static void 
+static void
 _wheel(void *data, Evas *e __UNUSED__, Evas_Object *o __UNUSED__, void *event_info __UNUSED__)
 {
    Widget_Data *wd = elm_widget_data_get(data);
-//   Evas_Event_Mouse_Wheel *ev = event_info;
-//   Evas_Object *obj = o;
+   //   Evas_Event_Mouse_Wheel *ev = event_info;
+   //   Evas_Object *obj = o;
    if (!wd) return;
 }
 
-static void 
+static void
 _mouse_down(void *data, Evas *e __UNUSED__, Evas_Object *o __UNUSED__, void *event_info)
 {
    Widget_Data *wd = elm_widget_data_get(data);
@@ -432,11 +432,11 @@ _mouse_down(void *data, Evas *e __UNUSED__, Evas_Object *o __UNUSED__, void *eve
    wd->dy = ev->canvas.y - y;
    elm_index_active_set(data, 1);
    _sel_eval(data, ev->canvas.x, ev->canvas.y);
-   edje_object_part_drag_value_set(wd->base, "elm.dragable.pointer", 
-        (!edje_object_mirrored_get(wd->base)) ? wd->dx : (wd->dx - w), wd->dy);
+   edje_object_part_drag_value_set(wd->base, "elm.dragable.pointer",
+                                   (!edje_object_mirrored_get(wd->base)) ? wd->dx : (wd->dx - w), wd->dy);
 }
 
-static void 
+static void
 _mouse_up(void *data, Evas *e __UNUSED__, Evas_Object *o __UNUSED__, void *event_info)
 {
    Widget_Data *wd = elm_widget_data_get(data);
@@ -451,7 +451,7 @@ _mouse_up(void *data, Evas *e __UNUSED__, Evas_Object *o __UNUSED__, void *event
    edje_object_signal_emit(wd->base, "elm,state,level,0", "elm");
 }
 
-static void 
+static void
 _mouse_move(void *data, Evas *e __UNUSED__, Evas_Object *o __UNUSED__, void *event_info)
 {
    Widget_Data *wd = elm_widget_data_get(data);
@@ -468,13 +468,13 @@ _mouse_move(void *data, Evas *e __UNUSED__, Evas_Object *o __UNUSED__, void *eve
    adx = dx;
    if (adx < 0) adx = -dx;
    edje_object_part_drag_value_set(wd->base, "elm.dragable.pointer"
-         , (!edje_object_mirrored_get(wd->base)) ? x : (x - w), y);
+                                   , (!edje_object_mirrored_get(wd->base)) ? x : (x - w), y);
    if (!wd->horizontal)
      {
         if (adx > minw)
           {
              if (!wd->level)
-               { 
+               {
                   wd->level = 1;
                   snprintf(buf, sizeof(buf), "elm,state,level,%i", wd->level);
                   edje_object_signal_emit(wd->base, buf, "elm");
@@ -513,7 +513,7 @@ elm_index_add(Evas_Object *parent)
    Evas_Coord minw, minh;
 
    ELM_WIDGET_STANDARD_SETUP(wd, Widget_Data, parent, e, obj, NULL);
-   
+
    ELM_SET_WIDTYPE(widtype, "index");
    elm_widget_type_set(obj, "index");
    elm_widget_sub_object_add(parent, obj);
@@ -564,7 +564,7 @@ elm_index_add(Evas_Object *parent)
    if (edje_object_part_exists(wd->base, "elm.swallow.index.1"))
      {
         wd->bx[1] = evas_object_box_add(e);
-       evas_object_box_layout_set(wd->bx[1], _layout, wd, NULL);
+        evas_object_box_layout_set(wd->bx[1], _layout, wd, NULL);
         elm_widget_sub_object_add(obj, wd->bx[1]);
         edje_object_part_swallow(wd->base, "elm.swallow.index.1", wd->bx[1]);
         evas_object_show(wd->bx[1]);
@@ -653,8 +653,8 @@ elm_index_item_selected_get(const Evas_Object *obj, int level)
    Elm_Index_Item *it;
    if (!wd) return NULL;
    EINA_LIST_FOREACH(wd->items, l, it)
-     if ((it->selected) && (it->level == level))
-       return elm_widget_item_data_get(it);
+      if ((it->selected) && (it->level == level))
+        return elm_widget_item_data_get(it);
    return NULL;
 }
 
@@ -815,16 +815,16 @@ elm_index_item_sorted_insert(Evas_Object *obj, const char *letter, const void *i
      wd->items = eina_list_prepend_relative_list(wd->items, it, lnear);
    else
      {
-       /* If cmp_data_func is not provided, append a duplicated item */
-       if (!cmp_data_func)
-         wd->items =  eina_list_append_relative_list(wd->items, it, lnear);
-       else
-         {
-            Elm_Index_Item *p_it = eina_list_data_get(lnear);
-            if (cmp_data_func(p_it->base.data, it->base.data) >= 0)
-              p_it->base.data = it->base.data;
-            _item_free(it);
-         }
+        /* If cmp_data_func is not provided, append a duplicated item */
+        if (!cmp_data_func)
+          wd->items =  eina_list_append_relative_list(wd->items, it, lnear);
+        else
+          {
+             Elm_Index_Item *p_it = eina_list_data_get(lnear);
+             if (cmp_data_func(p_it->base.data, it->base.data) >= 0)
+               p_it->base.data = it->base.data;
+             _item_free(it);
+          }
      }
 
    _index_box_clear(obj, wd->bx[wd->level], wd->level);
index 8a67969..499c60d 100644 (file)
@@ -52,7 +52,7 @@ _elm_win_recalc_job(void *data)
    resh = 0;
    edje_object_size_min_restricted_calc(wd->lbl, &minw, &minh, 0, 0);
    minminw = minw;
-   if (wd->wrap_w >= resw) 
+   if (wd->wrap_w >= resw)
      {
         resw = wd->wrap_w;
         edje_object_size_min_restricted_calc(wd->lbl, &minw, &minh, resw, 0);
@@ -65,7 +65,7 @@ _elm_win_recalc_job(void *data)
         evas_object_size_hint_min_set(data, minminw, minh);
      }
 
-   if ((wd->ellipsis) && (wd->linewrap) && (wd->wrap_h > 0) && 
+   if ((wd->ellipsis) && (wd->linewrap) && (wd->wrap_h > 0) &&
        (_is_width_over(data, 1) == 1))
      _ellipsis_label_to_width(data, 1);
 
@@ -93,14 +93,14 @@ _theme_change(Evas_Object *obj)
    if (wd->linewrap)
      {
         if (wd->ellipsis)
-          _elm_theme_object_set(obj, wd->lbl, "label", "base_wrap_ellipsis", 
+          _elm_theme_object_set(obj, wd->lbl, "label", "base_wrap_ellipsis",
                                 elm_widget_style_get(obj));
         else
-          _elm_theme_object_set(obj, wd->lbl, "label", "base_wrap", 
+          _elm_theme_object_set(obj, wd->lbl, "label", "base_wrap",
                                 elm_widget_style_get(obj));
      }
    else
-     _elm_theme_object_set(obj, wd->lbl, "label", "base", 
+     _elm_theme_object_set(obj, wd->lbl, "label", "base",
                            elm_widget_style_get(obj));
 }
 
@@ -121,7 +121,7 @@ _theme_hook(Evas_Object *obj)
    _mirrored_set(obj, elm_widget_mirrored_get(obj));
    _theme_change(obj);
    edje_object_part_text_set(wd->lbl, "elm.text", wd->label);
-   edje_object_scale_set(wd->lbl, elm_widget_scale_get(obj) * 
+   edje_object_scale_set(wd->lbl, elm_widget_scale_get(obj) *
                          _elm_config->scale);
    _label_sliding_change(obj);
    _sizing_eval(obj);
@@ -141,9 +141,9 @@ _sizing_eval(Evas_Object *obj)
         wd->changed = EINA_FALSE;
         wd->lastw = resw;
         _elm_win_recalc_job(obj);
-// FIXME: works ok. but NOT for genlist. what should genlist do?        
-//        if (wd->deferred_recalc_job) ecore_job_del(wd->deferred_recalc_job);
-//        wd->deferred_recalc_job = ecore_job_add(_elm_win_recalc_job, obj);
+        // FIXME: works ok. but NOT for genlist. what should genlist do?
+        //        if (wd->deferred_recalc_job) ecore_job_del(wd->deferred_recalc_job);
+        //        wd->deferred_recalc_job = ecore_job_add(_elm_win_recalc_job, obj);
      }
    else
      {
@@ -154,11 +154,11 @@ _sizing_eval(Evas_Object *obj)
         maxh = minh;
         evas_object_size_hint_max_set(obj, maxw, maxh);
         if ((wd->ellipsis) && (_is_width_over(obj, 0) == 1))
-           _ellipsis_label_to_width(obj, 0);
+          _ellipsis_label_to_width(obj, 0);
      }
 }
 
-static void 
+static void
 _resize(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
 {
    Widget_Data *wd = elm_widget_data_get(data);
@@ -171,7 +171,7 @@ _get_value_in_key_string(const char *oldstring, const char *key, char **value)
 {
    char *curlocater, *starttag, *endtag;
    int firstindex = 0, foundflag = -1;
-   
+
    curlocater = strstr(oldstring, key);
    if (curlocater)
      {
@@ -186,7 +186,7 @@ _get_value_in_key_string(const char *oldstring, const char *key, char **value)
         firstindex = abs(oldstring - curlocater);
         firstindex += key_len + 1; // strlen("key") + strlen("=")
         *value = (char *)oldstring + firstindex;
-        
+
         while (oldstring != starttag)
           {
              if (*starttag == '>')
@@ -194,13 +194,13 @@ _get_value_in_key_string(const char *oldstring, const char *key, char **value)
                   foundflag = 0;
                   break;
                }
-             if (*starttag == '<') 
+             if (*starttag == '<')
                break;
-             else 
+             else
                starttag--;
              if (!starttag) break;
           }
-        
+
         while (endtag)
           {
              if (*endtag == '<')
@@ -208,25 +208,25 @@ _get_value_in_key_string(const char *oldstring, const char *key, char **value)
                   foundflag = 0;
                   break;
                }
-             if (*endtag == '>') 
+             if (*endtag == '>')
                break;
-             else 
+             else
                endtag++;
              if (!endtag) break;
           }
-        
+
         if ((foundflag) && (*starttag == '<') && (*endtag == '>'))
           foundflag = 1;
-        else 
+        else
           foundflag = 0;
      }
    else
      {
         foundflag = 0;
      }
-   
+
    if (foundflag == 1) return 0;
-   
+
    return -1;
 }
 
@@ -239,16 +239,16 @@ _strbuf_key_value_replace(Eina_Strbuf *srcbuf, const char *key, const char *valu
    char *curlocater, *replocater;
    char *starttag, *endtag;
    int tagtxtlen = 0, insertflag = 0;
-   
+
    srcstring = eina_strbuf_string_get(srcbuf);
    curlocater = strstr(srcstring, key);
-   
+
    if (!curlocater)
      insertflag = 1;
    else
      {
         int key_len = strlen(key);
-        do 
+        do
           {
              starttag = strchr(srcstring, '<');
              endtag = strchr(srcstring, '>');
@@ -260,7 +260,7 @@ _strbuf_key_value_replace(Eina_Strbuf *srcbuf, const char *key, const char *valu
              else
                break;
           } while (strlen(srcstring) > 1);
-        
+
         if ((starttag) && (endtag) && (tagtxtlen > key_len))
           {
              char *eqchar = NULL;
@@ -282,13 +282,13 @@ _strbuf_key_value_replace(Eina_Strbuf *srcbuf, const char *key, const char *valu
                        // key=value
                        //     ^ : move to here
                        replocater = eqchar + 1;
-                       while ((*replocater) && 
-                              (*replocater != ' ') && 
+                       while ((*replocater) &&
+                              (*replocater != ' ') &&
                               (*replocater != '>'))
                          replocater++;
+
                        if ((replocater - curlocater) > key_len)
-                         eina_strbuf_append_n(diffbuf, curlocater, 
+                         eina_strbuf_append_n(diffbuf, curlocater,
                                               replocater-curlocater);
                        else
                          insertflag = 1;
@@ -301,12 +301,12 @@ _strbuf_key_value_replace(Eina_Strbuf *srcbuf, const char *key, const char *valu
              eina_strbuf_reset(repbuf);
           }
         else
-          insertflag = 1; 
+          insertflag = 1;
      }
-   
+
    if (!repbuf) repbuf = eina_strbuf_new();
    if (!diffbuf) diffbuf = eina_strbuf_new();
-   
+
    if (insertflag)
      {
         eina_strbuf_append_printf(repbuf, "<%s=%s>", key, value);
@@ -329,15 +329,15 @@ _strbuf_key_value_replace(Eina_Strbuf *srcbuf, const char *key, const char *valu
 
    if (repbuf) eina_strbuf_free(repbuf);
    if (diffbuf) eina_strbuf_free(diffbuf);
-  
-   return 0;           
+
+   return 0;
 }
 
 static int
 _stringshare_key_value_replace(const char **srcstring, const char *key, const char *value, int deleteflag)
 {
-   Eina_Strbuf *sharebuf = NULL;   
-   
+   Eina_Strbuf *sharebuf = NULL;
+
    sharebuf = eina_strbuf_new();
    eina_strbuf_append(sharebuf, *srcstring);
    _strbuf_key_value_replace(sharebuf, key, value, deleteflag);
@@ -382,7 +382,7 @@ _is_width_over(Evas_Object *obj, Eina_Bool multiline)
              if ((wd->wrap_w > 0) && (wd->wrap_w < w))
                {
                   Evas_Coord minw, minh;
-                  
+
                   edje_object_size_min_calc(wd->lbl, &minw, &minh);
                   if (minw < wd->wrap_w) return 0; // min insufficient
                   else return 1;
@@ -395,7 +395,7 @@ _is_width_over(Evas_Object *obj, Eina_Bool multiline)
      {
         if (((x >= 0) || (y >= 0)) && (h > wd->wrap_h)) return 1;
      }
-   
+
    return 0;
 }
 
@@ -423,7 +423,7 @@ _ellipsis_cut_chars_to_widget(Evas_Object *obj)
    Widget_Data *wd = elm_widget_data_get(obj);
    if (!wd) return EINA_FALSE;
    const char *ellipsis_string = "...";
-   int mincount = sizeof(ellipsis_string) - 1; 
+   int mincount = sizeof(ellipsis_string) - 1;
    Evas_Coord w, h;
    Evas_Textblock_Cursor *tc1, *tc2;
    char *cutstr, *elstr;
@@ -447,7 +447,7 @@ _ellipsis_cut_chars_to_widget(Evas_Object *obj)
      {
         Evas_Coord cx, cy, cw, ch;
         int eolpos = evas_textblock_cursor_paragraph_text_length_get(tc1);
-        
+
         for (i = eolpos; i > mincount; i--)
           {
              evas_textblock_cursor_pos_set(tc2, i);
@@ -466,7 +466,7 @@ _ellipsis_cut_chars_to_widget(Evas_Object *obj)
    for (i = 0; i <= mincount; i++) evas_textblock_cursor_char_prev(tc2);
    cutstr = evas_textblock_cursor_range_text_get(tc1, tc2, EVAS_TEXTBLOCK_TEXT_PLAIN);
    if (!cutstr) return EINA_FALSE;
-   
+
    lencutstr = strlen(cutstr);
    elstr = alloca(sizeof(char) * (lencutstr + mincount + 1));
    strcpy(elstr, cutstr);
@@ -476,7 +476,7 @@ _ellipsis_cut_chars_to_widget(Evas_Object *obj)
 
    evas_textblock_cursor_free(tc1);
    evas_textblock_cursor_free(tc2);
-   
+
    return EINA_TRUE;
 }
 
@@ -486,7 +486,7 @@ _ellipsis_cut_lines_to_widget(Evas_Object *obj)
    Widget_Data *wd = elm_widget_data_get(obj);
    if (!wd) return EINA_FALSE;
    const char *ellipsis_string = "...";
-   int mincount = sizeof(ellipsis_string) - 1; 
+   int mincount = sizeof(ellipsis_string) - 1;
    Evas_Coord w, h;
    Evas_Textblock_Cursor *tc1, *tc2;
    int linenum = 0, cutline = 0;
@@ -502,7 +502,7 @@ _ellipsis_cut_lines_to_widget(Evas_Object *obj)
    tc2 = evas_object_textblock_cursor_new((Evas_Object *)edje_object_part_object_get(wd->lbl, "elm.text"));
    // goto last paragraph
    while (evas_textblock_cursor_paragraph_next(tc2) == EINA_TRUE);
-   
+
    evas_textblock_cursor_paragraph_last(tc2);
    // get total linenumber
    linenum = evas_textblock_cursor_line_geometry_get(tc2, NULL, NULL, NULL, NULL);
@@ -511,14 +511,14 @@ _ellipsis_cut_lines_to_widget(Evas_Object *obj)
    else limith = h;
    cutline = limith / lineheight;
    if (cutline < 1) cutline = 1;
-   
+
    evas_textblock_cursor_pos_set(tc1, 0);
    evas_textblock_cursor_line_set(tc2, cutline - 1);
    evas_textblock_cursor_line_char_last(tc2);
    for (i = 0; i <= mincount; i++) evas_textblock_cursor_char_prev(tc2);
    cutstr = evas_textblock_cursor_range_text_get(tc1, tc2, EVAS_TEXTBLOCK_TEXT_PLAIN);
    if (!cutstr) return EINA_FALSE;
-   
+
    lencutstr = strlen(cutstr);
    elstr = alloca(sizeof(char) * (lencutstr + mincount + 1));
    strcpy(elstr, cutstr);
@@ -553,12 +553,12 @@ _ellipsis_label_to_width(Evas_Object *obj, Eina_Bool multiline)
    else cur_fontsize = 1;
    if (minfontsize > maxfontsize || cur_fontsize == 1) return;  // theme is not ready for ellipsis
    if (eina_stringshare_strlen(wd->label) <= 0) return;
-   
+
    if (_get_value_in_key_string(wd->label, "font_size", &kvalue) == 0)
      {
         if (kvalue != NULL) cur_fontsize = atoi(kvalue);
      }
-   
+
    while (_is_width_over(obj, multiline))
      {
         if (cur_fontsize > minfontsize)
@@ -590,10 +590,10 @@ _label_sliding_change(Evas_Object *obj)
    if (!wd) return;
    char *plaintxt;
    int plainlen = 0;
-   
+
    // dosen't support multiline sliding effect
    if (wd->linewrap)
-     { 
+     {
         wd->slidingmode = EINA_FALSE;
         return;
      }
@@ -614,13 +614,13 @@ _label_sliding_change(Evas_Object *obj)
    if (wd->slidingmode)
      {
         Edje_Message_Float_Set *msg = alloca(sizeof(Edje_Message_Float_Set) + (sizeof(double)));
-        
+
         if (wd->ellipsis)
           {
              wd->slidingellipsis = EINA_TRUE;
              elm_label_ellipsis_set(obj, EINA_FALSE);
           }
-        
+
         msg->count = 1;
         msg->val[0] = wd->slide_duration;
 
@@ -654,7 +654,7 @@ elm_label_add(Evas_Object *parent)
    Widget_Data *wd;
 
    ELM_WIDGET_STANDARD_SETUP(wd, Widget_Data, parent, e, obj, NULL);
-   
+
    ELM_SET_WIDTYPE(widtype, "label");
    elm_widget_type_set(obj, "label");
    elm_widget_sub_object_add(parent, obj);
@@ -666,7 +666,7 @@ elm_label_add(Evas_Object *parent)
    wd->bgcolor = EINA_FALSE;
    wd->bg = evas_object_rectangle_add(e);
    evas_object_color_set(wd->bg, 0, 0, 0, 0);
-   
+
    wd->linewrap = EINA_FALSE;
    wd->ellipsis = EINA_FALSE;
    wd->slidingmode = EINA_FALSE;
@@ -841,7 +841,7 @@ elm_label_wrap_height_get(const Evas_Object *obj)
 
 /**
  * Set the font size on the label object.
- * 
+ *
  * NEVER use this. It is for hyper-special cases only. use styles instead. e.g.
  * "big", "medium", "small" - or better name them by use:
  * "title", "footnote", "quote" etc.
@@ -955,10 +955,10 @@ elm_label_text_color_set(Evas_Object *obj,
  * "title", "footnote", "quote" etc.
  *
  * @param obj The label object
- * @param r Red property background color of The label object 
- * @param g Green property background color of The label object 
- * @param b Blue property background color of The label object 
- * @param a Alpha property background alpha of The label object 
+ * @param r Red property background color of The label object
+ * @param g Green property background color of The label object
+ * @param b Blue property background color of The label object
+ * @param a Alpha property background alpha of The label object
  *
  * @ingroup Label
  */
index 1952bd5..74d4749 100644 (file)
@@ -78,10 +78,10 @@ _del_hook(Evas_Object *obj)
    if (!wd) return;
    EINA_LIST_FREE(wd->subs, si)
      {
-       eina_stringshare_del(si->part);
+        eina_stringshare_del(si->part);
         if (si->type == TEXT)
           eina_stringshare_del(si->p.text.text);
-       free(si);
+        free(si);
      }
    EINA_LIST_FREE(wd->parts_cursors, pc) _part_cursor_free(pc);
    free(wd);
@@ -114,8 +114,8 @@ _changed_hook(Evas_Object *obj)
    if (!wd) return;
    if (wd->needs_size_calc)
      {
-       _sizing_eval(wd);
-       wd->needs_size_calc = 0;
+        _sizing_eval(wd);
+        wd->needs_size_calc = 0;
      }
 }
 
@@ -171,7 +171,7 @@ _elm_layout_focus_next_hook(const Evas_Object *obj, Elm_Focus_Direction dir, Eva
      }
 
    return elm_widget_focus_list_next_get(obj, items, list_data_get, dir,
-                                          next);
+                                         next);
 }
 
 static void
@@ -233,7 +233,7 @@ _parts_cursors_apply(Widget_Data *wd)
    EINA_LIST_FOREACH(wd->parts_cursors, l, pc)
      {
         Evas_Object *obj = (Evas_Object *)edje_object_part_object_get
-          (wd->lay, pc->part);
+           (wd->lay, pc->part);
 
         if (!obj)
           {
@@ -273,17 +273,17 @@ _sub_del(void *data __UNUSED__, Evas_Object *obj, void *event_info)
    if (!wd) return;
    EINA_LIST_FOREACH(wd->subs, l, si)
      {
-       if (si->obj == sub)
-         {
-            evas_object_event_callback_del_full(sub,
-                                            EVAS_CALLBACK_CHANGED_SIZE_HINTS,
-                                            _changed_size_hints,
-                                            wd);
-            wd->subs = eina_list_remove_list(wd->subs, l);
-            eina_stringshare_del(si->part);
-            free(si);
-            break;
-         }
+        if (si->obj == sub)
+          {
+             evas_object_event_callback_del_full(sub,
+                                                 EVAS_CALLBACK_CHANGED_SIZE_HINTS,
+                                                 _changed_size_hints,
+                                                 wd);
+             wd->subs = eina_list_remove_list(wd->subs, l);
+             eina_stringshare_del(si->part);
+             free(si);
+             break;
+          }
      }
 }
 
@@ -322,7 +322,7 @@ elm_layout_add(Evas_Object *parent)
    Widget_Data *wd;
 
    ELM_WIDGET_STANDARD_SETUP(wd, Widget_Data, parent, e, obj, NULL);
-   
+
    ELM_SET_WIDTYPE(widtype, "layout");
    elm_widget_type_set(obj, "layout");
    elm_widget_sub_object_add(parent, obj);
@@ -341,7 +341,7 @@ elm_layout_add(Evas_Object *parent)
    elm_widget_resize_object_set(obj, wd->lay);
    edje_object_signal_callback_add(wd->lay, "size,eval", "elm",
                                    _signal_size_eval, wd);
-   
+
    evas_object_smart_callback_add(obj, "sub-object-del", _sub_del, obj);
 
    _mirrored_set(obj, elm_widget_mirrored_get(obj));
@@ -430,26 +430,26 @@ elm_layout_content_set(Evas_Object *obj, const char *swallow, Evas_Object *conte
    if (!wd) return;
    EINA_LIST_FOREACH(wd->subs, l, si)
      {
-       if ((si->type == SWALLOW) && (!strcmp(swallow, si->part)))
-         {
-            if (content == si->obj) return;
-            evas_object_del(si->obj);
-            break;
-         }
+        if ((si->type == SWALLOW) && (!strcmp(swallow, si->part)))
+          {
+             if (content == si->obj) return;
+             evas_object_del(si->obj);
+             break;
+          }
      }
    if (content)
      {
-       elm_widget_sub_object_add(obj, content);
-       evas_object_event_callback_add(content,
+        elm_widget_sub_object_add(obj, content);
+        evas_object_event_callback_add(content,
                                        EVAS_CALLBACK_CHANGED_SIZE_HINTS,
-                                      _changed_size_hints, wd);
-       if (!edje_object_part_swallow(wd->lay, swallow, content))
+                                       _changed_size_hints, wd);
+        if (!edje_object_part_swallow(wd->lay, swallow, content))
           WRN("could not swallow %p into part '%s'", content, swallow);
-       si = ELM_NEW(Subinfo);
+        si = ELM_NEW(Subinfo);
         si->type = SWALLOW;
-       si->part = eina_stringshare_add(swallow);
-       si->obj = content;
-       wd->subs = eina_list_append(wd->subs, si);
+        si->part = eina_stringshare_add(swallow);
+        si->obj = content;
+        wd->subs = eina_list_append(wd->subs, si);
      }
    _request_sizing_eval(wd);
 }
@@ -501,15 +501,15 @@ elm_layout_content_unset(Evas_Object *obj, const char *swallow)
    if (!wd) return NULL;
    EINA_LIST_FOREACH(wd->subs, l, si)
      {
-       if ((si->type == SWALLOW) && (!strcmp(swallow, si->part)))
-         {
-            Evas_Object *content;
-            if (!si->obj) return NULL;
-            content = si->obj; /* si will die in _sub_del due elm_widget_sub_object_del() */
-            elm_widget_sub_object_del(obj, content);
-            edje_object_part_unswallow(wd->lay, content);
-            return content;
-         }
+        if ((si->type == SWALLOW) && (!strcmp(swallow, si->part)))
+          {
+             Evas_Object *content;
+             if (!si->obj) return NULL;
+             content = si->obj; /* si will die in _sub_del due elm_widget_sub_object_del() */
+             elm_widget_sub_object_del(obj, content);
+             edje_object_part_unswallow(wd->lay, content);
+             return content;
+          }
      }
    return NULL;
 }
@@ -608,7 +608,7 @@ elm_layout_box_append(Evas_Object *obj, const char *part, Evas_Object *child)
      WRN("child %p could not be appended to box part '%s'", child, part);
    elm_widget_sub_object_add(obj, child);
    evas_object_event_callback_add
-     (child, EVAS_CALLBACK_CHANGED_SIZE_HINTS, _changed_size_hints, wd);
+      (child, EVAS_CALLBACK_CHANGED_SIZE_HINTS, _changed_size_hints, wd);
 
    si = ELM_NEW(Subinfo);
    si->type = BOX_APPEND;
@@ -644,7 +644,7 @@ elm_layout_box_prepend(Evas_Object *obj, const char *part, Evas_Object *child)
      WRN("child %p could not be prepended to box part '%s'", child, part);
    elm_widget_sub_object_add(obj, child);
    evas_object_event_callback_add
-     (child, EVAS_CALLBACK_CHANGED_SIZE_HINTS, _changed_size_hints, wd);
+      (child, EVAS_CALLBACK_CHANGED_SIZE_HINTS, _changed_size_hints, wd);
 
    si = ELM_NEW(Subinfo);
    si->type = BOX_PREPEND;
@@ -696,9 +696,9 @@ elm_layout_box_insert_before(Evas_Object *obj, const char *part, Evas_Object *ch
 
    elm_widget_sub_object_add(obj, child);
    evas_object_event_callback_add
-     (child, EVAS_CALLBACK_CHANGED_SIZE_HINTS, _changed_size_hints, wd);
+      (child, EVAS_CALLBACK_CHANGED_SIZE_HINTS, _changed_size_hints, wd);
    evas_object_event_callback_add
-     ((Evas_Object *)reference, EVAS_CALLBACK_DEL, _box_reference_del, si);
+      ((Evas_Object *)reference, EVAS_CALLBACK_DEL, _box_reference_del, si);
 
    wd->subs = eina_list_append(wd->subs, si);
    _request_sizing_eval(wd);
@@ -733,7 +733,7 @@ elm_layout_box_insert_at(Evas_Object *obj, const char *part, Evas_Object *child,
 
    elm_widget_sub_object_add(obj, child);
    evas_object_event_callback_add
-     (child, EVAS_CALLBACK_CHANGED_SIZE_HINTS, _changed_size_hints, wd);
+      (child, EVAS_CALLBACK_CHANGED_SIZE_HINTS, _changed_size_hints, wd);
 
    si = ELM_NEW(Subinfo);
    si->type = BOX_INSERT_AT;
@@ -751,8 +751,8 @@ _sub_box_remove(Widget_Data *wd, Subinfo *si)
 
    if (si->type == BOX_INSERT_BEFORE)
      evas_object_event_callback_del_full
-       ((Evas_Object *)si->p.box.reference,
-        EVAS_CALLBACK_DEL, _box_reference_del, si);
+        ((Evas_Object *)si->p.box.reference,
+         EVAS_CALLBACK_DEL, _box_reference_del, si);
 
    child = si->obj; /* si will die in _sub_del due elm_widget_sub_object_del() */
    edje_object_part_box_remove(wd->lay, si->part, child);
@@ -891,7 +891,7 @@ elm_layout_table_pack(Evas_Object *obj, const char *part, Evas_Object *child, un
 
    elm_widget_sub_object_add(obj, child);
    evas_object_event_callback_add
-     (child, EVAS_CALLBACK_CHANGED_SIZE_HINTS, _changed_size_hints, wd);
+      (child, EVAS_CALLBACK_CHANGED_SIZE_HINTS, _changed_size_hints, wd);
 
    si = ELM_NEW(Subinfo);
    si->type = TABLE_PACK;
@@ -984,9 +984,9 @@ elm_layout_table_clear(Evas_Object *obj, const char *part, Eina_Bool clear)
  * Get the edje layout
  *
  * @param obj The layout object
- * 
+ *
  * This returns the edje object. It is not expected to be used to then swallow
- * objects via edje_object_part_swallow() for example. Use 
+ * objects via edje_object_part_swallow() for example. Use
  * elm_layout_content_set() instead so child object handling and sizing is
  * done properly. This is more intended for setting text, emitting signals,
  * hooking to signal callbacks etc.