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
e_drop_handler_action_get()
e_drop_handler_action_get(void)
{
return _action;
}
@ -790,6 +790,7 @@ _e_drag_update(Ecore_X_Window root, int x, int y, Ecore_X_Atom action)
if (_drag_current)
{
E_Drop_Handler *h;
EINA_LIST_FOREACH(_drop_handlers, l, h)
{
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)
{
E_Drop_Handler *h;
EINA_LIST_FOREACH(_drop_handlers, l, h)
{
if (!h->active) continue;
@ -944,8 +946,7 @@ _e_drag_end(Ecore_X_Window root, int x, int y)
ev.x = x - dx;
ev.y = y - dy;
if ((_e_drag_win_matches(h, win, 0)) &&
((h->cb.drop) &&
(E_INSIDE(x, y, dx, dy, dw, dh))))
((h->cb.drop) && (E_INSIDE(x, y, dx, dy, dw, dh))))
{
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)
{
if (!h->active)
continue;
if (!h->active) continue;
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)
{
if (!h->active)
continue;
if (!h->active) continue;
if (h->entered)
{
@ -1163,7 +1162,9 @@ _e_dnd_cb_mouse_move(void *data, int type, void *event)
ev = event;
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;
}
@ -1252,10 +1253,10 @@ _e_dnd_cb_event_dnd_leave(void *data, int type, void *event)
if (_xdnd)
{
E_Drop_Handler *h;
EINA_LIST_FOREACH(_drop_handlers, l, h)
{
if (!h->active)
continue;
if (!h->active) continue;
if (h->entered)
{
@ -1312,20 +1313,14 @@ _e_dnd_cb_event_dnd_position(void *data, int type, void *event)
}
}
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
{
responsive = _e_drag_update(ev->win, ev->position.x, ev->position.y, ev->action);
if (responsive)
{
ecore_x_dnd_send_status(1, 0, rect, _action);
}
ecore_x_dnd_send_status(1, 0, rect, _action);
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; ////
// 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;
if (ev->win != _drag_win) return 1;
return 1;
}
@ -1350,8 +1344,7 @@ _e_dnd_cb_event_dnd_finished(void *data, int type, void *event)
ev = event;
if (!ev->completed)
return 1;
if (!ev->completed) return 1;
if (_drag_current)
{
@ -1451,9 +1444,7 @@ _e_dnd_cb_event_dnd_selection(void *data, int type, void *event)
eina_list_free(l);
}
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
* the drop property... */
ecore_x_dnd_send_finished();

View File

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