]> git.saurik.com Git - wxWidgets.git/blame - contrib/samples/mmedia/mmbman.h
don't eat all events if m_maxLength is 0: this means no limit according to the docs...
[wxWidgets.git] / contrib / samples / mmedia / mmbman.h
CommitLineData
e8482f24
GL
1/////////////////////////////////////////////////////////////////////////////
2// Name: mmbman.h
3// Purpose: Multimedia Board manager
4// Author: Guilhem Lavaux, <guilhem.lavaux@libertysurf.fr>
5// Modified by:
6// Created: 13/02/2000
7// RCS-ID: $Id$
8// Copyright: (c) 2000, Guilhem Lavaux
9// Licence: wxWindows licence
10/////////////////////////////////////////////////////////////////////////////
11
12#ifndef _MMBMAN_APP_H_
13#define _MMBMAN_APP_H_
14
e8482f24
GL
15#include "wx/stream.h"
16#include "wx/mmedia/sndbase.h"
17
18// -------------------------------------------------------------------------
19// Base structure definitions
20// -------------------------------------------------------------------------
21
22typedef struct {
23 wxUint8 seconds, minutes, hours;
24} MMBoardTime;
25
26// -------------------------------------------------------------------------
27// Constants
28// -------------------------------------------------------------------------
29
30#define MMBoard_NoError 0
31#define MMBoard_UnknownFile 1
32
33// -------------------------------------------------------------------------
34// Interface definition: MMBoardFile
35// -------------------------------------------------------------------------
36
37class MMBoardFile {
38 public:
39 MMBoardFile();
40 virtual ~MMBoardFile();
41
42 virtual bool NeedWindow() = 0;
43
44 virtual void SetWindow(wxWindow *window) = 0;
694f70fa 45
e8482f24
GL
46 virtual void Play() = 0;
47 virtual void Pause() = 0;
48 virtual void Resume() = 0;
49 virtual void Stop() = 0;
50
51 virtual MMBoardTime GetPosition() = 0;
52 virtual MMBoardTime GetLength() = 0;
53 virtual void SetPosition(MMBoardTime btime) = 0;
694f70fa 54
e8482f24
GL
55 virtual bool IsStopped() = 0;
56 virtual bool IsPaused() = 0;
57
58 virtual wxString GetStringType() = 0;
59 virtual wxString GetStringInformation() = 0;
60
61 void SetError(wxUint8 error) { m_error = error; }
62 wxUint8 GetError() const { return m_error; }
63
64 protected:
65 wxUint8 m_error;
66};
67
68// -------------------------------------------------------------------------
69// Main manager
70// -------------------------------------------------------------------------
71
72class MMBoardManager {
73 public:
74 static MMBoardFile *Open(const wxString& filename);
75
76 static wxSoundStream *OpenSoundStream();
77 static void UnrefSoundStream(wxSoundStream *stream);
78};
79
80#endif