Merge "remove build warning"
authorJihoon Kim <jihoon48.kim@samsung.com>
Thu, 20 Oct 2011 08:34:00 +0000 (17:34 +0900)
committerGerrit Code Review <git@Maetan>
Thu, 20 Oct 2011 08:34:00 +0000 (17:34 +0900)
data/themes/default.edc
src/lib/elc_naviframe.c
src/lib/elm_colorselector.c
src/lib/elm_entry.c
src/lib/elm_main.c

index 93d86cd..2357305 100644 (file)
@@ -3157,6 +3157,380 @@ collections {
          }
       }
    }
+   group { name: "elm/button/base/colorselector/left/default";
+      images {
+         image: "bt_base1.png" COMP;
+         image: "bt_base2.png" COMP;
+         image: "bt_hilight.png" COMP;
+         image: "bt_shine.png" COMP;
+         image: "bt_glow.png" COMP;
+         image: "bt_dis_base.png" COMP;
+         image: "bt_dis_hilight.png" COMP;
+         image: "sp_bt_l.png" COMP;
+      }
+      parts {
+         part { name: "button_image";
+            mouse_events: 1;
+            description { state: "default" 0.0;
+               min: 15 15;
+               image {
+                  normal: "bt_base2.png";
+                  border: 7 7 7 7;
+               }
+               image.middle: SOLID;
+            }
+            description { state: "clicked" 0.0;
+               inherit: "default" 0.0;
+               image.normal: "bt_base1.png";
+            }
+            description { state: "disabled" 0.0;
+               inherit:  "default" 0.0;
+               image {
+                  normal: "bt_dis_base.png";
+                  border: 4 4 4 4;
+               }
+            }
+         }
+         part { name: "prev_image";
+            type: IMAGE;
+            scale: 1;
+            description { state: "default" 0.0;
+               min: 16 16;
+               max: 16 16;
+               fixed: 1 1;
+               align: 0.5 0.5;
+               image.normal: "sp_bt_l.png";
+            }
+         }
+         part { name: "over1";
+            mouse_events: 0;
+            description { state: "default" 0.0;
+               rel2.relative: 1.0 0.5;
+               image {
+                  normal: "bt_hilight.png";
+                  border: 7 7 7 0;
+               }
+            }
+            description { state: "disabled" 0.0;
+               inherit:  "default" 0.0;
+               image {
+                  normal: "bt_dis_hilight.png";
+                  border: 4 4 4 0;
+               }
+            }
+         }
+         part { name: "over2";
+            mouse_events: 1;
+            repeat_events: 1;
+            ignore_flags: ON_HOLD;
+            description { state: "default" 0.0;
+               image {
+                  normal: "bt_shine.png";
+                  border: 7 7 7 7;
+               }
+            }
+            description { state: "disabled" 0.0;
+               inherit:  "default" 0.0;
+               visible: 0;
+            }
+         }
+         part { name: "over3";
+            mouse_events: 1;
+            repeat_events: 1;
+            description { state: "default" 0.0;
+               color: 255 255 255 0;
+               image {
+                  normal: "bt_glow.png";
+                  border: 12 12 12 12;
+               }
+               fill.smooth : 0;
+            }
+            description { state: "clicked" 0.0;
+               inherit:  "default" 0.0;
+               color: 255 255 255 255;
+            }
+         }
+         part { name: "disabler";
+            type: RECT;
+            description { state: "default" 0.0;
+               color: 0 0 0 0;
+               visible: 0;
+            }
+            description { state: "disabled" 0.0;
+               inherit: "default" 0.0;
+               visible: 1;
+            }
+         }
+      }
+      programs {
+         program {
+            name:   "button_click";
+            signal: "mouse,down,1";
+            source: "over2";
+            action: SIGNAL_EMIT "elm,action,press" "";
+            after: "button_click_anim";
+         }
+         program {
+            name:   "button_click_anim";
+            action: STATE_SET "clicked" 0.0;
+            target: "button_image";
+         }
+         program {
+            name:   "button_unclick";
+            signal: "mouse,up,1";
+            source: "over3";
+            action: SIGNAL_EMIT "elm,action,unpress" "";
+            after: "button_unclick_anim";
+         }
+         program {
+            name:   "button_pressed_anim";
+            signal: "elm,anim,activate";
+            source: "elm";
+            action: STATE_SET "clicked" 0.0;
+            target: "button_image";
+            target: "over3";
+            after: "button_unpressed_anim";
+         }
+         program {
+            name:   "button_unpressed_anim";
+            action: STATE_SET "default" 0.0;
+            transition: DECELERATE 0.5;
+            target: "button_image";
+            target: "over3";
+         }
+         program {
+            name:   "button_unclick_anim";
+            action: STATE_SET "default" 0.0;
+            target: "button_image";
+         }
+         program {
+            name:   "button_click2";
+            signal: "mouse,down,1";
+            source: "over3";
+            action: STATE_SET "clicked" 0.0;
+            target: "over3";
+         }
+         program {
+            name:   "button_unclick2";
+            signal: "mouse,up,1";
+            source: "over3";
+            action: STATE_SET "default" 0.0;
+            transition: DECELERATE 0.5;
+            target: "over3";
+         }
+         program {
+            name:   "button_unclick3";
+            signal: "mouse,clicked,1";
+            source: "over2";
+            action: SIGNAL_EMIT "elm,action,click" "";
+         }
+         program { name: "disable";
+            signal: "elm,state,disabled";
+            source: "elm";
+            action: STATE_SET "disabled" 0.0;
+            target: "button_image";
+            target: "over1";
+            target: "over2";
+            target: "disabler";
+         }
+         program { name: "enable";
+            signal: "elm,state,enabled";
+            source: "elm";
+            action: STATE_SET "default" 0.0;
+            target: "button_image";
+            target: "over1";
+            target: "over2";
+            target: "disabler";
+         }
+      }
+   }
+   group { name: "elm/button/base/colorselector/right/default";
+      images {
+         image: "bt_base1.png" COMP;
+         image: "bt_base2.png" COMP;
+         image: "bt_hilight.png" COMP;
+         image: "bt_shine.png" COMP;
+         image: "bt_glow.png" COMP;
+         image: "bt_dis_base.png" COMP;
+         image: "bt_dis_hilight.png" COMP;
+         image: "sp_bt_r.png" COMP;
+      }
+      parts {
+         part { name: "button_image";
+            mouse_events: 1;
+            description { state: "default" 0.0;
+               min: 15 15;
+               image {
+                  normal: "bt_base2.png";
+                  border: 7 7 7 7;
+               }
+               image.middle: SOLID;
+            }
+            description { state: "clicked" 0.0;
+               inherit: "default" 0.0;
+               image.normal: "bt_base1.png";
+            }
+            description { state: "disabled" 0.0;
+               inherit:  "default" 0.0;
+               image {
+                  normal: "bt_dis_base.png";
+                  border: 4 4 4 4;
+               }
+            }
+         }
+         part { name: "prev_image";
+            type: IMAGE;
+            scale: 1;
+            description { state: "default" 0.0;
+               min: 16 16;
+               max: 16 16;
+               fixed: 1 1;
+               align: 0.5 0.5;
+               image.normal: "sp_bt_r.png";
+            }
+         }
+         part { name: "over1";
+            mouse_events: 0;
+            description { state: "default" 0.0;
+               rel2.relative: 1.0 0.5;
+               image {
+                  normal: "bt_hilight.png";
+                  border: 7 7 7 0;
+               }
+            }
+            description { state: "disabled" 0.0;
+               inherit:  "default" 0.0;
+               image {
+                  normal: "bt_dis_hilight.png";
+                  border: 4 4 4 0;
+               }
+            }
+         }
+         part { name: "over2";
+            mouse_events: 1;
+            repeat_events: 1;
+            ignore_flags: ON_HOLD;
+            description { state: "default" 0.0;
+               image {
+                  normal: "bt_shine.png";
+                  border: 7 7 7 7;
+               }
+            }
+            description { state: "disabled" 0.0;
+               inherit:  "default" 0.0;
+               visible: 0;
+            }
+         }
+         part { name: "over3";
+            mouse_events: 1;
+            repeat_events: 1;
+            description { state: "default" 0.0;
+               color: 255 255 255 0;
+               image {
+                  normal: "bt_glow.png";
+                  border: 12 12 12 12;
+               }
+               fill.smooth : 0;
+            }
+            description { state: "clicked" 0.0;
+               inherit:  "default" 0.0;
+               color: 255 255 255 255;
+            }
+         }
+         part { name: "disabler";
+            type: RECT;
+            description { state: "default" 0.0;
+               color: 0 0 0 0;
+               visible: 0;
+            }
+            description { state: "disabled" 0.0;
+               inherit: "default" 0.0;
+               visible: 1;
+            }
+         }
+      }
+      programs {
+         program {
+            name:   "button_click";
+            signal: "mouse,down,1";
+            source: "over2";
+            action: SIGNAL_EMIT "elm,action,press" "";
+            after: "button_click_anim";
+         }
+         program {
+            name:   "button_click_anim";
+            action: STATE_SET "clicked" 0.0;
+            target: "button_image";
+         }
+         program {
+            name:   "button_unclick";
+            signal: "mouse,up,1";
+            source: "over3";
+            action: SIGNAL_EMIT "elm,action,unpress" "";
+            after: "button_unclick_anim";
+         }
+         program {
+            name:   "button_pressed_anim";
+            signal: "elm,anim,activate";
+            source: "elm";
+            action: STATE_SET "clicked" 0.0;
+            target: "button_image";
+            target: "over3";
+            after: "button_unpressed_anim";
+         }
+         program {
+            name:   "button_unpressed_anim";
+            action: STATE_SET "default" 0.0;
+            transition: DECELERATE 0.5;
+            target: "button_image";
+            target: "over3";
+         }
+         program {
+            name:   "button_unclick_anim";
+            action: STATE_SET "default" 0.0;
+            target: "button_image";
+         }
+         program {
+            name:   "button_click2";
+            signal: "mouse,down,1";
+            source: "over3";
+            action: STATE_SET "clicked" 0.0;
+            target: "over3";
+         }
+         program {
+            name:   "button_unclick2";
+            signal: "mouse,up,1";
+            source: "over3";
+            action: STATE_SET "default" 0.0;
+            transition: DECELERATE 0.5;
+            target: "over3";
+         }
+         program {
+            name:   "button_unclick3";
+            signal: "mouse,clicked,1";
+            source: "over2";
+            action: SIGNAL_EMIT "elm,action,click" "";
+         }
+         program { name: "disable";
+            signal: "elm,state,disabled";
+            source: "elm";
+            action: STATE_SET "disabled" 0.0;
+            target: "button_image";
+            target: "over1";
+            target: "over2";
+            target: "disabler";
+         }
+         program { name: "enable";
+            signal: "elm,state,enabled";
+            source: "elm";
+            action: STATE_SET "default" 0.0;
+            target: "button_image";
+            target: "over1";
+            target: "over2";
+            target: "disabler";
+         }
+      }
+   }
 
 ///////////////////////////////////////////////////////////////////////////////
    group { name: "elm/toggle/base/default";
@@ -34524,7 +34898,7 @@ collections {
                }
                rel2 {
                   relative: 0.0 0.83;
-                     offset: -4 0;
+                  offset: -4 0;
                   to_x: "elm.r_button";
                }
             }
