From: 김지훈 <imfine98@gmail.com>

Subject: patch for indentation and using enum in elementary

I send the patch for elementary.
In this patch, I fixed the indentation of Elementary.h.in.
In addition, I use EINA_TRUE or EINA_FALSE instead of 1 or 0.
EVAS_HINT_EXPAND and EVA_HINT_FILL is used instead of 1.0 and -1.0.
Thanks.



SVN revision: 52447
This commit is contained in:
김지훈 2010-09-19 02:30:14 +00:00 committed by Carsten Haitzler
parent 99a4bcfef4
commit d5b8d09591
11 changed files with 87 additions and 87 deletions

View File

@ -1,6 +1,6 @@
/*
*
* vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
* vim:ts=8:sw=3:sts=3:expandtab:cino=>5n-2f0^-2{2(0W1st0
*/
#ifndef ELEMENTARY_H
#define ELEMENTARY_H

View File

@ -197,8 +197,8 @@ elm_anchorblock_add(Evas_Object *parent)
elm_entry_item_provider_prepend(wd->entry, _item_provider, obj);
elm_widget_resize_object_set(obj, wd->entry);
elm_entry_editable_set(wd->entry, 0);
evas_object_size_hint_weight_set(wd->entry, 1.0, 1.0);
evas_object_size_hint_align_set(wd->entry, -1.0, -1.0);
evas_object_size_hint_weight_set(wd->entry, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(wd->entry, EVAS_HINT_FILL, EVAS_HINT_FILL);
evas_object_event_callback_add(wd->entry, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
_changed_size_hints, obj);

View File

@ -189,8 +189,8 @@ elm_anchorview_add(Evas_Object *parent)
wd->entry = elm_entry_add(parent);
elm_entry_item_provider_prepend(wd->entry, _item_provider, obj);
elm_entry_editable_set(wd->entry, 0);
evas_object_size_hint_weight_set(wd->entry, 1.0, 1.0);
evas_object_size_hint_align_set(wd->entry, -1.0, -1.0);
evas_object_size_hint_weight_set(wd->entry, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(wd->entry, EVAS_HINT_FILL, EVAS_HINT_FILL);
elm_scroller_content_set(wd->scroller, wd->entry);
evas_object_show(wd->entry);

View File

@ -81,12 +81,12 @@ _on_focus_hook(void *data __UNUSED__, Evas_Object *obj)
if (elm_widget_focus_get(obj))
{
edje_object_signal_emit(wd->btn, "elm,action,focus", "elm");
evas_object_focus_set(wd->btn, 1);
evas_object_focus_set(wd->btn, EINA_TRUE);
}
else
{
edje_object_signal_emit(wd->btn, "elm,action,unfocus", "elm");
evas_object_focus_set(wd->btn, 0);
evas_object_focus_set(wd->btn, EINA_FALSE);
}
}

View File

@ -181,8 +181,8 @@ _activate(Evas_Object *obj)
elm_button_icon_set(bt, ic);
evas_object_show(ic);
}
evas_object_size_hint_weight_set(bt, 1.0, 0.0);
evas_object_size_hint_align_set(bt, -1.0, -1.0);
evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, 0.0);
evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
elm_box_pack_end(bx, bt);
evas_object_smart_callback_add(bt, "clicked", _item_clicked, it);
evas_object_show(bt);

View File

@ -60,12 +60,12 @@ _on_focus_hook(void *data __UNUSED__, Evas_Object *obj)
if (elm_widget_focus_get(obj))
{
edje_object_signal_emit(wd->btn, "elm,action,focus", "elm");
evas_object_focus_set(wd->btn, 1);
evas_object_focus_set(wd->btn, EINA_TRUE);
}
else
{
edje_object_signal_emit(wd->btn, "elm,action,unfocus", "elm");
evas_object_focus_set(wd->btn, 0);
evas_object_focus_set(wd->btn, EINA_FALSE);
}
}

View File

