audacia/lib-src/lib-widget-extra/NonGuiThread.h

35 lines
946 B
C
Raw Normal View History

2010-01-24 09:19:39 +00:00
/*************************************************************************
NonGuiThread.h
James Crook
(C) Audacity Developers, 2007
wxWidgets license. See Licensing.txt
*************************************************************************/
#if !defined(AFX_NONGUITHREAD_H__E8F7FC2B_CB13_497B_A556_18551596AFD9__INCLUDED_)
#define AFX_NONGUITHREAD_H__E8F7FC2B_CB13_497B_A556_18551596AFD9__INCLUDED_
typedef void (*tGenericFn)(void);
//#include "AllCommands.h" // for tGenericFn
//#include "WidgetExtra.h"
2013-11-07 23:23:32 +00:00
class /*WIDGET_EXTRA_DLL*/ NonGuiThread : public wxThread
2010-01-24 09:19:39 +00:00
{
public:
2013-11-07 23:23:32 +00:00
NonGuiThread(tGenericFn pFn);
virtual ~NonGuiThread();
2010-01-24 09:19:39 +00:00
NonGuiThread::ExitCode Entry();
static void RunInThread(tGenericFn pFn);
static NonGuiThread * StartChild( tGenericFn pFn );
public:
2013-11-07 23:23:32 +00:00
bool mbExit;
2010-01-24 09:19:39 +00:00
tGenericFn mpFn;
2013-11-07 23:23:32 +00:00
static bool IsLive;
2010-01-24 09:19:39 +00:00
};
#endif // !defined(AFX_NONGUITHREAD_H__E8F7FC2B_CB13_497B_A556_18551596AFD9__INCLUDED_)