3 This file is part of libmspgbase
4 Copyright © 2007-2010 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>
13 #include "eventsource.h"
30 class Window: public EventSource
36 sigc::signal<void> signal_close;
40 WindowOptions options;
47 Window(Display &, unsigned w, unsigned h, bool fs=false);
48 Window(Display &, const WindowOptions &);
54 void set_title(const std::string &);
55 void reconfigure(const WindowOptions &);
56 void set_keyboard_autorepeat(bool);
57 bool get_keyboard_autorepeat() const { return kbd_autorepeat; }
58 void show_cursor(bool);
59 void warp_pointer(int, int);
61 Display &get_display() const { return display; }
62 const WindowOptions &get_options() const { return options; }
63 virtual unsigned get_width() const { return options.width; }
64 virtual unsigned get_height() const { return options.height; }
65 const Private &get_private() const { return *priv; }
70 bool event(const Event &evnt);
73 } // namespace Graphics