maximize windows
[winnie] / src / window.h
index 3db8ec8..ecbee9e 100644 (file)
@@ -7,9 +7,16 @@
 #include "event.h"
 
 class Window {
+public:
+       enum State {STATE_NORMAL, STATE_MINIMIZED, STATE_MAXIMIZED, STATE_SHADED};
+
 private:
        char *title;
+       State state;
+
        Rect rect;
+       Rect normal_rect; // normal state rectangle managed by the wm
+
        Callbacks callbacks;
 
        std::vector<Window*> children;
@@ -24,7 +31,7 @@ public:
        ~Window();
 
        const Rect &get_rect() const;
-       const Rect &get_absolute_rect() const;
+       Rect get_absolute_rect() const;
        bool contains_point(int ptr_x, int ptr_y);
 
        void move(int x, int y);
@@ -38,7 +45,7 @@ public:
         */
        void invalidate();
 
-       void draw(const Rect &dirty_region);
+       void draw(Rect *dirty_region);
        void draw_children(const Rect &dirty_region);
 
        unsigned char *get_win_start_on_fb();
@@ -50,6 +57,8 @@ public:
        void set_focusable(bool focusable);
        bool get_focusable() const;
 
+       bool get_dirty() const;
+
        void set_display_callback(DisplayFuncType func);
        void set_keyboard_callback(KeyboardFuncType func);
        void set_mouse_button_callback(MouseButtonFuncType func);
@@ -70,6 +79,9 @@ public:
        const Window *get_parent() const;
        Window *get_parent();
 
+       void set_state(State state);
+       State get_state() const;
+
        // XXX remove if not needed
        friend class WindowManager;
 };