]> git.zerfleddert.de Git - proxmark3-svn/blame_incremental - client/proxgui.cpp
setting svn:eol-style=native on files, part 1
[proxmark3-svn] / client / proxgui.cpp
... / ...
CommitLineData
1//-----------------------------------------------------------------------------
2// This code is licensed to you under the terms of the GNU GPL, version 2 or,
3// at your option, any later version. See the LICENSE.txt file for the text of
4// the license.
5//-----------------------------------------------------------------------------
6// GUI functions
7//-----------------------------------------------------------------------------
8
9#include "proxgui.h"
10#include "proxguiqt.h"
11
12static ProxGuiQT *gui = NULL;
13
14extern "C" void ShowGraphWindow(void)
15{
16 if (!gui)
17 return;
18
19 gui->ShowGraphWindow();
20}
21
22extern "C" void HideGraphWindow(void)
23{
24 if (!gui)
25 return;
26
27 gui->HideGraphWindow();
28}
29
30extern "C" void RepaintGraphWindow(void)
31{
32 if (!gui)
33 return;
34
35 gui->RepaintGraphWindow();
36}
37
38extern "C" void MainGraphics(void)
39{
40 if (!gui)
41 return;
42
43 gui->MainLoop();
44}
45
46extern "C" void InitGraphics(int argc, char **argv)
47{
48#ifdef Q_WS_X11
49 bool useGUI = getenv("DISPLAY") != 0;
50#else
51 bool useGUI = true;
52#endif
53 if (!useGUI)
54 return;
55
56 gui = new ProxGuiQT(argc, argv);
57}
58
59extern "C" void ExitGraphics(void)
60{
61 if (!gui)
62 return;
63
64 delete gui;
65 gui = NULL;
66}
Impressum, Datenschutz