]> git.tdb.fi Git - libs/gui.git/blobdiff - source/graphics/window.h
Change video mode before reconfiguring the window
[libs/gui.git] / source / graphics / window.h
index 38b92177f932ca67c6dbee81cd40cbc015f4321e..55751b3d5a15cf689972ac38e3dc0f890f2d4a64 100644 (file)
@@ -3,7 +3,6 @@
 
 #include <string>
 #include <sigc++/signal.h>
-#include "eventsource.h"
 
 namespace Msp {
 namespace Graphics {
@@ -20,12 +19,18 @@ struct WindowOptions
        WindowOptions();
 };
 
-class Window: public EventSource
+class Window
 {
 public:
        struct Private;
        struct Event;
 
+       /** Provides input events.  The event structure contents are platform-
+       specific.  Applications will want to use the enclosed Keyboard and Mouse
+       objects instead. */
+       sigc::signal<void, const Event &> signal_input_event;
+
+       sigc::signal<void, unsigned, unsigned> signal_resize;
        sigc::signal<void> signal_close;
 
 protected:
@@ -41,11 +46,16 @@ public:
        Window(Display &, const WindowOptions &);
 private:
        void init();
+       void platform_init();
+       void platform_cleanup();
 public:
        virtual ~Window();
 
        void set_title(const std::string &);
        void reconfigure(const WindowOptions &);
+private:
+       void platform_reconfigure(bool);
+public:
        void set_keyboard_autorepeat(bool);
        bool get_keyboard_autorepeat() const { return kbd_autorepeat; }
        void show_cursor(bool);
@@ -59,7 +69,11 @@ public:
 
        void show();
        void hide();
+private:
+       void platform_show();
+       void platform_hide();
 
+public:
        bool event(const Event &evnt);
 };