1 // UpdateQueue.h 2 3 #ifndef EVENT_QUEUE_H 4 #define EVENT_QUEUE_H 5 6 #include <List.h> 7 #include <Locker.h> 8 #include <OS.h> 9 #include <Region.h> 10 11 class HWInterface; 12 13 class UpdateQueue : public BLocker { 14 public: 15 UpdateQueue(HWInterface* interface); 16 virtual ~UpdateQueue(); 17 18 status_t InitCheck(); 19 20 void AddRect(const BRect& rect); 21 22 private: 23 static int32 _execute_updates_(void *cookie); 24 int32 _ExecuteUpdates(); 25 26 void _Reschedule(); 27 28 HWInterface* fInterface; 29 30 BRegion fUpdateRegion; 31 thread_id fUpdateExecutor; 32 sem_id fThreadControl; 33 status_t fStatus; 34 }; 35 36 #endif // EVENT_QUEUE_H 37