Fix timestamps unit. Allow cinetic animation in elementary lists

SVN revision: 42774
This commit is contained in:
Vincent Torri 2009-09-28 17:36:43 +00:00
parent d7c76122b0
commit e069ea2fa1
8 changed files with 69 additions and 69 deletions

View File

@ -139,7 +139,7 @@ struct _Ecore_Win32_Event_Mouse_In
Ecore_Win32_Window *window;
int x;
int y;
double time;
long time;
};
struct _Ecore_Win32_Event_Mouse_Out
@ -147,19 +147,19 @@ struct _Ecore_Win32_Event_Mouse_Out
Ecore_Win32_Window *window;
int x;
int y;
double time;
long time;
};
struct _Ecore_Win32_Event_Window_Focus_In
{
Ecore_Win32_Window *window;
double time;
long long time;
};
struct _Ecore_Win32_Event_Window_Focus_Out
{
Ecore_Win32_Window *window;
double time;
long time;
};
struct _Ecore_Win32_Event_Window_Damage
@ -169,31 +169,31 @@ struct _Ecore_Win32_Event_Window_Damage
int y;
int width;
int height;
double time;
long time;
};
struct _Ecore_Win32_Event_Window_Create
{
Ecore_Win32_Window *window;
double time;
long time;
};
struct _Ecore_Win32_Event_Window_Destroy
{
Ecore_Win32_Window *window;
double time;
long time;
};
struct _Ecore_Win32_Event_Window_Hide
{
Ecore_Win32_Window *window;
double time;
long time;
};
struct _Ecore_Win32_Event_Window_Show
{
Ecore_Win32_Window *window;
double time;
long time;
};
struct _Ecore_Win32_Event_Window_Configure
@ -204,7 +204,7 @@ struct _Ecore_Win32_Event_Window_Configure
int y;
int width;
int height;
double time;
long time;
};
struct _Ecore_Win32_Event_Window_Resize
@ -212,13 +212,13 @@ struct _Ecore_Win32_Event_Window_Resize
Ecore_Win32_Window *window;
int width;
int height;
double time;
long time;
};
struct _Ecore_Win32_Event_Window_Delete_Request
{
Ecore_Win32_Window *window;
double time;
long time;
};
#define ECORE_WIN32_DND_EVENT_DRAG_ENTER 1
@ -248,7 +248,7 @@ EAPI extern int ECORE_WIN32_EVENT_WINDOW_DELETE_REQUEST;
EAPI int ecore_win32_init();
EAPI int ecore_win32_shutdown();
EAPI int ecore_win32_screen_depth_get();
EAPI double ecore_win32_current_time_get(void);
EAPI long ecore_win32_current_time_get(void);
EAPI void ecore_win32_message_loop_begin (void);
/* Window */

View File

