warning fix 1. :)
authorCarsten Haitzler <raster@rasterman.com>
Tue, 9 Mar 2010 07:30:48 +0000 (07:30 +0000)
committerCarsten Haitzler <raster@rasterman.com>
Tue, 9 Mar 2010 07:30:48 +0000 (07:30 +0000)
SVN revision: 47074

12 files changed:
src/lib/elm_bg.c
src/lib/elm_button.c
src/lib/elm_icon.c
src/lib/elm_image.c
src/lib/elm_label.c
src/lib/elm_main.c
src/lib/elm_priv.h
src/lib/elm_scroller.c
src/lib/elm_theme.c
src/lib/elm_toggle.c
src/lib/elm_widget.c
src/lib/elm_win.c

index 16b699a..f3395a9 100644 (file)
@@ -40,7 +40,6 @@ _theme_hook(Evas_Object *obj)
 static void
 _custom_resize(void *data, Evas *a, Evas_Object *obj, void *event_info)
 {
-   Widget_Data *wd = data;
    int iw = 0, ih = 0;
    Evas_Coord x, y, w, h, ow = 0, oh = 0;
 
index ff665b5..d3c13cf 100644 (file)
@@ -51,8 +51,7 @@ static void
 _on_focus_hook(void *data, Evas_Object *obj)
 {
    Widget_Data *wd = elm_widget_data_get(obj);
-   Evas_Object *top = elm_widget_top_get(obj);
-   
+   if (!wd) return;
    if (elm_widget_focus_get(obj))
      edje_object_signal_emit(wd->btn, "elm,action,focus", "elm");
    else
@@ -85,6 +84,7 @@ static void
 _disable_hook(Evas_Object *obj)
 {
    Widget_Data *wd = elm_widget_data_get(obj);
+   if (!wd) return;
    if (elm_widget_disabled_get(obj))
      edje_object_signal_emit(wd->btn, "elm,state,disabled", "elm");
    else
@@ -250,8 +250,6 @@ elm_button_label_set(Evas_Object *obj, const char *label)
 {
    ELM_CHECK_WIDTYPE(obj, widtype);
    Widget_Data *wd = elm_widget_data_get(obj);
-   Evas_Coord mw, mh;
-
    if (!wd) return;
    if (wd->label) eina_stringshare_del(wd->label);
    if (label)
@@ -269,10 +267,10 @@ elm_button_label_set(Evas_Object *obj, const char *label)
    _sizing_eval(obj);
 }
 
-EAPI const char*
+EAPI const char *
 elm_button_label_get(Evas_Object *obj)
 {
-   ELM_CHECK_WIDTYPE(obj, widtype);
+   ELM_CHECK_WIDTYPE(obj, widtype) NULL;
    Widget_Data *wd = elm_widget_data_get(obj);
    if (!wd) return NULL;
    return wd->label;
@@ -309,10 +307,18 @@ elm_button_icon_set(Evas_Object *obj, Evas_Object *icon)
      wd->icon = icon;
 }
 
+/**
+ * Get the icon used for the button
+ *
+ * @param obj The button object
+ * @return The image for the button
+ *
+ * @ingroup Button
+ */
 EAPI Evas_Object *
 elm_button_icon_get(Evas_Object *obj)
 {
-   ELM_CHECK_WIDTYPE(obj, widtype);
+   ELM_CHECK_WIDTYPE(obj, widtype) NULL;
    Widget_Data *wd = elm_widget_data_get(obj);
    if (!wd) return NULL;
    return wd->icon;
@@ -348,11 +354,11 @@ elm_button_autorepeat_set(Evas_Object *obj, Eina_Bool on)
    ELM_CHECK_WIDTYPE(obj, widtype);
    Widget_Data *wd = elm_widget_data_get(obj);
    if (!wd) return;
-
-   if (wd->timer) {
-          ecore_timer_del(wd->timer);
-          wd->timer = NULL;
-   }
+   if (wd->timer)
+     {
+        ecore_timer_del(wd->timer);
+        wd->timer = NULL;
+     }
    wd->autorepeat = on;
 }
 
@@ -370,16 +376,12 @@ elm_button_autorepeat_initital_timeout_set(Evas_Object *obj, double t)
    ELM_CHECK_WIDTYPE(obj, widtype);
    Widget_Data *wd = elm_widget_data_get(obj);
    if (!wd) return;
-
-   if (wd->ar_threshold == t)
-     return;
-
+   if (wd->ar_threshold == t) return;
    if (wd->timer)
      {
        ecore_timer_del(wd->timer);
        wd->timer = NULL;
      }
-
    wd->ar_threshold = t;
 }
 
@@ -397,20 +399,14 @@ elm_button_autorepeat_gap_timeout_set(Evas_Object *obj, double t)
    ELM_CHECK_WIDTYPE(obj, widtype);
    Widget_Data *wd = elm_widget_data_get(obj);
    if (!wd) return;
-
-   if (wd->ar_interval == t)
-     return;
-
+   if (wd->ar_interval == t) return;
    if (wd->timer)
      {
        ecore_timer_del(wd->timer);
        wd->timer = NULL;
      }
-
    wd->ar_interval = t;
    if (wd->repeating)
-     {
-       wd->timer = ecore_timer_add(t, _autorepeat_send, obj);
-     }
+     wd->timer = ecore_timer_add(t, _autorepeat_send, obj);
 }
 
index 4887395..e29f1ce 100644 (file)
@@ -150,12 +150,12 @@ elm_icon_add(Evas_Object *parent)
 EAPI Eina_Bool
 elm_icon_file_set(Evas_Object *obj, const char *file, const char *group)
 {
-   ELM_CHECK_WIDTYPE(obj, widtype);
+   ELM_CHECK_WIDTYPE(obj, widtype) EINA_FALSE;
    Widget_Data *wd = elm_widget_data_get(obj);
    Eina_Bool ret;
    const char *p;
 
-   if ((!wd) || (!file)) return 0;
+   if ((!wd) || (!file)) return EINA_FALSE;
    if (wd->stdicon) eina_stringshare_del(wd->stdicon);
    wd->stdicon = NULL;
    if (((p = strrchr(file, '.'))) && (!strcasecmp(p, ".edj")))
@@ -179,7 +179,7 @@ elm_icon_file_set(Evas_Object *obj, const char *file, const char *group)
 EAPI Eina_Bool
 elm_icon_standard_set(Evas_Object *obj, const char *name)
 {
-   ELM_CHECK_WIDTYPE(obj, widtype);
+   ELM_CHECK_WIDTYPE(obj, widtype) EINA_FALSE;
    Widget_Data *wd = elm_widget_data_get(obj);
    Eina_Bool ret;
 
index 047c447..f3258dd 100644 (file)
@@ -159,7 +159,7 @@ elm_image_add(Evas_Object *parent)
 EAPI Eina_Bool
 elm_image_file_set(Evas_Object *obj, const char *file, const char *group)
 {
-   ELM_CHECK_WIDTYPE(obj, widtype);
+   ELM_CHECK_WIDTYPE(obj, widtype) EINA_FALSE;
    Widget_Data *wd = elm_widget_data_get(obj);
    Eina_Bool ret;
    const char *p;
@@ -199,6 +199,7 @@ elm_image_object_size_get(const Evas_Object *obj, int *w, int *h)
    ELM_CHECK_WIDTYPE(obj, widtype);
    Widget_Data *wd = elm_widget_data_get(obj);
 
+   if (!wd) return;
    _els_smart_icon_size_get(wd->img, w, h);
 }
 
index ec84d48..6984123 100644 (file)
@@ -30,9 +30,9 @@ static void
 _elm_win_recalc_job(void *data)
 {
    Widget_Data *wd = elm_widget_data_get(data);
-   Evas_Coord minw = -1, minh = -1, maxw = -1, maxh = -1;
+   Evas_Coord minw = -1, minh = -1, maxh = -1;
    Evas_Coord resw, resh, minminw;
-   
+   if (!wd) return;
    wd->deferred_recalc_job = NULL;
    evas_object_geometry_get(wd->lbl, NULL, NULL, &resw, &resh);
    resh = 0;
@@ -59,7 +59,7 @@ static void
 _del_hook(Evas_Object *obj)
 {
    Widget_Data *wd = elm_widget_data_get(obj);
-
+   if (!wd) return;
    if (wd->deferred_recalc_job) ecore_job_del(wd->deferred_recalc_job);
    if (wd->label) eina_stringshare_del(wd->label);
    free(wd);
@@ -69,7 +69,7 @@ static void
 _theme_hook(Evas_Object *obj)
 {
    Widget_Data *wd = elm_widget_data_get(obj);
-
+   if (!wd) return;
    if (wd->linewrap)
      _elm_theme_set(wd->lbl, "label", "base_wrap", elm_widget_style_get(obj));
    else
@@ -85,8 +85,8 @@ _sizing_eval(Evas_Object *obj)
 {
    Widget_Data *wd = elm_widget_data_get(obj);
    Evas_Coord minw = -1, minh = -1, maxw = -1, maxh = -1;
-   Evas_Coord resw, resh, minminw;
-
+   Evas_Coord resw, resh;
+   if (!wd) return;
    if (wd->linewrap)
      {
         evas_object_geometry_get(wd->lbl, NULL, NULL, &resw, &resh);
@@ -111,13 +111,9 @@ _sizing_eval(Evas_Object *obj)
 static void 
 _resize(void *data, Evas *e, Evas_Object *obj, void *event_info)
 {
-   
    Widget_Data *wd = elm_widget_data_get(data);
-   
-   if (wd->linewrap)
-     {
-        _sizing_eval(data);
-     }
+   if (!wd) return;
+   if (wd->linewrap) _sizing_eval(data);
 }
 /**
  * Add a new label to the parent
@@ -173,7 +169,7 @@ elm_label_label_set(Evas_Object *obj, const char *label)
 {
    ELM_CHECK_WIDTYPE(obj, widtype);
    Widget_Data *wd = elm_widget_data_get(obj);
-
+   if (!wd) return;
    if (!label) label = "";
    if (wd->label) eina_stringshare_del(wd->label);
    wd->label = eina_stringshare_add(label);
@@ -192,9 +188,8 @@ elm_label_label_set(Evas_Object *obj, const char *label)
 EAPI const char *
 elm_label_label_get(Evas_Object *obj)
 {
-   ELM_CHECK_WIDTYPE(obj, widtype);
+   ELM_CHECK_WIDTYPE(obj, widtype) NULL;
    Widget_Data *wd = elm_widget_data_get(obj);
-
    if (!wd) return NULL;
    return wd->label;
 }
@@ -211,6 +206,7 @@ elm_label_line_wrap_set(Evas_Object *obj, Eina_Bool wrap)
 {
    ELM_CHECK_WIDTYPE(obj, widtype);
    Widget_Data *wd = elm_widget_data_get(obj);
+   if (!wd) return;
    const char *t;
    if (wd->linewrap == wrap) return;
    wd->linewrap = wrap;
@@ -235,8 +231,9 @@ elm_label_line_wrap_set(Evas_Object *obj, Eina_Bool wrap)
 EAPI Eina_Bool
 elm_label_line_wrap_get(const Evas_Object *obj)
 {
-   ELM_CHECK_WIDTYPE(obj, widtype);
+   ELM_CHECK_WIDTYPE(obj, widtype) EINA_FALSE;
    Widget_Data *wd = elm_widget_data_get(obj);
+   if (!wd) return EINA_FALSE;
    return wd->linewrap;
 }
 
@@ -252,6 +249,7 @@ elm_label_wrap_width_set(Evas_Object *obj, Evas_Coord w)
 {
    ELM_CHECK_WIDTYPE(obj, widtype);
    Widget_Data *wd = elm_widget_data_get(obj);
+   if (!wd) return;
    if (wd->wrap_w == w) return;
    wd->wrap_w = w;
    _sizing_eval(obj);
@@ -267,7 +265,8 @@ elm_label_wrap_width_set(Evas_Object *obj, Evas_Coord w)
 EAPI Evas_Coord
 elm_label_wrap_width_get(const Evas_Object *obj)
 {
-   ELM_CHECK_WIDTYPE(obj, widtype);
+   ELM_CHECK_WIDTYPE(obj, widtype) 0;
    Widget_Data *wd = elm_widget_data_get(obj);
+   if (!wd) return 0;
    return wd->wrap_w;
 }
index d0731fa..b1e72bd 100644 (file)
@@ -263,7 +263,6 @@ static int _elm_signal_exit(void *data, int ev_type, void *ev);
 #ifdef HAVE_ELEMENTARY_X
 static int _elm_window_property_change(void *data, int ev_type, void *ev);
 #endif
-static const char *widtype = NULL;
 static void _elm_rescale(void);
 
 char *_elm_appname = NULL;
@@ -300,7 +299,7 @@ _elm_window_property_change(void *data, int ev_type, void *ev)
      {
        if (event->atom == _elm_atom_enlightenment_scale)
          {
-            int val = 1000;
+            unsigned int val = 1000;
 
             if (ecore_x_window_prop_card32_get(event->win,
                                                event->atom,
@@ -315,7 +314,7 @@ _elm_window_property_change(void *data, int ev_type, void *ev)
          }
        else if (event->atom == _elm_atom_enlightenment_finger_size)
          {
-            int val = 1000;
+            unsigned int val = 1000;
 
             if (ecore_x_window_prop_card32_get(event->win,
                                                event->atom,
@@ -468,7 +467,6 @@ _elm_unneed_efreet(void)
 EAPI void
 elm_quicklaunch_init(int argc, char **argv)
 {
-   int i;
    char buf[PATH_MAX], *s;
    
    eina_init();
@@ -880,7 +878,7 @@ elm_quicklaunch_sub_init(int argc, char **argv)
        (_elm_config->engine == ELM_OPENGL_X11))
      {
 #ifdef HAVE_ELEMENTARY_X
-       int val = 1000;
+       unsigned int val = 1000;
 
        if (!ecore_x_init(NULL))
          {
@@ -1231,7 +1229,7 @@ elm_quicklaunch_exe_path_get(const char *exe)
    if ((exe[0] == '.') && (exe[1] == '.') && (exe[2] == '/')) return strdup(exe);
    if (!path)
      {
-       const char *p, *pp, *s;
+       const char *p, *pp;
        char *buf;
        path = getenv("PATH");
        buf = alloca(strlen(path) + 1);
@@ -1502,7 +1500,7 @@ elm_scale_all_set(double scale)
 {
 #ifdef HAVE_ELEMENTARY_X
    static Ecore_X_Atom atom = 0;
-   int scale_i = (int)(scale * 1000.0);
+   unsigned int scale_i = (unsigned int)(scale * 1000.0);
 
    if (!atom) atom = ecore_x_atom_get("ENLIGHTENMENT_SCALE");
    ecore_x_window_prop_card32_set(ecore_x_window_root_first_get(),
@@ -1562,7 +1560,7 @@ elm_finger_size_all_set(Evas_Coord size)
 {
 #ifdef HAVE_ELEMENTARY_X
    static Ecore_X_Atom atom = 0;
-   int size_i = (int)size;
+   unsigned int size_i = (unsigned int)size;
 
    if (!atom) atom = ecore_x_atom_get("ENLIGHTENMENT_FINGER_SIZE");
    ecore_x_window_prop_card32_set(ecore_x_window_root_first_get(),
index a976ab8..3e8977e 100644 (file)
@@ -151,8 +151,8 @@ EAPI const char  *elm_widget_type_get(const Evas_Object *obj);
 EAPI Eina_List   *_stringlist_get(const char *str);
 EAPI void         _stringlist_free(Eina_List *list);
 
-#define ELM_SET_WIDTYPE(widtype, type) if (!widtype) widtype = eina_stringshare_add(type);
-#define ELM_CHECK_WIDTYPE(obj, widtype) if (elm_widget_type_get(obj) != widtype) return;
+#define ELM_SET_WIDTYPE(widtype, type) if (!widtype) widtype = eina_stringshare_add(type)
+#define ELM_CHECK_WIDTYPE(obj, widtype) if (elm_widget_type_get(obj) != widtype) return
 
 extern char *_elm_appname;
 extern Elm_Config *_elm_config;
index 986a9d1..8617f03 100644 (file)
@@ -252,7 +252,7 @@ elm_scroller_add(Evas_Object *parent)
    Evas_Object *obj;
    Evas *e;
    Widget_Data *wd;
-   Evas_Coord vw, vh, minw, minh;
+   Evas_Coord minw, minh;
 
    wd = ELM_NEW(Widget_Data);
    e = evas_object_evas_get(parent);
index 5d63fcc..74fd9ec 100644 (file)
@@ -50,7 +50,6 @@ _elm_theme_group_file_find(const char *group)
 {
    const Eina_List *l;
    const char *f;
-   char *p;
    static const char *home = NULL;
    const char *file = eina_hash_find(cache, group);
 
@@ -178,7 +177,7 @@ _elm_theme_icon_set(Evas_Object *o, const char *group, const char *style)
 {
    const char *file;
    char buf2[1024];
-   int w, h, ok;
+   int w, h;
 
    snprintf(buf2, sizeof(buf2), "elm/icon/%s/%s", group, style);
    file = _elm_theme_group_file_find(buf2);
index 1f8c54c..055436d 100644 (file)
@@ -26,8 +26,8 @@ static void _signal_toggle_on(void *data, Evas_Object *obj, const char *emission
 static void
 _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->ontext) eina_stringshare_del(wd->ontext);
    if (wd->offtext) eina_stringshare_del(wd->offtext);
@@ -37,8 +37,8 @@ _del_hook(Evas_Object *obj)
 static void
 _disable_hook(Evas_Object *obj)
 {
-   
    Widget_Data *wd = elm_widget_data_get(obj);
+   if (!wd) return;
    if (elm_widget_disabled_get(obj))
      edje_object_signal_emit(wd->tgl, "elm,state,disabled", "elm");
    else
@@ -48,8 +48,8 @@ _disable_hook(Evas_Object *obj)
 static void
 _theme_hook(Evas_Object *obj)
 {
-   
    Widget_Data *wd = elm_widget_data_get(obj);
+   if (!wd) return;
    _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");
@@ -74,10 +74,10 @@ _theme_hook(Evas_Object *obj)
 static void
 _sizing_eval(Evas_Object *obj)
 {
-   
    Widget_Data *wd = elm_widget_data_get(obj);
    Evas_Coord minw = -1, minh = -1;
 
+   if (!wd) return;
    elm_coords_finger_size_adjust(1, &minw, 1, &minh);
    edje_object_size_min_restricted_calc(wd->tgl, &minw, &minh, minw, minh);
    elm_coords_finger_size_adjust(1, &minw, 1, &minh);
@@ -88,8 +88,8 @@ _sizing_eval(Evas_Object *obj)
 static void
 _changed_size_hints(void *data, Evas *e, Evas_Object *obj, void *event_info)
 {
-   
    Widget_Data *wd = elm_widget_data_get(data);
+   if (!wd) return;
    if (obj != wd->icon) return;
    _sizing_eval(data);
 }
@@ -97,10 +97,9 @@ _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)
 {
-   
    Widget_Data *wd = elm_widget_data_get(obj);
    Evas_Object *sub = event_info;
-
+   if (!wd) return;
    if (sub == wd->icon)
      {
        edje_object_signal_emit(wd->tgl, "elm,state,icon,hidden", "elm");
@@ -114,9 +113,8 @@ _sub_del(void *data, Evas_Object *obj, void *event_info)
 static void
 _signal_toggle_off(void *data, Evas_Object *obj, const char *emission, const char *source)
 {
-   
    Widget_Data *wd = elm_widget_data_get(data);
-
+   if (!wd) return;
    wd->state = 0;
    if (wd->statep) *wd->statep = wd->state;
    evas_object_smart_callback_call(data, "changed", NULL);
@@ -125,9 +123,8 @@ _signal_toggle_off(void *data, Evas_Object *obj, const char *emission, const cha
 static void
 _signal_toggle_on(void *data, Evas_Object *obj, const char *emission, const char *source)
 {
-   
    Widget_Data *wd = elm_widget_data_get(data);
-
+   if (!wd) return;
    wd->state = 1;
    if (wd->statep) *wd->statep = wd->state;
    evas_object_smart_callback_call(data, "changed", NULL);
@@ -174,7 +171,7 @@ elm_toggle_label_set(Evas_Object *obj, const char *label)
 {
    ELM_CHECK_WIDTYPE(obj, widtype);
    Widget_Data *wd = elm_widget_data_get(obj);
-
+   if (!wd) return;
    if (wd->label) eina_stringshare_del(wd->label);
    if (label)
      {
@@ -191,12 +188,11 @@ elm_toggle_label_set(Evas_Object *obj, const char *label)
    _sizing_eval(obj);
 }
 
-EAPI const char*
+EAPI const char *
 elm_toggle_label_get(Evas_Object *obj)
 {
-   ELM_CHECK_WIDTYPE(obj, widtype);
+   ELM_CHECK_WIDTYPE(obj, widtype) NULL;
    Widget_Data *wd = elm_widget_data_get(obj);
-
    if (!wd) return NULL;
    return wd->label;
 }
@@ -206,7 +202,7 @@ elm_toggle_icon_set(Evas_Object *obj, Evas_Object *icon)
 {
    ELM_CHECK_WIDTYPE(obj, widtype);
    Widget_Data *wd = elm_widget_data_get(obj);
-
+   if (!wd) return;
    if ((wd->icon != icon) && (wd->icon))
      elm_widget_sub_object_del(obj, wd->icon);
    wd->icon = icon;
@@ -222,9 +218,8 @@ elm_toggle_icon_set(Evas_Object *obj, Evas_Object *icon)
 EAPI Evas_Object *
 elm_toggle_icon_get(Evas_Object *obj)
 {
-   ELM_CHECK_WIDTYPE(obj, widtype);
+   ELM_CHECK_WIDTYPE(obj, widtype) NULL;
    Widget_Data *wd = elm_widget_data_get(obj);
-
    if (!wd) return NULL;
    return wd->icon;
 }
@@ -234,7 +229,7 @@ elm_toggle_states_labels_set(Evas_Object *obj, const char *onlabel, const char *
 {
    ELM_CHECK_WIDTYPE(obj, widtype);
    Widget_Data *wd = elm_widget_data_get(obj);
-
+   if (!wd) return;
    if (wd->ontext) eina_stringshare_del(wd->ontext);
    if (wd->offtext) eina_stringshare_del(wd->offtext);
    if (onlabel) wd->ontext = eina_stringshare_add(onlabel);
@@ -251,7 +246,7 @@ elm_toggle_state_set(Evas_Object *obj, Eina_Bool state)
 {
    ELM_CHECK_WIDTYPE(obj, widtype);
    Widget_Data *wd = elm_widget_data_get(obj);
-
+   if (!wd) return;
    if (state != wd->state)
      {
        wd->state = state;
@@ -266,9 +261,9 @@ elm_toggle_state_set(Evas_Object *obj, Eina_Bool state)
 EAPI Eina_Bool
 elm_toggle_state_get(const Evas_Object *obj)
 {
-   ELM_CHECK_WIDTYPE(obj, widtype);
+   ELM_CHECK_WIDTYPE(obj, widtype) EINA_FALSE;
    Widget_Data *wd = elm_widget_data_get(obj);
-
+   if (!wd) return EINA_FALSE;
    return wd->state;
 }
 
@@ -277,7 +272,7 @@ elm_toggle_state_pointer_set(Evas_Object *obj, Eina_Bool *statep)
 {
    ELM_CHECK_WIDTYPE(obj, widtype);
    Widget_Data *wd = elm_widget_data_get(obj);
-
+   if (!wd) return;
    if (statep)
      {
        wd->statep = statep;
index 5e1082f..62b51f4 100644 (file)
@@ -48,7 +48,6 @@ struct _Smart_Data
 };
 
 /* local subsystem functions */
-static const char *widtype = NULL;
 static void _smart_reconfigure(Smart_Data *sd);
 static void _smart_add(Evas_Object *obj);
 static void _smart_del(Evas_Object *obj);
@@ -82,7 +81,6 @@ _sub_obj_del(void *data, Evas *e, Evas_Object *obj, void *event_info)
 static void
 _sub_obj_mouse_down(void *data, Evas *e, Evas_Object *obj, void *event_info)
 {
-   Smart_Data *sd = data;
    Evas_Object *o;
    const char *s;
    
index 90abd76..011b4d9 100644 (file)
@@ -49,8 +49,8 @@ _elm_win_move(Ecore_Evas *ee)
    Evas_Object *obj = ecore_evas_object_associate_get(ee);
    Elm_Win *win;
    int x, y;
-   if (strcmp(elm_widget_type_get(obj), "win")) return;
    
+   if (!obj) return;
    win = elm_widget_data_get(obj);
    if (!win) return;
    ecore_evas_geometry_get(ee, &x, &y, NULL, NULL);
@@ -64,8 +64,8 @@ _elm_win_resize(Ecore_Evas *ee)
 {
    Evas_Object *obj = ecore_evas_object_associate_get(ee);
    Elm_Win *win;
-   if (strcmp(elm_widget_type_get(obj), "win")) return;
    
+   if (!obj) return;
    win = elm_widget_data_get(obj);
    if (!win) return;
    if (win->deferred_resize_job) ecore_job_del(win->deferred_resize_job);
@@ -77,8 +77,8 @@ _elm_win_focus_in(Ecore_Evas *ee)
 {
    Evas_Object *obj = ecore_evas_object_associate_get(ee);
    Elm_Win *win;
-   if (strcmp(elm_widget_type_get(obj), "win")) return;
    
+   if (!obj) return;
    win = elm_widget_data_get(obj);
    if (!win) return;
    /*NB: Why two different "focus signals" here ??? */
@@ -91,8 +91,8 @@ _elm_win_focus_out(Ecore_Evas *ee)
 {
    Evas_Object *obj = ecore_evas_object_associate_get(ee);
    Elm_Win *win;
-   if (strcmp(elm_widget_type_get(obj), "win")) return;
    
+   if (!obj) return;
    win = elm_widget_data_get(obj);
    if (!win) return;
    evas_object_smart_callback_call(win->win_obj, "focus-out", NULL); // FIXME: remove me
@@ -512,7 +512,6 @@ elm_win_resize_object_add(Evas_Object *obj, Evas_Object *subobj)
 {
    Evas_Coord w, h;
    Elm_Win *win;
-   if (strcmp(elm_widget_type_get(obj), "win")) return;
    ELM_CHECK_WIDTYPE(obj, widtype);
    win = elm_widget_data_get(obj);
    if (!win) return;
@@ -533,7 +532,6 @@ EAPI void
 elm_win_resize_object_del(Evas_Object *obj, Evas_Object *subobj)
 {
    Elm_Win *win;
-   if (strcmp(elm_widget_type_get(obj), "win")) return;
    ELM_CHECK_WIDTYPE(obj, widtype);
    win = elm_widget_data_get(obj);
    if (!win) return;
@@ -552,7 +550,6 @@ EAPI void
 elm_win_title_set(Evas_Object *obj, const char *title)
 {
    Elm_Win *win;
-   if (strcmp(elm_widget_type_get(obj), "win")) return;
    ELM_CHECK_WIDTYPE(obj, widtype);
    win = elm_widget_data_get(obj);
    if (!win) return;
@@ -563,7 +560,6 @@ EAPI void
 elm_win_autodel_set(Evas_Object *obj, Eina_Bool autodel)
 {
    Elm_Win *win;
-   if (strcmp(elm_widget_type_get(obj), "win")) return;
    ELM_CHECK_WIDTYPE(obj, widtype);
    win = elm_widget_data_get(obj);
    if (!win) return;
@@ -574,7 +570,6 @@ EAPI void
 elm_win_activate(Evas_Object *obj)
 {
    Elm_Win *win;
-   if (strcmp(elm_widget_type_get(obj), "win")) return;
    ELM_CHECK_WIDTYPE(obj, widtype);
    win = elm_widget_data_get(obj);
    if (!win) return;
@@ -585,7 +580,6 @@ EAPI void
 elm_win_lower(Evas_Object *obj)
 {
    Elm_Win *win;
-   if (strcmp(elm_widget_type_get(obj), "win")) return;
    ELM_CHECK_WIDTYPE(obj, widtype);
    win = elm_widget_data_get(obj);
    if (!win) return;
@@ -596,7 +590,6 @@ EAPI void
 elm_win_raise(Evas_Object *obj)
 {
    Elm_Win *win;
-   if (strcmp(elm_widget_type_get(obj), "win")) return;
    ELM_CHECK_WIDTYPE(obj, widtype);
    win = elm_widget_data_get(obj);
    if (!win) return;
@@ -607,7 +600,6 @@ EAPI void
 elm_win_borderless_set(Evas_Object *obj, Eina_Bool borderless)
 {
    Elm_Win *win;
-   if (strcmp(elm_widget_type_get(obj), "win")) return;
    ELM_CHECK_WIDTYPE(obj, widtype);
    win = elm_widget_data_get(obj);
    if (!win) return;
@@ -619,8 +611,7 @@ EAPI Eina_Bool
 elm_win_borderless_get(Evas_Object *obj)
 {
    Elm_Win *win;
-   if (strcmp(elm_widget_type_get(obj), "win")) return EINA_FALSE;
-   ELM_CHECK_WIDTYPE(obj, widtype);
+   ELM_CHECK_WIDTYPE(obj, widtype) EINA_FALSE;
    win = elm_widget_data_get(obj);
    if (!win) return EINA_FALSE;
    return ecore_evas_borderless_get(win->ee);
@@ -630,7 +621,6 @@ EAPI void
 elm_win_shaped_set(Evas_Object *obj, Eina_Bool shaped)
 {
    Elm_Win *win;
-   if (strcmp(elm_widget_type_get(obj), "win")) return;
    ELM_CHECK_WIDTYPE(obj, widtype);
    win = elm_widget_data_get(obj);
    if (!win) return;
@@ -642,8 +632,7 @@ EAPI Eina_Bool
 elm_win_shaped_get(Evas_Object *obj)
 {
    Elm_Win *win;
-   if (strcmp(elm_widget_type_get(obj), "win")) return EINA_FALSE;
-   ELM_CHECK_WIDTYPE(obj, widtype);
+   ELM_CHECK_WIDTYPE(obj, widtype) EINA_FALSE;
    win = elm_widget_data_get(obj);
    if (!win) return EINA_FALSE;
    return ecore_evas_shaped_get(win->ee);
@@ -653,7 +642,6 @@ EAPI void
 elm_win_alpha_set(Evas_Object *obj, Eina_Bool alpha)
 {
    Elm_Win *win;
-   if (strcmp(elm_widget_type_get(obj), "win")) return;
    ELM_CHECK_WIDTYPE(obj, widtype);
    win = elm_widget_data_get(obj);
    if (!win) return;
@@ -678,8 +666,7 @@ EAPI Eina_Bool
 elm_win_alpha_get(Evas_Object *obj)
 {
    Elm_Win *win;
-   if (strcmp(elm_widget_type_get(obj), "win")) return EINA_FALSE;
-   ELM_CHECK_WIDTYPE(obj, widtype);
+   ELM_CHECK_WIDTYPE(obj, widtype) EINA_FALSE;
    win = elm_widget_data_get(obj);
    if (!win) return EINA_FALSE;
    return ecore_evas_alpha_get(win->ee);
@@ -689,7 +676,6 @@ EAPI void
 elm_win_transparent_set(Evas_Object *obj, Eina_Bool transparent)
 {
    Elm_Win *win;
-   if (strcmp(elm_widget_type_get(obj), "win")) return;
    ELM_CHECK_WIDTYPE(obj, widtype);
    win = elm_widget_data_get(obj);
    if (!win) return;
@@ -707,8 +693,7 @@ EAPI Eina_Bool
 elm_win_transparent_get(Evas_Object *obj)
 {
    Elm_Win *win;
-   if (strcmp(elm_widget_type_get(obj), "win")) return EINA_FALSE;
-   ELM_CHECK_WIDTYPE(obj, widtype);
+   ELM_CHECK_WIDTYPE(obj, widtype) EINA_FALSE;
    win = elm_widget_data_get(obj);
    if (!win) return EINA_FALSE;
 
@@ -719,7 +704,6 @@ EAPI void
 elm_win_override_set(Evas_Object *obj, Eina_Bool override)
 {
    Elm_Win *win;
-   if (strcmp(elm_widget_type_get(obj), "win")) return;
    ELM_CHECK_WIDTYPE(obj, widtype);
    win = elm_widget_data_get(obj);
    if (!win) return;
@@ -731,8 +715,7 @@ EAPI Eina_Bool
 elm_win_override_get(Evas_Object *obj)
 {
    Elm_Win *win;
-   if (strcmp(elm_widget_type_get(obj), "win")) return EINA_FALSE;
-   ELM_CHECK_WIDTYPE(obj, widtype);
+   ELM_CHECK_WIDTYPE(obj, widtype) EINA_FALSE;
    win = elm_widget_data_get(obj);
    if (!win) return EINA_FALSE;
    return ecore_evas_override_get(win->ee);
@@ -742,7 +725,6 @@ EAPI void
 elm_win_fullscreen_set(Evas_Object *obj, Eina_Bool fullscreen)
 {
    Elm_Win *win;
-   if (strcmp(elm_widget_type_get(obj), "win")) return;
    ELM_CHECK_WIDTYPE(obj, widtype);
    win = elm_widget_data_get(obj);
    if (!win) return;
@@ -763,8 +745,7 @@ EAPI Eina_Bool
 elm_win_fullscreen_get(Evas_Object *obj)
 {
    Elm_Win *win;
-   if (strcmp(elm_widget_type_get(obj), "win")) return EINA_FALSE;
-   ELM_CHECK_WIDTYPE(obj, widtype);
+   ELM_CHECK_WIDTYPE(obj, widtype) EINA_FALSE;
    win = elm_widget_data_get(obj);
    if (!win) return EINA_FALSE;
    switch (_elm_config->engine)
@@ -785,7 +766,6 @@ EAPI void
 elm_win_maximized_set(Evas_Object *obj, Eina_Bool maximized)
 {
    Elm_Win *win;
-   if (strcmp(elm_widget_type_get(obj), "win")) return;
    ELM_CHECK_WIDTYPE(obj, widtype);
    win = elm_widget_data_get(obj);
    if (!win) return;
@@ -797,8 +777,7 @@ EAPI Eina_Bool
 elm_win_maximized_get(Evas_Object *obj)
 {
    Elm_Win *win;
-   if (strcmp(elm_widget_type_get(obj), "win")) return EINA_FALSE;
-   ELM_CHECK_WIDTYPE(obj, widtype);
+   ELM_CHECK_WIDTYPE(obj, widtype) EINA_FALSE;
    win = elm_widget_data_get(obj);
    if (!win) return EINA_FALSE;
    return ecore_evas_maximized_get(win->ee);
@@ -808,7 +787,6 @@ EAPI void
 elm_win_iconified_set(Evas_Object *obj, Eina_Bool iconified)
 {
    Elm_Win *win;
-   if (strcmp(elm_widget_type_get(obj), "win")) return;
    ELM_CHECK_WIDTYPE(obj, widtype);
    win = elm_widget_data_get(obj);
    if (!win) return;
@@ -820,8 +798,7 @@ EAPI Eina_Bool
 elm_win_iconified_get(Evas_Object *obj)
 {
    Elm_Win *win;
-   if (strcmp(elm_widget_type_get(obj), "win")) return EINA_FALSE;
-   ELM_CHECK_WIDTYPE(obj, widtype);
+   ELM_CHECK_WIDTYPE(obj, widtype) EINA_FALSE;
    win = elm_widget_data_get(obj);
    if (!win) return EINA_FALSE;
    return ecore_evas_iconified_get(win->ee);
@@ -831,7 +808,6 @@ EAPI void
 elm_win_layer_set(Evas_Object *obj, int layer)
 {
    Elm_Win *win;
-   if (strcmp(elm_widget_type_get(obj), "win")) return;
    ELM_CHECK_WIDTYPE(obj, widtype);
    win = elm_widget_data_get(obj);
    if (!win) return;
@@ -843,8 +819,7 @@ EAPI int
 elm_win_layer_get(Evas_Object *obj)
 {
    Elm_Win *win;
-   if (strcmp(elm_widget_type_get(obj), "win")) return -1;
-   ELM_CHECK_WIDTYPE(obj, widtype);
+   ELM_CHECK_WIDTYPE(obj, widtype) -1;
    win = elm_widget_data_get(obj);
    if (!win) return -1;
    return ecore_evas_layer_get(win->ee);
@@ -854,7 +829,6 @@ EAPI void
 elm_win_rotation_set(Evas_Object *obj, int rotation)
 {
    Elm_Win *win;
-   if (strcmp(elm_widget_type_get(obj), "win")) return;
    ELM_CHECK_WIDTYPE(obj, widtype);
    win = elm_widget_data_get(obj);
    if (!win) return;
@@ -871,7 +845,6 @@ EAPI void
 elm_win_rotation_with_resize_set(Evas_Object *obj, int rotation)
 {
    Elm_Win *win;
-   if (strcmp(elm_widget_type_get(obj), "win")) return;
    ELM_CHECK_WIDTYPE(obj, widtype);
    win = elm_widget_data_get(obj);
    if (!win) return;
@@ -888,8 +861,7 @@ EAPI int
 elm_win_rotation_get(Evas_Object *obj)
 {
    Elm_Win *win;
-   if (strcmp(elm_widget_type_get(obj), "win")) return -1;
-   ELM_CHECK_WIDTYPE(obj, widtype);
+   ELM_CHECK_WIDTYPE(obj, widtype) -1;
    win = elm_widget_data_get(obj);
    if (!win) return -1;
    return win->rot;
@@ -899,7 +871,6 @@ EAPI void
 elm_win_sticky_set(Evas_Object *obj, Eina_Bool sticky)
 {
    Elm_Win *win;
-   if (strcmp(elm_widget_type_get(obj), "win")) return;
    ELM_CHECK_WIDTYPE(obj, widtype);
    win = elm_widget_data_get(obj);
    if (!win) return;
@@ -911,8 +882,7 @@ EAPI Eina_Bool
 elm_win_sticky_get(Evas_Object *obj)
 {
    Elm_Win *win;
-   if (strcmp(elm_widget_type_get(obj), "win")) return EINA_FALSE;
-   ELM_CHECK_WIDTYPE(obj, widtype);
+   ELM_CHECK_WIDTYPE(obj, widtype) EINA_FALSE;
    win = elm_widget_data_get(obj);
    if (!win) return EINA_FALSE;
    return ecore_evas_sticky_get(win->ee);
@@ -922,7 +892,6 @@ EAPI void
 elm_win_keyboard_mode_set(Evas_Object *obj, Elm_Win_Keyboard_Mode mode)
 {
    Elm_Win *win;
-   if (strcmp(elm_widget_type_get(obj), "win")) return;
    ELM_CHECK_WIDTYPE(obj, widtype);
    win = elm_widget_data_get(obj);
    if (!win) return;
@@ -940,7 +909,6 @@ EAPI void
 elm_win_keyboard_win_set(Evas_Object *obj, Eina_Bool is_keyboard)
 {
    Elm_Win *win;
-   if (strcmp(elm_widget_type_get(obj), "win")) return;
    ELM_CHECK_WIDTYPE(obj, widtype);
    win = elm_widget_data_get(obj);
    if (!win) return;
@@ -955,7 +923,6 @@ EAPI void
 elm_win_screen_position_get(Evas_Object *obj, int *x, int *y)
 {
    Elm_Win *win;
-   if (strcmp(elm_widget_type_get(obj), "win")) return;
    ELM_CHECK_WIDTYPE(obj, widtype);
    win = elm_widget_data_get(obj);
    if (!win) return;
@@ -975,7 +942,6 @@ EAPI void
 elm_win_conformant_set(Evas_Object *obj, Eina_Bool conformant)
 {
    Elm_Win *win;
-   if (strcmp(elm_widget_type_get(obj), "win")) return;
    ELM_CHECK_WIDTYPE(obj, widtype);
    win = elm_widget_data_get(obj);
    if (!win) return;
@@ -998,8 +964,7 @@ EAPI Eina_Bool
 elm_win_conformant_get(Evas_Object *obj)
 {
    Elm_Win *win;
-   if (strcmp(elm_widget_type_get(obj), "win")) return EINA_FALSE;
-   ELM_CHECK_WIDTYPE(obj, widtype);
+   ELM_CHECK_WIDTYPE(obj, widtype) EINA_FALSE;
    win = elm_widget_data_get(obj);
    if (!win) return EINA_FALSE;
    _elm_win_xwindow_get(win);
@@ -1024,7 +989,6 @@ EAPI void
 elm_win_quickpanel_set(Evas_Object *obj, Eina_Bool quickpanel)
 {
    Elm_Win *win;
-   if (strcmp(elm_widget_type_get(obj), "win")) return;
    ELM_CHECK_WIDTYPE(obj, widtype);
    win = elm_widget_data_get(obj);
    if (!win) return;
@@ -1058,8 +1022,7 @@ EAPI Eina_Bool
 elm_win_quickpanel_get(Evas_Object *obj)
 {
    Elm_Win *win;
-   if (strcmp(elm_widget_type_get(obj), "win")) return EINA_FALSE;
-   ELM_CHECK_WIDTYPE(obj, widtype);
+   ELM_CHECK_WIDTYPE(obj, widtype) EINA_FALSE;
    win = elm_widget_data_get(obj);
    if (!win) return EINA_FALSE;
    _elm_win_xwindow_get(win);
@@ -1082,7 +1045,6 @@ EAPI void
 elm_win_quickpanel_priority_major_set(Evas_Object *obj, int priority)
 {
    Elm_Win *win;
-   if (strcmp(elm_widget_type_get(obj), "win")) return;
    ELM_CHECK_WIDTYPE(obj, widtype);
    win = elm_widget_data_get(obj);
    if (!win) return;
@@ -1105,8 +1067,7 @@ EAPI int
 elm_win_quickpanel_priority_major_get(Evas_Object *obj)
 {
    Elm_Win *win;
-   if (strcmp(elm_widget_type_get(obj), "win")) return -1;
-   ELM_CHECK_WIDTYPE(obj, widtype);
+   ELM_CHECK_WIDTYPE(obj, widtype) -1;
    win = elm_widget_data_get(obj);
    if (!win) return -1;
    _elm_win_xwindow_get(win);
@@ -1129,7 +1090,6 @@ EAPI void
 elm_win_quickpanel_priority_minor_set(Evas_Object *obj, int priority)
 {
    Elm_Win *win;
-   if (strcmp(elm_widget_type_get(obj), "win")) return;
    ELM_CHECK_WIDTYPE(obj, widtype);
    win = elm_widget_data_get(obj);
    if (!win) return;
@@ -1152,8 +1112,7 @@ EAPI int
 elm_win_quickpanel_priority_minor_get(Evas_Object *obj)
 {
    Elm_Win *win;
-   if (strcmp(elm_widget_type_get(obj), "win")) return -1;
-   ELM_CHECK_WIDTYPE(obj, widtype);
+   ELM_CHECK_WIDTYPE(obj, widtype) -1;
    win = elm_widget_data_get(obj);
    if (!win) return -1;
    _elm_win_xwindow_get(win);
@@ -1176,7 +1135,6 @@ EAPI void
 elm_win_quickpanel_zone_set(Evas_Object *obj, int zone)
 {
    Elm_Win *win;
-   if (strcmp(elm_widget_type_get(obj), "win")) return;
    ELM_CHECK_WIDTYPE(obj, widtype);
    win = elm_widget_data_get(obj);
    if (!win) return;
@@ -1201,6 +1159,8 @@ 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 const char *widtype2 = NULL;
+
 static void
 _del_hook(Evas_Object *obj)
 {
@@ -1257,13 +1217,13 @@ elm_win_inwin_add(Evas_Object *obj)
    Widget_Data *wd;
    Elm_Win *win;
 
-   if (strcmp(elm_widget_type_get(obj), "win")) return NULL;
-   ELM_CHECK_WIDTYPE(obj, widtype);
+   ELM_CHECK_WIDTYPE(obj, widtype) NULL;
    win = elm_widget_data_get(obj);
    if (!win) return NULL;
    wd = ELM_NEW(Widget_Data);
    obj2 = elm_widget_add(win->evas);
    elm_widget_type_set(obj2, "inwin");
+   ELM_SET_WIDTYPE(widtype2, "inwin");
    elm_widget_sub_object_add(obj, obj2);
    evas_object_size_hint_weight_set(obj2, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
    evas_object_size_hint_align_set(obj2, EVAS_HINT_FILL, EVAS_HINT_FILL);
@@ -1293,8 +1253,9 @@ elm_win_inwin_style_set(Evas_Object *obj, const char *style)
 EAPI void
 elm_win_inwin_activate(Evas_Object *obj)
 {
-   ELM_CHECK_WIDTYPE(obj, widtype);
+   ELM_CHECK_WIDTYPE(obj, widtype2);
    Widget_Data *wd = elm_widget_data_get(obj);
+   if (!wd) return;
    evas_object_raise(obj);
    evas_object_show(obj);
    edje_object_signal_emit(wd->frm, "elm,action,show", "elm");
@@ -1304,8 +1265,9 @@ elm_win_inwin_activate(Evas_Object *obj)
 EAPI void
 elm_win_inwin_content_set(Evas_Object *obj, Evas_Object *content)
 {
-   ELM_CHECK_WIDTYPE(obj, widtype);
+   ELM_CHECK_WIDTYPE(obj, widtype2);
    Widget_Data *wd = elm_widget_data_get(obj);
+   if (!wd) return;
    if ((wd->content) && (wd->content != content))
      elm_widget_sub_object_del(obj, wd->content);
    wd->content = content;
@@ -1325,7 +1287,8 @@ elm_win_xwindow_get(const Evas_Object *obj)
 {
    Ecore_X_Window xwin = 0;
    Ecore_Evas *ee = NULL;
-
+   
+   if (!obj) return 0;
    ee = ecore_evas_ecore_evas_get(evas_object_evas_get(obj));
    if (ee) xwin = (Ecore_X_Window)ecore_evas_window_get(ee);
    return xwin;