1 #ifndef MSP_GRAPHICS_DISPLAY_H_
2 #define MSP_GRAPHICS_DISPLAY_H_
7 #include <sigc++/signal.h>
8 #include "errordialog.h"
10 #include "mspgui_api.h"
11 #include "videomode.h"
18 class MSPGUI_API Display
23 sigc::signal<void> signal_got_focus;
24 sigc::signal<void> signal_lost_focus;
27 std::vector<Monitor> monitors;
28 Monitor *primary_monitor = nullptr;
29 std::vector<VideoMode> modes;
30 Private *priv = nullptr;
31 ErrorDialog *err_dialog = nullptr;
32 Window *focus_window = nullptr;
35 Display(const std::string &disp_name = std::string());
38 const Private &get_private() const { return *priv; }
40 void add_window(Window &);
41 void remove_window(Window &);
43 const std::vector<Monitor> &get_monitors() const { return monitors; }
44 const std::vector<VideoMode> &get_modes() const { return modes; }
45 const VideoMode &get_desktop_mode() const;
46 void set_mode(const VideoMode &, bool = false);
48 const VideoMode *find_mode(const VideoMode &, float = 0.5f) const;
49 const VideoMode *find_mode(unsigned, unsigned) const;
52 void window_got_focus(Window &);
53 void window_lost_focus();
55 Window *get_focus_window() const { return focus_window; }
60 bool process_events();
65 } // namespace Graphics