1 2 #ifndef CLIENT_LOOPER_H 3 #define CLIENT_LOOPER_H 4 5 #include <Looper.h> 6 7 class BMessageRunner; 8 class WindowLayer; 9 10 enum { 11 MSG_UPDATE = 'updt', 12 MSG_VIEWS_ADDED = 'vwad', 13 MSG_VIEWS_REMOVED = 'vwrm', 14 15 MSG_WINDOW_HIDDEN = 'whdn', 16 17 MSG_TICK = 'tick', 18 }; 19 20 struct point { 21 double x; 22 double y; 23 double direction_x; 24 double direction_y; 25 }; 26 27 class ClientLooper : public BLooper { 28 public: 29 ClientLooper(const char* name, 30 WindowLayer* serverWindow); 31 virtual ~ClientLooper(); 32 33 virtual void MessageReceived(BMessage* message); 34 35 private: 36 WindowLayer* fServerWindow; 37 int32 fViewCount; 38 39 BMessageRunner* fTicker; 40 41 void _DrawAnimatedLayer(int32 token); 42 43 point fPolygon[4]; 44 }; 45 46 #endif // CLIENT_LOOPER_H 47