]> git.saurik.com Git - wxWidgets.git/blob - wxPython/src/_wave.i
In GSocket_Destroy reorder GUI_Destroy and Shutdown when compiling for Darwin.
[wxWidgets.git] / wxPython / src / _wave.i
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.
28 class wxWave : public wxObject
29 {
30 public:
31 wxWave(const wxString& fileName, bool isResource = False) {
32 wxPyBeginBlockThreads();
33 PyErr_SetString(PyExc_NotImplementedError,
34 "wxWave is not available on this platform.");
35 wxPyEndBlockThreads();
36 }
37 wxWave(int size, const wxByte* data) {
38 wxPyBeginBlockThreads();
39 PyErr_SetString(PyExc_NotImplementedError,
40 "wxWave is not available on this platform.");
41 wxPyEndBlockThreads();
42 }
43
44 ~wxWave() {}
45
46 bool IsOk() const { return False; }
47 bool Play(bool async = True, bool looped = False) const { return False; }
48 };
49
50 #endif
51 %}
52
53
54
55 class wxWave /*: public wxObject*/
56 {
57 public:
58 wxWave(const wxString& fileName, bool isResource = False);
59 %extend {
60 %name(WaveData) wxWave(const wxString& data) {
61 return new wxWave(data.Len(), (wxByte*)data.c_str());
62 }
63 }
64
65 ~wxWave();
66
67 bool IsOk() const;
68 bool Play(bool async = True, bool looped = False);
69
70 %pythoncode { def __nonzero__(self): return self.IsOk() }
71 };
72
73
74
75
76 //---------------------------------------------------------------------------