set_api_state(api_data *api)
{
const Eina_List *items = elm_box_children_get(api->box);
- if(!eina_list_count(items))
+ if (!eina_list_count(items))
return;
/* use elm_box_children_get() to get list of children */
break;
case BOX_PACK_BEFORE:
- if(eina_list_count(items) > 1)
+ if (eina_list_count(items) > 1)
{ /* Put last item before the one preceeding it */
elm_box_unpack(api->box, eina_list_data_get(eina_list_last(items)));
elm_box_pack_before(api->box,
break;
case BOX_PACK_AFTER:
- if(eina_list_count(items) > 1)
+ if (eina_list_count(items) > 1)
{ /* Put item before last to last */
elm_box_unpack(api->box, eina_list_nth(items,
eina_list_count(items)-2));
set_api_state(api_data *api)
{
const Eina_List *items = elm_box_children_get(api->box);
- if(!eina_list_count(items))
+ if (!eina_list_count(items))
return;
switch(api->state)
{
const Eina_List *items = elm_box_children_get(api->box);
static Elm_Calendar_Mark *m = NULL;
- if(!eina_list_count(items))
+ if (!eina_list_count(items))
return;
switch(api->state)
{
const Eina_List *items = elm_box_children_get(api->box);
Evas_Object *ck = eina_list_nth(items, 0);
- if(!eina_list_count(items))
+ if (!eina_list_count(items))
return;
/* use elm_box_children_get() to get list of children */
set_api_state(api_data *api)
{
const Eina_List *disks = elm_box_children_get(api->box);
- if(!eina_list_count(disks))
+ if (!eina_list_count(disks))
return;
switch(api->state)
Evas_Object *o = NULL;;
char buf[1024];
- if(!strcmp(item, "itemprovider"))
+ if (!strcmp(item, "itemprovider"))
{
snprintf(buf, sizeof(buf), "%s/images/icon_00.png",
elm_app_data_dir_get());
Evas_Object *o = NULL;;
char buf[1024];
- if(!strcmp(item, "itemprovider"))
+ if (!strcmp(item, "itemprovider"))
{
snprintf(buf, sizeof(buf), "%s/images/icon_10.png",
elm_app_data_dir_get());
set_api_state(api_data *api)
{
const Eina_List *items = elm_box_children_get(api->box);
- if(!eina_list_count(items))
+ if (!eina_list_count(items))
return;
/* Get first item of list of vbox children */
set_api_state(api_data *api)
{
const Eina_List *items = elm_box_children_get(api->box);
- if(!eina_list_count(items))
+ if (!eina_list_count(items))
return;
/* Get first item of list of vbox children */
for ((item = elm_gengrid_first_item_get(grid)); item;
(item = elm_gengrid_item_next_get(item)))
{
- if(!elm_check_state_get(obj))
+ if (!elm_check_state_get(obj))
{
elm_gengrid_item_cursor_unset(item);
continue;
set_api_state(api_data *api)
{
const Eina_List *items = elm_box_children_get(api->box);
- if(!eina_list_count(items))
+ if (!eina_list_count(items))
return;
Evas_Object *gl = eina_list_nth(items, 0); /* Genlist is the first item */
set_api_state(api_data *api)
{
const Eina_List *items = elm_box_children_get(api->box);
- if(!eina_list_count(items))
+ if (!eina_list_count(items))
return;
/* use elm_box_children_get() to get list of children */
case INDEX_ITEM_FIND:
{
Elm_Object_Item *i = elm_index_item_find(d->id, d->item);
- if(i)
+ if (i)
{
printf("Item Find - Found Item.\n");
elm_object_item_del(i);
case ITEM_INSERT_BEFORE: /* 1 */
{
const Eina_List *items = elm_list_items_get(li);
- if(eina_list_count(items))
+ if (eina_list_count(items))
{
elm_list_item_insert_before(li,
eina_list_nth(items, eina_list_count(items)-1),
case ITEM_INSERT_AFTER: /* 2 */
{
const Eina_List *items = elm_list_items_get(li);
- if(eina_list_count(items))
+ if (eina_list_count(items))
{
elm_list_item_insert_after(li,
eina_list_nth(items, eina_list_count(items)-2),
case ITEM_SEPARATOR_SET: /* 3 */
{
const Eina_List *items = elm_list_items_get(li);
- if(eina_list_count(items))
+ if (eina_list_count(items))
{
elm_list_item_separator_set(eina_list_nth(items, eina_list_count(items)-3), EINA_TRUE);
elm_list_item_bring_in(eina_list_nth(items, eina_list_count(items)-3));
case LIST_ITEM_DEL: /* 4 */
{
const Eina_List *items = elm_list_items_get(li);
- if(eina_list_count(items))
+ if (eina_list_count(items))
{
elm_object_item_del(eina_list_data_get(eina_list_last(items)));
}
case TOOLTIP_TEXT_SET: /* 7 */
{
const Eina_List *items = elm_list_items_get(li);
- if(eina_list_count(items))
+ if (eina_list_count(items))
{
elm_object_item_tooltip_text_set(eina_list_data_get(eina_list_last(items)), "Tooltip set from API");
}
case TOOLTIP_UNSET: /* 8 */
{
const Eina_List *items = elm_list_items_get(li);
- if(eina_list_count(items))
+ if (eina_list_count(items))
{
elm_object_item_tooltip_unset(eina_list_data_get(eina_list_last(items)));
}
case ITEM_CURSOR_SET: /* 9 */
{
const Eina_List *items = elm_list_items_get(li);
- if(eina_list_count(items))
+ if (eina_list_count(items))
{
elm_object_item_cursor_set(eina_list_data_get(eina_list_last(items)), ELM_CURSOR_HAND2);
}
case ITEM_CURSOR_STYLE_SET: /* 10 */
{
const Eina_List *items = elm_list_items_get(li);
- if(eina_list_count(items))
+ if (eina_list_count(items))
{
elm_object_item_cursor_style_set(eina_list_data_get(eina_list_last(items)), "transparent");
}
case DISABLED_SET: /* 11 */
{
const Eina_List *items = elm_list_items_get(li);
- if(eina_list_count(items))
+ if (eina_list_count(items))
{
elm_object_item_disabled_set(eina_list_data_get(eina_list_last(items)), EINA_TRUE);
}
char *p = _signal;
Evas_Object *content;
- while((*p!='\0') && (*p!=']'))
+ while ((*p!='\0') && (*p!=']'))
p++;
- if((*p=='\0') || (*(p+1)!=':'))
+ if ((*p=='\0') || (*(p+1)!=':'))
{
ERR("Invalid External Signal received: '%s' '%s'\n", sig, source);
free(_signal);
content = type->content_get(type->data, obj, _signal);
free(_signal);
- if(content)
+ if (content)
edje_object_signal_emit(content, sig + (p - _signal), source);
}
if (!strcmp(param->name, "year_min"))
mem->year_min = param->i;
- else if(!strcmp(param->name, "year_max"))
+ else if (!strcmp(param->name, "year_max"))
mem->year_max = param->i;
else if (!strcmp(param->name, "sel_enable"))
}
else if (!strcmp(param->name, "single line"))
{
- if(param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
{
elm_entry_single_line_set(obj, param->i);
return EINA_TRUE;
}
else if (!strcmp(param->name, "password"))
{
- if(param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+ if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
{
elm_entry_password_set(obj, param->i);
return EINA_TRUE;
return EINA_TRUE;
}
}
- else if(!strcmp(param->name, "paused"))
+ else if (!strcmp(param->name, "paused"))
{
if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
{
static void
_rm_items(void *data, Evas_Object *obj, void *event_info)
{
- if(!elm_hoversel_expanded_get(obj))
+ if (!elm_hoversel_expanded_get(obj))
elm_hoversel_clear(obj);
}
static void
_sel(void *data, Evas_Object *obj, void *event_info)
{
- if(!elm_hoversel_expanded_get(obj) && event_info != data)
+ if (!elm_hoversel_expanded_get(obj) && event_info != data)
elm_object_item_del(event_info);
}
Widget_Data *wd = elm_widget_data_get(obj);
if (!wd || !content) return;
if (item && !strcmp(item, "default")) return;
- if(strcmp(elm_object_widget_type_get(content), "check")) return;
+ if (strcmp(elm_object_widget_type_get(content), "check")) return;
EINA_LIST_FOREACH(wd->items, l, it)
{
if (!part || !strcmp(part, "default"))
snprintf(buf, sizeof(buf), "elm.text.title");
- else if(!strcmp("subtitle", part))
+ else if (!strcmp("subtitle", part))
snprintf(buf, sizeof(buf), "elm.text.subtitle");
else
snprintf(buf, sizeof(buf), "%s", part);
if (!part || !strcmp(part, "default"))
snprintf(buf, sizeof(buf), "elm.text.title");
- else if(!strcmp("subtitle", part))
+ else if (!strcmp("subtitle", part))
snprintf(buf, sizeof(buf), "elm.text.subtitle");
else
snprintf(buf, sizeof(buf), "%s", part);
l = wd->stack->last->prev;
- while(l)
+ while (l)
{
if (EINA_INLIST_CONTAINER_GET(l, Elm_Naviframe_Item) ==
((Elm_Naviframe_Item *)it)) break;
if (!part || !strcmp(part, "default"))
_content_set(obj, content);
- else if(!strcmp(part, "icon"))
+ else if (!strcmp(part, "icon"))
_icon_set(obj, content);
}
if (!wd) return NULL;
if (!part || !strcmp(part, "default"))
return wd->content;
- else if(!strcmp(part, "icon"))
+ else if (!strcmp(part, "icon"))
return wd->icon;
return NULL;
}
if (!wd) return NULL;
if (!part || !strcmp(part, "default"))
return _content_unset(obj);
- else if(!strcmp(part, "icon"))
+ else if (!strcmp(part, "icon"))
return _icon_unset(obj);
return NULL;
}
ELM_CHECK_WIDTYPE(obj, widtype);
Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return;
- if(pos<ELM_BUBBLE_POS_TOP_LEFT || pos>ELM_BUBBLE_POS_BOTTOM_RIGHT) return;
+ if (pos<ELM_BUBBLE_POS_TOP_LEFT || pos>ELM_BUBBLE_POS_BOTTOM_RIGHT) return;
wd->pos = pos;
_theme_hook(obj);
}
if ((j == CNP_ATOM_text_uri) ||
(j == CNP_ATOM_text_urilist))
{
- if(!is_uri_type_data(sel, notify)) continue;
+ if (!is_uri_type_data(sel, notify)) continue;
}
cnp_debug("Atom %s matches\n",atoms[j].name);
goto done;
item = (Elm_Color_Item *) it;
if (item)
{
- if(r) *r = item->color->r;
- if(g) *g = item->color->g;
- if(b) *b = item->color->b;
- if(a) *a = item->color->a;
+ if (r) *r = item->color->r;
+ if (g) *g = item->color->g;
+ if (b) *b = item->color->b;
+ if (a) *a = item->color->a;
}
}
#define IFCFG(v) if ((_elm_config->config_version & 0xffff) < (v)) {
#define IFCFGELSE } else {
#define IFCFGEND }
-#define COPYVAL(x) do {_elm_config->x = tcfg->x; } while(0)
-#define COPYPTR(x) do {_elm_config->x = tcfg->x; tcfg->x = NULL; } while(0)
+#define COPYVAL(x) do {_elm_config->x = tcfg->x; } while (0)
+#define COPYPTR(x) do {_elm_config->x = tcfg->x; tcfg->x = NULL; } while (0)
#define COPYSTR(x) COPYPTR(x)
/* we also need to update for property changes in the root window
localtime_r(&t, &time1);
time1.tm_year = year;
time1.tm_mon = month;
- for(day = MIN_DAYS_IN_MONTH; day <= mapping[ELM_DATETIME_DATE].def_max; day++)
+ for (day = MIN_DAYS_IN_MONTH; day <= mapping[ELM_DATETIME_DATE].def_max; day++)
{
time1.tm_mday = day;
mktime(&time1);
idx - ic + (2 * ac));
}
- if(dit) _item_icon_set(dit, icon);
+ if (dit) _item_icon_set(dit, icon);
_sizing_eval(wd->self);
}
}
return; \
} \
} \
- while(0)
+ while (0)
typedef struct _Item_Block Item_Block;
typedef struct _Item_Cache Item_Cache;
{ /* Mark EVAS_EVENT_FLAG_ON_HOLD on events that are used by gesture layer */
/* ev_flags != EVAS_EVENT_FLAG_NONE means target used event and g-layer */
/* should not refeed this event. */
- if(!event_info)
+ if (!event_info)
return; /* This happens when restarting gestures */
if ((ev_flags) || (!wd->repeat_events))
_compute_taps_center(Long_Tap_Type *st,
Evas_Coord *x_out, Evas_Coord *y_out, Pointer_Event *pe)
{
- if(!eina_list_count(st->touched))
+ if (!eina_list_count(st->touched))
return;
Eina_List *l;
case EVAS_CALLBACK_MULTI_MOVE:
case EVAS_CALLBACK_MOUSE_MOVE:
- if(st->info.n &&
+ if (st->info.n &&
((gesture->state == ELM_GESTURE_STATE_START) ||
(gesture->state == ELM_GESTURE_STATE_MOVE)))
{ /* Report MOVE only if STARTED */
Eina_List *l;
Pointer_Event *p;
- if(eina_list_count(wd->touched) > 2)
+ if (eina_list_count(wd->touched) > 2)
{ /* Process zoom only when 2 fingers on surface */
ev_flag = _set_state(gesture_zoom,
ELM_GESTURE_STATE_ABORT, &st->info, EINA_FALSE);
Eina_List *l;
Pointer_Event *p;
- if(eina_list_count(wd->touched) > 2)
+ if (eina_list_count(wd->touched) > 2)
{ /* Process rotate only when 2 fingers on surface */
ev_flag = _set_state(gesture,
ELM_GESTURE_STATE_ABORT, &st->info, EINA_FALSE);
int i;
Gesture_Info *g;
printf("Gesture | State | is tested\n");
- for(i = ELM_GESTURE_N_TAPS; i < ELM_GESTURE_LAST; i++)
+ for (i = ELM_GESTURE_N_TAPS; i < ELM_GESTURE_LAST; i++)
{
g = wd->gesture[i];
- if(g)
+ if (g)
printf(" %d %d %d\n", i, g->state, g->test);
}
#endif
_region_to_coord_convert(wd, lon_min, lat_max, size, &xmin, &ymin);
_region_to_coord_convert(wd, lon_max, lat_min, size, &xmax, &ymax);
- if( !(xmin < px && xmax < px) && !(xmin > px+ow && xmax > px+ow))
+ if ( !(xmin < px && xmax < px) && !(xmin > px+ow && xmax > px+ow))
{
- if( !(ymin < py && ymax < py) && !(ymin > py+oh && ymax > py+oh))
+ if ( !(ymin < py && ymax < py) && !(ymin > py+oh && ymax > py+oh))
{
//display the route
evas_object_move(route, xmin - px, ymin - py);
if (part && (!strncmp(part, "elm.swallow.", 12))) part += 12;
if (!part || !strcmp(part, "left"))
_content_left_set(obj, content);
- else if(!strcmp(part, "right"))
+ else if (!strcmp(part, "right"))
_content_right_set(obj, content);
}
if (!wd) return;
it = ELM_TOOLBAR_ITEM_FROM_INLIST(wd->items);
- while(it)
+ while (it)
{
next = ELM_TOOLBAR_ITEM_FROM_INLIST(EINA_INLIST_GET(it)->next);
_item_del(it);
{
//Remove duplicated objects
//TODO: Need to consider about optimizing here
- while(1)
+ while (1)
{
if (!eina_list_data_find_list(transit->objs, obj))
break;
if (!win) return EINA_FALSE;
if (!win->ee) return EINA_FALSE;
- if(!ecore_evas_extn_socket_listen(win->ee, svcname, svcnum, svcsys))
+ if (!ecore_evas_extn_socket_listen(win->ee, svcname, svcnum, svcsys))
return EINA_FALSE;
return EINA_TRUE;