diff options
Diffstat (limited to 'src/FbTk/App.hh')
-rw-r--r-- | src/FbTk/App.hh | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/FbTk/App.hh b/src/FbTk/App.hh index d878661..4399551 100644 --- a/src/FbTk/App.hh +++ b/src/FbTk/App.hh | |||
@@ -23,6 +23,9 @@ | |||
23 | #define FBTK_APP_HH | 23 | #define FBTK_APP_HH |
24 | 24 | ||
25 | #include <X11/Xlib.h> | 25 | #include <X11/Xlib.h> |
26 | #include <map> | ||
27 | |||
28 | using std::map; | ||
26 | 29 | ||
27 | namespace FbTk { | 30 | namespace FbTk { |
28 | 31 | ||
@@ -47,6 +50,13 @@ public: | |||
47 | virtual ~App(); | 50 | virtual ~App(); |
48 | /// display connection | 51 | /// display connection |
49 | Display *display() const { return m_display; } | 52 | Display *display() const { return m_display; } |
53 | |||
54 | /// Registers a screen's default values for global retrieval | ||
55 | void registerScreenDefaults(unsigned int screen, Visual *visual, Colormap cmap, unsigned int depth); | ||
56 | Visual *defaultVisual(unsigned int screen); | ||
57 | Colormap defaultColormap(unsigned int screen); | ||
58 | int defaultDepth(unsigned int screen); | ||
59 | |||
50 | void sync(bool discard); | 60 | void sync(bool discard); |
51 | /// starts event loop | 61 | /// starts event loop |
52 | virtual void eventLoop(); | 62 | virtual void eventLoop(); |
@@ -57,6 +67,15 @@ private: | |||
57 | static App *s_app; | 67 | static App *s_app; |
58 | bool m_done; | 68 | bool m_done; |
59 | Display *m_display; | 69 | Display *m_display; |
70 | |||
71 | struct ScreenDflt { | ||
72 | ScreenDflt(): visual(0), cmap(0), depth(0) {} | ||
73 | ScreenDflt(Visual *v, Colormap c, int d): visual(v), cmap(c), depth(d) {} | ||
74 | Visual *visual; | ||
75 | Colormap cmap; | ||
76 | int depth; | ||
77 | }; | ||
78 | map<int, ScreenDflt> m_screen_defaults; | ||
60 | }; | 79 | }; |
61 | 80 | ||
62 | } // end namespace FbTk | 81 | } // end namespace FbTk |