00001 #ifndef BCREPEATER_H 00002 #define BCREPEATER_H 00003 00004 #include "bcrepeater.inc" 00005 #include "bcwindowbase.inc" 00006 #include "condition.inc" 00007 #include "thread.h" 00008 #include "bctimer.h" 00009 00010 class BC_Repeater : public Thread 00011 { 00012 public: 00013 BC_Repeater(BC_WindowBase *top_level, long delay); 00014 ~BC_Repeater(); 00015 00016 void initialize(); 00017 int start_repeating(); 00018 int stop_repeating(); 00019 void run(); 00020 00021 long repeat_id; 00022 long delay; 00023 int repeating; 00024 int interrupted; 00025 // Prevent new signal until existing event is processed 00026 Condition *repeat_lock; 00027 00028 private: 00029 Timer timer; 00030 BC_WindowBase *top_level; 00031 // Delay corrected for the time the last repeat took 00032 long next_delay; 00033 Condition *pause_lock; 00034 Condition *startup_lock; 00035 }; 00036 00037 00038 00039 #endif
1.4.4