3 This file is part of libmspgbase
4 Copyright © 2007 Mikko Rasa, Mikkosoft Productions
5 Distributed under the LGPL
8 #ifndef MSP_GBASE_WINDOW_H_
9 #define MSP_GBASE_WINDOW_H_
12 #include <sigc++/signal.h>
33 sigc::signal<void, int, int, unsigned, unsigned> signal_button_press;
34 sigc::signal<void, int, int, unsigned, unsigned> signal_button_release;
35 sigc::signal<void, int, int> signal_pointer_motion;
36 sigc::signal<void, unsigned, unsigned, unsigned> signal_key_press;
37 sigc::signal<void, unsigned, unsigned> signal_key_release;
38 sigc::signal<void, unsigned, unsigned> signal_resize;
39 sigc::signal<void> signal_close;
43 WindowOptions options;
46 Atom wm_delete_window;
50 Window(Display &, unsigned w, unsigned h, bool fs=false);
51 Window(Display &, const WindowOptions &);
54 void set_title(const std::string &);
55 void reconfigure(const WindowOptions &);
57 Display &get_display() const { return display; }
58 const WindowOptions &get_options() const { return options; }
59 unsigned get_width() const { return options.width; }
60 unsigned get_height() const { return options.height; }
61 WindowHandle get_handle() const { return window; }
67 void event(const XEvent &ev);
72 int wndproc(UINT, WPARAM, LPARAM);
73 static LRESULT CALLBACK wndproc_(HWND, UINT, WPARAM, LPARAM);
77 } // namespace Graphics