better kbd focus handling and inwin is there.
authorCarsten Haitzler <raster@rasterman.com>
Tue, 30 Dec 2008 16:19:46 +0000 (16:19 +0000)
committerCarsten Haitzler <raster@rasterman.com>
Tue, 30 Dec 2008 16:19:46 +0000 (16:19 +0000)
SVN revision: 38357

data/themes/default.edc
src/lib/Elementary.h.in
src/lib/elc_notepad.c
src/lib/elm_entry.c
src/lib/elm_main.c
src/lib/elm_widget.c
src/lib/elm_win.c
src/lib/els_box.c

index 1f8d8b0..93aba0c 100644 (file)
@@ -4716,4 +4716,86 @@ collections {
          }
       }
    }
+
+///////////////////////////////////////////////////////////////////////////////
+   group { name: "elm/win/inwin/default";
+      images {
+        image: "shad_circ.png" COMP;
+        image: "bt_dis_base.png" COMP;
+        image: "bt_dis_hilight.png" COMP;
+      }
+      parts {
+        part { name: "base";
+           type: RECT;
+           mouse_events: 1;
+           description { state: "default" 0.0;
+              color: 0 0 0 0;
+           }
+           description { state: "visible" 0.0;
+              inherit: "default" 1.0;
+              color: 0 0 0 64;
+           }
+        }
+         part { name: "shad";
+           mouse_events:  0;   
+           description { state: "default" 0.0;
+              image.normal: "shad_circ.png";
+              rel1.to: "elm.swallow.content";
+              rel1.offset: -64 -64;
+              rel2.to: "elm.swallow.content";
+              rel2.offset: 63 63;
+               fill.smooth: 0;
+           }
+        }
+        part { name: "pop";
+           mouse_events: 1;
+           description { state: "default" 0.0;
+              rel1.to: "elm.swallow.content";
+               rel1.offset: -5 -5;
+              rel2.to: "elm.swallow.content";
+               rel2.offset: 4 4;
+               image {
+                 normal: "bt_dis_base.png";
+                 border: 4 4 4 4;
+              }
+           }
+        }
+         part { name: "popover";
+           mouse_events: 0;
+           description { state: "default" 0.0;
+              rel1.to: "pop";
+              rel2.to: "pop";
+              rel2.relative: 1.0 0.5;
+              image {
+                 normal: "bt_dis_hilight.png";
+                 border: 4 4 4 0;
+              }
+           }
+        }
+        part { name: "elm.swallow.content";
+            type: SWALLOW;
+           description { state: "default" 0.0;
+               rel1.relative: 0.2 0.2;
+               rel2.relative: 0.8 0.8;
+           }
+        }
+      }
+      programs {
+        program { name: "show";
+            signal: "elm,action,show";
+           source: "elm";
+           action: STATE_SET "visible" 0.0;
+//         transition: DECELERATE 0.5;
+           target: "base";
+        }
+        program { name: "hide";
+            signal: "elm,action,hide";
+           source: "elm";
+           action: STATE_SET "default" 0.0;
+//         transition: DECELERATE 0.5;
+           target: "base";
+        }
+      }
+   }
+
 }
