mirror of
https://github.com/cookiengineer/audacity
synced 2025-10-25 07:43:54 +02:00
Add new files...should have been part of r13697
I REALLY need to come up with a better process for moving between plats as I (apparently) can't remember to do a simple "svn add" on the final move...grrrr!!!!
This commit is contained in:
61
src/DeviceChange.h
Normal file
61
src/DeviceChange.h
Normal file
@@ -0,0 +1,61 @@
|
||||
/**********************************************************************
|
||||
|
||||
Audacity: A Digital Audio Editor
|
||||
|
||||
DeviceChange.h
|
||||
|
||||
Leland Lucius
|
||||
|
||||
**********************************************************************/
|
||||
|
||||
#ifndef __AUDACITY_DEVICECHANGE_H__
|
||||
#define __AUDACITY_DEVICECHANGE_H__
|
||||
|
||||
#include "Audacity.h"
|
||||
#include "Experimental.h"
|
||||
|
||||
#if defined(EXPERIMENTAL_DEVICE_CHANGE_HANDLER)
|
||||
|
||||
#if defined(__WXMSW__) || defined(__WXMAC__) || defined(HAVE_LIBUDEV_H)
|
||||
#define HAVE_DEVICE_CHANGE
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_DEVICE_CHANGE)
|
||||
|
||||
#include <wx/event.h>
|
||||
#include <wx/timer.h>
|
||||
|
||||
class DeviceChangeInterface
|
||||
{
|
||||
public:
|
||||
virtual ~DeviceChangeInterface() {};
|
||||
|
||||
virtual bool SetHandler(wxEvtHandler *handler) = 0;
|
||||
virtual void Enable(bool enable = true) = 0;
|
||||
};
|
||||
|
||||
class DeviceChangeHandler : public wxEvtHandler
|
||||
{
|
||||
public:
|
||||
DeviceChangeHandler();
|
||||
virtual ~DeviceChangeHandler();
|
||||
|
||||
void Enable(bool enable = true);
|
||||
|
||||
virtual void DeviceChangeNotification() = 0;
|
||||
|
||||
private:
|
||||
void OnChange(wxCommandEvent & evt);
|
||||
void OnTimer(wxTimerEvent & evt);
|
||||
|
||||
DeviceChangeInterface *mListener;
|
||||
wxTimer mTimer;
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user