elm: Refactoring. Removed trailing whitespaces and fixed indentation.

SVN revision: 62281
This commit is contained in:
Daniel Juyung Seo 2011-08-10 04:35:31 +00:00
parent d4bc8dc084
commit b8e186dcad
4 changed files with 30 additions and 26 deletions

View File

@ -21,7 +21,7 @@ fac_realize_end(void *data, Evas_Object *obj, void *event_info __UNUSED__)
Evas_Object *win = data;
Evas_Object *bx, *bt;
int i;
printf("ADD for factory 4 %p [%i]\n", obj, (BLOK * (int)evas_object_data_get(obj, "num")));
bx = elm_box_add(win);
elm_box_homogeneous_set(bx, EINA_TRUE);
@ -29,10 +29,10 @@ fac_realize_end(void *data, Evas_Object *obj, void *event_info __UNUSED__)
for (i = 0; i < BLOK; i++)
{
char buf[32];
snprintf(buf, sizeof(buf), "%i",
snprintf(buf, sizeof(buf), "%i",
(i + (BLOK * (int)evas_object_data_get(obj, "num"))));
bt = elm_button_add(win);
evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
@ -40,7 +40,7 @@ fac_realize_end(void *data, Evas_Object *obj, void *event_info __UNUSED__)
elm_box_pack_end(bx, bt);
evas_object_show(bt);
}
elm_factory_content_set(obj, bx);
evas_object_show(bx);
}
@ -51,7 +51,7 @@ fac_realize3(void *data, Evas_Object *obj, void *event_info __UNUSED__)
Evas_Object *win = data;
Evas_Object *bx, *fc;
int i;
printf("ADD for factory 3 %p [%i]\n", obj, (BLOK * (int)evas_object_data_get(obj, "num")));
bx = elm_box_add(win);
elm_box_homogeneous_set(bx, EINA_TRUE);
@ -83,11 +83,11 @@ fac_realize2(void *data, Evas_Object *obj, void *event_info __UNUSED__)
Evas_Object *win = data;
Evas_Object *bx, *fc;
int i;
printf("ADD for factory 2 %p [%i]\n", obj, (BLOK * (int)evas_object_data_get(obj, "num")));
bx = elm_box_add(win);
elm_box_homogeneous_set(bx, EINA_TRUE);
for (i = 0; i < BLOK; i++)
{
fc = elm_factory_add(win);
@ -115,7 +115,7 @@ fac_realize1(void *data, Evas_Object *obj, void *event_info __UNUSED__)
Evas_Object *win = data;
Evas_Object *bx, *fc;
int i;
printf("ADD for factory 1 %p [%i]\n", obj, (BLOK * (int)evas_object_data_get(obj, "num")));
bx = elm_box_add(win);
elm_box_homogeneous_set(bx, EINA_TRUE);
@ -186,7 +186,7 @@ test_factory(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_inf
evas_object_show(bx);
evas_object_show(sc);
evas_object_resize(win, 320, 480);
evas_object_show(win);
}

View File

@ -63,10 +63,11 @@ test_photo(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info
evas_object_smart_callback_add(ph, "drag,stop",
drag_stop_cb, NULL);
if((n == 2) || (n == 3)) {
if ((n == 2) || (n == 3))
{
elm_photo_fill_inside_set(ph, EINA_TRUE);
elm_object_style_set(ph, "shadow");
}
}
elm_table_pack(tb, ph, i, j, 1, 1);
evas_object_show(ph);
}
@ -86,17 +87,20 @@ test_photo(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info
/* Never called, elm_photo never call "drop" smart cb */
static void
drop_cb(void *mydata __UNUSED__, Evas_Object *obj, void *evdata __UNUSED__){
printf("Drop on obj %p\n", obj);
drop_cb(void *mydata __UNUSED__, Evas_Object *obj, void *evdata __UNUSED__)
{
printf("Drop on obj %p\n", obj);
}
static void
drag_start_cb(void *mydata __UNUSED__, Evas_Object *obj __UNUSED__, void *evdata __UNUSED__){
drag_start_cb(void *mydata __UNUSED__, Evas_Object *obj __UNUSED__, void *evdata __UNUSED__)
{
}
static void
drag_stop_cb(void *mydata __UNUSED__, Evas_Object *obj __UNUSED__, void *evdata __UNUSED__){
drag_stop_cb(void *mydata __UNUSED__, Evas_Object *obj __UNUSED__, void *evdata __UNUSED__)
{
}

View File

@ -43,7 +43,7 @@ _focus_next_hook(const Evas_Object *obj, Elm_Focus_Direction dir, Evas_Object **
{
Widget_Data *wd = elm_widget_data_get(obj);
Evas_Object *cur;
if ((!wd) || (!wd->content)) return EINA_FALSE;
cur = wd->content;
return elm_widget_focus_next_get(cur, dir, next);
@ -54,7 +54,7 @@ _sizing_eval(Evas_Object *obj)
{
Widget_Data *wd = elm_widget_data_get(obj);
Evas_Coord minw = -1, minh = -1, maxw = -1, maxh = -1;
if (!wd) return;
if (!wd->content) return;
evas_object_size_hint_min_get(wd->content, &minw, &minh);
@ -69,9 +69,9 @@ _eval(Evas_Object *obj)
Evas_Coord x, y, w, h, cvx, cvy, cvw, cvh;
Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return;
evas_object_geometry_get(obj, &x, &y, &w, &h);
evas_output_viewport_get(evas_object_evas_get(obj),
evas_output_viewport_get(evas_object_evas_get(obj),
&cvx, &cvy, &cvw, &cvh);
// this is a hack to get things sane for now.
if ((w < 10) || (h < 10) || (cvw < 1) || (cvh < 1)) return;
@ -118,10 +118,10 @@ _move(void *data __UNUSED__, Evas *e __UNUSED__, Evas_Object *obj, void *event_i
wd->eval = EINA_TRUE;
evas_object_smart_changed(obj);
}
static void
_resize(void *data __UNUSED__, Evas *e __UNUSED__, Evas_Object *obj, void *event_info __UNUSED__)
{
{
Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return;
wd->eval = EINA_TRUE;
@ -144,10 +144,10 @@ _child_del(void *data, Evas *e __UNUSED__, Evas_Object *obj, void *event_info __
Widget_Data *wd = elm_widget_data_get(fobj);
if (!wd) return;
if (wd->content != obj) return;
evas_object_event_callback_del_full(wd->content,
evas_object_event_callback_del_full(wd->content,
EVAS_CALLBACK_CHANGED_SIZE_HINTS,
_child_change, obj);
evas_object_event_callback_del_full(wd->content,
evas_object_event_callback_del_full(wd->content,
EVAS_CALLBACK_DEL,
_child_del, obj);
wd->content = NULL;
@ -175,7 +175,7 @@ elm_factory_add(Evas_Object *parent)
evas_object_event_callback_add(obj, EVAS_CALLBACK_RESIZE, _resize, NULL);
evas_object_smart_callbacks_descriptions_set(obj, _signals);
wd->obj = obj;
return obj;
}

View File

@ -304,7 +304,7 @@ EAPI void elm_widget_focus_steal(Evas_Object *obj);
* @internal
*
* Restore the focus state of the sub-tree.
*
*
* This API will restore the focus state of the sub-tree to the lastest
* state. If a sub-tree is unfocused and wants to get back to the lastest
* focus state, this API will be helpful.