summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/lib/elc_fileselector.c1
-rw-r--r--src/lib/elm_box.c2
-rw-r--r--src/lib/elm_slider.c1
-rw-r--r--src/lib/elm_widget.c7
-rwxr-xr-xtests/test_decl.sh54
5 files changed, 57 insertions, 8 deletions
diff --git a/src/lib/elc_fileselector.c b/src/lib/elc_fileselector.c
index 0dab0ef..0f47bb6 100644
--- a/src/lib/elc_fileselector.c
+++ b/src/lib/elc_fileselector.c
@@ -724,6 +724,7 @@ elm_fileselector_expandable_get(const Evas_Object *obj)
724EAPI void 724EAPI void
725elm_fileselector_path_set(Evas_Object *obj, const char *path) 725elm_fileselector_path_set(Evas_Object *obj, const char *path)
726{ 726{
727 ELM_CHECK_WIDTYPE(obj, widtype);
727 _populate(obj, path, NULL); 728 _populate(obj, path, NULL);
728} 729}
729 730
diff --git a/src/lib/elm_box.c b/src/lib/elm_box.c
index 0544e4c..af81a1b 100644
--- a/src/lib/elm_box.c
+++ b/src/lib/elm_box.c
@@ -651,6 +651,7 @@ elm_box_unpack_all(Evas_Object *obj)
651EAPI void 651EAPI void
652elm_box_layout_set(Evas_Object *obj, Evas_Object_Box_Layout cb, const void *data, void (*free_data)(void *data)) 652elm_box_layout_set(Evas_Object *obj, Evas_Object_Box_Layout cb, const void *data, void (*free_data)(void *data))
653{ 653{
654 ELM_CHECK_WIDTYPE(obj, widtype);
654 Widget_Data *wd = elm_widget_data_get(obj); 655 Widget_Data *wd = elm_widget_data_get(obj);
655 if (!wd) return; 656 if (!wd) return;
656 657
@@ -683,6 +684,7 @@ elm_box_layout_set(Evas_Object *obj, Evas_Object_Box_Layout cb, const void *data
683EAPI void 684EAPI void
684elm_box_layout_transition(Evas_Object *obj, Evas_Object_Box_Data *priv, void *data) 685elm_box_layout_transition(Evas_Object *obj, Evas_Object_Box_Data *priv, void *data)
685{ 686{
687 ELM_CHECK_WIDTYPE(obj, widtype);
686 Elm_Box_Transition *box_data = data; 688 Elm_Box_Transition *box_data = data;
687 const double curtime = ecore_loop_time_get(); 689 const double curtime = ecore_loop_time_get();
688 690
diff --git a/src/lib/elm_slider.c b/src/lib/elm_slider.c
index a178a30..74f0b08 100644
--- a/src/lib/elm_slider.c
+++ b/src/lib/elm_slider.c
@@ -1020,6 +1020,7 @@ elm_slider_end_get(const Evas_Object *obj)
1020EAPI void 1020EAPI void
1021elm_slider_indicator_show_set(Evas_Object *obj, Eina_Bool show) 1021elm_slider_indicator_show_set(Evas_Object *obj, Eina_Bool show)
1022{ 1022{
1023 ELM_CHECK_WIDTYPE(obj, widtype);
1023 Widget_Data *wd = elm_widget_data_get(obj); 1024 Widget_Data *wd = elm_widget_data_get(obj);
1024 if (show) { 1025 if (show) {
1025 wd->indicator_show = EINA_TRUE; 1026 wd->indicator_show = EINA_TRUE;
diff --git a/src/lib/elm_widget.c b/src/lib/elm_widget.c
index 47f0c50..1195437 100644
--- a/src/lib/elm_widget.c
+++ b/src/lib/elm_widget.c
@@ -1019,6 +1019,8 @@ EAPI void
1019elm_widget_focus_cycle(Evas_Object *obj, Elm_Focus_Direction dir) 1019elm_widget_focus_cycle(Evas_Object *obj, Elm_Focus_Direction dir)
1020{ 1020{
1021 Evas_Object *target = NULL; 1021 Evas_Object *target = NULL;
1022 if (!_elm_widget_is(obj))
1023 return;
1022 elm_widget_focus_next_get(obj, dir, &target); 1024 elm_widget_focus_next_get(obj, dir, &target);
1023 if (target) 1025 if (target)
1024 elm_widget_focus_steal(target); 1026 elm_widget_focus_steal(target);
@@ -1938,6 +1940,9 @@ elm_widget_stringlist_free(Eina_List *list)
1938EAPI Elm_Widget_Item * 1940EAPI Elm_Widget_Item *
1939_elm_widget_item_new(Evas_Object *widget, size_t alloc_size) 1941_elm_widget_item_new(Evas_Object *widget, size_t alloc_size)
1940{ 1942{
1943 if (!_elm_widget_is(widget))
1944 return NULL;
1945
1941 Elm_Widget_Item *item; 1946 Elm_Widget_Item *item;
1942 1947
1943 EINA_SAFETY_ON_TRUE_RETURN_VAL(alloc_size < sizeof(Elm_Widget_Item), NULL); 1948 EINA_SAFETY_ON_TRUE_RETURN_VAL(alloc_size < sizeof(Elm_Widget_Item), NULL);
@@ -2661,6 +2666,8 @@ EAPI void
2661elm_widget_tree_dot_dump(const Evas_Object *top, FILE *output) 2666elm_widget_tree_dot_dump(const Evas_Object *top, FILE *output)
2662{ 2667{
2663#ifdef ELM_DEBUG 2668#ifdef ELM_DEBUG
2669 if (!_elm_widget_is(top))
2670 return;
2664 fprintf(output, "graph "" { node [shape=record];\n"); 2671 fprintf(output, "graph "" { node [shape=record];\n");
2665 _sub_obj_tree_dot_dump(top, output); 2672 _sub_obj_tree_dot_dump(top, output);
2666 fprintf(output, "}\n"); 2673 fprintf(output, "}\n");
diff --git a/tests/test_decl.sh b/tests/test_decl.sh
index 706ffdd..c317f50 100755
--- a/tests/test_decl.sh
+++ b/tests/test_decl.sh
@@ -4,21 +4,58 @@ ret=0
4check(){ 4check(){
5 i=$1 5 i=$1
6 shift 6 shift
7 sed -n "/^$i(/{g;1!p;};h" $@ >eapi.decl 7 grep -h -B1 -10 -e "^$i(" $@ >eapi.decl
8 lines=$(wc -l eapi.decl|cut -f1 -d' ') 8 if [ $? != 0 ]; then
9 if [ $lines == 0 ]; then
10 echo -e "\e[31;1mNOT IMPLEMENTED\e[m\t $i" 9 echo -e "\e[31;1mNOT IMPLEMENTED\e[m\t $i"
11 ret=1 10 ret=1
12 elif [ $lines != 1 ]; then 11 return
13 echo -e "\e[31;1mMULTI IMPLEMENTED\e[m\t $i" 12 fi
13 grep -qe "^--$" eapi.decl
14 if [ $? == 0 ]; then
15 echo -e "\e[31;1mMULTI IMPLEMENT\e[m\t $i"
14 ret=1 16 ret=1
15 else 17 return
16 cat eapi.decl | grep -qe '^EAPI' 18 fi
19
20 head -1 eapi.decl | grep -qe '^EAPI'
21 if [ $? != 0 ];then
22 echo -e "\e[31;1mMISSING EAPI\e[m\t $i"
23 ret=1
24 fi
25
26 func=$(echo $i | grep -oe 'elm_\w\+')
27
28 sed '2q;d' eapi.decl | grep -qe "elm_widget\w\+(\(const \)\?Evas_Object \*"
29 if [ $? == 0 ];then
30 tail -n9 eapi.decl | grep -q "\(API_ENTRY\|_elm_widget_is\)"
17 if [ $? != 0 ];then 31 if [ $? != 0 ];then
18 echo -e "\e[31;1mMISSING EAPI\e[m\t $i" 32 echo -e "\e[31;1mMISSING CHECKER\e[m\t $i"
19 ret=1 33 ret=1
20 fi 34 fi
35 return
36 fi
37
38 sed '2q;d' eapi.decl | grep -qe "elm_object_\w\+("
39 if [ $? == 0 ];then
40 rm eapi.decl
41 return
21 fi 42 fi
43
44 sed '2q;d' eapi.decl | grep -qe "elm_\w\+_add("
45 if [ $? == 0 ];then
46 rm eapi.decl
47 return
48 fi
49
50 sed '2q;d' eapi.decl | grep -qe "elm_\w\+(\(const \)\?Evas_Object \*"
51 if [ $? == 0 ];then
52 tail -n9 eapi.decl | grep -q "ELM_CHECK_WIDTYPE"
53 if [ $? != 0 ];then
54 echo -e "\e[31;1mMISSING CHECKER\e[m\t $i"
55 ret=1
56 fi
57 fi
58
22 rm eapi.decl 59 rm eapi.decl
23} 60}
24 61
@@ -40,5 +77,6 @@ for i in $(cat eapi.list); do
40 check $i src/lib/elm_widget.c 77 check $i src/lib/elm_widget.c
41done 78done
42 79
80rm -f eapi.decl
43rm eapi.list 81rm eapi.list
44exit $ret 82exit $ret