#include "defs.h" #include #include init_timer() { me = (Notify_client *) & my_client_object; } start_timer() { struct itimerval drop_time; int level; level = 10 - (rows / 10); if (level < 0) level = 0; if (instantdrop || nodisplay) { struct itimerval instant_time; instant_time.it_interval.tv_usec = 0; instant_time.it_interval.tv_sec = 0; instant_time.it_value.tv_usec = 1; instant_time.it_value.tv_sec = 0; notify_set_itimer_func(real_fast_proc, real_fast_proc, ITIMER_REAL, &instant_time, ITIMER_NULL); } else { drop_time.it_interval.tv_usec = 150000; drop_time.it_interval.tv_sec = 0; drop_time.it_value.tv_usec = 1; drop_time.it_value.tv_sec = 0; notify_set_itimer_func(me,drop_block, ITIMER_REAL, &drop_time, ITIMER_NULL); } } stop_timer() { notify_set_itimer_func(me, drop_block, ITIMER_REAL, ITIMER_NULL, ITIMER_NULL); notify_set_itimer_func(real_fast_proc, real_fast_proc, ITIMER_REAL, ITIMER_NULL, ITIMER_NULL); notify_set_itimer_func(auto_restart_proc, auto_restart_proc, ITIMER_REAL, ITIMER_NULL, ITIMER_NULL); } set_events() { xv_set(canvas, /* XView CONVERSION - Events are no longer split between kbd and pick, use WIN_IGNORE_EVENT or WIN_IGNORE_EVENTS instead and combine these if both kbd and pick specified Sect 3.2 */WIN_CONSUME_EVENTS, WIN_NO_EVENTS, WIN_MOUSE_BUTTONS, WIN_ASCII_EVENTS, 0, 0); } clear_events() { xv_set(canvas, /* XView CONVERSION - Events are no longer split between kbd and pick, use WIN_IGNORE_EVENT or WIN_IGNORE_EVENTS instead and combine these if both kbd and pick specified Sect 3.2 */WIN_CONSUME_EVENT, WIN_NO_EVENTS, 0); }