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