home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DOS/V Power Report 1997 May
/
VPR9705A.ISO
/
VPR_DATA
/
PROGRAM
/
CBTRIAL
/
SETUP
/
DATA.Z
/
MPLAYER.HPP
< prev
next >
Wrap
C/C++ Source or Header
|
1997-02-14
|
11KB
|
280 lines
//----------------------------------------------------------------------------
// MPlayer.hpp - bcbdcc32 generated hdr (DO NOT EDIT) rev: 0
// From: MPlayer.pas
//----------------------------------------------------------------------------
#ifndef MPlayerHPP
#define MPlayerHPP
//----------------------------------------------------------------------------
#include <Menus.hpp>
#include <SysUtils.hpp>
#include <Dialogs.hpp>
#include <MMSystem.hpp>
#include <Messages.hpp>
#include <Graphics.hpp>
#include <Forms.hpp>
#include <Controls.hpp>
#include <Classes.hpp>
#include <Windows.hpp>
#include <System.hpp>
#pragma warn -par
#pragma warn -hid
#pragma warn -inl
namespace Mplayer
{
//-- type declarations -------------------------------------------------------
enum TMPBtnType { btPlay, btPause, btStop, btNext, btPrev, btStep, btBack, btRecord, btEject };
typedef Set<TMPBtnType, btPlay, btEject> TButtonSet;
enum TMPGlyph { mgEnabled, mgDisabled, mgColored };
struct TMPButton
{
bool Visible;
bool Enabled;
bool Colored;
bool Auto;
Graphics::TBitmap* Bitmaps[3];
} ;
enum TMPDeviceTypes { dtAutoSelect, dtAVIVideo, dtCDAudio, dtDAT, dtDigitalVideo, dtMMMovie, dtOther,
dtOverlay, dtScanner, dtSequencer, dtVCR, dtVideodisc, dtWaveAudio };
enum TMPTimeFormats { tfMilliseconds, tfHMS, tfMSF, tfFrames, tfSMPTE24, tfSMPTE25, tfSMPTE30, tfSMPTE30Drop,
tfBytes, tfSamples, tfTMSF };
enum TMPModes { mpNotReady, mpStopped, mpPlaying, mpRecording, mpSeeking, mpPaused, mpOpen };
enum TMPNotifyValues { nvSuccessful, nvSuperseded, nvAborted, nvFailure };
enum TMPDevCaps { mpCanStep, mpCanEject, mpCanPlay, mpCanRecord, mpUsesWindow };
typedef Set<TMPDevCaps, mpCanStep, mpUsesWindow> TMPDevCapsSet;
typedef void __fastcall (__closure *EMPNotify)(System::TObject* Sender, TMPBtnType Button, bool &DoDefault
);
typedef void __fastcall (__closure *EMPPostNotify)(System::TObject* Sender, TMPBtnType Button);
class __declspec(delphiclass) EMCIDeviceError;
class __declspec(pascalimplementation) EMCIDeviceError : public Sysutils::Exception
{
typedef Sysutils::Exception inherited;
public:
/* Exception.Create */ __fastcall EMCIDeviceError(const System::AnsiString Msg) : Sysutils::Exception(
Msg) { }
/* Exception.CreateFmt */ __fastcall EMCIDeviceError(const System::AnsiString Msg, const System::TVarRec
* Args, const int Args_Size) : Sysutils::Exception(Msg, Args, Args_Size) { }
/* Exception.CreateRes */ __fastcall EMCIDeviceError(int Ident) : Sysutils::Exception(Ident) { }
/* Exception.CreateResFmt */ __fastcall EMCIDeviceError(int Ident, const System::TVarRec * Args, const
int Args_Size) : Sysutils::Exception(Ident, Args, Args_Size) { }
/* Exception.CreateHelp */ __fastcall EMCIDeviceError(const System::AnsiString Msg, int AHelpContext
) : Sysutils::Exception(Msg, AHelpContext) { }
/* Exception.CreateFmtHelp */ __fastcall EMCIDeviceError(const System::AnsiString Msg, const System::TVarRec
* Args, const int Args_Size, int AHelpContext) : Sysutils::Exception(Msg, Args, Args_Size, AHelpContext
) { }
/* Exception.CreateResHelp */ __fastcall EMCIDeviceError(int Ident, int AHelpContext) : Sysutils::Exception(
Ident, AHelpContext) { }
/* Exception.CreateResFmtHelp */ __fastcall EMCIDeviceError(int Ident, const System::TVarRec * Args
, const int Args_Size, int AHelpContext) : Sysutils::Exception(Ident, Args, Args_Size, AHelpContext
) { }
public:
/* TObject.Destroy */ __fastcall virtual ~EMCIDeviceError(void) { }
};
class __declspec(delphiclass) TMediaPlayer;
class __declspec(pascalimplementation) TMediaPlayer : public Controls::TCustomControl
{
typedef Controls::TCustomControl inherited;
private:
TMPButton Buttons[9];
TButtonSet FVisibleButtons;
TButtonSet FEnabledButtons;
TButtonSet FColoredButtons;
TButtonSet FAutoButtons;
bool Pressed;
bool Down;
TMPBtnType CurrentButton;
Windows::TRect CurrentRect;
int ButtonWidth;
POINT MinBtnSize;
EMPNotify FOnClick;
EMPPostNotify FOnPostClick;
Classes::TNotifyEvent FOnNotify;
TMPBtnType FocusedButton;
bool MCIOpened;
TMPDevCapsSet FCapabilities;
bool FCanPlay;
bool FCanStep;
bool FCanEject;
bool FCanRecord;
bool FHasVideo;
long FFlags;
bool FWait;
bool FNotify;
bool FUseWait;
bool FUseNotify;
bool FUseFrom;
bool FUseTo;
Word FDeviceID;
TMPDeviceTypes FDeviceType;
long FTo;
long FFrom;
long FFrames;
long FError;
TMPNotifyValues FNotifyValue;
Controls::TWinControl* FDisplay;
int FDWidth;
int FDHeight;
System::AnsiString FElementName;
bool FAutoEnable;
bool FAutoOpen;
bool FAutoRewind;
bool FShareable;
void __fastcall LoadBitmaps(void);
void __fastcall DestroyBitmaps(void);
void __fastcall SetEnabledButtons(TButtonSet Value);
void __fastcall SetColored(TButtonSet Value);
HIDESBASE void __fastcall SetVisible(TButtonSet Value);
void __fastcall SetAutoEnable(bool Value);
void __fastcall DrawAutoButtons(void);
HIDESBASE void __fastcall DoMouseDown(int XPos, int YPos);
HIDESBASE MESSAGE void __fastcall WMLButtonDown(Messages::TWMMouse &Message);
HIDESBASE MESSAGE void __fastcall WMLButtonDblClk(Messages::TWMMouse &Message);
HIDESBASE MESSAGE void __fastcall WMMouseMove(Messages::TWMMouse &Message);
HIDESBASE MESSAGE void __fastcall WMLButtonUp(Messages::TWMMouse &Message);
HIDESBASE MESSAGE void __fastcall WMSetFocus(Messages::TWMSetFocus &Message);
HIDESBASE MESSAGE void __fastcall WMKillFocus(Messages::TWMKillFocus &Message);
MESSAGE void __fastcall WMGetDlgCode(Messages::TWMNoParams &Message);
HIDESBASE MESSAGE void __fastcall WMSize(Messages::TWMSize &Message);
virtual void __fastcall KeyDown(Word &Key, Classes::TShiftState Shift);
int __fastcall VisibleButtonCount(void);
void __fastcall Adjust(void);
void __fastcall DoClick(TMPBtnType Button);
void __fastcall DoPostClick(TMPBtnType Button);
void __fastcall DrawButton(TMPBtnType Btn, int X);
void __fastcall CheckIfOpen(void);
void __fastcall SetPosition(long Value);
void __fastcall SetDeviceType(TMPDeviceTypes Value);
void __fastcall SetWait(bool Flag);
void __fastcall SetNotify(bool Flag);
void __fastcall SetFrom(long Value);
void __fastcall SetTo(long Value);
void __fastcall SetTimeFormat(TMPTimeFormats Value);
void __fastcall SetDisplay(Controls::TWinControl* Value);
void __fastcall SetOrigDisplay(void);
void __fastcall SetDisplayRect(const Windows::TRect &Value);
Windows::TRect __fastcall GetDisplayRect(void);
void __fastcall GetDeviceCaps(void);
long __fastcall GetStart(void);
long __fastcall GetLength(void);
TMPModes __fastcall GetMode(void);
long __fastcall GetTracks(void);
long __fastcall GetPosition(void);
System::AnsiString __fastcall GetErrorMessage(void);
TMPTimeFormats __fastcall GetTimeFormat(void);
long __fastcall GetTrackLength(int TrackNum);
long __fastcall GetTrackPosition(int TrackNum);
protected:
virtual void __fastcall Loaded(void);
virtual void __fastcall AutoButtonSet(TMPBtnType Btn);
virtual void __fastcall Notification(Classes::TComponent* AComponent, Classes::TOperation Operation
);
virtual void __fastcall Paint(void);
MESSAGE void __fastcall MMNotify(Messages::TMessage &Message);
HIDESBASE virtual void __fastcall Click(TMPBtnType Button, bool &DoDefault);
virtual void __fastcall PostClick(TMPBtnType Button);
virtual void __fastcall DoNotify(void);
virtual void __fastcall Updated(void);
public:
__fastcall virtual TMediaPlayer(Classes::TComponent* AOwner);
__fastcall virtual ~TMediaPlayer(void);
void __fastcall Open(void);
void __fastcall Close(void);
void __fastcall Play(void);
void __fastcall Stop(void);
void __fastcall Pause(void);
void __fastcall Step(void);
void __fastcall Back(void);
void __fastcall Previous(void);
void __fastcall Next(void);
void __fastcall StartRecording(void);
void __fastcall Eject(void);
void __fastcall Save(void);
void __fastcall PauseOnly(void);
void __fastcall Resume(void);
void __fastcall Rewind(void);
__property long TrackLength[int TrackNum] = {read=GetTrackLength};
__property long TrackPosition[int TrackNum] = {read=GetTrackPosition};
__property TMPDevCapsSet Capabilities = {read=FCapabilities, nodefault};
__property long Error = {read=FError, nodefault};
__property System::AnsiString ErrorMessage = {read=GetErrorMessage, nodefault};
__property long Start = {read=GetStart, nodefault};
__property long Length = {read=GetLength, nodefault};
__property long Tracks = {read=GetTracks, nodefault};
__property long Frames = {read=FFrames, write=FFrames, nodefault};
__property TMPModes Mode = {read=GetMode, nodefault};
__property long Position = {read=GetPosition, write=SetPosition, nodefault};
__property bool Wait = {read=FWait, write=SetWait, nodefault};
__property bool Notify = {read=FNotify, write=SetNotify, nodefault};
__property TMPNotifyValues NotifyValue = {read=FNotifyValue, nodefault};
__property long StartPos = {read=FFrom, write=SetFrom, nodefault};
__property long EndPos = {read=FTo, write=SetTo, nodefault};
__property Word DeviceID = {read=FDeviceID, nodefault};
__property TMPTimeFormats TimeFormat = {read=GetTimeFormat, write=SetTimeFormat, nodefault};
__property Windows::TRect DisplayRect = {read=GetDisplayRect, write=SetDisplayRect};
__published:
__property TButtonSet ColoredButtons = {read=FColoredButtons, write=SetColored, default=511};
__property Enabled ;
__property TButtonSet EnabledButtons = {read=FEnabledButtons, write=SetEnabledButtons, default=511}
;
__property TButtonSet VisibleButtons = {read=FVisibleButtons, write=SetVisible, default=511};
__property bool AutoEnable = {read=FAutoEnable, write=SetAutoEnable, default=1};
__property bool AutoOpen = {read=FAutoOpen, write=FAutoOpen, default=0};
__property bool AutoRewind = {read=FAutoRewind, write=FAutoRewind, default=1};
__property TMPDeviceTypes DeviceType = {read=FDeviceType, write=SetDeviceType, default=0};
__property Controls::TWinControl* Display = {read=FDisplay, write=SetDisplay, nodefault};
__property System::AnsiString FileName = {read=FElementName, write=FElementName, nodefault};
__property bool Shareable = {read=FShareable, write=FShareable, default=0};
__property Visible ;
__property ParentShowHint ;
__property ShowHint ;
__property PopupMenu ;
__property TabOrder ;
__property TabStop ;
__property EMPNotify OnClick = {read=FOnClick, write=FOnClick};
__property OnEnter ;
__property OnExit ;
__property EMPPostNotify OnPostClick = {read=FOnPostClick, write=FOnPostClick};
__property Classes::TNotifyEvent OnNotify = {read=FOnNotify, write=FOnNotify};
public:
/* TWinControl.CreateParented */ __fastcall TMediaPlayer(HWND ParentWindow) : Controls::TCustomControl(
ParentWindow) { }
};
//-- var, const, procedure ---------------------------------------------------
//-- template instantiations -------------------------------------------------
template class TMPDevCapsSet ;
template class TButtonSet ;
} /* namespace Mplayer */
#pragma warn .par
#pragma warn .hid
#pragma warn .inl
#if !defined(NO_IMPLICIT_NAMESPACE_USE)
using namespace Mplayer;
#endif
//-- end unit ----------------------------------------------------------------
#endif // MPlayer