patch from victor to make styles generic - not all widgets support them
authorCarsten Haitzler <raster@rasterman.com>
Thu, 23 Apr 2009 04:03:27 +0000 (04:03 +0000)
committerCarsten Haitzler <raster@rasterman.com>
Thu, 23 Apr 2009 04:03:27 +0000 (04:03 +0000)
tho... but calls to set style are now. old calls are left in place, but
likely will be phased out.

SVN revision: 40317

22 files changed:
src/lib/Elementary.h.in
src/lib/elm_bg.c
src/lib/elm_bubble.c
src/lib/elm_button.c
src/lib/elm_carousel.c
src/lib/elm_clock.c
src/lib/elm_entry.c
src/lib/elm_frame.c
src/lib/elm_genlist.c
src/lib/elm_hover.c
src/lib/elm_label.c
src/lib/elm_list.c
src/lib/elm_main.c
src/lib/elm_pager.c
src/lib/elm_priv.h
src/lib/elm_radio.c
src/lib/elm_scroller.c
src/lib/elm_slider.c
src/lib/elm_toggle.c
src/lib/elm_toolbar.c
src/lib/elm_widget.c
src/lib/elm_win.c

index 76ed67a..17ebf4a 100644 (file)
@@ -191,6 +191,9 @@ extern "C" {
        
    EAPI void         elm_object_scale_set(Evas_Object *obj, double scale);
    EAPI double       elm_object_scale_get(const Evas_Object *obj);
+   EAPI void         elm_object_style_set(Evas_Object *obj, const char *style);
+   EAPI const char  *elm_object_style_get(const Evas_Object *obj);
+
    EAPI double       elm_scale_get(void);
    EAPI void         elm_scale_set(double scale);
    EAPI Evas_Coord   elm_finger_size_get(void);
index 5996d34..4a799ba 100644 (file)
@@ -25,7 +25,7 @@ static void
 _theme_hook(Evas_Object *obj)
 {
    Widget_Data *wd = elm_widget_data_get(obj);
-   _elm_theme_set(wd->img, "bg", "base", "default");
+   _elm_theme_set(wd->img, "bg", "base", elm_widget_style_get(obj));
 }
 
 static void
index c23eea4..128894c 100644 (file)
@@ -29,7 +29,7 @@ static void
 _theme_hook(Evas_Object *obj)
 {
    Widget_Data *wd = elm_widget_data_get(obj);
-   _elm_theme_set(wd->bbl, "bubble", "base", "default");
+   _elm_theme_set(wd->bbl, "bubble", "base", elm_widget_style_get(obj));
    edje_object_part_text_set(wd->bbl, "elm.text", wd->label);
    edje_object_part_text_set(wd->bbl, "elm.info", wd->info);
    edje_object_scale_set(wd->bbl, elm_widget_scale_get(obj) * _elm_config->scale);
@@ -164,7 +164,7 @@ elm_bubble_corner_set(Evas_Object *obj, const char *corner)
 {
    Widget_Data *wd = elm_widget_data_get(obj);
    
-   _elm_theme_set(wd->bbl, "bubble", corner, "default");
+   _elm_theme_set(wd->bbl, "bubble", corner, elm_widget_style_get(obj));
    if (wd->icon)
      edje_object_part_swallow(wd->bbl, "elm.swallow.icon", wd->icon);
    if (wd->content)
index 8470482..eff1ad6 100644 (file)
@@ -8,7 +8,6 @@ struct _Widget_Data
    Evas_Object *btn;
    Evas_Object *icon;
    const char *label;
-   const char *style;
 };
 
 static void _del_hook(Evas_Object *obj);
@@ -24,7 +23,6 @@ _del_hook(Evas_Object *obj)
    Widget_Data *wd = elm_widget_data_get(obj);
    if (!wd) return;
    if (wd->label) eina_stringshare_del(wd->label);
-   if (wd->style) eina_stringshare_del(wd->style);
    free(wd);
 }
 
@@ -33,8 +31,7 @@ _theme_hook(Evas_Object *obj)
 {
    Widget_Data *wd = elm_widget_data_get(obj);
    if (!wd) return;
-   if (wd->style) _elm_theme_set(wd->btn, "button", "base", wd->style);
-   else _elm_theme_set(wd->btn, "button", "base", "default");
+   _elm_theme_set(wd->btn, "button", "base", elm_widget_style_get(obj));
    if (wd->icon)
      edje_object_part_swallow(wd->btn, "elm.swallow.content", wd->icon);
    if (wd->label)
@@ -174,10 +171,5 @@ elm_button_icon_set(Evas_Object *obj, Evas_Object *icon)
 EAPI void
 elm_button_style_set(Evas_Object *obj, const char *style)
 {
-   Widget_Data *wd = elm_widget_data_get(obj);
-   if (!wd) return;
-   if (wd->style) eina_stringshare_del(wd->style);
-   if (style) wd->style = eina_stringshare_add(style);
-   else wd->style = NULL;
-   _theme_hook(obj);
+   elm_widget_style_set(obj, style);
 }
index f118e9f..16aa487 100644 (file)
@@ -81,7 +81,7 @@ _theme_hook(Evas_Object *obj)
      {
         if (it->selected)
           edje_object_signal_emit(it->base, "elm,state,selected", "elm");
-        _elm_theme_set(it->base, "carousel", "item", "default");
+        _elm_theme_set(it->base, "carousel", "item", elm_widget_style_get(obj));
         edje_object_scale_set(it->base, elm_widget_scale_get(obj) * _elm_config->scale);
         if (it->icon)
           {
@@ -200,7 +200,7 @@ elm_carousel_item_add(Evas_Object *obj, Evas_Object *icon, const char *label, vo
    it->func = func;
    it->data = data;
    it->base = edje_object_add(evas_object_evas_get(obj));
-   _elm_theme_set(it->base, "carousel", "item", "default");
+   _elm_theme_set(it->base, "carousel", "item", elm_widget_style_get(obj));
    edje_object_signal_callback_add(it->base, "elm,action,click", "elm",
                                    _select, it);
    elm_widget_sub_object_add(obj, it->base);
index 4051829..28165e8 100644 (file)
@@ -176,6 +176,7 @@ _time_update(Evas_Object *obj)
    Widget_Data *wd = elm_widget_data_get(obj);
    Edje_Message_Int msg;
    int ampm = 0;
+   const char *style = elm_widget_style_get(obj);
 
    if ((wd->cur.seconds != wd->seconds) || (wd->cur.am_pm != wd->am_pm) ||
        (wd->cur.edit != wd->edit))
@@ -198,13 +199,13 @@ _time_update(Evas_Object *obj)
          }
        
        if ((wd->seconds) && (wd->am_pm))
-         _elm_theme_set(wd->clk, "clock", "base-all", "default");
+         _elm_theme_set(wd->clk, "clock", "base-all", style);
        else if (wd->seconds)
-         _elm_theme_set(wd->clk, "clock", "base-seconds", "default");
+         _elm_theme_set(wd->clk, "clock", "base-seconds", style);
        else if (wd->am_pm)
-         _elm_theme_set(wd->clk, "clock", "base-am_pm", "default");
+         _elm_theme_set(wd->clk, "clock", "base-am_pm", style);
        else
-         _elm_theme_set(wd->clk, "clock", "base", "default");
+         _elm_theme_set(wd->clk, "clock", "base", style);
         edje_object_scale_set(wd->clk, elm_widget_scale_get(obj) * _elm_config->scale);
        
        for (i = 0; i < 6; i++)
@@ -213,7 +214,7 @@ _time_update(Evas_Object *obj)
 
             if ((!wd->seconds) && (i >= 4)) break;
             wd->digit[i] = edje_object_add(evas_object_evas_get(wd->clk));
-            _elm_theme_set(wd->digit[i], "clock", "flipdigit", "default");
+            _elm_theme_set(wd->digit[i], "clock", "flipdigit", style);
              edje_object_scale_set(wd->digit[i], elm_widget_scale_get(obj) * _elm_config->scale);
             if (wd->edit)
               edje_object_signal_emit(wd->digit[i], "elm,state,edit,on", "elm");
@@ -233,7 +234,7 @@ _time_update(Evas_Object *obj)
        if (wd->am_pm)
          {
             wd->ampm = edje_object_add(evas_object_evas_get(wd->clk));
-            _elm_theme_set(wd->ampm, "clock", "flipampm", "default");
+            _elm_theme_set(wd->ampm, "clock", "flipampm", style);
              edje_object_scale_set(wd->ampm, elm_widget_scale_get(obj) * _elm_config->scale);
             if (wd->edit)
               edje_object_signal_emit(wd->ampm, "elm,state,edit,on", "elm");
index bf2178f..41634d5 100644 (file)
@@ -934,7 +934,7 @@ elm_entry_single_line_set(Evas_Object *obj, Evas_Bool single_line)
    wd->single_line = single_line;
    wd->linewrap = 0;
    t = eina_stringshare_add(elm_entry_entry_get(obj));
-   _elm_theme_set(wd->ent, "entry", _getbase(obj), "default");
+   _elm_theme_set(wd->ent, "entry", _getbase(obj), elm_widget_style_get(obj));
    elm_entry_entry_set(obj, t);
    eina_stringshare_del(t);
    _sizing_eval(obj);
@@ -950,7 +950,7 @@ elm_entry_password_set(Evas_Object *obj, Evas_Bool password)
    wd->single_line = 1;
    wd->linewrap = 0;
    t = eina_stringshare_add(elm_entry_entry_get(obj));
-   _elm_theme_set(wd->ent, "entry", _getbase(obj), "default");
+   _elm_theme_set(wd->ent, "entry", _getbase(obj), elm_widget_style_get(obj));
    elm_entry_entry_set(obj, t);
    eina_stringshare_del(t);
    _sizing_eval(obj);
@@ -1007,7 +1007,7 @@ elm_entry_line_wrap_set(Evas_Object *obj, Evas_Bool wrap)
    if (wd->linewrap == wrap) return;
    wd->linewrap = wrap;
    t = eina_stringshare_add(elm_entry_entry_get(obj));
-   _elm_theme_set(wd->ent, "entry", _getbase(obj), "default");
+   _elm_theme_set(wd->ent, "entry", _getbase(obj), elm_widget_style_get(obj));
    elm_entry_entry_set(obj, t);
    eina_stringshare_del(t);
    _sizing_eval(obj);
@@ -1021,7 +1021,7 @@ elm_entry_editable_set(Evas_Object *obj, Evas_Bool editable)
    if (wd->editable == editable) return;
    wd->editable = editable;
    t = eina_stringshare_add(elm_entry_entry_get(obj));
-   _elm_theme_set(wd->ent, "entry", _getbase(obj), "default");
+   _elm_theme_set(wd->ent, "entry", _getbase(obj), elm_widget_style_get(obj));
    elm_entry_entry_set(obj, t);
    eina_stringshare_del(t);
    _sizing_eval(obj);
index 675731a..954e984 100644 (file)
@@ -7,7 +7,6 @@ struct _Widget_Data
 {
    Evas_Object *frm;
    Evas_Object *content;
-   const char *style;
 };
 
 static void _del_hook(Evas_Object *obj);
@@ -20,7 +19,6 @@ static void
 _del_hook(Evas_Object *obj)
 {
    Widget_Data *wd = elm_widget_data_get(obj);
-   if (wd->style) eina_stringshare_del(wd->style);
    free(wd);
 }
 
@@ -28,8 +26,7 @@ static void
 _theme_hook(Evas_Object *obj)
 {
    Widget_Data *wd = elm_widget_data_get(obj);
-   if (wd->style) _elm_theme_set(wd->frm, "frame", "base", wd->style);
-   else _elm_theme_set(wd->frm, "frame", "base", "default");
+   _elm_theme_set(wd->frm, "frame", "base", elm_widget_style_get(obj));
    if (wd->content)
      edje_object_part_swallow(wd->frm, "elm.swallow.content", wd->content);
    edje_object_scale_set(wd->frm, elm_widget_scale_get(obj) * _elm_config->scale);
@@ -121,9 +118,5 @@ elm_frame_content_set(Evas_Object *obj, Evas_Object *content)
 EAPI void
 elm_frame_style_set(Evas_Object *obj, const char *style)
 {
-   Widget_Data *wd = elm_widget_data_get(obj);
-   if (wd->style) eina_stringshare_del(wd->style);
-   if (style) wd->style = eina_stringshare_add(style);
-   else wd->style = NULL;
-   _theme_hook(obj);
+   elm_widget_style_set(obj, style);
 }
index 0e361c0..0595467 100644 (file)
@@ -105,7 +105,7 @@ _theme_hook(Evas_Object *obj)
 {
    Widget_Data *wd = elm_widget_data_get(obj);
    Item_Block *itb;
-   elm_smart_scroller_theme_set(wd->scr, "scroller", "base", "default");
+   elm_smart_scroller_theme_set(wd->scr, "scroller", "base", elm_widget_style_get(obj));
    edje_object_scale_set(wd->scr, elm_widget_scale_get(obj) * _elm_config->scale);
    EINA_INLIST_FOREACH(wd->blocks, itb)
      {
@@ -320,7 +320,7 @@ _item_realize(Elm_Genlist_Item *it, int in, int calc)
         else
           snprintf(buf, sizeof(buf), "%s/%s", "item", it->itc->item_style);
      }
-   _elm_theme_set(it->base, "genlist", buf, "default");
+   _elm_theme_set(it->base, "genlist", buf, elm_widget_style_get(it->wd->obj));
    it->spacer = evas_object_rectangle_add(evas_object_evas_get(it->wd->obj));
    evas_object_color_set(it->spacer, 0, 0, 0, 0);
    elm_widget_sub_object_add(it->wd->obj, it->spacer);
index f911d3c..abf0783 100644 (file)
@@ -11,7 +11,6 @@ struct _Widget_Data
    Evas_Object *offset, *size;
    Evas_Object *parent, *target;
    Eina_List *subs;
-   const char *style;
 };
 
 struct _Subinfo
@@ -52,7 +51,6 @@ _del_pre_hook(Evas_Object *obj)
        evas_stringshare_del(si->swallow);
        free(si);
      }
-   if (wd->style) eina_stringshare_del(wd->style);
 }
 
 static void
@@ -67,8 +65,7 @@ _theme_hook(Evas_Object *obj)
 {
    Widget_Data *wd = elm_widget_data_get(obj);
    // FIXME: hover contents doesnt seem to propagate resizes properly
-   if (wd->style) _elm_theme_set(wd->cov, "hover", "base", wd->style);
-   else _elm_theme_set(wd->cov, "hover", "base", "default");
+   _elm_theme_set(wd->cov, "hover", "base", elm_widget_style_get(obj));
    edje_object_scale_set(wd->cov, elm_widget_scale_get(obj) * _elm_config->scale);
    _reval_content(obj);
    _sizing_eval(obj);
@@ -376,14 +373,8 @@ elm_hover_content_set(Evas_Object *obj, const char *swallow, Evas_Object *conten
 EAPI void
 elm_hover_style_set(Evas_Object *obj, const char *style)
 {
+   elm_widget_style_set(obj, style);
    Widget_Data *wd = elm_widget_data_get(obj);
-   if (wd->style) eina_stringshare_del(wd->style);
-   if (style) wd->style = eina_stringshare_add(style);
-   else wd->style = NULL;
-   if (wd->style) _elm_theme_set(wd->cov, "hover", "base", wd->style);
-   else _elm_theme_set(wd->cov, "hover", "base", "default");
-   _reval_content(obj);
-   _sizing_eval(obj);
 }
 
 EAPI const char *
index 77c3f54..72708ec 100644 (file)
@@ -25,7 +25,7 @@ static void
 _theme_hook(Evas_Object *obj)
 {
    Widget_Data *wd = elm_widget_data_get(obj);
-   _elm_theme_set(wd->lbl, "label", "base", "default");
+   _elm_theme_set(wd->lbl, "label", "base", elm_widget_style_get(obj));
    edje_object_part_text_set(wd->lbl, "elm.text", wd->label);
    edje_object_scale_set(wd->lbl, elm_widget_scale_get(obj) * _elm_config->scale);
    _sizing_eval(obj);
index 0258064..87f477b 100644 (file)
@@ -239,6 +239,7 @@ _fix_items(Evas_Object *obj)
    Evas_Coord minw[2] = { 0, 0 }, minh[2] = { 0, 0 };
    Evas_Coord mw, mh;
    int i, redo = 0;
+   const char *style = elm_widget_style_get(obj);
 
    EINA_LIST_FOREACH(wd->items, l, it)
      {
@@ -276,16 +277,16 @@ _fix_items(Evas_Object *obj)
              if (wd->mode == ELM_LIST_COMPRESS) 
                {
                   if (it->even)
-                    _elm_theme_set(it->base, "list", "item_compress", "default");
+                    _elm_theme_set(it->base, "list", "item_compress", style);
                   else
-                    _elm_theme_set(it->base, "list", "item_compress_odd", "default");
+                    _elm_theme_set(it->base, "list", "item_compress_odd", style);
                }
              else
                {
                   if (it->even)
-                    _elm_theme_set(it->base, "list", "item", "default");
+                    _elm_theme_set(it->base, "list", "item", style);
                   else
-                    _elm_theme_set(it->base, "list", "item_odd", "default");
+                    _elm_theme_set(it->base, "list", "item_odd", style);
                }
              stacking = edje_object_data_get(it->base, "stacking");
              if (stacking)
index 20657ef..2cbf49a 100644 (file)
@@ -646,6 +646,18 @@ elm_object_scale_get(const Evas_Object *obj)
    return elm_widget_scale_get(obj);
 }
 
+EAPI void
+elm_object_style_set(Evas_Object *obj, const char *style)
+{
+   elm_widget_style_set(obj, style);
+}
+
+EAPI const char *
+elm_object_style_get(const Evas_Object *obj)
+{
+   return elm_widget_style_get(obj);
+}
+
 EAPI double
 elm_scale_get(void)
 {
index b80645c..6ceb75d 100644 (file)
@@ -202,7 +202,7 @@ elm_pager_content_push(Evas_Object *obj, Evas_Object *content)
    evas_object_resize(it->base, w, h);
    elm_widget_sub_object_add(obj, it->base); 
    elm_widget_sub_object_add(obj, it->content);
-   _elm_theme_set(it->base,  "pager", "base", "default");
+   _elm_theme_set(it->base,  "pager", "base", elm_widget_style_get(obj));
    edje_object_signal_callback_add(it->base, "elm,action,hide,finished", "", _signal_hide_finished, it);
    edje_object_part_swallow(it->base, "elm.swallow.content", it->content);
    edje_object_size_min_calc(it->base, &it->minw, &it->minh);
index b704775..b88d9a0 100644 (file)
@@ -103,6 +103,8 @@ EAPI void         elm_widget_scroll_freeze_pop(Evas_Object *obj);
 EAPI int          elm_widget_scroll_freeze_get(const Evas_Object *obj);
 EAPI void         elm_widget_scale_set(Evas_Object *obj, double scale);
 EAPI double       elm_widget_scale_get(const Evas_Object *obj);
+EAPI void         elm_widget_style_set(Evas_Object *obj, const char *style);
+EAPI const char  *elm_widget_style_get(const Evas_Object *obj);
 
 extern char *_elm_appname;
 extern Elm_Config *_elm_config;
index 5d6c427..31e162a 100644 (file)
@@ -44,7 +44,7 @@ static void
 _theme_hook(Evas_Object *obj)
 {
    Widget_Data *wd = elm_widget_data_get(obj);
-   _elm_theme_set(wd->chk, "radio", "base", "default");
+   _elm_theme_set(wd->chk, "radio", "base", elm_widget_style_get(obj));
    if (wd->icon)
      edje_object_signal_emit(wd->chk, "elm,state,icon,visible", "elm");
    else
index ddf6c23..beb34d3 100644 (file)
@@ -30,7 +30,7 @@ _theme_hook(Evas_Object *obj)
 {
    Widget_Data *wd = elm_widget_data_get(obj);
    if (!wd) return;
-   elm_smart_scroller_theme_set(wd->scr, "scroller", "base", "default");
+   elm_smart_scroller_theme_set(wd->scr, "scroller", "base", elm_widget_style_get(obj));
    edje_object_scale_set(wd->scr, elm_widget_scale_get(obj) * _elm_config->scale);
    _sizing_eval(obj);
 }
index 34bb303..c869825 100644 (file)
@@ -41,9 +41,9 @@ _theme_hook(Evas_Object *obj)
 {
    Widget_Data *wd = elm_widget_data_get(obj);
    if (wd->horizontal)
-     _elm_theme_set(wd->slider, "slider", "horizontal", "default");
+     _elm_theme_set(wd->slider, "slider", "horizontal", elm_widget_style_get(obj));
    else
-     _elm_theme_set(wd->slider, "slider", "vertical", "default");
+     _elm_theme_set(wd->slider, "slider", "vertical", elm_widget_style_get(obj));
    if (wd->inverted)
      edje_object_signal_emit(wd->slider, "elm,state,inverted,on", "elm");
    else
index 1f8ecb3..a8576fa 100644 (file)
@@ -35,7 +35,7 @@ static void
 _theme_hook(Evas_Object *obj)
 {
    Widget_Data *wd = elm_widget_data_get(obj);
-   _elm_theme_set(wd->tgl, "toggle", "base", "default");
+   _elm_theme_set(wd->tgl, "toggle", "base", elm_widget_style_get(obj));
    if (wd->icon)
      edje_object_signal_emit(wd->tgl, "elm,state,icon,visible", "elm");
    else
index 7382364..87db110 100644 (file)
@@ -84,13 +84,15 @@ _theme_hook(Evas_Object *obj)
    const Eina_List *l;
    Elm_Toolbar_Item *it;
    Evas_Coord mw, mh;
+   const char *style = elm_widget_style_get(obj);
+
    edje_object_scale_set(wd->scr, elm_widget_scale_get(obj) * _elm_config->scale);
    EINA_LIST_FOREACH(wd->items, l, it)
      {
         edje_object_scale_set(it->base, elm_widget_scale_get(obj) * _elm_config->scale);
         if (it->selected)
           edje_object_signal_emit(it->base, "elm,state,selected", "elm");
-        _elm_theme_set(it->base, "toolbar", "item", "default");
+        _elm_theme_set(it->base, "toolbar", "item", style);
         if (it->icon)
           {
              edje_extern_object_min_size_set(it->icon, 
@@ -220,7 +222,7 @@ elm_toolbar_item_add(Evas_Object *obj, Evas_Object *icon, const char *label, voi
    it->func = func;
    it->data = data;
    it->base = edje_object_add(evas_object_evas_get(obj));
-   _elm_theme_set(it->base, "toolbar", "item", "default");
+   _elm_theme_set(it->base, "toolbar", "item", elm_widget_style_get(obj));
    edje_object_signal_callback_add(it->base, "elm,action,click", "elm",
                                    _select, it);
    elm_widget_sub_object_add(obj, it->base);
index b5101fb..03dbd8f 100644 (file)
@@ -38,6 +38,7 @@ struct _Smart_Data
    int            scroll_hold;
    int            scroll_freeze;
    double         scale;
+   const char    *style;
    unsigned char  can_focus : 1;
    unsigned char  child_can_focus : 1;
    unsigned char  focused : 1;
@@ -767,6 +768,26 @@ elm_widget_scale_get(const Evas_Object *obj)
    return sd->scale;
 }
 
+EAPI void
+elm_widget_style_set(Evas_Object *obj, const char *style)
+{
+   const char *old;
+   API_ENTRY return;
+   old = sd->style;
+   eina_stringshare_del(sd->style);
+   sd->style = eina_stringshare_add(style);
+   if (old != sd->style)
+     elm_widget_theme(obj);
+}
+
+EAPI const char *
+elm_widget_style_get(const Evas_Object *obj)
+{
+   API_ENTRY return "default";
+   if (sd->style) return sd->style;
+   return "default";
+}
+
 /* local subsystem functions */
 static void
 _smart_reconfigure(Smart_Data *sd)
index 470608e..2619490 100644 (file)
@@ -602,7 +602,6 @@ struct _Widget_Data
 {
    Evas_Object *frm;
    Evas_Object *content;
-   const char *style;
 };
 
 static void _del_hook(Evas_Object *obj);
@@ -615,7 +614,6 @@ static void
 _del_hook(Evas_Object *obj)
 {
    Widget_Data *wd = elm_widget_data_get(obj);
-   if (wd->style) eina_stringshare_del(wd->style);
    free(wd);
 }
 
@@ -623,8 +621,7 @@ static void
 _theme_hook(Evas_Object *obj)
 {
    Widget_Data *wd = elm_widget_data_get(obj);
-   if (wd->style) _elm_theme_set(wd->frm, "win", "inwin", wd->style);
-   else _elm_theme_set(wd->frm, "win", "inwin", "default");
+   _elm_theme_set(wd->frm, "win", "inwin", elm_widget_style_get(obj));
    if (wd->content)
      edje_object_part_swallow(wd->frm, "elm.swallow.content", wd->content);
    _sizing_eval(obj);
@@ -694,11 +691,7 @@ elm_win_inwin_add(Evas_Object *obj)
 EAPI void
 elm_win_inwin_style_set(Evas_Object *obj, const char *style)
 {
-   Widget_Data *wd = elm_widget_data_get(obj);
-   if (wd->style) eina_stringshare_del(wd->style);
-   if (style) wd->style = eina_stringshare_add(style);
-   else wd->style = NULL;
-   _theme_hook(obj);
+   elm_widget_style_set(obj, style);
 }
 
 EAPI void