diff options
author | fluxgen <fluxgen> | 2003-05-10 13:31:46 (GMT) |
---|---|---|
committer | fluxgen <fluxgen> | 2003-05-10 13:31:46 (GMT) |
commit | 2416e27d396abd65ca7417d50536d3a5ee76b657 (patch) | |
tree | dc2673bee0c7062fae6ff95e82209e6e148ab4f2 | |
parent | d8bdbf3bb946475a7a5cbb0c52a9ee440d31bf1d (diff) | |
download | fluxbox_paul-2416e27d396abd65ca7417d50536d3a5ee76b657.zip fluxbox_paul-2416e27d396abd65ca7417d50536d3a5ee76b657.tar.bz2 |
source doc
-rw-r--r-- | src/FbTk/App.hh | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/src/FbTk/App.hh b/src/FbTk/App.hh index 2a64e75..e30694f 100644 --- a/src/FbTk/App.hh +++ b/src/FbTk/App.hh | |||
@@ -25,20 +25,31 @@ | |||
25 | #include <X11/Xlib.h> | 25 | #include <X11/Xlib.h> |
26 | 26 | ||
27 | namespace FbTk { | 27 | namespace FbTk { |
28 | |||
29 | /// Main class for applications, every application must create an instance of this class | ||
28 | /** | 30 | /** |
29 | Main class for applications, every application must create an instance of this class | 31 | * Usage: \n |
30 | */ | 32 | * App app; \n |
33 | * ... \n | ||
34 | * init some other stuff; \n | ||
35 | * ... \n | ||
36 | * main loop starts here: \n | ||
37 | * app.eventLoop(); \n | ||
38 | * | ||
39 | * To end main loop you call App::instance()->end() | ||
40 | */ | ||
31 | class App { | 41 | class App { |
32 | public: | 42 | public: |
33 | /// @return singleton instance of App | 43 | /// @return singleton instance of App |
34 | static App *instance(); | 44 | static App *instance(); |
45 | /// creates a display connection | ||
35 | explicit App(const char *displayname=0); | 46 | explicit App(const char *displayname=0); |
36 | virtual ~App(); | 47 | virtual ~App(); |
37 | /// display connection | 48 | /// display connection |
38 | Display *display() const { return m_display; } | 49 | Display *display() const { return m_display; } |
39 | /// starts event loop | 50 | /// starts event loop |
40 | virtual void eventLoop(); | 51 | virtual void eventLoop(); |
41 | /// ends event loop | 52 | /// forces an end to event loop |
42 | void end(); | 53 | void end(); |
43 | private: | 54 | private: |
44 | static App *s_app; | 55 | static App *s_app; |