forked from enlightenment/efl
so ravenlock gets his screensaver stuff in
SVN revision: 29343
This commit is contained in:
parent
37865c6d90
commit
c6f6863b57
|
@ -981,7 +981,6 @@ EAPI void ecore_x_killall(Ecore_X_Window root);
|
|||
EAPI void ecore_x_kill(Ecore_X_Window win);
|
||||
|
||||
EAPI Ecore_X_Time ecore_x_current_time_get(void);
|
||||
EAPI Ecore_X_Time ecore_x_current_user_activity_time_get(void);
|
||||
|
||||
EAPI void ecore_x_error_handler_set(void (*func) (void *data), const void *data);
|
||||
EAPI void ecore_x_io_error_handler_set(void (*func) (void *data), const void *data);
|
||||
|
@ -1374,6 +1373,7 @@ EAPI int ecore_x_xinerama_screen_count_get(void);
|
|||
EAPI int ecore_x_xinerama_screen_geometry_get(int screen, int *x, int *y, int *w, int *h);
|
||||
|
||||
EAPI int ecore_x_screensaver_event_available_get(void);
|
||||
EAPI int ecore_x_screensaver_idle_time_get(void);
|
||||
EAPI void ecore_x_screensaver_set(int timeout, int interval, int blank, int expose);
|
||||
EAPI void ecore_x_screensaver_timeout_set(double timeout);
|
||||
EAPI double ecore_x_screensaver_timeout_get(void);
|
||||
|
|
|
@ -37,7 +37,6 @@ static int _ecore_x_grab_count = 0;
|
|||
Display *_ecore_x_disp = NULL;
|
||||
double _ecore_x_double_click_time = 0.25;
|
||||
Time _ecore_x_event_last_time = 0;
|
||||
Time _ecore_x_event_last_user_activity_time = 0;
|
||||
Window _ecore_x_event_last_win = 0;
|
||||
int _ecore_x_event_last_root_x = 0;
|
||||
int _ecore_x_event_last_root_y = 0;
|
||||
|
@ -650,16 +649,6 @@ ecore_x_current_time_get(void)
|
|||
return _ecore_x_event_last_time;
|
||||
}
|
||||
|
||||
/*
|
||||
* Return the last time a *USER* generated an event
|
||||
* Should corespond to key-down, key-up, mouse-down, mouse-up, mouse move
|
||||
*/
|
||||
EAPI Ecore_X_Time
|
||||
ecore_x_current_user_activity_time_get()
|
||||
{
|
||||
return _ecore_x_event_last_user_activity_time;
|
||||
}
|
||||
|
||||
static int
|
||||
_ecore_x_fd_handler(void *data, Ecore_Fd_Handler *fd_handler __UNUSED__)
|
||||
{
|
||||
|
|
|
@ -228,7 +228,6 @@ _ecore_x_event_handle_key_press(XEvent *xevent)
|
|||
e->time = xevent->xkey.time;
|
||||
e->modifiers = xevent->xkey.state;
|
||||
_ecore_x_event_last_time = e->time;
|
||||
_ecore_x_event_last_user_activity_time = e->time;
|
||||
ecore_event_add(ECORE_X_EVENT_KEY_DOWN, e, _ecore_x_event_free_key_down, NULL);
|
||||
}
|
||||
|
||||
|
@ -280,7 +279,6 @@ _ecore_x_event_handle_key_release(XEvent *xevent)
|
|||
e->time = xevent->xkey.time;
|
||||
e->modifiers = xevent->xkey.state;
|
||||
_ecore_x_event_last_time = e->time;
|
||||
_ecore_x_event_last_user_activity_time = e->time;
|
||||
ecore_event_add(ECORE_X_EVENT_KEY_UP, e, _ecore_x_event_free_key_up, NULL);
|
||||
}
|
||||
|
||||
|
@ -334,7 +332,6 @@ _ecore_x_event_handle_button_press(XEvent *xevent)
|
|||
e->event_win = xevent->xbutton.window;
|
||||
e->time = xevent->xbutton.time;
|
||||
_ecore_x_event_last_time = e->time;
|
||||
_ecore_x_event_last_user_activity_time = e->time;
|
||||
_ecore_x_event_last_win = e->win;
|
||||
_ecore_x_event_last_root_x = e->root.x;
|
||||
_ecore_x_event_last_root_y = e->root.y;
|
||||
|
@ -379,7 +376,6 @@ _ecore_x_event_handle_button_press(XEvent *xevent)
|
|||
e->event_win = xevent->xbutton.window;
|
||||
e->time = xevent->xbutton.time;
|
||||
_ecore_x_event_last_time = e->time;
|
||||
_ecore_x_event_last_user_activity_time = e->time;
|
||||
_ecore_x_event_last_win = e->win;
|
||||
_ecore_x_event_last_root_x = e->root.x;
|
||||
_ecore_x_event_last_root_y = e->root.y;
|
||||
|
@ -435,7 +431,6 @@ _ecore_x_event_handle_button_press(XEvent *xevent)
|
|||
if (!e->double_click && !e->triple_click)
|
||||
_ecore_x_mouse_up_count = 0;
|
||||
_ecore_x_event_last_time = e->time;
|
||||
_ecore_x_event_last_user_activity_time = e->time;
|
||||
_ecore_x_event_last_win = e->win;
|
||||
_ecore_x_event_last_root_x = e->root.x;
|
||||
_ecore_x_event_last_root_y = e->root.y;
|
||||
|
@ -502,7 +497,6 @@ _ecore_x_event_handle_button_release(XEvent *xevent)
|
|||
e->event_win = xevent->xbutton.window;
|
||||
e->time = xevent->xbutton.time;
|
||||
_ecore_x_event_last_time = e->time;
|
||||
_ecore_x_event_last_user_activity_time = e->time;
|
||||
_ecore_x_event_last_win = e->win;
|
||||
_ecore_x_event_last_root_x = e->root.x;
|
||||
_ecore_x_event_last_root_y = e->root.y;
|
||||
|
@ -544,7 +538,6 @@ _ecore_x_event_handle_button_release(XEvent *xevent)
|
|||
e->triple_click = 1;
|
||||
}
|
||||
_ecore_x_event_last_time = e->time;
|
||||
_ecore_x_event_last_user_activity_time = e->time;
|
||||
_ecore_x_event_last_win = e->win;
|
||||
_ecore_x_event_last_root_x = e->root.x;
|
||||
_ecore_x_event_last_root_y = e->root.y;
|
||||
|
@ -570,7 +563,6 @@ _ecore_x_event_handle_motion_notify(XEvent *xevent)
|
|||
e->event_win = xevent->xmotion.window;
|
||||
e->time = xevent->xmotion.time;
|
||||
_ecore_x_event_last_time = e->time;
|
||||
_ecore_x_event_last_user_activity_time = e->time;
|
||||
_ecore_x_event_last_win = e->win;
|
||||
_ecore_x_event_last_root_x = e->root.x;
|
||||
_ecore_x_event_last_root_y = e->root.y;
|
||||
|
|
|
@ -134,7 +134,6 @@ typedef struct _Ecore_X_DND_Target
|
|||
extern Display *_ecore_x_disp;
|
||||
extern double _ecore_x_double_click_time;
|
||||
extern Time _ecore_x_event_last_time;
|
||||
extern Time _ecore_x_event_last_user_activity_time;
|
||||
extern Window _ecore_x_event_last_win;
|
||||
extern int _ecore_x_event_last_root_x;
|
||||
extern int _ecore_x_event_last_root_y;
|
||||
|
|
|
@ -31,6 +31,24 @@ ecore_x_screensaver_event_available_get(void)
|
|||
return _screensaver_available;
|
||||
}
|
||||
|
||||
EAPI int
|
||||
ecore_x_screensaver_idle_time_get(void)
|
||||
{
|
||||
#ifdef ECORE_XSS
|
||||
XScreenSaverInfo *xss;
|
||||
int idle;
|
||||
|
||||
xss = XScreenSaverAllocInfo();
|
||||
XScreenSaverQueryInfo(_ecore_x_disp, RootWindow(_ecore_x_disp, DefaultScreen(_ecore_x_disp)), xss);
|
||||
idle = xss->idle / 1000;
|
||||
XFree(xss);
|
||||
|
||||
return idle;
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
EAPI void
|
||||
ecore_x_screensaver_set(int timeout, int interval, int blank, int expose)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue