+public:
+ ~wxQuickTimeLibrary()
+ {
+ if(m_dll.IsLoaded())
+ m_dll.Unload();
+ }
+
+ bool Initialize();
+ bool IsOk() const {return m_ok;}
+
+protected:
+ wxDynamicLibrary m_dll;
+ bool m_ok;
+
+public:
+ wxDL_VOIDMETHOD_DEFINE( StartMovie, (Movie m), (m) );
+ wxDL_VOIDMETHOD_DEFINE( StopMovie, (Movie m), (m) );
+ wxDL_METHOD_DEFINE( bool, IsMovieDone, (Movie m), (m), false);
+ wxDL_VOIDMETHOD_DEFINE( GoToBeginningOfMovie, (Movie m), (m) );
+ wxDL_METHOD_DEFINE( OSErr, GetMoviesError, (), (), -1);
+ wxDL_METHOD_DEFINE( OSErr, EnterMovies, (), (), -1);
+ wxDL_VOIDMETHOD_DEFINE( ExitMovies, (), () );
+ wxDL_METHOD_DEFINE( OSErr, InitializeQTML, (long flags), (flags), -1);
+ wxDL_VOIDMETHOD_DEFINE( TerminateQTML, (), () );
+
+ wxDL_METHOD_DEFINE( OSErr, NativePathNameToFSSpec,
+ (char* inName, FSSpec* outFile, long flags),
+ (inName, outFile, flags), -1);
+
+ wxDL_METHOD_DEFINE( OSErr, OpenMovieFile,
+ (const FSSpec * fileSpec, short * resRefNum, wxInt8 permission),
+ (fileSpec, resRefNum, permission), -1 );
+
+ wxDL_METHOD_DEFINE( OSErr, CloseMovieFile,
+ (short resRefNum), (resRefNum), -1);
+
+ wxDL_METHOD_DEFINE( OSErr, NewMovieFromFile,
+ (Movie * theMovie, short resRefNum, short * resId,
+ StringPtr resName, short newMovieFlags,
+ bool * dataRefWasChanged),
+ (theMovie, resRefNum, resId, resName, newMovieFlags,
+ dataRefWasChanged), -1);
+
+ wxDL_VOIDMETHOD_DEFINE( SetMovieRate, (Movie m, Fixed rate), (m, rate) );
+ wxDL_METHOD_DEFINE( Fixed, GetMovieRate, (Movie m), (m), 0);
+ wxDL_VOIDMETHOD_DEFINE( MoviesTask, (Movie m, long maxms), (m, maxms) );
+ wxDL_VOIDMETHOD_DEFINE( BlockMove,
+ (const char* p1, const char* p2, long s), (p1,p2,s) );
+ wxDL_METHOD_DEFINE( Handle, NewHandleClear, (long s), (s), NULL );
+
+ wxDL_METHOD_DEFINE( OSErr, NewMovieFromDataRef,
+ (Movie * m, short flags, short * id,
+ Handle dataRef, OSType dataRefType),
+ (m,flags,id,dataRef,dataRefType), -1 );
+
+ wxDL_VOIDMETHOD_DEFINE( DisposeHandle, (Handle h), (h) );
+ wxDL_VOIDMETHOD_DEFINE( GetMovieNaturalBoundsRect, (Movie m, Rect* r), (m,r) );
+ wxDL_METHOD_DEFINE( void*, GetMovieIndTrackType,
+ (Movie m, long index, OSType type, long flags),
+ (m,index,type,flags), NULL );
+ wxDL_VOIDMETHOD_DEFINE( CreatePortAssociation,
+ (void* hWnd, void* junk, long morejunk), (hWnd, junk, morejunk) );
+ wxDL_METHOD_DEFINE(void*, GetNativeWindowPort, (void* hWnd), (hWnd), NULL);
+ wxDL_VOIDMETHOD_DEFINE(SetMovieGWorld, (Movie m, CGrafPtr port, void* whatever),
+ (m, port, whatever) );
+ wxDL_VOIDMETHOD_DEFINE(DisposeMovie, (Movie m), (m) );
+ wxDL_VOIDMETHOD_DEFINE(SetMovieBox, (Movie m, Rect* r), (m,r));
+ wxDL_VOIDMETHOD_DEFINE(SetMovieTimeScale, (Movie m, long s), (m,s));
+ wxDL_METHOD_DEFINE(long, GetMovieDuration, (Movie m), (m), 0);
+ wxDL_METHOD_DEFINE(TimeBase, GetMovieTimeBase, (Movie m), (m), 0);
+ wxDL_METHOD_DEFINE(TimeScale, GetMovieTimeScale, (Movie m), (m), 0);
+ wxDL_METHOD_DEFINE(long, GetMovieTime, (Movie m, void* cruft), (m,cruft), 0);
+ wxDL_VOIDMETHOD_DEFINE(SetMovieTime, (Movie m, TimeRecord* tr), (m,tr) );
+};
+
+bool wxQuickTimeLibrary::Initialize()
+{
+ m_ok = false;
+
+ if(!m_dll.Load(wxT("qtmlClient.dll")))