@ -348,7 +348,7 @@ _on_focus_hook(void *data __UNUSED__, Evas_Object *obj)
if (!wd->editable) return;
if (elm_widget_focus_get(obj))
{
evas_object_focus_set(wd->ent, 1);
evas_object_focus_set(wd->ent, EINA_TRUE);
edje_object_signal_emit(wd->ent, "elm,action,focus", "elm");
if (top) elm_win_keyboard_mode_set(top, ELM_WIN_KEYBOARD_ON);
evas_object_smart_callback_call(obj, SIG_FOCUSED, NULL);
@ -356,7 +356,7 @@ _on_focus_hook(void *data __UNUSED__, Evas_Object *obj)
else
{
edje_object_signal_emit(wd->ent, "elm,action,unfocus", "elm");
evas_object_focus_set(wd->ent, 0);
evas_object_focus_set(wd->ent, EINA_FALSE);
if (top) elm_win_keyboard_mode_set(top, ELM_WIN_KEYBOARD_OFF);
evas_object_smart_callback_call(obj, SIG_UNFOCUSED, NULL);
}
@ -455,7 +455,7 @@ _dismissed(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
if (wd->selmode)
{
if (!wd->password)
edje_object_part_text_select_allow_set(wd->ent, "elm.text", 1);
edje_object_part_text_select_allow_set(wd->ent, "elm.text", EINA_TRUE);
}
elm_widget_scroll_freeze_pop(data);
if (wd->hovdeljob) ecore_job_del(wd->hovdeljob);
@ -470,7 +470,7 @@ _select(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
wd->selmode = EINA_TRUE;
edje_object_part_text_select_none(wd->ent, "elm.text");
if (!wd->password)
edje_object_part_text_select_allow_set(wd->ent, "elm.text", 1);
edje_object_part_text_select_allow_set(wd->ent, "elm.text", EINA_TRUE);
edje_object_signal_emit(wd->ent, "elm,state,select,on", "elm");
elm_widget_scroll_hold_push(data);
}
@ -574,7 +574,7 @@ _long_press(void *data)
(wd->ent, "context_menu_orientation");
if ((context_menu_orientation) &&
(!strcmp(context_menu_orientation, "horizontal")))
elm_hoversel_horizontal_set(wd->hoversel, 1);
elm_hoversel_horizontal_set(wd->hoversel, EINA_TRUE);
elm_object_style_set(wd->hoversel, "entry");
elm_widget_sub_object_add(data, wd->hoversel);
elm_hoversel_label_set(wd->hoversel, "Text");
@ -1262,8 +1262,8 @@ _event_selection_clear(void *data __UNUSED__, int type __UNUSED__, void *event _
/*
Widget_Data *wd = elm_widget_data_get(data);
Ecore_X_Event_Selection_Clear *ev = event;
if (!wd) return 1;
if (!wd->have_selection) return 1;
if (!wd) return ECORE_CALLBACK_PASS_ON;
if (!wd->have_selection) return ECORE_CALLBACK_PASS_ON;
if ((ev->selection == ECORE_X_SELECTION_CLIPBOARD) ||
(ev->selection == ECORE_X_SELECTION_PRIMARY))
{

View File

@ -225,8 +225,8 @@ _index_box_auto_fill(Evas_Object *obj, Evas_Object *box, int level)
edje_object_part_text_set(o, "elm.text", it->letter);
edje_object_size_min_restricted_calc(o, &mw, &mh, 0, 0);
evas_object_size_hint_min_set(o, mw, mh);
evas_object_size_hint_weight_set(o, 1.0, 1.0);
evas_object_size_hint_align_set(o, -1.0, -1.0);
evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(o, EVAS_HINT_FILL, EVAS_HINT_FILL);
elm_widget_sub_object_add(obj, o);
evas_object_box_append(box, o);
stacking = edje_object_data_get(o, "stacking");

View File

@ -240,9 +240,9 @@ _on_focus_hook(void *data __UNUSED__, Evas_Object *obj)
Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return;
if (elm_widget_focus_get(obj))
evas_object_focus_set(wd->scr, 1);
evas_object_focus_set(wd->scr, EINA_TRUE);
else
evas_object_focus_set(wd->scr, 0);
evas_object_focus_set(wd->scr, EINA_FALSE);
}
static void
@ -509,8 +509,8 @@ _item_new(Evas_Object *obj, const char *label, Evas_Object *icon, Evas_Object *e
_mouse_up, it);
evas_object_event_callback_add(it->base.view, EVAS_CALLBACK_MOUSE_MOVE,
_mouse_move, it);
evas_object_size_hint_weight_set(it->base.view, 1.0, 1.0);
evas_object_size_hint_align_set(it->base.view, -1.0, -1.0);
evas_object_size_hint_weight_set(it->base.view, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(it->base.view, EVAS_HINT_FILL, EVAS_HINT_FILL);
if (it->icon)
{
elm_widget_sub_object_add(obj, it->icon);
@ -754,8 +754,8 @@ elm_list_add(Evas_Object *parent)
wd->box = elm_box_add(parent);
elm_box_homogenous_set(wd->box, 1);
evas_object_size_hint_weight_set(wd->box, 1.0, 0.0);
evas_object_size_hint_align_set(wd->box, -1.0, 0.0);
evas_object_size_hint_weight_set(wd->box, EVAS_HINT_EXPAND, 0.0);
evas_object_size_hint_align_set(wd->box, EVAS_HINT_FILL, 0.0);
elm_scroller_content_set(wd->scr, wd->box);
evas_object_show(wd->box);

View File

@ -480,7 +480,7 @@ elm_theme_flush(Elm_Theme *th)
}
/**
* This flushes all themems (default and specific ones).
* This flushes all themes (default and specific ones).
*
* This will flush all themes in the current application context, by calling
* elm_theme_flush() on each of them.

View File

@ -52,12 +52,12 @@
* if (elm_widget_focus_get(obj))
* {
* edje_object_signal_emit(wd->sub, "elm,action,focus", "elm");
* evas_object_focus_set(wd->sub, 1);
* evas_object_focus_set(wd->sub, EINA_TRUE);
* }
* else
* {
* edje_object_signal_emit(wd->sub, "elm,action,unfocus", "elm");
* evas_object_focus_set(wd->sub, 0);
* evas_object_focus_set(wd->sub, EINA_FALSE);
* }
* }
*
@ -127,7 +127,7 @@
* elm_widget_theme_hook_set(obj, _theme_hook);
* elm_widget_disable_hook_set(obj, _disable_hook);
* // this widget can focus (true, means yes it can, false means it can't)
* elm_widget_can_focus_set(obj, EINA_TRUE);
* elm_widget_can_focus_set(obj, 1);
*
* // for this widget we will ad d1 sub object that is an edje object
* wd->sub = edje_object_add(e);