1 #ifndef MSP_GRAPHICS_WINDOW_H_
2 #define MSP_GRAPHICS_WINDOW_H_
5 #include <sigc++/signal.h>
17 bool user_position = false;
19 unsigned height = 480;
20 bool fullscreen = false;
21 const Monitor *fullscreen_monitor = nullptr;
22 bool fullscreen_exclusive = true;
23 bool resizable = false;
32 /** Provides input events. The event structure contents are platform-
33 specific. Applications will want to use the enclosed Keyboard and Mouse
35 sigc::signal<void, const Event &> signal_input_event;
37 sigc::signal<void> signal_got_focus;
38 sigc::signal<void> signal_lost_focus;
40 sigc::signal<void, int, int> signal_move;
41 sigc::signal<void, unsigned, unsigned> signal_resize;
42 sigc::signal<void, unsigned, unsigned, unsigned, unsigned, const Event &> signal_expose;
43 sigc::signal<void> signal_close;
47 WindowOptions options;
49 bool kbd_autorepeat = true;
50 bool touch_input = false;
51 bool resizing = false;
53 Private *priv = nullptr;
56 Window(Display &, unsigned w, unsigned h, bool fs = false);
57 Window(Display &, const WindowOptions &);
61 void platform_cleanup();
65 void set_title(const std::string &);
66 void reconfigure(const WindowOptions &);
68 void set_fullscreen_mode();
69 void platform_reconfigure(bool);
71 void set_keyboard_autorepeat(bool);
72 bool get_keyboard_autorepeat() const { return kbd_autorepeat; }
73 void show_cursor(bool);
74 void warp_pointer(int, int);
75 void set_touch_input(bool);
77 void platform_set_touch_input();
79 bool get_touch_input() const { return touch_input; }
81 Display &get_display() const { return display; }
82 const WindowOptions &get_options() const { return options; }
83 unsigned get_width() const { return options.width; }
84 unsigned get_height() const { return options.height; }
85 const Private &get_private() const { return *priv; }
94 bool event(const Event &evnt);
97 } // namespace Graphics