renamed wxWave to wxSound
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@25456 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
82
include/wx/sound.h
Normal file
82
include/wx/sound.h
Normal file
@@ -0,0 +1,82 @@
|
|||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
// Name: wx/sound.h
|
||||||
|
// Purpose: wxSoundBase class
|
||||||
|
// Author: Vaclav Slavik
|
||||||
|
// Modified by:
|
||||||
|
// Created: 2004/02/01
|
||||||
|
// RCS-ID: $Id$
|
||||||
|
// Copyright: (c) 2004, Vaclav Slavik
|
||||||
|
// Licence: wxWindows licence
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
#ifndef _WX_SOUND_H_BASE_
|
||||||
|
#define _WX_SOUND_H_BASE_
|
||||||
|
|
||||||
|
#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
|
||||||
|
#pragma interface "soundbase.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include "wx/object.h"
|
||||||
|
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
// wxSoundBase: common wxSound code and interface
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
// Flags for wxSound::Play
|
||||||
|
enum wxSoundFlags
|
||||||
|
{
|
||||||
|
wxSOUND_SYNC = 0,
|
||||||
|
wxSOUND_ASYNC = 1,
|
||||||
|
wxSOUND_LOOP = 2 | wxSOUND_ASYNC
|
||||||
|
};
|
||||||
|
|
||||||
|
class wxSoundBase : public wxObject
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
// Play the sound:
|
||||||
|
bool Play(unsigned flags = wxSOUND_ASYNC)
|
||||||
|
{
|
||||||
|
return DoPlay(flags);
|
||||||
|
}
|
||||||
|
#if WXWIN_COMPATIBILITY_2_4
|
||||||
|
wxDEPRECATED( bool Play(bool async = true, bool looped = false) );
|
||||||
|
#endif
|
||||||
|
|
||||||
|
protected:
|
||||||
|
virtual bool DoPlay(unsigned flags) = 0;
|
||||||
|
};
|
||||||
|
|
||||||
|
#if WXWIN_COMPATIBILITY_2_4
|
||||||
|
inline bool wxSoundBase::Play(bool async, bool looped)
|
||||||
|
{
|
||||||
|
unsigned flags = 0;
|
||||||
|
if (async) flags |= wxSOUND_ASYNC;
|
||||||
|
if (looped) flags |= wxSOUND_LOOP;
|
||||||
|
return DoPlay(flags);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
// wxSound class implementation
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
#if defined(__WXMSW__)
|
||||||
|
#include "wx/msw/wave.h"
|
||||||
|
#elif defined(__UNIX__)
|
||||||
|
#include "wx/unix/sound.h"
|
||||||
|
#elif defined(__WXMAC__)
|
||||||
|
#include "wx/mac/wave.h"
|
||||||
|
#elif defined(__WXPM__)
|
||||||
|
#include "wx/os2/wave.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// wxSound used to be called wxWave before wxWindows 2.5.1:
|
||||||
|
#ifdef __UNIX__ // FIXME: on all platforms when everything is renamed
|
||||||
|
#if WXWIN_COMPATIBILITY_2_4
|
||||||
|
typedef wxSound wxWave;
|
||||||
|
#endif
|
||||||
|
#else
|
||||||
|
typedef wxWave wxSound;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif // _WX_SOUND_H_BASE_
|
@@ -1,19 +1,24 @@
|
|||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
// Name: wx/wave.h
|
||||||
|
// Purpose: wxSound compatibility header
|
||||||
|
// Author: Vaclav Slavik
|
||||||
|
// Modified by:
|
||||||
|
// Created: 2004/02/01
|
||||||
|
// RCS-ID: $Id$
|
||||||
|
// Copyright: (c) 2004, Vaclav Slavik
|
||||||
|
// Licence: wxWindows licence
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#ifndef _WX_WAVE_H_BASE_
|
#ifndef _WX_WAVE_H_BASE_
|
||||||
#define _WX_WAVE_H_BASE_
|
#define _WX_WAVE_H_BASE_
|
||||||
|
|
||||||
#if defined(__WXMSW__)
|
#include "wx/setup.h"
|
||||||
#include "wx/msw/wave.h"
|
|
||||||
#elif defined(__WXGTK__)
|
#if WXWIN_COMPATIBILITY_2_4
|
||||||
#include "wx/unix/wave.h"
|
#warning "wx/wave.h header is deprecated, use wx/sound.h and wxSound"
|
||||||
#elif defined(__WXX11__)
|
#include "wx/sound.h"
|
||||||
#include "wx/unix/wave.h"
|
#else
|
||||||
#elif defined(__WXMOTIF__)
|
#error "wx/wave.h is only available in compatibility mode"
|
||||||
#include "wx/unix/wave.h"
|
|
||||||
#elif defined(__WXMAC__)
|
|
||||||
#include "wx/mac/wave.h"
|
|
||||||
#elif defined(__WXPM__)
|
|
||||||
#include "wx/os2/wave.h"
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
// _WX_TREECTRL_H_BASE_
|
|
||||||
|
Reference in New Issue
Block a user