]>
cvs.zerfleddert.de Git - proxmark3-svn/blob - client/proxgui.cpp
e899174c419870e2e78014e609f0f3faa2f38f04
1 //-----------------------------------------------------------------------------
2 // Copyright (C) 2009 Michael Gernoth <michael at gernoth.net>
4 // This code is licensed to you under the terms of the GNU GPL, version 2 or,
5 // at your option, any later version. See the LICENSE.txt file for the text of
7 //-----------------------------------------------------------------------------
9 //-----------------------------------------------------------------------------
12 #include "proxguiqt.h"
13 #include "proxmark3.h"
15 static ProxGuiQT
*gui
= NULL
;
16 static WorkerThread
*main_loop_thread
= NULL
;
18 WorkerThread::WorkerThread(char *script_cmds_file
, char *script_cmd
, bool usb_present
) : script_cmds_file(script_cmds_file
), script_cmd(script_cmd
), usb_present(usb_present
)
22 WorkerThread::~WorkerThread()
26 void WorkerThread::run() {
27 main_loop(script_cmds_file
, script_cmd
, usb_present
);
30 extern "C" void ShowGraphWindow(void)
35 gui
->ShowGraphWindow();
38 extern "C" void HideGraphWindow(void)
43 gui
->HideGraphWindow();
46 extern "C" void RepaintGraphWindow(void)
51 gui
->RepaintGraphWindow();
54 extern "C" void MainGraphics(void)
62 extern "C" void InitGraphics(int argc
, char **argv
, char *script_cmds_file
, char *script_cmd
, bool usb_present
)
65 bool useGUI
= getenv("DISPLAY") != 0;
72 main_loop_thread
= new WorkerThread(script_cmds_file
, script_cmd
, usb_present
);
73 gui
= new ProxGuiQT(argc
, argv
, main_loop_thread
);
76 extern "C" void ExitGraphics(void)