@ -37,7 +37,7 @@ DEFINE_OLEGUID(IID_IUnknown, 0x00000000L, 0, 0);
HINSTANCE _ecore_win32_instance = NULL;
double _ecore_win32_double_click_time = 0.25;
double _ecore_win32_event_last_time = 0.0;
long _ecore_win32_event_last_time = 0;
Ecore_Win32_Window *_ecore_win32_event_last_window = NULL;
int _ecore_win32_log_dom = -1;
@ -242,7 +242,7 @@ ecore_win32_double_click_time_get(void)
/**
* Return the last event time
*/
double
long
ecore_win32_current_time_get(void)
{
return _ecore_win32_event_last_time;

View File

@ -27,8 +27,8 @@
static Ecore_Win32_Window *_ecore_win32_mouse_down_last_window = NULL;
static Ecore_Win32_Window *_ecore_win32_mouse_down_last_last_window = NULL;
static double _ecore_win32_mouse_down_last_time = 0;
static double _ecore_win32_mouse_down_last_last_time = 0;
static long _ecore_win32_mouse_down_last_time = 0 ;
static long _ecore_win32_mouse_down_last_last_time = 0 ;
static int _ecore_win32_mouse_down_did_triple = 0;
static int _ecore_win32_mouse_up_count = 0;
@ -95,7 +95,7 @@ _ecore_win32_event_handle_key_press(Ecore_Win32_Callback_Data *msg,
free(e);
return;
}
e->timestamp = (double)msg->time / 1000.0;
e->timestamp = msg->time;
_ecore_win32_event_last_time = e->timestamp;
@ -145,7 +145,7 @@ _ecore_win32_event_handle_key_release(Ecore_Win32_Callback_Data *msg,
free(e);
return;
}
e->timestamp = (double)msg->time / 1000.0;
e->timestamp = msg->time;
_ecore_win32_event_last_time = e->timestamp;
@ -175,7 +175,7 @@ _ecore_win32_event_handle_button_press(Ecore_Win32_Callback_Data *msg,
e->z = GET_WHEEL_DELTA_WPARAM(msg->window_param) > 0 ? -1 : 1;
e->x = GET_X_LPARAM(msg->data_param);
e->y = GET_Y_LPARAM(msg->data_param);
e->timestamp = (double)msg->time / 1000.0;
e->timestamp = msg->time;
_ecore_win32_event_last_time = e->timestamp;
_ecore_win32_event_last_window = (Ecore_Win32_Window *)e->window;
@ -193,7 +193,7 @@ _ecore_win32_event_handle_button_press(Ecore_Win32_Callback_Data *msg,
e->window = (Ecore_Window)window;
e->x = GET_X_LPARAM(msg->data_param);
e->y = GET_Y_LPARAM(msg->data_param);
e->timestamp = (double)msg->time / 1000.0;
e->timestamp = msg->time;
_ecore_win32_event_last_time = e->timestamp;
_ecore_win32_event_last_window = (Ecore_Win32_Window *)e->window;
@ -208,8 +208,8 @@ _ecore_win32_event_handle_button_press(Ecore_Win32_Callback_Data *msg,
{
_ecore_win32_mouse_down_last_window = NULL;
_ecore_win32_mouse_down_last_last_window = NULL;
_ecore_win32_mouse_down_last_time = 0.0;
_ecore_win32_mouse_down_last_last_time = 0.0;
_ecore_win32_mouse_down_last_time = 0;
_ecore_win32_mouse_down_last_last_time = 0;
}
e = (Ecore_Event_Mouse_Button *)calloc(1, sizeof(Ecore_Event_Mouse_Button));
@ -219,13 +219,13 @@ _ecore_win32_event_handle_button_press(Ecore_Win32_Callback_Data *msg,
e->buttons = button;
e->x = GET_X_LPARAM(msg->data_param);
e->y = GET_Y_LPARAM(msg->data_param);
e->timestamp = (double)msg->time / 1000.0;
e->timestamp = msg->time;
if (((e->timestamp - _ecore_win32_mouse_down_last_time) <= _ecore_win32_double_click_time) &&
if (((e->timestamp - _ecore_win32_mouse_down_last_time) <= (long)(1000 * _ecore_win32_double_click_time)) &&
(e->window == (Ecore_Window)_ecore_win32_mouse_down_last_window))
e->double_click = 1;
if (((e->timestamp - _ecore_win32_mouse_down_last_last_time) <= (2.0 * _ecore_win32_double_click_time)) &&
if (((e->timestamp - _ecore_win32_mouse_down_last_last_time) <= (long)(2 * 1000 * _ecore_win32_double_click_time)) &&
(e->window == (Ecore_Window)_ecore_win32_mouse_down_last_window) &&
(e->window == (Ecore_Window)_ecore_win32_mouse_down_last_last_window))
{
@ -273,7 +273,7 @@ _ecore_win32_event_handle_button_release(Ecore_Win32_Callback_Data *msg,
e->window = (Ecore_Window)window;
e->x = GET_X_LPARAM(msg->data_param);
e->y = GET_Y_LPARAM(msg->data_param);
e->timestamp = (double)msg->time / 1000.0;
e->timestamp = msg->time;
_ecore_win32_event_last_time = e->timestamp;
_ecore_win32_event_last_window = (Ecore_Win32_Window *)e->window;
@ -291,17 +291,17 @@ _ecore_win32_event_handle_button_release(Ecore_Win32_Callback_Data *msg,
e->buttons = button;
e->x = GET_X_LPARAM(msg->data_param);
e->y = GET_Y_LPARAM(msg->data_param);
e->timestamp = (double)msg->time / 1000.0;
e->timestamp = msg->time;
_ecore_win32_mouse_up_count++;
if ((_ecore_win32_mouse_up_count >= 2) &&
((e->timestamp - _ecore_win32_mouse_down_last_time) <= _ecore_win32_double_click_time) &&
((e->timestamp - _ecore_win32_mouse_down_last_time) <= (long)(1000 * _ecore_win32_double_click_time)) &&
(e->window == (Ecore_Window)_ecore_win32_mouse_down_last_window))
e->double_click = 1;
if ((_ecore_win32_mouse_up_count >= 3) &&
((e->timestamp - _ecore_win32_mouse_down_last_last_time) <= (2.0 * _ecore_win32_double_click_time)) &&
((e->timestamp - _ecore_win32_mouse_down_last_last_time) <= (long)(2 * 1000 * _ecore_win32_double_click_time)) &&
(e->window == (Ecore_Window)_ecore_win32_mouse_down_last_window) &&
(e->window == (Ecore_Window)_ecore_win32_mouse_down_last_last_window))
e->triple_click = 1;
@ -326,7 +326,7 @@ _ecore_win32_event_handle_motion_notify(Ecore_Win32_Callback_Data *msg)
e->window = (Ecore_Window)GetWindowLong(msg->window, GWL_USERDATA);
e->x = GET_X_LPARAM(msg->data_param);
e->y = GET_Y_LPARAM(msg->data_param);
e->timestamp = (double)msg->time / 1000.0;
e->timestamp = msg->time;
ecore_event_add(ECORE_EVENT_MOUSE_MOVE, e, NULL, NULL);
}
@ -345,7 +345,7 @@ _ecore_win32_event_handle_enter_notify(Ecore_Win32_Callback_Data *msg)
e->window = (Ecore_Window)GetWindowLong(msg->window, GWL_USERDATA);
e->x = msg->x;
e->y = msg->y;
e->timestamp = (double)msg->time / 1000.0;
e->timestamp = msg->time;
_ecore_win32_event_last_time = e->timestamp;
_ecore_win32_event_last_window = (Ecore_Win32_Window *)e->window;
@ -362,7 +362,7 @@ _ecore_win32_event_handle_enter_notify(Ecore_Win32_Callback_Data *msg)
e->window = (void *)GetWindowLong(msg->window, GWL_USERDATA);
e->x = msg->x;
e->y = msg->y;
e->time = (double)msg->time / 1000.0;
e->time = msg->time ;
_ecore_win32_event_last_time = e->time;
@ -384,7 +384,7 @@ _ecore_win32_event_handle_leave_notify(Ecore_Win32_Callback_Data *msg)
e->window = (Ecore_Window)GetWindowLong(msg->window, GWL_USERDATA);
e->x = msg->x;
e->y = msg->y;
e->timestamp = (double)msg->time / 1000.0;
e->timestamp = msg->time;
_ecore_win32_event_last_time = e->timestamp;
_ecore_win32_event_last_window = (Ecore_Win32_Window *)e->window;
@ -401,7 +401,7 @@ _ecore_win32_event_handle_leave_notify(Ecore_Win32_Callback_Data *msg)
e->window = (void *)GetWindowLong(msg->window, GWL_USERDATA);
e->x = msg->x;
e->y = msg->y;
e->time = (double)msg->time / 1000.0;
e->time = msg->time;
_ecore_win32_event_last_time = e->time;

View File

@ -94,7 +94,7 @@ struct _Ecore_Win32_Window
extern HINSTANCE _ecore_win32_instance;
extern double _ecore_win32_double_click_time;
extern double _ecore_win32_event_last_time;
extern long _ecore_win32_event_last_time;
extern Ecore_Win32_Window *_ecore_win32_event_last_window;

View File

@ -60,7 +60,7 @@ struct _Ecore_WinCE_Event_Mouse_In
Ecore_WinCE_Window *window;
int x;
int y;
double time;
long time;
};
struct _Ecore_WinCE_Event_Mouse_Out
@ -68,19 +68,19 @@ struct _Ecore_WinCE_Event_Mouse_Out
Ecore_WinCE_Window *window;
int x;
int y;
double time;
long time;
};
struct _Ecore_WinCE_Event_Window_Focus_In
{
Ecore_WinCE_Window *window;
double time;
long time;
};
struct _Ecore_WinCE_Event_Window_Focus_Out
{
Ecore_WinCE_Window *window;
double time;
long time;
};
struct _Ecore_WinCE_Event_Window_Damage
@ -90,37 +90,37 @@ struct _Ecore_WinCE_Event_Window_Damage
int y;
int width;
int height;
double time;
long time;
};
struct _Ecore_WinCE_Event_Window_Create
{
Ecore_WinCE_Window *window;
double time;
long time;
};
struct _Ecore_WinCE_Event_Window_Destroy
{
Ecore_WinCE_Window *window;
double time;
long time;
};
struct _Ecore_WinCE_Event_Window_Hide
{
Ecore_WinCE_Window *window;
double time;
long time;
};
struct _Ecore_WinCE_Event_Window_Show
{
Ecore_WinCE_Window *window;
double time;
long time;
};
struct _Ecore_WinCE_Event_Window_Delete_Request
{
Ecore_WinCE_Window *window;
double time;
long time;
};
@ -140,7 +140,7 @@ EAPI extern int ECORE_WINCE_EVENT_WINDOW_DELETE_REQUEST;
EAPI int ecore_wince_init();
EAPI int ecore_wince_shutdown();
EAPI double ecore_wince_current_time_get(void);
EAPI long ecore_wince_current_time_get(void);
EAPI void ecore_wince_message_loop_begin (void);
/* Window */

View File

@ -24,7 +24,7 @@
/***** Global declarations *****/
double _ecore_wince_double_click_time = 0.25;
double _ecore_wince_event_last_time = 0.0;
long _ecore_wince_event_last_time = 0;
Ecore_WinCE_Window *_ecore_wince_event_last_window = NULL;
HINSTANCE _ecore_wince_instance = NULL;
int _ecore_wince_log_dom = -1;
@ -202,7 +202,7 @@ ecore_wince_double_click_time_get(void)
/**
* Return the last event time
*/
EAPI double
EAPI long
ecore_wince_current_time_get(void)
{
return _ecore_wince_event_last_time;

View File

@ -24,8 +24,8 @@
static Ecore_WinCE_Window *_ecore_wince_mouse_down_last_window = NULL;
static Ecore_WinCE_Window *_ecore_wince_mouse_down_last_last_window = NULL;
static double _ecore_wince_mouse_down_last_time = 0;
static double _ecore_wince_mouse_down_last_last_time = 0;
static long _ecore_wince_mouse_down_last_time = 0;
static long _ecore_wince_mouse_down_last_last_time = 0;
static int _ecore_wince_mouse_down_did_triple = 0;
static int _ecore_wince_mouse_up_count = 0;
@ -89,7 +89,7 @@ _ecore_wince_event_handle_key_press(Ecore_WinCE_Callback_Data *msg,
free(e);
return;
}
e->timestamp = (double)msg->time / 1000.0;
e->timestamp = msg->time;
_ecore_wince_event_last_time = e->timestamp;
@ -136,7 +136,7 @@ _ecore_wince_event_handle_key_release(Ecore_WinCE_Callback_Data *msg,
free(e);
return;
}
e->timestamp = (double)msg->time / 1000.0;
e->timestamp = msg->time;
_ecore_wince_event_last_time = e->timestamp;
@ -162,7 +162,7 @@ _ecore_wince_event_handle_button_press(Ecore_WinCE_Callback_Data *msg,
e->window = (Ecore_Window)window;
e->x = LOWORD(msg->data_param);
e->y = HIWORD(msg->data_param);
e->timestamp = (double)msg->time / 1000.0;
e->timestamp = msg->time;
_ecore_wince_event_last_time = e->timestamp;
_ecore_wince_event_last_window = (Ecore_WinCE_Window *)e->window;
@ -177,8 +177,8 @@ _ecore_wince_event_handle_button_press(Ecore_WinCE_Callback_Data *msg,
{
_ecore_wince_mouse_down_last_window = NULL;
_ecore_wince_mouse_down_last_last_window = NULL;
_ecore_wince_mouse_down_last_time = 0.0;
_ecore_wince_mouse_down_last_last_time = 0.0;
_ecore_wince_mouse_down_last_time = 0;
_ecore_wince_mouse_down_last_last_time = 0;
}
e = (Ecore_Event_Mouse_Button *)calloc(1, sizeof(Ecore_Event_Mouse_Button));
@ -188,13 +188,13 @@ _ecore_wince_event_handle_button_press(Ecore_WinCE_Callback_Data *msg,
e->buttons = button;
e->x = LOWORD(msg->data_param);
e->y = HIWORD(msg->data_param);
e->timestamp = (double)msg->time / 1000.0;
e->timestamp = msg->time;
if (((e->timestamp - _ecore_wince_mouse_down_last_time) <= _ecore_wince_double_click_time) &&
if (((e->timestamp - _ecore_wince_mouse_down_last_time) <= (long)(1000 * _ecore_wince_double_click_time)) &&
(e->window == (Ecore_Window)_ecore_wince_mouse_down_last_window))
e->double_click = 1;
if (((e->timestamp - _ecore_wince_mouse_down_last_last_time) <= (2.0 * _ecore_wince_double_click_time)) &&
if (((e->timestamp - _ecore_wince_mouse_down_last_last_time) <= (long)(2 * 1000 * _ecore_wince_double_click_time)) &&
(e->window == (Ecore_Window)_ecore_wince_mouse_down_last_window) &&
(e->window == (Ecore_Window)_ecore_wince_mouse_down_last_last_window))
{
@ -241,7 +241,7 @@ _ecore_wince_event_handle_button_release(Ecore_WinCE_Callback_Data *msg,
e->window = (Ecore_Window)window;
e->x = LOWORD(msg->data_param);
e->y = HIWORD(msg->data_param);
e->timestamp = (double)msg->time / 1000.0;
e->timestamp = msg->time;
_ecore_wince_event_last_time = e->timestamp;
_ecore_wince_event_last_window = (Ecore_WinCE_Window *)e->window;
@ -259,17 +259,17 @@ _ecore_wince_event_handle_button_release(Ecore_WinCE_Callback_Data *msg,
e->buttons = button;
e->x = LOWORD(msg->data_param);
e->y = HIWORD(msg->data_param);
e->timestamp = (double)msg->time / 1000.0;
e->timestamp = msg->time;
_ecore_wince_mouse_up_count++;
if ((_ecore_wince_mouse_up_count >= 2) &&
((e->timestamp - _ecore_wince_mouse_down_last_time) <= _ecore_wince_double_click_time) &&
((e->timestamp - _ecore_wince_mouse_down_last_time) <= (long)(1000 * _ecore_wince_double_click_time)) &&
(e->window == (Ecore_Window)_ecore_wince_mouse_down_last_window))
e->double_click = 1;
if ((_ecore_wince_mouse_up_count >= 3) &&
((e->timestamp - _ecore_wince_mouse_down_last_last_time) <= (2.0 * _ecore_wince_double_click_time)) &&
((e->timestamp - _ecore_wince_mouse_down_last_last_time) <= (long)(2 * 1000 * _ecore_wince_double_click_time)) &&
(e->window == (Ecore_Window)_ecore_wince_mouse_down_last_window) &&
(e->window == (Ecore_Window)_ecore_wince_mouse_down_last_last_window))
e->triple_click = 1;
@ -294,7 +294,7 @@ _ecore_wince_event_handle_motion_notify(Ecore_WinCE_Callback_Data *msg)
e->window = (Ecore_Window)GetWindowLong(msg->window, GWL_USERDATA);
e->x = LOWORD(msg->data_param);
e->y = HIWORD(msg->data_param);
e->timestamp = (double)msg->time / 1000.0;
e->timestamp = msg->time;
ecore_event_add(ECORE_EVENT_MOUSE_MOVE, e, NULL, NULL);
}
@ -317,7 +317,7 @@ _ecore_wince_event_handle_enter_notify(Ecore_WinCE_Callback_Data *msg)
e->window = (Ecore_Window)window;
e->x = msg->x;
e->y = msg->y;
e->timestamp = (double)msg->time / 1000.0;
e->timestamp = msg->time;
_ecore_wince_event_last_time = e->timestamp;
_ecore_wince_event_last_window = (Ecore_WinCE_Window *)e->window;
@ -334,7 +334,7 @@ _ecore_wince_event_handle_enter_notify(Ecore_WinCE_Callback_Data *msg)
e->window = window;
e->x = msg->x;
e->y = msg->y;
e->time = (double)msg->time / 1000.0;
e->time = msg->time;
_ecore_wince_event_last_time = e->time;
@ -360,7 +360,7 @@ _ecore_wince_event_handle_leave_notify(Ecore_WinCE_Callback_Data *msg)
e->window = (Ecore_Window)window;
e->x = msg->x;
e->y = msg->y;
e->timestamp = (double)msg->time / 1000.0;
e->timestamp = msg->time;
_ecore_wince_event_last_time = e->timestamp;
_ecore_wince_event_last_window = (Ecore_WinCE_Window *)e->window;
@ -377,7 +377,7 @@ _ecore_wince_event_handle_leave_notify(Ecore_WinCE_Callback_Data *msg)
e->window = window;
e->x = msg->x;
e->y = msg->y;
e->time = (double)msg->time / 1000.0;
e->time = msg->time;
_ecore_wince_event_last_time = e->time;

View File

@ -51,7 +51,7 @@ struct _Ecore_WinCE_Window
extern HINSTANCE _ecore_wince_instance;
extern double _ecore_wince_double_click_time;
extern double _ecore_wince_event_last_time;
extern long _ecore_wince_event_last_time;
extern Ecore_WinCE_Window *_ecore_wince_event_last_window;