]> cvs.zerfleddert.de Git - proxmark3-svn/blame - client/proxgui.cpp
client/Makefile: Typo for Darwin
[proxmark3-svn] / client / proxgui.cpp
CommitLineData
a553f267 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
6658905f 9#include "proxgui.h"
10#include "proxguiqt.h"
11
12static ProxGuiQT *gui = NULL;
13
14extern "C" void ShowGraphWindow(void)
15{
7fe9b0b7 16 if (!gui)
17 return;
18
19 gui->ShowGraphWindow();
6658905f 20}
21
22extern "C" void HideGraphWindow(void)
23{
7fe9b0b7 24 if (!gui)
25 return;
26
27 gui->HideGraphWindow();
6658905f 28}
29
30extern "C" void RepaintGraphWindow(void)
31{
7fe9b0b7 32 if (!gui)
33 return;
6658905f 34
7fe9b0b7 35 gui->RepaintGraphWindow();
6658905f 36}
37
38extern "C" void MainGraphics(void)
39{
7fe9b0b7 40 if (!gui)
41 return;
6658905f 42
7fe9b0b7 43 gui->MainLoop();
6658905f 44}
45
46extern "C" void InitGraphics(int argc, char **argv)
47{
48#ifdef Q_WS_X11
7fe9b0b7 49 bool useGUI = getenv("DISPLAY") != 0;
6658905f 50#else
7fe9b0b7 51 bool useGUI = true;
6658905f 52#endif
7fe9b0b7 53 if (!useGUI)
54 return;
6658905f 55
7fe9b0b7 56 gui = new ProxGuiQT(argc, argv);
6658905f 57}
58
59extern "C" void ExitGraphics(void)
60{
7fe9b0b7 61 if (!gui)
62 return;
63
64 delete gui;
65 gui = NULL;
6658905f 66}
Impressum, Datenschutz