15 std::vector<Window*> children;
19 bool managed; // whether the wm manages (+decorates) this win
26 const Rect &get_rect() const;
27 bool contains_point(int ptr_x, int ptr_y);
29 void move(int x, int y);
30 void resize(int x, int y);
32 void set_title(const char *s);
33 const char *get_title() const;
35 /* mark this window as dirty, and notify the window manager
36 * to repaint it, and anything it used to cover.
40 void draw(const Rect &dirty_region);
41 void draw_children(const Rect &dirty_region);
43 unsigned char *get_win_start_on_fb();
44 int get_scanline_width();
46 void set_managed(bool managed);
47 bool get_managed() const;
49 void set_focusable(bool focusable);
50 bool get_focusable() const;
52 void set_display_callback(DisplayFuncType func);
53 void set_keyboard_callback(KeyboardFuncType func);
54 void set_mouse_button_callback(MouseButtonFuncType func);
55 void set_mouse_motion_callback(MouseMotionFuncType func);
57 const DisplayFuncType get_display_callback() const;
58 const KeyboardFuncType get_keyboard_callback() const;
59 const MouseButtonFuncType get_mouse_button_callback() const;
60 const MouseMotionFuncType get_mouse_motion_callback() const;
63 void add_child(Window *win);
64 void remove_child(Window *win);
66 Window **get_children();
67 int get_children_count() const;
69 const Window *get_parent() const;
72 // XXX remove if not needed
73 friend class WindowManager;