index b0601ae..8154d73 100644 (file)
@@ -150,6 +150,11 @@ extern "C" {
    EAPI void         elm_win_override_set(Evas_Object *obj, Evas_Bool override);
    EAPI void         elm_win_keyboard_mode_set(Evas_Object *obj, Elm_Win_Keyboard_Mode mode);
    EAPI void         elm_win_keyboard_win_set(Evas_Object *obj, Evas_Bool is_keyboard);
+
+   EAPI Evas_Object *elm_win_inwin_add(Evas_Object *obj);
+   EAPI void         elm_win_inwin_activate(Evas_Object *obj);
+   EAPI void         elm_win_inwin_style_set(Evas_Object *obj, const char *style);
+       
    /* X specific calls - won't work on non-x engines (return 0) */
    EAPI Ecore_X_Window elm_win_xwindow_get(Evas_Object *obj);   
    /* smart callbacks called:
@@ -426,7 +431,7 @@ extern "C" {
 // * slider widget
 // 
 // * carousel selector widget
-// * in-window dialog container widget
+// * in-window dialog container widget (push/pop)
 // * separator widget (h/v)
 // * slide-open "panel" that can hold stuff and optionally scroll
 // * calendar widget (select date)
index e902c8e..8c46f7e 100644 (file)
@@ -46,7 +46,8 @@ static void
 _on_focus_hook(void *data, Evas_Object *obj)
 {
    Widget_Data *wd = elm_widget_data_get(obj);
-   elm_widget_focus_steal(wd->entry);
+   if (elm_widget_focus_get(obj))
+     elm_widget_focus_steal(wd->entry);
 }
 
 static char *
index bfe6d32..fa80f12 100644 (file)
@@ -118,12 +118,14 @@ _on_focus_hook(void *data, Evas_Object *obj)
         evas_object_focus_set(wd->ent, 1);
         edje_object_signal_emit(wd->ent, "elm,action,focus", "elm");
         elm_win_keyboard_mode_set(top, ELM_WIN_KEYBOARD_ON);
+        printf("foc on %p\n", obj);
      }
    else
      {
         edje_object_signal_emit(wd->ent, "elm,action,unfocus", "elm");
         evas_object_focus_set(wd->ent, 0);
         elm_win_keyboard_mode_set(top, ELM_WIN_KEYBOARD_OFF);
+        printf("foc off %p\n", obj);
      }
 }
 
index 325f9a6..df5ef74 100644 (file)
@@ -60,7 +60,6 @@ _elm_window_property_change(void *data, int ev_type, void *ev)
 static void
 _elm_rescale(void)
 {
-   printf("Scale %3.3f\n", _elm_config->scale); 
    edje_scale_set(_elm_config->scale);
    _elm_win_rescale();
 }
index aefae12..703463c 100644 (file)
@@ -323,8 +323,8 @@ elm_widget_focus_jump(Evas_Object *obj, int forward)
      {
        if (!sd->focused) sd->focused = 1;
        else sd->focused = 0;
-       sd->focus_func(obj);
        if (sd->on_focus_func) sd->on_focus_func(sd->on_focus_data, obj);
+       sd->focus_func(obj);
        return sd->focused;
      }
    /* its some container */
@@ -345,6 +345,7 @@ elm_widget_focus_jump(Evas_Object *obj, int forward)
          {
             if (forward)
               {
+                  // FIXME: sd->resize_obj acocunt for
                  for (l = sd->subobjs; l; l = l->next)
                    {
                       if (elm_widget_can_focus_get(l->data))
@@ -396,11 +397,16 @@ elm_widget_focus_jump(Evas_Object *obj, int forward)
                              }
                         }
                    }
+                  // FIXME: sd->resize_obj acocunt for
               }
          }
      }
    /* no next item can be focused */
-   sd->focused = 0;
+   if (sd->focused)
+     {
+        sd->focused = 0;
+        if (sd->on_focus_func) sd->on_focus_func(sd->on_focus_data, obj);
+     }
    return 0;
 }
 
@@ -424,15 +430,23 @@ elm_widget_focus_set(Evas_Object *obj, int first)
             
        if (first)
          {
-            for (l = sd->subobjs; l; l = l->next)
-              {
-                 if ((elm_widget_can_focus_get(l->data)) &&
-                     (!elm_widget_disabled_get(l->data)))
-                   {
-                      elm_widget_focus_set(l->data, first);
-                      break;
-                   }
-              }
+             if ((elm_widget_can_focus_get(sd->resize_obj)) &&
+                 (!elm_widget_disabled_get(sd->resize_obj)))
+               {
+                  elm_widget_focus_set(sd->resize_obj, first);
+               }
+             else
+               {
+                  for (l = sd->subobjs; l; l = l->next)
+                    {
+                       if ((elm_widget_can_focus_get(l->data)) &&
+                           (!elm_widget_disabled_get(l->data)))
+                         {
+                            elm_widget_focus_set(l->data, first);
+                            break;
+                         }
+                    }
+               }
          }
        else
          {
@@ -445,6 +459,14 @@ elm_widget_focus_set(Evas_Object *obj, int first)
                       break;
                    }
               }
+             if (!l)
+               {
+                  if ((elm_widget_can_focus_get(sd->resize_obj)) &&
+                      (!elm_widget_disabled_get(sd->resize_obj)))
+                    {
+                       elm_widget_focus_set(sd->resize_obj, first);
+                    }
+               }
          }
      }
 }
@@ -462,17 +484,42 @@ elm_widget_focused_object_clear(Evas_Object *obj)
    Eina_List *l;
    API_ENTRY return;
    if (!sd->focused) return;
