X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;ds=sidebyside;f=source%2Fgbase%2Fwindow.h;h=53c2d958fbf9eeebf094e34476f70aa88acc3190;hb=fcd5f24311fcfe772825a75678e038749401a9be;hp=f422296f8d3be7e98f6a33ad31932d9197b3b85f;hpb=aeb2546fc11a7e27a02a47e85756746330253742;p=libs%2Fgui.git diff --git a/source/gbase/window.h b/source/gbase/window.h index f422296..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,11 +43,7 @@ public: protected: Display &display; WindowOptions options; - WindowHandle window; -#ifndef WIN32 - Atom wm_delete_window; - Cursor invisible_cursor; -#endif + Private *priv; public: Window(Display &, unsigned w, unsigned h, bool fs=false); @@ -60,20 +58,14 @@ public: 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