1 #ifndef MSP_GRAPHICS_DISPLAY_H_
2 #define MSP_GRAPHICS_DISPLAY_H_
7 #include <sigc++/signal.h>
8 #include "errordialog.h"
10 #include "videomode.h"
22 sigc::signal<void> signal_got_focus;
23 sigc::signal<void> signal_lost_focus;
26 std::list<Monitor> monitors;
27 Monitor *primary_monitor = 0;
28 std::list<VideoMode> modes;
30 ErrorDialog *err_dialog = 0;
31 Window *focus_window = 0;
34 Display(const std::string &disp_name = std::string());
37 const Private &get_private() const { return *priv; }
39 void add_window(Window &);
40 void remove_window(Window &);
42 const std::list<Monitor> &get_monitors() const { return monitors; }
43 const std::list<VideoMode> &get_modes() const { return modes; }
44 const VideoMode &get_desktop_mode() const;
45 void set_mode(const VideoMode &, bool = false);
47 const VideoMode *find_mode(const VideoMode &, float = 0.5f) const;
48 const VideoMode *find_mode(unsigned, unsigned) const;
51 void window_got_focus(Window &);
52 void window_lost_focus();
54 Window *get_focus_window() const { return focus_window; }
59 bool process_events();
64 } // namespace Graphics