/* $Id$
This file is part of libmspgbase
-Copyright © 2007 Mikko Rasa, Mikkosoft Productions
+Copyright © 2007-2008 Mikko Rasa, Mikkosoft Productions
Distributed under the LGPL
*/
#include <string>
#include <sigc++/signal.h>
-#include "types.h"
namespace Msp {
namespace Graphics {
class Window
{
public:
+ struct Private;
+ struct Event;
+
sigc::signal<void, int, int, unsigned, unsigned> signal_button_press;
sigc::signal<void, int, int, unsigned, unsigned> signal_button_release;
sigc::signal<void, int, int> signal_pointer_motion;
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);
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