-   sd->focused = 0;
-   for (l = sd->subobjs; l; l = l->next)
-     {  
-       if (elm_widget_focus_get(l->data))
-         {
-            elm_widget_focused_object_clear(l->data);
-            break;
-         }
+   if (elm_widget_focus_get(sd->resize_obj))
+     {
+        elm_widget_focused_object_clear(sd->resize_obj);
+     }
+   else
+     {
+        for (l = sd->subobjs; l; l = l->next)
+          {  
+             if (elm_widget_focus_get(l->data))
+               {
+                  elm_widget_focused_object_clear(l->data);
+                  break;
+               }
+          }
      }
+   printf("CLEAR %p %i\n", obj, sd->focused);
+   sd->focused = 0;
+   if (sd->on_focus_func) sd->on_focus_func(sd->on_focus_data, obj);
    if (sd->focus_func) sd->focus_func(obj);
+}
+
+static void
+_elm_widget_parent_focus(Evas_Object *obj)
+{
+   API_ENTRY return;
+   Evas_Object *o = elm_widget_parent_get(obj);
+   if (sd->focused)
+     {
+        printf("STOp @ %p\n", obj);
+        return;
+     }
+   if (o) _elm_widget_parent_focus(o);
+   printf("DOF %p\n", obj);
+   sd->focused = 1;
    if (sd->on_focus_func) sd->on_focus_func(sd->on_focus_data, obj);
+   if (sd->focus_func) sd->focus_func(obj);
 }
 
 EAPI void
@@ -482,26 +529,45 @@ elm_widget_focus_steal(Evas_Object *obj)
    API_ENTRY return;
    if (sd->focused) return;
    if (sd->disabled) return;
+   printf("elm_widget_focus_steal %p...\n", obj);
    parent = obj;
    for (;;)
      {
        o = elm_widget_parent_get(parent);
        if (!o) break;
+        sd = evas_object_smart_data_get(o);
+        printf("stop2 @ %p\n", o);
+        if (sd->focused) break;
        parent = o;
      }
-   elm_widget_focused_object_clear(parent);
-   parent = obj;
-   for (;;)
+   printf("steal clear, parent %p\n", parent);
+   if (!elm_widget_parent_get(parent))
+     elm_widget_focused_object_clear(parent);
+   else
      {
-       sd = evas_object_smart_data_get(parent);
-       sd->focused = 1;
-       if (sd->on_focus_func) sd->on_focus_func(sd->on_focus_data, parent);
-       o = elm_widget_parent_get(parent);
-       if (!o) break;
-       parent = o;
+        Eina_List *l;
+        parent = elm_widget_parent_get(parent);
+        sd = evas_object_smart_data_get(parent);
+        if (elm_widget_focus_get(sd->resize_obj))
+          {  
+             printf("clear on sub %p\n", sd->resize_obj);
+             elm_widget_focused_object_clear(sd->resize_obj);
+          }
+        else
+          {
+             for (l = sd->subobjs; l; l = l->next)
+               {
+                  if (elm_widget_focus_get(l->data))
+                    {
+                       printf("clear on sub %p\n", l->data);
+                       elm_widget_focused_object_clear(l->data);
+                       break;
+                    }
+               }
+          }
      }
-   sd = evas_object_smart_data_get(obj);
-   if (sd->focus_func) sd->focus_func(obj);
+   printf("focus parents %p\n", obj);
+   _elm_widget_parent_focus(obj);
    return;
 }
 