@@ -34629,7 +35003,7 @@ collections {
       }
    }
 
-   group{ name: "elm/colorselector/image/colorbar_0";
+   group{ name: "elm/colorselector/image/colorbar_0/default";
       images {
          image: "color_picker_color.png" COMP;
       }
@@ -34645,7 +35019,7 @@ collections {
       }
    }
 
-   group { name: "elm/colorselector/image/colorbar_1";
+   group { name: "elm/colorselector/image/colorbar_1/default";
       images {
          image: "color_picker_opacity.png" COMP;
       }
@@ -34661,7 +35035,7 @@ collections {
       }
    }
 
-   group { name: "elm/colorselector/image/colorbar_2";
+   group { name: "elm/colorselector/image/colorbar_2/default";
       images {
          image: "color_picker_brightness.png" COMP;
       }
@@ -34677,7 +35051,7 @@ collections {
       }
    }
 
-   group { name: "elm/colorselector/image/colorbar_3";
+   group { name: "elm/colorselector/image/colorbar_3/default";
       images {
          image: "color_picker_alpha.png" COMP;
       }
@@ -34693,7 +35067,7 @@ collections {
       }
    }
 
-   group { name: "elm/colorselector/bg_image/colorbar_3";
+   group { name: "elm/colorselector/bg_image/colorbar_3/default";
       images {
          image: "color_picker_alpha_bg.png" COMP;
       }
@@ -34709,7 +35083,7 @@ collections {
       }
    }
 
-   group { name: "elm/colorselector/image/updown";
+   group { name: "elm/colorselector/arrow/default";
       images {
          image: "icon_arrow_down.png" COMP;
       }
@@ -34731,205 +35105,6 @@ collections {
       }
    }
 
-   group { name: "elm/colorselector/button/left";
-      images {
-         image: "bt_base1.png" COMP;
-         image: "bt_shine.png" COMP;
-         image: "sp_bt_l.png" COMP;
-      }
-      parts {
-         part { name: "button_image";
-            mouse_events: 1;
-            description { state: "default" 0.0;
-               image.normal: "bt_base1.png";
-               image.border: 6 6 6 6;
-               image.middle: SOLID;
-            }
-
-            description { state: "clicked" 0.0;
-               inherit: "default" 0.0;
-               image.normal: "bt_shine.png";
-               image.border: 6 6 6 6;
-               image.middle: SOLID;
-            }
-         }
-         part { name: "btn_over";
-            type: IMAGE;
-            mouse_events: 0;
-            description { state: "default" 0.0;
-               rel1.to: "button_image";
-               rel2 {
-                  relative: 1.0 0.5;
-                  to: "button_image";
-               }
-               image {
-                  normal: "bt_hilight.png";
-                  border: 7 7 7 0;
-               }
-            }
-         }
-         part { name: "btn_over2";
-            type: IMAGE;
-            mouse_events: 1;
-            repeat_events: 1;
-            ignore_flags: ON_HOLD;
-            description { state: "default" 0.0;
-               rel1.to: "button_image";
-               rel2.to: "button_image";
-               image {
-                  normal: "bt_shine.png";
-                  border: 7 7 7 7;
-               }
-            }
-         }
-         part { name: "focus_image";
-            type: IMAGE;
-            description { state: "default" 0.0;
-               color: 255 255 255 0;
-               rel1.to: "button_image";
-               rel2.to: "button_image";
-               image {
-                  normal: "bt_glow.png";
-                  border: 12 12 12 12;
-               }
-               fill.smooth: 0;
-
-            }
-            description { state: "clicked" 0.0;
-               inherit: "default" 0.0;
-               visible: 1;
-               color: 255 255 255 255;
-            }
-         }
-         part { name: "left_arrow";
-            mouse_events: 1;
-            description { state: "default" 0.0;
-               min: 16 16;
-               max: 16 16;
-               image.normal: "sp_bt_l.png";
-            }
-         }
-      }
-
-      programs {
-         program {
-            name:   "button_down";
-            signal: "elm,state,left,button,down";
-            source: "left_button";
-            action: STATE_SET "clicked" 0.0;
-            target: "button_image";
-            target: "focus_image";
-         }
-         program {
-            name:   "button_up";
-            signal: "elm,state,left,button,up";
-            source: "left_button";
-            action: STATE_SET "default" 0.0;
-            target: "button_image";
-            target: "focus_image";
-         }
-      }
-   }
-
-   group { name: "elm/colorselector/button/right";
-      images {
-         image: "bt_base1.png" COMP;
-         image: "bt_shine.png" COMP;
-         image: "sp_bt_r.png" COMP;
-      }
-      parts {
-         part { name: "button_image";
-            mouse_events: 1;
-            description { state: "default" 0.0;
-               image.normal: "bt_base1.png";
-               image.border: 6 6 6 6;
-               image.middle: SOLID;
-            }
-
-            description { state: "clicked" 0.0;
-               inherit: "default" 0.0;
-               image.normal: "bt_shine.png";
-               image.border: 6 6 6 6;
-               image.middle: SOLID;
-            }
-         }
-         part { name: "btn_over";
-            type: IMAGE;
-            mouse_events: 0;
-            description { state: "default" 0.0;
-               rel1.to: "button_image";
-               rel2 {
-                  relative: 1.0 0.5;
-                  to: "button_image";
-               }
-               image {
-                  normal: "bt_hilight.png";
-                  border: 7 7 7 0;
-               }
-            }
-         }
-         part { name: "btn_over2";
-            type: IMAGE;
-            mouse_events: 1;
-            repeat_events: 1;
-            ignore_flags: ON_HOLD;
-            description { state: "default" 0.0;
-               rel1.to: "button_image";
-               rel2.to: "button_image";
-               image {
-                  normal: "bt_shine.png";
-                  border: 7 7 7 7;
-               }
-            }
-         }
-         part { name: "focus_image";
-            type: IMAGE;
-            description { state: "default" 0.0;
-               color: 255 255 255 0;
-               rel1.to: "button_image";
-               rel2.to: "button_image";
-               image {
-                  normal: "bt_glow.png";
-                  border: 12 12 12 12;
-               }
-               fill.smooth: 0;
-
-            }
-            description { state: "clicked" 0.0;
-               inherit: "default" 0.0;
-               visible: 1;
-               color: 255 255 255 255;
-            }
-         }
-         part { name: "right_arrow";
-            mouse_events: 1;
-            description { state: "default" 0.0;
-               min: 16 16;
-               max: 16 16;
-               image.normal: "sp_bt_r.png";
-            }
-         }
-      }
-
-      programs {
-         program {
-            name:   "button_down";
-            signal: "elm,state,right,button,down";
-            source: "right_button";
-            action: STATE_SET "clicked" 0.0;
-            target: "button_image";
-            target: "focus_image";
-         }
-         program {
-            name:   "button_up";
-            signal: "elm,state,right,button,up";
-            source: "right_button";
-            action: STATE_SET "default" 0.0;
-            target: "button_image";
-            target: "focus_image";
-         }
-      }
-   }
 
 ///////////////////////////////////////////////////////////////////////////////
 #define FLIP_PICKER_MAX_LEN (50)
index f36b3a9..c1e919a 100644 (file)
@@ -48,6 +48,8 @@ struct _Elm_Naviframe_Item
 static const char *widtype = NULL;
 
 static const char SIG_TRANSITION_FINISHED[] = "transition,finished";
+static const char SIG_PUSH_FINISHED[] = "push,finished";
+static const char SIG_POP_FINISHED[] = "pop,finished";
 static const char SIG_TITLE_CLICKED[] = "title,clicked";
 
 static const Evas_Smart_Cb_Description _signals[] = {
@@ -133,6 +135,8 @@ static void _show_finished(void *data,
                            const char *source);
 static void _item_content_set(Elm_Naviframe_Item *navi_it,
                               Evas_Object *content);
+static void _item_style_set(Elm_Naviframe_Item *navi_it,
+                            const char *item_style);
 
 static void
 _del_hook(Evas_Object *obj)
@@ -165,7 +169,7 @@ _theme_hook(Evas_Object *obj)
 
    EINA_INLIST_FOREACH(wd->stack, it)
      {
-        elm_naviframe_item_style_set(ELM_CAST(it), it->style);
+        _item_style_set(it, it->style);
         _item_title_visible_update(it);
      }
 
@@ -216,7 +220,7 @@ _item_text_set_hook(Elm_Object_Item *it,
    ELM_OBJ_ITEM_CHECK_OR_RETURN(it);
 
    Elm_Naviframe_Text_Item_Pair *pair = NULL;
-   Elm_Naviframe_Item *navi_it = ELM_CAST(it);
+   Elm_Naviframe_Item *navi_it = (Elm_Naviframe_Item *) it;
    char buf[1024];
 
    if (!part)
@@ -263,7 +267,7 @@ _item_text_get_hook(const Elm_Object_Item *it, const char *part)
 {
    ELM_OBJ_ITEM_CHECK_OR_RETURN(it, NULL);
    Elm_Naviframe_Text_Item_Pair *pair = NULL;
-   Elm_Naviframe_Item *navi_it = ELM_CAST(it);
+   Elm_Naviframe_Item *navi_it = (Elm_Naviframe_Item *) it;
    char buf[1024];
 
    if (!part)
@@ -287,7 +291,7 @@ _item_content_set_hook(Elm_Object_Item *it,
    ELM_OBJ_ITEM_CHECK_OR_RETURN(it);
 
    Elm_Naviframe_Content_Item_Pair *pair = NULL;
-   Elm_Naviframe_Item *navi_it = ELM_CAST(it);
+   Elm_Naviframe_Item *navi_it = (Elm_Naviframe_Item *) it;
 
    //specified parts
    if ((!part) || (!strcmp(part, "elm.swallow.content")))
@@ -315,7 +319,7 @@ _item_content_get_hook(const Elm_Object_Item *it, const char *part)
 {
    ELM_OBJ_ITEM_CHECK_OR_RETURN(it, NULL);
    Elm_Naviframe_Content_Item_Pair *pair = NULL;
-   Elm_Naviframe_Item *navi_it = ELM_CAST(it);
+   Elm_Naviframe_Item *navi_it = (Elm_Naviframe_Item *) it;
 
    //specified parts
    if ((!part) || (!strcmp(part, "elm.swallow.content")))
@@ -339,7 +343,7 @@ _item_content_unset_hook(Elm_Object_Item *it, const char *part)
 {
    ELM_OBJ_ITEM_CHECK_OR_RETURN(it, NULL);
    Elm_Naviframe_Content_Item_Pair *pair = NULL;
-   Elm_Naviframe_Item *navi_it = ELM_CAST(it);
+   Elm_Naviframe_Item *navi_it = (Elm_Naviframe_Item *) it;
    Evas_Object *content = NULL;
    char buf[1028];
 
@@ -389,7 +393,7 @@ _item_signal_emit_hook(Elm_Object_Item *it,
                        const char *source)
 {
    ELM_OBJ_ITEM_CHECK_OR_RETURN(it);
-   Elm_Naviframe_Item *navi_it = ELM_CAST(it);
+   Elm_Naviframe_Item *navi_it = (Elm_Naviframe_Item *) it;
    edje_object_signal_emit(navi_it->base.view, emission, source);
 }
 
@@ -710,6 +714,8 @@ _item_del(Elm_Naviframe_Item *it)
         free(text_pair);
      }
 
+   eina_stringshare_del(it->style);
+
    wd->stack = eina_inlist_remove(wd->stack, EINA_INLIST_GET(it));
 
    elm_widget_item_del(it);
@@ -724,6 +730,9 @@ _pushed_finished(void *data,
    Elm_Naviframe_Item *it = data;
    if (!it) return;
    evas_object_hide(it->base.view);
+   evas_object_smart_callback_call(it->base.widget,
+                                   SIG_PUSH_FINISHED,
+                                   data);
 }
 
 static void
@@ -732,6 +741,11 @@ _popped_finished(void *data,
                  const char *emission __UNUSED__,
                  const char *source __UNUSED__)
 {
+   Elm_Naviframe_Item *it = data;
+   if (!it) return;
+   evas_object_smart_callback_call(it->base.widget,
+                                   SIG_POP_FINISHED,
+                                   data);
    _item_del(data);
 }
 
@@ -751,7 +765,7 @@ _show_finished(void *data,
 
    evas_object_smart_callback_call(it->base.widget,
                                    SIG_TRANSITION_FINISHED,
-                                   (void *) EINA_TRUE);
+                                   data);
    if (wd->freeze_events)
      {
         evas_object_hide(wd->rect);
@@ -785,6 +799,88 @@ _item_content_set(Elm_Naviframe_Item *navi_it, Evas_Object *content)
    _item_sizing_eval(navi_it);
 }
 
+static void
+_item_style_set(Elm_Naviframe_Item *navi_it, const char *item_style)
+{
+   Elm_Naviframe_Content_Item_Pair *content_pair;
+   Elm_Naviframe_Text_Item_Pair *text_pair;
+   Widget_Data *wd;
+
+   char buf[256];
+
+   if (!item_style)
+     {
+        sprintf(buf, "item/basic");
+        eina_stringshare_replace(&navi_it->style, "basic");
+     }
+   else
+     {
+        if (strlen(item_style) > sizeof(buf))
+          WRN("too much long style name! : naviframe=%p", navi_it->base.widget);
+        sprintf(buf, "item/%s", item_style);
+        eina_stringshare_replace(&navi_it->style, item_style);
+     }
+   _elm_theme_object_set(navi_it->base.widget,
+                         navi_it->base.view,
+                         "naviframe",
+                         buf,
+                         elm_widget_style_get(navi_it->base.widget));
+   //recover item
+   EINA_INLIST_FOREACH(navi_it->text_list, text_pair)
+      _item_text_set_hook((Elm_Object_Item *) navi_it,
+                          text_pair->part,
+                          text_pair->text);
+
+   EINA_INLIST_FOREACH(navi_it->content_list, content_pair)
+      _item_content_set_hook((Elm_Object_Item *) navi_it,
+                             content_pair->part,
+                             content_pair->content);
+
+   //content
+   if (navi_it->content)
+     {
+        edje_object_part_swallow(navi_it->base.view,
+                                 "elm.swallow.content",
+                                 navi_it->content);
+        edje_object_signal_emit(navi_it->base.view,
+                                "elm,state,content,show",
+                                "elm");
+     }
+
+   //prev button
+   if (navi_it->title_prev_btn)
+     {
+        edje_object_part_swallow(navi_it->base.view,
+                                 "elm.swallow.prev_btn",
+                                 navi_it->title_prev_btn);
+        edje_object_signal_emit(navi_it->base.view,
+                                "elm,state,prev_btn,show",
+                                "elm");
+     }
+
+   //next button
+   if (navi_it->title_next_btn)
+     {
+        edje_object_part_swallow(navi_it->base.view,
+                                 "elm.swallow.next_btn",
+                                 navi_it->title_next_btn);
+        edje_object_signal_emit(navi_it->base.view,
+                                "elm,state,next_btn,show",
+                                "elm");
+     }
+
+   navi_it->title_visible = EINA_TRUE;
+   _item_sizing_eval(navi_it);
+
+   wd = elm_widget_data_get(navi_it->base.widget);
+   if (wd && wd->freeze_events)
+     {
+        evas_object_hide(wd->rect);
+        //FIXME:
+        evas_object_pass_events_set(wd->base, EINA_FALSE);
+     }
+}
+
 EAPI Evas_Object *
 elm_naviframe_add(Evas_Object *parent)
 {
@@ -876,9 +972,9 @@ elm_naviframe_item_push(Evas_Object *obj,
                                    "",
                                    _title_clicked, it);
 
-   elm_naviframe_item_style_set(ELM_CAST(it), item_style);
+   _item_style_set(it, item_style);
 
-   _item_text_set_hook(ELM_CAST(it), "elm.text.title", title_label);
+   _item_text_set_hook((Elm_Object_Item *) it, "elm.text.title", title_label);
 
    //title buttons
    if ((!prev_btn) && wd->auto_pushed && eina_inlist_count(wd->stack))
@@ -896,7 +992,7 @@ elm_naviframe_item_push(Evas_Object *obj,
    _item_sizing_eval(it);
    evas_object_show(it->base.view);
 
-   prev_it = ELM_CAST(elm_naviframe_top_item_get(obj));
+   prev_it = (Elm_Naviframe_Item *) elm_naviframe_top_item_get(obj);
    if (prev_it)
      {
         if (wd->freeze_events)
@@ -914,7 +1010,7 @@ elm_naviframe_item_push(Evas_Object *obj,
      }
    it->title_visible = EINA_TRUE;
    wd->stack = eina_inlist_append(wd->stack, EINA_INLIST_GET(it));
-   return ELM_CAST(it);
+   return (Elm_Object_Item *) it;
 }
 
 EAPI Evas_Object *
@@ -928,7 +1024,7 @@ elm_naviframe_item_pop(Evas_Object *obj)
    wd = elm_widget_data_get(obj);
    if (!wd) return NULL;
 
-   it = ELM_CAST(elm_naviframe_top_item_get(obj));
+   it = (Elm_Naviframe_Item *) elm_naviframe_top_item_get(obj);
    if (!it) return NULL;
    elm_widget_tree_unfocusable_set(it->content, EINA_TRUE);
    if (wd->preserve)
@@ -962,7 +1058,7 @@ EAPI void
 elm_naviframe_item_pop_to(Elm_Object_Item *it)
 {
    ELM_OBJ_ITEM_CHECK_OR_RETURN(it);
-   Elm_Naviframe_Item *navi_it = ELM_CAST(it);
+   Elm_Naviframe_Item *navi_it = (Elm_Naviframe_Item *) it;
    Widget_Data *wd = elm_widget_data_get(navi_it->base.widget);
    Eina_Inlist *l, *prev_l;
 
@@ -972,8 +1068,8 @@ elm_naviframe_item_pop_to(Elm_Object_Item *it)
 
    while(l)
      {
-        if (ELM_CAST(EINA_INLIST_CONTAINER_GET(l, Elm_Naviframe_Item)) == it)
-          break;
+        if (EINA_INLIST_CONTAINER_GET(l, Elm_Naviframe_Item) ==
+            ((Elm_Naviframe_Item *) it)) break;
         prev_l = l->prev;
         _item_del(EINA_INLIST_CONTAINER_GET(l, Elm_Naviframe_Item));
         l = prev_l;
@@ -985,12 +1081,13 @@ EAPI void
 elm_naviframe_item_del(Elm_Object_Item *it)
 {
    ELM_OBJ_ITEM_CHECK_OR_RETURN(it);
-   Elm_Naviframe_Item *navi_it = ELM_CAST(it);
+   Elm_Naviframe_Item *navi_it =(Elm_Naviframe_Item *) it;
    Widget_Data *wd = elm_widget_data_get(navi_it->base.widget);
    if (it == elm_naviframe_top_item_get(navi_it->base.widget))
      {
         _item_del(navi_it);
-        navi_it = ELM_CAST(EINA_INLIST_CONTAINER_GET(wd->stack->last, Elm_Naviframe_Item));
+        navi_it = EINA_INLIST_CONTAINER_GET(wd->stack->last,
+                                            Elm_Naviframe_Item);
         evas_object_show(navi_it->base.view);
         evas_object_raise(navi_it->base.view);
         edje_object_signal_emit(navi_it->base.view, "elm,state,visible", "elm");
@@ -1023,8 +1120,8 @@ elm_naviframe_top_item_get(const Evas_Object *obj)
    ELM_CHECK_WIDTYPE(obj, widtype) NULL;
    Widget_Data *wd = elm_widget_data_get(obj);
    if ((!wd) || (!wd->stack)) return NULL;
-   return ELM_CAST(EINA_INLIST_CONTAINER_GET(wd->stack->last,
-                                             Elm_Naviframe_Item));
+   return (Elm_Object_Item *) (EINA_INLIST_CONTAINER_GET(wd->stack->last,
+                                                         Elm_Naviframe_Item));
 }
 
 EAPI Elm_Object_Item*
@@ -1033,80 +1130,31 @@ elm_naviframe_bottom_item_get(const Evas_Object *obj)
    ELM_CHECK_WIDTYPE(obj, widtype) NULL;
    Widget_Data *wd = elm_widget_data_get(obj);
    if ((!wd) || (!wd->stack)) return NULL;
-   return ELM_CAST(EINA_INLIST_CONTAINER_GET(wd->stack,
-                                             Elm_Naviframe_Item));
+   return (Elm_Object_Item *) (EINA_INLIST_CONTAINER_GET(wd->stack,
+                                                         Elm_Naviframe_Item));
 }
 
 EAPI void
 elm_naviframe_item_style_set(Elm_Object_Item *it, const char *item_style)
 {
    ELM_OBJ_ITEM_CHECK_OR_RETURN(it);
-   Elm_Naviframe_Item *navi_it = ELM_CAST(it);
-   Elm_Naviframe_Content_Item_Pair *content_pair;
-   Elm_Naviframe_Text_Item_Pair *text_pair;
-   Widget_Data *wd;
-
-   char buf[256];
-
-   if (!item_style) sprintf(buf, "item/basic");
-   else
-     {
-        if (strlen(item_style) > sizeof(buf))
-          WRN("too much long style name! : naviframe=%p", navi_it->base.widget);
-        sprintf(buf, "item/%s", item_style);
-     }
-   _elm_theme_object_set(navi_it->base.widget,
-                         navi_it->base.view,
-                         "naviframe",
-                         buf,
-                         elm_widget_style_get(navi_it->base.widget));
-   //recover item
-   EINA_INLIST_FOREACH(navi_it->text_list, text_pair)
-     _item_text_set_hook(it, text_pair->part, text_pair->text);
+   Elm_Naviframe_Item *navi_it = (Elm_Naviframe_Item *) it;
 
-   EINA_INLIST_FOREACH(navi_it->content_list, content_pair)
-     _item_content_set_hook(it, content_pair->part, content_pair->content);
+   //Return if new style is exsiting one.  
+   if (item_style)
+     if (!strcmp(item_style, navi_it->style)) return;
 
-   //content
-   if (navi_it->content)
-     {
-        edje_object_part_swallow(navi_it->base.view,
-                                 "elm.swallow.content",
-                                 navi_it->content);
-        edje_object_signal_emit(navi_it->base.view,
-                                "elm,state,content,show",
-                                "elm");
-     }
+   if (!item_style)
+     if (!strcmp("basic", navi_it->style)) return;
 
-   //prev button
-   if (navi_it->title_prev_btn)
-     edje_object_part_swallow(navi_it->base.view,
-                              "elm.swallow.prev_btn",
-                              navi_it->title_prev_btn);
-
-   //next button
-   if (navi_it->title_next_btn)
-     edje_object_part_swallow(navi_it->base.view,
-                              "elm.swallow.next_btn",
-                              navi_it->title_next_btn);
-
-   navi_it->title_visible = EINA_TRUE;
-   _item_sizing_eval(navi_it);
-
-   wd = elm_widget_data_get(navi_it->base.widget);
-   if (wd && wd->freeze_events)
-     {
-        evas_object_hide(wd->rect);
-        //FIXME:
-        evas_object_pass_events_set(wd->base, EINA_FALSE);
-     }
+   _item_style_set(navi_it, item_style);
 }
 
 EAPI const char *
 elm_naviframe_item_style_get(const Elm_Object_Item *it)
 {
    ELM_OBJ_ITEM_CHECK_OR_RETURN(it, NULL);
-   Elm_Naviframe_Item *navi_it = ELM_CAST(it);
+   Elm_Naviframe_Item *navi_it = (Elm_Naviframe_Item *) it;
    return navi_it->style;
 }
 
@@ -1114,7 +1162,7 @@ EAPI void
 elm_naviframe_item_title_visible_set(Elm_Object_Item *it, Eina_Bool visible)
 {
    ELM_OBJ_ITEM_CHECK_OR_RETURN(it);
-   Elm_Naviframe_Item *navi_it = ELM_CAST(it);
+   Elm_Naviframe_Item *navi_it = (Elm_Naviframe_Item *) it;
 
    visible = !!visible;
    if (navi_it->title_visible == visible) return;
@@ -1127,7 +1175,7 @@ EAPI Eina_Bool
 elm_naviframe_item_title_visible_get(const Elm_Object_Item *it)
 {
    ELM_OBJ_ITEM_CHECK_OR_RETURN(it, EINA_FALSE);
-   Elm_Naviframe_Item *navi_it = ELM_CAST(it);
+   Elm_Naviframe_Item *navi_it = (Elm_Naviframe_Item *) it;
    return navi_it->title_visible;
 }
 
index 2f099db..ca7ec0a 100644 (file)
@@ -553,6 +553,7 @@ _add_colorbar(Evas_Object *obj)
    Widget_Data *wd;
    Evas *e;
    int i = 0;
+   char buf[1024];
 
    wd = elm_widget_data_get(obj);
    if (!wd) return;
@@ -583,7 +584,7 @@ _add_colorbar(Evas_Object *obj)
         /* load colorbar area */
         wd->cp[i]->colorbar = edje_object_add(e);
         _elm_theme_object_set(obj, wd->cp[i]->colorbar, "colorselector", "base",
-                              "default");
+                              elm_widget_style_get(obj));
         snprintf(colorbar_name, sizeof(colorbar_name), "colorbar_%d", i);
         snprintf(colorbar_s, sizeof(colorbar_s), "elm.colorbar_%d", i);
         edje_object_signal_callback_add(wd->cp[i]->colorbar, "drag", "*",
@@ -593,8 +594,9 @@ _add_colorbar(Evas_Object *obj)
 
         /* load colorbar image */
         wd->cp[i]->bar = edje_object_add(e);
+        snprintf(buf, sizeof(buf), "%s/%s", colorbar_name, elm_widget_style_get(obj));
         _elm_theme_object_set(obj, wd->cp[i]->bar, "colorselector", "image",
-                              colorbar_name);
+                              buf);
         edje_object_part_swallow(wd->cp[i]->colorbar, "elm.bar",
                                  wd->cp[i]->bar);
         elm_widget_sub_object_add(obj, wd->cp[i]->bar);
@@ -624,8 +626,9 @@ _add_colorbar(Evas_Object *obj)
         if (i == 3)
           {
              wd->cp[i]->bg_rect = edje_object_add(e);
+             snprintf(buf, sizeof(buf), "%s/%s", colorbar_name, elm_widget_style_get(obj));
              _elm_theme_object_set(obj, wd->cp[i]->bg_rect, "colorselector",
-                                   "bg_image", colorbar_name);
+                                   "bg_image", buf);
              edje_object_part_swallow(wd->cp[i]->colorbar, "elm.bar_bg",
                                       wd->cp[i]->bg_rect);
              elm_widget_sub_object_add(obj, wd->cp[i]->bg_rect);
@@ -633,8 +636,8 @@ _add_colorbar(Evas_Object *obj)
           }
         /* load arrow image, pointing the colorbar */
         wd->cp[i]->arrow = edje_object_add(e);
-        _elm_theme_object_set(obj, wd->cp[i]->arrow, "colorselector", "image",
-                              "updown");
+        _elm_theme_object_set(obj, wd->cp[i]->arrow, "colorselector", "arrow",
+                              elm_widget_style_get(obj));
         edje_object_part_swallow(wd->cp[i]->colorbar, "elm.arrow_icon",
                                  wd->cp[i]->arrow);
         elm_widget_sub_object_add(obj, wd->cp[i]->arrow);
@@ -645,26 +648,28 @@ _add_colorbar(Evas_Object *obj)
 
         /* load left button */
         wd->cp[i]->lbt = elm_button_add(obj);
-        elm_object_style_set(wd->cp[i]->lbt, "picker_left");
+        snprintf(buf, sizeof(buf), "colorselector/left/%s", elm_widget_style_get(obj));
+        elm_object_style_set(wd->cp[i]->lbt, buf);
         elm_widget_sub_object_add(obj, wd->cp[i]->lbt);
         edje_object_part_swallow(wd->cp[i]->colorbar, "elm.l_button",
                                  wd->cp[i]->lbt);
         evas_object_smart_callback_add(wd->cp[i]->lbt, "clicked", _left_button_clicked_cb, wd->cp[i]);
         elm_button_autorepeat_set(wd->cp[i]->lbt, EINA_TRUE);
         elm_button_autorepeat_initial_timeout_set(wd->cp[i]->lbt, _elm_config->longpress_timeout);
-        elm_button_autorepeat_gap_timeout_set(wd->cp[i]->lbt, 0.01);
+        elm_button_autorepeat_gap_timeout_set(wd->cp[i]->lbt, (1.0 / _elm_config->fps));
         evas_object_smart_callback_add(wd->cp[i]->lbt, "repeated",_left_button_repeat_cb, wd->cp[i]);
 
         /* load right button */
         wd->cp[i]->rbt = elm_button_add(obj);
-        elm_object_style_set(wd->cp[i]->rbt, "picker_right");
+        snprintf(buf, sizeof(buf), "colorselector/right/%s", elm_widget_style_get(obj));
+        elm_object_style_set(wd->cp[i]->rbt, buf);
         elm_widget_sub_object_add(obj, wd->cp[i]->rbt);
         edje_object_part_swallow(wd->cp[i]->colorbar, "elm.r_button",
                                  wd->cp[i]->rbt);
         evas_object_smart_callback_add(wd->cp[i]->rbt, "clicked", _right_button_clicked_cb, wd->cp[i]);
         elm_button_autorepeat_set(wd->cp[i]->rbt, EINA_TRUE);
         elm_button_autorepeat_initial_timeout_set(wd->cp[i]->rbt, _elm_config->longpress_timeout);
-        elm_button_autorepeat_gap_timeout_set(wd->cp[i]->rbt, 0.01);
+        elm_button_autorepeat_gap_timeout_set(wd->cp[i]->rbt, (1.0 / _elm_config->fps));
         evas_object_smart_callback_add(wd->cp[i]->rbt, "repeated",_right_button_repeat_cb, wd->cp[i]);
      }
 }
index 2401e63..2248379 100644 (file)
@@ -225,6 +225,9 @@ static void _theme_hook(Evas_Object *obj);
 static void _disable_hook(Evas_Object *obj);
 static void _sizing_eval(Evas_Object *obj);
 static void _on_focus_hook(void *data, Evas_Object *obj);
+static void _content_set_hook(Evas_Object *obj, const char *part, Evas_Object *content);
+static Evas_Object *_content_unset_hook(Evas_Object *obj, const char *part);
+static Evas_Object *_content_get_hook(const Evas_Object *obj, const char *part);
 static void _resize(void *data, Evas *e, Evas_Object *obj, void *event_info);
 static const char *_getbase(Evas_Object *obj);
 static void _signal_entry_changed(void *data, Evas_Object *obj, const char *emission, const char *source);
@@ -619,6 +622,7 @@ _del_hook(Evas_Object *obj)
      {
         _filter_free(tf);
      }
+   if (wd->delay_write) ecore_timer_del(wd->delay_write);
    free(wd);
 }
 
@@ -944,6 +948,88 @@ _on_focus_hook(void *data __UNUSED__, Evas_Object *obj)
      }
 }
 
+
+static void
+_content_set_hook(Evas_Object *obj, const char *part, Evas_Object *content)
+{
+   Widget_Data *wd = elm_widget_data_get(obj);
+   Evas_Object *edje;
+   if ((!wd) || (!content)) return;
+
+   edje = elm_smart_scroller_edje_object_get(wd->scroller);
+   if (!strcmp(part, "elm.swallow.icon"))
+     {
+        if (wd->icon)
+          evas_object_del(wd->icon);
+        wd->icon = content;
+        edje_object_signal_emit(edje, "elm,action,show,icon", "elm");
+     }
+   else if (!strcmp(part, "elm.swallow.end"))
+     {
+        if (wd->end)
+          evas_object_del(wd->end);
+        wd->end = content;
+        edje_object_signal_emit(edje, "elm,action,show,end", "elm");
+     }
+   evas_event_freeze(evas_object_evas_get(obj));
+   elm_widget_sub_object_add(obj, content);
+   edje_object_part_swallow(edje, part, content);
+   _sizing_eval(obj);
+   evas_event_thaw(evas_object_evas_get(obj));
+   evas_event_thaw_eval(evas_object_evas_get(obj));
+}
+
+static Evas_Object *
+_content_unset_hook(Evas_Object *obj, const char *part)
+{
+   Widget_Data *wd = elm_widget_data_get(obj);
+   Evas_Object *content, *edje;
+   if (!wd) return NULL;
+
+   edje = elm_smart_scroller_edje_object_get(wd->scroller);
+   if (!strcmp(part, "elm.swallow.icon"))
+     {
+        wd->icon = NULL;
+        edje_object_signal_emit(edje, "elm,action,hide,icon", "elm");
+     }
+   else if (!strcmp(part, "elm.swallow.end"))
+     {
+        wd->end = NULL;
+        edje_object_signal_emit(edje, "elm,action,hide,end", "elm");
+     }
+
+   content = edje_object_part_swallow_get(edje, part);
+   edje_object_part_swallow(edje, part, NULL);
+   if (!content) return NULL;
+   evas_event_freeze(evas_object_evas_get(obj));
+   elm_widget_sub_object_del(obj, content);
+   edje_object_part_unswallow(wd->ent, content);
+   _sizing_eval(obj);
+   evas_event_thaw(evas_object_evas_get(obj));
+   evas_event_thaw_eval(evas_object_evas_get(obj));
+
+   return content;
+}
+
+static Evas_Object *
+_content_get_hook(const Evas_Object *obj, const char *part)
+{
+   Widget_Data *wd = elm_widget_data_get(obj);
+   Evas_Object *content = NULL, *edje;
+   if (!wd) return NULL;
+
+   if (!strcmp(part, "elm.swallow.icon"))
+     return wd->icon;
+   if (!strcmp(part, "elm.swallow.end"))
+     return wd->end;
+
+   edje = elm_smart_scroller_edje_object_get(wd->scroller);
+   if (edje)
+     content = edje_object_part_swallow_get(edje, part);
+   return content;
+}
+
+
 static void
 _signal_emit_hook(Evas_Object *obj, const char *emission, const char *source)
 {
@@ -1004,6 +1090,29 @@ _show_region_hook(void *data, Evas_Object *obj)
 }
 
 static void
+_sub_del(void *data, Evas_Object *obj, void *event_info)
+{
+   Widget_Data *wd = data;
+   Evas_Object *sub = event_info;
+   Evas_Object *edje;
+
+   edje = elm_smart_scroller_edje_object_get(wd->scroller);
+   if (sub == wd->icon)
+     {
+        wd->icon = NULL;
+        if (edje)
+          edje_object_signal_emit(edje, "elm,action,hide,icon", "elm");
+     }
+   else if (sub == wd->end)
+     {
+        wd->end = NULL;
+        if (edje)
+          edje_object_signal_emit(edje, "elm,action,hide,end", "elm");
+     }
+   _sizing_eval(obj);
+}
+
+static void
 _hoversel_position(Evas_Object *obj)
 {
    Widget_Data *wd = elm_widget_data_get(obj);
@@ -2789,7 +2898,11 @@ elm_entry_add(Evas_Object *parent)
    elm_widget_highlight_ignore_set(obj, EINA_TRUE);
    elm_widget_text_set_hook_set(obj, _elm_entry_text_set);
    elm_widget_text_get_hook_set(obj, _elm_entry_text_get);
+   elm_widget_content_set_hook_set(obj, _content_set_hook);
+   elm_widget_content_unset_hook_set(obj, _content_unset_hook);
+   elm_widget_content_get_hook_set(obj, _content_get_hook);
 
+   evas_object_smart_callback_add(obj, "sub-object-del", _sub_del, wd);
    wd->scroller = elm_smart_scroller_add(e);
    elm_widget_sub_object_add(obj, wd->scroller);
    elm_smart_scroller_widget_set(wd->scroller, obj);
index f973501..54f27b6 100644 (file)
@@ -3590,6 +3590,18 @@ elm_object_item_text_part_get(const Elm_Object_Item *it, const char *part)
    return elm_widget_item_text_part_get(it, part);
 }
 
+EAPI void *
+elm_object_item_data_get(const Elm_Object_Item *it)
+{
+   return elm_widget_item_data_get(it);
+}
+
+EAPI void
+elm_object_item_data_set(Elm_Object_Item *it, void *data)
+{
+   elm_widget_item_data_set(it, data);
+}
+
 EAPI void
 elm_object_item_signal_emit(Elm_Object_Item *it, const char *emission, const char *source)
 {