Formatting. Add missing void in function declaration.

SVN revision: 40835
This commit is contained in:
Christopher Michael 2009-05-26 14:44:19 +00:00
parent 6bf189dec6
commit 7c78ec900e
2 changed files with 45 additions and 52 deletions

View File

@ -547,7 +547,7 @@ e_drop_handler_action_set(Ecore_X_Atom action)
} }
EAPI Ecore_X_Atom EAPI Ecore_X_Atom
e_drop_handler_action_get() e_drop_handler_action_get(void)
{ {
return _action; return _action;
} }
@ -790,6 +790,7 @@ _e_drag_update(Ecore_X_Window root, int x, int y, Ecore_X_Atom action)
if (_drag_current) if (_drag_current)
{ {
E_Drop_Handler *h; E_Drop_Handler *h;
EINA_LIST_FOREACH(_drop_handlers, l, h) EINA_LIST_FOREACH(_drop_handlers, l, h)
{ {
if (!h->active) continue; if (!h->active) continue;
@ -843,6 +844,7 @@ _e_drag_update(Ecore_X_Window root, int x, int y, Ecore_X_Atom action)
else if (_xdnd) else if (_xdnd)
{ {
E_Drop_Handler *h; E_Drop_Handler *h;
EINA_LIST_FOREACH(_drop_handlers, l, h) EINA_LIST_FOREACH(_drop_handlers, l, h)
{ {
if (!h->active) continue; if (!h->active) continue;
@ -944,8 +946,7 @@ _e_drag_end(Ecore_X_Window root, int x, int y)
ev.x = x - dx; ev.x = x - dx;
ev.y = y - dy; ev.y = y - dy;
if ((_e_drag_win_matches(h, win, 0)) && if ((_e_drag_win_matches(h, win, 0)) &&
((h->cb.drop) && ((h->cb.drop) && (E_INSIDE(x, y, dx, dy, dw, dh))))
(E_INSIDE(x, y, dx, dy, dw, dh))))
{ {
if (_drag_current->cb.convert) if (_drag_current->cb.convert)
{ {
@ -977,8 +978,7 @@ _e_drag_end(Ecore_X_Window root, int x, int y)
EINA_LIST_FOREACH(_drop_handlers, l, h) EINA_LIST_FOREACH(_drop_handlers, l, h)
{ {
if (!h->active) if (!h->active) continue;
continue;
if (h->entered) if (h->entered)
{ {
@ -1032,8 +1032,7 @@ _e_drag_xdnd_end(Ecore_X_Window win, int x, int y)
EINA_LIST_FOREACH(_drop_handlers, l, h) EINA_LIST_FOREACH(_drop_handlers, l, h)
{ {
if (!h->active) if (!h->active) continue;
continue;
if (h->entered) if (h->entered)
{ {
@ -1163,7 +1162,9 @@ _e_dnd_cb_mouse_move(void *data, int type, void *event)
ev = event; ev = event;
if (ev->window != _drag_win) return 1; if (ev->window != _drag_win) return 1;
if (!_xdnd) _e_drag_update(_drag_win_root, ev->x, ev->y, ECORE_X_ATOM_XDND_ACTION_PRIVATE); if (!_xdnd)
_e_drag_update(_drag_win_root, ev->x, ev->y,
ECORE_X_ATOM_XDND_ACTION_PRIVATE);
return 1; return 1;
} }
@ -1252,10 +1253,10 @@ _e_dnd_cb_event_dnd_leave(void *data, int type, void *event)
if (_xdnd) if (_xdnd)
{ {
E_Drop_Handler *h; E_Drop_Handler *h;
EINA_LIST_FOREACH(_drop_handlers, l, h) EINA_LIST_FOREACH(_drop_handlers, l, h)
{ {
if (!h->active) if (!h->active) continue;
continue;
if (h->entered) if (h->entered)
{ {
@ -1312,20 +1313,14 @@ _e_dnd_cb_event_dnd_position(void *data, int type, void *event)
} }
} }
if (!active) if (!active)
{ ecore_x_dnd_send_status(0, 0, rect, ECORE_X_DND_ACTION_PRIVATE);
ecore_x_dnd_send_status(0, 0, rect, ECORE_X_DND_ACTION_PRIVATE);
}
else else
{ {
responsive = _e_drag_update(ev->win, ev->position.x, ev->position.y, ev->action); responsive = _e_drag_update(ev->win, ev->position.x, ev->position.y, ev->action);
if (responsive) if (responsive)
{ ecore_x_dnd_send_status(1, 0, rect, _action);
ecore_x_dnd_send_status(1, 0, rect, _action);
}
else else
{ ecore_x_dnd_send_status(1, 0, rect, ECORE_X_ATOM_XDND_ACTION_PRIVATE);
ecore_x_dnd_send_status(1, 0, rect, ECORE_X_ATOM_XDND_ACTION_PRIVATE);
}
} }
// double t2 = ecore_time_get() - t1; //// // double t2 = ecore_time_get() - t1; ////
// printf("DND POS EV 2 %3.7f\n", t2); //// // printf("DND POS EV 2 %3.7f\n", t2); ////
@ -1339,7 +1334,6 @@ _e_dnd_cb_event_dnd_status(void *data, int type, void *event)
ev = event; ev = event;
if (ev->win != _drag_win) return 1; if (ev->win != _drag_win) return 1;
return 1; return 1;
} }
@ -1350,8 +1344,7 @@ _e_dnd_cb_event_dnd_finished(void *data, int type, void *event)
ev = event; ev = event;
if (!ev->completed) if (!ev->completed) return 1;
return 1;
if (_drag_current) if (_drag_current)
{ {
@ -1451,9 +1444,7 @@ _e_dnd_cb_event_dnd_selection(void *data, int type, void *event)
eina_list_free(l); eina_list_free(l);
} }
else else
{ _e_drag_xdnd_end(ev->win, _xdnd->x, _xdnd->y);
_e_drag_xdnd_end(ev->win, _xdnd->x, _xdnd->y);
}
/* FIXME: When to execute this? It could be executed in ecore_x after getting /* FIXME: When to execute this? It could be executed in ecore_x after getting
* the drop property... */ * the drop property... */
ecore_x_dnd_send_finished(); ecore_x_dnd_send_finished();

View File

@ -26,26 +26,27 @@ typedef struct _E_Event_Dnd_Drop E_Event_Dnd_Drop;
struct _E_Drag struct _E_Drag
{ {
E_Object e_obj_inherit; E_Object e_obj_inherit;
void *data; void *data;
int data_size; int data_size;
E_Drag_Type type; E_Drag_Type type;
struct { struct
{
void *(*convert)(E_Drag *drag, const char *type); void *(*convert)(E_Drag *drag, const char *type);
void (*finished)(E_Drag *drag, int dropped); void (*finished)(E_Drag *drag, int dropped);
void (*key_down)(E_Drag *drag, Ecore_Event_Key *e); void (*key_down)(E_Drag *drag, Ecore_Event_Key *e);
void (*key_up)(E_Drag *drag, Ecore_Event_Key *e); void (*key_up)(E_Drag *drag, Ecore_Event_Key *e);
} cb; } cb;
E_Container *container; E_Container *container;
Ecore_Evas *ecore_evas; Ecore_Evas *ecore_evas;
Evas *evas; Evas *evas;
Ecore_X_Window evas_win; Ecore_X_Window evas_win;
E_Container_Shape *shape; E_Container_Shape *shape;
Evas_Object *object; Evas_Object *object;
int x, y, w, h; int x, y, w, h;
int dx, dy; int dx, dy;
@ -53,33 +54,34 @@ struct _E_Drag
int shape_rects_num; int shape_rects_num;
Ecore_X_Rectangle *shape_rects; Ecore_X_Rectangle *shape_rects;
unsigned int layer; unsigned int layer;
unsigned char visible : 1; unsigned char visible : 1;
unsigned char need_shape_export : 1; unsigned char need_shape_export : 1;
unsigned char xy_update : 1; unsigned char xy_update : 1;
unsigned int num_types; unsigned int num_types;
const char *types[]; const char *types[];
}; };
struct _E_Drop_Handler struct _E_Drop_Handler
{ {
struct { struct
{
void (*enter)(void *data, const char *type, void *event); void (*enter)(void *data, const char *type, void *event);
void (*move)(void *data, const char *type, void *event); void (*move)(void *data, const char *type, void *event);
void (*leave)(void *data, const char *type, void *event); void (*leave)(void *data, const char *type, void *event);
void (*drop)(void *data, const char *type, void *event); void (*drop)(void *data, const char *type, void *event);
void *data; void *data;
} cb; } cb;
E_Object *obj; E_Object *obj;
int x, y, w, h; int x, y, w, h;
unsigned char active : 1; unsigned char active : 1;
unsigned char entered : 1; unsigned char entered : 1;
const char *active_type; const char *active_type;
unsigned int num_types; unsigned int num_types;
const char *types[]; const char *types[];
}; };
struct _E_Event_Dnd_Enter struct _E_Event_Dnd_Enter
@ -144,12 +146,12 @@ EAPI int e_drop_xdnd_register_set(Ecore_X_Window win, int reg);
EAPI void e_drop_handler_responsive_set(E_Drop_Handler *handler); EAPI void e_drop_handler_responsive_set(E_Drop_Handler *handler);
EAPI int e_drop_handler_responsive_get(const E_Drop_Handler *handler); EAPI int e_drop_handler_responsive_get(const E_Drop_Handler *handler);
EAPI void e_drop_handler_action_set(Ecore_X_Atom action); EAPI void e_drop_handler_action_set(Ecore_X_Atom action);
EAPI Ecore_X_Atom e_drop_handler_action_get(); EAPI Ecore_X_Atom e_drop_handler_action_get(void);
#endif #endif
#endif #endif
#ifndef MIN #ifndef MIN
#define MIN(x, y) (((x) > (y)) ? (y) : (x)) # define MIN(x, y) (((x) > (y)) ? (y) : (x))
#endif #endif