Summary:
Before
b3327c761e, -1 was returned on`elm_win_rotation_get`, if `obj` is NULL.
This fixes backward compatibility.
Test Plan: make check
Reviewers: Hermet
Reviewed By: Hermet
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D8474
EAPI int
elm_win_rotation_get(const Evas_Object *obj)
{
+ EINA_SAFETY_ON_NULL_RETURN_VAL(obj, -1);
return efl_ui_win_rotation_get(obj);
}
ck_assert_int_eq(elm_win_rotation_get(win), 90);
elm_win_rotation_with_resize_set(win, 180);
ck_assert_int_eq(elm_win_rotation_get(win), 180);
+ ck_assert_int_eq(elm_win_rotation_get(NULL), -1);
}
EFL_END_TEST