]> git.saurik.com Git - wxWidgets.git/blame - wxPython/src/_wave.i
Lots of bup fixes, API updates, etc
[wxWidgets.git] / wxPython / src / _wave.i
CommitLineData
d14a1e28
RD
1/////////////////////////////////////////////////////////////////////////////
2// Name: _joystick.i
3// Purpose: SWIG interface stuff for wxWave
4//
5// Author: Robin Dunn
6//
7// Created: 18-June-1999
8// RCS-ID: $Id$
9// Copyright: (c) 2003 by Total Control Software
10// Licence: wxWindows license
11/////////////////////////////////////////////////////////////////////////////
12
13// Not a %module
14
15
16//---------------------------------------------------------------------------
17%newgroup
18
19%{
20#include <wx/wave.h>
21%}
22
23//---------------------------------------------------------------------------
24
25%{
26#if !wxUSE_WAVE
27// A C++ stub class for wxWave for platforms that don't have it.
28class wxWave : public wxObject
29{
30public:
dd9f7fea 31 wxWave(const wxString& fileName, bool isResource = False) {
d14a1e28
RD
32 wxPyBeginBlockThreads();
33 PyErr_SetString(PyExc_NotImplementedError, "wxWave is not available on this platform.");
34 wxPyEndBlockThreads();
35 }
36 wxWave(int size, const wxByte* data) {
37 wxPyBeginBlockThreads();
38 PyErr_SetString(PyExc_NotImplementedError, "wxWave is not available on this platform.");
39 wxPyEndBlockThreads();
40 }
41
42 ~wxWave() {}
43
dd9f7fea
RD
44 bool IsOk() const { return False; }
45 bool Play(bool async = True, bool looped = False) const { return False; }
d14a1e28
RD
46};
47
48#endif
49%}
50
51
52
53class wxWave /*: public wxObject*/
54{
55public:
dd9f7fea 56 wxWave(const wxString& fileName, bool isResource = False);
d14a1e28
RD
57 %extend {
58 %name(WaveData) wxWave(const wxString& data) {
59 return new wxWave(data.Len(), (wxByte*)data.c_str());
60 }
61 }
62
63 ~wxWave();
64
65 bool IsOk() const;
6c3b4aae 66 bool Play(bool async = True, bool looped = False);
d14a1e28
RD
67
68 %pythoncode { def __nonzero__(self): return self.IsOk() }
69};
70
71
72
73
74//---------------------------------------------------------------------------