15 std::vector<Window*> children;
19 bool managed; // whether the wm manages (+decorates) this win
26 const Rect &get_rect() const;
27 Rect get_absolute_rect() const;
28 bool contains_point(int ptr_x, int ptr_y);
30 void move(int x, int y);
31 void resize(int x, int y);
33 void set_title(const char *s);
34 const char *get_title() const;
36 /* mark this window as dirty, and notify the window manager
37 * to repaint it, and anything it used to cover.
41 void draw(const Rect &dirty_region);
42 void draw_children(const Rect &dirty_region);
44 unsigned char *get_win_start_on_fb();
45 int get_scanline_width();
47 void set_managed(bool managed);
48 bool get_managed() const;
50 void set_focusable(bool focusable);
51 bool get_focusable() const;
53 void set_display_callback(DisplayFuncType func);
54 void set_keyboard_callback(KeyboardFuncType func);
55 void set_mouse_button_callback(MouseButtonFuncType func);
56 void set_mouse_motion_callback(MouseMotionFuncType func);
58 const DisplayFuncType get_display_callback() const;
59 const KeyboardFuncType get_keyboard_callback() const;
60 const MouseButtonFuncType get_mouse_button_callback() const;
61 const MouseMotionFuncType get_mouse_motion_callback() const;
64 void add_child(Window *win);
65 void remove_child(Window *win);
67 Window **get_children();
68 int get_children_count() const;
70 const Window *get_parent() const;
73 // XXX remove if not needed
74 friend class WindowManager;