X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fgbase%2Fwindow.h;h=53c2d958fbf9eeebf094e34476f70aa88acc3190;hb=39ec5cd588bf8b49717033d841be689df68537a3;hp=e85f86ac7128e522e7869d9a9faec8f5e811b7f7;hpb=999ca92aa9ee10585c0b2094d84364159253982f;p=libs%2Fgui.git diff --git a/source/gbase/window.h b/source/gbase/window.h index e85f86a..53c2d95 100644 --- a/source/gbase/window.h +++ b/source/gbase/window.h @@ -1,7 +1,7 @@ /* $Id$ This file is part of libmspgbase -Copyright © 2007 Mikko Rasa, Mikkosoft Productions +Copyright © 2007-2008 Mikko Rasa, Mikkosoft Productions Distributed under the LGPL */ @@ -10,7 +10,6 @@ Distributed under the LGPL #include #include -#include "types.h" namespace Msp { namespace Graphics { @@ -30,6 +29,9 @@ struct WindowOptions class Window { public: + struct Private; + struct Event; + sigc::signal signal_button_press; sigc::signal signal_button_release; sigc::signal signal_pointer_motion; @@ -41,10 +43,7 @@ public: protected: Display &display; WindowOptions options; - WindowHandle window; -#ifndef WIN32 - Atom wm_delete_window; -#endif + Private *priv; public: Window(Display &, unsigned w, unsigned h, bool fs=false); @@ -53,25 +52,20 @@ public: void set_title(const std::string &); void reconfigure(const WindowOptions &); + void show_cursor(bool); 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; } - WindowHandle get_handle() const { return window; } + const Private &get_private() const { return *priv; } void show(); void hide(); -#ifndef WIN32 - void event(const XEvent &ev); -#endif + bool event(const Event &evnt); protected: void init(); -#ifdef WIN32 - int wndproc(UINT, WPARAM, LPARAM); - static LRESULT CALLBACK wndproc_(HWND, UINT, WPARAM, LPARAM); -#endif }; } // namespace Graphics