]> git.tdb.fi Git - libs/gui.git/blobdiff - source/window.h
Win32 compatibility (for most things)
[libs/gui.git] / source / window.h
index 2999a783fc137a1c3e1e67e6d01464c19286d530..e85f86ac7128e522e7869d9a9faec8f5e811b7f7 100644 (file)
@@ -42,7 +42,9 @@ protected:
        Display &display;
        WindowOptions options;
        WindowHandle window;
+#ifndef WIN32
        Atom wm_delete_window;
+#endif
 
 public:
        Window(Display &, unsigned w, unsigned h, bool fs=false);
@@ -52,6 +54,7 @@ public:
        void set_title(const std::string &);
        void reconfigure(const WindowOptions &);
 
+       Display &get_display() const { return display; }
        const WindowOptions &get_options() const { return options; }
        unsigned get_width() const  { return options.width; }
        unsigned get_height() const { return options.height; }
@@ -60,9 +63,15 @@ public:
        void show();
        void hide();
 
+#ifndef WIN32
        void event(const XEvent &ev);
+#endif
 protected:
        void init();
+#ifdef WIN32
+       int wndproc(UINT, WPARAM, LPARAM);
+       static LRESULT CALLBACK wndproc_(HWND, UINT, WPARAM, LPARAM);
+#endif
 };
 
 } // namespace Graphics