index 54306e3..c8882de 100644 (file)
@@ -36,7 +36,7 @@ static Eina_List *_elm_win_list = NULL;
 static void
 _elm_win_resize(Ecore_Evas *ee)
 {
-   Elm_Win *win = evas_object_data_get(ecore_evas_object_associate_get(ee), "__Elm");
+   Elm_Win *win = elm_widget_data_get(ecore_evas_object_associate_get(ee));
    if (!win) return;
    if (win->deferred_resize_job) ecore_job_del(win->deferred_resize_job);
    win->deferred_resize_job = ecore_job_add(_elm_win_resize_job, win);
@@ -76,7 +76,7 @@ _elm_win_obj_callback_del(void *data, Evas *e, Evas_Object *obj, void *event_inf
 static void
 _elm_win_delete_request(Ecore_Evas *ee)
 {
-   Elm_Win *win = evas_object_data_get(ecore_evas_object_associate_get(ee), "__Elm");
+   Elm_Win *win = elm_widget_data_get(ecore_evas_object_associate_get(ee));
    if (!win) return;
    int autodel = win->autodel;
    win->autodel_clear = &autodel;
@@ -138,7 +138,7 @@ _elm_win_xwin_update(Elm_Win *win)
      {
        Elm_Win *win2;
        
-       win2 = evas_object_data_get(win->parent, "__Elm");
+       win2 = elm_widget_data_get(win->parent);
        if (win2)
          {
             if (win->xwin)
@@ -172,7 +172,7 @@ static void
 _elm_win_eval_subobjs(Evas_Object *obj)
 {
    Eina_List *l;
-   Elm_Win *win = evas_object_data_get(obj, "__Elm");
+   Elm_Win *win = elm_widget_data_get(obj);
    Evas_Coord w, h, minw = -1, minh = -1, maxw = -1, maxh = -1;
    int xx = 1, xy = 1;
    double wx, wy;
@@ -286,12 +286,12 @@ elm_win_add(Evas_Object *parent, const char *name, Elm_Win_Type type)
    
    win->evas = ecore_evas_get(win->ee);
    win->win_obj = elm_widget_add(win->evas);
+   elm_widget_data_set(win->win_obj, win);
    evas_object_color_set(win->win_obj, 0, 0, 0, 0);
    evas_object_move(win->win_obj, 0, 0);
    evas_object_resize(win->win_obj, 1, 1);
    evas_object_layer_set(win->win_obj, 50);
    evas_object_pass_events_set(win->win_obj, 1);
-   evas_object_data_set(win->win_obj, "__Elm", win);
 
    ecore_evas_object_associate(win->ee, win->win_obj,
                                ECORE_EVAS_OBJECT_ASSOCIATE_BASE |
@@ -301,7 +301,6 @@ elm_win_add(Evas_Object *parent, const char *name, Elm_Win_Type type)
                                   _elm_win_obj_callback_del, win);
    
    ecore_evas_name_class_set(win->ee, name, _elm_appname);
-   ecore_evas_data_set(win->ee, "__Elm", win);
    ecore_evas_callback_delete_request_set(win->ee, _elm_win_delete_request);
    ecore_evas_callback_resize_set(win->ee, _elm_win_resize);
    // FIXME: use elm config for this
@@ -337,19 +336,23 @@ elm_win_add(Evas_Object *parent, const char *name, Elm_Win_Type type)
 EAPI void
 elm_win_resize_object_add(Evas_Object *obj, Evas_Object *subobj)
 {
-   Elm_Win *win = evas_object_data_get(obj, "__Elm");
+   Elm_Win *win = elm_widget_data_get(obj);
+   Evas_Coord w, h;
    if (!win) return;
    win->subobjs = eina_list_append(win->subobjs, subobj);
    elm_widget_sub_object_add(obj, subobj);
    evas_object_event_callback_add(subobj, EVAS_CALLBACK_DEL, _elm_win_subobj_callback_del, obj);
    evas_object_event_callback_add(subobj, EVAS_CALLBACK_CHANGED_SIZE_HINTS, _elm_win_subobj_callback_changed_size_hints, obj);
+   ecore_evas_geometry_get(win->ee, NULL, NULL, &w, &h);
+   evas_object_move(subobj, 0, 0);
+   evas_object_resize(subobj, w, h);
    _elm_win_eval_subobjs(obj);
 }
 
 EAPI void
 elm_win_resize_object_del(Evas_Object *obj, Evas_Object *subobj)
 {
-   Elm_Win *win = evas_object_data_get(obj, "__Elm");
+   Elm_Win *win = elm_widget_data_get(obj);
    if (!win) return;
    evas_object_event_callback_del(subobj, EVAS_CALLBACK_CHANGED_SIZE_HINTS, _elm_win_subobj_callback_changed_size_hints);
    evas_object_event_callback_del(subobj, EVAS_CALLBACK_DEL, _elm_win_subobj_callback_del);
@@ -361,7 +364,7 @@ elm_win_resize_object_del(Evas_Object *obj, Evas_Object *subobj)
 EAPI void
 elm_win_title_set(Evas_Object *obj, const char *title)
 {
-   Elm_Win *win = evas_object_data_get(obj, "__Elm");
+   Elm_Win *win = elm_widget_data_get(obj);
    if (!win) return;
    ecore_evas_title_set(win->ee, title);
 }
@@ -369,7 +372,7 @@ elm_win_title_set(Evas_Object *obj, const char *title)
 EAPI void
 elm_win_autodel_set(Evas_Object *obj, Evas_Bool autodel)
 {
-   Elm_Win *win = evas_object_data_get(obj, "__Elm");
+   Elm_Win *win = elm_widget_data_get(obj);
    if (!win) return;
    win->autodel = autodel;
 }
@@ -377,7 +380,7 @@ elm_win_autodel_set(Evas_Object *obj, Evas_Bool autodel)
 EAPI void
 elm_win_activate(Evas_Object *obj)
 {
-   Elm_Win *win = evas_object_data_get(obj, "__Elm");
+   Elm_Win *win = elm_widget_data_get(obj);
    if (!win) return;
    ecore_evas_activate(win->ee);
 }
@@ -385,7 +388,7 @@ elm_win_activate(Evas_Object *obj)
 EAPI void
 elm_win_borderless_set(Evas_Object *obj, Evas_Bool borderless)
 {
-   Elm_Win *win = evas_object_data_get(obj, "__Elm");
+   Elm_Win *win = elm_widget_data_get(obj);
    if (!win) return;
    ecore_evas_borderless_set(win->ee, borderless);
    _elm_win_xwin_update(win);
@@ -394,7 +397,7 @@ elm_win_borderless_set(Evas_Object *obj, Evas_Bool borderless)
 EAPI void
 elm_win_shaped_set(Evas_Object *obj, Evas_Bool shaped)
 {
-   Elm_Win *win = evas_object_data_get(obj, "__Elm");
+   Elm_Win *win = elm_widget_data_get(obj);
    if (!win) return;
    ecore_evas_shaped_set(win->ee, shaped);
    _elm_win_xwin_update(win);
@@ -403,7 +406,7 @@ elm_win_shaped_set(Evas_Object *obj, Evas_Bool shaped)
 EAPI void
 elm_win_alpha_set(Evas_Object *obj, Evas_Bool alpha)
 {
-   Elm_Win *win = evas_object_data_get(obj, "__Elm");
+   Elm_Win *win = elm_widget_data_get(obj);
    if (!win) return;
    if (win->xwin)
      {
@@ -425,7 +428,7 @@ elm_win_alpha_set(Evas_Object *obj, Evas_Bool alpha)
 EAPI void
 elm_win_override_set(Evas_Object *obj, Evas_Bool override)
 {
-   Elm_Win *win = evas_object_data_get(obj, "__Elm");
+   Elm_Win *win = elm_widget_data_get(obj);
    if (!win) return;
    ecore_evas_override_set(win->ee, override);
    _elm_win_xwin_update(win);
@@ -434,7 +437,7 @@ elm_win_override_set(Evas_Object *obj, Evas_Bool override)
 EAPI void
 elm_win_keyboard_mode_set(Evas_Object *obj, Elm_Win_Keyboard_Mode mode)
 {
-   Elm_Win *win = evas_object_data_get(obj, "__Elm");
+   Elm_Win *win = elm_widget_data_get(obj);
    if (!win) return;
    if (mode == win->kbdmode) return;
    _elm_win_xwindow_get(win);
@@ -449,7 +452,7 @@ elm_win_keyboard_mode_set(Evas_Object *obj, Elm_Win_Keyboard_Mode mode)
 EAPI void
 elm_win_keyboard_win_set(Evas_Object *obj, Evas_Bool is_keyboard)
 {
-   Elm_Win *win = evas_object_data_get(obj, "__Elm");
+   Elm_Win *win = elm_widget_data_get(obj);
    if (!win) return;
    _elm_win_xwindow_get(win);
 #ifdef HAVE_ELEMENTARY_X   
@@ -459,10 +462,147 @@ elm_win_keyboard_win_set(Evas_Object *obj, Evas_Bool is_keyboard)
 #endif   
 }
 
+typedef struct _Widget_Data Widget_Data;
+
+struct _Widget_Data
+{
+   Evas_Object *frm;
+   Evas_Object *content;
+   const char *style;
+};
+
+static void _del_hook(Evas_Object *obj);
+static void _theme_hook(Evas_Object *obj);
+static void _sizing_eval(Evas_Object *obj);
+static void _changed_size_hints(void *data, Evas *e, Evas_Object *obj, void *event_info);
+static void _sub_del(void *data, Evas_Object *obj, void *event_info);
+
+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);
+}
+
+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");
+   if (wd->content)
+     edje_object_part_swallow(wd->frm, "elm.swallow.content", wd->content);
+   _sizing_eval(obj);
+}
+
+static void
+_sizing_eval(Evas_Object *obj)
+{
+   Widget_Data *wd = elm_widget_data_get(obj);
+   Evas_Coord minw = -1, minh = -1, maxw = -1, maxh = -1;
+   
+   evas_object_size_hint_min_get(wd->content, &minw, &minh);
+   edje_object_size_min_calc(wd->frm, &minw, &minh);
+   evas_object_size_hint_min_set(obj, minw, minh);
+   evas_object_size_hint_max_set(obj, maxw, maxh);
+}
+
+static void
+_changed_size_hints(void *data, Evas *e, Evas_Object *obj, void *event_info)
+{
+   Widget_Data *wd = elm_widget_data_get(data);
+   edje_object_part_swallow(wd->frm, "elm.swallow.content", obj);
+   _sizing_eval(data);
+}
+
+static void
+_sub_del(void *data, Evas_Object *obj, void *event_info)
+{
+   Widget_Data *wd = elm_widget_data_get(obj);
+   Evas_Object *sub = event_info;
+   if (sub == wd->content)
+     {
+        evas_object_event_callback_del
+          (sub, EVAS_CALLBACK_CHANGED_SIZE_HINTS, _changed_size_hints);
+        wd->content = NULL;
+        _sizing_eval(obj);
+     }
+}
+
+EAPI Evas_Object *
+elm_win_inwin_add(Evas_Object *obj)
+{
+   Elm_Win *win = elm_widget_data_get(obj);
+   Evas_Object *obj2;
+   Widget_Data *wd;
+   if (!win) return NULL;
+   wd = ELM_NEW(Widget_Data);
+   obj2 = elm_widget_add(win->evas);
+   evas_object_size_hint_weight_set(obj2, 1.0, 1.0);
+   evas_object_size_hint_align_set(obj2, -1.0, -1.0);
+   elm_win_resize_object_add(obj, obj2);
+   
+   elm_widget_data_set(obj2, wd);
+   elm_widget_del_hook_set(obj2, _del_hook);
+   elm_widget_theme_hook_set(obj2, _theme_hook);
+   
+   wd->frm = edje_object_add(win->evas);
+   _elm_theme_set(wd->frm, "win", "inwin", "default");
+   elm_widget_resize_object_set(obj2, wd->frm);
+   
+   evas_object_smart_callback_add(obj2, "sub-object-del", _sub_del, obj2);
+   
+   _sizing_eval(obj2);
+   return obj2;
+}
+
+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);
+}
+
+EAPI void
+elm_win_inwin_activate(Evas_Object *obj)
+{
+   Widget_Data *wd = elm_widget_data_get(obj);
+   evas_object_raise(obj);
+   evas_object_show(obj);
+   edje_object_signal_emit(wd->frm, "elm,action,show", "elm");
+   printf("clear parent focus %p [%p]\n", 
+          elm_widget_parent_get(obj),
+          elm_widget_parent_get(elm_widget_parent_get(obj))
+          );
+   elm_widget_focused_object_clear(elm_widget_parent_get(obj));
+}
+
+EAPI void
+elm_win_inwin_content_set(Evas_Object *obj, Evas_Object *content)
+{
+   Widget_Data *wd = elm_widget_data_get(obj);
+   if ((wd->content != content) && (wd->content))
+     elm_widget_sub_object_del(obj, wd->content);
+   wd->content = content;
+   if (content)
+     {
+        elm_widget_sub_object_add(obj, content);
+        edje_object_part_swallow(wd->frm, "elm.swallow.content", content);
+        evas_object_event_callback_add(content, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
+                                       _changed_size_hints, obj);
+        _sizing_eval(obj);
+     }
+}
+
+/* windowing spcific calls - shall we do this differently? */
 EAPI Ecore_X_Window
 elm_win_xwindow_get(Evas_Object *obj)
 {
-   Elm_Win *win = evas_object_data_get(obj, "__Elm");
+   Elm_Win *win = elm_widget_data_get(obj);
    if (!win) return 0;
    _elm_win_xwindow_get(win);
    return win->xwin;
index a0a7746..9bc8d27 100644 (file)
@@ -483,7 +483,6 @@ _smart_del(Evas_Object *obj)
        Evas_Object *child;
        
        child = sd->items->data;
-       printf("_smart_del -> _els_smart_box_unpack\n");
        _els_smart_box_unpack(child);
      }
    evas_object_del(sd->clip);