home *** CD-ROM | disk | FTP | other *** search
- //----------------------------------------------------------------------------
- // MPlayer.hpp - dcc32 generated hdr (DO NOT EDIT) rev: -2
- // From: MPlayer.pas
- //----------------------------------------------------------------------------
- #ifndef MPlayerHPP
- #define MPlayerHPP
- //----------------------------------------------------------------------------
- #ifndef MenusHPP
- #include <Menus.hpp>
- #endif
-
- #ifndef SysUtilsHPP
- #include <SysUtils.hpp>
- #endif
-
- #ifndef DialogsHPP
- #include <Dialogs.hpp>
- #endif
-
- #ifndef MMSystemHPP
- #include <MMSystem.hpp>
- #endif
-
- #ifndef MessagesHPP
- #include <Messages.hpp>
- #endif
-
- #ifndef GraphicsHPP
- #include <Graphics.hpp>
- #endif
-
- #ifndef FormsHPP
- #include <Forms.hpp>
- #endif
-
- #ifndef ControlsHPP
- #include <Controls.hpp>
- #endif
-
- #ifndef ClassesHPP
- #include <Classes.hpp>
- #endif
-
- #ifndef WindowsHPP
- #include <Windows.hpp>
- #endif
-
- #ifndef SystemHPP
- #include <System.hpp>
- #endif
-
- 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
- {
- System::Boolean Visible;
- System::Boolean Enabled;
- System::Boolean Colored;
- System::Boolean 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, System::Boolean
- &DoDefault);
-
- typedef void __fastcall (__closure *EMPPostNotify)(System::TObject *Sender, TMPBtnType Button);
-
- class __declspec(delphiclass) EMCIDeviceError;
- class __declspec(pascalimplementation) EMCIDeviceError : public Sysutils::Exception
- {
- typedef EMCIDeviceError ThisClass;
- 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 TVarRec
- *Args, const System::Integer Args_Size) : Sysutils::Exception(Msg, Args, Args_Size) { }
- /* !! Exception.CreateRes */ __fastcall EMCIDeviceError(System::Integer Ident) : Sysutils::Exception(
- Ident) { }
- /* !! Exception.CreateResFmt */ __fastcall EMCIDeviceError(System::Integer Ident, const TVarRec *Args
- , const System::Integer Args_Size) : Sysutils::Exception(Ident, Args, Args_Size) { }
- /* !! Exception.CreateHelp */ __fastcall EMCIDeviceError(const System::AnsiString Msg, System::Integer
- AHelpContext) : Sysutils::Exception(Msg, AHelpContext) { }
- /* !! Exception.CreateFmtHelp */ __fastcall EMCIDeviceError(const System::AnsiString Msg, const TVarRec
- *Args, const System::Integer Args_Size, System::Integer AHelpContext) : Sysutils::Exception(Msg, Args
- , Args_Size, AHelpContext) { }
- /* !! Exception.CreateResHelp */ __fastcall EMCIDeviceError(System::Integer Ident, System::Integer
- AHelpContext) : Sysutils::Exception(Ident, AHelpContext) { }
- /* !! Exception.CreateResFmtHelp */ __fastcall EMCIDeviceError(System::Integer Ident, const TVarRec
- *Args, const System::Integer Args_Size, System::Integer 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 TMediaPlayer ThisClass;
- typedef Controls::TCustomControl inherited;
-
- private:
- TMPButton Buttons[9];
- TButtonSet FVisibleButtons;
- TButtonSet FEnabledButtons;
- TButtonSet FColoredButtons;
- TButtonSet FAutoButtons;
- System::Boolean Pressed;
- System::Boolean Down;
- TMPBtnType CurrentButton;
- Windows::TRect CurrentRect;
- System::Integer ButtonWidth;
- Windows::TPoint MinBtnSize;
- EMPNotify FOnClick;
- EMPPostNotify FOnPostClick;
- Classes::TNotifyEvent FOnNotify;
- TMPBtnType FocusedButton;
- System::Boolean MCIOpened;
- TMPDevCapsSet FCapabilities;
- System::Boolean FCanPlay;
- System::Boolean FCanStep;
- System::Boolean FCanEject;
- System::Boolean FCanRecord;
- System::Boolean FHasVideo;
- System::Longint FFlags;
- System::Boolean FWait;
- System::Boolean FNotify;
- System::Boolean FUseWait;
- System::Boolean FUseNotify;
- System::Boolean FUseFrom;
- System::Boolean FUseTo;
- System::Word FDeviceID;
- TMPDeviceTypes FDeviceType;
- System::Longint FTo;
- System::Longint FFrom;
- System::Longint FFrames;
- System::Longint FError;
- TMPNotifyValues FNotifyValue;
- Controls::TWinControl *FDisplay;
- System::Integer FDWidth;
- System::Integer FDHeight;
- System::AnsiString FElementName;
- System::Boolean FAutoEnable;
- System::Boolean FAutoOpen;
- System::Boolean FAutoRewind;
- System::Boolean FShareable;
- void __fastcall LoadBitmaps(void);
- void __fastcall DestroyBitmaps(void);
- void __fastcall SetEnabledButtons( TButtonSet Value);
- void __fastcall SetColored( TButtonSet Value);
- void __fastcall SetVisible( TButtonSet Value);
- void __fastcall SetAutoEnable(System::Boolean Value);
- void __fastcall DrawAutoButtons(void);
- void __fastcall DoMouseDown(System::Integer XPos, System::Integer YPos);
- MESSAGE void __fastcall WMLButtonDown(Messages::TWMMouse &Message);
- MESSAGE void __fastcall WMLButtonDblClk(Messages::TWMMouse &Message);
- MESSAGE void __fastcall WMMouseMove(Messages::TWMMouse &Message);
- MESSAGE void __fastcall WMLButtonUp(Messages::TWMMouse &Message);
- MESSAGE void __fastcall WMSetFocus(Messages::TWMSetFocus &Message);
- MESSAGE void __fastcall WMKillFocus(Messages::TWMKillFocus &Message);
- MESSAGE void __fastcall WMGetDlgCode(Messages::TWMNoParams &Message);
- MESSAGE void __fastcall WMSize(Messages::TWMSize &Message);
- virtual void __fastcall KeyDown(System::Word &Key, Classes::TShiftState Shift);
- System::Integer __fastcall VisibleButtonCount(void);
- void __fastcall Adjust(void);
- void __fastcall DoClick(TMPBtnType Button);
- void __fastcall DoPostClick(TMPBtnType Button);
- void __fastcall DrawButton(TMPBtnType Btn, System::Integer X);
- void __fastcall CheckIfOpen(void);
- void __fastcall SetPosition(System::Longint Value);
- void __fastcall SetDeviceType(TMPDeviceTypes Value);
- void __fastcall SetWait(System::Boolean Flag);
- void __fastcall SetNotify(System::Boolean Flag);
- void __fastcall SetFrom(System::Longint Value);
- void __fastcall SetTo(System::Longint 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);
- System::Longint __fastcall GetStart(void);
- System::Longint __fastcall GetLength(void);
- TMPModes __fastcall GetMode(void);
- System::Longint __fastcall GetTracks(void);
- System::Longint __fastcall GetPosition(void);
- System::AnsiString __fastcall GetErrorMessage(void);
- TMPTimeFormats __fastcall GetTimeFormat(void);
- System::Longint __fastcall GetTrackLength(System::Integer TrackNum);
- System::Longint __fastcall GetTrackPosition(System::Integer 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);
- virtual void __fastcall Click(TMPBtnType Button, System::Boolean &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 System::Longint TrackLength[System::Integer TrackNum] = {read=GetTrackLength};
- __property System::Longint TrackPosition[System::Integer TrackNum] = {read=GetTrackPosition};
- __property TMPDevCapsSet Capabilities = {read=FCapabilities, nodefault};
- __property System::Longint Error = {read=FError, nodefault};
- __property System::AnsiString ErrorMessage = {read=GetErrorMessage, nodefault};
- __property System::Longint Start = {read=GetStart, nodefault};
- __property System::Longint Length = {read=GetLength, nodefault};
- __property System::Longint Tracks = {read=GetTracks, nodefault};
- __property System::Longint Frames = {read=FFrames, write=FFrames, nodefault};
- __property TMPModes Mode = {read=GetMode, nodefault};
- __property System::Longint Position = {read=GetPosition, write=SetPosition, nodefault};
- __property System::Boolean Wait = {read=FWait, write=SetWait, nodefault};
- __property System::Boolean Notify = {read=FNotify, write=SetNotify, nodefault};
- __property TMPNotifyValues NotifyValue = {read=FNotifyValue, nodefault};
- __property System::Longint StartPos = {read=FFrom, write=SetFrom, nodefault};
- __property System::Longint EndPos = {read=FTo, write=SetTo, nodefault};
- __property System::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 System::Boolean AutoEnable = {read=FAutoEnable, write=SetAutoEnable, default=1};
- __property System::Boolean AutoOpen = {read=FAutoOpen, write=FAutoOpen, default=0};
- __property System::Boolean 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 System::Boolean 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};
- };
-
- //-- var, const, procedure ---------------------------------------------------
- //-- template instantiations -------------------------------------------------
- template class TMPDevCapsSet ;
- template class TButtonSet ;
-
- } /* namespace Mplayer */
- #if !defined(NO_IMPLICIT_NAMESPACE_USE)
- using namespace Mplayer;
- #endif
- //-- end unit ----------------------------------------------------------------
- #endif // MPlayer
-