11 enum State {STATE_NORMAL, STATE_MINIMIZED, STATE_MAXIMIZED, STATE_SHADED};
18 Rect normal_rect; // normal state rectangle managed by the wm
22 std::vector<Window*> children;
26 bool managed; // whether the wm manages (+decorates) this win
33 const Rect &get_rect() const;
34 Rect get_absolute_rect() const;
35 bool contains_point(int ptr_x, int ptr_y);
37 void move(int x, int y);
38 void resize(int x, int y);
40 void set_title(const char *s);
41 const char *get_title() const;
43 /* mark this window as dirty, and notify the window manager
44 * to repaint it, and anything it used to cover.
48 void draw(Rect *dirty_region);
49 void draw_children(const Rect &dirty_region);
51 unsigned char *get_win_start_on_fb();
52 int get_scanline_width();
54 void set_managed(bool managed);
55 bool get_managed() const;
57 void set_focusable(bool focusable);
58 bool get_focusable() const;
60 bool get_dirty() const;
62 void set_display_callback(DisplayFuncType func);
63 void set_keyboard_callback(KeyboardFuncType func);
64 void set_mouse_button_callback(MouseButtonFuncType func);
65 void set_mouse_motion_callback(MouseMotionFuncType func);
67 const DisplayFuncType get_display_callback() const;
68 const KeyboardFuncType get_keyboard_callback() const;
69 const MouseButtonFuncType get_mouse_button_callback() const;
70 const MouseMotionFuncType get_mouse_motion_callback() const;
73 void add_child(Window *win);
74 void remove_child(Window *win);
76 Window **get_children();
77 int get_children_count() const;
79 const Window *get_parent() const;
82 void set_state(State state);
83 State get_state() const;
85 // XXX remove if not needed
86 friend class WindowManager;