]>
Commit | Line | Data |
---|---|---|
6658905f | 1 | #include "proxgui.h" |
2 | #include "proxguiqt.h" | |
3 | ||
4 | static ProxGuiQT *gui = NULL; | |
5 | ||
6 | extern "C" void ShowGraphWindow(void) | |
7 | { | |
7fe9b0b7 | 8 | if (!gui) |
9 | return; | |
10 | ||
11 | gui->ShowGraphWindow(); | |
6658905f | 12 | } |
13 | ||
14 | extern "C" void HideGraphWindow(void) | |
15 | { | |
7fe9b0b7 | 16 | if (!gui) |
17 | return; | |
18 | ||
19 | gui->HideGraphWindow(); | |
6658905f | 20 | } |
21 | ||
22 | extern "C" void RepaintGraphWindow(void) | |
23 | { | |
7fe9b0b7 | 24 | if (!gui) |
25 | return; | |
6658905f | 26 | |
7fe9b0b7 | 27 | gui->RepaintGraphWindow(); |
6658905f | 28 | } |
29 | ||
30 | extern "C" void MainGraphics(void) | |
31 | { | |
7fe9b0b7 | 32 | if (!gui) |
33 | return; | |
6658905f | 34 | |
7fe9b0b7 | 35 | gui->MainLoop(); |
6658905f | 36 | } |
37 | ||
38 | extern "C" void InitGraphics(int argc, char **argv) | |
39 | { | |
40 | #ifdef Q_WS_X11 | |
7fe9b0b7 | 41 | bool useGUI = getenv("DISPLAY") != 0; |
6658905f | 42 | #else |
7fe9b0b7 | 43 | bool useGUI = true; |
6658905f | 44 | #endif |
7fe9b0b7 | 45 | if (!useGUI) |
46 | return; | |
6658905f | 47 | |
7fe9b0b7 | 48 | gui = new ProxGuiQT(argc, argv); |
6658905f | 49 | } |
50 | ||
51 | extern "C" void ExitGraphics(void) | |
52 | { | |
7fe9b0b7 | 53 | if (!gui) |
54 | return; | |
55 | ||
56 | delete gui; | |
57 | gui = NULL; | |
6658905f | 58 | } |