1 #ifndef _WINDOW_MANAGER_H
2 #define _WINDOW_MANAGER_H
9 const int kMaxWindows
= 255;
14 WindowManager(Renderer
*screenRenderer
);
21 Window
* CreateWindow(Window
*parent
, const Rect
&rect
, int eventPort
, window_flags flags
);
22 void DestroyWindow(Window
*window
);
23 Window
* LookupWindow(int id
);
24 Window
* WindowAtPoint(int x
, int y
);
26 int RequestorPort() const;
27 static int StartDispatchThread(void *windowManager
);
28 void DispatchThread();
29 void ReadServicePort(void*, int);
33 void Respond(port_id
, void *, int);
35 static int StartInputThread(void *_wm
);
38 void ProcessMouseEvent(const Event
&event
);
39 void SetCursorPos(int x
, int y
);
43 void InvalidateMouseBoundries();
45 void ProcessKeyboardEvent(const Event
&event
);
47 Window
*fWindowArray
[kMaxWindows
];
52 int fReceiveBufferSize
;
53 int fReceiveBufferPos
;
57 Window
*fCurrentMouseFocus
;
58 bool fMouseFocusLocked
;
59 bool fInFocusLockedWindow
;
61 Renderer
*fScreenRenderer
;