Window.h (661B)
1 #ifndef _WINDOW_H 2 #define _WINDOW_H 3 4 #include <blt/qsem.h> 5 6 class Canvas; 7 class Connection; 8 struct Event; 9 10 class Window { 11 public: 12 13 Window(long, long, long, long); 14 void Quit(); 15 void AddChild(Canvas *child, long left, long top, long right, long bottom); 16 void RemoveChild(Canvas *child); 17 void Flush(); 18 void MakeFocus(); 19 void Lock(); 20 void Unlock(); 21 void Show(); 22 void Hide(); 23 24 private: 25 26 ~Window(); 27 static int EventLoop(void*); 28 Canvas* FindChild(int id); 29 void DispatchEvent(Event*); 30 void WaitEvent(Event*); 31 32 Connection *fConnection; 33 int fID; 34 int fShowLevel; 35 int fEventPort; 36 qsem_t *fLock; 37 38 Canvas *fCanvasList; 39 40 friend class Canvas; 41 }; 42 43 44 #endif