formatting

SVN revision: 72530
This commit is contained in:
Mike Blumenkrantz 2012-06-20 08:42:17 +00:00
parent a799a7c4be
commit d0f5d7d5b3
1 changed files with 1137 additions and 1118 deletions

View File

@ -11,7 +11,7 @@
if (act) act->func.go = _e_actions_act_##name##_go; \
}
#define ACT_FN_GO(act, use) \
static void _e_actions_act_##act##_go(E_Object *obj __UNUSED__, const char *params use)
static void _e_actions_act_##act##_go(E_Object * obj __UNUSED__, const char *params use)
#define ACT_GO_MOUSE(name) \
{ \
@ -19,7 +19,7 @@
if (act) act->func.go_mouse = _e_actions_act_##name##_go_mouse; \
}
#define ACT_FN_GO_MOUSE(act, use) \
static void _e_actions_act_##act##_go_mouse(E_Object *obj __UNUSED__, const char *params use, Ecore_Event_Mouse_Button *ev __UNUSED__)
static void _e_actions_act_##act##_go_mouse(E_Object * obj __UNUSED__, const char *params use, Ecore_Event_Mouse_Button * ev __UNUSED__)
#define ACT_GO_WHEEL(name) \
{ \
@ -27,7 +27,7 @@
if (act) act->func.go_wheel = _e_actions_act_##name##_go_wheel; \
}
#define ACT_FN_GO_WHEEL(act, use) \
static void _e_actions_act_##act##_go_wheel(E_Object *obj __UNUSED__, const char *params use, Ecore_Event_Mouse_Wheel *ev __UNUSED__)
static void _e_actions_act_##act##_go_wheel(E_Object * obj __UNUSED__, const char *params use, Ecore_Event_Mouse_Wheel * ev __UNUSED__)
#define ACT_GO_EDGE(name) \
{ \
@ -35,7 +35,7 @@
if (act) act->func.go_edge = _e_actions_act_##name##_go_edge; \
}
#define ACT_FN_GO_EDGE(act, use) \
static void _e_actions_act_##act##_go_edge(E_Object *obj __UNUSED__, const char *params use, E_Event_Zone_Edge *ev __UNUSED__)
static void _e_actions_act_##act##_go_edge(E_Object * obj __UNUSED__, const char *params use, E_Event_Zone_Edge * ev __UNUSED__)
#define ACT_GO_SIGNAL(name) \
{ \
@ -43,7 +43,7 @@
if (act) act->func.go_signal = _e_actions_act_##name##_go_signal; \
}
#define ACT_FN_GO_SIGNAL(act, use) \
static void _e_actions_act_##act##_go_signal(E_Object *obj __UNUSED__, const char *params use, const char *sig, const char *src)
static void _e_actions_act_##act##_go_signal(E_Object * obj __UNUSED__, const char *params use, const char *sig, const char *src)
#define ACT_GO_KEY(name) \
{ \
@ -51,7 +51,7 @@
if (act) act->func.go_key = _e_actions_act_##name##_go_key; \
}
#define ACT_FN_GO_KEY(act, use) \
static void _e_actions_act_##act##_go_key(E_Object *obj __UNUSED__, const char *params use, Ecore_Event_Key *ev __UNUSED__)
static void _e_actions_act_##act##_go_key(E_Object * obj __UNUSED__, const char *params use, Ecore_Event_Key * ev __UNUSED__)
#define ACT_END(name) \
{ \
@ -59,7 +59,7 @@
if (act) act->func.end = _e_actions_act_##name##_end; \
}
#define ACT_FN_END(act, use) \
static void _e_actions_act_##act##_end(E_Object *obj __UNUSED__, const char *params use)
static void _e_actions_act_##act##_end(E_Object * obj __UNUSED__, const char *params use)
#define ACT_END_MOUSE(name) \
{ \
@ -67,7 +67,7 @@
if (act) act->func.end_mouse = _e_actions_act_##name##_end_mouse; \
}
#define ACT_FN_END_MOUSE(act, use) \
static void _e_actions_act_##act##_end_mouse(E_Object *obj __UNUSED__, const char *params use, Ecore_Event_Mouse_Button *ev __UNUSED__)
static void _e_actions_act_##act##_end_mouse(E_Object * obj __UNUSED__, const char *params use, Ecore_Event_Mouse_Button * ev __UNUSED__)
#define ACT_END_KEY(name) \
{ \
@ -75,7 +75,7 @@
if (act) act->func.end_key = _e_actions_act_##name##_end_key; \
}
#define ACT_FN_END_KEY(act, use) \
static void _e_actions_act_##act##_end_key(E_Object *obj __UNUSED__, const char *params use, Ecore_Event_Key *ev __UNUSED__)
static void _e_actions_act_##act##_end_key(E_Object * obj __UNUSED__, const char *params use, Ecore_Event_Key * ev __UNUSED__)
#define ACT_GO_ACPI(name) \
{ \
@ -83,7 +83,7 @@
if (act) act->func.go_acpi = _e_actions_act_##name##_go_acpi; \
}
#define ACT_FN_GO_ACPI(act, use) \
static void _e_actions_act_##act##_go_acpi(E_Object *obj __UNUSED__, const char *params use, E_Event_Acpi *ev __UNUSED__)
static void _e_actions_act_##act##_go_acpi(E_Object * obj __UNUSED__, const char *params use, E_Event_Acpi * ev __UNUSED__)
/* local subsystem functions */
static void _e_action_free(E_Action *act);
@ -498,9 +498,9 @@ ACT_FN_GO(window_fullscreen_toggle, )
e_border_unfullscreen(bd);
else if (!params || *params == '\0')
e_border_fullscreen(bd, e_config->fullscreen_policy);
else if (! strcmp(params, "resize"))
else if (!strcmp(params, "resize"))
e_border_fullscreen(bd, E_FULLSCREEN_RESIZE);
else if (! strcmp(params, "zoom"))
else if (!strcmp(params, "zoom"))
e_border_fullscreen(bd, E_FULLSCREEN_ZOOM);
}
}
@ -850,7 +850,7 @@ ACT_FN_GO(window_border_cycle, __UNUSED__)
}
}
/***************************************************************************/
/***************************************************************************/
ACT_FN_GO(window_pinned_toggle, __UNUSED__)
{
if ((!obj) || (obj->type != E_BORDER_TYPE))
@ -1079,11 +1079,13 @@ ACT_FN_GO(window_push, )
e_zone_useful_geometry_get(bd->zone, &zx, &zy, &zw, &zh);
if (hdir < 0) x = zx;
else if (hdir > 0) x = zx + zw - bd->w;
else if (hdir > 0)
x = zx + zw - bd->w;
else x = bd->x;
if (vdir < 0) y = zy;
else if (vdir > 0) y = zy + zh - bd->h;
else if (vdir > 0)
y = zy + zh - bd->h;
else y = bd->y;
bd_list = e_container_border_list_first(bd->zone->container);
@ -1238,12 +1240,18 @@ _e_actions_zone_get(E_Object *obj)
if (obj)
{
if (obj->type == (int)E_MANAGER_TYPE) return e_util_zone_current_get((E_Manager *)obj);
else if (obj->type == (int)E_CONTAINER_TYPE) return e_util_zone_current_get(((E_Container *)obj)->manager);
else if (obj->type == (int)E_ZONE_TYPE) return (E_Zone *)obj;
else if (obj->type == (int)E_BORDER_TYPE) return ((E_Border *)obj)->zone;
else if (obj->type == (int)E_SHELF_TYPE) return ((E_Shelf *)obj)->zone;
else if (obj->type == (int)E_POPUP_TYPE) return ((E_Popup *)obj)->zone;
else if (obj->type == (int)E_WIN_TYPE) return ((E_Win *)obj)->border->zone;
else if (obj->type == (int)E_CONTAINER_TYPE)
return e_util_zone_current_get(((E_Container *)obj)->manager);
else if (obj->type == (int)E_ZONE_TYPE)
return (E_Zone *)obj;
else if (obj->type == (int)E_BORDER_TYPE)
return ((E_Border *)obj)->zone;
else if (obj->type == (int)E_SHELF_TYPE)
return ((E_Shelf *)obj)->zone;
else if (obj->type == (int)E_POPUP_TYPE)
return ((E_Popup *)obj)->zone;
else if (obj->type == (int)E_WIN_TYPE)
return ((E_Win *)obj)->border->zone;
}
return e_util_zone_current_get(e_manager_current_get());
}
@ -1323,6 +1331,7 @@ ACT_FN_GO_EDGE(desk_flip_in_direction, )
wev->curr.x = zone->w - offset;
}
break;
case E_ZONE_EDGE_RIGHT:
if (ACT_FLIP_RIGHT(zone))
{
@ -1332,6 +1341,7 @@ ACT_FN_GO_EDGE(desk_flip_in_direction, )
wev->curr.x = offset;
}
break;
case E_ZONE_EDGE_TOP:
if (ACT_FLIP_UP(zone))
{
@ -1341,6 +1351,7 @@ ACT_FN_GO_EDGE(desk_flip_in_direction, )
wev->curr.y = zone->h - offset;
}
break;
case E_ZONE_EDGE_BOTTOM:
if (ACT_FLIP_DOWN(zone))
{
@ -1350,6 +1361,7 @@ ACT_FN_GO_EDGE(desk_flip_in_direction, )
wev->curr.y = offset;
}
break;
case E_ZONE_EDGE_TOP_LEFT:
if (ACT_FLIP_UP_LEFT(zone))
{
@ -1359,6 +1371,7 @@ ACT_FN_GO_EDGE(desk_flip_in_direction, )
wev->curr.y = zone->h - offset;
}
break;
case E_ZONE_EDGE_TOP_RIGHT:
if (ACT_FLIP_UP_RIGHT(zone))
{
@ -1368,6 +1381,7 @@ ACT_FN_GO_EDGE(desk_flip_in_direction, )
wev->curr.y = zone->h - offset;
}
break;
case E_ZONE_EDGE_BOTTOM_LEFT:
if (ACT_FLIP_DOWN_LEFT(zone))
{
@ -1377,6 +1391,7 @@ ACT_FN_GO_EDGE(desk_flip_in_direction, )
wev->curr.x = zone->w - offset;
}
break;
case E_ZONE_EDGE_BOTTOM_RIGHT:
if (ACT_FLIP_DOWN_RIGHT(zone))
{
@ -1386,6 +1401,7 @@ ACT_FN_GO_EDGE(desk_flip_in_direction, )
wev->curr.x = offset;
}
break;
default:
break;
}
@ -1433,9 +1449,8 @@ ACT_FN_GO(desk_linear_flip_to, )
}
}
#define DESK_ACTION_ALL(zone, act) \
E_Zone *zone; \
E_Zone * zone; \
Eina_List *lm, *lc, *lz; \
E_Container *con; \
E_Manager *man; \
@ -1448,7 +1463,6 @@ ACT_FN_GO(desk_linear_flip_to, )
} \
}
/***************************************************************************/
ACT_FN_GO(desk_flip_by_all, )
{
@ -1583,7 +1597,7 @@ ACT_FN_GO(screen_send_by, )
}
#define ZONE_DESK_ACTION(con_num, zone_num, zone, act) \
E_Zone *zone; \
E_Zone * zone; \
if ((con_num < 0) || (zone_num < 0)) { \
Eina_List *l, *ll, *lll; \
E_Container *con; \
@ -2350,7 +2364,7 @@ ACT_FN_GO(shelf_show, )
}
/***************************************************************************/
#define ACT_SHELF_SHOW(params, es) \
if ((!params) || (params && (fnmatch(params, es->name, 0) == 0))) \
if ((!params) || (params && (fnmatch(params, es->name, 0) == 0))) \
{ \
e_shelf_toggle(es, 1); \
e_shelf_toggle(es, 0); \
@ -2374,7 +2388,7 @@ ACT_FN_GO_EDGE(shelf_show, )
EINA_LIST_FOREACH(e_shelf_list(), l, es)
{
switch(ev->edge)
switch (ev->edge)
{
case E_ZONE_EDGE_LEFT:
if ((es->gadcon->orient == E_GADCON_ORIENT_LEFT ||
@ -2383,6 +2397,7 @@ ACT_FN_GO_EDGE(shelf_show, )
(ev->y >= es->y) && (ev->y <= (es->y + es->h)))
ACT_SHELF_SHOW(params, es);
break;
case E_ZONE_EDGE_RIGHT:
if ((es->gadcon->orient == E_GADCON_ORIENT_RIGHT ||
es->gadcon->orient == E_GADCON_ORIENT_CORNER_RT ||
@ -2390,6 +2405,7 @@ ACT_FN_GO_EDGE(shelf_show, )
(ev->y >= es->y) && (ev->y <= (es->y + es->h)))
ACT_SHELF_SHOW(params, es);
break;
case E_ZONE_EDGE_TOP:
if ((es->gadcon->orient == E_GADCON_ORIENT_TOP ||
es->gadcon->orient == E_GADCON_ORIENT_CORNER_TL ||
@ -2397,6 +2413,7 @@ ACT_FN_GO_EDGE(shelf_show, )
(ev->x >= es->x) && (ev->x <= (es->x + es->w)))
ACT_SHELF_SHOW(params, es);
break;
case E_ZONE_EDGE_BOTTOM:
if ((es->gadcon->orient == E_GADCON_ORIENT_BOTTOM ||
es->gadcon->orient == E_GADCON_ORIENT_CORNER_BL ||
@ -2404,6 +2421,7 @@ ACT_FN_GO_EDGE(shelf_show, )
(ev->x >= es->x) && (ev->x <= (es->x + es->w)))
ACT_SHELF_SHOW(params, es);
break;
default:
break;
}
@ -2506,22 +2524,22 @@ _delayed_action_list_parse(Delayed_Action *da, const char *params)
p = params;
while (*p)
{
if ((*p == '[') && ((p == params) || ((p > params) && (p[-1] != '\\')))) {a1start = p + 1; break;}
if ((*p == '[') && ((p == params) || ((p > params) && (p[-1] != '\\')))) {a1start = p + 1; break; }
p++;
}
while (*p)
{
if ((*p == ']') && ((p == params) || ((p > params) && (p[-1] != '\\')))) {a1stop = p; break;}
if ((*p == ']') && ((p == params) || ((p > params) && (p[-1] != '\\')))) {a1stop = p; break; }
p++;
}
while (*p)
{
if ((*p == '[') && ((p == params) || ((p > params) && (p[-1] != '\\')))) {a2start = p + 1; break;}
if ((*p == '[') && ((p == params) || ((p > params) && (p[-1] != '\\')))) {a2start = p + 1; break; }
p++;
}
while (*p)
{
if ((*p == ']') && ((p == params) || ((p > params) && (p[-1] != '\\')))) {a2stop = p; break;}
if ((*p == ']') && ((p == params) || ((p > params) && (p[-1] != '\\')))) {a2stop = p; break; }
p++;
}
if ((a1start) && (a2start) && (a1stop) && (a2stop))
@ -2603,7 +2621,7 @@ _delayed_action_mouse_del(E_Object *obj, const char *params __UNUSED__, Ecore_Ev
EINA_LIST_FOREACH(_delayed_actions, l, da)
{
if ((da->obj == obj) && (da->mouse) &&
((int) ev->buttons == da->button))
((int)ev->buttons == da->button))
{
_delayed_action_do(da);
_delayed_action_free(da);
@ -3425,3 +3443,4 @@ _action_groups_sort_cb(const void *d1, const void *d2)
if (!(g2 = d2)) return -1;
return strcmp(g1->act_grp, g2->act_grp);
}