summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--AUTHORS2
-rw-r--r--src/lib/elc_anchorblock.c6
-rw-r--r--src/lib/elc_anchorview.c7
-rw-r--r--src/lib/elc_fileselector.c11
-rw-r--r--src/lib/elc_hoversel.c13
-rw-r--r--src/lib/elc_notepad.c4
-rw-r--r--src/lib/elc_scrolled_entry.c35
-rw-r--r--src/lib/elm_bg.c3
-rw-r--r--src/lib/elm_box.c11
-rw-r--r--src/lib/elm_bubble.c9
-rw-r--r--src/lib/elm_button.c9
-rw-r--r--src/lib/elm_carousel.c3
-rw-r--r--src/lib/elm_check.c9
-rw-r--r--src/lib/elm_clock.c7
-rw-r--r--src/lib/elm_conform.c3
-rw-r--r--src/lib/elm_entry.c33
-rw-r--r--src/lib/elm_flip.c7
-rw-r--r--src/lib/elm_frame.c5
-rw-r--r--src/lib/elm_genlist.c21
-rw-r--r--src/lib/elm_hover.c12
-rw-r--r--src/lib/elm_icon.c9
-rw-r--r--src/lib/elm_image.c10
-rw-r--r--src/lib/elm_index.c18
-rw-r--r--src/lib/elm_label.c9
-rw-r--r--src/lib/elm_layout.c13
-rw-r--r--src/lib/elm_list.c30
-rw-r--r--src/lib/elm_main.c1
-rw-r--r--src/lib/elm_map.c45
-rw-r--r--src/lib/elm_mapbuf.c16
-rw-r--r--src/lib/elm_menu.c15
-rw-r--r--src/lib/elm_notify.c19
-rw-r--r--src/lib/elm_pager.c14
-rw-r--r--src/lib/elm_panel.c9
-rw-r--r--src/lib/elm_photo.c7
-rw-r--r--src/lib/elm_photocam.c39
-rw-r--r--src/lib/elm_priv.h3
-rw-r--r--src/lib/elm_progressbar.c20
-rw-r--r--src/lib/elm_radio.c19
-rw-r--r--src/lib/elm_scroller.c21
-rw-r--r--src/lib/elm_separator.c7
-rw-r--r--src/lib/elm_slider.c25
-rw-r--r--src/lib/elm_slideshow.c19
-rw-r--r--src/lib/elm_spinner.c36
-rw-r--r--src/lib/elm_table.c11
-rw-r--r--src/lib/elm_toggle.c18
-rw-r--r--src/lib/elm_toolbar.c15
-rw-r--r--src/lib/elm_widget.c1
-rw-r--r--src/lib/elm_win.c53
48 files changed, 710 insertions, 2 deletions
diff --git a/AUTHORS b/AUTHORS
index cee771bb2..c99bb2bc7 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -10,4 +10,4 @@ Marco Trevisan (TreviƱo) <mail@3v1n0.net>
10Michael Bouchaud <michael.bouchaud@gmail.com> 10Michael Bouchaud <michael.bouchaud@gmail.com>
11Jonathan Atton (Watchwolf) <jonathan.atton@gmail.com> 11Jonathan Atton (Watchwolf) <jonathan.atton@gmail.com>
12Brian Wang <brian.wang.0721@gmail.com> 12Brian Wang <brian.wang.0721@gmail.com>
13 13Mike Blumenkrantz (zmike) <mike@zentific.com>
diff --git a/src/lib/elc_anchorblock.c b/src/lib/elc_anchorblock.c
index a69f360c8..ac2e56ecf 100644
--- a/src/lib/elc_anchorblock.c
+++ b/src/lib/elc_anchorblock.c
@@ -25,6 +25,7 @@ struct _Widget_Data
25 const char *hover_style; 25 const char *hover_style;
26}; 26};
27 27
28static const char *widtype = NULL;
28static void _del_pre_hook(Evas_Object *obj); 29static void _del_pre_hook(Evas_Object *obj);
29static void _del_hook(Evas_Object *obj); 30static void _del_hook(Evas_Object *obj);
30static void _sizing_eval(Evas_Object *obj); 31static void _sizing_eval(Evas_Object *obj);
@@ -154,6 +155,7 @@ elm_anchorblock_add(Evas_Object *parent)
154 wd = ELM_NEW(Widget_Data); 155 wd = ELM_NEW(Widget_Data);
155 e = evas_object_evas_get(parent); 156 e = evas_object_evas_get(parent);
156 obj = elm_widget_add(e); 157 obj = elm_widget_add(e);
158 ELM_SET_WIDTYPE(widtype, "anchorblock");
157 elm_widget_type_set(obj, "anchorblock"); 159 elm_widget_type_set(obj, "anchorblock");
158 elm_widget_sub_object_add(parent, obj); 160 elm_widget_sub_object_add(parent, obj);
159 elm_widget_data_set(obj, wd); 161 elm_widget_data_set(obj, wd);
@@ -193,6 +195,7 @@ elm_anchorblock_add(Evas_Object *parent)
193EAPI void 195EAPI void
194elm_anchorblock_text_set(Evas_Object *obj, const char *text) 196elm_anchorblock_text_set(Evas_Object *obj, const char *text)
195{ 197{
198 ELM_CHECK_WIDTYPE(obj, widtype);
196 Widget_Data *wd = elm_widget_data_get(obj); 199 Widget_Data *wd = elm_widget_data_get(obj);
197 elm_entry_entry_set(wd->entry, text); 200 elm_entry_entry_set(wd->entry, text);
198 if (wd->hover) evas_object_del(wd->hover); 201 if (wd->hover) evas_object_del(wd->hover);
@@ -216,6 +219,7 @@ elm_anchorblock_text_set(Evas_Object *obj, const char *text)
216EAPI void 219EAPI void
217elm_anchorblock_hover_parent_set(Evas_Object *obj, Evas_Object *parent) 220elm_anchorblock_hover_parent_set(Evas_Object *obj, Evas_Object *parent)
218{ 221{
222 ELM_CHECK_WIDTYPE(obj, widtype);
219 Widget_Data *wd = elm_widget_data_get(obj); 223 Widget_Data *wd = elm_widget_data_get(obj);
220 if (wd->hover_parent) 224 if (wd->hover_parent)
221 evas_object_event_callback_del_full(wd->hover_parent, EVAS_CALLBACK_DEL, _parent_del, obj); 225 evas_object_event_callback_del_full(wd->hover_parent, EVAS_CALLBACK_DEL, _parent_del, obj);
@@ -238,6 +242,7 @@ elm_anchorblock_hover_parent_set(Evas_Object *obj, Evas_Object *parent)
238EAPI void 242EAPI void
239elm_anchorblock_hover_style_set(Evas_Object *obj, const char *style) 243elm_anchorblock_hover_style_set(Evas_Object *obj, const char *style)
240{ 244{
245 ELM_CHECK_WIDTYPE(obj, widtype);
241 Widget_Data *wd = elm_widget_data_get(obj); 246 Widget_Data *wd = elm_widget_data_get(obj);
242 if (wd->hover_style) eina_stringshare_del(wd->hover_style); 247 if (wd->hover_style) eina_stringshare_del(wd->hover_style);
243 wd->hover_style = NULL; 248 wd->hover_style = NULL;
@@ -256,6 +261,7 @@ elm_anchorblock_hover_style_set(Evas_Object *obj, const char *style)
256EAPI void 261EAPI void
257elm_anchorblock_hover_end(Evas_Object *obj) 262elm_anchorblock_hover_end(Evas_Object *obj)
258{ 263{
264 ELM_CHECK_WIDTYPE(obj, widtype);
259 Widget_Data *wd = elm_widget_data_get(obj); 265 Widget_Data *wd = elm_widget_data_get(obj);
260 if (wd->hover) evas_object_del(wd->hover); 266 if (wd->hover) evas_object_del(wd->hover);
261 if (wd->pop) evas_object_del(wd->pop); 267 if (wd->pop) evas_object_del(wd->pop);
diff --git a/src/lib/elc_anchorview.c b/src/lib/elc_anchorview.c
index bc45d168e..7ecbfdbb9 100644
--- a/src/lib/elc_anchorview.c
+++ b/src/lib/elc_anchorview.c
@@ -22,6 +22,7 @@ struct _Widget_Data
22 const char *hover_style; 22 const char *hover_style;
23}; 23};
24 24
25static const char *widtype = NULL;
25static void _del_pre_hook(Evas_Object *obj); 26static void _del_pre_hook(Evas_Object *obj);
26static void _del_hook(Evas_Object *obj); 27static void _del_hook(Evas_Object *obj);
27static void _sizing_eval(Evas_Object *obj); 28static void _sizing_eval(Evas_Object *obj);
@@ -138,6 +139,7 @@ elm_anchorview_add(Evas_Object *parent)
138 wd = ELM_NEW(Widget_Data); 139 wd = ELM_NEW(Widget_Data);
139 e = evas_object_evas_get(parent); 140 e = evas_object_evas_get(parent);
140 obj = elm_widget_add(e); 141 obj = elm_widget_add(e);
142 ELM_SET_WIDTYPE(widtype, "anchorview");
141 elm_widget_type_set(obj, "anchorview"); 143 elm_widget_type_set(obj, "anchorview");
142 elm_widget_sub_object_add(parent, obj); 144 elm_widget_sub_object_add(parent, obj);
143 elm_widget_data_set(obj, wd); 145 elm_widget_data_set(obj, wd);
@@ -180,6 +182,7 @@ elm_anchorview_add(Evas_Object *parent)
180EAPI void 182EAPI void
181elm_anchorview_text_set(Evas_Object *obj, const char *text) 183elm_anchorview_text_set(Evas_Object *obj, const char *text)
182{ 184{
185 ELM_CHECK_WIDTYPE(obj, widtype);
183 Widget_Data *wd = elm_widget_data_get(obj); 186 Widget_Data *wd = elm_widget_data_get(obj);
184 elm_entry_entry_set(wd->entry, text); 187 elm_entry_entry_set(wd->entry, text);
185 if (wd->hover) evas_object_del(wd->hover); 188 if (wd->hover) evas_object_del(wd->hover);
@@ -203,6 +206,7 @@ elm_anchorview_text_set(Evas_Object *obj, const char *text)
203EAPI void 206EAPI void
204elm_anchorview_hover_parent_set(Evas_Object *obj, Evas_Object *parent) 207elm_anchorview_hover_parent_set(Evas_Object *obj, Evas_Object *parent)
205{ 208{
209 ELM_CHECK_WIDTYPE(obj, widtype);
206 Widget_Data *wd = elm_widget_data_get(obj); 210 Widget_Data *wd = elm_widget_data_get(obj);
207 if (wd->hover_parent) 211 if (wd->hover_parent)
208 evas_object_event_callback_del_full(wd->hover_parent, EVAS_CALLBACK_DEL, _parent_del, obj); 212 evas_object_event_callback_del_full(wd->hover_parent, EVAS_CALLBACK_DEL, _parent_del, obj);
@@ -225,6 +229,7 @@ elm_anchorview_hover_parent_set(Evas_Object *obj, Evas_Object *parent)
225EAPI void 229EAPI void
226elm_anchorview_hover_style_set(Evas_Object *obj, const char *style) 230elm_anchorview_hover_style_set(Evas_Object *obj, const char *style)
227{ 231{
232 ELM_CHECK_WIDTYPE(obj, widtype);
228 Widget_Data *wd = elm_widget_data_get(obj); 233 Widget_Data *wd = elm_widget_data_get(obj);
229 if (wd->hover_style) eina_stringshare_del(wd->hover_style); 234 if (wd->hover_style) eina_stringshare_del(wd->hover_style);
230 wd->hover_style = NULL; 235 wd->hover_style = NULL;
@@ -243,6 +248,7 @@ elm_anchorview_hover_style_set(Evas_Object *obj, const char *style)
243EAPI void 248EAPI void
244elm_anchorview_hover_end(Evas_Object *obj) 249elm_anchorview_hover_end(Evas_Object *obj)
245{ 250{
251 ELM_CHECK_WIDTYPE(obj, widtype);
246 Widget_Data *wd = elm_widget_data_get(obj); 252 Widget_Data *wd = elm_widget_data_get(obj);
247 if (wd->hover) evas_object_del(wd->hover); 253 if (wd->hover) evas_object_del(wd->hover);
248 if (wd->pop) evas_object_del(wd->pop); 254 if (wd->pop) evas_object_del(wd->pop);
@@ -265,6 +271,7 @@ elm_anchorview_hover_end(Evas_Object *obj)
265EAPI void 271EAPI void
266elm_anchorview_bounce_set(Evas_Object *obj, Eina_Bool h_bounce, Eina_Bool v_bounce) 272elm_anchorview_bounce_set(Evas_Object *obj, Eina_Bool h_bounce, Eina_Bool v_bounce)
267{ 273{
274 ELM_CHECK_WIDTYPE(obj, widtype);
268 Widget_Data *wd = elm_widget_data_get(obj); 275 Widget_Data *wd = elm_widget_data_get(obj);
269 elm_scroller_bounce_set(wd->scroller, h_bounce, v_bounce); 276 elm_scroller_bounce_set(wd->scroller, h_bounce, v_bounce);
270} 277}
diff --git a/src/lib/elc_fileselector.c b/src/lib/elc_fileselector.c
index 4d2e05c1d..4063931ce 100644
--- a/src/lib/elc_fileselector.c
+++ b/src/lib/elc_fileselector.c
@@ -32,6 +32,7 @@ struct _Widget_Data
32 32
33Elm_Genlist_Item_Class itc; 33Elm_Genlist_Item_Class itc;
34 34
35static const char *widtype = NULL;
35static void _populate(Evas_Object *obj, const char *path, Elm_Genlist_Item *parent); 36static void _populate(Evas_Object *obj, const char *path, Elm_Genlist_Item *parent);
36static void _do_anchors(Evas_Object *obj, const char *path); 37static void _do_anchors(Evas_Object *obj, const char *path);
37 38
@@ -336,6 +337,7 @@ elm_fileselector_add(Evas_Object *parent)
336 wd = ELM_NEW(Widget_Data); 337 wd = ELM_NEW(Widget_Data);
337 wd->expand = EINA_FALSE; 338 wd->expand = EINA_FALSE;
338 obj = elm_widget_add(evas_object_evas_get(parent)); 339 obj = elm_widget_add(evas_object_evas_get(parent));
340 ELM_SET_WIDTYPE(widtype, "fileselector");
339 elm_widget_type_set(obj, "fileselector"); 341 elm_widget_type_set(obj, "fileselector");
340 elm_widget_sub_object_add(parent, obj); 342 elm_widget_sub_object_add(parent, obj);
341 elm_widget_data_set(obj, wd); 343 elm_widget_data_set(obj, wd);
@@ -438,6 +440,7 @@ elm_fileselector_add(Evas_Object *parent)
438EAPI void 440EAPI void
439elm_fileselector_is_save_set(Evas_Object *obj, Eina_Bool is_save) 441elm_fileselector_is_save_set(Evas_Object *obj, Eina_Bool is_save)
440{ 442{
443 ELM_CHECK_WIDTYPE(obj, widtype);
441 Widget_Data *wd = elm_widget_data_get(obj); 444 Widget_Data *wd = elm_widget_data_get(obj);
442 445
443 if (is_save) 446 if (is_save)
@@ -462,6 +465,7 @@ elm_fileselector_is_save_set(Evas_Object *obj, Eina_Bool is_save)
462EAPI Eina_Bool 465EAPI Eina_Bool
463elm_fileselector_is_save_get(Evas_Object *obj) 466elm_fileselector_is_save_get(Evas_Object *obj)
464{ 467{
468 ELM_CHECK_WIDTYPE(obj, widtype);
465 Widget_Data *wd = elm_widget_data_get(obj); 469 Widget_Data *wd = elm_widget_data_get(obj);
466 return wd->entry2 ? EINA_TRUE : EINA_FALSE; 470 return wd->entry2 ? EINA_TRUE : EINA_FALSE;
467} 471}
@@ -469,6 +473,7 @@ elm_fileselector_is_save_get(Evas_Object *obj)
469EAPI void 473EAPI void
470elm_fileselector_folder_only_set(Evas_Object *obj, Eina_Bool only) 474elm_fileselector_folder_only_set(Evas_Object *obj, Eina_Bool only)
471{ 475{
476 ELM_CHECK_WIDTYPE(obj, widtype);
472 Widget_Data *wd = elm_widget_data_get(obj); 477 Widget_Data *wd = elm_widget_data_get(obj);
473 478
474 if(wd->only_folder == only) return ; 479 if(wd->only_folder == only) return ;
@@ -479,6 +484,7 @@ elm_fileselector_folder_only_set(Evas_Object *obj, Eina_Bool only)
479EAPI Eina_Bool 484EAPI Eina_Bool
480elm_fileselector_only_folder_get(Evas_Object *obj) 485elm_fileselector_only_folder_get(Evas_Object *obj)
481{ 486{
487 ELM_CHECK_WIDTYPE(obj, widtype);
482 Widget_Data *wd = elm_widget_data_get(obj); 488 Widget_Data *wd = elm_widget_data_get(obj);
483 return wd->only_folder; 489 return wd->only_folder;
484} 490}
@@ -486,6 +492,7 @@ elm_fileselector_only_folder_get(Evas_Object *obj)
486EAPI void 492EAPI void
487elm_fileselector_buttons_ok_cancel_set(Evas_Object *obj, Eina_Bool only) 493elm_fileselector_buttons_ok_cancel_set(Evas_Object *obj, Eina_Bool only)
488{ 494{
495 ELM_CHECK_WIDTYPE(obj, widtype);
489 Widget_Data *wd = elm_widget_data_get(obj); 496 Widget_Data *wd = elm_widget_data_get(obj);
490 Evas_Object *box, *bt; 497 Evas_Object *box, *bt;
491 498
@@ -530,6 +537,7 @@ elm_fileselector_buttons_ok_cancel_set(Evas_Object *obj, Eina_Bool only)
530EAPI Eina_Bool 537EAPI Eina_Bool
531elm_fileselector_ok_cancel_get(Evas_Object *obj) 538elm_fileselector_ok_cancel_get(Evas_Object *obj)
532{ 539{
540 ELM_CHECK_WIDTYPE(obj, widtype);
533 Widget_Data *wd = elm_widget_data_get(obj); 541 Widget_Data *wd = elm_widget_data_get(obj);
534 return wd->buttons.bx ? EINA_TRUE : EINA_FALSE; 542 return wd->buttons.bx ? EINA_TRUE : EINA_FALSE;
535} 543}
@@ -537,6 +545,7 @@ elm_fileselector_ok_cancel_get(Evas_Object *obj)
537EAPI void 545EAPI void
538elm_fileselector_expandable_set(Evas_Object *obj, Eina_Bool expand) 546elm_fileselector_expandable_set(Evas_Object *obj, Eina_Bool expand)
539{ 547{
548 ELM_CHECK_WIDTYPE(obj, widtype);
540 Widget_Data *wd = elm_widget_data_get(obj); 549 Widget_Data *wd = elm_widget_data_get(obj);
541 wd->expand = expand; 550 wd->expand = expand;
542} 551}
@@ -550,6 +559,7 @@ elm_fileselector_path_set(Evas_Object *obj, const char *path)
550EAPI const char * 559EAPI const char *
551elm_fileselector_path_get(Evas_Object *obj) 560elm_fileselector_path_get(Evas_Object *obj)
552{ 561{
562 ELM_CHECK_WIDTYPE(obj, widtype);
553 Widget_Data *wd = elm_widget_data_get(obj); 563 Widget_Data *wd = elm_widget_data_get(obj);
554 return wd->path; 564 return wd->path;
555} 565}
@@ -557,6 +567,7 @@ elm_fileselector_path_get(Evas_Object *obj)
557EAPI const char* 567EAPI const char*
558elm_fileselector_selected_get(Evas_Object *obj) 568elm_fileselector_selected_get(Evas_Object *obj)
559{ 569{
570 ELM_CHECK_WIDTYPE(obj, widtype);
560 Widget_Data *wd = elm_widget_data_get(obj); 571 Widget_Data *wd = elm_widget_data_get(obj);
561 Elm_Genlist_Item *it; 572 Elm_Genlist_Item *it;
562 573
diff --git a/src/lib/elc_hoversel.c b/src/lib/elc_hoversel.c
index 08569e7be..1c6017754 100644
--- a/src/lib/elc_hoversel.c
+++ b/src/lib/elc_hoversel.c
@@ -41,6 +41,7 @@ struct _Elm_Hoversel_Item
41 void *data; 41 void *data;
42}; 42};
43 43
44static const char *widtype = NULL;
44static void _del_pre_hook(Evas_Object *obj); 45static void _del_pre_hook(Evas_Object *obj);
45static void _del_hook(Evas_Object *obj); 46static void _del_hook(Evas_Object *obj);
46static void _disable_hook(Evas_Object *obj); 47static void _disable_hook(Evas_Object *obj);
@@ -243,6 +244,7 @@ elm_hoversel_add(Evas_Object *parent)
243 wd = ELM_NEW(Widget_Data); 244 wd = ELM_NEW(Widget_Data);
244 e = evas_object_evas_get(parent); 245 e = evas_object_evas_get(parent);
245 obj = elm_widget_add(e); 246 obj = elm_widget_add(e);
247 ELM_SET_WIDTYPE(widtype, "hoversel");
246 elm_widget_type_set(obj, "hoversel"); 248 elm_widget_type_set(obj, "hoversel");
247 elm_widget_sub_object_add(parent, obj); 249 elm_widget_sub_object_add(parent, obj);
248 elm_widget_data_set(obj, wd); 250 elm_widget_data_set(obj, wd);
@@ -278,6 +280,7 @@ elm_hoversel_add(Evas_Object *parent)
278EAPI void 280EAPI void
279elm_hoversel_hover_parent_set(Evas_Object *obj, Evas_Object *parent) 281elm_hoversel_hover_parent_set(Evas_Object *obj, Evas_Object *parent)
280{ 282{
283 ELM_CHECK_WIDTYPE(obj, widtype);
281 Widget_Data *wd = elm_widget_data_get(obj); 284 Widget_Data *wd = elm_widget_data_get(obj);
282 285
283 if (!wd) return; 286 if (!wd) return;
@@ -304,6 +307,7 @@ elm_hoversel_hover_parent_set(Evas_Object *obj, Evas_Object *parent)
304EAPI void 307EAPI void
305elm_hoversel_label_set(Evas_Object *obj, const char *label) 308elm_hoversel_label_set(Evas_Object *obj, const char *label)
306{ 309{
310 ELM_CHECK_WIDTYPE(obj, widtype);
307 Widget_Data *wd = elm_widget_data_get(obj); 311 Widget_Data *wd = elm_widget_data_get(obj);
308 312
309 if (!wd) return; 313 if (!wd) return;
@@ -313,6 +317,7 @@ elm_hoversel_label_set(Evas_Object *obj, const char *label)
313EAPI void 317EAPI void
314elm_hoversel_horizontal_set(Evas_Object *obj, Eina_Bool horizontal) 318elm_hoversel_horizontal_set(Evas_Object *obj, Eina_Bool horizontal)
315{ 319{
320 ELM_CHECK_WIDTYPE(obj, widtype);
316 Widget_Data *wd = elm_widget_data_get(obj); 321 Widget_Data *wd = elm_widget_data_get(obj);
317 wd->horizontal = !!horizontal; 322 wd->horizontal = !!horizontal;
318} 323}
@@ -328,6 +333,7 @@ elm_hoversel_horizontal_set(Evas_Object *obj, Eina_Bool horizontal)
328EAPI const char* 333EAPI const char*
329elm_hoversel_label_get(Evas_Object *obj) 334elm_hoversel_label_get(Evas_Object *obj)
330{ 335{
336 ELM_CHECK_WIDTYPE(obj, widtype);
331 Widget_Data *wd = elm_widget_data_get(obj); 337 Widget_Data *wd = elm_widget_data_get(obj);
332 338
333 if ((!wd) || (!wd->btn)) return NULL; 339 if ((!wd) || (!wd->btn)) return NULL;
@@ -348,6 +354,7 @@ elm_hoversel_label_get(Evas_Object *obj)
348EAPI void 354EAPI void
349elm_hoversel_icon_set(Evas_Object *obj, Evas_Object *icon) 355elm_hoversel_icon_set(Evas_Object *obj, Evas_Object *icon)
350{ 356{
357 ELM_CHECK_WIDTYPE(obj, widtype);
351 Widget_Data *wd = elm_widget_data_get(obj); 358 Widget_Data *wd = elm_widget_data_get(obj);
352 359
353 if (!wd) return; 360 if (!wd) return;
@@ -368,6 +375,7 @@ elm_hoversel_icon_set(Evas_Object *obj, Evas_Object *icon)
368EAPI Evas_Object * 375EAPI Evas_Object *
369elm_hoversel_icon_get(Evas_Object *obj) 376elm_hoversel_icon_get(Evas_Object *obj)
370{ 377{
378 ELM_CHECK_WIDTYPE(obj, widtype);
371 Widget_Data *wd = elm_widget_data_get(obj); 379 Widget_Data *wd = elm_widget_data_get(obj);
372 380
373 if ((!wd) || (!wd->btn)) return NULL; 381 if ((!wd) || (!wd->btn)) return NULL;
@@ -386,6 +394,7 @@ elm_hoversel_icon_get(Evas_Object *obj)
386EAPI void 394EAPI void
387elm_hoversel_hover_begin(Evas_Object *obj) 395elm_hoversel_hover_begin(Evas_Object *obj)
388{ 396{
397 ELM_CHECK_WIDTYPE(obj, widtype);
389 Widget_Data *wd = elm_widget_data_get(obj); 398 Widget_Data *wd = elm_widget_data_get(obj);
390 399
391 if (!wd) return; 400 if (!wd) return;
@@ -405,6 +414,7 @@ elm_hoversel_hover_begin(Evas_Object *obj)
405EAPI void 414EAPI void
406elm_hoversel_hover_end(Evas_Object *obj) 415elm_hoversel_hover_end(Evas_Object *obj)
407{ 416{
417 ELM_CHECK_WIDTYPE(obj, widtype);
408 Widget_Data *wd = elm_widget_data_get(obj); 418 Widget_Data *wd = elm_widget_data_get(obj);
409 419
410 if (!wd) return; 420 if (!wd) return;
@@ -429,6 +439,7 @@ elm_hoversel_clear(Evas_Object *obj)
429{ 439{
430 Elm_Hoversel_Item *it; 440 Elm_Hoversel_Item *it;
431 Eina_List *l, *ll; 441 Eina_List *l, *ll;
442 ELM_CHECK_WIDTYPE(obj, widtype);
432 Widget_Data *wd = elm_widget_data_get(obj); 443 Widget_Data *wd = elm_widget_data_get(obj);
433 444
434 if (!wd) return; 445 if (!wd) return;
@@ -449,6 +460,7 @@ elm_hoversel_items_get(Evas_Object *obj)
449{ 460{
450 Elm_Hoversel_Item *it; 461 Elm_Hoversel_Item *it;
451 Eina_List *l, *ll; 462 Eina_List *l, *ll;
463 ELM_CHECK_WIDTYPE(obj, widtype);
452 Widget_Data *wd = elm_widget_data_get(obj); 464 Widget_Data *wd = elm_widget_data_get(obj);
453 465
454 if (!wd) return NULL; 466 if (!wd) return NULL;
@@ -476,6 +488,7 @@ elm_hoversel_items_get(Evas_Object *obj)
476EAPI Elm_Hoversel_Item * 488EAPI Elm_Hoversel_Item *
477elm_hoversel_item_add(Evas_Object *obj, const char *label, const char *icon_file, Elm_Icon_Type icon_type, void (*func) (void *data, Evas_Object *obj, void *event_info), const void *data) 489elm_hoversel_item_add(Evas_Object *obj, const char *label, const char *icon_file, Elm_Icon_Type icon_type, void (*func) (void *data, Evas_Object *obj, void *event_info), const void *data)
478{ 490{
491 ELM_CHECK_WIDTYPE(obj, widtype);
479 Widget_Data *wd = elm_widget_data_get(obj); 492 Widget_Data *wd = elm_widget_data_get(obj);
480 if (!wd) return NULL; 493 if (!wd) return NULL;
481 Elm_Hoversel_Item *it = calloc(1, sizeof(Elm_Hoversel_Item)); 494 Elm_Hoversel_Item *it = calloc(1, sizeof(Elm_Hoversel_Item));
diff --git a/src/lib/elc_notepad.c b/src/lib/elc_notepad.c
index 2550ccdf8..1cff2e26f 100644
--- a/src/lib/elc_notepad.c
+++ b/src/lib/elc_notepad.c
@@ -28,6 +28,7 @@ struct _Widget_Data
28 Eina_Bool auto_write : 1; 28 Eina_Bool auto_write : 1;
29}; 29};
30 30
31static const char *widtype = NULL;
31static void _del_hook(Evas_Object *obj); 32static void _del_hook(Evas_Object *obj);
32static void _sizing_eval(Evas_Object *obj); 33static void _sizing_eval(Evas_Object *obj);
33static void _on_focus_hook(void *data, Evas_Object *obj); 34static void _on_focus_hook(void *data, Evas_Object *obj);
@@ -269,6 +270,7 @@ elm_notepad_add(Evas_Object *parent)
269 wd = ELM_NEW(Widget_Data); 270 wd = ELM_NEW(Widget_Data);
270 e = evas_object_evas_get(parent); 271 e = evas_object_evas_get(parent);
271 obj = elm_widget_add(e); 272 obj = elm_widget_add(e);
273 ELM_SET_WIDTYPE(widtype, "notepad");
272 elm_widget_type_set(obj, "notepad"); 274 elm_widget_type_set(obj, "notepad");
273 elm_widget_sub_object_add(parent, obj); 275 elm_widget_sub_object_add(parent, obj);
274 elm_widget_on_focus_hook_set(obj, _on_focus_hook, NULL); 276 elm_widget_on_focus_hook_set(obj, _on_focus_hook, NULL);
@@ -313,6 +315,7 @@ elm_notepad_add(Evas_Object *parent)
313EAPI void 315EAPI void
314elm_notepad_file_set(Evas_Object *obj, const char *file, Elm_Text_Format format) 316elm_notepad_file_set(Evas_Object *obj, const char *file, Elm_Text_Format format)
315{ 317{
318 ELM_CHECK_WIDTYPE(obj, widtype);
316 Widget_Data *wd = elm_widget_data_get(obj); 319 Widget_Data *wd = elm_widget_data_get(obj);
317 if (wd->delay_write) 320 if (wd->delay_write)
318 { 321 {
@@ -342,6 +345,7 @@ elm_notepad_file_set(Evas_Object *obj, const char *file, Elm_Text_Format format)
342EAPI void 345EAPI void
343elm_notepad_bounce_set(Evas_Object *obj, Eina_Bool h_bounce, Eina_Bool v_bounce) 346elm_notepad_bounce_set(Evas_Object *obj, Eina_Bool h_bounce, Eina_Bool v_bounce)
344{ 347{
348 ELM_CHECK_WIDTYPE(obj, widtype);
345 Widget_Data *wd = elm_widget_data_get(obj); 349 Widget_Data *wd = elm_widget_data_get(obj);
346 elm_scroller_bounce_set(wd->scr, h_bounce, v_bounce); 350 elm_scroller_bounce_set(wd->scr, h_bounce, v_bounce);
347} 351}
diff --git a/src/lib/elc_scrolled_entry.c b/src/lib/elc_scrolled_entry.c
index bdeb88cdc..9854486c3 100644
--- a/src/lib/elc_scrolled_entry.c
+++ b/src/lib/elc_scrolled_entry.c
@@ -10,6 +10,7 @@ struct _Widget_Data
10 Elm_Scroller_Policy policy_h, policy_v; 10 Elm_Scroller_Policy policy_h, policy_v;
11}; 11};
12 12
13static const char *widtype = NULL;
13static void 14static void
14_del_hook(Evas_Object *obj) 15_del_hook(Evas_Object *obj)
15{ 16{
@@ -140,6 +141,7 @@ elm_scrolled_entry_add(Evas_Object *parent)
140 wd = ELM_NEW(Widget_Data); 141 wd = ELM_NEW(Widget_Data);
141 e = evas_object_evas_get(parent); 142 e = evas_object_evas_get(parent);
142 obj = elm_widget_add(e); 143 obj = elm_widget_add(e);
144 ELM_SET_WIDTYPE(widtype, "scrolled_entry");
143 elm_widget_type_set(obj, "scrolled_entry"); 145 elm_widget_type_set(obj, "scrolled_entry");
144 elm_widget_sub_object_add(parent, obj); 146 elm_widget_sub_object_add(parent, obj);
145 elm_widget_on_focus_hook_set(obj, _on_focus_hook, NULL); 147 elm_widget_on_focus_hook_set(obj, _on_focus_hook, NULL);
@@ -180,6 +182,7 @@ elm_scrolled_entry_add(Evas_Object *parent)
180EAPI void 182EAPI void
181elm_scrolled_entry_single_line_set(Evas_Object *obj, Eina_Bool single_line) 183elm_scrolled_entry_single_line_set(Evas_Object *obj, Eina_Bool single_line)
182{ 184{
185 ELM_CHECK_WIDTYPE(obj, widtype);
183 Widget_Data *wd = elm_widget_data_get(obj); 186 Widget_Data *wd = elm_widget_data_get(obj);
184 if (!wd) return; 187 if (!wd) return;
185 elm_entry_single_line_set(wd->entry, single_line); 188 elm_entry_single_line_set(wd->entry, single_line);
@@ -198,6 +201,7 @@ elm_scrolled_entry_single_line_set(Evas_Object *obj, Eina_Bool single_line)
198EAPI void 201EAPI void
199elm_scrolled_entry_password_set(Evas_Object *obj, Eina_Bool password) 202elm_scrolled_entry_password_set(Evas_Object *obj, Eina_Bool password)
200{ 203{
204 ELM_CHECK_WIDTYPE(obj, widtype);
201 Widget_Data *wd = elm_widget_data_get(obj); 205 Widget_Data *wd = elm_widget_data_get(obj);
202 if (!wd) return; 206 if (!wd) return;
203 elm_entry_password_set(wd->entry, password); 207 elm_entry_password_set(wd->entry, password);
@@ -206,6 +210,7 @@ elm_scrolled_entry_password_set(Evas_Object *obj, Eina_Bool password)
206EAPI void 210EAPI void
207elm_scrolled_entry_entry_set(Evas_Object *obj, const char *entry) 211elm_scrolled_entry_entry_set(Evas_Object *obj, const char *entry)
208{ 212{
213 ELM_CHECK_WIDTYPE(obj, widtype);
209 Widget_Data *wd = elm_widget_data_get(obj); 214 Widget_Data *wd = elm_widget_data_get(obj);
210 if (!wd) return; 215 if (!wd) return;
211 elm_entry_entry_set(wd->entry, entry); 216 elm_entry_entry_set(wd->entry, entry);
@@ -214,6 +219,7 @@ elm_scrolled_entry_entry_set(Evas_Object *obj, const char *entry)
214EAPI const char * 219EAPI const char *
215elm_scrolled_entry_entry_get(const Evas_Object *obj) 220elm_scrolled_entry_entry_get(const Evas_Object *obj)
216{ 221{
222 ELM_CHECK_WIDTYPE(obj, widtype);
217 Widget_Data *wd = elm_widget_data_get(obj); 223 Widget_Data *wd = elm_widget_data_get(obj);
218 if (!wd) return NULL; 224 if (!wd) return NULL;
219 return elm_entry_entry_get(wd->entry); 225 return elm_entry_entry_get(wd->entry);
@@ -222,6 +228,7 @@ elm_scrolled_entry_entry_get(const Evas_Object *obj)
222EAPI const char * 228EAPI const char *
223elm_scrolled_entry_selection_get(const Evas_Object *obj) 229elm_scrolled_entry_selection_get(const Evas_Object *obj)
224{ 230{
231 ELM_CHECK_WIDTYPE(obj, widtype);
225 Widget_Data *wd = elm_widget_data_get(obj); 232 Widget_Data *wd = elm_widget_data_get(obj);
226 if (!wd) return NULL; 233 if (!wd) return NULL;
227 return elm_entry_selection_get(wd->entry); 234 return elm_entry_selection_get(wd->entry);
@@ -230,6 +237,7 @@ elm_scrolled_entry_selection_get(const Evas_Object *obj)
230EAPI void 237EAPI void
231elm_scrolled_entry_entry_insert(Evas_Object *obj, const char *entry) 238elm_scrolled_entry_entry_insert(Evas_Object *obj, const char *entry)
232{ 239{
240 ELM_CHECK_WIDTYPE(obj, widtype);
233 Widget_Data *wd = elm_widget_data_get(obj); 241 Widget_Data *wd = elm_widget_data_get(obj);
234 if (!wd) return; 242 if (!wd) return;
235 elm_entry_entry_insert(wd->entry, entry); 243 elm_entry_entry_insert(wd->entry, entry);
@@ -238,6 +246,7 @@ elm_scrolled_entry_entry_insert(Evas_Object *obj, const char *entry)
238EAPI void 246EAPI void
239elm_scrolled_entry_line_wrap_set(Evas_Object *obj, Eina_Bool wrap) 247elm_scrolled_entry_line_wrap_set(Evas_Object *obj, Eina_Bool wrap)
240{ 248{
249 ELM_CHECK_WIDTYPE(obj, widtype);
241 Widget_Data *wd = elm_widget_data_get(obj); 250 Widget_Data *wd = elm_widget_data_get(obj);
242 if (!wd) return; 251 if (!wd) return;
243 elm_entry_line_wrap_set(wd->entry, wrap); 252 elm_entry_line_wrap_set(wd->entry, wrap);
@@ -246,6 +255,7 @@ elm_scrolled_entry_line_wrap_set(Evas_Object *obj, Eina_Bool wrap)
246EAPI void 255EAPI void
247elm_scrolled_entry_line_char_wrap_set(Evas_Object *obj, Eina_Bool wrap) 256elm_scrolled_entry_line_char_wrap_set(Evas_Object *obj, Eina_Bool wrap)
248{ 257{
258 ELM_CHECK_WIDTYPE(obj, widtype);
249 Widget_Data *wd = elm_widget_data_get(obj); 259 Widget_Data *wd = elm_widget_data_get(obj);
250 if (!wd) return; 260 if (!wd) return;
251 elm_entry_line_char_wrap_set(wd->entry, wrap); 261 elm_entry_line_char_wrap_set(wd->entry, wrap);
@@ -254,6 +264,7 @@ elm_scrolled_entry_line_char_wrap_set(Evas_Object *obj, Eina_Bool wrap)
254EAPI void 264EAPI void
255elm_scrolled_entry_editable_set(Evas_Object *obj, Eina_Bool editable) 265elm_scrolled_entry_editable_set(Evas_Object *obj, Eina_Bool editable)
256{ 266{
267 ELM_CHECK_WIDTYPE(obj, widtype);
257 Widget_Data *wd = elm_widget_data_get(obj); 268 Widget_Data *wd = elm_widget_data_get(obj);
258 if (!wd) return; 269 if (!wd) return;
259 elm_entry_editable_set(wd->entry, editable); 270 elm_entry_editable_set(wd->entry, editable);
@@ -262,6 +273,7 @@ elm_scrolled_entry_editable_set(Evas_Object *obj, Eina_Bool editable)
262EAPI void 273EAPI void
263elm_scrolled_entry_select_none(Evas_Object *obj) 274elm_scrolled_entry_select_none(Evas_Object *obj)
264{ 275{
276 ELM_CHECK_WIDTYPE(obj, widtype);
265 Widget_Data *wd = elm_widget_data_get(obj); 277 Widget_Data *wd = elm_widget_data_get(obj);
266 if (!wd) return; 278 if (!wd) return;
267 elm_entry_select_none(wd->entry); 279 elm_entry_select_none(wd->entry);
@@ -270,6 +282,7 @@ elm_scrolled_entry_select_none(Evas_Object *obj)
270EAPI void 282EAPI void
271elm_scrolled_entry_select_all(Evas_Object *obj) 283elm_scrolled_entry_select_all(Evas_Object *obj)
272{ 284{
285 ELM_CHECK_WIDTYPE(obj, widtype);
273 Widget_Data *wd = elm_widget_data_get(obj); 286 Widget_Data *wd = elm_widget_data_get(obj);
274 if (!wd) return; 287 if (!wd) return;
275 elm_entry_select_all(wd->entry); 288 elm_entry_select_all(wd->entry);
@@ -278,6 +291,7 @@ elm_scrolled_entry_select_all(Evas_Object *obj)
278EAPI Eina_Bool 291EAPI Eina_Bool
279elm_scrolled_entry_cursor_next(Evas_Object *obj) 292elm_scrolled_entry_cursor_next(Evas_Object *obj)
280{ 293{
294 ELM_CHECK_WIDTYPE(obj, widtype);
281 Widget_Data *wd = elm_widget_data_get(obj); 295 Widget_Data *wd = elm_widget_data_get(obj);
282 if (!wd) return 0; 296 if (!wd) return 0;
283 return elm_entry_cursor_next(wd->entry); 297 return elm_entry_cursor_next(wd->entry);
@@ -286,6 +300,7 @@ elm_scrolled_entry_cursor_next(Evas_Object *obj)
286EAPI Eina_Bool 300EAPI Eina_Bool
287elm_scrolled_entry_cursor_prev(Evas_Object *obj) 301elm_scrolled_entry_cursor_prev(Evas_Object *obj)
288{ 302{
303 ELM_CHECK_WIDTYPE(obj, widtype);
289 Widget_Data *wd = elm_widget_data_get(obj); 304 Widget_Data *wd = elm_widget_data_get(obj);
290 if (!wd) return 0; 305 if (!wd) return 0;
291 return elm_entry_cursor_prev(wd->entry); 306 return elm_entry_cursor_prev(wd->entry);
@@ -294,6 +309,7 @@ elm_scrolled_entry_cursor_prev(Evas_Object *obj)
294EAPI Eina_Bool 309EAPI Eina_Bool
295elm_scrolled_entry_cursor_up(Evas_Object *obj) 310elm_scrolled_entry_cursor_up(Evas_Object *obj)
296{ 311{
312 ELM_CHECK_WIDTYPE(obj, widtype);
297 Widget_Data *wd = elm_widget_data_get(obj); 313 Widget_Data *wd = elm_widget_data_get(obj);
298 if (!wd) return 0; 314 if (!wd) return 0;
299 return elm_entry_cursor_up(wd->entry); 315 return elm_entry_cursor_up(wd->entry);
@@ -302,6 +318,7 @@ elm_scrolled_entry_cursor_up(Evas_Object *obj)
302EAPI Eina_Bool 318EAPI Eina_Bool
303elm_scrolled_entry_cursor_down(Evas_Object *obj) 319elm_scrolled_entry_cursor_down(Evas_Object *obj)
304{ 320{
321 ELM_CHECK_WIDTYPE(obj, widtype);
305 Widget_Data *wd = elm_widget_data_get(obj); 322 Widget_Data *wd = elm_widget_data_get(obj);
306 if (!wd) return 0; 323 if (!wd) return 0;
307 return elm_entry_cursor_down(wd->entry); 324 return elm_entry_cursor_down(wd->entry);
@@ -310,6 +327,7 @@ elm_scrolled_entry_cursor_down(Evas_Object *obj)
310EAPI void 327EAPI void
311elm_scrolled_entry_cursor_begin_set(Evas_Object *obj) 328elm_scrolled_entry_cursor_begin_set(Evas_Object *obj)
312{ 329{
330 ELM_CHECK_WIDTYPE(obj, widtype);
313 Widget_Data *wd = elm_widget_data_get(obj); 331 Widget_Data *wd = elm_widget_data_get(obj);
314 if (!wd) return; 332 if (!wd) return;
315 elm_entry_cursor_begin_set(wd->entry); 333 elm_entry_cursor_begin_set(wd->entry);
@@ -318,6 +336,7 @@ elm_scrolled_entry_cursor_begin_set(Evas_Object *obj)
318EAPI void 336EAPI void
319elm_scrolled_entry_cursor_end_set(Evas_Object *obj) 337elm_scrolled_entry_cursor_end_set(Evas_Object *obj)
320{ 338{
339 ELM_CHECK_WIDTYPE(obj, widtype);
321 Widget_Data *wd = elm_widget_data_get(obj); 340 Widget_Data *wd = elm_widget_data_get(obj);
322 if (!wd) return; 341 if (!wd) return;
323 elm_entry_cursor_end_set(wd->entry); 342 elm_entry_cursor_end_set(wd->entry);
@@ -326,6 +345,7 @@ elm_scrolled_entry_cursor_end_set(Evas_Object *obj)
326EAPI void 345EAPI void
327elm_scrolled_entry_cursor_line_begin_set(Evas_Object *obj) 346elm_scrolled_entry_cursor_line_begin_set(Evas_Object *obj)
328{ 347{
348 ELM_CHECK_WIDTYPE(obj, widtype);
329 Widget_Data *wd = elm_widget_data_get(obj); 349 Widget_Data *wd = elm_widget_data_get(obj);
330 if (!wd) return; 350 if (!wd) return;
331 elm_entry_cursor_line_begin_set(wd->entry); 351 elm_entry_cursor_line_begin_set(wd->entry);
@@ -334,6 +354,7 @@ elm_scrolled_entry_cursor_line_begin_set(Evas_Object *obj)
334EAPI void 354EAPI void
335elm_scrolled_entry_cursor_line_end_set(Evas_Object *obj) 355elm_scrolled_entry_cursor_line_end_set(Evas_Object *obj)
336{ 356{
357 ELM_CHECK_WIDTYPE(obj, widtype);
337 Widget_Data *wd = elm_widget_data_get(obj); 358 Widget_Data *wd = elm_widget_data_get(obj);
338 if (!wd) return; 359 if (!wd) return;
339 elm_entry_cursor_line_end_set(wd->entry); 360 elm_entry_cursor_line_end_set(wd->entry);
@@ -342,6 +363,7 @@ elm_scrolled_entry_cursor_line_end_set(Evas_Object *obj)
342EAPI void 363EAPI void
343elm_scrolled_entry_cursor_selection_begin(Evas_Object *obj) 364elm_scrolled_entry_cursor_selection_begin(Evas_Object *obj)
344{ 365{
366 ELM_CHECK_WIDTYPE(obj, widtype);
345 Widget_Data *wd = elm_widget_data_get(obj); 367 Widget_Data *wd = elm_widget_data_get(obj);
346 if (!wd) return; 368 if (!wd) return;
347 elm_entry_cursor_selection_begin(wd->entry); 369 elm_entry_cursor_selection_begin(wd->entry);
@@ -350,6 +372,7 @@ elm_scrolled_entry_cursor_selection_begin(Evas_Object *obj)
350EAPI void 372EAPI void
351elm_scrolled_entry_cursor_selection_end(Evas_Object *obj) 373elm_scrolled_entry_cursor_selection_end(Evas_Object *obj)
352{ 374{
375 ELM_CHECK_WIDTYPE(obj, widtype);
353 Widget_Data *wd = elm_widget_data_get(obj); 376 Widget_Data *wd = elm_widget_data_get(obj);
354 if (!wd) return; 377 if (!wd) return;
355 elm_entry_cursor_selection_end(wd->entry); 378 elm_entry_cursor_selection_end(wd->entry);
@@ -358,6 +381,7 @@ elm_scrolled_entry_cursor_selection_end(Evas_Object *obj)
358EAPI Eina_Bool 381EAPI Eina_Bool
359elm_scrolled_entry_cursor_is_format_get(Evas_Object *obj) 382elm_scrolled_entry_cursor_is_format_get(Evas_Object *obj)
360{ 383{
384 ELM_CHECK_WIDTYPE(obj, widtype);
361 Widget_Data *wd = elm_widget_data_get(obj); 385 Widget_Data *wd = elm_widget_data_get(obj);
362 if (!wd) return 0; 386 if (!wd) return 0;
363 return elm_entry_cursor_is_format_get(wd->entry); 387 return elm_entry_cursor_is_format_get(wd->entry);
@@ -366,6 +390,7 @@ elm_scrolled_entry_cursor_is_format_get(Evas_Object *obj)
366EAPI Eina_Bool 390EAPI Eina_Bool
367elm_scrolled_entry_cursor_is_visible_format_get(Evas_Object *obj) 391elm_scrolled_entry_cursor_is_visible_format_get(Evas_Object *obj)
368{ 392{
393 ELM_CHECK_WIDTYPE(obj, widtype);
369 Widget_Data *wd = elm_widget_data_get(obj); 394 Widget_Data *wd = elm_widget_data_get(obj);
370 if (!wd) return 0; 395 if (!wd) return 0;
371 return elm_entry_cursor_is_visible_format_get(wd->entry); 396 return elm_entry_cursor_is_visible_format_get(wd->entry);
@@ -374,6 +399,7 @@ elm_scrolled_entry_cursor_is_visible_format_get(Evas_Object *obj)
374EAPI const char * 399EAPI const char *
375elm_scrolled_entry_cursor_content_get(Evas_Object *obj) 400elm_scrolled_entry_cursor_content_get(Evas_Object *obj)
376{ 401{
402 ELM_CHECK_WIDTYPE(obj, widtype);
377 Widget_Data *wd = elm_widget_data_get(obj); 403 Widget_Data *wd = elm_widget_data_get(obj);
378 if (!wd) return NULL; 404 if (!wd) return NULL;
379 return elm_entry_cursor_content_get(wd->entry); 405 return elm_entry_cursor_content_get(wd->entry);
@@ -382,6 +408,7 @@ elm_scrolled_entry_cursor_content_get(Evas_Object *obj)
382EAPI void 408EAPI void
383elm_scrolled_entry_selection_cut(Evas_Object *obj) 409elm_scrolled_entry_selection_cut(Evas_Object *obj)
384{ 410{
411 ELM_CHECK_WIDTYPE(obj, widtype);
385 Widget_Data *wd = elm_widget_data_get(obj); 412 Widget_Data *wd = elm_widget_data_get(obj);
386 if (!wd) return; 413 if (!wd) return;
387 elm_entry_selection_cut(wd->entry); 414 elm_entry_selection_cut(wd->entry);
@@ -390,6 +417,7 @@ elm_scrolled_entry_selection_cut(Evas_Object *obj)
390EAPI void 417EAPI void
391elm_scrolled_entry_selection_copy(Evas_Object *obj) 418elm_scrolled_entry_selection_copy(Evas_Object *obj)
392{ 419{
420 ELM_CHECK_WIDTYPE(obj, widtype);
393 Widget_Data *wd = elm_widget_data_get(obj); 421 Widget_Data *wd = elm_widget_data_get(obj);
394 if (!wd) return; 422 if (!wd) return;
395 elm_entry_selection_copy(wd->entry); 423 elm_entry_selection_copy(wd->entry);
@@ -398,6 +426,7 @@ elm_scrolled_entry_selection_copy(Evas_Object *obj)
398EAPI void 426EAPI void
399elm_scrolled_entry_selection_paste(Evas_Object *obj) 427elm_scrolled_entry_selection_paste(Evas_Object *obj)
400{ 428{
429 ELM_CHECK_WIDTYPE(obj, widtype);
401 Widget_Data *wd = elm_widget_data_get(obj); 430 Widget_Data *wd = elm_widget_data_get(obj);
402 if (!wd) return; 431 if (!wd) return;
403 elm_entry_selection_paste(wd->entry); 432 elm_entry_selection_paste(wd->entry);
@@ -406,6 +435,7 @@ elm_scrolled_entry_selection_paste(Evas_Object *obj)
406EAPI void 435EAPI void
407elm_scrolled_entry_context_menu_clear(Evas_Object *obj) 436elm_scrolled_entry_context_menu_clear(Evas_Object *obj)
408{ 437{
438 ELM_CHECK_WIDTYPE(obj, widtype);
409 Widget_Data *wd = elm_widget_data_get(obj); 439 Widget_Data *wd = elm_widget_data_get(obj);
410 if (!wd) return; 440 if (!wd) return;
411 elm_entry_context_menu_clear(wd->entry); 441 elm_entry_context_menu_clear(wd->entry);
@@ -414,6 +444,7 @@ elm_scrolled_entry_context_menu_clear(Evas_Object *obj)
414EAPI void 444EAPI void
415elm_scrolled_entry_context_menu_item_add(Evas_Object *obj, const char *label, const char *icon_file, Elm_Icon_Type icon_type, void (*func) (void *data, Evas_Object *obj, void *event_info), const void *data) 445elm_scrolled_entry_context_menu_item_add(Evas_Object *obj, const char *label, const char *icon_file, Elm_Icon_Type icon_type, void (*func) (void *data, Evas_Object *obj, void *event_info), const void *data)
416{ 446{
447 ELM_CHECK_WIDTYPE(obj, widtype);
417 Widget_Data *wd = elm_widget_data_get(obj); 448 Widget_Data *wd = elm_widget_data_get(obj);
418 if (!wd) return; 449 if (!wd) return;
419 elm_entry_context_menu_item_add(wd->entry, label, icon_file, icon_type, func, data); 450 elm_entry_context_menu_item_add(wd->entry, label, icon_file, icon_type, func, data);
@@ -422,6 +453,7 @@ elm_scrolled_entry_context_menu_item_add(Evas_Object *obj, const char *label, co
422EAPI void 453EAPI void
423elm_scrolled_entry_context_menu_disabled_set(Evas_Object *obj, Eina_Bool disabled) 454elm_scrolled_entry_context_menu_disabled_set(Evas_Object *obj, Eina_Bool disabled)
424{ 455{
456 ELM_CHECK_WIDTYPE(obj, widtype);
425 Widget_Data *wd = elm_widget_data_get(obj); 457 Widget_Data *wd = elm_widget_data_get(obj);
426 if (!wd) return; 458 if (!wd) return;
427 elm_entry_context_menu_disabled_set(wd->entry, disabled); 459 elm_entry_context_menu_disabled_set(wd->entry, disabled);
@@ -430,6 +462,7 @@ elm_scrolled_entry_context_menu_disabled_set(Evas_Object *obj, Eina_Bool disable
430EAPI Eina_Bool 462EAPI Eina_Bool
431elm_scrolled_entry_context_menu_disabled_get(Evas_Object *obj) 463elm_scrolled_entry_context_menu_disabled_get(Evas_Object *obj)
432{ 464{
465 ELM_CHECK_WIDTYPE(obj, widtype);
433 Widget_Data *wd = elm_widget_data_get(obj); 466 Widget_Data *wd = elm_widget_data_get(obj);
434 if (!wd) return 0; 467 if (!wd) return 0;
435 return elm_entry_context_menu_disabled_get(wd->entry); 468 return elm_entry_context_menu_disabled_get(wd->entry);
@@ -438,6 +471,7 @@ elm_scrolled_entry_context_menu_disabled_get(Evas_Object *obj)
438EAPI void 471EAPI void
439elm_scrolled_entry_scrollbar_policy_set(Evas_Object *obj, Elm_Scroller_Policy h, Elm_Scroller_Policy v) 472elm_scrolled_entry_scrollbar_policy_set(Evas_Object *obj, Elm_Scroller_Policy h, Elm_Scroller_Policy v)
440{ 473{
474 ELM_CHECK_WIDTYPE(obj, widtype);
441 Widget_Data *wd = elm_widget_data_get(obj); 475 Widget_Data *wd = elm_widget_data_get(obj);
442 if (!wd) return; 476 if (!wd) return;
443 wd->policy_h = h; 477 wd->policy_h = h;
@@ -448,6 +482,7 @@ elm_scrolled_entry_scrollbar_policy_set(Evas_Object *obj, Elm_Scroller_Policy h,
448EAPI void 482EAPI void
449elm_scrolled_entry_bounce_set(Evas_Object *obj, Eina_Bool h_bounce, Eina_Bool v_bounce) 483elm_scrolled_entry_bounce_set(Evas_Object *obj, Eina_Bool h_bounce, Eina_Bool v_bounce)
450{ 484{
485 ELM_CHECK_WIDTYPE(obj, widtype);
451 Widget_Data *wd = elm_widget_data_get(obj); 486 Widget_Data *wd = elm_widget_data_get(obj);
452 if (!wd) return; 487 if (!wd) return;
453 elm_scroller_bounce_set(wd->scroller, h_bounce, v_bounce); 488 elm_scroller_bounce_set(wd->scroller, h_bounce, v_bounce);
diff --git a/src/lib/elm_bg.c b/src/lib/elm_bg.c
index a2ce0948e..16b699aae 100644
--- a/src/lib/elm_bg.c
+++ b/src/lib/elm_bg.c
@@ -18,6 +18,7 @@ struct _Widget_Data
18 const char *file, *group; 18 const char *file, *group;
19}; 19};
20 20
21static const char *widtype = NULL;
21static void _del_hook(Evas_Object *obj); 22static void _del_hook(Evas_Object *obj);
22static void _theme_hook(Evas_Object *obj); 23static void _theme_hook(Evas_Object *obj);
23static void _custom_resize(void *data, Evas *a, Evas_Object *obj, void *event_info); 24static void _custom_resize(void *data, Evas *a, Evas_Object *obj, void *event_info);
@@ -77,6 +78,7 @@ elm_bg_add(Evas_Object *parent)
77 wd = ELM_NEW(Widget_Data); 78 wd = ELM_NEW(Widget_Data);
78 e = evas_object_evas_get(parent); 79 e = evas_object_evas_get(parent);
79 obj = elm_widget_add(e); 80 obj = elm_widget_add(e);
81 ELM_SET_WIDTYPE(widtype, "bg");
80 elm_widget_type_set(obj, "bg"); 82 elm_widget_type_set(obj, "bg");
81 elm_widget_sub_object_add(parent, obj); 83 elm_widget_sub_object_add(parent, obj);
82 elm_widget_data_set(obj, wd); 84 elm_widget_data_set(obj, wd);
@@ -106,6 +108,7 @@ elm_bg_add(Evas_Object *parent)
106EAPI void 108EAPI void
107elm_bg_file_set(Evas_Object *obj, const char *file, const char *group) 109elm_bg_file_set(Evas_Object *obj, const char *file, const char *group)
108{ 110{
111 ELM_CHECK_WIDTYPE(obj, widtype);
109 Widget_Data *wd = elm_widget_data_get(obj); 112 Widget_Data *wd = elm_widget_data_get(obj);
110 const char *p; 113 const char *p;
111 114
diff --git a/src/lib/elm_box.c b/src/lib/elm_box.c
index ac78b0428..4e92da6af 100644
--- a/src/lib/elm_box.c
+++ b/src/lib/elm_box.c
@@ -25,6 +25,7 @@ struct _Widget_Data
25 Eina_Bool homogeneous:1; 25 Eina_Bool homogeneous:1;
26}; 26};
27 27
28static const char *widtype = NULL;
28static void _del_hook(Evas_Object *obj); 29static void _del_hook(Evas_Object *obj);
29static void _sizing_eval(Evas_Object *obj); 30static void _sizing_eval(Evas_Object *obj);
30static void _changed_size_hints(void *data, Evas *e, Evas_Object *obj, void *event_info); 31static void _changed_size_hints(void *data, Evas *e, Evas_Object *obj, void *event_info);
@@ -105,6 +106,7 @@ elm_box_add(Evas_Object *parent)
105 wd = ELM_NEW(Widget_Data); 106 wd = ELM_NEW(Widget_Data);
106 e = evas_object_evas_get(parent); 107 e = evas_object_evas_get(parent);
107 obj = elm_widget_add(e); 108 obj = elm_widget_add(e);
109 ELM_SET_WIDTYPE(widtype, "box");
108 elm_widget_type_set(obj, "box"); 110 elm_widget_type_set(obj, "box");
109 elm_widget_sub_object_add(parent, obj); 111 elm_widget_sub_object_add(parent, obj);
110 elm_widget_data_set(obj, wd); 112 elm_widget_data_set(obj, wd);
@@ -140,6 +142,7 @@ elm_box_add(Evas_Object *parent)
140EAPI void 142EAPI void
141elm_box_horizontal_set(Evas_Object *obj, Eina_Bool horizontal) 143elm_box_horizontal_set(Evas_Object *obj, Eina_Bool horizontal)
142{ 144{
145 ELM_CHECK_WIDTYPE(obj, widtype);
143 Widget_Data *wd = elm_widget_data_get(obj); 146 Widget_Data *wd = elm_widget_data_get(obj);
144 wd->horizontal = !!horizontal; 147 wd->horizontal = !!horizontal;
145 evas_object_smart_calculate(wd->box); 148 evas_object_smart_calculate(wd->box);
@@ -177,6 +180,7 @@ elm_box_horizontal_set(Evas_Object *obj, Eina_Bool horizontal)
177EAPI void 180EAPI void
178elm_box_homogenous_set(Evas_Object *obj, Eina_Bool homogenous) 181elm_box_homogenous_set(Evas_Object *obj, Eina_Bool homogenous)
179{ 182{
183 ELM_CHECK_WIDTYPE(obj, widtype);
180 Widget_Data *wd = elm_widget_data_get(obj); 184 Widget_Data *wd = elm_widget_data_get(obj);
181 wd->homogeneous = !!homogenous; 185 wd->homogeneous = !!homogenous;
182 evas_object_smart_calculate(wd->box); 186 evas_object_smart_calculate(wd->box);
@@ -214,6 +218,7 @@ elm_box_homogenous_set(Evas_Object *obj, Eina_Bool homogenous)
214EAPI void 218EAPI void
215elm_box_pack_start(Evas_Object *obj, Evas_Object *subobj) 219elm_box_pack_start(Evas_Object *obj, Evas_Object *subobj)
216{ 220{
221 ELM_CHECK_WIDTYPE(obj, widtype);
217 Widget_Data *wd = elm_widget_data_get(obj); 222 Widget_Data *wd = elm_widget_data_get(obj);
218 elm_widget_sub_object_add(obj, subobj); 223 elm_widget_sub_object_add(obj, subobj);
219 evas_object_box_prepend(wd->box, subobj); 224 evas_object_box_prepend(wd->box, subobj);
@@ -233,6 +238,7 @@ elm_box_pack_start(Evas_Object *obj, Evas_Object *subobj)
233EAPI void 238EAPI void
234elm_box_pack_end(Evas_Object *obj, Evas_Object *subobj) 239elm_box_pack_end(Evas_Object *obj, Evas_Object *subobj)
235{ 240{
241 ELM_CHECK_WIDTYPE(obj, widtype);
236 Widget_Data *wd = elm_widget_data_get(obj); 242 Widget_Data *wd = elm_widget_data_get(obj);
237 elm_widget_sub_object_add(obj, subobj); 243 elm_widget_sub_object_add(obj, subobj);
238 evas_object_box_append(wd->box, subobj); 244 evas_object_box_append(wd->box, subobj);
@@ -255,6 +261,7 @@ elm_box_pack_end(Evas_Object *obj, Evas_Object *subobj)
255EAPI void 261EAPI void
256elm_box_pack_before(Evas_Object *obj, Evas_Object *subobj, Evas_Object *before) 262elm_box_pack_before(Evas_Object *obj, Evas_Object *subobj, Evas_Object *before)
257{ 263{
264 ELM_CHECK_WIDTYPE(obj, widtype);
258 Widget_Data *wd = elm_widget_data_get(obj); 265 Widget_Data *wd = elm_widget_data_get(obj);
259 elm_widget_sub_object_add(obj, subobj); 266 elm_widget_sub_object_add(obj, subobj);
260 evas_object_box_insert_before(wd->box, subobj, before); 267 evas_object_box_insert_before(wd->box, subobj, before);
@@ -277,6 +284,7 @@ elm_box_pack_before(Evas_Object *obj, Evas_Object *subobj, Evas_Object *before)
277EAPI void 284EAPI void
278elm_box_pack_after(Evas_Object *obj, Evas_Object *subobj, Evas_Object *after) 285elm_box_pack_after(Evas_Object *obj, Evas_Object *subobj, Evas_Object *after)
279{ 286{
287 ELM_CHECK_WIDTYPE(obj, widtype);
280 Widget_Data *wd = elm_widget_data_get(obj); 288 Widget_Data *wd = elm_widget_data_get(obj);
281 elm_widget_sub_object_add(obj, subobj); 289 elm_widget_sub_object_add(obj, subobj);
282 evas_object_box_insert_after(wd->box, subobj, after); 290 evas_object_box_insert_after(wd->box, subobj, after);
@@ -294,6 +302,7 @@ elm_box_pack_after(Evas_Object *obj, Evas_Object *subobj, Evas_Object *after)
294EAPI void 302EAPI void
295elm_box_clear(Evas_Object *obj) 303elm_box_clear(Evas_Object *obj)
296{ 304{
305 ELM_CHECK_WIDTYPE(obj, widtype);
297 Widget_Data *wd = elm_widget_data_get(obj); 306 Widget_Data *wd = elm_widget_data_get(obj);
298 evas_object_box_remove_all(wd->box, 1); 307 evas_object_box_remove_all(wd->box, 1);
299} 308}
@@ -311,6 +320,7 @@ elm_box_clear(Evas_Object *obj)
311EAPI void 320EAPI void
312elm_box_unpack(Evas_Object *obj, Evas_Object *subobj) 321elm_box_unpack(Evas_Object *obj, Evas_Object *subobj)
313{ 322{
323 ELM_CHECK_WIDTYPE(obj, widtype);
314 Widget_Data *wd = elm_widget_data_get(obj); 324 Widget_Data *wd = elm_widget_data_get(obj);
315 evas_object_box_remove(wd->box, subobj); 325 evas_object_box_remove(wd->box, subobj);
316} 326}
@@ -328,6 +338,7 @@ elm_box_unpack(Evas_Object *obj, Evas_Object *subobj)
328EAPI void 338EAPI void
329elm_box_unpack_all(Evas_Object *obj) 339elm_box_unpack_all(Evas_Object *obj)
330{ 340{
341 ELM_CHECK_WIDTYPE(obj, widtype);
331 Widget_Data *wd = elm_widget_data_get(obj); 342 Widget_Data *wd = elm_widget_data_get(obj);
332 evas_object_box_remove_all(wd->box, 0); 343 evas_object_box_remove_all(wd->box, 0);
333} 344}
diff --git a/src/lib/elm_bubble.c b/src/lib/elm_bubble.c
index 21b5670dd..9ae6fda03 100644
--- a/src/lib/elm_bubble.c
+++ b/src/lib/elm_bubble.c
@@ -17,6 +17,7 @@ struct _Widget_Data
17 const char *label, *info; 17 const char *label, *info;
18}; 18};
19 19
20static const char *widtype = NULL;
20static void _del_hook(Evas_Object *obj); 21static void _del_hook(Evas_Object *obj);
21static void _theme_hook(Evas_Object *obj); 22static void _theme_hook(Evas_Object *obj);
22static void _sizing_eval(Evas_Object *obj); 23static void _sizing_eval(Evas_Object *obj);
@@ -94,6 +95,7 @@ elm_bubble_add(Evas_Object *parent)
94 wd = ELM_NEW(Widget_Data); 95 wd = ELM_NEW(Widget_Data);
95 e = evas_object_evas_get(parent); 96 e = evas_object_evas_get(parent);
96 obj = elm_widget_add(e); 97 obj = elm_widget_add(e);
98 ELM_SET_WIDTYPE(widtype, "bubble");
97 elm_widget_type_set(obj, "bubble"); 99 elm_widget_type_set(obj, "bubble");
98 elm_widget_sub_object_add(parent, obj); 100 elm_widget_sub_object_add(parent, obj);
99 elm_widget_data_set(obj, wd); 101 elm_widget_data_set(obj, wd);
@@ -124,6 +126,7 @@ elm_bubble_add(Evas_Object *parent)
124EAPI void 126EAPI void
125elm_bubble_label_set(Evas_Object *obj, const char *label) 127elm_bubble_label_set(Evas_Object *obj, const char *label)
126{ 128{
129 ELM_CHECK_WIDTYPE(obj, widtype);
127 Widget_Data *wd = elm_widget_data_get(obj); 130 Widget_Data *wd = elm_widget_data_get(obj);
128 if (wd->label) eina_stringshare_del(wd->label); 131 if (wd->label) eina_stringshare_del(wd->label);
129 if (label) wd->label = eina_stringshare_add(label); 132 if (label) wd->label = eina_stringshare_add(label);
@@ -135,6 +138,7 @@ elm_bubble_label_set(Evas_Object *obj, const char *label)
135EAPI const char* 138EAPI const char*
136elm_bubble_label_get(Evas_Object *obj) 139elm_bubble_label_get(Evas_Object *obj)
137{ 140{
141 ELM_CHECK_WIDTYPE(obj, widtype);
138 Widget_Data *wd = elm_widget_data_get(obj); 142 Widget_Data *wd = elm_widget_data_get(obj);
139 if (!wd) return NULL; 143 if (!wd) return NULL;
140 return wd->label; 144 return wd->label;
@@ -156,6 +160,7 @@ elm_bubble_label_get(Evas_Object *obj)
156EAPI void 160EAPI void
157elm_bubble_info_set(Evas_Object *obj, const char *info) 161elm_bubble_info_set(Evas_Object *obj, const char *info)
158{ 162{
163 ELM_CHECK_WIDTYPE(obj, widtype);
159 Widget_Data *wd = elm_widget_data_get(obj); 164 Widget_Data *wd = elm_widget_data_get(obj);
160 if (wd->info) eina_stringshare_del(wd->info); 165 if (wd->info) eina_stringshare_del(wd->info);
161 if (info) wd->info = eina_stringshare_add(info); 166 if (info) wd->info = eina_stringshare_add(info);
@@ -178,6 +183,7 @@ elm_bubble_info_set(Evas_Object *obj, const char *info)
178EAPI void 183EAPI void
179elm_bubble_content_set(Evas_Object *obj, Evas_Object *content) 184elm_bubble_content_set(Evas_Object *obj, Evas_Object *content)
180{ 185{
186 ELM_CHECK_WIDTYPE(obj, widtype);
181 Widget_Data *wd = elm_widget_data_get(obj); 187 Widget_Data *wd = elm_widget_data_get(obj);
182 if ((wd->content != content) && (wd->content)) 188 if ((wd->content != content) && (wd->content))
183 elm_widget_sub_object_del(obj, wd->content); 189 elm_widget_sub_object_del(obj, wd->content);
@@ -206,6 +212,7 @@ elm_bubble_content_set(Evas_Object *obj, Evas_Object *content)
206EAPI void 212EAPI void
207elm_bubble_icon_set(Evas_Object *obj, Evas_Object *icon) 213elm_bubble_icon_set(Evas_Object *obj, Evas_Object *icon)
208{ 214{
215 ELM_CHECK_WIDTYPE(obj, widtype);
209 Widget_Data *wd = elm_widget_data_get(obj); 216 Widget_Data *wd = elm_widget_data_get(obj);
210 if ((wd->icon != icon) && (wd->icon)) 217 if ((wd->icon != icon) && (wd->icon))
211 elm_widget_sub_object_del(obj, wd->icon); 218 elm_widget_sub_object_del(obj, wd->icon);
@@ -223,6 +230,7 @@ elm_bubble_icon_set(Evas_Object *obj, Evas_Object *icon)
223EAPI Evas_Object * 230EAPI Evas_Object *
224elm_bubble_icon_get(Evas_Object *obj) 231elm_bubble_icon_get(Evas_Object *obj)
225{ 232{
233 ELM_CHECK_WIDTYPE(obj, widtype);
226 Widget_Data *wd = elm_widget_data_get(obj); 234 Widget_Data *wd = elm_widget_data_get(obj);
227 if (!wd) return NULL; 235 if (!wd) return NULL;
228 return wd->icon; 236 return wd->icon;
@@ -241,6 +249,7 @@ elm_bubble_icon_get(Evas_Object *obj)
241EAPI void 249EAPI void
242elm_bubble_corner_set(Evas_Object *obj, const char *corner) 250elm_bubble_corner_set(Evas_Object *obj, const char *corner)
243{ 251{
252 ELM_CHECK_WIDTYPE(obj, widtype);
244 Widget_Data *wd = elm_widget_data_get(obj); 253 Widget_Data *wd = elm_widget_data_get(obj);
245 _elm_theme_set(wd->bbl, "bubble", corner, elm_widget_style_get(obj)); 254 _elm_theme_set(wd->bbl, "bubble", corner, elm_widget_style_get(obj));
246 if (wd->icon) 255 if (wd->icon)
diff --git a/src/lib/elm_button.c b/src/lib/elm_button.c
index ab87d140f..ff665b511 100644
--- a/src/lib/elm_button.c
+++ b/src/lib/elm_button.c
@@ -26,6 +26,7 @@ struct _Widget_Data
26 Ecore_Timer *timer; 26 Ecore_Timer *timer;
27}; 27};
28 28
29static const char *widtype = NULL;
29static void _del_hook(Evas_Object *obj); 30static void _del_hook(Evas_Object *obj);
30static void _theme_hook(Evas_Object *obj); 31static void _theme_hook(Evas_Object *obj);
31static void _disable_hook(Evas_Object *obj); 32static void _disable_hook(Evas_Object *obj);
@@ -210,6 +211,7 @@ elm_button_add(Evas_Object *parent)
210 wd = ELM_NEW(Widget_Data); 211 wd = ELM_NEW(Widget_Data);
211 e = evas_object_evas_get(parent); 212 e = evas_object_evas_get(parent);
212 obj = elm_widget_add(e); 213 obj = elm_widget_add(e);
214 ELM_SET_WIDTYPE(widtype, "button");
213 elm_widget_type_set(obj, "button"); 215 elm_widget_type_set(obj, "button");
214 elm_widget_sub_object_add(parent, obj); 216 elm_widget_sub_object_add(parent, obj);
215 elm_widget_on_focus_hook_set( obj, _on_focus_hook, NULL ); 217 elm_widget_on_focus_hook_set( obj, _on_focus_hook, NULL );
@@ -246,6 +248,7 @@ elm_button_add(Evas_Object *parent)
246EAPI void 248EAPI void
247elm_button_label_set(Evas_Object *obj, const char *label) 249elm_button_label_set(Evas_Object *obj, const char *label)
248{ 250{
251 ELM_CHECK_WIDTYPE(obj, widtype);
249 Widget_Data *wd = elm_widget_data_get(obj); 252 Widget_Data *wd = elm_widget_data_get(obj);
250 Evas_Coord mw, mh; 253 Evas_Coord mw, mh;
251 254
@@ -269,6 +272,7 @@ elm_button_label_set(Evas_Object *obj, const char *label)
269EAPI const char* 272EAPI const char*
270elm_button_label_get(Evas_Object *obj) 273elm_button_label_get(Evas_Object *obj)
271{ 274{
275 ELM_CHECK_WIDTYPE(obj, widtype);
272 Widget_Data *wd = elm_widget_data_get(obj); 276 Widget_Data *wd = elm_widget_data_get(obj);
273 if (!wd) return NULL; 277 if (!wd) return NULL;
274 return wd->label; 278 return wd->label;
@@ -285,6 +289,7 @@ elm_button_label_get(Evas_Object *obj)
285EAPI void 289EAPI void
286elm_button_icon_set(Evas_Object *obj, Evas_Object *icon) 290elm_button_icon_set(Evas_Object *obj, Evas_Object *icon)
287{ 291{
292 ELM_CHECK_WIDTYPE(obj, widtype);
288 Widget_Data *wd = elm_widget_data_get(obj); 293 Widget_Data *wd = elm_widget_data_get(obj);
289 if (!wd) return; 294 if (!wd) return;
290 if ((wd->icon != icon) && (wd->icon)) 295 if ((wd->icon != icon) && (wd->icon))
@@ -307,6 +312,7 @@ elm_button_icon_set(Evas_Object *obj, Evas_Object *icon)
307EAPI Evas_Object * 312EAPI Evas_Object *
308elm_button_icon_get(Evas_Object *obj) 313elm_button_icon_get(Evas_Object *obj)
309{ 314{
315 ELM_CHECK_WIDTYPE(obj, widtype);
310 Widget_Data *wd = elm_widget_data_get(obj); 316 Widget_Data *wd = elm_widget_data_get(obj);
311 if (!wd) return NULL; 317 if (!wd) return NULL;
312 return wd->icon; 318 return wd->icon;
@@ -339,6 +345,7 @@ elm_button_style_set(Evas_Object *obj, const char *style)
339EAPI void 345EAPI void
340elm_button_autorepeat_set(Evas_Object *obj, Eina_Bool on) 346elm_button_autorepeat_set(Evas_Object *obj, Eina_Bool on)
341{ 347{
348 ELM_CHECK_WIDTYPE(obj, widtype);
342 Widget_Data *wd = elm_widget_data_get(obj); 349 Widget_Data *wd = elm_widget_data_get(obj);
343 if (!wd) return; 350 if (!wd) return;
344 351
@@ -360,6 +367,7 @@ elm_button_autorepeat_set(Evas_Object *obj, Eina_Bool on)
360EAPI void 367EAPI void
361elm_button_autorepeat_initital_timeout_set(Evas_Object *obj, double t) 368elm_button_autorepeat_initital_timeout_set(Evas_Object *obj, double t)
362{ 369{
370 ELM_CHECK_WIDTYPE(obj, widtype);
363 Widget_Data *wd = elm_widget_data_get(obj); 371 Widget_Data *wd = elm_widget_data_get(obj);
364 if (!wd) return; 372 if (!wd) return;
365 373
@@ -386,6 +394,7 @@ elm_button_autorepeat_initital_timeout_set(Evas_Object *obj, double t)
386EAPI void 394EAPI void
387elm_button_autorepeat_gap_timeout_set(Evas_Object *obj, double t) 395elm_button_autorepeat_gap_timeout_set(Evas_Object *obj, double t)
388{ 396{
397 ELM_CHECK_WIDTYPE(obj, widtype);
389 Widget_Data *wd = elm_widget_data_get(obj); 398 Widget_Data *wd = elm_widget_data_get(obj);
390 if (!wd) return; 399 if (!wd) return;
391 400
diff --git a/src/lib/elm_carousel.c b/src/lib/elm_carousel.c
index 4351164d8..5f7b0680e 100644
--- a/src/lib/elm_carousel.c
+++ b/src/lib/elm_carousel.c
@@ -21,6 +21,7 @@ struct _Elm_Carousel_Item
21 Eina_Bool selected : 1; 21 Eina_Bool selected : 1;
22}; 22};
23 23
24static const char *widtype = NULL;
24static void _del_hook(Evas_Object *obj); 25static void _del_hook(Evas_Object *obj);
25static void _theme_hook(Evas_Object *obj); 26static void _theme_hook(Evas_Object *obj);
26static void _sizing_eval(Evas_Object *obj); 27static void _sizing_eval(Evas_Object *obj);
@@ -159,6 +160,7 @@ elm_carousel_add(Evas_Object *parent)
159 wd = ELM_NEW(Widget_Data); 160 wd = ELM_NEW(Widget_Data);
160 e = evas_object_evas_get(parent); 161 e = evas_object_evas_get(parent);
161 obj = elm_widget_add(e); 162 obj = elm_widget_add(e);
163 ELM_SET_WIDTYPE(widtype, "carousel");
162 elm_widget_type_set(obj, "carousel"); 164 elm_widget_type_set(obj, "carousel");
163 elm_widget_sub_object_add(parent, obj); 165 elm_widget_sub_object_add(parent, obj);
164 elm_widget_data_set(obj, wd); 166 elm_widget_data_set(obj, wd);
@@ -192,6 +194,7 @@ elm_carousel_add(Evas_Object *parent)
192EAPI Elm_Carousel_Item * 194EAPI Elm_Carousel_Item *
193elm_carousel_item_add(Evas_Object *obj, Evas_Object *icon, const char *label, void (*func) (void *data, Evas_Object *obj, void *event_info), const void *data) 195elm_carousel_item_add(Evas_Object *obj, Evas_Object *icon, const char *label, void (*func) (void *data, Evas_Object *obj, void *event_info), const void *data)
194{ 196{
197 ELM_CHECK_WIDTYPE(obj, widtype);
195 Widget_Data *wd = elm_widget_data_get(obj); 198 Widget_Data *wd = elm_widget_data_get(obj);
196 Evas_Coord mw, mh; 199 Evas_Coord mw, mh;
197 Elm_Carousel_Item *it = calloc(1, sizeof(Elm_Carousel_Item)); 200 Elm_Carousel_Item *it = calloc(1, sizeof(Elm_Carousel_Item));
diff --git a/src/lib/elm_check.c b/src/lib/elm_check.c
index 0e996f636..e330981ea 100644
--- a/src/lib/elm_check.c
+++ b/src/lib/elm_check.c
@@ -29,6 +29,7 @@ struct _Widget_Data
29 const char *label; 29 const char *label;
30}; 30};
31 31
32static const char *widtype = NULL;
32static void _del_hook(Evas_Object *obj); 33static void _del_hook(Evas_Object *obj);
33static void _theme_hook(Evas_Object *obj); 34static void _theme_hook(Evas_Object *obj);
34static void _disable_hook(Evas_Object *obj); 35static void _disable_hook(Evas_Object *obj);
@@ -169,6 +170,7 @@ elm_check_add(Evas_Object *parent)
169 wd = ELM_NEW(Widget_Data); 170 wd = ELM_NEW(Widget_Data);
170 e = evas_object_evas_get(parent); 171 e = evas_object_evas_get(parent);
171 obj = elm_widget_add(e); 172 obj = elm_widget_add(e);
173 ELM_SET_WIDTYPE(widtype, "check");
172 elm_widget_type_set(obj, "check"); 174 elm_widget_type_set(obj, "check");
173 elm_widget_sub_object_add(parent, obj); 175 elm_widget_sub_object_add(parent, obj);
174 elm_widget_data_set(obj, wd); 176 elm_widget_data_set(obj, wd);
@@ -203,6 +205,7 @@ elm_check_add(Evas_Object *parent)
203EAPI void 205EAPI void
204elm_check_label_set(Evas_Object *obj, const char *label) 206elm_check_label_set(Evas_Object *obj, const char *label)
205{ 207{
208 ELM_CHECK_WIDTYPE(obj, widtype);
206 Widget_Data *wd = elm_widget_data_get(obj); 209 Widget_Data *wd = elm_widget_data_get(obj);
207 Evas_Coord mw, mh; 210 Evas_Coord mw, mh;
208 211
@@ -233,6 +236,7 @@ elm_check_label_set(Evas_Object *obj, const char *label)
233EAPI const char* 236EAPI const char*
234elm_check_label_get(Evas_Object *obj) 237elm_check_label_get(Evas_Object *obj)
235{ 238{
239 ELM_CHECK_WIDTYPE(obj, widtype);
236 Widget_Data *wd = elm_widget_data_get(obj); 240 Widget_Data *wd = elm_widget_data_get(obj);
237 if (!wd) return NULL; 241 if (!wd) return NULL;
238 return wd->label; 242 return wd->label;
@@ -254,6 +258,7 @@ elm_check_label_get(Evas_Object *obj)
254EAPI void 258EAPI void
255elm_check_icon_set(Evas_Object *obj, Evas_Object *icon) 259elm_check_icon_set(Evas_Object *obj, Evas_Object *icon)
256{ 260{
261 ELM_CHECK_WIDTYPE(obj, widtype);
257 Widget_Data *wd = elm_widget_data_get(obj); 262 Widget_Data *wd = elm_widget_data_get(obj);
258 if ((wd->icon != icon) && (wd->icon)) 263 if ((wd->icon != icon) && (wd->icon))
259 elm_widget_sub_object_del(obj, wd->icon); 264 elm_widget_sub_object_del(obj, wd->icon);
@@ -280,6 +285,7 @@ elm_check_icon_set(Evas_Object *obj, Evas_Object *icon)
280EAPI Evas_Object * 285EAPI Evas_Object *
281elm_check_icon_get(Evas_Object *obj) 286elm_check_icon_get(Evas_Object *obj)
282{ 287{
288 ELM_CHECK_WIDTYPE(obj, widtype);
283 Widget_Data *wd = elm_widget_data_get(obj); 289 Widget_Data *wd = elm_widget_data_get(obj);
284 if (!wd) return NULL; 290 if (!wd) return NULL;
285 return wd->icon; 291 return wd->icon;
@@ -299,6 +305,7 @@ elm_check_icon_get(Evas_Object *obj)
299EAPI void 305EAPI void
300elm_check_state_set(Evas_Object *obj, Eina_Bool state) 306elm_check_state_set(Evas_Object *obj, Eina_Bool state)
301{ 307{
308 ELM_CHECK_WIDTYPE(obj, widtype);
302 Widget_Data *wd = elm_widget_data_get(obj); 309 Widget_Data *wd = elm_widget_data_get(obj);
303 if (state != wd->state) 310 if (state != wd->state)
304 { 311 {
@@ -322,6 +329,7 @@ elm_check_state_set(Evas_Object *obj, Eina_Bool state)
322EAPI Eina_Bool 329EAPI Eina_Bool
323elm_check_state_get(const Evas_Object *obj) 330elm_check_state_get(const Evas_Object *obj)
324{ 331{
332 ELM_CHECK_WIDTYPE(obj, widtype);
325 Widget_Data *wd = elm_widget_data_get(obj); 333 Widget_Data *wd = elm_widget_data_get(obj);
326 return wd->state; 334 return wd->state;
327} 335}
@@ -344,6 +352,7 @@ elm_check_state_get(const Evas_Object *obj)
344EAPI void 352EAPI void
345elm_check_state_pointer_set(Evas_Object *obj, Eina_Bool *statep) 353elm_check_state_pointer_set(Evas_Object *obj, Eina_Bool *statep)
346{ 354{
355 ELM_CHECK_WIDTYPE(obj, widtype);
347 Widget_Data *wd = elm_widget_data_get(obj); 356 Widget_Data *wd = elm_widget_data_get(obj);
348 if (statep) 357 if (statep)
349 { 358 {
diff --git a/src/lib/elm_clock.c b/src/lib/elm_clock.c
index 9a141c31e..872745244 100644
--- a/src/lib/elm_clock.c
+++ b/src/lib/elm_clock.c
@@ -31,6 +31,7 @@ struct _Widget_Data
31 } cur; 31 } cur;
32}; 32};
33 33
34static const char *widtype = NULL;
34static void _del_hook(Evas_Object *obj); 35static void _del_hook(Evas_Object *obj);
35static void _theme_hook(Evas_Object *obj); 36static void _theme_hook(Evas_Object *obj);
36static int _ticker(void *data); 37static int _ticker(void *data);
@@ -389,6 +390,7 @@ elm_clock_add(Evas_Object *parent)
389 wd = ELM_NEW(Widget_Data); 390 wd = ELM_NEW(Widget_Data);
390 e = evas_object_evas_get(parent); 391 e = evas_object_evas_get(parent);
391 obj = elm_widget_add(e); 392 obj = elm_widget_add(e);
393 ELM_SET_WIDTYPE(widtype, "clock");
392 elm_widget_type_set(obj, "clock"); 394 elm_widget_type_set(obj, "clock");
393 elm_widget_sub_object_add(parent, obj); 395 elm_widget_sub_object_add(parent, obj);
394 elm_widget_data_set(obj, wd); 396 elm_widget_data_set(obj, wd);
@@ -424,6 +426,7 @@ elm_clock_add(Evas_Object *parent)
424EAPI void 426EAPI void
425elm_clock_time_set(Evas_Object *obj, int hrs, int min, int sec) 427elm_clock_time_set(Evas_Object *obj, int hrs, int min, int sec)
426{ 428{
429 ELM_CHECK_WIDTYPE(obj, widtype);
427 Widget_Data *wd = elm_widget_data_get(obj); 430 Widget_Data *wd = elm_widget_data_get(obj);
428 wd->hrs = hrs; 431 wd->hrs = hrs;
429 wd->min = min; 432 wd->min = min;
@@ -450,6 +453,7 @@ elm_clock_time_set(Evas_Object *obj, int hrs, int min, int sec)
450EAPI void 453EAPI void
451elm_clock_time_get(const Evas_Object *obj, int *hrs, int *min, int *sec) 454elm_clock_time_get(const Evas_Object *obj, int *hrs, int *min, int *sec)
452{ 455{
456 ELM_CHECK_WIDTYPE(obj, widtype);
453 Widget_Data *wd = elm_widget_data_get(obj); 457 Widget_Data *wd = elm_widget_data_get(obj);
454 if (hrs) *hrs = wd->hrs; 458 if (hrs) *hrs = wd->hrs;
455 if (min) *min = wd->min; 459 if (min) *min = wd->min;
@@ -469,6 +473,7 @@ elm_clock_time_get(const Evas_Object *obj, int *hrs, int *min, int *sec)
469EAPI void 473EAPI void
470elm_clock_edit_set(Evas_Object *obj, Eina_Bool edit) 474elm_clock_edit_set(Evas_Object *obj, Eina_Bool edit)
471{ 475{
476 ELM_CHECK_WIDTYPE(obj, widtype);
472 Widget_Data *wd = elm_widget_data_get(obj); 477 Widget_Data *wd = elm_widget_data_get(obj);
473 wd->edit = edit; 478 wd->edit = edit;
474 _time_update(obj); 479 _time_update(obj);
@@ -491,6 +496,7 @@ elm_clock_edit_set(Evas_Object *obj, Eina_Bool edit)
491EAPI void 496EAPI void
492elm_clock_show_am_pm_set(Evas_Object *obj, Eina_Bool am_pm) 497elm_clock_show_am_pm_set(Evas_Object *obj, Eina_Bool am_pm)
493{ 498{
499 ELM_CHECK_WIDTYPE(obj, widtype);
494 Widget_Data *wd = elm_widget_data_get(obj); 500 Widget_Data *wd = elm_widget_data_get(obj);
495 wd->am_pm = am_pm; 501 wd->am_pm = am_pm;
496 _time_update(obj); 502 _time_update(obj);
@@ -511,6 +517,7 @@ elm_clock_show_am_pm_set(Evas_Object *obj, Eina_Bool am_pm)
511EAPI void 517EAPI void
512elm_clock_show_seconds_set(Evas_Object *obj, Eina_Bool seconds) 518elm_clock_show_seconds_set(Evas_Object *obj, Eina_Bool seconds)
513{ 519{
520 ELM_CHECK_WIDTYPE(obj, widtype);
514 Widget_Data *wd = elm_widget_data_get(obj); 521 Widget_Data *wd = elm_widget_data_get(obj);
515 wd->seconds = seconds; 522 wd->seconds = seconds;
516 _time_update(obj); 523 _time_update(obj);
diff --git a/src/lib/elm_conform.c b/src/lib/elm_conform.c
index 88b434f64..9ff534e43 100644
--- a/src/lib/elm_conform.c
+++ b/src/lib/elm_conform.c
@@ -25,6 +25,7 @@ struct _Widget_Data
25}; 25};
26 26
27/* local function prototypes */ 27/* local function prototypes */
28static const char *widtype = NULL;
28static void _del_hook(Evas_Object *obj); 29static void _del_hook(Evas_Object *obj);
29static void _theme_hook(Evas_Object *obj); 30static void _theme_hook(Evas_Object *obj);
30static void _sizing_eval(Evas_Object *obj); 31static void _sizing_eval(Evas_Object *obj);
@@ -218,6 +219,7 @@ elm_conformant_add(Evas_Object *parent)
218 evas = evas_object_evas_get(parent); 219 evas = evas_object_evas_get(parent);
219 220
220 obj = elm_widget_add(evas); 221 obj = elm_widget_add(evas);
222 ELM_SET_WIDTYPE(widtype, "conform");
221 elm_widget_type_set(obj, "conformant"); 223 elm_widget_type_set(obj, "conformant");
222 elm_widget_sub_object_add(parent, obj); 224 elm_widget_sub_object_add(parent, obj);
223 elm_widget_data_set(obj, wd); 225 elm_widget_data_set(obj, wd);
@@ -274,6 +276,7 @@ elm_conformant_add(Evas_Object *parent)
274EAPI void 276EAPI void
275elm_conformant_content_set(Evas_Object *obj, Evas_Object *content) 277elm_conformant_content_set(Evas_Object *obj, Evas_Object *content)
276{ 278{
279 ELM_CHECK_WIDTYPE(obj, widtype);
277 Widget_Data *wd = elm_widget_data_get(obj); 280 Widget_Data *wd = elm_widget_data_get(obj);
278 281
279 if ((wd->content != content) && (wd->content)) 282 if ((wd->content != content) && (wd->content))
diff --git a/src/lib/elm_entry.c b/src/lib/elm_entry.c
index 5455931c6..3680dccbb 100644
--- a/src/lib/elm_entry.c
+++ b/src/lib/elm_entry.c
@@ -46,6 +46,7 @@ struct _Elm_Entry_Context_Menu_Item
46 void *data; 46 void *data;
47}; 47};
48 48
49static const char *widtype = NULL;
49static void _del_hook(Evas_Object *obj); 50static void _del_hook(Evas_Object *obj);
50static void _theme_hook(Evas_Object *obj); 51static void _theme_hook(Evas_Object *obj);
51static void _disable_hook(Evas_Object *obj); 52static void _disable_hook(Evas_Object *obj);
@@ -1091,6 +1092,7 @@ elm_entry_add(Evas_Object *parent)
1091 wd = ELM_NEW(Widget_Data); 1092 wd = ELM_NEW(Widget_Data);
1092 e = evas_object_evas_get(parent); 1093 e = evas_object_evas_get(parent);
1093 obj = elm_widget_add(e); 1094 obj = elm_widget_add(e);
1095 ELM_SET_WIDTYPE(widtype, "entry");
1094 elm_widget_type_set(obj, "entry"); 1096 elm_widget_type_set(obj, "entry");
1095 elm_widget_sub_object_add(parent, obj); 1097 elm_widget_sub_object_add(parent, obj);
1096 elm_widget_on_focus_hook_set(obj, _on_focus_hook, NULL); 1098 elm_widget_on_focus_hook_set(obj, _on_focus_hook, NULL);
@@ -1181,6 +1183,7 @@ elm_entry_add(Evas_Object *parent)
1181EAPI void 1183EAPI void
1182elm_entry_single_line_set(Evas_Object *obj, Eina_Bool single_line) 1184elm_entry_single_line_set(Evas_Object *obj, Eina_Bool single_line)
1183{ 1185{
1186 ELM_CHECK_WIDTYPE(obj, widtype);
1184 Widget_Data *wd = elm_widget_data_get(obj); 1187 Widget_Data *wd = elm_widget_data_get(obj);
1185 const char *t; 1188 const char *t;
1186 1189
@@ -1198,6 +1201,7 @@ elm_entry_single_line_set(Evas_Object *obj, Eina_Bool single_line)
1198EAPI void 1201EAPI void
1199elm_entry_password_set(Evas_Object *obj, Eina_Bool password) 1202elm_entry_password_set(Evas_Object *obj, Eina_Bool password)
1200{ 1203{
1204 ELM_CHECK_WIDTYPE(obj, widtype);
1201 Widget_Data *wd = elm_widget_data_get(obj); 1205 Widget_Data *wd = elm_widget_data_get(obj);
1202 const char *t; 1206 const char *t;
1203 1207
@@ -1216,6 +1220,7 @@ elm_entry_password_set(Evas_Object *obj, Eina_Bool password)
1216EAPI void 1220EAPI void
1217elm_entry_entry_set(Evas_Object *obj, const char *entry) 1221elm_entry_entry_set(Evas_Object *obj, const char *entry)
1218{ 1222{
1223 ELM_CHECK_WIDTYPE(obj, widtype);
1219 Widget_Data *wd = elm_widget_data_get(obj); 1224 Widget_Data *wd = elm_widget_data_get(obj);
1220 1225
1221 if (!entry) entry = "<br>"; 1226 if (!entry) entry = "<br>";
@@ -1227,6 +1232,7 @@ elm_entry_entry_set(Evas_Object *obj, const char *entry)
1227EAPI const char * 1232EAPI const char *
1228elm_entry_entry_get(const Evas_Object *obj) 1233elm_entry_entry_get(const Evas_Object *obj)
1229{ 1234{
1235 ELM_CHECK_WIDTYPE(obj, widtype);
1230 Widget_Data *wd = elm_widget_data_get(obj); 1236 Widget_Data *wd = elm_widget_data_get(obj);
1231 const char *text, *s = NULL; 1237 const char *text, *s = NULL;
1232 size_t len; 1238 size_t len;
@@ -1257,6 +1263,7 @@ elm_entry_entry_get(const Evas_Object *obj)
1257EAPI const char * 1263EAPI const char *
1258elm_entry_selection_get(const Evas_Object *obj) 1264elm_entry_selection_get(const Evas_Object *obj)
1259{ 1265{
1266 ELM_CHECK_WIDTYPE(obj, widtype);
1260 Widget_Data *wd = elm_widget_data_get(obj); 1267 Widget_Data *wd = elm_widget_data_get(obj);
1261 1268
1262 if (!wd) return NULL; 1269 if (!wd) return NULL;
@@ -1266,6 +1273,7 @@ elm_entry_selection_get(const Evas_Object *obj)
1266EAPI void 1273EAPI void
1267elm_entry_entry_insert(Evas_Object *obj, const char *entry) 1274elm_entry_entry_insert(Evas_Object *obj, const char *entry)
1268{ 1275{
1276 ELM_CHECK_WIDTYPE(obj, widtype);
1269 Widget_Data *wd = elm_widget_data_get(obj); 1277 Widget_Data *wd = elm_widget_data_get(obj);
1270 1278
1271 edje_object_part_text_insert(wd->ent, "elm.text", entry); 1279 edje_object_part_text_insert(wd->ent, "elm.text", entry);
@@ -1276,6 +1284,7 @@ elm_entry_entry_insert(Evas_Object *obj, const char *entry)
1276EAPI void 1284EAPI void
1277elm_entry_line_wrap_set(Evas_Object *obj, Eina_Bool wrap) 1285elm_entry_line_wrap_set(Evas_Object *obj, Eina_Bool wrap)
1278{ 1286{
1287 ELM_CHECK_WIDTYPE(obj, widtype);
1279 Widget_Data *wd = elm_widget_data_get(obj); 1288 Widget_Data *wd = elm_widget_data_get(obj);
1280 const char *t; 1289 const char *t;
1281 1290
@@ -1293,6 +1302,7 @@ elm_entry_line_wrap_set(Evas_Object *obj, Eina_Bool wrap)
1293EAPI void 1302EAPI void
1294elm_entry_line_char_wrap_set(Evas_Object *obj, Eina_Bool wrap) 1303elm_entry_line_char_wrap_set(Evas_Object *obj, Eina_Bool wrap)
1295{ 1304{
1305 ELM_CHECK_WIDTYPE(obj, widtype);
1296 Widget_Data *wd = elm_widget_data_get(obj); 1306 Widget_Data *wd = elm_widget_data_get(obj);
1297 const char *t; 1307 const char *t;
1298 1308
@@ -1310,6 +1320,7 @@ elm_entry_line_char_wrap_set(Evas_Object *obj, Eina_Bool wrap)
1310EAPI void 1320EAPI void
1311elm_entry_editable_set(Evas_Object *obj, Eina_Bool editable) 1321elm_entry_editable_set(Evas_Object *obj, Eina_Bool editable)
1312{ 1322{
1323 ELM_CHECK_WIDTYPE(obj, widtype);
1313 Widget_Data *wd = elm_widget_data_get(obj); 1324 Widget_Data *wd = elm_widget_data_get(obj);
1314 const char *t; 1325 const char *t;
1315 1326
@@ -1325,6 +1336,7 @@ elm_entry_editable_set(Evas_Object *obj, Eina_Bool editable)
1325EAPI void 1336EAPI void
1326elm_entry_select_none(Evas_Object *obj) 1337elm_entry_select_none(Evas_Object *obj)
1327{ 1338{
1339 ELM_CHECK_WIDTYPE(obj, widtype);
1328 Widget_Data *wd = elm_widget_data_get(obj); 1340 Widget_Data *wd = elm_widget_data_get(obj);
1329 1341
1330 if (wd->selmode) 1342 if (wd->selmode)
@@ -1340,6 +1352,7 @@ elm_entry_select_none(Evas_Object *obj)
1340EAPI void 1352EAPI void
1341elm_entry_select_all(Evas_Object *obj) 1353elm_entry_select_all(Evas_Object *obj)
1342{ 1354{
1355 ELM_CHECK_WIDTYPE(obj, widtype);
1343 Widget_Data *wd = elm_widget_data_get(obj); 1356 Widget_Data *wd = elm_widget_data_get(obj);
1344 1357
1345 if (wd->selmode) 1358 if (wd->selmode)
@@ -1355,6 +1368,7 @@ elm_entry_select_all(Evas_Object *obj)
1355EAPI Eina_Bool 1368EAPI Eina_Bool
1356elm_entry_cursor_next(Evas_Object *obj) 1369elm_entry_cursor_next(Evas_Object *obj)
1357{ 1370{
1371 ELM_CHECK_WIDTYPE(obj, widtype);
1358 Widget_Data *wd = elm_widget_data_get(obj); 1372 Widget_Data *wd = elm_widget_data_get(obj);
1359 return edje_object_part_text_cursor_next(wd->ent, "elm.text", EDJE_CURSOR_MAIN); 1373 return edje_object_part_text_cursor_next(wd->ent, "elm.text", EDJE_CURSOR_MAIN);
1360} 1374}
@@ -1362,6 +1376,7 @@ elm_entry_cursor_next(Evas_Object *obj)
1362EAPI Eina_Bool 1376EAPI Eina_Bool
1363elm_entry_cursor_prev(Evas_Object *obj) 1377elm_entry_cursor_prev(Evas_Object *obj)
1364{ 1378{
1379 ELM_CHECK_WIDTYPE(obj, widtype);
1365 Widget_Data *wd = elm_widget_data_get(obj); 1380 Widget_Data *wd = elm_widget_data_get(obj);
1366 return edje_object_part_text_cursor_prev(wd->ent, "elm.text", EDJE_CURSOR_MAIN); 1381 return edje_object_part_text_cursor_prev(wd->ent, "elm.text", EDJE_CURSOR_MAIN);
1367} 1382}
@@ -1369,6 +1384,7 @@ elm_entry_cursor_prev(Evas_Object *obj)
1369EAPI Eina_Bool 1384EAPI Eina_Bool
1370elm_entry_cursor_up(Evas_Object *obj) 1385elm_entry_cursor_up(Evas_Object *obj)
1371{ 1386{
1387 ELM_CHECK_WIDTYPE(obj, widtype);
1372 Widget_Data *wd = elm_widget_data_get(obj); 1388 Widget_Data *wd = elm_widget_data_get(obj);
1373 return edje_object_part_text_cursor_up(wd->ent, "elm.text", EDJE_CURSOR_MAIN); 1389 return edje_object_part_text_cursor_up(wd->ent, "elm.text", EDJE_CURSOR_MAIN);
1374} 1390}
@@ -1376,6 +1392,7 @@ elm_entry_cursor_up(Evas_Object *obj)
1376EAPI Eina_Bool 1392EAPI Eina_Bool
1377elm_entry_cursor_down(Evas_Object *obj) 1393elm_entry_cursor_down(Evas_Object *obj)
1378{ 1394{
1395 ELM_CHECK_WIDTYPE(obj, widtype);
1379 Widget_Data *wd = elm_widget_data_get(obj); 1396 Widget_Data *wd = elm_widget_data_get(obj);
1380 return edje_object_part_text_cursor_down(wd->ent, "elm.text", EDJE_CURSOR_MAIN); 1397 return edje_object_part_text_cursor_down(wd->ent, "elm.text", EDJE_CURSOR_MAIN);
1381} 1398}
@@ -1383,6 +1400,7 @@ elm_entry_cursor_down(Evas_Object *obj)
1383EAPI void 1400EAPI void
1384elm_entry_cursor_begin_set(Evas_Object *obj) 1401elm_entry_cursor_begin_set(Evas_Object *obj)
1385{ 1402{
1403 ELM_CHECK_WIDTYPE(obj, widtype);
1386 Widget_Data *wd = elm_widget_data_get(obj); 1404 Widget_Data *wd = elm_widget_data_get(obj);
1387 edje_object_part_text_cursor_begin_set(wd->ent, "elm.text", EDJE_CURSOR_MAIN); 1405 edje_object_part_text_cursor_begin_set(wd->ent, "elm.text", EDJE_CURSOR_MAIN);
1388} 1406}
@@ -1390,6 +1408,7 @@ elm_entry_cursor_begin_set(Evas_Object *obj)
1390EAPI void 1408EAPI void
1391elm_entry_cursor_end_set(Evas_Object *obj) 1409elm_entry_cursor_end_set(Evas_Object *obj)
1392{ 1410{
1411 ELM_CHECK_WIDTYPE(obj, widtype);
1393 Widget_Data *wd = elm_widget_data_get(obj); 1412 Widget_Data *wd = elm_widget_data_get(obj);
1394 edje_object_part_text_cursor_end_set(wd->ent, "elm.text", EDJE_CURSOR_MAIN); 1413 edje_object_part_text_cursor_end_set(wd->ent, "elm.text", EDJE_CURSOR_MAIN);
1395} 1414}
@@ -1397,6 +1416,7 @@ elm_entry_cursor_end_set(Evas_Object *obj)
1397EAPI void 1416EAPI void
1398elm_entry_cursor_line_begin_set(Evas_Object *obj) 1417elm_entry_cursor_line_begin_set(Evas_Object *obj)
1399{ 1418{
1419 ELM_CHECK_WIDTYPE(obj, widtype);
1400 Widget_Data *wd = elm_widget_data_get(obj); 1420 Widget_Data *wd = elm_widget_data_get(obj);
1401 edje_object_part_text_cursor_line_begin_set(wd->ent, "elm.text", EDJE_CURSOR_MAIN); 1421 edje_object_part_text_cursor_line_begin_set(wd->ent, "elm.text", EDJE_CURSOR_MAIN);
1402} 1422}
@@ -1404,6 +1424,7 @@ elm_entry_cursor_line_begin_set(Evas_Object *obj)
1404EAPI void 1424EAPI void
1405elm_entry_cursor_line_end_set(Evas_Object *obj) 1425elm_entry_cursor_line_end_set(Evas_Object *obj)
1406{ 1426{
1427 ELM_CHECK_WIDTYPE(obj, widtype);
1407 Widget_Data *wd = elm_widget_data_get(obj); 1428 Widget_Data *wd = elm_widget_data_get(obj);
1408 edje_object_part_text_cursor_line_end_set(wd->ent, "elm.text", EDJE_CURSOR_MAIN); 1429 edje_object_part_text_cursor_line_end_set(wd->ent, "elm.text", EDJE_CURSOR_MAIN);
1409} 1430}
@@ -1411,6 +1432,7 @@ elm_entry_cursor_line_end_set(Evas_Object *obj)
1411EAPI void 1432EAPI void
1412elm_entry_cursor_selection_begin(Evas_Object *obj) 1433elm_entry_cursor_selection_begin(Evas_Object *obj)
1413{ 1434{
1435 ELM_CHECK_WIDTYPE(obj, widtype);
1414 Widget_Data *wd = elm_widget_data_get(obj); 1436 Widget_Data *wd = elm_widget_data_get(obj);
1415 edje_object_part_text_select_all(wd->ent, "elm.text"); 1437 edje_object_part_text_select_all(wd->ent, "elm.text");
1416 edje_object_part_text_cursor_copy(wd->ent, "elm.text", EDJE_CURSOR_MAIN, EDJE_CURSOR_SELECTION_BEGIN); 1438 edje_object_part_text_cursor_copy(wd->ent, "elm.text", EDJE_CURSOR_MAIN, EDJE_CURSOR_SELECTION_BEGIN);
@@ -1420,6 +1442,7 @@ elm_entry_cursor_selection_begin(Evas_Object *obj)
1420EAPI void 1442EAPI void
1421elm_entry_cursor_selection_end(Evas_Object *obj) 1443elm_entry_cursor_selection_end(Evas_Object *obj)
1422{ 1444{
1445 ELM_CHECK_WIDTYPE(obj, widtype);
1423 Widget_Data *wd = elm_widget_data_get(obj); 1446 Widget_Data *wd = elm_widget_data_get(obj);
1424 edje_object_part_text_cursor_copy(wd->ent, "elm.text", EDJE_CURSOR_MAIN, EDJE_CURSOR_SELECTION_END); 1447 edje_object_part_text_cursor_copy(wd->ent, "elm.text", EDJE_CURSOR_MAIN, EDJE_CURSOR_SELECTION_END);
1425} 1448}
@@ -1427,6 +1450,7 @@ elm_entry_cursor_selection_end(Evas_Object *obj)
1427EAPI Eina_Bool 1450EAPI Eina_Bool
1428elm_entry_cursor_is_format_get(Evas_Object *obj) 1451elm_entry_cursor_is_format_get(Evas_Object *obj)
1429{ 1452{
1453 ELM_CHECK_WIDTYPE(obj, widtype);
1430 Widget_Data *wd = elm_widget_data_get(obj); 1454 Widget_Data *wd = elm_widget_data_get(obj);
1431 return edje_object_part_text_cursor_is_format_get(wd->ent, "elm.text", EDJE_CURSOR_MAIN); 1455 return edje_object_part_text_cursor_is_format_get(wd->ent, "elm.text", EDJE_CURSOR_MAIN);
1432} 1456}
@@ -1434,6 +1458,7 @@ elm_entry_cursor_is_format_get(Evas_Object *obj)
1434EAPI Eina_Bool 1458EAPI Eina_Bool
1435elm_entry_cursor_is_visible_format_get(Evas_Object *obj) 1459elm_entry_cursor_is_visible_format_get(Evas_Object *obj)
1436{ 1460{
1461 ELM_CHECK_WIDTYPE(obj, widtype);
1437 Widget_Data *wd = elm_widget_data_get(obj); 1462 Widget_Data *wd = elm_widget_data_get(obj);
1438 return edje_object_part_text_cursor_is_visible_format_get(wd->ent, "elm.text", EDJE_CURSOR_MAIN); 1463 return edje_object_part_text_cursor_is_visible_format_get(wd->ent, "elm.text", EDJE_CURSOR_MAIN);
1439} 1464}
@@ -1441,6 +1466,7 @@ elm_entry_cursor_is_visible_format_get(Evas_Object *obj)
1441EAPI const char * 1466EAPI const char *
1442elm_entry_cursor_content_get(Evas_Object *obj) 1467elm_entry_cursor_content_get(Evas_Object *obj)
1443{ 1468{
1469 ELM_CHECK_WIDTYPE(obj, widtype);
1444 Widget_Data *wd = elm_widget_data_get(obj); 1470 Widget_Data *wd = elm_widget_data_get(obj);
1445 return edje_object_part_text_cursor_content_get(wd->ent, "elm.text", EDJE_CURSOR_MAIN); 1471 return edje_object_part_text_cursor_content_get(wd->ent, "elm.text", EDJE_CURSOR_MAIN);
1446} 1472}
@@ -1448,6 +1474,7 @@ elm_entry_cursor_content_get(Evas_Object *obj)
1448EAPI void 1474EAPI void
1449elm_entry_selection_cut(Evas_Object *obj) 1475elm_entry_selection_cut(Evas_Object *obj)
1450{ 1476{
1477 ELM_CHECK_WIDTYPE(obj, widtype);
1451 Widget_Data *wd = elm_widget_data_get(obj); 1478 Widget_Data *wd = elm_widget_data_get(obj);
1452 _cut(obj, NULL, NULL); 1479 _cut(obj, NULL, NULL);
1453} 1480}
@@ -1455,6 +1482,7 @@ elm_entry_selection_cut(Evas_Object *obj)
1455EAPI void 1482EAPI void
1456elm_entry_selection_copy(Evas_Object *obj) 1483elm_entry_selection_copy(Evas_Object *obj)
1457{ 1484{
1485 ELM_CHECK_WIDTYPE(obj, widtype);
1458 Widget_Data *wd = elm_widget_data_get(obj); 1486 Widget_Data *wd = elm_widget_data_get(obj);
1459 _copy(obj, NULL, NULL); 1487 _copy(obj, NULL, NULL);
1460} 1488}
@@ -1462,6 +1490,7 @@ elm_entry_selection_copy(Evas_Object *obj)
1462EAPI void 1490EAPI void
1463elm_entry_selection_paste(Evas_Object *obj) 1491elm_entry_selection_paste(Evas_Object *obj)
1464{ 1492{
1493 ELM_CHECK_WIDTYPE(obj, widtype);
1465 Widget_Data *wd = elm_widget_data_get(obj); 1494 Widget_Data *wd = elm_widget_data_get(obj);
1466 _paste(obj, NULL, NULL); 1495 _paste(obj, NULL, NULL);
1467} 1496}
@@ -1469,6 +1498,7 @@ elm_entry_selection_paste(Evas_Object *obj)
1469EAPI void 1498EAPI void
1470elm_entry_context_menu_clear(Evas_Object *obj) 1499elm_entry_context_menu_clear(Evas_Object *obj)
1471{ 1500{
1501 ELM_CHECK_WIDTYPE(obj, widtype);
1472 Widget_Data *wd = elm_widget_data_get(obj); 1502 Widget_Data *wd = elm_widget_data_get(obj);
1473 Eina_List *l; 1503 Eina_List *l;
1474 Elm_Entry_Context_Menu_Item *it; 1504 Elm_Entry_Context_Menu_Item *it;
@@ -1486,6 +1516,7 @@ elm_entry_context_menu_clear(Evas_Object *obj)
1486EAPI void 1516EAPI void
1487elm_entry_context_menu_item_add(Evas_Object *obj, const char *label, const char *icon_file, Elm_Icon_Type icon_type, void (*func) (void *data, Evas_Object *obj, void *event_info), const void *data) 1517elm_entry_context_menu_item_add(Evas_Object *obj, const char *label, const char *icon_file, Elm_Icon_Type icon_type, void (*func) (void *data, Evas_Object *obj, void *event_info), const void *data)
1488{ 1518{
1519 ELM_CHECK_WIDTYPE(obj, widtype);
1489 Widget_Data *wd = elm_widget_data_get(obj); 1520 Widget_Data *wd = elm_widget_data_get(obj);
1490 Elm_Entry_Context_Menu_Item *it; 1521 Elm_Entry_Context_Menu_Item *it;
1491 1522
@@ -1504,6 +1535,7 @@ elm_entry_context_menu_item_add(Evas_Object *obj, const char *label, const char
1504EAPI void 1535EAPI void
1505elm_entry_context_menu_disabled_set(Evas_Object *obj, Eina_Bool disabled) 1536elm_entry_context_menu_disabled_set(Evas_Object *obj, Eina_Bool disabled)
1506{ 1537{
1538 ELM_CHECK_WIDTYPE(obj, widtype);
1507 Widget_Data *wd = elm_widget_data_get(obj); 1539 Widget_Data *wd = elm_widget_data_get(obj);
1508 if (!wd) return; 1540 if (!wd) return;
1509 if (wd->context_menu == !disabled) return; 1541 if (wd->context_menu == !disabled) return;
@@ -1513,6 +1545,7 @@ elm_entry_context_menu_disabled_set(Evas_Object *obj, Eina_Bool disabled)
1513EAPI Eina_Bool 1545EAPI Eina_Bool
1514elm_entry_context_menu_disabled_get(Evas_Object *obj) 1546elm_entry_context_menu_disabled_get(Evas_Object *obj)
1515{ 1547{
1548 ELM_CHECK_WIDTYPE(obj, widtype);
1516 Widget_Data *wd = elm_widget_data_get(obj); 1549 Widget_Data *wd = elm_widget_data_get(obj);
1517 if (!wd) return EINA_FALSE; 1550 if (!wd) return EINA_FALSE;
1518 return !wd->context_menu; 1551 return !wd->context_menu;
diff --git a/src/lib/elm_flip.c b/src/lib/elm_flip.c
index 7c5d6b0af..87beafe7a 100644
--- a/src/lib/elm_flip.c
+++ b/src/lib/elm_flip.c
@@ -21,6 +21,7 @@ struct _Widget_Data
21 Eina_Bool state : 1; 21 Eina_Bool state : 1;
22}; 22};
23 23
24static const char *widtype = NULL;
24static void _del_hook(Evas_Object *obj); 25static void _del_hook(Evas_Object *obj);
25static void _theme_hook(Evas_Object *obj); 26static void _theme_hook(Evas_Object *obj);
26static void _sizing_eval(Evas_Object *obj); 27static void _sizing_eval(Evas_Object *obj);
@@ -276,6 +277,7 @@ elm_flip_add(Evas_Object *parent)
276 wd = ELM_NEW(Widget_Data); 277 wd = ELM_NEW(Widget_Data);
277 e = evas_object_evas_get(parent); 278 e = evas_object_evas_get(parent);
278 obj = elm_widget_add(e); 279 obj = elm_widget_add(e);
280 ELM_SET_WIDTYPE(widtype, "flip");
279 elm_widget_type_set(obj, "flip"); 281 elm_widget_type_set(obj, "flip");
280 elm_widget_sub_object_add(parent, obj); 282 elm_widget_sub_object_add(parent, obj);
281 elm_widget_data_set(obj, wd); 283 elm_widget_data_set(obj, wd);
@@ -317,6 +319,7 @@ elm_flip_add(Evas_Object *parent)
317EAPI void 319EAPI void
318elm_flip_content_front_set(Evas_Object *obj, Evas_Object *content) 320elm_flip_content_front_set(Evas_Object *obj, Evas_Object *content)
319{ 321{
322 ELM_CHECK_WIDTYPE(obj, widtype);
320 Widget_Data *wd = elm_widget_data_get(obj); 323 Widget_Data *wd = elm_widget_data_get(obj);
321 324
322 if (wd->front.content == content) return; 325 if (wd->front.content == content) return;
@@ -355,6 +358,7 @@ elm_flip_content_front_set(Evas_Object *obj, Evas_Object *content)
355EAPI void 358EAPI void
356elm_flip_content_back_set(Evas_Object *obj, Evas_Object *content) 359elm_flip_content_back_set(Evas_Object *obj, Evas_Object *content)
357{ 360{
361 ELM_CHECK_WIDTYPE(obj, widtype);
358 Widget_Data *wd = elm_widget_data_get(obj); 362 Widget_Data *wd = elm_widget_data_get(obj);
359 363
360 if (wd->back.content == content) return; 364 if (wd->back.content == content) return;
@@ -393,6 +397,7 @@ elm_flip_content_back_set(Evas_Object *obj, Evas_Object *content)
393EAPI Eina_Bool 397EAPI Eina_Bool
394elm_flip_front_get(Evas_Object *obj) 398elm_flip_front_get(Evas_Object *obj)
395{ 399{
400 ELM_CHECK_WIDTYPE(obj, widtype);
396 Widget_Data *wd = elm_widget_data_get(obj); 401 Widget_Data *wd = elm_widget_data_get(obj);
397 return wd->state; 402 return wd->state;
398} 403}
@@ -400,12 +405,14 @@ elm_flip_front_get(Evas_Object *obj)
400EAPI void 405EAPI void
401elm_flip_perspective_set(Evas_Object *obj, Evas_Coord foc, Evas_Coord x, Evas_Coord y) 406elm_flip_perspective_set(Evas_Object *obj, Evas_Coord foc, Evas_Coord x, Evas_Coord y)
402{ 407{
408 ELM_CHECK_WIDTYPE(obj, widtype);
403 Widget_Data *wd = elm_widget_data_get(obj); 409 Widget_Data *wd = elm_widget_data_get(obj);
404} 410}
405 411
406EAPI void 412EAPI void
407elm_flip_go(Evas_Object *obj, Elm_Flip_Mode mode) 413elm_flip_go(Evas_Object *obj, Elm_Flip_Mode mode)
408{ 414{
415 ELM_CHECK_WIDTYPE(obj, widtype);
409 Widget_Data *wd = elm_widget_data_get(obj); 416 Widget_Data *wd = elm_widget_data_get(obj);
410 if (!wd->animator) wd->animator = ecore_animator_add(_animate, obj); 417 if (!wd->animator) wd->animator = ecore_animator_add(_animate, obj);
411 wd->mode = mode; 418 wd->mode = mode;
diff --git a/src/lib/elm_frame.c b/src/lib/elm_frame.c
index efab38fbe..a60c39468 100644
--- a/src/lib/elm_frame.c
+++ b/src/lib/elm_frame.c
@@ -16,6 +16,7 @@ struct _Widget_Data
16 Evas_Object *content; 16 Evas_Object *content;
17}; 17};
18 18
19static const char *widtype = NULL;
19static void _del_hook(Evas_Object *obj); 20static void _del_hook(Evas_Object *obj);
20static void _theme_hook(Evas_Object *obj); 21static void _theme_hook(Evas_Object *obj);
21static void _sizing_eval(Evas_Object *obj); 22static void _sizing_eval(Evas_Object *obj);
@@ -94,6 +95,7 @@ elm_frame_add(Evas_Object *parent)
94 wd = ELM_NEW(Widget_Data); 95 wd = ELM_NEW(Widget_Data);
95 e = evas_object_evas_get(parent); 96 e = evas_object_evas_get(parent);
96 obj = elm_widget_add(e); 97 obj = elm_widget_add(e);
98 ELM_SET_WIDTYPE(widtype, "frame");
97 elm_widget_type_set(obj, "frame"); 99 elm_widget_type_set(obj, "frame");
98 elm_widget_sub_object_add(parent, obj); 100 elm_widget_sub_object_add(parent, obj);
99 elm_widget_data_set(obj, wd); 101 elm_widget_data_set(obj, wd);
@@ -121,6 +123,7 @@ elm_frame_add(Evas_Object *parent)
121EAPI void 123EAPI void
122elm_frame_label_set(Evas_Object *obj, const char *label) 124elm_frame_label_set(Evas_Object *obj, const char *label)
123{ 125{
126 ELM_CHECK_WIDTYPE(obj, widtype);
124 Widget_Data *wd = elm_widget_data_get(obj); 127 Widget_Data *wd = elm_widget_data_get(obj);
125 128
126 edje_object_part_text_set(wd->frm, "elm.text", label); 129 edje_object_part_text_set(wd->frm, "elm.text", label);
@@ -139,6 +142,7 @@ elm_frame_label_set(Evas_Object *obj, const char *label)
139EAPI const char* 142EAPI const char*
140elm_frame_label_get(Evas_Object *obj) 143elm_frame_label_get(Evas_Object *obj)
141{ 144{
145 ELM_CHECK_WIDTYPE(obj, widtype);
142 Widget_Data *wd = elm_widget_data_get(obj); 146 Widget_Data *wd = elm_widget_data_get(obj);
143 147
144 if ((!wd) || (!wd->frm)) return NULL; 148 if ((!wd) || (!wd->frm)) return NULL;
@@ -156,6 +160,7 @@ elm_frame_label_get(Evas_Object *obj)
156EAPI void 160EAPI void
157elm_frame_content_set(Evas_Object *obj, Evas_Object *content) 161elm_frame_content_set(Evas_Object *obj, Evas_Object *content)
158{ 162{
163 ELM_CHECK_WIDTYPE(obj, widtype);
159 Widget_Data *wd = elm_widget_data_get(obj); 164 Widget_Data *wd = elm_widget_data_get(obj);
160 165
161 if ((wd->content != content) && (wd->content)) 166 if ((wd->content != content) && (wd->content))
diff --git a/src/lib/elm_genlist.c b/src/lib/elm_genlist.c
index ad455fc05..5ef121742 100644
--- a/src/lib/elm_genlist.c
+++ b/src/lib/elm_genlist.c
@@ -333,6 +333,7 @@ struct _Pan
333 Widget_Data *wd; 333 Widget_Data *wd;
334}; 334};
335 335
336static const char *widtype = NULL;
336static void _del_hook(Evas_Object *obj); 337static void _del_hook(Evas_Object *obj);
337static void _theme_hook(Evas_Object *obj); 338static void _theme_hook(Evas_Object *obj);
338static void _show_region_hook(void *data, Evas_Object *obj); 339static void _show_region_hook(void *data, Evas_Object *obj);
@@ -1439,6 +1440,7 @@ elm_genlist_add(Evas_Object *parent)
1439 wd = ELM_NEW(Widget_Data); 1440 wd = ELM_NEW(Widget_Data);
1440 e = evas_object_evas_get(parent); 1441 e = evas_object_evas_get(parent);
1441 obj = elm_widget_add(e); 1442 obj = elm_widget_add(e);
1443 ELM_SET_WIDTYPE(widtype, "genlist");
1442 elm_widget_type_set(obj, "genlist"); 1444 elm_widget_type_set(obj, "genlist");
1443 elm_widget_sub_object_add(parent, obj); 1445 elm_widget_sub_object_add(parent, obj);
1444 elm_widget_data_set(obj, wd); 1446 elm_widget_data_set(obj, wd);
@@ -1734,6 +1736,7 @@ elm_genlist_item_append(Evas_Object *obj, const Elm_Genlist_Item_Class *itc,
1734 Elm_Genlist_Item_Flags flags, 1736 Elm_Genlist_Item_Flags flags,
1735 void (*func) (void *data, Evas_Object *obj, void *event_info), const void *func_data) 1737 void (*func) (void *data, Evas_Object *obj, void *event_info), const void *func_data)
1736{ 1738{
1739 ELM_CHECK_WIDTYPE(obj, widtype);
1737 Widget_Data *wd = elm_widget_data_get(obj); 1740 Widget_Data *wd = elm_widget_data_get(obj);
1738 Elm_Genlist_Item *it = _item_new(wd, itc, data, parent, flags, func, func_data); 1741 Elm_Genlist_Item *it = _item_new(wd, itc, data, parent, flags, func, func_data);
1739 1742
@@ -1785,6 +1788,7 @@ elm_genlist_item_prepend(Evas_Object *obj, const Elm_Genlist_Item_Class *itc,
1785 Elm_Genlist_Item_Flags flags, 1788 Elm_Genlist_Item_Flags flags,
1786 void (*func) (void *data, Evas_Object *obj, void *event_info), const void *func_data) 1789 void (*func) (void *data, Evas_Object *obj, void *event_info), const void *func_data)
1787{ 1790{
1791 ELM_CHECK_WIDTYPE(obj, widtype);
1788 Widget_Data *wd = elm_widget_data_get(obj); 1792 Widget_Data *wd = elm_widget_data_get(obj);
1789 Elm_Genlist_Item *it = _item_new(wd, itc, data, parent, flags, func, func_data); 1793 Elm_Genlist_Item *it = _item_new(wd, itc, data, parent, flags, func, func_data);
1790 1794
@@ -1824,6 +1828,7 @@ elm_genlist_item_insert_before(Evas_Object *obj, const Elm_Genlist_Item_Class *i
1824 Elm_Genlist_Item_Flags flags, 1828 Elm_Genlist_Item_Flags flags,
1825 void (*func) (void *data, Evas_Object *obj, void *event_info), const void *func_data) 1829 void (*func) (void *data, Evas_Object *obj, void *event_info), const void *func_data)
1826{ 1830{
1831 ELM_CHECK_WIDTYPE(obj, widtype);
1827 Widget_Data *wd = elm_widget_data_get(obj); 1832 Widget_Data *wd = elm_widget_data_get(obj);
1828 Elm_Genlist_Item *it = _item_new(wd, itc, data, NULL, flags, func, func_data); 1833 Elm_Genlist_Item *it = _item_new(wd, itc, data, NULL, flags, func, func_data);
1829 1834
@@ -1865,6 +1870,7 @@ elm_genlist_item_insert_after(Evas_Object *obj, const Elm_Genlist_Item_Class *it
1865 Elm_Genlist_Item_Flags flags, 1870 Elm_Genlist_Item_Flags flags,
1866 void (*func) (void *data, Evas_Object *obj, void *event_info), const void *func_data) 1871 void (*func) (void *data, Evas_Object *obj, void *event_info), const void *func_data)
1867{ 1872{
1873 ELM_CHECK_WIDTYPE(obj, widtype);
1868 Widget_Data *wd = elm_widget_data_get(obj); 1874 Widget_Data *wd = elm_widget_data_get(obj);
1869 Elm_Genlist_Item *it = _item_new(wd, itc, data, NULL, flags, func, func_data); 1875 Elm_Genlist_Item *it = _item_new(wd, itc, data, NULL, flags, func, func_data);
1870 1876
@@ -1895,6 +1901,7 @@ elm_genlist_item_insert_after(Evas_Object *obj, const Elm_Genlist_Item_Class *it
1895EAPI void 1901EAPI void
1896elm_genlist_clear(Evas_Object *obj) 1902elm_genlist_clear(Evas_Object *obj)
1897{ 1903{
1904 ELM_CHECK_WIDTYPE(obj, widtype);
1898 Widget_Data *wd = elm_widget_data_get(obj); 1905 Widget_Data *wd = elm_widget_data_get(obj);
1899 1906
1900 while (wd->items) 1907 while (wd->items)
@@ -1958,6 +1965,7 @@ elm_genlist_clear(Evas_Object *obj)
1958EAPI void 1965EAPI void
1959elm_genlist_multi_select_set(Evas_Object *obj, Eina_Bool multi) 1966elm_genlist_multi_select_set(Evas_Object *obj, Eina_Bool multi)
1960{ 1967{
1968 ELM_CHECK_WIDTYPE(obj, widtype);
1961 Widget_Data *wd = elm_widget_data_get(obj); 1969 Widget_Data *wd = elm_widget_data_get(obj);
1962 1970
1963 wd->multi = multi; 1971 wd->multi = multi;
@@ -1980,6 +1988,7 @@ elm_genlist_multi_select_set(Evas_Object *obj, Eina_Bool multi)
1980EAPI Elm_Genlist_Item * 1988EAPI Elm_Genlist_Item *
1981elm_genlist_selected_item_get(const Evas_Object *obj) 1989elm_genlist_selected_item_get(const Evas_Object *obj)
1982{ 1990{
1991 ELM_CHECK_WIDTYPE(obj, widtype);
1983 Widget_Data *wd = elm_widget_data_get(obj); 1992 Widget_Data *wd = elm_widget_data_get(obj);
1984 1993
1985 if (wd->selected) return wd->selected->data; 1994 if (wd->selected) return wd->selected->data;
@@ -2001,6 +2010,7 @@ elm_genlist_selected_item_get(const Evas_Object *obj)
2001EAPI const Eina_List * 2010EAPI const Eina_List *
2002elm_genlist_selected_items_get(const Evas_Object *obj) 2011elm_genlist_selected_items_get(const Evas_Object *obj)
2003{ 2012{
2013 ELM_CHECK_WIDTYPE(obj, widtype);
2004 Widget_Data *wd = elm_widget_data_get(obj); 2014 Widget_Data *wd = elm_widget_data_get(obj);
2005 2015
2006 return wd->selected; 2016 return wd->selected;
@@ -2023,6 +2033,7 @@ elm_genlist_selected_items_get(const Evas_Object *obj)
2023EAPI Eina_List * 2033EAPI Eina_List *
2024elm_genlist_realized_items_get(const Evas_Object *obj) 2034elm_genlist_realized_items_get(const Evas_Object *obj)
2025{ 2035{
2036 ELM_CHECK_WIDTYPE(obj, widtype);
2026 Widget_Data *wd = elm_widget_data_get(obj); 2037 Widget_Data *wd = elm_widget_data_get(obj);
2027 Eina_List *list = NULL; 2038 Eina_List *list = NULL;
2028 Item_Block *itb; 2039 Item_Block *itb;
@@ -2072,6 +2083,7 @@ elm_genlist_realized_items_get(const Evas_Object *obj)
2072EAPI Elm_Genlist_Item * 2083EAPI Elm_Genlist_Item *
2073elm_genlist_at_xy_item_get(const Evas_Object *obj, Evas_Coord x, Evas_Coord y, int *posret) 2084elm_genlist_at_xy_item_get(const Evas_Object *obj, Evas_Coord x, Evas_Coord y, int *posret)
2074{ 2085{
2086 ELM_CHECK_WIDTYPE(obj, widtype);
2075 Widget_Data *wd = elm_widget_data_get(obj); 2087 Widget_Data *wd = elm_widget_data_get(obj);
2076 Evas_Coord ox, oy, ow, oh; 2088 Evas_Coord ox, oy, ow, oh;
2077 Item_Block *itb; 2089 Item_Block *itb;
@@ -2128,6 +2140,7 @@ elm_genlist_at_xy_item_get(const Evas_Object *obj, Evas_Coord x, Evas_Coord y, i
2128EAPI Elm_Genlist_Item * 2140EAPI Elm_Genlist_Item *
2129elm_genlist_first_item_get(const Evas_Object *obj) 2141elm_genlist_first_item_get(const Evas_Object *obj)
2130{ 2142{
2143 ELM_CHECK_WIDTYPE(obj, widtype);
2131 Widget_Data *wd = elm_widget_data_get(obj); 2144 Widget_Data *wd = elm_widget_data_get(obj);
2132 if (!wd->items) return NULL; 2145 if (!wd->items) return NULL;
2133 Elm_Genlist_Item *it = (Elm_Genlist_Item *)(wd->items); 2146 Elm_Genlist_Item *it = (Elm_Genlist_Item *)(wd->items);
@@ -2149,6 +2162,7 @@ elm_genlist_first_item_get(const Evas_Object *obj)
2149EAPI Elm_Genlist_Item * 2162EAPI Elm_Genlist_Item *
2150elm_genlist_last_item_get(const Evas_Object *obj) 2163elm_genlist_last_item_get(const Evas_Object *obj)
2151{ 2164{
2165 ELM_CHECK_WIDTYPE(obj, widtype);
2152 Widget_Data *wd = elm_widget_data_get(obj); 2166 Widget_Data *wd = elm_widget_data_get(obj);
2153 if (!wd->items) return NULL; 2167 if (!wd->items) return NULL;
2154 Elm_Genlist_Item *it = (Elm_Genlist_Item *)(wd->items->last); 2168 Elm_Genlist_Item *it = (Elm_Genlist_Item *)(wd->items->last);
@@ -2797,6 +2811,7 @@ elm_genlist_item_update(Elm_Genlist_Item *it)
2797EAPI void 2811EAPI void
2798elm_genlist_horizontal_mode_set(Evas_Object *obj, Elm_List_Mode mode) 2812elm_genlist_horizontal_mode_set(Evas_Object *obj, Elm_List_Mode mode)
2799{ 2813{
2814 ELM_CHECK_WIDTYPE(obj, widtype);
2800 Widget_Data *wd = elm_widget_data_get(obj); 2815 Widget_Data *wd = elm_widget_data_get(obj);
2801 2816
2802 if (wd->mode == mode) return; 2817 if (wd->mode == mode) return;
@@ -2823,6 +2838,7 @@ elm_genlist_horizontal_mode_set(Evas_Object *obj, Elm_List_Mode mode)
2823EAPI void 2838EAPI void
2824elm_genlist_always_select_mode_set(Evas_Object *obj, Eina_Bool always_select) 2839elm_genlist_always_select_mode_set(Evas_Object *obj, Eina_Bool always_select)
2825{ 2840{
2841 ELM_CHECK_WIDTYPE(obj, widtype);
2826 Widget_Data *wd = elm_widget_data_get(obj); 2842 Widget_Data *wd = elm_widget_data_get(obj);
2827 wd->always_select = always_select; 2843 wd->always_select = always_select;
2828} 2844}
@@ -2841,6 +2857,7 @@ elm_genlist_always_select_mode_set(Evas_Object *obj, Eina_Bool always_select)
2841EAPI void 2857EAPI void
2842elm_genlist_no_select_mode_set(Evas_Object *obj, Eina_Bool no_select) 2858elm_genlist_no_select_mode_set(Evas_Object *obj, Eina_Bool no_select)
2843{ 2859{
2860 ELM_CHECK_WIDTYPE(obj, widtype);
2844 Widget_Data *wd = elm_widget_data_get(obj); 2861 Widget_Data *wd = elm_widget_data_get(obj);
2845 wd->no_select = no_select; 2862 wd->no_select = no_select;
2846} 2863}
@@ -2859,6 +2876,7 @@ elm_genlist_no_select_mode_set(Evas_Object *obj, Eina_Bool no_select)
2859EAPI void 2876EAPI void
2860elm_genlist_compress_mode_set(Evas_Object *obj, Eina_Bool compress) 2877elm_genlist_compress_mode_set(Evas_Object *obj, Eina_Bool compress)
2861{ 2878{
2879 ELM_CHECK_WIDTYPE(obj, widtype);
2862 Widget_Data *wd = elm_widget_data_get(obj); 2880 Widget_Data *wd = elm_widget_data_get(obj);
2863 wd->compress = compress; 2881 wd->compress = compress;
2864} 2882}
@@ -2878,6 +2896,7 @@ elm_genlist_compress_mode_set(Evas_Object *obj, Eina_Bool compress)
2878EAPI void 2896EAPI void
2879elm_genlist_bounce_set(Evas_Object *obj, Eina_Bool h_bounce, Eina_Bool v_bounce) 2897elm_genlist_bounce_set(Evas_Object *obj, Eina_Bool h_bounce, Eina_Bool v_bounce)
2880{ 2898{
2899 ELM_CHECK_WIDTYPE(obj, widtype);
2881 Widget_Data *wd = elm_widget_data_get(obj); 2900 Widget_Data *wd = elm_widget_data_get(obj);
2882 elm_smart_scroller_bounce_allow_set(wd->scr, h_bounce, v_bounce); 2901 elm_smart_scroller_bounce_allow_set(wd->scr, h_bounce, v_bounce);
2883} 2902}
@@ -2896,6 +2915,7 @@ elm_genlist_bounce_set(Evas_Object *obj, Eina_Bool h_bounce, Eina_Bool v_bounce)
2896EAPI void 2915EAPI void
2897elm_genlist_homogeneous_set(Evas_Object *obj, Eina_Bool homogeneous) 2916elm_genlist_homogeneous_set(Evas_Object *obj, Eina_Bool homogeneous)
2898{ 2917{
2918 ELM_CHECK_WIDTYPE(obj, widtype);
2899 Widget_Data *wd = elm_widget_data_get(obj); 2919 Widget_Data *wd = elm_widget_data_get(obj);
2900 2920
2901 if (homogeneous) 2921 if (homogeneous)
@@ -2916,6 +2936,7 @@ elm_genlist_homogeneous_set(Evas_Object *obj, Eina_Bool homogeneous)
2916EAPI void 2936EAPI void
2917elm_genlist_block_count_set(Evas_Object *obj, int n) 2937elm_genlist_block_count_set(Evas_Object *obj, int n)
2918{ 2938{
2939 ELM_CHECK_WIDTYPE(obj, widtype);
2919 Widget_Data *wd = elm_widget_data_get(obj); 2940 Widget_Data *wd = elm_widget_data_get(obj);
2920 wd->max_items_per_block = n; 2941 wd->max_items_per_block = n;
2921} 2942}
diff --git a/src/lib/elm_hover.c b/src/lib/elm_hover.c
index 6c5378485..4027822f0 100644
--- a/src/lib/elm_hover.c
+++ b/src/lib/elm_hover.c
@@ -18,6 +18,7 @@ struct _Subinfo
18 Evas_Object *obj; 18 Evas_Object *obj;
19}; 19};
20 20
21static const char *widtype = NULL;
21static void _del_pre_hook(Evas_Object *obj); 22static void _del_pre_hook(Evas_Object *obj);
22static void _del_hook(Evas_Object *obj); 23static void _del_hook(Evas_Object *obj);
23static void _theme_hook(Evas_Object *obj); 24static void _theme_hook(Evas_Object *obj);
@@ -168,6 +169,7 @@ _hov_show(void *data, Evas *e, Evas_Object *obj, void *event_info)
168static void 169static void
169_hov_hide(void *data, Evas *e, Evas_Object *obj, void *event_info) 170_hov_hide(void *data, Evas *e, Evas_Object *obj, void *event_info)
170{ 171{
172
171 Widget_Data *wd = elm_widget_data_get(data); 173 Widget_Data *wd = elm_widget_data_get(data);
172 const Eina_List *l; 174 const Eina_List *l;
173 const Subinfo *si; 175 const Subinfo *si;
@@ -193,6 +195,7 @@ _hov_hide(void *data, Evas *e, Evas_Object *obj, void *event_info)
193static void 195static void
194_target_del(void *data, Evas *e, Evas_Object *obj, void *event_info) 196_target_del(void *data, Evas *e, Evas_Object *obj, void *event_info)
195{ 197{
198
196 Widget_Data *wd = elm_widget_data_get(data); 199 Widget_Data *wd = elm_widget_data_get(data);
197 200
198 wd->target = NULL; 201 wd->target = NULL;
@@ -201,6 +204,7 @@ _target_del(void *data, Evas *e, Evas_Object *obj, void *event_info)
201static void 204static void
202_signal_dismiss(void *data, Evas_Object *obj, const char *emission, const char *source) 205_signal_dismiss(void *data, Evas_Object *obj, const char *emission, const char *source)
203{ 206{
207
204 Widget_Data *wd = elm_widget_data_get(data); 208 Widget_Data *wd = elm_widget_data_get(data);
205 209
206 evas_object_hide(data); 210 evas_object_hide(data);
@@ -222,12 +226,14 @@ _parent_resize(void *data, Evas *e, Evas_Object *obj, void *event_info)
222static void 226static void
223_parent_show(void *data, Evas *e, Evas_Object *obj, void *event_info) 227_parent_show(void *data, Evas *e, Evas_Object *obj, void *event_info)
224{ 228{
229
225 Widget_Data *wd = elm_widget_data_get(data); 230 Widget_Data *wd = elm_widget_data_get(data);
226} 231}
227 232
228static void 233static void
229_parent_hide(void *data, Evas *e, Evas_Object *obj, void *event_info) 234_parent_hide(void *data, Evas *e, Evas_Object *obj, void *event_info)
230{ 235{
236
231 Widget_Data *wd = elm_widget_data_get(data); 237 Widget_Data *wd = elm_widget_data_get(data);
232 238
233 if (wd) evas_object_hide(wd->cov); 239 if (wd) evas_object_hide(wd->cov);
@@ -236,6 +242,7 @@ _parent_hide(void *data, Evas *e, Evas_Object *obj, void *event_info)
236static void 242static void
237_parent_del(void *data, Evas *e, Evas_Object *obj, void *event_info) 243_parent_del(void *data, Evas *e, Evas_Object *obj, void *event_info)
238{ 244{
245
239 Widget_Data *wd = elm_widget_data_get(data); 246 Widget_Data *wd = elm_widget_data_get(data);
240 247
241 elm_hover_parent_set(data, NULL); 248 elm_hover_parent_set(data, NULL);
@@ -252,6 +259,7 @@ elm_hover_add(Evas_Object *parent)
252 wd = ELM_NEW(Widget_Data); 259 wd = ELM_NEW(Widget_Data);
253 e = evas_object_evas_get(parent); 260 e = evas_object_evas_get(parent);
254 obj = elm_widget_add(e); 261 obj = elm_widget_add(e);
262 ELM_SET_WIDTYPE(widtype, "hover");
255 elm_widget_type_set(obj, "hover"); 263 elm_widget_type_set(obj, "hover");
256 elm_widget_sub_object_add(parent, obj); 264 elm_widget_sub_object_add(parent, obj);
257 elm_widget_data_set(obj, wd); 265 elm_widget_data_set(obj, wd);
@@ -296,6 +304,7 @@ elm_hover_add(Evas_Object *parent)
296EAPI void 304EAPI void
297elm_hover_target_set(Evas_Object *obj, Evas_Object *target) 305elm_hover_target_set(Evas_Object *obj, Evas_Object *target)
298{ 306{
307 ELM_CHECK_WIDTYPE(obj, widtype);
299 Widget_Data *wd = elm_widget_data_get(obj); 308 Widget_Data *wd = elm_widget_data_get(obj);
300 309
301 if (wd->target) 310 if (wd->target)
@@ -314,6 +323,7 @@ elm_hover_target_set(Evas_Object *obj, Evas_Object *target)
314EAPI void 323EAPI void
315elm_hover_parent_set(Evas_Object *obj, Evas_Object *parent) 324elm_hover_parent_set(Evas_Object *obj, Evas_Object *parent)
316{ 325{
326 ELM_CHECK_WIDTYPE(obj, widtype);
317 Widget_Data *wd = elm_widget_data_get(obj); 327 Widget_Data *wd = elm_widget_data_get(obj);
318 328
319 if (wd->parent) 329 if (wd->parent)
@@ -350,6 +360,7 @@ elm_hover_parent_set(Evas_Object *obj, Evas_Object *parent)
350EAPI void 360EAPI void
351elm_hover_content_set(Evas_Object *obj, const char *swallow, Evas_Object *content) 361elm_hover_content_set(Evas_Object *obj, const char *swallow, Evas_Object *content)
352{ 362{
363 ELM_CHECK_WIDTYPE(obj, widtype);
353 Widget_Data *wd = elm_widget_data_get(obj); 364 Widget_Data *wd = elm_widget_data_get(obj);
354 Subinfo *si; 365 Subinfo *si;
355 const Eina_List *l; 366 const Eina_List *l;
@@ -387,6 +398,7 @@ elm_hover_style_set(Evas_Object *obj, const char *style)
387EAPI const char * 398EAPI const char *
388elm_hover_best_content_location_get(const Evas_Object *obj, Elm_Hover_Axis pref_axis) 399elm_hover_best_content_location_get(const Evas_Object *obj, Elm_Hover_Axis pref_axis)
389{ 400{
401 ELM_CHECK_WIDTYPE(obj, widtype);
390 Widget_Data *wd = elm_widget_data_get(obj); 402 Widget_Data *wd = elm_widget_data_get(obj);
391 Evas_Coord x = 0, y = 0, w = 0, h = 0, x2 = 0, y2 = 0, w2 = 0, h2 = 0; 403 Evas_Coord x = 0, y = 0, w = 0, h = 0, x2 = 0, y2 = 0, w2 = 0, h2 = 0;
392 Evas_Coord spc_l, spc_r, spc_t, spc_b; 404 Evas_Coord spc_l, spc_r, spc_t, spc_b;
diff --git a/src/lib/elm_icon.c b/src/lib/elm_icon.c
index fab3d8d4c..4887395a3 100644
--- a/src/lib/elm_icon.c
+++ b/src/lib/elm_icon.c
@@ -27,6 +27,7 @@ struct _Widget_Data
27 Eina_Bool no_scale : 1; 27 Eina_Bool no_scale : 1;
28}; 28};
29 29
30static const char *widtype = NULL;
30static void _del_hook(Evas_Object *obj); 31static void _del_hook(Evas_Object *obj);
31static void _theme_hook(Evas_Object *obj); 32static void _theme_hook(Evas_Object *obj);
32static void _sizing_eval(Evas_Object *obj); 33static void _sizing_eval(Evas_Object *obj);
@@ -113,6 +114,7 @@ elm_icon_add(Evas_Object *parent)
113 wd = ELM_NEW(Widget_Data); 114 wd = ELM_NEW(Widget_Data);
114 e = evas_object_evas_get(parent); 115 e = evas_object_evas_get(parent);
115 obj = elm_widget_add(e); 116 obj = elm_widget_add(e);
117 ELM_SET_WIDTYPE(widtype, "icon");
116 elm_widget_type_set(obj, "icon"); 118 elm_widget_type_set(obj, "icon");
117 elm_widget_sub_object_add(parent, obj); 119 elm_widget_sub_object_add(parent, obj);
118 elm_widget_data_set(obj, wd); 120 elm_widget_data_set(obj, wd);
@@ -148,6 +150,7 @@ elm_icon_add(Evas_Object *parent)
148EAPI Eina_Bool 150EAPI Eina_Bool
149elm_icon_file_set(Evas_Object *obj, const char *file, const char *group) 151elm_icon_file_set(Evas_Object *obj, const char *file, const char *group)
150{ 152{
153 ELM_CHECK_WIDTYPE(obj, widtype);
151 Widget_Data *wd = elm_widget_data_get(obj); 154 Widget_Data *wd = elm_widget_data_get(obj);
152 Eina_Bool ret; 155 Eina_Bool ret;
153 const char *p; 156 const char *p;
@@ -176,6 +179,7 @@ elm_icon_file_set(Evas_Object *obj, const char *file, const char *group)
176EAPI Eina_Bool 179EAPI Eina_Bool
177elm_icon_standard_set(Evas_Object *obj, const char *name) 180elm_icon_standard_set(Evas_Object *obj, const char *name)
178{ 181{
182 ELM_CHECK_WIDTYPE(obj, widtype);
179 Widget_Data *wd = elm_widget_data_get(obj); 183 Widget_Data *wd = elm_widget_data_get(obj);
180 Eina_Bool ret; 184 Eina_Bool ret;
181 185
@@ -199,6 +203,7 @@ elm_icon_standard_set(Evas_Object *obj, const char *name)
199EAPI void 203EAPI void
200elm_icon_smooth_set(Evas_Object *obj, Eina_Bool smooth) 204elm_icon_smooth_set(Evas_Object *obj, Eina_Bool smooth)
201{ 205{
206 ELM_CHECK_WIDTYPE(obj, widtype);
202 Widget_Data *wd = elm_widget_data_get(obj); 207 Widget_Data *wd = elm_widget_data_get(obj);
203 208
204 if (!wd) return; 209 if (!wd) return;
@@ -218,6 +223,7 @@ elm_icon_smooth_set(Evas_Object *obj, Eina_Bool smooth)
218EAPI void 223EAPI void
219elm_icon_no_scale_set(Evas_Object *obj, Eina_Bool no_scale) 224elm_icon_no_scale_set(Evas_Object *obj, Eina_Bool no_scale)
220{ 225{
226 ELM_CHECK_WIDTYPE(obj, widtype);
221 Widget_Data *wd = elm_widget_data_get(obj); 227 Widget_Data *wd = elm_widget_data_get(obj);
222 228
223 if (!wd) return; 229 if (!wd) return;
@@ -237,6 +243,7 @@ elm_icon_no_scale_set(Evas_Object *obj, Eina_Bool no_scale)
237EAPI void 243EAPI void
238elm_icon_scale_set(Evas_Object *obj, Eina_Bool scale_up, Eina_Bool scale_down) 244elm_icon_scale_set(Evas_Object *obj, Eina_Bool scale_up, Eina_Bool scale_down)
239{ 245{
246 ELM_CHECK_WIDTYPE(obj, widtype);
240 Widget_Data *wd = elm_widget_data_get(obj); 247 Widget_Data *wd = elm_widget_data_get(obj);
241 248
242 if (!wd) return; 249 if (!wd) return;
@@ -257,6 +264,7 @@ elm_icon_scale_set(Evas_Object *obj, Eina_Bool scale_up, Eina_Bool scale_down)
257EAPI void 264EAPI void
258elm_icon_fill_outside_set(Evas_Object *obj, Eina_Bool fill_outside) 265elm_icon_fill_outside_set(Evas_Object *obj, Eina_Bool fill_outside)
259{ 266{
267 ELM_CHECK_WIDTYPE(obj, widtype);
260 Widget_Data *wd = elm_widget_data_get(obj); 268 Widget_Data *wd = elm_widget_data_get(obj);
261 269
262 if (!wd) return; 270 if (!wd) return;
@@ -276,6 +284,7 @@ elm_icon_fill_outside_set(Evas_Object *obj, Eina_Bool fill_outside)
276EAPI void 284EAPI void
277elm_icon_prescale_set(Evas_Object *obj, int size) 285elm_icon_prescale_set(Evas_Object *obj, int size)
278{ 286{
287 ELM_CHECK_WIDTYPE(obj, widtype);
279 Widget_Data *wd = elm_widget_data_get(obj); 288 Widget_Data *wd = elm_widget_data_get(obj);
280 289
281 if (!wd) return; 290 if (!wd) return;
diff --git a/src/lib/elm_image.c b/src/lib/elm_image.c
index e1c0ecc0d..047c447d1 100644
--- a/src/lib/elm_image.c
+++ b/src/lib/elm_image.c
@@ -30,6 +30,7 @@ struct _Widget_Data
30 Eina_Bool no_scale : 1; 30 Eina_Bool no_scale : 1;
31}; 31};
32 32
33static const char *widtype = NULL;
33static void _del_hook(Evas_Object *obj); 34static void _del_hook(Evas_Object *obj);
34static void _theme_hook(Evas_Object *obj); 35static void _theme_hook(Evas_Object *obj);
35static void _sizing_eval(Evas_Object *obj); 36static void _sizing_eval(Evas_Object *obj);
@@ -119,6 +120,7 @@ elm_image_add(Evas_Object *parent)
119 wd = ELM_NEW(Widget_Data); 120 wd = ELM_NEW(Widget_Data);
120 e = evas_object_evas_get(parent); 121 e = evas_object_evas_get(parent);
121 obj = elm_widget_add(e); 122 obj = elm_widget_add(e);
123 ELM_SET_WIDTYPE(widtype, "image");
122 elm_widget_type_set(obj, "image"); 124 elm_widget_type_set(obj, "image");
123 elm_widget_sub_object_add(parent, obj); 125 elm_widget_sub_object_add(parent, obj);
124 elm_widget_data_set(obj, wd); 126 elm_widget_data_set(obj, wd);
@@ -157,6 +159,7 @@ elm_image_add(Evas_Object *parent)
157EAPI Eina_Bool 159EAPI Eina_Bool
158elm_image_file_set(Evas_Object *obj, const char *file, const char *group) 160elm_image_file_set(Evas_Object *obj, const char *file, const char *group)
159{ 161{
162 ELM_CHECK_WIDTYPE(obj, widtype);
160 Widget_Data *wd = elm_widget_data_get(obj); 163 Widget_Data *wd = elm_widget_data_get(obj);
161 Eina_Bool ret; 164 Eina_Bool ret;
162 const char *p; 165 const char *p;
@@ -182,6 +185,7 @@ elm_image_file_set(Evas_Object *obj, const char *file, const char *group)
182EAPI void 185EAPI void
183elm_image_smooth_set(Evas_Object *obj, Eina_Bool smooth) 186elm_image_smooth_set(Evas_Object *obj, Eina_Bool smooth)
184{ 187{
188 ELM_CHECK_WIDTYPE(obj, widtype);
185 Widget_Data *wd = elm_widget_data_get(obj); 189 Widget_Data *wd = elm_widget_data_get(obj);
186 190
187 if (!wd) return; 191 if (!wd) return;
@@ -192,6 +196,7 @@ elm_image_smooth_set(Evas_Object *obj, Eina_Bool smooth)
192EAPI void 196EAPI void
193elm_image_object_size_get(const Evas_Object *obj, int *w, int *h) 197elm_image_object_size_get(const Evas_Object *obj, int *w, int *h)
194{ 198{
199 ELM_CHECK_WIDTYPE(obj, widtype);
195 Widget_Data *wd = elm_widget_data_get(obj); 200 Widget_Data *wd = elm_widget_data_get(obj);
196 201
197 _els_smart_icon_size_get(wd->img, w, h); 202 _els_smart_icon_size_get(wd->img, w, h);
@@ -209,6 +214,7 @@ elm_image_object_size_get(const Evas_Object *obj, int *w, int *h)
209EAPI void 214EAPI void
210elm_image_no_scale_set(Evas_Object *obj, Eina_Bool no_scale) 215elm_image_no_scale_set(Evas_Object *obj, Eina_Bool no_scale)
211{ 216{
217 ELM_CHECK_WIDTYPE(obj, widtype);
212 Widget_Data *wd = elm_widget_data_get(obj); 218 Widget_Data *wd = elm_widget_data_get(obj);
213 219
214 if (!wd) return; 220 if (!wd) return;
@@ -229,6 +235,7 @@ elm_image_no_scale_set(Evas_Object *obj, Eina_Bool no_scale)
229EAPI void 235EAPI void
230elm_image_scale_set(Evas_Object *obj, Eina_Bool scale_up, Eina_Bool scale_down) 236elm_image_scale_set(Evas_Object *obj, Eina_Bool scale_up, Eina_Bool scale_down)
231{ 237{
238 ELM_CHECK_WIDTYPE(obj, widtype);
232 Widget_Data *wd = elm_widget_data_get(obj); 239 Widget_Data *wd = elm_widget_data_get(obj);
233 240
234 if (!wd) return; 241 if (!wd) return;
@@ -249,6 +256,7 @@ elm_image_scale_set(Evas_Object *obj, Eina_Bool scale_up, Eina_Bool scale_down)
249EAPI void 256EAPI void
250elm_image_fill_outside_set(Evas_Object *obj, Eina_Bool fill_outside) 257elm_image_fill_outside_set(Evas_Object *obj, Eina_Bool fill_outside)
251{ 258{
259 ELM_CHECK_WIDTYPE(obj, widtype);
252 Widget_Data *wd = elm_widget_data_get(obj); 260 Widget_Data *wd = elm_widget_data_get(obj);
253 261
254 if (!wd) return; 262 if (!wd) return;
@@ -267,6 +275,7 @@ elm_image_fill_outside_set(Evas_Object *obj, Eina_Bool fill_outside)
267EAPI void 275EAPI void
268elm_image_prescale_set(Evas_Object *obj, int size) 276elm_image_prescale_set(Evas_Object *obj, int size)
269{ 277{
278 ELM_CHECK_WIDTYPE(obj, widtype);
270 Widget_Data *wd = elm_widget_data_get(obj); 279 Widget_Data *wd = elm_widget_data_get(obj);
271 280
272 if (!wd) return; 281 if (!wd) return;
@@ -288,6 +297,7 @@ elm_image_prescale_set(Evas_Object *obj, int size)
288EAPI void 297EAPI void
289elm_image_orient_set(Evas_Object *obj, Elm_Image_Orient orient) 298elm_image_orient_set(Evas_Object *obj, Elm_Image_Orient orient)
290{ 299{
300 ELM_CHECK_WIDTYPE(obj, widtype);
291 Widget_Data *wd = elm_widget_data_get(obj); 301 Widget_Data *wd = elm_widget_data_get(obj);
292 302
293 if (!wd) return; 303 if (!wd) return;
diff --git a/src/lib/elm_index.c b/src/lib/elm_index.c
index db036859b..5ff74c724 100644
--- a/src/lib/elm_index.c
+++ b/src/lib/elm_index.c
@@ -41,6 +41,7 @@ struct _Item
41 Eina_Bool selected : 1; 41 Eina_Bool selected : 1;
42}; 42};
43 43
44static const char *widtype = NULL;
44static void _del_hook(Evas_Object *obj); 45static void _del_hook(Evas_Object *obj);
45static void _theme_hook(Evas_Object *obj); 46static void _theme_hook(Evas_Object *obj);
46static void _sizing_eval(Evas_Object *obj); 47static void _sizing_eval(Evas_Object *obj);
@@ -258,6 +259,7 @@ _index_box_clear(Evas_Object *obj, Evas_Object *box, int level)
258static int 259static int
259_delay_change(void *data) 260_delay_change(void *data)
260{ 261{
262
261 Widget_Data *wd = elm_widget_data_get(data); 263 Widget_Data *wd = elm_widget_data_get(data);
262 void *d; 264 void *d;
263 265
@@ -383,6 +385,7 @@ _sel_eval(Evas_Object *obj, Evas_Coord evx, Evas_Coord evy)
383static void 385static void
384_wheel(void *data, Evas *e, Evas_Object *o, void *event_info) 386_wheel(void *data, Evas *e, Evas_Object *o, void *event_info)
385{ 387{
388
386 Widget_Data *wd = elm_widget_data_get(data); 389 Widget_Data *wd = elm_widget_data_get(data);
387 Evas_Event_Mouse_Wheel *ev = event_info; 390 Evas_Event_Mouse_Wheel *ev = event_info;
388 Evas_Object *obj = o; 391 Evas_Object *obj = o;
@@ -391,6 +394,7 @@ _wheel(void *data, Evas *e, Evas_Object *o, void *event_info)
391static void 394static void
392_mouse_down(void *data, Evas *e, Evas_Object *o, void *event_info) 395_mouse_down(void *data, Evas *e, Evas_Object *o, void *event_info)
393{ 396{
397
394 Widget_Data *wd = elm_widget_data_get(data); 398 Widget_Data *wd = elm_widget_data_get(data);
395 Evas_Event_Mouse_Down *ev = event_info; 399 Evas_Event_Mouse_Down *ev = event_info;
396 Evas_Coord x, y; 400 Evas_Coord x, y;
@@ -409,6 +413,7 @@ _mouse_down(void *data, Evas *e, Evas_Object *o, void *event_info)
409static void 413static void
410_mouse_up(void *data, Evas *e, Evas_Object *o, void *event_info) 414_mouse_up(void *data, Evas *e, Evas_Object *o, void *event_info)
411{ 415{
416
412 Widget_Data *wd = elm_widget_data_get(data); 417 Widget_Data *wd = elm_widget_data_get(data);
413 Evas_Event_Mouse_Up *ev = event_info; 418 Evas_Event_Mouse_Up *ev = event_info;
414 void *d; 419 void *d;
@@ -424,6 +429,7 @@ _mouse_up(void *data, Evas *e, Evas_Object *o, void *event_info)
424static void 429static void
425_mouse_move(void *data, Evas *e, Evas_Object *o, void *event_info) 430_mouse_move(void *data, Evas *e, Evas_Object *o, void *event_info)
426{ 431{
432
427 Widget_Data *wd = elm_widget_data_get(data); 433 Widget_Data *wd = elm_widget_data_get(data);
428 Evas_Event_Mouse_Move *ev = event_info; 434 Evas_Event_Mouse_Move *ev = event_info;
429 Evas_Coord minw = 0, minh = 0, x, y, dx, dy, adx, ady; 435 Evas_Coord minw = 0, minh = 0, x, y, dx, dy, adx, ady;
@@ -492,6 +498,7 @@ elm_index_add(Evas_Object *parent)
492 wd = ELM_NEW(Widget_Data); 498 wd = ELM_NEW(Widget_Data);
493 e = evas_object_evas_get(parent); 499 e = evas_object_evas_get(parent);
494 obj = elm_widget_add(e); 500 obj = elm_widget_add(e);
501 ELM_SET_WIDTYPE(widtype, "index");
495 elm_widget_type_set(obj, "index"); 502 elm_widget_type_set(obj, "index");
496 elm_widget_sub_object_add(parent, obj); 503 elm_widget_sub_object_add(parent, obj);
497 elm_widget_data_set(obj, wd); 504 elm_widget_data_set(obj, wd);
@@ -557,6 +564,7 @@ elm_index_add(Evas_Object *parent)
557EAPI void 564EAPI void
558elm_index_active_set(Evas_Object *obj, Eina_Bool active) 565elm_index_active_set(Evas_Object *obj, Eina_Bool active)
559{ 566{
567 ELM_CHECK_WIDTYPE(obj, widtype);
560 Widget_Data *wd = elm_widget_data_get(obj); 568 Widget_Data *wd = elm_widget_data_get(obj);
561 569
562 if (!wd) return; 570 if (!wd) return;
@@ -584,6 +592,7 @@ elm_index_active_set(Evas_Object *obj, Eina_Bool active)
584EAPI void 592EAPI void
585elm_index_item_level_set(Evas_Object *obj, int level) 593elm_index_item_level_set(Evas_Object *obj, int level)
586{ 594{
595 ELM_CHECK_WIDTYPE(obj, widtype);
587 Widget_Data *wd = elm_widget_data_get(obj); 596 Widget_Data *wd = elm_widget_data_get(obj);
588 597
589 if (!wd) return; 598 if (!wd) return;
@@ -601,6 +610,7 @@ elm_index_item_level_set(Evas_Object *obj, int level)
601EAPI int 610EAPI int
602elm_index_item_level_get(Evas_Object *obj) 611elm_index_item_level_get(Evas_Object *obj)
603{ 612{
613 ELM_CHECK_WIDTYPE(obj, widtype);
604 Widget_Data *wd = elm_widget_data_get(obj); 614 Widget_Data *wd = elm_widget_data_get(obj);
605 615
606 if (!wd) return 0; 616 if (!wd) return 0;
@@ -618,6 +628,7 @@ elm_index_item_level_get(Evas_Object *obj)
618EAPI const void * 628EAPI const void *
619elm_index_item_selected_get(Evas_Object *obj, int level) 629elm_index_item_selected_get(Evas_Object *obj, int level)
620{ 630{
631 ELM_CHECK_WIDTYPE(obj, widtype);
621 Widget_Data *wd = elm_widget_data_get(obj); 632 Widget_Data *wd = elm_widget_data_get(obj);
622 Eina_List *l; 633 Eina_List *l;
623 Item *it; 634 Item *it;
@@ -640,6 +651,7 @@ elm_index_item_selected_get(Evas_Object *obj, int level)
640EAPI void 651EAPI void
641elm_index_item_append(Evas_Object *obj, const char *letter, const void *item) 652elm_index_item_append(Evas_Object *obj, const char *letter, const void *item)
642{ 653{
654 ELM_CHECK_WIDTYPE(obj, widtype);
643 Widget_Data *wd = elm_widget_data_get(obj); 655 Widget_Data *wd = elm_widget_data_get(obj);
644 Item *it; 656 Item *it;
645 657
@@ -662,6 +674,7 @@ elm_index_item_append(Evas_Object *obj, const char *letter, const void *item)
662EAPI void 674EAPI void
663elm_index_item_prepend(Evas_Object *obj, const char *letter, const void *item) 675elm_index_item_prepend(Evas_Object *obj, const char *letter, const void *item)
664{ 676{
677 ELM_CHECK_WIDTYPE(obj, widtype);
665 Widget_Data *wd = elm_widget_data_get(obj); 678 Widget_Data *wd = elm_widget_data_get(obj);
666 Item *it; 679 Item *it;
667 680
@@ -685,6 +698,7 @@ elm_index_item_prepend(Evas_Object *obj, const char *letter, const void *item)
685EAPI void 698EAPI void
686elm_index_item_append_relative(Evas_Object *obj, const char *letter, const void *item, const void *relative) 699elm_index_item_append_relative(Evas_Object *obj, const char *letter, const void *item, const void *relative)
687{ 700{
701 ELM_CHECK_WIDTYPE(obj, widtype);
688 Widget_Data *wd = elm_widget_data_get(obj); 702 Widget_Data *wd = elm_widget_data_get(obj);
689 Item *it, *it_rel; 703 Item *it, *it_rel;
690 704
@@ -719,6 +733,7 @@ elm_index_item_append_relative(Evas_Object *obj, const char *letter, const void
719EAPI void 733EAPI void
720elm_index_item_prepend_relative(Evas_Object *obj, const char *letter, const void *item, const void *relative) 734elm_index_item_prepend_relative(Evas_Object *obj, const char *letter, const void *item, const void *relative)
721{ 735{
736 ELM_CHECK_WIDTYPE(obj, widtype);
722 Widget_Data *wd = elm_widget_data_get(obj); 737 Widget_Data *wd = elm_widget_data_get(obj);
723 Item *it, *it_rel; 738 Item *it, *it_rel;
724 739
@@ -751,6 +766,7 @@ elm_index_item_prepend_relative(Evas_Object *obj, const char *letter, const void
751EAPI void 766EAPI void
752elm_index_item_del(Evas_Object *obj, const void *item) 767elm_index_item_del(Evas_Object *obj, const void *item)
753{ 768{
769 ELM_CHECK_WIDTYPE(obj, widtype);
754 Widget_Data *wd = elm_widget_data_get(obj); 770 Widget_Data *wd = elm_widget_data_get(obj);
755 Item *it; 771 Item *it;
756 772
@@ -771,6 +787,7 @@ elm_index_item_del(Evas_Object *obj, const void *item)
771EAPI void 787EAPI void
772elm_index_item_clear(Evas_Object *obj) 788elm_index_item_clear(Evas_Object *obj)
773{ 789{
790 ELM_CHECK_WIDTYPE(obj, widtype);
774 Widget_Data *wd = elm_widget_data_get(obj); 791 Widget_Data *wd = elm_widget_data_get(obj);
775 Item *it; 792 Item *it;
776 Eina_List *l, *clear = NULL; 793 Eina_List *l, *clear = NULL;
@@ -797,6 +814,7 @@ elm_index_item_clear(Evas_Object *obj)
797EAPI void 814EAPI void
798elm_index_item_go(Evas_Object *obj, int level) 815elm_index_item_go(Evas_Object *obj, int level)
799{ 816{
817 ELM_CHECK_WIDTYPE(obj, widtype);
800 Widget_Data *wd = elm_widget_data_get(obj); 818 Widget_Data *wd = elm_widget_data_get(obj);
801 Item *it; 819 Item *it;
802 820
diff --git a/src/lib/elm_label.c b/src/lib/elm_label.c
index e48c0cc37..ec84d4898 100644
--- a/src/lib/elm_label.c
+++ b/src/lib/elm_label.c
@@ -21,6 +21,7 @@ struct _Widget_Data
21 Eina_Bool changed : 1; 21 Eina_Bool changed : 1;
22}; 22};
23 23
24static const char *widtype = NULL;
24static void _del_hook(Evas_Object *obj); 25static void _del_hook(Evas_Object *obj);
25static void _theme_hook(Evas_Object *obj); 26static void _theme_hook(Evas_Object *obj);
26static void _sizing_eval(Evas_Object *obj); 27static void _sizing_eval(Evas_Object *obj);
@@ -110,6 +111,7 @@ _sizing_eval(Evas_Object *obj)
110static void 111static void
111_resize(void *data, Evas *e, Evas_Object *obj, void *event_info) 112_resize(void *data, Evas *e, Evas_Object *obj, void *event_info)
112{ 113{
114
113 Widget_Data *wd = elm_widget_data_get(data); 115 Widget_Data *wd = elm_widget_data_get(data);
114 116
115 if (wd->linewrap) 117 if (wd->linewrap)
@@ -135,6 +137,7 @@ elm_label_add(Evas_Object *parent)
135 wd = ELM_NEW(Widget_Data); 137 wd = ELM_NEW(Widget_Data);
136 e = evas_object_evas_get(parent); 138 e = evas_object_evas_get(parent);
137 obj = elm_widget_add(e); 139 obj = elm_widget_add(e);
140 ELM_SET_WIDTYPE(widtype, "label");
138 elm_widget_type_set(obj, "label"); 141 elm_widget_type_set(obj, "label");
139 elm_widget_sub_object_add(parent, obj); 142 elm_widget_sub_object_add(parent, obj);
140 elm_widget_data_set(obj, wd); 143 elm_widget_data_set(obj, wd);
@@ -168,6 +171,7 @@ elm_label_add(Evas_Object *parent)
168EAPI void 171EAPI void
169elm_label_label_set(Evas_Object *obj, const char *label) 172elm_label_label_set(Evas_Object *obj, const char *label)
170{ 173{
174 ELM_CHECK_WIDTYPE(obj, widtype);
171 Widget_Data *wd = elm_widget_data_get(obj); 175 Widget_Data *wd = elm_widget_data_get(obj);
172 176
173 if (!label) label = ""; 177 if (!label) label = "";
@@ -188,6 +192,7 @@ elm_label_label_set(Evas_Object *obj, const char *label)
188EAPI const char * 192EAPI const char *
189elm_label_label_get(Evas_Object *obj) 193elm_label_label_get(Evas_Object *obj)
190{ 194{
195 ELM_CHECK_WIDTYPE(obj, widtype);
191 Widget_Data *wd = elm_widget_data_get(obj); 196 Widget_Data *wd = elm_widget_data_get(obj);
192 197
193 if (!wd) return NULL; 198 if (!wd) return NULL;
@@ -204,6 +209,7 @@ elm_label_label_get(Evas_Object *obj)
204EAPI void 209EAPI void
205elm_label_line_wrap_set(Evas_Object *obj, Eina_Bool wrap) 210elm_label_line_wrap_set(Evas_Object *obj, Eina_Bool wrap)
206{ 211{
212 ELM_CHECK_WIDTYPE(obj, widtype);
207 Widget_Data *wd = elm_widget_data_get(obj); 213 Widget_Data *wd = elm_widget_data_get(obj);
208 const char *t; 214 const char *t;
209 if (wd->linewrap == wrap) return; 215 if (wd->linewrap == wrap) return;
@@ -229,6 +235,7 @@ elm_label_line_wrap_set(Evas_Object *obj, Eina_Bool wrap)
229EAPI Eina_Bool 235EAPI Eina_Bool
230elm_label_line_wrap_get(const Evas_Object *obj) 236elm_label_line_wrap_get(const Evas_Object *obj)
231{ 237{
238 ELM_CHECK_WIDTYPE(obj, widtype);
232 Widget_Data *wd = elm_widget_data_get(obj); 239 Widget_Data *wd = elm_widget_data_get(obj);
233 return wd->linewrap; 240 return wd->linewrap;
234} 241}
@@ -243,6 +250,7 @@ elm_label_line_wrap_get(const Evas_Object *obj)
243EAPI void 250EAPI void
244elm_label_wrap_width_set(Evas_Object *obj, Evas_Coord w) 251elm_label_wrap_width_set(Evas_Object *obj, Evas_Coord w)
245{ 252{
253 ELM_CHECK_WIDTYPE(obj, widtype);
246 Widget_Data *wd = elm_widget_data_get(obj); 254 Widget_Data *wd = elm_widget_data_get(obj);
247 if (wd->wrap_w == w) return; 255 if (wd->wrap_w == w) return;
248 wd->wrap_w = w; 256 wd->wrap_w = w;
@@ -259,6 +267,7 @@ elm_label_wrap_width_set(Evas_Object *obj, Evas_Coord w)
259EAPI Evas_Coord 267EAPI Evas_Coord
260elm_label_wrap_width_get(const Evas_Object *obj) 268elm_label_wrap_width_get(const Evas_Object *obj)
261{ 269{
270 ELM_CHECK_WIDTYPE(obj, widtype);
262 Widget_Data *wd = elm_widget_data_get(obj); 271 Widget_Data *wd = elm_widget_data_get(obj);
263 return wd->wrap_w; 272 return wd->wrap_w;
264} 273}
diff --git a/src/lib/elm_layout.c b/src/lib/elm_layout.c
index bd7da960d..b6ea9ba14 100644
--- a/src/lib/elm_layout.c
+++ b/src/lib/elm_layout.c
@@ -26,6 +26,7 @@ struct _Subinfo
26 Evas_Object *obj; 26 Evas_Object *obj;
27}; 27};
28 28
29static const char *widtype = NULL;
29static void _del_hook(Evas_Object *obj); 30static void _del_hook(Evas_Object *obj);
30static void _theme_hook(Evas_Object *obj); 31static void _theme_hook(Evas_Object *obj);
31static void _sizing_eval(Evas_Object *obj); 32static void _sizing_eval(Evas_Object *obj);
@@ -35,6 +36,7 @@ static void _sub_del(void *data, Evas_Object *obj, void *event_info);
35static void 36static void
36_del_hook(Evas_Object *obj) 37_del_hook(Evas_Object *obj)
37{ 38{
39
38 Widget_Data *wd = elm_widget_data_get(obj); 40 Widget_Data *wd = elm_widget_data_get(obj);
39 Subinfo *si; 41 Subinfo *si;
40 42
@@ -49,6 +51,7 @@ _del_hook(Evas_Object *obj)
49static void 51static void
50_theme_hook(Evas_Object *obj) 52_theme_hook(Evas_Object *obj)
51{ 53{
54
52 Widget_Data *wd = elm_widget_data_get(obj); 55 Widget_Data *wd = elm_widget_data_get(obj);
53 56
54 edje_object_scale_set(wd->lay, elm_widget_scale_get(obj) * 57 edje_object_scale_set(wd->lay, elm_widget_scale_get(obj) *
@@ -59,6 +62,7 @@ _theme_hook(Evas_Object *obj)
59static void 62static void
60_changed_hook(Evas_Object *obj) 63_changed_hook(Evas_Object *obj)
61{ 64{
65
62 Widget_Data *wd = elm_widget_data_get(obj); 66 Widget_Data *wd = elm_widget_data_get(obj);
63 if (wd->needs_size_calc) 67 if (wd->needs_size_calc)
64 { 68 {
@@ -70,6 +74,7 @@ _changed_hook(Evas_Object *obj)
70static void 74static void
71_sizing_eval(Evas_Object *obj) 75_sizing_eval(Evas_Object *obj)
72{ 76{
77
73 Widget_Data *wd = elm_widget_data_get(obj); 78 Widget_Data *wd = elm_widget_data_get(obj);
74 Evas_Coord minw = -1, minh = -1; 79 Evas_Coord minw = -1, minh = -1;
75 80
@@ -81,6 +86,7 @@ _sizing_eval(Evas_Object *obj)
81static void 86static void
82_request_sizing_eval(Evas_Object *obj) 87_request_sizing_eval(Evas_Object *obj)
83{ 88{
89
84 Widget_Data *wd = elm_widget_data_get(obj); 90 Widget_Data *wd = elm_widget_data_get(obj);
85 if (wd->needs_size_calc) return; 91 if (wd->needs_size_calc) return;
86 wd->needs_size_calc = 1; 92 wd->needs_size_calc = 1;
@@ -96,6 +102,7 @@ _changed_size_hints(void *data, Evas *e, Evas_Object *obj, void *event_info)
96static void 102static void
97_sub_del(void *data, Evas_Object *obj, void *event_info) 103_sub_del(void *data, Evas_Object *obj, void *event_info)
98{ 104{
105
99 Widget_Data *wd = elm_widget_data_get(obj); 106 Widget_Data *wd = elm_widget_data_get(obj);
100 Evas_Object *sub = event_info; 107 Evas_Object *sub = event_info;
101 Eina_List *l; 108 Eina_List *l;
@@ -141,6 +148,7 @@ elm_layout_add(Evas_Object *parent)
141 wd = ELM_NEW(Widget_Data); 148 wd = ELM_NEW(Widget_Data);
142 e = evas_object_evas_get(parent); 149 e = evas_object_evas_get(parent);
143 obj = elm_widget_add(e); 150 obj = elm_widget_add(e);
151 ELM_SET_WIDTYPE(widtype, "layout");
144 elm_widget_type_set(obj, "layout"); 152 elm_widget_type_set(obj, "layout");
145 elm_widget_sub_object_add(parent, obj); 153 elm_widget_sub_object_add(parent, obj);
146 elm_widget_data_set(obj, wd); 154 elm_widget_data_set(obj, wd);
@@ -173,6 +181,7 @@ elm_layout_add(Evas_Object *parent)
173EAPI Eina_Bool 181EAPI Eina_Bool
174elm_layout_file_set(Evas_Object *obj, const char *file, const char *group) 182elm_layout_file_set(Evas_Object *obj, const char *file, const char *group)
175{ 183{
184 ELM_CHECK_WIDTYPE(obj, widtype);
176 Widget_Data *wd = elm_widget_data_get(obj); 185 Widget_Data *wd = elm_widget_data_get(obj);
177 Eina_Bool ret = edje_object_file_set(wd->lay, file, group); 186 Eina_Bool ret = edje_object_file_set(wd->lay, file, group);
178 187
@@ -195,6 +204,7 @@ elm_layout_file_set(Evas_Object *obj, const char *file, const char *group)
195EAPI Eina_Bool 204EAPI Eina_Bool
196elm_layout_theme_set(Evas_Object *obj, const char *clas, const char *group, const char *style) 205elm_layout_theme_set(Evas_Object *obj, const char *clas, const char *group, const char *style)
197{ 206{
207 ELM_CHECK_WIDTYPE(obj, widtype);
198 Widget_Data *wd = elm_widget_data_get(obj); 208 Widget_Data *wd = elm_widget_data_get(obj);
199 Eina_Bool ret = _elm_theme_set(wd->lay, clas, group, style); 209 Eina_Bool ret = _elm_theme_set(wd->lay, clas, group, style);
200 210
@@ -214,6 +224,7 @@ elm_layout_theme_set(Evas_Object *obj, const char *clas, const char *group, cons
214EAPI void 224EAPI void
215elm_layout_content_set(Evas_Object *obj, const char *swallow, Evas_Object *content) 225elm_layout_content_set(Evas_Object *obj, const char *swallow, Evas_Object *content)
216{ 226{
227 ELM_CHECK_WIDTYPE(obj, widtype);
217 Widget_Data *wd = elm_widget_data_get(obj); 228 Widget_Data *wd = elm_widget_data_get(obj);
218 Subinfo *si; 229 Subinfo *si;
219 const Eina_List *l; 230 const Eina_List *l;
@@ -261,6 +272,7 @@ elm_layout_content_set(Evas_Object *obj, const char *swallow, Evas_Object *conte
261EAPI Evas_Object * 272EAPI Evas_Object *
262elm_layout_edje_get(const Evas_Object *obj) 273elm_layout_edje_get(const Evas_Object *obj)
263{ 274{
275 ELM_CHECK_WIDTYPE(obj, widtype);
264 Widget_Data *wd = elm_widget_data_get(obj); 276 Widget_Data *wd = elm_widget_data_get(obj);
265 277
266 return wd->lay; 278 return wd->lay;
@@ -281,6 +293,7 @@ elm_layout_edje_get(const Evas_Object *obj)
281EAPI void 293EAPI void
282elm_layout_sizing_eval(Evas_Object *obj) 294elm_layout_sizing_eval(Evas_Object *obj)
283{ 295{
296 ELM_CHECK_WIDTYPE(obj, widtype);
284 Widget_Data *wd = elm_widget_data_get(obj); 297 Widget_Data *wd = elm_widget_data_get(obj);
285 _request_sizing_eval(obj); 298 _request_sizing_eval(obj);
286} 299}
diff --git a/src/lib/elm_list.c b/src/lib/elm_list.c
index 307490664..9ac441825 100644
--- a/src/lib/elm_list.c
+++ b/src/lib/elm_list.c
@@ -38,6 +38,7 @@ struct _Elm_List_Item
38 Eina_Bool dummy_end : 1; 38 Eina_Bool dummy_end : 1;
39}; 39};
40 40
41static const char *widtype = NULL;
41static void _del_hook(Evas_Object *obj); 42static void _del_hook(Evas_Object *obj);
42static void _theme_hook(Evas_Object *obj); 43static void _theme_hook(Evas_Object *obj);
43static void _sizing_eval(Evas_Object *obj); 44static void _sizing_eval(Evas_Object *obj);
@@ -156,6 +157,7 @@ _elm_list_unwalk(Widget_Data *wd)
156static void 157static void
157_del_hook(Evas_Object *obj) 158_del_hook(Evas_Object *obj)
158{ 159{
160
159 Widget_Data *wd = elm_widget_data_get(obj); 161 Widget_Data *wd = elm_widget_data_get(obj);
160 Elm_List_Item *it; 162 Elm_List_Item *it;
161 Eina_List *n; 163 Eina_List *n;
@@ -183,6 +185,7 @@ _del_hook(Evas_Object *obj)
183static void 185static void
184_sizing_eval(Evas_Object *obj) 186_sizing_eval(Evas_Object *obj)
185{ 187{
188
186 Widget_Data *wd = elm_widget_data_get(obj); 189 Widget_Data *wd = elm_widget_data_get(obj);
187 Evas_Coord minw = -1, minh = -1, maxw = -1, maxh = -1; 190 Evas_Coord minw = -1, minh = -1, maxw = -1, maxh = -1;
188 191
@@ -195,6 +198,7 @@ _sizing_eval(Evas_Object *obj)
195static void 198static void
196_theme_hook(Evas_Object *obj) 199_theme_hook(Evas_Object *obj)
197{ 200{
201
198 Widget_Data *wd = elm_widget_data_get(obj); 202 Widget_Data *wd = elm_widget_data_get(obj);
199 Elm_List_Item *it; 203 Elm_List_Item *it;
200 Eina_List *n; 204 Eina_List *n;
@@ -212,6 +216,7 @@ _theme_hook(Evas_Object *obj)
212static void 216static void
213_on_focus_hook(void *data, Evas_Object *obj) 217_on_focus_hook(void *data, Evas_Object *obj)
214{ 218{
219
215 Widget_Data *wd = elm_widget_data_get(obj); 220 Widget_Data *wd = elm_widget_data_get(obj);
216// if (elm_widget_focus_get(obj)) 221// if (elm_widget_focus_get(obj))
217// elm_widget_focus_steal(wd->entry); 222// elm_widget_focus_steal(wd->entry);
@@ -220,6 +225,7 @@ _on_focus_hook(void *data, Evas_Object *obj)
220static void 225static void
221_changed_size_hints(void *data, Evas *e, Evas_Object *obj, void *event_info) 226_changed_size_hints(void *data, Evas *e, Evas_Object *obj, void *event_info)
222{ 227{
228
223 Widget_Data *wd = elm_widget_data_get(data); 229 Widget_Data *wd = elm_widget_data_get(data);
224// _fix_items(data); 230// _fix_items(data);
225// _sizing_eval(data); 231// _sizing_eval(data);
@@ -228,6 +234,7 @@ _changed_size_hints(void *data, Evas *e, Evas_Object *obj, void *event_info)
228static void 234static void
229_sub_del(void *data, Evas_Object *obj, void *event_info) 235_sub_del(void *data, Evas_Object *obj, void *event_info)
230{ 236{
237
231 Widget_Data *wd = elm_widget_data_get(obj); 238 Widget_Data *wd = elm_widget_data_get(obj);
232 Evas_Object *sub = event_info; 239 Evas_Object *sub = event_info;
233 const Eina_List *l; 240 const Eina_List *l;
@@ -454,6 +461,7 @@ _mouse_up(void *data, Evas *evas, Evas_Object *obj, void *event_info)
454static Elm_List_Item * 461static Elm_List_Item *
455_item_new(Evas_Object *obj, const char *label, Evas_Object *icon, Evas_Object *end, void (*func) (void *data, Evas_Object *obj, void *event_info), const void *data) 462_item_new(Evas_Object *obj, const char *label, Evas_Object *icon, Evas_Object *end, void (*func) (void *data, Evas_Object *obj, void *event_info), const void *data)
456{ 463{
464
457 Widget_Data *wd = elm_widget_data_get(obj); 465 Widget_Data *wd = elm_widget_data_get(obj);
458 Elm_List_Item *it; 466 Elm_List_Item *it;
459 467
@@ -491,6 +499,7 @@ _item_new(Evas_Object *obj, const char *label, Evas_Object *icon, Evas_Object *e
491static void 499static void
492_fix_items(Evas_Object *obj) 500_fix_items(Evas_Object *obj)
493{ 501{
502
494 Widget_Data *wd = elm_widget_data_get(obj); 503 Widget_Data *wd = elm_widget_data_get(obj);
495 const Eina_List *l; 504 const Eina_List *l;
496 Elm_List_Item *it; 505 Elm_List_Item *it;
@@ -640,6 +649,7 @@ _fix_items(Evas_Object *obj)
640static void 649static void
641_hold_on(void *data, Evas_Object *obj, void *event_info) 650_hold_on(void *data, Evas_Object *obj, void *event_info)
642{ 651{
652
643 Widget_Data *wd = elm_widget_data_get(obj); 653 Widget_Data *wd = elm_widget_data_get(obj);
644 654
645 if (!wd) return; 655 if (!wd) return;
@@ -649,6 +659,7 @@ _hold_on(void *data, Evas_Object *obj, void *event_info)
649static void 659static void
650_hold_off(void *data, Evas_Object *obj, void *event_info) 660_hold_off(void *data, Evas_Object *obj, void *event_info)
651{ 661{
662
652 Widget_Data *wd = elm_widget_data_get(obj); 663 Widget_Data *wd = elm_widget_data_get(obj);
653 664
654 if (!wd) return; 665 if (!wd) return;
@@ -658,6 +669,7 @@ _hold_off(void *data, Evas_Object *obj, void *event_info)
658static void 669static void
659_freeze_on(void *data, Evas_Object *obj, void *event_info) 670_freeze_on(void *data, Evas_Object *obj, void *event_info)
660{ 671{
672
661 Widget_Data *wd = elm_widget_data_get(obj); 673 Widget_Data *wd = elm_widget_data_get(obj);
662 674
663 if (!wd) return; 675 if (!wd) return;
@@ -667,6 +679,7 @@ _freeze_on(void *data, Evas_Object *obj, void *event_info)
667static void 679static void
668_freeze_off(void *data, Evas_Object *obj, void *event_info) 680_freeze_off(void *data, Evas_Object *obj, void *event_info)
669{ 681{
682
670 Widget_Data *wd = elm_widget_data_get(obj); 683 Widget_Data *wd = elm_widget_data_get(obj);
671 684
672 if (!wd) return; 685 if (!wd) return;
@@ -683,6 +696,7 @@ elm_list_add(Evas_Object *parent)
683 wd = ELM_NEW(Widget_Data); 696 wd = ELM_NEW(Widget_Data);
684 e = evas_object_evas_get(parent); 697 e = evas_object_evas_get(parent);
685 wd->self = obj = elm_widget_add(e); 698 wd->self = obj = elm_widget_add(e);
699 ELM_SET_WIDTYPE(widtype, "list");
686 elm_widget_type_set(obj, "list"); 700 elm_widget_type_set(obj, "list");
687 elm_widget_sub_object_add(parent, obj); 701 elm_widget_sub_object_add(parent, obj);
688 elm_widget_on_focus_hook_set(obj, _on_focus_hook, NULL); 702 elm_widget_on_focus_hook_set(obj, _on_focus_hook, NULL);
@@ -718,6 +732,7 @@ elm_list_add(Evas_Object *parent)
718EAPI Elm_List_Item * 732EAPI Elm_List_Item *
719elm_list_item_append(Evas_Object *obj, const char *label, Evas_Object *icon, Evas_Object *end, void (*func) (void *data, Evas_Object *obj, void *event_info), const void *data) 733elm_list_item_append(Evas_Object *obj, const char *label, Evas_Object *icon, Evas_Object *end, void (*func) (void *data, Evas_Object *obj, void *event_info), const void *data)
720{ 734{
735 ELM_CHECK_WIDTYPE(obj, widtype);
721 Widget_Data *wd = elm_widget_data_get(obj); 736 Widget_Data *wd = elm_widget_data_get(obj);
722 Elm_List_Item *it = _item_new(obj, label, icon, end, func, data); 737 Elm_List_Item *it = _item_new(obj, label, icon, end, func, data);
723 738
@@ -730,6 +745,7 @@ elm_list_item_append(Evas_Object *obj, const char *label, Evas_Object *icon, Eva
730EAPI Elm_List_Item * 745EAPI Elm_List_Item *
731elm_list_item_prepend(Evas_Object *obj, const char *label, Evas_Object *icon, Evas_Object *end, void (*func) (void *data, Evas_Object *obj, void *event_info), const void *data) 746elm_list_item_prepend(Evas_Object *obj, const char *label, Evas_Object *icon, Evas_Object *end, void (*func) (void *data, Evas_Object *obj, void *event_info), const void *data)
732{ 747{
748 ELM_CHECK_WIDTYPE(obj, widtype);
733 Widget_Data *wd = elm_widget_data_get(obj); 749 Widget_Data *wd = elm_widget_data_get(obj);
734 Elm_List_Item *it = _item_new(obj, label, icon, end, func, data); 750 Elm_List_Item *it = _item_new(obj, label, icon, end, func, data);
735 751
@@ -748,6 +764,7 @@ elm_list_item_insert_before(Evas_Object *obj, Elm_List_Item *before, const char
748 if ((!before) || (!before->node)) return NULL; 764 if ((!before) || (!before->node)) return NULL;
749 ELM_LIST_ITEM_CHECK_DELETED_RETURN(before, NULL); 765 ELM_LIST_ITEM_CHECK_DELETED_RETURN(before, NULL);
750 766
767 ELM_CHECK_WIDTYPE(obj, widtype);
751 wd = elm_widget_data_get(obj); 768 wd = elm_widget_data_get(obj);
752 it = _item_new(obj, label, icon, end, func, data); 769 it = _item_new(obj, label, icon, end, func, data);
753 wd->items = eina_list_prepend_relative_list(wd->items, it, before->node); 770 wd->items = eina_list_prepend_relative_list(wd->items, it, before->node);
@@ -765,6 +782,7 @@ elm_list_item_insert_after(Evas_Object *obj, Elm_List_Item *after, const char *l
765 if ((!after) || (!after->node)) return NULL; 782 if ((!after) || (!after->node)) return NULL;
766 ELM_LIST_ITEM_CHECK_DELETED_RETURN(after, NULL); 783 ELM_LIST_ITEM_CHECK_DELETED_RETURN(after, NULL);
767 784
785 ELM_CHECK_WIDTYPE(obj, widtype);
768 wd = elm_widget_data_get(obj); 786 wd = elm_widget_data_get(obj);
769 it = _item_new(obj, label, icon, end, func, data); 787 it = _item_new(obj, label, icon, end, func, data);
770 wd->items = eina_list_append_relative_list(wd->items, it, after->node); 788 wd->items = eina_list_append_relative_list(wd->items, it, after->node);
@@ -776,6 +794,7 @@ elm_list_item_insert_after(Evas_Object *obj, Elm_List_Item *after, const char *l
776EAPI void 794EAPI void
777elm_list_clear(Evas_Object *obj) 795elm_list_clear(Evas_Object *obj)
778{ 796{
797 ELM_CHECK_WIDTYPE(obj, widtype);
779 Widget_Data *wd = elm_widget_data_get(obj); 798 Widget_Data *wd = elm_widget_data_get(obj);
780 Elm_List_Item *it; 799 Elm_List_Item *it;
781 800
@@ -816,6 +835,7 @@ elm_list_clear(Evas_Object *obj)
816EAPI void 835EAPI void
817elm_list_go(Evas_Object *obj) 836elm_list_go(Evas_Object *obj)
818{ 837{
838 ELM_CHECK_WIDTYPE(obj, widtype);
819 Widget_Data *wd = elm_widget_data_get(obj); 839 Widget_Data *wd = elm_widget_data_get(obj);
820 840
821 _fix_items(obj); 841 _fix_items(obj);
@@ -824,6 +844,7 @@ elm_list_go(Evas_Object *obj)
824EAPI void 844EAPI void
825elm_list_multi_select_set(Evas_Object *obj, Eina_Bool multi) 845elm_list_multi_select_set(Evas_Object *obj, Eina_Bool multi)
826{ 846{
847 ELM_CHECK_WIDTYPE(obj, widtype);
827 Widget_Data *wd = elm_widget_data_get(obj); 848 Widget_Data *wd = elm_widget_data_get(obj);
828 849
829 wd->multi = multi; 850 wd->multi = multi;
@@ -832,6 +853,7 @@ elm_list_multi_select_set(Evas_Object *obj, Eina_Bool multi)
832EAPI Eina_Bool 853EAPI Eina_Bool
833elm_list_multi_select_get(Evas_Object *obj) 854elm_list_multi_select_get(Evas_Object *obj)
834{ 855{
856 ELM_CHECK_WIDTYPE(obj, widtype);
835 Widget_Data *wd = elm_widget_data_get(obj); 857 Widget_Data *wd = elm_widget_data_get(obj);
836 858
837 return wd->multi; 859 return wd->multi;
@@ -840,6 +862,7 @@ elm_list_multi_select_get(Evas_Object *obj)
840EAPI void 862EAPI void
841elm_list_horizontal_mode_set(Evas_Object *obj, Elm_List_Mode mode) 863elm_list_horizontal_mode_set(Evas_Object *obj, Elm_List_Mode mode)
842{ 864{
865 ELM_CHECK_WIDTYPE(obj, widtype);
843 Widget_Data *wd = elm_widget_data_get(obj); 866 Widget_Data *wd = elm_widget_data_get(obj);
844 867
845 if (wd->mode == mode) return; 868 if (wd->mode == mode) return;
@@ -853,6 +876,7 @@ elm_list_horizontal_mode_set(Evas_Object *obj, Elm_List_Mode mode)
853EAPI Elm_List_Mode 876EAPI Elm_List_Mode
854elm_list_horizontal_mode_get(Evas_Object *obj) 877elm_list_horizontal_mode_get(Evas_Object *obj)
855{ 878{
879 ELM_CHECK_WIDTYPE(obj, widtype);
856 Widget_Data *wd = elm_widget_data_get(obj); 880 Widget_Data *wd = elm_widget_data_get(obj);
857 881
858 return wd->mode; 882 return wd->mode;
@@ -861,6 +885,7 @@ elm_list_horizontal_mode_get(Evas_Object *obj)
861EAPI void 885EAPI void
862elm_list_always_select_mode_set(Evas_Object *obj, Eina_Bool always_select) 886elm_list_always_select_mode_set(Evas_Object *obj, Eina_Bool always_select)
863{ 887{
888 ELM_CHECK_WIDTYPE(obj, widtype);
864 Widget_Data *wd = elm_widget_data_get(obj); 889 Widget_Data *wd = elm_widget_data_get(obj);
865 890
866 wd->always_select = always_select; 891 wd->always_select = always_select;
@@ -869,6 +894,7 @@ elm_list_always_select_mode_set(Evas_Object *obj, Eina_Bool always_select)
869EAPI const Eina_List * 894EAPI const Eina_List *
870elm_list_items_get(const Evas_Object *obj) 895elm_list_items_get(const Evas_Object *obj)
871{ 896{
897 ELM_CHECK_WIDTYPE(obj, widtype);
872 Widget_Data *wd = elm_widget_data_get(obj); 898 Widget_Data *wd = elm_widget_data_get(obj);
873 899
874 return wd->items; 900 return wd->items;
@@ -877,6 +903,7 @@ elm_list_items_get(const Evas_Object *obj)
877EAPI Elm_List_Item * 903EAPI Elm_List_Item *
878elm_list_selected_item_get(const Evas_Object *obj) 904elm_list_selected_item_get(const Evas_Object *obj)
879{ 905{
906 ELM_CHECK_WIDTYPE(obj, widtype);
880 Widget_Data *wd = elm_widget_data_get(obj); 907 Widget_Data *wd = elm_widget_data_get(obj);
881 908
882 if (wd->selected) return wd->selected->data; 909 if (wd->selected) return wd->selected->data;
@@ -886,6 +913,7 @@ elm_list_selected_item_get(const Evas_Object *obj)
886EAPI const Eina_List * 913EAPI const Eina_List *
887elm_list_selected_items_get(const Evas_Object *obj) 914elm_list_selected_items_get(const Evas_Object *obj)
888{ 915{
916 ELM_CHECK_WIDTYPE(obj, widtype);
889 Widget_Data *wd = elm_widget_data_get(obj); 917 Widget_Data *wd = elm_widget_data_get(obj);
890 918
891 return wd->selected; 919 return wd->selected;
@@ -1113,6 +1141,7 @@ elm_list_item_next(const Elm_List_Item *it)
1113EAPI void 1141EAPI void
1114elm_list_bounce_set(Evas_Object *obj, Eina_Bool h_bounce, Eina_Bool v_bounce) 1142elm_list_bounce_set(Evas_Object *obj, Eina_Bool h_bounce, Eina_Bool v_bounce)
1115{ 1143{
1144 ELM_CHECK_WIDTYPE(obj, widtype);
1116 Widget_Data *wd = elm_widget_data_get(obj); 1145 Widget_Data *wd = elm_widget_data_get(obj);
1117 elm_smart_scroller_bounce_allow_set(wd->scr, h_bounce, v_bounce); 1146 elm_smart_scroller_bounce_allow_set(wd->scr, h_bounce, v_bounce);
1118} 1147}
@@ -1135,6 +1164,7 @@ elm_list_bounce_set(Evas_Object *obj, Eina_Bool h_bounce, Eina_Bool v_bounce)
1135EAPI void 1164EAPI void
1136elm_list_scroller_policy_set(Evas_Object *obj, Elm_Scroller_Policy policy_h, Elm_Scroller_Policy policy_v) 1165elm_list_scroller_policy_set(Evas_Object *obj, Elm_Scroller_Policy policy_h, Elm_Scroller_Policy policy_v)
1137{ 1166{
1167 ELM_CHECK_WIDTYPE(obj, widtype);
1138 Widget_Data *wd = elm_widget_data_get(obj); 1168 Widget_Data *wd = elm_widget_data_get(obj);
1139 elm_scroller_policy_set(wd->scr, policy_h, policy_v); 1169 elm_scroller_policy_set(wd->scr, policy_h, policy_v);
1140} 1170}
diff --git a/src/lib/elm_main.c b/src/lib/elm_main.c
index 28b2e8345..d0731fae0 100644
--- a/src/lib/elm_main.c
+++ b/src/lib/elm_main.c
@@ -263,6 +263,7 @@ static int _elm_signal_exit(void *data, int ev_type, void *ev);
263#ifdef HAVE_ELEMENTARY_X 263#ifdef HAVE_ELEMENTARY_X
264static int _elm_window_property_change(void *data, int ev_type, void *ev); 264static int _elm_window_property_change(void *data, int ev_type, void *ev);
265#endif 265#endif
266static const char *widtype = NULL;
266static void _elm_rescale(void); 267static void _elm_rescale(void);
267 268
268char *_elm_appname = NULL; 269char *_elm_appname = NULL;
diff --git a/src/lib/elm_map.c b/src/lib/elm_map.c
index 2f333af5f..89d4db74e 100644
--- a/src/lib/elm_map.c
+++ b/src/lib/elm_map.c
@@ -268,6 +268,7 @@ struct _Pan
268}; 268};
269 269
270 270
271static const char *widtype = NULL;
271static void _pan_calculate(Evas_Object *obj); 272static void _pan_calculate(Evas_Object *obj);
272 273
273static void _del_hook(Evas_Object *obj); 274static void _del_hook(Evas_Object *obj);
@@ -296,6 +297,7 @@ static void _bubble_sc_hits_changed_cb(void *data, Evas *e, Evas_Object *obj, vo
296static void 297static void
297rect_place(Evas_Object *obj, Evas_Coord px, Evas_Coord py, Evas_Coord ox, Evas_Coord oy, Evas_Coord ow, Evas_Coord oh) 298rect_place(Evas_Object *obj, Evas_Coord px, Evas_Coord py, Evas_Coord ox, Evas_Coord oy, Evas_Coord ow, Evas_Coord oh)
298{ 299{
300
299 Widget_Data *wd = elm_widget_data_get(obj); 301 Widget_Data *wd = elm_widget_data_get(obj);
300 Evas_Coord ax, ay, gw, gh, hh, ww; 302 Evas_Coord ax, ay, gw, gh, hh, ww;
301 303
@@ -325,6 +327,7 @@ rect_place(Evas_Object *obj, Evas_Coord px, Evas_Coord py, Evas_Coord ox, Evas_C
325static void 327static void
326marker_place(Evas_Object *obj, Grid *g, Evas_Coord px, Evas_Coord py, Evas_Coord ox, Evas_Coord oy, Evas_Coord ow, Evas_Coord oh) 328marker_place(Evas_Object *obj, Grid *g, Evas_Coord px, Evas_Coord py, Evas_Coord ox, Evas_Coord oy, Evas_Coord ow, Evas_Coord oh)
327{ 329{
330
328 Widget_Data *wd = elm_widget_data_get(obj); 331 Widget_Data *wd = elm_widget_data_get(obj);
329 Evas_Coord ax, ay, gw, gh, tx, ty; 332 Evas_Coord ax, ay, gw, gh, tx, ty;
330 Eina_List *l, *markers; 333 Eina_List *l, *markers;
@@ -488,6 +491,7 @@ marker_place(Evas_Object *obj, Grid *g, Evas_Coord px, Evas_Coord py, Evas_Coord
488static void 491static void
489grid_place(Evas_Object *obj, Grid *g, Evas_Coord px, Evas_Coord py, Evas_Coord ox, Evas_Coord oy, Evas_Coord ow, Evas_Coord oh) 492grid_place(Evas_Object *obj, Grid *g, Evas_Coord px, Evas_Coord py, Evas_Coord ox, Evas_Coord oy, Evas_Coord ow, Evas_Coord oh)
490{ 493{
494
491 Widget_Data *wd = elm_widget_data_get(obj); 495 Widget_Data *wd = elm_widget_data_get(obj);
492 Evas_Coord ax, ay, gw, gh, tx, ty; 496 Evas_Coord ax, ay, gw, gh, tx, ty;
493 int xx, yy, ww, hh; 497 int xx, yy, ww, hh;
@@ -541,6 +545,7 @@ grid_place(Evas_Object *obj, Grid *g, Evas_Coord px, Evas_Coord py, Evas_Coord o
541static void 545static void
542grid_clear(Evas_Object *obj, Grid *g) 546grid_clear(Evas_Object *obj, Grid *g)
543{ 547{
548
544 Widget_Data *wd = elm_widget_data_get(obj); 549 Widget_Data *wd = elm_widget_data_get(obj);
545 char buf[PATH_MAX]; 550 char buf[PATH_MAX];
546 551
@@ -636,6 +641,7 @@ _tile_downloaded(void *data, const char *file, int status)
636 static Grid * 641 static Grid *
637grid_create(Evas_Object *obj) 642grid_create(Evas_Object *obj)
638{ 643{
644
639 Widget_Data *wd = elm_widget_data_get(obj); 645 Widget_Data *wd = elm_widget_data_get(obj);
640 Grid *g; 646 Grid *g;
641 647
@@ -663,6 +669,7 @@ grid_create(Evas_Object *obj)
663static void 669static void
664grid_load(Evas_Object *obj, Grid *g) 670grid_load(Evas_Object *obj, Grid *g)
665{ 671{
672
666 Widget_Data *wd = elm_widget_data_get(obj); 673 Widget_Data *wd = elm_widget_data_get(obj);
667 int x, y; 674 int x, y;
668 int size; 675 int size;
@@ -860,6 +867,7 @@ grid_load(Evas_Object *obj, Grid *g)
860static void 867static void
861grid_clearall(Evas_Object *obj) 868grid_clearall(Evas_Object *obj)
862{ 869{
870
863 Widget_Data *wd = elm_widget_data_get(obj); 871 Widget_Data *wd = elm_widget_data_get(obj);
864 Grid *g; 872 Grid *g;
865 873
@@ -873,6 +881,7 @@ grid_clearall(Evas_Object *obj)
873static void 881static void
874_smooth_update(Evas_Object *obj) 882_smooth_update(Evas_Object *obj)
875{ 883{
884
876 Widget_Data *wd = elm_widget_data_get(obj); 885 Widget_Data *wd = elm_widget_data_get(obj);
877 Eina_List *l; 886 Eina_List *l;
878 Grid *g; 887 Grid *g;
@@ -912,6 +921,7 @@ _grid_raise(Grid *g)
912static int 921static int
913_scr_timeout(void *data) 922_scr_timeout(void *data)
914{ 923{
924
915 Widget_Data *wd = elm_widget_data_get(data); 925 Widget_Data *wd = elm_widget_data_get(data);
916 wd->nosmooth--; 926 wd->nosmooth--;
917 if (wd->nosmooth == 0) _smooth_update(data); 927 if (wd->nosmooth == 0) _smooth_update(data);
@@ -922,6 +932,7 @@ _scr_timeout(void *data)
922static void 932static void
923_scr(void *data, Evas_Object *obj, void *event_info) 933_scr(void *data, Evas_Object *obj, void *event_info)
924{ 934{
935
925 Widget_Data *wd = elm_widget_data_get(data); 936 Widget_Data *wd = elm_widget_data_get(data);
926 if (!wd->scr_timer) 937 if (!wd->scr_timer)
927 { 938 {
@@ -935,6 +946,7 @@ _scr(void *data, Evas_Object *obj, void *event_info)
935static int 946static int
936zoom_do(Evas_Object *obj, double t) 947zoom_do(Evas_Object *obj, double t)
937{ 948{
949
938 Widget_Data *wd = elm_widget_data_get(obj); 950 Widget_Data *wd = elm_widget_data_get(obj);
939 Evas_Coord xx, yy, ow, oh; 951 Evas_Coord xx, yy, ow, oh;
940 952
@@ -981,6 +993,7 @@ static int
981_zoom_anim(void *data) 993_zoom_anim(void *data)
982{ 994{
983 Evas_Object *obj = data; 995 Evas_Object *obj = data;
996
984 Widget_Data *wd = elm_widget_data_get(obj); 997 Widget_Data *wd = elm_widget_data_get(obj);
985 double t; 998 double t;
986 int go; 999 int go;
@@ -1008,6 +1021,7 @@ _zoom_anim(void *data)
1008static int 1021static int
1009_long_press(void *data) 1022_long_press(void *data)
1010{ 1023{
1024
1011 Widget_Data *wd = elm_widget_data_get(data); 1025 Widget_Data *wd = elm_widget_data_get(data);
1012 wd->long_timer = NULL; 1026 wd->long_timer = NULL;
1013 wd->longpressed = EINA_TRUE; 1027 wd->longpressed = EINA_TRUE;
@@ -1018,6 +1032,7 @@ _long_press(void *data)
1018static void 1032static void
1019_mouse_down(void *data, Evas *evas, Evas_Object *obj, void *event_info) 1033_mouse_down(void *data, Evas *evas, Evas_Object *obj, void *event_info)
1020{ 1034{
1035
1021 Widget_Data *wd = elm_widget_data_get(data); 1036 Widget_Data *wd = elm_widget_data_get(data);
1022 Evas_Event_Mouse_Down *ev = event_info; 1037 Evas_Event_Mouse_Down *ev = event_info;
1023 if (ev->button != 1) return; 1038 if (ev->button != 1) return;
@@ -1035,6 +1050,7 @@ _mouse_down(void *data, Evas *evas, Evas_Object *obj, void *event_info)
1035static void 1050static void
1036_mouse_up(void *data, Evas *evas, Evas_Object *obj, void *event_info) 1051_mouse_up(void *data, Evas *evas, Evas_Object *obj, void *event_info)
1037{ 1052{
1053
1038 Widget_Data *wd = elm_widget_data_get(data); 1054 Widget_Data *wd = elm_widget_data_get(data);
1039 Evas_Event_Mouse_Up *ev = event_info; 1055 Evas_Event_Mouse_Up *ev = event_info;
1040 if (ev->button != 1) return; 1056 if (ev->button != 1) return;
@@ -1058,6 +1074,7 @@ _del_hook(Evas_Object *obj)
1058 Elm_Map_Group_Class *group_clas; 1074 Elm_Map_Group_Class *group_clas;
1059 Elm_Map_Marker_Class *marker_clas; 1075 Elm_Map_Marker_Class *marker_clas;
1060 1076
1077
1061 Widget_Data *wd = elm_widget_data_get(obj); 1078 Widget_Data *wd = elm_widget_data_get(obj);
1062 1079
1063 EINA_LIST_FREE(wd->groups_clas, group_clas) 1080 EINA_LIST_FREE(wd->groups_clas, group_clas)
@@ -1092,6 +1109,7 @@ _del_pre_hook(Evas_Object *obj)
1092 Eina_Bool free_marker = EINA_TRUE; 1109 Eina_Bool free_marker = EINA_TRUE;
1093 Eina_List *l; 1110 Eina_List *l;
1094 1111
1112
1095 Widget_Data *wd = elm_widget_data_get(obj); 1113 Widget_Data *wd = elm_widget_data_get(obj);
1096 grid_clearall(obj); 1114 grid_clearall(obj);
1097 1115
@@ -1130,6 +1148,7 @@ _del_pre_hook(Evas_Object *obj)
1130static void 1148static void
1131_theme_hook(Evas_Object *obj) 1149_theme_hook(Evas_Object *obj)
1132{ 1150{
1151
1133 Widget_Data *wd = elm_widget_data_get(obj); 1152 Widget_Data *wd = elm_widget_data_get(obj);
1134 elm_smart_scroller_theme_set(wd->scr, "map", "base", elm_widget_style_get(obj)); 1153 elm_smart_scroller_theme_set(wd->scr, "map", "base", elm_widget_style_get(obj));
1135 edje_object_scale_set(wd->scr, elm_widget_scale_get(obj) * _elm_config->scale); 1154 edje_object_scale_set(wd->scr, elm_widget_scale_get(obj) * _elm_config->scale);
@@ -1139,6 +1158,7 @@ _theme_hook(Evas_Object *obj)
1139static void 1158static void
1140_sizing_eval(Evas_Object *obj) 1159_sizing_eval(Evas_Object *obj)
1141{ 1160{
1161
1142 Widget_Data *wd = elm_widget_data_get(obj); 1162 Widget_Data *wd = elm_widget_data_get(obj);
1143 Evas_Coord minw = -1, minh = -1, maxw = -1, maxh = -1; 1163 Evas_Coord minw = -1, minh = -1, maxw = -1, maxh = -1;
1144 1164
@@ -1282,6 +1302,7 @@ _pan_move(Evas_Object *obj, Evas_Coord x, Evas_Coord y)
1282static void 1302static void
1283_hold_on(void *data, Evas_Object *obj, void *event_info) 1303_hold_on(void *data, Evas_Object *obj, void *event_info)
1284{ 1304{
1305
1285 Widget_Data *wd = elm_widget_data_get(obj); 1306 Widget_Data *wd = elm_widget_data_get(obj);
1286 if (!wd) return; 1307 if (!wd) return;
1287 elm_smart_scroller_hold_set(wd->scr, 1); 1308 elm_smart_scroller_hold_set(wd->scr, 1);
@@ -1290,6 +1311,7 @@ _hold_on(void *data, Evas_Object *obj, void *event_info)
1290static void 1311static void
1291_hold_off(void *data, Evas_Object *obj, void *event_info) 1312_hold_off(void *data, Evas_Object *obj, void *event_info)
1292{ 1313{
1314
1293 Widget_Data *wd = elm_widget_data_get(obj); 1315 Widget_Data *wd = elm_widget_data_get(obj);
1294 if (!wd) return; 1316 if (!wd) return;
1295 elm_smart_scroller_hold_set(wd->scr, 0); 1317 elm_smart_scroller_hold_set(wd->scr, 0);
@@ -1298,6 +1320,7 @@ _hold_off(void *data, Evas_Object *obj, void *event_info)
1298static void 1320static void
1299_freeze_on(void *data, Evas_Object *obj, void *event_info) 1321_freeze_on(void *data, Evas_Object *obj, void *event_info)
1300{ 1322{
1323
1301 Widget_Data *wd = elm_widget_data_get(obj); 1324 Widget_Data *wd = elm_widget_data_get(obj);
1302 if (!wd) return; 1325 if (!wd) return;
1303 elm_smart_scroller_freeze_set(wd->scr, 1); 1326 elm_smart_scroller_freeze_set(wd->scr, 1);
@@ -1306,6 +1329,7 @@ _freeze_on(void *data, Evas_Object *obj, void *event_info)
1306static void 1329static void
1307_freeze_off(void *data, Evas_Object *obj, void *event_info) 1330_freeze_off(void *data, Evas_Object *obj, void *event_info)
1308{ 1331{
1332
1309 Widget_Data *wd = elm_widget_data_get(obj); 1333 Widget_Data *wd = elm_widget_data_get(obj);
1310 if (!wd) return; 1334 if (!wd) return;
1311 elm_smart_scroller_freeze_set(wd->scr, 0); 1335 elm_smart_scroller_freeze_set(wd->scr, 0);
@@ -1326,6 +1350,7 @@ _scr_anim_stop(void *data, Evas_Object *obj, void *event_info)
1326static void 1350static void
1327_scr_drag_start(void *data, Evas_Object *obj, void *event_info) 1351_scr_drag_start(void *data, Evas_Object *obj, void *event_info)
1328{ 1352{
1353
1329 Widget_Data *wd = elm_widget_data_get(data); 1354 Widget_Data *wd = elm_widget_data_get(data);
1330 wd->center_on.enabled = EINA_FALSE; 1355 wd->center_on.enabled = EINA_FALSE;
1331 evas_object_smart_callback_call(data, "scroll,drag,start", NULL); 1356 evas_object_smart_callback_call(data, "scroll,drag,start", NULL);
@@ -1656,6 +1681,7 @@ elm_map_add(Evas_Object *parent)
1656 wd = ELM_NEW(Widget_Data); 1681 wd = ELM_NEW(Widget_Data);
1657 e = evas_object_evas_get(parent); 1682 e = evas_object_evas_get(parent);
1658 obj = elm_widget_add(e); 1683 obj = elm_widget_add(e);
1684 ELM_SET_WIDTYPE(widtype, "map");
1659 elm_widget_type_set(obj, "map"); 1685 elm_widget_type_set(obj, "map");
1660 elm_widget_sub_object_add(parent, obj); 1686 elm_widget_sub_object_add(parent, obj);
1661 elm_widget_data_set(obj, wd); 1687 elm_widget_data_set(obj, wd);
@@ -1757,6 +1783,7 @@ elm_map_add(Evas_Object *parent)
1757EAPI void 1783EAPI void
1758elm_map_zoom_set(Evas_Object *obj, int zoom) 1784elm_map_zoom_set(Evas_Object *obj, int zoom)
1759{ 1785{
1786 ELM_CHECK_WIDTYPE(obj, widtype);
1760 Widget_Data *wd = elm_widget_data_get(obj); 1787 Widget_Data *wd = elm_widget_data_get(obj);
1761 Eina_List *l; 1788 Eina_List *l;
1762 Grid *g, *g_zoom = NULL; 1789 Grid *g, *g_zoom = NULL;
@@ -1947,6 +1974,7 @@ done:
1947EAPI double 1974EAPI double
1948elm_map_zoom_get(Evas_Object *obj) 1975elm_map_zoom_get(Evas_Object *obj)
1949{ 1976{
1977 ELM_CHECK_WIDTYPE(obj, widtype);
1950 Widget_Data *wd = elm_widget_data_get(obj); 1978 Widget_Data *wd = elm_widget_data_get(obj);
1951 return wd->zoom; 1979 return wd->zoom;
1952} 1980}
@@ -1972,6 +2000,7 @@ elm_map_zoom_get(Evas_Object *obj)
1972EAPI void 2000EAPI void
1973elm_map_zoom_mode_set(Evas_Object *obj, Elm_Map_Zoom_Mode mode) 2001elm_map_zoom_mode_set(Evas_Object *obj, Elm_Map_Zoom_Mode mode)
1974{ 2002{
2003 ELM_CHECK_WIDTYPE(obj, widtype);
1975 Widget_Data *wd = elm_widget_data_get(obj); 2004 Widget_Data *wd = elm_widget_data_get(obj);
1976 if (wd->mode == mode) return; 2005 if (wd->mode == mode) return;
1977 wd->mode = mode; 2006 wd->mode = mode;
@@ -1995,6 +2024,7 @@ elm_map_zoom_mode_set(Evas_Object *obj, Elm_Map_Zoom_Mode mode)
1995EAPI Elm_Map_Zoom_Mode 2024EAPI Elm_Map_Zoom_Mode
1996elm_map_zoom_mode_get(Evas_Object *obj) 2025elm_map_zoom_mode_get(Evas_Object *obj)
1997{ 2026{
2027 ELM_CHECK_WIDTYPE(obj, widtype);
1998 Widget_Data *wd = elm_widget_data_get(obj); 2028 Widget_Data *wd = elm_widget_data_get(obj);
1999 return wd->mode; 2029 return wd->mode;
2000} 2030}
@@ -2002,6 +2032,7 @@ elm_map_zoom_mode_get(Evas_Object *obj)
2002EAPI void 2032EAPI void
2003elm_map_geo_region_bring_in(Evas_Object *obj, double lon, double lat) 2033elm_map_geo_region_bring_in(Evas_Object *obj, double lon, double lat)
2004{ 2034{
2035 ELM_CHECK_WIDTYPE(obj, widtype);
2005 Widget_Data *wd = elm_widget_data_get(obj); 2036 Widget_Data *wd = elm_widget_data_get(obj);
2006 int rx, ry, rw, rh; 2037 int rx, ry, rw, rh;
2007 2038
@@ -2041,6 +2072,7 @@ elm_map_geo_region_bring_in(Evas_Object *obj, double lon, double lat)
2041EAPI void 2072EAPI void
2042elm_map_geo_region_show(Evas_Object *obj, double lon, double lat) 2073elm_map_geo_region_show(Evas_Object *obj, double lon, double lat)
2043{ 2074{
2075 ELM_CHECK_WIDTYPE(obj, widtype);
2044 Widget_Data *wd = elm_widget_data_get(obj); 2076 Widget_Data *wd = elm_widget_data_get(obj);
2045 int rx, ry, rw, rh; 2077 int rx, ry, rw, rh;
2046 2078
@@ -2079,6 +2111,7 @@ elm_map_geo_region_show(Evas_Object *obj, double lon, double lat)
2079EAPI void 2111EAPI void
2080elm_map_geo_region_get(Evas_Object *obj, double *lon, double *lat) 2112elm_map_geo_region_get(Evas_Object *obj, double *lon, double *lat)
2081{ 2113{
2114 ELM_CHECK_WIDTYPE(obj, widtype);
2082 Widget_Data *wd = elm_widget_data_get(obj); 2115 Widget_Data *wd = elm_widget_data_get(obj);
2083 Evas_Coord sx, sy, sw, sh; 2116 Evas_Coord sx, sy, sw, sh;
2084 2117
@@ -2103,6 +2136,7 @@ elm_map_geo_region_get(Evas_Object *obj, double *lon, double *lat)
2103EAPI void 2136EAPI void
2104elm_map_paused_set(Evas_Object *obj, Eina_Bool paused) 2137elm_map_paused_set(Evas_Object *obj, Eina_Bool paused)
2105{ 2138{
2139 ELM_CHECK_WIDTYPE(obj, widtype);
2106 Widget_Data *wd = elm_widget_data_get(obj); 2140 Widget_Data *wd = elm_widget_data_get(obj);
2107 if (wd->paused == !!paused) return; 2141 if (wd->paused == !!paused) return;
2108 wd->paused = paused; 2142 wd->paused = paused;
@@ -2131,6 +2165,7 @@ elm_map_paused_set(Evas_Object *obj, Eina_Bool paused)
2131EAPI void 2165EAPI void
2132elm_map_paused_markers_set(Evas_Object *obj, Eina_Bool paused) 2166elm_map_paused_markers_set(Evas_Object *obj, Eina_Bool paused)
2133{ 2167{
2168 ELM_CHECK_WIDTYPE(obj, widtype);
2134 Widget_Data *wd = elm_widget_data_get(obj); 2169 Widget_Data *wd = elm_widget_data_get(obj);
2135 if (wd->paused_markers == !!paused) return; 2170 if (wd->paused_markers == !!paused) return;
2136 wd->paused_markers = paused; 2171 wd->paused_markers = paused;
@@ -2147,6 +2182,7 @@ elm_map_paused_markers_set(Evas_Object *obj, Eina_Bool paused)
2147EAPI Eina_Bool 2182EAPI Eina_Bool
2148elm_map_paused_get(Evas_Object *obj) 2183elm_map_paused_get(Evas_Object *obj)
2149{ 2184{
2185 ELM_CHECK_WIDTYPE(obj, widtype);
2150 Widget_Data *wd = elm_widget_data_get(obj); 2186 Widget_Data *wd = elm_widget_data_get(obj);
2151 return wd->paused; 2187 return wd->paused;
2152} 2188}
@@ -2162,6 +2198,7 @@ elm_map_paused_get(Evas_Object *obj)
2162EAPI Eina_Bool 2198EAPI Eina_Bool
2163elm_map_paused_markers_get(Evas_Object *obj) 2199elm_map_paused_markers_get(Evas_Object *obj)
2164{ 2200{
2201 ELM_CHECK_WIDTYPE(obj, widtype);
2165 Widget_Data *wd = elm_widget_data_get(obj); 2202 Widget_Data *wd = elm_widget_data_get(obj);
2166 return wd->paused_markers; 2203 return wd->paused_markers;
2167} 2204}
@@ -2232,6 +2269,7 @@ elm_map_marker_add(Evas_Object *obj, double lon, double lat, Elm_Map_Marker_Clas
2232 int i, j; 2269 int i, j;
2233 Eina_List *l; 2270 Eina_List *l;
2234 Marker_Group *group; 2271 Marker_Group *group;
2272 ELM_CHECK_WIDTYPE(obj, widtype);
2235 Widget_Data *wd = elm_widget_data_get(obj); 2273 Widget_Data *wd = elm_widget_data_get(obj);
2236 int mpi, mpj; 2274 int mpi, mpj;
2237 int tabi[9]; 2275 int tabi[9];
@@ -2560,6 +2598,7 @@ elm_map_markers_list_show(Eina_List *markers)
2560EAPI void 2598EAPI void
2561elm_map_max_marker_per_group_set(Evas_Object *obj, int max) 2599elm_map_max_marker_per_group_set(Evas_Object *obj, int max)
2562{ 2600{
2601 ELM_CHECK_WIDTYPE(obj, widtype);
2563 Widget_Data *wd = elm_widget_data_get(obj); 2602 Widget_Data *wd = elm_widget_data_get(obj);
2564 wd->markers_max_num = max; 2603 wd->markers_max_num = max;
2565} 2604}
@@ -2605,6 +2644,7 @@ elm_map_marker_update(Elm_Map_Marker *marker)
2605EAPI void 2644EAPI void
2606elm_map_bubbles_close(Evas_Object *obj) 2645elm_map_bubbles_close(Evas_Object *obj)
2607{ 2646{
2647 ELM_CHECK_WIDTYPE(obj, widtype);
2608 Widget_Data *wd = elm_widget_data_get(obj); 2648 Widget_Data *wd = elm_widget_data_get(obj);
2609 Marker_Group *group; 2649 Marker_Group *group;
2610 Eina_List *l, *l_next; 2650 Eina_List *l, *l_next;
@@ -2629,6 +2669,7 @@ elm_map_bubbles_close(Evas_Object *obj)
2629EAPI Elm_Map_Group_Class * 2669EAPI Elm_Map_Group_Class *
2630elm_map_group_class_new(Evas_Object *obj) 2670elm_map_group_class_new(Evas_Object *obj)
2631{ 2671{
2672 ELM_CHECK_WIDTYPE(obj, widtype);
2632 Widget_Data *wd = elm_widget_data_get(obj); 2673 Widget_Data *wd = elm_widget_data_get(obj);
2633 Elm_Map_Group_Class *clas = calloc(1, sizeof(Elm_Map_Group_Class)); 2674 Elm_Map_Group_Class *clas = calloc(1, sizeof(Elm_Map_Group_Class));
2634 2675
@@ -2720,6 +2761,7 @@ elm_map_group_class_zoom_grouped_set(Elm_Map_Group_Class *clas, int zoom)
2720EAPI void 2761EAPI void
2721elm_map_group_class_hide_set(Evas_Object *obj, Elm_Map_Group_Class *clas, Eina_Bool hide) 2762elm_map_group_class_hide_set(Evas_Object *obj, Elm_Map_Group_Class *clas, Eina_Bool hide)
2722{ 2763{
2764 ELM_CHECK_WIDTYPE(obj, widtype);
2723 Widget_Data *wd = elm_widget_data_get(obj); 2765 Widget_Data *wd = elm_widget_data_get(obj);
2724 2766
2725 if(clas->hide == hide) return ; 2767 if(clas->hide == hide) return ;
@@ -2747,6 +2789,7 @@ elm_map_group_class_hide_set(Evas_Object *obj, Elm_Map_Group_Class *clas, Eina_B
2747EAPI Elm_Map_Marker_Class * 2789EAPI Elm_Map_Marker_Class *
2748elm_map_marker_class_new(Evas_Object *obj) 2790elm_map_marker_class_new(Evas_Object *obj)
2749{ 2791{
2792 ELM_CHECK_WIDTYPE(obj, widtype);
2750 Widget_Data *wd = elm_widget_data_get(obj); 2793 Widget_Data *wd = elm_widget_data_get(obj);
2751 Elm_Map_Marker_Class *clas = calloc(1, sizeof(Elm_Map_Marker_Class)); 2794 Elm_Map_Marker_Class *clas = calloc(1, sizeof(Elm_Map_Marker_Class));
2752 2795
@@ -2832,6 +2875,7 @@ elm_map_marker_class_del_cb_set(Elm_Map_Marker_Class *clas, ElmMapMarkerDelFunc
2832EAPI void 2875EAPI void
2833elm_map_source_set(Evas_Object *obj, Elm_Map_Sources source) 2876elm_map_source_set(Evas_Object *obj, Elm_Map_Sources source)
2834{ 2877{
2878 ELM_CHECK_WIDTYPE(obj, widtype);
2835 Widget_Data *wd = elm_widget_data_get(obj); 2879 Widget_Data *wd = elm_widget_data_get(obj);
2836 Grid *grid; 2880 Grid *grid;
2837 int zoom; 2881 int zoom;
@@ -2864,6 +2908,7 @@ elm_map_source_set(Evas_Object *obj, Elm_Map_Sources source)
2864EAPI Elm_Map_Sources 2908EAPI Elm_Map_Sources
2865elm_map_source_get(Evas_Object *obj) 2909elm_map_source_get(Evas_Object *obj)
2866{ 2910{
2911 ELM_CHECK_WIDTYPE(obj, widtype);
2867 Widget_Data *wd = elm_widget_data_get(obj); 2912 Widget_Data *wd = elm_widget_data_get(obj);
2868 return wd->source; 2913 return wd->source;
2869} 2914}
diff --git a/src/lib/elm_mapbuf.c b/src/lib/elm_mapbuf.c
index 5f1199d20..b9ae82e62 100644
--- a/src/lib/elm_mapbuf.c
+++ b/src/lib/elm_mapbuf.c
@@ -19,6 +19,7 @@ struct _Widget_Data
19 Eina_Bool smooth : 1; 19 Eina_Bool smooth : 1;
20}; 20};
21 21
22static const char *widtype = NULL;
22static void _del_hook(Evas_Object *obj); 23static void _del_hook(Evas_Object *obj);
23static void _theme_hook(Evas_Object *obj); 24static void _theme_hook(Evas_Object *obj);
24static void _sizing_eval(Evas_Object *obj); 25static void _sizing_eval(Evas_Object *obj);
@@ -28,6 +29,7 @@ static void _sub_del(void *data, Evas_Object *obj, void *event_info);
28static void 29static void
29_del_hook(Evas_Object *obj) 30_del_hook(Evas_Object *obj)
30{ 31{
32
31 Widget_Data *wd = elm_widget_data_get(obj); 33 Widget_Data *wd = elm_widget_data_get(obj);
32 free(wd); 34 free(wd);
33} 35}
@@ -35,6 +37,7 @@ _del_hook(Evas_Object *obj)
35static void 37static void
36_theme_hook(Evas_Object *obj) 38_theme_hook(Evas_Object *obj)
37{ 39{
40
38 Widget_Data *wd = elm_widget_data_get(obj); 41 Widget_Data *wd = elm_widget_data_get(obj);
39 _sizing_eval(obj); 42 _sizing_eval(obj);
40} 43}
@@ -42,6 +45,7 @@ _theme_hook(Evas_Object *obj)
42static void 45static void
43_sizing_eval(Evas_Object *obj) 46_sizing_eval(Evas_Object *obj)
44{ 47{
48
45 Widget_Data *wd = elm_widget_data_get(obj); 49 Widget_Data *wd = elm_widget_data_get(obj);
46 Evas_Coord minw = -1, minh = -1, minw2 = -1, minh2 = -1; 50 Evas_Coord minw = -1, minh = -1, minw2 = -1, minh2 = -1;
47 Evas_Coord maxw = -1, maxh = -1, maxw2 = -1, maxh2 = -1; 51 Evas_Coord maxw = -1, maxh = -1, maxw2 = -1, maxh2 = -1;
@@ -59,6 +63,7 @@ _sizing_eval(Evas_Object *obj)
59static void 63static void
60_changed_size_hints(void *data, Evas *e, Evas_Object *obj, void *event_info) 64_changed_size_hints(void *data, Evas *e, Evas_Object *obj, void *event_info)
61{ 65{
66
62 Widget_Data *wd = elm_widget_data_get(data); 67 Widget_Data *wd = elm_widget_data_get(data);
63 _sizing_eval(data); 68 _sizing_eval(data);
64} 69}
@@ -66,6 +71,7 @@ _changed_size_hints(void *data, Evas *e, Evas_Object *obj, void *event_info)
66static void 71static void
67_sub_del(void *data, Evas_Object *obj, void *event_info) 72_sub_del(void *data, Evas_Object *obj, void *event_info)
68{ 73{
74
69 Widget_Data *wd = elm_widget_data_get(obj); 75 Widget_Data *wd = elm_widget_data_get(obj);
70 Evas_Object *sub = event_info; 76 Evas_Object *sub = event_info;
71 77
@@ -81,6 +87,7 @@ _sub_del(void *data, Evas_Object *obj, void *event_info)
81static void 87static void
82_mapbuf(Evas_Object *obj) 88_mapbuf(Evas_Object *obj)
83{ 89{
90
84 Widget_Data *wd = elm_widget_data_get(obj); 91 Widget_Data *wd = elm_widget_data_get(obj);
85 Evas_Coord x, y, w, h; 92 Evas_Coord x, y, w, h;
86 93
@@ -110,6 +117,7 @@ _mapbuf(Evas_Object *obj)
110static void 117static void
111_configure(Evas_Object *obj) 118_configure(Evas_Object *obj)
112{ 119{
120
113 Widget_Data *wd = elm_widget_data_get(obj); 121 Widget_Data *wd = elm_widget_data_get(obj);
114 if (wd->content) 122 if (wd->content)
115 { 123 {
@@ -152,6 +160,7 @@ elm_mapbuf_add(Evas_Object *parent)
152 wd = ELM_NEW(Widget_Data); 160 wd = ELM_NEW(Widget_Data);
153 e = evas_object_evas_get(parent); 161 e = evas_object_evas_get(parent);
154 obj = elm_widget_add(e); 162 obj = elm_widget_add(e);
163 ELM_SET_WIDTYPE(widtype, "mapbuf");
155 elm_widget_type_set(obj, "mapbuf"); 164 elm_widget_type_set(obj, "mapbuf");
156 elm_widget_sub_object_add(parent, obj); 165 elm_widget_sub_object_add(parent, obj);
157 elm_widget_data_set(obj, wd); 166 elm_widget_data_set(obj, wd);
@@ -181,6 +190,7 @@ elm_mapbuf_add(Evas_Object *parent)
181EAPI void 190EAPI void
182elm_mapbuf_content_set(Evas_Object *obj, Evas_Object *content) 191elm_mapbuf_content_set(Evas_Object *obj, Evas_Object *content)
183{ 192{
193 ELM_CHECK_WIDTYPE(obj, widtype);
184 Widget_Data *wd = elm_widget_data_get(obj); 194 Widget_Data *wd = elm_widget_data_get(obj);
185 195
186 if (wd->content == content) return; 196 if (wd->content == content) return;
@@ -205,6 +215,7 @@ elm_mapbuf_content_set(Evas_Object *obj, Evas_Object *content)
205EAPI void 215EAPI void
206elm_mapbuf_enabled_set(Evas_Object *obj, Eina_Bool enabled) 216elm_mapbuf_enabled_set(Evas_Object *obj, Eina_Bool enabled)
207{ 217{
218 ELM_CHECK_WIDTYPE(obj, widtype);
208 Widget_Data *wd = elm_widget_data_get(obj); 219 Widget_Data *wd = elm_widget_data_get(obj);
209 if (wd->enabled == enabled) return; 220 if (wd->enabled == enabled) return;
210 wd->enabled = enabled; 221 wd->enabled = enabled;
@@ -214,6 +225,7 @@ elm_mapbuf_enabled_set(Evas_Object *obj, Eina_Bool enabled)
214EAPI Eina_Bool 225EAPI Eina_Bool
215elm_mapbuf_enabled_get(const Evas_Object *obj) 226elm_mapbuf_enabled_get(const Evas_Object *obj)
216{ 227{
228 ELM_CHECK_WIDTYPE(obj, widtype);
217 Widget_Data *wd = elm_widget_data_get(obj); 229 Widget_Data *wd = elm_widget_data_get(obj);
218 return wd->enabled; 230 return wd->enabled;
219} 231}
@@ -221,6 +233,7 @@ elm_mapbuf_enabled_get(const Evas_Object *obj)
221EAPI void 233EAPI void
222elm_mapbuf_smooth_set(Evas_Object *obj, Eina_Bool smooth) 234elm_mapbuf_smooth_set(Evas_Object *obj, Eina_Bool smooth)
223{ 235{
236 ELM_CHECK_WIDTYPE(obj, widtype);
224 Widget_Data *wd = elm_widget_data_get(obj); 237 Widget_Data *wd = elm_widget_data_get(obj);
225 if (wd->smooth == smooth) return; 238 if (wd->smooth == smooth) return;
226 wd->smooth = smooth; 239 wd->smooth = smooth;
@@ -230,6 +243,7 @@ elm_mapbuf_smooth_set(Evas_Object *obj, Eina_Bool smooth)
230EAPI Eina_Bool 243EAPI Eina_Bool
231elm_mapbuf_smooth_get(const Evas_Object *obj) 244elm_mapbuf_smooth_get(const Evas_Object *obj)
232{ 245{
246 ELM_CHECK_WIDTYPE(obj, widtype);
233 Widget_Data *wd = elm_widget_data_get(obj); 247 Widget_Data *wd = elm_widget_data_get(obj);
234 return wd->smooth; 248 return wd->smooth;
235} 249}
@@ -237,6 +251,7 @@ elm_mapbuf_smooth_get(const Evas_Object *obj)
237EAPI void 251EAPI void
238elm_mapbuf_alpha_set(Evas_Object *obj, Eina_Bool alpha) 252elm_mapbuf_alpha_set(Evas_Object *obj, Eina_Bool alpha)
239{ 253{
254 ELM_CHECK_WIDTYPE(obj, widtype);
240 Widget_Data *wd = elm_widget_data_get(obj); 255 Widget_Data *wd = elm_widget_data_get(obj);
241 if (wd->alpha == alpha) return; 256 if (wd->alpha == alpha) return;
242 wd->alpha = alpha; 257 wd->alpha = alpha;
@@ -246,6 +261,7 @@ elm_mapbuf_alpha_set(Evas_Object *obj, Eina_Bool alpha)
246EAPI Eina_Bool 261EAPI Eina_Bool
247elm_mapbuf_alpha_get(const Evas_Object *obj) 262elm_mapbuf_alpha_get(const Evas_Object *obj)
248{ 263{
264 ELM_CHECK_WIDTYPE(obj, widtype);
249 Widget_Data *wd = elm_widget_data_get(obj); 265 Widget_Data *wd = elm_widget_data_get(obj);
250 return wd->alpha; 266 return wd->alpha;
251} 267}
diff --git a/src/lib/elm_menu.c b/src/lib/elm_menu.c
index 27b80dd9c..452a733e2 100644
--- a/src/lib/elm_menu.c
+++ b/src/lib/elm_menu.c
@@ -44,6 +44,7 @@ struct _Widget_Data
44 Evas_Coord xloc, yloc; 44 Evas_Coord xloc, yloc;
45}; 45};
46 46
47static const char *widtype = NULL;
47static void _del_hook(Evas_Object *obj); 48static void _del_hook(Evas_Object *obj);
48static void _theme_hook(Evas_Object *obj); 49static void _theme_hook(Evas_Object *obj);
49static void _sizing_eval(Evas_Object *obj); 50static void _sizing_eval(Evas_Object *obj);
@@ -58,6 +59,7 @@ static void _menu_hide(void *data, Evas_Object *obj, void *event_info);
58static void 59static void
59_del_pre_hook(Evas_Object *obj) 60_del_pre_hook(Evas_Object *obj)
60{ 61{
62
61 Widget_Data *wd = elm_widget_data_get(obj); 63 Widget_Data *wd = elm_widget_data_get(obj);
62 64
63 evas_object_event_callback_del_full(wd->parent, EVAS_CALLBACK_RESIZE, _parent_resize, obj); 65 evas_object_event_callback_del_full(wd->parent, EVAS_CALLBACK_RESIZE, _parent_resize, obj);
@@ -68,6 +70,7 @@ _del_hook(Evas_Object *obj)
68{ 70{
69 Eina_List *l, *ll = NULL; 71 Eina_List *l, *ll = NULL;
70 Elm_Menu_Item *item; 72 Elm_Menu_Item *item;
73
71 Widget_Data *wd = elm_widget_data_get(obj); 74 Widget_Data *wd = elm_widget_data_get(obj);
72 75
73 if (!wd) return; 76 if (!wd) return;
@@ -96,6 +99,7 @@ _theme_hook(Evas_Object *obj)
96{ 99{
97 Eina_List *l, *_l, *ll = NULL; 100 Eina_List *l, *_l, *ll = NULL;
98 Elm_Menu_Item *item; 101 Elm_Menu_Item *item;
102
99 Widget_Data *wd = elm_widget_data_get(obj); 103 Widget_Data *wd = elm_widget_data_get(obj);
100 104
101 if (!wd) return; 105 if (!wd) return;
@@ -141,6 +145,7 @@ _sizing_eval(Evas_Object *obj)
141 Eina_List *l; 145 Eina_List *l;
142 Elm_Menu_Item *item; 146 Elm_Menu_Item *item;
143 Evas_Coord x_p,y_p,w_p,h_p,x2,y2,w2,h2,bx,by,bw,bh; 147 Evas_Coord x_p,y_p,w_p,h_p,x2,y2,w2,h2,bx,by,bw,bh;
148
144 Widget_Data *wd = elm_widget_data_get(obj); 149 Widget_Data *wd = elm_widget_data_get(obj);
145 150
146 if ((!wd) || (!wd->parent)) return; 151 if ((!wd) || (!wd->parent)) return;
@@ -234,6 +239,7 @@ _item_sizing_eval(Elm_Menu_Item *item)
234static void 239static void
235_changed_size_hints(void *data, Evas *e, Evas_Object *obj, void *event_info) 240_changed_size_hints(void *data, Evas *e, Evas_Object *obj, void *event_info)
236{ 241{
242
237// Widget_Data *wd = elm_widget_data_get(data); 243// Widget_Data *wd = elm_widget_data_get(data);
238 244
239 _sizing_eval(data); 245 _sizing_eval(data);
@@ -242,6 +248,7 @@ _changed_size_hints(void *data, Evas *e, Evas_Object *obj, void *event_info)
242static void 248static void
243_menu_resize(void *data, Evas *e, Evas_Object *obj, void *event_info) 249_menu_resize(void *data, Evas *e, Evas_Object *obj, void *event_info)
244{ 250{
251
245// Widget_Data *wd = elm_widget_data_get(data); 252// Widget_Data *wd = elm_widget_data_get(data);
246 253
247 _sizing_eval(data); 254 _sizing_eval(data);
@@ -250,6 +257,7 @@ _menu_resize(void *data, Evas *e, Evas_Object *obj, void *event_info)
250static void 257static void
251_parent_resize(void *data, Evas *e, Evas_Object *obj, void *event_info) 258_parent_resize(void *data, Evas *e, Evas_Object *obj, void *event_info)
252{ 259{
260
253// Widget_Data *wd = elm_widget_data_get(data); 261// Widget_Data *wd = elm_widget_data_get(data);
254 262
255 _sizing_eval(data); 263 _sizing_eval(data);
@@ -276,6 +284,7 @@ _menu_hide(void *data, Evas_Object *obj, void *event_info)
276{ 284{
277 Eina_List *l; 285 Eina_List *l;
278 Elm_Menu_Item *item2; 286 Elm_Menu_Item *item2;
287
279 Widget_Data *wd = elm_widget_data_get(data); 288 Widget_Data *wd = elm_widget_data_get(data);
280 289
281 evas_object_hide(wd->hv); 290 evas_object_hide(wd->hv);
@@ -360,6 +369,7 @@ _submenu_open(void *data, Evas_Object *obj, const char *emission, const char *so
360static void 369static void
361_show(void *data, Evas *e, Evas_Object *obj, void *event_info) 370_show(void *data, Evas *e, Evas_Object *obj, void *event_info)
362{ 371{
372
363 Widget_Data *wd = elm_widget_data_get(data); 373 Widget_Data *wd = elm_widget_data_get(data);
364 evas_object_show(wd->hv); 374 evas_object_show(wd->hv);
365} 375}
@@ -439,6 +449,7 @@ elm_menu_add(Evas_Object *parent)
439 wd = ELM_NEW(Widget_Data); 449 wd = ELM_NEW(Widget_Data);
440 e = evas_object_evas_get(parent); 450 e = evas_object_evas_get(parent);
441 obj = elm_widget_add(e); 451 obj = elm_widget_add(e);
452 ELM_SET_WIDTYPE(widtype, "menu");
442 elm_widget_type_set(obj, "menu"); 453 elm_widget_type_set(obj, "menu");
443 elm_widget_sub_object_add(parent, obj); 454 elm_widget_sub_object_add(parent, obj);
444 elm_widget_data_set(obj, wd); 455 elm_widget_data_set(obj, wd);
@@ -483,6 +494,7 @@ elm_menu_parent_set(Evas_Object *obj, Evas_Object *parent)
483{ 494{
484 Eina_List *l, *_l, *ll = NULL; 495 Eina_List *l, *_l, *ll = NULL;
485 Elm_Menu_Item *item; 496 Elm_Menu_Item *item;
497 ELM_CHECK_WIDTYPE(obj, widtype);
486 Widget_Data *wd = elm_widget_data_get(obj); 498 Widget_Data *wd = elm_widget_data_get(obj);
487 499
488 if (!wd) return; 500 if (!wd) return;
@@ -518,6 +530,7 @@ elm_menu_parent_set(Evas_Object *obj, Evas_Object *parent)
518EAPI void 530EAPI void
519elm_menu_move(Evas_Object *obj, Evas_Coord x, Evas_Coord y) 531elm_menu_move(Evas_Object *obj, Evas_Coord x, Evas_Coord y)
520{ 532{
533 ELM_CHECK_WIDTYPE(obj, widtype);
521 Widget_Data *wd = elm_widget_data_get(obj); 534 Widget_Data *wd = elm_widget_data_get(obj);
522 535
523 if (!wd) return; 536 if (!wd) return;
@@ -555,6 +568,7 @@ EAPI Elm_Menu_Item *
555elm_menu_item_add(Evas_Object *obj, Elm_Menu_Item *parent, Evas_Object *icon, const char *label, void (*func) (void *data, Evas_Object *obj, void *event_info), const void *data) 568elm_menu_item_add(Evas_Object *obj, Elm_Menu_Item *parent, Evas_Object *icon, const char *label, void (*func) (void *data, Evas_Object *obj, void *event_info), const void *data)
556{ 569{
557 Elm_Menu_Item *subitem; 570 Elm_Menu_Item *subitem;
571 ELM_CHECK_WIDTYPE(obj, widtype);
558 Widget_Data *wd = elm_widget_data_get(obj); 572 Widget_Data *wd = elm_widget_data_get(obj);
559 573
560 if (!wd) return NULL; 574 if (!wd) return NULL;
@@ -652,6 +666,7 @@ EAPI Elm_Menu_Item *
652elm_menu_item_separator_add(Evas_Object *obj, Elm_Menu_Item *parent) 666elm_menu_item_separator_add(Evas_Object *obj, Elm_Menu_Item *parent)
653{ 667{
654 Elm_Menu_Item *subitem; 668 Elm_Menu_Item *subitem;
669 ELM_CHECK_WIDTYPE(obj, widtype);
655 Widget_Data *wd = elm_widget_data_get(obj); 670 Widget_Data *wd = elm_widget_data_get(obj);
656 671
657 if (!wd) return NULL; 672 if (!wd) return NULL;